copy all templates. version updated.
[privoxy.git] / configure
index 95567ec..0a2f17e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,6 @@
 #! /bin/sh
 
+# From configure.in Revision: 1.14 
 # Guess values for system-dependent variables and create Makefiles.
 # Generated automatically using autoconf version 2.13 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
@@ -14,30 +15,27 @@ ac_default_prefix=/usr/local
 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."
+  --disable-pthread       Don't use POSIX threads (pthreads)"
 ac_help="$ac_help
   --disable-toggle        Don't support temporary disable"
 ac_help="$ac_help
-  --disable-pcrs          Don't support arbitrary content modification"
+  --disable-gzip          Block gzip'ed transfer of documents.  Note that
+                          this is required if you want content modification
+                          even with gzip-supporting servers."
+ac_help="$ac_help
+  --disable-force         Don't allow blockfile to be bypassed"
 ac_help="$ac_help
-  --disable-force         Don't allow blockfle to be bypassed"
+  --disable-fast-redirects Don't support fast redirects"
 ac_help="$ac_help
   --disable-killpopup     Never block popups"
 ac_help="$ac_help
   --disable-stats         Don't keep statistics"
-ac_help="$ac_help
-  --disable-split-proxy-args  One big show-proxy-args page, not one per file."
-ac_help="$ac_help
-  --disable-webdav        Don't support WebDAV.  This option stops MS Outlook
-                          Express from accessing HotMail e-mail."
 ac_help="$ac_help
   --disable-ie-images     Don't auto-detect whether a request from MS Internet
                           Explorer is for an image or HTML."
 ac_help="$ac_help
-  --disable-image-list    Don't try to figure out whether a request is for an
-                          image or HTML using the imagelist - assume HTML."
+  --disable-image-blocking  Don't try to figure out whether a request is 
+                            for an image or HTML - assume HTML."
 ac_help="$ac_help
   --disable-acl-files     Prevents the use of ACL files to control access to
                           the proxy by IP address."
@@ -46,8 +44,18 @@ 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
@@ -560,9 +568,14 @@ fi
 
 
 
+
+
 VERSION_MAJOR=2
 VERSION_MINOR=9
-VERSION_POINT=4
+VERSION_POINT=8
+CODE_STATUS="\"alpha\""
+
+
 
 
 
@@ -584,11 +597,16 @@ cat >> confdefs.h <<EOF
 #define VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}"
 EOF
 
+cat >> confdefs.h <<EOF
+#define CODE_STATUS ${CODE_STATUS}
+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:592: checking for $ac_word" >&5
+echo "configure:610: 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
@@ -618,7 +636,7 @@ 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:622: checking for $ac_word" >&5
+echo "configure:640: 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
@@ -669,7 +687,7 @@ 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:673: checking for $ac_word" >&5
+echo "configure:691: 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
@@ -701,7 +719,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:705: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:723: 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.
@@ -712,12 +730,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 716 "configure"
+#line 734 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:739: \"$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
@@ -743,12 +761,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:747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:765: 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:752: checking whether we are using GNU C" >&5
+echo "configure:770: 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
@@ -757,7 +775,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:761: \"$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:779: \"$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
@@ -776,7 +794,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:780: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:798: 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
@@ -808,7 +826,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:812: checking how to run the C preprocessor" >&5
+echo "configure:830: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -823,13 +841,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 827 "configure"
+#line 845 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:851: \"$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
   :
@@ -840,13 +858,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 844 "configure"
+#line 862 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:868: \"$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
   :
@@ -857,13 +875,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 861 "configure"
+#line 879 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:885: \"$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
   :
