aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in37
1 files changed, 34 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index fb8e90d89..19a0e1103 100644
--- a/configure.in
+++ b/configure.in
@@ -51,9 +51,6 @@ AC_CHECK_TYPES([bool])
AC_LANG_POP([C++])
-# Check for functions
-AC_CHECK_FUNC(popen, AC_DEFINE(HAVE_POPEN, 1, [Define if popen is available]))
-
# Set info about shared libraries.
AC_SUBST(SO)
AC_SUBST(LDSHARED)
@@ -284,6 +281,40 @@ echo "Checking for installed packages."
echo "Note : None of the following packages are required to compile SWIG"
echo ""
+#----------------------------------------------------------------
+# Look for popen
+#----------------------------------------------------------------
+
+AC_ARG_WITH(popen, AS_HELP_STRING([--without-popen], [Disable popen]), with_popen="$withval")
+if test x"${with_popen}" = xno ; then
+AC_MSG_NOTICE([Disabling popen])
+else
+AC_CHECK_FUNC(popen, AC_DEFINE(HAVE_POPEN, 1, [Define if popen is available]), AC_MSG_NOTICE([Disabling popen]))
+fi
+
+#----------------------------------------------------------------
+# Look for RxSpencer
+#----------------------------------------------------------------
+
+AC_ARG_WITH(rxspencer, AS_HELP_STRING([--with-rxspencer], [Enable RxSpencer]), with_rxspencer="yes")
+if test x"${with_rxspencer}" = xyes ; then
+#check first for the header
+ AC_CHECK_HEADER(rxspencer/regex.h,with_rxspencer="yes",with_rxspencer="no")
+ if test x"${with_rxspencer}" = xyes ; then
+# now check for the library
+ AC_CHECK_LIB(rxspencer, regcomp,with_rxspencer="yes",with_rxspencer="no")
+ fi
+ if test x"${with_rxspencer}" = xyes ; then
+# library and header are available
+ AC_DEFINE(HAVE_RXSPENCER, 1,[Define if rxspencer is available])
+ LIBS="$LIBS -lrxspencer"
+ else
+ AC_MSG_NOTICE([RxSpencer not found. Obtain it at http://arglist.com/regex or http://gnuwin32.sourceforge.net/packages.html])
+ fi
+fi
+
+#----------------------------------------------------------------
+
# Check for specific libraries. Used for SWIG examples
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX