fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_safe=`echo "pcre.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for pcre.h""... $ac_c" 1>&6
+echo "configure:1059: checking for pcre.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1064 "configure"
+#include "confdefs.h"
+#include <pcre.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
have_pcre=yes
else
have_pcre=no
fi
+else
+ echo "$ac_t""no" 1>&6
+have_pcre=no
+fi
+
echo $ac_n "checking for regcomp in -lpcreposix""... $ac_c" 1>&6
-echo "configure:1064: checking for regcomp in -lpcreposix" >&5
+echo "configure:1097: checking for regcomp in -lpcreposix" >&5
ac_lib_var=`echo pcreposix'_'regcomp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpcreposix -lpcre $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1072 "configure"
+#line 1105 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
regcomp()
; return 0; }
EOF
-if { (eval echo configure:1083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_safe=`echo "pcreposix.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for pcreposix.h""... $ac_c" 1>&6
+echo "configure:1133: checking for pcreposix.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1138 "configure"
+#include "confdefs.h"
+#include <pcreposix.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
have_pcreposix=yes
else
have_pcreposix=no
fi
+else
+ echo "$ac_t""no" 1>&6
+have_pcreposix=no
+fi
+
echo $ac_n "checking for pcrs_compile in -lpcrs""... $ac_c" 1>&6
-echo "configure:1105: checking for pcrs_compile in -lpcrs" >&5
+echo "configure:1171: checking for pcrs_compile in -lpcrs" >&5
ac_lib_var=`echo pcrs'_'pcrs_compile | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpcrs $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1113 "configure"
+#line 1179 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pcrs_compile()
; return 0; }
EOF
-if { (eval echo configure:1124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_safe=`echo "pcrs.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for pcrs.h""... $ac_c" 1>&6
+echo "configure:1207: checking for pcrs.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1212 "configure"
+#include "confdefs.h"
+#include <pcrs.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
have_pcrs=yes
+else
+ echo "$ac_t""no" 1>&6
+have_pcre=no
+fi
+
else
echo "$ac_t""no" 1>&6
have_pcrs=no
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1147: checking for ANSI C header files" >&5
+echo "configure:1246: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1152 "configure"
+#line 1251 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1177 "configure"
+#line 1276 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1195 "configure"
+#line 1294 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1216 "configure"
+#line 1315 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1252: checking for working const" >&5
+echo "configure:1351: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1257 "configure"
+#line 1356 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1327: checking for size_t" >&5
+echo "configure:1426: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1332 "configure"
+#line 1431 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
for ac_func in strerror bcopy memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1363: checking for $ac_func" >&5
+echo "configure:1462: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1368 "configure"
+#line 1467 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
+
# Check whether --enable-mingw32 or --disable-mingw32 was given.
if test "${enable_mingw32+set}" = set; then
enableval="$enable_mingw32"
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
else
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
fi
+
SOLARIS_ONLY=#
if test "${enable_pthread+set}" = set; then
enableval="$enable_pthread"
if test $enableval = yes; then
+ PTHREAD_ONLY=
cat >> confdefs.h <<\EOF
#define FEATURE_PTHREAD 1
EOF
+else
+ PTHREAD_ONLY=#
fi
else
cat >> confdefs.h <<\EOF
#define FEATURE_PTHREAD 1
EOF
+ PTHREAD_ONLY=
+
fi
+
# Check whether --enable-gzip or --disable-gzip was given.
if test "${enable_gzip+set}" = set; then
enableval="$enable_gzip"
s%@OBJEXT@%$OBJEXT%g
s%@WIN_ONLY@%$WIN_ONLY%g
s%@CYGWIN_FLAGS@%$CYGWIN_FLAGS%g
+s%@PTHREAD_LIB@%$PTHREAD_LIB%g
s%@SOLARIS_ONLY@%$SOLARIS_ONLY%g
+s%@PTHREAD_ONLY@%$PTHREAD_ONLY%g
s%@GNU_REGEX_ONLY@%$GNU_REGEX_ONLY%g
s%@PCRE_REGEX_ONLY@%$PCRE_REGEX_ONLY%g
s%@STATIC_PCRE_ONLY@%$STATIC_PCRE_ONLY%g
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl $Id: configure.in,v 1.7 2001/07/13 13:58:05 oes Exp $
+dnl $Id: configure.in,v 1.8 2001/07/15 17:54:29 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.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:
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_pcre=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_ARG_ENABLE(pthread,
[ --disable-pthread Don't use POSIX threads (pthreads)],
[if test $enableval = yes; then
+ PTHREAD_ONLY=
AC_DEFINE(FEATURE_PTHREAD)
-fi],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.],