@@ -888,20 +906,22 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 
+
+
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:893: checking for mingw32 environment" >&5
+echo "configure:913: 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 <<EOF
-#line 898 "configure"
+#line 918 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -918,12 +938,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:922: checking for Cygwin environment" >&5
+echo "configure:942: 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 <<EOF
-#line 927 "configure"
+#line 947 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -934,7 +954,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -951,9 +971,199 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 
+if test "$MINGW32" = "yes"; then
+  target_type=mingw
+else
+  if test "$CYGWIN" = "yes"; then
+    target_type=cygwin
+  else
+    target_type=unix
+  fi
+fi
+
+
+# Check whether --enable-mingw32 or --disable-mingw32 was given.
+if test "${enable_mingw32+set}" = set; then
+  enableval="$enable_mingw32"
+  if test $enableval = yes; then
+  target_type=mingw
+fi
+fi
+
+
+if test $target_type = mingw; then
+  WIN_ONLY=
+  SPECIAL_CFLAGS="-mwindows -mno-cygwin"
+  PTHREAD_LIB=-lpthreadGC
+  echo "Using mingw32 (Win32 GUI)"
+else
+  WIN_ONLY=#
+  if test $target_type = cygwin; then
+    SPECIAL_CFLAGS="-mno-win32"
+    PTHREAD_LIB=
+    echo "Using Cygnus (Win32 command line)"
+  else
+    SPECIAL_CFLAGS=
+    PTHREAD_LIB=-lpthread
+  fi
+fi
+
+
+old_CFLAGS_nospecial=$CFLAGS
+CFLAGS="$CFLAGS $SPECIAL_CFLAGS"
+
+# Hack to force AutoConf to use the CFLAGS we just set
+ac_cpp='$CPP $CPPFLAGS $SPECIAL_CFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+
+ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
+echo "configure:1025: checking for pthread.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 1030 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1035: \"$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_pthread=yes
+else
+  echo "$ac_t""no" 1>&6
+have_pthread=no
+fi
+
+
+# Check whether --enable-pthread or --disable-pthread was given.
+if test "${enable_pthread+set}" = set; then
+  enableval="$enable_pthread"
+  if test $enableval = no; then
+  # Disable pthreads
+  have_pthread=no
+fi
+fi
+
+
+if test $have_pthread = yes; then
+  PTHREAD_ONLY=
+  cat >> confdefs.h <<\EOF
+#define FEATURE_PTHREAD 1
+EOF
+
+  echo Using POSIX threads
+  if test "$GCC" = "yes"; then
+    # Set a GCC specific switch:
+    if test "$target_type" = "unix"; then
+      # This compiler switch makes Linux thread-safe
+      # Don't know about other OS's?  Is this switch
+      # supported?
+      PTHREAD_LIB=
+      SPECIAL_CFLAGS="-pthread"
+    fi
+  fi
+else
+  PTHREAD_ONLY=#
+  echo Using native threads
+fi
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:1120: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+
+SOLARIS_ONLY=#
+
+case "$host" in
+*-solaris*) SOLARIS_ONLY=
+            cat >> confdefs.h <<\EOF
+#define __EXTENSIONS__ 1
+EOF
+
+            if test "$GCC" = "yes"; then
+              # Set a GCC specific switch:
+              # This compiler switch makes Solaris thread-safe
+              PTHREAD_LIB=
+              SPECIAL_CFLAGS="-pthreads"
+            else
+              # What do we do without GCC? Guess this:
+              SPECIAL_CFLAGS="-D_REENTRANT"
+            fi
+;;
+esac
+
+
+
+
+
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:957: checking for executable suffix" >&5
+echo "configure:1167: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -963,7 +1173,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:1177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj) ;;
@@ -984,13 +1194,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:988: checking for object suffix" >&5
+echo "configure:1198: 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:994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   for ac_file in conftest.*; do
     case $ac_file in
     *.c) ;;
@@ -1007,15 +1217,13 @@ echo "$ac_t""$ac_cv_objext" 1>&6
 OBJEXT=$ac_cv_objext
 ac_objext=$ac_cv_objext
 
