diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 24 |
1 files changed, 16 insertions, 8 deletions
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 |