diff --git a/Makefile b/Makefile index 55ff9ba17..df4a4af53 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,11 @@ ifndef CXXFLAGS endif ifeq ($(HAVE_RULES),yes) - CXXFLAGS += -DHAVE_RULES + CXXFLAGS += -DHAVE_RULES $(shell pcre-config --cflags) ifdef LIBS - LIBS += -lpcre + LIBS += $(shell pcre-config --libs) else - LIBS=-lpcre + LIBS=$(shell pcre-config --libs) endif endif diff --git a/tools/dmake.cpp b/tools/dmake.cpp index bf33dbc35..d7d4479ce 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -239,11 +239,11 @@ int main(int argc, char **argv) } fout << "ifeq ($(HAVE_RULES),yes)\n" - << " CXXFLAGS += -DHAVE_RULES\n" + << " CXXFLAGS += -DHAVE_RULES $(shell pcre-config --cflags)\n" << " ifdef LIBS\n" - << " LIBS += -lpcre\n" + << " LIBS += $(shell pcre-config --libs)\n" << " else\n" - << " LIBS=-lpcre\n" + << " LIBS=$(shell pcre-config --libs)\n" << " endif\n" << "endif\n\n";