-
-
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1014: checking for ANSI C header files" >&5
+echo "configure:1222: 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 1019 "configure"
+#line 1227 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1023,7 +1231,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1235: \"$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*
@@ -1040,7 +1248,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
-#line 1044 "configure"
+#line 1252 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1058,7 +1266,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
-#line 1062 "configure"
+#line 1270 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1079,7 +1287,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1083 "configure"
+#line 1291 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1090,7 +1298,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1113,14 +1321,13 @@ EOF
 
 fi
 
-
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1119: checking for working const" >&5
+echo "configure:1326: 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 1124 "configure"
+#line 1331 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1169,7 +1376,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1190,12 +1397,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1194: checking for size_t" >&5
+echo "configure:1401: 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 1199 "configure"
+#line 1406 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1223,15 +1430,16 @@ EOF
 fi
 
 
+
 for ac_func in strerror bcopy memmove
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1230: checking for $ac_func" >&5
+echo "configure:1438: 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 1235 "configure"
+#line 1443 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1254,7 +1462,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1466: \"$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
@@ -1280,97 +1488,234 @@ 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"
-    echo "Using mingw32 (Win32 GUI)"
-  else
-    WIN_ONLY=#
-    if test "$CYGWIN" = "yes"; then
-      CYGWIN_FLAGS="-mno-win32"
-      echo "Using Cygnus (Win32 command line)"
-    else
-      CYGWIN_FLAGS=
-    fi
-  fi
+echo $ac_n "checking for pcre_compile in -lpcre""... $ac_c" 1>&6
+echo "configure:1493: 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
-  if test "$MINGW32" = "yes"; then
-    WIN_ONLY=
-    CYGWIN_FLAGS="-mwindows -mno-cygwin"
-    echo "Using mingw32 (Win32 GUI)"
-  else
-    WIN_ONLY=#
-    if test "$CYGWIN" = "yes"; then
-      CYGWIN_FLAGS="-mno-win32"
-      echo "Using Cygnus (Win32 command line)"
-    else
-      CYGWIN_FLAGS=
-    fi
-  fi
-fi
-
-
-
-
-
-SOLARIS_ONLY=#
+  ac_save_LIBS="$LIBS"
+LIBS="-lpcre  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1501 "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
+    builtin and then its argument prototype would still apply.  */
+char pcre_compile();
 
