Change ngrep's build system to use the system's version of PCRE. --- Makefile.in | 6 ++---- configure | 11 +++-------- configure.in | 11 +++-------- ngrep.c | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) --- a/configure +++ b/configure @@ -3624,13 +3624,10 @@ if test $use_pcre = yes; then - echo - echo 'Configuring Perl-Compatible Regular Expression (PCRE) library ...' - echo - - REGEX_DIR='pcre-5.0' - REGEX_OBJS="$REGEX_DIR/pcre.o $REGEX_DIR/study.o" + REGEX_DIR='' + REGEX_OBJS="" USE_PCRE="1" + EXTRA_LIBS="$EXTRA_LIBS -lpcre" else @@ -3644,8 +3641,6 @@ fi -( cd $REGEX_DIR && ./configure ) - --- a/configure.in +++ b/configure.in @@ -126,13 +126,10 @@ if test $use_pcre = yes; then - echo - echo 'Configuring Perl-Compatible Regular Expression (PCRE) library ...' - echo - - REGEX_DIR='pcre-5.0' - REGEX_OBJS="$REGEX_DIR/pcre.o $REGEX_DIR/study.o" + REGEX_DIR='' + REGEX_OBJS="" USE_PCRE="1" + EXTRA_LIBS="$EXTRA_LIBS -lpcre" else @@ -146,8 +143,6 @@ fi -( cd $REGEX_DIR && ./configure ) - AC_SUBST(REGEX_DIR) AC_SUBST(REGEX_OBJS) --- a/Makefile.in +++ b/Makefile.in @@ -7,7 +7,7 @@ CC=@CC@ -CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ +CFLAGS=@CFLAGS@ @CPPFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@ LDFLAGS=@LDFLAGS@ @PCAP_LINK@ @@ -39,13 +39,13 @@ all: $(TARGET) $(TARGET): $(REGEX_OBJS) $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) debug: $(REGEX_OBJS) $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) static: $(REGEX_OBJS) $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(LIBS) install: $(TARGET) $(INSTALL) -c -m 0755 $(TARGET) $(DESTDIR)/$(BINDIR_INSTALL)/$(TARGET) @@ -55,11 +55,9 @@ $(CC) $(CFLAGS) $(INCLUDES) -g -c $< clean: - make -C $(REGEX_DIR) clean rm -f *~ $(OBJS) $(REGEX_OBJS) $(TARGET) $(TARGET).static distclean: clean - make -C $(REGEX_DIR) distclean rm -f config.status config.cache config.log config.h Makefile $(REGEX_OBJS): $(REGEX_OBJS:.o=.c) $(REGEX_DIR)/*.h --- a/ngrep.c +++ b/ngrep.c @@ -92,7 +92,7 @@ #endif #if USE_PCRE -#include "pcre-5.0/pcre.h" +#include #else #include "regex-0.12/regex.h" #endif