dnl Process this file with autoconf to produce a configure script.
dnl
-dnl $Id: configure.in,v 1.6 2001/06/29 21:56:40 oes Exp $
+dnl $Id: configure.in,v 1.9 2001/07/15 19:45:13 jongfoster Exp $
dnl
dnl Written by and Copyright (C) 2001 the SourceForge
dnl IJBSWA team. http://ijbswa.sourceforge.net
dnl Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl $Log: configure.in,v $
+dnl Revision 1.9 2001/07/15 19:45:13 jongfoster
+dnl Added support for linking with POSIX threads library
+dnl
+dnl Revision 1.8 2001/07/15 17:54:29 jongfoster
+dnl Renaming #define STATIC to STATIC_PCRE
+dnl Adding new #define FEATURE_PTHREAD that will be used to enable
+dnl POSIX threads support.
+dnl
+dnl Revision 1.7 2001/07/13 13:58:05 oes
+dnl Completely reorganized the selection scheme for
+dnl pcre, pcreposix, pcrs and gnu_regex:
+dnl
+dnl The presence of shared pcre, pcreposix or pcrs
+dnl libraried is now autodetected. Additionally, the
+dnl user can enforce using the built-in static variants
+dnl by specifying --disable-dynamic-(pcre|pcrs).
+dnl Care is taken to avoid that pcre is dyn, while pcreposix
+dnl is static, if both are used and that pcrs is static if
+dnl pcrs is.
+dnl
+dnl The choice between pcre, gnu or no regex for actionsfile
+dnl URL matching is now via
+dnl --(enable|disable)-regex-matching[=(gnu|pcre|no)] with the
+dnl default being pcre.
+dnl
dnl Revision 1.6 2001/06/29 21:56:40 oes
dnl Version -> 2.9.5
dnl
AC_OBJEXT
dnl Checks for libraries.
-AC_CHECK_LIB(pcre, pcre_compile, [have_pcre=yes], [have_pcre=no])
-AC_CHECK_LIB(pcreposix, regcomp, [have_pcreposix=yes], [have_pcreposix=no], -lpcre)
-AC_CHECK_LIB(pcrs, pcrs_compile, [have_pcrs=yes], [have_pcrs=no])
+dnl Note: Some systems have the library but not the system header file,
+dnl so we must check for both.
+AC_CHECK_LIB(pcre, pcre_compile, [AC_CHECK_HEADER(pcre.h, [have_pcre=yes], [have_pcre=no])], [have_pcre=no])
+AC_CHECK_LIB(pcreposix, regcomp, [AC_CHECK_HEADER(pcreposix.h, [have_pcreposix=yes], [have_pcreposix=no])], [have_pcreposix=no], -lpcre)
+AC_CHECK_LIB(pcrs, pcrs_compile, [AC_CHECK_HEADER(pcrs.h, [have_pcrs=yes], [have_pcrs=no])], [have_pcrs=no])
dnl Checks for header files.
AC_HEADER_STDC
dnl Build type
+dnl Note: PTHREAD_LIB is always set, even if pthread is disabled.
+
AC_ARG_ENABLE(mingw32,
[ --enable-mingw32 Use mingw32 for a Windows GUI],
[if test $enableval = yes; then
WIN_ONLY=
CYGWIN_FLAGS="-mwindows -mno-cygwin"
+ PTHREAD_LIB=-lpthreadGC
echo "Using mingw32 (Win32 GUI)"
else
WIN_ONLY=#
if test "$CYGWIN" = "yes"; then
CYGWIN_FLAGS="-mno-win32"
+ PTHREAD_LIB=
echo "Using Cygnus (Win32 command line)"
else
CYGWIN_FLAGS=
+ PTHREAD_LIB=-lpthread
fi
fi],
[if test "$MINGW32" = "yes"; then
WIN_ONLY=
CYGWIN_FLAGS="-mwindows -mno-cygwin"
+ PTHREAD_LIB=-lpthreadGC
echo "Using mingw32 (Win32 GUI)"
else
WIN_ONLY=#
if test "$CYGWIN" = "yes"; then
CYGWIN_FLAGS="-mno-win32"
+ PTHREAD_LIB=
echo "Using Cygnus (Win32 command line)"
else
CYGWIN_FLAGS=
+ PTHREAD_LIB=-lpthread
fi
fi])
AC_SUBST(WIN_ONLY)
AC_SUBST(CYGWIN_FLAGS)
+AC_SUBST(PTHREAD_LIB)
SOLARIS_ONLY=#
AC_SUBST(SOLARIS_ONLY)
AC_DEFINE(TOGGLE)
fi],AC_DEFINE(TOGGLE))
+AC_ARG_ENABLE(pthread,
+[ --disable-pthread Don't use POSIX threads (pthreads)],
+[if test $enableval = yes; then
+ PTHREAD_ONLY=
+ AC_DEFINE(FEATURE_PTHREAD)
+else
+ PTHREAD_ONLY=#
+fi],[AC_DEFINE(FEATURE_PTHREAD)
+ PTHREAD_ONLY=
+])
+AC_SUBST(PTHREAD_ONLY)
+
AC_ARG_ENABLE(gzip,
[ --enable-gzip Allow gzip'ed transfer of documents. Note that this will make content modification impossible.],
[if test $enableval = "no"; then
else
echo "using built-in static pcre"
pcre_dyn=no
- AC_DEFINE(STATIC)
+ AC_DEFINE(STATIC_PCRE)
STATIC_PCRE_ONLY=
fi