summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-03-11 20:40:26 +0000
committerStef Walter <stef@memberwebs.com>2006-03-11 20:40:26 +0000
commitcb091770076f9b92d8df5a7589505f6bf64341b9 (patch)
treed27acdeecd80c4cbe852800017147aa847c4a1dd /configure.in
parenta50303c1cb7a4f6b3dd3b78aa2ee076ef0a758e8 (diff)
Add support for using standard regular expression library.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in24
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