From cb091770076f9b92d8df5a7589505f6bf64341b9 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 11 Mar 2006 20:40:26 +0000 Subject: Add support for using standard regular expression library. --- configure.in | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index b4d83d2..fbaa423 100644 --- a/configure.in +++ b/configure.in @@ -19,21 +19,29 @@ AC_ARG_ENABLE(debug, [Compile binaries in debug mode])) if test "$enable_debug" = "yes"; then - CFLAGS="$CFLAGS -g -O0 -Wall" - AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode]) - echo "enabling debug compile mode" + CFLAGS="$CFLAGS -g -O0 -Wall" + AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode]) + echo "enabling debug compile mode" fi # Some checks for libraries AC_CHECK_LIB(bsnmp, snmp_close, , [echo "Couldn't find the bsnmp library"; exit 1]) -AC_CHECK_LIB(pcre, pcre_compile, , - [echo "Couldn't find the pcre library"; exit 1]) - + # Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS("pcre.h", , - [echo "Couldn't find pcre headers"; exit 1]) + +AC_ARG_ENABLE(pcre, + AC_HELP_STRING([--with-pcre], + [Use PCRE instead of the default regular expression library])) + +if test "$enable_pcre" = "yes"; then + AC_CHECK_LIB(pcre, pcre_compile, , + [echo "Couldn't find the pcre library"; exit 1]) + AC_CHECK_HEADERS("pcre.h", , + [echo "Couldn't find pcre headers"; exit 1]) + AC_DEFINE_UNQUOTED(WITH_PCRE, 1, [Use PCRE regular expression library]) +fi # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -- cgit v1.2.3