+int main() {
+pcre_compile()
+; return 0; }
+EOF
+if { (eval echo configure:1512: \"$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
+  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:1529: 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 1534 "configure"
+#include "confdefs.h"
+#include <pcre.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1539: \"$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
 
-GNU_REGEX_ONLY=
-PCRE_REGEX_ONLY=
-NO_REGEX_ONLY=#
+echo $ac_n "checking for regcomp in -lpcreposix""... $ac_c" 1>&6
+echo "configure:1567: 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 <<EOF
+#line 1575 "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
+    builtin and then its argument prototype would still apply.  */
+char regcomp();
 
-# Check whether --enable-regex or --disable-regex was given.
-if test "${enable_regex+set}" = set; then
-  enableval="$enable_regex"
-  if test $enableval = yes; then
-  cat >> confdefs.h <<\EOF
-#define REGEX 1
+int main() {
+regcomp()
+; return 0; }
 EOF
-
+if { (eval echo configure:1586: \"$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
-  NO_REGEX_ONLY=
-  GNU_REGEX_ONLY=#
-  PCRE_REGEX_ONLY=#
+  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:1603: 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 >> confdefs.h <<\EOF
-#define REGEX 1
+  cat > conftest.$ac_ext <<EOF
+#line 1608 "configure"
+#include "confdefs.h"
+#include <pcreposix.h>
 EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1613: \"$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:1641: 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 <<EOF
+#line 1649 "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
+    builtin and then its argument prototype would still apply.  */
+char pcrs_compile();
 
-# Check whether --enable-pcre-regex or --disable-pcre-regex was given.
-if test "${enable_pcre_regex+set}" = set; then
-  enableval="$enable_pcre_regex"
-  if test $enableval = yes; then
-  cat >> confdefs.h <<\EOF
-#define PCRE 1
+int main() {
+pcrs_compile()
+; return 0; }
 EOF
-
-  GNU_REGEX_ONLY=#
+if { (eval echo configure:1660: \"$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
-  PCRE_REGEX_ONLY=#
+  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:1677: 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 >> confdefs.h <<\EOF
-#define PCRE 1
+  cat > conftest.$ac_ext <<EOF
+#line 1682 "configure"
+#include "confdefs.h"
+#include <pcrs.h>
 EOF
-
-  GNU_REGEX_ONLY=#
-
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1687: \"$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
 
 
 
 
+cat >> confdefs.h <<\EOF
+#define __MT__ 1
+EOF
 
 
 
@@ -1379,58 +1724,59 @@ if test "${enable_toggle+set}" = set; then
   enableval="$enable_toggle"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define TOGGLE 1
+#define FEATURE_TOGGLE 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define TOGGLE 1
+#define FEATURE_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
+# 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 PCRS 1
+#define FEATURE_DENY_GZIP 1
 EOF
 
+fi
+fi
+
+
+# Check whether --enable-force or --disable-force was given.
+if test "${enable_force+set}" = set; then
+  enableval="$enable_force"
+  if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define DENY_GZIP 1
+#define FEATURE_FORCE_LOAD 1
 EOF
 
-else
-  PCRS_ONLY=#
 fi
 else
   cat >> confdefs.h <<\EOF
-#define PCRS 1
-EOF
- cat >> confdefs.h <<\EOF
-#define DENY_GZIP 1
+#define FEATURE_FORCE_LOAD 1
 EOF
 
 fi
 
 
-
-# Check whether --enable-force or --disable-force was given.
-if test "${enable_force+set}" = set; then
-  enableval="$enable_force"
+# Check whether --enable-fast-redirects or --disable-fast-redirects was given.
+if test "${enable_fast_redirects+set}" = set; then
+  enableval="$enable_fast_redirects"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define FORCE_LOAD 1
+#define FEATURE_FAST_REDIRECTS 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define FORCE_LOAD 1
+#define FEATURE_FAST_REDIRECTS 1
 EOF
 
 fi
@@ -1441,13 +1787,13 @@ if test "${enable_killpopup+set}" = set; then
   enableval="$enable_killpopup"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define KILLPOPUPS 1
+#define FEATURE_KILL_POPUPS 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define KILLPOPUPS 1
+#define FEATURE_KILL_POPUPS 1
 EOF
 
 fi
@@ -1458,147 +1804,208 @@ if test "${enable_stats+set}" = set; then
   enableval="$enable_stats"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define STATISTICS 1
+#define FEATURE_STATISTICS 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define STATISTICS 1
+#define FEATURE_STATISTICS 1
 EOF
 
 fi
 
 
-# Check whether --enable-split-proxy-args or --disable-split-proxy-args was given.
-if test "${enable_split_proxy_args+set}" = set; then
-  enableval="$enable_split_proxy_args"
+# Check whether --enable-ie-images or --disable-ie-images was given.
+if test "${enable_ie_images+set}" = set; then
+  enableval="$enable_ie_images"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define SPLIT_PROXY_ARGS 1
+#define FEATURE_IMAGE_DETECT_MSIE 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define SPLIT_PROXY_ARGS 1
+#define FEATURE_IMAGE_DETECT_MSIE 1
 EOF
 
 fi
 
 
-# Check whether --enable-webdav or --disable-webdav was given.
-if test "${enable_webdav+set}" = set; then
-  enableval="$enable_webdav"
+# Check whether --enable-image-blocking or --disable-image-blocking was given.
+if test "${enable_image_blocking+set}" = set; then
+  enableval="$enable_image_blocking"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define WEBDAV 1
+#define FEATURE_IMAGE_BLOCKING 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define WEBDAV 1
+#define FEATURE_IMAGE_BLOCKING 1
 EOF
 
 fi
 
 
-# Check whether --enable-ie-images or --disable-ie-images was given.
-if test "${enable_ie_images+set}" = set; then
-  enableval="$enable_ie_images"
+# Check whether --enable-acl-files or --disable-acl-files was given.
+if test "${enable_acl_files+set}" = set; then
+  enableval="$enable_acl_files"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define DETECT_MSIE_IMAGES 1
+#define FEATURE_ACL 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define DETECT_MSIE_IMAGES 1
+#define FEATURE_ACL 1
 EOF
 
 fi
 
 
-# Check whether --enable-image-list or --disable-image-list was given.
-if test "${enable_image_list+set}" = set; then
-  enableval="$enable_image_list"
+# Check whether --enable-trust-files or --disable-trust-files was given.
+if test "${enable_trust_files+set}" = set; then
+  enableval="$enable_trust_files"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define USE_IMAGE_LIST 1
+#define FEATURE_TRUST 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define USE_IMAGE_LIST 1
+#define FEATURE_TRUST 1
 EOF
 
 fi
 
 
-# Check whether --enable-acl-files or --disable-acl-files was given.
-if test "${enable_acl_files+set}" = set; then
-  enableval="$enable_acl_files"
+# Check whether --enable-jar-files or --disable-jar-files was given.
+if test "${enable_jar_files+set}" = set; then
+  enableval="$enable_jar_files"
   if test $enableval = yes; then
   cat >> confdefs.h <<\EOF
-#define ACL_FILES 1
+#define FEATURE_COOKIE_JAR 1
 EOF
 
 fi
 else
   cat >> confdefs.h <<\EOF
-#define ACL_FILES 1
+#define FEATURE_COOKIE_JAR 1
 EOF
 
 fi
 
 
-# Check whether --enable-trust-files or --disable-trust-files was given.
-if test "${enable_trust_files+set}" = set; then
-  enableval="$enable_trust_files"
-  if test $enableval = yes; then
+
+# 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 TRUST_FILES 1
+#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 TRUST_FILES 1
+#define STATIC_PCRS 1
 EOF
 
+  STATIC_PCRS_ONLY=
 fi
 
-
-# Check whether --enable-jar-files or --disable-jar-files was given.
-if test "${enable_jar_files+set}" = set; then
-  enableval="$enable_jar_files"
-  if test $enableval = yes; then
+# 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 JAR_FILES 1
+#define REGEX_GNU 1
 EOF
 
-fi
-else
+  GNU_REGEX_ONLY=
+  PCRE_REGEX_ONLY=#
+elif test $regex_matching = "pcre"; then
+  echo "using pcre regex for URL matching"
   cat >> confdefs.h <<\EOF
-#define JAR_FILES 1
+#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
 
 
-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=
-  STATIC_PCRE_ONLY=#
-fi
-fi
+
+
+
+
+
+CFLAGS=$old_CFLAGS_nospecial
 
 
 
@@ -1740,17 +2147,22 @@ s%@VERSION_MINOR@%$VERSION_MINOR%g
 s%@VERSION_POINT@%$VERSION_POINT%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
-s%@EXEEXT@%$EXEEXT%g
-s%@OBJEXT@%$OBJEXT%g
 s%@WIN_ONLY@%$WIN_ONLY%g
-s%@CYGWIN_FLAGS@%$CYGWIN_FLAGS%g
+s%@PTHREAD_ONLY@%$PTHREAD_ONLY%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
 s%@SOLARIS_ONLY@%$SOLARIS_ONLY%g
+s%@EXEEXT@%$EXEEXT%g
+s%@OBJEXT@%$OBJEXT%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
+s%@SPECIAL_CFLAGS@%$SPECIAL_CFLAGS%g
+s%@PTHREAD_LIB@%$PTHREAD_LIB%g
 
 CEOF
 EOF