X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=configure;h=628b48e13e21c6a6ed304182df4ef161832f2511;hp=e06d48a01bf09fc4b446cade34c91b106b043873;hb=bd18cebb4ffe568926d3fe10ac5d7476ecf3f16a;hpb=b28e9205bb0d4ac98d591c6e506219438799d56c diff --git a/configure b/configure index e06d48a0..628b48e1 100755 --- a/configure +++ b/configure @@ -13,14 +13,12 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --enable-mingw32 Use mingw32 for a Windows GUI" -ac_help="$ac_help - --disable-regex Don't allow regular expressions in the blockfile" -ac_help="$ac_help - --disable-pcre-regex Use old, slow GNU Regex instead of PCRE." ac_help="$ac_help --disable-toggle Don't support temporary disable" ac_help="$ac_help - --disable-pcrs Don't support arbitrary content modification" + --disable-pthread Don't use POSIX threads (pthreads)" +ac_help="$ac_help + --enable-gzip Allow gzip'ed transfer of documents. Note that this will make content modification impossible." ac_help="$ac_help --disable-force Don't allow blockfle to be bypassed" ac_help="$ac_help @@ -48,8 +46,13 @@ ac_help="$ac_help ac_help="$ac_help --disable-jar-files Prevents the use of jar files to capture cookies." ac_help="$ac_help - --disable-static-pcre Link dynamically with the pcre and pcreposix - libraries. You must build the libraries seperately." + --enable-regex-matching=pcre Use perl-compatible regex for actionsfile pattern matching (default) + --enable-regex-matching=gnu Use gnu style regex for actionsfile pattern matching (-> bigger binary) + --disable-regex-matching Don't use regex matching, compare URL prefix instead (won't shrink birary)" +ac_help="$ac_help + --disable-dynamic-pcre Use the built-in, static pcre, even if libpcre is available" +ac_help="$ac_help + --disable-dynamic-pcrs Use the built-in, static pcrs, even if libpcrs is available" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -467,7 +470,7 @@ do | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac @@ -551,7 +554,7 @@ if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' -' ac_t=' ' +' ac_t=' ' else ac_n=-n ac_c= ac_t= fi @@ -564,7 +567,7 @@ fi VERSION_MAJOR=2 VERSION_MINOR=9 -VERSION_POINT=4 +VERSION_POINT=8 @@ -595,14 +598,14 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:599: checking for $ac_word" >&5 +echo "configure:602: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. @@ -625,14 +628,14 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:629: checking for $ac_word" >&5 +echo "configure:632: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do @@ -640,7 +643,7 @@ else if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes - continue + continue fi ac_cv_prog_CC="cc" break @@ -676,14 +679,14 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:680: checking for $ac_word" >&5 +echo "configure:683: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. @@ -708,7 +711,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:712: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -719,12 +722,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 723 "configure" +#line 726 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -750,12 +753,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:759: checking whether we are using GNU C" >&5 +echo "configure:762: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -764,7 +767,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -783,7 +786,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:787: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:790: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -815,7 +818,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:819: checking how to run the C preprocessor" >&5 +echo "configure:822: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -830,13 +833,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:843: \"$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 : @@ -847,13 +850,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:860: \"$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 : @@ -864,13 +867,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:877: \"$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 : @@ -896,19 +899,19 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:900: checking for mingw32 environment" >&5 +echo "configure:903: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -925,12 +928,12 @@ echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:929: checking for Cygwin environment" >&5 +echo "configure:932: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -960,7 +963,7 @@ test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:964: checking for executable suffix" >&5 +echo "configure:967: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -970,7 +973,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -991,13 +994,13 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6 ac_exeext=$EXEEXT echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:995: checking for object suffix" >&5 +echo "configure:998: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1015,14 +1018,236 @@ OBJEXT=$ac_cv_objext ac_objext=$ac_cv_objext +echo $ac_n "checking for pcre_compile in -lpcre""... $ac_c" 1>&6 +echo "configure:1023: checking for pcre_compile in -lpcre" >&5 +ac_lib_var=`echo pcre'_'pcre_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 +else + ac_save_LIBS="$LIBS" +LIBS="-lpcre $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +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 +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 + echo "$ac_t""no" 1>&6 +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: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 +else + ac_save_LIBS="$LIBS" +LIBS="-lpcreposix -lpcre $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +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 +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 + echo "$ac_t""no" 1>&6 +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: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 +else + ac_save_LIBS="$LIBS" +LIBS="-lpcrs $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +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 +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_pcrs=no +fi + +else + echo "$ac_t""no" 1>&6 +have_pcrs=no +fi + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1021: 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 < #include @@ -1030,7 +1255,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1034: \"$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* @@ -1047,7 +1272,7 @@ rm -f 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 @@ -1065,7 +1290,7 @@ fi 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 @@ -1086,7 +1311,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1097,7 +1322,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1101: \"$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 @@ -1122,12 +1347,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1126: 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 <&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 @@ -1197,12 +1422,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1201: 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 < #if STDC_HEADERS @@ -1233,12 +1458,12 @@ fi for ac_func in strerror bcopy memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1237: 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 <&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 @@ -1287,34 +1512,41 @@ done + # 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 @@ -1323,109 +1555,63 @@ fi -SOLARIS_ONLY=# - +SOLARIS_ONLY=# -GNU_REGEX_ONLY= -PCRE_REGEX_ONLY= -NO_REGEX_ONLY=# -# Check whether --enable-regex or --disable-regex was given. -if test "${enable_regex+set}" = set; then - enableval="$enable_regex" +# Check whether --enable-toggle or --disable-toggle was given. +if test "${enable_toggle+set}" = set; then + enableval="$enable_toggle" if test $enableval = yes; then cat >> confdefs.h <<\EOF -#define REGEX 1 +#define TOGGLE 1 EOF -else - NO_REGEX_ONLY= - GNU_REGEX_ONLY=# - PCRE_REGEX_ONLY=# fi else cat >> confdefs.h <<\EOF -#define REGEX 1 +#define TOGGLE 1 EOF fi -# Check whether --enable-pcre-regex or --disable-pcre-regex was given. -if test "${enable_pcre_regex+set}" = set; then - enableval="$enable_pcre_regex" +# Check whether --enable-pthread or --disable-pthread was given. +if test "${enable_pthread+set}" = set; then + enableval="$enable_pthread" if test $enableval = yes; then + PTHREAD_ONLY= cat >> confdefs.h <<\EOF -#define PCRE 1 +#define FEATURE_PTHREAD 1 EOF - GNU_REGEX_ONLY=# else - PCRE_REGEX_ONLY=# + PTHREAD_ONLY=# fi else cat >> confdefs.h <<\EOF -#define PCRE 1 +#define FEATURE_PTHREAD 1 EOF - GNU_REGEX_ONLY=# + PTHREAD_ONLY= fi - - - - - -# Check whether --enable-toggle or --disable-toggle was given. -if test "${enable_toggle+set}" = set; then - enableval="$enable_toggle" - if test $enableval = yes; then - cat >> confdefs.h <<\EOF -#define TOGGLE 1 -EOF - -fi -else - cat >> confdefs.h <<\EOF -#define TOGGLE 1 -EOF - -fi - - -PCRS_ONLY= -# Check whether --enable-pcrs or --disable-pcrs was given. -if test "${enable_pcrs+set}" = set; then - enableval="$enable_pcrs" - if test $enableval = yes; then - cat >> confdefs.h <<\EOF -#define PCRS 1 -EOF - +# Check whether --enable-gzip or --disable-gzip was given. +if test "${enable_gzip+set}" = set; then + enableval="$enable_gzip" + if test $enableval = "no"; then cat >> confdefs.h <<\EOF #define DENY_GZIP 1 EOF -else - PCRS_ONLY=# fi -else - cat >> confdefs.h <<\EOF -#define PCRS 1 -EOF - cat >> confdefs.h <<\EOF -#define DENY_GZIP 1 -EOF - fi - # Check whether --enable-force or --disable-force was given. if test "${enable_force+set}" = set; then enableval="$enable_force" @@ -1613,17 +1799,106 @@ EOF fi -LIBRARY_PCRE_ONLY=# -STATIC_PCRE_ONLY= -# Check whether --enable-static-pcre or --disable-static-pcre was given. -if test "${enable_static_pcre+set}" = set; then - enableval="$enable_static_pcre" - if test $enableval = no; then - LIBRARY_PCRE_ONLY= + +# Check whether --enable-regex-matching or --disable-regex-matching was given. +if test "${enable_regex_matching+set}" = set; then + enableval="$enable_regex_matching" + regex_matching=$enableval +else + regex_matching=pcre +fi + + +# Check whether --enable-dynamic-pcre or --disable-dynamic-pcre was given. +if test "${enable_dynamic_pcre+set}" = set; then + enableval="$enable_dynamic_pcre" + if test $enableval = "no"; then have_pcre=no; fi +fi + + +# Check whether --enable-dynamic-pcrs or --disable-dynamic-pcrs was given. +if test "${enable_dynamic_pcrs+set}" = set; then + enableval="$enable_dynamic_pcrs" + if test $enableval = "no"; then have_pcrs=no; fi +fi + + + +# Is the regex URL matching based on libpcreposix, but we +# don't have that library? +# +if test $have_pcreposix = "yes" -o $regex_matching != "pcre"; then + dont_miss_pcreposix=yes +else + dont_miss_pcreposix=no +fi + +# If we have libpcre and either we also have pcreposix or +# we don't need pcreposix, then link pcre dynamically; else +# build it and link statically +# +if test $have_pcre = "yes" -a $dont_miss_pcreposix = "yes"; then + echo "using libpcre" + pcre_dyn=yes STATIC_PCRE_ONLY=# + LIBS="$LIBS -lpcre" +else + echo "using built-in static pcre" + pcre_dyn=no + cat >> confdefs.h <<\EOF +#define STATIC_PCRE 1 +EOF + + STATIC_PCRE_ONLY= fi + +# If we have libpcrs and pcre is linked dynamically +# then also link pcrs dynamically, else build and link +# pcrs statically +# +if test $have_pcrs = "yes" -a $pcre_dyn = "yes"; then + echo "using libpcrs" + STATIC_PCRS_ONLY=# + LIBS="$LIBS -lpcrs" +else + echo "using built-in static pcrs" + cat >> confdefs.h <<\EOF +#define STATIC_PCRS 1 +EOF + + STATIC_PCRS_ONLY= fi +# Which method should be used for URL matching? +# pcre, gnu regex or prefix matching? +# +if test $regex_matching = "gnu"; then + echo "using gnu regex for URL matching" + cat >> confdefs.h <<\EOF +#define REGEX_GNU 1 +EOF + + GNU_REGEX_ONLY= + PCRE_REGEX_ONLY=# +elif test $regex_matching = "pcre"; then + echo "using pcre regex for URL matching" + cat >> confdefs.h <<\EOF +#define REGEX_PCRE 1 +EOF + + GNU_REGEX_ONLY=# + PCRE_REGEX_ONLY= + if test $pcre_dyn = "yes"; then + LIBS="$LIBS -lpcreposix" + fi +else + echo -e "using prefix matching for URLs\nHint: This does NOT make the executable any smaller!" + GNU_REGEX_ONLY=# + PCRE_REGEX_ONLY=# +fi + + + @@ -1685,7 +1960,7 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 @@ -1768,13 +2043,13 @@ s%@EXEEXT@%$EXEEXT%g 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%@NO_REGEX_ONLY@%$NO_REGEX_ONLY%g -s%@PCRS_ONLY@%$PCRS_ONLY%g -s%@LIBRARY_PCRE_ONLY@%$LIBRARY_PCRE_ONLY%g s%@STATIC_PCRE_ONLY@%$STATIC_PCRE_ONLY%g +s%@STATIC_PCRS_ONLY@%$STATIC_PCRS_ONLY%g CEOF EOF @@ -1874,17 +2149,17 @@ rm -f conftest.s* # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' @@ -1931,7 +2206,7 @@ rm -f conftest.hdr # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on