aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMarcelo Matus <mmatus@acms.arizona.edu>2006-01-17 00:32:21 +0000
committerMarcelo Matus <mmatus@acms.arizona.edu>2006-01-17 00:32:21 +0000
commitdbe05fc50bfc3f8aadafe6e1e6af5c3a9b86f77d (patch)
tree9b954b2a6539ae6d9c29c7d503b91ece014e9360 /configure.in
parent526be12c1e8ffb33ab7088e81e364e345cc503dc (diff)
downloadswig-dbe05fc50bfc3f8aadafe6e1e6af5c3a9b86f77d.tar.gz
add initial regexp support based on the coptional rxspencer library. Active it using --with-rxspencer after installing the rxspencer library
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
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