--- a/configure
+++ b/configure
@@ -826,6 +826,8 @@ ac_help="$ac_help
  --disable-all   Disable all extensions which are enabled by default
 "
 ac_help="$ac_help
+  --with-system-tzdata[=DIR]      to specify use of system timezone data"
+ac_help="$ac_help
   --with-regex=TYPE       regex library type: system, php. [TYPE=php]
                           WARNING: Do NOT use unless you know what you are doing!"
 ac_help="$ac_help
@@ -847,6 +849,30 @@ ac_help="$ac_help
 ac_help="$ac_help
   --with-zlib-dir=<DIR>   Define the location of zlib install directory"
 ac_help="$ac_help
+  --enable-apc           Enable APC support"
+ac_help="$ac_help
+  --enable-apc-debug     Enable APC debugging"
+ac_help="$ac_help
+  --enable-apc-filehits   Enable per request file info about files used from the APC cache (ie: apc_cache_info('filehits')) "
+ac_help="$ac_help
+  --disable-apc-mmap
+                          Disable mmap support and use IPC shm instead"
+ac_help="$ac_help
+  --enable-apc-sem
+                          Enable semaphore locks instead of fcntl"
+ac_help="$ac_help
+  --disable-apc-pthreadmutex
+                          Disable pthread mutex locking "
+ac_help="$ac_help
+  --enable-apc-spinlocks
+                          Enable spin locks  EXPERIMENTAL "
+ac_help="$ac_help
+  --enable-apc-memprotect
+                          Enable mmap/shm memory protection"
+ac_help="$ac_help
+  --disable-valgrind-checks
+                          Disable valgrind based memory checks"
+ac_help="$ac_help
   --enable-bcmath         Enable bc style precision math functions"
 ac_help="$ac_help
   --with-bz2[=DIR]        Include BZip2 support"
@@ -884,6 +910,8 @@ ac_help="$ac_help
 ac_help="$ac_help
   --disable-flatfile        DBA: FlatFile support (bundled)"
 ac_help="$ac_help
+  --enable-dio            Enable direct I/O support"
+ac_help="$ac_help
   --disable-dom           Disable DOM support"
 ac_help="$ac_help
   --with-libxml-dir[=DIR]   DOM: libxml2 install prefix"
@@ -951,6 +979,8 @@ ac_help="$ac_help
 ac_help="$ac_help
   --with-ldap-sasl[=DIR]    LDAP: Include Cyrus SASL support"
 ac_help="$ac_help
+  --with-libevent             Include libevent support"
+ac_help="$ac_help
   --enable-mbstring       Enable multibyte string support"
 ac_help="$ac_help
   --disable-mbregex         MBSTRING: Disable multibyte regex support"
@@ -1167,6 +1197,24 @@ ac_help="$ac_help
 ac_help="$ac_help
   --with-pcre-dir           ZIP: pcre install prefix"
 ac_help="$ac_help
+  --enable-http           Enable extended HTTP support"
+ac_help="$ac_help
+  --with-http-shared-deps
+                           HTTP: disable to not depend on extensions like hash,
+                                 iconv and session (when built shared)"
+ac_help="$ac_help
+  --with-http-curl-requests[=LIBCURLDIR]
+                           HTTP: with cURL request support"
+ac_help="$ac_help
+  --with-http-curl-libevent[=LIBEVENTDIR]
+                           HTTP: libevent install directory"
+ac_help="$ac_help
+  --with-http-zlib-compression[=LIBZDIR]
+                           HTTP: with zlib encodings support"
+ac_help="$ac_help
+  --with-http-magic-mime[=LIBMAGICDIR]
+                           HTTP: with magic mime response content type guessing"
+ac_help="$ac_help
   --disable-mysqlnd-compression-support
                             Disable support for the MySQL compressed protocol in mysqlnd"
 ac_help="$ac_help
@@ -1890,12 +1938,12 @@ fi
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1894: checking for Cygwin environment" >&5
+echo "configure:1942: 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 1899 "configure"
+#line 1947 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1906,7 +1954,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1923,19 +1971,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1927: checking for mingw32 environment" >&5
+echo "configure:1975: 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 1932 "configure"
+#line 1980 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1954,7 +2002,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=y
 
 
 echo $ac_n "checking for egrep""... $ac_c" 1>&6
-echo "configure:1958: checking for egrep" >&5
+echo "configure:2006: checking for egrep" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_egrep'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1969,7 +2017,7 @@ echo "$ac_t""$ac_cv_prog_egrep" 1>&6
  
 
 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
-echo "configure:1973: checking for a sed that does not truncate output" >&5
+echo "configure:2021: checking for a sed that does not truncate output" >&5
 if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2119,7 +2167,7 @@ else { echo "configure: error: can not r
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:2123: checking host system type" >&5
+echo "configure:2171: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -2140,7 +2188,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:2144: checking target system type" >&5
+echo "configure:2192: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -2252,7 +2300,7 @@ rm -f libs/*
 # 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:2256: checking for $ac_word" >&5
+echo "configure:2304: 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
@@ -2282,7 +2330,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:2286: checking for $ac_word" >&5
+echo "configure:2334: 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
@@ -2333,7 +2381,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:2337: checking for $ac_word" >&5
+echo "configure:2385: 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
@@ -2365,7 +2413,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2417: 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.
@@ -2376,12 +2424,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 2380 "configure"
+#line 2428 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2433: \"$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
@@ -2407,12 +2455,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:2411: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2459: 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:2416: checking whether we are using GNU C" >&5
+echo "configure:2464: 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
@@ -2421,7 +2469,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2425: \"$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:2473: \"$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
@@ -2440,7 +2488,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:2444: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2492: 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
@@ -2472,7 +2520,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2476: checking how to run the C preprocessor" >&5
+echo "configure:2524: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2487,13 +2535,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 2491 "configure"
+#line 2539 "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:2497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2545: \"$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
   :
@@ -2504,13 +2552,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2508 "configure"
+#line 2556 "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:2514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2562: \"$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
   :
@@ -2521,13 +2569,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2525 "configure"
+#line 2573 "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:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2579: \"$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
   :
@@ -2554,9 +2602,9 @@ echo "$ac_t""$CPP" 1>&6
 
   ICC="no"
   echo $ac_n "checking for icc""... $ac_c" 1>&6
-echo "configure:2558: checking for icc" >&5
+echo "configure:2606: checking for icc" >&5
   cat > conftest.$ac_ext <<EOF
-#line 2560 "configure"
+#line 2608 "configure"
 #include "confdefs.h"
 __INTEL_COMPILER
 EOF
@@ -2578,9 +2626,9 @@ rm -f conftest*
 
   SUNCC="no"
   echo $ac_n "checking for suncc""... $ac_c" 1>&6
-echo "configure:2582: checking for suncc" >&5
+echo "configure:2630: checking for suncc" >&5
   cat > conftest.$ac_ext <<EOF
-#line 2584 "configure"
+#line 2632 "configure"
 #include "confdefs.h"
 __SUNPRO_C
 EOF
@@ -2603,10 +2651,10 @@ rm -f conftest*
 
 if test "x$CC" != xcc; then
   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:2607: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:2655: checking whether $CC and cc understand -c and -o together" >&5
 else
   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:2610: checking whether cc understands -c and -o together" >&5
+echo "configure:2658: checking whether cc understands -c and -o together" >&5
 fi
 set dummy $CC; ac_cc="`echo $2 |
 		       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -2618,16 +2666,16 @@ else
 # We do the test twice because some compilers refuse to overwrite an
 # existing .o file with -o, though they will create one.
 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:2622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-   test -f conftest.o && { (eval echo configure:2623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:2670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+   test -f conftest.o && { (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
 then
   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
   if test "x$CC" != xcc; then
     # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
       ac_try='cc -c conftest.c -o conftest.o 1>&5'
-      if { (eval echo configure:2630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-	 test -f conftest.o && { (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+      if { (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+	 test -f conftest.o && { (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
       then
         # cc works too.
         :
@@ -2654,7 +2702,7 @@ EOF
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2658: checking how to run the C preprocessor" >&5
+echo "configure:2706: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2669,13 +2717,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 2673 "configure"
+#line 2721 "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:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2727: \"$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
   :
@@ -2686,13 +2734,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2690 "configure"
+#line 2738 "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:2696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2744: \"$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
   :
@@ -2703,13 +2751,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2707 "configure"
+#line 2755 "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:2713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2761: \"$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
   :
@@ -2734,9 +2782,9 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2738: checking for AIX" >&5
+echo "configure:2786: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2740 "configure"
+#line 2788 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -2758,7 +2806,7 @@ rm -f conftest*
 
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2762: checking whether ln -s works" >&5
+echo "configure:2810: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2783,7 +2831,7 @@ fi
 php_with_libdir=lib
 
 echo $ac_n "checking for system library directory""... $ac_c" 1>&6
-echo "configure:2787: checking for system library directory" >&5
+echo "configure:2835: checking for system library directory" >&5
 # Check whether --with-libdir or --without-libdir was given.
 if test "${with_libdir+set}" = set; then
   withval="$with_libdir"
@@ -2806,7 +2854,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_enable_rpath=yes
 
 echo $ac_n "checking whether to enable runpaths""... $ac_c" 1>&6
-echo "configure:2810: checking whether to enable runpaths" >&5
+echo "configure:2858: checking whether to enable runpaths" >&5
 # Check whether --enable-rpath or --disable-rpath was given.
 if test "${enable_rpath+set}" = set; then
   enableval="$enable_rpath"
@@ -2827,7 +2875,7 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 echo $ac_n "checking if compiler supports -R""... $ac_c" 1>&6
-echo "configure:2831: checking if compiler supports -R" >&5
+echo "configure:2879: checking if compiler supports -R" >&5
 if eval "test \"`echo '$''{'php_cv_cc_dashr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2835,14 +2883,14 @@ else
   SAVE_LIBS=$LIBS
   LIBS="-R /usr/$PHP_LIBDIR $LIBS"
   cat > conftest.$ac_ext <<EOF
-#line 2839 "configure"
+#line 2887 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   php_cv_cc_dashr=yes
 else
@@ -2860,7 +2908,7 @@ if test $php_cv_cc_dashr = "yes"; then
   ld_runpath_switch=-R
 else
   echo $ac_n "checking if compiler supports -Wl,-rpath,""... $ac_c" 1>&6
-echo "configure:2864: checking if compiler supports -Wl,-rpath," >&5
+echo "configure:2912: checking if compiler supports -Wl,-rpath," >&5
   if eval "test \"`echo '$''{'php_cv_cc_rpath'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2868,14 +2916,14 @@ else
     SAVE_LIBS=$LIBS
     LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
     cat > conftest.$ac_ext <<EOF
-#line 2872 "configure"
+#line 2920 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   php_cv_cc_rpath=yes
 else
@@ -2906,7 +2954,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2910: checking for $ac_word" >&5
+echo "configure:2958: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2947,7 +2995,7 @@ test -n "$AWK" || AWK="bork"
       ;;
     *)
       echo $ac_n "checking if $AWK is broken""... $ac_c" 1>&6
-echo "configure:2951: checking if $AWK is broken" >&5
+echo "configure:2999: checking if $AWK is broken" >&5
       if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
         echo "$ac_t""yes" 1>&6
         { echo "configure: error: You should install GNU awk" 1>&2; exit 1; }
@@ -2966,7 +3014,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2970: checking for $ac_word" >&5
+echo "configure:3018: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3006,7 +3054,7 @@ test -n "$YACC" || YACC="yacc"
   bison_version=none
   if test "$YACC"; then
     echo $ac_n "checking for bison version""... $ac_c" 1>&6
-echo "configure:3010: checking for bison version" >&5
+echo "configure:3058: checking for bison version" >&5
 if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3044,7 +3092,7 @@ echo "$ac_t""$php_cv_bison_version" 1>&6
   # Extract the first word of "re2c", so it can be a program name with args.
 set dummy re2c; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3048: checking for $ac_word" >&5
+echo "configure:3096: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RE2C'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3072,7 +3120,7 @@ fi
 
   if test -n "$RE2C"; then
     echo $ac_n "checking for re2c version""... $ac_c" 1>&6
-echo "configure:3076: checking for re2c version" >&5
+echo "configure:3124: checking for re2c version" >&5
 if eval "test \"`echo '$''{'php_cv_re2c_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3111,7 +3159,7 @@ esac
 php_enable_re2c_cgoto=no
 
 echo $ac_n "checking whether to enable computed goto gcc extension with re2c""... $ac_c" 1>&6
-echo "configure:3115: checking whether to enable computed goto gcc extension with re2c" >&5
+echo "configure:3163: checking whether to enable computed goto gcc extension with re2c" >&5
 # Check whether --enable-re2c-cgoto or --disable-re2c-cgoto was given.
 if test "${enable_re2c_cgoto+set}" = set; then
   enableval="$enable_re2c_cgoto"
@@ -3134,9 +3182,9 @@ if test "$PHP_RE2C_CGOTO" = "no"; then
   RE2C_FLAGS=""
 else
   echo $ac_n "checking whether re2c -g works""... $ac_c" 1>&6
-echo "configure:3138: checking whether re2c -g works" >&5
+echo "configure:3186: checking whether re2c -g works" >&5
   cat > conftest.$ac_ext <<EOF
-#line 3140 "configure"
+#line 3188 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3154,7 +3202,7 @@ label2:
   
 ; return 0; }
 EOF
-if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     RE2C_FLAGS=""
@@ -3220,7 +3268,7 @@ case $host_alias in
       
   gcc_arg_name=ac_cv_gcc_arg_no_cpp_precomp
   echo $ac_n "checking whether $CC supports -no-cpp-precomp""... $ac_c" 1>&6
-echo "configure:3224: checking whether $CC supports -no-cpp-precomp" >&5
+echo "configure:3272: checking whether $CC supports -no-cpp-precomp" >&5
 if eval "test \"`echo '$''{'ac_cv_gcc_arg_no_cpp_precomp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3421,7 +3469,7 @@ esac
 # Disable PIC mode by default where it is known to be safe to do so,
 # to avoid the performance hit from the lost register
 echo $ac_n "checking whether to force non-PIC code in shared modules""... $ac_c" 1>&6
-echo "configure:3425: checking whether to force non-PIC code in shared modules" >&5
+echo "configure:3473: checking whether to force non-PIC code in shared modules" >&5
 case $host_alias in
   i?86-*-linux*|i?86-*-freebsd*)
     if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
@@ -3451,7 +3499,7 @@ esac
 
 
 echo $ac_n "checking whether /dev/urandom exists""... $ac_c" 1>&6
-echo "configure:3455: checking whether /dev/urandom exists" >&5 
+echo "configure:3503: checking whether /dev/urandom exists" >&5 
 if test -r "/dev/urandom" && test -c "/dev/urandom"; then 
   cat >> confdefs.h <<\EOF
 #define HAVE_DEV_URANDOM 1
@@ -3512,7 +3560,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 3516 "configure"
+#line 3564 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -3530,7 +3578,7 @@ int main() {
     return pthread_create(&thd, NULL, thread_routine, &data);
 } 
 EOF
-if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   pthreads_working=yes
@@ -3550,7 +3598,7 @@ fi
   CFLAGS=$save_CFLAGS
 
   echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6
-echo "configure:3554: checking for pthreads_cflags" >&5
+echo "configure:3602: checking for pthreads_cflags" >&5
 if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3572,7 +3620,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 3576 "configure"
+#line 3624 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -3590,7 +3638,7 @@ int main() {
     return pthread_create(&thd, NULL, thread_routine, &data);
 } 
 EOF
-if { (eval echo configure:3594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   pthreads_working=yes
@@ -3620,7 +3668,7 @@ fi
 echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6
 
 echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6
-echo "configure:3624: checking for pthreads_lib" >&5
+echo "configure:3672: checking for pthreads_lib" >&5
 if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3642,7 +3690,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
+#line 3694 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -3660,7 +3708,7 @@ int main() {
     return pthread_create(&thd, NULL, thread_routine, &data);
 } 
 EOF
-if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   pthreads_working=yes
@@ -3791,7 +3839,7 @@ ext_output=$PHP_AOLSERVER
 
 
 echo $ac_n "checking for AOLserver support""... $ac_c" 1>&6
-echo "configure:3795: checking for AOLserver support" >&5
+echo "configure:3843: checking for AOLserver support" >&5
 
 if test "$PHP_AOLSERVER" != "no"; then
   if test -d "$PHP_AOLSERVER/include"; then
@@ -4056,7 +4104,7 @@ ext_output=$PHP_APXS
 
 
 echo $ac_n "checking for Apache 1.x module support via DSO through APXS""... $ac_c" 1>&6
-echo "configure:4060: checking for Apache 1.x module support via DSO through APXS" >&5
+echo "configure:4108: checking for Apache 1.x module support via DSO through APXS" >&5
 
 if test "$PHP_APXS" != "no"; then
   if test "$PHP_APXS" = "yes"; then
@@ -4387,7 +4435,7 @@ ext_output=$PHP_APACHE
 
 
 echo $ac_n "checking for Apache 1.x module support""... $ac_c" 1>&6
-echo "configure:4391: checking for Apache 1.x module support" >&5
+echo "configure:4439: checking for Apache 1.x module support" >&5
 
 if test "$PHP_SAPI" != "apache" && test "$PHP_APACHE" != "no"; then
   
@@ -5264,7 +5312,7 @@ fi
 php_enable_mod_charset=no
 
 echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6
-echo "configure:5268: checking whether to enable Apache charset compatibility option" >&5
+echo "configure:5316: checking whether to enable Apache charset compatibility option" >&5
 # Check whether --enable-mod-charset or --disable-mod-charset was given.
 if test "${enable_mod_charset+set}" = set; then
   enableval="$enable_mod_charset"
@@ -5296,7 +5344,7 @@ if test "$APACHE_MODULE" = "yes"; then
         
   gcc_arg_name=ac_cv_gcc_arg_rdynamic
   echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6
-echo "configure:5300: checking whether $CC supports -rdynamic" >&5
+echo "configure:5348: checking whether $CC supports -rdynamic" >&5
 if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5339,7 +5387,7 @@ if test -n "$APACHE_INSTALL"; then
 
   
 echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6
-echo "configure:5343: checking for member fd in BUFF *" >&5
+echo "configure:5391: checking for member fd in BUFF *" >&5
 if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5351,14 +5399,14 @@ else
     CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE"
   fi
   cat > conftest.$ac_ext <<EOF
-#line 5355 "configure"
+#line 5403 "configure"
 #include "confdefs.h"
 #include <httpd.h>
 int main() {
 conn_rec *c; int fd = c->client->fd;
 ; return 0; }
 EOF
-if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     ac_cv_php_fd_in_buff=yes
@@ -5431,7 +5479,7 @@ ext_output=$PHP_APXS2FILTER
 
 
 echo $ac_n "checking for Apache 2.0 filter-module support via DSO through APXS""... $ac_c" 1>&6
-echo "configure:5435: checking for Apache 2.0 filter-module support via DSO through APXS" >&5
+echo "configure:5483: checking for Apache 2.0 filter-module support via DSO through APXS" >&5
 
 if test "$PHP_APXS2FILTER" != "no"; then
   if test "$PHP_APXS2FILTER" = "yes"; then
@@ -6320,7 +6368,7 @@ ext_output=$PHP_APXS2
 
 
 echo $ac_n "checking for Apache 2.0 handler-module support via DSO through APXS""... $ac_c" 1>&6
-echo "configure:6324: checking for Apache 2.0 handler-module support via DSO through APXS" >&5
+echo "configure:6372: checking for Apache 2.0 handler-module support via DSO through APXS" >&5
 
 if test "$PHP_APXS2" != "no"; then
   if test "$PHP_APXS2" = "yes"; then
@@ -7210,7 +7258,7 @@ ext_output=$PHP_APACHE_HOOKS
 
 
 echo $ac_n "checking for Apache 1.x (hooks) module support via DSO through APXS""... $ac_c" 1>&6
-echo "configure:7214: checking for Apache 1.x (hooks) module support via DSO through APXS" >&5
+echo "configure:7262: checking for Apache 1.x (hooks) module support via DSO through APXS" >&5
 
 if test "$PHP_APACHE_HOOKS" != "no"; then
   if test "$PHP_APACHE_HOOKS" = "yes"; then
@@ -7541,7 +7589,7 @@ ext_output=$PHP_APACHE_HOOKS_STATIC
 
 
 echo $ac_n "checking for Apache 1.x (hooks) module support""... $ac_c" 1>&6
-echo "configure:7545: checking for Apache 1.x (hooks) module support" >&5
+echo "configure:7593: checking for Apache 1.x (hooks) module support" >&5
 
 if test "$PHP_SAPI" != "apache" && test "$PHP_SAPI" != "apache_hooks" && test "$PHP_APACHE_HOOKS_STATIC" != "no"; then
 
@@ -8418,7 +8466,7 @@ fi
 php_enable_mod_charset=no
 
 echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6
-echo "configure:8422: checking whether to enable Apache charset compatibility option" >&5
+echo "configure:8470: checking whether to enable Apache charset compatibility option" >&5
 # Check whether --enable-mod-charset or --disable-mod-charset was given.
 if test "${enable_mod_charset+set}" = set; then
   enableval="$enable_mod_charset"
@@ -8450,7 +8498,7 @@ if test "$APACHE_HOOKS_MODULE" = "yes";
         
   gcc_arg_name=ac_cv_gcc_arg_rdynamic
   echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6
-echo "configure:8454: checking whether $CC supports -rdynamic" >&5
+echo "configure:8502: checking whether $CC supports -rdynamic" >&5
 if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8493,7 +8541,7 @@ if test -n "$APACHE_HOOKS_INSTALL"; then
 
   
 echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6
-echo "configure:8497: checking for member fd in BUFF *" >&5
+echo "configure:8545: checking for member fd in BUFF *" >&5
 if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8505,14 +8553,14 @@ else
     CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE"
   fi
   cat > conftest.$ac_ext <<EOF
-#line 8509 "configure"
+#line 8557 "configure"
 #include "confdefs.h"
 #include <httpd.h>
 int main() {
 conn_rec *c; int fd = c->client->fd;
 ; return 0; }
 EOF
-if { (eval echo configure:8516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     ac_cv_php_fd_in_buff=yes
@@ -8586,7 +8634,7 @@ ext_output=$PHP_CAUDIUM
 
 
 echo $ac_n "checking for Caudium support""... $ac_c" 1>&6
-echo "configure:8590: checking for Caudium support" >&5
+echo "configure:8638: checking for Caudium support" >&5
 
 if test "$PHP_CAUDIUM" != "no"; then
   if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi
@@ -8656,7 +8704,7 @@ if test "$PHP_CAUDIUM" != "no"; then
       PIKE_C_INCLUDE=/usr/local/include/`basename $PIKE`
     fi
     echo $ac_n "checking for C includes in $PIKE_C_INCLUDE""... $ac_c" 1>&6
-echo "configure:8660: checking for C includes in $PIKE_C_INCLUDE" >&5
+echo "configure:8708: checking for C includes in $PIKE_C_INCLUDE" >&5
     if test -f $PIKE_C_INCLUDE/version.h; then
       PIKE_TEST_VER=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'`
       ###### VERSION MATCH CHECK #######
@@ -8945,7 +8993,7 @@ ext_output=$PHP_CLI
 
 
 echo $ac_n "checking for CLI build""... $ac_c" 1>&6
-echo "configure:8949: checking for CLI build" >&5
+echo "configure:8997: checking for CLI build" >&5
 if test "$PHP_CLI" != "no"; then
   
   src=$abs_srcdir/sapi/cli/Makefile.frag
@@ -8995,7 +9043,7 @@ echo "$ac_t""$PHP_CLI" 1>&6
 php_with_continuity=no
 
 echo $ac_n "checking for Continuity support""... $ac_c" 1>&6
-echo "configure:8999: checking for Continuity support" >&5
+echo "configure:9047: checking for Continuity support" >&5
 # Check whether --with-continuity or --without-continuity was given.
 if test "${with_continuity+set}" = set; then
   withval="$with_continuity"
@@ -9019,7 +9067,7 @@ if test "$PHP_CONTINUITY" != "no"; then
     { echo "configure: error: Please specify the path to the root of your Continuity server using --with-continuity=DIR" 1>&2; exit 1; }
   fi
   echo $ac_n "checking for Continuity include files""... $ac_c" 1>&6
-echo "configure:9023: checking for Continuity include files" >&5
+echo "configure:9071: checking for Continuity include files" >&5
   if test -d $PHP_CONTINUITY/include ; then
     CAPI_INCLUDE=$PHP_CONTINUITY/include
     echo "$ac_t""Continuity Binary Distribution" 1>&6
@@ -9277,7 +9325,7 @@ ext_output=$PHP_EMBED
 
 
 echo $ac_n "checking for embedded SAPI library support""... $ac_c" 1>&6
-echo "configure:9281: checking for embedded SAPI library support" >&5
+echo "configure:9329: checking for embedded SAPI library support" >&5
 
 if test "$PHP_EMBED" != "no"; then
   case "$PHP_EMBED" in
@@ -9541,7 +9589,7 @@ ext_output=$PHP_FPM
 
 
 echo $ac_n "checking for FPM build""... $ac_c" 1>&6
-echo "configure:9545: checking for FPM build" >&5
+echo "configure:9593: checking for FPM build" >&5
 if test "$PHP_FPM" != "no"; then
   echo "$ac_t""$PHP_FPM" 1>&6
 
@@ -9549,12 +9597,12 @@ if test "$PHP_FPM" != "no"; then
   for ac_func in setenv clearenv setproctitle
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9553: checking for $ac_func" >&5
+echo "configure:9601: 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 9558 "configure"
+#line 9606 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9577,7 +9625,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:9581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9629: \"$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
@@ -9604,14 +9652,14 @@ done
 
   
 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
-echo "configure:9608: checking for library containing socket" >&5
+echo "configure:9656: checking for library containing socket" >&5
 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_socket="no"
 cat > conftest.$ac_ext <<EOF
-#line 9615 "configure"
+#line 9663 "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
@@ -9622,7 +9670,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_socket="none required"
 else
@@ -9633,7 +9681,7 @@ rm -f conftest*
 test "$ac_cv_search_socket" = "no" && for i in socket; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9637 "configure"
+#line 9685 "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
@@ -9644,7 +9692,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:9648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_socket="-l$i"
 break
@@ -9666,14 +9714,14 @@ else :
 fi
   
 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
-echo "configure:9670: checking for library containing inet_addr" >&5
+echo "configure:9718: checking for library containing inet_addr" >&5
 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_inet_addr="no"
 cat > conftest.$ac_ext <<EOF
-#line 9677 "configure"
+#line 9725 "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
@@ -9684,7 +9732,7 @@ int main() {
 inet_addr()
 ; return 0; }
 EOF
-if { (eval echo configure:9688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_inet_addr="none required"
 else
@@ -9695,7 +9743,7 @@ rm -f conftest*
 test "$ac_cv_search_inet_addr" = "no" && for i in nsl; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9699 "configure"
+#line 9747 "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
@@ -9706,7 +9754,7 @@ int main() {
 inet_addr()
 ; return 0; }
 EOF
-if { (eval echo configure:9710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_inet_addr="-l$i"
 break
@@ -9731,17 +9779,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9735: checking for $ac_hdr" >&5
+echo "configure:9783: checking for $ac_hdr" >&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 9740 "configure"
+#line 9788 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9793: \"$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*
@@ -9771,17 +9819,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9775: checking for $ac_hdr" >&5
+echo "configure:9823: checking for $ac_hdr" >&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 9780 "configure"
+#line 9828 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9833: \"$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*
@@ -9811,17 +9859,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9815: checking for $ac_hdr" >&5
+echo "configure:9863: checking for $ac_hdr" >&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 9820 "configure"
+#line 9868 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9873: \"$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*
@@ -9850,17 +9898,17 @@ done
 
   
   echo $ac_n "checking for prctl""... $ac_c" 1>&6
-echo "configure:9854: checking for prctl" >&5
+echo "configure:9902: checking for prctl" >&5
 
   cat > conftest.$ac_ext <<EOF
-#line 9857 "configure"
+#line 9905 "configure"
 #include "confdefs.h"
  #include <sys/prctl.h> 
 int main() {
 prctl(0, 0, 0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:9864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     cat >> confdefs.h <<\EOF
@@ -9883,17 +9931,17 @@ rm -f conftest*
   have_clock_gettime=no
 
   echo $ac_n "checking for clock_gettime""... $ac_c" 1>&6
-echo "configure:9887: checking for clock_gettime" >&5
+echo "configure:9935: checking for clock_gettime" >&5
 
   cat > conftest.$ac_ext <<EOF
-#line 9890 "configure"
+#line 9938 "configure"
 #include "confdefs.h"
  #include <time.h> 
 int main() {
 struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);
 ; return 0; }
 EOF
-if { (eval echo configure:9897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
     have_clock_gettime=yes
@@ -9911,20 +9959,20 @@ rm -f conftest*
 
   if test "$have_clock_gettime" = "no"; then
     echo $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6
-echo "configure:9915: checking for clock_gettime in -lrt" >&5
+echo "configure:9963: checking for clock_gettime in -lrt" >&5
 
     SAVED_LIBS="$LIBS"
     LIBS="$LIBS -lrt"
 
     cat > conftest.$ac_ext <<EOF
-#line 9921 "configure"
+#line 9969 "configure"
 #include "confdefs.h"
  #include <time.h> 
 int main() {
 struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);
 ; return 0; }
 EOF
-if { (eval echo configure:9928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
       have_clock_gettime=yes
@@ -9953,13 +10001,13 @@ EOF
 
   if test "$have_clock_gettime" = "no"; then
     echo $ac_n "checking for clock_get_time""... $ac_c" 1>&6
-echo "configure:9957: checking for clock_get_time" >&5
+echo "configure:10005: checking for clock_get_time" >&5
 
     if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 9963 "configure"
+#line 10011 "configure"
 #include "confdefs.h"
  #include <mach/mach.h>
       #include <mach/clock.h>
@@ -9983,7 +10031,7 @@ else
       }
     
 EOF
-if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
       have_clock_get_time=yes
@@ -10014,10 +10062,10 @@ EOF
   have_broken_ptrace=no
 
   echo $ac_n "checking for ptrace""... $ac_c" 1>&6
-echo "configure:10018: checking for ptrace" >&5
+echo "configure:10066: checking for ptrace" >&5
 
   cat > conftest.$ac_ext <<EOF
-#line 10021 "configure"
+#line 10069 "configure"
 #include "confdefs.h"
 
     #include <sys/types.h>
@@ -10026,7 +10074,7 @@ int main() {
 ptrace(0, 0, (void *) 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:10030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     have_ptrace=yes
@@ -10044,13 +10092,13 @@ rm -f conftest*
 
   if test "$have_ptrace" = "yes"; then
     echo $ac_n "checking whether ptrace works""... $ac_c" 1>&6
-echo "configure:10048: checking whether ptrace works" >&5
+echo "configure:10096: checking whether ptrace works" >&5
 
     if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 10054 "configure"
+#line 10102 "configure"
 #include "confdefs.h"
 
       #include <unistd.h>
@@ -10121,7 +10169,7 @@ else
       }
     
 EOF
-if { (eval echo configure:10125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
       echo "$ac_t""yes" 1>&6
@@ -10152,10 +10200,10 @@ EOF
 
   if test "$have_broken_ptrace" = "yes"; then
     echo $ac_n "checking for mach_vm_read""... $ac_c" 1>&6
-echo "configure:10156: checking for mach_vm_read" >&5
+echo "configure:10204: checking for mach_vm_read" >&5
 
     cat > conftest.$ac_ext <<EOF
-#line 10159 "configure"
+#line 10207 "configure"
 #include "confdefs.h"
  #include <mach/mach.h>
       #include <mach/mach_vm.h>
@@ -10166,7 +10214,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:10170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
       have_mach_vm_read=yes
@@ -10202,13 +10250,13 @@ EOF
 
   if test -n "$proc_mem_file" ; then
     echo $ac_n "checking for proc mem file""... $ac_c" 1>&6
-echo "configure:10206: checking for proc mem file" >&5
+echo "configure:10254: checking for proc mem file" >&5
   
     if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 10212 "configure"
+#line 10260 "configure"
 #include "confdefs.h"
 
       #define _GNU_SOURCE
@@ -10238,7 +10286,7 @@ else
       }
     
 EOF
-if { (eval echo configure:10242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
       echo "$ac_t""$proc_mem_file" 1>&6
@@ -10282,9 +10330,9 @@ EOF
 
   
   echo $ac_n "checking if gcc supports __sync_bool_compare_and_swap""... $ac_c" 1>&6
-echo "configure:10286: checking if gcc supports __sync_bool_compare_and_swap" >&5
+echo "configure:10334: checking if gcc supports __sync_bool_compare_and_swap" >&5
   cat > conftest.$ac_ext <<EOF
-#line 10288 "configure"
+#line 10336 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -10295,7 +10343,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:10299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
@@ -10318,17 +10366,17 @@ rm -f conftest*
   have_lq=no
 
   echo $ac_n "checking for TCP_INFO""... $ac_c" 1>&6
-echo "configure:10322: checking for TCP_INFO" >&5
+echo "configure:10370: checking for TCP_INFO" >&5
 
   cat > conftest.$ac_ext <<EOF
-#line 10325 "configure"
+#line 10373 "configure"
 #include "confdefs.h"
  #include <netinet/tcp.h> 
 int main() {
 struct tcp_info ti; int x = TCP_INFO;
 ; return 0; }
 EOF
-if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     have_lq=tcp_info
@@ -10353,17 +10401,17 @@ EOF
 
   if test "$have_lq" = "no" ; then
     echo $ac_n "checking for SO_LISTENQLEN""... $ac_c" 1>&6
-echo "configure:10357: checking for SO_LISTENQLEN" >&5
+echo "configure:10405: checking for SO_LISTENQLEN" >&5
 
     cat > conftest.$ac_ext <<EOF
-#line 10360 "configure"
+#line 10408 "configure"
 #include "confdefs.h"
  #include <sys/socket.h> 
 int main() {
 int x = SO_LISTENQLIMIT; int y = SO_LISTENQLEN;
 ; return 0; }
 EOF
-if { (eval echo configure:10367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
       have_lq=so_listenq
@@ -10389,17 +10437,17 @@ EOF
 
 	
 	echo $ac_n "checking for sysconf""... $ac_c" 1>&6
-echo "configure:10393: checking for sysconf" >&5
+echo "configure:10441: checking for sysconf" >&5
 
 	cat > conftest.$ac_ext <<EOF
-#line 10396 "configure"
+#line 10444 "configure"
 #include "confdefs.h"
  #include <unistd.h> 
 int main() {
 sysconf(_SC_CLK_TCK);
 ; return 0; }
 EOF
-if { (eval echo configure:10403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 		cat >> confdefs.h <<\EOF
@@ -10420,17 +10468,17 @@ rm -f conftest*
 
 	
 	echo $ac_n "checking for times""... $ac_c" 1>&6
-echo "configure:10424: checking for times" >&5
+echo "configure:10472: checking for times" >&5
 
 	cat > conftest.$ac_ext <<EOF
-#line 10427 "configure"
+#line 10475 "configure"
 #include "confdefs.h"
  #include <sys/times.h> 
 int main() {
 struct tms t; times(&t);
 ; return 0; }
 EOF
-if { (eval echo configure:10434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 		cat >> confdefs.h <<\EOF
@@ -10802,7 +10850,7 @@ fi
 php_with_isapi=no
 
 echo $ac_n "checking for Zeus ISAPI support""... $ac_c" 1>&6
-echo "configure:10806: checking for Zeus ISAPI support" >&5
+echo "configure:10854: checking for Zeus ISAPI support" >&5
 # Check whether --with-isapi or --without-isapi was given.
 if test "${with_isapi+set}" = set; then
   withval="$with_isapi"
@@ -11056,7 +11104,7 @@ fi
 
 
 echo $ac_n "checking for LiteSpeed support""... $ac_c" 1>&6
-echo "configure:11060: checking for LiteSpeed support" >&5
+echo "configure:11108: checking for LiteSpeed support" >&5
 
 
 php_with_litespeed=no
@@ -11319,7 +11367,7 @@ echo "$ac_t""$PHP_LITESPEED" 1>&6
 php_with_milter=no
 
 echo $ac_n "checking for Milter support""... $ac_c" 1>&6
-echo "configure:11323: checking for Milter support" >&5
+echo "configure:11371: checking for Milter support" >&5
 # Check whether --with-milter or --without-milter was given.
 if test "${with_milter+set}" = set; then
   withval="$with_milter"
@@ -11611,7 +11659,7 @@ fi
 php_with_nsapi=no
 
 echo $ac_n "checking for NSAPI support""... $ac_c" 1>&6
-echo "configure:11615: checking for NSAPI support" >&5
+echo "configure:11663: checking for NSAPI support" >&5
 # Check whether --with-nsapi or --without-nsapi was given.
 if test "${with_nsapi+set}" = set; then
   withval="$with_nsapi"
@@ -11635,7 +11683,7 @@ if test "$PHP_NSAPI" != "no"; then
     { echo "configure: error: Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR" 1>&2; exit 1; }
   fi
   echo $ac_n "checking for NSAPI include files""... $ac_c" 1>&6
-echo "configure:11639: checking for NSAPI include files" >&5
+echo "configure:11687: checking for NSAPI include files" >&5
   if test -d $PHP_NSAPI/include ; then
     NSAPI_INC_DIR="$PHP_NSAPI/include"
     echo "$ac_t""Netscape 3.x / Sun 7.x style" 1>&6
@@ -11643,17 +11691,17 @@ echo "configure:11639: checking for NSAP
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11647: checking for $ac_hdr" >&5
+echo "configure:11695: checking for $ac_hdr" >&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 11652 "configure"
+#line 11700 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11705: \"$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*
@@ -11688,17 +11736,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11692: checking for $ac_hdr" >&5
+echo "configure:11740: checking for $ac_hdr" >&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 11697 "configure"
+#line 11745 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11750: \"$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*
@@ -11971,7 +12019,7 @@ fi
 php_with_phttpd=no
 
 echo $ac_n "checking for PHTTPD support""... $ac_c" 1>&6
-echo "configure:11975: checking for PHTTPD support" >&5
+echo "configure:12023: checking for PHTTPD support" >&5
 # Check whether --with-phttpd or --without-phttpd was given.
 if test "${with_phttpd+set}" = set; then
   withval="$with_phttpd"
@@ -12225,7 +12273,7 @@ fi
 php_with_pi3web=no
 
 echo $ac_n "checking for Pi3Web support""... $ac_c" 1>&6
-echo "configure:12229: checking for Pi3Web support" >&5
+echo "configure:12277: checking for Pi3Web support" >&5
 # Check whether --with-pi3web or --without-pi3web was given.
 if test "${with_pi3web+set}" = set; then
   withval="$with_pi3web"
@@ -12597,7 +12645,7 @@ ext_output=$PHP_ROXEN
 php_enable_roxen_zts=no
 
 echo $ac_n "checking whether Roxen module is build using ZTS""... $ac_c" 1>&6
-echo "configure:12601: checking whether Roxen module is build using ZTS" >&5
+echo "configure:12649: checking whether Roxen module is build using ZTS" >&5
 # Check whether --enable-roxen-zts or --disable-roxen-zts was given.
 if test "${enable_roxen_zts+set}" = set; then
   enableval="$enable_roxen_zts"
@@ -12618,7 +12666,7 @@ echo "$ac_t""$ext_output" 1>&6
 
 RESULT=
 echo $ac_n "checking for Roxen/Pike support""... $ac_c" 1>&6
-echo "configure:12622: checking for Roxen/Pike support" >&5
+echo "configure:12670: checking for Roxen/Pike support" >&5
 if test "$PHP_ROXEN" != "no"; then
   if test ! -d $PHP_ROXEN ; then
     { echo "configure: error: You did not specify a directory" 1>&2; exit 1; }
@@ -12904,7 +12952,7 @@ ext_output=$PHP_THTTPD
 
 
 echo $ac_n "checking for thttpd""... $ac_c" 1>&6
-echo "configure:12908: checking for thttpd" >&5
+echo "configure:12956: checking for thttpd" >&5
 
 if test "$PHP_THTTPD" != "no"; then
   if test ! -d $PHP_THTTPD; then
@@ -12937,7 +12985,7 @@ if test "$PHP_THTTPD" != "no"; then
         
   gcc_arg_name=ac_cv_gcc_arg_rdynamic
   echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6
-echo "configure:12941: checking whether $CC supports -rdynamic" >&5
+echo "configure:12989: checking whether $CC supports -rdynamic" >&5
 if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13173,24 +13221,24 @@ ext_output=$PHP_TUX
 
 
 echo $ac_n "checking for TUX""... $ac_c" 1>&6
-echo "configure:13177: checking for TUX" >&5
+echo "configure:13225: checking for TUX" >&5
 if test "$PHP_TUX" != "no"; then
   INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_TUX/php5.tux.so"
   for ac_hdr in tuxmodule.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13184: checking for $ac_hdr" >&5
+echo "configure:13232: checking for $ac_hdr" >&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 13189 "configure"
+#line 13237 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13242: \"$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*
@@ -13427,7 +13475,7 @@ ext_output=$PHP_WEBJAMES
 
 
 echo $ac_n "checking for webjames""... $ac_c" 1>&6
-echo "configure:13431: checking for webjames" >&5
+echo "configure:13479: checking for webjames" >&5
 
 if test "$PHP_WEBJAMES" != "no"; then
   
@@ -13687,14 +13735,14 @@ ext_output=$PHP_CGI
 
 if test "$PHP_SAPI" = "default"; then
   echo $ac_n "checking whether to build CGI binary""... $ac_c" 1>&6
-echo "configure:13691: checking whether to build CGI binary" >&5
+echo "configure:13739: checking whether to build CGI binary" >&5
   if test "$PHP_CGI" != "no"; then
     echo "$ac_t""yes" 1>&6
 
     echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
-echo "configure:13696: checking for socklen_t in sys/socket.h" >&5
+echo "configure:13744: checking for socklen_t in sys/socket.h" >&5
     cat > conftest.$ac_ext <<EOF
-#line 13698 "configure"
+#line 13746 "configure"
 #include "confdefs.h"
 #include <sys/socket.h>
 EOF
@@ -13714,9 +13762,9 @@ rm -f conftest*
 
 
     echo $ac_n "checking for sun_len in sys/un.h""... $ac_c" 1>&6
-echo "configure:13718: checking for sun_len in sys/un.h" >&5
+echo "configure:13766: checking for sun_len in sys/un.h" >&5
     cat > conftest.$ac_ext <<EOF
-#line 13720 "configure"
+#line 13768 "configure"
 #include "confdefs.h"
 #include <sys/un.h>
 EOF
@@ -13736,7 +13784,7 @@ rm -f conftest*
 
 
     echo $ac_n "checking whether cross-process locking is required by accept()""... $ac_c" 1>&6
-echo "configure:13740: checking whether cross-process locking is required by accept()" >&5
+echo "configure:13788: checking whether cross-process locking is required by accept()" >&5
     case "`uname -sr`" in
       IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0)	
         echo "$ac_t""yes" 1>&6
@@ -13980,7 +14028,7 @@ fi
 
 
 echo $ac_n "checking for chosen SAPI module""... $ac_c" 1>&6
-echo "configure:13984: checking for chosen SAPI module" >&5
+echo "configure:14032: checking for chosen SAPI module" >&5
 echo "$ac_t""$PHP_SAPI" 1>&6
 
 if test "$enable_maintainer_zts" = "yes"; then
@@ -14037,7 +14085,7 @@ fi
   # Extract the first word of "sendmail", so it can be a program name with args.
 set dummy sendmail; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:14041: checking for $ac_word" >&5
+echo "configure:14089: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PROG_SENDMAIL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14076,7 +14124,7 @@ fi
 
 
   echo $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6
-echo "configure:14080: checking whether system uses EBCDIC" >&5
+echo "configure:14128: checking whether system uses EBCDIC" >&5
 if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14087,7 +14135,7 @@ else
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 14091 "configure"
+#line 14139 "configure"
 #include "confdefs.h"
 
 int main(void) { 
@@ -14095,7 +14143,7 @@ int main(void) {
 } 
 
 EOF
-if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   ac_cv_ebcdic=yes
@@ -14123,7 +14171,7 @@ EOF
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:14127: checking whether byte ordering is bigendian" >&5
+echo "configure:14175: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14133,7 +14181,7 @@ else
   ac_cv_c_bigendian_php=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 14137 "configure"
+#line 14185 "configure"
 #include "confdefs.h"
 
 int main(void)
@@ -14149,7 +14197,7 @@ int main(void)
 }
   
 EOF
-if { (eval echo configure:14153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian_php=yes
 else
@@ -14175,7 +14223,7 @@ EOF
 
 
   echo $ac_n "checking whether writing to stdout works""... $ac_c" 1>&6
-echo "configure:14179: checking whether writing to stdout works" >&5
+echo "configure:14227: checking whether writing to stdout works" >&5
 if eval "test \"`echo '$''{'ac_cv_write_stdout'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14186,7 +14234,7 @@ else
     
 else
   cat > conftest.$ac_ext <<EOF
-#line 14190 "configure"
+#line 14238 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -14204,7 +14252,7 @@ main()
 }
     
 EOF
-if { (eval echo configure:14208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
       ac_cv_write_stdout=yes
@@ -14279,12 +14327,12 @@ test -d /usr/ucblib &&
   unset found
   
   echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:14283: checking for socket" >&5
+echo "configure:14331: checking for socket" >&5
 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14288 "configure"
+#line 14336 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -14307,7 +14355,7 @@ socket();
 
 ; return 0; }
 EOF
-if { (eval echo configure:14311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -14325,12 +14373,12 @@ if eval "test \"`echo '$ac_cv_func_'sock
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __socket""... $ac_c" 1>&6
-echo "configure:14329: checking for __socket" >&5
+echo "configure:14377: checking for __socket" >&5
 if eval "test \"`echo '$''{'ac_cv_func___socket'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14334 "configure"
+#line 14382 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __socket(); below.  */
@@ -14353,7 +14401,7 @@ __socket();
 
 ; return 0; }
 EOF
-if { (eval echo configure:14357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___socket=yes"
 else
@@ -14391,7 +14439,7 @@ EOF
   unset ac_cv_lib_socket___socket
   unset found
   echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:14395: checking for socket in -lsocket" >&5
+echo "configure:14443: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -14399,7 +14447,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14403 "configure"
+#line 14451 "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
@@ -14410,7 +14458,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:14414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14462: \"$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
@@ -14430,7 +14478,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __socket in -lsocket""... $ac_c" 1>&6
-echo "configure:14434: checking for __socket in -lsocket" >&5
+echo "configure:14482: checking for __socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'__socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -14438,7 +14486,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14442 "configure"
+#line 14490 "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
@@ -14449,7 +14497,7 @@ int main() {
 __socket()
 ; return 0; }
 EOF
-if { (eval echo configure:14453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14501: \"$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
@@ -14481,11 +14529,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 14485 "configure"
+#line 14533 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:14489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -14536,12 +14584,12 @@ EOF
   unset found
   
   echo $ac_n "checking for socketpair""... $ac_c" 1>&6
-echo "configure:14540: checking for socketpair" >&5
+echo "configure:14588: checking for socketpair" >&5
 if eval "test \"`echo '$''{'ac_cv_func_socketpair'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14545 "configure"
+#line 14593 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socketpair(); below.  */
@@ -14564,7 +14612,7 @@ socketpair();
 
 ; return 0; }
 EOF
-if { (eval echo configure:14568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socketpair=yes"
 else
@@ -14582,12 +14630,12 @@ if eval "test \"`echo '$ac_cv_func_'sock
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __socketpair""... $ac_c" 1>&6
-echo "configure:14586: checking for __socketpair" >&5
+echo "configure:14634: checking for __socketpair" >&5
 if eval "test \"`echo '$''{'ac_cv_func___socketpair'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14591 "configure"
+#line 14639 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __socketpair(); below.  */
@@ -14610,7 +14658,7 @@ __socketpair();
 
 ; return 0; }
 EOF
-if { (eval echo configure:14614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___socketpair=yes"
 else
@@ -14648,7 +14696,7 @@ EOF
   unset ac_cv_lib_socket___socketpair
   unset found
   echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:14652: checking for socketpair in -lsocket" >&5
+echo "configure:14700: checking for socketpair in -lsocket" >&5
 ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -14656,7 +14704,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14660 "configure"
+#line 14708 "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
@@ -14667,7 +14715,7 @@ int main() {
 socketpair()
 ; return 0; }
 EOF
-if { (eval echo configure:14671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14719: \"$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
@@ -14687,7 +14735,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:14691: checking for __socketpair in -lsocket" >&5
+echo "configure:14739: checking for __socketpair in -lsocket" >&5
 ac_lib_var=`echo socket'_'__socketpair | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -14695,7 +14743,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14699 "configure"
+#line 14747 "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
@@ -14706,7 +14754,7 @@ int main() {
 __socketpair()
 ; return 0; }
 EOF
-if { (eval echo configure:14710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14758: \"$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
@@ -14738,11 +14786,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 14742 "configure"
+#line 14790 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:14746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -14793,12 +14841,12 @@ EOF
   unset found
   
   echo $ac_n "checking for htonl""... $ac_c" 1>&6
-echo "configure:14797: checking for htonl" >&5
+echo "configure:14845: checking for htonl" >&5
 if eval "test \"`echo '$''{'ac_cv_func_htonl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14802 "configure"
+#line 14850 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char htonl(); below.  */
@@ -14821,7 +14869,7 @@ htonl();
 
 ; return 0; }
 EOF
-if { (eval echo configure:14825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_htonl=yes"
 else
@@ -14839,12 +14887,12 @@ if eval "test \"`echo '$ac_cv_func_'hton
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __htonl""... $ac_c" 1>&6
-echo "configure:14843: checking for __htonl" >&5
+echo "configure:14891: checking for __htonl" >&5
 if eval "test \"`echo '$''{'ac_cv_func___htonl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14848 "configure"
+#line 14896 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __htonl(); below.  */
@@ -14867,7 +14915,7 @@ __htonl();
 
 ; return 0; }
 EOF
-if { (eval echo configure:14871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___htonl=yes"
 else
@@ -14905,7 +14953,7 @@ EOF
   unset ac_cv_lib_socket___htonl
   unset found
   echo $ac_n "checking for htonl in -lsocket""... $ac_c" 1>&6
-echo "configure:14909: checking for htonl in -lsocket" >&5
+echo "configure:14957: checking for htonl in -lsocket" >&5
 ac_lib_var=`echo socket'_'htonl | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -14913,7 +14961,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14917 "configure"
+#line 14965 "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
@@ -14924,7 +14972,7 @@ int main() {
 htonl()
 ; return 0; }
 EOF
-if { (eval echo configure:14928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14976: \"$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
@@ -14944,7 +14992,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __htonl in -lsocket""... $ac_c" 1>&6
-echo "configure:14948: checking for __htonl in -lsocket" >&5
+echo "configure:14996: checking for __htonl in -lsocket" >&5
 ac_lib_var=`echo socket'_'__htonl | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -14952,7 +15000,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14956 "configure"
+#line 15004 "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
@@ -14963,7 +15011,7 @@ int main() {
 __htonl()
 ; return 0; }
 EOF
-if { (eval echo configure:14967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15015: \"$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
@@ -14995,11 +15043,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 14999 "configure"
+#line 15047 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:15003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -15050,12 +15098,12 @@ EOF
   unset found
   
   echo $ac_n "checking for gethostname""... $ac_c" 1>&6
-echo "configure:15054: checking for gethostname" >&5
+echo "configure:15102: checking for gethostname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15059 "configure"
+#line 15107 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostname(); below.  */
@@ -15078,7 +15126,7 @@ gethostname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostname=yes"
 else
@@ -15096,12 +15144,12 @@ if eval "test \"`echo '$ac_cv_func_'geth
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __gethostname""... $ac_c" 1>&6
-echo "configure:15100: checking for __gethostname" >&5
+echo "configure:15148: checking for __gethostname" >&5
 if eval "test \"`echo '$''{'ac_cv_func___gethostname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15105 "configure"
+#line 15153 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __gethostname(); below.  */
@@ -15124,7 +15172,7 @@ __gethostname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___gethostname=yes"
 else
@@ -15162,7 +15210,7 @@ EOF
   unset ac_cv_lib_nsl___gethostname
   unset found
   echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:15166: checking for gethostname in -lnsl" >&5
+echo "configure:15214: checking for gethostname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15170,7 +15218,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15174 "configure"
+#line 15222 "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
@@ -15181,7 +15229,7 @@ int main() {
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:15185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15233: \"$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
@@ -15201,7 +15249,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:15205: checking for __gethostname in -lnsl" >&5
+echo "configure:15253: checking for __gethostname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'__gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15209,7 +15257,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15213 "configure"
+#line 15261 "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
@@ -15220,7 +15268,7 @@ int main() {
 __gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:15224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15272: \"$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
@@ -15252,11 +15300,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 15256 "configure"
+#line 15304 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:15260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -15307,12 +15355,12 @@ EOF
   unset found
   
   echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6
-echo "configure:15311: checking for gethostbyaddr" >&5
+echo "configure:15359: checking for gethostbyaddr" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15316 "configure"
+#line 15364 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyaddr(); below.  */
@@ -15335,7 +15383,7 @@ gethostbyaddr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyaddr=yes"
 else
@@ -15353,12 +15401,12 @@ if eval "test \"`echo '$ac_cv_func_'geth
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __gethostbyaddr""... $ac_c" 1>&6
-echo "configure:15357: checking for __gethostbyaddr" >&5
+echo "configure:15405: checking for __gethostbyaddr" >&5
 if eval "test \"`echo '$''{'ac_cv_func___gethostbyaddr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15362 "configure"
+#line 15410 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __gethostbyaddr(); below.  */
@@ -15381,7 +15429,7 @@ __gethostbyaddr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___gethostbyaddr=yes"
 else
@@ -15419,7 +15467,7 @@ EOF
   unset ac_cv_lib_nsl___gethostbyaddr
   unset found
   echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6
-echo "configure:15423: checking for gethostbyaddr in -lnsl" >&5
+echo "configure:15471: checking for gethostbyaddr in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15427,7 +15475,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15431 "configure"
+#line 15479 "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
@@ -15438,7 +15486,7 @@ int main() {
 gethostbyaddr()
 ; return 0; }
 EOF
-if { (eval echo configure:15442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15490: \"$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
@@ -15458,7 +15506,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __gethostbyaddr in -lnsl""... $ac_c" 1>&6
-echo "configure:15462: checking for __gethostbyaddr in -lnsl" >&5
+echo "configure:15510: checking for __gethostbyaddr in -lnsl" >&5
 ac_lib_var=`echo nsl'_'__gethostbyaddr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15466,7 +15514,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15470 "configure"
+#line 15518 "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
@@ -15477,7 +15525,7 @@ int main() {
 __gethostbyaddr()
 ; return 0; }
 EOF
-if { (eval echo configure:15481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15529: \"$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
@@ -15509,11 +15557,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 15513 "configure"
+#line 15561 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:15517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -15564,12 +15612,12 @@ EOF
   unset found
   
   echo $ac_n "checking for yp_get_default_domain""... $ac_c" 1>&6
-echo "configure:15568: checking for yp_get_default_domain" >&5
+echo "configure:15616: checking for yp_get_default_domain" >&5
 if eval "test \"`echo '$''{'ac_cv_func_yp_get_default_domain'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15573 "configure"
+#line 15621 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char yp_get_default_domain(); below.  */
@@ -15592,7 +15640,7 @@ yp_get_default_domain();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_yp_get_default_domain=yes"
 else
@@ -15610,12 +15658,12 @@ if eval "test \"`echo '$ac_cv_func_'yp_g
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __yp_get_default_domain""... $ac_c" 1>&6
-echo "configure:15614: checking for __yp_get_default_domain" >&5
+echo "configure:15662: checking for __yp_get_default_domain" >&5
 if eval "test \"`echo '$''{'ac_cv_func___yp_get_default_domain'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15619 "configure"
+#line 15667 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __yp_get_default_domain(); below.  */
@@ -15638,7 +15686,7 @@ __yp_get_default_domain();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___yp_get_default_domain=yes"
 else
@@ -15676,7 +15724,7 @@ EOF
   unset ac_cv_lib_nsl___yp_get_default_domain
   unset found
   echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
-echo "configure:15680: checking for yp_get_default_domain in -lnsl" >&5
+echo "configure:15728: checking for yp_get_default_domain in -lnsl" >&5
 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15684,7 +15732,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15688 "configure"
+#line 15736 "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
@@ -15695,7 +15743,7 @@ int main() {
 yp_get_default_domain()
 ; return 0; }
 EOF
-if { (eval echo configure:15699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15747: \"$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
@@ -15715,7 +15763,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __yp_get_default_domain in -lnsl""... $ac_c" 1>&6
-echo "configure:15719: checking for __yp_get_default_domain in -lnsl" >&5
+echo "configure:15767: checking for __yp_get_default_domain in -lnsl" >&5
 ac_lib_var=`echo nsl'_'__yp_get_default_domain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15723,7 +15771,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15727 "configure"
+#line 15775 "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
@@ -15734,7 +15782,7 @@ int main() {
 __yp_get_default_domain()
 ; return 0; }
 EOF
-if { (eval echo configure:15738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15786: \"$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
@@ -15766,11 +15814,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 15770 "configure"
+#line 15818 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:15774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -15822,12 +15870,12 @@ EOF
   unset found
   
   echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:15826: checking for dlopen" >&5
+echo "configure:15874: checking for dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15831 "configure"
+#line 15879 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
@@ -15850,7 +15898,7 @@ dlopen();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dlopen=yes"
 else
@@ -15868,12 +15916,12 @@ if eval "test \"`echo '$ac_cv_func_'dlop
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __dlopen""... $ac_c" 1>&6
-echo "configure:15872: checking for __dlopen" >&5
+echo "configure:15920: checking for __dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func___dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15877 "configure"
+#line 15925 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __dlopen(); below.  */
@@ -15896,7 +15944,7 @@ __dlopen();
 
 ; return 0; }
 EOF
-if { (eval echo configure:15900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___dlopen=yes"
 else
@@ -15934,7 +15982,7 @@ EOF
   unset ac_cv_lib_dl___dlopen
   unset found
   echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:15938: checking for dlopen in -ldl" >&5
+echo "configure:15986: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15942,7 +15990,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15946 "configure"
+#line 15994 "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
@@ -15953,7 +16001,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:15957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16005: \"$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
@@ -15973,7 +16021,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:15977: checking for __dlopen in -ldl" >&5
+echo "configure:16025: checking for __dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'__dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15981,7 +16029,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15985 "configure"
+#line 16033 "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
@@ -15992,7 +16040,7 @@ int main() {
 __dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:15996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16044: \"$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
@@ -16024,11 +16072,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 16028 "configure"
+#line 16076 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:16032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:16080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -16080,7 +16128,7 @@ EOF
 
 fi
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:16084: checking for sin in -lm" >&5
+echo "configure:16132: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16088,7 +16136,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16092 "configure"
+#line 16140 "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
@@ -16099,7 +16147,7 @@ int main() {
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:16103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16151: \"$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
@@ -16133,12 +16181,12 @@ fi
   unset found
   
   echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:16137: checking for inet_aton" >&5
+echo "configure:16185: checking for inet_aton" >&5
 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16142 "configure"
+#line 16190 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -16161,7 +16209,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:16165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_inet_aton=yes"
 else
@@ -16179,12 +16227,12 @@ if eval "test \"`echo '$ac_cv_func_'inet
 else
   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for __inet_aton""... $ac_c" 1>&6
-echo "configure:16183: checking for __inet_aton" >&5
+echo "configure:16231: checking for __inet_aton" >&5
 if eval "test \"`echo '$''{'ac_cv_func___inet_aton'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16188 "configure"
+#line 16236 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __inet_aton(); below.  */
@@ -16207,7 +16255,7 @@ __inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:16211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___inet_aton=yes"
 else
@@ -16245,7 +16293,7 @@ EOF
   unset ac_cv_lib_resolv___inet_aton
   unset found
   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:16249: checking for inet_aton in -lresolv" >&5
+echo "configure:16297: checking for inet_aton in -lresolv" >&5
 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16253,7 +16301,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16257 "configure"
+#line 16305 "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
@@ -16264,7 +16312,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:16268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16316: \"$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
@@ -16284,7 +16332,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:16288: checking for __inet_aton in -lresolv" >&5
+echo "configure:16336: checking for __inet_aton in -lresolv" >&5
 ac_lib_var=`echo resolv'_'__inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16292,7 +16340,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16296 "configure"
+#line 16344 "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
@@ -16303,7 +16351,7 @@ int main() {
 __inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:16307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16355: \"$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
@@ -16335,11 +16383,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 16339 "configure"
+#line 16387 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:16343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:16391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -16381,7 +16429,7 @@ EOF
   unset ac_cv_lib_bind___inet_aton
   unset found
   echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6
-echo "configure:16385: checking for inet_aton in -lbind" >&5
+echo "configure:16433: checking for inet_aton in -lbind" >&5
 ac_lib_var=`echo bind'_'inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16389,7 +16437,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16393 "configure"
+#line 16441 "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
@@ -16400,7 +16448,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:16404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16452: \"$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
@@ -16420,7 +16468,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __inet_aton in -lbind""... $ac_c" 1>&6
-echo "configure:16424: checking for __inet_aton in -lbind" >&5
+echo "configure:16472: checking for __inet_aton in -lbind" >&5
 ac_lib_var=`echo bind'_'__inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16428,7 +16476,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16432 "configure"
+#line 16480 "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
@@ -16439,7 +16487,7 @@ int main() {
 __inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:16443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16491: \"$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
@@ -16471,11 +16519,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 16475 "configure"
+#line 16523 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:16479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:16527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -16526,12 +16574,12 @@ EOF
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:16530: checking for ANSI C header files" >&5
+echo "configure:16578: 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 16535 "configure"
+#line 16583 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -16539,7 +16587,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16591: \"$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*
@@ -16556,7 +16604,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 16560 "configure"
+#line 16608 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -16574,7 +16622,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 16578 "configure"
+#line 16626 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -16595,7 +16643,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 16599 "configure"
+#line 16647 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -16606,7 +16654,7 @@ if (XOR (islower (i), ISLOWER (i)) || to
 exit (0); }
 
 EOF
-if { (eval echo configure:16610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:16658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -16634,12 +16682,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/di
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:16638: checking for $ac_hdr that defines DIR" >&5
+echo "configure:16686: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16643 "configure"
+#line 16691 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -16647,7 +16695,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:16651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -16672,7 +16720,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:16676: checking for opendir in -ldir" >&5
+echo "configure:16724: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16680,7 +16728,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16684 "configure"
+#line 16732 "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
@@ -16691,7 +16739,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:16695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16743: \"$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
@@ -16713,7 +16761,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:16717: checking for opendir in -lx" >&5
+echo "configure:16765: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16721,7 +16769,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16725 "configure"
+#line 16773 "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
@@ -16732,7 +16780,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:16736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16784: \"$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
@@ -16814,17 +16862,17 @@ assert.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16818: checking for $ac_hdr" >&5
+echo "configure:16866: checking for $ac_hdr" >&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 16823 "configure"
+#line 16871 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16876: \"$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*
@@ -16853,12 +16901,12 @@ done
 
 
   echo $ac_n "checking for fopencookie""... $ac_c" 1>&6
-echo "configure:16857: checking for fopencookie" >&5
+echo "configure:16905: checking for fopencookie" >&5
 if eval "test \"`echo '$''{'ac_cv_func_fopencookie'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16862 "configure"
+#line 16910 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char fopencookie(); below.  */
@@ -16881,7 +16929,7 @@ fopencookie();
 
 ; return 0; }
 EOF
-if { (eval echo configure:16885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_fopencookie=yes"
 else
@@ -16903,7 +16951,7 @@ fi
 
   if test "$have_glibc_fopencookie" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 16907 "configure"
+#line 16955 "configure"
 #include "confdefs.h"
 
 #define _GNU_SOURCE
@@ -16913,7 +16961,7 @@ int main() {
 cookie_io_functions_t cookie;
 ; return 0; }
 EOF
-if { (eval echo configure:16917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   have_cookie_io_functions_t=yes
 else
@@ -16932,7 +16980,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 16936 "configure"
+#line 16984 "configure"
 #include "confdefs.h"
 
 #define _GNU_SOURCE
@@ -16964,7 +17012,7 @@ main() {
 
 
 EOF
-if { (eval echo configure:16968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   cookie_io_functions_use_off64_t=yes
@@ -16984,7 +17032,7 @@ fi
     else
 
 cat > conftest.$ac_ext <<EOF
-#line 16988 "configure"
+#line 17036 "configure"
 #include "confdefs.h"
 
 #define _GNU_SOURCE
@@ -16994,7 +17042,7 @@ int main() {
  _IO_cookie_io_functions_t cookie; 
 ; return 0; }
 EOF
-if { (eval echo configure:16998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   have_IO_cookie_io_functions_t=yes
 else
@@ -17028,7 +17076,7 @@ EOF
 
 
   echo $ac_n "checking for broken getcwd""... $ac_c" 1>&6
-echo "configure:17032: checking for broken getcwd" >&5
+echo "configure:17080: checking for broken getcwd" >&5
   os=`uname -sr 2>/dev/null`
   case $os in
     SunOS*)
@@ -17043,14 +17091,14 @@ EOF
 
 
   echo $ac_n "checking for broken libc stdio""... $ac_c" 1>&6
-echo "configure:17047: checking for broken libc stdio" >&5
+echo "configure:17095: checking for broken libc stdio" >&5
   if eval "test \"`echo '$''{'_cv_have_broken_glibc_fopen_append'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 17054 "configure"
+#line 17102 "configure"
 #include "confdefs.h"
 
 #include <features.h>
@@ -17063,7 +17111,7 @@ choke me
 
 ; return 0; }
 EOF
-if { (eval echo configure:17067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   _cv_have_broken_glibc_fopen_append=yes
 else
@@ -17076,7 +17124,7 @@ rm -f conftest*
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 17080 "configure"
+#line 17128 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -17104,7 +17152,7 @@ int main(int argc, char *argv[])
 }
 
 EOF
-if { (eval echo configure:17108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   _cv_have_broken_glibc_fopen_append=no
 else
@@ -17132,12 +17180,12 @@ EOF
 
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:17136: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:17184: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17141 "configure"
+#line 17189 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -17145,7 +17193,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:17149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -17166,12 +17214,12 @@ EOF
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:17170: checking for tm_zone in struct tm" >&5
+echo "configure:17218: checking for tm_zone in struct tm" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17175 "configure"
+#line 17223 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -17179,7 +17227,7 @@ int main() {
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:17183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -17199,12 +17247,12 @@ EOF
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:17203: checking for tzname" >&5
+echo "configure:17251: checking for tzname" >&5
 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17208 "configure"
+#line 17256 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -17214,7 +17262,7 @@ int main() {
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:17218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -17238,16 +17286,16 @@ fi
 
 
   echo $ac_n "checking for missing declarations of reentrant functions""... $ac_c" 1>&6
-echo "configure:17242: checking for missing declarations of reentrant functions" >&5
+echo "configure:17290: checking for missing declarations of reentrant functions" >&5
   cat > conftest.$ac_ext <<EOF
-#line 17244 "configure"
+#line 17292 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 struct tm *(*func)() = localtime_r
 ; return 0; }
 EOF
-if { (eval echo configure:17251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     :
@@ -17265,14 +17313,14 @@ EOF
 fi
 rm -f conftest*
   cat > conftest.$ac_ext <<EOF
-#line 17269 "configure"
+#line 17317 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 struct tm *(*func)() = gmtime_r
 ; return 0; }
 EOF
-if { (eval echo configure:17276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     :
@@ -17290,14 +17338,14 @@ EOF
 fi
 rm -f conftest*
   cat > conftest.$ac_ext <<EOF
-#line 17294 "configure"
+#line 17342 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 char *(*func)() = asctime_r
 ; return 0; }
 EOF
-if { (eval echo configure:17301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     :
@@ -17315,14 +17363,14 @@ EOF
 fi
 rm -f conftest*
   cat > conftest.$ac_ext <<EOF
-#line 17319 "configure"
+#line 17367 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 char *(*func)() = ctime_r
 ; return 0; }
 EOF
-if { (eval echo configure:17326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     :
@@ -17340,14 +17388,14 @@ EOF
 fi
 rm -f conftest*
   cat > conftest.$ac_ext <<EOF
-#line 17344 "configure"
+#line 17392 "configure"
 #include "confdefs.h"
 #include <string.h>
 int main() {
 char *(*func)() = strtok_r
 ; return 0; }
 EOF
-if { (eval echo configure:17351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     :
@@ -17368,16 +17416,16 @@ rm -f conftest*
 
 
   echo $ac_n "checking for fclose declaration""... $ac_c" 1>&6
-echo "configure:17372: checking for fclose declaration" >&5
+echo "configure:17420: checking for fclose declaration" >&5
   cat > conftest.$ac_ext <<EOF
-#line 17374 "configure"
+#line 17422 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 int (*func)() = fclose
 ; return 0; }
 EOF
-if { (eval echo configure:17381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     cat >> confdefs.h <<\EOF
@@ -17403,12 +17451,12 @@ rm -f conftest*
 
 
 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
-echo "configure:17407: checking for tm_gmtoff in struct tm" >&5
+echo "configure:17455: checking for tm_gmtoff in struct tm" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm_gmtoff'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17412 "configure"
+#line 17460 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -17416,7 +17464,7 @@ int main() {
 struct tm tm; tm.tm_gmtoff;
 ; return 0; }
 EOF
-if { (eval echo configure:17420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_gmtoff=yes
 else
@@ -17439,12 +17487,12 @@ fi
 
 
 echo $ac_n "checking for struct flock""... $ac_c" 1>&6
-echo "configure:17443: checking for struct flock" >&5
+echo "configure:17491: checking for struct flock" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_flock'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17448 "configure"
+#line 17496 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -17454,7 +17502,7 @@ int main() {
 struct flock x;
 ; return 0; }
 EOF
-if { (eval echo configure:17458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
           ac_cv_struct_flock=yes
@@ -17481,12 +17529,12 @@ fi
 
 
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:17485: checking for socklen_t" >&5
+echo "configure:17533: checking for socklen_t" >&5
 if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17490 "configure"
+#line 17538 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -17498,7 +17546,7 @@ socklen_t x;
 
 ; return 0; }
 EOF
-if { (eval echo configure:17502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
   ac_cv_socklen_t=yes
@@ -17524,7 +17572,7 @@ fi
 
 
 echo $ac_n "checking size of size_t""... $ac_c" 1>&6
-echo "configure:17528: checking size of size_t" >&5
+echo "configure:17576: checking size of size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17532,7 +17580,7 @@ else
   ac_cv_sizeof_size_t=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 17536 "configure"
+#line 17584 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -17544,7 +17592,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:17548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_size_t=`cat conftestval`
 else
@@ -17564,7 +17612,7 @@ EOF
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:17568: checking size of long long" >&5
+echo "configure:17616: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17572,7 +17620,7 @@ else
   ac_cv_sizeof_long_long=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 17576 "configure"
+#line 17624 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -17584,7 +17632,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:17588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -17604,7 +17652,7 @@ EOF
 
 
 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
-echo "configure:17608: checking size of long long int" >&5
+echo "configure:17656: checking size of long long int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17612,7 +17660,7 @@ else
   ac_cv_sizeof_long_long_int=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 17616 "configure"
+#line 17664 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -17624,7 +17672,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:17628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long_int=`cat conftestval`
 else
@@ -17644,7 +17692,7 @@ EOF
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:17648: checking size of long" >&5
+echo "configure:17696: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17652,7 +17700,7 @@ else
   ac_cv_sizeof_long=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 17656 "configure"
+#line 17704 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -17664,7 +17712,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:17668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -17684,7 +17732,7 @@ EOF
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:17688: checking size of int" >&5
+echo "configure:17736: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17692,7 +17740,7 @@ else
   ac_cv_sizeof_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 17696 "configure"
+#line 17744 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -17704,7 +17752,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:17708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -17726,7 +17774,7 @@ EOF
 
 
   echo $ac_n "checking size of intmax_t""... $ac_c" 1>&6
-echo "configure:17730: checking size of intmax_t" >&5
+echo "configure:17778: checking size of intmax_t" >&5
   
   php_cache_value=php_cv_sizeof_intmax_t
   if eval "test \"`echo '$''{'php_cv_sizeof_intmax_t'+set}'`\" = set"; then
@@ -17743,7 +17791,7 @@ else
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 17747 "configure"
+#line 17795 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #if STDC_HEADERS
@@ -17767,7 +17815,7 @@ int main()
 }
   
 EOF
-if { (eval echo configure:17771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     eval $php_cache_value=`cat conftestval`
@@ -17806,7 +17854,7 @@ EOF
 
 
   echo $ac_n "checking size of ssize_t""... $ac_c" 1>&6
-echo "configure:17810: checking size of ssize_t" >&5
+echo "configure:17858: checking size of ssize_t" >&5
   
   php_cache_value=php_cv_sizeof_ssize_t
   if eval "test \"`echo '$''{'php_cv_sizeof_ssize_t'+set}'`\" = set"; then
@@ -17823,7 +17871,7 @@ else
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 17827 "configure"
+#line 17875 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #if STDC_HEADERS
@@ -17847,7 +17895,7 @@ int main()
 }
   
 EOF
-if { (eval echo configure:17851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     eval $php_cache_value=`cat conftestval`
@@ -17886,7 +17934,7 @@ EOF
 
 
   echo $ac_n "checking size of ptrdiff_t""... $ac_c" 1>&6
-echo "configure:17890: checking size of ptrdiff_t" >&5
+echo "configure:17938: checking size of ptrdiff_t" >&5
   
   php_cache_value=php_cv_sizeof_ptrdiff_t
   if eval "test \"`echo '$''{'php_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then
@@ -17903,7 +17951,7 @@ else
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 17907 "configure"
+#line 17955 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #if STDC_HEADERS
@@ -17927,7 +17975,7 @@ int main()
 }
   
 EOF
-if { (eval echo configure:17931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     eval $php_cache_value=`cat conftestval`
@@ -17966,12 +18014,12 @@ EOF
 
 
 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:17970: checking for st_blksize in struct stat" >&5
+echo "configure:18018: checking for st_blksize in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17975 "configure"
+#line 18023 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -17979,7 +18027,7 @@ int main() {
 struct stat s; s.st_blksize;
 ; return 0; }
 EOF
-if { (eval echo configure:17983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_blksize=yes
 else
@@ -18001,12 +18049,12 @@ fi
 
 if test "`uname -s 2>/dev/null`" != "QNX"; then
   echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:18005: checking for st_blocks in struct stat" >&5
+echo "configure:18053: checking for st_blocks in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18010 "configure"
+#line 18058 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -18014,7 +18062,7 @@ int main() {
 struct stat s; s.st_blocks;
 ; return 0; }
 EOF
-if { (eval echo configure:18018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_blocks=yes
 else
@@ -18041,12 +18089,12 @@ else
   WARNING_LEVEL=0
 fi
 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:18045: checking for st_rdev in struct stat" >&5
+echo "configure:18093: checking for st_rdev in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18050 "configure"
+#line 18098 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -18054,7 +18102,7 @@ int main() {
 struct stat s; s.st_rdev;
 ; return 0; }
 EOF
-if { (eval echo configure:18058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_rdev=yes
 else
@@ -18076,12 +18124,12 @@ fi
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:18080: checking for size_t" >&5
+echo "configure:18128: 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 18085 "configure"
+#line 18133 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -18109,12 +18157,12 @@ EOF
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:18113: checking for uid_t in sys/types.h" >&5
+echo "configure:18161: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18118 "configure"
+#line 18166 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -18145,12 +18193,12 @@ fi
 
 
     echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6
-echo "configure:18149: checking for struct sockaddr_storage" >&5
+echo "configure:18197: checking for struct sockaddr_storage" >&5
 if eval "test \"`echo '$''{'ac_cv_sockaddr_storage'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18154 "configure"
+#line 18202 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -18158,7 +18206,7 @@ int main() {
 struct sockaddr_storage s; s
 ; return 0; }
 EOF
-if { (eval echo configure:18162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sockaddr_storage=yes
 else
@@ -18179,13 +18227,13 @@ EOF
 
   fi
     echo $ac_n "checking for field sa_len in struct sockaddr""... $ac_c" 1>&6
-echo "configure:18183: checking for field sa_len in struct sockaddr" >&5
+echo "configure:18231: checking for field sa_len in struct sockaddr" >&5
 if eval "test \"`echo '$''{'ac_cv_sockaddr_sa_len'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 18189 "configure"
+#line 18237 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -18193,7 +18241,7 @@ int main() {
 static struct sockaddr sa; int n = (int) sa.sa_len; return n;
 ; return 0; }
 EOF
-if { (eval echo configure:18197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sockaddr_sa_len=yes
 else
@@ -18216,12 +18264,12 @@ EOF
 
 
 echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6
-echo "configure:18220: checking for IPv6 support" >&5
+echo "configure:18268: checking for IPv6 support" >&5
 if eval "test \"`echo '$''{'ac_cv_ipv6_support'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18225 "configure"
+#line 18273 "configure"
 #include "confdefs.h"
  #include <sys/types.h>
 #include <sys/socket.h>
@@ -18230,7 +18278,7 @@ int main() {
 struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:18234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ipv6_support=yes
 else
@@ -18246,12 +18294,12 @@ echo "$ac_t""$ac_cv_ipv6_support" 1>&6
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:18250: checking for vprintf" >&5
+echo "configure:18298: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18255 "configure"
+#line 18303 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -18274,7 +18322,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:18278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -18298,12 +18346,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:18302: checking for _doprnt" >&5
+echo "configure:18350: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18307 "configure"
+#line 18355 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -18326,7 +18374,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:18330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -18434,12 +18482,12 @@ asprintf \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18438: checking for $ac_func" >&5
+echo "configure:18486: 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 18443 "configure"
+#line 18491 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -18462,7 +18510,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:18466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18514: \"$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
@@ -18493,7 +18541,7 @@ done
   unset ac_cv_lib_rt___nanosleep
   unset found
   echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:18497: checking for nanosleep in -lrt" >&5
+echo "configure:18545: checking for nanosleep in -lrt" >&5
 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -18501,7 +18549,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 18505 "configure"
+#line 18553 "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
@@ -18512,7 +18560,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:18516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18564: \"$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
@@ -18532,7 +18580,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for __nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:18536: checking for __nanosleep in -lrt" >&5
+echo "configure:18584: checking for __nanosleep in -lrt" >&5
 ac_lib_var=`echo rt'_'__nanosleep | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -18540,7 +18588,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 18544 "configure"
+#line 18592 "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
@@ -18551,7 +18599,7 @@ int main() {
 __nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:18555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18603: \"$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
@@ -18583,11 +18631,11 @@ fi
   found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 18587 "configure"
+#line 18635 "configure"
 #include "confdefs.h"
 main() { return (0); }
 EOF
-if { (eval echo configure:18591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:18639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   found=yes
 else
@@ -18631,25 +18679,25 @@ EOF
 
 
 echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
-echo "configure:18635: checking for getaddrinfo" >&5
+echo "configure:18683: checking for getaddrinfo" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18640 "configure"
+#line 18688 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);
 ; return 0; }
 EOF
-if { (eval echo configure:18647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   if test "$cross_compiling" = yes; then
   ac_cv_func_getaddrinfo=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 18653 "configure"
+#line 18701 "configure"
 #include "confdefs.h"
 
 #include <netdb.h>
@@ -18689,7 +18737,7 @@ int main(void) {
 }
   
 EOF
-if { (eval echo configure:18693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:18741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_getaddrinfo=yes
 else
@@ -18721,12 +18769,12 @@ fi
 for ac_func in strlcat strlcpy getopt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18725: checking for $ac_func" >&5
+echo "configure:18773: 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 18730 "configure"
+#line 18778 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -18749,7 +18797,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:18753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18801: \"$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
@@ -18776,7 +18824,7 @@ done
 
 
 echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
-echo "configure:18780: checking whether utime accepts a null argument" >&5
+echo "configure:18828: checking whether utime accepts a null argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18786,7 +18834,7 @@ if test "$cross_compiling" = yes; then
   ac_cv_func_utime_null=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 18790 "configure"
+#line 18838 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -18797,7 +18845,7 @@ exit(!(stat ("conftestdata", &s) == 0 &&
 && t.st_mtime - s.st_mtime < 120));
 }
 EOF
-if { (eval echo configure:18801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:18849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_utime_null=yes
 else
@@ -18823,19 +18871,19 @@ fi
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:18827: checking for working alloca.h" >&5
+echo "configure:18875: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18832 "configure"
+#line 18880 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:18839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -18856,12 +18904,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:18860: checking for alloca" >&5
+echo "configure:18908: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18865 "configure"
+#line 18913 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -18889,7 +18937,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:18893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -18921,12 +18969,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:18925: checking whether alloca needs Cray hooks" >&5
+echo "configure:18973: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18930 "configure"
+#line 18978 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -18951,12 +18999,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18955: checking for $ac_func" >&5
+echo "configure:19003: 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 18960 "configure"
+#line 19008 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -18979,7 +19027,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:18983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19031: \"$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
@@ -19006,7 +19054,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:19010: checking stack direction for C alloca" >&5
+echo "configure:19058: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19014,7 +19062,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 19018 "configure"
+#line 19066 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -19033,7 +19081,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:19037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:19085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -19056,13 +19104,13 @@ fi
 
 
   echo $ac_n "checking for declared timezone""... $ac_c" 1>&6
-echo "configure:19060: checking for declared timezone" >&5
+echo "configure:19108: checking for declared timezone" >&5
 if eval "test \"`echo '$''{'ac_cv_declared_timezone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 19066 "configure"
+#line 19114 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -19077,7 +19125,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:19081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:19129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
   ac_cv_declared_timezone=yes
@@ -19103,7 +19151,7 @@ EOF
 
 
 echo $ac_n "checking for type of reentrant time-related functions""... $ac_c" 1>&6
-echo "configure:19107: checking for type of reentrant time-related functions" >&5
+echo "configure:19155: checking for type of reentrant time-related functions" >&5
 if eval "test \"`echo '$''{'ac_cv_time_r_type'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19114,7 +19162,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 19118 "configure"
+#line 19166 "configure"
 #include "confdefs.h"
 
 #include <time.h>
@@ -19132,7 +19180,7 @@ return (1);
 }
 
 EOF
-if { (eval echo configure:19136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:19184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   ac_cv_time_r_type=hpux
@@ -19148,7 +19196,7 @@ else
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 19152 "configure"
+#line 19200 "configure"
 #include "confdefs.h"
 
 #include <time.h>
@@ -19164,7 +19212,7 @@ main() {
 }
   
 EOF
-if { (eval echo configure:19168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:19216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     ac_cv_time_r_type=irix
@@ -19202,12 +19250,12 @@ EOF
 
 
     echo $ac_n "checking for readdir_r""... $ac_c" 1>&6
-echo "configure:19206: checking for readdir_r" >&5
+echo "configure:19254: checking for readdir_r" >&5
 if eval "test \"`echo '$''{'ac_cv_func_readdir_r'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19211 "configure"
+#line 19259 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char readdir_r(); below.  */
@@ -19230,7 +19278,7 @@ readdir_r();
 
 ; return 0; }
 EOF
-if { (eval echo configure:19234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_readdir_r=yes"
 else
@@ -19252,7 +19300,7 @@ fi
 
   if test "$ac_cv_func_readdir_r" = "yes"; then
   echo $ac_n "checking for type of readdir_r""... $ac_c" 1>&6
-echo "configure:19256: checking for type of readdir_r" >&5
+echo "configure:19304: checking for type of readdir_r" >&5
 if eval "test \"`echo '$''{'ac_cv_what_readdir_r'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19263,7 +19311,7 @@ else
    
 else
   cat > conftest.$ac_ext <<EOF
-#line 19267 "configure"
+#line 19315 "configure"
 #include "confdefs.h"
 
 #define _REENTRANT
@@ -19288,7 +19336,7 @@ main() {
 }
     
 EOF
-if { (eval echo configure:19292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:19340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
       ac_cv_what_readdir_r=POSIX
@@ -19299,7 +19347,7 @@ else
   rm -fr conftest*
   
       cat > conftest.$ac_ext <<EOF
-#line 19303 "configure"
+#line 19351 "configure"
 #include "confdefs.h"
 
 #define _REENTRANT
@@ -19309,7 +19357,7 @@ int readdir_r(DIR *, struct dirent *);
         
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19361: \"$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*
@@ -19351,12 +19399,12 @@ EOF
 
 
 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
-echo "configure:19355: checking for in_addr_t" >&5
+echo "configure:19403: checking for in_addr_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_in_addr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19360 "configure"
+#line 19408 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -19390,12 +19438,12 @@ fi
 for ac_func in crypt_r
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19394: checking for $ac_func" >&5
+echo "configure:19442: 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 19399 "configure"
+#line 19447 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -19418,7 +19466,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:19422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19470: \"$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
@@ -19446,14 +19494,14 @@ done
 if test "x$php_crypt_r" = "x1"; then
   
   echo $ac_n "checking which data struct is used by crypt_r""... $ac_c" 1>&6
-echo "configure:19450: checking which data struct is used by crypt_r" >&5
+echo "configure:19498: checking which data struct is used by crypt_r" >&5
 if eval "test \"`echo '$''{'php_cv_crypt_r_style'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     php_cv_crypt_r_style=none
     cat > conftest.$ac_ext <<EOF
-#line 19457 "configure"
+#line 19505 "configure"
 #include "confdefs.h"
 
 #define _REENTRANT 1
@@ -19466,7 +19514,7 @@ crypt_r("passwd", "hash", &buffer);
 
 ; return 0; }
 EOF
-if { (eval echo configure:19470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:19518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   php_cv_crypt_r_style=cryptd
 else
@@ -19477,7 +19525,7 @@ rm -f conftest*
 
     if test "$php_cv_crypt_r_style" = "none"; then
       cat > conftest.$ac_ext <<EOF
-#line 19481 "configure"
+#line 19529 "configure"
 #include "confdefs.h"
 
 #define _REENTRANT 1
@@ -19490,7 +19538,7 @@ crypt_r("passwd", "hash", &buffer);
 
 ; return 0; }
 EOF
-if { (eval echo configure:19494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:19542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   php_cv_crypt_r_style=struct_crypt_data
 else
@@ -19502,7 +19550,7 @@ rm -f conftest*
 
     if test "$php_cv_crypt_r_style" = "none"; then
       cat > conftest.$ac_ext <<EOF
-#line 19506 "configure"
+#line 19554 "configure"
 #include "confdefs.h"
 
 #define _REENTRANT 1
@@ -19516,7 +19564,7 @@ crypt_r("passwd", "hash", &buffer);
 
 ; return 0; }
 EOF
-if { (eval echo configure:19520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:19568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   php_cv_crypt_r_style=struct_crypt_data_gnu_source
 else
@@ -19575,7 +19623,7 @@ fi
 php_enable_gcov=no
 
 echo $ac_n "checking whether to include gcov symbols""... $ac_c" 1>&6
-echo "configure:19579: checking whether to include gcov symbols" >&5
+echo "configure:19627: checking whether to include gcov symbols" >&5
 # Check whether --enable-gcov or --disable-gcov was given.
 if test "${enable_gcov+set}" = set; then
   enableval="$enable_gcov"
@@ -19614,7 +19662,7 @@ if test "$PHP_GCOV" = "yes"; then
   # Extract the first word of "lcov", so it can be a program name with args.
 set dummy lcov; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:19618: checking for $ac_word" >&5
+echo "configure:19666: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LTP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19643,7 +19691,7 @@ fi
   # Extract the first word of "genhtml", so it can be a program name with args.
 set dummy genhtml; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:19647: checking for $ac_word" >&5
+echo "configure:19695: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LTP_GENHTML'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19678,7 +19726,7 @@ fi
 
   if test "$LTP"; then
     echo $ac_n "checking for ltp version""... $ac_c" 1>&6
-echo "configure:19682: checking for ltp version" >&5
+echo "configure:19730: checking for ltp version" >&5
 if eval "test \"`echo '$''{'php_cv_ltp_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19735,7 +19783,7 @@ fi
 php_enable_debug=no
 
 echo $ac_n "checking whether to include debugging symbols""... $ac_c" 1>&6
-echo "configure:19739: checking whether to include debugging symbols" >&5
+echo "configure:19787: checking whether to include debugging symbols" >&5
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
@@ -19783,7 +19831,7 @@ fi
 php_with_layout=PHP
 
 echo $ac_n "checking layout of installed files""... $ac_c" 1>&6
-echo "configure:19787: checking layout of installed files" >&5
+echo "configure:19835: checking layout of installed files" >&5
 # Check whether --with-layout or --without-layout was given.
 if test "${with_layout+set}" = set; then
   withval="$with_layout"
@@ -19815,7 +19863,7 @@ esac
 php_with_config_file_path=DEFAULT
 
 echo $ac_n "checking path to configuration file""... $ac_c" 1>&6
-echo "configure:19819: checking path to configuration file" >&5
+echo "configure:19867: checking path to configuration file" >&5
 # Check whether --with-config-file-path or --without-config-file-path was given.
 if test "${with_config_file_path+set}" = set; then
   withval="$with_config_file_path"
@@ -19846,7 +19894,7 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAU
 fi
 
 echo $ac_n "checking where to scan for configuration files""... $ac_c" 1>&6
-echo "configure:19850: checking where to scan for configuration files" >&5
+echo "configure:19898: checking where to scan for configuration files" >&5
 
 php_with_config_file_scan_dir=DEFAULT
 
@@ -19879,7 +19927,7 @@ test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLA
 php_enable_safe_mode=no
 
 echo $ac_n "checking whether to enable safe mode by default""... $ac_c" 1>&6
-echo "configure:19883: checking whether to enable safe mode by default" >&5
+echo "configure:19931: checking whether to enable safe mode by default" >&5
 # Check whether --enable-safe-mode or --disable-safe-mode was given.
 if test "${enable_safe_mode+set}" = set; then
   enableval="$enable_safe_mode"
@@ -19911,7 +19959,7 @@ EOF
 fi
 
 echo $ac_n "checking for safe mode exec dir""... $ac_c" 1>&6
-echo "configure:19915: checking for safe mode exec dir" >&5
+echo "configure:19963: checking for safe mode exec dir" >&5
 
 php_with_exec_dir=no
 
@@ -19952,7 +20000,7 @@ fi
 php_enable_sigchild=no
 
 echo $ac_n "checking whether to enable PHP's own SIGCHLD handler""... $ac_c" 1>&6
-echo "configure:19956: checking whether to enable PHP's own SIGCHLD handler" >&5
+echo "configure:20004: checking whether to enable PHP's own SIGCHLD handler" >&5
 # Check whether --enable-sigchild or --disable-sigchild was given.
 if test "${enable_sigchild+set}" = set; then
   enableval="$enable_sigchild"
@@ -19987,7 +20035,7 @@ fi
 php_enable_magic_quotes=no
 
 echo $ac_n "checking whether to enable magic quotes by default""... $ac_c" 1>&6
-echo "configure:19991: checking whether to enable magic quotes by default" >&5
+echo "configure:20039: checking whether to enable magic quotes by default" >&5
 # Check whether --enable-magic-quotes or --disable-magic-quotes was given.
 if test "${enable_magic_quotes+set}" = set; then
   enableval="$enable_magic_quotes"
@@ -20022,7 +20070,7 @@ fi
 php_enable_libgcc=no
 
 echo $ac_n "checking whether to explicitly link against libgcc""... $ac_c" 1>&6
-echo "configure:20026: checking whether to explicitly link against libgcc" >&5
+echo "configure:20074: checking whether to explicitly link against libgcc" >&5
 # Check whether --enable-libgcc or --disable-libgcc was given.
 if test "${enable_libgcc+set}" = set; then
   enableval="$enable_libgcc"
@@ -20099,7 +20147,7 @@ fi
 php_enable_short_tags=yes
 
 echo $ac_n "checking whether to enable short tags by default""... $ac_c" 1>&6
-echo "configure:20103: checking whether to enable short tags by default" >&5
+echo "configure:20151: checking whether to enable short tags by default" >&5
 # Check whether --enable-short-tags or --disable-short-tags was given.
 if test "${enable_short_tags+set}" = set; then
   enableval="$enable_short_tags"
@@ -20134,7 +20182,7 @@ fi
 php_enable_dmalloc=no
 
 echo $ac_n "checking whether to enable dmalloc""... $ac_c" 1>&6
-echo "configure:20138: checking whether to enable dmalloc" >&5
+echo "configure:20186: checking whether to enable dmalloc" >&5
 # Check whether --enable-dmalloc or --disable-dmalloc was given.
 if test "${enable_dmalloc+set}" = set; then
   enableval="$enable_dmalloc"
@@ -20155,7 +20203,7 @@ echo "$ac_t""$ext_output" 1>&6
 
 if test "$PHP_DMALLOC" = "yes"; then
   echo $ac_n "checking for dmalloc_error in -ldmalloc""... $ac_c" 1>&6
-echo "configure:20159: checking for dmalloc_error in -ldmalloc" >&5
+echo "configure:20207: checking for dmalloc_error in -ldmalloc" >&5
 ac_lib_var=`echo dmalloc'_'dmalloc_error | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20163,7 +20211,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldmalloc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20167 "configure"
+#line 20215 "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
@@ -20174,7 +20222,7 @@ int main() {
 dmalloc_error()
 ; return 0; }
 EOF
-if { (eval echo configure:20178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20226: \"$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
@@ -20219,7 +20267,7 @@ fi
 php_enable_ipv6=yes
 
 echo $ac_n "checking whether to enable IPv6 support""... $ac_c" 1>&6
-echo "configure:20223: checking whether to enable IPv6 support" >&5
+echo "configure:20271: checking whether to enable IPv6 support" >&5
 # Check whether --enable-ipv6 or --disable-ipv6 was given.
 if test "${enable_ipv6+set}" = set; then
   enableval="$enable_ipv6"
@@ -20246,7 +20294,7 @@ EOF
 fi
 
 echo $ac_n "checking how big to make fd sets""... $ac_c" 1>&6
-echo "configure:20250: checking how big to make fd sets" >&5
+echo "configure:20298: checking how big to make fd sets" >&5
 
 php_enable_fd_setsize=no
 
@@ -20314,7 +20362,7 @@ fi
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:20318: checking size of long" >&5
+echo "configure:20366: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -20322,7 +20370,7 @@ else
   ac_cv_sizeof_long=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 20326 "configure"
+#line 20374 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -20334,7 +20382,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:20338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:20386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -20354,7 +20402,7 @@ EOF
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:20358: checking size of int" >&5
+echo "configure:20406: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -20362,7 +20410,7 @@ else
   ac_cv_sizeof_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 20366 "configure"
+#line 20414 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -20374,7 +20422,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:20378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:20426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -20395,13 +20443,13 @@ EOF
 
 
 echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:20399: checking for int32_t" >&5
+echo "configure:20447: checking for int32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_int_type_int32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 20405 "configure"
+#line 20453 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_TYPES_H
@@ -20420,7 +20468,7 @@ if (sizeof (int32_t))
 
 ; return 0; }
 EOF
-if { (eval echo configure:20424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_int_type_int32_t=yes
 else
@@ -20443,13 +20491,13 @@ fi
 
 
 echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
-echo "configure:20447: checking for uint32_t" >&5
+echo "configure:20495: checking for uint32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_int_type_uint32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 20453 "configure"
+#line 20501 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_TYPES_H
@@ -20468,7 +20516,7 @@ if (sizeof (uint32_t))
 
 ; return 0; }
 EOF
-if { (eval echo configure:20472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_int_type_uint32_t=yes
 else
@@ -20500,17 +20548,17 @@ stdlib.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:20504: checking for $ac_hdr" >&5
+echo "configure:20552: checking for $ac_hdr" >&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 20509 "configure"
+#line 20557 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20562: \"$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*
@@ -20540,12 +20588,12 @@ done
 for ac_func in strtoll atoll strftime
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20544: checking for $ac_func" >&5
+echo "configure:20592: 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 20549 "configure"
+#line 20597 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -20568,7 +20616,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:20572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20620: \"$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
@@ -20594,6 +20642,44 @@ done
 
 
 
+php_with_system_tzdata=no
+
+echo $ac_n "checking for use of system timezone data""... $ac_c" 1>&6
+echo "configure:20649: checking for use of system timezone data" >&5
+# Check whether --with-system-tzdata or --without-system-tzdata was given.
+if test "${with_system_tzdata+set}" = set; then
+  withval="$with_system_tzdata"
+  PHP_SYSTEM_TZDATA=$withval
+else
+  
+  PHP_SYSTEM_TZDATA=no
+  
+
+fi
+
+
+ext_output=$PHP_SYSTEM_TZDATA
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_SYSTEM_TZDATA" != "no"; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_SYSTEM_TZDATA 1
+EOF
+
+
+   if test "$PHP_SYSTEM_TZDATA" != "yes"; then
+      cat >> confdefs.h <<EOF
+#define HAVE_SYSTEM_TZDATA_PREFIX "$PHP_SYSTEM_TZDATA"
+EOF
+
+   fi
+fi
+
+
+
 
 PHP_DATE_CFLAGS="-I@ext_builddir@/lib"
 timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c 
@@ -21030,7 +21116,7 @@ case $PHP_REGEX in
 esac
 
 echo $ac_n "checking which regex library to use""... $ac_c" 1>&6
-echo "configure:21034: checking which regex library to use" >&5
+echo "configure:21120: checking which regex library to use" >&5
 echo "$ac_t""$REGEX_TYPE" 1>&6
 
 if test "$REGEX_TYPE" = "php"; then
@@ -21407,13 +21493,13 @@ elif test "$REGEX_TYPE" = "system"; then
 EOF
 
     echo $ac_n "checking whether field re_magic exists in struct regex_t""... $ac_c" 1>&6
-echo "configure:21411: checking whether field re_magic exists in struct regex_t" >&5
+echo "configure:21497: checking whether field re_magic exists in struct regex_t" >&5
 if eval "test \"`echo '$''{'ac_cv_regex_t_re_magic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 21417 "configure"
+#line 21503 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <regex.h>
@@ -21421,7 +21507,7 @@ int main() {
 regex_t rt; rt.re_magic;
 ; return 0; }
 EOF
-if { (eval echo configure:21425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_regex_t_re_magic=yes
 else
@@ -21447,7 +21533,7 @@ fi
 php_enable_libxml=yes
 
 echo $ac_n "checking whether to enable LIBXML support""... $ac_c" 1>&6
-echo "configure:21451: checking whether to enable LIBXML support" >&5
+echo "configure:21537: checking whether to enable LIBXML support" >&5
 # Check whether --enable-libxml or --disable-libxml was given.
 if test "${enable_libxml+set}" = set; then
   enableval="$enable_libxml"
@@ -21492,7 +21578,7 @@ if test -z "$PHP_LIBXML_DIR"; then
 php_with_libxml_dir=no
 
 echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:21496: checking libxml2 install dir" >&5
+echo "configure:21582: checking libxml2 install dir" >&5
 # Check whether --with-libxml-dir or --without-libxml-dir was given.
 if test "${with_libxml_dir+set}" = set; then
   withval="$with_libxml_dir"
@@ -21518,7 +21604,7 @@ if test "$PHP_LIBXML" != "no"; then
 
   
 echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:21522: checking for xml2-config path" >&5
+echo "configure:21608: checking for xml2-config path" >&5
 if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -21676,7 +21762,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
 
             echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:21680: checking whether libxml build works" >&5
+echo "configure:21766: checking whether libxml build works" >&5
 if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -21692,7 +21778,7 @@ else
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 21696 "configure"
+#line 21782 "configure"
 #include "confdefs.h"
 
     
@@ -21703,7 +21789,7 @@ else
     }
   
 EOF
-if { (eval echo configure:21707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -22068,7 +22154,7 @@ fi
 php_with_openssl=no
 
 echo $ac_n "checking for OpenSSL support""... $ac_c" 1>&6
-echo "configure:22072: checking for OpenSSL support" >&5
+echo "configure:22158: checking for OpenSSL support" >&5
 # Check whether --with-openssl or --without-openssl was given.
 if test "${with_openssl+set}" = set; then
   withval="$with_openssl"
@@ -22112,7 +22198,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_kerberos=no
 
 echo $ac_n "checking for Kerberos support""... $ac_c" 1>&6
-echo "configure:22116: checking for Kerberos support" >&5
+echo "configure:22202: checking for Kerberos support" >&5
 # Check whether --with-kerberos or --without-kerberos was given.
 if test "${with_kerberos+set}" = set; then
   withval="$with_kerberos"
@@ -22438,7 +22524,7 @@ EOF
     # Extract the first word of "krb5-config", so it can be a program name with args.
 set dummy krb5-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:22442: checking for $ac_word" >&5
+echo "configure:22528: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -22798,7 +22884,7 @@ fi
   fi
 
   echo $ac_n "checking for DSA_get_default_method in -lssl""... $ac_c" 1>&6
-echo "configure:22802: checking for DSA_get_default_method in -lssl" >&5
+echo "configure:22888: checking for DSA_get_default_method in -lssl" >&5
 ac_lib_var=`echo ssl'_'DSA_get_default_method | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -22806,7 +22892,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 22810 "configure"
+#line 22896 "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
@@ -22817,7 +22903,7 @@ int main() {
 DSA_get_default_method()
 ; return 0; }
 EOF
-if { (eval echo configure:22821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22907: \"$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
@@ -22841,7 +22927,7 @@ else
 fi
 
   echo $ac_n "checking for X509_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:22845: checking for X509_free in -lcrypto" >&5
+echo "configure:22931: checking for X509_free in -lcrypto" >&5
 ac_lib_var=`echo crypto'_'X509_free | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -22849,7 +22935,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 22853 "configure"
+#line 22939 "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
@@ -22860,7 +22946,7 @@ int main() {
 X509_free()
 ; return 0; }
 EOF
-if { (eval echo configure:22864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22950: \"$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
@@ -22902,7 +22988,7 @@ fi
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:22906: checking for $ac_word" >&5
+echo "configure:22992: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -23107,9 +23193,9 @@ fi
     old_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=-I$OPENSSL_INCDIR
     echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
-echo "configure:23111: checking for OpenSSL version" >&5
+echo "configure:23197: checking for OpenSSL version" >&5
     cat > conftest.$ac_ext <<EOF
-#line 23113 "configure"
+#line 23199 "configure"
 #include "confdefs.h"
 
 #include <openssl/opensslv.h>
@@ -23264,7 +23350,7 @@ rm -f conftest*
   done
 
   echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:23268: checking for CRYPTO_free in -lcrypto" >&5
+echo "configure:23354: checking for CRYPTO_free in -lcrypto" >&5
 ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -23272,7 +23358,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 23276 "configure"
+#line 23362 "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
@@ -23283,7 +23369,7 @@ int main() {
 CRYPTO_free()
 ; return 0; }
 EOF
-if { (eval echo configure:23287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:23373: \"$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
@@ -23440,7 +23526,7 @@ fi
   done
 
   echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
-echo "configure:23444: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+echo "configure:23530: checking for SSL_CTX_set_ssl_version in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -23448,7 +23534,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 23452 "configure"
+#line 23538 "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
@@ -23459,7 +23545,7 @@ int main() {
 SSL_CTX_set_ssl_version()
 ; return 0; }
 EOF
-if { (eval echo configure:23463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:23549: \"$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
@@ -23624,7 +23710,7 @@ ext_output=$PHP_PCRE_REGEX
 
   if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
     echo $ac_n "checking for PCRE headers location""... $ac_c" 1>&6
-echo "configure:23628: checking for PCRE headers location" >&5
+echo "configure:23714: checking for PCRE headers location" >&5
     for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do
       test -f $i/pcre.h && PCRE_INCDIR=$i
     done
@@ -23635,7 +23721,7 @@ echo "configure:23628: checking for PCRE
     echo "$ac_t""$PCRE_INCDIR" 1>&6
 
     echo $ac_n "checking for PCRE library location""... $ac_c" 1>&6
-echo "configure:23639: checking for PCRE library location" >&5
+echo "configure:23725: checking for PCRE library location" >&5
     for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do
       test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
     done
@@ -24057,7 +24143,7 @@ EOF
 
   else
     echo $ac_n "checking for PCRE library to use""... $ac_c" 1>&6
-echo "configure:24061: checking for PCRE library to use" >&5
+echo "configure:24147: checking for PCRE library to use" >&5
     echo "$ac_t""bundled" 1>&6
     pcrelib_sources="pcrelib/pcre_chartables.c pcrelib/pcre_ucd.c \
     				 pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c \
@@ -24394,7 +24480,7 @@ EOF
 php_with_sqlite3=yes
 
 echo $ac_n "checking whether to enable the SQLite3 extension""... $ac_c" 1>&6
-echo "configure:24398: checking whether to enable the SQLite3 extension" >&5
+echo "configure:24484: checking whether to enable the SQLite3 extension" >&5
 # Check whether --with-sqlite3 or --without-sqlite3 was given.
 if test "${with_sqlite3+set}" = set; then
   withval="$with_sqlite3"
@@ -24449,7 +24535,7 @@ if test $PHP_SQLITE3 != "no"; then
 
   if test $PHP_SQLITE3 != "yes"; then
     echo $ac_n "checking for sqlite3 files in default path""... $ac_c" 1>&6
-echo "configure:24453: checking for sqlite3 files in default path" >&5
+echo "configure:24539: checking for sqlite3 files in default path" >&5
     for i in $PHP_SQLITE3 /usr/local /usr; do
       if test -r $i/include/sqlite3.h; then
         SQLITE3_DIR=$i
@@ -24464,7 +24550,7 @@ echo "configure:24453: checking for sqli
     fi
 
     echo $ac_n "checking for SQLite 3.3.9+""... $ac_c" 1>&6
-echo "configure:24468: checking for SQLite 3.3.9+" >&5
+echo "configure:24554: checking for SQLite 3.3.9+" >&5
     
   save_old_LDFLAGS=$LDFLAGS
   ac_stuff="
@@ -24563,7 +24649,7 @@ echo "configure:24468: checking for SQLi
   done
 
   echo $ac_n "checking for sqlite3_prepare_v2 in -lsqlite3""... $ac_c" 1>&6
-echo "configure:24567: checking for sqlite3_prepare_v2 in -lsqlite3" >&5
+echo "configure:24653: checking for sqlite3_prepare_v2 in -lsqlite3" >&5
 ac_lib_var=`echo sqlite3'_'sqlite3_prepare_v2 | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -24571,7 +24657,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsqlite3  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 24575 "configure"
+#line 24661 "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
@@ -24582,7 +24668,7 @@ int main() {
 sqlite3_prepare_v2()
 ; return 0; }
 EOF
-if { (eval echo configure:24586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24672: \"$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
@@ -24842,7 +24928,7 @@ fi
   done
 
   echo $ac_n "checking for sqlite3_key in -lsqlite3""... $ac_c" 1>&6
-echo "configure:24846: checking for sqlite3_key in -lsqlite3" >&5
+echo "configure:24932: checking for sqlite3_key in -lsqlite3" >&5
 ac_lib_var=`echo sqlite3'_'sqlite3_key | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -24850,7 +24936,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsqlite3  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 24854 "configure"
+#line 24940 "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
@@ -24861,7 +24947,7 @@ int main() {
 sqlite3_key()
 ; return 0; }
 EOF
-if { (eval echo configure:24865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24951: \"$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
@@ -24993,7 +25079,7 @@ fi
   done
 
   echo $ac_n "checking for sqlite3_load_extension in -lsqlite3""... $ac_c" 1>&6
-echo "configure:24997: checking for sqlite3_load_extension in -lsqlite3" >&5
+echo "configure:25083: checking for sqlite3_load_extension in -lsqlite3" >&5
 ac_lib_var=`echo sqlite3'_'sqlite3_load_extension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -25001,7 +25087,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsqlite3  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 25005 "configure"
+#line 25091 "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
@@ -25012,7 +25098,7 @@ int main() {
 sqlite3_load_extension()
 ; return 0; }
 EOF
-if { (eval echo configure:25016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:25102: \"$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
@@ -25049,7 +25135,7 @@ fi
 
   else
     echo $ac_n "checking bundled sqlite3 library""... $ac_c" 1>&6
-echo "configure:25053: checking bundled sqlite3 library" >&5
+echo "configure:25139: checking bundled sqlite3 library" >&5
     echo "$ac_t""yes" 1>&6
 
     sqlite3_extra_sources="libsqlite/sqlite3.c"
@@ -25405,7 +25491,7 @@ fi
 php_with_zlib=no
 
 echo $ac_n "checking for ZLIB support""... $ac_c" 1>&6
-echo "configure:25409: checking for ZLIB support" >&5
+echo "configure:25495: checking for ZLIB support" >&5
 # Check whether --with-zlib or --without-zlib was given.
 if test "${with_zlib+set}" = set; then
   withval="$with_zlib"
@@ -25449,7 +25535,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_zlib_dir=no
 
 echo $ac_n "checking if the location of ZLIB install directory is defined""... $ac_c" 1>&6
-echo "configure:25453: checking if the location of ZLIB install directory is defined" >&5
+echo "configure:25539: checking if the location of ZLIB install directory is defined" >&5
 # Check whether --with-zlib-dir or --without-zlib-dir was given.
 if test "${with_zlib_dir+set}" = set; then
   withval="$with_zlib_dir"
@@ -25892,7 +25978,7 @@ EOF
   done
 
   echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6
-echo "configure:25896: checking for gzgets in -lz" >&5
+echo "configure:25982: checking for gzgets in -lz" >&5
 ac_lib_var=`echo z'_'gzgets | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -25900,7 +25986,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 25904 "configure"
+#line 25990 "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
@@ -25911,7 +25997,7 @@ int main() {
 gzgets()
 ; return 0; }
 EOF
-if { (eval echo configure:25915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:26001: \"$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
@@ -26048,18 +26134,18 @@ fi
 
 
 
-php_enable_bcmath=no
+php_enable_apc=no
 
-echo $ac_n "checking whether to enable bc style precision math functions""... $ac_c" 1>&6
-echo "configure:26055: checking whether to enable bc style precision math functions" >&5
-# Check whether --enable-bcmath or --disable-bcmath was given.
-if test "${enable_bcmath+set}" = set; then
-  enableval="$enable_bcmath"
-  PHP_BCMATH=$enableval
+echo $ac_n "checking whether to enable APC support""... $ac_c" 1>&6
+echo "configure:26141: checking whether to enable APC support" >&5
+# Check whether --enable-apc or --disable-apc was given.
+if test "${enable_apc+set}" = set; then
+  enableval="$enable_apc"
+  PHP_APC=$enableval
 else
   
-  PHP_BCMATH=no
-  test "$PHP_ENABLE_ALL" && PHP_BCMATH=$PHP_ENABLE_ALL
+  PHP_APC=no
+  test "$PHP_ENABLE_ALL" && PHP_APC=$PHP_ENABLE_ALL
 
 fi
 
@@ -26067,12 +26153,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_BCMATH in
+case $PHP_APC in
 shared,*)
-  PHP_BCMATH=`echo "$PHP_BCMATH"|$SED 's/^shared,//'`
+  PHP_APC=`echo "$PHP_APC"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_BCMATH=yes
+  PHP_APC=yes
   ;;
 no)
   ext_output=no
@@ -26091,396 +26177,481 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test "$PHP_BCMATH" != "no"; then
+# Check whether --enable-apc-debug or --disable-apc-debug was given.
+if test "${enable_apc_debug+set}" = set; then
+  enableval="$enable_apc_debug"
   
-  ext_builddir=ext/bcmath
-  ext_srcdir=$abs_srcdir/ext/bcmath
-
-  ac_extra=`echo "-I@ext_srcdir@/libbcmath/src"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
+  PHP_APC_DEBUG=yes
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_BCMATH_SHARED=no
-    
+else
   
-  case ext/bcmath in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+  PHP_APC_DEBUG=no
+
+fi
+
+
+echo $ac_n "checking whether we should enable cache request file info""... $ac_c" 1>&6
+echo "configure:26195: checking whether we should enable cache request file info" >&5
+# Check whether --enable-apc-filehits or --disable-apc-filehits was given.
+if test "${enable_apc_filehits+set}" = set; then
+  enableval="$enable_apc_filehits"
   
+  PHP_APC_FILEHITS=$enableval
+	echo "$ac_t""$enableval" 1>&6
+
+else
   
+  PHP_APC_FILEHITS=no
+	echo "$ac_t""no" 1>&6
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+fi
 
 
-  old_IFS=$IFS
-  for ac_src in bcmath.c \
-libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
-libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
-libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
-libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
+echo $ac_n "checking whether we should use mmap""... $ac_c" 1>&6
+echo "configure:26212: checking whether we should use mmap" >&5
+# Check whether --enable-apc-mmap or --disable-apc-mmap was given.
+if test "${enable_apc_mmap+set}" = set; then
+  enableval="$enable_apc_mmap"
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+  PHP_APC_MMAP=$enableval
+  echo "$ac_t""$enableval" 1>&6
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+else
+  
+  PHP_APC_MMAP=yes
+  echo "$ac_t""yes" 1>&6
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+fi
 
 
-    EXT_STATIC="$EXT_STATIC bcmath"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC bcmath"
-    fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_BCMATH_SHARED=yes
-      
-  case ext/bcmath in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+echo $ac_n "checking whether we should use semaphore locking instead of fcntl""... $ac_c" 1>&6
+echo "configure:26229: checking whether we should use semaphore locking instead of fcntl" >&5
+# Check whether --enable-apc-sem or --disable-apc-sem was given.
+if test "${enable_apc_sem+set}" = set; then
+  enableval="$enable_apc_sem"
   
+  PHP_APC_SEM=$enableval
+  echo "$ac_t""$enableval" 1>&6
+
+else
   
+  PHP_APC_SEM=no
+  echo "$ac_t""no" 1>&6
 
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
+fi
 
 
-  old_IFS=$IFS
-  for ac_src in bcmath.c \
-libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
-libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
-libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
-libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
+echo $ac_n "checking whether we should use pthread mutex locking""... $ac_c" 1>&6
+echo "configure:26246: checking whether we should use pthread mutex locking" >&5
+# Check whether --enable-apc-pthreadmutex or --disable-apc-pthreadmutex was given.
+if test "${enable_apc_pthreadmutex+set}" = set; then
+  enableval="$enable_apc_pthreadmutex"
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_bcmath="$shared_objects_bcmath $ac_bdir$ac_obj.lo"
+  PHP_APC_PTHREADMUTEX=$enableval
+  echo "$ac_t""$enableval" 1>&6
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+else
+  
+  PHP_APC_PTHREADMUTEX=yes
+  echo "$ac_t""yes" 1>&6
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+fi
 
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpbcmath.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(PHPBCMATH_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpbcmath.so '$ext_builddir'/phpbcmath.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPBCMATH, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(PHPBCMATH_SHARED_LIBADD)'
-      ;;
+if test "$PHP_APC_PTHREADMUTEX" != "no"; then
+	orig_LIBS="$LIBS"
+	LIBS="$LIBS -lpthread"
+	if test "$cross_compiling" = yes; then
+  
+				
+  
+  case pthread in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lpthread $LIBS" 
+   ;;
   esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpbcmath.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpbcmath.$suffix"
-  fi
+
+			
+	
+else
+  cat > conftest.$ac_ext <<EOF
+#line 26281 "configure"
+#include "confdefs.h"
+
+				#include <sys/types.h>
+				#include <pthread.h>
+                                main() {
+				pthread_mutex_t mutex;
+				pthread_mutexattr_t attr;	
+
+				if(pthread_mutexattr_init(&attr)) { 
+					puts("Unable to initialize pthread attributes (pthread_mutexattr_init).");
+					return -1; 
+				}
+				if(pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)) { 
+					puts("Unable to set PTHREAD_PROCESS_SHARED (pthread_mutexattr_setpshared), your system may not support shared mutex's.");
+					return -1; 
+				}	
+				if(pthread_mutex_init(&mutex, &attr)) { 
+					puts("Unable to initialize the mutex (pthread_mutex_init).");
+					return -1; 
+				}
+				if(pthread_mutexattr_destroy(&attr)) { 
+					puts("Unable to destroy mutex attributes (pthread_mutexattr_destroy).");
+					return -1; 
+				}
+				if(pthread_mutex_destroy(&mutex)) { 
+					puts("Unable to destroy mutex (pthread_mutex_destroy).");
+					return -1; 
+				}
+
+				puts("pthread mutex's are supported!");
+				return 0;
+                                }
+			
+EOF
+if { (eval echo configure:26316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+   				
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bcmath"
+  case pthread in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lpthread $LIBS" 
+   ;;
+  esac
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpbcmath.$suffix: $ext_builddir/phpbcmath.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpbcmath.$suffix \$(phplibdir)
 
-$ext_builddir/phpbcmath.$suffix: \$(shared_objects_bcmath) \$(PHPBCMATH_SHARED_DEPENDENCIES)
-	$link_cmd
+			
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+   				echo "configure: warning: It doesn't appear that pthread mutex's are supported on your system" 1>&2
+  			PHP_APC_PTHREADMUTEX=no
+			
+fi
+rm -fr conftest*
+fi
 
-EOF
+	LIBS="$orig_LIBS"
+fi
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
+echo $ac_n "checking whether we should use spin locks""... $ac_c" 1>&6
+echo "configure:26344: checking whether we should use spin locks" >&5
+# Check whether --enable-apc-spinlocks or --disable-apc-spinlocks was given.
+if test "${enable_apc_spinlocks+set}" = set; then
+  enableval="$enable_apc_spinlocks"
+  
+  PHP_APC_SPINLOCKS=$enableval
+  echo "$ac_t""$enableval" 1>&6
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/bcmath.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(BCMATH_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/bcmath.so '$ext_builddir'/bcmath.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(BCMATH, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(BCMATH_SHARED_LIBADD)'
-      ;;
-  esac
+else
+  
+  PHP_APC_SPINLOCKS=no
+  echo "$ac_t""no" 1>&6
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/bcmath.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/bcmath.$suffix"
-  fi
+fi
+
+
+echo $ac_n "checking whether we should enable memory protection""... $ac_c" 1>&6
+echo "configure:26361: checking whether we should enable memory protection" >&5
+# Check whether --enable-apc-memprotect or --disable-apc-memprotect was given.
+if test "${enable_apc_memprotect+set}" = set; then
+  enableval="$enable_apc_memprotect"
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bcmath"
+  PHP_APC_MEMPROTECT=$enableval
+  echo "$ac_t""$enableval" 1>&6
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/bcmath.$suffix: $ext_builddir/bcmath.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/bcmath.$suffix \$(phplibdir)
+else
+  
+  PHP_APC_MEMPROTECT=no
+  echo "$ac_t""no" 1>&6
 
-$ext_builddir/bcmath.$suffix: \$(shared_objects_bcmath) \$(BCMATH_SHARED_DEPENDENCIES)
-	$link_cmd
+fi
 
+
+if test "$PHP_APC" != "no"; then
+  test "$PHP_APC_MMAP" != "no" && cat >> confdefs.h <<\EOF
+#define APC_MMAP 1
 EOF
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_BCMATH 1
+  test "$PHP_APC_FILEHITS" != "no" && cat >> confdefs.h <<\EOF
+#define APC_FILEHITS 1
 EOF
 
-    fi
-  fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_BCMATH_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
-  
-  case ext/bcmath in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
+	if test "$PHP_APC_DEBUG" != "no"; then
+		cat >> confdefs.h <<\EOF
+#define __DEBUG_APC__ 1
+EOF
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+	fi
 
+	if test "$PHP_APC_SEM" != "no"; then
+		cat >> confdefs.h <<\EOF
+#define APC_SEM_LOCKS 1
+EOF
 
-  old_IFS=$IFS
-  for ac_src in bcmath.c \
-libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
-libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
-libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
-libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+	elif test "$PHP_APC_SPINLOCKS" != "no"; then
+		cat >> confdefs.h <<\EOF
+#define APC_SPIN_LOCKS 1
+EOF
+ 
+	elif test "$PHP_APC_PTHREADMUTEX" != "no"; then 
+		cat >> confdefs.h <<\EOF
+#define APC_PTHREADMUTEX_LOCKS 1
+EOF
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+	else 
+		cat >> confdefs.h <<\EOF
+#define APC_FCNTL_LOCKS 1
+EOF
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+	fi
+  
+	if test "$PHP_APC_MEMPROTECT" != "no"; then
+		cat >> confdefs.h <<\EOF
+#define APC_MEMPROTECT 1
 EOF
-  done
 
+	fi
 
-        EXT_STATIC="$EXT_STATIC bcmath"
-        ;;
-      *)
-        
+  echo $ac_n "checking for zend_set_lookup_function_hook""... $ac_c" 1>&6
+echo "configure:26424: checking for zend_set_lookup_function_hook" >&5
+if eval "test \"`echo '$''{'php_cv_zend_set_lookup_function_hook'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
-  case ext/bcmath in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+    orig_cflags=$CFLAGS
+    CFLAGS="$INCLUDES $EXTRA_INCLUDES"
+    cat > conftest.$ac_ext <<EOF
+#line 26432 "configure"
+#include "confdefs.h"
+
+#include "main/php.h"
+#include "Zend/zend_API.h"
+    
+int main() {
+#ifndef zend_set_lookup_function_hook
+	(void) zend_set_lookup_function_hook;
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:26444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  
+      php_cv_zend_set_lookup_function_hook=yes
+    
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
   
+      php_cv_zend_set_lookup_function_hook=no
+    
+fi
+rm -f conftest*
+    CFLAGS=$orig_cflags
   
+fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+echo "$ac_t""$php_cv_zend_set_lookup_function_hook" 1>&6
+  if test "$php_cv_zend_set_lookup_function_hook" = "yes"; then
+    cat >> confdefs.h <<\EOF
+#define APC_HAVE_LOOKUP_HOOKS 1
+EOF
 
+  else
+    cat >> confdefs.h <<\EOF
+#define APC_HAVE_LOOKUP_HOOKS 0
+EOF
 
-  old_IFS=$IFS
-  for ac_src in bcmath.c \
-libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
-libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
-libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
-libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+  for ac_func in sigaction
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:26478: 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 26483 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 $ac_func();
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
 EOF
-  done
+if { (eval echo configure:26506: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC bcmath"
-  fi
+  echo $ac_n "checking for union semun""... $ac_c" 1>&6
+echo "configure:26531: checking for union semun" >&5
+if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    cat > conftest.$ac_ext <<EOF
+#line 26537 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+    
+int main() {
+union semun x; x.val=1
+; return 0; }
+EOF
+if { (eval echo configure:26548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   
+      php_cv_semun=yes
+    
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+      php_cv_semun=no
+    
+fi
+rm -f conftest*
   
+fi
 
+echo "$ac_t""$php_cv_semun" 1>&6
+  if test "$php_cv_semun" = "yes"; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_SEMUN 1
+EOF
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=bcmath
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+  else
+    cat >> confdefs.h <<\EOF
+#define HAVE_SEMUN 0
+EOF
 
   fi
 
+  echo $ac_n "checking whether we should enable valgrind support""... $ac_c" 1>&6
+echo "configure:26579: checking whether we should enable valgrind support" >&5
+  # Check whether --enable-valgrind-checks or --disable-valgrind-checks was given.
+if test "${enable_valgrind_checks+set}" = set; then
+  enableval="$enable_valgrind_checks"
   
+    PHP_APC_VALGRIND=$enableval
+    echo "$ac_t""$enableval" 1>&6
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir/libbcmath/src"
+else
   
-
+    PHP_APC_VALGRIND=yes
+    echo "$ac_t""yes" 1>&6
+    ac_safe=`echo "valgrind/memcheck.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for valgrind/memcheck.h""... $ac_c" 1>&6
+echo "configure:26593: checking for valgrind/memcheck.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 26598 "configure"
+#include "confdefs.h"
+#include <valgrind/memcheck.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:26603: \"$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
   cat >> confdefs.h <<\EOF
-#define HAVE_BCMATH 1
+#define HAVE_VALGRIND_MEMCHECK_H 1
 EOF
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
+  
+fi
 
 
-php_with_bz2=no
-
-echo $ac_n "checking for BZip2 support""... $ac_c" 1>&6
-echo "configure:26420: checking for BZip2 support" >&5
-# Check whether --with-bz2 or --without-bz2 was given.
-if test "${with_bz2+set}" = set; then
-  withval="$with_bz2"
-  PHP_BZ2=$withval
-else
-  
-  PHP_BZ2=no
-  test "$PHP_ENABLE_ALL" && PHP_BZ2=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_BZ2 in
-shared,*)
-  PHP_BZ2=`echo "$PHP_BZ2"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_BZ2=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_BZ2" != "no"; then
-  if test -r $PHP_BZ2/include/bzlib.h; then
-    BZIP_DIR=$PHP_BZ2
-  else
-    echo $ac_n "checking for BZip2 in default path""... $ac_c" 1>&6
-echo "configure:26465: checking for BZip2 in default path" >&5
-    for i in /usr/local /usr; do
-      if test -r $i/include/bzlib.h; then
-        BZIP_DIR=$i
-        echo "$ac_t""found in $i" 1>&6
-        break
-      fi
-    done
-  fi
-
-  if test -z "$BZIP_DIR"; then
-    echo "$ac_t""not found" 1>&6
-    { echo "configure: error: Please reinstall the BZip2 distribution" 1>&2; exit 1; }
-  fi
+  apc_sources="apc.c php_apc.c \
+               apc_cache.c \
+               apc_compile.c \
+               apc_debug.c \
+               apc_fcntl.c \
+               apc_main.c \
+               apc_mmap.c \
+               apc_sem.c \
+               apc_shm.c \
+               apc_pthreadmutex.c \
+               apc_spin.c \
+               pgsql_s_lock.c \
+               apc_sma.c \
+               apc_stack.c \
+               apc_zend.c \
+               apc_rfc1867.c \
+               apc_signal.c \
+               apc_pool.c \
+               apc_iterator.c \
+               apc_bin.c \
+               apc_string.c "
 
   
   save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    -L$BZIP_DIR/$PHP_LIBDIR
-  "
+  ac_stuff=""
   
   save_ext_shared=$ext_shared
   ext_shared=yes
@@ -26573,27 +26744,27 @@ echo "configure:26465: checking for BZip
     esac
   done
 
-  echo $ac_n "checking for BZ2_bzerror in -lbz2""... $ac_c" 1>&6
-echo "configure:26578: checking for BZ2_bzerror in -lbz2" >&5
-ac_lib_var=`echo bz2'_'BZ2_bzerror | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for shm_open in -lrt""... $ac_c" 1>&6
+echo "configure:26749: checking for shm_open in -lrt" >&5
+ac_lib_var=`echo rt'_'shm_open | 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="-lbz2  $LIBS"
+LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 26586 "configure"
+#line 26757 "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 BZ2_bzerror();
+char shm_open();
 
 int main() {
-BZ2_bzerror()
+shm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:26597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:26768: \"$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
@@ -26612,167 +26783,53 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
     LDFLAGS=$save_old_LDFLAGS
     ext_shared=$save_ext_shared
     
-    
-  if test "$BZIP_DIR/include" != "/usr/include"; then
-    
-  if test -z "$BZIP_DIR/include" || echo "$BZIP_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$BZIP_DIR/include
-  else
-    
-    ep_dir="`echo $BZIP_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$BZIP_DIR/include\"`"
-  fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
-
-  fi
-
-    
-
-  if test "$ext_shared" = "yes"; then
-    BZ2_SHARED_LIBADD="-lbz2 $BZ2_SHARED_LIBADD"
-    if test -n "$BZIP_DIR/$PHP_LIBDIR"; then
-      
-  if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$BZIP_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$BZIP_DIR/$PHP_LIBDIR\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        BZ2_SHARED_LIBADD="-L$ai_p $BZ2_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && BZ2_SHARED_LIBADD="$ld_runpath_switch$ai_p $BZ2_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
-
-
-      fi
-    
-  fi
-
-    fi
-  else
-    
-
-  if test -n "$BZIP_DIR/$PHP_LIBDIR"; then
-    
-  if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$BZIP_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$BZIP_DIR/$PHP_LIBDIR\"`"
-  fi
-
-    
+  case rt in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        APC_SHARED_LIBADD="-lrt $APC_SHARED_LIBADD" 
+    else
       
   
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
-
-
-    
-  fi
-
-  fi
-  
-  
-  case bz2 in
+  case rt in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lbz2 $LIBS" 
+      LIBS="-lrt $LIBS" 
    ;;
   esac
 
 
+    fi
+   ;;
+  esac
 
 
-  fi
-
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_BZ2 1
-EOF
-
-  
   
 else
   echo "$ac_t""no" 1>&6
 
     LDFLAGS=$save_old_LDFLAGS
     ext_shared=$save_ext_shared
-    unset ac_cv_lib_bz2_BZ2_bzerror
+    unset ac_cv_lib_rt_shm_open
     
-    { echo "configure: error: bz2 module requires libbz2 >= 1.0.0" 1>&2; exit 1; }
-  
   
 fi
 
-
   
-  ext_builddir=ext/bz2
-  ext_srcdir=$abs_srcdir/ext/bz2
+  ext_builddir=ext/apc
+  ext_srcdir=$abs_srcdir/ext/apc
 
-  ac_extra=
+  ac_extra=`echo "\\$(APC_CFLAGS)"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_BZ2_SHARED=no
+    PHP_APC_SHARED=no
     
   
-  case ext/bz2 in
+  case ext/apc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/apc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/apc/"; ac_bdir="ext/apc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -26787,7 +26844,7 @@ fi
 
 
   old_IFS=$IFS
-  for ac_src in bz2.c bz2_filter.c; do
+  for ac_src in $apc_sources; do
   
       IFS=.
       set $ac_src
@@ -26810,18 +26867,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC bz2"
+    EXT_STATIC="$EXT_STATIC apc"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC bz2"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC apc"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_BZ2_SHARED=yes
+      PHP_APC_SHARED=yes
       
-  case ext/bz2 in
+  case ext/apc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/apc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/apc/"; ac_bdir="ext/apc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -26836,14 +26893,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in bz2.c bz2_filter.c; do
+  for ac_src in $apc_sources; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_bz2="$shared_objects_bz2 $ac_bdir$ac_obj.lo"
+      shared_objects_apc="$shared_objects_apc $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -26866,31 +26923,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpbz2.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(PHPBZ2_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpbz2.so '$ext_builddir'/phpbz2.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpapc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_apc) $(PHPAPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpapc.so '$ext_builddir'/phpapc.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPBZ2, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_apc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPAPC, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(PHPBZ2_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_apc) $(PHPAPC_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpbz2.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpapc.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpbz2.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpapc.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bz2"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_apc"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpbz2.$suffix: $ext_builddir/phpbz2.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpbz2.$suffix \$(phplibdir)
+\$(phplibdir)/phpapc.$suffix: $ext_builddir/phpapc.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpapc.$suffix \$(phplibdir)
 
-$ext_builddir/phpbz2.$suffix: \$(shared_objects_bz2) \$(PHPBZ2_SHARED_DEPENDENCIES)
+$ext_builddir/phpapc.$suffix: \$(shared_objects_apc) \$(PHPAPC_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -26903,31 +26960,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/bz2.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(BZ2_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/bz2.so '$ext_builddir'/bz2.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/apc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_apc) $(APC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/apc.so '$ext_builddir'/apc.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(BZ2, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_apc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(APC, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(BZ2_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_apc) $(APC_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/bz2.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/apc.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/bz2.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/apc.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bz2"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_apc"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/bz2.$suffix: $ext_builddir/bz2.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/bz2.$suffix \$(phplibdir)
+\$(phplibdir)/apc.$suffix: $ext_builddir/apc.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/apc.$suffix \$(phplibdir)
 
-$ext_builddir/bz2.$suffix: \$(shared_objects_bz2) \$(BZ2_SHARED_DEPENDENCIES)
+$ext_builddir/apc.$suffix: \$(shared_objects_apc) \$(APC_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -26935,22 +26992,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_BZ2 1
+#define COMPILE_DL_APC 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_BZ2_SHARED=no
+    PHP_APC_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/bz2 in
+  case ext/apc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/apc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/apc/"; ac_bdir="ext/apc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -26965,7 +27022,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in bz2.c bz2_filter.c; do
+  for ac_src in $apc_sources; do
   
       IFS=.
       set $ac_src
@@ -26988,15 +27045,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC bz2"
+        EXT_STATIC="$EXT_STATIC apc"
         ;;
       *)
         
   
-  case ext/bz2 in
+  case ext/apc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/apc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/apc/"; ac_bdir="ext/apc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27011,7 +27068,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in bz2.c bz2_filter.c; do
+  for ac_src in $apc_sources; do
   
       IFS=.
       set $ac_src
@@ -27036,7 +27093,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC bz2"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC apc"
   fi
   
   
@@ -27045,31 +27102,39 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=bz2
+    PHP_PECL_EXTENSION=apc
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST BZ2_SHARED_LIBADD"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST APC_SHARED_LIBADD"
+
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST APC_CFLAGS"
+
+  cat >> confdefs.h <<\EOF
+#define HAVE_APC 1
+EOF
 
 fi
 
 
 
-php_enable_calendar=no
 
-echo $ac_n "checking whether to enable calendar conversion support""... $ac_c" 1>&6
-echo "configure:27065: checking whether to enable calendar conversion support" >&5
-# Check whether --enable-calendar or --disable-calendar was given.
-if test "${enable_calendar+set}" = set; then
-  enableval="$enable_calendar"
-  PHP_CALENDAR=$enableval
+php_enable_bcmath=no
+
+echo $ac_n "checking whether to enable bc style precision math functions""... $ac_c" 1>&6
+echo "configure:27130: checking whether to enable bc style precision math functions" >&5
+# Check whether --enable-bcmath or --disable-bcmath was given.
+if test "${enable_bcmath+set}" = set; then
+  enableval="$enable_bcmath"
+  PHP_BCMATH=$enableval
 else
   
-  PHP_CALENDAR=no
-  test "$PHP_ENABLE_ALL" && PHP_CALENDAR=$PHP_ENABLE_ALL
+  PHP_BCMATH=no
+  test "$PHP_ENABLE_ALL" && PHP_BCMATH=$PHP_ENABLE_ALL
 
 fi
 
@@ -27077,12 +27142,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_CALENDAR in
+case $PHP_BCMATH in
 shared,*)
-  PHP_CALENDAR=`echo "$PHP_CALENDAR"|$SED 's/^shared,//'`
+  PHP_BCMATH=`echo "$PHP_BCMATH"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_CALENDAR=yes
+  PHP_BCMATH=yes
   ;;
 no)
   ext_output=no
@@ -27101,25 +27166,21 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test "$PHP_CALENDAR" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_CALENDAR 1
-EOF
-
+if test "$PHP_BCMATH" != "no"; then
   
-  ext_builddir=ext/calendar
-  ext_srcdir=$abs_srcdir/ext/calendar
+  ext_builddir=ext/bcmath
+  ext_srcdir=$abs_srcdir/ext/bcmath
 
-  ac_extra=
+  ac_extra=`echo "-I@ext_srcdir@/libbcmath/src"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_CALENDAR_SHARED=no
+    PHP_BCMATH_SHARED=no
     
   
-  case ext/calendar in
+  case ext/bcmath in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27134,7 +27195,11 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
+  for ac_src in bcmath.c \
+libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
+libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
+libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
+libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
   
       IFS=.
       set $ac_src
@@ -27157,18 +27222,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC calendar"
+    EXT_STATIC="$EXT_STATIC bcmath"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC calendar"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC bcmath"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_CALENDAR_SHARED=yes
+      PHP_BCMATH_SHARED=yes
       
-  case ext/calendar in
+  case ext/bcmath in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27183,14 +27248,18 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
+  for ac_src in bcmath.c \
+libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
+libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
+libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
+libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_calendar="$shared_objects_calendar $ac_bdir$ac_obj.lo"
+      shared_objects_bcmath="$shared_objects_bcmath $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -27213,31 +27282,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpcalendar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(PHPCALENDAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpcalendar.so '$ext_builddir'/phpcalendar.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpbcmath.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(PHPBCMATH_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpbcmath.so '$ext_builddir'/phpbcmath.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPCALENDAR, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPBCMATH, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(PHPCALENDAR_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(PHPBCMATH_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpcalendar.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpbcmath.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpcalendar.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpbcmath.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_calendar"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bcmath"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpcalendar.$suffix: $ext_builddir/phpcalendar.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpcalendar.$suffix \$(phplibdir)
+\$(phplibdir)/phpbcmath.$suffix: $ext_builddir/phpbcmath.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpbcmath.$suffix \$(phplibdir)
 
-$ext_builddir/phpcalendar.$suffix: \$(shared_objects_calendar) \$(PHPCALENDAR_SHARED_DEPENDENCIES)
+$ext_builddir/phpbcmath.$suffix: \$(shared_objects_bcmath) \$(PHPBCMATH_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -27250,31 +27319,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/calendar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(CALENDAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/calendar.so '$ext_builddir'/calendar.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/bcmath.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(BCMATH_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/bcmath.so '$ext_builddir'/bcmath.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(CALENDAR, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(BCMATH, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(CALENDAR_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bcmath) $(BCMATH_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/calendar.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/bcmath.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/calendar.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/bcmath.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_calendar"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bcmath"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/calendar.$suffix: $ext_builddir/calendar.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/calendar.$suffix \$(phplibdir)
+\$(phplibdir)/bcmath.$suffix: $ext_builddir/bcmath.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/bcmath.$suffix \$(phplibdir)
 
-$ext_builddir/calendar.$suffix: \$(shared_objects_calendar) \$(CALENDAR_SHARED_DEPENDENCIES)
+$ext_builddir/bcmath.$suffix: \$(shared_objects_bcmath) \$(BCMATH_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -27282,22 +27351,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_CALENDAR 1
+#define COMPILE_DL_BCMATH 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_CALENDAR_SHARED=no
+    PHP_BCMATH_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/calendar in
+  case ext/bcmath in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27312,7 +27381,11 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
+  for ac_src in bcmath.c \
+libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
+libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
+libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
+libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
   
       IFS=.
       set $ac_src
@@ -27335,15 +27408,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC calendar"
+        EXT_STATIC="$EXT_STATIC bcmath"
         ;;
       *)
         
   
-  case ext/calendar in
+  case ext/bcmath in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27358,7 +27431,11 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
+  for ac_src in bcmath.c \
+libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
+libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
+libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
+libbcmath/src/rmzero.c libbcmath/src/str2num.c; do
   
       IFS=.
       set $ac_src
@@ -27383,7 +27460,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC calendar"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC bcmath"
   fi
   
   
@@ -27392,28 +27469,37 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=calendar
+    PHP_PECL_EXTENSION=bcmath
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir/libbcmath/src"
+  
+
+  cat >> confdefs.h <<\EOF
+#define HAVE_BCMATH 1
+EOF
+
 fi
 
 
 
-php_enable_ctype=yes
+php_with_bz2=no
 
-echo $ac_n "checking whether to enable ctype functions""... $ac_c" 1>&6
-echo "configure:27409: checking whether to enable ctype functions" >&5
-# Check whether --enable-ctype or --disable-ctype was given.
-if test "${enable_ctype+set}" = set; then
-  enableval="$enable_ctype"
-  PHP_CTYPE=$enableval
+echo $ac_n "checking for BZip2 support""... $ac_c" 1>&6
+echo "configure:27495: checking for BZip2 support" >&5
+# Check whether --with-bz2 or --without-bz2 was given.
+if test "${with_bz2+set}" = set; then
+  withval="$with_bz2"
+  PHP_BZ2=$withval
 else
   
-  PHP_CTYPE=yes
-  test "$PHP_ENABLE_ALL" && PHP_CTYPE=$PHP_ENABLE_ALL
+  PHP_BZ2=no
+  test "$PHP_ENABLE_ALL" && PHP_BZ2=$PHP_ENABLE_ALL
 
 fi
 
@@ -27421,12 +27507,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_CTYPE in
+case $PHP_BZ2 in
 shared,*)
-  PHP_CTYPE=`echo "$PHP_CTYPE"|$SED 's/^shared,//'`
+  PHP_BZ2=`echo "$PHP_BZ2"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_CTYPE=yes
+  PHP_BZ2=yes
   ;;
 no)
   ext_output=no
@@ -27445,48 +27531,346 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test "$PHP_CTYPE" != "no"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_CTYPE 1
-EOF
-
-  
-  ext_builddir=ext/ctype
-  ext_srcdir=$abs_srcdir/ext/ctype
+if test "$PHP_BZ2" != "no"; then
+  if test -r $PHP_BZ2/include/bzlib.h; then
+    BZIP_DIR=$PHP_BZ2
+  else
+    echo $ac_n "checking for BZip2 in default path""... $ac_c" 1>&6
+echo "configure:27540: checking for BZip2 in default path" >&5
+    for i in /usr/local /usr; do
+      if test -r $i/include/bzlib.h; then
+        BZIP_DIR=$i
+        echo "$ac_t""found in $i" 1>&6
+        break
+      fi
+    done
+  fi
 
-  ac_extra=
+  if test -z "$BZIP_DIR"; then
+    echo "$ac_t""not found" 1>&6
+    { echo "configure: error: Please reinstall the BZip2 distribution" 1>&2; exit 1; }
+  fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_CTYPE_SHARED=no
-    
   
-  case ext/ctype in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    -L$BZIP_DIR/$PHP_LIBDIR
+  "
   
+  save_ext_shared=$ext_shared
+  ext_shared=yes
   
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in ctype.c; do
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
       
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for BZ2_bzerror in -lbz2""... $ac_c" 1>&6
+echo "configure:27653: checking for BZ2_bzerror in -lbz2" >&5
+ac_lib_var=`echo bz2'_'BZ2_bzerror | 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="-lbz2  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 27661 "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 BZ2_bzerror();
+
+int main() {
+BZ2_bzerror()
+; return 0; }
+EOF
+if { (eval echo configure:27672: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+    
+  if test "$BZIP_DIR/include" != "/usr/include"; then
+    
+  if test -z "$BZIP_DIR/include" || echo "$BZIP_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$BZIP_DIR/include
+  else
+    
+    ep_dir="`echo $BZIP_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$BZIP_DIR/include\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    
+
+  if test "$ext_shared" = "yes"; then
+    BZ2_SHARED_LIBADD="-lbz2 $BZ2_SHARED_LIBADD"
+    if test -n "$BZIP_DIR/$PHP_LIBDIR"; then
+      
+  if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$BZIP_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$BZIP_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        BZ2_SHARED_LIBADD="-L$ai_p $BZ2_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && BZ2_SHARED_LIBADD="$ld_runpath_switch$ai_p $BZ2_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$BZIP_DIR/$PHP_LIBDIR"; then
+    
+  if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$BZIP_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$BZIP_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+    
+  fi
+
+  fi
+  
+  
+  case bz2 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lbz2 $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_BZ2 1
+EOF
+
+  
+  
+else
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_bz2_BZ2_bzerror
+    
+    { echo "configure: error: bz2 module requires libbz2 >= 1.0.0" 1>&2; exit 1; }
+  
+  
+fi
+
+
+  
+  ext_builddir=ext/bz2
+  ext_srcdir=$abs_srcdir/ext/bz2
+
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_BZ2_SHARED=no
+    
+  
+  case ext/bz2 in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in bz2.c bz2_filter.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
         *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -27501,18 +27885,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC ctype"
+    EXT_STATIC="$EXT_STATIC bz2"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC ctype"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC bz2"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_CTYPE_SHARED=yes
+      PHP_BZ2_SHARED=yes
       
-  case ext/ctype in
+  case ext/bz2 in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27527,14 +27911,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in ctype.c; do
+  for ac_src in bz2.c bz2_filter.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_ctype="$shared_objects_ctype $ac_bdir$ac_obj.lo"
+      shared_objects_bz2="$shared_objects_bz2 $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -27557,31 +27941,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpctype.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(PHPCTYPE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpctype.so '$ext_builddir'/phpctype.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpbz2.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(PHPBZ2_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpbz2.so '$ext_builddir'/phpbz2.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPCTYPE, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPBZ2, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(PHPCTYPE_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(PHPBZ2_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpctype.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpbz2.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpctype.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpbz2.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ctype"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bz2"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpctype.$suffix: $ext_builddir/phpctype.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpctype.$suffix \$(phplibdir)
+\$(phplibdir)/phpbz2.$suffix: $ext_builddir/phpbz2.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpbz2.$suffix \$(phplibdir)
 
-$ext_builddir/phpctype.$suffix: \$(shared_objects_ctype) \$(PHPCTYPE_SHARED_DEPENDENCIES)
+$ext_builddir/phpbz2.$suffix: \$(shared_objects_bz2) \$(PHPBZ2_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -27594,31 +27978,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/ctype.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(CTYPE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/ctype.so '$ext_builddir'/ctype.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/bz2.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(BZ2_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/bz2.so '$ext_builddir'/bz2.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(CTYPE, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(BZ2, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(CTYPE_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_bz2) $(BZ2_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/ctype.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/bz2.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/ctype.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/bz2.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ctype"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bz2"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/ctype.$suffix: $ext_builddir/ctype.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/ctype.$suffix \$(phplibdir)
+\$(phplibdir)/bz2.$suffix: $ext_builddir/bz2.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/bz2.$suffix \$(phplibdir)
 
-$ext_builddir/ctype.$suffix: \$(shared_objects_ctype) \$(CTYPE_SHARED_DEPENDENCIES)
+$ext_builddir/bz2.$suffix: \$(shared_objects_bz2) \$(BZ2_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -27626,22 +28010,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_CTYPE 1
+#define COMPILE_DL_BZ2 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_CTYPE_SHARED=no
+    PHP_BZ2_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/ctype in
+  case ext/bz2 in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27656,7 +28040,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in ctype.c; do
+  for ac_src in bz2.c bz2_filter.c; do
   
       IFS=.
       set $ac_src
@@ -27679,15 +28063,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC ctype"
+        EXT_STATIC="$EXT_STATIC bz2"
         ;;
       *)
         
   
-  case ext/ctype in
+  case ext/bz2 in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -27702,7 +28086,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in ctype.c; do
+  for ac_src in bz2.c bz2_filter.c; do
   
       IFS=.
       set $ac_src
@@ -27727,7 +28111,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC ctype"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC bz2"
   fi
   
   
@@ -27736,28 +28120,31 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=ctype
+    PHP_PECL_EXTENSION=bz2
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST BZ2_SHARED_LIBADD"
+
 fi
 
 
 
-php_with_curl=no
+php_enable_calendar=no
 
-echo $ac_n "checking for cURL support""... $ac_c" 1>&6
-echo "configure:27753: checking for cURL support" >&5
-# Check whether --with-curl or --without-curl was given.
-if test "${with_curl+set}" = set; then
-  withval="$with_curl"
-  PHP_CURL=$withval
+echo $ac_n "checking whether to enable calendar conversion support""... $ac_c" 1>&6
+echo "configure:28140: checking whether to enable calendar conversion support" >&5
+# Check whether --enable-calendar or --disable-calendar was given.
+if test "${enable_calendar+set}" = set; then
+  enableval="$enable_calendar"
+  PHP_CALENDAR=$enableval
 else
   
-  PHP_CURL=no
-  test "$PHP_ENABLE_ALL" && PHP_CURL=$PHP_ENABLE_ALL
+  PHP_CALENDAR=no
+  test "$PHP_ENABLE_ALL" && PHP_CALENDAR=$PHP_ENABLE_ALL
 
 fi
 
@@ -27765,12 +28152,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_CURL in
+case $PHP_CALENDAR in
 shared,*)
-  PHP_CURL=`echo "$PHP_CURL"|$SED 's/^shared,//'`
+  PHP_CALENDAR=`echo "$PHP_CALENDAR"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_CURL=yes
+  PHP_CALENDAR=yes
   ;;
 no)
   ext_output=no
@@ -27789,572 +28176,796 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
+if test "$PHP_CALENDAR" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_CALENDAR 1
+EOF
+
+  
+  ext_builddir=ext/calendar
+  ext_srcdir=$abs_srcdir/ext/calendar
 
-php_with_curlwrappers=no
+  ac_extra=
 
-echo $ac_n "checking if we should use cURL for url streams""... $ac_c" 1>&6
-echo "configure:27797: checking if we should use cURL for url streams" >&5
-# Check whether --with-curlwrappers or --without-curlwrappers was given.
-if test "${with_curlwrappers+set}" = set; then
-  withval="$with_curlwrappers"
-  PHP_CURLWRAPPERS=$withval
-else
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_CALENDAR_SHARED=no
+    
+  
+  case ext/calendar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  PHP_CURLWRAPPERS=no
   
 
-fi
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
-ext_output=$PHP_CURLWRAPPERS
-echo "$ac_t""$ext_output" 1>&6
+  old_IFS=$IFS
+  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
 
-if test "$PHP_CURL" != "no"; then
-  if test -r $PHP_CURL/include/curl/easy.h; then
-    CURL_DIR=$PHP_CURL
+    EXT_STATIC="$EXT_STATIC calendar"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC calendar"
+    fi
   else
-    echo $ac_n "checking for cURL in default path""... $ac_c" 1>&6
-echo "configure:27821: checking for cURL in default path" >&5
-    for i in /usr/local /usr; do
-      if test -r $i/include/curl/easy.h; then
-        CURL_DIR=$i
-        echo "$ac_t""found in $i" 1>&6
-        break
-      fi
-    done
-  fi
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_CALENDAR_SHARED=yes
+      
+  case ext/calendar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-  if test -z "$CURL_DIR"; then
-    echo "$ac_t""not found" 1>&6
-    { echo "configure: error: Please reinstall the libcurl distribution -
-    easy.h should be in <curl-dir>/include/curl/" 1>&2; exit 1; }
-  fi
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
 
-  CURL_CONFIG="curl-config"
-  echo $ac_n "checking for cURL 7.10.5 or greater""... $ac_c" 1>&6
-echo "configure:27839: checking for cURL 7.10.5 or greater" >&5
 
-  if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then
-    CURL_CONFIG=${CURL_DIR}/bin/curl-config
-  else
-    if ${CURL_DIR}/curl-config --libs > /dev/null 2>&1; then
-      CURL_CONFIG=${CURL_DIR}/curl-config
-    fi
-  fi
+  old_IFS=$IFS
+  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_calendar="$shared_objects_calendar $ac_bdir$ac_obj.lo"
 
-  curl_version_full=`$CURL_CONFIG --version`
-  curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-  if test "$curl_version" -ge 7010005; then
-    echo "$ac_t""$curl_version_full" 1>&6
-    CURL_LIBS=`$CURL_CONFIG --libs`
-  else
-    { echo "configure: error: cURL version 7.10.5 or later is required to compile php with cURL support" 1>&2; exit 1; }
-  fi
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-  
-  if test "$CURL_DIR/include" != "/usr/include"; then
-    
-  if test -z "$CURL_DIR/include" || echo "$CURL_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$CURL_DIR/include
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpcalendar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(PHPCALENDAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpcalendar.so '$ext_builddir'/phpcalendar.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPCALENDAR, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(PHPCALENDAR_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpcalendar.$suffix"
   else
-    
-    ep_dir="`echo $CURL_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$CURL_DIR/include\"`"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpcalendar.$suffix"
   fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_calendar"
 
-  fi
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpcalendar.$suffix: $ext_builddir/phpcalendar.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpcalendar.$suffix \$(phplibdir)
 
-  
-  for ac_i in $CURL_LIBS; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
+$ext_builddir/phpcalendar.$suffix: \$(shared_objects_calendar) \$(PHPCALENDAR_SHARED_DEPENDENCIES)
+	$link_cmd
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+EOF
 
+          ;;
+        *)
+          
+  install_modules="install-modules"
 
-    fi
-   ;;
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/calendar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(CALENDAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/calendar.so '$ext_builddir'/calendar.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(CALENDAR, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_calendar) $(CALENDAR_SHARED_LIBADD)'
+      ;;
   esac
 
-
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/calendar.$suffix"
   else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/calendar.$suffix"
   fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_calendar"
 
-    
-      if test "$ext_shared" = "yes"; then
-        CURL_SHARED_LIBADD="-L$ai_p $CURL_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && CURL_SHARED_LIBADD="$ld_runpath_switch$ai_p $CURL_SHARED_LIBADD"
-      else
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/calendar.$suffix: $ext_builddir/calendar.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/calendar.$suffix \$(phplibdir)
+
+$ext_builddir/calendar.$suffix: \$(shared_objects_calendar) \$(CALENDAR_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_CALENDAR 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_CALENDAR_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
         
   
+  case ext/calendar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
 
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-      fi
-    
-  fi
-
-    ;;
-    esac
-  done
 
+  old_IFS=$IFS
+  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
   
-
-  if test "$ext_shared" = "yes"; then
-    CURL_SHARED_LIBADD="-lcurl $CURL_SHARED_LIBADD"
-    if test -n "$CURL_DIR/$PHP_LIBDIR"; then
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$CURL_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`"
-  fi
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-    
-      if test "$ext_shared" = "yes"; then
-        CURL_SHARED_LIBADD="-L$ai_p $CURL_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && CURL_SHARED_LIBADD="$ld_runpath_switch$ai_p $CURL_SHARED_LIBADD"
-      else
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC calendar"
+        ;;
+      *)
         
   
+  case ext/calendar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do
   
-  fi
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-      fi
-    
-  fi
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
-    fi
-  else
-    
 
-  if test -n "$CURL_DIR/$PHP_LIBDIR"; then
-    
-  if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$CURL_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`"
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC calendar"
   fi
-
-    
-      
-  
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
   
-  fi
 
 
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=calendar
     
-  fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
-  
-  
-  case curl in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lcurl $LIBS" 
-   ;;
-  esac
-
 
+fi
 
 
-  fi
 
+php_enable_ctype=yes
 
+echo $ac_n "checking whether to enable ctype functions""... $ac_c" 1>&6
+echo "configure:28484: checking whether to enable ctype functions" >&5
+# Check whether --enable-ctype or --disable-ctype was given.
+if test "${enable_ctype+set}" = set; then
+  enableval="$enable_ctype"
+  PHP_CTYPE=$enableval
+else
   
-  echo $ac_n "checking for SSL support in libcurl""... $ac_c" 1>&6
-echo "configure:28077: checking for SSL support in libcurl" >&5
-  CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
-  if test "$CURL_SSL" = "SSL"; then
-    echo "$ac_t""yes" 1>&6
-    cat >> confdefs.h <<\EOF
-#define HAVE_CURL_SSL 1
-EOF
+  PHP_CTYPE=yes
+  test "$PHP_ENABLE_ALL" && PHP_CTYPE=$PHP_ENABLE_ALL
 
-   
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="`$CURL_CONFIG --cflags`"
-   
-    echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:28090: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 28105 "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:28111: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 28122 "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:28128: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 28139 "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:28145: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
 fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
 
-    echo $ac_n "checking for openssl support in libcurl""... $ac_c" 1>&6
-echo "configure:28170: checking for openssl support in libcurl" >&5
-    if test "$cross_compiling" = yes; then
-  
-      echo "$ac_t""no" 1>&6
-    
-else
-  cat > conftest.$ac_ext <<EOF
-#line 28177 "configure"
-#include "confdefs.h"
 
-#include <curl/curl.h>
 
-int main(int argc, char *argv[])
-{
-  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_CTYPE in
+shared,*)
+  PHP_CTYPE=`echo "$PHP_CTYPE"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_CTYPE=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
-  if (data && data->ssl_version && *data->ssl_version) {
-    const char *ptr = data->ssl_version;
 
-    while(*ptr == ' ') ++ptr;
-    return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
-  }
-  return 1;
-}
-    
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_CTYPE" != "no"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_CTYPE 1
 EOF
-if { (eval echo configure:28196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+
   
-      echo "$ac_t""yes" 1>&6
-      for ac_hdr in openssl/crypto.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:28204: checking for $ac_hdr" >&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 28209 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:28214: \"$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
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-        cat >> confdefs.h <<\EOF
-#define HAVE_CURL_OPENSSL 1
-EOF
+  ext_builddir=ext/ctype
+  ext_srcdir=$abs_srcdir/ext/ctype
 
-      
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
+  ac_extra=
 
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_CTYPE_SHARED=no
     
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
   
-      echo "$ac_t""no" 1>&6
-    
-fi
-rm -fr conftest*
-fi
+  case ext/ctype in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-   
-    echo $ac_n "checking for gnutls support in libcurl""... $ac_c" 1>&6
-echo "configure:28259: checking for gnutls support in libcurl" >&5
-    if test "$cross_compiling" = yes; then
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in ctype.c; do
   
-      echo "$ac_t""no" 1>&6
-    
-else
-  cat > conftest.$ac_ext <<EOF
-#line 28266 "configure"
-#include "confdefs.h"
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-#include <curl/curl.h>
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main(int argc, char *argv[])
-{
-  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC ctype"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC ctype"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_CTYPE_SHARED=yes
+      
+  case ext/ctype in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-  if (data && data->ssl_version && *data->ssl_version) {
-    const char *ptr = data->ssl_version;
 
-    while(*ptr == ' ') ++ptr;
-    return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
-  }
-  return 1;
-}
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in ctype.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_ctype="$shared_objects_ctype $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:28285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpctype.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(PHPCTYPE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpctype.so '$ext_builddir'/phpctype.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPCTYPE, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(PHPCTYPE_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpctype.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpctype.$suffix"
+  fi
   
-      echo "$ac_t""yes" 1>&6
-      ac_safe=`echo "gcrypt.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for gcrypt.h""... $ac_c" 1>&6
-echo "configure:28291: checking for gcrypt.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 28296 "configure"
-#include "confdefs.h"
-#include <gcrypt.h>
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ctype"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpctype.$suffix: $ext_builddir/phpctype.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpctype.$suffix \$(phplibdir)
+
+$ext_builddir/phpctype.$suffix: \$(shared_objects_ctype) \$(PHPCTYPE_SHARED_DEPENDENCIES)
+	$link_cmd
+
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:28301: \"$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
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/ctype.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(CTYPE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/ctype.so '$ext_builddir'/ctype.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(CTYPE, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_ctype) $(CTYPE_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/ctype.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/ctype.$suffix"
+  fi
   
-        cat >> confdefs.h <<\EOF
-#define HAVE_CURL_GNUTLS 1
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ctype"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/ctype.$suffix: $ext_builddir/ctype.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/ctype.$suffix \$(phplibdir)
+
+$ext_builddir/ctype.$suffix: \$(shared_objects_ctype) \$(CTYPE_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_CTYPE 1
 EOF
 
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_CTYPE_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/ctype in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in ctype.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-else
-  echo "$ac_t""no" 1>&6
-fi
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC ctype"
+        ;;
+      *)
+        
+  
+  case ext/ctype in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in ctype.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC ctype"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
 
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=ctype
     
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
+
+fi
+
+
+
+php_with_curl=no
+
+echo $ac_n "checking for cURL support""... $ac_c" 1>&6
+echo "configure:28828: checking for cURL support" >&5
+# Check whether --with-curl or --without-curl was given.
+if test "${with_curl+set}" = set; then
+  withval="$with_curl"
+  PHP_CURL=$withval
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
   
-      echo "$ac_t""no" 1>&6
-    
+  PHP_CURL=no
+  test "$PHP_ENABLE_ALL" && PHP_CURL=$PHP_ENABLE_ALL
+
 fi
-rm -fr conftest*
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_CURL in
+shared,*)
+  PHP_CURL=`echo "$PHP_CURL"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_CURL=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_with_curlwrappers=no
+
+echo $ac_n "checking if we should use cURL for url streams""... $ac_c" 1>&6
+echo "configure:28872: checking if we should use cURL for url streams" >&5
+# Check whether --with-curlwrappers or --without-curlwrappers was given.
+if test "${with_curlwrappers+set}" = set; then
+  withval="$with_curlwrappers"
+  PHP_CURLWRAPPERS=$withval
+else
+  
+  PHP_CURLWRAPPERS=no
+  
+
 fi
 
-   
-    CFLAGS="$save_CFLAGS"
+
+ext_output=$PHP_CURLWRAPPERS
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_CURL" != "no"; then
+  if test -r $PHP_CURL/include/curl/easy.h; then
+    CURL_DIR=$PHP_CURL
   else
-    echo "$ac_t""no" 1>&6
+    echo $ac_n "checking for cURL in default path""... $ac_c" 1>&6
+echo "configure:28896: checking for cURL in default path" >&5
+    for i in /usr/local /usr; do
+      if test -r $i/include/curl/easy.h; then
+        CURL_DIR=$i
+        echo "$ac_t""found in $i" 1>&6
+        break
+      fi
+    done
+  fi
+
+  if test -z "$CURL_DIR"; then
+    echo "$ac_t""not found" 1>&6
+    { echo "configure: error: Please reinstall the libcurl distribution -
+    easy.h should be in <curl-dir>/include/curl/" 1>&2; exit 1; }
+  fi
+
+  CURL_CONFIG="curl-config"
+  echo $ac_n "checking for cURL 7.10.5 or greater""... $ac_c" 1>&6
+echo "configure:28914: checking for cURL 7.10.5 or greater" >&5
+
+  if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then
+    CURL_CONFIG=${CURL_DIR}/bin/curl-config
+  else
+    if ${CURL_DIR}/curl-config --libs > /dev/null 2>&1; then
+      CURL_CONFIG=${CURL_DIR}/curl-config
+    fi
+  fi
+
+  curl_version_full=`$CURL_CONFIG --version`
+  curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+  if test "$curl_version" -ge 7010005; then
+    echo "$ac_t""$curl_version_full" 1>&6
+    CURL_LIBS=`$CURL_CONFIG --libs`
+  else
+    { echo "configure: error: cURL version 7.10.5 or later is required to compile php with cURL support" 1>&2; exit 1; }
   fi
 
   
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
-  "
+  if test "$CURL_DIR/include" != "/usr/include"; then
+    
+  if test -z "$CURL_DIR/include" || echo "$CURL_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$CURL_DIR/include
+  else
+    
+    ep_dir="`echo $CURL_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$CURL_DIR/include\"`"
+  fi
+
+    
   
-  save_ext_shared=$ext_shared
-  ext_shared=yes
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  for ac_i in $ac_stuff; do
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+  
+  for ac_i in $CURL_LIBS; do
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
+        CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -pthread"
       else
         
   
@@ -28376,7 +28987,7 @@ fi
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
+        CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -l$ac_ii" 
     else
       
   
@@ -28411,8 +29022,8 @@ fi
 
     
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+        CURL_SHARED_LIBADD="-L$ai_p $CURL_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && CURL_SHARED_LIBADD="$ld_runpath_switch$ai_p $CURL_SHARED_LIBADD"
       else
         
   
@@ -28438,44 +29049,508 @@ fi
     esac
   done
 
-  echo $ac_n "checking for curl_easy_perform in -lcurl""... $ac_c" 1>&6
-echo "configure:28443: checking for curl_easy_perform in -lcurl" >&5
-ac_lib_var=`echo curl'_'curl_easy_perform | 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="-lcurl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 28451 "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 curl_easy_perform();
-
-int main() {
-curl_easy_perform()
-; return 0; }
-EOF
-if { (eval echo configure:28462: \"$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
   
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
+
+  if test "$ext_shared" = "yes"; then
+    CURL_SHARED_LIBADD="-lcurl $CURL_SHARED_LIBADD"
+    if test -n "$CURL_DIR/$PHP_LIBDIR"; then
+      
+  if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$CURL_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        CURL_SHARED_LIBADD="-L$ai_p $CURL_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && CURL_SHARED_LIBADD="$ld_runpath_switch$ai_p $CURL_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$CURL_DIR/$PHP_LIBDIR"; then
+    
+  if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$CURL_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+    
+  fi
+
+  fi
+  
+  
+  case curl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lcurl $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
+
+  
+  echo $ac_n "checking for SSL support in libcurl""... $ac_c" 1>&6
+echo "configure:29152: checking for SSL support in libcurl" >&5
+  CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
+  if test "$CURL_SSL" = "SSL"; then
+    echo "$ac_t""yes" 1>&6
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_SSL 1
+EOF
+
+   
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="`$CURL_CONFIG --cflags`"
+   
+    echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:29165: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 29180 "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:29186: \"$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
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 29197 "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:29203: \"$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
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 29214 "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:29220: \"$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
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+    echo $ac_n "checking for openssl support in libcurl""... $ac_c" 1>&6
+echo "configure:29245: checking for openssl support in libcurl" >&5
+    if test "$cross_compiling" = yes; then
+  
+      echo "$ac_t""no" 1>&6
+    
+else
+  cat > conftest.$ac_ext <<EOF
+#line 29252 "configure"
+#include "confdefs.h"
+
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+
+  if (data && data->ssl_version && *data->ssl_version) {
+    const char *ptr = data->ssl_version;
+
+    while(*ptr == ' ') ++ptr;
+    return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
+  }
+  return 1;
+}
+    
+EOF
+if { (eval echo configure:29271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+      echo "$ac_t""yes" 1>&6
+      for ac_hdr in openssl/crypto.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:29279: checking for $ac_hdr" >&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 29284 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:29289: \"$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
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+        cat >> confdefs.h <<\EOF
+#define HAVE_CURL_OPENSSL 1
+EOF
+
+      
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+    
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+      echo "$ac_t""no" 1>&6
+    
+fi
+rm -fr conftest*
+fi
+
+   
+    echo $ac_n "checking for gnutls support in libcurl""... $ac_c" 1>&6
+echo "configure:29334: checking for gnutls support in libcurl" >&5
+    if test "$cross_compiling" = yes; then
+  
+      echo "$ac_t""no" 1>&6
+    
+else
+  cat > conftest.$ac_ext <<EOF
+#line 29341 "configure"
+#include "confdefs.h"
+
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+  
+  if (data && data->ssl_version && *data->ssl_version) {
+    const char *ptr = data->ssl_version;
+
+    while(*ptr == ' ') ++ptr;
+    return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
+  }
+  return 1;
+}
+
+EOF
+if { (eval echo configure:29360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+      echo "$ac_t""yes" 1>&6
+      ac_safe=`echo "gcrypt.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for gcrypt.h""... $ac_c" 1>&6
+echo "configure:29366: checking for gcrypt.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 29371 "configure"
+#include "confdefs.h"
+#include <gcrypt.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:29376: \"$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
+  
+        cat >> confdefs.h <<\EOF
+#define HAVE_CURL_GNUTLS 1
+EOF
+
+      
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+      echo "$ac_t""no" 1>&6
+    
+fi
+rm -fr conftest*
+fi
+
+   
+    CFLAGS="$save_CFLAGS"
+  else
+    echo "$ac_t""no" 1>&6
+  fi
+
+  
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+  "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for curl_easy_perform in -lcurl""... $ac_c" 1>&6
+echo "configure:29518: checking for curl_easy_perform in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_easy_perform | 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="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 29526 "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 curl_easy_perform();
+
+int main() {
+curl_easy_perform()
+; return 0; }
+EOF
+if { (eval echo configure:29537: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
      
     cat >> confdefs.h <<\EOF
 #define HAVE_CURL 1
@@ -28594,7 +29669,7 @@ fi
   done
 
   echo $ac_n "checking for curl_version_info in -lcurl""... $ac_c" 1>&6
-echo "configure:28598: checking for curl_version_info in -lcurl" >&5
+echo "configure:29673: checking for curl_version_info in -lcurl" >&5
 ac_lib_var=`echo curl'_'curl_version_info | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -28602,7 +29677,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 28606 "configure"
+#line 29681 "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
@@ -28613,7 +29688,7 @@ int main() {
 curl_version_info()
 ; return 0; }
 EOF
-if { (eval echo configure:28617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:29692: \"$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
@@ -28747,7 +29822,7 @@ fi
   done
 
   echo $ac_n "checking for curl_easy_strerror in -lcurl""... $ac_c" 1>&6
-echo "configure:28751: checking for curl_easy_strerror in -lcurl" >&5
+echo "configure:29826: checking for curl_easy_strerror in -lcurl" >&5
 ac_lib_var=`echo curl'_'curl_easy_strerror | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -28755,7 +29830,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 28759 "configure"
+#line 29834 "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
@@ -28766,7 +29841,7 @@ int main() {
 curl_easy_strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:28770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:29845: \"$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
@@ -28900,7 +29975,7 @@ fi
   done
 
   echo $ac_n "checking for curl_multi_strerror in -lcurl""... $ac_c" 1>&6
-echo "configure:28904: checking for curl_multi_strerror in -lcurl" >&5
+echo "configure:29979: checking for curl_multi_strerror in -lcurl" >&5
 ac_lib_var=`echo curl'_'curl_multi_strerror | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -28908,7 +29983,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 28912 "configure"
+#line 29987 "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
@@ -28919,7 +29994,7 @@ int main() {
 curl_multi_strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:28923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:29998: \"$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
@@ -29605,7 +30680,7 @@ if test "$PHP_QDBM" != "no"; then
   done
 
   echo $ac_n "checking for dpopen in -l$LIB""... $ac_c" 1>&6
-echo "configure:29609: checking for dpopen in -l$LIB" >&5
+echo "configure:30684: checking for dpopen in -l$LIB" >&5
 ac_lib_var=`echo $LIB'_'dpopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -29613,7 +30688,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 29617 "configure"
+#line 30692 "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
@@ -29624,7 +30699,7 @@ int main() {
 dpopen()
 ; return 0; }
 EOF
-if { (eval echo configure:29628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:30703: \"$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
@@ -29793,7 +30868,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29797: checking for $THIS_FULL_NAME support" >&5
+echo "configure:30872: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -29821,7 +30896,7 @@ if test "$PHP_GDBM" != "no"; then
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29825: checking for $THIS_FULL_NAME support" >&5
+echo "configure:30900: checking for $THIS_FULL_NAME support" >&5
   if test -n "You cannot combine --with-gdbm with --with-qdbm"; then
     { echo "configure: error: You cannot combine --with-gdbm with --with-qdbm" 1>&2; exit 1; }
   fi
@@ -29940,7 +31015,7 @@ echo "configure:29825: checking for $THI
   done
 
   echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:29944: checking for gdbm_open in -lgdbm" >&5
+echo "configure:31019: checking for gdbm_open in -lgdbm" >&5
 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -29948,7 +31023,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgdbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 29952 "configure"
+#line 31027 "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
@@ -29959,7 +31034,7 @@ int main() {
 gdbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:29963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:31038: \"$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
@@ -30124,7 +31199,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:30128: checking for $THIS_FULL_NAME support" >&5
+echo "configure:31203: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -30253,7 +31328,7 @@ if test "$PHP_NDBM" != "no"; then
   done
 
   echo $ac_n "checking for dbm_open in -l$LIB""... $ac_c" 1>&6
-echo "configure:30257: checking for dbm_open in -l$LIB" >&5
+echo "configure:31332: checking for dbm_open in -l$LIB" >&5
 ac_lib_var=`echo $LIB'_'dbm_open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -30261,7 +31336,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 30265 "configure"
+#line 31340 "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
@@ -30272,7 +31347,7 @@ int main() {
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:30276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:31351: \"$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
@@ -30441,7 +31516,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:30445: checking for $THIS_FULL_NAME support" >&5
+echo "configure:31520: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -30529,7 +31604,7 @@ if test "$PHP_DB4" != "no"; then
   LIBS="-l$LIB $LIBS"
   
         cat > conftest.$ac_ext <<EOF
-#line 30533 "configure"
+#line 31608 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -30540,11 +31615,11 @@ int main() {
         
 ; return 0; }
 EOF
-if { (eval echo configure:30544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:31619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
           cat > conftest.$ac_ext <<EOF
-#line 30548 "configure"
+#line 31623 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -30581,14 +31656,14 @@ rm -f conftest*
   done
   if test -z "$THIS_LIBS"; then
     echo $ac_n "checking for DB4 major version""... $ac_c" 1>&6
-echo "configure:30585: checking for DB4 major version" >&5
+echo "configure:31660: checking for DB4 major version" >&5
     { echo "configure: error: Header contains different version" 1>&2; exit 1; }
   fi
   if test "4" = "4"; then
     echo $ac_n "checking for DB4 minor version and patch level""... $ac_c" 1>&6
-echo "configure:30590: checking for DB4 minor version and patch level" >&5
+echo "configure:31665: checking for DB4 minor version and patch level" >&5
     cat > conftest.$ac_ext <<EOF
-#line 30592 "configure"
+#line 31667 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -30614,9 +31689,9 @@ rm -f conftest*
   fi
   if test "$ext_shared" = "yes"; then
     echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
-echo "configure:30618: checking if dba can be used as shared extension" >&5
+echo "configure:31693: checking if dba can be used as shared extension" >&5
     cat > conftest.$ac_ext <<EOF
-#line 30620 "configure"
+#line 31695 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -30773,7 +31848,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:30777: checking for $THIS_FULL_NAME support" >&5
+echo "configure:31852: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -30801,7 +31876,7 @@ if test "$PHP_DB3" != "no"; then
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:30805: checking for $THIS_FULL_NAME support" >&5
+echo "configure:31880: checking for $THIS_FULL_NAME support" >&5
   if test -n "You cannot combine --with-db3 with --with-db4"; then
     { echo "configure: error: You cannot combine --with-db3 with --with-db4" 1>&2; exit 1; }
   fi
@@ -30852,7 +31927,7 @@ echo "configure:30805: checking for $THI
   LIBS="-l$LIB $LIBS"
   
         cat > conftest.$ac_ext <<EOF
-#line 30856 "configure"
+#line 31931 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -30863,11 +31938,11 @@ int main() {
         
 ; return 0; }
 EOF
-if { (eval echo configure:30867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:31942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
           cat > conftest.$ac_ext <<EOF
-#line 30871 "configure"
+#line 31946 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -30904,14 +31979,14 @@ rm -f conftest*
   done
   if test -z "$THIS_LIBS"; then
     echo $ac_n "checking for DB3 major version""... $ac_c" 1>&6
-echo "configure:30908: checking for DB3 major version" >&5
+echo "configure:31983: checking for DB3 major version" >&5
     { echo "configure: error: Header contains different version" 1>&2; exit 1; }
   fi
   if test "3" = "4"; then
     echo $ac_n "checking for DB4 minor version and patch level""... $ac_c" 1>&6
-echo "configure:30913: checking for DB4 minor version and patch level" >&5
+echo "configure:31988: checking for DB4 minor version and patch level" >&5
     cat > conftest.$ac_ext <<EOF
-#line 30915 "configure"
+#line 31990 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -30937,9 +32012,9 @@ rm -f conftest*
   fi
   if test "$ext_shared" = "yes"; then
     echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
-echo "configure:30941: checking if dba can be used as shared extension" >&5
+echo "configure:32016: checking if dba can be used as shared extension" >&5
     cat > conftest.$ac_ext <<EOF
-#line 30943 "configure"
+#line 32018 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -31096,7 +32171,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:31100: checking for $THIS_FULL_NAME support" >&5
+echo "configure:32175: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -31124,7 +32199,7 @@ if test "$PHP_DB2" != "no"; then
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:31128: checking for $THIS_FULL_NAME support" >&5
+echo "configure:32203: checking for $THIS_FULL_NAME support" >&5
   if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then
     { echo "configure: error: You cannot combine --with-db2 with --with-db3 or --with-db4" 1>&2; exit 1; }
   fi
@@ -31175,7 +32250,7 @@ echo "configure:31128: checking for $THI
   LIBS="-l$LIB $LIBS"
   
         cat > conftest.$ac_ext <<EOF
-#line 31179 "configure"
+#line 32254 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -31186,11 +32261,11 @@ int main() {
         
 ; return 0; }
 EOF
-if { (eval echo configure:31190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:32265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
           cat > conftest.$ac_ext <<EOF
-#line 31194 "configure"
+#line 32269 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -31227,14 +32302,14 @@ rm -f conftest*
   done
   if test -z "$THIS_LIBS"; then
     echo $ac_n "checking for DB2 major version""... $ac_c" 1>&6
-echo "configure:31231: checking for DB2 major version" >&5
+echo "configure:32306: checking for DB2 major version" >&5
     { echo "configure: error: Header contains different version" 1>&2; exit 1; }
   fi
   if test "2" = "4"; then
     echo $ac_n "checking for DB4 minor version and patch level""... $ac_c" 1>&6
-echo "configure:31236: checking for DB4 minor version and patch level" >&5
+echo "configure:32311: checking for DB4 minor version and patch level" >&5
     cat > conftest.$ac_ext <<EOF
-#line 31238 "configure"
+#line 32313 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -31260,9 +32335,9 @@ rm -f conftest*
   fi
   if test "$ext_shared" = "yes"; then
     echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
-echo "configure:31264: checking if dba can be used as shared extension" >&5
+echo "configure:32339: checking if dba can be used as shared extension" >&5
     cat > conftest.$ac_ext <<EOF
-#line 31266 "configure"
+#line 32341 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -31419,7 +32494,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:31423: checking for $THIS_FULL_NAME support" >&5
+echo "configure:32498: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -31439,7 +32514,7 @@ if test "$PHP_DB1" != "no"; then
   unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
 
   echo $ac_n "checking for DB1 in library""... $ac_c" 1>&6
-echo "configure:31443: checking for DB1 in library" >&5
+echo "configure:32518: checking for DB1 in library" >&5
   if test "$HAVE_DB4" = "1"; then
     THIS_VERSION=4
     THIS_LIBS=$DB4_LIBS
@@ -31487,7 +32562,7 @@ EOF
   fi
   echo "$ac_t""$THIS_LIBS" 1>&6
   echo $ac_n "checking for DB1 in header""... $ac_c" 1>&6
-echo "configure:31491: checking for DB1 in header" >&5
+echo "configure:32566: checking for DB1 in header" >&5
   echo "$ac_t""$THIS_INCLUDE" 1>&6
   if test -n "$THIS_INCLUDE"; then
     
@@ -31497,7 +32572,7 @@ echo "configure:31491: checking for DB1
   LIBS="-l$THIS_LIBS $LIBS"
   
       cat > conftest.$ac_ext <<EOF
-#line 31501 "configure"
+#line 32576 "configure"
 #include "confdefs.h"
 
 #include "$THIS_INCLUDE"
@@ -31508,7 +32583,7 @@ int main() {
       
 ; return 0; }
 EOF
-if { (eval echo configure:31512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:32587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
         cat >> confdefs.h <<EOF
@@ -31658,7 +32733,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:31662: checking for $THIS_FULL_NAME support" >&5
+echo "configure:32737: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -31686,7 +32761,7 @@ if test "$PHP_DBM" != "no"; then
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:31690: checking for $THIS_FULL_NAME support" >&5
+echo "configure:32765: checking for $THIS_FULL_NAME support" >&5
   if test -n "You cannot combine --with-dbm with --with-qdbm"; then
     { echo "configure: error: You cannot combine --with-dbm with --with-qdbm" 1>&2; exit 1; }
   fi
@@ -31810,7 +32885,7 @@ echo "configure:31690: checking for $THI
   done
 
   echo $ac_n "checking for dbminit in -l$LIB""... $ac_c" 1>&6
-echo "configure:31814: checking for dbminit in -l$LIB" >&5
+echo "configure:32889: checking for dbminit in -l$LIB" >&5
 ac_lib_var=`echo $LIB'_'dbminit | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -31818,7 +32893,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 31822 "configure"
+#line 32897 "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
@@ -31829,7 +32904,7 @@ int main() {
 dbminit()
 ; return 0; }
 EOF
-if { (eval echo configure:31833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:32908: \"$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
@@ -31849,7 +32924,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
     ext_shared=$save_ext_shared
     
         echo $ac_n "checking for DBM using GDBM""... $ac_c" 1>&6
-echo "configure:31853: checking for DBM using GDBM" >&5
+echo "configure:32928: checking for DBM using GDBM" >&5
         cat >> confdefs.h <<EOF
 #define DBM_INCLUDE_FILE "$THIS_INCLUDE"
 EOF
@@ -32013,7 +33088,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:32017: checking for $THIS_FULL_NAME support" >&5
+echo "configure:33092: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -32225,7 +33300,7 @@ elif test "$PHP_CDB" != "no"; then
   done
 
   echo $ac_n "checking for cdb_read in -l$LIB""... $ac_c" 1>&6
-echo "configure:32229: checking for cdb_read in -l$LIB" >&5
+echo "configure:33304: checking for cdb_read in -l$LIB" >&5
 ac_lib_var=`echo $LIB'_'cdb_read | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -32233,7 +33308,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 32237 "configure"
+#line 33312 "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
@@ -32244,7 +33319,7 @@ int main() {
 cdb_read()
 ; return 0; }
 EOF
-if { (eval echo configure:32248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:33323: \"$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
@@ -32413,7 +33488,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:32417: checking for $THIS_FULL_NAME support" >&5
+echo "configure:33492: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -32444,7 +33519,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:32448: checking for $THIS_FULL_NAME support" >&5
+echo "configure:33523: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -32475,7 +33550,7 @@ fi
     THIS_FULL_NAME="$THIS_NAME"
   fi
   echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:32479: checking for $THIS_FULL_NAME support" >&5
+echo "configure:33554: checking for $THIS_FULL_NAME support" >&5
   if test -n ""; then
     { echo "configure: error: " 1>&2; exit 1; }
   fi
@@ -32490,7 +33565,7 @@ echo "configure:32479: checking for $THI
 
 
 echo $ac_n "checking whether to enable DBA interface""... $ac_c" 1>&6
-echo "configure:32494: checking whether to enable DBA interface" >&5
+echo "configure:33569: checking whether to enable DBA interface" >&5
 if test "$HAVE_DBA" = "1"; then
   if test "$ext_shared" = "yes"; then
     echo "$ac_t""yes, shared" 1>&6
@@ -32817,18 +33892,18 @@ fi
 
 
 
-php_enable_dom=yes
+php_enable_dio=no
 
-echo $ac_n "checking whether to enable DOM support""... $ac_c" 1>&6
-echo "configure:32824: checking whether to enable DOM support" >&5
-# Check whether --enable-dom or --disable-dom was given.
-if test "${enable_dom+set}" = set; then
-  enableval="$enable_dom"
-  PHP_DOM=$enableval
+echo $ac_n "checking whether to enable direct I/O support""... $ac_c" 1>&6
+echo "configure:33899: checking whether to enable direct I/O support" >&5
+# Check whether --enable-dio or --disable-dio was given.
+if test "${enable_dio+set}" = set; then
+  enableval="$enable_dio"
+  PHP_DIO=$enableval
 else
   
-  PHP_DOM=yes
-  test "$PHP_ENABLE_ALL" && PHP_DOM=$PHP_ENABLE_ALL
+  PHP_DIO=no
+  test "$PHP_ENABLE_ALL" && PHP_DIO=$PHP_ENABLE_ALL
 
 fi
 
@@ -32836,12 +33911,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_DOM in
+case $PHP_DIO in
 shared,*)
-  PHP_DOM=`echo "$PHP_DOM"|$SED 's/^shared,//'`
+  PHP_DIO=`echo "$PHP_DIO"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_DOM=yes
+  PHP_DIO=yes
   ;;
 no)
   ext_output=no
@@ -32860,28 +33935,368 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test -z "$PHP_LIBXML_DIR"; then
+if test "$PHP_DIO" != "no"; then
   
-php_with_libxml_dir=no
+  ext_builddir=ext/dio
+  ext_srcdir=$abs_srcdir/ext/dio
 
-echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:32869: checking libxml2 install dir" >&5
-# Check whether --with-libxml-dir or --without-libxml-dir was given.
-if test "${with_libxml_dir+set}" = set; then
-  withval="$with_libxml_dir"
-  PHP_LIBXML_DIR=$withval
-else
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_DIO_SHARED=no
+    
+  
+  case ext/dio in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/dio"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/dio/"; ac_bdir="ext/dio/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  PHP_LIBXML_DIR=no
   
 
-fi
-
-
-ext_output=$PHP_LIBXML_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in dio.c dio_common.c dio_posix.c dio_stream_wrappers.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC dio"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC dio"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_DIO_SHARED=yes
+      
+  case ext/dio in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/dio"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/dio/"; ac_bdir="ext/dio/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in dio.c dio_common.c dio_posix.c dio_stream_wrappers.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_dio="$shared_objects_dio $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpdio.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_dio) $(PHPDIO_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpdio.so '$ext_builddir'/phpdio.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_dio) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPDIO, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_dio) $(PHPDIO_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpdio.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpdio.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_dio"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpdio.$suffix: $ext_builddir/phpdio.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpdio.$suffix \$(phplibdir)
+
+$ext_builddir/phpdio.$suffix: \$(shared_objects_dio) \$(PHPDIO_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/dio.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_dio) $(DIO_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/dio.so '$ext_builddir'/dio.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_dio) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(DIO, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_dio) $(DIO_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/dio.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/dio.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_dio"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/dio.$suffix: $ext_builddir/dio.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/dio.$suffix \$(phplibdir)
+
+$ext_builddir/dio.$suffix: \$(shared_objects_dio) \$(DIO_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_DIO 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_DIO_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/dio in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/dio"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/dio/"; ac_bdir="ext/dio/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in dio.c dio_common.c dio_posix.c dio_stream_wrappers.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC dio"
+        ;;
+      *)
+        
+  
+  case ext/dio in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/dio"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/dio/"; ac_bdir="ext/dio/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in dio.c dio_common.c dio_posix.c dio_stream_wrappers.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC dio"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=dio
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
+
+fi
+
+
+
+php_enable_dom=yes
+
+echo $ac_n "checking whether to enable DOM support""... $ac_c" 1>&6
+echo "configure:34239: checking whether to enable DOM support" >&5
+# Check whether --enable-dom or --disable-dom was given.
+if test "${enable_dom+set}" = set; then
+  enableval="$enable_dom"
+  PHP_DOM=$enableval
+else
+  
+  PHP_DOM=yes
+  test "$PHP_ENABLE_ALL" && PHP_DOM=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_DOM in
+shared,*)
+  PHP_DOM=`echo "$PHP_DOM"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_DOM=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test -z "$PHP_LIBXML_DIR"; then
+  
+php_with_libxml_dir=no
+
+echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
+echo "configure:34284: checking libxml2 install dir" >&5
+# Check whether --with-libxml-dir or --without-libxml-dir was given.
+if test "${with_libxml_dir+set}" = set; then
+  withval="$with_libxml_dir"
+  PHP_LIBXML_DIR=$withval
+else
+  
+  PHP_LIBXML_DIR=no
+  
+
+fi
+
+
+ext_output=$PHP_LIBXML_DIR
+echo "$ac_t""$ext_output" 1>&6
+
+
 
 fi
 
@@ -32893,7 +34308,7 @@ if test "$PHP_DOM" != "no"; then
 
   
 echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:32897: checking for xml2-config path" >&5
+echo "configure:34312: checking for xml2-config path" >&5
 if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -33051,7 +34466,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
 
             echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:33055: checking whether libxml build works" >&5
+echo "configure:34470: checking whether libxml build works" >&5
 if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -33067,7 +34482,7 @@ else
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 33071 "configure"
+#line 34486 "configure"
 #include "confdefs.h"
 
     
@@ -33078,7 +34493,7 @@ else
     }
   
 EOF
-if { (eval echo configure:33082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:34497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -33501,7 +34916,7 @@ fi
 php_with_enchant=no
 
 echo $ac_n "checking for ENCHANT support""... $ac_c" 1>&6
-echo "configure:33505: checking for ENCHANT support" >&5
+echo "configure:34920: checking for ENCHANT support" >&5
 # Check whether --with-enchant or --without-enchant was given.
 if test "${with_enchant+set}" = set; then
   withval="$with_enchant"
@@ -34086,7 +35501,7 @@ EOF
   done
 
   echo $ac_n "checking for enchant_broker_set_param in -lenchant""... $ac_c" 1>&6
-echo "configure:34090: checking for enchant_broker_set_param in -lenchant" >&5
+echo "configure:35505: checking for enchant_broker_set_param in -lenchant" >&5
 ac_lib_var=`echo enchant'_'enchant_broker_set_param | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -34094,7 +35509,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lenchant  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 34098 "configure"
+#line 35513 "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
@@ -34105,7 +35520,7 @@ int main() {
 enchant_broker_set_param()
 ; return 0; }
 EOF
-if { (eval echo configure:34109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:35524: \"$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
@@ -34152,7 +35567,7 @@ fi
 php_enable_exif=no
 
 echo $ac_n "checking whether to enable EXIF (metadata from images) support""... $ac_c" 1>&6
-echo "configure:34156: checking whether to enable EXIF (metadata from images) support" >&5
+echo "configure:35571: checking whether to enable EXIF (metadata from images) support" >&5
 # Check whether --enable-exif or --disable-exif was given.
 if test "${enable_exif+set}" = set; then
   enableval="$enable_exif"
@@ -34496,7 +35911,7 @@ fi
 php_enable_fileinfo=yes
 
 echo $ac_n "checking for fileinfo support""... $ac_c" 1>&6
-echo "configure:34500: checking for fileinfo support" >&5
+echo "configure:35915: checking for fileinfo support" >&5
 # Check whether --enable-fileinfo or --disable-fileinfo was given.
 if test "${enable_fileinfo+set}" = set; then
   enableval="$enable_fileinfo"
@@ -34846,12 +36261,12 @@ EOF
   for ac_func in utimes strndup
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:34850: checking for $ac_func" >&5
+echo "configure:36265: 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 34855 "configure"
+#line 36270 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -34874,7 +36289,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:34878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:36293: \"$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
@@ -34912,7 +36327,7 @@ fi
 php_enable_filter=yes
 
 echo $ac_n "checking whether to enable input filter support""... $ac_c" 1>&6
-echo "configure:34916: checking whether to enable input filter support" >&5
+echo "configure:36331: checking whether to enable input filter support" >&5
 # Check whether --enable-filter or --disable-filter was given.
 if test "${enable_filter+set}" = set; then
   enableval="$enable_filter"
@@ -34956,7 +36371,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_pcre_dir=no
 
 echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6
-echo "configure:34960: checking pcre install prefix" >&5
+echo "configure:36375: checking pcre install prefix" >&5
 # Check whether --with-pcre-dir or --without-pcre-dir was given.
 if test "${with_pcre_dir+set}" = set; then
   withval="$with_pcre_dir"
@@ -34983,7 +36398,7 @@ if test "$PHP_FILTER" != "no"; then
         old_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=$INCLUDES
     cat > conftest.$ac_ext <<EOF
-#line 34987 "configure"
+#line 36402 "configure"
 #include "confdefs.h"
 
 #include <main/php_config.h>
@@ -35002,7 +36417,7 @@ else
   rm -rf conftest*
   
       cat > conftest.$ac_ext <<EOF
-#line 35006 "configure"
+#line 36421 "configure"
 #include "confdefs.h"
 
 #include <main/php_config.h>
@@ -35372,7 +36787,7 @@ fi
 php_enable_ftp=no
 
 echo $ac_n "checking whether to enable FTP support""... $ac_c" 1>&6
-echo "configure:35376: checking whether to enable FTP support" >&5
+echo "configure:36791: checking whether to enable FTP support" >&5
 # Check whether --enable-ftp or --disable-ftp was given.
 if test "${enable_ftp+set}" = set; then
   enableval="$enable_ftp"
@@ -35416,7 +36831,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_openssl_dir=no
 
 echo $ac_n "checking OpenSSL dir for FTP""... $ac_c" 1>&6
-echo "configure:35420: checking OpenSSL dir for FTP" >&5
+echo "configure:36835: checking OpenSSL dir for FTP" >&5
 # Check whether --with-openssl-dir or --without-openssl-dir was given.
 if test "${with_openssl_dir+set}" = set; then
   withval="$with_openssl_dir"
@@ -35754,7 +37169,7 @@ EOF
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:35758: checking for $ac_word" >&5
+echo "configure:37173: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -35959,9 +37374,9 @@ fi
     old_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=-I$OPENSSL_INCDIR
     echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
-echo "configure:35963: checking for OpenSSL version" >&5
+echo "configure:37378: checking for OpenSSL version" >&5
     cat > conftest.$ac_ext <<EOF
-#line 35965 "configure"
+#line 37380 "configure"
 #include "confdefs.h"
 
 #include <openssl/opensslv.h>
@@ -36116,7 +37531,7 @@ rm -f conftest*
   done
 
   echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:36120: checking for CRYPTO_free in -lcrypto" >&5
+echo "configure:37535: checking for CRYPTO_free in -lcrypto" >&5
 ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -36124,7 +37539,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 36128 "configure"
+#line 37543 "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
@@ -36135,7 +37550,7 @@ int main() {
 CRYPTO_free()
 ; return 0; }
 EOF
-if { (eval echo configure:36139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:37554: \"$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
@@ -36292,7 +37707,7 @@ fi
   done
 
   echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
-echo "configure:36296: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+echo "configure:37711: checking for SSL_CTX_set_ssl_version in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -36300,7 +37715,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 36304 "configure"
+#line 37719 "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
@@ -36311,7 +37726,7 @@ int main() {
 SSL_CTX_set_ssl_version()
 ; return 0; }
 EOF
-if { (eval echo configure:36315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:37730: \"$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
@@ -36453,7 +37868,7 @@ fi
 php_with_gd=no
 
 echo $ac_n "checking for GD support""... $ac_c" 1>&6
-echo "configure:36457: checking for GD support" >&5
+echo "configure:37872: checking for GD support" >&5
 # Check whether --with-gd or --without-gd was given.
 if test "${with_gd+set}" = set; then
   withval="$with_gd"
@@ -36498,7 +37913,7 @@ if test -z "$PHP_JPEG_DIR"; then
 php_with_jpeg_dir=no
 
 echo $ac_n "checking for the location of libjpeg""... $ac_c" 1>&6
-echo "configure:36502: checking for the location of libjpeg" >&5
+echo "configure:37917: checking for the location of libjpeg" >&5
 # Check whether --with-jpeg-dir or --without-jpeg-dir was given.
 if test "${with_jpeg_dir+set}" = set; then
   withval="$with_jpeg_dir"
@@ -36523,7 +37938,7 @@ if test -z "$PHP_PNG_DIR"; then
 php_with_png_dir=no
 
 echo $ac_n "checking for the location of libpng""... $ac_c" 1>&6
-echo "configure:36527: checking for the location of libpng" >&5
+echo "configure:37942: checking for the location of libpng" >&5
 # Check whether --with-png-dir or --without-png-dir was given.
 if test "${with_png_dir+set}" = set; then
   withval="$with_png_dir"
@@ -36548,7 +37963,7 @@ if test -z "$PHP_ZLIB_DIR"; then
 php_with_zlib_dir=no
 
 echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:36552: checking for the location of libz" >&5
+echo "configure:37967: checking for the location of libz" >&5
 # Check whether --with-zlib-dir or --without-zlib-dir was given.
 if test "${with_zlib_dir+set}" = set; then
   withval="$with_zlib_dir"
@@ -36572,7 +37987,7 @@ fi
 php_with_xpm_dir=no
 
 echo $ac_n "checking for the location of libXpm""... $ac_c" 1>&6
-echo "configure:36576: checking for the location of libXpm" >&5
+echo "configure:37991: checking for the location of libXpm" >&5
 # Check whether --with-xpm-dir or --without-xpm-dir was given.
 if test "${with_xpm_dir+set}" = set; then
   withval="$with_xpm_dir"
@@ -36595,7 +38010,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_freetype_dir=no
 
 echo $ac_n "checking for FreeType 2""... $ac_c" 1>&6
-echo "configure:36599: checking for FreeType 2" >&5
+echo "configure:38014: checking for FreeType 2" >&5
 # Check whether --with-freetype-dir or --without-freetype-dir was given.
 if test "${with_freetype_dir+set}" = set; then
   withval="$with_freetype_dir"
@@ -36618,7 +38033,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_t1lib=no
 
 echo $ac_n "checking for T1lib support""... $ac_c" 1>&6
-echo "configure:36622: checking for T1lib support" >&5
+echo "configure:38037: checking for T1lib support" >&5
 # Check whether --with-t1lib or --without-t1lib was given.
 if test "${with_t1lib+set}" = set; then
   withval="$with_t1lib"
@@ -36641,7 +38056,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_enable_gd_native_ttf=no
 
 echo $ac_n "checking whether to enable truetype string function in GD""... $ac_c" 1>&6
-echo "configure:36645: checking whether to enable truetype string function in GD" >&5
+echo "configure:38060: checking whether to enable truetype string function in GD" >&5
 # Check whether --enable-gd-native-ttf or --disable-gd-native-ttf was given.
 if test "${enable_gd_native_ttf+set}" = set; then
   enableval="$enable_gd_native_ttf"
@@ -36664,7 +38079,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_enable_gd_jis_conv=no
 
 echo $ac_n "checking whether to enable JIS-mapped Japanese font support in GD""... $ac_c" 1>&6
-echo "configure:36668: checking whether to enable JIS-mapped Japanese font support in GD" >&5
+echo "configure:38083: checking whether to enable JIS-mapped Japanese font support in GD" >&5
 # Check whether --enable-gd-jis-conv or --disable-gd-jis-conv was given.
 if test "${enable_gd_jis_conv+set}" = set; then
   enableval="$enable_gd_jis_conv"
@@ -36716,12 +38131,12 @@ if test "$PHP_GD" = "yes"; then
   for ac_func in fabsf floorf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:36720: checking for $ac_func" >&5
+echo "configure:38135: 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 36725 "configure"
+#line 38140 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -36744,7 +38159,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:36748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:38163: \"$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
@@ -36916,7 +38331,7 @@ EOF
   done
 
   echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
-echo "configure:36920: checking for jpeg_read_header in -ljpeg" >&5
+echo "configure:38335: checking for jpeg_read_header in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -36924,7 +38339,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ljpeg  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 36928 "configure"
+#line 38343 "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
@@ -36935,7 +38350,7 @@ int main() {
 jpeg_read_header()
 ; return 0; }
 EOF
-if { (eval echo configure:36939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:38354: \"$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
@@ -37213,7 +38628,7 @@ fi
   done
 
   echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6
-echo "configure:37217: checking for png_write_image in -lpng" >&5
+echo "configure:38632: checking for png_write_image in -lpng" >&5
 ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -37221,7 +38636,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 37225 "configure"
+#line 38640 "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
@@ -37232,7 +38647,7 @@ int main() {
 png_write_image()
 ; return 0; }
 EOF
-if { (eval echo configure:37236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:38651: \"$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
@@ -37612,7 +39027,7 @@ fi
   done
 
   echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6
-echo "configure:37616: checking for XpmFreeXpmImage in -lXpm" >&5
+echo "configure:39031: checking for XpmFreeXpmImage in -lXpm" >&5
 ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -37620,7 +39035,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 37624 "configure"
+#line 39039 "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
@@ -37631,7 +39046,7 @@ int main() {
 XpmFreeXpmImage()
 ; return 0; }
 EOF
-if { (eval echo configure:37635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39050: \"$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
@@ -38006,7 +39421,7 @@ fi
   done
 
   echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6
-echo "configure:38010: checking for FT_New_Face in -lfreetype" >&5
+echo "configure:39425: checking for FT_New_Face in -lfreetype" >&5
 ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -38014,7 +39429,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lfreetype  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 38018 "configure"
+#line 39433 "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
@@ -38025,7 +39440,7 @@ int main() {
 FT_New_Face()
 ; return 0; }
 EOF
-if { (eval echo configure:38029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39444: \"$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
@@ -38342,7 +39757,7 @@ fi
   done
 
   echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6
-echo "configure:38346: checking for T1_StrError in -lt1" >&5
+echo "configure:39761: checking for T1_StrError in -lt1" >&5
 ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -38350,7 +39765,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lt1  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 38354 "configure"
+#line 39769 "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
@@ -38361,7 +39776,7 @@ int main() {
 T1_StrError()
 ; return 0; }
 EOF
-if { (eval echo configure:38365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39780: \"$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
@@ -38804,7 +40219,7 @@ EOF
   done
 
   echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
-echo "configure:38808: checking for jpeg_read_header in -ljpeg" >&5
+echo "configure:40223: checking for jpeg_read_header in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -38812,7 +40227,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ljpeg  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 38816 "configure"
+#line 40231 "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
@@ -38823,7 +40238,7 @@ int main() {
 jpeg_read_header()
 ; return 0; }
 EOF
-if { (eval echo configure:38827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40242: \"$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
@@ -39101,7 +40516,7 @@ fi
   done
 
   echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6
-echo "configure:39105: checking for png_write_image in -lpng" >&5
+echo "configure:40520: checking for png_write_image in -lpng" >&5
 ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -39109,7 +40524,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 39113 "configure"
+#line 40528 "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
@@ -39120,7 +40535,7 @@ int main() {
 png_write_image()
 ; return 0; }
 EOF
-if { (eval echo configure:39124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40539: \"$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
@@ -39500,7 +40915,7 @@ fi
   done
 
   echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6
-echo "configure:39504: checking for XpmFreeXpmImage in -lXpm" >&5
+echo "configure:40919: checking for XpmFreeXpmImage in -lXpm" >&5
 ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -39508,7 +40923,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 39512 "configure"
+#line 40927 "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
@@ -39519,7 +40934,7 @@ int main() {
 XpmFreeXpmImage()
 ; return 0; }
 EOF
-if { (eval echo configure:39523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40938: \"$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
@@ -39894,7 +41309,7 @@ fi
   done
 
   echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6
-echo "configure:39898: checking for FT_New_Face in -lfreetype" >&5
+echo "configure:41313: checking for FT_New_Face in -lfreetype" >&5
 ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -39902,7 +41317,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lfreetype  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 39906 "configure"
+#line 41321 "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
@@ -39913,7 +41328,7 @@ int main() {
 FT_New_Face()
 ; return 0; }
 EOF
-if { (eval echo configure:39917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41332: \"$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
@@ -40230,7 +41645,7 @@ fi
   done
 
   echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6
-echo "configure:40234: checking for T1_StrError in -lt1" >&5
+echo "configure:41649: checking for T1_StrError in -lt1" >&5
 ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -40238,7 +41653,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lt1  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 40242 "configure"
+#line 41657 "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
@@ -40249,7 +41664,7 @@ int main() {
 T1_StrError()
 ; return 0; }
 EOF
-if { (eval echo configure:40253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41668: \"$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
@@ -40624,7 +42039,7 @@ EOF
   done
 
   echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6
-echo "configure:40628: checking for gdImageString16 in -lgd" >&5
+echo "configure:42043: checking for gdImageString16 in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageString16 | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -40632,7 +42047,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 40636 "configure"
+#line 42051 "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
@@ -40643,7 +42058,7 @@ int main() {
 gdImageString16()
 ; return 0; }
 EOF
-if { (eval echo configure:40647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42062: \"$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
@@ -40772,7 +42187,7 @@ fi
   done
 
   echo $ac_n "checking for gdImagePaletteCopy in -lgd""... $ac_c" 1>&6
-echo "configure:40776: checking for gdImagePaletteCopy in -lgd" >&5
+echo "configure:42191: checking for gdImagePaletteCopy in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImagePaletteCopy | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -40780,7 +42195,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 40784 "configure"
+#line 42199 "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
@@ -40791,7 +42206,7 @@ int main() {
 gdImagePaletteCopy()
 ; return 0; }
 EOF
-if { (eval echo configure:40795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42210: \"$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
@@ -40920,7 +42335,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6
-echo "configure:40924: checking for gdImageCreateFromPng in -lgd" >&5
+echo "configure:42339: checking for gdImageCreateFromPng in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -40928,7 +42343,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 40932 "configure"
+#line 42347 "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
@@ -40939,7 +42354,7 @@ int main() {
 gdImageCreateFromPng()
 ; return 0; }
 EOF
-if { (eval echo configure:40943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42358: \"$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
@@ -41068,7 +42483,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6
-echo "configure:41072: checking for gdImageCreateFromGif in -lgd" >&5
+echo "configure:42487: checking for gdImageCreateFromGif in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -41076,7 +42491,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 41080 "configure"
+#line 42495 "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
@@ -41087,7 +42502,7 @@ int main() {
 gdImageCreateFromGif()
 ; return 0; }
 EOF
-if { (eval echo configure:41091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42506: \"$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
@@ -41216,7 +42631,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageGif in -lgd""... $ac_c" 1>&6
-echo "configure:41220: checking for gdImageGif in -lgd" >&5
+echo "configure:42635: checking for gdImageGif in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageGif | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -41224,7 +42639,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 41228 "configure"
+#line 42643 "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
@@ -41235,7 +42650,7 @@ int main() {
 gdImageGif()
 ; return 0; }
 EOF
-if { (eval echo configure:41239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42654: \"$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
@@ -41364,7 +42779,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageWBMP in -lgd""... $ac_c" 1>&6
-echo "configure:41368: checking for gdImageWBMP in -lgd" >&5
+echo "configure:42783: checking for gdImageWBMP in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageWBMP | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -41372,7 +42787,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 41376 "configure"
+#line 42791 "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
@@ -41383,7 +42798,7 @@ int main() {
 gdImageWBMP()
 ; return 0; }
 EOF
-if { (eval echo configure:41387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42802: \"$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
@@ -41512,7 +42927,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6
-echo "configure:41516: checking for gdImageCreateFromJpeg in -lgd" >&5
+echo "configure:42931: checking for gdImageCreateFromJpeg in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -41520,7 +42935,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 41524 "configure"
+#line 42939 "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
@@ -41531,7 +42946,7 @@ int main() {
 gdImageCreateFromJpeg()
 ; return 0; }
 EOF
-if { (eval echo configure:41535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42950: \"$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
@@ -41660,7 +43075,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageCreateFromXpm in -lgd""... $ac_c" 1>&6
-echo "configure:41664: checking for gdImageCreateFromXpm in -lgd" >&5
+echo "configure:43079: checking for gdImageCreateFromXpm in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageCreateFromXpm | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -41668,7 +43083,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 41672 "configure"
+#line 43087 "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
@@ -41679,7 +43094,7 @@ int main() {
 gdImageCreateFromXpm()
 ; return 0; }
 EOF
-if { (eval echo configure:41683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43098: \"$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
@@ -41808,7 +43223,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageCreateFromGd2 in -lgd""... $ac_c" 1>&6
-echo "configure:41812: checking for gdImageCreateFromGd2 in -lgd" >&5
+echo "configure:43227: checking for gdImageCreateFromGd2 in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageCreateFromGd2 | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -41816,7 +43231,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 41820 "configure"
+#line 43235 "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
@@ -41827,7 +43242,7 @@ int main() {
 gdImageCreateFromGd2()
 ; return 0; }
 EOF
-if { (eval echo configure:41831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43246: \"$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
@@ -41956,7 +43371,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageCreateTrueColor in -lgd""... $ac_c" 1>&6
-echo "configure:41960: checking for gdImageCreateTrueColor in -lgd" >&5
+echo "configure:43375: checking for gdImageCreateTrueColor in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageCreateTrueColor | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -41964,7 +43379,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 41968 "configure"
+#line 43383 "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
@@ -41975,7 +43390,7 @@ int main() {
 gdImageCreateTrueColor()
 ; return 0; }
 EOF
-if { (eval echo configure:41979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43394: \"$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
@@ -42104,7 +43519,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageSetTile in -lgd""... $ac_c" 1>&6
-echo "configure:42108: checking for gdImageSetTile in -lgd" >&5
+echo "configure:43523: checking for gdImageSetTile in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageSetTile | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -42112,7 +43527,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 42116 "configure"
+#line 43531 "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
@@ -42123,7 +43538,7 @@ int main() {
 gdImageSetTile()
 ; return 0; }
 EOF
-if { (eval echo configure:42127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43542: \"$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
@@ -42252,7 +43667,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageEllipse in -lgd""... $ac_c" 1>&6
-echo "configure:42256: checking for gdImageEllipse in -lgd" >&5
+echo "configure:43671: checking for gdImageEllipse in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageEllipse | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -42260,7 +43675,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 42264 "configure"
+#line 43679 "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
@@ -42271,7 +43686,7 @@ int main() {
 gdImageEllipse()
 ; return 0; }
 EOF
-if { (eval echo configure:42275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43690: \"$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
@@ -42400,7 +43815,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageSetBrush in -lgd""... $ac_c" 1>&6
-echo "configure:42404: checking for gdImageSetBrush in -lgd" >&5
+echo "configure:43819: checking for gdImageSetBrush in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageSetBrush | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -42408,7 +43823,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 42412 "configure"
+#line 43827 "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
@@ -42419,7 +43834,7 @@ int main() {
 gdImageSetBrush()
 ; return 0; }
 EOF
-if { (eval echo configure:42423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43838: \"$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
@@ -42548,7 +43963,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageStringTTF in -lgd""... $ac_c" 1>&6
-echo "configure:42552: checking for gdImageStringTTF in -lgd" >&5
+echo "configure:43967: checking for gdImageStringTTF in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageStringTTF | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -42556,7 +43971,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 42560 "configure"
+#line 43975 "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
@@ -42567,7 +43982,7 @@ int main() {
 gdImageStringTTF()
 ; return 0; }
 EOF
-if { (eval echo configure:42571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43986: \"$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
@@ -42696,7 +44111,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageStringFT in -lgd""... $ac_c" 1>&6
-echo "configure:42700: checking for gdImageStringFT in -lgd" >&5
+echo "configure:44115: checking for gdImageStringFT in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageStringFT | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -42704,7 +44119,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 42708 "configure"
+#line 44123 "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
@@ -42715,7 +44130,7 @@ int main() {
 gdImageStringFT()
 ; return 0; }
 EOF
-if { (eval echo configure:42719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44134: \"$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
@@ -42844,7 +44259,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageStringFTEx in -lgd""... $ac_c" 1>&6
-echo "configure:42848: checking for gdImageStringFTEx in -lgd" >&5
+echo "configure:44263: checking for gdImageStringFTEx in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageStringFTEx | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -42852,7 +44267,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 42856 "configure"
+#line 44271 "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
@@ -42863,7 +44278,7 @@ int main() {
 gdImageStringFTEx()
 ; return 0; }
 EOF
-if { (eval echo configure:42867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44282: \"$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
@@ -42992,7 +44407,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageColorClosestHWB in -lgd""... $ac_c" 1>&6
-echo "configure:42996: checking for gdImageColorClosestHWB in -lgd" >&5
+echo "configure:44411: checking for gdImageColorClosestHWB in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageColorClosestHWB | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -43000,7 +44415,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 43004 "configure"
+#line 44419 "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
@@ -43011,7 +44426,7 @@ int main() {
 gdImageColorClosestHWB()
 ; return 0; }
 EOF
-if { (eval echo configure:43015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44430: \"$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
@@ -43140,7 +44555,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6
-echo "configure:43144: checking for gdImageColorResolve in -lgd" >&5
+echo "configure:44559: checking for gdImageColorResolve in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -43148,7 +44563,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 43152 "configure"
+#line 44567 "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
@@ -43159,7 +44574,7 @@ int main() {
 gdImageColorResolve()
 ; return 0; }
 EOF
-if { (eval echo configure:43163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44578: \"$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
@@ -43288,7 +44703,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageGifCtx in -lgd""... $ac_c" 1>&6
-echo "configure:43292: checking for gdImageGifCtx in -lgd" >&5
+echo "configure:44707: checking for gdImageGifCtx in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageGifCtx | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -43296,7 +44711,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 43300 "configure"
+#line 44715 "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
@@ -43307,7 +44722,7 @@ int main() {
 gdImageGifCtx()
 ; return 0; }
 EOF
-if { (eval echo configure:43311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44726: \"$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
@@ -43436,7 +44851,7 @@ fi
   done
 
   echo $ac_n "checking for gdCacheCreate in -lgd""... $ac_c" 1>&6
-echo "configure:43440: checking for gdCacheCreate in -lgd" >&5
+echo "configure:44855: checking for gdCacheCreate in -lgd" >&5
 ac_lib_var=`echo gd'_'gdCacheCreate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -43444,7 +44859,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 43448 "configure"
+#line 44863 "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
@@ -43455,7 +44870,7 @@ int main() {
 gdCacheCreate()
 ; return 0; }
 EOF
-if { (eval echo configure:43459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44874: \"$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
@@ -43584,7 +44999,7 @@ fi
   done
 
   echo $ac_n "checking for gdFontCacheShutdown in -lgd""... $ac_c" 1>&6
-echo "configure:43588: checking for gdFontCacheShutdown in -lgd" >&5
+echo "configure:45003: checking for gdFontCacheShutdown in -lgd" >&5
 ac_lib_var=`echo gd'_'gdFontCacheShutdown | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -43592,7 +45007,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 43596 "configure"
+#line 45011 "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
@@ -43603,7 +45018,7 @@ int main() {
 gdFontCacheShutdown()
 ; return 0; }
 EOF
-if { (eval echo configure:43607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:45022: \"$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
@@ -43732,7 +45147,7 @@ fi
   done
 
   echo $ac_n "checking for gdFreeFontCache in -lgd""... $ac_c" 1>&6
-echo "configure:43736: checking for gdFreeFontCache in -lgd" >&5
+echo "configure:45151: checking for gdFreeFontCache in -lgd" >&5
 ac_lib_var=`echo gd'_'gdFreeFontCache | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -43740,7 +45155,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 43744 "configure"
+#line 45159 "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
@@ -43751,7 +45166,7 @@ int main() {
 gdFreeFontCache()
 ; return 0; }
 EOF
-if { (eval echo configure:43755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:45170: \"$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
@@ -43880,7 +45295,7 @@ fi
   done
 
   echo $ac_n "checking for gdFontCacheMutexSetup in -lgd""... $ac_c" 1>&6
-echo "configure:43884: checking for gdFontCacheMutexSetup in -lgd" >&5
+echo "configure:45299: checking for gdFontCacheMutexSetup in -lgd" >&5
 ac_lib_var=`echo gd'_'gdFontCacheMutexSetup | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -43888,7 +45303,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 43892 "configure"
+#line 45307 "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
@@ -43899,7 +45314,7 @@ int main() {
 gdFontCacheMutexSetup()
 ; return 0; }
 EOF
-if { (eval echo configure:43903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:45318: \"$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
@@ -44028,7 +45443,7 @@ fi
   done
 
   echo $ac_n "checking for gdNewDynamicCtxEx in -lgd""... $ac_c" 1>&6
-echo "configure:44032: checking for gdNewDynamicCtxEx in -lgd" >&5
+echo "configure:45447: checking for gdNewDynamicCtxEx in -lgd" >&5
 ac_lib_var=`echo gd'_'gdNewDynamicCtxEx | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -44036,7 +45451,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 44040 "configure"
+#line 45455 "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
@@ -44047,7 +45462,7 @@ int main() {
 gdNewDynamicCtxEx()
 ; return 0; }
 EOF
-if { (eval echo configure:44051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:45466: \"$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
@@ -44102,7 +45517,7 @@ fi
         old_CPPFLAGS=$CPPFLAGS
   CPPFLAGS=-I$GD_INCLUDE
   cat > conftest.$ac_ext <<EOF
-#line 44106 "configure"
+#line 45521 "configure"
 #include "confdefs.h"
 
 #include <gd.h>
@@ -44116,7 +45531,7 @@ ctx->gd_free = 1;
   
 ; return 0; }
 EOF
-if { (eval echo configure:44120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:45535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     cat >> confdefs.h <<\EOF
@@ -44447,7 +45862,7 @@ EOF
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 44451 "configure"
+#line 45866 "configure"
 #include "confdefs.h"
 
     char foobar () {}
@@ -44458,7 +45873,7 @@ else
     }
   
 EOF
-if { (eval echo configure:44462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:45877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -44609,7 +46024,7 @@ fi
   done
 
   echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6
-echo "configure:44613: checking for gdImageCreate in -lgd" >&5
+echo "configure:46028: checking for gdImageCreate in -lgd" >&5
 ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -44617,7 +46032,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 44621 "configure"
+#line 46036 "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
@@ -44628,7 +46043,7 @@ int main() {
 gdImageCreate()
 ; return 0; }
 EOF
-if { (eval echo configure:44632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46047: \"$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
@@ -44693,7 +46108,7 @@ fi
 php_with_gettext=no
 
 echo $ac_n "checking for GNU gettext support""... $ac_c" 1>&6
-echo "configure:44697: checking for GNU gettext support" >&5
+echo "configure:46112: checking for GNU gettext support" >&5
 # Check whether --with-gettext or --without-gettext was given.
 if test "${with_gettext+set}" = set; then
   withval="$with_gettext"
@@ -44748,7 +46163,7 @@ if test "$PHP_GETTEXT" != "no"; then
   O_LDFLAGS=$LDFLAGS
   LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
   echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:44752: checking for bindtextdomain in -lintl" >&5
+echo "configure:46167: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -44756,7 +46171,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 44760 "configure"
+#line 46175 "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
@@ -44767,7 +46182,7 @@ int main() {
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:44771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46186: \"$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
@@ -44789,7 +46204,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for bindtextdomain in -lc""... $ac_c" 1>&6
-echo "configure:44793: checking for bindtextdomain in -lc" >&5
+echo "configure:46208: checking for bindtextdomain in -lc" >&5
 ac_lib_var=`echo c'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -44797,7 +46212,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 44801 "configure"
+#line 46216 "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
@@ -44808,7 +46223,7 @@ int main() {
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:44812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46227: \"$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
@@ -45272,7 +46687,7 @@ EOF
 
 
   echo $ac_n "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:45276: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:46691: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
 ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'ngettext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -45280,7 +46695,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 45284 "configure"
+#line 46699 "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
@@ -45291,7 +46706,7 @@ int main() {
 ngettext()
 ; return 0; }
 EOF
-if { (eval echo configure:45295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46710: \"$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
@@ -45315,7 +46730,7 @@ else
 fi
 
   echo $ac_n "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:45319: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:46734: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
 ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dngettext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -45323,7 +46738,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 45327 "configure"
+#line 46742 "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
@@ -45334,7 +46749,7 @@ int main() {
 dngettext()
 ; return 0; }
 EOF
-if { (eval echo configure:45338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46753: \"$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
@@ -45358,7 +46773,7 @@ else
 fi
 
   echo $ac_n "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:45362: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:46777: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
 ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dcngettext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -45366,7 +46781,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 45370 "configure"
+#line 46785 "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
@@ -45377,7 +46792,7 @@ int main() {
 dcngettext()
 ; return 0; }
 EOF
-if { (eval echo configure:45381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46796: \"$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
@@ -45401,7 +46816,7 @@ else
 fi
 
   echo $ac_n "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:45405: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:46820: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
 ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'bind_textdomain_codeset | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -45409,7 +46824,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 45413 "configure"
+#line 46828 "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
@@ -45420,7 +46835,7 @@ int main() {
 bind_textdomain_codeset()
 ; return 0; }
 EOF
-if { (eval echo configure:45424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46839: \"$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
@@ -45451,7 +46866,7 @@ fi
 php_with_gmp=no
 
 echo $ac_n "checking for GNU MP support""... $ac_c" 1>&6
-echo "configure:45455: checking for GNU MP support" >&5
+echo "configure:46870: checking for GNU MP support" >&5
 # Check whether --with-gmp or --without-gmp was given.
 if test "${with_gmp+set}" = set; then
   withval="$with_gmp"
@@ -45599,7 +47014,7 @@ if test "$PHP_GMP" != "no"; then
   done
 
   echo $ac_n "checking for __gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6
-echo "configure:45603: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5
+echo "configure:47018: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5
 ac_lib_var=`echo gmp'_'__gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -45607,7 +47022,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 45611 "configure"
+#line 47026 "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
@@ -45618,7 +47033,7 @@ int main() {
 __gmp_randinit_lc_2exp_size()
 ; return 0; }
 EOF
-if { (eval echo configure:45622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:47037: \"$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
@@ -45743,7 +47158,7 @@ else
   done
 
   echo $ac_n "checking for gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6
-echo "configure:45747: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5
+echo "configure:47162: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5
 ac_lib_var=`echo gmp'_'gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -45751,7 +47166,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 45755 "configure"
+#line 47170 "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
@@ -45762,7 +47177,7 @@ int main() {
 gmp_randinit_lc_2exp_size()
 ; return 0; }
 EOF
-if { (eval echo configure:45766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:47181: \"$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
@@ -46234,7 +47649,7 @@ fi
 php_with_mhash=no
 
 echo $ac_n "checking for mhash support""... $ac_c" 1>&6
-echo "configure:46238: checking for mhash support" >&5
+echo "configure:47653: checking for mhash support" >&5
 # Check whether --with-mhash or --without-mhash was given.
 if test "${with_mhash+set}" = set; then
   withval="$with_mhash"
@@ -46278,7 +47693,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_enable_hash=yes
 
 echo $ac_n "checking whether to enable hash support""... $ac_c" 1>&6
-echo "configure:46282: checking whether to enable hash support" >&5
+echo "configure:47697: checking whether to enable hash support" >&5
 # Check whether --enable-hash or --disable-hash was given.
 if test "${enable_hash+set}" = set; then
   enableval="$enable_hash"
@@ -46336,7 +47751,7 @@ EOF
 
 
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:46340: checking whether byte ordering is bigendian" >&5
+echo "configure:47755: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -46346,7 +47761,7 @@ else
   ac_cv_c_bigendian_php=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 46350 "configure"
+#line 47765 "configure"
 #include "confdefs.h"
 
 int main(void)
@@ -46362,7 +47777,7 @@ int main(void)
 }
   
 EOF
-if { (eval echo configure:46366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:47781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian_php=yes
 else
@@ -46387,7 +47802,7 @@ EOF
 
 
   echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:46391: checking size of short" >&5
+echo "configure:47806: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -46395,7 +47810,7 @@ else
   ac_cv_sizeof_short=2
 else
   cat > conftest.$ac_ext <<EOF
-#line 46399 "configure"
+#line 47814 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -46407,7 +47822,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:46411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:47826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -46427,7 +47842,7 @@ EOF
 
 
   echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:46431: checking size of int" >&5
+echo "configure:47846: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -46435,7 +47850,7 @@ else
   ac_cv_sizeof_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 46439 "configure"
+#line 47854 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -46447,7 +47862,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:46451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:47866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -46467,7 +47882,7 @@ EOF
 
 
   echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:46471: checking size of long" >&5
+echo "configure:47886: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -46475,7 +47890,7 @@ else
   ac_cv_sizeof_long=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 46479 "configure"
+#line 47894 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -46487,7 +47902,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:46491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:47906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -46507,7 +47922,7 @@ EOF
 
 
   echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:46511: checking size of long long" >&5
+echo "configure:47926: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -46515,7 +47930,7 @@ else
   ac_cv_sizeof_long_long=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 46519 "configure"
+#line 47934 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -46527,7 +47942,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:46531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:47946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -46873,10 +48288,13 @@ fi
 
 
 
+
+
+
 php_with_iconv=yes
 
 echo $ac_n "checking for iconv support""... $ac_c" 1>&6
-echo "configure:46880: checking for iconv support" >&5
+echo "configure:48298: checking for iconv support" >&5
 # Check whether --with-iconv or --without-iconv was given.
 if test "${with_iconv+set}" = set; then
   withval="$with_iconv"
@@ -46937,12 +48355,12 @@ if test "$PHP_ICONV" != "no"; then
 
         if test "$PHP_ICONV" = "yes"; then
     echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:46941: checking for iconv" >&5
+echo "configure:48359: checking for iconv" >&5
 if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 46946 "configure"
+#line 48364 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char iconv(); below.  */
@@ -46965,7 +48383,7 @@ iconv();
 
 ; return 0; }
 EOF
-if { (eval echo configure:46969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:48387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_iconv=yes"
 else
@@ -46986,12 +48404,12 @@ else
   echo "$ac_t""no" 1>&6
 
       echo $ac_n "checking for libiconv""... $ac_c" 1>&6
-echo "configure:46990: checking for libiconv" >&5
+echo "configure:48408: checking for libiconv" >&5
 if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 46995 "configure"
+#line 48413 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char libiconv(); below.  */
@@ -47014,7 +48432,7 @@ libiconv();
 
 ; return 0; }
 EOF
-if { (eval echo configure:47018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:48436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_libiconv=yes"
 else
@@ -47170,7 +48588,7 @@ EOF
   done
 
   echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:47174: checking for libiconv in -l$iconv_lib_name" >&5
+echo "configure:48592: checking for libiconv in -l$iconv_lib_name" >&5
 ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -47178,7 +48596,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$iconv_lib_name  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 47182 "configure"
+#line 48600 "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
@@ -47189,7 +48607,7 @@ int main() {
 libiconv()
 ; return 0; }
 EOF
-if { (eval echo configure:47193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:48611: \"$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
@@ -47330,7 +48748,7 @@ else
   done
 
   echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:47334: checking for iconv in -l$iconv_lib_name" >&5
+echo "configure:48752: checking for iconv in -l$iconv_lib_name" >&5
 ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -47338,7 +48756,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$iconv_lib_name  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 47342 "configure"
+#line 48760 "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
@@ -47349,7 +48767,7 @@ int main() {
 iconv()
 ; return 0; }
 EOF
-if { (eval echo configure:47353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:48771: \"$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
@@ -47560,16 +48978,16 @@ else
     fi 
 
     echo $ac_n "checking if iconv is glibc's""... $ac_c" 1>&6
-echo "configure:47564: checking if iconv is glibc's" >&5
+echo "configure:48982: checking if iconv is glibc's" >&5
     cat > conftest.$ac_ext <<EOF
-#line 47566 "configure"
+#line 48984 "configure"
 #include "confdefs.h"
 #include <gnu/libc-version.h>
 int main() {
 gnu_get_libc_version();
 ; return 0; }
 EOF
-if { (eval echo configure:47573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:48991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
       echo "$ac_t""yes" 1>&6
@@ -47587,7 +49005,7 @@ rm -f conftest*
 
     if test -z "$iconv_impl_name"; then
       echo $ac_n "checking if using GNU libiconv""... $ac_c" 1>&6
-echo "configure:47591: checking if using GNU libiconv" >&5
+echo "configure:49009: checking if using GNU libiconv" >&5
       php_iconv_old_ld="$LDFLAGS"
       LDFLAGS="-liconv $LDFLAGS"
       if test "$cross_compiling" = yes; then
@@ -47597,7 +49015,7 @@ echo "configure:47591: checking if using
       
 else
   cat > conftest.$ac_ext <<EOF
-#line 47601 "configure"
+#line 49019 "configure"
 #include "confdefs.h"
 
 #include <$PHP_ICONV_H_PATH>
@@ -47607,7 +49025,7 @@ int main() {
 }
       
 EOF
-if { (eval echo configure:47611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:49029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
         echo "$ac_t""yes" 1>&6
@@ -47629,16 +49047,16 @@ fi
 
     if test -z "$iconv_impl_name"; then
       echo $ac_n "checking if iconv is Konstantin Chuguev's""... $ac_c" 1>&6
-echo "configure:47633: checking if iconv is Konstantin Chuguev's" >&5
+echo "configure:49051: checking if iconv is Konstantin Chuguev's" >&5
       cat > conftest.$ac_ext <<EOF
-#line 47635 "configure"
+#line 49053 "configure"
 #include "confdefs.h"
 #include <iconv.h>
 int main() {
 iconv_ccs_init(NULL, NULL);
 ; return 0; }
 EOF
-if { (eval echo configure:47642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:49060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
         echo "$ac_t""yes" 1>&6
@@ -47657,18 +49075,18 @@ rm -f conftest*
 
     if test -z "$iconv_impl_name"; then
       echo $ac_n "checking if using IBM iconv""... $ac_c" 1>&6
-echo "configure:47661: checking if using IBM iconv" >&5
+echo "configure:49079: checking if using IBM iconv" >&5
       php_iconv_old_ld="$LDFLAGS"
       LDFLAGS="-liconv $LDFLAGS"
       cat > conftest.$ac_ext <<EOF
-#line 47665 "configure"
+#line 49083 "configure"
 #include "confdefs.h"
 #include <iconv.h>
 int main() {
 cstoccsid("");
 ; return 0; }
 EOF
-if { (eval echo configure:47672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:49090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
         echo "$ac_t""yes" 1>&6
@@ -47854,7 +49272,7 @@ EOF
     esac
 
     echo $ac_n "checking if iconv supports errno""... $ac_c" 1>&6
-echo "configure:47858: checking if iconv supports errno" >&5
+echo "configure:49276: checking if iconv supports errno" >&5
     if test "$cross_compiling" = yes; then
   
       echo "$ac_t""no" 1>&6
@@ -47868,7 +49286,7 @@ EOF
     
 else
   cat > conftest.$ac_ext <<EOF
-#line 47872 "configure"
+#line 49290 "configure"
 #include "confdefs.h"
 
 #include <$PHP_ICONV_H_PATH>
@@ -47889,7 +49307,7 @@ int main() {
 }
     
 EOF
-if { (eval echo configure:47893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:49311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
       echo "$ac_t""yes" 1>&6
@@ -47921,9 +49339,9 @@ fi
 
 
     echo $ac_n "checking if your cpp allows macro usage in include lines""... $ac_c" 1>&6
-echo "configure:47925: checking if your cpp allows macro usage in include lines" >&5
+echo "configure:49343: checking if your cpp allows macro usage in include lines" >&5
     cat > conftest.$ac_ext <<EOF
-#line 47927 "configure"
+#line 49345 "configure"
 #include "confdefs.h"
 
 #define FOO <$PHP_ICONV_H_PATH>
@@ -47933,7 +49351,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:47937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:49355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
       echo "$ac_t""yes" 1>&6
@@ -48289,7 +49707,7 @@ fi
 php_with_imap=no
 
 echo $ac_n "checking for IMAP support""... $ac_c" 1>&6
-echo "configure:48293: checking for IMAP support" >&5
+echo "configure:49711: checking for IMAP support" >&5
 # Check whether --with-imap or --without-imap was given.
 if test "${with_imap+set}" = set; then
   withval="$with_imap"
@@ -48333,7 +49751,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_kerberos=no
 
 echo $ac_n "checking for IMAP Kerberos support""... $ac_c" 1>&6
-echo "configure:48337: checking for IMAP Kerberos support" >&5
+echo "configure:49755: checking for IMAP Kerberos support" >&5
 # Check whether --with-kerberos or --without-kerberos was given.
 if test "${with_kerberos+set}" = set; then
   withval="$with_kerberos"
@@ -48356,7 +49774,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_imap_ssl=no
 
 echo $ac_n "checking for IMAP SSL support""... $ac_c" 1>&6
-echo "configure:48360: checking for IMAP SSL support" >&5
+echo "configure:49778: checking for IMAP SSL support" >&5
 # Check whether --with-imap-ssl or --without-imap-ssl was given.
 if test "${with_imap_ssl+set}" = set; then
   withval="$with_imap_ssl"
@@ -48760,7 +50178,7 @@ EOF
     done
 
         cat > conftest.$ac_ext <<EOF
-#line 48764 "configure"
+#line 50182 "configure"
 #include "confdefs.h"
 #include <$IMAP_INC_DIR/mail.h>
 EOF
@@ -48780,12 +50198,12 @@ rm -f conftest*
         old_CFLAGS=$CFLAGS
     CFLAGS="-I$IMAP_INC_DIR"
     echo $ac_n "checking for utf8_mime2text signature""... $ac_c" 1>&6
-echo "configure:48784: checking for utf8_mime2text signature" >&5
+echo "configure:50202: checking for utf8_mime2text signature" >&5
 if eval "test \"`echo '$''{'ac_cv_utf8_mime2text'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 48789 "configure"
+#line 50207 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -48798,7 +50216,7 @@ int main() {
       
 ; return 0; }
 EOF
-if { (eval echo configure:48802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:50220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
         ac_cv_utf8_mime2text=old
@@ -48827,12 +50245,12 @@ EOF
     old_CFLAGS=$CFLAGS
     CFLAGS="-I$IMAP_INC_DIR"
     echo $ac_n "checking for U8T_DECOMPOSE""... $ac_c" 1>&6
-echo "configure:48831: checking for U8T_DECOMPOSE" >&5
+echo "configure:50249: checking for U8T_DECOMPOSE" >&5
 if eval "test \"`echo '$''{'ac_cv_u8t_canonical'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 48836 "configure"
+#line 50254 "configure"
 #include "confdefs.h"
 
 #include <c-client.h>
@@ -48843,7 +50261,7 @@ int main() {
       
 ; return 0; }
 EOF
-if { (eval echo configure:48847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:50265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
          ac_cv_u8t_decompose=yes
@@ -48873,7 +50291,7 @@ echo "$ac_t""$ac_cv_u8t_canonical" 1>&6
         old_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=-I$IMAP_INC_DIR
     cat > conftest.$ac_ext <<EOF
-#line 48877 "configure"
+#line 50295 "configure"
 #include "confdefs.h"
 
 #include "imap4r1.h"
@@ -48992,7 +50410,7 @@ rm -f conftest*
   done
 
   echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6
-echo "configure:48996: checking for pam_start in -lpam" >&5
+echo "configure:50414: checking for pam_start in -lpam" >&5
 ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -49000,7 +50418,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpam  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 49004 "configure"
+#line 50422 "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
@@ -49011,7 +50429,7 @@ int main() {
 pam_start()
 ; return 0; }
 EOF
-if { (eval echo configure:49015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:50433: \"$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
@@ -49166,7 +50584,7 @@ fi
   done
 
   echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:49170: checking for crypt in -lcrypt" >&5
+echo "configure:50588: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -49174,7 +50592,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 49178 "configure"
+#line 50596 "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
@@ -49185,7 +50603,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:49189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:50607: \"$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
@@ -49389,7 +50807,7 @@ fi
     # Extract the first word of "krb5-config", so it can be a program name with args.
 set dummy krb5-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:49393: checking for $ac_word" >&5
+echo "configure:50811: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -49758,7 +51176,7 @@ else
 
   else
     cat > conftest.$ac_ext <<EOF
-#line 49762 "configure"
+#line 51180 "configure"
 #include "confdefs.h"
 #include <$IMAP_INC_DIR/linkage.h>
 EOF
@@ -49799,7 +51217,7 @@ rm -f conftest*
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:49803: checking for $ac_word" >&5
+echo "configure:51221: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -50004,9 +51422,9 @@ fi
     old_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=-I$OPENSSL_INCDIR
     echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
-echo "configure:50008: checking for OpenSSL version" >&5
+echo "configure:51426: checking for OpenSSL version" >&5
     cat > conftest.$ac_ext <<EOF
-#line 50010 "configure"
+#line 51428 "configure"
 #include "confdefs.h"
 
 #include <openssl/opensslv.h>
@@ -50161,7 +51579,7 @@ rm -f conftest*
   done
 
   echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:50165: checking for CRYPTO_free in -lcrypto" >&5
+echo "configure:51583: checking for CRYPTO_free in -lcrypto" >&5
 ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -50169,7 +51587,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 50173 "configure"
+#line 51591 "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
@@ -50180,7 +51598,7 @@ int main() {
 CRYPTO_free()
 ; return 0; }
 EOF
-if { (eval echo configure:50184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:51602: \"$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
@@ -50337,7 +51755,7 @@ fi
   done
 
   echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
-echo "configure:50341: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+echo "configure:51759: checking for SSL_CTX_set_ssl_version in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -50345,7 +51763,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 50349 "configure"
+#line 51767 "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
@@ -50356,7 +51774,7 @@ int main() {
 SSL_CTX_set_ssl_version()
 ; return 0; }
 EOF
-if { (eval echo configure:50360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:51778: \"$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
@@ -50498,7 +51916,7 @@ else
 
   elif test -f "$IMAP_INC_DIR/linkage.c"; then
     cat > conftest.$ac_ext <<EOF
-#line 50502 "configure"
+#line 51920 "configure"
 #include "confdefs.h"
 #include <$IMAP_INC_DIR/linkage.c>
 EOF
@@ -50529,7 +51947,7 @@ rm -f conftest*
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 50533 "configure"
+#line 51951 "configure"
 #include "confdefs.h"
 
     
@@ -50562,7 +51980,7 @@ else
     }
   
 EOF
-if { (eval echo configure:50566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:51984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -50598,7 +52016,7 @@ fi
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 50602 "configure"
+#line 52020 "configure"
 #include "confdefs.h"
 
     
@@ -50631,7 +52049,7 @@ else
     }
   
 EOF
-if { (eval echo configure:50635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:52053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -50658,7 +52076,7 @@ fi
 
 
     echo $ac_n "checking whether rfc822_output_address_list function present""... $ac_c" 1>&6
-echo "configure:50662: checking whether rfc822_output_address_list function present" >&5
+echo "configure:52080: checking whether rfc822_output_address_list function present" >&5
     
   old_LIBS=$LIBS
   LIBS="
@@ -50670,7 +52088,7 @@ echo "configure:50662: checking whether
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 50674 "configure"
+#line 52092 "configure"
 #include "confdefs.h"
 
     
@@ -50706,7 +52124,7 @@ else
     }
   
 EOF
-if { (eval echo configure:50710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:52128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -50735,7 +52153,7 @@ fi
 
 
     echo $ac_n "checking whether build with IMAP works""... $ac_c" 1>&6
-echo "configure:50739: checking whether build with IMAP works" >&5
+echo "configure:52157: checking whether build with IMAP works" >&5
     
   
   old_LIBS=$LIBS
@@ -50746,7 +52164,7 @@ echo "configure:50739: checking whether
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 50750 "configure"
+#line 52168 "configure"
 #include "confdefs.h"
 
     
@@ -50779,7 +52197,7 @@ else
     }
   
 EOF
-if { (eval echo configure:50783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:52201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -50811,7 +52229,7 @@ fi
 php_with_interbase=no
 
 echo $ac_n "checking for InterBase support""... $ac_c" 1>&6
-echo "configure:50815: checking for InterBase support" >&5
+echo "configure:52233: checking for InterBase support" >&5
 # Check whether --with-interbase or --without-interbase was given.
 if test "${with_interbase+set}" = set; then
   withval="$with_interbase"
@@ -50958,7 +52376,7 @@ if test "$PHP_INTERBASE" != "no"; then
   done
 
   echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6
-echo "configure:50962: checking for isc_detach_database in -lfbclient" >&5
+echo "configure:52380: checking for isc_detach_database in -lfbclient" >&5
 ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -50966,7 +52384,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lfbclient  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 50970 "configure"
+#line 52388 "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
@@ -50977,7 +52395,7 @@ int main() {
 isc_detach_database()
 ; return 0; }
 EOF
-if { (eval echo configure:50981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:52399: \"$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
@@ -51104,7 +52522,7 @@ else
   done
 
   echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6
-echo "configure:51108: checking for isc_detach_database in -lgds" >&5
+echo "configure:52526: checking for isc_detach_database in -lgds" >&5
 ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -51112,7 +52530,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgds  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 51116 "configure"
+#line 52534 "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
@@ -51123,7 +52541,7 @@ int main() {
 isc_detach_database()
 ; return 0; }
 EOF
-if { (eval echo configure:51127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:52545: \"$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
@@ -51250,7 +52668,7 @@ else
   done
 
   echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6
-echo "configure:51254: checking for isc_detach_database in -lib_util" >&5
+echo "configure:52672: checking for isc_detach_database in -lib_util" >&5
 ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -51258,7 +52676,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lib_util  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 51262 "configure"
+#line 52680 "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
@@ -51269,7 +52687,7 @@ int main() {
 isc_detach_database()
 ; return 0; }
 EOF
-if { (eval echo configure:51273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:52691: \"$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
@@ -51746,7 +53164,7 @@ fi
 php_enable_intl=no
 
 echo $ac_n "checking whether to enable internationalization support""... $ac_c" 1>&6
-echo "configure:51750: checking whether to enable internationalization support" >&5
+echo "configure:53168: checking whether to enable internationalization support" >&5
 # Check whether --enable-intl or --disable-intl was given.
 if test "${enable_intl+set}" = set; then
   enableval="$enable_intl"
@@ -51818,7 +53236,7 @@ ext_output=$PHP_ICU_DIR
         # Extract the first word of "icu-config", so it can be a program name with args.
 set dummy icu-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:51822: checking for $ac_word" >&5
+echo "configure:53240: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ICU_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -51856,7 +53274,7 @@ fi
   fi
 
   echo $ac_n "checking for location of ICU headers and libraries""... $ac_c" 1>&6
-echo "configure:51860: checking for location of ICU headers and libraries" >&5
+echo "configure:53278: checking for location of ICU headers and libraries" >&5
 
     icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
   if test "$?" != "0" || test -z "$icu_install_prefix"; then
@@ -51866,7 +53284,7 @@ echo "configure:51860: checking for loca
     echo "$ac_t""$icu_install_prefix" 1>&6
 
         echo $ac_n "checking for ICU 3.4 or greater""... $ac_c" 1>&6
-echo "configure:51870: checking for ICU 3.4 or greater" >&5
+echo "configure:53288: checking for ICU 3.4 or greater" >&5
     icu_version_full=`$ICU_CONFIG --version`
     ac_IFS=$IFS
     IFS="."
@@ -52023,7 +53441,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:52027: checking for $ac_word" >&5
+echo "configure:53445: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -52055,7 +53473,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:52059: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:53477: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -52066,12 +53484,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 52070 "configure"
+#line 53488 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:52075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:53493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -52097,12 +53515,12 @@ if test $ac_cv_prog_cxx_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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:52101: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:53519: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:52106: checking whether we are using GNU C++" >&5
+echo "configure:53524: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -52111,7 +53529,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:52115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:53533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -52130,7 +53548,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:52134: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:53552: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -52162,7 +53580,7 @@ else
 fi
 
     echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:52166: checking how to run the C++ preprocessor" >&5
+echo "configure:53584: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -52175,12 +53593,12 @@ ac_link='${CXX-g++} -o conftest${ac_exee
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 52179 "configure"
+#line 53597 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:52184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:53602: \"$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
   :
@@ -52738,7 +54156,7 @@ fi
 php_enable_json=yes
 
 echo $ac_n "checking whether to enable JavaScript Object Serialization support""... $ac_c" 1>&6
-echo "configure:52742: checking whether to enable JavaScript Object Serialization support" >&5
+echo "configure:54160: checking whether to enable JavaScript Object Serialization support" >&5
 # Check whether --enable-json or --disable-json was given.
 if test "${enable_json+set}" = set; then
   enableval="$enable_json"
@@ -52784,12 +54202,12 @@ if test "$PHP_JSON" != "no"; then
 EOF
 
   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:52788: checking for ANSI C header files" >&5
+echo "configure:54206: 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 52793 "configure"
+#line 54211 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -52797,7 +54215,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:52801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:54219: \"$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*
@@ -52814,7 +54232,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 52818 "configure"
+#line 54236 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -52832,7 +54250,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 52836 "configure"
+#line 54254 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -52853,7 +54271,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 52857 "configure"
+#line 54275 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -52864,7 +54282,7 @@ if (XOR (islower (i), ISLOWER (i)) || to
 exit (0); }
 
 EOF
-if { (eval echo configure:52868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:54286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -53214,7 +54632,7 @@ fi
 php_with_ldap=no
 
 echo $ac_n "checking for LDAP support""... $ac_c" 1>&6
-echo "configure:53218: checking for LDAP support" >&5
+echo "configure:54636: checking for LDAP support" >&5
 # Check whether --with-ldap or --without-ldap was given.
 if test "${with_ldap+set}" = set; then
   withval="$with_ldap"
@@ -53258,7 +54676,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_ldap_sasl=no
 
 echo $ac_n "checking for LDAP Cyrus SASL support""... $ac_c" 1>&6
-echo "configure:53262: checking for LDAP Cyrus SASL support" >&5
+echo "configure:54680: checking for LDAP Cyrus SASL support" >&5
 # Check whether --with-ldap-sasl or --without-ldap-sasl was given.
 if test "${with_ldap_sasl+set}" = set; then
   withval="$with_ldap_sasl"
@@ -55600,19 +57018,19 @@ EOF
   LIBS="$LIBS $LDAP_SHARED_LIBADD"
 
     echo $ac_n "checking for 3 arg ldap_set_rebind_proc""... $ac_c" 1>&6
-echo "configure:55604: checking for 3 arg ldap_set_rebind_proc" >&5
+echo "configure:57022: checking for 3 arg ldap_set_rebind_proc" >&5
 if eval "test \"`echo '$''{'ac_cv_3arg_setrebindproc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 55609 "configure"
+#line 57027 "configure"
 #include "confdefs.h"
 #include <ldap.h>
 int main() {
 ldap_set_rebind_proc(0,0,0)
 ; return 0; }
 EOF
-if { (eval echo configure:55616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:57034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_3arg_setrebindproc=yes
 else
@@ -55635,12 +57053,12 @@ EOF
       for ac_func in ldap_parse_result ldap_parse_reference ldap_start_tls_s
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:55639: checking for $ac_func" >&5
+echo "configure:57057: 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 55644 "configure"
+#line 57062 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -55663,7 +57081,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:55667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:57085: \"$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
@@ -55825,7 +57243,7 @@ EOF
   done
 
   echo $ac_n "checking for sasl_version in -lsasl2""... $ac_c" 1>&6
-echo "configure:55829: checking for sasl_version in -lsasl2" >&5
+echo "configure:57247: checking for sasl_version in -lsasl2" >&5
 ac_lib_var=`echo sasl2'_'sasl_version | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -55833,7 +57251,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsasl2  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 55837 "configure"
+#line 57255 "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
@@ -55844,7 +57262,7 @@ int main() {
 sasl_version()
 ; return 0; }
 EOF
-if { (eval echo configure:55848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:57266: \"$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
@@ -56013,12 +57431,12 @@ fi
   fi
 
         echo $ac_n "checking for ldap_bind_s""... $ac_c" 1>&6
-echo "configure:56017: checking for ldap_bind_s" >&5
+echo "configure:57435: checking for ldap_bind_s" >&5
 if eval "test \"`echo '$''{'ac_cv_func_ldap_bind_s'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 56022 "configure"
+#line 57440 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char ldap_bind_s(); below.  */
@@ -56041,7 +57459,7 @@ ldap_bind_s();
 
 ; return 0; }
 EOF
-if { (eval echo configure:56045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:57463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_ldap_bind_s=yes"
 else
@@ -56070,39 +57488,18 @@ fi
 
 
 
+php_with_libevent=no
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-php_enable_mbstring=no
-
-echo $ac_n "checking whether to enable multibyte string support""... $ac_c" 1>&6
-echo "configure:56098: checking whether to enable multibyte string support" >&5
-# Check whether --enable-mbstring or --disable-mbstring was given.
-if test "${enable_mbstring+set}" = set; then
-  enableval="$enable_mbstring"
-  PHP_MBSTRING=$enableval
+echo $ac_n "checking for libevent support""... $ac_c" 1>&6
+echo "configure:57495: checking for libevent support" >&5
+# Check whether --with-libevent or --without-libevent was given.
+if test "${with_libevent+set}" = set; then
+  withval="$with_libevent"
+  PHP_LIBEVENT=$withval
 else
   
-  PHP_MBSTRING=no
-  test "$PHP_ENABLE_ALL" && PHP_MBSTRING=$PHP_ENABLE_ALL
+  PHP_LIBEVENT=no
+  test "$PHP_ENABLE_ALL" && PHP_LIBEVENT=$PHP_ENABLE_ALL
 
 fi
 
@@ -56110,12 +57507,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_MBSTRING in
+case $PHP_LIBEVENT in
 shared,*)
-  PHP_MBSTRING=`echo "$PHP_MBSTRING"|$SED 's/^shared,//'`
+  PHP_LIBEVENT=`echo "$PHP_LIBEVENT"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_MBSTRING=yes
+  PHP_LIBEVENT=yes
   ;;
 no)
   ext_output=no
@@ -56134,723 +57531,881 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
+if test "$PHP_LIBEVENT" != "no"; then
+  SEARCH_PATH="/usr /usr/local"
+  SEARCH_FOR="/include/event.h"
+
+  if test "$PHP_LIBEVENT" = "yes"; then
+    echo $ac_n "checking for libevent headers in default path""... $ac_c" 1>&6
+echo "configure:57541: checking for libevent headers in default path" >&5
+    for i in $SEARCH_PATH ; do
+      if test -r $i/$SEARCH_FOR; then
+        LIBEVENT_DIR=$i
+        echo "$ac_t""found in $i" 1>&6
+      fi
+    done
+  else
+    echo $ac_n "checking for libevent headers in $PHP_LIBEVENT""... $ac_c" 1>&6
+echo "configure:57550: checking for libevent headers in $PHP_LIBEVENT" >&5
+    if test -r $PHP_LIBEVENT/$SEARCH_FOR; then
+      LIBEVENT_DIR=$PHP_LIBEVENT
+      echo "$ac_t""found" 1>&6
+    fi
+  fi
 
-php_enable_mbregex=yes
+  if test -z "$LIBEVENT_DIR"; then
+    echo "$ac_t""not found" 1>&6
+    { echo "configure: error: Cannot find libevent headers" 1>&2; exit 1; }
+  fi
 
-echo $ac_n "checking whether to enable multibyte regex support""... $ac_c" 1>&6
-echo "configure:56142: checking whether to enable multibyte regex support" >&5
-# Check whether --enable-mbregex or --disable-mbregex was given.
-if test "${enable_mbregex+set}" = set; then
-  enableval="$enable_mbregex"
-  PHP_MBREGEX=$enableval
-else
   
-  PHP_MBREGEX=yes
-  
-
-fi
-
-
-ext_output=$PHP_MBREGEX
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-
-php_enable_mbregex_backtrack=yes
+  if test "$LIBEVENT_DIR/include" != "/usr/include"; then
+    
+  if test -z "$LIBEVENT_DIR/include" || echo "$LIBEVENT_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$LIBEVENT_DIR/include
+  else
+    
+    ep_dir="`echo $LIBEVENT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$LIBEVENT_DIR/include\"`"
+  fi
 
-echo $ac_n "checking whether to check multibyte regex backtrack""... $ac_c" 1>&6
-echo "configure:56165: checking whether to check multibyte regex backtrack" >&5
-# Check whether --enable-mbregex_backtrack or --disable-mbregex_backtrack was given.
-if test "${enable_mbregex_backtrack+set}" = set; then
-  enableval="$enable_mbregex_backtrack"
-  PHP_MBREGEX_BACKTRACK=$enableval
-else
+    
   
-  PHP_MBREGEX_BACKTRACK=yes
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-fi
-
-
-ext_output=$PHP_MBREGEX_BACKTRACK
-echo "$ac_t""$ext_output" 1>&6
-
-
+  fi
 
 
+  LIBNAME=event
+  LIBSYMBOL=event_base_new
 
-php_with_libmbfl=no
+  if test "x$PHP_LIBDIR" = "x"; then
+    PHP_LIBDIR=lib
+  fi
 
-echo $ac_n "checking for external libmbfl""... $ac_c" 1>&6
-echo "configure:56188: checking for external libmbfl" >&5
-# Check whether --with-libmbfl or --without-libmbfl was given.
-if test "${with_libmbfl+set}" = set; then
-  withval="$with_libmbfl"
-  PHP_LIBMBFL=$withval
-else
   
-  PHP_LIBMBFL=no
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    -L$LIBEVENT_DIR/$PHP_LIBDIR 
+  "
   
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-fi
-
-
-ext_output=$PHP_LIBMBFL
-echo "$ac_t""$ext_output" 1>&6
-
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
 
+    fi
+   ;;
+  esac
 
 
-php_with_onig=no
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-echo $ac_n "checking for external oniguruma""... $ac_c" 1>&6
-echo "configure:56211: checking for external oniguruma" >&5
-# Check whether --with-onig or --without-onig was given.
-if test "${with_onig+set}" = set; then
-  withval="$with_onig"
-  PHP_ONIG=$withval
-else
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-  PHP_ONIG=no
   
-
-fi
-
-
-ext_output=$PHP_ONIG
-echo "$ac_t""$ext_output" 1>&6
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
 
+      fi
+    
+  fi
 
+    ;;
+    esac
+  done
 
-if test "$PHP_MBSTRING" != "no"; then  
-  cat >> confdefs.h <<\EOF
-#define HAVE_MBSTRING 1
-EOF
-
-
-  
-  PHP_MBSTRING_BASE_SOURCES="$PHP_MBSTRING_BASE_SOURCES mbstring.c php_unicode.c mb_gpc.c"
-
-
-  if test "$PHP_MBREGEX" != "no"; then
-    
-  if test "$PHP_MBREGEX" = "yes"; then
-    if test "$PHP_ONIG" = "yes" || test "$PHP_ONIG" = "no"; then
-                        if test "$PHP_MBREGEX_BACKTRACK" != "no"; then
-        cat >> confdefs.h <<\EOF
-#define USE_COMBINATION_EXPLOSION_CHECK 1
-EOF
-
-      fi
-
-      echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
-echo "configure:56252: checking for variable length prototypes and stdarg.h" >&5
-if eval "test \"`echo '$''{'php_cv_mbstring_stdarg'+set}'`\" = set"; then
+  echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6
+echo "configure:57699: checking for $LIBSYMBOL in -l$LIBNAME" >&5
+ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | 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 "$cross_compiling" = yes; then
-  
-                    case $host_alias in
-          *netware*)
-          php_cv_mbstring_stdarg=yes
-          ;;
-          *)
-          php_cv_mbstring_stdarg=no
-          ;;
-          esac
-        
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56270 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-l$LIBNAME  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 57707 "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 $LIBSYMBOL();
 
-#include <stdarg.h>
-int foo(int x, ...) {
-	va_list va;
-	va_start(va, x);
-	va_arg(va, int);
-	va_arg(va, char *);
-	va_arg(va, double);
-	return 0;
-}
-int main() { return foo(10, "", 3.14); }
-        
-EOF
-if { (eval echo configure:56285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  php_cv_mbstring_stdarg=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  php_cv_mbstring_stdarg=no
-fi
-rm -fr conftest*
-fi
-
-      
-fi
-
-echo "$ac_t""$php_cv_mbstring_stdarg" 1>&6
-
-      for ac_hdr in stdlib.h string.h strings.h unistd.h sys/time.h sys/times.h stdarg.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:56306: checking for $ac_hdr" >&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 56311 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
+int main() {
+$LIBSYMBOL()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:56316: \"$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
+if { (eval echo configure:57718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_lib_$ac_lib_var=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"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
+LIBS="$ac_save_LIBS"
 
-      echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:56343: checking size of int" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_int=4
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56351 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(int));
-  exit(0);
-}
-EOF
-if { (eval echo configure:56363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_int=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_int=0
-fi
-rm -fr conftest*
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+    
 
-fi
-echo "$ac_t""$ac_cv_sizeof_int" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-EOF
+  if test "$ext_shared" = "yes"; then
+    LIBEVENT_SHARED_LIBADD="-l$LIBNAME $LIBEVENT_SHARED_LIBADD"
+    if test -n "$LIBEVENT_DIR/$PHP_LIBDIR"; then
+      
+  if test "$LIBEVENT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEVENT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$LIBEVENT_DIR/$PHP_LIBDIR" || echo "$LIBEVENT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$LIBEVENT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $LIBEVENT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$LIBEVENT_DIR/$PHP_LIBDIR\"`"
+  fi
 
+    
+      if test "$ext_shared" = "yes"; then
+        LIBEVENT_SHARED_LIBADD="-L$ai_p $LIBEVENT_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && LIBEVENT_SHARED_LIBADD="$ld_runpath_switch$ai_p $LIBEVENT_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-      echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:56383: checking size of short" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_short=2
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56391 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(short));
-  exit(0);
-}
-EOF
-if { (eval echo configure:56403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_short=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_short=0
-fi
-rm -fr conftest*
-fi
 
-fi
-echo "$ac_t""$ac_cv_sizeof_short" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-EOF
+      fi
+    
+  fi
 
+    fi
+  else
+    
 
-      echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:56423: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_long=4
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56431 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long));
-  exit(0);
-}
-EOF
-if { (eval echo configure:56443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long=0
-fi
-rm -fr conftest*
-fi
+  if test -n "$LIBEVENT_DIR/$PHP_LIBDIR"; then
+    
+  if test "$LIBEVENT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEVENT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$LIBEVENT_DIR/$PHP_LIBDIR" || echo "$LIBEVENT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$LIBEVENT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $LIBEVENT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$LIBEVENT_DIR/$PHP_LIBDIR\"`"
+  fi
 
-fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-EOF
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
 
-      echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:56463: 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 56468 "configure"
-#include "confdefs.h"
+    
+  fi
 
-int main() {
+  fi
+  
+  
+  case $LIBNAME in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-l$LIBNAME $LIBS" 
+   ;;
+  esac
 
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
 
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
 
-; return 0; }
-EOF
-if { (eval echo configure:56517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
 
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
+  fi
 
-fi
 
-      echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:56538: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56543 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:56552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_header_time=yes
+  
+  
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_time=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
-  cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
+  echo "$ac_t""no" 1>&6
 
-fi
- 
-      # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments.  Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:56575: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56580 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:56587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_header_alloca_h=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_$LIBNAME_$LIBSYMBOL
+    
+    { echo "configure: error: wrong libevent version {1.4.+ is required} or lib not found" 1>&2; exit 1; }
+  
+  
 fi
 
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
 
-fi
+  
+  am_i_shared=$PHP_LIBEVENT_SHARED
+  is_it_shared=$PHP_SOCKETS_SHARED
+  is_it_enabled=$PHP_SOCKETS
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension libevent to build statically, but it
+depends on extension sockets, which you've configured to build shared.
+You either need to build libevent shared or build sockets statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension libevent, which depends on extension sockets,
+but you've either not enabled sockets, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST LIBEVENT_SHARED_LIBADD"
 
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:56608: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56613 "configure"
-#include "confdefs.h"
+  
+  ext_builddir=ext/libevent
+  ext_srcdir=$abs_srcdir/ext/libevent
 
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
-#endif
+  ac_extra=
 
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:56641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_func_alloca_works=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_LIBEVENT_SHARED=no
+    
+  
+  case ext/libevent in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/libevent"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/libevent/"; ac_bdir="ext/libevent/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-fi
 
-if test $ac_cv_func_alloca_works = no; then
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
-  cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
+  old_IFS=$IFS
+  for ac_src in libevent.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:56673: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 56678 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC libevent"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC libevent"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_LIBEVENT_SHARED=yes
+      
+  case ext/libevent in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/libevent"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/libevent/"; ac_bdir="ext/libevent/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in libevent.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_libevent="$shared_objects_libevent $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "webecray" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_os_cray=yes
-else
-  rm -rf conftest*
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
+  done
 
-fi
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
 
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
-  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:56703: 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 56708 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.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 $ac_func();
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phplibevent.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_libevent) $(PHPLIBEVENT_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phplibevent.so '$ext_builddir'/phplibevent.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_libevent) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPLIBEVENT, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_libevent) $(PHPLIBEVENT_SHARED_LIBADD)'
+      ;;
+  esac
 
-int main() {
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phplibevent.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phplibevent.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_libevent"
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phplibevent.$suffix: $ext_builddir/phplibevent.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phplibevent.$suffix \$(phplibdir)
+
+$ext_builddir/phplibevent.$suffix: \$(shared_objects_libevent) \$(PHPLIBEVENT_SHARED_DEPENDENCIES)
+	$link_cmd
 
-; return 0; }
 EOF
-if { (eval echo configure:56731: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/libevent.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_libevent) $(LIBEVENT_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/libevent.so '$ext_builddir'/libevent.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_libevent) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(LIBEVENT, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_libevent) $(LIBEVENT_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/libevent.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/libevent.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_libevent"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/libevent.$suffix: $ext_builddir/libevent.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/libevent.$suffix \$(phplibdir)
+
+$ext_builddir/libevent.$suffix: \$(shared_objects_libevent) \$(LIBEVENT_SHARED_DEPENDENCIES)
+	$link_cmd
+
 EOF
 
-  break
-else
-  echo "$ac_t""no" 1>&6
-fi
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_LIBEVENT 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_LIBEVENT_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/libevent in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/libevent"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/libevent/"; ac_bdir="ext/libevent/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in libevent.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC libevent"
+        ;;
+      *)
+        
+  
+  case ext/libevent in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/libevent"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/libevent/"; ac_bdir="ext/libevent/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in libevent.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC libevent"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=libevent
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
 
-done
 fi
 
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:56758: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+php_enable_mbstring=no
+
+echo $ac_n "checking whether to enable multibyte string support""... $ac_c" 1>&6
+echo "configure:58191: checking whether to enable multibyte string support" >&5
+# Check whether --enable-mbstring or --disable-mbstring was given.
+if test "${enable_mbstring+set}" = set; then
+  enableval="$enable_mbstring"
+  PHP_MBSTRING=$enableval
 else
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_stack_direction=0
+  
+  PHP_MBSTRING=no
+  test "$PHP_ENABLE_ALL" && PHP_MBSTRING=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_MBSTRING in
+shared,*)
+  PHP_MBSTRING=`echo "$PHP_MBSTRING"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_MBSTRING=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_enable_mbregex=yes
+
+echo $ac_n "checking whether to enable multibyte regex support""... $ac_c" 1>&6
+echo "configure:58235: checking whether to enable multibyte regex support" >&5
+# Check whether --enable-mbregex or --disable-mbregex was given.
+if test "${enable_mbregex+set}" = set; then
+  enableval="$enable_mbregex"
+  PHP_MBREGEX=$enableval
 else
-  cat > conftest.$ac_ext <<EOF
-#line 56766 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
-  exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:56785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_stack_direction=1
+  
+  PHP_MBREGEX=yes
+  
+
+fi
+
+
+ext_output=$PHP_MBREGEX
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_enable_mbregex_backtrack=yes
+
+echo $ac_n "checking whether to check multibyte regex backtrack""... $ac_c" 1>&6
+echo "configure:58258: checking whether to check multibyte regex backtrack" >&5
+# Check whether --enable-mbregex_backtrack or --disable-mbregex_backtrack was given.
+if test "${enable_mbregex_backtrack+set}" = set; then
+  enableval="$enable_mbregex_backtrack"
+  PHP_MBREGEX_BACKTRACK=$enableval
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
+  
+  PHP_MBREGEX_BACKTRACK=yes
+  
+
 fi
-rm -fr conftest*
+
+
+ext_output=$PHP_MBREGEX_BACKTRACK
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_with_libmbfl=no
+
+echo $ac_n "checking for external libmbfl""... $ac_c" 1>&6
+echo "configure:58281: checking for external libmbfl" >&5
+# Check whether --with-libmbfl or --without-libmbfl was given.
+if test "${with_libmbfl+set}" = set; then
+  withval="$with_libmbfl"
+  PHP_LIBMBFL=$withval
+else
+  
+  PHP_LIBMBFL=no
+  
+
 fi
 
+
+ext_output=$PHP_LIBMBFL
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_with_onig=no
+
+echo $ac_n "checking for external oniguruma""... $ac_c" 1>&6
+echo "configure:58304: checking for external oniguruma" >&5
+# Check whether --with-onig or --without-onig was given.
+if test "${with_onig+set}" = set; then
+  withval="$with_onig"
+  PHP_ONIG=$withval
+else
+  
+  PHP_ONIG=no
+  
+
 fi
 
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
+
+ext_output=$PHP_ONIG
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_MBSTRING" != "no"; then  
+  cat >> confdefs.h <<\EOF
+#define HAVE_MBSTRING 1
 EOF
 
-fi
 
-      echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:56807: checking for 8-bit clean memcmp" >&5
-if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
+  
+  PHP_MBSTRING_BASE_SOURCES="$PHP_MBSTRING_BASE_SOURCES mbstring.c php_unicode.c mb_gpc.c"
+
+
+  if test "$PHP_MBREGEX" != "no"; then
+    
+  if test "$PHP_MBREGEX" = "yes"; then
+    if test "$PHP_ONIG" = "yes" || test "$PHP_ONIG" = "no"; then
+                        if test "$PHP_MBREGEX_BACKTRACK" != "no"; then
+        cat >> confdefs.h <<\EOF
+#define USE_COMBINATION_EXPLOSION_CHECK 1
+EOF
+
+      fi
+
+      echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
+echo "configure:58345: checking for variable length prototypes and stdarg.h" >&5
+if eval "test \"`echo '$''{'php_cv_mbstring_stdarg'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_memcmp_clean=no
+  
+        if test "$cross_compiling" = yes; then
+  
+                    case $host_alias in
+          *netware*)
+          php_cv_mbstring_stdarg=yes
+          ;;
+          *)
+          php_cv_mbstring_stdarg=no
+          ;;
+          esac
+        
 else
   cat > conftest.$ac_ext <<EOF
-#line 56815 "configure"
+#line 58363 "configure"
 #include "confdefs.h"
 
-main()
-{
-  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
-  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
+#include <stdarg.h>
+int foo(int x, ...) {
+	va_list va;
+	va_start(va, x);
+	va_arg(va, int);
+	va_arg(va, char *);
+	va_arg(va, double);
+	return 0;
 }
-
+int main() { return foo(10, "", 3.14); }
+        
 EOF
-if { (eval echo configure:56825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:58378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  ac_cv_func_memcmp_clean=yes
+  php_cv_mbstring_stdarg=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_func_memcmp_clean=no
+  php_cv_mbstring_stdarg=no
 fi
 rm -fr conftest*
 fi
 
+      
 fi
 
-echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
-test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+echo "$ac_t""$php_cv_mbstring_stdarg" 1>&6
 
-      ac_safe=`echo "stdarg.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdarg.h""... $ac_c" 1>&6
-echo "configure:56844: checking for stdarg.h" >&5
+      for ac_hdr in stdlib.h string.h strings.h unistd.h sys/time.h sys/times.h stdarg.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:58399: checking for $ac_hdr" >&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 56849 "configure"
+#line 58404 "configure"
 #include "confdefs.h"
-#include <stdarg.h>
+#include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:56854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:58409: \"$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*
@@ -56866,9 +58421,547 @@ rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  
-        cat >> confdefs.h <<\EOF
-#define HAVE_STDARG_PROTOTYPES 1
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+      echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:58436: checking size of int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_int=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58444 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(int));
+  exit(0);
+}
+EOF
+if { (eval echo configure:58456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_int=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_int=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+EOF
+
+
+      echo $ac_n "checking size of short""... $ac_c" 1>&6
+echo "configure:58476: checking size of short" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_short=2
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58484 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(short));
+  exit(0);
+}
+EOF
+if { (eval echo configure:58496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_short=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_short=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_short" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+EOF
+
+
+      echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:58516: checking size of long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_long=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58524 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:58536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_long=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
+
+
+      echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:58556: 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 58561 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:58610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+
+      echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:58631: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58636 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:58645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+ 
+      # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:58668: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58673 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:58680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_header_alloca_h=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:58701: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58706 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:58734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_func_alloca_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+  # that cause trouble.  Some versions do not even contain alloca or
+  # contain a buggy version.  If you still want to use their alloca,
+  # use ar to extract alloca.o from them instead of compiling alloca.c.
+  ALLOCA=alloca.${ac_objext}
+  cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:58766: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58771 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "webecray" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_os_cray=yes
+else
+  rm -rf conftest*
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:58796: 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 58801 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:58824: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+  break
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:58851: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58859 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+  exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:58878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_c_stack_direction=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+      echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
+echo "configure:58900: checking for 8-bit clean memcmp" >&5
+if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_clean=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 58908 "configure"
+#include "confdefs.h"
+
+main()
+{
+  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
+}
+
+EOF
+if { (eval echo configure:58918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_memcmp_clean=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_memcmp_clean=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
+test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+
+      ac_safe=`echo "stdarg.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for stdarg.h""... $ac_c" 1>&6
+echo "configure:58937: checking for stdarg.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 58942 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:58947: \"$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
+  
+        cat >> confdefs.h <<\EOF
+#define HAVE_STDARG_PROTOTYPES 1
 EOF
 
       
@@ -57080,7 +59173,7 @@ EOF
   done
 
   echo $ac_n "checking for onig_init in -lonig""... $ac_c" 1>&6
-echo "configure:57084: checking for onig_init in -lonig" >&5
+echo "configure:59177: checking for onig_init in -lonig" >&5
 ac_lib_var=`echo onig'_'onig_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -57088,7 +59181,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lonig  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 57092 "configure"
+#line 59185 "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
@@ -57099,7 +59192,7 @@ int main() {
 onig_init()
 ; return 0; }
 EOF
-if { (eval echo configure:57103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:59196: \"$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
@@ -57325,9 +59418,9 @@ fi
   done
 
       echo $ac_n "checking if oniguruma has an invalid entry for KOI8 encoding""... $ac_c" 1>&6
-echo "configure:57329: checking if oniguruma has an invalid entry for KOI8 encoding" >&5
+echo "configure:59422: checking if oniguruma has an invalid entry for KOI8 encoding" >&5
       cat > conftest.$ac_ext <<EOF
-#line 57331 "configure"
+#line 59424 "configure"
 #include "confdefs.h"
 
 #include <oniguruma.h>
@@ -57338,7 +59431,7 @@ return (int)(ONIG_ENCODING_KOI8 + 1);
       
 ; return 0; }
 EOF
-if { (eval echo configure:57342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:59435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
         echo "$ac_t""no" 1>&6
@@ -57636,7 +59729,7 @@ EOF
   done
 
   echo $ac_n "checking for mbfl_buffer_converter_new in -lmbfl""... $ac_c" 1>&6
-echo "configure:57640: checking for mbfl_buffer_converter_new in -lmbfl" >&5
+echo "configure:59733: checking for mbfl_buffer_converter_new in -lmbfl" >&5
 ac_lib_var=`echo mbfl'_'mbfl_buffer_converter_new | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -57644,7 +59737,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmbfl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 57648 "configure"
+#line 59741 "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
@@ -57655,7 +59748,7 @@ int main() {
 mbfl_buffer_converter_new()
 ; return 0; }
 EOF
-if { (eval echo configure:57659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:59752: \"$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
@@ -58292,7 +60385,7 @@ fi
 php_with_mcrypt=no
 
 echo $ac_n "checking for mcrypt support""... $ac_c" 1>&6
-echo "configure:58296: checking for mcrypt support" >&5
+echo "configure:60389: checking for mcrypt support" >&5
 # Check whether --with-mcrypt or --without-mcrypt was given.
 if test "${with_mcrypt+set}" = set; then
   withval="$with_mcrypt"
@@ -58345,9 +60438,9 @@ if test "$PHP_MCRYPT" != "no"; then
   old_CPPFLAGS=$CPPFLAGS
   CPPFLAGS=-I$MCRYPT_DIR/include
   echo $ac_n "checking for libmcrypt version""... $ac_c" 1>&6
-echo "configure:58349: checking for libmcrypt version" >&5
+echo "configure:60442: checking for libmcrypt version" >&5
   cat > conftest.$ac_ext <<EOF
-#line 58351 "configure"
+#line 60444 "configure"
 #include "confdefs.h"
 
 #include <mcrypt.h>
@@ -58471,7 +60564,7 @@ rm -f conftest*
   done
 
   echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6
-echo "configure:58475: checking for mcrypt_module_open in -lmcrypt" >&5
+echo "configure:60568: checking for mcrypt_module_open in -lmcrypt" >&5
 ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -58479,7 +60572,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 58483 "configure"
+#line 60576 "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
@@ -58490,7 +60583,7 @@ int main() {
 mcrypt_module_open()
 ; return 0; }
 EOF
-if { (eval echo configure:58494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:60587: \"$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
@@ -58643,7 +60736,7 @@ else
   done
 
   echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6
-echo "configure:58647: checking for mcrypt_module_open in -lmcrypt" >&5
+echo "configure:60740: checking for mcrypt_module_open in -lmcrypt" >&5
 ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -58651,7 +60744,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 58655 "configure"
+#line 60748 "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
@@ -58662,7 +60755,7 @@ int main() {
 mcrypt_module_open()
 ; return 0; }
 EOF
-if { (eval echo configure:58666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:60759: \"$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
@@ -59135,7 +61228,7 @@ fi
 php_with_mssql=no
 
 echo $ac_n "checking for MSSQL support via FreeTDS""... $ac_c" 1>&6
-echo "configure:59139: checking for MSSQL support via FreeTDS" >&5
+echo "configure:61232: checking for MSSQL support via FreeTDS" >&5
 # Check whether --with-mssql or --without-mssql was given.
 if test "${with_mssql+set}" = set; then
   withval="$with_mssql"
@@ -59633,7 +61726,7 @@ EOF
   fi
 
   echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:59637: checking for dnet_addr in -ldnet_stub" >&5
+echo "configure:61730: checking for dnet_addr in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -59641,7 +61734,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 59645 "configure"
+#line 61738 "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
@@ -59652,7 +61745,7 @@ int main() {
 dnet_addr()
 ; return 0; }
 EOF
-if { (eval echo configure:59656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:61749: \"$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
@@ -59796,7 +61889,7 @@ fi
 php_with_mysql=no
 
 echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
-echo "configure:59800: checking for MySQL support" >&5
+echo "configure:61893: checking for MySQL support" >&5
 # Check whether --with-mysql or --without-mysql was given.
 if test "${with_mysql+set}" = set; then
   withval="$with_mysql"
@@ -59840,7 +61933,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_with_mysql_sock=no
 
 echo $ac_n "checking for specified location of the MySQL UNIX socket""... $ac_c" 1>&6
-echo "configure:59844: checking for specified location of the MySQL UNIX socket" >&5
+echo "configure:61937: checking for specified location of the MySQL UNIX socket" >&5
 # Check whether --with-mysql-sock or --without-mysql-sock was given.
 if test "${with_mysql_sock+set}" = set; then
   withval="$with_mysql_sock"
@@ -59864,7 +61957,7 @@ if test -z "$PHP_ZLIB_DIR"; then
 php_with_zlib_dir=no
 
 echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:59868: checking for the location of libz" >&5
+echo "configure:61961: checking for the location of libz" >&5
 # Check whether --with-zlib-dir or --without-zlib-dir was given.
 if test "${with_zlib_dir+set}" = set; then
   withval="$with_zlib_dir"
@@ -60038,7 +62131,7 @@ Note that the MySQL client library is no
   done
 
   echo $ac_n "checking for mysql_close in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:60042: checking for mysql_close in -l$MYSQL_LIBNAME" >&5
+echo "configure:62135: checking for mysql_close in -l$MYSQL_LIBNAME" >&5
 ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_close | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -60046,7 +62139,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$MYSQL_LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 60050 "configure"
+#line 62143 "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
@@ -60057,7 +62150,7 @@ int main() {
 mysql_close()
 ; return 0; }
 EOF
-if { (eval echo configure:60061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:62154: \"$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
@@ -60280,7 +62373,7 @@ else
   done
 
   echo $ac_n "checking for mysql_error in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:60284: checking for mysql_error in -l$MYSQL_LIBNAME" >&5
+echo "configure:62377: checking for mysql_error in -l$MYSQL_LIBNAME" >&5
 ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_error | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -60288,7 +62381,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$MYSQL_LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 60292 "configure"
+#line 62385 "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
@@ -60299,7 +62392,7 @@ int main() {
 mysql_error()
 ; return 0; }
 EOF
-if { (eval echo configure:60303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:62396: \"$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
@@ -60454,7 +62547,7 @@ fi
   done
 
   echo $ac_n "checking for mysql_errno in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:60458: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5
+echo "configure:62551: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5
 ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_errno | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -60462,7 +62555,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$MYSQL_LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 60466 "configure"
+#line 62559 "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
@@ -60473,7 +62566,7 @@ int main() {
 mysql_errno()
 ; return 0; }
 EOF
-if { (eval echo configure:60477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:62570: \"$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
@@ -60667,7 +62760,7 @@ fi
 
 if test "$PHP_MYSQL" != "no"; then
   echo $ac_n "checking for MySQL UNIX socket location""... $ac_c" 1>&6
-echo "configure:60671: checking for MySQL UNIX socket location" >&5
+echo "configure:62764: checking for MySQL UNIX socket location" >&5
   if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
     MYSQL_SOCK=$PHP_MYSQL_SOCK
     cat >> confdefs.h <<EOF
@@ -61040,7 +63133,7 @@ fi
 php_with_mysqli=no
 
 echo $ac_n "checking for MySQLi support""... $ac_c" 1>&6
-echo "configure:61044: checking for MySQLi support" >&5
+echo "configure:63137: checking for MySQLi support" >&5
 # Check whether --with-mysqli or --without-mysqli was given.
 if test "${with_mysqli+set}" = set; then
   withval="$with_mysqli"
@@ -61084,7 +63177,7 @@ echo "$ac_t""$ext_output" 1>&6
 php_enable_embedded_mysqli=no
 
 echo $ac_n "checking whether to enable embedded MySQLi support""... $ac_c" 1>&6
-echo "configure:61088: checking whether to enable embedded MySQLi support" >&5
+echo "configure:63181: checking whether to enable embedded MySQLi support" >&5
 # Check whether --enable-embedded_mysqli or --disable-embedded_mysqli was given.
 if test "${enable_embedded_mysqli+set}" = set; then
   enableval="$enable_embedded_mysqli"
@@ -61235,7 +63328,7 @@ EOF
   done
 
   echo $ac_n "checking for mysql_set_server_option in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6
-echo "configure:61239: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5
+echo "configure:63332: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5
 ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_set_server_option | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -61243,7 +63336,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$MYSQL_LIB_NAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 61247 "configure"
+#line 63340 "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
@@ -61254,7 +63347,7 @@ int main() {
 mysql_set_server_option()
 ; return 0; }
 EOF
-if { (eval echo configure:61258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:63351: \"$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
@@ -61502,7 +63595,7 @@ EOF
   done
 
   echo $ac_n "checking for mysql_set_character_set in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6
-echo "configure:61506: checking for mysql_set_character_set in -l$MYSQL_LIB_NAME" >&5
+echo "configure:63599: checking for mysql_set_character_set in -l$MYSQL_LIB_NAME" >&5
 ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_set_character_set | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -61510,7 +63603,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$MYSQL_LIB_NAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 61514 "configure"
+#line 63607 "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
@@ -61521,7 +63614,7 @@ int main() {
 mysql_set_character_set()
 ; return 0; }
 EOF
-if { (eval echo configure:61525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:63618: \"$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
@@ -61665,7 +63758,7 @@ fi
   done
 
   echo $ac_n "checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6
-echo "configure:61669: checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME" >&5
+echo "configure:63762: checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME" >&5
 ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_stmt_next_result | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -61673,7 +63766,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$MYSQL_LIB_NAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 61677 "configure"
+#line 63770 "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
@@ -61684,7 +63777,7 @@ int main() {
 mysql_stmt_next_result()
 ; return 0; }
 EOF
-if { (eval echo configure:61688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:63781: \"$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
@@ -62087,7 +64180,7 @@ fi
 php_with_oci8=no
 
 echo $ac_n "checking for Oracle Database OCI8 support""... $ac_c" 1>&6
-echo "configure:62091: checking for Oracle Database OCI8 support" >&5
+echo "configure:64184: checking for Oracle Database OCI8 support" >&5
 # Check whether --with-oci8 or --without-oci8 was given.
 if test "${with_oci8+set}" = set; then
   withval="$with_oci8"
@@ -62135,7 +64228,7 @@ if test "$PHP_OCI8" != "no"; then
 
   
   echo $ac_n "checking PHP version""... $ac_c" 1>&6
-echo "configure:62139: checking PHP version" >&5
+echo "configure:64232: checking PHP version" >&5
 
   tmp_version=$PHP_VERSION
   if test -z "$tmp_version"; then
@@ -62167,7 +64260,7 @@ echo "configure:62139: checking PHP vers
 
   
   echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:62171: checking size of long int" >&5
+echo "configure:64264: checking size of long int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -62175,7 +64268,7 @@ else
   ac_cv_sizeof_long_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 62179 "configure"
+#line 64272 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -62187,7 +64280,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:62191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:64284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_int=`cat conftestval`
 else
@@ -62207,7 +64300,7 @@ EOF
 
 
   echo $ac_n "checking checking if we're on a 64-bit platform""... $ac_c" 1>&6
-echo "configure:62211: checking checking if we're on a 64-bit platform" >&5
+echo "configure:64304: checking checking if we're on a 64-bit platform" >&5
   if test "$ac_cv_sizeof_long_int" = "4"; then
     echo "$ac_t""no" 1>&6
     PHP_OCI8_OH_LIBDIR=lib32 
@@ -62251,7 +64344,7 @@ echo "configure:62211: checking checking
   if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
             
     echo $ac_n "checking Oracle ORACLE_HOME install directory""... $ac_c" 1>&6
-echo "configure:62255: checking Oracle ORACLE_HOME install directory" >&5
+echo "configure:64348: checking Oracle ORACLE_HOME install directory" >&5
 
     if test "$PHP_OCI8" = "yes"; then
       OCI8_DIR=$ORACLE_HOME
@@ -62262,7 +64355,7 @@ echo "configure:62255: checking Oracle O
 
     
   echo $ac_n "checking ORACLE_HOME library validity""... $ac_c" 1>&6
-echo "configure:62266: checking ORACLE_HOME library validity" >&5
+echo "configure:64359: checking ORACLE_HOME library validity" >&5
   if test ! -d "$OCI8_DIR"; then
     { echo "configure: error: ${OCI8_DIR} is not a directory" 1>&2; exit 1; }
   fi
@@ -62603,7 +64696,7 @@ echo "configure:62266: checking ORACLE_H
 
     
   echo $ac_n "checking Oracle library version compatibility""... $ac_c" 1>&6
-echo "configure:62607: checking Oracle library version compatibility" >&5
+echo "configure:64700: checking Oracle library version compatibility" >&5
   OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
   OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -1`  # Oracle 10g, 11g etc
   if test -s "$OCI8_DIR/orainst/unix.rgs"; then
@@ -62733,7 +64826,7 @@ echo "configure:62607: checking Oracle l
   done
 
   echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:62737: checking for OCIEnvNlsCreate in -lclntsh" >&5
+echo "configure:64830: checking for OCIEnvNlsCreate in -lclntsh" >&5
 ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -62741,7 +64834,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lclntsh  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 62745 "configure"
+#line 64838 "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
@@ -62752,7 +64845,7 @@ int main() {
 OCIEnvNlsCreate()
 ; return 0; }
 EOF
-if { (eval echo configure:62756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:64849: \"$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
@@ -63185,7 +65278,7 @@ EOF
   else
             
     echo $ac_n "checking Oracle Instant Client directory""... $ac_c" 1>&6
-echo "configure:63189: checking Oracle Instant Client directory" >&5
+echo "configure:65282: checking Oracle Instant Client directory" >&5
 
     if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
                                     PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
@@ -63198,7 +65291,7 @@ echo "configure:63189: checking Oracle I
     OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT
 
     echo $ac_n "checking Oracle Instant Client SDK header directory""... $ac_c" 1>&6
-echo "configure:63202: checking Oracle Instant Client SDK header directory" >&5
+echo "configure:65295: checking Oracle Instant Client SDK header directory" >&5
 
         OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib/*$!/usr/include/oracle/\1/client\2!'`
 
@@ -63407,7 +65500,7 @@ echo "configure:63202: checking Oracle I
 
     
   echo $ac_n "checking Oracle Instant Client library version compatibility""... $ac_c" 1>&6
-echo "configure:63411: checking Oracle Instant Client library version compatibility" >&5
+echo "configure:65504: checking Oracle Instant Client library version compatibility" >&5
   OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME
   OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -1`  # Oracle 10g, 11g etc
   OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | tail -1`
@@ -63868,7 +65961,7 @@ esac
 
   if test "$PHP_ADABAS" != "no"; then
     echo $ac_n "checking for Adabas support""... $ac_c" 1>&6
-echo "configure:63872: checking for Adabas support" >&5
+echo "configure:65965: checking for Adabas support" >&5
     if test "$PHP_ADABAS" = "yes"; then
       PHP_ADABAS=/usr/local
     fi
@@ -64071,7 +66164,7 @@ esac
 
   if test "$PHP_SAPDB" != "no"; then
     echo $ac_n "checking for SAP DB support""... $ac_c" 1>&6
-echo "configure:64075: checking for SAP DB support" >&5
+echo "configure:66168: checking for SAP DB support" >&5
     if test "$PHP_SAPDB" = "yes"; then
       PHP_SAPDB=/usr/local
     fi
@@ -64204,7 +66297,7 @@ esac
 
   if test "$PHP_SOLID" != "no"; then
     echo $ac_n "checking for Solid support""... $ac_c" 1>&6
-echo "configure:64208: checking for Solid support" >&5
+echo "configure:66301: checking for Solid support" >&5
     if test "$PHP_SOLID" = "yes"; then
       PHP_SOLID=/usr/local/solid
     fi
@@ -64231,7 +66324,7 @@ EOF
     echo "$ac_t""$ext_output" 1>&6
     
   echo $ac_n "checking Solid library file""... $ac_c" 1>&6
-echo "configure:64235: checking Solid library file" >&5  
+echo "configure:66328: checking Solid library file" >&5  
   ac_solid_uname_r=`uname -r 2>/dev/null`
   ac_solid_uname_s=`uname -s 2>/dev/null`
   case $ac_solid_uname_s in
@@ -64352,7 +66445,7 @@ esac
 
   if test "$PHP_IBM_DB2" != "no"; then
     echo $ac_n "checking for IBM DB2 support""... $ac_c" 1>&6
-echo "configure:64356: checking for IBM DB2 support" >&5
+echo "configure:66449: checking for IBM DB2 support" >&5
     if test "$PHP_IBM_DB2" = "yes"; then
       ODBC_INCDIR=/home/db2inst1/sqllib/include
       ODBC_LIBDIR=/home/db2inst1/sqllib/lib
@@ -64383,7 +66476,7 @@ fi
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 64387 "configure"
+#line 66480 "configure"
 #include "confdefs.h"
 
     
@@ -64394,7 +66487,7 @@ else
     }
   
 EOF
-if { (eval echo configure:64398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:66491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -64475,7 +66568,7 @@ esac
 
   if test "$PHP_ODBCROUTER" != "no"; then
     echo $ac_n "checking for ODBCRouter.com support""... $ac_c" 1>&6
-echo "configure:64479: checking for ODBCRouter.com support" >&5
+echo "configure:66572: checking for ODBCRouter.com support" >&5
     if test "$PHP_ODBCROUTER" = "yes"; then
       PHP_ODBCROUTER=/usr
     fi
@@ -64539,7 +66632,7 @@ esac
 
   if test "$PHP_EMPRESS" != "no"; then
     echo $ac_n "checking for Empress support""... $ac_c" 1>&6
-echo "configure:64543: checking for Empress support" >&5
+echo "configure:66636: checking for Empress support" >&5
     if test "$PHP_EMPRESS" = "yes"; then
       ODBC_INCDIR=$EMPRESSPATH/include/odbc
       ODBC_LIBDIR=$EMPRESSPATH/shlib
@@ -64557,7 +66650,7 @@ EOF
     echo "$ac_t""$ext_output" 1>&6
     
   echo $ac_n "checking Empress library file""... $ac_c" 1>&6
-echo "configure:64561: checking Empress library file" >&5
+echo "configure:66654: checking Empress library file" >&5
   ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1`
   if test ! -f $ODBC_LIBS; then
     ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1`
@@ -64613,7 +66706,7 @@ esac
 
   if test "$PHP_EMPRESS_BCS" != "no"; then
     echo $ac_n "checking for Empress local access support""... $ac_c" 1>&6
-echo "configure:64617: checking for Empress local access support" >&5
+echo "configure:66710: checking for Empress local access support" >&5
     if test "$PHP_EMPRESS_BCS" = "yes"; then
       ODBC_INCDIR=$EMPRESSPATH/include/odbc
       ODBC_LIBDIR=$EMPRESSPATH/shlib
@@ -64647,7 +66740,7 @@ EOF
     echo "$ac_t""$ext_output" 1>&6
     
   echo $ac_n "checking Empress local access library file""... $ac_c" 1>&6
-echo "configure:64651: checking Empress local access library file" >&5
+echo "configure:66744: checking Empress local access library file" >&5
   ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1`
   if test ! -f $ODBCBCS_LIBS; then
     ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1`
@@ -64703,7 +66796,7 @@ esac
   
   if test "$PHP_BIRDSTEP" != "no"; then
     echo $ac_n "checking for Birdstep support""... $ac_c" 1>&6
-echo "configure:64707: checking for Birdstep support" >&5
+echo "configure:66800: checking for Birdstep support" >&5
     if test "$PHP_BIRDSTEP" = "yes"; then
         ODBC_INCDIR=/usr/local/birdstep/include
         ODBC_LIBDIR=/usr/local/birdstep/lib
@@ -64815,7 +66908,7 @@ esac
 
   if test "$PHP_CUSTOM_ODBC" != "no"; then
     echo $ac_n "checking for a custom ODBC support""... $ac_c" 1>&6
-echo "configure:64819: checking for a custom ODBC support" >&5
+echo "configure:66912: checking for a custom ODBC support" >&5
     if test "$PHP_CUSTOM_ODBC" = "yes"; then
       PHP_CUSTOM_ODBC=/usr/local
     fi
@@ -64879,7 +66972,7 @@ esac
 
   if test "$PHP_IODBC" != "no"; then
     echo $ac_n "checking for iODBC support""... $ac_c" 1>&6
-echo "configure:64883: checking for iODBC support" >&5
+echo "configure:66976: checking for iODBC support" >&5
     if test "$PHP_IODBC" = "yes"; then
       PHP_IODBC=/usr/local
     fi
@@ -65025,7 +67118,7 @@ esac
 
   if test "$PHP_ESOOB" != "no"; then
     echo $ac_n "checking for Easysoft ODBC-ODBC Bridge support""... $ac_c" 1>&6
-echo "configure:65029: checking for Easysoft ODBC-ODBC Bridge support" >&5
+echo "configure:67122: checking for Easysoft ODBC-ODBC Bridge support" >&5
     if test "$PHP_ESOOB" = "yes"; then
       PHP_ESOOB=/usr/local/easysoft/oob/client
     fi
@@ -65089,7 +67182,7 @@ esac
 
   if test "$PHP_UNIXODBC" != "no"; then
     echo $ac_n "checking for unixODBC support""... $ac_c" 1>&6
-echo "configure:65093: checking for unixODBC support" >&5
+echo "configure:67186: checking for unixODBC support" >&5
     if test "$PHP_UNIXODBC" = "yes"; then
       PHP_UNIXODBC=/usr/local
     fi
@@ -65158,7 +67251,7 @@ esac
 
   if test "$PHP_DBMAKER" != "no"; then
     echo $ac_n "checking for DBMaker support""... $ac_c" 1>&6
-echo "configure:65162: checking for DBMaker support" >&5
+echo "configure:67255: checking for DBMaker support" >&5
     if test "$PHP_DBMAKER" = "yes"; then
       # find dbmaker's home directory
       DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'`
@@ -65720,7 +67813,7 @@ fi
 php_enable_pcntl=no
 
 echo $ac_n "checking whether to enable pcntl support""... $ac_c" 1>&6
-echo "configure:65724: checking whether to enable pcntl support" >&5
+echo "configure:67817: checking whether to enable pcntl support" >&5
 # Check whether --enable-pcntl or --disable-pcntl was given.
 if test "${enable_pcntl+set}" = set; then
   enableval="$enable_pcntl"
@@ -65764,12 +67857,12 @@ if test "$PHP_PCNTL" != "no"; then
   for ac_func in fork
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:65768: checking for $ac_func" >&5
+echo "configure:67861: 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 65773 "configure"
+#line 67866 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -65792,7 +67885,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:65796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:67889: \"$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
@@ -65823,12 +67916,12 @@ done
   for ac_func in waitpid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:65827: checking for $ac_func" >&5
+echo "configure:67920: 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 65832 "configure"
+#line 67925 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -65851,7 +67944,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:65855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:67948: \"$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
@@ -65882,12 +67975,12 @@ done
   for ac_func in sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:65886: checking for $ac_func" >&5
+echo "configure:67979: 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 65891 "configure"
+#line 67984 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -65910,7 +68003,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:65914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:68007: \"$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
@@ -65941,12 +68034,12 @@ done
   for ac_func in getpriority setpriority wait3 sigprocmask sigwaitinfo sigtimedwait
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:65945: checking for $ac_func" >&5
+echo "configure:68038: 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 65950 "configure"
+#line 68043 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -65969,7 +68062,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:65973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:68066: \"$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
@@ -66294,7 +68387,7 @@ fi
 php_enable_pdo=yes
 
 echo $ac_n "checking whether to enable PDO support""... $ac_c" 1>&6
-echo "configure:66298: checking whether to enable PDO support" >&5
+echo "configure:68391: checking whether to enable PDO support" >&5
 # Check whether --enable-pdo or --disable-pdo was given.
 if test "${enable_pdo+set}" = set; then
   enableval="$enable_pdo"
@@ -66728,7 +68821,7 @@ fi
 php_with_pdo_dblib=no
 
 echo $ac_n "checking for PDO_DBLIB support via FreeTDS""... $ac_c" 1>&6
-echo "configure:66732: checking for PDO_DBLIB support via FreeTDS" >&5
+echo "configure:68825: checking for PDO_DBLIB support via FreeTDS" >&5
 # Check whether --with-pdo-dblib or --without-pdo-dblib was given.
 if test "${with_pdo_dblib+set}" = set; then
   withval="$with_pdo_dblib"
@@ -66945,13 +69038,13 @@ if test "$PHP_PDO_DBLIB" != "no"; then
   
     
   echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:66949: checking for PDO includes" >&5
+echo "configure:69042: checking for PDO includes" >&5
 if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:66955: checking for PDO includes" >&5
+echo "configure:69048: checking for PDO includes" >&5
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -67265,7 +69358,7 @@ EOF
   fi
 
   echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:67269: checking for dnet_addr in -ldnet_stub" >&5
+echo "configure:69362: checking for dnet_addr in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -67273,7 +69366,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 67277 "configure"
+#line 69370 "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
@@ -67284,7 +69377,7 @@ int main() {
 dnet_addr()
 ; return 0; }
 EOF
-if { (eval echo configure:67288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:69381: \"$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
@@ -67445,7 +69538,7 @@ fi
 php_with_pdo_firebird=no
 
 echo $ac_n "checking for Firebird support for PDO""... $ac_c" 1>&6
-echo "configure:67449: checking for Firebird support for PDO" >&5
+echo "configure:69542: checking for Firebird support for PDO" >&5
 # Check whether --with-pdo-firebird or --without-pdo-firebird was given.
 if test "${with_pdo_firebird+set}" = set; then
   withval="$with_pdo_firebird"
@@ -67599,7 +69692,7 @@ if test "$PHP_PDO_FIREBIRD" != "no"; the
   done
 
   echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6
-echo "configure:67603: checking for isc_detach_database in -lfbclient" >&5
+echo "configure:69696: checking for isc_detach_database in -lfbclient" >&5
 ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -67607,7 +69700,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lfbclient  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 67611 "configure"
+#line 69704 "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
@@ -67618,7 +69711,7 @@ int main() {
 isc_detach_database()
 ; return 0; }
 EOF
-if { (eval echo configure:67622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:69715: \"$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
@@ -67745,7 +69838,7 @@ else
   done
 
   echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6
-echo "configure:67749: checking for isc_detach_database in -lgds" >&5
+echo "configure:69842: checking for isc_detach_database in -lgds" >&5
 ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -67753,7 +69846,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgds  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 67757 "configure"
+#line 69850 "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
@@ -67764,7 +69857,7 @@ int main() {
 isc_detach_database()
 ; return 0; }
 EOF
-if { (eval echo configure:67768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:69861: \"$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
@@ -67891,7 +69984,7 @@ else
   done
 
   echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6
-echo "configure:67895: checking for isc_detach_database in -lib_util" >&5
+echo "configure:69988: checking for isc_detach_database in -lib_util" >&5
 ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -67899,7 +69992,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lib_util  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 67903 "configure"
+#line 69996 "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
@@ -67910,7 +70003,7 @@ int main() {
 isc_detach_database()
 ; return 0; }
 EOF
-if { (eval echo configure:67914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:70007: \"$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
@@ -67955,13 +70048,13 @@ fi
  
   
   echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:67959: checking for PDO includes" >&5
+echo "configure:70052: checking for PDO includes" >&5
 if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:67965: checking for PDO includes" >&5
+echo "configure:70058: checking for PDO includes" >&5
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -68433,7 +70526,7 @@ fi
 php_with_pdo_mysql=no
 
 echo $ac_n "checking for MySQL support for PDO""... $ac_c" 1>&6
-echo "configure:68437: checking for MySQL support for PDO" >&5
+echo "configure:70530: checking for MySQL support for PDO" >&5
 # Check whether --with-pdo-mysql or --without-pdo-mysql was given.
 if test "${with_pdo_mysql+set}" = set; then
   withval="$with_pdo_mysql"
@@ -68478,7 +70571,7 @@ if test -z "$PHP_ZLIB_DIR"; then
 php_with_zlib_dir=no
 
 echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:68482: checking for the location of libz" >&5
+echo "configure:70575: checking for the location of libz" >&5
 # Check whether --with-zlib-dir or --without-zlib-dir was given.
 if test "${with_zlib_dir+set}" = set; then
   withval="$with_zlib_dir"
@@ -68542,14 +70635,14 @@ EOF
 
 
     echo $ac_n "checking for mysql_config""... $ac_c" 1>&6
-echo "configure:68546: checking for mysql_config" >&5
+echo "configure:70639: checking for mysql_config" >&5
     if test -n "$PDO_MYSQL_CONFIG"; then
       echo "$ac_t""$PDO_MYSQL_CONFIG" 1>&6
       if test "x$SED" = "x"; then
         # Extract the first word of "sed", so it can be a program name with args.
 set dummy sed; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:68553: checking for $ac_word" >&5
+echo "configure:70646: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -68593,7 +70686,7 @@ fi
     elif test -n "$PDO_MYSQL_DIR"; then
       echo "$ac_t""not found" 1>&6
       echo $ac_n "checking for mysql install under $PDO_MYSQL_DIR""... $ac_c" 1>&6
-echo "configure:68597: checking for mysql install under $PDO_MYSQL_DIR" >&5
+echo "configure:70690: checking for mysql install under $PDO_MYSQL_DIR" >&5
       if test -r $PDO_MYSQL_DIR/include/mysql; then
         PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include/mysql
       else
@@ -68747,7 +70840,7 @@ echo "configure:68597: checking for mysq
   done
 
   echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:68751: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
+echo "configure:70844: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
 ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -68755,7 +70848,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$PDO_MYSQL_LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 68759 "configure"
+#line 70852 "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
@@ -68766,7 +70859,7 @@ int main() {
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:68770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:70863: \"$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
@@ -69119,7 +71212,7 @@ else
   done
 
   echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:69123: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
+echo "configure:71216: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
 ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -69127,7 +71220,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$PDO_MYSQL_LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 69131 "configure"
+#line 71224 "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
@@ -69138,7 +71231,7 @@ int main() {
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:69142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:71235: \"$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
@@ -69293,7 +71386,7 @@ fi
   done
 
   echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:69297: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
+echo "configure:71390: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
 ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -69301,7 +71394,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$PDO_MYSQL_LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 69305 "configure"
+#line 71398 "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
@@ -69312,7 +71405,7 @@ int main() {
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:69316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:71409: \"$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
@@ -69486,12 +71579,12 @@ fi
     for ac_func in mysql_commit mysql_stmt_prepare mysql_next_result mysql_sqlstate
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:69490: checking for $ac_func" >&5
+echo "configure:71583: 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 69495 "configure"
+#line 71588 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -69514,7 +71607,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:69518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:71611: \"$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
@@ -69544,13 +71637,13 @@ done
   
     
   echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:69548: checking for PDO includes" >&5
+echo "configure:71641: checking for PDO includes" >&5
 if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:69554: checking for PDO includes" >&5
+echo "configure:71647: checking for PDO includes" >&5
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -69935,7 +72028,7 @@ SUPPORTED_LIB_VERS="9.0 10.1 11.1"  # Th
 php_with_pdo_oci=no
 
 echo $ac_n "checking Oracle OCI support for PDO""... $ac_c" 1>&6
-echo "configure:69939: checking Oracle OCI support for PDO" >&5
+echo "configure:72032: checking Oracle OCI support for PDO" >&5
 # Check whether --with-pdo-oci or --without-pdo-oci was given.
 if test "${with_pdo_oci+set}" = set; then
   withval="$with_pdo_oci"
@@ -69982,7 +72075,7 @@ if test "$PHP_PDO_OCI" != "no"; then
   fi
 
   echo $ac_n "checking Oracle Install-Dir""... $ac_c" 1>&6
-echo "configure:69986: checking Oracle Install-Dir" >&5
+echo "configure:72079: checking Oracle Install-Dir" >&5
   if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then
     PDO_OCI_DIR=$ORACLE_HOME
   else
@@ -69991,7 +72084,7 @@ echo "configure:69986: checking Oracle I
   echo "$ac_t""$PHP_PDO_OCI" 1>&6
 
   echo $ac_n "checking if that is sane""... $ac_c" 1>&6
-echo "configure:69995: checking if that is sane" >&5
+echo "configure:72088: checking if that is sane" >&5
   if test -z "$PDO_OCI_DIR"; then
     { echo "configure: error: 
 You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_HOME.
@@ -70002,7 +72095,7 @@ You need to tell me where to find your O
 
   if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then
     echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:70006: checking size of long int" >&5
+echo "configure:72099: checking size of long int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -70010,7 +72103,7 @@ else
   ac_cv_sizeof_long_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 70014 "configure"
+#line 72107 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -70022,7 +72115,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:70026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:72119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_int=`cat conftestval`
 else
@@ -70056,7 +72149,7 @@ EOF
       fi
     fi
     echo $ac_n "checking for oci.h""... $ac_c" 1>&6
-echo "configure:70060: checking for oci.h" >&5
+echo "configure:72153: checking for oci.h" >&5
     if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/oci.h ; then
       
   if test "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR" != "/usr/include"; then
@@ -70205,7 +72298,7 @@ echo "configure:70060: checking for oci.
   else
     
   echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:70209: checking size of long int" >&5
+echo "configure:72302: checking size of long int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -70213,7 +72306,7 @@ else
   ac_cv_sizeof_long_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 70217 "configure"
+#line 72310 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -70225,7 +72318,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:70229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:72322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_int=`cat conftestval`
 else
@@ -70245,7 +72338,7 @@ EOF
 
 
   echo $ac_n "checking if we're on a 64-bit platform""... $ac_c" 1>&6
-echo "configure:70249: checking if we're on a 64-bit platform" >&5
+echo "configure:72342: checking if we're on a 64-bit platform" >&5
   if test "$ac_cv_sizeof_long_int" = "4" ; then
     echo "$ac_t""no" 1>&6
     TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32"
@@ -70255,7 +72348,7 @@ echo "configure:70249: checking if we're
   fi
 
   echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6
-echo "configure:70259: checking OCI8 libraries dir" >&5
+echo "configure:72352: checking OCI8 libraries dir" >&5
   if test -d "$PDO_OCI_DIR/lib" && test ! -d "$PDO_OCI_DIR/lib32"; then
     PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib"
   elif test ! -d "$PDO_OCI_DIR/lib" && test -d "$PDO_OCI_DIR/lib32"; then
@@ -70622,7 +72715,7 @@ echo "configure:70259: checking OCI8 lib
     fi
     
   echo $ac_n "checking Oracle version""... $ac_c" 1>&6
-echo "configure:70626: checking Oracle version" >&5
+echo "configure:72719: checking Oracle version" >&5
   for OCI_VER in $SUPPORTED_LIB_VERS; do
     if test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.$OCI_VER; then
       PDO_OCI_VERSION="$OCI_VER"
@@ -70804,7 +72897,7 @@ echo "configure:70626: checking Oracle v
   done
 
   echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:70808: checking for OCIEnvCreate in -lclntsh" >&5
+echo "configure:72901: checking for OCIEnvCreate in -lclntsh" >&5
 ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -70812,7 +72905,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lclntsh  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 70816 "configure"
+#line 72909 "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
@@ -70823,7 +72916,7 @@ int main() {
 OCIEnvCreate()
 ; return 0; }
 EOF
-if { (eval echo configure:70827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:72920: \"$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
@@ -70957,7 +73050,7 @@ fi
   done
 
   echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:70961: checking for OCIEnvNlsCreate in -lclntsh" >&5
+echo "configure:73054: checking for OCIEnvNlsCreate in -lclntsh" >&5
 ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -70965,7 +73058,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lclntsh  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 70969 "configure"
+#line 73062 "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
@@ -70976,7 +73069,7 @@ int main() {
 OCIEnvNlsCreate()
 ; return 0; }
 EOF
-if { (eval echo configure:70980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:73073: \"$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
@@ -71110,7 +73203,7 @@ fi
   done
 
   echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6
-echo "configure:71114: checking for OCILobIsTemporary in -lclntsh" >&5
+echo "configure:73207: checking for OCILobIsTemporary in -lclntsh" >&5
 ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -71118,7 +73211,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lclntsh  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 71122 "configure"
+#line 73215 "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
@@ -71129,7 +73222,7 @@ int main() {
 OCILobIsTemporary()
 ; return 0; }
 EOF
-if { (eval echo configure:71133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:73226: \"$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
@@ -71259,7 +73352,7 @@ else
   done
 
   echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6
-echo "configure:71263: checking for OCILobIsTemporary in -locijdbc8" >&5
+echo "configure:73356: checking for OCILobIsTemporary in -locijdbc8" >&5
 ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -71267,7 +73360,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-locijdbc8  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 71271 "configure"
+#line 73364 "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
@@ -71278,7 +73371,7 @@ int main() {
 OCILobIsTemporary()
 ; return 0; }
 EOF
-if { (eval echo configure:71282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:73375: \"$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
@@ -71439,7 +73532,7 @@ fi
   done
 
   echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6
-echo "configure:71443: checking for OCICollAssign in -lclntsh" >&5
+echo "configure:73536: checking for OCICollAssign in -lclntsh" >&5
 ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -71447,7 +73540,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lclntsh  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 71451 "configure"
+#line 73544 "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
@@ -71458,7 +73551,7 @@ int main() {
 OCICollAssign()
 ; return 0; }
 EOF
-if { (eval echo configure:71462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:73555: \"$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
@@ -71592,7 +73685,7 @@ fi
   done
 
   echo $ac_n "checking for OCIStmtFetch2 in -lclntsh""... $ac_c" 1>&6
-echo "configure:71596: checking for OCIStmtFetch2 in -lclntsh" >&5
+echo "configure:73689: checking for OCIStmtFetch2 in -lclntsh" >&5
 ac_lib_var=`echo clntsh'_'OCIStmtFetch2 | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -71600,7 +73693,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lclntsh  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 71604 "configure"
+#line 73697 "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
@@ -71611,7 +73704,7 @@ int main() {
 OCIStmtFetch2()
 ; return 0; }
 EOF
-if { (eval echo configure:71615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:73708: \"$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
@@ -71650,13 +73743,13 @@ fi
   
     
   echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:71654: checking for PDO includes" >&5
+echo "configure:73747: checking for PDO includes" >&5
 if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:71660: checking for PDO includes" >&5
+echo "configure:73753: checking for PDO includes" >&5
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -72024,7 +74117,7 @@ fi
 php_with_pdo_odbc=no
 
 echo $ac_n "checking for ODBC v3 support for PDO""... $ac_c" 1>&6
-echo "configure:72028: checking for ODBC v3 support for PDO" >&5
+echo "configure:74121: checking for ODBC v3 support for PDO" >&5
 # Check whether --with-pdo-odbc or --without-pdo-odbc was given.
 if test "${with_pdo_odbc+set}" = set; then
   withval="$with_pdo_odbc"
@@ -72076,13 +74169,13 @@ if test "$PHP_PDO_ODBC" != "no"; then
   
     
   echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:72080: checking for PDO includes" >&5
+echo "configure:74173: checking for PDO includes" >&5
 if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:72086: checking for PDO includes" >&5
+echo "configure:74179: checking for PDO includes" >&5
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -72103,7 +74196,7 @@ echo "$ac_t""$pdo_inc_path" 1>&6
   
 
   echo $ac_n "checking for selected PDO ODBC flavour""... $ac_c" 1>&6
-echo "configure:72107: checking for selected PDO ODBC flavour" >&5
+echo "configure:74200: checking for selected PDO ODBC flavour" >&5
 
   pdo_odbc_flavour="`echo $PHP_PDO_ODBC | cut -d, -f1`"
   pdo_odbc_dir="`echo $PHP_PDO_ODBC | cut -d, -f2`"
@@ -72182,7 +74275,7 @@ echo "configure:72107: checking for sele
 
   
   echo $ac_n "checking for odbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72186: checking for odbc.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74279: checking for odbc.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/odbc.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72196,7 +74289,7 @@ EOF
 
   
   echo $ac_n "checking for odbcsdk.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72200: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74293: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/odbcsdk.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72210,7 +74303,7 @@ EOF
 
   
   echo $ac_n "checking for iodbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72214: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74307: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/iodbc.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72224,7 +74317,7 @@ EOF
 
   
   echo $ac_n "checking for sqlunix.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72228: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74321: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/sqlunix.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72238,7 +74331,7 @@ EOF
 
   
   echo $ac_n "checking for sqltypes.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72242: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74335: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/sqltypes.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72252,7 +74345,7 @@ EOF
 
   
   echo $ac_n "checking for sqlucode.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72256: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74349: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/sqlucode.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72266,7 +74359,7 @@ EOF
 
   
   echo $ac_n "checking for sql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72270: checking for sql.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74363: checking for sql.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/sql.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72280,7 +74373,7 @@ EOF
 
   
   echo $ac_n "checking for isql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72284: checking for isql.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74377: checking for isql.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/isql.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72294,7 +74387,7 @@ EOF
 
   
   echo $ac_n "checking for sqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72298: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74391: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/sqlext.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72308,7 +74401,7 @@ EOF
 
   
   echo $ac_n "checking for isqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72312: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74405: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/isqlext.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72322,7 +74415,7 @@ EOF
 
   
   echo $ac_n "checking for udbcext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72326: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74419: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/udbcext.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72336,7 +74429,7 @@ EOF
 
   
   echo $ac_n "checking for sqlcli1.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72340: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74433: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/sqlcli1.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72350,7 +74443,7 @@ EOF
 
   
   echo $ac_n "checking for LibraryManager.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72354: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74447: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/LibraryManager.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72364,7 +74457,7 @@ EOF
 
   
   echo $ac_n "checking for cli0core.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72368: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74461: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/cli0core.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72378,7 +74471,7 @@ EOF
 
   
   echo $ac_n "checking for cli0ext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72382: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74475: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/cli0ext.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72392,7 +74485,7 @@ EOF
 
   
   echo $ac_n "checking for cli0cli.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72396: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74489: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/cli0cli.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72406,7 +74499,7 @@ EOF
 
   
   echo $ac_n "checking for cli0defs.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72410: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74503: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/cli0defs.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72420,7 +74513,7 @@ EOF
 
   
   echo $ac_n "checking for cli0env.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:72424: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:74517: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5
   if test -f "$PDO_ODBC_INCDIR/cli0env.h"; then
     php_pdo_have_header=yes
     cat >> confdefs.h <<\EOF
@@ -72626,7 +74719,7 @@ EOF
   done
 
   echo $ac_n "checking for SQLBindCol in -l$pdo_odbc_def_lib""... $ac_c" 1>&6
-echo "configure:72630: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
+echo "configure:74723: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
 ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLBindCol | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -72634,7 +74727,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$pdo_odbc_def_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 72638 "configure"
+#line 74731 "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
@@ -72645,7 +74738,7 @@ int main() {
 SQLBindCol()
 ; return 0; }
 EOF
-if { (eval echo configure:72649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:74742: \"$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
@@ -72760,7 +74853,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
   done
 
   echo $ac_n "checking for SQLAllocHandle in -l$pdo_odbc_def_lib""... $ac_c" 1>&6
-echo "configure:72764: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
+echo "configure:74857: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
 ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLAllocHandle | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -72768,7 +74861,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$pdo_odbc_def_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 72772 "configure"
+#line 74865 "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
@@ -72779,7 +74872,7 @@ int main() {
 SQLAllocHandle()
 ; return 0; }
 EOF
-if { (eval echo configure:72783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:74876: \"$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
@@ -73153,7 +75246,7 @@ fi
 php_with_pdo_pgsql=no
 
 echo $ac_n "checking for PostgreSQL support for PDO""... $ac_c" 1>&6
-echo "configure:73157: checking for PostgreSQL support for PDO" >&5
+echo "configure:75250: checking for PostgreSQL support for PDO" >&5
 # Check whether --with-pdo-pgsql or --without-pdo-pgsql was given.
 if test "${with_pdo_pgsql+set}" = set; then
   withval="$with_pdo_pgsql"
@@ -73212,7 +75305,7 @@ if test "$PHP_PDO_PGSQL" != "no"; then
 
 
   echo $ac_n "checking for pg_config""... $ac_c" 1>&6
-echo "configure:73216: checking for pg_config" >&5
+echo "configure:75309: checking for pg_config" >&5
   for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
     if test -x $i/pg_config; then
       PG_CONFIG="$i/pg_config"
@@ -73276,14 +75369,14 @@ EOF
 
 
   echo $ac_n "checking for openssl dependencies""... $ac_c" 1>&6
-echo "configure:73280: checking for openssl dependencies" >&5
+echo "configure:75373: checking for openssl dependencies" >&5
   grep openssl $PGSQL_INCLUDE/libpq-fe.h >/dev/null 2>&1
   if test $? -eq 0 ; then
     echo "$ac_t""yes" 1>&6
         # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:73287: checking for $ac_word" >&5
+echo "configure:75380: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -73327,7 +75420,7 @@ fi
   old_LDFLAGS=$LDFLAGS
   LDFLAGS="-L$PGSQL_LIBDIR $LDFLAGS"
   echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6
-echo "configure:73331: checking for PQparameterStatus in -lpq" >&5
+echo "configure:75424: checking for PQparameterStatus in -lpq" >&5
 ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -73335,7 +75428,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 73339 "configure"
+#line 75432 "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
@@ -73346,7 +75439,7 @@ int main() {
 PQparameterStatus()
 ; return 0; }
 EOF
-if { (eval echo configure:73350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:75443: \"$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
@@ -73375,7 +75468,7 @@ fi
 
 
   echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6
-echo "configure:73379: checking for PQprepare in -lpq" >&5
+echo "configure:75472: checking for PQprepare in -lpq" >&5
 ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -73383,7 +75476,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 73387 "configure"
+#line 75480 "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
@@ -73394,7 +75487,7 @@ int main() {
 PQprepare()
 ; return 0; }
 EOF
-if { (eval echo configure:73398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:75491: \"$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
@@ -73418,7 +75511,7 @@ else
 fi
 
   echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6
-echo "configure:73422: checking for PQescapeStringConn in -lpq" >&5
+echo "configure:75515: checking for PQescapeStringConn in -lpq" >&5
 ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -73426,7 +75519,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 73430 "configure"
+#line 75523 "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
@@ -73437,7 +75530,7 @@ int main() {
 PQescapeStringConn()
 ; return 0; }
 EOF
-if { (eval echo configure:73441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:75534: \"$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
@@ -73461,7 +75554,7 @@ else
 fi
 
   echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6
-echo "configure:73465: checking for PQescapeByteaConn in -lpq" >&5
+echo "configure:75558: checking for PQescapeByteaConn in -lpq" >&5
 ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -73469,7 +75562,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 73473 "configure"
+#line 75566 "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
@@ -73480,7 +75573,7 @@ int main() {
 PQescapeByteaConn()
 ; return 0; }
 EOF
-if { (eval echo configure:73484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:75577: \"$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
@@ -73505,7 +75598,7 @@ fi
 
 
   echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6
-echo "configure:73509: checking for pg_encoding_to_char in -lpq" >&5
+echo "configure:75602: checking for pg_encoding_to_char in -lpq" >&5
 ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -73513,7 +75606,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 73517 "configure"
+#line 75610 "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
@@ -73524,7 +75617,7 @@ int main() {
 pg_encoding_to_char()
 ; return 0; }
 EOF
-if { (eval echo configure:73528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:75621: \"$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
@@ -73688,13 +75781,13 @@ fi
   
     
   echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:73692: checking for PDO includes" >&5
+echo "configure:75785: checking for PDO includes" >&5
 if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:73698: checking for PDO includes" >&5
+echo "configure:75791: checking for PDO includes" >&5
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -74034,7 +76127,7 @@ fi
 php_with_pdo_sqlite=$PHP_PDO
 
 echo $ac_n "checking for sqlite 3 support for PDO""... $ac_c" 1>&6
-echo "configure:74038: checking for sqlite 3 support for PDO" >&5
+echo "configure:76131: checking for sqlite 3 support for PDO" >&5
 # Check whether --with-pdo-sqlite or --without-pdo-sqlite was given.
 if test "${with_pdo_sqlite+set}" = set; then
   withval="$with_pdo_sqlite"
@@ -74083,13 +76176,13 @@ if test "$PHP_PDO_SQLITE" != "no"; then
   
     
   echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:74087: checking for PDO includes" >&5
+echo "configure:76180: checking for PDO includes" >&5
 if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:74093: checking for PDO includes" >&5
+echo "configure:76186: checking for PDO includes" >&5
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -74118,7 +76211,7 @@ echo "$ac_t""$pdo_inc_path" 1>&6
       PDO_SQLITE_DIR=$PHP_PDO_SQLITE
     else # search default path list
       echo $ac_n "checking for sqlite3 files in default path""... $ac_c" 1>&6
-echo "configure:74122: checking for sqlite3 files in default path" >&5
+echo "configure:76215: checking for sqlite3 files in default path" >&5
       for i in $SEARCH_PATH ; do
         if test -r $i/$SEARCH_FOR; then
           PDO_SQLITE_DIR=$i
@@ -74264,7 +76357,7 @@ echo "configure:74122: checking for sqli
   done
 
   echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6
-echo "configure:74268: checking for $LIBSYMBOL in -l$LIBNAME" >&5
+echo "configure:76361: checking for $LIBSYMBOL in -l$LIBNAME" >&5
 ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -74272,7 +76365,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 74276 "configure"
+#line 76369 "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
@@ -74283,7 +76376,7 @@ int main() {
 $LIBSYMBOL()
 ; return 0; }
 EOF
-if { (eval echo configure:74287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76380: \"$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
@@ -74513,7 +76606,7 @@ fi
   done
 
   echo $ac_n "checking for sqlite3_key in -lsqlite3""... $ac_c" 1>&6
-echo "configure:74517: checking for sqlite3_key in -lsqlite3" >&5
+echo "configure:76610: checking for sqlite3_key in -lsqlite3" >&5
 ac_lib_var=`echo sqlite3'_'sqlite3_key | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -74521,7 +76614,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsqlite3  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 74525 "configure"
+#line 76618 "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
@@ -74532,7 +76625,7 @@ int main() {
 sqlite3_key()
 ; return 0; }
 EOF
-if { (eval echo configure:74536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76629: \"$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
@@ -75273,12 +77366,12 @@ but you've either not enabled sqlite3, o
       for ac_func in usleep nanosleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:75277: checking for $ac_func" >&5
+echo "configure:77370: 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 75282 "configure"
+#line 77375 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -75301,7 +77394,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:75305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77398: \"$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
@@ -75329,17 +77422,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:75333: checking for $ac_hdr" >&5
+echo "configure:77426: checking for $ac_hdr" >&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 75338 "configure"
+#line 77431 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:75343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:77436: \"$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*
@@ -75463,7 +77556,7 @@ done
   done
 
   echo $ac_n "checking for fdatasync in -lrt""... $ac_c" 1>&6
-echo "configure:75467: checking for fdatasync in -lrt" >&5
+echo "configure:77560: checking for fdatasync in -lrt" >&5
 ac_lib_var=`echo rt'_'fdatasync | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75471,7 +77564,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75475 "configure"
+#line 77568 "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
@@ -75482,7 +77575,7 @@ int main() {
 fdatasync()
 ; return 0; }
 EOF
-if { (eval echo configure:75486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77579: \"$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
@@ -75563,7 +77656,7 @@ fi
 php_with_pgsql=no
 
 echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6
-echo "configure:75567: checking for PostgreSQL support" >&5
+echo "configure:77660: checking for PostgreSQL support" >&5
 # Check whether --with-pgsql or --without-pgsql was given.
 if test "${with_pgsql+set}" = set; then
   withval="$with_pgsql"
@@ -75617,7 +77710,7 @@ if test "$PHP_PGSQL" != "no"; then
 
 
   echo $ac_n "checking for pg_config""... $ac_c" 1>&6
-echo "configure:75621: checking for pg_config" >&5
+echo "configure:77714: checking for pg_config" >&5
   for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
 	if test -x $i/pg_config; then
       PG_CONFIG="$i/pg_config"
@@ -75685,7 +77778,7 @@ EOF
   old_LDFLAGS=$LDFLAGS
   LDFLAGS="-L$PGSQL_LIBDIR $LDFLAGS"
   echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6
-echo "configure:75689: checking for PQescapeString in -lpq" >&5
+echo "configure:77782: checking for PQescapeString in -lpq" >&5
 ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75693,7 +77786,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75697 "configure"
+#line 77790 "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
@@ -75704,7 +77797,7 @@ int main() {
 PQescapeString()
 ; return 0; }
 EOF
-if { (eval echo configure:75708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77801: \"$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
@@ -75728,7 +77821,7 @@ else
 fi
 
   echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6
-echo "configure:75732: checking for PQunescapeBytea in -lpq" >&5
+echo "configure:77825: checking for PQunescapeBytea in -lpq" >&5
 ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75736,7 +77829,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75740 "configure"
+#line 77833 "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
@@ -75747,7 +77840,7 @@ int main() {
 PQunescapeBytea()
 ; return 0; }
 EOF
-if { (eval echo configure:75751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77844: \"$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
@@ -75771,7 +77864,7 @@ else
 fi
 
   echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6
-echo "configure:75775: checking for PQsetnonblocking in -lpq" >&5
+echo "configure:77868: checking for PQsetnonblocking in -lpq" >&5
 ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75779,7 +77872,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75783 "configure"
+#line 77876 "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
@@ -75790,7 +77883,7 @@ int main() {
 PQsetnonblocking()
 ; return 0; }
 EOF
-if { (eval echo configure:75794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77887: \"$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
@@ -75814,7 +77907,7 @@ else
 fi
 
   echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
-echo "configure:75818: checking for PQcmdTuples in -lpq" >&5
+echo "configure:77911: checking for PQcmdTuples in -lpq" >&5
 ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75822,7 +77915,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75826 "configure"
+#line 77919 "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
@@ -75833,7 +77926,7 @@ int main() {
 PQcmdTuples()
 ; return 0; }
 EOF
-if { (eval echo configure:75837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77930: \"$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
@@ -75857,7 +77950,7 @@ else
 fi
 
   echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6
-echo "configure:75861: checking for PQoidValue in -lpq" >&5
+echo "configure:77954: checking for PQoidValue in -lpq" >&5
 ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75865,7 +77958,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75869 "configure"
+#line 77962 "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
@@ -75876,7 +77969,7 @@ int main() {
 PQoidValue()
 ; return 0; }
 EOF
-if { (eval echo configure:75880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77973: \"$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
@@ -75900,7 +77993,7 @@ else
 fi
 
   echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6
-echo "configure:75904: checking for PQclientEncoding in -lpq" >&5
+echo "configure:77997: checking for PQclientEncoding in -lpq" >&5
 ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75908,7 +78001,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75912 "configure"
+#line 78005 "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
@@ -75919,7 +78012,7 @@ int main() {
 PQclientEncoding()
 ; return 0; }
 EOF
-if { (eval echo configure:75923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:78016: \"$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
@@ -75943,7 +78036,7 @@ else
 fi
 
   echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6
-echo "configure:75947: checking for PQparameterStatus in -lpq" >&5
+echo "configure:78040: checking for PQparameterStatus in -lpq" >&5
 ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75951,7 +78044,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75955 "configure"
+#line 78048 "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
@@ -75962,7 +78055,7 @@ int main() {
 PQparameterStatus()
 ; return 0; }
 EOF
-if { (eval echo configure:75966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:78059: \"$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
@@ -75986,7 +78079,7 @@ else
 fi
 
   echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6
-echo "configure:75990: checking for PQprotocolVersion in -lpq" >&5
+echo "configure:78083: checking for PQprotocolVersion in -lpq" >&5
 ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -75994,7 +78087,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 75998 "configure"
+#line 78091 "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
@@ -76005,7 +78098,7 @@ int main() {
 PQprotocolVersion()
 ; return 0; }
 EOF
-if { (eval echo configure:76009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:78102: \"$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
@@ -76029,7 +78122,7 @@ else
 fi
 
   echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6
-echo "configure:76033: checking for PQtransactionStatus in -lpq" >&5
+echo "configure:78126: checking for PQtransactionStatus in -lpq" >&5
 ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -76037,7 +78130,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 76041 "configure"
+#line 78134 "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
@@ -76048,7 +78141,7 @@ int main() {
 PQtransactionStatus()
 ; return 0; }
 EOF
-if { (eval echo configure:76052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:78145: \"$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
@@ -76072,7 +78165,7 @@ else
 fi
 
   echo $ac_n "checking for PQexecParams in -lpq""... $ac_c" 1>&6
-echo "configure:76076: checking for PQexecParams in -lpq" >&5
+echo "configure:78169: checking for PQexecParams in -lpq" >&5
 ac_lib_var=`echo pq'_'PQexecParams | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -76080,7 +78173,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 76084 "configure"
+#line 78177 "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
@@ -76091,7 +78184,7 @@ int main() {
 PQexecParams()
 ; return 0; }
 EOF
-if { (eval echo configure:76095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:78188: \"$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
@@ -76110,891 +78203,2169 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 #define HAVE_PQEXECPARAMS 1
 EOF
 
-else
-  echo "$ac_t""no" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6
+echo "configure:78212: checking for PQprepare in -lpq" >&5
+ac_lib_var=`echo pq'_'PQprepare | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78220 "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 PQprepare();
+
+int main() {
+PQprepare()
+; return 0; }
+EOF
+if { (eval echo configure:78231: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQPREPARE 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQexecPrepared in -lpq""... $ac_c" 1>&6
+echo "configure:78255: checking for PQexecPrepared in -lpq" >&5
+ac_lib_var=`echo pq'_'PQexecPrepared | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78263 "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 PQexecPrepared();
+
+int main() {
+PQexecPrepared()
+; return 0; }
+EOF
+if { (eval echo configure:78274: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQEXECPREPARED 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6
+echo "configure:78298: checking for PQresultErrorField in -lpq" >&5
+ac_lib_var=`echo pq'_'PQresultErrorField | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78306 "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 PQresultErrorField();
+
+int main() {
+PQresultErrorField()
+; return 0; }
+EOF
+if { (eval echo configure:78317: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQRESULTERRORFIELD 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQsendQueryParams in -lpq""... $ac_c" 1>&6
+echo "configure:78341: checking for PQsendQueryParams in -lpq" >&5
+ac_lib_var=`echo pq'_'PQsendQueryParams | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78349 "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 PQsendQueryParams();
+
+int main() {
+PQsendQueryParams()
+; return 0; }
+EOF
+if { (eval echo configure:78360: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQSENDQUERYPARAMS 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQsendPrepare in -lpq""... $ac_c" 1>&6
+echo "configure:78384: checking for PQsendPrepare in -lpq" >&5
+ac_lib_var=`echo pq'_'PQsendPrepare | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78392 "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 PQsendPrepare();
+
+int main() {
+PQsendPrepare()
+; return 0; }
+EOF
+if { (eval echo configure:78403: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQSENDPREPARE 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQsendQueryPrepared in -lpq""... $ac_c" 1>&6
+echo "configure:78427: checking for PQsendQueryPrepared in -lpq" >&5
+ac_lib_var=`echo pq'_'PQsendQueryPrepared | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78435 "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 PQsendQueryPrepared();
+
+int main() {
+PQsendQueryPrepared()
+; return 0; }
+EOF
+if { (eval echo configure:78446: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQSENDQUERYPREPARED 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQputCopyData in -lpq""... $ac_c" 1>&6
+echo "configure:78470: checking for PQputCopyData in -lpq" >&5
+ac_lib_var=`echo pq'_'PQputCopyData | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78478 "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 PQputCopyData();
+
+int main() {
+PQputCopyData()
+; return 0; }
+EOF
+if { (eval echo configure:78489: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQPUTCOPYDATA 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQputCopyEnd in -lpq""... $ac_c" 1>&6
+echo "configure:78513: checking for PQputCopyEnd in -lpq" >&5
+ac_lib_var=`echo pq'_'PQputCopyEnd | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78521 "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 PQputCopyEnd();
+
+int main() {
+PQputCopyEnd()
+; return 0; }
+EOF
+if { (eval echo configure:78532: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQPUTCOPYEND 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQgetCopyData in -lpq""... $ac_c" 1>&6
+echo "configure:78556: checking for PQgetCopyData in -lpq" >&5
+ac_lib_var=`echo pq'_'PQgetCopyData | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78564 "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 PQgetCopyData();
+
+int main() {
+PQgetCopyData()
+; return 0; }
+EOF
+if { (eval echo configure:78575: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQGETCOPYDATA 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQfreemem in -lpq""... $ac_c" 1>&6
+echo "configure:78599: checking for PQfreemem in -lpq" >&5
+ac_lib_var=`echo pq'_'PQfreemem | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78607 "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 PQfreemem();
+
+int main() {
+PQfreemem()
+; return 0; }
+EOF
+if { (eval echo configure:78618: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQFREEMEM 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQsetErrorVerbosity in -lpq""... $ac_c" 1>&6
+echo "configure:78642: checking for PQsetErrorVerbosity in -lpq" >&5
+ac_lib_var=`echo pq'_'PQsetErrorVerbosity | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78650 "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 PQsetErrorVerbosity();
+
+int main() {
+PQsetErrorVerbosity()
+; return 0; }
+EOF
+if { (eval echo configure:78661: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQSETERRORVERBOSITY 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQftable in -lpq""... $ac_c" 1>&6
+echo "configure:78685: checking for PQftable in -lpq" >&5
+ac_lib_var=`echo pq'_'PQftable | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78693 "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 PQftable();
+
+int main() {
+PQftable()
+; return 0; }
+EOF
+if { (eval echo configure:78704: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQFTABLE 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6
+echo "configure:78728: checking for PQescapeStringConn in -lpq" >&5
+ac_lib_var=`echo pq'_'PQescapeStringConn | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78736 "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 PQescapeStringConn();
+
+int main() {
+PQescapeStringConn()
+; return 0; }
+EOF
+if { (eval echo configure:78747: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQESCAPE_CONN 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6
+echo "configure:78771: checking for PQescapeByteaConn in -lpq" >&5
+ac_lib_var=`echo pq'_'PQescapeByteaConn | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78779 "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 PQescapeByteaConn();
+
+int main() {
+PQescapeByteaConn()
+; return 0; }
+EOF
+if { (eval echo configure:78790: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PQESCAPE_BYTEA_CONN 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6
+echo "configure:78814: checking for pg_encoding_to_char in -lpq" >&5
+ac_lib_var=`echo pq'_'pg_encoding_to_char | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78822 "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 pg_encoding_to_char();
+
+int main() {
+pg_encoding_to_char()
+; return 0; }
+EOF
+if { (eval echo configure:78833: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for lo_create in -lpq""... $ac_c" 1>&6
+echo "configure:78857: checking for lo_create in -lpq" >&5
+ac_lib_var=`echo pq'_'lo_create | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78865 "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 lo_create();
+
+int main() {
+lo_create()
+; return 0; }
+EOF
+if { (eval echo configure:78876: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PG_LO_CREATE 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  echo $ac_n "checking for lo_import_with_oid in -lpq""... $ac_c" 1>&6
+echo "configure:78900: checking for lo_import_with_oid in -lpq" >&5
+ac_lib_var=`echo pq'_'lo_import_with_oid | 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="-lpq  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 78908 "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 lo_import_with_oid();
+
+int main() {
+lo_import_with_oid()
+; return 0; }
+EOF
+if { (eval echo configure:78919: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_PG_LO_IMPORT_WITH_OID 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  LIBS=$old_LIBS
+  LDFLAGS=$old_LDFLAGS
+
+  
+
+  if test "$ext_shared" = "yes"; then
+    PGSQL_SHARED_LIBADD="-lpq $PGSQL_SHARED_LIBADD"
+    if test -n "$PGSQL_LIBDIR"; then
+      
+  if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PGSQL_LIBDIR
+  else
+    
+    ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        PGSQL_SHARED_LIBADD="-L$ai_p $PGSQL_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && PGSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PGSQL_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$PGSQL_LIBDIR"; then
+    
+  if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PGSQL_LIBDIR
+  else
+    
+    ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`"
+  fi
+
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+    
+  fi
+
+  fi
+  
+  
+  case pq in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lpq $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
+
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PGSQL_SHARED_LIBADD"
+
+
+  
+  if test "$PGSQL_INCLUDE" != "/usr/include"; then
+    
+  if test -z "$PGSQL_INCLUDE" || echo "$PGSQL_INCLUDE" | grep '^/' >/dev/null ; then
+    ai_p=$PGSQL_INCLUDE
+  else
+    
+    ep_dir="`echo $PGSQL_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PGSQL_INCLUDE\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+
+  
+  ext_builddir=ext/pgsql
+  ext_srcdir=$abs_srcdir/ext/pgsql
+
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_PGSQL_SHARED=no
+    
+  
+  case ext/pgsql in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in pgsql.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC pgsql"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC pgsql"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_PGSQL_SHARED=yes
+      
+  case ext/pgsql in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in pgsql.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_pgsql="$shared_objects_pgsql $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phppgsql.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PHPPGSQL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phppgsql.so '$ext_builddir'/phppgsql.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPGSQL, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PHPPGSQL_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phppgsql.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phppgsql.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pgsql"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phppgsql.$suffix: $ext_builddir/phppgsql.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phppgsql.$suffix \$(phplibdir)
+
+$ext_builddir/phppgsql.$suffix: \$(shared_objects_pgsql) \$(PHPPGSQL_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/pgsql.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PGSQL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/pgsql.so '$ext_builddir'/pgsql.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PGSQL, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PGSQL_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pgsql.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pgsql.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pgsql"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/pgsql.$suffix: $ext_builddir/pgsql.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/pgsql.$suffix \$(phplibdir)
+
+$ext_builddir/pgsql.$suffix: \$(shared_objects_pgsql) \$(PGSQL_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_PGSQL 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_PGSQL_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/pgsql in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in pgsql.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC pgsql"
+        ;;
+      *)
+        
+  
+  case ext/pgsql in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in pgsql.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC pgsql"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=pgsql
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
+
+fi
+
+
+
+
+
+php_enable_phar=yes
+
+echo $ac_n "checking for phar archive support""... $ac_c" 1>&6
+echo "configure:79379: checking for phar archive support" >&5
+# Check whether --enable-phar or --disable-phar was given.
+if test "${enable_phar+set}" = set; then
+  enableval="$enable_phar"
+  PHP_PHAR=$enableval
+else
+  
+  PHP_PHAR=yes
+  test "$PHP_ENABLE_ALL" && PHP_PHAR=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_PHAR in
+shared,*)
+  PHP_PHAR=`echo "$PHP_PHAR"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_PHAR=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_PHAR" != "no"; then
+  
+  ext_builddir=ext/phar
+  ext_srcdir=$abs_srcdir/ext/phar
+
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_PHAR_SHARED=no
+    
+  
+  case ext/phar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC phar"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC phar"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_PHAR_SHARED=yes
+      
+  case ext/phar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_phar="$shared_objects_phar $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpphar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHPPHAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpphar.so '$ext_builddir'/phpphar.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPHAR, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHPPHAR_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpphar.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpphar.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_phar"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpphar.$suffix: $ext_builddir/phpphar.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpphar.$suffix \$(phplibdir)
+
+$ext_builddir/phpphar.$suffix: \$(shared_objects_phar) \$(PHPPHAR_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phar.so '$ext_builddir'/phar.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHAR, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHAR_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phar.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phar.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_phar"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phar.$suffix: $ext_builddir/phar.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phar.$suffix \$(phplibdir)
+
+$ext_builddir/phar.$suffix: \$(shared_objects_phar) \$(PHAR_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_PHAR 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_PHAR_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/phar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC phar"
+        ;;
+      *)
+        
+  
+  case ext/phar in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC phar"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=phar
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
+
+  echo $ac_n "checking for phar openssl support""... $ac_c" 1>&6
+echo "configure:79713: checking for phar openssl support" >&5
+  if test "$PHP_HASH_SHARED" != "yes"; then
+    if test "$PHP_HASH" != "no"; then
+      cat >> confdefs.h <<\EOF
+#define PHAR_HASH_OK 1
+EOF
+
+    fi
+  else
+    echo "configure: warning: Phar: sha256/sha512 signature support disabled if ext/hash is built shared" 1>&2
+  fi
+  if test "$PHP_OPENSSL_SHARED" = "yes"; then
+    echo "$ac_t""no (shared openssl)" 1>&6
+  else
+    if test "$PHP_OPENSSL" = "yes"; then
+      echo "$ac_t""yes" 1>&6
+      cat >> confdefs.h <<\EOF
+#define PHAR_HAVE_OPENSSL 1
+EOF
+
+    else
+      echo "$ac_t""no" 1>&6
+    fi
+  fi
+  
+  am_i_shared=$PHP_PHAR_SHARED
+  is_it_shared=$PHP_HASH_SHARED
+  is_it_enabled=$PHP_HASH
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension phar to build statically, but it
+depends on extension hash, which you've configured to build shared.
+You either need to build phar shared or build hash statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension phar, which depends on extension hash,
+but you've either not enabled hash, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+  
+  am_i_shared=$PHP_PHAR_SHARED
+  is_it_shared=$PHP_SPL_SHARED
+  is_it_enabled=$PHP_SPL
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension phar to build statically, but it
+depends on extension spl, which you've configured to build shared.
+You either need to build phar shared or build spl statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension phar, which depends on extension spl,
+but you've either not enabled spl, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+  
+  src=$ext_srcdir/Makefile.frag
+  ac_srcdir=$ext_srcdir
+  ac_builddir=$ext_builddir
+  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
+
 fi
 
-  echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6
-echo "configure:76119: checking for PQprepare in -lpq" >&5
-ac_lib_var=`echo pq'_'PQprepare | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76127 "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 PQprepare();
 
-int main() {
-PQprepare()
-; return 0; }
-EOF
-if { (eval echo configure:76138: \"$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
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQPREPARE 1
-EOF
+php_enable_posix=yes
 
+echo $ac_n "checking whether to enable POSIX-like functions""... $ac_c" 1>&6
+echo "configure:79788: checking whether to enable POSIX-like functions" >&5
+# Check whether --enable-posix or --disable-posix was given.
+if test "${enable_posix+set}" = set; then
+  enableval="$enable_posix"
+  PHP_POSIX=$enableval
 else
-  echo "$ac_t""no" 1>&6
+  
+  PHP_POSIX=yes
+  test "$PHP_ENABLE_ALL" && PHP_POSIX=$PHP_ENABLE_ALL
+
 fi
 
-  echo $ac_n "checking for PQexecPrepared in -lpq""... $ac_c" 1>&6
-echo "configure:76162: checking for PQexecPrepared in -lpq" >&5
-ac_lib_var=`echo pq'_'PQexecPrepared | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76170 "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 PQexecPrepared();
 
-int main() {
-PQexecPrepared()
-; return 0; }
-EOF
-if { (eval echo configure:76181: \"$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
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQEXECPREPARED 1
-EOF
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_POSIX in
+shared,*)
+  PHP_POSIX=`echo "$PHP_POSIX"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_POSIX=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-  echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6
-echo "configure:76205: checking for PQresultErrorField in -lpq" >&5
-ac_lib_var=`echo pq'_'PQresultErrorField | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76213 "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 PQresultErrorField();
 
-int main() {
-PQresultErrorField()
-; return 0; }
-EOF
-if { (eval echo configure:76224: \"$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"
+echo "$ac_t""$ext_output" 1>&6
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+
+
+
+if test "$PHP_POSIX" = "yes"; then
   cat >> confdefs.h <<\EOF
-#define HAVE_PQRESULTERRORFIELD 1
+#define HAVE_POSIX 1
 EOF
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+  
+  ext_builddir=ext/posix
+  ext_srcdir=$abs_srcdir/ext/posix
 
-  echo $ac_n "checking for PQsendQueryParams in -lpq""... $ac_c" 1>&6
-echo "configure:76248: checking for PQsendQueryParams in -lpq" >&5
-ac_lib_var=`echo pq'_'PQsendQueryParams | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76256 "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 PQsendQueryParams();
+  ac_extra=
 
-int main() {
-PQsendQueryParams()
-; return 0; }
-EOF
-if { (eval echo configure:76267: \"$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"
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_POSIX_SHARED=no
+    
+  
+  case ext/posix in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQSENDQUERYPARAMS 1
-EOF
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-  echo $ac_n "checking for PQsendPrepare in -lpq""... $ac_c" 1>&6
-echo "configure:76291: checking for PQsendPrepare in -lpq" >&5
-ac_lib_var=`echo pq'_'PQsendPrepare | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76299 "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 PQsendPrepare();
+  old_IFS=$IFS
+  for ac_src in posix.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-int main() {
-PQsendPrepare()
-; return 0; }
-EOF
-if { (eval echo configure:76310: \"$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"
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQSENDPREPARE 1
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-  echo $ac_n "checking for PQsendQueryPrepared in -lpq""... $ac_c" 1>&6
-echo "configure:76334: checking for PQsendQueryPrepared in -lpq" >&5
-ac_lib_var=`echo pq'_'PQsendQueryPrepared | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76342 "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 PQsendQueryPrepared();
+    EXT_STATIC="$EXT_STATIC posix"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC posix"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_POSIX_SHARED=yes
+      
+  case ext/posix in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-int main() {
-PQsendQueryPrepared()
-; return 0; }
-EOF
-if { (eval echo configure:76353: \"$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"
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQSENDQUERYPREPARED 1
-EOF
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+  old_IFS=$IFS
+  for ac_src in posix.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_posix="$shared_objects_posix $ac_bdir$ac_obj.lo"
 
-  echo $ac_n "checking for PQputCopyData in -lpq""... $ac_c" 1>&6
-echo "configure:76377: checking for PQputCopyData in -lpq" >&5
-ac_lib_var=`echo pq'_'PQputCopyData | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76385 "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 PQputCopyData();
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main() {
-PQputCopyData()
-; return 0; }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:76396: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQPUTCOPYDATA 1
-EOF
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpposix.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(PHPPOSIX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpposix.so '$ext_builddir'/phpposix.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPOSIX, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(PHPPOSIX_SHARED_LIBADD)'
+      ;;
+  esac
 
-  echo $ac_n "checking for PQputCopyEnd in -lpq""... $ac_c" 1>&6
-echo "configure:76420: checking for PQputCopyEnd in -lpq" >&5
-ac_lib_var=`echo pq'_'PQputCopyEnd | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76428 "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 PQputCopyEnd();
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpposix.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpposix.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_posix"
 
-int main() {
-PQputCopyEnd()
-; return 0; }
-EOF
-if { (eval echo configure:76439: \"$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"
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpposix.$suffix: $ext_builddir/phpposix.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpposix.$suffix \$(phplibdir)
+
+$ext_builddir/phpposix.$suffix: \$(shared_objects_posix) \$(PHPPOSIX_SHARED_DEPENDENCIES)
+	$link_cmd
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQPUTCOPYEND 1
 EOF
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+          ;;
+        *)
+          
+  install_modules="install-modules"
 
-  echo $ac_n "checking for PQgetCopyData in -lpq""... $ac_c" 1>&6
-echo "configure:76463: checking for PQgetCopyData in -lpq" >&5
-ac_lib_var=`echo pq'_'PQgetCopyData | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76471 "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 PQgetCopyData();
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/posix.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(POSIX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/posix.so '$ext_builddir'/posix.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(POSIX, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(POSIX_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/posix.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/posix.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_posix"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/posix.$suffix: $ext_builddir/posix.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/posix.$suffix \$(phplibdir)
+
+$ext_builddir/posix.$suffix: \$(shared_objects_posix) \$(POSIX_SHARED_DEPENDENCIES)
+	$link_cmd
 
-int main() {
-PQgetCopyData()
-; return 0; }
 EOF
-if { (eval echo configure:76482: \"$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
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQGETCOPYDATA 1
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_POSIX 1
 EOF
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_POSIX_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/posix in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-  echo $ac_n "checking for PQfreemem in -lpq""... $ac_c" 1>&6
-echo "configure:76506: checking for PQfreemem in -lpq" >&5
-ac_lib_var=`echo pq'_'PQfreemem | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76514 "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 PQfreemem();
 
-int main() {
-PQfreemem()
-; return 0; }
-EOF
-if { (eval echo configure:76525: \"$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"
+  old_IFS=$IFS
+  for ac_src in posix.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQFREEMEM 1
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-  echo $ac_n "checking for PQsetErrorVerbosity in -lpq""... $ac_c" 1>&6
-echo "configure:76549: checking for PQsetErrorVerbosity in -lpq" >&5
-ac_lib_var=`echo pq'_'PQsetErrorVerbosity | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76557 "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 PQsetErrorVerbosity();
+        EXT_STATIC="$EXT_STATIC posix"
+        ;;
+      *)
+        
+  
+  case ext/posix in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-int main() {
-PQsetErrorVerbosity()
-; return 0; }
-EOF
-if { (eval echo configure:76568: \"$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"
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQSETERRORVERBOSITY 1
-EOF
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+  old_IFS=$IFS
+  for ac_src in posix.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
-  echo $ac_n "checking for PQftable in -lpq""... $ac_c" 1>&6
-echo "configure:76592: checking for PQftable in -lpq" >&5
-ac_lib_var=`echo pq'_'PQftable | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76600 "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 PQftable();
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main() {
-PQftable()
-; return 0; }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:76611: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQFTABLE 1
-EOF
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC posix"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
-  echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6
-echo "configure:76635: checking for PQescapeStringConn in -lpq" >&5
-ac_lib_var=`echo pq'_'PQescapeStringConn | 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="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76643 "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 PQescapeStringConn();
 
-int main() {
-PQescapeStringConn()
-; return 0; }
-EOF
-if { (eval echo configure:76654: \"$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"
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=posix
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQESCAPE_CONN 1
-EOF
+  fi
 
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-  echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6
-echo "configure:76678: checking for PQescapeByteaConn in -lpq" >&5
-ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  for ac_hdr in sys/mkdev.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:80130: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76686 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 80135 "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 PQescapeByteaConn();
-
-int main() {
-PQescapeByteaConn()
-; return 0; }
+#include <$ac_hdr>
 EOF
-if { (eval echo configure:76697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:80140: \"$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_lib_$ac_lib_var=yes"
+  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_lib_$ac_lib_var=no"
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PQESCAPE_BYTEA_CONN 1
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-  echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6
-echo "configure:76721: checking for pg_encoding_to_char in -lpq" >&5
-ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+
+  for ac_func in seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:80170: 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
-  ac_save_LIBS="$LIBS"
-LIBS="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76729 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 80175 "configure"
 #include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 pg_encoding_to_char();
+char $ac_func();
 
 int main() {
-pg_encoding_to_char()
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
 ; return 0; }
 EOF
-if { (eval echo configure:76740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80198: \"$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"
+  eval "ac_cv_func_$ac_func=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  eval "ac_cv_func_$ac_func=no"
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT 1
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-  echo $ac_n "checking for lo_create in -lpq""... $ac_c" 1>&6
-echo "configure:76764: checking for lo_create in -lpq" >&5
-ac_lib_var=`echo pq'_'lo_create | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+  echo $ac_n "checking for working ttyname_r() implementation""... $ac_c" 1>&6
+echo "configure:80224: checking for working ttyname_r() implementation" >&5
+  if test "$cross_compiling" = yes; then
+  
+    echo "$ac_t""no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" 1>&6
+  
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76772 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 80231 "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 lo_create();
 
-int main() {
-lo_create()
-; return 0; }
+#include <unistd.h>
+
+int main(int argc, char *argv[])
+{
+	char buf[64];
+
+	return ttyname_r(0, buf, 64) ? 1 : 0;
+}
+  
 EOF
-if { (eval echo configure:76783: \"$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"
+if { (eval echo configure:80244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+    echo "$ac_t""yes" 1>&6
+    cat >> confdefs.h <<\EOF
+#define HAVE_TTYNAME_R 1
+EOF
+
+  
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  rm -fr conftest*
+  
+    echo "$ac_t""no, posix_ttyname() will be thread-unsafe" 1>&6
+  
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+rm -fr conftest*
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_PG_LO_CREATE 1
-EOF
 
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-  echo $ac_n "checking for lo_import_with_oid in -lpq""... $ac_c" 1>&6
-echo "configure:76807: checking for lo_import_with_oid in -lpq" >&5
-ac_lib_var=`echo pq'_'lo_import_with_oid | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "checking for utsname.domainname""... $ac_c" 1>&6
+echo "configure:80266: checking for utsname.domainname" >&5
+if eval "test \"`echo '$''{'ac_cv_have_utsname_domainname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpq  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 76815 "configure"
+  
+    cat > conftest.$ac_ext <<EOF
+#line 80272 "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 lo_import_with_oid();
 
+      #define _GNU_SOURCE
+      #include <sys/utsname.h>
+    
 int main() {
-lo_import_with_oid()
+
+      return sizeof(((struct utsname *)0)->domainname);
+    
 ; return 0; }
 EOF
-if { (eval echo configure:76826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  
+      ac_cv_have_utsname_domainname=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
-  cat >> confdefs.h <<\EOF
-#define HAVE_PG_LO_IMPORT_WITH_OID 1
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  LIBS=$old_LIBS
-  LDFLAGS=$old_LDFLAGS
-
-  
-
-  if test "$ext_shared" = "yes"; then
-    PGSQL_SHARED_LIBADD="-lpq $PGSQL_SHARED_LIBADD"
-    if test -n "$PGSQL_LIBDIR"; then
-      
-  if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PGSQL_LIBDIR
-  else
-    
-    ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        PGSQL_SHARED_LIBADD="-L$ai_p $PGSQL_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && PGSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PGSQL_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
+      ac_cv_have_utsname_domainname=no
     
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+fi
+rm -f conftest*
   
-  fi
-
-
-      fi
-    
-  fi
-
-    fi
-  else
-    
+fi
 
-  if test -n "$PGSQL_LIBDIR"; then
-    
-  if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PGSQL_LIBDIR
-  else
-    
-    ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`"
-  fi
+echo "$ac_t""$ac_cv_have_utsname_domainname" 1>&6
+  if test "$ac_cv_have_utsname_domainname" = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_UTSNAME_DOMAINNAME 1
+EOF
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
   fi
+fi
 
 
-    
-  fi
 
-  fi
-  
-  
-  case pq in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lpq $LIBS" 
-   ;;
-  esac
+php_with_pspell=no
 
+echo $ac_n "checking for PSPELL support""... $ac_c" 1>&6
+echo "configure:80315: checking for PSPELL support" >&5
+# Check whether --with-pspell or --without-pspell was given.
+if test "${with_pspell+set}" = set; then
+  withval="$with_pspell"
+  PHP_PSPELL=$withval
+else
+  
+  PHP_PSPELL=no
+  test "$PHP_ENABLE_ALL" && PHP_PSPELL=$PHP_ENABLE_ALL
 
+fi
 
 
-  fi
 
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_PSPELL in
+shared,*)
+  PHP_PSPELL=`echo "$PHP_PSPELL"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_PSPELL=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PGSQL_SHARED_LIBADD"
 
 
-  
-  if test "$PGSQL_INCLUDE" != "/usr/include"; then
-    
-  if test -z "$PGSQL_INCLUDE" || echo "$PGSQL_INCLUDE" | grep '^/' >/dev/null ; then
-    ai_p=$PGSQL_INCLUDE
-  else
-    
-    ep_dir="`echo $PGSQL_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PGSQL_INCLUDE\"`"
-  fi
+echo "$ac_t""$ext_output" 1>&6
 
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
 
-  fi
 
 
-  
-  ext_builddir=ext/pgsql
-  ext_srcdir=$abs_srcdir/ext/pgsql
+if test "$PHP_PSPELL" != "no"; then
+	
+  ext_builddir=ext/pspell
+  ext_srcdir=$abs_srcdir/ext/pspell
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_PGSQL_SHARED=no
+    PHP_PSPELL_SHARED=no
     
   
-  case ext/pgsql in
+  case ext/pspell in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -77009,7 +80380,7 @@ fi
 
 
   old_IFS=$IFS
-  for ac_src in pgsql.c; do
+  for ac_src in pspell.c; do
   
       IFS=.
       set $ac_src
@@ -77032,18 +80403,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC pgsql"
+    EXT_STATIC="$EXT_STATIC pspell"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC pgsql"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC pspell"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_PGSQL_SHARED=yes
+      PHP_PSPELL_SHARED=yes
       
-  case ext/pgsql in
+  case ext/pspell in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -77058,14 +80429,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in pgsql.c; do
+  for ac_src in pspell.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_pgsql="$shared_objects_pgsql $ac_bdir$ac_obj.lo"
+      shared_objects_pspell="$shared_objects_pspell $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -77088,31 +80459,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phppgsql.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PHPPGSQL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phppgsql.so '$ext_builddir'/phppgsql.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phppspell.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PHPPSPELL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phppspell.so '$ext_builddir'/phppspell.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPGSQL, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPSPELL, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PHPPGSQL_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PHPPSPELL_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phppgsql.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phppspell.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phppgsql.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phppspell.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pgsql"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pspell"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phppgsql.$suffix: $ext_builddir/phppgsql.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phppgsql.$suffix \$(phplibdir)
+\$(phplibdir)/phppspell.$suffix: $ext_builddir/phppspell.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phppspell.$suffix \$(phplibdir)
 
-$ext_builddir/phppgsql.$suffix: \$(shared_objects_pgsql) \$(PHPPGSQL_SHARED_DEPENDENCIES)
+$ext_builddir/phppspell.$suffix: \$(shared_objects_pspell) \$(PHPPSPELL_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -77125,31 +80496,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/pgsql.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PGSQL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/pgsql.so '$ext_builddir'/pgsql.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/pspell.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PSPELL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/pspell.so '$ext_builddir'/pspell.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PGSQL, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PSPELL, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pgsql) $(PGSQL_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PSPELL_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pgsql.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pspell.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pgsql.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pspell.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pgsql"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pspell"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/pgsql.$suffix: $ext_builddir/pgsql.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/pgsql.$suffix \$(phplibdir)
+\$(phplibdir)/pspell.$suffix: $ext_builddir/pspell.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/pspell.$suffix \$(phplibdir)
 
-$ext_builddir/pgsql.$suffix: \$(shared_objects_pgsql) \$(PGSQL_SHARED_DEPENDENCIES)
+$ext_builddir/pspell.$suffix: \$(shared_objects_pspell) \$(PSPELL_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -77157,22 +80528,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_PGSQL 1
+#define COMPILE_DL_PSPELL 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_PGSQL_SHARED=no
+    PHP_PSPELL_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/pgsql in
+  case ext/pspell in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -77187,7 +80558,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in pgsql.c; do
+  for ac_src in pspell.c; do
   
       IFS=.
       set $ac_src
@@ -77210,87 +80581,533 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC pgsql"
+        EXT_STATIC="$EXT_STATIC pspell"
         ;;
       *)
         
   
-  case ext/pgsql in
+  case ext/pspell in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in pspell.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC pspell"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=pspell
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
+
+	if test "$PHP_PSPELL" != "yes"; then
+	    PSPELL_SEARCH_DIRS=$PHP_PSPELL
+	else
+	    PSPELL_SEARCH_DIRS="/usr/local /usr"
+	fi
+	for i in $PSPELL_SEARCH_DIRS; do
+		if test -f $i/include/pspell/pspell.h; then
+			PSPELL_DIR=$i
+			PSPELL_INCDIR=$i/include/pspell
+		elif test -f $i/include/pspell.h; then
+			PSPELL_DIR=$i
+			PSPELL_INCDIR=$i/include
+		fi
+	done
+
+	if test -z "$PSPELL_DIR"; then
+		{ echo "configure: error: Cannot find pspell" 1>&2; exit 1; }
+	fi
+
+	PSPELL_LIBDIR=$PSPELL_DIR/$PHP_LIBDIR
+
+	
+
+  if test "$ext_shared" = "yes"; then
+    PSPELL_SHARED_LIBADD="-lpspell $PSPELL_SHARED_LIBADD"
+    if test -n "$PSPELL_LIBDIR"; then
+      
+  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PSPELL_LIBDIR
+  else
+    
+    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        PSPELL_SHARED_LIBADD="-L$ai_p $PSPELL_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && PSPELL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PSPELL_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$PSPELL_LIBDIR"; then
+    
+  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PSPELL_LIBDIR
+  else
+    
+    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
+  fi
+
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+    
+  fi
+
+  fi
+  
+  
+  case pspell in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lpspell $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
+
+
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+		-L$PSPELL_LIBDIR
+	"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
   esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for new_aspell_config in -laspell""... $ac_c" 1>&6
+echo "configure:80865: checking for new_aspell_config in -laspell" >&5
+ac_lib_var=`echo aspell'_'new_aspell_config | 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="-laspell  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 80873 "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 new_aspell_config();
+
+int main() {
+new_aspell_config()
+; return 0; }
+EOF
+if { (eval echo configure:80884: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+		
+
+  if test "$ext_shared" = "yes"; then
+    PSPELL_SHARED_LIBADD="-laspell $PSPELL_SHARED_LIBADD"
+    if test -n "$PSPELL_LIBDIR"; then
+      
+  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PSPELL_LIBDIR
+  else
+    
+    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        PSPELL_SHARED_LIBADD="-L$ai_p $PSPELL_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && PSPELL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PSPELL_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$PSPELL_LIBDIR"; then
+    
+  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PSPELL_LIBDIR
+  else
+    
+    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
+  fi
+
+    
+      
+  
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+    
+  fi
 
-  old_IFS=$IFS
-  for ac_src in pgsql.c; do
+  fi
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  
+  case aspell in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-laspell $LIBS" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
 
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC pgsql"
   fi
+
+
+	
   
+else
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_aspell_new_aspell_config
+    
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
+fi
 
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=pgsql
+	
+  if test "$PSPELL_INCDIR" != "/usr/include"; then
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+  if test -z "$PSPELL_INCDIR" || echo "$PSPELL_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PSPELL_INCDIR
+  else
+    
+    ep_dir="`echo $PSPELL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PSPELL_INCDIR\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
   fi
 
+	
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PSPELL_SHARED_LIBADD"
+
+	cat >> confdefs.h <<\EOF
+#define HAVE_PSPELL 1
+EOF
+
 fi
 
 
 
+php_with_libedit=no
 
+echo $ac_n "checking for libedit readline replacement""... $ac_c" 1>&6
+echo "configure:81058: checking for libedit readline replacement" >&5
+# Check whether --with-libedit or --without-libedit was given.
+if test "${with_libedit+set}" = set; then
+  withval="$with_libedit"
+  PHP_LIBEDIT=$withval
+else
+  
+  PHP_LIBEDIT=no
+  test "$PHP_ENABLE_ALL" && PHP_LIBEDIT=$PHP_ENABLE_ALL
 
-php_enable_phar=yes
+fi
 
-echo $ac_n "checking for phar archive support""... $ac_c" 1>&6
-echo "configure:77286: checking for phar archive support" >&5
-# Check whether --enable-phar or --disable-phar was given.
-if test "${enable_phar+set}" = set; then
-  enableval="$enable_phar"
-  PHP_PHAR=$enableval
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_LIBEDIT in
+shared,*)
+  PHP_LIBEDIT=`echo "$PHP_LIBEDIT"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_LIBEDIT=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_LIBEDIT" = "no"; then
+  
+php_with_readline=no
+
+echo $ac_n "checking for readline support""... $ac_c" 1>&6
+echo "configure:81103: checking for readline support" >&5
+# Check whether --with-readline or --without-readline was given.
+if test "${with_readline+set}" = set; then
+  withval="$with_readline"
+  PHP_READLINE=$withval
 else
   
-  PHP_PHAR=yes
-  test "$PHP_ENABLE_ALL" && PHP_PHAR=$PHP_ENABLE_ALL
+  PHP_READLINE=no
+  test "$PHP_ENABLE_ALL" && PHP_READLINE=$PHP_ENABLE_ALL
 
 fi
 
@@ -77298,12 +81115,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_PHAR in
+case $PHP_READLINE in
 shared,*)
-  PHP_PHAR=`echo "$PHP_PHAR"|$SED 's/^shared,//'`
+  PHP_READLINE=`echo "$PHP_READLINE"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_PHAR=yes
+  PHP_READLINE=yes
   ;;
 no)
   ext_output=no
@@ -77321,764 +81138,1178 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
+else
+    php_with_readline=no
+fi
+
+if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
+  for i in $PHP_READLINE /usr/local /usr; do
+    test -f $i/include/readline/readline.h && READLINE_DIR=$i && break
+  done
+
+  if test -z "$READLINE_DIR"; then
+    { echo "configure: error: Please reinstall readline - I cannot find readline.h" 1>&2; exit 1; }
+  fi
 
-if test "$PHP_PHAR" != "no"; then
   
-  ext_builddir=ext/phar
-  ext_srcdir=$abs_srcdir/ext/phar
+  if test "$READLINE_DIR/include" != "/usr/include"; then
+    
+  if test -z "$READLINE_DIR/include" || echo "$READLINE_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$READLINE_DIR/include
+  else
+    
+    ep_dir="`echo $READLINE_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$READLINE_DIR/include\"`"
+  fi
 
-  ac_extra=
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_PHAR_SHARED=no
+  fi
+
+
+  PHP_READLINE_LIBS=""
+  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
+echo "configure:81189: checking for tgetent in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'tgetent | 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="-lncurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 81197 "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 tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:81208: \"$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
+  
     
   
-  case ext/phar in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  case ncurses in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD" 
+    else
+      
+  
+  case ncurses in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lncurses $LIBS" 
+   ;;
+  esac
+
+
+    fi
+   ;;
   esac
+
+
+    PHP_READLINE_LIBS="$PHP_READLINE_LIBS -lncurses"
+  
+else
+  echo "$ac_t""no" 1>&6
+
+    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
+echo "configure:81253: checking for tgetent in -ltermcap" >&5
+ac_lib_var=`echo termcap'_'tgetent | 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="-ltermcap  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 81261 "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 tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:81272: \"$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
+  
+      
+  
+  case termcap in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD" 
+    else
+      
   
+  case termcap in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-ltermcap $LIBS" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+      PHP_READLINE_LIBS="$PHP_READLINE_LIBS -ltermcap"
+    
+else
+  echo "$ac_t""no" 1>&6
+fi
+
   
+fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+  
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
+  "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  old_IFS=$IFS
-  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
       
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
+echo "configure:81419: checking for readline in -lreadline" >&5
+ac_lib_var=`echo readline'_'readline | 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="-lreadline  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 81427 "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 readline();
+
+int main() {
+readline()
+; return 0; }
+EOF
+if { (eval echo configure:81438: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+    
+
+  if test "$ext_shared" = "yes"; then
+    READLINE_SHARED_LIBADD="-lreadline $READLINE_SHARED_LIBADD"
+    if test -n "$READLINE_DIR/$PHP_LIBDIR"; then
+      
+  if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$READLINE_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
 
+      fi
+    
+  fi
 
-    EXT_STATIC="$EXT_STATIC phar"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC phar"
     fi
   else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_PHAR_SHARED=yes
+    
+
+  if test -n "$READLINE_DIR/$PHP_LIBDIR"; then
+    
+  if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$READLINE_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
       
-  case ext/phar in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
 
+    
+  fi
 
-  old_IFS=$IFS
-  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
+  fi
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_phar="$shared_objects_phar $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+  
+  case readline in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lreadline $LIBS" 
+   ;;
+  esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
 
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpphar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHPPHAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpphar.so '$ext_builddir'/phpphar.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPHAR, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHPPHAR_SHARED_LIBADD)'
-      ;;
-  esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpphar.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpphar.$suffix"
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_phar"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpphar.$suffix: $ext_builddir/phpphar.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpphar.$suffix \$(phplibdir)
 
-$ext_builddir/phpphar.$suffix: \$(shared_objects_phar) \$(PHPPHAR_SHARED_DEPENDENCIES)
-	$link_cmd
 
-EOF
+  
+  
+else
+  echo "$ac_t""no" 1>&6
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_readline_readline
+    
+    { echo "configure: error: readline library not found" 1>&2; exit 1; }
+  
+  
+fi
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phar.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHAR_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phar.so '$ext_builddir'/phar.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHAR, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_phar) $(PHAR_SHARED_LIBADD)'
-      ;;
-  esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phar.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phar.$suffix"
-  fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_phar"
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
+  "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phar.$suffix: $ext_builddir/phar.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phar.$suffix \$(phplibdir)
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-$ext_builddir/phar.$suffix: \$(shared_objects_phar) \$(PHAR_SHARED_DEPENDENCIES)
-	$link_cmd
 
-EOF
+    fi
+   ;;
+  esac
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_PHAR 1
-EOF
 
-    fi
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_PHAR_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
         
   
-  case ext/phar in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+      fi
+    
+  fi
 
-  old_IFS=$IFS
-  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+    ;;
+    esac
+  done
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+  echo $ac_n "checking for rl_pending_input in -lreadline""... $ac_c" 1>&6
+echo "configure:81667: checking for rl_pending_input in -lreadline" >&5
+ac_lib_var=`echo readline'_'rl_pending_input | 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="-lreadline  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 81675 "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 rl_pending_input();
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+int main() {
+rl_pending_input()
+; return 0; }
 EOF
-  done
-
+if { (eval echo configure:81686: \"$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"
 
-        EXT_STATIC="$EXT_STATIC phar"
-        ;;
-      *)
-        
-  
-  case ext/phar in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/phar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/phar/"; ac_bdir="ext/phar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
   
+else
+  echo "$ac_t""no" 1>&6
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c; do
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_readline_rl_pending_input
+    
+    { echo "configure: error: invalid readline installation detected. Try --with-libedit instead." 1>&2; exit 1; }
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+  
+fi
 
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC phar"
-  fi
   
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
+  "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
   
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=phar
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
-  fi
+    fi
+   ;;
+  esac
 
-  echo $ac_n "checking for phar openssl support""... $ac_c" 1>&6
-echo "configure:77620: checking for phar openssl support" >&5
-  if test "$PHP_HASH_SHARED" != "yes"; then
-    if test "$PHP_HASH" != "no"; then
-      cat >> confdefs.h <<\EOF
-#define PHAR_HASH_OK 1
-EOF
 
-    fi
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
-    echo "configure: warning: Phar: sha256/sha512 signature support disabled if ext/hash is built shared" 1>&2
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
-  if test "$PHP_OPENSSL_SHARED" = "yes"; then
-    echo "$ac_t""no (shared openssl)" 1>&6
-  else
-    if test "$PHP_OPENSSL" = "yes"; then
-      echo "$ac_t""yes" 1>&6
-      cat >> confdefs.h <<\EOF
-#define PHAR_HAVE_OPENSSL 1
-EOF
 
-    else
-      echo "$ac_t""no" 1>&6
-    fi
-  fi
-  
-  am_i_shared=$PHP_PHAR_SHARED
-  is_it_shared=$PHP_HASH_SHARED
-  is_it_enabled=$PHP_HASH
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension phar to build statically, but it
-depends on extension hash, which you've configured to build shared.
-You either need to build phar shared or build hash statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension phar, which depends on extension hash,
-but you've either not enabled hash, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-  am_i_shared=$PHP_PHAR_SHARED
-  is_it_shared=$PHP_SPL_SHARED
-  is_it_enabled=$PHP_SPL
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension phar to build statically, but it
-depends on extension spl, which you've configured to build shared.
-You either need to build phar shared or build spl statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension phar, which depends on extension spl,
-but you've either not enabled spl, or have disabled it.
-" 1>&2; exit 1; }
-  fi
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  src=$ext_srcdir/Makefile.frag
-  ac_srcdir=$ext_srcdir
-  ac_builddir=$ext_builddir
-  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
-
-fi
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
 
+      fi
+    
+  fi
 
-php_enable_posix=yes
+    ;;
+    esac
+  done
 
-echo $ac_n "checking whether to enable POSIX-like functions""... $ac_c" 1>&6
-echo "configure:77695: checking whether to enable POSIX-like functions" >&5
-# Check whether --enable-posix or --disable-posix was given.
-if test "${enable_posix+set}" = set; then
-  enableval="$enable_posix"
-  PHP_POSIX=$enableval
+  echo $ac_n "checking for rl_callback_read_char in -lreadline""... $ac_c" 1>&6
+echo "configure:81817: checking for rl_callback_read_char in -lreadline" >&5
+ac_lib_var=`echo readline'_'rl_callback_read_char | 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
-  
-  PHP_POSIX=yes
-  test "$PHP_ENABLE_ALL" && PHP_POSIX=$PHP_ENABLE_ALL
+  ac_save_LIBS="$LIBS"
+LIBS="-lreadline  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 81825 "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 rl_callback_read_char();
 
+int main() {
+rl_callback_read_char()
+; return 0; }
+EOF
+if { (eval echo configure:81836: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+    cat >> confdefs.h <<\EOF
+#define HAVE_RL_CALLBACK_READ_CHAR 1
+EOF
 
+  
+  
+else
+  echo "$ac_t""no" 1>&6
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_POSIX in
-shared,*)
-  PHP_POSIX=`echo "$PHP_POSIX"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_POSIX=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_readline_rl_callback_read_char
+    
+  
+fi
 
 
-echo "$ac_t""$ext_output" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIBREADLINE 1
+EOF
 
 
+elif test "$PHP_LIBEDIT" != "no"; then
 
+  for i in $PHP_LIBEDIT /usr/local /usr; do
+    test -f $i/include/editline/readline.h && LIBEDIT_DIR=$i && break
+  done
 
-if test "$PHP_POSIX" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_POSIX 1
-EOF
+  if test -z "$LIBEDIT_DIR"; then
+    { echo "configure: error: Please reinstall libedit - I cannot find readline.h" 1>&2; exit 1; }
+  fi
 
   
-  ext_builddir=ext/posix
-  ext_srcdir=$abs_srcdir/ext/posix
-
-  ac_extra=
+  if test "$LIBEDIT_DIR/include" != "/usr/include"; then
+    
+  if test -z "$LIBEDIT_DIR/include" || echo "$LIBEDIT_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$LIBEDIT_DIR/include
+  else
+    
+    ep_dir="`echo $LIBEDIT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/include\"`"
+  fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_POSIX_SHARED=no
     
   
-  case ext/posix in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
+  fi
 
-  old_IFS=$IFS
-  for ac_src in posix.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
+echo "configure:81920: checking for tgetent in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'tgetent | 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="-lncurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 81928 "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 tgetent();
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+int main() {
+tgetent()
+; return 0; }
 EOF
-  done
+if { (eval echo configure:81939: \"$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
+  
+    
+  
+  case ncurses in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD" 
+    else
+      
+  
+  case ncurses in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lncurses $LIBS" 
+   ;;
+  esac
 
 
-    EXT_STATIC="$EXT_STATIC posix"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC posix"
     fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_POSIX_SHARED=yes
-      
-  case ext/posix in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+   ;;
   esac
+
+
   
-  
+else
+  echo "$ac_t""no" 1>&6
 
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
+    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
+echo "configure:81983: checking for tgetent in -ltermcap" >&5
+ac_lib_var=`echo termcap'_'tgetent | 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="-ltermcap  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 81991 "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 tgetent();
 
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:82002: \"$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"
 
-  old_IFS=$IFS
-  for ac_src in posix.c; do
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
       
-      shared_objects_posix="$shared_objects_posix $ac_bdir$ac_obj.lo"
+  
+  case termcap in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD" 
+    else
+      
+  
+  case termcap in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-ltermcap $LIBS" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+    fi
+   ;;
+  esac
 
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpposix.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(PHPPOSIX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpposix.so '$ext_builddir'/phpposix.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPOSIX, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(PHPPOSIX_SHARED_LIBADD)'
-      ;;
-  esac
+    
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpposix.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpposix.$suffix"
-  fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_posix"
+fi
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpposix.$suffix: $ext_builddir/phpposix.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpposix.$suffix \$(phplibdir)
 
-$ext_builddir/phpposix.$suffix: \$(shared_objects_posix) \$(PHPPOSIX_SHARED_DEPENDENCIES)
-	$link_cmd
+  
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    -L$READLINE_DIR/$PHP_LIBDIR 
+  "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-EOF
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/posix.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(POSIX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/posix.so '$ext_builddir'/posix.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(POSIX, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_posix) $(POSIX_SHARED_LIBADD)'
-      ;;
+    fi
+   ;;
   esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/posix.$suffix"
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/posix.$suffix"
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_posix"
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/posix.$suffix: $ext_builddir/posix.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/posix.$suffix \$(phplibdir)
 
-$ext_builddir/posix.$suffix: \$(shared_objects_posix) \$(POSIX_SHARED_DEPENDENCIES)
-	$link_cmd
+      fi
+    
+  fi
 
-EOF
+    ;;
+    esac
+  done
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_POSIX 1
+  echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6
+echo "configure:82148: checking for readline in -ledit" >&5
+ac_lib_var=`echo edit'_'readline | 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="-ledit  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 82156 "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 readline();
+
+int main() {
+readline()
+; return 0; }
 EOF
+if { (eval echo configure:82167: \"$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
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+    
+
+  if test "$ext_shared" = "yes"; then
+    READLINE_SHARED_LIBADD="-ledit $READLINE_SHARED_LIBADD"
+    if test -n "$LIBEDIT_DIR/$PHP_LIBDIR"; then
+      
+  if test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$LIBEDIT_DIR/$PHP_LIBDIR" || echo "$LIBEDIT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$LIBEDIT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $LIBEDIT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/$PHP_LIBDIR\"`"
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_POSIX_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
+    
+      if test "$ext_shared" = "yes"; then
+        READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD"
+      else
         
   
-  case ext/posix in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in posix.c; do
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+  fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+      fi
+    
+  fi
 
+    fi
+  else
+    
 
-        EXT_STATIC="$EXT_STATIC posix"
-        ;;
-      *)
-        
+  if test -n "$LIBEDIT_DIR/$PHP_LIBDIR"; then
+    
+  if test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$LIBEDIT_DIR/$PHP_LIBDIR" || echo "$LIBEDIT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$LIBEDIT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $LIBEDIT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      
   
-  case ext/posix in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+    
+  fi
 
-  old_IFS=$IFS
-  for ac_src in posix.c; do
+  fi
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  
+  case edit in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-ledit $LIBS" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
 
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC posix"
   fi
+
   
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
   
+else
+  echo "$ac_t""no" 1>&6
 
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=posix
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_edit_readline
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
-  fi
+    { echo "configure: error: edit library required by readline not found" 1>&2; exit 1; }
+  
+  
+fi
 
 
-  for ac_hdr in sys/mkdev.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:78037: checking for $ac_hdr" >&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 78042 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:78047: \"$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
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIBEDIT 1
 EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
+fi
 
-  for ac_func in seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r
+if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
+  for ac_func in rl_completion_matches
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:78077: checking for $ac_func" >&5
+echo "configure:82308: 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 78082 "configure"
+#line 82313 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -78101,7 +82332,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:78105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82336: \"$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
@@ -78125,154 +82356,20 @@ else
 fi
 done
 
-
-  echo $ac_n "checking for working ttyname_r() implementation""... $ac_c" 1>&6
-echo "configure:78131: checking for working ttyname_r() implementation" >&5
-  if test "$cross_compiling" = yes; then
-  
-    echo "$ac_t""no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" 1>&6
-  
-else
-  cat > conftest.$ac_ext <<EOF
-#line 78138 "configure"
-#include "confdefs.h"
-
-#include <unistd.h>
-
-int main(int argc, char *argv[])
-{
-	char buf[64];
-
-	return ttyname_r(0, buf, 64) ? 1 : 0;
-}
-  
-EOF
-if { (eval echo configure:78151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-    echo "$ac_t""yes" 1>&6
-    cat >> confdefs.h <<\EOF
-#define HAVE_TTYNAME_R 1
-EOF
-
-  
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  
-    echo "$ac_t""no, posix_ttyname() will be thread-unsafe" 1>&6
-  
-fi
-rm -fr conftest*
-fi
-
-
-  echo $ac_n "checking for utsname.domainname""... $ac_c" 1>&6
-echo "configure:78173: checking for utsname.domainname" >&5
-if eval "test \"`echo '$''{'ac_cv_have_utsname_domainname'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-    cat > conftest.$ac_ext <<EOF
-#line 78179 "configure"
-#include "confdefs.h"
-
-      #define _GNU_SOURCE
-      #include <sys/utsname.h>
-    
-int main() {
-
-      return sizeof(((struct utsname *)0)->domainname);
-    
-; return 0; }
-EOF
-if { (eval echo configure:78191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  
-      ac_cv_have_utsname_domainname=yes
-    
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  
-      ac_cv_have_utsname_domainname=no
-    
-fi
-rm -f conftest*
-  
-fi
-
-echo "$ac_t""$ac_cv_have_utsname_domainname" 1>&6
-  if test "$ac_cv_have_utsname_domainname" = yes; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_UTSNAME_DOMAINNAME 1
-EOF
-
-  fi
-fi
-
-
-
-php_with_pspell=no
-
-echo $ac_n "checking for PSPELL support""... $ac_c" 1>&6
-echo "configure:78222: checking for PSPELL support" >&5
-# Check whether --with-pspell or --without-pspell was given.
-if test "${with_pspell+set}" = set; then
-  withval="$with_pspell"
-  PHP_PSPELL=$withval
-else
   
-  PHP_PSPELL=no
-  test "$PHP_ENABLE_ALL" && PHP_PSPELL=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_PSPELL in
-shared,*)
-  PHP_PSPELL=`echo "$PHP_PSPELL"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_PSPELL=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_PSPELL" != "no"; then
-	
-  ext_builddir=ext/pspell
-  ext_srcdir=$abs_srcdir/ext/pspell
+  ext_builddir=ext/readline
+  ext_srcdir=$abs_srcdir/ext/readline
 
   ac_extra=
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_PSPELL_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" != "cli"; then
+    PHP_READLINE_SHARED=no
     
   
-  case ext/pspell in
+  case ext/readline in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -78287,7 +82384,7 @@ if test "$PHP_PSPELL" != "no"; then
 
 
   old_IFS=$IFS
-  for ac_src in pspell.c; do
+  for ac_src in readline.c; do
   
       IFS=.
       set $ac_src
@@ -78310,18 +82407,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC pspell"
+    EXT_STATIC="$EXT_STATIC readline"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC pspell"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC readline"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_PSPELL_SHARED=yes
+      PHP_READLINE_SHARED=yes
       
-  case ext/pspell in
+  case ext/readline in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -78336,14 +82433,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in pspell.c; do
+  for ac_src in readline.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_pspell="$shared_objects_pspell $ac_bdir$ac_obj.lo"
+      shared_objects_readline="$shared_objects_readline $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -78366,31 +82463,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phppspell.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PHPPSPELL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phppspell.so '$ext_builddir'/phppspell.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpreadline.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(PHPREADLINE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpreadline.so '$ext_builddir'/phpreadline.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPPSPELL, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPREADLINE, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PHPPSPELL_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(PHPREADLINE_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phppspell.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpreadline.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phppspell.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpreadline.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pspell"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_readline"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phppspell.$suffix: $ext_builddir/phppspell.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phppspell.$suffix \$(phplibdir)
+\$(phplibdir)/phpreadline.$suffix: $ext_builddir/phpreadline.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpreadline.$suffix \$(phplibdir)
 
-$ext_builddir/phppspell.$suffix: \$(shared_objects_pspell) \$(PHPPSPELL_SHARED_DEPENDENCIES)
+$ext_builddir/phpreadline.$suffix: \$(shared_objects_readline) \$(PHPREADLINE_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -78403,31 +82500,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/pspell.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PSPELL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/pspell.so '$ext_builddir'/pspell.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/readline.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(READLINE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/readline.so '$ext_builddir'/readline.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PSPELL, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(READLINE, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_pspell) $(PSPELL_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(READLINE_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pspell.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/readline.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pspell.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/readline.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pspell"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_readline"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/pspell.$suffix: $ext_builddir/pspell.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/pspell.$suffix \$(phplibdir)
+\$(phplibdir)/readline.$suffix: $ext_builddir/readline.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/readline.$suffix \$(phplibdir)
 
-$ext_builddir/pspell.$suffix: \$(shared_objects_pspell) \$(PSPELL_SHARED_DEPENDENCIES)
+$ext_builddir/readline.$suffix: \$(shared_objects_readline) \$(READLINE_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -78435,22 +82532,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_PSPELL 1
+#define COMPILE_DL_READLINE 1
 EOF
 
     fi
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_PSPELL_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" = "cli"; then
+    PHP_READLINE_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/pspell in
+  case ext/readline in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -78465,7 +82562,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in pspell.c; do
+  for ac_src in readline.c; do
   
       IFS=.
       set $ac_src
@@ -78488,15 +82585,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC pspell"
+        EXT_STATIC="$EXT_STATIC readline"
         ;;
       *)
         
   
-  case ext/pspell in
+  case ext/readline in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -78511,7 +82608,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in pspell.c; do
+  for ac_src in readline.c; do
   
       IFS=.
       set $ac_src
@@ -78536,7 +82633,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC pspell"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC readline"
   fi
   
   
@@ -78545,136 +82642,93 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=pspell
+    PHP_PECL_EXTENSION=readline
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
-	if test "$PHP_PSPELL" != "yes"; then
-	    PSPELL_SEARCH_DIRS=$PHP_PSPELL
-	else
-	    PSPELL_SEARCH_DIRS="/usr/local /usr"
-	fi
-	for i in $PSPELL_SEARCH_DIRS; do
-		if test -f $i/include/pspell/pspell.h; then
-			PSPELL_DIR=$i
-			PSPELL_INCDIR=$i/include/pspell
-		elif test -f $i/include/pspell.h; then
-			PSPELL_DIR=$i
-			PSPELL_INCDIR=$i/include
-		fi
-	done
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST READLINE_SHARED_LIBADD"
 
-	if test -z "$PSPELL_DIR"; then
-		{ echo "configure: error: Cannot find pspell" 1>&2; exit 1; }
-	fi
+fi
 
-	PSPELL_LIBDIR=$PSPELL_DIR/$PHP_LIBDIR
 
-	
 
-  if test "$ext_shared" = "yes"; then
-    PSPELL_SHARED_LIBADD="-lpspell $PSPELL_SHARED_LIBADD"
-    if test -n "$PSPELL_LIBDIR"; then
-      
-  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PSPELL_LIBDIR
-  else
-    
-    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
-  fi
+php_with_recode=no
 
-    
-      if test "$ext_shared" = "yes"; then
-        PSPELL_SHARED_LIBADD="-L$ai_p $PSPELL_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && PSPELL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PSPELL_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+echo $ac_n "checking for recode support""... $ac_c" 1>&6
+echo "configure:82662: checking for recode support" >&5
+# Check whether --with-recode or --without-recode was given.
+if test "${with_recode+set}" = set; then
+  withval="$with_recode"
+  PHP_RECODE=$withval
+else
   
-  fi
-
+  PHP_RECODE=no
+  test "$PHP_ENABLE_ALL" && PHP_RECODE=$PHP_ENABLE_ALL
 
-      fi
-    
-  fi
+fi
 
-    fi
-  else
-    
 
-  if test -n "$PSPELL_LIBDIR"; then
-    
-  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PSPELL_LIBDIR
-  else
-    
-    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
-  fi
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_RECODE in
+shared,*)
+  PHP_RECODE=`echo "$PHP_RECODE"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_RECODE=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
 
-    
-  fi
 
-  fi
-  
-  
-  case pspell in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lpspell $LIBS" 
-   ;;
-  esac
+echo "$ac_t""$ext_output" 1>&6
 
 
 
 
-  fi
+if test "$PHP_RECODE" != "no"; then
+  RECODE_LIST="$PHP_RECODE /usr/local /usr /opt"
 
+  for i in $RECODE_LIST; do
+    if test -f $i/include/recode.h; then
+      RECODE_DIR=$i
+      RECODE_INC=include
+      RECODE_LIB=$PHP_LIBDIR
+    fi
+    if test -f $i/include/recode/recode.h; then
+      RECODE_DIR=$i
+      RECODE_INC=include/recode
+      RECODE_LIB=$PHP_LIBDIR/recode
+    fi
+    if test -f $i/recode/include/recode.h; then
+      RECODE_DIR=$i/recode
+      RECODE_INC=include
+      RECODE_LIB=$PHP_LIBDIR
+    fi
+    test -n "$RECODE_DIR" && break
+  done
 
+  if test -z "$RECODE_DIR"; then
+    { echo "configure: error: Can not find recode.h anywhere under $RECODE_LIST." 1>&2; exit 1; }
+  fi
 
-		
+  
   save_old_LDFLAGS=$LDFLAGS
   ac_stuff="
-		-L$PSPELL_LIBDIR
-	"
+    -L$RECODE_DIR/$RECODE_LIB
+  "
   
   save_ext_shared=$ext_shared
   ext_shared=yes
@@ -78767,27 +82821,27 @@ EOF
     esac
   done
 
-  echo $ac_n "checking for new_aspell_config in -laspell""... $ac_c" 1>&6
-echo "configure:78772: checking for new_aspell_config in -laspell" >&5
-ac_lib_var=`echo aspell'_'new_aspell_config | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for recode_format_table in -lrecode""... $ac_c" 1>&6
+echo "configure:82826: checking for recode_format_table in -lrecode" >&5
+ac_lib_var=`echo recode'_'recode_format_table | 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="-laspell  $LIBS"
+LIBS="-lrecode  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 78780 "configure"
+#line 82834 "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 new_aspell_config();
+char recode_format_table();
 
 int main() {
-new_aspell_config()
+recode_format_table()
 ; return 0; }
 EOF
-if { (eval echo configure:78791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82845: \"$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
@@ -78806,28 +82860,28 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
     LDFLAGS=$save_old_LDFLAGS
     ext_shared=$save_ext_shared
     
-		
+    
 
   if test "$ext_shared" = "yes"; then
-    PSPELL_SHARED_LIBADD="-laspell $PSPELL_SHARED_LIBADD"
-    if test -n "$PSPELL_LIBDIR"; then
+    RECODE_SHARED_LIBADD="-lrecode $RECODE_SHARED_LIBADD"
+    if test -n "$RECODE_DIR/$RECODE_LIB"; then
       
-  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
+  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
     
-  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PSPELL_LIBDIR
+  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
+    ai_p=$RECODE_DIR/$RECODE_LIB
   else
     
-    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        PSPELL_SHARED_LIBADD="-L$ai_p $PSPELL_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && PSPELL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PSPELL_SHARED_LIBADD"
+        RECODE_SHARED_LIBADD="-L$ai_p $RECODE_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && RECODE_SHARED_LIBADD="$ld_runpath_switch$ai_p $RECODE_SHARED_LIBADD"
       else
         
   
@@ -78853,451 +82907,22 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
   else
     
 
-  if test -n "$PSPELL_LIBDIR"; then
-    
-  if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PSPELL_LIBDIR
-  else
-    
-    ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`"
-  fi
-
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
-
-
-    
-  fi
-
-  fi
-  
-  
-  case aspell in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-laspell $LIBS" 
-   ;;
-  esac
-
-
-
-
-  fi
-
-
-	
-  
-else
-  echo "$ac_t""no" 1>&6
-
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_aspell_new_aspell_config
-    
-  
-fi
-
-
-	
-  if test "$PSPELL_INCDIR" != "/usr/include"; then
-    
-  if test -z "$PSPELL_INCDIR" || echo "$PSPELL_INCDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PSPELL_INCDIR
-  else
-    
-    ep_dir="`echo $PSPELL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PSPELL_INCDIR\"`"
-  fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
-
-  fi
-
-	
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PSPELL_SHARED_LIBADD"
-
-	cat >> confdefs.h <<\EOF
-#define HAVE_PSPELL 1
-EOF
-
-fi
-
-
-
-php_with_libedit=no
-
-echo $ac_n "checking for libedit readline replacement""... $ac_c" 1>&6
-echo "configure:78965: checking for libedit readline replacement" >&5
-# Check whether --with-libedit or --without-libedit was given.
-if test "${with_libedit+set}" = set; then
-  withval="$with_libedit"
-  PHP_LIBEDIT=$withval
-else
-  
-  PHP_LIBEDIT=no
-  test "$PHP_ENABLE_ALL" && PHP_LIBEDIT=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_LIBEDIT in
-shared,*)
-  PHP_LIBEDIT=`echo "$PHP_LIBEDIT"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_LIBEDIT=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_LIBEDIT" = "no"; then
-  
-php_with_readline=no
-
-echo $ac_n "checking for readline support""... $ac_c" 1>&6
-echo "configure:79010: checking for readline support" >&5
-# Check whether --with-readline or --without-readline was given.
-if test "${with_readline+set}" = set; then
-  withval="$with_readline"
-  PHP_READLINE=$withval
-else
-  
-  PHP_READLINE=no
-  test "$PHP_ENABLE_ALL" && PHP_READLINE=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_READLINE in
-shared,*)
-  PHP_READLINE=`echo "$PHP_READLINE"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_READLINE=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-else
-    php_with_readline=no
-fi
-
-if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
-  for i in $PHP_READLINE /usr/local /usr; do
-    test -f $i/include/readline/readline.h && READLINE_DIR=$i && break
-  done
-
-  if test -z "$READLINE_DIR"; then
-    { echo "configure: error: Please reinstall readline - I cannot find readline.h" 1>&2; exit 1; }
-  fi
-
-  
-  if test "$READLINE_DIR/include" != "/usr/include"; then
-    
-  if test -z "$READLINE_DIR/include" || echo "$READLINE_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$READLINE_DIR/include
-  else
-    
-    ep_dir="`echo $READLINE_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$READLINE_DIR/include\"`"
-  fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
-
-  fi
-
-
-  PHP_READLINE_LIBS=""
-  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:79096: checking for tgetent in -lncurses" >&5
-ac_lib_var=`echo ncurses'_'tgetent | 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="-lncurses  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 79104 "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 tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:79115: \"$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
-  
-    
-  
-  case ncurses in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD" 
-    else
-      
-  
-  case ncurses in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lncurses $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    PHP_READLINE_LIBS="$PHP_READLINE_LIBS -lncurses"
-  
-else
-  echo "$ac_t""no" 1>&6
-
-    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:79160: checking for tgetent in -ltermcap" >&5
-ac_lib_var=`echo termcap'_'tgetent | 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="-ltermcap  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 79168 "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 tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:79179: \"$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
-  
-      
-  
-  case termcap in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD" 
-    else
-      
-  
-  case termcap in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-ltermcap $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-      PHP_READLINE_LIBS="$PHP_READLINE_LIBS -ltermcap"
+  if test -n "$RECODE_DIR/$RECODE_LIB"; then
     
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  
-fi
-
-
-  
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
-  "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
     
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
+    ai_p=$RECODE_DIR/$RECODE_LIB
   else
     
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
   fi
 
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
+    
+      
   
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
@@ -79313,75 +82938,75 @@ fi
   fi
 
 
-      fi
     
   fi
 
-    ;;
-    esac
-  done
+  fi
+  
+  
+  case recode in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lrecode $LIBS" 
+   ;;
+  esac
 
-  echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:79326: checking for readline in -lreadline" >&5
-ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+  fi
+
+
+  
+  
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lreadline  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 79334 "configure"
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_recode_recode_format_table
+    
+    old_LDFLAGS=$LDFLAGS
+    old_LIBS=$LIBS
+    LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB"
+    LIBS="$LIBS -lrecode"
+    cat > conftest.$ac_ext <<EOF
+#line 82975 "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 readline();
 
+char *program_name;
+    
 int main() {
-readline()
+
+recode_format_table();
+    
 ; return 0; }
 EOF
-if { (eval echo configure:79345: \"$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
+if { (eval echo configure:82986: \"$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=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
   
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-    
+      
 
   if test "$ext_shared" = "yes"; then
-    READLINE_SHARED_LIBADD="-lreadline $READLINE_SHARED_LIBADD"
-    if test -n "$READLINE_DIR/$PHP_LIBDIR"; then
+    RECODE_SHARED_LIBADD="-lrecode $RECODE_SHARED_LIBADD"
+    if test -n "$RECODE_DIR/$RECODE_LIB"; then
       
-  if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
     
-  if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$READLINE_DIR/$PHP_LIBDIR
+  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
+    ai_p=$RECODE_DIR/$RECODE_LIB
   else
     
-    ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD"
+        RECODE_SHARED_LIBADD="-L$ai_p $RECODE_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && RECODE_SHARED_LIBADD="$ld_runpath_switch$ai_p $RECODE_SHARED_LIBADD"
       else
         
   
@@ -79407,18 +83032,18 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
   else
     
 
-  if test -n "$READLINE_DIR/$PHP_LIBDIR"; then
+  if test -n "$RECODE_DIR/$RECODE_LIB"; then
     
-  if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
     
-  if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$READLINE_DIR/$PHP_LIBDIR
+  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
+    ai_p=$RECODE_DIR/$RECODE_LIB
   else
     
-    ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
   fi
 
     
@@ -79444,10 +83069,10 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
   fi
   
   
-  case readline in
+  case recode in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lreadline $LIBS" 
+      DLIBS="-lrecode $DLIBS" 
    ;;
   esac
 
@@ -79457,826 +83082,1022 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
   fi
 
 
-  
-  
-else
-  echo "$ac_t""no" 1>&6
+      cat >> confdefs.h <<\EOF
+#define HAVE_BROKEN_RECODE 1
+EOF
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_readline_readline
     
-    { echo "configure: error: readline library not found" 1>&2; exit 1; }
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+      { echo "configure: error: I cannot link librecode (-L$RECODE_DIR/$RECODE_LIB -lrecode). Is it installed?" 1>&2; exit 1; }
+    
+fi
+rm -f conftest*
+    LIBS=$old_LIBS
+    LDFLAGS=$old_LDFLAGS
   
   
 fi
 
 
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIBRECODE 1
+EOF
+
   
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
-  "
+  if test "$RECODE_DIR/$RECODE_INC" != "/usr/include"; then
+    
+  if test -z "$RECODE_DIR/$RECODE_INC" || echo "$RECODE_DIR/$RECODE_INC" | grep '^/' >/dev/null ; then
+    ai_p=$RECODE_DIR/$RECODE_INC
+  else
+    
+    ep_dir="`echo $RECODE_DIR/$RECODE_INC|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_INC\"`"
+  fi
+
+    
   
-  save_ext_shared=$ext_shared
-  ext_shared=yes
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
       else
-        
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  PHP_VAR_SUBST="$PHP_VAR_SUBST RECODE_SHARED_LIBADD"
+
+  for ac_hdr in stdbool.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:83149: checking for $ac_hdr" >&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 83154 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:83159: \"$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
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
+  ext_builddir=ext/recode
+  ext_srcdir=$abs_srcdir/ext/recode
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_RECODE_SHARED=no
+    
+  
+  case ext/recode in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in recode.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC recode"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC recode"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_RECODE_SHARED=yes
       
+  case ext/recode in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in recode.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
+      shared_objects_recode="$shared_objects_recode $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phprecode.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(PHPRECODE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phprecode.so '$ext_builddir'/phprecode.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPRECODE, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(PHPRECODE_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phprecode.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phprecode.$suffix"
+  fi
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_recode"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phprecode.$suffix: $ext_builddir/phprecode.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phprecode.$suffix \$(phplibdir)
+
+$ext_builddir/phprecode.$suffix: \$(shared_objects_recode) \$(PHPRECODE_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/recode.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(RECODE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/recode.so '$ext_builddir'/recode.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(RECODE, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(RECODE_SHARED_LIBADD)'
+      ;;
   esac
 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/recode.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/recode.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_recode"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/recode.$suffix: $ext_builddir/recode.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/recode.$suffix \$(phplibdir)
+
+$ext_builddir/recode.$suffix: \$(shared_objects_recode) \$(RECODE_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_RECODE 1
+EOF
 
     fi
-   ;;
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_RECODE_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/recode in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
+  old_IFS=$IFS
+  for ac_src in recode.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC recode"
+        ;;
+      *)
         
   
+  case ext/recode in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in recode.c; do
   
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC recode"
   fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
 
-      fi
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=recode
     
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
   fi
 
-    ;;
-    esac
-  done
+fi
 
-  echo $ac_n "checking for rl_pending_input in -lreadline""... $ac_c" 1>&6
-echo "configure:79574: checking for rl_pending_input in -lreadline" >&5
-ac_lib_var=`echo readline'_'rl_pending_input | 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="-lreadline  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 79582 "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 rl_pending_input();
 
-int main() {
-rl_pending_input()
-; return 0; }
+cat >> confdefs.h <<\EOF
+#define HAVE_REFLECTION 1
 EOF
-if { (eval echo configure:79593: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-  
-else
-  echo "$ac_t""no" 1>&6
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_readline_rl_pending_input
-    
-    { echo "configure: error: invalid readline installation detected. Try --with-libedit instead." 1>&2; exit 1; }
-  
-  
-fi
+  ext_builddir=ext/reflection
+  ext_srcdir=$abs_srcdir/ext/reflection
 
+  ac_extra=
 
+  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
+    PHP_REFLECTION_SHARED=no
+    
   
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
-  "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
+  case ext/reflection in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_reflection.c; do
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-    fi
-   ;;
-  esac
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+    EXT_STATIC="$EXT_STATIC reflection"
+    if test "no" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC reflection"
+    fi
   else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+    if test "no" = "shared" || test "no" = "yes"; then
+      PHP_REFLECTION_SHARED=yes
+      
+  case ext/reflection in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
 
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
 
-      fi
-    
-  fi
 
-    ;;
-    esac
-  done
+  old_IFS=$IFS
+  for ac_src in php_reflection.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_reflection="$shared_objects_reflection $ac_bdir$ac_obj.lo"
 
-  echo $ac_n "checking for rl_callback_read_char in -lreadline""... $ac_c" 1>&6
-echo "configure:79724: checking for rl_callback_read_char in -lreadline" >&5
-ac_lib_var=`echo readline'_'rl_callback_read_char | 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="-lreadline  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 79732 "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 rl_callback_read_char();
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main() {
-rl_callback_read_char()
-; return 0; }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:79743: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-    cat >> confdefs.h <<\EOF
-#define HAVE_RL_CALLBACK_READ_CHAR 1
-EOF
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
 
-  
-  
-else
-  echo "$ac_t""no" 1>&6
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpreflection.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(PHPREFLECTION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpreflection.so '$ext_builddir'/phpreflection.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPREFLECTION, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(PHPREFLECTION_SHARED_LIBADD)'
+      ;;
+  esac
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_readline_rl_callback_read_char
-    
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpreflection.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpreflection.$suffix"
+  fi
   
-fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_reflection"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpreflection.$suffix: $ext_builddir/phpreflection.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpreflection.$suffix \$(phplibdir)
 
+$ext_builddir/phpreflection.$suffix: \$(shared_objects_reflection) \$(PHPREFLECTION_SHARED_DEPENDENCIES)
+	$link_cmd
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_LIBREADLINE 1
 EOF
 
+          ;;
+        *)
+          
+  install_modules="install-modules"
 
-elif test "$PHP_LIBEDIT" != "no"; then
-
-  for i in $PHP_LIBEDIT /usr/local /usr; do
-    test -f $i/include/editline/readline.h && LIBEDIT_DIR=$i && break
-  done
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/reflection.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(REFLECTION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/reflection.so '$ext_builddir'/reflection.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(REFLECTION, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(REFLECTION_SHARED_LIBADD)'
+      ;;
+  esac
 
-  if test -z "$LIBEDIT_DIR"; then
-    { echo "configure: error: Please reinstall libedit - I cannot find readline.h" 1>&2; exit 1; }
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/reflection.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/reflection.$suffix"
   fi
-
   
-  if test "$LIBEDIT_DIR/include" != "/usr/include"; then
-    
-  if test -z "$LIBEDIT_DIR/include" || echo "$LIBEDIT_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$LIBEDIT_DIR/include
-  else
-    
-    ep_dir="`echo $LIBEDIT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/include\"`"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_reflection"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/reflection.$suffix: $ext_builddir/reflection.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/reflection.$suffix \$(phplibdir)
+
+$ext_builddir/reflection.$suffix: \$(shared_objects_reflection) \$(REFLECTION_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_REFLECTION 1
+EOF
+
+    fi
   fi
 
-    
+  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
+    PHP_REFLECTION_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/reflection in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
 
-  fi
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
-  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:79827: checking for tgetent in -lncurses" >&5
-ac_lib_var=`echo ncurses'_'tgetent | 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="-lncurses  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 79835 "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 tgetent();
+  old_IFS=$IFS
+  for ac_src in php_reflection.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-int main() {
-tgetent()
-; return 0; }
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:79846: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+
+        EXT_STATIC="$EXT_STATIC reflection"
+        ;;
+      *)
+        
   
-    
+  case ext/reflection in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  case ncurses in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD" 
-    else
-      
   
-  case ncurses in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lncurses $LIBS" 
-   ;;
-  esac
-
 
-    fi
-   ;;
-  esac
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
+  old_IFS=$IFS
+  for ac_src in php_reflection.c; do
   
-else
-  echo "$ac_t""no" 1>&6
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
-    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:79890: checking for tgetent in -ltermcap" >&5
-ac_lib_var=`echo termcap'_'tgetent | 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="-ltermcap  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 79898 "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 tgetent();
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:79909: \"$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"
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC reflection"
+  fi
   
-      
   
-  case termcap in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD" 
-    else
-      
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
   
-  case termcap in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-ltermcap $LIBS" 
-   ;;
-  esac
 
 
-    fi
-   ;;
-  esac
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=reflection
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
 
 
-    
-else
-  echo "$ac_t""no" 1>&6
-fi
 
+
+php_enable_session=yes
+
+echo $ac_n "checking whether to enable PHP sessions""... $ac_c" 1>&6
+echo "configure:83782: checking whether to enable PHP sessions" >&5
+# Check whether --enable-session or --disable-session was given.
+if test "${enable_session+set}" = set; then
+  enableval="$enable_session"
+  PHP_SESSION=$enableval
+else
   
+  PHP_SESSION=yes
+  test "$PHP_ENABLE_ALL" && PHP_SESSION=$PHP_ENABLE_ALL
+
 fi
 
 
-  
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    -L$READLINE_DIR/$PHP_LIBDIR 
-  "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SESSION in
+shared,*)
+  PHP_SESSION=`echo "$PHP_SESSION"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SESSION=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
 
-    fi
-   ;;
-  esac
 
+echo "$ac_t""$ext_output" 1>&6
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
 
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
 
 
-      fi
-    
-  fi
 
-    ;;
-    esac
-  done
+php_with_mm=no
 
-  echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6
-echo "configure:80055: checking for readline in -ledit" >&5
-ac_lib_var=`echo edit'_'readline | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo $ac_n "checking for mm support""... $ac_c" 1>&6
+echo "configure:83826: checking for mm support" >&5
+# Check whether --with-mm or --without-mm was given.
+if test "${with_mm+set}" = set; then
+  withval="$with_mm"
+  PHP_MM=$withval
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-ledit  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 80063 "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 readline();
+  
+  PHP_MM=no
+  
 
-int main() {
-readline()
-; return 0; }
-EOF
-if { (eval echo configure:80074: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-    
 
-  if test "$ext_shared" = "yes"; then
-    READLINE_SHARED_LIBADD="-ledit $READLINE_SHARED_LIBADD"
-    if test -n "$LIBEDIT_DIR/$PHP_LIBDIR"; then
-      
-  if test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$LIBEDIT_DIR/$PHP_LIBDIR" || echo "$LIBEDIT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$LIBEDIT_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $LIBEDIT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/$PHP_LIBDIR\"`"
-  fi
+ext_output=$PHP_MM
+echo "$ac_t""$ext_output" 1>&6
 
-    
-      if test "$ext_shared" = "yes"; then
-        READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD"
-      else
-        
-  
+
+
+
+if test "$PHP_SESSION" != "no"; then
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  echo $ac_n "checking whether pwrite works""... $ac_c" 1>&6
+echo "configure:83848: checking whether pwrite works" >&5
+if eval "test \"`echo '$''{'ac_cv_pwrite'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
     
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  if test "$cross_compiling" = yes; then
   
-  fi
-
+    ac_cv_pwrite=no
+  
+else
+  cat > conftest.$ac_ext <<EOF
+#line 83860 "configure"
+#include "confdefs.h"
 
-      fi
-    
-  fi
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
 
-    fi
-  else
-    
+    main() {
+    int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
 
-  if test -n "$LIBEDIT_DIR/$PHP_LIBDIR"; then
-    
-  if test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$LIBEDIT_DIR/$PHP_LIBDIR" || echo "$LIBEDIT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$LIBEDIT_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $LIBEDIT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/$PHP_LIBDIR\"`"
-  fi
+    if (fd < 0) exit(1);
+    if (pwrite(fd, "text", 4, 0) != 4) exit(1);
+    /* Linux glibc breakage until 2.2.5 */
+    if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
+    exit(0);
+    }
 
-    
-      
   
+EOF
+if { (eval echo configure:83881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+    ac_cv_pwrite=yes
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
   
-  fi
-
+    ac_cv_pwrite=no
+  
+fi
+rm -fr conftest*
+fi
 
-    
-  fi
 
-  fi
+    if test "$ac_cv_pwrite" = "no"; then
+      
+  if test "$cross_compiling" = yes; then
   
+    ac_cv_pwrite=no
   
-  case edit in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-ledit $LIBS" 
-   ;;
-  esac
-
-
+else
+  cat > conftest.$ac_ext <<EOF
+#line 83906 "configure"
+#include "confdefs.h"
 
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+ssize_t pwrite(int, void *, size_t, off64_t);
+    main() {
+    int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
 
-  fi
+    if (fd < 0) exit(1);
+    if (pwrite(fd, "text", 4, 0) != 4) exit(1);
+    /* Linux glibc breakage until 2.2.5 */
+    if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
+    exit(0);
+    }
 
   
+EOF
+if { (eval echo configure:83927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
+    ac_cv_pwrite=yes
   
 else
-  echo "$ac_t""no" 1>&6
-
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_edit_readline
-    
-    { echo "configure: error: edit library required by readline not found" 1>&2; exit 1; }
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+    ac_cv_pwrite=no
   
+fi
+rm -fr conftest*
+fi
+
+
+      if test "$ac_cv_pwrite" = "yes"; then
+        ac_cv_pwrite=64
+      fi
+    fi
   
 fi
 
+echo "$ac_t""$ac_cv_pwrite" 1>&6
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_LIBEDIT 1
+  if test "$ac_cv_pwrite" != "no"; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_PWRITE 1
 EOF
 
-fi
+    if test "$ac_cv_pwrite" = "64"; then
+      cat >> confdefs.h <<\EOF
+#define PHP_PWRITE_64 1
+EOF
 
-if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
-  for ac_func in rl_completion_matches
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:80215: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+    fi
+  fi  
+
+  
+  echo $ac_n "checking whether pread works""... $ac_c" 1>&6
+echo "configure:83968: checking whether pread works" >&5
+if eval "test \"`echo '$''{'ac_cv_pread'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
+  
+    
+  echo test > conftest_in
+  if test "$cross_compiling" = yes; then
+  
+    ac_cv_pread=no
+  
+else
   cat > conftest.$ac_ext <<EOF
-#line 80220 "configure"
+#line 83981 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.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 $ac_func();
-
-int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
 
-; return 0; }
+    main() {
+    char buf[3]; 
+    int fd = open("conftest_in", O_RDONLY);
+    if (fd < 0) exit(1);
+    if (pread(fd, buf, 2, 0) != 2) exit(1);
+    /* Linux glibc breakage until 2.2.5 */
+    if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
+    exit(0);
+    }
+  
 EOF
-if { (eval echo configure:80243: \"$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"
+if { (eval echo configure:84001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+    ac_cv_pread=yes
+  
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  rm -fr conftest*
+  
+    ac_cv_pread=no
+  
 fi
-rm -f conftest*
+rm -fr conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+  rm -f conftest_in
+
+    if test "$ac_cv_pread" = "no"; then
+      
+  echo test > conftest_in
+  if test "$cross_compiling" = yes; then
+  
+    ac_cv_pread=no
+  
+else
+  cat > conftest.$ac_ext <<EOF
+#line 84028 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+ssize_t pread(int, void *, size_t, off64_t);
+    main() {
+    char buf[3]; 
+    int fd = open("conftest_in", O_RDONLY);
+    if (fd < 0) exit(1);
+    if (pread(fd, buf, 2, 0) != 2) exit(1);
+    /* Linux glibc breakage until 2.2.5 */
+    if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
+    exit(0);
+    }
+  
 EOF
- 
+if { (eval echo configure:84048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+    ac_cv_pread=yes
+  
 else
-  echo "$ac_t""no" 1>&6
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+    ac_cv_pread=no
+  
 fi
-done
+rm -fr conftest*
+fi
+
+  rm -f conftest_in
 
+      if test "$ac_cv_pread" = "yes"; then
+        ac_cv_pread=64
+      fi
+    fi
   
-  ext_builddir=ext/readline
-  ext_srcdir=$abs_srcdir/ext/readline
+fi
+
+echo "$ac_t""$ac_cv_pread" 1>&6
+
+  if test "$ac_cv_pread" != "no"; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_PREAD 1
+EOF
+
+    if test "$ac_cv_pread" = "64"; then
+      cat >> confdefs.h <<\EOF
+#define PHP_PREAD_64 1
+EOF
+
+    fi
+  fi  
+
+  
+  ext_builddir=ext/session
+  ext_srcdir=$abs_srcdir/ext/session
 
   ac_extra=
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" != "cli"; then
-    PHP_READLINE_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_SESSION_SHARED=no
     
   
-  case ext/readline in
+  case ext/session in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -80291,7 +84112,7 @@ done
 
 
   old_IFS=$IFS
-  for ac_src in readline.c; do
+  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
   
       IFS=.
       set $ac_src
@@ -80314,18 +84135,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC readline"
+    EXT_STATIC="$EXT_STATIC session"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC readline"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC session"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_READLINE_SHARED=yes
+      PHP_SESSION_SHARED=yes
       
-  case ext/readline in
+  case ext/session in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -80340,14 +84161,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in readline.c; do
+  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_readline="$shared_objects_readline $ac_bdir$ac_obj.lo"
+      shared_objects_session="$shared_objects_session $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -80370,31 +84191,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpreadline.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(PHPREADLINE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpreadline.so '$ext_builddir'/phpreadline.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsession.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(PHPSESSION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsession.so '$ext_builddir'/phpsession.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPREADLINE, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSESSION, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(PHPREADLINE_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(PHPSESSION_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpreadline.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsession.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpreadline.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsession.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_readline"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_session"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpreadline.$suffix: $ext_builddir/phpreadline.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpreadline.$suffix \$(phplibdir)
+\$(phplibdir)/phpsession.$suffix: $ext_builddir/phpsession.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsession.$suffix \$(phplibdir)
 
-$ext_builddir/phpreadline.$suffix: \$(shared_objects_readline) \$(PHPREADLINE_SHARED_DEPENDENCIES)
+$ext_builddir/phpsession.$suffix: \$(shared_objects_session) \$(PHPSESSION_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -80407,31 +84228,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/readline.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(READLINE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/readline.so '$ext_builddir'/readline.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/session.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(SESSION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/session.so '$ext_builddir'/session.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(READLINE, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SESSION, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_readline) $(READLINE_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(SESSION_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/readline.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/session.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/readline.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/session.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_readline"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_session"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/readline.$suffix: $ext_builddir/readline.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/readline.$suffix \$(phplibdir)
+\$(phplibdir)/session.$suffix: $ext_builddir/session.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/session.$suffix \$(phplibdir)
 
-$ext_builddir/readline.$suffix: \$(shared_objects_readline) \$(READLINE_SHARED_DEPENDENCIES)
+$ext_builddir/session.$suffix: \$(shared_objects_session) \$(SESSION_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -80439,22 +84260,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_READLINE 1
+#define COMPILE_DL_SESSION 1
 EOF
 
     fi
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" = "cli"; then
-    PHP_READLINE_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_SESSION_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/readline in
+  case ext/session in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -80469,7 +84290,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in readline.c; do
+  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
   
       IFS=.
       set $ac_src
@@ -80492,15 +84313,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC readline"
+        EXT_STATIC="$EXT_STATIC session"
         ;;
       *)
         
   
-  case ext/readline in
+  case ext/session in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -80515,7 +84336,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in readline.c; do
+  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
   
       IFS=.
       set $ac_src
@@ -80540,7 +84361,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC readline"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC session"
   fi
   
   
@@ -80549,371 +84370,110 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=readline
+    PHP_PECL_EXTENSION=session
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST READLINE_SHARED_LIBADD"
-
-fi
-
-
-
-php_with_recode=no
-
-echo $ac_n "checking for recode support""... $ac_c" 1>&6
-echo "configure:80569: checking for recode support" >&5
-# Check whether --with-recode or --without-recode was given.
-if test "${with_recode+set}" = set; then
-  withval="$with_recode"
-  PHP_RECODE=$withval
-else
-  
-  PHP_RECODE=no
-  test "$PHP_ENABLE_ALL" && PHP_RECODE=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_RECODE in
-shared,*)
-  PHP_RECODE=`echo "$PHP_RECODE"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_RECODE=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_RECODE" != "no"; then
-  RECODE_LIST="$PHP_RECODE /usr/local /usr /opt"
-
-  for i in $RECODE_LIST; do
-    if test -f $i/include/recode.h; then
-      RECODE_DIR=$i
-      RECODE_INC=include
-      RECODE_LIB=$PHP_LIBDIR
-    fi
-    if test -f $i/include/recode/recode.h; then
-      RECODE_DIR=$i
-      RECODE_INC=include/recode
-      RECODE_LIB=$PHP_LIBDIR/recode
-    fi
-    if test -f $i/recode/include/recode.h; then
-      RECODE_DIR=$i/recode
-      RECODE_INC=include
-      RECODE_LIB=$PHP_LIBDIR
-    fi
-    test -n "$RECODE_DIR" && break
-  done
-
-  if test -z "$RECODE_DIR"; then
-    { echo "configure: error: Can not find recode.h anywhere under $RECODE_LIST." 1>&2; exit 1; }
-  fi
-
-  
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    -L$RECODE_DIR/$RECODE_LIB
-  "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  am_i_shared=$PHP_SESSION_SHARED
+  is_it_shared=$PHP_HASH_SHARED
+  is_it_enabled=$PHP_HASH
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension session to build statically, but it
+depends on extension hash, which you've configured to build shared.
+You either need to build session shared or build hash statically for the
+build to be successful.
+" 1>&2; exit 1; }
   fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension session, which depends on extension hash,
+but you've either not enabled hash, or have disabled it.
+" 1>&2; exit 1; }
   fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  am_i_shared=$PHP_SESSION_SHARED
+  is_it_shared=$PHP_SPL_SHARED
+  is_it_enabled=$PHP_SPL
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension session to build statically, but it
+depends on extension spl, which you've configured to build shared.
+You either need to build session shared or build spl statically for the
+build to be successful.
+" 1>&2; exit 1; }
   fi
-
-
-      fi
-    
-  fi
-
-    ;;
-    esac
-  done
-
-  echo $ac_n "checking for recode_format_table in -lrecode""... $ac_c" 1>&6
-echo "configure:80733: checking for recode_format_table in -lrecode" >&5
-ac_lib_var=`echo recode'_'recode_format_table | 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="-lrecode  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 80741 "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 recode_format_table();
-
-int main() {
-recode_format_table()
-; return 0; }
-EOF
-if { (eval echo configure:80752: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-    
-
-  if test "$ext_shared" = "yes"; then
-    RECODE_SHARED_LIBADD="-lrecode $RECODE_SHARED_LIBADD"
-    if test -n "$RECODE_DIR/$RECODE_LIB"; then
-      
-  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
-    
-  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
-    ai_p=$RECODE_DIR/$RECODE_LIB
-  else
-    
-    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
+  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension session, which depends on extension spl,
+but you've either not enabled spl, or have disabled it.
+" 1>&2; exit 1; }
   fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        RECODE_SHARED_LIBADD="-L$ai_p $RECODE_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && RECODE_SHARED_LIBADD="$ld_runpath_switch$ai_p $RECODE_SHARED_LIBADD"
-      else
-        
   
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SESSION_SHARED_LIBADD"
+
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
-
-
-      fi
-    
-  fi
-
-    fi
-  else
-    
-
-  if test -n "$RECODE_DIR/$RECODE_LIB"; then
-    
-  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
-    
-  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
-    ai_p=$RECODE_DIR/$RECODE_LIB
-  else
-    
-    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
-  fi
-
-    
+    header_path=ext/session
+    for header_file in php_session.h mod_files.h mod_user.h; do
+      hp_hf="$header_path/$header_file"
       
   
+  unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
-
-
+    eval "INSTALLHEADERS$unique=set"
     
+        INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
+      
   fi
 
-  fi
-  
+    done 
   
-  case recode in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lrecode $LIBS" 
-   ;;
-  esac
 
+  cat >> confdefs.h <<\EOF
+#define HAVE_PHP_SESSION 1
+EOF
 
+fi
 
+if test "$PHP_MM" != "no"; then
+  for i in $PHP_MM /usr/local /usr; do
+    test -f "$i/include/mm.h" && MM_DIR=$i && break
+  done
 
+  if test -z "$MM_DIR" ; then
+    { echo "configure: error: cannot find mm library" 1>&2; exit 1; }
   fi
-
-
   
   
-else
-  echo "$ac_t""no" 1>&6
-
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_recode_recode_format_table
-    
-    old_LDFLAGS=$LDFLAGS
-    old_LIBS=$LIBS
-    LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB"
-    LIBS="$LIBS -lrecode"
-    cat > conftest.$ac_ext <<EOF
-#line 80882 "configure"
-#include "confdefs.h"
-
-char *program_name;
-    
-int main() {
-
-recode_format_table();
-    
-; return 0; }
-EOF
-if { (eval echo configure:80893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  
-      
 
   if test "$ext_shared" = "yes"; then
-    RECODE_SHARED_LIBADD="-lrecode $RECODE_SHARED_LIBADD"
-    if test -n "$RECODE_DIR/$RECODE_LIB"; then
+    SESSION_SHARED_LIBADD="-lmm $SESSION_SHARED_LIBADD"
+    if test -n "$MM_DIR/$PHP_LIBDIR"; then
       
-  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
+  if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
-    ai_p=$RECODE_DIR/$RECODE_LIB
+  if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$MM_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
+    ai_p="$ep_realdir/`basename \"$MM_DIR/$PHP_LIBDIR\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        RECODE_SHARED_LIBADD="-L$ai_p $RECODE_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && RECODE_SHARED_LIBADD="$ld_runpath_switch$ai_p $RECODE_SHARED_LIBADD"
+        SESSION_SHARED_LIBADD="-L$ai_p $SESSION_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SESSION_SHARED_LIBADD="$ld_runpath_switch$ai_p $SESSION_SHARED_LIBADD"
       else
         
   
@@ -80939,18 +84499,18 @@ if { (eval echo configure:80893: \"$ac_l
   else
     
 
-  if test -n "$RECODE_DIR/$RECODE_LIB"; then
+  if test -n "$MM_DIR/$PHP_LIBDIR"; then
     
-  if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then
+  if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then
-    ai_p=$RECODE_DIR/$RECODE_LIB
+  if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$MM_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`"
+    ai_p="$ep_realdir/`basename \"$MM_DIR/$PHP_LIBDIR\"`"
   fi
 
     
@@ -80976,55 +84536,30 @@ if { (eval echo configure:80893: \"$ac_l
   fi
   
   
-  case recode in
-  c|c_r|pthread*) ;;
-  *) 
-      DLIBS="-lrecode $DLIBS" 
-   ;;
-  esac
-
-
-
-
-  fi
-
-
-      cat >> confdefs.h <<\EOF
-#define HAVE_BROKEN_RECODE 1
-EOF
-
-    
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  
-      { echo "configure: error: I cannot link librecode (-L$RECODE_DIR/$RECODE_LIB -lrecode). Is it installed?" 1>&2; exit 1; }
-    
-fi
-rm -f conftest*
-    LIBS=$old_LIBS
-    LDFLAGS=$old_LDFLAGS
-  
-  
-fi
+  case mm in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lmm $LIBS" 
+   ;;
+  esac
 
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_LIBRECODE 1
-EOF
+
+
+  fi
+
 
   
-  if test "$RECODE_DIR/$RECODE_INC" != "/usr/include"; then
+  if test "$MM_DIR/include" != "/usr/include"; then
     
-  if test -z "$RECODE_DIR/$RECODE_INC" || echo "$RECODE_DIR/$RECODE_INC" | grep '^/' >/dev/null ; then
-    ai_p=$RECODE_DIR/$RECODE_INC
+  if test -z "$MM_DIR/include" || echo "$MM_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$MM_DIR/include
   else
     
-    ep_dir="`echo $RECODE_DIR/$RECODE_INC|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $MM_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_INC\"`"
+    ai_p="$ep_realdir/`basename \"$MM_DIR/include\"`"
   fi
 
     
@@ -81046,62 +84581,92 @@ EOF
   fi
 
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST RECODE_SHARED_LIBADD"
+  
+    for header_file in ext/session/mod_mm.h; do
+      
+  
+  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INSTALLHEADERS$unique=set"
+    
+        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
+      
+  fi
 
-  for ac_hdr in stdbool.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:81056: checking for $ac_hdr" >&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 81061 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
+    done 
+  
+
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIBMM 1
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:81066: \"$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
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
+
+
+php_enable_shmop=no
+
+echo $ac_n "checking whether to enable shmop support""... $ac_c" 1>&6
+echo "configure:84612: checking whether to enable shmop support" >&5
+# Check whether --enable-shmop or --disable-shmop was given.
+if test "${enable_shmop+set}" = set; then
+  enableval="$enable_shmop"
+  PHP_SHMOP=$enableval
 else
-  echo "$ac_t""no" 1>&6
+  
+  PHP_SHMOP=no
+  test "$PHP_ENABLE_ALL" && PHP_SHMOP=$PHP_ENABLE_ALL
+
 fi
-done
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SHMOP in
+shared,*)
+  PHP_SHMOP=`echo "$PHP_SHMOP"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SHMOP=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_SHMOP" != "no"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_SHMOP 1
+EOF
 
   
-  ext_builddir=ext/recode
-  ext_srcdir=$abs_srcdir/ext/recode
+  ext_builddir=ext/shmop
+  ext_srcdir=$abs_srcdir/ext/shmop
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_RECODE_SHARED=no
+    PHP_SHMOP_SHARED=no
     
   
-  case ext/recode in
+  case ext/shmop in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81116,7 +84681,7 @@ done
 
 
   old_IFS=$IFS
-  for ac_src in recode.c; do
+  for ac_src in shmop.c; do
   
       IFS=.
       set $ac_src
@@ -81139,18 +84704,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC recode"
+    EXT_STATIC="$EXT_STATIC shmop"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC recode"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC shmop"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_RECODE_SHARED=yes
+      PHP_SHMOP_SHARED=yes
       
-  case ext/recode in
+  case ext/shmop in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81165,14 +84730,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in recode.c; do
+  for ac_src in shmop.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_recode="$shared_objects_recode $ac_bdir$ac_obj.lo"
+      shared_objects_shmop="$shared_objects_shmop $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -81195,31 +84760,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phprecode.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(PHPRECODE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phprecode.so '$ext_builddir'/phprecode.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpshmop.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(PHPSHMOP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpshmop.so '$ext_builddir'/phpshmop.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPRECODE, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSHMOP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(PHPRECODE_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(PHPSHMOP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phprecode.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpshmop.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phprecode.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpshmop.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_recode"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_shmop"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phprecode.$suffix: $ext_builddir/phprecode.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phprecode.$suffix \$(phplibdir)
+\$(phplibdir)/phpshmop.$suffix: $ext_builddir/phpshmop.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpshmop.$suffix \$(phplibdir)
 
-$ext_builddir/phprecode.$suffix: \$(shared_objects_recode) \$(PHPRECODE_SHARED_DEPENDENCIES)
+$ext_builddir/phpshmop.$suffix: \$(shared_objects_shmop) \$(PHPSHMOP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -81232,31 +84797,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/recode.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(RECODE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/recode.so '$ext_builddir'/recode.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/shmop.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(SHMOP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/shmop.so '$ext_builddir'/shmop.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(RECODE, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SHMOP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_recode) $(RECODE_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(SHMOP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/recode.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/shmop.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/recode.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/shmop.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_recode"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_shmop"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/recode.$suffix: $ext_builddir/recode.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/recode.$suffix \$(phplibdir)
+\$(phplibdir)/shmop.$suffix: $ext_builddir/shmop.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/shmop.$suffix \$(phplibdir)
 
-$ext_builddir/recode.$suffix: \$(shared_objects_recode) \$(RECODE_SHARED_DEPENDENCIES)
+$ext_builddir/shmop.$suffix: \$(shared_objects_shmop) \$(SHMOP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -81264,22 +84829,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_RECODE 1
+#define COMPILE_DL_SHMOP 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_RECODE_SHARED=no
+    PHP_SHMOP_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/recode in
+  case ext/shmop in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81294,7 +84859,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in recode.c; do
+  for ac_src in shmop.c; do
   
       IFS=.
       set $ac_src
@@ -81317,15 +84882,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC recode"
+        EXT_STATIC="$EXT_STATIC shmop"
         ;;
       *)
         
   
-  case ext/recode in
+  case ext/shmop in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81340,7 +84905,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in recode.c; do
+  for ac_src in shmop.c; do
   
       IFS=.
       set $ac_src
@@ -81365,7 +84930,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC recode"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC shmop"
   fi
   
   
@@ -81374,7 +84939,7 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=recode
+    PHP_PECL_EXTENSION=shmop
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
@@ -81383,24 +84948,321 @@ EOF
 fi
 
 
-cat >> confdefs.h <<\EOF
-#define HAVE_REFLECTION 1
+
+php_enable_simplexml=yes
+
+echo $ac_n "checking whether to enable SimpleXML support""... $ac_c" 1>&6
+echo "configure:84956: checking whether to enable SimpleXML support" >&5
+# Check whether --enable-simplexml or --disable-simplexml was given.
+if test "${enable_simplexml+set}" = set; then
+  enableval="$enable_simplexml"
+  PHP_SIMPLEXML=$enableval
+else
+  
+  PHP_SIMPLEXML=yes
+  test "$PHP_ENABLE_ALL" && PHP_SIMPLEXML=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SIMPLEXML in
+shared,*)
+  PHP_SIMPLEXML=`echo "$PHP_SIMPLEXML"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SIMPLEXML=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test -z "$PHP_LIBXML_DIR"; then
+  
+php_with_libxml_dir=no
+
+echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
+echo "configure:85001: checking libxml2 install dir" >&5
+# Check whether --with-libxml-dir or --without-libxml-dir was given.
+if test "${with_libxml_dir+set}" = set; then
+  withval="$with_libxml_dir"
+  PHP_LIBXML_DIR=$withval
+else
+  
+  PHP_LIBXML_DIR=no
+  
+
+fi
+
+
+ext_output=$PHP_LIBXML_DIR
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+fi
+
+if test "$PHP_SIMPLEXML" != "no"; then
+
+  if test "$PHP_LIBXML" = "no"; then   
+    { echo "configure: error: SimpleXML extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }                
+  fi
+
+  
+echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
+echo "configure:85029: checking for xml2-config path" >&5
+if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  for i in $PHP_LIBXML_DIR /usr/local /usr; do
+    if test -x "$i/bin/xml2-config"; then
+      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+      break
+    fi
+  done
+
+fi
+
+echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
+
+  if test -x "$ac_cv_php_xml2_config_path"; then
+    XML2_CONFIG="$ac_cv_php_xml2_config_path"
+    libxml_full_version=`$XML2_CONFIG --version`
+    ac_IFS=$IFS
+    IFS="."
+    set $libxml_full_version
+    IFS=$ac_IFS
+    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
+    if test "$LIBXML_VERSION" -ge "2006011"; then
+      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_INCS=`$XML2_CONFIG --cflags`
+      
+  for ac_i in $LIBXML_LIBS; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        SIMPLEXML_SHARED_LIBADD="-L$ai_p $SIMPLEXML_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SIMPLEXML_SHARED_LIBADD="$ld_runpath_switch$ai_p $SIMPLEXML_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+      
+  for ac_i in $LIBXML_INCS; do
+    case $ac_i in
+    -I*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/include"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    ;;
+    esac
+  done
+
+
+            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
+echo "configure:85187: checking whether libxml build works" >&5
+if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        
+  old_LIBS=$LIBS
+  LIBS="
+          $SIMPLEXML_SHARED_LIBADD
+         $LIBS"
+  if test "$cross_compiling" = yes; then
+  
+    LIBS=$old_LIBS
+  
+else
+  cat > conftest.$ac_ext <<EOF
+#line 85203 "configure"
+#include "confdefs.h"
+
+    
+    char xmlInitParser();
+    int main() {
+      xmlInitParser();
+      return 0;
+    }
+  
+EOF
+if { (eval echo configure:85214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+    LIBS=$old_LIBS
+    
+          php_cv_libxml_build_works=yes
+        
+  
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+    LIBS=$old_LIBS
+    
+          echo "$ac_t""no" 1>&6
+          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
+        
+  
+fi
+rm -fr conftest*
+fi
+
+
+      
+fi
+
+echo "$ac_t""$php_cv_libxml_build_works" 1>&6
+      if test "$php_cv_libxml_build_works" = "yes"; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBXML 1
 EOF
 
+      fi
+      
+    cat >> confdefs.h <<\EOF
+#define HAVE_SIMPLEXML 1
+EOF
 
-  ext_builddir=ext/reflection
-  ext_srcdir=$abs_srcdir/ext/reflection
+    
+  ext_builddir=ext/simplexml
+  ext_srcdir=$abs_srcdir/ext/simplexml
 
   ac_extra=
 
-  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
-    PHP_REFLECTION_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_SIMPLEXML_SHARED=no
     
   
-  case ext/reflection in
+  case ext/simplexml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81415,7 +85277,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_reflection.c; do
+  for ac_src in simplexml.c sxe.c; do
   
       IFS=.
       set $ac_src
@@ -81438,18 +85300,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC reflection"
-    if test "no" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC reflection"
+    EXT_STATIC="$EXT_STATIC simplexml"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC simplexml"
     fi
   else
-    if test "no" = "shared" || test "no" = "yes"; then
-      PHP_REFLECTION_SHARED=yes
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_SIMPLEXML_SHARED=yes
       
-  case ext/reflection in
+  case ext/simplexml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81464,14 +85326,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_reflection.c; do
+  for ac_src in simplexml.c sxe.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_reflection="$shared_objects_reflection $ac_bdir$ac_obj.lo"
+      shared_objects_simplexml="$shared_objects_simplexml $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -81494,31 +85356,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpreflection.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(PHPREFLECTION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpreflection.so '$ext_builddir'/phpreflection.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsimplexml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(PHPSIMPLEXML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsimplexml.so '$ext_builddir'/phpsimplexml.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPREFLECTION, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSIMPLEXML, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(PHPREFLECTION_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(PHPSIMPLEXML_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpreflection.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsimplexml.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpreflection.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsimplexml.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_reflection"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_simplexml"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpreflection.$suffix: $ext_builddir/phpreflection.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpreflection.$suffix \$(phplibdir)
+\$(phplibdir)/phpsimplexml.$suffix: $ext_builddir/phpsimplexml.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsimplexml.$suffix \$(phplibdir)
 
-$ext_builddir/phpreflection.$suffix: \$(shared_objects_reflection) \$(PHPREFLECTION_SHARED_DEPENDENCIES)
+$ext_builddir/phpsimplexml.$suffix: \$(shared_objects_simplexml) \$(PHPSIMPLEXML_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -81531,31 +85393,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/reflection.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(REFLECTION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/reflection.so '$ext_builddir'/reflection.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/simplexml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(SIMPLEXML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/simplexml.so '$ext_builddir'/simplexml.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(REFLECTION, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SIMPLEXML, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_reflection) $(REFLECTION_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(SIMPLEXML_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/reflection.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/simplexml.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/reflection.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/simplexml.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_reflection"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_simplexml"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/reflection.$suffix: $ext_builddir/reflection.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/reflection.$suffix \$(phplibdir)
+\$(phplibdir)/simplexml.$suffix: $ext_builddir/simplexml.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/simplexml.$suffix \$(phplibdir)
 
-$ext_builddir/reflection.$suffix: \$(shared_objects_reflection) \$(REFLECTION_SHARED_DEPENDENCIES)
+$ext_builddir/simplexml.$suffix: \$(shared_objects_simplexml) \$(SIMPLEXML_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -81563,22 +85425,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_REFLECTION 1
+#define COMPILE_DL_SIMPLEXML 1
 EOF
 
     fi
   fi
 
-  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
-    PHP_REFLECTION_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_SIMPLEXML_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/reflection in
+  case ext/simplexml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81593,7 +85455,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_reflection.c; do
+  for ac_src in simplexml.c sxe.c; do
   
       IFS=.
       set $ac_src
@@ -81616,15 +85478,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC reflection"
+        EXT_STATIC="$EXT_STATIC simplexml"
         ;;
       *)
         
   
-  case ext/reflection in
+  case ext/simplexml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -81638,749 +85500,1299 @@ EOF
   b_lo=$php_lo
 
 
-  old_IFS=$IFS
-  for ac_src in php_reflection.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  old_IFS=$IFS
+  for ac_src in simplexml.c sxe.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC simplexml"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=simplexml
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
+
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SIMPLEXML_SHARED_LIBADD"
+
+  
+    else
+      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
+    fi
+else 
+    { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; }
+  
+  fi
+
+  
+  am_i_shared=$PHP_SIMPLEXML_SHARED
+  is_it_shared=$PHP_LIBXML_SHARED
+  is_it_enabled=$PHP_LIBXML
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension simplexml to build statically, but it
+depends on extension libxml, which you've configured to build shared.
+You either need to build simplexml shared or build libxml statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension simplexml, which depends on extension libxml,
+but you've either not enabled libxml, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+  
+  am_i_shared=$PHP_SIMPLEXML_SHARED
+  is_it_shared=$PHP_SPL_SHARED
+  is_it_enabled=$PHP_SPL
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension simplexml to build statically, but it
+depends on extension spl, which you've configured to build shared.
+You either need to build simplexml shared or build spl statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension simplexml, which depends on extension spl,
+but you've either not enabled spl, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+fi
+
+
+
+php_with_snmp=no
+
+echo $ac_n "checking for SNMP support""... $ac_c" 1>&6
+echo "configure:85602: checking for SNMP support" >&5
+# Check whether --with-snmp or --without-snmp was given.
+if test "${with_snmp+set}" = set; then
+  withval="$with_snmp"
+  PHP_SNMP=$withval
+else
+  
+  PHP_SNMP=no
+  test "$PHP_ENABLE_ALL" && PHP_SNMP=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SNMP in
+shared,*)
+  PHP_SNMP=`echo "$PHP_SNMP"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SNMP=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_with_openssl_dir=no
+
+echo $ac_n "checking OpenSSL dir for SNMP""... $ac_c" 1>&6
+echo "configure:85646: checking OpenSSL dir for SNMP" >&5
+# Check whether --with-openssl-dir or --without-openssl-dir was given.
+if test "${with_openssl_dir+set}" = set; then
+  withval="$with_openssl_dir"
+  PHP_OPENSSL_DIR=$withval
+else
+  
+  PHP_OPENSSL_DIR=no
+  
+
+fi
+
+
+ext_output=$PHP_OPENSSL_DIR
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_enable_ucd_snmp_hack=no
+
+echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6
+echo "configure:85669: checking whether to enable UCD SNMP hack" >&5
+# Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given.
+if test "${enable_ucd_snmp_hack+set}" = set; then
+  enableval="$enable_ucd_snmp_hack"
+  PHP_UCD_SNMP_HACK=$enableval
+else
+  
+  PHP_UCD_SNMP_HACK=no
+  
+
+fi
+
+
+ext_output=$PHP_UCD_SNMP_HACK
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_SNMP" != "no"; then
+
+        if test "$PHP_SNMP" = "yes"; then
+    # Extract the first word of "net-snmp-config", so it can be a program name with args.
+set dummy net-snmp-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:85694: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_SNMP_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$SNMP_CONFIG" in
+  /*)
+  ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/local/bin:$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_SNMP_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+fi
+SNMP_CONFIG="$ac_cv_path_SNMP_CONFIG"
+if test -n "$SNMP_CONFIG"; then
+  echo "$ac_t""$SNMP_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  else
+    SNMP_CONFIG="$PHP_SNMP/bin/net-snmp-config"
+  fi
+
+  if test -x "$SNMP_CONFIG"; then
+    SNMP_LIBS=`$SNMP_CONFIG --netsnmp-libs`
+    SNMP_LIBS="$SNMP_LIBS `$SNMP_CONFIG --external-libs`"
+    SNMP_PREFIX=`$SNMP_CONFIG --prefix`
+
+    if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
+      
+  if test "${SNMP_PREFIX}/include" != "/usr/include"; then
+    
+  if test -z "${SNMP_PREFIX}/include" || echo "${SNMP_PREFIX}/include" | grep '^/' >/dev/null ; then
+    ai_p=${SNMP_PREFIX}/include
+  else
+    
+    ep_dir="`echo $SNMP_PREFIX/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"${SNMP_PREFIX}/include\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+      
+  for ac_i in $SNMP_LIBS; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_NET_SNMP 1
+EOF
+
+      SNMP_LIBNAME=netsnmp
+    else
+      { echo "configure: error: Could not find the required paths. Please check your net-snmp installation." 1>&2; exit 1; }
+    fi
+  else 
+
+            
+    if test "$PHP_SNMP" = "yes"; then
+      for i in /usr/include /usr/local/include; do
+        test -f $i/snmp.h                       && SNMP_INCDIR=$i
+        test -f $i/ucd-snmp/snmp.h              && SNMP_INCDIR=$i/ucd-snmp
+        test -f $i/snmp/snmp.h                  && SNMP_INCDIR=$i/snmp
+        test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp
+      done
+      for i in /usr/$PHP_LIBDIR /usr/snmp/lib /usr/local/$PHP_LIBDIR /usr/local/lib /usr/local/snmp/lib; do
+        test -f $i/libsnmp.a || test -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i
+      done
+    else
+      SNMP_INCDIR=$PHP_SNMP/include
+      test -d $PHP_SNMP/include/ucd-snmp && SNMP_INCDIR=$PHP_SNMP/include/ucd-snmp
+      SNMP_LIBDIR=$PHP_SNMP/lib
+    fi
+
+    if test -z "$SNMP_INCDIR"; then
+      { echo "configure: error: snmp.h not found. Check your SNMP installation." 1>&2; exit 1; }
+    elif test -z "$SNMP_LIBDIR"; then
+      { echo "configure: error: libsnmp not found. Check your SNMP installation." 1>&2; exit 1; }
+    fi
+
+    old_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS=-I$SNMP_INCDIR
+    for ac_hdr in default_store.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:85895: checking for $ac_hdr" >&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 85900 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:85905: \"$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
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+    if test "$ac_cv_header_default_store_h" = "yes"; then
+      echo $ac_n "checking for OpenSSL support in SNMP libraries""... $ac_c" 1>&6
+echo "configure:85933: checking for OpenSSL support in SNMP libraries" >&5
+      cat > conftest.$ac_ext <<EOF
+#line 85935 "configure"
+#include "confdefs.h"
+
+#include <ucd-snmp-config.h>
+#if USE_OPENSSL
+        yes
+#endif
       
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
 EOF
-  done
-
-
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC reflection"
-  fi
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
   
+        SNMP_SSL=yes
+      
+else
+  rm -rf conftest*
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+        SNMP_SSL=no
+      
+fi
+rm -f conftest*
+
+    fi
+    CPPFLAGS=$old_CPPFLAGS
+    echo "$ac_t""$SNMP_SSL" 1>&6
   
+    if test "$SNMP_SSL" = "yes"; then
+      if test "$PHP_OPENSSL_DIR" != "no"; then
+        PHP_OPENSSL=$PHP_OPENSSL_DIR
+      fi
+      
+      if test "$PHP_OPENSSL" = "no"; then
+        { echo "configure: error: The UCD-SNMP in this system is built with SSL support. 
 
+        Add --with-openssl-dir=DIR to your configure line." 1>&2; exit 1; }
+      else
+        
+  found_openssl=no
+  unset OPENSSL_INCDIR
+  unset OPENSSL_LIBDIR
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=reflection
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+    test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
+  test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
 
+    if test "$PHP_OPENSSL" != "no"; then
+    PHP_OPENSSL_DIR=$PHP_OPENSSL
+  elif test "$PHP_IMAP_SSL" != "no"; then
+    PHP_OPENSSL_DIR=$PHP_IMAP_SSL
   fi
 
-
-
-
-php_enable_session=yes
-
-echo $ac_n "checking whether to enable PHP sessions""... $ac_c" 1>&6
-echo "configure:81689: checking whether to enable PHP sessions" >&5
-# Check whether --enable-session or --disable-session was given.
-if test "${enable_session+set}" = set; then
-  enableval="$enable_session"
-  PHP_SESSION=$enableval
+    if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:85990: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-  PHP_SESSION=yes
-  test "$PHP_ENABLE_ALL" && PHP_SESSION=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SESSION in
-shared,*)
-  PHP_SESSION=`echo "$PHP_SESSION"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SESSION=yes
+  case "$PKG_CONFIG" in
+  /*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
-no)
-  ext_output=no
-  ext_shared=no
+  ?:/*)			 
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
-*)
-  ext_output=yes
-  ext_shared=no
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   ;;
 esac
+fi
+PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+if test -n "$PKG_CONFIG"; then
+  echo "$ac_t""$PKG_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
 
+  fi
 
+    if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
+    if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
+      found_openssl=yes
+      OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
+      OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
+      OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
+    else
+      { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; }
+    fi
 
-echo "$ac_t""$ext_output" 1>&6
+    if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
+      
+  for ac_i in $OPENSSL_LIBS; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
 
+    fi
+   ;;
+  esac
 
 
-php_with_mm=no
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-echo $ac_n "checking for mm support""... $ac_c" 1>&6
-echo "configure:81733: checking for mm support" >&5
-# Check whether --with-mm or --without-mm was given.
-if test "${with_mm+set}" = set; then
-  withval="$with_mm"
-  PHP_MM=$withval
-else
+    
+      if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
+      else
+        
   
-  PHP_MM=no
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-fi
-
-
-ext_output=$PHP_MM
-echo "$ac_t""$ext_output" 1>&6
 
+      fi
+    
+  fi
 
+    ;;
+    esac
+  done
 
+      
+  for ac_i in $OPENSSL_INCS; do
+    case $ac_i in
+    -I*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/include"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-if test "$PHP_SESSION" != "no"; then
-  
-  echo $ac_n "checking whether pwrite works""... $ac_c" 1>&6
-echo "configure:81755: checking whether pwrite works" >&5
-if eval "test \"`echo '$''{'ac_cv_pwrite'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
     
-  if test "$cross_compiling" = yes; then
   
-    ac_cv_pwrite=no
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-else
-  cat > conftest.$ac_ext <<EOF
-#line 81767 "configure"
-#include "confdefs.h"
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
+  fi
 
-    main() {
-    int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
+    ;;
+    esac
+  done
 
-    if (fd < 0) exit(1);
-    if (pwrite(fd, "text", 4, 0) != 4) exit(1);
-    /* Linux glibc breakage until 2.2.5 */
-    if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
-    exit(0);
-    }
+    fi
+  fi
 
+    if test "$found_openssl" = "no"; then
   
+    if test "$PHP_OPENSSL_DIR" = "yes"; then
+      PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+    fi
+
+    for i in $PHP_OPENSSL_DIR; do
+      if test -r $i/include/openssl/evp.h; then
+        OPENSSL_INCDIR=$i/include
+      fi
+      if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
+        OPENSSL_LIBDIR=$i/$PHP_LIBDIR
+      fi
+      test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
+    done
+
+    if test -z "$OPENSSL_INCDIR"; then
+      { echo "configure: error: Cannot find OpenSSL's <evp.h>" 1>&2; exit 1; }
+    fi
+
+    if test -z "$OPENSSL_LIBDIR"; then
+      { echo "configure: error: Cannot find OpenSSL's libraries" 1>&2; exit 1; }
+    fi
+
+    old_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS=-I$OPENSSL_INCDIR
+    echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
+echo "configure:86195: checking for OpenSSL version" >&5
+    cat > conftest.$ac_ext <<EOF
+#line 86197 "configure"
+#include "confdefs.h"
+
+#include <openssl/opensslv.h>
+#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
+  yes
+#endif
+    
 EOF
-if { (eval echo configure:81788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-    ac_cv_pwrite=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
   
+      echo "$ac_t"">= 0.9.6" 1>&6
+    
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  
-    ac_cv_pwrite=no
+  rm -rf conftest*
   
+      { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; }
+    
 fi
-rm -fr conftest*
-fi
+rm -f conftest*
 
+    CPPFLAGS=$old_CPPFLAGS
 
-    if test "$ac_cv_pwrite" = "no"; then
-      
-  if test "$cross_compiling" = yes; then
+    
+  if test "$OPENSSL_INCDIR" != "/usr/include"; then
+    
+  if test -z "$OPENSSL_INCDIR" || echo "$OPENSSL_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$OPENSSL_INCDIR
+  else
+    
+    ep_dir="`echo $OPENSSL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$OPENSSL_INCDIR\"`"
+  fi
+
+    
   
-    ac_cv_pwrite=no
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-else
-  cat > conftest.$ac_ext <<EOF
-#line 81813 "configure"
-#include "confdefs.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-ssize_t pwrite(int, void *, size_t, off64_t);
-    main() {
-    int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-    if (fd < 0) exit(1);
-    if (pwrite(fd, "text", 4, 0) != 4) exit(1);
-    /* Linux glibc breakage until 2.2.5 */
-    if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
-    exit(0);
-    }
+  fi
 
   
-EOF
-if { (eval echo configure:81834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+      -L$OPENSSL_LIBDIR
+    "
   
-    ac_cv_pwrite=yes
+  save_ext_shared=$ext_shared
+  ext_shared=yes
   
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
   
-    ac_cv_pwrite=no
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-fi
-rm -fr conftest*
-fi
-
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-      if test "$ac_cv_pwrite" = "yes"; then
-        ac_cv_pwrite=64
       fi
-    fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-fi
-
-echo "$ac_t""$ac_cv_pwrite" 1>&6
-
-  if test "$ac_cv_pwrite" != "no"; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_PWRITE 1
-EOF
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-    if test "$ac_cv_pwrite" = "64"; then
-      cat >> confdefs.h <<\EOF
-#define PHP_PWRITE_64 1
-EOF
 
     fi
-  fi  
-
-  
-  echo $ac_n "checking whether pread works""... $ac_c" 1>&6
-echo "configure:81875: checking whether pread works" >&5
-if eval "test \"`echo '$''{'ac_cv_pread'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-    
-  echo test > conftest_in
-  if test "$cross_compiling" = yes; then
-  
-    ac_cv_pread=no
-  
-else
-  cat > conftest.$ac_ext <<EOF
-#line 81888 "configure"
-#include "confdefs.h"
+   ;;
+  esac
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
 
-    main() {
-    char buf[3]; 
-    int fd = open("conftest_in", O_RDONLY);
-    if (fd < 0) exit(1);
-    if (pread(fd, buf, 2, 0) != 2) exit(1);
-    /* Linux glibc breakage until 2.2.5 */
-    if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
-    exit(0);
-    }
-  
-EOF
-if { (eval echo configure:81908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-    ac_cv_pread=yes
   
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-    ac_cv_pread=no
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-fi
-rm -fr conftest*
-fi
+  fi
 
-  rm -f conftest_in
 
-    if test "$ac_cv_pread" = "no"; then
-      
-  echo test > conftest_in
-  if test "$cross_compiling" = yes; then
-  
-    ac_cv_pread=no
-  
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
+echo "configure:86352: checking for CRYPTO_free in -lcrypto" >&5
+ac_lib_var=`echo crypto'_'CRYPTO_free | 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
-  cat > conftest.$ac_ext <<EOF
-#line 81935 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lcrypto  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 86360 "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 CRYPTO_free();
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-ssize_t pread(int, void *, size_t, off64_t);
-    main() {
-    char buf[3]; 
-    int fd = open("conftest_in", O_RDONLY);
-    if (fd < 0) exit(1);
-    if (pread(fd, buf, 2, 0) != 2) exit(1);
-    /* Linux glibc breakage until 2.2.5 */
-    if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
-    exit(0);
-    }
-  
+int main() {
+CRYPTO_free()
+; return 0; }
 EOF
-if { (eval echo configure:81955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-    ac_cv_pread=yes
-  
+if { (eval echo configure:86371: \"$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 -fr conftest*
-  
-    ac_cv_pread=no
-  
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-  rm -f conftest_in
-
-      if test "$ac_cv_pread" = "yes"; then
-        ac_cv_pread=64
-      fi
-    fi
-  
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+      
+  
+  case crypto in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="-lcrypto $SNMP_SHARED_LIBADD" 
+    else
+      
+  
+  case crypto in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lcrypto $LIBS" 
+   ;;
+  esac
 
-echo "$ac_t""$ac_cv_pread" 1>&6
 
-  if test "$ac_cv_pread" != "no"; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_PREAD 1
-EOF
+    fi
+   ;;
+  esac
 
-    if test "$ac_cv_pread" = "64"; then
-      cat >> confdefs.h <<\EOF
-#define PHP_PREAD_64 1
-EOF
 
-    fi
-  fi  
+    
+  
+else
+  echo "$ac_t""no" 1>&6
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_crypto_CRYPTO_free
+    
+      { echo "configure: error: libcrypto not found!" 1>&2; exit 1; }
+    
   
-  ext_builddir=ext/session
-  ext_srcdir=$abs_srcdir/ext/session
+fi
 
-  ac_extra=
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SESSION_SHARED=no
+    old_LIBS=$LIBS
+    LIBS="$LIBS -lcrypto"
     
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+      -L$OPENSSL_LIBDIR
+    "
   
-  case ext/session in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+  save_ext_shared=$ext_shared
+  ext_shared=yes
   
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
   
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
       
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
 
-    EXT_STATIC="$EXT_STATIC session"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC session"
     fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SESSION_SHARED=yes
-      
-  case ext/session in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+   ;;
   esac
-  
-  
-
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
 
 
-  old_IFS=$IFS
-  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
       
-      shared_objects_session="$shared_objects_session $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsession.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(PHPSESSION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsession.so '$ext_builddir'/phpsession.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSESSION, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(PHPSESSION_SHARED_LIBADD)'
-      ;;
-  esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsession.$suffix"
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsession.$suffix"
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_session"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsession.$suffix: $ext_builddir/phpsession.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsession.$suffix \$(phplibdir)
-
-$ext_builddir/phpsession.$suffix: \$(shared_objects_session) \$(PHPSESSION_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/session.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(SESSION_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/session.so '$ext_builddir'/session.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SESSION, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_session) $(SESSION_SHARED_LIBADD)'
-      ;;
-  esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/session.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/session.$suffix"
+      fi
+    
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_session"
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/session.$suffix: $ext_builddir/session.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/session.$suffix \$(phplibdir)
-
-$ext_builddir/session.$suffix: \$(shared_objects_session) \$(SESSION_SHARED_DEPENDENCIES)
-	$link_cmd
+    ;;
+    esac
+  done
 
-EOF
+  echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
+echo "configure:86528: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | 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="-lssl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 86536 "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 SSL_CTX_set_ssl_version();
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_SESSION 1
+int main() {
+SSL_CTX_set_ssl_version()
+; return 0; }
 EOF
+if { (eval echo configure:86547: \"$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
-  fi
-
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SESSION_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
-  
-  case ext/session in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+      found_openssl=yes
+    
   
+else
+  echo "$ac_t""no" 1>&6
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version
+    
+      { echo "configure: error: libssl not found!" 1>&2; exit 1; }
+    
+  
+fi
 
-  old_IFS=$IFS
-  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
+    LIBS=$old_LIBS
+    
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  case ssl in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="-lssl $SNMP_SHARED_LIBADD" 
+    else
       
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-
-        EXT_STATIC="$EXT_STATIC session"
-        ;;
-      *)
-        
   
-  case ext/session in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  case ssl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lssl $LIBS" 
+   ;;
   esac
-  
-  
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+
+    fi
+   ;;
+  esac
 
 
-  old_IFS=$IFS
-  for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do
+    
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  case crypto in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="-lcrypto $SNMP_SHARED_LIBADD" 
+    else
       
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  
+  case crypto in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lcrypto $LIBS" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+    fi
+   ;;
+  esac
 
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC session"
+
+    
+  if test "$OPENSSL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$OPENSSL_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$OPENSSL_LIBDIR" || echo "$OPENSSL_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$OPENSSL_LIBDIR
+  else
+    
+    ep_dir="`echo $OPENSSL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$OPENSSL_LIBDIR\"`"
   fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
+      else
+        
   
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  fi
 
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=session
+      fi
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
   fi
 
-  
-  am_i_shared=$PHP_SESSION_SHARED
-  is_it_shared=$PHP_HASH_SHARED
-  is_it_enabled=$PHP_HASH
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension session to build statically, but it
-depends on extension hash, which you've configured to build shared.
-You either need to build session shared or build hash statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension session, which depends on extension hash,
-but you've either not enabled hash, or have disabled it.
-" 1>&2; exit 1; }
   fi
+
+  if test "$found_openssl" = "yes"; then
+    OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
   
-  
-  am_i_shared=$PHP_SESSION_SHARED
-  is_it_shared=$PHP_SPL_SHARED
-  is_it_enabled=$PHP_SPL
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension session to build statically, but it
-depends on extension spl, which you've configured to build shared.
-You either need to build session shared or build spl statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension session, which depends on extension spl,
-but you've either not enabled spl, or have disabled it.
-" 1>&2; exit 1; }
+
+:
+else 
+          { echo "configure: error: SNMP: OpenSSL check failed. Please check config.log for more information." 1>&2; exit 1; }
+        
   fi
-  
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SESSION_SHARED_LIBADD"
 
+      fi
+    fi
+
+    echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6
+echo "configure:86683: checking for kstat_read in -lkstat" >&5
+ac_lib_var=`echo kstat'_'kstat_read | 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="-lkstat  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 86691 "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 kstat_read();
+
+int main() {
+kstat_read()
+; return 0; }
+EOF
+if { (eval echo configure:86702: \"$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
+   
   
-  
-    header_path=ext/session
-    for header_file in php_session.h mod_files.h mod_user.h; do
-      hp_hf="$header_path/$header_file"
+  case kstat in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SNMP_SHARED_LIBADD="-lkstat $SNMP_SHARED_LIBADD" 
+    else
       
   
-  unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INSTALLHEADERS$unique=set"
-    
-        INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
-      
-  fi
+  case kstat in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lkstat $LIBS" 
+   ;;
+  esac
 
-    done 
-  
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_PHP_SESSION 1
-EOF
+    fi
+   ;;
+  esac
 
+ 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-if test "$PHP_MM" != "no"; then
-  for i in $PHP_MM /usr/local /usr; do
-    test -f "$i/include/mm.h" && MM_DIR=$i && break
-  done
-
-  if test -z "$MM_DIR" ; then
-    { echo "configure: error: cannot find mm library" 1>&2; exit 1; }
+    
+  if test "$SNMP_INCDIR" != "/usr/include"; then
+    
+  if test -z "$SNMP_INCDIR" || echo "$SNMP_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$SNMP_INCDIR
+  else
+    
+    ep_dir="`echo $SNMP_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$SNMP_INCDIR\"`"
   fi
+
+    
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    
 
   if test "$ext_shared" = "yes"; then
-    SESSION_SHARED_LIBADD="-lmm $SESSION_SHARED_LIBADD"
-    if test -n "$MM_DIR/$PHP_LIBDIR"; then
+    SNMP_SHARED_LIBADD="-lsnmp $SNMP_SHARED_LIBADD"
+    if test -n "$SNMP_LIBDIR"; then
       
-  if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$SNMP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SNMP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$MM_DIR/$PHP_LIBDIR
+  if test -z "$SNMP_LIBDIR" || echo "$SNMP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$SNMP_LIBDIR
   else
     
-    ep_dir="`echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $SNMP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$MM_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$SNMP_LIBDIR\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        SESSION_SHARED_LIBADD="-L$ai_p $SESSION_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SESSION_SHARED_LIBADD="$ld_runpath_switch$ai_p $SESSION_SHARED_LIBADD"
+        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
       else
         
   
@@ -82406,18 +86818,18 @@ if test "$PHP_MM" != "no"; then
   else
     
 
-  if test -n "$MM_DIR/$PHP_LIBDIR"; then
+  if test -n "$SNMP_LIBDIR"; then
     
-  if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$SNMP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SNMP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$MM_DIR/$PHP_LIBDIR
+  if test -z "$SNMP_LIBDIR" || echo "$SNMP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$SNMP_LIBDIR
   else
     
-    ep_dir="`echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $SNMP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$MM_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$SNMP_LIBDIR\"`"
   fi
 
     
@@ -82443,10 +86855,10 @@ if test "$PHP_MM" != "no"; then
   fi
   
   
-  case mm in
+  case snmp in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lmm $LIBS" 
+      LIBS="-lsnmp $LIBS" 
    ;;
   esac
 
@@ -82456,124 +86868,338 @@ if test "$PHP_MM" != "no"; then
   fi
 
 
+    SNMP_LIBNAME=snmp
+  fi
+
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    $SNMP_SHARED_LIBADD
+  "
   
-  if test "$MM_DIR/include" != "/usr/include"; then
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
     
-  if test -z "$MM_DIR/include" || echo "$MM_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$MM_DIR/include
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
-    ep_dir="`echo $MM_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$MM_DIR/include\"`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
 
     
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
+    eval "LIBPATH$unique=set"
     
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
       fi
     
   fi
 
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for snmp_parse_oid in -l$SNMP_LIBNAME""... $ac_c" 1>&6
+echo "configure:86973: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5
+ac_lib_var=`echo $SNMP_LIBNAME'_'snmp_parse_oid | 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="-l$SNMP_LIBNAME  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 86981 "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 snmp_parse_oid();
+
+int main() {
+snmp_parse_oid()
+; return 0; }
+EOF
+if { (eval echo configure:86992: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+    cat >> confdefs.h <<\EOF
+#define HAVE_SNMP_PARSE_OID 1
+EOF
+
+  
+  
+else
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_$SNMP_LIBNAME_snmp_parse_oid
+    
+  
+fi
+
+
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+    $SNMP_SHARED_LIBADD
+  "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
   fi
 
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
   
-    for header_file in ext/session/mod_mm.h; do
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
       
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INSTALLHEADERS$unique=set"
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
     
-        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
-      
   fi
 
-    done 
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for init_snmp in -l$SNMP_LIBNAME""... $ac_c" 1>&6
+echo "configure:87126: checking for init_snmp in -l$SNMP_LIBNAME" >&5
+ac_lib_var=`echo $SNMP_LIBNAME'_'init_snmp | 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="-l$SNMP_LIBNAME  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 87134 "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 init_snmp();
+
+int main() {
+init_snmp()
+; return 0; }
+EOF
+if { (eval echo configure:87145: \"$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
   
-
-  cat >> confdefs.h <<\EOF
-#define HAVE_LIBMM 1
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+    cat >> confdefs.h <<\EOF
+#define HAVE_SNMP 1
 EOF
 
-fi
-
-
-php_enable_shmop=no
-
-echo $ac_n "checking whether to enable shmop support""... $ac_c" 1>&6
-echo "configure:82519: checking whether to enable shmop support" >&5
-# Check whether --enable-shmop or --disable-shmop was given.
-if test "${enable_shmop+set}" = set; then
-  enableval="$enable_shmop"
-  PHP_SHMOP=$enableval
-else
   
-  PHP_SHMOP=no
-  test "$PHP_ENABLE_ALL" && PHP_SHMOP=$PHP_ENABLE_ALL
+  
+else
+  echo "$ac_t""no" 1>&6
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_$SNMP_LIBNAME_init_snmp
+    
+    { echo "configure: error: SNMP sanity check failed. Please check config.log for more information." 1>&2; exit 1; }
+  
+  
 fi
 
 
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SHMOP in
-shared,*)
-  PHP_SHMOP=`echo "$PHP_SHMOP"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SHMOP=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_SHMOP" != "no"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_SHMOP 1
+  if test "$PHP_UCD_SNMP_HACK" = "yes" ; then
+    cat >> confdefs.h <<\EOF
+#define UCD_SNMP_HACK 1
 EOF
 
+  fi
   
-  ext_builddir=ext/shmop
-  ext_srcdir=$abs_srcdir/ext/shmop
+  
+  ext_builddir=ext/snmp
+  ext_srcdir=$abs_srcdir/ext/snmp
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SHMOP_SHARED=no
+    PHP_SNMP_SHARED=no
     
   
-  case ext/shmop in
+  case ext/snmp in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -82588,7 +87214,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in shmop.c; do
+  for ac_src in snmp.c; do
   
       IFS=.
       set $ac_src
@@ -82611,18 +87237,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC shmop"
+    EXT_STATIC="$EXT_STATIC snmp"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC shmop"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC snmp"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SHMOP_SHARED=yes
+      PHP_SNMP_SHARED=yes
       
-  case ext/shmop in
+  case ext/snmp in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -82637,14 +87263,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in shmop.c; do
+  for ac_src in snmp.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_shmop="$shared_objects_shmop $ac_bdir$ac_obj.lo"
+      shared_objects_snmp="$shared_objects_snmp $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -82667,31 +87293,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpshmop.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(PHPSHMOP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpshmop.so '$ext_builddir'/phpshmop.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsnmp.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(PHPSNMP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsnmp.so '$ext_builddir'/phpsnmp.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSHMOP, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSNMP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(PHPSHMOP_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(PHPSNMP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpshmop.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsnmp.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpshmop.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsnmp.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_shmop"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_snmp"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpshmop.$suffix: $ext_builddir/phpshmop.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpshmop.$suffix \$(phplibdir)
+\$(phplibdir)/phpsnmp.$suffix: $ext_builddir/phpsnmp.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsnmp.$suffix \$(phplibdir)
 
-$ext_builddir/phpshmop.$suffix: \$(shared_objects_shmop) \$(PHPSHMOP_SHARED_DEPENDENCIES)
+$ext_builddir/phpsnmp.$suffix: \$(shared_objects_snmp) \$(PHPSNMP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -82704,31 +87330,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/shmop.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(SHMOP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/shmop.so '$ext_builddir'/shmop.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/snmp.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(SNMP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/snmp.so '$ext_builddir'/snmp.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SHMOP, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SNMP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_shmop) $(SHMOP_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(SNMP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/shmop.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/snmp.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/shmop.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/snmp.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_shmop"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_snmp"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/shmop.$suffix: $ext_builddir/shmop.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/shmop.$suffix \$(phplibdir)
+\$(phplibdir)/snmp.$suffix: $ext_builddir/snmp.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/snmp.$suffix \$(phplibdir)
 
-$ext_builddir/shmop.$suffix: \$(shared_objects_shmop) \$(SHMOP_SHARED_DEPENDENCIES)
+$ext_builddir/snmp.$suffix: \$(shared_objects_snmp) \$(SNMP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -82736,22 +87362,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_SHMOP 1
+#define COMPILE_DL_SNMP 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SHMOP_SHARED=no
+    PHP_SNMP_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/shmop in
+  case ext/snmp in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -82766,7 +87392,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in shmop.c; do
+  for ac_src in snmp.c; do
   
       IFS=.
       set $ac_src
@@ -82789,15 +87415,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC shmop"
+        EXT_STATIC="$EXT_STATIC snmp"
         ;;
       *)
         
   
-  case ext/shmop in
+  case ext/snmp in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -82812,7 +87438,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in shmop.c; do
+  for ac_src in snmp.c; do
   
       IFS=.
       set $ac_src
@@ -82837,7 +87463,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC shmop"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC snmp"
   fi
   
   
@@ -82846,28 +87472,31 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=shmop
+    PHP_PECL_EXTENSION=snmp
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SNMP_SHARED_LIBADD"
+
 fi
 
 
 
-php_enable_simplexml=yes
+php_enable_soap=no
 
-echo $ac_n "checking whether to enable SimpleXML support""... $ac_c" 1>&6
-echo "configure:82863: checking whether to enable SimpleXML support" >&5
-# Check whether --enable-simplexml or --disable-simplexml was given.
-if test "${enable_simplexml+set}" = set; then
-  enableval="$enable_simplexml"
-  PHP_SIMPLEXML=$enableval
+echo $ac_n "checking whether to enable SOAP support""... $ac_c" 1>&6
+echo "configure:87492: checking whether to enable SOAP support" >&5
+# Check whether --enable-soap or --disable-soap was given.
+if test "${enable_soap+set}" = set; then
+  enableval="$enable_soap"
+  PHP_SOAP=$enableval
 else
   
-  PHP_SIMPLEXML=yes
-  test "$PHP_ENABLE_ALL" && PHP_SIMPLEXML=$PHP_ENABLE_ALL
+  PHP_SOAP=no
+  test "$PHP_ENABLE_ALL" && PHP_SOAP=$PHP_ENABLE_ALL
 
 fi
 
@@ -82875,12 +87504,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_SIMPLEXML in
+case $PHP_SOAP in
 shared,*)
-  PHP_SIMPLEXML=`echo "$PHP_SIMPLEXML"|$SED 's/^shared,//'`
+  PHP_SOAP=`echo "$PHP_SOAP"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_SIMPLEXML=yes
+  PHP_SOAP=yes
   ;;
 no)
   ext_output=no
@@ -82904,7 +87533,7 @@ if test -z "$PHP_LIBXML_DIR"; then
 php_with_libxml_dir=no
 
 echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:82908: checking libxml2 install dir" >&5
+echo "configure:87537: checking libxml2 install dir" >&5
 # Check whether --with-libxml-dir or --without-libxml-dir was given.
 if test "${with_libxml_dir+set}" = set; then
   withval="$with_libxml_dir"
@@ -82924,15 +87553,15 @@ echo "$ac_t""$ext_output" 1>&6
 
 fi
 
-if test "$PHP_SIMPLEXML" != "no"; then
+if test "$PHP_SOAP" != "no"; then
 
   if test "$PHP_LIBXML" = "no"; then   
-    { echo "configure: error: SimpleXML extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }                
+    { echo "configure: error: SOAP extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }                
   fi
 
   
 echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:82936: checking for xml2-config path" >&5
+echo "configure:87565: checking for xml2-config path" >&5
 if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -82964,7 +87593,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -pthread"
+        SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -pthread"
       else
         
   
@@ -82986,7 +87615,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -l$ac_ii" 
+        SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -l$ac_ii" 
     else
       
   
@@ -83021,8 +87650,8 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
     
       if test "$ext_shared" = "yes"; then
-        SIMPLEXML_SHARED_LIBADD="-L$ai_p $SIMPLEXML_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SIMPLEXML_SHARED_LIBADD="$ld_runpath_switch$ai_p $SIMPLEXML_SHARED_LIBADD"
+        SOAP_SHARED_LIBADD="-L$ai_p $SOAP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SOAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SOAP_SHARED_LIBADD"
       else
         
   
@@ -83090,7 +87719,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
 
             echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:83094: checking whether libxml build works" >&5
+echo "configure:87723: checking whether libxml build works" >&5
 if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -83098,7 +87727,7 @@ else
         
   old_LIBS=$LIBS
   LIBS="
-          $SIMPLEXML_SHARED_LIBADD
+          $SOAP_SHARED_LIBADD
          $LIBS"
   if test "$cross_compiling" = yes; then
   
@@ -83106,7 +87735,7 @@ else
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 83110 "configure"
+#line 87739 "configure"
 #include "confdefs.h"
 
     
@@ -83117,7 +87746,7 @@ else
     }
   
 EOF
-if { (eval echo configure:83121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:87750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -83153,23 +87782,23 @@ EOF
       fi
       
     cat >> confdefs.h <<\EOF
-#define HAVE_SIMPLEXML 1
+#define HAVE_SOAP 1
 EOF
 
     
-  ext_builddir=ext/simplexml
-  ext_srcdir=$abs_srcdir/ext/simplexml
+  ext_builddir=ext/soap
+  ext_srcdir=$abs_srcdir/ext/soap
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SIMPLEXML_SHARED=no
+    PHP_SOAP_SHARED=no
     
   
-  case ext/simplexml in
+  case ext/soap in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -83184,7 +87813,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in simplexml.c sxe.c; do
+  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
   
       IFS=.
       set $ac_src
@@ -83207,18 +87836,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC simplexml"
+    EXT_STATIC="$EXT_STATIC soap"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC simplexml"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC soap"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SIMPLEXML_SHARED=yes
+      PHP_SOAP_SHARED=yes
       
-  case ext/simplexml in
+  case ext/soap in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -83233,14 +87862,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in simplexml.c sxe.c; do
+  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_simplexml="$shared_objects_simplexml $ac_bdir$ac_obj.lo"
+      shared_objects_soap="$shared_objects_soap $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -83263,31 +87892,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsimplexml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(PHPSIMPLEXML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsimplexml.so '$ext_builddir'/phpsimplexml.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsoap.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(PHPSOAP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsoap.so '$ext_builddir'/phpsoap.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSIMPLEXML, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSOAP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(PHPSIMPLEXML_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(PHPSOAP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsimplexml.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsoap.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsimplexml.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsoap.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_simplexml"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_soap"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsimplexml.$suffix: $ext_builddir/phpsimplexml.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsimplexml.$suffix \$(phplibdir)
+\$(phplibdir)/phpsoap.$suffix: $ext_builddir/phpsoap.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsoap.$suffix \$(phplibdir)
 
-$ext_builddir/phpsimplexml.$suffix: \$(shared_objects_simplexml) \$(PHPSIMPLEXML_SHARED_DEPENDENCIES)
+$ext_builddir/phpsoap.$suffix: \$(shared_objects_soap) \$(PHPSOAP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -83300,31 +87929,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/simplexml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(SIMPLEXML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/simplexml.so '$ext_builddir'/simplexml.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/soap.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(SOAP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/soap.so '$ext_builddir'/soap.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SIMPLEXML, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SOAP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_simplexml) $(SIMPLEXML_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(SOAP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/simplexml.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/soap.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/simplexml.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/soap.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_simplexml"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_soap"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/simplexml.$suffix: $ext_builddir/simplexml.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/simplexml.$suffix \$(phplibdir)
+\$(phplibdir)/soap.$suffix: $ext_builddir/soap.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/soap.$suffix \$(phplibdir)
 
-$ext_builddir/simplexml.$suffix: \$(shared_objects_simplexml) \$(SIMPLEXML_SHARED_DEPENDENCIES)
+$ext_builddir/soap.$suffix: \$(shared_objects_soap) \$(SOAP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -83332,22 +87961,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_SIMPLEXML 1
+#define COMPILE_DL_SOAP 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SIMPLEXML_SHARED=no
+    PHP_SOAP_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/simplexml in
+  case ext/soap in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -83362,7 +87991,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in simplexml.c sxe.c; do
+  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
   
       IFS=.
       set $ac_src
@@ -83385,15 +88014,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC simplexml"
+        EXT_STATIC="$EXT_STATIC soap"
         ;;
       *)
         
   
-  case ext/simplexml in
+  case ext/soap in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -83408,7 +88037,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in simplexml.c sxe.c; do
+  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
   
       IFS=.
       set $ac_src
@@ -83426,389 +88055,196 @@ EOF
 
     cat >>Makefile.objects<<EOF
 $ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC simplexml"
-  fi
-  
-  
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
-
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=simplexml
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
-  fi
-
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SIMPLEXML_SHARED_LIBADD"
-
-  
-    else
-      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
-    fi
-else 
-    { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; }
-  
-  fi
-
-  
-  am_i_shared=$PHP_SIMPLEXML_SHARED
-  is_it_shared=$PHP_LIBXML_SHARED
-  is_it_enabled=$PHP_LIBXML
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension simplexml to build statically, but it
-depends on extension libxml, which you've configured to build shared.
-You either need to build simplexml shared or build libxml statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension simplexml, which depends on extension libxml,
-but you've either not enabled libxml, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
-  
-  am_i_shared=$PHP_SIMPLEXML_SHARED
-  is_it_shared=$PHP_SPL_SHARED
-  is_it_enabled=$PHP_SPL
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension simplexml to build statically, but it
-depends on extension spl, which you've configured to build shared.
-You either need to build simplexml shared or build spl statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension simplexml, which depends on extension spl,
-but you've either not enabled spl, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
-fi
-
-
-
-php_with_snmp=no
-
-echo $ac_n "checking for SNMP support""... $ac_c" 1>&6
-echo "configure:83509: checking for SNMP support" >&5
-# Check whether --with-snmp or --without-snmp was given.
-if test "${with_snmp+set}" = set; then
-  withval="$with_snmp"
-  PHP_SNMP=$withval
-else
-  
-  PHP_SNMP=no
-  test "$PHP_ENABLE_ALL" && PHP_SNMP=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SNMP in
-shared,*)
-  PHP_SNMP=`echo "$PHP_SNMP"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SNMP=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-
-php_with_openssl_dir=no
-
-echo $ac_n "checking OpenSSL dir for SNMP""... $ac_c" 1>&6
-echo "configure:83553: checking OpenSSL dir for SNMP" >&5
-# Check whether --with-openssl-dir or --without-openssl-dir was given.
-if test "${with_openssl_dir+set}" = set; then
-  withval="$with_openssl_dir"
-  PHP_OPENSSL_DIR=$withval
-else
-  
-  PHP_OPENSSL_DIR=no
-  
-
-fi
-
-
-ext_output=$PHP_OPENSSL_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-
-php_enable_ucd_snmp_hack=no
-
-echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6
-echo "configure:83576: checking whether to enable UCD SNMP hack" >&5
-# Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given.
-if test "${enable_ucd_snmp_hack+set}" = set; then
-  enableval="$enable_ucd_snmp_hack"
-  PHP_UCD_SNMP_HACK=$enableval
-else
-  
-  PHP_UCD_SNMP_HACK=no
-  
-
-fi
-
-
-ext_output=$PHP_UCD_SNMP_HACK
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_SNMP" != "no"; then
-
-        if test "$PHP_SNMP" = "yes"; then
-    # Extract the first word of "net-snmp-config", so it can be a program name with args.
-set dummy net-snmp-config; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:83601: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SNMP_CONFIG'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$SNMP_CONFIG" in
-  /*)
-  ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="/usr/local/bin:$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_SNMP_CONFIG="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-SNMP_CONFIG="$ac_cv_path_SNMP_CONFIG"
-if test -n "$SNMP_CONFIG"; then
-  echo "$ac_t""$SNMP_CONFIG" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  else
-    SNMP_CONFIG="$PHP_SNMP/bin/net-snmp-config"
-  fi
-
-  if test -x "$SNMP_CONFIG"; then
-    SNMP_LIBS=`$SNMP_CONFIG --netsnmp-libs`
-    SNMP_LIBS="$SNMP_LIBS `$SNMP_CONFIG --external-libs`"
-    SNMP_PREFIX=`$SNMP_CONFIG --prefix`
-
-    if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
-      
-  if test "${SNMP_PREFIX}/include" != "/usr/include"; then
-    
-  if test -z "${SNMP_PREFIX}/include" || echo "${SNMP_PREFIX}/include" | grep '^/' >/dev/null ; then
-    ai_p=${SNMP_PREFIX}/include
-  else
-    
-    ep_dir="`echo $SNMP_PREFIX/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"${SNMP_PREFIX}/include\"`"
-  fi
+	$ac_comp
+EOF
+  done
 
-    
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC soap"
+  fi
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=soap
     
-  fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
-      
-  for ac_i in $SNMP_LIBS; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SOAP_SHARED_LIBADD"
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -l$ac_ii" 
     else
-      
+      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
+    fi
+else 
+    { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; }
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+  fi
 
+fi
 
-    fi
-   ;;
-  esac
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+php_enable_sockets=no
 
-    
-      if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
-      else
-        
-  
+echo $ac_n "checking whether to enable sockets support""... $ac_c" 1>&6
+echo "configure:88100: checking whether to enable sockets support" >&5
+# Check whether --enable-sockets or --disable-sockets was given.
+if test "${enable_sockets+set}" = set; then
+  enableval="$enable_sockets"
+  PHP_SOCKETS=$enableval
+else
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  PHP_SOCKETS=no
+  test "$PHP_ENABLE_ALL" && PHP_SOCKETS=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SOCKETS in
+shared,*)
+  PHP_SOCKETS=`echo "$PHP_SOCKETS"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SOCKETS=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_SOCKETS" != "no"; then
+    echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6
+echo "configure:88142: checking for struct cmsghdr" >&5
+if eval "test \"`echo '$''{'ac_cv_cmsghdr'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+    cat > conftest.$ac_ext <<EOF
+#line 88148 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+int main() {
+struct cmsghdr s; s
+; return 0; }
+EOF
+if { (eval echo configure:88157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cmsghdr=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cmsghdr=no
+fi
+rm -f conftest*
   
-  fi
+fi
 
+echo "$ac_t""$ac_cv_cmsghdr" 1>&6
 
-      fi
-    
-  fi
+  if test "$ac_cv_cmsghdr" = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_CMSGHDR 1
+EOF
 
-    ;;
-    esac
-  done
+  fi 
 
-      cat >> confdefs.h <<\EOF
-#define HAVE_NET_SNMP 1
-EOF
+  for ac_func in hstrerror socketpair
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:88182: 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 88187 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 $ac_func();
 
-      SNMP_LIBNAME=netsnmp
-    else
-      { echo "configure: error: Could not find the required paths. Please check your net-snmp installation." 1>&2; exit 1; }
-    fi
-  else 
+int main() {
 
-            
-    if test "$PHP_SNMP" = "yes"; then
-      for i in /usr/include /usr/local/include; do
-        test -f $i/snmp.h                       && SNMP_INCDIR=$i
-        test -f $i/ucd-snmp/snmp.h              && SNMP_INCDIR=$i/ucd-snmp
-        test -f $i/snmp/snmp.h                  && SNMP_INCDIR=$i/snmp
-        test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp
-      done
-      for i in /usr/$PHP_LIBDIR /usr/snmp/lib /usr/local/$PHP_LIBDIR /usr/local/lib /usr/local/snmp/lib; do
-        test -f $i/libsnmp.a || test -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i
-      done
-    else
-      SNMP_INCDIR=$PHP_SNMP/include
-      test -d $PHP_SNMP/include/ucd-snmp && SNMP_INCDIR=$PHP_SNMP/include/ucd-snmp
-      SNMP_LIBDIR=$PHP_SNMP/lib
-    fi
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
 
-    if test -z "$SNMP_INCDIR"; then
-      { echo "configure: error: snmp.h not found. Check your SNMP installation." 1>&2; exit 1; }
-    elif test -z "$SNMP_LIBDIR"; then
-      { echo "configure: error: libsnmp not found. Check your SNMP installation." 1>&2; exit 1; }
-    fi
+; return 0; }
+EOF
+if { (eval echo configure:88210: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
-    old_CPPFLAGS=$CPPFLAGS
-    CPPFLAGS=-I$SNMP_INCDIR
-    for ac_hdr in default_store.h
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+  for ac_hdr in netdb.h netinet/tcp.h sys/un.h errno.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:83802: checking for $ac_hdr" >&5
+echo "configure:88238: checking for $ac_hdr" >&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 83807 "configure"
+#line 88243 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:83812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:88248: \"$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*
@@ -83834,955 +88270,865 @@ else
 fi
 done
 
-    if test "$ac_cv_header_default_store_h" = "yes"; then
-      echo $ac_n "checking for OpenSSL support in SNMP libraries""... $ac_c" 1>&6
-echo "configure:83840: checking for OpenSSL support in SNMP libraries" >&5
-      cat > conftest.$ac_ext <<EOF
-#line 83842 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 88275 "configure"
 #include "confdefs.h"
 
-#include <ucd-snmp-config.h>
-#if USE_OPENSSL
-        yes
-#endif
-      
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
+#include <sys/types.h>
+#include <sys/socket.h>
   
-        SNMP_SSL=yes
-      
+int main() {
+static struct msghdr tp; int n = (int) tp.msg_flags; return n
+; return 0; }
+EOF
+if { (eval echo configure:88285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
   rm -rf conftest*
+  cat >> confdefs.h <<\EOF
+#define MISSING_MSGHDR_MSGFLAGS 1
+EOF
+
   
-        SNMP_SSL=no
-      
 fi
 rm -f conftest*
+  cat >> confdefs.h <<\EOF
+#define HAVE_SOCKETS 1
+EOF
+
 
-    fi
-    CPPFLAGS=$old_CPPFLAGS
-    echo "$ac_t""$SNMP_SSL" 1>&6
   
-    if test "$SNMP_SSL" = "yes"; then
-      if test "$PHP_OPENSSL_DIR" != "no"; then
-        PHP_OPENSSL=$PHP_OPENSSL_DIR
-      fi
-      
-      if test "$PHP_OPENSSL" = "no"; then
-        { echo "configure: error: The UCD-SNMP in this system is built with SSL support. 
+  ext_builddir=ext/sockets
+  ext_srcdir=$abs_srcdir/ext/sockets
 
-        Add --with-openssl-dir=DIR to your configure line." 1>&2; exit 1; }
-      else
-        
-  found_openssl=no
-  unset OPENSSL_INCDIR
-  unset OPENSSL_LIBDIR
+  ac_extra=
 
-    test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
-  test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_SOCKETS_SHARED=no
+    
+  
+  case ext/sockets in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-    if test "$PHP_OPENSSL" != "no"; then
-    PHP_OPENSSL_DIR=$PHP_OPENSSL
-  elif test "$PHP_IMAP_SSL" != "no"; then
-    PHP_OPENSSL_DIR=$PHP_IMAP_SSL
-  fi
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-    if test -z "$PKG_CONFIG"; then
-    # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:83897: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$PKG_CONFIG" in
-  /*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
-      break
-    fi
+
+  old_IFS=$IFS
+  for ac_src in sockets.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
   done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-  ;;
-esac
-fi
-PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-if test -n "$PKG_CONFIG"; then
-  echo "$ac_t""$PKG_CONFIG" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-  fi
 
-    if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
-    if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
-      found_openssl=yes
-      OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
-      OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
-      OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
-    else
-      { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; }
+    EXT_STATIC="$EXT_STATIC sockets"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC sockets"
     fi
-
-    if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_SOCKETS_SHARED=yes
       
-  for ac_i in $OPENSSL_LIBS; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -pthread"
-      else
-        
+  case ext/sockets in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in sockets.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_sockets="$shared_objects_sockets $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsockets.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(PHPSOCKETS_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsockets.so '$ext_builddir'/phpsockets.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSOCKETS, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(PHPSOCKETS_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsockets.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsockets.$suffix"
   fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sockets"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpsockets.$suffix: $ext_builddir/phpsockets.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsockets.$suffix \$(phplibdir)
+
+$ext_builddir/phpsockets.$suffix: \$(shared_objects_sockets) \$(PHPSOCKETS_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sockets.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(SOCKETS_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sockets.so '$ext_builddir'/sockets.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SOCKETS, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(SOCKETS_SHARED_LIBADD)'
+      ;;
+  esac
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -l$ac_ii" 
-    else
-      
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sockets.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sockets.$suffix"
+  fi
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sockets"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/sockets.$suffix: $ext_builddir/sockets.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/sockets.$suffix \$(phplibdir)
 
+$ext_builddir/sockets.$suffix: \$(shared_objects_sockets) \$(SOCKETS_SHARED_DEPENDENCIES)
+	$link_cmd
 
-    fi
-   ;;
-  esac
+EOF
 
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_SOCKETS 1
+EOF
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    fi
   fi
 
-    
-      if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
-      else
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_SOCKETS_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
         
   
+  case ext/sockets in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
-
-
-      fi
-    
-  fi
 
-    ;;
-    esac
-  done
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-      
-  for ac_i in $OPENSSL_INCS; do
-    case $ac_i in
-    -I*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/include"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
 
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  old_IFS=$IFS
+  for ac_src in sockets.c; do
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-  fi
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-    ;;
-    esac
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
   done
 
-    fi
-  fi
 
-    if test "$found_openssl" = "no"; then
+        EXT_STATIC="$EXT_STATIC sockets"
+        ;;
+      *)
+        
+  
+  case ext/sockets in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-    if test "$PHP_OPENSSL_DIR" = "yes"; then
-      PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
-    fi
 
-    for i in $PHP_OPENSSL_DIR; do
-      if test -r $i/include/openssl/evp.h; then
-        OPENSSL_INCDIR=$i/include
-      fi
-      if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
-        OPENSSL_LIBDIR=$i/$PHP_LIBDIR
-      fi
-      test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
-    done
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-    if test -z "$OPENSSL_INCDIR"; then
-      { echo "configure: error: Cannot find OpenSSL's <evp.h>" 1>&2; exit 1; }
-    fi
 
-    if test -z "$OPENSSL_LIBDIR"; then
-      { echo "configure: error: Cannot find OpenSSL's libraries" 1>&2; exit 1; }
-    fi
+  old_IFS=$IFS
+  for ac_src in sockets.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
-    old_CPPFLAGS=$CPPFLAGS
-    CPPFLAGS=-I$OPENSSL_INCDIR
-    echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
-echo "configure:84102: checking for OpenSSL version" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 84104 "configure"
-#include "confdefs.h"
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
-  yes
-#endif
-    
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC sockets"
+  fi
   
-      echo "$ac_t"">= 0.9.6" 1>&6
-    
-else
-  rm -rf conftest*
   
-      { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; }
-    
-fi
-rm -f conftest*
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
-    CPPFLAGS=$old_CPPFLAGS
 
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=sockets
     
-  if test "$OPENSSL_INCDIR" != "/usr/include"; then
-    
-  if test -z "$OPENSSL_INCDIR" || echo "$OPENSSL_INCDIR" | grep '^/' >/dev/null ; then
-    ai_p=$OPENSSL_INCDIR
-  else
-    
-    ep_dir="`echo $OPENSSL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$OPENSSL_INCDIR\"`"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
   fi
 
-    
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+    header_path=ext/sockets/
+    for header_file in php_sockets.h; do
+      hp_hf="$header_path/$header_file"
+      
+  
+  unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
+    eval "INSTALLHEADERS$unique=set"
     
+        INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
+      
   fi
 
-  fi
+    done 
+  
 
+fi
+
+
+  echo $ac_n "checking whether zend_object_value is packed""... $ac_c" 1>&6
+echo "configure:88619: checking whether zend_object_value is packed" >&5
+  old_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
+  if test "$cross_compiling" = yes; then
   
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-      -L$OPENSSL_LIBDIR
-    "
+    ac_result=0
+    echo "$ac_t""no" 1>&6
   
-  save_ext_shared=$ext_shared
-  ext_shared=yes
+else
+  cat > conftest.$ac_ext <<EOF
+#line 88629 "configure"
+#include "confdefs.h"
+
+#include "Zend/zend_types.h"
+int main(int argc, char **argv) {
+	return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
+}
   
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
+EOF
+if { (eval echo configure:88638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+    ac_result=1
+    echo "$ac_t""yes" 1>&6
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
+    ac_result=0
+    echo "$ac_t""no" 1>&6
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
+fi
+rm -fr conftest*
+fi
 
-    fi
-   ;;
-  esac
+  CPPFLAGS=$old_CPPFLAGS
+  cat >> confdefs.h <<EOF
+#define HAVE_PACKED_OBJECT_VALUE $ac_result
+EOF
 
+  cat >> confdefs.h <<\EOF
+#define HAVE_SPL 1
+EOF
+ 
+  
+  ext_builddir=ext/spl
+  ext_srcdir=$abs_srcdir/ext/spl
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+  ac_extra=
 
+  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
+    PHP_SPL_SHARED=no
     
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  case ext/spl in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
 
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-      fi
-    
-  fi
 
-    ;;
-    esac
-  done
+  old_IFS=$IFS
+  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-  echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:84259: checking for CRYPTO_free in -lcrypto" >&5
-ac_lib_var=`echo crypto'_'CRYPTO_free | 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="-lcrypto  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 84267 "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 CRYPTO_free();
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main() {
-CRYPTO_free()
-; return 0; }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:84278: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
+
+    EXT_STATIC="$EXT_STATIC spl"
+    if test "no" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC spl"
+    fi
+  else
+    if test "no" = "shared" || test "no" = "yes"; then
+      PHP_SPL_SHARED=yes
       
+  case ext/spl in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  case crypto in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-lcrypto $SNMP_SHARED_LIBADD" 
-    else
-      
   
-  case crypto in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lcrypto $LIBS" 
-   ;;
-  esac
 
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_spl="$shared_objects_spl $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
-    fi
-   ;;
-  esac
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
 
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpspl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(PHPSPL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpspl.so '$ext_builddir'/phpspl.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSPL, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(PHPSPL_SHARED_LIBADD)'
+      ;;
+  esac
 
-    
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpspl.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpspl.$suffix"
+  fi
   
-else
-  echo "$ac_t""no" 1>&6
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_spl"
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_crypto_CRYPTO_free
-    
-      { echo "configure: error: libcrypto not found!" 1>&2; exit 1; }
-    
-  
-fi
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpspl.$suffix: $ext_builddir/phpspl.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpspl.$suffix \$(phplibdir)
 
+$ext_builddir/phpspl.$suffix: \$(shared_objects_spl) \$(PHPSPL_SHARED_DEPENDENCIES)
+	$link_cmd
 
-    old_LIBS=$LIBS
-    LIBS="$LIBS -lcrypto"
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-      -L$OPENSSL_LIBDIR
-    "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
+EOF
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/spl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(SPL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/spl.so '$ext_builddir'/spl.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SPL, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(SPL_SHARED_LIBADD)'
+      ;;
   esac
 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/spl.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/spl.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_spl"
 
-    fi
-   ;;
-  esac
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/spl.$suffix: $ext_builddir/spl.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/spl.$suffix \$(phplibdir)
 
+$ext_builddir/spl.$suffix: \$(shared_objects_spl) \$(SPL_SHARED_DEPENDENCIES)
+	$link_cmd
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_SPL 1
+EOF
+
+    fi
   fi
 
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
+  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
+    PHP_SPL_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
         
   
+  case ext/spl in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
 
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-      fi
-    
-  fi
 
-    ;;
-    esac
-  done
+  old_IFS=$IFS
+  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-  echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
-echo "configure:84435: checking for SSL_CTX_set_ssl_version in -lssl" >&5
-ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | 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="-lssl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 84443 "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 SSL_CTX_set_ssl_version();
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main() {
-SSL_CTX_set_ssl_version()
-; return 0; }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:84454: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-      found_openssl=yes
-    
-  
-else
-  echo "$ac_t""no" 1>&6
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version
-    
-      { echo "configure: error: libssl not found!" 1>&2; exit 1; }
-    
+        EXT_STATIC="$EXT_STATIC spl"
+        ;;
+      *)
+        
   
-fi
-
-    LIBS=$old_LIBS
-    
+  case ext/spl in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  case ssl in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-lssl $SNMP_SHARED_LIBADD" 
-    else
-      
   
-  case ssl in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lssl $LIBS" 
-   ;;
-  esac
-
 
-    fi
-   ;;
-  esac
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
-    
+  old_IFS=$IFS
+  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
   
-  case crypto in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-lcrypto $SNMP_SHARED_LIBADD" 
-    else
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  
-  case crypto in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lcrypto $LIBS" 
-   ;;
-  esac
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-    fi
-   ;;
-  esac
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
 
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC spl"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=spl
     
-  if test "$OPENSSL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$OPENSSL_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$OPENSSL_LIBDIR" || echo "$OPENSSL_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$OPENSSL_LIBDIR
-  else
-    
-    ep_dir="`echo $OPENSSL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$OPENSSL_LIBDIR\"`"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
   fi
 
-    
-      if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
-      else
-        
   
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+    header_path=ext/spl
+    for header_file in php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h; do
+      hp_hf="$header_path/$header_file"
+      
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
+    eval "INSTALLHEADERS$unique=set"
     
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
+        INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
+      
   fi
 
+    done 
+  
 
-      fi
-    
+  
+  am_i_shared=$PHP_SPL_SHARED
+  is_it_shared=$PHP_PCRE_SHARED
+  is_it_enabled=$PHP_PCRE
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension spl to build statically, but it
+depends on extension pcre, which you've configured to build shared.
+You either need to build spl shared or build pcre statically for the
+build to be successful.
+" 1>&2; exit 1; }
   fi
-
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension spl, which depends on extension pcre,
+but you've either not enabled pcre, or have disabled it.
+" 1>&2; exit 1; }
   fi
-
-  if test "$found_openssl" = "yes"; then
-    OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
   
 
-:
-else 
-          { echo "configure: error: SNMP: OpenSSL check failed. Please check config.log for more information." 1>&2; exit 1; }
-        
-  fi
 
-      fi
-    fi
 
-    echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6
-echo "configure:84590: checking for kstat_read in -lkstat" >&5
-ac_lib_var=`echo kstat'_'kstat_read | 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="-lkstat  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 84598 "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 kstat_read();
+php_with_sqlite=yes
 
-int main() {
-kstat_read()
-; return 0; }
-EOF
-if { (eval echo configure:84609: \"$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"
+echo $ac_n "checking for sqlite support""... $ac_c" 1>&6
+echo "configure:89002: checking for sqlite support" >&5
+# Check whether --with-sqlite or --without-sqlite was given.
+if test "${with_sqlite+set}" = set; then
+  withval="$with_sqlite"
+  PHP_SQLITE=$withval
 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"
+  
+  PHP_SQLITE=yes
+  test "$PHP_ENABLE_ALL" && PHP_SQLITE=$PHP_ENABLE_ALL
 
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-   
-  
-  case kstat in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-lkstat $SNMP_SHARED_LIBADD" 
-    else
-      
-  
-  case kstat in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lkstat $LIBS" 
-   ;;
-  esac
 
 
-    fi
-   ;;
-  esac
 
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SQLITE in
+shared,*)
+  PHP_SQLITE=`echo "$PHP_SQLITE"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SQLITE=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
 
-    
-  if test "$SNMP_INCDIR" != "/usr/include"; then
-    
-  if test -z "$SNMP_INCDIR" || echo "$SNMP_INCDIR" | grep '^/' >/dev/null ; then
-    ai_p=$SNMP_INCDIR
-  else
-    
-    ep_dir="`echo $SNMP_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SNMP_INCDIR\"`"
-  fi
 
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
 
-  fi
 
-    
 
-  if test "$ext_shared" = "yes"; then
-    SNMP_SHARED_LIBADD="-lsnmp $SNMP_SHARED_LIBADD"
-    if test -n "$SNMP_LIBDIR"; then
-      
-  if test "$SNMP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SNMP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$SNMP_LIBDIR" || echo "$SNMP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$SNMP_LIBDIR
-  else
-    
-    ep_dir="`echo $SNMP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SNMP_LIBDIR\"`"
-  fi
+php_enable_sqlite_utf8=no
 
-    
-      if test "$ext_shared" = "yes"; then
-        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+echo $ac_n "checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)""... $ac_c" 1>&6
+echo "configure:89046: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5
+# Check whether --enable-sqlite-utf8 or --disable-sqlite-utf8 was given.
+if test "${enable_sqlite_utf8+set}" = set; then
+  enableval="$enable_sqlite_utf8"
+  PHP_SQLITE_UTF8=$enableval
+else
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  PHP_SQLITE_UTF8=no
   
-  fi
 
+fi
 
-      fi
-    
-  fi
 
-    fi
-  else
-    
+ext_output=$PHP_SQLITE_UTF8
+echo "$ac_t""$ext_output" 1>&6
+
 
-  if test -n "$SNMP_LIBDIR"; then
-    
-  if test "$SNMP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SNMP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$SNMP_LIBDIR" || echo "$SNMP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$SNMP_LIBDIR
-  else
-    
-    ep_dir="`echo $SNMP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SNMP_LIBDIR\"`"
-  fi
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
 
 
-    
-  fi
 
-  fi
-  
-  
-  case snmp in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsnmp $LIBS" 
-   ;;
-  esac
 
 
 
+if test "$PHP_SQLITE" != "no"; then
+  if test "$PHP_PDO" != "no"; then
+    
+  echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
+echo "configure:89074: checking for PDO includes" >&5
+if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
+echo "configure:89080: checking for PDO includes" >&5
+    if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
+      pdo_inc_path=$abs_srcdir/ext
+    elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
+      pdo_inc_path=$abs_srcdir/ext
+    elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
+      pdo_inc_path=$prefix/include/php/ext
+    fi
+  
+fi
 
+echo "$ac_t""$pdo_inc_path" 1>&6
+  if test -n "$pdo_inc_path"; then
+:
+  else
+echo "configure: warning: Cannot find php_pdo_driver.h." 1>&2
   fi
 
+    if test -n "$pdo_inc_path"; then
+      cat >> confdefs.h <<\EOF
+#define PHP_SQLITE2_HAVE_PDO 1
+EOF
 
-    SNMP_LIBNAME=snmp
-  fi
+      pdo_inc_path="-I$pdo_inc_path"
+    fi
+  fi  
+
+  if test "$PHP_SQLITE" != "yes"; then
+    SEARCH_PATH="/usr/local /usr"
+    SEARCH_FOR="/include/sqlite.h"
+    if test -r $PHP_SQLITE/; then # path given as parameter
+      SQLITE_DIR=$PHP_SQLITE
+    else # search default path list
+      echo $ac_n "checking for sqlite files in default path""... $ac_c" 1>&6
+echo "configure:89114: checking for sqlite files in default path" >&5
+      for i in $SEARCH_PATH ; do
+        if test -r $i/$SEARCH_FOR; then
+          SQLITE_DIR=$i
+          echo "$ac_t""found in $i" 1>&6
+        fi
+      done
+    fi
+  
+    if test -z "$SQLITE_DIR"; then
+      echo "$ac_t""not found" 1>&6
+      { echo "configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org" 1>&2; exit 1; }
+    fi
 
     
   save_old_LDFLAGS=$LDFLAGS
   ac_stuff="
-    $SNMP_SHARED_LIBADD
-  "
+      -L$SQLITE_DIR/$PHP_LIBDIR -lm
+    "
   
   save_ext_shared=$ext_shared
   ext_shared=yes
@@ -84875,27 +89221,27 @@ fi
     esac
   done
 
-  echo $ac_n "checking for snmp_parse_oid in -l$SNMP_LIBNAME""... $ac_c" 1>&6
-echo "configure:84880: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5
-ac_lib_var=`echo $SNMP_LIBNAME'_'snmp_parse_oid | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for sqlite_open in -lsqlite""... $ac_c" 1>&6
+echo "configure:89226: checking for sqlite_open in -lsqlite" >&5
+ac_lib_var=`echo sqlite'_'sqlite_open | 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="-l$SNMP_LIBNAME  $LIBS"
+LIBS="-lsqlite  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 84888 "configure"
+#line 89234 "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 snmp_parse_oid();
+char sqlite_open();
 
 int main() {
-snmp_parse_oid()
+sqlite_open()
 ; return 0; }
 EOF
-if { (eval echo configure:84899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:89245: \"$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
@@ -84914,97 +89260,69 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
     LDFLAGS=$save_old_LDFLAGS
     ext_shared=$save_ext_shared
     
-    cat >> confdefs.h <<\EOF
-#define HAVE_SNMP_PARSE_OID 1
-EOF
-
-  
-  
-else
-  echo "$ac_t""no" 1>&6
+      
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_$SNMP_LIBNAME_snmp_parse_oid
+  if test "$ext_shared" = "yes"; then
+    SQLITE_SHARED_LIBADD="-lsqlite $SQLITE_SHARED_LIBADD"
+    if test -n "$SQLITE_DIR/$PHP_LIBDIR"; then
+      
+  if test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  
-fi
-
+  if test -z "$SQLITE_DIR/$PHP_LIBDIR" || echo "$SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$SQLITE_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$SQLITE_DIR/$PHP_LIBDIR\"`"
+  fi
 
     
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-    $SNMP_SHARED_LIBADD
-  "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
+        SQLITE_SHARED_LIBADD="-L$ai_p $SQLITE_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SQLITE_SHARED_LIBADD="$ld_runpath_switch$ai_p $SQLITE_SHARED_LIBADD"
       else
         
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
   fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
 
+      fi
+    
+  fi
 
     fi
-   ;;
-  esac
-
+  else
+    
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+  if test -n "$SQLITE_DIR/$PHP_LIBDIR"; then
     
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+  if test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$SQLITE_DIR/$PHP_LIBDIR" || echo "$SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$SQLITE_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    ai_p="$ep_realdir/`basename \"$SQLITE_DIR/$PHP_LIBDIR\"`"
   fi
 
     
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
+      
   
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
@@ -85020,93 +89338,171 @@ fi
   fi
 
 
-      fi
     
   fi
 
-    ;;
-    esac
-  done
+  fi
+  
+  
+  case sqlite in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsqlite $LIBS" 
+   ;;
+  esac
 
-  echo $ac_n "checking for init_snmp in -l$SNMP_LIBNAME""... $ac_c" 1>&6
-echo "configure:85033: checking for init_snmp in -l$SNMP_LIBNAME" >&5
-ac_lib_var=`echo $SNMP_LIBNAME'_'init_snmp | 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="-l$SNMP_LIBNAME  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 85041 "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 init_snmp();
 
-int main() {
-init_snmp()
-; return 0; }
-EOF
-if { (eval echo configure:85052: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
+
+  fi
+
+
+      
+  if test "$SQLITE_DIR/include" != "/usr/include"; then
     
-    cat >> confdefs.h <<\EOF
-#define HAVE_SNMP 1
-EOF
+  if test -z "$SQLITE_DIR/include" || echo "$SQLITE_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$SQLITE_DIR/include
+  else
+    
+    ep_dir="`echo $SQLITE_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$SQLITE_DIR/include\"`"
+  fi
 
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    
   
 else
   echo "$ac_t""no" 1>&6
 
     LDFLAGS=$save_old_LDFLAGS
     ext_shared=$save_ext_shared
-    unset ac_cv_lib_$SNMP_LIBNAME_init_snmp
+    unset ac_cv_lib_sqlite_sqlite_open
+    
+      { echo "configure: error: wrong sqlite lib version or lib not found" 1>&2; exit 1; }
     
-    { echo "configure: error: SNMP sanity check failed. Please check config.log for more information." 1>&2; exit 1; }
-  
   
 fi
 
+    SQLITE_MODULE_TYPE=external
+    PHP_SQLITE_CFLAGS=$pdo_inc_path
+    sqlite_extra_sources="libsqlite/src/encode.c"
+  else
+    # use bundled library
+    
+  # we only support certain lemon versions
+  lemon_version_list="1.0"
 
-  if test "$PHP_UCD_SNMP_HACK" = "yes" ; then
-    cat >> confdefs.h <<\EOF
-#define UCD_SNMP_HACK 1
-EOF
+  # Extract the first word of "lemon", so it can be a program name with args.
+set dummy lemon; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:89418: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LEMON'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$LEMON"; then
+  ac_cv_prog_LEMON="$LEMON" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_LEMON="lemon"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+LEMON="$ac_cv_prog_LEMON"
+if test -n "$LEMON"; then
+  echo "$ac_t""$LEMON" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test "$LEMON"; then
+    echo $ac_n "checking for lemon version""... $ac_c" 1>&6
+echo "configure:89446: checking for lemon version" >&5
+if eval "test \"`echo '$''{'php_cv_lemon_version'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      lemon_version=`$LEMON -x 2>/dev/null | $SED -e 's/^.* //'`
+      php_cv_lemon_version=invalid
+      for lemon_check_version in $lemon_version_list; do
+        if test "$lemon_version" = "$lemon_check_version"; then
+          php_cv_lemon_version="$lemon_check_version (ok)"
+        fi
+      done
+    
+fi
 
+echo "$ac_t""$php_cv_lemon_version" 1>&6
+  else
+    lemon_version=none
   fi
+  case $php_cv_lemon_version in
+    ""|invalid)
+      lemon_msg="lemon versions supported for regeneration of libsqlite parsers: $lemon_version_list (found: $lemon_version)."
+      echo "configure: warning: $lemon_msg" 1>&2
+      LEMON="exit 0;"
+      ;;
+  esac
   
+  PHP_VAR_SUBST="$PHP_VAR_SUBST LEMON"
+
+
+    SQLITE_MODULE_TYPE=builtin
+    PHP_SQLITE_CFLAGS="-I@ext_srcdir@/libsqlite/src -I@ext_builddir@/libsqlite/src $pdo_inc_path"
+    sqlite_extra_sources="libsqlite/src/opcodes.c \
+        libsqlite/src/parse.c libsqlite/src/encode.c \
+        libsqlite/src/auth.c libsqlite/src/btree.c libsqlite/src/build.c \
+        libsqlite/src/delete.c libsqlite/src/expr.c libsqlite/src/func.c \
+        libsqlite/src/hash.c libsqlite/src/insert.c libsqlite/src/main.c \
+        libsqlite/src/os.c libsqlite/src/pager.c \
+        libsqlite/src/printf.c libsqlite/src/random.c \
+        libsqlite/src/select.c libsqlite/src/table.c libsqlite/src/tokenize.c \
+        libsqlite/src/update.c libsqlite/src/util.c libsqlite/src/vdbe.c \
+        libsqlite/src/attach.c libsqlite/src/btree_rb.c libsqlite/src/pragma.c \
+        libsqlite/src/vacuum.c libsqlite/src/copy.c \
+        libsqlite/src/vdbeaux.c libsqlite/src/date.c \
+        libsqlite/src/where.c libsqlite/src/trigger.c"
+  fi
+        sqlite_sources="sqlite.c sess_sqlite.c pdo_sqlite2.c $sqlite_extra_sources" 
   
-  ext_builddir=ext/snmp
-  ext_srcdir=$abs_srcdir/ext/snmp
+  ext_builddir=ext/sqlite
+  ext_srcdir=$abs_srcdir/ext/sqlite
 
-  ac_extra=
+  ac_extra=`echo "$PHP_SQLITE_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SNMP_SHARED=no
+    PHP_SQLITE_SHARED=no
     
   
-  case ext/snmp in
+  case ext/sqlite in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -85121,7 +89517,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in snmp.c; do
+  for ac_src in $sqlite_sources; do
   
       IFS=.
       set $ac_src
@@ -85144,18 +89540,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC snmp"
+    EXT_STATIC="$EXT_STATIC sqlite"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC snmp"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC sqlite"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SNMP_SHARED=yes
+      PHP_SQLITE_SHARED=yes
       
-  case ext/snmp in
+  case ext/sqlite in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -85170,14 +89566,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in snmp.c; do
+  for ac_src in $sqlite_sources; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_snmp="$shared_objects_snmp $ac_bdir$ac_obj.lo"
+      shared_objects_sqlite="$shared_objects_sqlite $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -85200,31 +89596,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsnmp.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(PHPSNMP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsnmp.so '$ext_builddir'/phpsnmp.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsqlite.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(PHPSQLITE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsqlite.so '$ext_builddir'/phpsqlite.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSNMP, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSQLITE, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(PHPSNMP_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(PHPSQLITE_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsnmp.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsqlite.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsnmp.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsqlite.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_snmp"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sqlite"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsnmp.$suffix: $ext_builddir/phpsnmp.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsnmp.$suffix \$(phplibdir)
+\$(phplibdir)/phpsqlite.$suffix: $ext_builddir/phpsqlite.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsqlite.$suffix \$(phplibdir)
 
-$ext_builddir/phpsnmp.$suffix: \$(shared_objects_snmp) \$(PHPSNMP_SHARED_DEPENDENCIES)
+$ext_builddir/phpsqlite.$suffix: \$(shared_objects_sqlite) \$(PHPSQLITE_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -85237,31 +89633,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/snmp.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(SNMP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/snmp.so '$ext_builddir'/snmp.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sqlite.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(SQLITE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sqlite.so '$ext_builddir'/sqlite.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SNMP, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SQLITE, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_snmp) $(SNMP_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(SQLITE_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/snmp.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sqlite.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/snmp.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sqlite.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_snmp"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sqlite"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/snmp.$suffix: $ext_builddir/snmp.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/snmp.$suffix \$(phplibdir)
+\$(phplibdir)/sqlite.$suffix: $ext_builddir/sqlite.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/sqlite.$suffix \$(phplibdir)
 
-$ext_builddir/snmp.$suffix: \$(shared_objects_snmp) \$(SNMP_SHARED_DEPENDENCIES)
+$ext_builddir/sqlite.$suffix: \$(shared_objects_sqlite) \$(SQLITE_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -85269,22 +89665,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_SNMP 1
+#define COMPILE_DL_SQLITE 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SNMP_SHARED=no
+    PHP_SQLITE_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/snmp in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  case ext/sqlite in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -85299,7 +89695,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in snmp.c; do
+  for ac_src in $sqlite_sources; do
   
       IFS=.
       set $ac_src
@@ -85322,15 +89718,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC snmp"
+        EXT_STATIC="$EXT_STATIC sqlite"
         ;;
       *)
         
   
-  case ext/snmp in
+  case ext/sqlite in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -85345,7 +89741,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in snmp.c; do
+  for ac_src in $sqlite_sources; do
   
       IFS=.
       set $ac_src
@@ -85370,7 +89766,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC snmp"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC sqlite"
   fi
   
   
@@ -85379,511 +89775,841 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=snmp
+    PHP_PECL_EXTENSION=sqlite
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SNMP_SHARED_LIBADD"
+  am_i_shared=$PHP_SQLITE_SHARED
+  is_it_shared=$PHP_SPL_SHARED
+  is_it_enabled=$PHP_SPL
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension sqlite to build statically, but it
+depends on extension spl, which you've configured to build shared.
+You either need to build sqlite shared or build spl statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension sqlite, which depends on extension spl,
+but you've either not enabled spl, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+  
+  am_i_shared=$PHP_SQLITE_SHARED
+  is_it_shared=$PHP_PDO_SHARED
+  is_it_enabled=$PHP_PDO
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension sqlite to build statically, but it
+depends on extension pdo, which you've configured to build shared.
+You either need to build sqlite shared or build pdo statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension sqlite, which depends on extension pdo,
+but you've either not enabled pdo, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+
+  
+  src=$ext_srcdir/Makefile.frag
+  ac_srcdir=$ext_srcdir
+  ac_builddir=$ext_builddir
+  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
+
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_SHARED_LIBADD"
+
+  
+  
+    for header_file in $ext_builddir/libsqlite/src/sqlite.h; do
+      
+  
+  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INSTALLHEADERS$unique=set"
+    
+        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
+      
+  fi
+
+    done 
+  
+
+  
+  if test "$SQLITE_MODULE_TYPE" = "builtin"; then
+    
+  
+    $php_shtool mkdir -p $ext_builddir/libsqlite/src
+  
 
+    echo $ac_n "checking size of char *""... $ac_c" 1>&6
+echo "configure:89859: checking size of char *" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_char_p=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 89867 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(char *));
+  exit(0);
+}
+EOF
+if { (eval echo configure:89879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_char_p=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_char_p=0
+fi
+rm -fr conftest*
 fi
 
+fi
+echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
+EOF
 
 
-php_enable_soap=no
+    cat >> confdefs.h <<\EOF
+#define SQLITE_PTR_SZ SIZEOF_CHAR_P
+EOF
 
-echo $ac_n "checking whether to enable SOAP support""... $ac_c" 1>&6
-echo "configure:85399: checking whether to enable SOAP support" >&5
-# Check whether --enable-soap or --disable-soap was given.
-if test "${enable_soap+set}" = set; then
-  enableval="$enable_soap"
-  PHP_SOAP=$enableval
+                if test "$PHP_SQLITE_UTF8" = "yes"; then
+      SQLITE_ENCODING="UTF8"
+      cat >> confdefs.h <<\EOF
+#define SQLITE_UTF8 1
+EOF
+
+    else
+      SQLITE_ENCODING="ISO8859"
+    fi
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_ENCODING"
+
+
+    SQLITE_VERSION=`cat $ext_srcdir/libsqlite/VERSION`
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_VERSION"
+
+
+    sed -e s/--VERS--/$SQLITE_VERSION/ -e s/--ENCODING--/$SQLITE_ENCODING/ $ext_srcdir/libsqlite/src/sqlite.h.in > $ext_builddir/libsqlite/src/sqlite.h
+
+    if test "$ext_shared" = "no" || test "$ext_srcdir" != "$abs_srcdir"; then
+      echo '#include <php_config.h>' > $ext_builddir/libsqlite/src/config.h
+    else
+      echo "#include \"$abs_builddir/config.h\"" > $ext_builddir/libsqlite/src/config.h
+    fi
+    
+    cat >> $ext_builddir/libsqlite/src/config.h <<EOF
+#if ZTS
+# define THREADSAFE 1
+#endif
+#if !ZEND_DEBUG
+# define NDEBUG
+#endif
+EOF
+  fi
+  
+  for ac_func in usleep nanosleep
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:89941: 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 89946 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:89969: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+  for ac_hdr in time.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:89997: checking for $ac_hdr" >&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 90002 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:90007: \"$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
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+
+
+echo $ac_n "checking whether flush should be called explicitly after a buffered io""... $ac_c" 1>&6
+echo "configure:90038: checking whether flush should be called explicitly after a buffered io" >&5
+if eval "test \"`echo '$''{'ac_cv_flush_io'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   
-  PHP_SOAP=no
-  test "$PHP_ENABLE_ALL" && PHP_SOAP=$PHP_ENABLE_ALL
+if test "$cross_compiling" = yes; then
+  
+  ac_cv_flush_io=no
+
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90049 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+	char *filename = tmpnam(NULL);
+	char buffer[64];
+	int result = 0;
+	
+	FILE *fp = fopen(filename, "wb");
+	if (NULL == fp)
+		return 0;
+	fputs("line 1\n", fp);
+	fputs("line 2\n", fp);
+	fclose(fp);
+	
+	fp = fopen(filename, "rb+");
+	if (NULL == fp)
+		return 0;
+	fgets(buffer, sizeof(buffer), fp);
+	fputs("line 3\n", fp);
+	rewind(fp);
+	fgets(buffer, sizeof(buffer), fp);
+	if (0 != strcmp(buffer, "line 1\n"))
+		result = 1;
+	fgets(buffer, sizeof(buffer), fp);
+	if (0 != strcmp(buffer, "line 3\n"))
+		result = 1;
+	fclose(fp);
+	unlink(filename);
+
+	exit(result);
+}
+
+EOF
+if { (eval echo configure:90087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+  ac_cv_flush_io=no
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+  ac_cv_flush_io=yes
 
 fi
+rm -fr conftest*
+fi
 
+fi
 
+echo "$ac_t""$ac_cv_flush_io" 1>&6
+if test "$ac_cv_flush_io" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_FLUSHIO 1
+EOF
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SOAP in
-shared,*)
-  PHP_SOAP=`echo "$PHP_SOAP"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SOAP=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
+fi
 
+if test "$ac_cv_func_crypt" = "no"; then
+  echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
+echo "configure:90115: checking for crypt in -lcrypt" >&5
+ac_lib_var=`echo crypt'_'crypt | 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="-lcrypt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 90123 "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 crypt();
 
+int main() {
+crypt()
+; return 0; }
+EOF
+if { (eval echo configure:90134: \"$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"
 
-echo "$ac_t""$ext_output" 1>&6
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    LIBS="-lcrypt $LIBS -lcrypt"
+    cat >> confdefs.h <<\EOF
+#define HAVE_CRYPT 1
+EOF
 
+  
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+  
+echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6
+echo "configure:90163: checking for standard DES crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_crypt_des'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  if test "$cross_compiling" = yes; then
+  
+  ac_cv_crypt_des=yes
+
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90174 "configure"
+#include "confdefs.h"
 
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
 
-if test -z "$PHP_LIBXML_DIR"; then
+main() {
+#if HAVE_CRYPT
+    exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
+#else
+	exit(0);
+#endif
+}
+EOF
+if { (eval echo configure:90193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+  ac_cv_crypt_des=yes
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+  ac_cv_crypt_des=no
+
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_crypt_des" 1>&6
+
+echo $ac_n "checking for extended DES crypt""... $ac_c" 1>&6
+echo "configure:90214: checking for extended DES crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_crypt_ext_des'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  if test "$cross_compiling" = yes; then
+  
+  ac_cv_crypt_ext_des=no
+
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90225 "configure"
+#include "confdefs.h"
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
+
+main() {
+#if HAVE_CRYPT
+  exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
+#else
+  exit(0);
+#endif
+}
+EOF
+if { (eval echo configure:90244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+  ac_cv_crypt_ext_des=yes
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+  ac_cv_crypt_ext_des=no
+
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_crypt_ext_des" 1>&6
+
+echo $ac_n "checking for MD5 crypt""... $ac_c" 1>&6
+echo "configure:90265: checking for MD5 crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_crypt_md5'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+if test "$cross_compiling" = yes; then
+  
+  ac_cv_crypt_md5=no
+
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90276 "configure"
+#include "confdefs.h"
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
+
+main() {
+#if HAVE_CRYPT
+    char salt[15], answer[40];
+
+    salt[0]='$'; salt[1]='1'; salt[2]='$'; 
+    salt[3]='r'; salt[4]='a'; salt[5]='s';
+    salt[6]='m'; salt[7]='u'; salt[8]='s';
+    salt[9]='l'; salt[10]='e'; salt[11]='$';
+    salt[12]='\0';
+    strcpy(answer,salt);
+    strcat(answer,"rISCgZzpwk3UhDidwXvin0");
+    exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+#else
+	exit(0);
+#endif
+}
+EOF
+if { (eval echo configure:90304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
-php_with_libxml_dir=no
+  ac_cv_crypt_md5=yes
 
-echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:85444: checking libxml2 install dir" >&5
-# Check whether --with-libxml-dir or --without-libxml-dir was given.
-if test "${with_libxml_dir+set}" = set; then
-  withval="$with_libxml_dir"
-  PHP_LIBXML_DIR=$withval
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
   
-  PHP_LIBXML_DIR=no
-  
+  ac_cv_crypt_md5=no
 
 fi
-
-
-ext_output=$PHP_LIBXML_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
+rm -fr conftest*
 fi
 
-if test "$PHP_SOAP" != "no"; then
+fi
 
-  if test "$PHP_LIBXML" = "no"; then   
-    { echo "configure: error: SOAP extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }                
-  fi
+echo "$ac_t""$ac_cv_crypt_md5" 1>&6
 
-  
-echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:85472: checking for xml2-config path" >&5
-if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
+echo $ac_n "checking for Blowfish crypt""... $ac_c" 1>&6
+echo "configure:90325: checking for Blowfish crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_crypt_blowfish'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
-  for i in $PHP_LIBXML_DIR /usr/local /usr; do
-    if test -x "$i/bin/xml2-config"; then
-      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
-      break
-    fi
-  done
+if test "$cross_compiling" = yes; then
+  
+  ac_cv_crypt_blowfish=no
 
-fi
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90336 "configure"
+#include "confdefs.h"
 
-echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
-  if test -x "$ac_cv_php_xml2_config_path"; then
-    XML2_CONFIG="$ac_cv_php_xml2_config_path"
-    libxml_full_version=`$XML2_CONFIG --version`
-    ac_IFS=$IFS
-    IFS="."
-    set $libxml_full_version
-    IFS=$ac_IFS
-    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
-    if test "$LIBXML_VERSION" -ge "2006011"; then
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
-      LIBXML_INCS=`$XML2_CONFIG --cflags`
-      
-  for ac_i in $LIBXML_LIBS; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -l$ac_ii" 
-    else
-      
+main() {
+#if HAVE_CRYPT
+    char salt[30], answer[70];
+    
+    salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
+    strcat(salt,"rasmuslerd............");
+    strcpy(answer,salt);
+    strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
+    exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+#else
+	exit(0);
+#endif
+}
+EOF
+if { (eval echo configure:90361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+  ac_cv_crypt_blowfish=yes
 
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+  ac_cv_crypt_blowfish=no
 
-    fi
-   ;;
-  esac
+fi
+rm -fr conftest*
+fi
 
+fi
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+echo "$ac_t""$ac_cv_crypt_blowfish" 1>&6
 
-    
-      if test "$ext_shared" = "yes"; then
-        SOAP_SHARED_LIBADD="-L$ai_p $SOAP_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SOAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SOAP_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+echo $ac_n "checking for SHA512 crypt""... $ac_c" 1>&6
+echo "configure:90382: checking for SHA512 crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_crypt_SHA512'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+if test "$cross_compiling" = yes; then
   
-  fi
-
+  ac_cv_crypt_SHA512=no
 
-      fi
-    
-  fi
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90393 "configure"
+#include "confdefs.h"
 
-    ;;
-    esac
-  done
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
-      
-  for ac_i in $LIBXML_INCS; do
-    case $ac_i in
-    -I*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/include"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
 
+main() {
+#if HAVE_CRYPT
+    char salt[30], answer[80];
     
+    salt[0]='$'; salt[1]='6'; salt[2]='$'; salt[3]='$'; salt[4]='b'; salt[5]='a'; salt[6]='r'; salt[7]='\0';
+    strcpy(answer, salt);
+    strcpy(&answer[29],"$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu.");
+    exit (strcmp((char *)crypt("foo",salt),answer));
+#else
+	exit(0);
+#endif
+}
+EOF
+if { (eval echo configure:90417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  ac_cv_crypt_SHA512=yes
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+  ac_cv_crypt_SHA512=no
 
-  fi
+fi
+rm -fr conftest*
+fi
 
-    ;;
-    esac
-  done
+fi
 
+echo "$ac_t""$ac_cv_crypt_SHA512" 1>&6
 
-            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:85630: checking whether libxml build works" >&5
-if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
+echo $ac_n "checking for SHA256 crypt""... $ac_c" 1>&6
+echo "configure:90438: checking for SHA256 crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_crypt_SHA256'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
-        
-  old_LIBS=$LIBS
-  LIBS="
-          $SOAP_SHARED_LIBADD
-         $LIBS"
-  if test "$cross_compiling" = yes; then
-  
-    LIBS=$old_LIBS
+if test "$cross_compiling" = yes; then
   
+  ac_cv_crypt_SHA256=no
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 85646 "configure"
+#line 90449 "configure"
 #include "confdefs.h"
 
-    
-    char xmlInitParser();
-    int main() {
-      xmlInitParser();
-      return 0;
-    }
-  
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
+
+main() {
+#if HAVE_CRYPT
+    char salt[30], answer[80];
+    salt[0]='$'; salt[1]='5'; salt[2]='$'; salt[3]='$'; salt[4]='s'; salt[5]='a'; salt[6]='l'; salt[7]='t';  salt[8]='s'; salt[9]='t'; salt[10]='r'; salt[11]='i'; salt[12]='n'; salt[13]='g'; salt[14]='\0';    
+    strcat(salt,"");
+    strcpy(answer, salt);
+    strcpy(&answer[29], "$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5");
+    exit (strcmp((char *)crypt("foo",salt),answer));
+#else
+	exit(0);
+#endif
+}
 EOF
-if { (eval echo configure:85657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:90473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
-    LIBS=$old_LIBS
-    
-          php_cv_libxml_build_works=yes
-        
-  
+  ac_cv_crypt_SHA256=yes
+
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   
-    LIBS=$old_LIBS
-    
-          echo "$ac_t""no" 1>&6
-          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
-        
-  
+  ac_cv_crypt_SHA256=no
+
 fi
 rm -fr conftest*
 fi
 
-
-      
 fi
 
-echo "$ac_t""$php_cv_libxml_build_works" 1>&6
-      if test "$php_cv_libxml_build_works" = "yes"; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBXML 1
-EOF
-
-      fi
-      
-    cat >> confdefs.h <<\EOF
-#define HAVE_SOAP 1
-EOF
+echo "$ac_t""$ac_cv_crypt_SHA256" 1>&6
 
-    
-  ext_builddir=ext/soap
-  ext_srcdir=$abs_srcdir/ext/soap
 
-  ac_extra=
+if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "x$php_crypt_r" = "x0"; then
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SOAP_SHARED=no
-    
-  
-  case ext/soap in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
+        echo $ac_n "checking whether the compiler supports __alignof__""... $ac_c" 1>&6
+echo "configure:90497: checking whether the compiler supports __alignof__" >&5
+if eval "test \"`echo '$''{'ac_cv_alignof_exists'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
+  cat > conftest.$ac_ext <<EOF
+#line 90503 "configure"
+#include "confdefs.h"
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+int main() {
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+    int align = __alignof__(int);
+  
+; return 0; }
 EOF
-  done
-
-
-    EXT_STATIC="$EXT_STATIC soap"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC soap"
-    fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SOAP_SHARED=yes
-      
-  case ext/soap in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+if { (eval echo configure:90513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   
+    ac_cv_alignof_exists=yes
   
-
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
-
-
-  old_IFS=$IFS
-  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_soap="$shared_objects_soap $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+    ac_cv_alignof_exists=no
+  
+fi
+rm -f conftest*
+fi
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+echo "$ac_t""$ac_cv_alignof_exists" 1>&6
+  if test "$ac_cv_alignof_exists" = "yes"; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_ALIGNOF 1
 EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsoap.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(PHPSOAP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsoap.so '$ext_builddir'/phpsoap.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSOAP, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(PHPSOAP_SHARED_LIBADD)'
-      ;;
-  esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsoap.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsoap.$suffix"
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_soap"
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsoap.$suffix: $ext_builddir/phpsoap.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsoap.$suffix \$(phplibdir)
+        echo $ac_n "checking whether the compiler supports aligned attribute""... $ac_c" 1>&6
+echo "configure:90538: checking whether the compiler supports aligned attribute" >&5
+if eval "test \"`echo '$''{'ac_cv_attribute_aligned'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  cat > conftest.$ac_ext <<EOF
+#line 90544 "configure"
+#include "confdefs.h"
 
-$ext_builddir/phpsoap.$suffix: \$(shared_objects_soap) \$(PHPSOAP_SHARED_DEPENDENCIES)
-	$link_cmd
+  
+int main() {
 
+    unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
+  
+; return 0; }
+EOF
+if { (eval echo configure:90554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  
+    ac_cv_attribute_aligned=yes
+  
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+    ac_cv_attribute_aligned=no
+  
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_attribute_aligned" 1>&6
+  if test "$ac_cv_attribute_aligned" = "yes"; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_ATTRIBUTE_ALIGNED 1
 EOF
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/soap.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(SOAP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/soap.so '$ext_builddir'/soap.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SOAP, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_soap) $(SOAP_SHARED_LIBADD)'
-      ;;
-  esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/soap.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/soap.$suffix"
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_soap"
+    
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/soap.$suffix: $ext_builddir/soap.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/soap.$suffix \$(phplibdir)
+  cat >> confdefs.h <<EOF
+#define PHP_USE_PHP_CRYPT_R 1
+EOF
 
-$ext_builddir/soap.$suffix: \$(shared_objects_soap) \$(SOAP_SHARED_DEPENDENCIES)
-	$link_cmd
+  cat >> confdefs.h <<EOF
+#define PHP_STD_DES_CRYPT 1
+EOF
 
+  cat >> confdefs.h <<EOF
+#define PHP_BLOWFISH_CRYPT 1
 EOF
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_SOAP 1
+  cat >> confdefs.h <<EOF
+#define PHP_EXT_DES_CRYPT 1
+EOF
+
+  cat >> confdefs.h <<EOF
+#define PHP_MD5_CRYPT 1
+EOF
+
+  cat >> confdefs.h <<EOF
+#define PHP_SHA512_CRYPT 1
+EOF
+
+  cat >> confdefs.h <<EOF
+#define PHP_SHA256_CRYPT 1
 EOF
 
-    fi
-  fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SOAP_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
   
-  case ext/soap in
+  
+  case ext/standard in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -85898,7 +90624,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
+  for ac_src in crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c; do
   
       IFS=.
       set $ac_src
@@ -85908,10 +90634,10 @@ EOF
       PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
       case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+        *.c) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre  $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
       esac
 
     cat >>Makefile.objects<<EOF
@@ -85921,1234 +90647,2041 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC soap"
-        ;;
-      *)
-        
-  
-  case ext/soap in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+else
+  if test "$ac_cv_crypt_des" = "yes"; then
+    ac_result=1
+    ac_crypt_des=1
+  else
+    ac_result=0
+    ac_crypt_des=0
+  fi
+  cat >> confdefs.h <<EOF
+#define PHP_STD_DES_CRYPT $ac_result
+EOF
 
 
-  old_IFS=$IFS
-  for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  if test "$ac_cv_crypt_blowfish" = "yes"; then
+    ac_result=1
+    ac_crypt_blowfish=1
+  else
+    ac_result=0
+    ac_crypt_blowfish=0
+  fi
+  cat >> confdefs.h <<EOF
+#define PHP_BLOWFISH_CRYPT $ac_result
+EOF
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+  if test "$ac_cv_crypt_ext_des" = "yes"; then
+    ac_result=1
+    ac_crypt_edes=1
+  else
+    ac_result=0
+    ac_crypt_edes=0
+  fi
+  cat >> confdefs.h <<EOF
+#define PHP_EXT_DES_CRYPT $ac_result
 EOF
-  done
 
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC soap"
+  if test "$ac_cv_crypt_md5" = "yes"; then
+    ac_result=1
+    ac_crypt_md5=1
+  else
+    ac_result=0
+    ac_crypt_md5=0
   fi
+  cat >> confdefs.h <<EOF
+#define PHP_MD5_CRYPT $ac_result
+EOF
   
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
-
+  if test "$ac_cv_crypt_sha512" = "yes"; then
+    ac_result=1
+    ac_crypt_sha512=1
+  else
+    ac_result=0
+    ac_crypt_sha512=0
+  fi
+  cat >> confdefs.h <<EOF
+#define PHP_SHA512_CRYPT $ac_result
+EOF
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=soap
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
+  if test "$ac_cv_crypt_sha256" = "yes"; then
+    ac_result=1
+    ac_crypt_sha256=1
+  else
+    ac_result=0
+    ac_crypt_sha256=0
   fi
+  cat >> confdefs.h <<EOF
+#define PHP_SHA256_CRYPT $ac_result
+EOF
 
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SOAP_SHARED_LIBADD"
 
-  
-    else
-      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
-    fi
-else 
-    { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; }
-  
-  fi
+  cat >> confdefs.h <<EOF
+#define PHP_USE_PHP_CRYPT_R 0
+EOF
 
 fi
 
+for ac_func in getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:90733: 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 90738 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 $ac_func();
+
+int main() {
 
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
 
-php_enable_sockets=no
+; return 0; }
+EOF
+if { (eval echo configure:90761: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
+echo "configure:90786: checking for working fnmatch" >&5
+if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  # Some versions of Solaris or SCO have a broken fnmatch function.
+# So we run a test program.  If we are cross-compiling, take no chance.
+# Thanks to John Oleynick and Franc,ois Pinard for this test.
+if test "$cross_compiling" = yes; then
+  ac_cv_func_fnmatch_works=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90797 "configure"
+#include "confdefs.h"
+main() { exit (fnmatch ("a*", "abc", 0) != 0); }
+EOF
+if { (eval echo configure:90801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_fnmatch_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_fnmatch_works=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
+if test $ac_cv_func_fnmatch_works = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_FNMATCH 1
+EOF
+
+fi
+	
+
+
+for ac_func in fork CreateProcess
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:90828: 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 90833 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:90856: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+  php_can_support_proc_open=yes
+  break
+
+else
+  echo "$ac_t""no" 1>&6
+php_can_support_proc_open=no
+
+fi
+done
+
+echo $ac_n "checking if your OS can spawn processes with inherited handles""... $ac_c" 1>&6
+echo "configure:90886: checking if your OS can spawn processes with inherited handles" >&5
+if test "$php_can_support_proc_open" = "yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define PHP_CAN_SUPPORT_PROC_OPEN 1
+EOF
 
-echo $ac_n "checking whether to enable sockets support""... $ac_c" 1>&6
-echo "configure:86007: checking whether to enable sockets support" >&5
-# Check whether --enable-sockets or --disable-sockets was given.
-if test "${enable_sockets+set}" = set; then
-  enableval="$enable_sockets"
-  PHP_SOCKETS=$enableval
 else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = "embed"; then
+  cat >> confdefs.h <<\EOF
+#define ENABLE_CHROOT_FUNC 1
+EOF
+
+fi
+
+
+  unset ac_cv_func_res_nsearch
+  unset ac_cv_func___res_nsearch
+  unset found
   
-  PHP_SOCKETS=no
-  test "$PHP_ENABLE_ALL" && PHP_SOCKETS=$PHP_ENABLE_ALL
+  echo $ac_n "checking for res_nsearch""... $ac_c" 1>&6
+echo "configure:90910: checking for res_nsearch" >&5
+if eval "test \"`echo '$''{'ac_cv_func_res_nsearch'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90915 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char res_nsearch(); below.  */
+#include <assert.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 res_nsearch();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_res_nsearch) || defined (__stub___res_nsearch)
+choke me
+#else
+res_nsearch();
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:90938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_res_nsearch=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_res_nsearch=no"
+fi
+rm -f conftest*
 fi
 
+if eval "test \"`echo '$ac_cv_func_'res_nsearch`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __res_nsearch""... $ac_c" 1>&6
+echo "configure:90956: checking for __res_nsearch" >&5
+if eval "test \"`echo '$''{'ac_cv_func___res_nsearch'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 90961 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __res_nsearch(); below.  */
+#include <assert.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 __res_nsearch();
 
+int main() {
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SOCKETS in
-shared,*)
-  PHP_SOCKETS=`echo "$PHP_SOCKETS"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SOCKETS=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___res_nsearch) || defined (__stub_____res_nsearch)
+choke me
+#else
+__res_nsearch();
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:90984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___res_nsearch=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___res_nsearch=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'__res_nsearch`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
+fi
 
-echo "$ac_t""$ext_output" 1>&6
 
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_RES_NSEARCH 1
+EOF
 
+    ac_cv_func_res_nsearch=yes
+  ;;
+  
+    *) 
+  
+  unset ac_cv_lib_resolv_res_nsearch
+  unset ac_cv_lib_resolv___res_nsearch
+  unset found
+  echo $ac_n "checking for res_nsearch in -lresolv""... $ac_c" 1>&6
+echo "configure:91022: checking for res_nsearch in -lresolv" >&5
+ac_lib_var=`echo resolv'_'res_nsearch | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91030 "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 res_nsearch();
 
+int main() {
+res_nsearch()
+; return 0; }
+EOF
+if { (eval echo configure:91041: \"$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"
 
-if test "$PHP_SOCKETS" != "no"; then
-    echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6
-echo "configure:86049: checking for struct cmsghdr" >&5
-if eval "test \"`echo '$''{'ac_cv_cmsghdr'+set}'`\" = set"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+
+    echo $ac_n "checking for __res_nsearch in -lresolv""... $ac_c" 1>&6
+echo "configure:91061: checking for __res_nsearch in -lresolv" >&5
+ac_lib_var=`echo resolv'_'__res_nsearch | 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
-  
-    cat > conftest.$ac_ext <<EOF
-#line 86055 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91069 "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 __res_nsearch();
 
-#include <sys/types.h>
-#include <sys/socket.h>
 int main() {
-struct cmsghdr s; s
+__res_nsearch()
 ; return 0; }
 EOF
-if { (eval echo configure:86064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:91080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_cmsghdr=yes
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_cmsghdr=no
+  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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+
   
 fi
 
-echo "$ac_t""$ac_cv_cmsghdr" 1>&6
 
-  if test "$ac_cv_cmsghdr" = yes; then
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lresolv"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 91112 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:91116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
+
+    LIBS=$ac_libs
+  fi
+
+  if test "$found" = "yes"; then
+    
+  
+  case resolv in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lresolv $LIBS" 
+   ;;
+  esac
+
+
     cat >> confdefs.h <<\EOF
-#define HAVE_CMSGHDR 1
+#define HAVE_RES_NSEARCH 1
 EOF
 
-  fi 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBRESOLV 1
+EOF
 
-  for ac_func in hstrerror socketpair
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:86089: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+    ac_cv_func_res_nsearch=yes
+  else
+    
+  
+  unset ac_cv_lib_bind_res_nsearch
+  unset ac_cv_lib_bind___res_nsearch
+  unset found
+  echo $ac_n "checking for res_nsearch in -lbind""... $ac_c" 1>&6
+echo "configure:91158: checking for res_nsearch in -lbind" >&5
+ac_lib_var=`echo bind'_'res_nsearch | 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
-  cat > conftest.$ac_ext <<EOF
-#line 86094 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91166 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.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 $ac_func();
+char res_nsearch();
 
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+res_nsearch()
 ; return 0; }
 EOF
-if { (eval echo configure:86117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:91177: \"$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"
+  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_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
+  found=yes
 else
   echo "$ac_t""no" 1>&6
-fi
-done
 
-  for ac_hdr in netdb.h netinet/tcp.h sys/un.h errno.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:86145: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+    echo $ac_n "checking for __res_nsearch in -lbind""... $ac_c" 1>&6
+echo "configure:91197: checking for __res_nsearch in -lbind" >&5
+ac_lib_var=`echo bind'_'__res_nsearch | 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
-  cat > conftest.$ac_ext <<EOF
-#line 86150 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91205 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+/* 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 __res_nsearch();
+
+int main() {
+__res_nsearch()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:86155: \"$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
+if { (eval echo configure:91216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_lib_$ac_lib_var=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"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
+
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
+  found=yes
 else
   echo "$ac_t""no" 1>&6
+found=no
+fi
+
+  
 fi
-done
 
+
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lbind"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
   cat > conftest.$ac_ext <<EOF
-#line 86182 "configure"
+#line 91248 "configure"
 #include "confdefs.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-  
-int main() {
-static struct msghdr tp; int n = (int) tp.msg_flags; return n
-; return 0; }
+main() { return (0); }
 EOF
-if { (eval echo configure:86192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  :
+if { (eval echo configure:91252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define MISSING_MSGHDR_MSGFLAGS 1
-EOF
-
-  
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
 fi
-rm -f conftest*
-  cat >> confdefs.h <<\EOF
-#define HAVE_SOCKETS 1
-EOF
-
-
-  
-  ext_builddir=ext/sockets
-  ext_srcdir=$abs_srcdir/ext/sockets
 
-  ac_extra=
+    LIBS=$ac_libs
+  fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SOCKETS_SHARED=no
+  if test "$found" = "yes"; then
     
   
-  case ext/sockets in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  case bind in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lbind $LIBS" 
+   ;;
   esac
-  
-  
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in sockets.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+    cat >> confdefs.h <<\EOF
+#define HAVE_RES_NSEARCH 1
 EOF
-  done
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBBIND 1
+EOF
 
-    EXT_STATIC="$EXT_STATIC sockets"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC sockets"
-    fi
+    ac_cv_func_res_nsearch=yes
   else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SOCKETS_SHARED=yes
-      
-  case ext/sockets in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
-
-
-  old_IFS=$IFS
-  for ac_src in sockets.c; do
+    
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_sockets="$shared_objects_sockets $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+  unset ac_cv_lib_socket_res_nsearch
+  unset ac_cv_lib_socket___res_nsearch
+  unset found
+  echo $ac_n "checking for res_nsearch in -lsocket""... $ac_c" 1>&6
+echo "configure:91294: checking for res_nsearch in -lsocket" >&5
+ac_lib_var=`echo socket'_'res_nsearch | 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91302 "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 res_nsearch();
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+int main() {
+res_nsearch()
+; return 0; }
 EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsockets.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(PHPSOCKETS_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsockets.so '$ext_builddir'/phpsockets.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSOCKETS, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(PHPSOCKETS_SHARED_LIBADD)'
-      ;;
-  esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsockets.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsockets.$suffix"
-  fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sockets"
+if { (eval echo configure:91313: \"$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"
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsockets.$suffix: $ext_builddir/phpsockets.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsockets.$suffix \$(phplibdir)
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-$ext_builddir/phpsockets.$suffix: \$(shared_objects_sockets) \$(PHPSOCKETS_SHARED_DEPENDENCIES)
-	$link_cmd
+    echo $ac_n "checking for __res_nsearch in -lsocket""... $ac_c" 1>&6
+echo "configure:91333: checking for __res_nsearch in -lsocket" >&5
+ac_lib_var=`echo socket'_'__res_nsearch | 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91341 "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 __res_nsearch();
 
+int main() {
+__res_nsearch()
+; return 0; }
 EOF
+if { (eval echo configure:91352: \"$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"
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sockets.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(SOCKETS_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sockets.so '$ext_builddir'/sockets.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SOCKETS, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sockets) $(SOCKETS_SHARED_LIBADD)'
-      ;;
-  esac
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sockets.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sockets.$suffix"
-  fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sockets"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/sockets.$suffix: $ext_builddir/sockets.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/sockets.$suffix \$(phplibdir)
-
-$ext_builddir/sockets.$suffix: \$(shared_objects_sockets) \$(SOCKETS_SHARED_DEPENDENCIES)
-	$link_cmd
+fi
 
-EOF
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_SOCKETS 1
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lsocket"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 91384 "configure"
+#include "confdefs.h"
+main() { return (0); }
 EOF
+if { (eval echo configure:91388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
-    fi
+    LIBS=$ac_libs
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SOCKETS_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
+  if test "$found" = "yes"; then
+    
   
-  case ext/sockets in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  case socket in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsocket $LIBS" 
+   ;;
   esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
 
-  old_IFS=$IFS
-  for ac_src in sockets.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+    cat >> confdefs.h <<\EOF
+#define HAVE_RES_NSEARCH 1
+EOF
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBSOCKET 1
 EOF
-  done
 
+    ac_cv_func_res_nsearch=yes
+  else
+    
+  :
 
-        EXT_STATIC="$EXT_STATIC sockets"
-        ;;
-      *)
-        
-  
-  case ext/sockets in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+  fi
   
+
+  fi
   
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+  fi
+  
+ ;;
+  
+  esac
 
 
-  old_IFS=$IFS
-  for ac_src in sockets.c; do
+  unset ac_cv_func_dns_search
+  unset ac_cv_func___dns_search
+  unset found
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  echo $ac_n "checking for dns_search""... $ac_c" 1>&6
+echo "configure:91445: checking for dns_search" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dns_search'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 91450 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dns_search(); below.  */
+#include <assert.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 dns_search();
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+int main() {
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dns_search) || defined (__stub___dns_search)
+choke me
+#else
+dns_search();
+#endif
+
+; return 0; }
 EOF
-  done
+if { (eval echo configure:91473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_dns_search=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dns_search=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'dns_search`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __dns_search""... $ac_c" 1>&6
+echo "configure:91491: checking for __dns_search" >&5
+if eval "test \"`echo '$''{'ac_cv_func___dns_search'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 91496 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __dns_search(); below.  */
+#include <assert.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 __dns_search();
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC sockets"
-  fi
-  
-  
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
+int main() {
 
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___dns_search) || defined (__stub_____dns_search)
+choke me
+#else
+__dns_search();
+#endif
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=sockets
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+; return 0; }
+EOF
+if { (eval echo configure:91519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___dns_search=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___dns_search=no"
+fi
+rm -f conftest*
+fi
 
-  fi
+if eval "test \"`echo '$ac_cv_func_'__dns_search`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
+fi
 
+
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DNS_SEARCH 1
+EOF
+
+    ac_cv_func_dns_search=yes
+  ;;
   
+    *) 
   
-    header_path=ext/sockets/
-    for header_file in php_sockets.h; do
-      hp_hf="$header_path/$header_file"
-      
-  
-  unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INSTALLHEADERS$unique=set"
-    
-        INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
-      
-  fi
+  unset ac_cv_lib_resolv_dns_search
+  unset ac_cv_lib_resolv___dns_search
+  unset found
+  echo $ac_n "checking for dns_search in -lresolv""... $ac_c" 1>&6
+echo "configure:91557: checking for dns_search in -lresolv" >&5
+ac_lib_var=`echo resolv'_'dns_search | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91565 "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 dns_search();
 
-    done 
-  
+int main() {
+dns_search()
+; return 0; }
+EOF
+if { (eval echo configure:91576: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
+    echo $ac_n "checking for __dns_search in -lresolv""... $ac_c" 1>&6
+echo "configure:91596: checking for __dns_search in -lresolv" >&5
+ac_lib_var=`echo resolv'_'__dns_search | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91604 "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 __dns_search();
+
+int main() {
+__dns_search()
+; return 0; }
+EOF
+if { (eval echo configure:91615: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-  echo $ac_n "checking whether zend_object_value is packed""... $ac_c" 1>&6
-echo "configure:86526: checking whether zend_object_value is packed" >&5
-  old_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
-  if test "$cross_compiling" = yes; then
-  
-    ac_result=0
-    echo "$ac_t""no" 1>&6
   
+fi
+
+
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lresolv"
+    if test "$cross_compiling" = yes; then
+  found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 86536 "configure"
+#line 91647 "configure"
 #include "confdefs.h"
-
-#include "Zend/zend_types.h"
-int main(int argc, char **argv) {
-	return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
-}
-  
+main() { return (0); }
 EOF
-if { (eval echo configure:86545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  
-    ac_result=1
-    echo "$ac_t""yes" 1>&6
-  
+  found=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  
-    ac_result=0
-    echo "$ac_t""no" 1>&6
-  
+  found=no
 fi
 rm -fr conftest*
 fi
 
-  CPPFLAGS=$old_CPPFLAGS
-  cat >> confdefs.h <<EOF
-#define HAVE_PACKED_OBJECT_VALUE $ac_result
-EOF
-
-  cat >> confdefs.h <<\EOF
-#define HAVE_SPL 1
-EOF
- 
-  
-  ext_builddir=ext/spl
-  ext_srcdir=$abs_srcdir/ext/spl
-
-  ac_extra=
+    LIBS=$ac_libs
+  fi
 
-  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
-    PHP_SPL_SHARED=no
+  if test "$found" = "yes"; then
     
   
-  case ext/spl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  case resolv in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lresolv $LIBS" 
+   ;;
   esac
-  
-  
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DNS_SEARCH 1
+EOF
 
-  old_IFS=$IFS
-  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBRESOLV 1
+EOF
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+    ac_cv_func_dns_search=yes
+  else
+    
+  
+  unset ac_cv_lib_bind_dns_search
+  unset ac_cv_lib_bind___dns_search
+  unset found
+  echo $ac_n "checking for dns_search in -lbind""... $ac_c" 1>&6
+echo "configure:91693: checking for dns_search in -lbind" >&5
+ac_lib_var=`echo bind'_'dns_search | 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="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91701 "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 dns_search();
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+int main() {
+dns_search()
+; return 0; }
 EOF
-  done
+if { (eval echo configure:91712: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-    EXT_STATIC="$EXT_STATIC spl"
-    if test "no" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC spl"
-    fi
-  else
-    if test "no" = "shared" || test "no" = "yes"; then
-      PHP_SPL_SHARED=yes
-      
-  case ext/spl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
+    echo $ac_n "checking for __dns_search in -lbind""... $ac_c" 1>&6
+echo "configure:91732: checking for __dns_search in -lbind" >&5
+ac_lib_var=`echo bind'_'__dns_search | 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="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91740 "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 __dns_search();
 
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
+int main() {
+__dns_search()
+; return 0; }
+EOF
+if { (eval echo configure:91751: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-  old_IFS=$IFS
-  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_spl="$shared_objects_spl $ac_bdir$ac_obj.lo"
+fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lbind"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 91783 "configure"
+#include "confdefs.h"
+main() { return (0); }
 EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpspl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(PHPSPL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpspl.so '$ext_builddir'/phpspl.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSPL, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(PHPSPL_SHARED_LIBADD)'
-      ;;
-  esac
+if { (eval echo configure:91787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpspl.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpspl.$suffix"
+    LIBS=$ac_libs
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_spl"
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpspl.$suffix: $ext_builddir/phpspl.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpspl.$suffix \$(phplibdir)
+  if test "$found" = "yes"; then
+    
+  
+  case bind in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lbind $LIBS" 
+   ;;
+  esac
 
-$ext_builddir/phpspl.$suffix: \$(shared_objects_spl) \$(PHPSPL_SHARED_DEPENDENCIES)
-	$link_cmd
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DNS_SEARCH 1
 EOF
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/spl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(SPL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/spl.so '$ext_builddir'/spl.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SPL, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_spl) $(SPL_SHARED_LIBADD)'
-      ;;
-  esac
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBBIND 1
+EOF
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/spl.$suffix"
+    ac_cv_func_dns_search=yes
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/spl.$suffix"
-  fi
+    
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_spl"
+  unset ac_cv_lib_socket_dns_search
+  unset ac_cv_lib_socket___dns_search
+  unset found
+  echo $ac_n "checking for dns_search in -lsocket""... $ac_c" 1>&6
+echo "configure:91829: checking for dns_search in -lsocket" >&5
+ac_lib_var=`echo socket'_'dns_search | 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91837 "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 dns_search();
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/spl.$suffix: $ext_builddir/spl.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/spl.$suffix \$(phplibdir)
+int main() {
+dns_search()
+; return 0; }
+EOF
+if { (eval echo configure:91848: \"$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"
 
-$ext_builddir/spl.$suffix: \$(shared_objects_spl) \$(SPL_SHARED_DEPENDENCIES)
-	$link_cmd
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-EOF
+    echo $ac_n "checking for __dns_search in -lsocket""... $ac_c" 1>&6
+echo "configure:91868: checking for __dns_search in -lsocket" >&5
+ac_lib_var=`echo socket'_'__dns_search | 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 91876 "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 __dns_search();
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_SPL 1
+int main() {
+__dns_search()
+; return 0; }
 EOF
+if { (eval echo configure:91887: \"$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
-  fi
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
-    PHP_SPL_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
-  
-  case ext/spl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
   
+fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lsocket"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 91919 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:91923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
-  old_IFS=$IFS
-  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
+    LIBS=$ac_libs
+  fi
+
+  if test "$found" = "yes"; then
+    
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+  case socket in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsocket $LIBS" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+    cat >> confdefs.h <<\EOF
+#define HAVE_DNS_SEARCH 1
 EOF
-  done
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBSOCKET 1
+EOF
 
-        EXT_STATIC="$EXT_STATIC spl"
-        ;;
-      *)
-        
-  
-  case ext/spl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+    ac_cv_func_dns_search=yes
+  else
+    
+  :
+
+  fi
   
+
+  fi
   
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+  fi
+  
+ ;;
+  
+  esac
 
 
-  old_IFS=$IFS
-  for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c; do
+  unset ac_cv_func_dn_expand
+  unset ac_cv_func___dn_expand
+  unset found
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  echo $ac_n "checking for dn_expand""... $ac_c" 1>&6
+echo "configure:91980: checking for dn_expand" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dn_expand'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 91985 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dn_expand(); below.  */
+#include <assert.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 dn_expand();
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+int main() {
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dn_expand) || defined (__stub___dn_expand)
+choke me
+#else
+dn_expand();
+#endif
+
+; return 0; }
 EOF
-  done
+if { (eval echo configure:92008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_dn_expand=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dn_expand=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'dn_expand`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __dn_expand""... $ac_c" 1>&6
+echo "configure:92026: checking for __dn_expand" >&5
+if eval "test \"`echo '$''{'ac_cv_func___dn_expand'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92031 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __dn_expand(); below.  */
+#include <assert.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 __dn_expand();
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC spl"
-  fi
-  
-  
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
+int main() {
 
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___dn_expand) || defined (__stub_____dn_expand)
+choke me
+#else
+__dn_expand();
+#endif
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=spl
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+; return 0; }
+EOF
+if { (eval echo configure:92054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___dn_expand=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___dn_expand=no"
+fi
+rm -f conftest*
+fi
 
-  fi
+if eval "test \"`echo '$ac_cv_func_'__dn_expand`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
+fi
 
-  
-  
-    header_path=ext/spl
-    for header_file in php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h; do
-      hp_hf="$header_path/$header_file"
-      
-  
-  unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INSTALLHEADERS$unique=set"
-    
-        INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
-      
-  fi
 
-    done 
-  
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_EXPAND 1
+EOF
 
+    ac_cv_func_dn_expand=yes
+  ;;
   
-  am_i_shared=$PHP_SPL_SHARED
-  is_it_shared=$PHP_PCRE_SHARED
-  is_it_enabled=$PHP_PCRE
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension spl to build statically, but it
-depends on extension pcre, which you've configured to build shared.
-You either need to build spl shared or build pcre statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension spl, which depends on extension pcre,
-but you've either not enabled pcre, or have disabled it.
-" 1>&2; exit 1; }
-  fi
+    *) 
   
+  unset ac_cv_lib_resolv_dn_expand
+  unset ac_cv_lib_resolv___dn_expand
+  unset found
+  echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
+echo "configure:92092: checking for dn_expand in -lresolv" >&5
+ac_lib_var=`echo resolv'_'dn_expand | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92100 "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 dn_expand();
 
+int main() {
+dn_expand()
+; return 0; }
+EOF
+if { (eval echo configure:92111: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-php_with_sqlite=yes
+    echo $ac_n "checking for __dn_expand in -lresolv""... $ac_c" 1>&6
+echo "configure:92131: checking for __dn_expand in -lresolv" >&5
+ac_lib_var=`echo resolv'_'__dn_expand | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92139 "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 __dn_expand();
 
-echo $ac_n "checking for sqlite support""... $ac_c" 1>&6
-echo "configure:86909: checking for sqlite support" >&5
-# Check whether --with-sqlite or --without-sqlite was given.
-if test "${with_sqlite+set}" = set; then
-  withval="$with_sqlite"
-  PHP_SQLITE=$withval
+int main() {
+__dn_expand()
+; return 0; }
+EOF
+if { (eval echo configure:92150: \"$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
-  
-  PHP_SQLITE=yes
-  test "$PHP_ENABLE_ALL" && PHP_SQLITE=$PHP_ENABLE_ALL
+  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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
+  
+fi
 
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SQLITE in
-shared,*)
-  PHP_SQLITE=`echo "$PHP_SQLITE"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SQLITE=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lresolv"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92182 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:92186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
+    LIBS=$ac_libs
+  fi
 
+  if test "$found" = "yes"; then
+    
+  
+  case resolv in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lresolv $LIBS" 
+   ;;
+  esac
 
-echo "$ac_t""$ext_output" 1>&6
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_EXPAND 1
+EOF
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBRESOLV 1
+EOF
 
+    ac_cv_func_dn_expand=yes
+  else
+    
+  
+  unset ac_cv_lib_bind_dn_expand
+  unset ac_cv_lib_bind___dn_expand
+  unset found
+  echo $ac_n "checking for dn_expand in -lbind""... $ac_c" 1>&6
+echo "configure:92228: checking for dn_expand in -lbind" >&5
+ac_lib_var=`echo bind'_'dn_expand | 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="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92236 "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 dn_expand();
 
+int main() {
+dn_expand()
+; return 0; }
+EOF
+if { (eval echo configure:92247: \"$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"
 
-php_enable_sqlite_utf8=no
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-echo $ac_n "checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)""... $ac_c" 1>&6
-echo "configure:86953: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5
-# Check whether --enable-sqlite-utf8 or --disable-sqlite-utf8 was given.
-if test "${enable_sqlite_utf8+set}" = set; then
-  enableval="$enable_sqlite_utf8"
-  PHP_SQLITE_UTF8=$enableval
+    echo $ac_n "checking for __dn_expand in -lbind""... $ac_c" 1>&6
+echo "configure:92267: checking for __dn_expand in -lbind" >&5
+ac_lib_var=`echo bind'_'__dn_expand | 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
-  
-  PHP_SQLITE_UTF8=no
-  
+  ac_save_LIBS="$LIBS"
+LIBS="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92275 "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 __dn_expand();
 
+int main() {
+__dn_expand()
+; return 0; }
+EOF
+if { (eval echo configure:92286: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-ext_output=$PHP_SQLITE_UTF8
-echo "$ac_t""$ext_output" 1>&6
-
+  
+fi
 
 
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lbind"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92318 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:92322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
+    LIBS=$ac_libs
+  fi
 
+  if test "$found" = "yes"; then
+    
+  
+  case bind in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lbind $LIBS" 
+   ;;
+  esac
 
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_EXPAND 1
+EOF
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBBIND 1
+EOF
 
-if test "$PHP_SQLITE" != "no"; then
-  if test "$PHP_PDO" != "no"; then
+    ac_cv_func_dn_expand=yes
+  else
     
-  echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:86981: checking for PDO includes" >&5
-if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
+  
+  unset ac_cv_lib_socket_dn_expand
+  unset ac_cv_lib_socket___dn_expand
+  unset found
+  echo $ac_n "checking for dn_expand in -lsocket""... $ac_c" 1>&6
+echo "configure:92364: checking for dn_expand in -lsocket" >&5
+ac_lib_var=`echo socket'_'dn_expand | 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
-  
-    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:86987: checking for PDO includes" >&5
-    if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
-      pdo_inc_path=$abs_srcdir/ext
-    elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
-      pdo_inc_path=$abs_srcdir/ext
-    elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
-      pdo_inc_path=$prefix/include/php/ext
-    fi
-  
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92372 "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 dn_expand();
+
+int main() {
+dn_expand()
+; return 0; }
+EOF
+if { (eval echo configure:92383: \"$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"
 
-echo "$ac_t""$pdo_inc_path" 1>&6
-  if test -n "$pdo_inc_path"; then
-:
-  else
-echo "configure: warning: Cannot find php_pdo_driver.h." 1>&2
-  fi
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-    if test -n "$pdo_inc_path"; then
-      cat >> confdefs.h <<\EOF
-#define PHP_SQLITE2_HAVE_PDO 1
+    echo $ac_n "checking for __dn_expand in -lsocket""... $ac_c" 1>&6
+echo "configure:92403: checking for __dn_expand in -lsocket" >&5
+ac_lib_var=`echo socket'_'__dn_expand | 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92411 "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 __dn_expand();
+
+int main() {
+__dn_expand()
+; return 0; }
 EOF
+if { (eval echo configure:92422: \"$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"
 
-      pdo_inc_path="-I$pdo_inc_path"
-    fi
-  fi  
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-  if test "$PHP_SQLITE" != "yes"; then
-    SEARCH_PATH="/usr/local /usr"
-    SEARCH_FOR="/include/sqlite.h"
-    if test -r $PHP_SQLITE/; then # path given as parameter
-      SQLITE_DIR=$PHP_SQLITE
-    else # search default path list
-      echo $ac_n "checking for sqlite files in default path""... $ac_c" 1>&6
-echo "configure:87021: checking for sqlite files in default path" >&5
-      for i in $SEARCH_PATH ; do
-        if test -r $i/$SEARCH_FOR; then
-          SQLITE_DIR=$i
-          echo "$ac_t""found in $i" 1>&6
-        fi
-      done
-    fi
   
-    if test -z "$SQLITE_DIR"; then
-      echo "$ac_t""not found" 1>&6
-      { echo "configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org" 1>&2; exit 1; }
-    fi
+fi
 
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-      -L$SQLITE_DIR/$PHP_LIBDIR -lm
-    "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lsocket"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92454 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:92458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
+
+    LIBS=$ac_libs
   fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
+  if test "$found" = "yes"; then
+    
   
-  case $ac_ii in
+  case socket in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="$LIBS -l$ac_ii" 
+      LIBS="-lsocket $LIBS" 
    ;;
   esac
 
 
-    fi
-   ;;
-  esac
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_EXPAND 1
+EOF
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBSOCKET 1
+EOF
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+    ac_cv_func_dn_expand=yes
   else
     
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  :
+
   fi
+  
 
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
+  fi
   
+
+  fi
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+ ;;
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  esac
+
+
+  unset ac_cv_func_dn_skipname
+  unset ac_cv_func___dn_skipname
+  unset found
   
-  fi
+  echo $ac_n "checking for dn_skipname""... $ac_c" 1>&6
+echo "configure:92515: checking for dn_skipname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dn_skipname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92520 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dn_skipname(); below.  */
+#include <assert.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 dn_skipname();
 
+int main() {
 
-      fi
-    
-  fi
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dn_skipname) || defined (__stub___dn_skipname)
+choke me
+#else
+dn_skipname();
+#endif
 
-    ;;
-    esac
-  done
+; return 0; }
+EOF
+if { (eval echo configure:92543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_dn_skipname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dn_skipname=no"
+fi
+rm -f conftest*
+fi
 
-  echo $ac_n "checking for sqlite_open in -lsqlite""... $ac_c" 1>&6
-echo "configure:87133: checking for sqlite_open in -lsqlite" >&5
-ac_lib_var=`echo sqlite'_'sqlite_open | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$ac_cv_func_'dn_skipname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __dn_skipname""... $ac_c" 1>&6
+echo "configure:92561: checking for __dn_skipname" >&5
+if eval "test \"`echo '$''{'ac_cv_func___dn_skipname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92566 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __dn_skipname(); below.  */
+#include <assert.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 __dn_skipname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___dn_skipname) || defined (__stub_____dn_skipname)
+choke me
+#else
+__dn_skipname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:92589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___dn_skipname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___dn_skipname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'__dn_skipname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
+fi
+
+
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_SKIPNAME 1
+EOF
+
+    ac_cv_func_dn_skipname=yes
+  ;;
+  
+    *) 
+  
+  unset ac_cv_lib_resolv_dn_skipname
+  unset ac_cv_lib_resolv___dn_skipname
+  unset found
+  echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6
+echo "configure:92627: checking for dn_skipname in -lresolv" >&5
+ac_lib_var=`echo resolv'_'dn_skipname | 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="-lsqlite  $LIBS"
+LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 87141 "configure"
+#line 92635 "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 sqlite_open();
+char dn_skipname();
+
+int main() {
+dn_skipname()
+; return 0; }
+EOF
+if { (eval echo configure:92646: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+
+    echo $ac_n "checking for __dn_skipname in -lresolv""... $ac_c" 1>&6
+echo "configure:92666: checking for __dn_skipname in -lresolv" >&5
+ac_lib_var=`echo resolv'_'__dn_skipname | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92674 "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 __dn_skipname();
 
 int main() {
-sqlite_open()
+__dn_skipname()
 ; return 0; }
 EOF
-if { (eval echo configure:87152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92685: \"$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
@@ -87163,881 +92696,762 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-      
-
-  if test "$ext_shared" = "yes"; then
-    SQLITE_SHARED_LIBADD="-lsqlite $SQLITE_SHARED_LIBADD"
-    if test -n "$SQLITE_DIR/$PHP_LIBDIR"; then
-      
-  if test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$SQLITE_DIR/$PHP_LIBDIR" || echo "$SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$SQLITE_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SQLITE_DIR/$PHP_LIBDIR\"`"
-  fi
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-    
-      if test "$ext_shared" = "yes"; then
-        SQLITE_SHARED_LIBADD="-L$ai_p $SQLITE_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SQLITE_SHARED_LIBADD="$ld_runpath_switch$ai_p $SQLITE_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
-
-
-      fi
-    
-  fi
+fi
 
-    fi
-  else
-    
 
-  if test -n "$SQLITE_DIR/$PHP_LIBDIR"; then
-    
-  if test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$SQLITE_DIR/$PHP_LIBDIR" || echo "$SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$SQLITE_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SQLITE_DIR/$PHP_LIBDIR\"`"
-  fi
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lresolv"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92717 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:92721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
+    LIBS=$ac_libs
   fi
 
-
+  if test "$found" = "yes"; then
     
-  fi
-
-  fi
   
-  
-  case sqlite in
+  case resolv in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lsqlite $LIBS" 
+      LIBS="-lresolv $LIBS" 
    ;;
   esac
 
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_SKIPNAME 1
+EOF
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBRESOLV 1
+EOF
 
-  fi
-
-
-      
-  if test "$SQLITE_DIR/include" != "/usr/include"; then
-    
-  if test -z "$SQLITE_DIR/include" || echo "$SQLITE_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$SQLITE_DIR/include
+    ac_cv_func_dn_skipname=yes
   else
     
-    ep_dir="`echo $SQLITE_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SQLITE_DIR/include\"`"
-  fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
-
-  fi
-
-    
   
+  unset ac_cv_lib_bind_dn_skipname
+  unset ac_cv_lib_bind___dn_skipname
+  unset found
+  echo $ac_n "checking for dn_skipname in -lbind""... $ac_c" 1>&6
+echo "configure:92763: checking for dn_skipname in -lbind" >&5
+ac_lib_var=`echo bind'_'dn_skipname | 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
-  echo "$ac_t""no" 1>&6
+  ac_save_LIBS="$LIBS"
+LIBS="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92771 "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 dn_skipname();
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_sqlite_sqlite_open
-    
-      { echo "configure: error: wrong sqlite lib version or lib not found" 1>&2; exit 1; }
-    
-  
+int main() {
+dn_skipname()
+; return 0; }
+EOF
+if { (eval echo configure:92782: \"$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"
 
-    SQLITE_MODULE_TYPE=external
-    PHP_SQLITE_CFLAGS=$pdo_inc_path
-    sqlite_extra_sources="libsqlite/src/encode.c"
-  else
-    # use bundled library
-    
-  # we only support certain lemon versions
-  lemon_version_list="1.0"
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-  # Extract the first word of "lemon", so it can be a program name with args.
-set dummy lemon; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:87325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEMON'+set}'`\" = set"; then
+    echo $ac_n "checking for __dn_skipname in -lbind""... $ac_c" 1>&6
+echo "configure:92802: checking for __dn_skipname in -lbind" >&5
+ac_lib_var=`echo bind'_'__dn_skipname | 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 -n "$LEMON"; then
-  ac_cv_prog_LEMON="$LEMON" # Let the user override the test.
+  ac_save_LIBS="$LIBS"
+LIBS="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92810 "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 __dn_skipname();
+
+int main() {
+__dn_skipname()
+; return 0; }
+EOF
+if { (eval echo configure:92821: \"$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
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_LEMON="lemon"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  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
-LEMON="$ac_cv_prog_LEMON"
-if test -n "$LEMON"; then
-  echo "$ac_t""$LEMON" 1>&6
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
 else
   echo "$ac_t""no" 1>&6
+found=no
 fi
 
-  if test "$LEMON"; then
-    echo $ac_n "checking for lemon version""... $ac_c" 1>&6
-echo "configure:87353: checking for lemon version" >&5
-if eval "test \"`echo '$''{'php_cv_lemon_version'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
   
-      lemon_version=`$LEMON -x 2>/dev/null | $SED -e 's/^.* //'`
-      php_cv_lemon_version=invalid
-      for lemon_check_version in $lemon_version_list; do
-        if test "$lemon_version" = "$lemon_check_version"; then
-          php_cv_lemon_version="$lemon_check_version (ok)"
-        fi
-      done
-    
 fi
 
-echo "$ac_t""$php_cv_lemon_version" 1>&6
-  else
-    lemon_version=none
-  fi
-  case $php_cv_lemon_version in
-    ""|invalid)
-      lemon_msg="lemon versions supported for regeneration of libsqlite parsers: $lemon_version_list (found: $lemon_version)."
-      echo "configure: warning: $lemon_msg" 1>&2
-      LEMON="exit 0;"
-      ;;
-  esac
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST LEMON"
 
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lbind"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92853 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:92857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
-    SQLITE_MODULE_TYPE=builtin
-    PHP_SQLITE_CFLAGS="-I@ext_srcdir@/libsqlite/src -I@ext_builddir@/libsqlite/src $pdo_inc_path"
-    sqlite_extra_sources="libsqlite/src/opcodes.c \
-        libsqlite/src/parse.c libsqlite/src/encode.c \
-        libsqlite/src/auth.c libsqlite/src/btree.c libsqlite/src/build.c \
-        libsqlite/src/delete.c libsqlite/src/expr.c libsqlite/src/func.c \
-        libsqlite/src/hash.c libsqlite/src/insert.c libsqlite/src/main.c \
-        libsqlite/src/os.c libsqlite/src/pager.c \
-        libsqlite/src/printf.c libsqlite/src/random.c \
-        libsqlite/src/select.c libsqlite/src/table.c libsqlite/src/tokenize.c \
-        libsqlite/src/update.c libsqlite/src/util.c libsqlite/src/vdbe.c \
-        libsqlite/src/attach.c libsqlite/src/btree_rb.c libsqlite/src/pragma.c \
-        libsqlite/src/vacuum.c libsqlite/src/copy.c \
-        libsqlite/src/vdbeaux.c libsqlite/src/date.c \
-        libsqlite/src/where.c libsqlite/src/trigger.c"
+    LIBS=$ac_libs
   fi
-        sqlite_sources="sqlite.c sess_sqlite.c pdo_sqlite2.c $sqlite_extra_sources" 
-  
-  ext_builddir=ext/sqlite
-  ext_srcdir=$abs_srcdir/ext/sqlite
-
-  ac_extra=`echo "$PHP_SQLITE_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SQLITE_SHARED=no
+  if test "$found" = "yes"; then
     
   
-  case ext/sqlite in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  case bind in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lbind $LIBS" 
+   ;;
   esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in $sqlite_sources; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_SKIPNAME 1
 EOF
-  done
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBBIND 1
+EOF
 
-    EXT_STATIC="$EXT_STATIC sqlite"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC sqlite"
-    fi
+    ac_cv_func_dn_skipname=yes
   else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SQLITE_SHARED=yes
-      
-  case ext/sqlite in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
-
-
-  old_IFS=$IFS
-  for ac_src in $sqlite_sources; do
+    
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_sqlite="$shared_objects_sqlite $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+  unset ac_cv_lib_socket_dn_skipname
+  unset ac_cv_lib_socket___dn_skipname
+  unset found
+  echo $ac_n "checking for dn_skipname in -lsocket""... $ac_c" 1>&6
+echo "configure:92899: checking for dn_skipname in -lsocket" >&5
+ac_lib_var=`echo socket'_'dn_skipname | 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92907 "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 dn_skipname();
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+int main() {
+dn_skipname()
+; return 0; }
 EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
+if { (eval echo configure:92918: \"$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"
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsqlite.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(PHPSQLITE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsqlite.so '$ext_builddir'/phpsqlite.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSQLITE, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(PHPSQLITE_SHARED_LIBADD)'
-      ;;
-  esac
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsqlite.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsqlite.$suffix"
-  fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sqlite"
+    echo $ac_n "checking for __dn_skipname in -lsocket""... $ac_c" 1>&6
+echo "configure:92938: checking for __dn_skipname in -lsocket" >&5
+ac_lib_var=`echo socket'_'__dn_skipname | 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 92946 "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 __dn_skipname();
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsqlite.$suffix: $ext_builddir/phpsqlite.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsqlite.$suffix \$(phplibdir)
+int main() {
+__dn_skipname()
+; return 0; }
+EOF
+if { (eval echo configure:92957: \"$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"
 
-$ext_builddir/phpsqlite.$suffix: \$(shared_objects_sqlite) \$(PHPSQLITE_SHARED_DEPENDENCIES)
-	$link_cmd
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-EOF
+  
+fi
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sqlite.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(SQLITE_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sqlite.so '$ext_builddir'/sqlite.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SQLITE, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sqlite) $(SQLITE_SHARED_LIBADD)'
-      ;;
-  esac
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lsocket"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 92989 "configure"
+#include "confdefs.h"
+main() { return (0); }
+EOF
+if { (eval echo configure:92993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sqlite.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sqlite.$suffix"
+    LIBS=$ac_libs
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sqlite"
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/sqlite.$suffix: $ext_builddir/sqlite.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/sqlite.$suffix \$(phplibdir)
+  if test "$found" = "yes"; then
+    
+  
+  case socket in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsocket $LIBS" 
+   ;;
+  esac
 
-$ext_builddir/sqlite.$suffix: \$(shared_objects_sqlite) \$(SQLITE_SHARED_DEPENDENCIES)
-	$link_cmd
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_DN_SKIPNAME 1
 EOF
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_SQLITE 1
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBSOCKET 1
 EOF
 
-    fi
+    ac_cv_func_dn_skipname=yes
+  else
+    
+  :
+
   fi
+  
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SQLITE_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
+  fi
   
-  case ext/sqlite in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+
+  fi
   
+ ;;
   
+  esac
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
 
-  old_IFS=$IFS
-  for ac_src in $sqlite_sources; do
+
+  unset ac_cv_func_res_search
+  unset ac_cv_func___res_search
+  unset found
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+  echo $ac_n "checking for res_search""... $ac_c" 1>&6
+echo "configure:93052: checking for res_search" >&5
+if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 93057 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char res_search(); below.  */
+#include <assert.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 res_search();
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+int main() {
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_res_search) || defined (__stub___res_search)
+choke me
+#else
+res_search();
+#endif
+
+; return 0; }
 EOF
-  done
+if { (eval echo configure:93080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_res_search=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_res_search=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __res_search""... $ac_c" 1>&6
+echo "configure:93098: checking for __res_search" >&5
+if eval "test \"`echo '$''{'ac_cv_func___res_search'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 93103 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __res_search(); below.  */
+#include <assert.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 __res_search();
 
-        EXT_STATIC="$EXT_STATIC sqlite"
-        ;;
-      *)
-        
-  
-  case ext/sqlite in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
+int main() {
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___res_search) || defined (__stub_____res_search)
+choke me
+#else
+__res_search();
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:93126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___res_search=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___res_search=no"
+fi
+rm -f conftest*
+fi
 
-  old_IFS=$IFS
-  for ac_src in $sqlite_sources; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+if eval "test \"`echo '$ac_cv_func_'__res_search`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
+fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_RES_SEARCH 1
 EOF
-  done
 
-
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC sqlite"
-  fi
-  
+    ac_cv_func_res_search=yes
+  ;;
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+    *) 
   
+  unset ac_cv_lib_resolv_res_search
+  unset ac_cv_lib_resolv___res_search
+  unset found
+  echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
+echo "configure:93164: checking for res_search in -lresolv" >&5
+ac_lib_var=`echo resolv'_'res_search | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 93172 "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 res_search();
 
+int main() {
+res_search()
+; return 0; }
+EOF
+if { (eval echo configure:93183: \"$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"
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=sqlite
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
-  fi
-
-  
-  am_i_shared=$PHP_SQLITE_SHARED
-  is_it_shared=$PHP_SPL_SHARED
-  is_it_enabled=$PHP_SPL
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension sqlite to build statically, but it
-depends on extension spl, which you've configured to build shared.
-You either need to build sqlite shared or build spl statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension sqlite, which depends on extension spl,
-but you've either not enabled spl, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
-  
-  am_i_shared=$PHP_SQLITE_SHARED
-  is_it_shared=$PHP_PDO_SHARED
-  is_it_enabled=$PHP_PDO
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension sqlite to build statically, but it
-depends on extension pdo, which you've configured to build shared.
-You either need to build sqlite shared or build pdo statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension sqlite, which depends on extension pdo,
-but you've either not enabled pdo, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-  
-  src=$ext_srcdir/Makefile.frag
-  ac_srcdir=$ext_srcdir
-  ac_builddir=$ext_builddir
-  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
+    echo $ac_n "checking for __res_search in -lresolv""... $ac_c" 1>&6
+echo "configure:93203: checking for __res_search in -lresolv" >&5
+ac_lib_var=`echo resolv'_'__res_search | 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="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 93211 "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 __res_search();
 
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_SHARED_LIBADD"
+int main() {
+__res_search()
+; return 0; }
+EOF
+if { (eval echo configure:93222: \"$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"
 
-  
-  
-    for header_file in $ext_builddir/libsqlite/src/sqlite.h; do
-      
-  
-  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INSTALLHEADERS$unique=set"
-    
-        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
-      
-  fi
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-    done 
   
+fi
 
-  
-  if test "$SQLITE_MODULE_TYPE" = "builtin"; then
-    
-  
-    $php_shtool mkdir -p $ext_builddir/libsqlite/src
-  
 
-    echo $ac_n "checking size of char *""... $ac_c" 1>&6
-echo "configure:87766: checking size of char *" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_char_p=4
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lresolv"
+    if test "$cross_compiling" = yes; then
+  found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 87774 "configure"
+#line 93254 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(char *));
-  exit(0);
-}
+main() { return (0); }
 EOF
-if { (eval echo configure:87786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  ac_cv_sizeof_char_p=`cat conftestval`
+  found=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_sizeof_char_p=0
+  found=no
 fi
 rm -fr conftest*
 fi
 
-fi
-echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
-EOF
+    LIBS=$ac_libs
+  fi
+
+  if test "$found" = "yes"; then
+    
+  
+  case resolv in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lresolv $LIBS" 
+   ;;
+  esac
 
 
     cat >> confdefs.h <<\EOF
-#define SQLITE_PTR_SZ SIZEOF_CHAR_P
+#define HAVE_RES_SEARCH 1
 EOF
 
-                if test "$PHP_SQLITE_UTF8" = "yes"; then
-      SQLITE_ENCODING="UTF8"
-      cat >> confdefs.h <<\EOF
-#define SQLITE_UTF8 1
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBRESOLV 1
 EOF
 
-    else
-      SQLITE_ENCODING="ISO8859"
-    fi
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_ENCODING"
-
-
-    SQLITE_VERSION=`cat $ext_srcdir/libsqlite/VERSION`
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_VERSION"
-
-
-    sed -e s/--VERS--/$SQLITE_VERSION/ -e s/--ENCODING--/$SQLITE_ENCODING/ $ext_srcdir/libsqlite/src/sqlite.h.in > $ext_builddir/libsqlite/src/sqlite.h
-
-    if test "$ext_shared" = "no" || test "$ext_srcdir" != "$abs_srcdir"; then
-      echo '#include <php_config.h>' > $ext_builddir/libsqlite/src/config.h
-    else
-      echo "#include \"$abs_builddir/config.h\"" > $ext_builddir/libsqlite/src/config.h
-    fi
+    ac_cv_func_res_search=yes
+  else
     
-    cat >> $ext_builddir/libsqlite/src/config.h <<EOF
-#if ZTS
-# define THREADSAFE 1
-#endif
-#if !ZEND_DEBUG
-# define NDEBUG
-#endif
-EOF
-  fi
   
-  for ac_func in usleep nanosleep
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:87848: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  unset ac_cv_lib_bind_res_search
+  unset ac_cv_lib_bind___res_search
+  unset found
+  echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
+echo "configure:93300: checking for res_search in -lbind" >&5
+ac_lib_var=`echo bind'_'res_search | 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
-  cat > conftest.$ac_ext <<EOF
-#line 87853 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 93308 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.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 $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char res_search();
 
+int main() {
+res_search()
 ; return 0; }
 EOF
-if { (eval echo configure:87876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93319: \"$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"
+  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_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
+  found=yes
 else
   echo "$ac_t""no" 1>&6
-fi
-done
 
-  for ac_hdr in time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:87904: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+    echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
+echo "configure:93339: checking for __res_search in -lbind" >&5
+ac_lib_var=`echo bind'_'__res_search | 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
-  cat > conftest.$ac_ext <<EOF
-#line 87909 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lbind  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 93347 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+/* 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 __res_search();
+
+int main() {
+__res_search()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:87914: \"$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
+if { (eval echo configure:93358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_lib_$ac_lib_var=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"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
+
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
+  found=yes
 else
   echo "$ac_t""no" 1>&6
+found=no
 fi
-done
 
+  
 fi
 
 
-
-echo $ac_n "checking whether flush should be called explicitly after a buffered io""... $ac_c" 1>&6
-echo "configure:87945: checking whether flush should be called explicitly after a buffered io" >&5
-if eval "test \"`echo '$''{'ac_cv_flush_io'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-if test "$cross_compiling" = yes; then
-  
-  ac_cv_flush_io=no
-
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lbind"
+    if test "$cross_compiling" = yes; then
+  found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 87956 "configure"
+#line 93390 "configure"
 #include "confdefs.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
-	char *filename = tmpnam(NULL);
-	char buffer[64];
-	int result = 0;
-	
-	FILE *fp = fopen(filename, "wb");
-	if (NULL == fp)
-		return 0;
-	fputs("line 1\n", fp);
-	fputs("line 2\n", fp);
-	fclose(fp);
-	
-	fp = fopen(filename, "rb+");
-	if (NULL == fp)
-		return 0;
-	fgets(buffer, sizeof(buffer), fp);
-	fputs("line 3\n", fp);
-	rewind(fp);
-	fgets(buffer, sizeof(buffer), fp);
-	if (0 != strcmp(buffer, "line 1\n"))
-		result = 1;
-	fgets(buffer, sizeof(buffer), fp);
-	if (0 != strcmp(buffer, "line 3\n"))
-		result = 1;
-	fclose(fp);
-	unlink(filename);
-
-	exit(result);
-}
-
+main() { return (0); }
 EOF
-if { (eval echo configure:87994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  
-  ac_cv_flush_io=no
-
+  found=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  
-  ac_cv_flush_io=yes
-
+  found=no
 fi
 rm -fr conftest*
 fi
 
-fi
+    LIBS=$ac_libs
+  fi
 
-echo "$ac_t""$ac_cv_flush_io" 1>&6
-if test "$ac_cv_flush_io" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_FLUSHIO 1
+  if test "$found" = "yes"; then
+    
+  
+  case bind in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lbind $LIBS" 
+   ;;
+  esac
+
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_RES_SEARCH 1
 EOF
 
-fi
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBBIND 1
+EOF
 
-if test "$ac_cv_func_crypt" = "no"; then
-  echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:88022: checking for crypt in -lcrypt" >&5
-ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
+    ac_cv_func_res_search=yes
+  else
+    
+  
+  unset ac_cv_lib_socket_res_search
+  unset ac_cv_lib_socket___res_search
+  unset found
+  echo $ac_n "checking for res_search in -lsocket""... $ac_c" 1>&6
+echo "configure:93436: checking for res_search in -lsocket" >&5
+ac_lib_var=`echo socket'_'res_search | 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="-lcrypt  $LIBS"
+LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 88030 "configure"
+#line 93444 "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 crypt();
+char res_search();
 
 int main() {
-crypt()
+res_search()
 ; return 0; }
 EOF
-if { (eval echo configure:88041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93455: \"$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
@@ -88052,172 +93466,161 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  
-    LIBS="-lcrypt $LIBS -lcrypt"
-    cat >> confdefs.h <<\EOF
-#define HAVE_CRYPT 1
-EOF
-
-  
+  found=yes
 else
   echo "$ac_t""no" 1>&6
-fi
 
-fi
-  
-echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6
-echo "configure:88070: checking for standard DES crypt" >&5
-if eval "test \"`echo '$''{'ac_cv_crypt_des'+set}'`\" = set"; then
+    echo $ac_n "checking for __res_search in -lsocket""... $ac_c" 1>&6
+echo "configure:93475: checking for __res_search in -lsocket" >&5
+ac_lib_var=`echo socket'_'__res_search | 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 "$cross_compiling" = yes; then
-  
-  ac_cv_crypt_des=yes
-
-else
-  cat > conftest.$ac_ext <<EOF
-#line 88081 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 93483 "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 __res_search();
 
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if HAVE_CRYPT_H
-#include <crypt.h>
-#endif
-
-main() {
-#if HAVE_CRYPT
-    exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
-#else
-	exit(0);
-#endif
-}
+int main() {
+__res_search()
+; return 0; }
 EOF
-if { (eval echo configure:88100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-  ac_cv_crypt_des=yes
-
+if { (eval echo configure:93494: \"$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 -fr conftest*
-  
-  ac_cv_crypt_des=no
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
-rm -fr conftest*
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
 fi
 
+  
 fi
 
-echo "$ac_t""$ac_cv_crypt_des" 1>&6
-
-echo $ac_n "checking for extended DES crypt""... $ac_c" 1>&6
-echo "configure:88121: checking for extended DES crypt" >&5
-if eval "test \"`echo '$''{'ac_cv_crypt_ext_des'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  if test "$cross_compiling" = yes; then
-  
-  ac_cv_crypt_ext_des=no
 
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lsocket"
+    if test "$cross_compiling" = yes; then
+  found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 88132 "configure"
+#line 93526 "configure"
 #include "confdefs.h"
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if HAVE_CRYPT_H
-#include <crypt.h>
-#endif
-
-main() {
-#if HAVE_CRYPT
-  exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
-#else
-  exit(0);
-#endif
-}
+main() { return (0); }
 EOF
-if { (eval echo configure:88151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  
-  ac_cv_crypt_ext_des=yes
-
+  found=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  
-  ac_cv_crypt_ext_des=no
-
+  found=no
 fi
 rm -fr conftest*
 fi
 
-fi
+    LIBS=$ac_libs
+  fi
 
-echo "$ac_t""$ac_cv_crypt_ext_des" 1>&6
+  if test "$found" = "yes"; then
+    
+  
+  case socket in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsocket $LIBS" 
+   ;;
+  esac
 
-echo $ac_n "checking for MD5 crypt""... $ac_c" 1>&6
-echo "configure:88172: checking for MD5 crypt" >&5
-if eval "test \"`echo '$''{'ac_cv_crypt_md5'+set}'`\" = set"; then
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_RES_SEARCH 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBSOCKET 1
+EOF
+
+    ac_cv_func_res_search=yes
+  else
+    
+  :
+
+  fi
+  
+
+  fi
+  
+
+  fi
+  
+ ;;
+  
+  esac
+
+
+echo $ac_n "checking whether atof() accepts NAN""... $ac_c" 1>&6
+echo "configure:93583: checking whether atof() accepts NAN" >&5
+if eval "test \"`echo '$''{'ac_cv_atof_accept_nan'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 if test "$cross_compiling" = yes; then
   
-  ac_cv_crypt_md5=no
+  ac_cv_atof_accept_nan=no
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 88183 "configure"
+#line 93594 "configure"
 #include "confdefs.h"
 
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if HAVE_CRYPT_H
-#include <crypt.h>
-#endif
-
-main() {
-#if HAVE_CRYPT
-    char salt[15], answer[40];
+#include <math.h>
+#include <stdlib.h>
 
-    salt[0]='$'; salt[1]='1'; salt[2]='$'; 
-    salt[3]='r'; salt[4]='a'; salt[5]='s';
-    salt[6]='m'; salt[7]='u'; salt[8]='s';
-    salt[9]='l'; salt[10]='e'; salt[11]='$';
-    salt[12]='\0';
-    strcpy(answer,salt);
-    strcat(answer,"rISCgZzpwk3UhDidwXvin0");
-    exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+#ifdef HAVE_ISNAN
+#define zend_isnan(a) isnan(a)
+#elif defined(HAVE_FPCLASS)
+#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
 #else
-	exit(0);
+#define zend_isnan(a) 0
 #endif
+
+int main(int argc, char** argv)
+{
+	return zend_isnan(atof("NAN")) ? 0 : 1;
 }
+
 EOF
-if { (eval echo configure:88211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
-  ac_cv_crypt_md5=yes
+  ac_cv_atof_accept_nan=yes
 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   
-  ac_cv_crypt_md5=no
+  ac_cv_atof_accept_nan=no
 
 fi
 rm -fr conftest*
@@ -88225,56 +93628,60 @@ fi
 
 fi
 
-echo "$ac_t""$ac_cv_crypt_md5" 1>&6
+echo "$ac_t""$ac_cv_atof_accept_nan" 1>&6
+if test "$ac_cv_atof_accept_nan" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ATOF_ACCEPTS_NAN 1
+EOF
 
-echo $ac_n "checking for Blowfish crypt""... $ac_c" 1>&6
-echo "configure:88232: checking for Blowfish crypt" >&5
-if eval "test \"`echo '$''{'ac_cv_crypt_blowfish'+set}'`\" = set"; then
+fi
+
+echo $ac_n "checking whether atof() accepts INF""... $ac_c" 1>&6
+echo "configure:93641: checking whether atof() accepts INF" >&5
+if eval "test \"`echo '$''{'ac_cv_atof_accept_inf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 if test "$cross_compiling" = yes; then
   
-  ac_cv_crypt_blowfish=no
+  ac_cv_atof_accept_inf=no
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 88243 "configure"
+#line 93652 "configure"
 #include "confdefs.h"
 
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if HAVE_CRYPT_H
-#include <crypt.h>
-#endif
+#include <math.h>
+#include <stdlib.h>
 
-main() {
-#if HAVE_CRYPT
-    char salt[30], answer[70];
-    
-    salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
-    strcat(salt,"rasmuslerd............");
-    strcpy(answer,salt);
-    strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
-    exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+#ifdef HAVE_ISINF
+#define zend_isinf(a) isinf(a)
+#elif defined(INFINITY)
+/* Might not work, but is required by ISO C99 */
+#define zend_isinf(a) (((a)==INFINITY)?1:0)
+#elif defined(HAVE_FPCLASS)
+#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
 #else
-	exit(0);
+#define zend_isinf(a) 0
 #endif
+
+int main(int argc, char** argv)
+{
+	return zend_isinf(atof("INF")) && zend_isinf(atof("-INF")) ? 0 : 1;
 }
+
 EOF
-if { (eval echo configure:88268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
-  ac_cv_crypt_blowfish=yes
+  ac_cv_atof_accept_inf=yes
 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   
-  ac_cv_crypt_blowfish=no
+  ac_cv_atof_accept_inf=no
 
 fi
 rm -fr conftest*
@@ -88282,55 +93689,60 @@ fi
 
 fi
 
-echo "$ac_t""$ac_cv_crypt_blowfish" 1>&6
+echo "$ac_t""$ac_cv_atof_accept_inf" 1>&6
+if test "$ac_cv_atof_accept_inf" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ATOF_ACCEPTS_INF 1
+EOF
 
-echo $ac_n "checking for SHA512 crypt""... $ac_c" 1>&6
-echo "configure:88289: checking for SHA512 crypt" >&5
-if eval "test \"`echo '$''{'ac_cv_crypt_SHA512'+set}'`\" = set"; then
+fi
+
+echo $ac_n "checking whether HUGE_VAL == INF""... $ac_c" 1>&6
+echo "configure:93702: checking whether HUGE_VAL == INF" >&5
+if eval "test \"`echo '$''{'ac_cv_huge_val_inf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 if test "$cross_compiling" = yes; then
   
-  ac_cv_crypt_SHA512=no
+  ac_cv_huge_val_inf=yes
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 88300 "configure"
+#line 93713 "configure"
 #include "confdefs.h"
 
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if HAVE_CRYPT_H
-#include <crypt.h>
-#endif
+#include <math.h>
+#include <stdlib.h>
 
-main() {
-#if HAVE_CRYPT
-    char salt[30], answer[80];
-    
-    salt[0]='$'; salt[1]='6'; salt[2]='$'; salt[3]='$'; salt[4]='b'; salt[5]='a'; salt[6]='r'; salt[7]='\0';
-    strcpy(answer, salt);
-    strcpy(&answer[29],"$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu.");
-    exit (strcmp((char *)crypt("foo",salt),answer));
+#ifdef HAVE_ISINF
+#define zend_isinf(a) isinf(a)
+#elif defined(INFINITY)
+/* Might not work, but is required by ISO C99 */
+#define zend_isinf(a) (((a)==INFINITY)?1:0)
+#elif defined(HAVE_FPCLASS)
+#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
 #else
-	exit(0);
+#define zend_isinf(a) 0
 #endif
+
+int main(int argc, char** argv)
+{
+	return zend_isinf(HUGE_VAL) ? 0 : 1;
 }
+
 EOF
-if { (eval echo configure:88324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
-  ac_cv_crypt_SHA512=yes
+  ac_cv_huge_val_inf=yes
 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   
-  ac_cv_crypt_SHA512=no
+  ac_cv_huge_val_inf=no
 
 fi
 rm -fr conftest*
@@ -88338,55 +93750,62 @@ fi
 
 fi
 
-echo "$ac_t""$ac_cv_crypt_SHA512" 1>&6
+echo "$ac_t""$ac_cv_huge_val_inf" 1>&6
+if test "$ac_cv_huge_val_inf" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_HUGE_VAL_INF 1
+EOF
 
-echo $ac_n "checking for SHA256 crypt""... $ac_c" 1>&6
-echo "configure:88345: checking for SHA256 crypt" >&5
-if eval "test \"`echo '$''{'ac_cv_crypt_SHA256'+set}'`\" = set"; then
+fi
+
+echo $ac_n "checking whether HUGE_VAL + -HUGEVAL == NAN""... $ac_c" 1>&6
+echo "configure:93763: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5
+if eval "test \"`echo '$''{'ac_cv_huge_val_nan'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 if test "$cross_compiling" = yes; then
   
-  ac_cv_crypt_SHA256=no
+  ac_cv_huge_val_nan=yes
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 88356 "configure"
+#line 93774 "configure"
 #include "confdefs.h"
 
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <math.h>
+#include <stdlib.h>
 
-#if HAVE_CRYPT_H
-#include <crypt.h>
+#ifdef HAVE_ISNAN
+#define zend_isnan(a) isnan(a)
+#elif defined(HAVE_FPCLASS)
+#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
+#else
+#define zend_isnan(a) 0
 #endif
 
-main() {
-#if HAVE_CRYPT
-    char salt[30], answer[80];
-    salt[0]='$'; salt[1]='5'; salt[2]='$'; salt[3]='$'; salt[4]='s'; salt[5]='a'; salt[6]='l'; salt[7]='t';  salt[8]='s'; salt[9]='t'; salt[10]='r'; salt[11]='i'; salt[12]='n'; salt[13]='g'; salt[14]='\0';    
-    strcat(salt,"");
-    strcpy(answer, salt);
-    strcpy(&answer[29], "$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5");
-    exit (strcmp((char *)crypt("foo",salt),answer));
+int main(int argc, char** argv)
+{
+#if defined(__sparc__) && !(__GNUC__ >= 3)
+	/* prevent bug #27830 */
+	return 1;
 #else
-	exit(0);
+	return zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1;
 #endif
 }
+
 EOF
-if { (eval echo configure:88380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
-  ac_cv_crypt_SHA256=yes
+  ac_cv_huge_val_nan=yes
 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   
-  ac_cv_crypt_SHA256=no
+  ac_cv_huge_val_nan=no
 
 fi
 rm -fr conftest*
@@ -88394,254 +93813,110 @@ fi
 
 fi
 
-echo "$ac_t""$ac_cv_crypt_SHA256" 1>&6
-
+echo "$ac_t""$ac_cv_huge_val_nan" 1>&6
+if test "$ac_cv_huge_val_nan" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_HUGE_VAL_NAN 1
+EOF
 
-if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "x$php_crypt_r" = "x0"; then
+fi
 
-        echo $ac_n "checking whether the compiler supports __alignof__""... $ac_c" 1>&6
-echo "configure:88404: checking whether the compiler supports __alignof__" >&5
-if eval "test \"`echo '$''{'ac_cv_alignof_exists'+set}'`\" = set"; then
+echo $ac_n "checking whether strptime() declaration fails""... $ac_c" 1>&6
+echo "configure:93826: checking whether strptime() declaration fails" >&5
+if eval "test \"`echo '$''{'ac_cv_strptime_decl_fails'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
-  cat > conftest.$ac_ext <<EOF
-#line 88410 "configure"
+cat > conftest.$ac_ext <<EOF
+#line 93832 "configure"
 #include "confdefs.h"
 
-  
+#include <time.h>
+
 int main() {
 
-    int align = __alignof__(int);
-  
+#ifndef HAVE_STRPTIME
+#error no strptime() on this platform
+#else
+/* use invalid strptime() declaration to see if it fails to compile */
+int strptime(const char *s, const char *format, struct tm *tm);
+#endif
+
 ; return 0; }
 EOF
-if { (eval echo configure:88420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:93848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
-    ac_cv_alignof_exists=yes
-  
+  ac_cv_strptime_decl_fails=no
+
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   
-    ac_cv_alignof_exists=no
-  
+  ac_cv_strptime_decl_fails=yes
+
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$ac_cv_alignof_exists" 1>&6
-  if test "$ac_cv_alignof_exists" = "yes"; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_ALIGNOF 1
+echo "$ac_t""$ac_cv_strptime_decl_fails" 1>&6
+if test "$ac_cv_strptime_decl_fails" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRPTIME_DECL_FAILS 1
 EOF
 
-  fi
+fi
 
-        echo $ac_n "checking whether the compiler supports aligned attribute""... $ac_c" 1>&6
-echo "configure:88445: checking whether the compiler supports aligned attribute" >&5
-if eval "test \"`echo '$''{'ac_cv_attribute_aligned'+set}'`\" = set"; then
+for ac_hdr in wchar.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:93876: checking for $ac_hdr" >&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 88451 "configure"
+#line 93881 "configure"
 #include "confdefs.h"
-
-  
-int main() {
-
-    unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
-  
-; return 0; }
+#include <$ac_hdr>
 EOF
-if { (eval echo configure:88461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:93886: \"$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*
-  
-    ac_cv_attribute_aligned=yes
-  
+  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*
-  
-    ac_cv_attribute_aligned=no
-  
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
 fi
-
-echo "$ac_t""$ac_cv_attribute_aligned" 1>&6
-  if test "$ac_cv_attribute_aligned" = "yes"; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_ATTRIBUTE_ALIGNED 1
-EOF
-
-  fi
-    
-
-  cat >> confdefs.h <<EOF
-#define PHP_USE_PHP_CRYPT_R 1
-EOF
-
-  cat >> confdefs.h <<EOF
-#define PHP_STD_DES_CRYPT 1
-EOF
-
-  cat >> confdefs.h <<EOF
-#define PHP_BLOWFISH_CRYPT 1
-EOF
-
-  cat >> confdefs.h <<EOF
-#define PHP_EXT_DES_CRYPT 1
-EOF
-
-  cat >> confdefs.h <<EOF
-#define PHP_MD5_CRYPT 1
-EOF
-
-  cat >> confdefs.h <<EOF
-#define PHP_SHA512_CRYPT 1
-EOF
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
   cat >> confdefs.h <<EOF
-#define PHP_SHA256_CRYPT 1
-EOF
-
-
-  
-  
-  case ext/standard in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre  $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+#define $ac_tr_hdr 1
 EOF
-  done
-
-
+ 
 else
-  if test "$ac_cv_crypt_des" = "yes"; then
-    ac_result=1
-    ac_crypt_des=1
-  else
-    ac_result=0
-    ac_crypt_des=0
-  fi
-  cat >> confdefs.h <<EOF
-#define PHP_STD_DES_CRYPT $ac_result
-EOF
-
-
-  if test "$ac_cv_crypt_blowfish" = "yes"; then
-    ac_result=1
-    ac_crypt_blowfish=1
-  else
-    ac_result=0
-    ac_crypt_blowfish=0
-  fi
-  cat >> confdefs.h <<EOF
-#define PHP_BLOWFISH_CRYPT $ac_result
-EOF
-
-
-  if test "$ac_cv_crypt_ext_des" = "yes"; then
-    ac_result=1
-    ac_crypt_edes=1
-  else
-    ac_result=0
-    ac_crypt_edes=0
-  fi
-  cat >> confdefs.h <<EOF
-#define PHP_EXT_DES_CRYPT $ac_result
-EOF
-
-
-  if test "$ac_cv_crypt_md5" = "yes"; then
-    ac_result=1
-    ac_crypt_md5=1
-  else
-    ac_result=0
-    ac_crypt_md5=0
-  fi
-  cat >> confdefs.h <<EOF
-#define PHP_MD5_CRYPT $ac_result
-EOF
-  
-  
-  if test "$ac_cv_crypt_sha512" = "yes"; then
-    ac_result=1
-    ac_crypt_sha512=1
-  else
-    ac_result=0
-    ac_crypt_sha512=0
-  fi
-  cat >> confdefs.h <<EOF
-#define PHP_SHA512_CRYPT $ac_result
-EOF
-
-
-  if test "$ac_cv_crypt_sha256" = "yes"; then
-    ac_result=1
-    ac_crypt_sha256=1
-  else
-    ac_result=0
-    ac_crypt_sha256=0
-  fi
-  cat >> confdefs.h <<EOF
-#define PHP_SHA256_CRYPT $ac_result
-EOF
-
-
-  cat >> confdefs.h <<EOF
-#define PHP_USE_PHP_CRYPT_R 0
-EOF
-
+  echo "$ac_t""no" 1>&6
 fi
+done
 
-for ac_func in getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy
+for ac_func in mblen
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:88640: checking for $ac_func" >&5
+echo "configure:93915: 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 88645 "configure"
+#line 93920 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -88664,7 +93939,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:88668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93943: \"$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
@@ -88688,55 +93963,15 @@ else
 fi
 done
 
-echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
-echo "configure:88693: checking for working fnmatch" >&5
-if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # Some versions of Solaris or SCO have a broken fnmatch function.
-# So we run a test program.  If we are cross-compiling, take no chance.
-# Thanks to John Oleynick and Franc,ois Pinard for this test.
-if test "$cross_compiling" = yes; then
-  ac_cv_func_fnmatch_works=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 88704 "configure"
-#include "confdefs.h"
-main() { exit (fnmatch ("a*", "abc", 0) != 0); }
-EOF
-if { (eval echo configure:88708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_func_fnmatch_works=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_fnmatch_works=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
-if test $ac_cv_func_fnmatch_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_FNMATCH 1
-EOF
-
-fi
-	
-
-
-for ac_func in fork CreateProcess
+for ac_func in mbrlen mbsinit
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:88735: checking for $ac_func" >&5
+echo "configure:93970: 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 88740 "configure"
+#line 93975 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -88759,7 +93994,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:88763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93998: \"$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
@@ -88778,1282 +94013,1194 @@ if eval "test \"`echo '$ac_cv_func_'$ac_
 #define $ac_tr_func 1
 EOF
  
-  php_can_support_proc_open=yes
-  break
-
 else
   echo "$ac_t""no" 1>&6
-php_can_support_proc_open=no
-
 fi
 done
 
-echo $ac_n "checking if your OS can spawn processes with inherited handles""... $ac_c" 1>&6
-echo "configure:88793: checking if your OS can spawn processes with inherited handles" >&5
-if test "$php_can_support_proc_open" = "yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define PHP_CAN_SUPPORT_PROC_OPEN 1
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = "embed"; then
-  cat >> confdefs.h <<\EOF
-#define ENABLE_CHROOT_FUNC 1
-EOF
-
-fi
-
-
-  unset ac_cv_func_res_nsearch
-  unset ac_cv_func___res_nsearch
-  unset found
-  
-  echo $ac_n "checking for res_nsearch""... $ac_c" 1>&6
-echo "configure:88817: checking for res_nsearch" >&5
-if eval "test \"`echo '$''{'ac_cv_func_res_nsearch'+set}'`\" = set"; then
+echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
+echo "configure:94023: checking for mbstate_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 88822 "configure"
+  
+cat > conftest.$ac_ext <<EOF
+#line 94029 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char res_nsearch(); below.  */
-#include <assert.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 res_nsearch();
+
+#ifdef HAVE_WCHAR_H
+# include <wchar.h>
+#endif
 
 int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_res_nsearch) || defined (__stub___res_nsearch)
-choke me
-#else
-res_nsearch();
-#endif
+int __tmp__() { mbstate_t a; }
 
 ; return 0; }
 EOF
-if { (eval echo configure:88845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:94042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_func_res_nsearch=yes"
+  
+  ac_cv_type_mbstate_t=yes
+
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_res_nsearch=no"
+  
+  ac_cv_type_mbstate_t=no
+
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'res_nsearch`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
- echo $ac_n "checking for __res_nsearch""... $ac_c" 1>&6
-echo "configure:88863: checking for __res_nsearch" >&5
-if eval "test \"`echo '$''{'ac_cv_func___res_nsearch'+set}'`\" = set"; then
+echo "$ac_t""$ac_cv_type_mbstate_t" 1>&6
+if test "$ac_cv_type_mbstate_t" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
+fi
+
+for ac_hdr in atomic.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:94070: checking for $ac_hdr" >&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 88868 "configure"
+#line 94075 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char __res_nsearch(); below.  */
-#include <assert.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 __res_nsearch();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub___res_nsearch) || defined (__stub_____res_nsearch)
-choke me
-#else
-__res_nsearch();
-#endif
-
-; return 0; }
+#include <$ac_hdr>
 EOF
-if { (eval echo configure:88891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:94080: \"$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_func___res_nsearch=yes"
+  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_func___res_nsearch=no"
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
 fi
-
-if eval "test \"`echo '$ac_cv_func_'__res_nsearch`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
 else
   echo "$ac_t""no" 1>&6
-found=no
-fi
- 
 fi
+done
+
+
+
+  ext_builddir=ext/standard
+  ext_srcdir=$abs_srcdir/ext/standard
+
+  ac_extra=
+
+  if test "" != "shared" && test "" != "yes" && test "" != "cli"; then
+    PHP_STANDARD_SHARED=no
+    
+  
+  case ext/standard in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
+                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
+                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
+                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
+                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
+                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
+                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
+                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
+                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
+                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
+                            filters.c proc_open.c streamsfuncs.c http.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC standard"
+    if test "" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC standard"
+    fi
+  else
+    if test "" = "shared" || test "" = "yes"; then
+      PHP_STANDARD_SHARED=yes
+      
+  case ext/standard in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
+                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
+                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
+                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
+                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
+                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
+                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
+                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
+                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
+                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
+                            filters.c proc_open.c streamsfuncs.c http.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_standard="$shared_objects_standard $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
 
-  case $found in
-  yes) 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_NSEARCH 1
-EOF
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpstandard.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(PHPSTANDARD_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpstandard.so '$ext_builddir'/phpstandard.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSTANDARD, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(PHPSTANDARD_SHARED_LIBADD)'
+      ;;
+  esac
 
-    ac_cv_func_res_nsearch=yes
-  ;;
-  
-    *) 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpstandard.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpstandard.$suffix"
+  fi
   
-  unset ac_cv_lib_resolv_res_nsearch
-  unset ac_cv_lib_resolv___res_nsearch
-  unset found
-  echo $ac_n "checking for res_nsearch in -lresolv""... $ac_c" 1>&6
-echo "configure:88929: checking for res_nsearch in -lresolv" >&5
-ac_lib_var=`echo resolv'_'res_nsearch | 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="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 88937 "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 res_nsearch();
-
-int main() {
-res_nsearch()
-; return 0; }
-EOF
-if { (eval echo configure:88948: \"$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"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_standard"
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpstandard.$suffix: $ext_builddir/phpstandard.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpstandard.$suffix \$(phplibdir)
 
-    echo $ac_n "checking for __res_nsearch in -lresolv""... $ac_c" 1>&6
-echo "configure:88968: checking for __res_nsearch in -lresolv" >&5
-ac_lib_var=`echo resolv'_'__res_nsearch | 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="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 88976 "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 __res_nsearch();
+$ext_builddir/phpstandard.$suffix: \$(shared_objects_standard) \$(PHPSTANDARD_SHARED_DEPENDENCIES)
+	$link_cmd
 
-int main() {
-__res_nsearch()
-; return 0; }
 EOF
-if { (eval echo configure:88987: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/standard.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(STANDARD_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/standard.so '$ext_builddir'/standard.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(STANDARD, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(STANDARD_SHARED_LIBADD)'
+      ;;
+  esac
 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/standard.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/standard.$suffix"
+  fi
   
-fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_standard"
 
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/standard.$suffix: $ext_builddir/standard.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/standard.$suffix \$(phplibdir)
+
+$ext_builddir/standard.$suffix: \$(shared_objects_standard) \$(STANDARD_SHARED_DEPENDENCIES)
+	$link_cmd
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lresolv"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89019 "configure"
-#include "confdefs.h"
-main() { return (0); }
 EOF
-if { (eval echo configure:89023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
 
-    LIBS=$ac_libs
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_STANDARD 1
+EOF
+
+    fi
   fi
 
-  if test "$found" = "yes"; then
-    
+  if test "" != "shared" && test "" != "yes" && test "" = "cli"; then
+    PHP_STANDARD_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
   
-  case resolv in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lresolv $LIBS" 
-   ;;
+  case ext/standard in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
+  
+  
 
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_NSEARCH 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBRESOLV 1
-EOF
 
-    ac_cv_func_res_nsearch=yes
-  else
-    
+  old_IFS=$IFS
+  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
+                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
+                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
+                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
+                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
+                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
+                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
+                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
+                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
+                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
+                            filters.c proc_open.c streamsfuncs.c http.c; do
   
-  unset ac_cv_lib_bind_res_nsearch
-  unset ac_cv_lib_bind___res_nsearch
-  unset found
-  echo $ac_n "checking for res_nsearch in -lbind""... $ac_c" 1>&6
-echo "configure:89065: checking for res_nsearch in -lbind" >&5
-ac_lib_var=`echo bind'_'res_nsearch | 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="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89073 "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 res_nsearch();
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-int main() {
-res_nsearch()
-; return 0; }
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:89084: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
 
-    echo $ac_n "checking for __res_nsearch in -lbind""... $ac_c" 1>&6
-echo "configure:89104: checking for __res_nsearch in -lbind" >&5
-ac_lib_var=`echo bind'_'__res_nsearch | 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="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89112 "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 __res_nsearch();
+        EXT_STATIC="$EXT_STATIC standard"
+        ;;
+      *)
+        
+  
+  case ext/standard in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-int main() {
-__res_nsearch()
-; return 0; }
-EOF
-if { (eval echo configure:89123: \"$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"
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
 
+  old_IFS=$IFS
+  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
+                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
+                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
+                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
+                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
+                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
+                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
+                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
+                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
+                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
+                            filters.c proc_open.c streamsfuncs.c http.c; do
   
-fi
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lbind"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89155 "configure"
-#include "confdefs.h"
-main() { return (0); }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:89159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
+  done
 
-    LIBS=$ac_libs
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC standard"
   fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
-  if test "$found" = "yes"; then
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=standard
     
-  
-  case bind in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lbind $LIBS" 
-   ;;
-  esac
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
+  fi
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_NSEARCH 1
-EOF
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBBIND 1
-EOF
 
-    ac_cv_func_res_nsearch=yes
-  else
+  src=$ext_srcdir/Makefile.frag
+  ac_srcdir=$ext_srcdir
+  ac_builddir=$ext_builddir
+  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
+
+
+  
+    for header_file in ext/standard/; do
+      
+  
+  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INSTALLHEADERS$unique=set"
     
+        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
+      
+  fi
+
+    done 
   
-  unset ac_cv_lib_socket_res_nsearch
-  unset ac_cv_lib_socket___res_nsearch
-  unset found
-  echo $ac_n "checking for res_nsearch in -lsocket""... $ac_c" 1>&6
-echo "configure:89201: checking for res_nsearch in -lsocket" >&5
-ac_lib_var=`echo socket'_'res_nsearch | 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="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89209 "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 res_nsearch();
 
-int main() {
-res_nsearch()
-; return 0; }
-EOF
-if { (eval echo configure:89220: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
 
-    echo $ac_n "checking for __res_nsearch in -lsocket""... $ac_c" 1>&6
-echo "configure:89240: checking for __res_nsearch in -lsocket" >&5
-ac_lib_var=`echo socket'_'__res_nsearch | 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="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89248 "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 __res_nsearch();
 
-int main() {
-__res_nsearch()
-; return 0; }
-EOF
-if { (eval echo configure:89259: \"$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"
+php_with_sybase_ct=no
+
+echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6
+echo "configure:94470: checking for Sybase-CT support" >&5
+# Check whether --with-sybase-ct or --without-sybase-ct was given.
+if test "${with_sybase_ct+set}" = set; then
+  withval="$with_sybase_ct"
+  PHP_SYBASE_CT=$withval
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  
+  PHP_SYBASE_CT=no
+  test "$PHP_ENABLE_ALL" && PHP_SYBASE_CT=$PHP_ENABLE_ALL
+
 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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
 
-  
-fi
 
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SYBASE_CT in
+shared,*)
+  PHP_SYBASE_CT=`echo "$PHP_SYBASE_CT"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SYBASE_CT=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lsocket"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89291 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:89295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
 
-    LIBS=$ac_libs
-  fi
 
-  if test "$found" = "yes"; then
-    
-  
-  case socket in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsocket $LIBS" 
-   ;;
-  esac
 
+if test "$PHP_SYBASE_CT" != "no"; then
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_NSEARCH 1
-EOF
+  if test "$PHP_SYBASE" && test "$PHP_SYBASE" != "no" && test "$ext_shared" = "no"; then
+    { echo "configure: error: You can not use both --with-sybase and --with-sybase-ct in same build!" 1>&2; exit 1; }
+  fi
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBSOCKET 1
+  cat >> confdefs.h <<\EOF
+#define HAVE_SYBASE_CT 1
 EOF
 
-    ac_cv_func_res_nsearch=yes
-  else
-    
-  :
-
-  fi
   
+  ext_builddir=ext/sybase_ct
+  ext_srcdir=$abs_srcdir/ext/sybase_ct
 
-  fi
-  
+  ac_extra=
 
-  fi
-  
- ;;
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_SYBASE_CT_SHARED=no
+    
   
+  case ext/sybase_ct in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
+  
+  
 
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-  unset ac_cv_func_dns_search
-  unset ac_cv_func___dns_search
-  unset found
-  
-  echo $ac_n "checking for dns_search""... $ac_c" 1>&6
-echo "configure:89352: checking for dns_search" >&5
-if eval "test \"`echo '$''{'ac_cv_func_dns_search'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89357 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dns_search(); below.  */
-#include <assert.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 dns_search();
 
-int main() {
+  old_IFS=$IFS
+  for ac_src in php_sybase_ct.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_dns_search) || defined (__stub___dns_search)
-choke me
-#else
-dns_search();
-#endif
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-; return 0; }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:89380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_dns_search=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_dns_search=no"
-fi
-rm -f conftest*
-fi
+  done
 
-if eval "test \"`echo '$ac_cv_func_'dns_search`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
- echo $ac_n "checking for __dns_search""... $ac_c" 1>&6
-echo "configure:89398: checking for __dns_search" >&5
-if eval "test \"`echo '$''{'ac_cv_func___dns_search'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89403 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char __dns_search(); below.  */
-#include <assert.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 __dns_search();
 
-int main() {
+    EXT_STATIC="$EXT_STATIC sybase_ct"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC sybase_ct"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_SYBASE_CT_SHARED=yes
+      
+  case ext/sybase_ct in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub___dns_search) || defined (__stub_____dns_search)
-choke me
-#else
-__dns_search();
-#endif
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
 
-; return 0; }
-EOF
-if { (eval echo configure:89426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func___dns_search=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func___dns_search=no"
-fi
-rm -f conftest*
-fi
 
-if eval "test \"`echo '$ac_cv_func_'__dns_search`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
- 
-fi
+  old_IFS=$IFS
+  for ac_src in php_sybase_ct.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_sybase_ct="$shared_objects_sybase_ct $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-  case $found in
-  yes) 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DNS_SEARCH 1
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-    ac_cv_func_dns_search=yes
-  ;;
-  
-    *) 
-  
-  unset ac_cv_lib_resolv_dns_search
-  unset ac_cv_lib_resolv___dns_search
-  unset found
-  echo $ac_n "checking for dns_search in -lresolv""... $ac_c" 1>&6
-echo "configure:89464: checking for dns_search in -lresolv" >&5
-ac_lib_var=`echo resolv'_'dns_search | 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="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89472 "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 dns_search();
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
 
-int main() {
-dns_search()
-; return 0; }
-EOF
-if { (eval echo configure:89483: \"$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"
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsybase_ct.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(PHPSYBASE_CT_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsybase_ct.so '$ext_builddir'/phpsybase_ct.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYBASE_CT, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(PHPSYBASE_CT_SHARED_LIBADD)'
+      ;;
+  esac
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsybase_ct.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsybase_ct.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sybase_ct"
 
-    echo $ac_n "checking for __dns_search in -lresolv""... $ac_c" 1>&6
-echo "configure:89503: checking for __dns_search in -lresolv" >&5
-ac_lib_var=`echo resolv'_'__dns_search | 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="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89511 "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 __dns_search();
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpsybase_ct.$suffix: $ext_builddir/phpsybase_ct.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsybase_ct.$suffix \$(phplibdir)
+
+$ext_builddir/phpsybase_ct.$suffix: \$(shared_objects_sybase_ct) \$(PHPSYBASE_CT_SHARED_DEPENDENCIES)
+	$link_cmd
 
-int main() {
-__dns_search()
-; return 0; }
 EOF
-if { (eval echo configure:89522: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sybase_ct.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(SYBASE_CT_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sybase_ct.so '$ext_builddir'/sybase_ct.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYBASE_CT, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(SYBASE_CT_SHARED_LIBADD)'
+      ;;
+  esac
 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sybase_ct.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sybase_ct.$suffix"
+  fi
   
-fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sybase_ct"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/sybase_ct.$suffix: $ext_builddir/sybase_ct.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/sybase_ct.$suffix \$(phplibdir)
 
+$ext_builddir/sybase_ct.$suffix: \$(shared_objects_sybase_ct) \$(SYBASE_CT_SHARED_DEPENDENCIES)
+	$link_cmd
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lresolv"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89554 "configure"
-#include "confdefs.h"
-main() { return (0); }
 EOF
-if { (eval echo configure:89558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
 
-    LIBS=$ac_libs
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_SYBASE_CT 1
+EOF
+
+    fi
   fi
 
-  if test "$found" = "yes"; then
-    
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_SYBASE_CT_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
   
-  case resolv in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lresolv $LIBS" 
-   ;;
+  case ext/sybase_ct in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
+  
+  
 
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DNS_SEARCH 1
-EOF
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBRESOLV 1
+  old_IFS=$IFS
+  for ac_src in php_sybase_ct.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-    ac_cv_func_dns_search=yes
-  else
-    
+
+        EXT_STATIC="$EXT_STATIC sybase_ct"
+        ;;
+      *)
+        
+  
+  case ext/sybase_ct in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-  unset ac_cv_lib_bind_dns_search
-  unset ac_cv_lib_bind___dns_search
-  unset found
-  echo $ac_n "checking for dns_search in -lbind""... $ac_c" 1>&6
-echo "configure:89600: checking for dns_search in -lbind" >&5
-ac_lib_var=`echo bind'_'dns_search | 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="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89608 "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 dns_search();
 
-int main() {
-dns_search()
-; return 0; }
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_sybase_ct.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:89619: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
 
-    echo $ac_n "checking for __dns_search in -lbind""... $ac_c" 1>&6
-echo "configure:89639: checking for __dns_search in -lbind" >&5
-ac_lib_var=`echo bind'_'__dns_search | 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="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89647 "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 __dns_search();
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC sybase_ct"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
-int main() {
-__dns_search()
-; return 0; }
-EOF
-if { (eval echo configure:89658: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=sybase_ct
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
 
   
-fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST SYBASE_CT_SHARED_LIBADD"
 
+ 
+  if test "$PHP_SYBASE_CT" = "yes"; then
+    SYBASE_CT_INCDIR=/home/sybase/include
+    SYBASE_CT_LIBDIR=/home/sybase/lib
+  else
+    SYBASE_CT_INCDIR=$PHP_SYBASE_CT/include
+    SYBASE_CT_LIBDIR=$PHP_SYBASE_CT/lib
+  fi
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lbind"
-    if test "$cross_compiling" = yes; then
-  found=no
+    echo $ac_n "checking size of long int""... $ac_c" 1>&6
+echo "configure:94825: checking size of long int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_long_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 89690 "configure"
+#line 94833 "configure"
 #include "confdefs.h"
-main() { return (0); }
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long int));
+  exit(0);
+}
 EOF
-if { (eval echo configure:89694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:94845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  found=yes
+  ac_cv_sizeof_long_int=`cat conftestval`
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  found=no
+  ac_cv_sizeof_long_int=0
 fi
 rm -fr conftest*
 fi
 
-    LIBS=$ac_libs
+fi
+echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
+EOF
+
+
+  echo $ac_n "checking checking if we're on a 64-bit platform""... $ac_c" 1>&6
+echo "configure:94865: checking checking if we're on a 64-bit platform" >&5
+  if test "$ac_cv_sizeof_long_int" = "4"; then
+    echo "$ac_t""no" 1>&6
+    PHP_SYBASE_64=no
+  else
+    echo "$ac_t""yes" 1>&6
+    PHP_SYBASE_64=yes
   fi
 
-  if test "$found" = "yes"; then
+
+  echo $ac_n "checking Checking for ctpublic.h""... $ac_c" 1>&6
+echo "configure:94876: checking Checking for ctpublic.h" >&5
+  if test -f $SYBASE_CT_INCDIR/ctpublic.h; then
+    echo "$ac_t""found in $SYBASE_CT_INCDIR" 1>&6
     
-  
-  case bind in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lbind $LIBS" 
-   ;;
-  esac
+  if test "$SYBASE_CT_INCDIR" != "/usr/include"; then
+    
+  if test -z "$SYBASE_CT_INCDIR" || echo "$SYBASE_CT_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$SYBASE_CT_INCDIR
+  else
+    
+    ep_dir="`echo $SYBASE_CT_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$SYBASE_CT_INCDIR\"`"
+  fi
 
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DNS_SEARCH 1
-EOF
+  fi
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBBIND 1
-EOF
+  else
+    { echo "configure: error: ctpublic.h missing!" 1>&2; exit 1; }
+  fi
+ 
+  echo $ac_n "checking Checking Sybase libdir""... $ac_c" 1>&6
+echo "configure:94915: checking Checking Sybase libdir" >&5
+  echo "$ac_t""Have $SYBASE_CT_LIBDIR" 1>&6
+ 
+  echo $ac_n "checking Checking for Sybase platform libraries""... $ac_c" 1>&6
+echo "configure:94919: checking Checking for Sybase platform libraries" >&5
 
-    ac_cv_func_dns_search=yes
+  
+  if test "$SYBASE_CT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SYBASE_CT_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$SYBASE_CT_LIBDIR" || echo "$SYBASE_CT_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$SYBASE_CT_LIBDIR
   else
     
+    ep_dir="`echo $SYBASE_CT_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$SYBASE_CT_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-L$ai_p $SYBASE_CT_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && SYBASE_CT_SHARED_LIBADD="$ld_runpath_switch$ai_p $SYBASE_CT_SHARED_LIBADD"
+      else
+        
   
-  unset ac_cv_lib_socket_dns_search
-  unset ac_cv_lib_socket___dns_search
-  unset found
-  echo $ac_n "checking for dns_search in -lsocket""... $ac_c" 1>&6
-echo "configure:89736: checking for dns_search in -lsocket" >&5
-ac_lib_var=`echo socket'_'dns_search | 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="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89744 "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 dns_search();
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-dns_search()
-; return 0; }
-EOF
-if { (eval echo configure:89755: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __dns_search in -lsocket""... $ac_c" 1>&6
-echo "configure:89775: checking for __dns_search in -lsocket" >&5
-ac_lib_var=`echo socket'_'__dns_search | 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="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 89783 "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 __dns_search();
+  if test -f $SYBASE_CT_INCDIR/tds.h || test -f $SYBASE_CT_INCDIR/tds_sysdep_public.h; then
+    
+  
+  case ct in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lct $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case ct in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lct $LIBS" 
+   ;;
+  esac
 
-int main() {
-__dns_search()
-; return 0; }
-EOF
-if { (eval echo configure:89794: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
+    fi
+   ;;
+  esac
 
+
+    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct"
+    echo "$ac_t""FreeTDS: $SYBASE_CT_LIBS" 1>&6
+  elif test -f $SYBASE_CT_LIBDIR/libsybct64.so && test $PHP_SYBASE_64 = "yes"; then
+    
   
-fi
+  case sybcs64 in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybcs64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybcs64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybcs64 $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lsocket"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89826 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:89830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
+    fi
+   ;;
+  esac
 
-    LIBS=$ac_libs
-  fi
 
-  if test "$found" = "yes"; then
     
   
-  case socket in
+  case sybct64 in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lsocket $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybct64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybct64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybct64 $LIBS" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DNS_SEARCH 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBSOCKET 1
-EOF
 
-    ac_cv_func_dns_search=yes
-  else
     
-  :
-
-  fi
   
-
-  fi
+  case sybcomn64 in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybcomn64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
   
+  case sybcomn64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybcomn64 $LIBS" 
+   ;;
+  esac
 
-  fi
-  
- ;;
-  
+
+    fi
+   ;;
   esac
 
 
-  unset ac_cv_func_dn_expand
-  unset ac_cv_func___dn_expand
-  unset found
+    
   
-  echo $ac_n "checking for dn_expand""... $ac_c" 1>&6
-echo "configure:89887: checking for dn_expand" >&5
-if eval "test \"`echo '$''{'ac_cv_func_dn_expand'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89892 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dn_expand(); below.  */
-#include <assert.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 dn_expand();
+  case sybintl64 in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybintl64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybintl64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybintl64 $LIBS" 
+   ;;
+  esac
 
-int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_dn_expand) || defined (__stub___dn_expand)
-choke me
-#else
-dn_expand();
-#endif
+    fi
+   ;;
+  esac
 
-; return 0; }
-EOF
-if { (eval echo configure:89915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_dn_expand=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_dn_expand=no"
-fi
-rm -f conftest*
-fi
 
-if eval "test \"`echo '$ac_cv_func_'dn_expand`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
- echo $ac_n "checking for __dn_expand""... $ac_c" 1>&6
-echo "configure:89933: checking for __dn_expand" >&5
-if eval "test \"`echo '$''{'ac_cv_func___dn_expand'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 89938 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char __dn_expand(); below.  */
-#include <assert.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 __dn_expand();
 
-int main() {
+    ac_solid_uname_s=`uname -s 2>/dev/null`
+    case $ac_solid_uname_s in
+      *OSF*)                            ;; # Tru64/DEC OSF does NOT use the SYB_LP64 define
+      *) CFLAGS="${CFLAGS} -DSYB_LP64"  ;; # 
+    esac
+    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs64 -lsybct64 -lsybcomn64 -lsybintl64"
+    echo "$ac_t""Sybase64: $SYBASE_CT_LIBS" 1>&6
+  
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff=" 
+      $SYBASE_CT_LIBS 
+    "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub___dn_expand) || defined (__stub_____dn_expand)
-choke me
-#else
-__dn_expand();
-#endif
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-; return 0; }
-EOF
-if { (eval echo configure:89961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func___dn_expand=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func___dn_expand=no"
-fi
-rm -f conftest*
-fi
 
-if eval "test \"`echo '$ac_cv_func_'__dn_expand`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
- 
-fi
+    fi
+   ;;
+  esac
 
 
-  case $found in
-  yes) 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_EXPAND 1
-EOF
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-    ac_cv_func_dn_expand=yes
-  ;;
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-    *) 
   
-  unset ac_cv_lib_resolv_dn_expand
-  unset ac_cv_lib_resolv___dn_expand
-  unset found
-  echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:89999: checking for dn_expand in -lresolv" >&5
-ac_lib_var=`echo resolv'_'dn_expand | 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="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 90007 "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 dn_expand();
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-dn_expand()
-; return 0; }
-EOF
-if { (eval echo configure:90018: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:90038: checking for __dn_expand in -lresolv" >&5
-ac_lib_var=`echo resolv'_'__dn_expand | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for netg_errstr in -lsybtcl64""... $ac_c" 1>&6
+echo "configure:95185: checking for netg_errstr in -lsybtcl64" >&5
+ac_lib_var=`echo sybtcl64'_'netg_errstr | 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="-lresolv  $LIBS"
+LIBS="-lsybtcl64  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 90046 "configure"
+#line 95193 "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 __dn_expand();
+char netg_errstr();
 
 int main() {
-__dn_expand()
+netg_errstr()
 ; return 0; }
 EOF
-if { (eval echo configure:90057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:95204: \"$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
@@ -90068,128 +95215,186 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+      
+  
+  case sybtcl64 in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybtcl64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybtcl64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybtcl64 $LIBS" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    
+  
 else
   echo "$ac_t""no" 1>&6
-found=no
-fi
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_sybtcl64_netg_errstr
+     
+      
   
-fi
+  case sybtcl64 in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybtcl64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybtcl64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybtcl64 $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lresolv"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90089 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:90093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
+    fi
+   ;;
+  esac
+
+
+    
+  
 fi
 
-    LIBS=$ac_libs
+  
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="-L$SYBASE_CT_LIBDIR"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
   fi
 
-  if test "$found" = "yes"; then
-    
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-  case resolv in
+  case $ac_ii in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lresolv $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_EXPAND 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBRESOLV 1
-EOF
 
-    ac_cv_func_dn_expand=yes
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-  unset ac_cv_lib_bind_dn_expand
-  unset ac_cv_lib_bind___dn_expand
-  unset found
-  echo $ac_n "checking for dn_expand in -lbind""... $ac_c" 1>&6
-echo "configure:90135: checking for dn_expand in -lbind" >&5
-ac_lib_var=`echo bind'_'dn_expand | 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="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 90143 "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 dn_expand();
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-dn_expand()
-; return 0; }
-EOF
-if { (eval echo configure:90154: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __dn_expand in -lbind""... $ac_c" 1>&6
-echo "configure:90174: checking for __dn_expand in -lbind" >&5
-ac_lib_var=`echo bind'_'__dn_expand | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for insck__getVdate in -linsck64""... $ac_c" 1>&6
+echo "configure:95379: checking for insck__getVdate in -linsck64" >&5
+ac_lib_var=`echo insck64'_'insck__getVdate | 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="-lbind  $LIBS"
+LIBS="-linsck64  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 90182 "configure"
+#line 95387 "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 __dn_expand();
+char insck__getVdate();
 
 int main() {
-__dn_expand()
+insck__getVdate()
 ; return 0; }
 EOF
-if { (eval echo configure:90193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:95398: \"$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
@@ -90204,128 +95409,159 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
-
   
-fi
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+  
+  case insck64 in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-linsck64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case insck64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-linsck64 $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lbind"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90225 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:90229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
+    fi
+   ;;
+  esac
+
+
+  
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_insck64_insck__getVdate
+    
+  
 fi
 
-    LIBS=$ac_libs
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="-L$SYBASE_CT_LIBDIR"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
   fi
 
-  if test "$found" = "yes"; then
-    
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-  case bind in
+  case $ac_ii in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lbind $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_EXPAND 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBBIND 1
-EOF
 
-    ac_cv_func_dn_expand=yes
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-  unset ac_cv_lib_socket_dn_expand
-  unset ac_cv_lib_socket___dn_expand
-  unset found
-  echo $ac_n "checking for dn_expand in -lsocket""... $ac_c" 1>&6
-echo "configure:90271: checking for dn_expand in -lsocket" >&5
-ac_lib_var=`echo socket'_'dn_expand | 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="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 90279 "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 dn_expand();
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-dn_expand()
-; return 0; }
-EOF
-if { (eval echo configure:90290: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __dn_expand in -lsocket""... $ac_c" 1>&6
-echo "configure:90310: checking for __dn_expand in -lsocket" >&5
-ac_lib_var=`echo socket'_'__dn_expand | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for bsd_tcp in -linsck64""... $ac_c" 1>&6
+echo "configure:95546: checking for bsd_tcp in -linsck64" >&5
+ac_lib_var=`echo insck64'_'bsd_tcp | 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="-lsocket  $LIBS"
+LIBS="-linsck64  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 90318 "configure"
+#line 95554 "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 __dn_expand();
+char bsd_tcp();
 
 int main() {
-__dn_expand()
+bsd_tcp()
 ; return 0; }
 EOF
-if { (eval echo configure:90329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:95565: \"$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
@@ -90340,255 +95576,258 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+  
+  case insck64 in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-linsck64 $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case insck64 in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-linsck64 $LIBS" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+  
 else
   echo "$ac_t""no" 1>&6
-found=no
-fi
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_insck64_bsd_tcp
+    
   
 fi
 
+  elif test -f $SYBASE_CT_LIBDIR/libsybct.so; then
+    
+  
+  case sybcs in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybcs $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybcs in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybcs $LIBS" 
+   ;;
+  esac
+
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lsocket"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90361 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:90365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
+    fi
+   ;;
+  esac
 
-    LIBS=$ac_libs
-  fi
 
-  if test "$found" = "yes"; then
     
   
-  case socket in
+  case sybct in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lsocket $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybct $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybct in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybct $LIBS" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_EXPAND 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBSOCKET 1
-EOF
 
-    ac_cv_func_dn_expand=yes
-  else
     
-  :
-
-  fi
   
-
-  fi
+  case sybcomn in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybcomn $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
   
+  case sybcomn in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybcomn $LIBS" 
+   ;;
+  esac
 
-  fi
-  
- ;;
-  
+
+    fi
+   ;;
   esac
 
 
-  unset ac_cv_func_dn_skipname
-  unset ac_cv_func___dn_skipname
-  unset found
+    
   
-  echo $ac_n "checking for dn_skipname""... $ac_c" 1>&6
-echo "configure:90422: checking for dn_skipname" >&5
-if eval "test \"`echo '$''{'ac_cv_func_dn_skipname'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90427 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dn_skipname(); below.  */
-#include <assert.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 dn_skipname();
-
-int main() {
+  case sybintl in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybintl $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybintl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybintl $LIBS" 
+   ;;
+  esac
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_dn_skipname) || defined (__stub___dn_skipname)
-choke me
-#else
-dn_skipname();
-#endif
 
-; return 0; }
-EOF
-if { (eval echo configure:90450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_dn_skipname=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_dn_skipname=no"
-fi
-rm -f conftest*
-fi
+    fi
+   ;;
+  esac
 
-if eval "test \"`echo '$ac_cv_func_'dn_skipname`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
- echo $ac_n "checking for __dn_skipname""... $ac_c" 1>&6
-echo "configure:90468: checking for __dn_skipname" >&5
-if eval "test \"`echo '$''{'ac_cv_func___dn_skipname'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90473 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char __dn_skipname(); below.  */
-#include <assert.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 __dn_skipname();
 
-int main() {
+  
+    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs -lsybct -lsybcomn -lsybintl"
+    echo "$ac_t""Sybase32 syb-prefix: $SYBASE_CT_LIBS" 1>&6
+  
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff=" 
+      $SYBASE_CT_LIBS 
+    "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub___dn_skipname) || defined (__stub_____dn_skipname)
-choke me
-#else
-__dn_skipname();
-#endif
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-; return 0; }
-EOF
-if { (eval echo configure:90496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func___dn_skipname=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func___dn_skipname=no"
-fi
-rm -f conftest*
-fi
 
-if eval "test \"`echo '$ac_cv_func_'__dn_skipname`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
- 
-fi
+    fi
+   ;;
+  esac
 
 
-  case $found in
-  yes) 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_SKIPNAME 1
-EOF
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-    ac_cv_func_dn_skipname=yes
-  ;;
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-    *) 
   
-  unset ac_cv_lib_resolv_dn_skipname
-  unset ac_cv_lib_resolv___dn_skipname
-  unset found
-  echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6
-echo "configure:90534: checking for dn_skipname in -lresolv" >&5
-ac_lib_var=`echo resolv'_'dn_skipname | 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="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 90542 "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 dn_skipname();
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-dn_skipname()
-; return 0; }
-EOF
-if { (eval echo configure:90553: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __dn_skipname in -lresolv""... $ac_c" 1>&6
-echo "configure:90573: checking for __dn_skipname in -lresolv" >&5
-ac_lib_var=`echo resolv'_'__dn_skipname | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for netg_errstr in -lsybtcl""... $ac_c" 1>&6
+echo "configure:95812: checking for netg_errstr in -lsybtcl" >&5
+ac_lib_var=`echo sybtcl'_'netg_errstr | 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="-lresolv  $LIBS"
+LIBS="-lsybtcl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 90581 "configure"
+#line 95820 "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 __dn_skipname();
+char netg_errstr();
 
 int main() {
-__dn_skipname()
+netg_errstr()
 ; return 0; }
 EOF
-if { (eval echo configure:90592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:95831: \"$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
@@ -90603,128 +95842,186 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+      
+  
+  case sybtcl in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybtcl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybtcl $LIBS" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    
+  
 else
   echo "$ac_t""no" 1>&6
-found=no
-fi
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_sybtcl_netg_errstr
+     
+      
   
-fi
+  case sybtcl in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybtcl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybtcl $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lresolv"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90624 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:90628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
+    fi
+   ;;
+  esac
+
+
+    
+  
 fi
 
-    LIBS=$ac_libs
+  
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="-L$SYBASE_CT_LIBDIR"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
   fi
 
-  if test "$found" = "yes"; then
-    
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
   
-  case resolv in
+  case $ac_ii in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lresolv $LIBS" 
+      LIBS="$LIBS -l$ac_ii" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_SKIPNAME 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBRESOLV 1
-EOF
 
-    ac_cv_func_dn_skipname=yes
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  unset ac_cv_lib_bind_dn_skipname
-  unset ac_cv_lib_bind___dn_skipname
-  unset found
-  echo $ac_n "checking for dn_skipname in -lbind""... $ac_c" 1>&6
-echo "configure:90670: checking for dn_skipname in -lbind" >&5
-ac_lib_var=`echo bind'_'dn_skipname | 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="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 90678 "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 dn_skipname();
+  fi
 
-int main() {
-dn_skipname()
-; return 0; }
-EOF
-if { (eval echo configure:90689: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __dn_skipname in -lbind""... $ac_c" 1>&6
-echo "configure:90709: checking for __dn_skipname in -lbind" >&5
-ac_lib_var=`echo bind'_'__dn_skipname | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
+echo "configure:96006: checking for insck__getVdate in -linsck" >&5
+ac_lib_var=`echo insck'_'insck__getVdate | 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="-lbind  $LIBS"
+LIBS="-linsck  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 90717 "configure"
+#line 96014 "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 __dn_skipname();
+char insck__getVdate();
 
 int main() {
-__dn_skipname()
+insck__getVdate()
 ; return 0; }
 EOF
-if { (eval echo configure:90728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:96025: \"$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
@@ -90739,128 +96036,159 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
-
   
-fi
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+  
+  case insck in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case insck in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-linsck $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lbind"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90760 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:90764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
+    fi
+   ;;
+  esac
+
+
+  
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_insck_insck__getVdate
+    
+  
 fi
 
-    LIBS=$ac_libs
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="-L$SYBASE_CT_LIBDIR"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
   fi
 
-  if test "$found" = "yes"; then
-    
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-  case bind in
+  case $ac_ii in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lbind $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_SKIPNAME 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBBIND 1
-EOF
 
-    ac_cv_func_dn_skipname=yes
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  unset ac_cv_lib_socket_dn_skipname
-  unset ac_cv_lib_socket___dn_skipname
-  unset found
-  echo $ac_n "checking for dn_skipname in -lsocket""... $ac_c" 1>&6
-echo "configure:90806: checking for dn_skipname in -lsocket" >&5
-ac_lib_var=`echo socket'_'dn_skipname | 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="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 90814 "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 dn_skipname();
+  fi
 
-int main() {
-dn_skipname()
-; return 0; }
-EOF
-if { (eval echo configure:90825: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __dn_skipname in -lsocket""... $ac_c" 1>&6
-echo "configure:90845: checking for __dn_skipname in -lsocket" >&5
-ac_lib_var=`echo socket'_'__dn_skipname | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6
+echo "configure:96173: checking for bsd_tcp in -linsck" >&5
+ac_lib_var=`echo insck'_'bsd_tcp | 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="-lsocket  $LIBS"
+LIBS="-linsck  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 90853 "configure"
+#line 96181 "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 __dn_skipname();
+char bsd_tcp();
 
 int main() {
-__dn_skipname()
+bsd_tcp()
 ; return 0; }
 EOF
-if { (eval echo configure:90864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:96192: \"$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
@@ -90875,257 +96203,258 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
-
   
-fi
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+  
+  case insck in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case insck in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-linsck $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lsocket"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90896 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:90900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
+    fi
+   ;;
+  esac
+
+
+  
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
+  echo "$ac_t""no" 1>&6
 
-    LIBS=$ac_libs
-  fi
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_insck_bsd_tcp
+    
+  
+fi
 
-  if test "$found" = "yes"; then
+  else
     
   
-  case socket in
+  case cs in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lsocket $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lcs $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case cs in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lcs $LIBS" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_DN_SKIPNAME 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBSOCKET 1
-EOF
 
-    ac_cv_func_dn_skipname=yes
-  else
     
-  :
-
-  fi
   
-
-  fi
+  case ct in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lct $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
   
+  case ct in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lct $LIBS" 
+   ;;
+  esac
 
-  fi
+
+    fi
+   ;;
+  esac
+
+
+    
   
- ;;
+  case comn in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lcomn $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
   
+  case comn in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lcomn $LIBS" 
+   ;;
   esac
 
 
+    fi
+   ;;
+  esac
 
 
-  unset ac_cv_func_res_search
-  unset ac_cv_func___res_search
-  unset found
+    
   
-  echo $ac_n "checking for res_search""... $ac_c" 1>&6
-echo "configure:90959: checking for res_search" >&5
-if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 90964 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char res_search(); below.  */
-#include <assert.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 res_search();
-
-int main() {
+  case intl in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lintl $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case intl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lintl $LIBS" 
+   ;;
+  esac
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_res_search) || defined (__stub___res_search)
-choke me
-#else
-res_search();
-#endif
 
-; return 0; }
-EOF
-if { (eval echo configure:90987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_res_search=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_res_search=no"
-fi
-rm -f conftest*
-fi
+    fi
+   ;;
+  esac
 
-if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
- echo $ac_n "checking for __res_search""... $ac_c" 1>&6
-echo "configure:91005: checking for __res_search" >&5
-if eval "test \"`echo '$''{'ac_cv_func___res_search'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 91010 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char __res_search(); below.  */
-#include <assert.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 __res_search();
 
-int main() {
+  
+    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl"
+    echo "$ac_t""Sybase32 default: $SYBASE_CT_LIBS" 1>&6
+  
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff=" 
+      $SYBASE_CT_LIBS 
+    "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub___res_search) || defined (__stub_____res_search)
-choke me
-#else
-__res_search();
-#endif
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-; return 0; }
-EOF
-if { (eval echo configure:91033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func___res_search=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func___res_search=no"
-fi
-rm -f conftest*
-fi
 
-if eval "test \"`echo '$ac_cv_func_'__res_search`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
- 
-fi
+    fi
+   ;;
+  esac
 
 
-  case $found in
-  yes) 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_SEARCH 1
-EOF
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-    ac_cv_func_res_search=yes
-  ;;
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-    *) 
   
-  unset ac_cv_lib_resolv_res_search
-  unset ac_cv_lib_resolv___res_search
-  unset found
-  echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
-echo "configure:91071: checking for res_search in -lresolv" >&5
-ac_lib_var=`echo resolv'_'res_search | 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="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 91079 "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 res_search();
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-res_search()
-; return 0; }
-EOF
-if { (eval echo configure:91090: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __res_search in -lresolv""... $ac_c" 1>&6
-echo "configure:91110: checking for __res_search in -lresolv" >&5
-ac_lib_var=`echo resolv'_'__res_search | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6
+echo "configure:96439: checking for netg_errstr in -ltcl" >&5
+ac_lib_var=`echo tcl'_'netg_errstr | 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="-lresolv  $LIBS"
+LIBS="-ltcl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 91118 "configure"
+#line 96447 "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 __res_search();
+char netg_errstr();
 
 int main() {
-__res_search()
+netg_errstr()
 ; return 0; }
 EOF
-if { (eval echo configure:91129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:96458: \"$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
@@ -91140,128 +96469,186 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+      
+  
+  case tcl in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-ltcl $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case tcl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-ltcl $LIBS" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    
+  
 else
   echo "$ac_t""no" 1>&6
-found=no
-fi
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_tcl_netg_errstr
+     
+      
   
-fi
+  case sybtcl in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case sybtcl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lsybtcl $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lresolv"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 91161 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:91165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
+    fi
+   ;;
+  esac
+
+
+    
+  
 fi
 
-    LIBS=$ac_libs
+  
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="-L$SYBASE_CT_LIBDIR"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
   fi
 
-  if test "$found" = "yes"; then
-    
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-  case resolv in
+  case $ac_ii in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lresolv $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_SEARCH 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBRESOLV 1
-EOF
 
-    ac_cv_func_res_search=yes
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-  unset ac_cv_lib_bind_res_search
-  unset ac_cv_lib_bind___res_search
-  unset found
-  echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
-echo "configure:91207: checking for res_search in -lbind" >&5
-ac_lib_var=`echo bind'_'res_search | 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="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 91215 "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 res_search();
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-res_search()
-; return 0; }
-EOF
-if { (eval echo configure:91226: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
-echo "configure:91246: checking for __res_search in -lbind" >&5
-ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
+echo "configure:96633: checking for insck__getVdate in -linsck" >&5
+ac_lib_var=`echo insck'_'insck__getVdate | 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="-lbind  $LIBS"
+LIBS="-linsck  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 91254 "configure"
+#line 96641 "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 __res_search();
+char insck__getVdate();
 
 int main() {
-__res_search()
+insck__getVdate()
 ; return 0; }
 EOF
-if { (eval echo configure:91265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:96652: \"$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
@@ -91276,128 +96663,159 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
-
   
-fi
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+  
+  case insck in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case insck in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-linsck $LIBS" 
+   ;;
+  esac
 
 
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lbind"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 91297 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:91301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
+    fi
+   ;;
+  esac
+
+
+  
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_insck_insck__getVdate
+    
+  
 fi
 
-    LIBS=$ac_libs
+    
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="-L$SYBASE_CT_LIBDIR"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
   fi
 
-  if test "$found" = "yes"; then
-    
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-  case bind in
+  case $ac_ii in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lbind $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_SEARCH 1
-EOF
+    fi
+   ;;
+  esac
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBBIND 1
-EOF
 
-    ac_cv_func_res_search=yes
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
-  
-  unset ac_cv_lib_socket_res_search
-  unset ac_cv_lib_socket___res_search
-  unset found
-  echo $ac_n "checking for res_search in -lsocket""... $ac_c" 1>&6
-echo "configure:91343: checking for res_search in -lsocket" >&5
-ac_lib_var=`echo socket'_'res_search | 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="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 91351 "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 res_search();
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-int main() {
-res_search()
-; return 0; }
-EOF
-if { (eval echo configure:91362: \"$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
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
+      fi
+    
+  fi
 
-    echo $ac_n "checking for __res_search in -lsocket""... $ac_c" 1>&6
-echo "configure:91382: checking for __res_search in -lsocket" >&5
-ac_lib_var=`echo socket'_'__res_search | sed 'y%./+-%__p_%'`
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6
+echo "configure:96800: checking for bsd_tcp in -linsck" >&5
+ac_lib_var=`echo insck'_'bsd_tcp | 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="-lsocket  $LIBS"
+LIBS="-linsck  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 91390 "configure"
+#line 96808 "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 __res_search();
+char bsd_tcp();
 
 int main() {
-__res_search()
+bsd_tcp()
 ; return 0; }
 EOF
-if { (eval echo configure:91401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:96819: \"$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
@@ -91412,618 +96830,486 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  found=yes
-else
-  echo "$ac_t""no" 1>&6
-found=no
-fi
-
   
-fi
-
-
-  if test "$found" = "yes"; then
-    ac_libs=$LIBS
-    LIBS="$LIBS -lsocket"
-    if test "$cross_compiling" = yes; then
-  found=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 91433 "configure"
-#include "confdefs.h"
-main() { return (0); }
-EOF
-if { (eval echo configure:91437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  found=no
-fi
-rm -fr conftest*
-fi
-
-    LIBS=$ac_libs
-  fi
-
-  if test "$found" = "yes"; then
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
     
   
-  case socket in
+  case insck in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lsocket $LIBS" 
+    if test "$ext_shared" = "yes"; then
+        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
+    else
+      
+  
+  case insck in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-linsck $LIBS" 
    ;;
   esac
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_RES_SEARCH 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBSOCKET 1
-EOF
+    fi
+   ;;
+  esac
 
-    ac_cv_func_res_search=yes
-  else
-    
-  :
 
-  fi
   
+else
+  echo "$ac_t""no" 1>&6
 
-  fi
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_insck_bsd_tcp
+    
   
+fi
 
   fi
-  
- ;;
-  
-  esac
+fi
 
 
-echo $ac_n "checking whether atof() accepts NAN""... $ac_c" 1>&6
-echo "configure:91490: checking whether atof() accepts NAN" >&5
-if eval "test \"`echo '$''{'ac_cv_atof_accept_nan'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+php_enable_sysvmsg=no
+
+echo $ac_n "checking whether to enable System V IPC support""... $ac_c" 1>&6
+echo "configure:96879: checking whether to enable System V IPC support" >&5
+# Check whether --enable-sysvmsg or --disable-sysvmsg was given.
+if test "${enable_sysvmsg+set}" = set; then
+  enableval="$enable_sysvmsg"
+  PHP_SYSVMSG=$enableval
 else
   
-if test "$cross_compiling" = yes; then
-  
-  ac_cv_atof_accept_nan=no
+  PHP_SYSVMSG=no
+  test "$PHP_ENABLE_ALL" && PHP_SYSVMSG=$PHP_ENABLE_ALL
 
-else
-  cat > conftest.$ac_ext <<EOF
-#line 91501 "configure"
-#include "confdefs.h"
+fi
 
-#include <math.h>
-#include <stdlib.h>
 
-#ifdef HAVE_ISNAN
-#define zend_isnan(a) isnan(a)
-#elif defined(HAVE_FPCLASS)
-#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
-#else
-#define zend_isnan(a) 0
-#endif
 
-int main(int argc, char** argv)
-{
-	return zend_isnan(atof("NAN")) ? 0 : 1;
-}
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SYSVMSG in
+shared,*)
+  PHP_SYSVMSG=`echo "$PHP_SYSVMSG"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SYSVMSG=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
-EOF
-if { (eval echo configure:91521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-  ac_cv_atof_accept_nan=yes
 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  
-  ac_cv_atof_accept_nan=no
 
-fi
-rm -fr conftest*
-fi
+echo "$ac_t""$ext_output" 1>&6
 
-fi
 
-echo "$ac_t""$ac_cv_atof_accept_nan" 1>&6
-if test "$ac_cv_atof_accept_nan" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ATOF_ACCEPTS_NAN 1
-EOF
 
-fi
 
-echo $ac_n "checking whether atof() accepts INF""... $ac_c" 1>&6
-echo "configure:91548: checking whether atof() accepts INF" >&5
-if eval "test \"`echo '$''{'ac_cv_atof_accept_inf'+set}'`\" = set"; then
+if test "$PHP_SYSVMSG" != "no"; then
+  ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
+echo "configure:96922: checking for sys/msg.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-if test "$cross_compiling" = yes; then
-  
-  ac_cv_atof_accept_inf=no
-
-else
   cat > conftest.$ac_ext <<EOF
-#line 91559 "configure"
+#line 96927 "configure"
 #include "confdefs.h"
-
-#include <math.h>
-#include <stdlib.h>
-
-#ifdef HAVE_ISINF
-#define zend_isinf(a) isinf(a)
-#elif defined(INFINITY)
-/* Might not work, but is required by ISO C99 */
-#define zend_isinf(a) (((a)==INFINITY)?1:0)
-#elif defined(HAVE_FPCLASS)
-#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
-#else
-#define zend_isinf(a) 0
-#endif
-
-int main(int argc, char** argv)
-{
-	return zend_isinf(atof("INF")) && zend_isinf(atof("-INF")) ? 0 : 1;
-}
-
+#include <sys/msg.h>
 EOF
-if { (eval echo configure:91582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-  ac_cv_atof_accept_inf=yes
-
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:96932: \"$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 -fr conftest*
-  
-  ac_cv_atof_accept_inf=no
-
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-rm -fr conftest*
+rm -f conftest*
 fi
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Cannot enable System V IPC support, sys/msg.h is missing" 1>&2; exit 1; }
+  
 fi
 
-echo "$ac_t""$ac_cv_atof_accept_inf" 1>&6
-if test "$ac_cv_atof_accept_inf" = "yes"; then
+
   cat >> confdefs.h <<\EOF
-#define HAVE_ATOF_ACCEPTS_INF 1
+#define HAVE_SYSVMSG 1
 EOF
 
-fi
+  
+  ext_builddir=ext/sysvmsg
+  ext_srcdir=$abs_srcdir/ext/sysvmsg
 
-echo $ac_n "checking whether HUGE_VAL == INF""... $ac_c" 1>&6
-echo "configure:91609: checking whether HUGE_VAL == INF" >&5
-if eval "test \"`echo '$''{'ac_cv_huge_val_inf'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_SYSVMSG_SHARED=no
+    
+  
+  case ext/sysvmsg in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-if test "$cross_compiling" = yes; then
   
-  ac_cv_huge_val_inf=yes
 
-else
-  cat > conftest.$ac_ext <<EOF
-#line 91620 "configure"
-#include "confdefs.h"
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-#include <math.h>
-#include <stdlib.h>
 
-#ifdef HAVE_ISINF
-#define zend_isinf(a) isinf(a)
-#elif defined(INFINITY)
-/* Might not work, but is required by ISO C99 */
-#define zend_isinf(a) (((a)==INFINITY)?1:0)
-#elif defined(HAVE_FPCLASS)
-#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
-#else
-#define zend_isinf(a) 0
-#endif
+  old_IFS=$IFS
+  for ac_src in sysvmsg.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-int main(int argc, char** argv)
-{
-	return zend_isinf(HUGE_VAL) ? 0 : 1;
-}
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:91643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-  ac_cv_huge_val_inf=yes
+  done
 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
+
+    EXT_STATIC="$EXT_STATIC sysvmsg"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvmsg"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_SYSVMSG_SHARED=yes
+      
+  case ext/sysvmsg in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-  ac_cv_huge_val_inf=no
 
-fi
-rm -fr conftest*
-fi
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
 
-fi
 
-echo "$ac_t""$ac_cv_huge_val_inf" 1>&6
-if test "$ac_cv_huge_val_inf" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_HUGE_VAL_INF 1
+  old_IFS=$IFS
+  for ac_src in sysvmsg.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_sysvmsg="$shared_objects_sysvmsg $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-fi
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
 
-echo $ac_n "checking whether HUGE_VAL + -HUGEVAL == NAN""... $ac_c" 1>&6
-echo "configure:91670: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5
-if eval "test \"`echo '$''{'ac_cv_huge_val_nan'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-if test "$cross_compiling" = yes; then
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsysvmsg.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(PHPSYSVMSG_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsysvmsg.so '$ext_builddir'/phpsysvmsg.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYSVMSG, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(PHPSYSVMSG_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsysvmsg.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsysvmsg.$suffix"
+  fi
   
-  ac_cv_huge_val_nan=yes
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvmsg"
 
-else
-  cat > conftest.$ac_ext <<EOF
-#line 91681 "configure"
-#include "confdefs.h"
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpsysvmsg.$suffix: $ext_builddir/phpsysvmsg.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsysvmsg.$suffix \$(phplibdir)
 
-#include <math.h>
-#include <stdlib.h>
+$ext_builddir/phpsysvmsg.$suffix: \$(shared_objects_sysvmsg) \$(PHPSYSVMSG_SHARED_DEPENDENCIES)
+	$link_cmd
 
-#ifdef HAVE_ISNAN
-#define zend_isnan(a) isnan(a)
-#elif defined(HAVE_FPCLASS)
-#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
-#else
-#define zend_isnan(a) 0
-#endif
+EOF
 
-int main(int argc, char** argv)
-{
-#if defined(__sparc__) && !(__GNUC__ >= 3)
-	/* prevent bug #27830 */
-	return 1;
-#else
-	return zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1;
-#endif
-}
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sysvmsg.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(SYSVMSG_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sysvmsg.so '$ext_builddir'/sysvmsg.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYSVMSG, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(SYSVMSG_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvmsg.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvmsg.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvmsg"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/sysvmsg.$suffix: $ext_builddir/sysvmsg.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/sysvmsg.$suffix \$(phplibdir)
+
+$ext_builddir/sysvmsg.$suffix: \$(shared_objects_sysvmsg) \$(SYSVMSG_SHARED_DEPENDENCIES)
+	$link_cmd
 
 EOF
-if { (eval echo configure:91706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_SYSVMSG 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_SYSVMSG_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
   
-  ac_cv_huge_val_nan=yes
+  case ext/sysvmsg in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  
-  ac_cv_huge_val_nan=no
 
-fi
-rm -fr conftest*
-fi
+  old_IFS=$IFS
+  for ac_src in sysvmsg.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-fi
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-echo "$ac_t""$ac_cv_huge_val_nan" 1>&6
-if test "$ac_cv_huge_val_nan" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_HUGE_VAL_NAN 1
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-fi
 
-echo $ac_n "checking whether strptime() declaration fails""... $ac_c" 1>&6
-echo "configure:91733: checking whether strptime() declaration fails" >&5
-if eval "test \"`echo '$''{'ac_cv_strptime_decl_fails'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
+        EXT_STATIC="$EXT_STATIC sysvmsg"
+        ;;
+      *)
+        
+  
+  case ext/sysvmsg in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-cat > conftest.$ac_ext <<EOF
-#line 91739 "configure"
-#include "confdefs.h"
-
-#include <time.h>
-
-int main() {
 
-#ifndef HAVE_STRPTIME
-#error no strptime() on this platform
-#else
-/* use invalid strptime() declaration to see if it fails to compile */
-int strptime(const char *s, const char *format, struct tm *tm);
-#endif
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-; return 0; }
-EOF
-if { (eval echo configure:91755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  
-  ac_cv_strptime_decl_fails=no
 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
+  old_IFS=$IFS
+  for ac_src in sysvmsg.c; do
   
-  ac_cv_strptime_decl_fails=yes
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
-fi
-rm -f conftest*
-fi
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-echo "$ac_t""$ac_cv_strptime_decl_fails" 1>&6
-if test "$ac_cv_strptime_decl_fails" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_STRPTIME_DECL_FAILS 1
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-fi
-
-for ac_hdr in wchar.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:91783: checking for $ac_hdr" >&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 91788 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:91793: \"$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
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
-for ac_func in mblen
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:91822: 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 91827 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.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 $ac_func();
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvmsg"
+  fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
-int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=sysvmsg
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
-; return 0; }
-EOF
-if { (eval echo configure:91850: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+  fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
 fi
-done
 
-for ac_func in mbrlen mbsinit
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:91877: 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 91882 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.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 $ac_func();
 
-int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
+php_enable_sysvsem=no
 
-; return 0; }
-EOF
-if { (eval echo configure:91905: \"$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"
+echo $ac_n "checking whether to enable System V semaphore support""... $ac_c" 1>&6
+echo "configure:97259: checking whether to enable System V semaphore support" >&5
+# Check whether --enable-sysvsem or --disable-sysvsem was given.
+if test "${enable_sysvsem+set}" = set; then
+  enableval="$enable_sysvsem"
+  PHP_SYSVSEM=$enableval
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+  
+  PHP_SYSVSEM=no
+  test "$PHP_ENABLE_ALL" && PHP_SYSVSEM=$PHP_ENABLE_ALL
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
 fi
-done
 
-echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:91930: checking for mbstate_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-cat > conftest.$ac_ext <<EOF
-#line 91936 "configure"
-#include "confdefs.h"
 
-#ifdef HAVE_WCHAR_H
-# include <wchar.h>
-#endif
 
-int main() {
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_SYSVSEM in
+shared,*)
+  PHP_SYSVSEM=`echo "$PHP_SYSVSEM"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_SYSVSEM=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
-int __tmp__() { mbstate_t a; }
 
-; return 0; }
-EOF
-if { (eval echo configure:91949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  
-  ac_cv_type_mbstate_t=yes
 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  
-  ac_cv_type_mbstate_t=no
+echo "$ac_t""$ext_output" 1>&6
 
-fi
-rm -f conftest*
-fi
 
-echo "$ac_t""$ac_cv_type_mbstate_t" 1>&6
-if test "$ac_cv_type_mbstate_t" = "yes"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MBSTATE_T 1
-EOF
 
-fi
 
-for ac_hdr in atomic.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:91977: checking for $ac_hdr" >&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 91982 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:91987: \"$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
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
+if test "$PHP_SYSVSEM" != "no"; then
  
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-  ext_builddir=ext/standard
-  ext_srcdir=$abs_srcdir/ext/standard
+  ext_builddir=ext/sysvsem
+  ext_srcdir=$abs_srcdir/ext/sysvsem
 
   ac_extra=
 
-  if test "" != "shared" && test "" != "yes" && test "" != "cli"; then
-    PHP_STANDARD_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_SYSVSEM_SHARED=no
     
   
-  case ext/standard in
+  case ext/sysvsem in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92038,17 +97324,7 @@ done
 
 
   old_IFS=$IFS
-  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
-                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
-                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
-                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
-                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
-                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
-                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
-                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
-                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
-                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
-                            filters.c proc_open.c streamsfuncs.c http.c; do
+  for ac_src in sysvsem.c; do
   
       IFS=.
       set $ac_src
@@ -92071,18 +97347,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC standard"
-    if test "" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC standard"
+    EXT_STATIC="$EXT_STATIC sysvsem"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvsem"
     fi
   else
-    if test "" = "shared" || test "" = "yes"; then
-      PHP_STANDARD_SHARED=yes
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_SYSVSEM_SHARED=yes
       
-  case ext/standard in
+  case ext/sysvsem in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92097,24 +97373,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
-                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
-                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
-                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
-                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
-                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
-                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
-                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
-                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
-                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
-                            filters.c proc_open.c streamsfuncs.c http.c; do
+  for ac_src in sysvsem.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_standard="$shared_objects_standard $ac_bdir$ac_obj.lo"
+      shared_objects_sysvsem="$shared_objects_sysvsem $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -92137,31 +97403,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpstandard.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(PHPSTANDARD_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpstandard.so '$ext_builddir'/phpstandard.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsysvsem.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(PHPSYSVSEM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsysvsem.so '$ext_builddir'/phpsysvsem.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSTANDARD, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYSVSEM, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(PHPSTANDARD_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(PHPSYSVSEM_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpstandard.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsysvsem.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpstandard.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsysvsem.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_standard"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvsem"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpstandard.$suffix: $ext_builddir/phpstandard.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpstandard.$suffix \$(phplibdir)
+\$(phplibdir)/phpsysvsem.$suffix: $ext_builddir/phpsysvsem.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsysvsem.$suffix \$(phplibdir)
 
-$ext_builddir/phpstandard.$suffix: \$(shared_objects_standard) \$(PHPSTANDARD_SHARED_DEPENDENCIES)
+$ext_builddir/phpsysvsem.$suffix: \$(shared_objects_sysvsem) \$(PHPSYSVSEM_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -92174,31 +97440,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/standard.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(STANDARD_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/standard.so '$ext_builddir'/standard.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sysvsem.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(SYSVSEM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sysvsem.so '$ext_builddir'/sysvsem.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(STANDARD, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYSVSEM, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_standard) $(STANDARD_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(SYSVSEM_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/standard.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvsem.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/standard.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvsem.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_standard"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvsem"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/standard.$suffix: $ext_builddir/standard.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/standard.$suffix \$(phplibdir)
+\$(phplibdir)/sysvsem.$suffix: $ext_builddir/sysvsem.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/sysvsem.$suffix \$(phplibdir)
 
-$ext_builddir/standard.$suffix: \$(shared_objects_standard) \$(STANDARD_SHARED_DEPENDENCIES)
+$ext_builddir/sysvsem.$suffix: \$(shared_objects_sysvsem) \$(SYSVSEM_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -92206,22 +97472,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_STANDARD 1
+#define COMPILE_DL_SYSVSEM 1
 EOF
 
     fi
   fi
 
-  if test "" != "shared" && test "" != "yes" && test "" = "cli"; then
-    PHP_STANDARD_SHARED=no
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_SYSVSEM_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/standard in
+  case ext/sysvsem in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92236,17 +97502,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
-                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
-                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
-                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
-                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
-                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
-                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
-                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
-                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
-                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
-                            filters.c proc_open.c streamsfuncs.c http.c; do
+  for ac_src in sysvsem.c; do
   
       IFS=.
       set $ac_src
@@ -92269,15 +97525,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC standard"
+        EXT_STATIC="$EXT_STATIC sysvsem"
         ;;
       *)
         
   
-  case ext/standard in
+  case ext/sysvsem in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92292,17 +97548,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
-                            cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
-                            flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
-                            info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
-                            microtime.c pack.c pageinfo.c quot_print.c rand.c \
-                            soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
-                            var.c versioning.c assert.c strnatcmp.c levenshtein.c \
-                            incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
-                            http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
-                            var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
-                            filters.c proc_open.c streamsfuncs.c http.c; do
+  for ac_src in sysvsem.c; do
   
       IFS=.
       set $ac_src
@@ -92327,7 +97573,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC standard"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvsem"
   fi
   
   
@@ -92336,52 +97582,78 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=standard
+    PHP_PECL_EXTENSION=sysvsem
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYSVSEM 1
+EOF
 
+ echo $ac_n "checking for union semun""... $ac_c" 1>&6
+echo "configure:97597: checking for union semun" >&5
+if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 97602 "configure"
+#include "confdefs.h"
 
-  src=$ext_srcdir/Makefile.frag
-  ac_srcdir=$ext_srcdir
-  ac_builddir=$ext_builddir
-  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
-
-
-  
-    for header_file in ext/standard/; do
-      
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+   
+int main() {
+union semun x;
+; return 0; }
+EOF
+if { (eval echo configure:97613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   
-  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
+     php_cv_semun=yes
+   
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
   
-  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INSTALLHEADERS$unique=set"
-    
-        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
-      
-  fi
+     php_cv_semun=no
+   
+fi
+rm -f conftest*
+ 
+fi
 
-    done 
-  
+echo "$ac_t""$php_cv_semun" 1>&6
+ if test "$php_cv_semun" = "yes"; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_SEMUN 1
+EOF
+
+ else
+   cat >> confdefs.h <<\EOF
+#define HAVE_SEMUN 0
+EOF
 
+ fi
+fi
 
 
 
-php_with_sybase_ct=no
+php_enable_sysvshm=no
 
-echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6
-echo "configure:92377: checking for Sybase-CT support" >&5
-# Check whether --with-sybase-ct or --without-sybase-ct was given.
-if test "${with_sybase_ct+set}" = set; then
-  withval="$with_sybase_ct"
-  PHP_SYBASE_CT=$withval
+echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6
+echo "configure:97649: checking whether to enable System V shared memory support" >&5
+# Check whether --enable-sysvshm or --disable-sysvshm was given.
+if test "${enable_sysvshm+set}" = set; then
+  enableval="$enable_sysvshm"
+  PHP_SYSVSHM=$enableval
 else
   
-  PHP_SYBASE_CT=no
-  test "$PHP_ENABLE_ALL" && PHP_SYBASE_CT=$PHP_ENABLE_ALL
+  PHP_SYSVSHM=no
+  test "$PHP_ENABLE_ALL" && PHP_SYSVSHM=$PHP_ENABLE_ALL
 
 fi
 
@@ -92389,12 +97661,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_SYBASE_CT in
+case $PHP_SYSVSHM in
 shared,*)
-  PHP_SYBASE_CT=`echo "$PHP_SYBASE_CT"|$SED 's/^shared,//'`
+  PHP_SYSVSHM=`echo "$PHP_SYSVSHM"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_SYBASE_CT=yes
+  PHP_SYSVSHM=yes
   ;;
 no)
   ext_output=no
@@ -92413,30 +97685,25 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test "$PHP_SYBASE_CT" != "no"; then
-
-  if test "$PHP_SYBASE" && test "$PHP_SYBASE" != "no" && test "$ext_shared" = "no"; then
-    { echo "configure: error: You can not use both --with-sybase and --with-sybase-ct in same build!" 1>&2; exit 1; }
-  fi
-
+if test "$PHP_SYSVSHM" != "no"; then
   cat >> confdefs.h <<\EOF
-#define HAVE_SYBASE_CT 1
+#define HAVE_SYSVSHM 1
 EOF
 
   
-  ext_builddir=ext/sybase_ct
-  ext_srcdir=$abs_srcdir/ext/sybase_ct
+  ext_builddir=ext/sysvshm
+  ext_srcdir=$abs_srcdir/ext/sysvshm
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SYBASE_CT_SHARED=no
+    PHP_SYSVSHM_SHARED=no
     
   
-  case ext/sybase_ct in
+  case ext/sysvshm in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92451,7 +97718,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_sybase_ct.c; do
+  for ac_src in sysvshm.c; do
   
       IFS=.
       set $ac_src
@@ -92474,18 +97741,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC sybase_ct"
+    EXT_STATIC="$EXT_STATIC sysvshm"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC sybase_ct"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvshm"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SYBASE_CT_SHARED=yes
+      PHP_SYSVSHM_SHARED=yes
       
-  case ext/sybase_ct in
+  case ext/sysvshm in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92500,14 +97767,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_sybase_ct.c; do
+  for ac_src in sysvshm.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_sybase_ct="$shared_objects_sybase_ct $ac_bdir$ac_obj.lo"
+      shared_objects_sysvshm="$shared_objects_sysvshm $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -92530,31 +97797,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsybase_ct.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(PHPSYBASE_CT_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsybase_ct.so '$ext_builddir'/phpsybase_ct.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsysvshm.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(PHPSYSVSHM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsysvshm.so '$ext_builddir'/phpsysvshm.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYBASE_CT, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYSVSHM, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(PHPSYBASE_CT_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(PHPSYSVSHM_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsybase_ct.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsysvshm.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsybase_ct.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsysvshm.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sybase_ct"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvshm"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsybase_ct.$suffix: $ext_builddir/phpsybase_ct.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsybase_ct.$suffix \$(phplibdir)
+\$(phplibdir)/phpsysvshm.$suffix: $ext_builddir/phpsysvshm.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsysvshm.$suffix \$(phplibdir)
 
-$ext_builddir/phpsybase_ct.$suffix: \$(shared_objects_sybase_ct) \$(PHPSYBASE_CT_SHARED_DEPENDENCIES)
+$ext_builddir/phpsysvshm.$suffix: \$(shared_objects_sysvshm) \$(PHPSYSVSHM_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -92567,31 +97834,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sybase_ct.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(SYBASE_CT_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sybase_ct.so '$ext_builddir'/sybase_ct.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sysvshm.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(SYSVSHM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sysvshm.so '$ext_builddir'/sysvshm.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYBASE_CT, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYSVSHM, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sybase_ct) $(SYBASE_CT_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(SYSVSHM_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sybase_ct.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvshm.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sybase_ct.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvshm.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sybase_ct"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvshm"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/sybase_ct.$suffix: $ext_builddir/sybase_ct.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/sybase_ct.$suffix \$(phplibdir)
+\$(phplibdir)/sysvshm.$suffix: $ext_builddir/sysvshm.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/sysvshm.$suffix \$(phplibdir)
 
-$ext_builddir/sybase_ct.$suffix: \$(shared_objects_sybase_ct) \$(SYBASE_CT_SHARED_DEPENDENCIES)
+$ext_builddir/sysvshm.$suffix: \$(shared_objects_sysvshm) \$(SYSVSHM_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -92599,22 +97866,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_SYBASE_CT 1
+#define COMPILE_DL_SYSVSHM 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SYBASE_CT_SHARED=no
+    PHP_SYSVSHM_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/sybase_ct in
+  case ext/sysvshm in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92629,7 +97896,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_sybase_ct.c; do
+  for ac_src in sysvshm.c; do
   
       IFS=.
       set $ac_src
@@ -92652,15 +97919,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC sybase_ct"
+        EXT_STATIC="$EXT_STATIC sysvshm"
         ;;
       *)
         
   
-  case ext/sybase_ct in
+  case ext/sysvshm in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -92675,7 +97942,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_sybase_ct.c; do
+  for ac_src in sysvshm.c; do
   
       IFS=.
       set $ac_src
@@ -92700,562 +97967,114 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC sybase_ct"
-  fi
-  
-  
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
-
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=sybase_ct
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
-  fi
-
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST SYBASE_CT_SHARED_LIBADD"
-
- 
-  if test "$PHP_SYBASE_CT" = "yes"; then
-    SYBASE_CT_INCDIR=/home/sybase/include
-    SYBASE_CT_LIBDIR=/home/sybase/lib
-  else
-    SYBASE_CT_INCDIR=$PHP_SYBASE_CT/include
-    SYBASE_CT_LIBDIR=$PHP_SYBASE_CT/lib
-  fi
-
-    echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:92732: checking size of long int" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_long_int=4
-else
-  cat > conftest.$ac_ext <<EOF
-#line 92740 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long int));
-  exit(0);
-}
-EOF
-if { (eval echo configure:92752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long_int=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long_int=0
-fi
-rm -fr conftest*
-fi
-
-fi
-echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
-EOF
-
-
-  echo $ac_n "checking checking if we're on a 64-bit platform""... $ac_c" 1>&6
-echo "configure:92772: checking checking if we're on a 64-bit platform" >&5
-  if test "$ac_cv_sizeof_long_int" = "4"; then
-    echo "$ac_t""no" 1>&6
-    PHP_SYBASE_64=no
-  else
-    echo "$ac_t""yes" 1>&6
-    PHP_SYBASE_64=yes
-  fi
-
-
-  echo $ac_n "checking Checking for ctpublic.h""... $ac_c" 1>&6
-echo "configure:92783: checking Checking for ctpublic.h" >&5
-  if test -f $SYBASE_CT_INCDIR/ctpublic.h; then
-    echo "$ac_t""found in $SYBASE_CT_INCDIR" 1>&6
-    
-  if test "$SYBASE_CT_INCDIR" != "/usr/include"; then
-    
-  if test -z "$SYBASE_CT_INCDIR" || echo "$SYBASE_CT_INCDIR" | grep '^/' >/dev/null ; then
-    ai_p=$SYBASE_CT_INCDIR
-  else
-    
-    ep_dir="`echo $SYBASE_CT_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SYBASE_CT_INCDIR\"`"
-  fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
-
-  fi
-
-  else
-    { echo "configure: error: ctpublic.h missing!" 1>&2; exit 1; }
-  fi
- 
-  echo $ac_n "checking Checking Sybase libdir""... $ac_c" 1>&6
-echo "configure:92822: checking Checking Sybase libdir" >&5
-  echo "$ac_t""Have $SYBASE_CT_LIBDIR" 1>&6
- 
-  echo $ac_n "checking Checking for Sybase platform libraries""... $ac_c" 1>&6
-echo "configure:92826: checking Checking for Sybase platform libraries" >&5
-
-  
-  if test "$SYBASE_CT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SYBASE_CT_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$SYBASE_CT_LIBDIR" || echo "$SYBASE_CT_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$SYBASE_CT_LIBDIR
-  else
-    
-    ep_dir="`echo $SYBASE_CT_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$SYBASE_CT_LIBDIR\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-L$ai_p $SYBASE_CT_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && SYBASE_CT_SHARED_LIBADD="$ld_runpath_switch$ai_p $SYBASE_CT_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
-
-
-      fi
-    
-  fi
-
-  if test -f $SYBASE_CT_INCDIR/tds.h || test -f $SYBASE_CT_INCDIR/tds_sysdep_public.h; then
-    
-  
-  case ct in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lct $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case ct in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lct $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct"
-    echo "$ac_t""FreeTDS: $SYBASE_CT_LIBS" 1>&6
-  elif test -f $SYBASE_CT_LIBDIR/libsybct64.so && test $PHP_SYBASE_64 = "yes"; then
-    
-  
-  case sybcs64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybcs64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybcs64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybcs64 $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    
-  
-  case sybct64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybct64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybct64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybct64 $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    
-  
-  case sybcomn64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybcomn64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybcomn64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybcomn64 $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    
-  
-  case sybintl64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybintl64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybintl64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybintl64 $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-
-    ac_solid_uname_s=`uname -s 2>/dev/null`
-    case $ac_solid_uname_s in
-      *OSF*)                            ;; # Tru64/DEC OSF does NOT use the SYB_LP64 define
-      *) CFLAGS="${CFLAGS} -DSYB_LP64"  ;; # 
-    esac
-    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs64 -lsybct64 -lsybcomn64 -lsybintl64"
-    echo "$ac_t""Sybase64: $SYBASE_CT_LIBS" 1>&6
-  
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff=" 
-      $SYBASE_CT_LIBS 
-    "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
+    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvshm"
+  fi
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
   
-  fi
 
 
-      fi
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=sysvshm
     
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
   fi
 
-    ;;
-    esac
-  done
+fi
 
-  echo $ac_n "checking for netg_errstr in -lsybtcl64""... $ac_c" 1>&6
-echo "configure:93092: checking for netg_errstr in -lsybtcl64" >&5
-ac_lib_var=`echo sybtcl64'_'netg_errstr | 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="-lsybtcl64  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 93100 "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 netg_errstr();
 
-int main() {
-netg_errstr()
-; return 0; }
-EOF
-if { (eval echo configure:93111: \"$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"
+
+php_with_tidy=no
+
+echo $ac_n "checking for TIDY support""... $ac_c" 1>&6
+echo "configure:97993: checking for TIDY support" >&5
+# Check whether --with-tidy or --without-tidy was given.
+if test "${with_tidy+set}" = set; then
+  withval="$with_tidy"
+  PHP_TIDY=$withval
 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"
+  
+  PHP_TIDY=no
+  test "$PHP_ENABLE_ALL" && PHP_TIDY=$PHP_ENABLE_ALL
 
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-      
-  
-  case sybtcl64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybtcl64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybtcl64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybtcl64 $LIBS" 
-   ;;
-  esac
 
 
-    fi
-   ;;
-  esac
 
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_TIDY in
+shared,*)
+  PHP_TIDY=`echo "$PHP_TIDY"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_TIDY=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
-    
-  
-else
-  echo "$ac_t""no" 1>&6
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_sybtcl64_netg_errstr
-     
-      
-  
-  case sybtcl64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybtcl64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybtcl64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybtcl64 $LIBS" 
-   ;;
-  esac
 
+echo "$ac_t""$ext_output" 1>&6
 
-    fi
-   ;;
-  esac
 
 
-    
-  
-fi
 
-  
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="-L$SYBASE_CT_LIBDIR"
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+if test "$PHP_TIDY" != "no"; then
+
+  if test "$PHP_TIDY" != "yes"; then
+    TIDY_SEARCH_DIRS=$PHP_TIDY
+  else
+    TIDY_SEARCH_DIRS="/usr/local /usr"
   fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+  for i in $TIDY_SEARCH_DIRS; do
+    if test -f $i/include/tidy/tidy.h; then
+      TIDY_DIR=$i
+      TIDY_INCDIR=$i/include/tidy
+    elif test -f $i/include/tidy.h; then
+      TIDY_DIR=$i
+      TIDY_INCDIR=$i/include
+    fi
+  done
 
+  if test -z "$TIDY_DIR"; then
+    { echo "configure: error: Cannot find libtidy" 1>&2; exit 1; }
+  fi
 
-    fi
-   ;;
-  esac
+  TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR
 
+  
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
+  if test "$ext_shared" = "yes"; then
+    TIDY_SHARED_LIBADD="-ltidy $TIDY_SHARED_LIBADD"
+    if test -n "$TIDY_LIBDIR"; then
       
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+  if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+  if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$TIDY_LIBDIR
   else
     
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    ai_p="$ep_realdir/`basename \"$TIDY_LIBDIR\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+        TIDY_SHARED_LIBADD="-L$ai_p $TIDY_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && TIDY_SHARED_LIBADD="$ld_runpath_switch$ai_p $TIDY_SHARED_LIBADD"
       else
         
   
@@ -93277,154 +98096,26 @@ fi
     
   fi
 
-    ;;
-    esac
-  done
-
-  echo $ac_n "checking for insck__getVdate in -linsck64""... $ac_c" 1>&6
-echo "configure:93286: checking for insck__getVdate in -linsck64" >&5
-ac_lib_var=`echo insck64'_'insck__getVdate | 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="-linsck64  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 93294 "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 insck__getVdate();
-
-int main() {
-insck__getVdate()
-; return 0; }
-EOF
-if { (eval echo configure:93305: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-  
-  case insck64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-linsck64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case insck64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-linsck64 $LIBS" 
-   ;;
-  esac
-
-
     fi
-   ;;
-  esac
-
-
-  
-else
-  echo "$ac_t""no" 1>&6
-
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_insck64_insck__getVdate
+  else
     
-  
-fi
 
+  if test -n "$TIDY_LIBDIR"; then
     
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="-L$SYBASE_CT_LIBDIR"
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+  if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+  if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$TIDY_LIBDIR
   else
     
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    ai_p="$ep_realdir/`basename \"$TIDY_LIBDIR\"`"
   fi
 
     
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
+      
   
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
@@ -93440,188 +98131,60 @@ fi
   fi
 
 
-      fi
     
   fi
 
-    ;;
-    esac
-  done
-
-  echo $ac_n "checking for bsd_tcp in -linsck64""... $ac_c" 1>&6
-echo "configure:93453: checking for bsd_tcp in -linsck64" >&5
-ac_lib_var=`echo insck64'_'bsd_tcp | 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="-linsck64  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 93461 "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 bsd_tcp();
-
-int main() {
-bsd_tcp()
-; return 0; }
-EOF
-if { (eval echo configure:93472: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-  
-  case insck64 in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-linsck64 $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case insck64 in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-linsck64 $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-  
-else
-  echo "$ac_t""no" 1>&6
-
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_insck64_bsd_tcp
-    
-  
-fi
-
-  elif test -f $SYBASE_CT_LIBDIR/libsybct.so; then
-    
-  
-  case sybcs in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybcs $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybcs in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybcs $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    
-  
-  case sybct in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybct $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybct in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybct $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    
-  
-  case sybcomn in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybcomn $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybcomn in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybcomn $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    
-  
-  case sybintl in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybintl $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
+  fi
   
-  case sybintl in
+  
+  case tidy in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lsybintl $LIBS" 
+      LIBS="-ltidy $LIBS" 
    ;;
   esac
 
 
-    fi
-   ;;
-  esac
+
+
+  fi
 
 
   
-    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs -lsybct -lsybcomn -lsybintl"
-    echo "$ac_t""Sybase32 syb-prefix: $SYBASE_CT_LIBS" 1>&6
+  if test "$TIDY_INCDIR" != "/usr/include"; then
+    
+  if test -z "$TIDY_INCDIR" || echo "$TIDY_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$TIDY_INCDIR
+  else
+    
+    ep_dir="`echo $TIDY_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$TIDY_INCDIR\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
     
+  fi
+
+  fi
+
+
+  
   save_old_LDFLAGS=$LDFLAGS
-  ac_stuff=" 
-      $SYBASE_CT_LIBS 
-    "
+  ac_stuff=""
   
   save_ext_shared=$ext_shared
   ext_shared=yes
@@ -93714,27 +98277,27 @@ fi
     esac
   done
 
-  echo $ac_n "checking for netg_errstr in -lsybtcl""... $ac_c" 1>&6
-echo "configure:93719: checking for netg_errstr in -lsybtcl" >&5
-ac_lib_var=`echo sybtcl'_'netg_errstr | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for tidyOptGetDoc in -ltidy""... $ac_c" 1>&6
+echo "configure:98282: checking for tidyOptGetDoc in -ltidy" >&5
+ac_lib_var=`echo tidy'_'tidyOptGetDoc | 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="-lsybtcl  $LIBS"
+LIBS="-ltidy  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 93727 "configure"
+#line 98290 "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 netg_errstr();
+char tidyOptGetDoc();
 
 int main() {
-netg_errstr()
+tidyOptGetDoc()
 ; return 0; }
 EOF
-if { (eval echo configure:93738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:98301: \"$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
@@ -93753,705 +98316,807 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
     LDFLAGS=$save_old_LDFLAGS
     ext_shared=$save_ext_shared
     
-      
-  
-  case sybtcl in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case sybtcl in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybtcl $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
+  cat >> confdefs.h <<\EOF
+#define HAVE_TIDYOPTGETDOC 1
+EOF
 
-    
+  
   
 else
   echo "$ac_t""no" 1>&6
 
     LDFLAGS=$save_old_LDFLAGS
     ext_shared=$save_ext_shared
-    unset ac_cv_lib_sybtcl_netg_errstr
-     
-      
-  
-  case sybtcl in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
+    unset ac_cv_lib_tidy_tidyOptGetDoc
+    
   
-  case sybtcl in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybtcl $LIBS" 
-   ;;
-  esac
-
+fi
 
-    fi
-   ;;
-  esac
 
 
-    
   
-fi
+  ext_builddir=ext/tidy
+  ext_srcdir=$abs_srcdir/ext/tidy
 
-  
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_TIDY_SHARED=no
     
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="-L$SYBASE_CT_LIBDIR"
   
-  save_ext_shared=$ext_shared
-  ext_shared=yes
+  case ext/tidy in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in tidy.c; do
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC tidy"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC tidy"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_TIDY_SHARED=yes
       
+  case ext/tidy in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in tidy.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
+      shared_objects_tidy="$shared_objects_tidy $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phptidy.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(PHPTIDY_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phptidy.so '$ext_builddir'/phptidy.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPTIDY, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(PHPTIDY_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phptidy.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phptidy.$suffix"
+  fi
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tidy"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phptidy.$suffix: $ext_builddir/phptidy.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phptidy.$suffix \$(phplibdir)
+
+$ext_builddir/phptidy.$suffix: \$(shared_objects_tidy) \$(PHPTIDY_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/tidy.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(TIDY_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/tidy.so '$ext_builddir'/tidy.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(TIDY, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(TIDY_SHARED_LIBADD)'
+      ;;
   esac
 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/tidy.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/tidy.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tidy"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/tidy.$suffix: $ext_builddir/tidy.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/tidy.$suffix \$(phplibdir)
+
+$ext_builddir/tidy.$suffix: \$(shared_objects_tidy) \$(TIDY_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_TIDY 1
+EOF
 
     fi
-   ;;
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_TIDY_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
+  
+  case ext/tidy in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
+  old_IFS=$IFS
+  for ac_src in tidy.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC tidy"
+        ;;
+      *)
         
   
+  case ext/tidy in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in tidy.c; do
   
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC tidy"
   fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
 
 
-      fi
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=tidy
     
-  fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
-    ;;
-    esac
-  done
+  fi
 
-  echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
-echo "configure:93913: checking for insck__getVdate in -linsck" >&5
-ac_lib_var=`echo insck'_'insck__getVdate | 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="-linsck  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 93921 "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 insck__getVdate();
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST TIDY_SHARED_LIBADD"
 
-int main() {
-insck__getVdate()
-; return 0; }
+  cat >> confdefs.h <<\EOF
+#define HAVE_TIDY 1
 EOF
-if { (eval echo configure:93932: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-  
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
+
+
+
+
+php_enable_tokenizer=yes
+
+echo $ac_n "checking whether to enable tokenizer support""... $ac_c" 1>&6
+echo "configure:98645: checking whether to enable tokenizer support" >&5
+# Check whether --enable-tokenizer or --disable-tokenizer was given.
+if test "${enable_tokenizer+set}" = set; then
+  enableval="$enable_tokenizer"
+  PHP_TOKENIZER=$enableval
+else
   
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-linsck $LIBS" 
-   ;;
-  esac
+  PHP_TOKENIZER=yes
+  test "$PHP_ENABLE_ALL" && PHP_TOKENIZER=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_TOKENIZER in
+shared,*)
+  PHP_TOKENIZER=`echo "$PHP_TOKENIZER"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_TOKENIZER=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
 
-    fi
-   ;;
-  esac
 
+echo "$ac_t""$ext_output" 1>&6
 
-  
-else
-  echo "$ac_t""no" 1>&6
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_insck_insck__getVdate
-    
+
+
+if test "$PHP_TOKENIZER" != "no"; then
   
-fi
+  ext_builddir=ext/tokenizer
+  ext_srcdir=$abs_srcdir/ext/tokenizer
 
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_TOKENIZER_SHARED=no
     
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="-L$SYBASE_CT_LIBDIR"
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
   
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
+  case ext/tokenizer in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in tokenizer.c tokenizer_data.c; do
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-    fi
-   ;;
-  esac
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+    EXT_STATIC="$EXT_STATIC tokenizer"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC tokenizer"
+    fi
   else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_TOKENIZER_SHARED=yes
+      
+  case ext/tokenizer in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  fi
 
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
 
-      fi
-    
-  fi
 
-    ;;
-    esac
-  done
+  old_IFS=$IFS
+  for ac_src in tokenizer.c tokenizer_data.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_tokenizer="$shared_objects_tokenizer $ac_bdir$ac_obj.lo"
 
-  echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6
-echo "configure:94080: checking for bsd_tcp in -linsck" >&5
-ac_lib_var=`echo insck'_'bsd_tcp | 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="-linsck  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 94088 "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 bsd_tcp();
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-int main() {
-bsd_tcp()
-; return 0; }
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:94099: \"$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"
+  done
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-  
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-linsck $LIBS" 
-   ;;
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phptokenizer.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(PHPTOKENIZER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phptokenizer.so '$ext_builddir'/phptokenizer.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPTOKENIZER, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(PHPTOKENIZER_SHARED_LIBADD)'
+      ;;
   esac
 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phptokenizer.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phptokenizer.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tokenizer"
 
-    fi
-   ;;
-  esac
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phptokenizer.$suffix: $ext_builddir/phptokenizer.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phptokenizer.$suffix \$(phplibdir)
 
+$ext_builddir/phptokenizer.$suffix: \$(shared_objects_tokenizer) \$(PHPTOKENIZER_SHARED_DEPENDENCIES)
+	$link_cmd
 
-  
-else
-  echo "$ac_t""no" 1>&6
+EOF
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_insck_bsd_tcp
-    
-  
-fi
+          ;;
+        *)
+          
+  install_modules="install-modules"
 
-  else
-    
-  
-  case cs in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lcs $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case cs in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lcs $LIBS" 
-   ;;
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/tokenizer.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(TOKENIZER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/tokenizer.so '$ext_builddir'/tokenizer.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(TOKENIZER, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(TOKENIZER_SHARED_LIBADD)'
+      ;;
   esac
 
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/tokenizer.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/tokenizer.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tokenizer"
 
-    fi
-   ;;
-  esac
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/tokenizer.$suffix: $ext_builddir/tokenizer.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/tokenizer.$suffix \$(phplibdir)
 
+$ext_builddir/tokenizer.$suffix: \$(shared_objects_tokenizer) \$(TOKENIZER_SHARED_DEPENDENCIES)
+	$link_cmd
 
-    
-  
-  case ct in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lct $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
-  
-  case ct in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lct $LIBS" 
-   ;;
-  esac
+EOF
 
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_TOKENIZER 1
+EOF
 
     fi
-   ;;
-  esac
-
+  fi
 
-    
-  
-  case comn in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lcomn $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_TOKENIZER_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
+        
   
-  case comn in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lcomn $LIBS" 
-   ;;
+  case ext/tokenizer in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
+  
+  
 
-
-    fi
-   ;;
-  esac
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
-    
+  old_IFS=$IFS
+  for ac_src in tokenizer.c tokenizer_data.c; do
   
-  case intl in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lintl $SYBASE_CT_SHARED_LIBADD" 
-    else
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  
-  case intl in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lintl $LIBS" 
-   ;;
-  esac
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-    fi
-   ;;
-  esac
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
 
-  
-    SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl"
-    echo "$ac_t""Sybase32 default: $SYBASE_CT_LIBS" 1>&6
-  
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff=" 
-      $SYBASE_CT_LIBS 
-    "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
+        EXT_STATIC="$EXT_STATIC tokenizer"
+        ;;
+      *)
         
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
+  case ext/tokenizer in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
 
-    fi
-   ;;
-  esac
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
+  old_IFS=$IFS
+  for ac_src in tokenizer.c tokenizer_data.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
-    
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC tokenizer"
+  fi
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
   
-  fi
 
 
-      fi
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=tokenizer
     
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
   fi
 
-    ;;
-    esac
-  done
+  
+  src=$ext_srcdir/Makefile.frag
+  ac_srcdir=$ext_srcdir
+  ac_builddir=$ext_builddir
+  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
 
-  echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6
-echo "configure:94346: checking for netg_errstr in -ltcl" >&5
-ac_lib_var=`echo tcl'_'netg_errstr | 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="-ltcl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 94354 "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 netg_errstr();
+fi
 
-int main() {
-netg_errstr()
-; return 0; }
-EOF
-if { (eval echo configure:94365: \"$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"
+
+
+php_enable_wddx=no
+
+echo $ac_n "checking whether to enable WDDX support""... $ac_c" 1>&6
+echo "configure:98991: checking whether to enable WDDX support" >&5
+# Check whether --enable-wddx or --disable-wddx was given.
+if test "${enable_wddx+set}" = set; then
+  enableval="$enable_wddx"
+  PHP_WDDX=$enableval
 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"
+  
+  PHP_WDDX=no
+  test "$PHP_ENABLE_ALL" && PHP_WDDX=$PHP_ENABLE_ALL
 
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_WDDX in
+shared,*)
+  PHP_WDDX=`echo "$PHP_WDDX"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_WDDX=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test -z "$PHP_LIBXML_DIR"; then
   
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-      
+php_with_libxml_dir=no
+
+echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
+echo "configure:99036: checking libxml2 install dir" >&5
+# Check whether --with-libxml-dir or --without-libxml-dir was given.
+if test "${with_libxml_dir+set}" = set; then
+  withval="$with_libxml_dir"
+  PHP_LIBXML_DIR=$withval
+else
   
-  case tcl in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-ltcl $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
+  PHP_LIBXML_DIR=no
   
-  case tcl in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-ltcl $LIBS" 
-   ;;
-  esac
 
+fi
 
-    fi
-   ;;
-  esac
 
+ext_output=$PHP_LIBXML_DIR
+echo "$ac_t""$ext_output" 1>&6
 
-    
-  
-else
-  echo "$ac_t""no" 1>&6
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_tcl_netg_errstr
-     
-      
+
+fi
+
+
+php_with_libexpat_dir=no
+
+echo $ac_n "checking libexpat dir for WDDX""... $ac_c" 1>&6
+echo "configure:99060: checking libexpat dir for WDDX" >&5
+# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
+if test "${with_libexpat_dir+set}" = set; then
+  withval="$with_libexpat_dir"
+  PHP_LIBEXPAT_DIR=$withval
+else
   
-  case sybtcl in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
+  PHP_LIBEXPAT_DIR=no
   
-  case sybtcl in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lsybtcl $LIBS" 
-   ;;
-  esac
+
+fi
+
+
+ext_output=$PHP_LIBEXPAT_DIR
+echo "$ac_t""$ext_output" 1>&6
+
 
 
-    fi
-   ;;
-  esac
 
+if test "$PHP_WDDX" != "no"; then
+
+        if test "$PHP_LIBEXPAT_DIR" = "no"; then
+    if test "$PHP_LIBXML" = "no"; then
+      { echo "configure: error: WDDX extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
+    fi
 
     
+echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
+echo "configure:99088: checking for xml2-config path" >&5
+if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
+  for i in $PHP_LIBXML_DIR /usr/local /usr; do
+    if test -x "$i/bin/xml2-config"; then
+      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+      break
+    fi
+  done
+
 fi
 
-  
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="-L$SYBASE_CT_LIBDIR"
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
+echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
+
+  if test -x "$ac_cv_php_xml2_config_path"; then
+    XML2_CONFIG="$ac_cv_php_xml2_config_path"
+    libxml_full_version=`$XML2_CONFIG --version`
+    ac_IFS=$IFS
+    IFS="."
+    set $libxml_full_version
+    IFS=$ac_IFS
+    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
+    if test "$LIBXML_VERSION" -ge "2006011"; then
+      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_INCS=`$XML2_CONFIG --cflags`
+      
+  for ac_i in $LIBXML_LIBS; do
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
+        WDDX_SHARED_LIBADD="$WDDX_SHARED_LIBADD -pthread"
       else
         
   
@@ -94473,7 +99138,7 @@ fi
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
+        WDDX_SHARED_LIBADD="$WDDX_SHARED_LIBADD -l$ac_ii" 
     else
       
   
@@ -94508,8 +99173,8 @@ fi
 
     
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+        WDDX_SHARED_LIBADD="-L$ai_p $WDDX_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && WDDX_SHARED_LIBADD="$ld_runpath_switch$ai_p $WDDX_SHARED_LIBADD"
       else
         
   
@@ -94535,133 +99200,13 @@ fi
     esac
   done
 
-  echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
-echo "configure:94540: checking for insck__getVdate in -linsck" >&5
-ac_lib_var=`echo insck'_'insck__getVdate | 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="-linsck  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 94548 "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 insck__getVdate();
-
-int main() {
-insck__getVdate()
-; return 0; }
-EOF
-if { (eval echo configure:94559: \"$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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-  
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
-    else
       
-  
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-linsck $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-  
-else
-  echo "$ac_t""no" 1>&6
-
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_insck_insck__getVdate
-    
-  
-fi
-
-    
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="-L$SYBASE_CT_LIBDIR"
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
+  for ac_i in $LIBXML_INCS; do
     case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    ;;
-    -L*)
+    -I*)
       ac_ii=`echo $ac_i|cut -c 3-`
       
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+  if test "$ac_ii" != "/usr/include"; then
     
   if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
     ai_p=$ac_ii
@@ -94674,209 +99219,98 @@ fi
   fi
 
     
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
+    eval "INCLUDEPATH$unique=set"
     
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
-
-
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
       fi
     
   fi
 
+  fi
+
     ;;
     esac
   done
 
-  echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6
-echo "configure:94707: checking for bsd_tcp in -linsck" >&5
-ac_lib_var=`echo insck'_'bsd_tcp | 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="-linsck  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 94715 "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 bsd_tcp();
 
-int main() {
-bsd_tcp()
-; return 0; }
-EOF
-if { (eval echo configure:94726: \"$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"
+            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
+echo "configure:99246: checking whether libxml build works" >&5
+if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
   
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" 
-    else
-      
+        
+  old_LIBS=$LIBS
+  LIBS="
+          $WDDX_SHARED_LIBADD
+         $LIBS"
+  if test "$cross_compiling" = yes; then
   
-  case insck in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-linsck $LIBS" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
+    LIBS=$old_LIBS
   
 else
-  echo "$ac_t""no" 1>&6
+  cat > conftest.$ac_ext <<EOF
+#line 99262 "configure"
+#include "confdefs.h"
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_insck_bsd_tcp
     
+    char xmlInitParser();
+    int main() {
+      xmlInitParser();
+      return 0;
+    }
   
-fi
-
-  fi
-fi
-
-
-
-php_enable_sysvmsg=no
-
-echo $ac_n "checking whether to enable System V IPC support""... $ac_c" 1>&6
-echo "configure:94786: checking whether to enable System V IPC support" >&5
-# Check whether --enable-sysvmsg or --disable-sysvmsg was given.
-if test "${enable_sysvmsg+set}" = set; then
-  enableval="$enable_sysvmsg"
-  PHP_SYSVMSG=$enableval
-else
-  
-  PHP_SYSVMSG=no
-  test "$PHP_ENABLE_ALL" && PHP_SYSVMSG=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SYSVMSG in
-shared,*)
-  PHP_SYSVMSG=`echo "$PHP_SYSVMSG"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SYSVMSG=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_SYSVMSG" != "no"; then
-  ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
-echo "configure:94829: checking for sys/msg.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 94834 "configure"
-#include "confdefs.h"
-#include <sys/msg.h>
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:94839: \"$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"
+if { (eval echo configure:99273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+    LIBS=$old_LIBS
+    
+          php_cv_libxml_build_works=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
-  :
-else
-  echo "$ac_t""no" 1>&6
-{ echo "configure: error: Cannot enable System V IPC support, sys/msg.h is missing" 1>&2; exit 1; }
+  rm -fr conftest*
+  
+    LIBS=$old_LIBS
+    
+          echo "$ac_t""no" 1>&6
+          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
+        
   
 fi
+rm -fr conftest*
+fi
 
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_SYSVMSG 1
-EOF
-
-  
-  ext_builddir=ext/sysvmsg
-  ext_srcdir=$abs_srcdir/ext/sysvmsg
+      
+fi
 
-  ac_extra=
+echo "$ac_t""$php_cv_libxml_build_works" 1>&6
+      if test "$php_cv_libxml_build_works" = "yes"; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBXML 1
+EOF
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SYSVMSG_SHARED=no
-    
+      fi
+      
+      if test "$PHP_XML" = "no"; then
+        
   
-  case ext/sysvmsg in
+  case ext/xml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -94891,7 +99325,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvmsg.c; do
+  for ac_src in compat.c; do
   
       IFS=.
       set $ac_src
@@ -94901,10 +99335,10 @@ EOF
       PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
       case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+        *.c) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre  $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
       esac
 
     cat >>Makefile.objects<<EOF
@@ -94914,309 +99348,187 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC sysvmsg"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvmsg"
-    fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SYSVMSG_SHARED=yes
-      
-  case ext/sysvmsg in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
+        
   
-
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
-
-
-  old_IFS=$IFS
-  for ac_src in sysvmsg.c; do
+    BUILD_DIR="$BUILD_DIR ext/xml"
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_sysvmsg="$shared_objects_sysvmsg $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsysvmsg.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(PHPSYSVMSG_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsysvmsg.so '$ext_builddir'/phpsysvmsg.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYSVMSG, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(PHPSYSVMSG_SHARED_LIBADD)'
-      ;;
-  esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsysvmsg.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsysvmsg.$suffix"
+      fi
+    
+    else
+      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
+    fi
+else 
+      { echo "configure: error: xml2-config not found. Use --with-libxml-dir=<DIR>" 1>&2; exit 1; }
+    
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvmsg"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsysvmsg.$suffix: $ext_builddir/phpsysvmsg.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsysvmsg.$suffix \$(phplibdir)
-
-$ext_builddir/phpsysvmsg.$suffix: \$(shared_objects_sysvmsg) \$(PHPSYSVMSG_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
-
-          ;;
-        *)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sysvmsg.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(SYSVMSG_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sysvmsg.so '$ext_builddir'/sysvmsg.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYSVMSG, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvmsg) $(SYSVMSG_SHARED_LIBADD)'
-      ;;
-  esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvmsg.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvmsg.$suffix"
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvmsg"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/sysvmsg.$suffix: $ext_builddir/sysvmsg.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/sysvmsg.$suffix \$(phplibdir)
-
-$ext_builddir/sysvmsg.$suffix: \$(shared_objects_sysvmsg) \$(SYSVMSG_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_SYSVMSG 1
-EOF
+        if test "$PHP_LIBEXPAT_DIR" != "no"; then
+    for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do
+      if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then
+        EXPAT_DIR=$i
+        break
+      fi
+    done
 
+    if test -z "$EXPAT_DIR"; then
+      { echo "configure: error: not found. Please reinstall the expat distribution." 1>&2; exit 1; }
     fi
+
+    
+  if test "$EXPAT_DIR/include" != "/usr/include"; then
+    
+  if test -z "$EXPAT_DIR/include" || echo "$EXPAT_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$EXPAT_DIR/include
+  else
+    
+    ep_dir="`echo $EXPAT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/include\"`"
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SYSVMSG_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
-  
-  case ext/sysvmsg in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+    
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+  fi
 
+    
 
-  old_IFS=$IFS
-  for ac_src in sysvmsg.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  if test "$ext_shared" = "yes"; then
+    WDDX_SHARED_LIBADD="-lexpat $WDDX_SHARED_LIBADD"
+    if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
       
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
+  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EXPAT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
+  fi
 
-        EXT_STATIC="$EXT_STATIC sysvmsg"
-        ;;
-      *)
+    
+      if test "$ext_shared" = "yes"; then
+        WDDX_SHARED_LIBADD="-L$ai_p $WDDX_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && WDDX_SHARED_LIBADD="$ld_runpath_switch$ai_p $WDDX_SHARED_LIBADD"
+      else
         
   
-  case ext/sysvmsg in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in sysvmsg.c; do
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+      fi
+    
+  fi
 
+    fi
+  else
+    
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvmsg"
+  if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
+    
+  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EXPAT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
   fi
+
+    
+      
   
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=sysvmsg
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
   fi
 
-fi
-
-
 
-php_enable_sysvsem=no
+    
+  fi
 
-echo $ac_n "checking whether to enable System V semaphore support""... $ac_c" 1>&6
-echo "configure:95166: checking whether to enable System V semaphore support" >&5
-# Check whether --enable-sysvsem or --disable-sysvsem was given.
-if test "${enable_sysvsem+set}" = set; then
-  enableval="$enable_sysvsem"
-  PHP_SYSVSEM=$enableval
-else
+  fi
   
-  PHP_SYSVSEM=no
-  test "$PHP_ENABLE_ALL" && PHP_SYSVSEM=$PHP_ENABLE_ALL
-
-fi
-
+  
+  case expat in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lexpat $LIBS" 
+   ;;
+  esac
 
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SYSVSEM in
-shared,*)
-  PHP_SYSVSEM=`echo "$PHP_SYSVSEM"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SYSVSEM=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
 
 
+  fi
 
-echo "$ac_t""$ext_output" 1>&6
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBEXPAT 1
+EOF
 
+  fi
 
+  cat >> confdefs.h <<\EOF
+#define HAVE_WDDX 1
+EOF
 
-if test "$PHP_SYSVSEM" != "no"; then
- 
-  ext_builddir=ext/sysvsem
-  ext_srcdir=$abs_srcdir/ext/sysvsem
+  
+  ext_builddir=ext/wddx
+  ext_srcdir=$abs_srcdir/ext/wddx
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SYSVSEM_SHARED=no
+    PHP_WDDX_SHARED=no
     
   
-  case ext/sysvsem in
+  case ext/wddx in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95231,7 +99543,7 @@ if test "$PHP_SYSVSEM" != "no"; then
 
 
   old_IFS=$IFS
-  for ac_src in sysvsem.c; do
+  for ac_src in wddx.c; do
   
       IFS=.
       set $ac_src
@@ -95254,18 +99566,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC sysvsem"
+    EXT_STATIC="$EXT_STATIC wddx"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvsem"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC wddx"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SYSVSEM_SHARED=yes
+      PHP_WDDX_SHARED=yes
       
-  case ext/sysvsem in
+  case ext/wddx in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95280,14 +99592,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvsem.c; do
+  for ac_src in wddx.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_sysvsem="$shared_objects_sysvsem $ac_bdir$ac_obj.lo"
+      shared_objects_wddx="$shared_objects_wddx $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -95310,31 +99622,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsysvsem.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(PHPSYSVSEM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsysvsem.so '$ext_builddir'/phpsysvsem.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpwddx.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(PHPWDDX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpwddx.so '$ext_builddir'/phpwddx.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYSVSEM, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPWDDX, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(PHPSYSVSEM_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(PHPWDDX_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsysvsem.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpwddx.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsysvsem.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpwddx.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvsem"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_wddx"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsysvsem.$suffix: $ext_builddir/phpsysvsem.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsysvsem.$suffix \$(phplibdir)
+\$(phplibdir)/phpwddx.$suffix: $ext_builddir/phpwddx.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpwddx.$suffix \$(phplibdir)
 
-$ext_builddir/phpsysvsem.$suffix: \$(shared_objects_sysvsem) \$(PHPSYSVSEM_SHARED_DEPENDENCIES)
+$ext_builddir/phpwddx.$suffix: \$(shared_objects_wddx) \$(PHPWDDX_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -95347,31 +99659,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sysvsem.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(SYSVSEM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sysvsem.so '$ext_builddir'/sysvsem.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/wddx.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(WDDX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/wddx.so '$ext_builddir'/wddx.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYSVSEM, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(WDDX, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvsem) $(SYSVSEM_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(WDDX_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvsem.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/wddx.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvsem.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/wddx.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvsem"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_wddx"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/sysvsem.$suffix: $ext_builddir/sysvsem.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/sysvsem.$suffix \$(phplibdir)
+\$(phplibdir)/wddx.$suffix: $ext_builddir/wddx.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/wddx.$suffix \$(phplibdir)
 
-$ext_builddir/sysvsem.$suffix: \$(shared_objects_sysvsem) \$(SYSVSEM_SHARED_DEPENDENCIES)
+$ext_builddir/wddx.$suffix: \$(shared_objects_wddx) \$(WDDX_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -95379,22 +99691,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_SYSVSEM 1
+#define COMPILE_DL_WDDX 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SYSVSEM_SHARED=no
+    PHP_WDDX_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/sysvsem in
+  case ext/wddx in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95409,7 +99721,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvsem.c; do
+  for ac_src in wddx.c; do
   
       IFS=.
       set $ac_src
@@ -95432,15 +99744,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC sysvsem"
+        EXT_STATIC="$EXT_STATIC wddx"
         ;;
       *)
         
   
-  case ext/sysvsem in
+  case ext/wddx in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95455,7 +99767,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvsem.c; do
+  for ac_src in wddx.c; do
   
       IFS=.
       set $ac_src
@@ -95480,7 +99792,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvsem"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC wddx"
   fi
   
   
@@ -95489,128 +99801,550 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=sysvsem
+    PHP_PECL_EXTENSION=wddx
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
- cat >> confdefs.h <<\EOF
-#define HAVE_SYSVSEM 1
-EOF
+  
+  am_i_shared=$PHP_WDDX_SHARED
+  is_it_shared=$PHP_LIBXML_SHARED
+  is_it_enabled=$PHP_LIBXML
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension wddx to build statically, but it
+depends on extension libxml, which you've configured to build shared.
+You either need to build wddx shared or build libxml statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension wddx, which depends on extension libxml,
+but you've either not enabled libxml, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLRPC_SHARED_LIBADD"
 
- echo $ac_n "checking for union semun""... $ac_c" 1>&6
-echo "configure:95504: checking for union semun" >&5
-if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then
+fi
+
+
+
+php_enable_xml=yes
+
+echo $ac_n "checking whether to enable XML support""... $ac_c" 1>&6
+echo "configure:99840: checking whether to enable XML support" >&5
+# Check whether --enable-xml or --disable-xml was given.
+if test "${enable_xml+set}" = set; then
+  enableval="$enable_xml"
+  PHP_XML=$enableval
+else
+  
+  PHP_XML=yes
+  test "$PHP_ENABLE_ALL" && PHP_XML=$PHP_ENABLE_ALL
+
+fi
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_XML in
+shared,*)
+  PHP_XML=`echo "$PHP_XML"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_XML=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test -z "$PHP_LIBXML_DIR"; then
+  
+php_with_libxml_dir=no
+
+echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
+echo "configure:99885: checking libxml2 install dir" >&5
+# Check whether --with-libxml-dir or --without-libxml-dir was given.
+if test "${with_libxml_dir+set}" = set; then
+  withval="$with_libxml_dir"
+  PHP_LIBXML_DIR=$withval
+else
+  
+  PHP_LIBXML_DIR=no
+  
+
+fi
+
+
+ext_output=$PHP_LIBXML_DIR
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+fi
+
+
+php_with_libexpat_dir=no
+
+echo $ac_n "checking libexpat install dir""... $ac_c" 1>&6
+echo "configure:99909: checking libexpat install dir" >&5
+# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
+if test "${with_libexpat_dir+set}" = set; then
+  withval="$with_libexpat_dir"
+  PHP_LIBEXPAT_DIR=$withval
+else
+  
+  PHP_LIBEXPAT_DIR=no
+  
+
+fi
+
+
+ext_output=$PHP_LIBEXPAT_DIR
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_XML" != "no"; then
+
+        if test "$PHP_LIBEXPAT_DIR" = "no"; then
+
+    if test "$PHP_LIBXML" = "no"; then
+      { echo "configure: error: XML extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
+    fi
+
+    
+echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
+echo "configure:99938: checking for xml2-config path" >&5
+if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  for i in $PHP_LIBXML_DIR /usr/local /usr; do
+    if test -x "$i/bin/xml2-config"; then
+      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+      break
+    fi
+  done
+
+fi
+
+echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
+
+  if test -x "$ac_cv_php_xml2_config_path"; then
+    XML2_CONFIG="$ac_cv_php_xml2_config_path"
+    libxml_full_version=`$XML2_CONFIG --version`
+    ac_IFS=$IFS
+    IFS="."
+    set $libxml_full_version
+    IFS=$ac_IFS
+    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
+    if test "$LIBXML_VERSION" -ge "2006011"; then
+      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_INCS=`$XML2_CONFIG --cflags`
+      
+  for ac_i in $LIBXML_LIBS; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        XML_SHARED_LIBADD="$XML_SHARED_LIBADD -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        XML_SHARED_LIBADD="$XML_SHARED_LIBADD -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+      
+  for ac_i in $LIBXML_INCS; do
+    case $ac_i in
+    -I*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/include"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    ;;
+    esac
+  done
+
+
+            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
+echo "configure:100096: checking whether libxml build works" >&5
+if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
+  
+        
+  old_LIBS=$LIBS
+  LIBS="
+          $XML_SHARED_LIBADD
+         $LIBS"
+  if test "$cross_compiling" = yes; then
+  
+    LIBS=$old_LIBS
+  
+else
   cat > conftest.$ac_ext <<EOF
-#line 95509 "configure"
+#line 100112 "configure"
 #include "confdefs.h"
 
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-   
-int main() {
-union semun x;
-; return 0; }
+    
+    char xmlInitParser();
+    int main() {
+      xmlInitParser();
+      return 0;
+    }
+  
 EOF
-if { (eval echo configure:95520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+if { (eval echo configure:100123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+    LIBS=$old_LIBS
+    
+          php_cv_libxml_build_works=yes
+        
   
-     php_cv_semun=yes
-   
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
+  rm -fr conftest*
+  
+    LIBS=$old_LIBS
+    
+          echo "$ac_t""no" 1>&6
+          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
+        
   
-     php_cv_semun=no
-   
 fi
-rm -f conftest*
- 
+rm -fr conftest*
 fi
 
-echo "$ac_t""$php_cv_semun" 1>&6
- if test "$php_cv_semun" = "yes"; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_SEMUN 1
-EOF
 
- else
-   cat >> confdefs.h <<\EOF
-#define HAVE_SEMUN 0
+      
+fi
+
+echo "$ac_t""$php_cv_libxml_build_works" 1>&6
+      if test "$php_cv_libxml_build_works" = "yes"; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBXML 1
 EOF
 
- fi
-fi
+      fi
+      
+      xml_extra_sources="compat.c"
+      
+  am_i_shared=$PHP_XML_SHARED
+  is_it_shared=$PHP_LIBXML_SHARED
+  is_it_enabled=$PHP_LIBXML
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension xml to build statically, but it
+depends on extension libxml, which you've configured to build shared.
+You either need to build xml shared or build libxml statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension xml, which depends on extension libxml,
+but you've either not enabled libxml, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+    
+    else
+      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
+    fi
+else 
+      { echo "configure: error: xml2-config not found. Use --with-libxml-dir=<DIR>" 1>&2; exit 1; }
+    
+  fi
 
+  fi
+  
+        if test "$PHP_LIBEXPAT_DIR" != "no"; then
+    for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do
+      if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then
+        EXPAT_DIR=$i
+        break
+      fi
+    done
 
+    if test -z "$EXPAT_DIR"; then
+      { echo "configure: error: not found. Please reinstall the expat distribution." 1>&2; exit 1; }
+    fi
 
-php_enable_sysvshm=no
+    
+  if test "$EXPAT_DIR/include" != "/usr/include"; then
+    
+  if test -z "$EXPAT_DIR/include" || echo "$EXPAT_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$EXPAT_DIR/include
+  else
+    
+    ep_dir="`echo $EXPAT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/include\"`"
+  fi
 
-echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6
-echo "configure:95556: checking whether to enable System V shared memory support" >&5
-# Check whether --enable-sysvshm or --disable-sysvshm was given.
-if test "${enable_sysvshm+set}" = set; then
-  enableval="$enable_sysvshm"
-  PHP_SYSVSHM=$enableval
-else
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    
+
+  if test "$ext_shared" = "yes"; then
+    XML_SHARED_LIBADD="-lexpat $XML_SHARED_LIBADD"
+    if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
+      
+  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EXPAT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
+    
+  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EXPAT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  PHP_SYSVSHM=no
-  test "$PHP_ENABLE_ALL" && PHP_SYSVSHM=$PHP_ENABLE_ALL
-
-fi
-
+  fi
 
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_SYSVSHM in
-shared,*)
-  PHP_SYSVSHM=`echo "$PHP_SYSVSHM"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_SYSVSHM=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
+    
+  fi
 
+  fi
+  
+  
+  case expat in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lexpat $LIBS" 
+   ;;
+  esac
 
 
-echo "$ac_t""$ext_output" 1>&6
 
 
+  fi
 
 
-if test "$PHP_SYSVSHM" != "no"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_SYSVSHM 1
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBEXPAT 1
 EOF
 
+  fi
+
   
-  ext_builddir=ext/sysvshm
-  ext_srcdir=$abs_srcdir/ext/sysvshm
+  ext_builddir=ext/xml
+  ext_srcdir=$abs_srcdir/ext/xml
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_SYSVSHM_SHARED=no
+    PHP_XML_SHARED=no
     
   
-  case ext/sysvshm in
+  case ext/xml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95625,7 +100359,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvshm.c; do
+  for ac_src in xml.c $xml_extra_sources; do
   
       IFS=.
       set $ac_src
@@ -95648,18 +100382,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC sysvshm"
+    EXT_STATIC="$EXT_STATIC xml"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvshm"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC xml"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_SYSVSHM_SHARED=yes
+      PHP_XML_SHARED=yes
       
-  case ext/sysvshm in
+  case ext/xml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95674,14 +100408,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvshm.c; do
+  for ac_src in xml.c $xml_extra_sources; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_sysvshm="$shared_objects_sysvshm $ac_bdir$ac_obj.lo"
+      shared_objects_xml="$shared_objects_xml $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -95704,31 +100438,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpsysvshm.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(PHPSYSVSHM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpsysvshm.so '$ext_builddir'/phpsysvshm.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(PHPXML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxml.so '$ext_builddir'/phpxml.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPSYSVSHM, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXML, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(PHPSYSVSHM_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(PHPXML_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpsysvshm.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxml.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpsysvshm.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxml.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvshm"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xml"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpsysvshm.$suffix: $ext_builddir/phpsysvshm.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpsysvshm.$suffix \$(phplibdir)
+\$(phplibdir)/phpxml.$suffix: $ext_builddir/phpxml.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxml.$suffix \$(phplibdir)
 
-$ext_builddir/phpsysvshm.$suffix: \$(shared_objects_sysvshm) \$(PHPSYSVSHM_SHARED_DEPENDENCIES)
+$ext_builddir/phpxml.$suffix: \$(shared_objects_xml) \$(PHPXML_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -95741,31 +100475,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/sysvshm.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(SYSVSHM_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/sysvshm.so '$ext_builddir'/sysvshm.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(XML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xml.so '$ext_builddir'/xml.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(SYSVSHM, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XML, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_sysvshm) $(SYSVSHM_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(XML_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvshm.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xml.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvshm.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xml.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvshm"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xml"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/sysvshm.$suffix: $ext_builddir/sysvshm.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/sysvshm.$suffix \$(phplibdir)
+\$(phplibdir)/xml.$suffix: $ext_builddir/xml.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/xml.$suffix \$(phplibdir)
 
-$ext_builddir/sysvshm.$suffix: \$(shared_objects_sysvshm) \$(SYSVSHM_SHARED_DEPENDENCIES)
+$ext_builddir/xml.$suffix: \$(shared_objects_xml) \$(XML_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -95773,22 +100507,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_SYSVSHM 1
+#define COMPILE_DL_XML 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_SYSVSHM_SHARED=no
+    PHP_XML_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/sysvshm in
+  case ext/xml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95803,7 +100537,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvshm.c; do
+  for ac_src in xml.c $xml_extra_sources; do
   
       IFS=.
       set $ac_src
@@ -95826,15 +100560,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC sysvshm"
+        EXT_STATIC="$EXT_STATIC xml"
         ;;
       *)
         
   
-  case ext/sysvshm in
+  case ext/xml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -95849,7 +100583,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in sysvshm.c; do
+  for ac_src in xml.c $xml_extra_sources; do
   
       IFS=.
       set $ac_src
@@ -95874,7 +100608,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvshm"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC xml"
   fi
   
   
@@ -95883,28 +100617,53 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=sysvshm
+    PHP_PECL_EXTENSION=xml
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST XML_SHARED_LIBADD"
+
+  
+  
+    for header_file in ext/xml/; do
+      
+  
+  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INSTALLHEADERS$unique=set"
+    
+        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
+      
+  fi
+
+    done 
+  
+
+  cat >> confdefs.h <<\EOF
+#define HAVE_XML 1
+EOF
+
 fi
 
 
 
-php_with_tidy=no
+php_enable_xmlreader=yes
 
-echo $ac_n "checking for TIDY support""... $ac_c" 1>&6
-echo "configure:95900: checking for TIDY support" >&5
-# Check whether --with-tidy or --without-tidy was given.
-if test "${with_tidy+set}" = set; then
-  withval="$with_tidy"
-  PHP_TIDY=$withval
+echo $ac_n "checking whether to enable XMLReader support""... $ac_c" 1>&6
+echo "configure:100659: checking whether to enable XMLReader support" >&5
+# Check whether --enable-xmlreader or --disable-xmlreader was given.
+if test "${enable_xmlreader+set}" = set; then
+  enableval="$enable_xmlreader"
+  PHP_XMLREADER=$enableval
 else
   
-  PHP_TIDY=no
-  test "$PHP_ENABLE_ALL" && PHP_TIDY=$PHP_ENABLE_ALL
+  PHP_XMLREADER=yes
+  test "$PHP_ENABLE_ALL" && PHP_XMLREADER=$PHP_ENABLE_ALL
 
 fi
 
@@ -95912,12 +100671,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_TIDY in
+case $PHP_XMLREADER in
 shared,*)
-  PHP_TIDY=`echo "$PHP_TIDY"|$SED 's/^shared,//'`
+  PHP_XMLREADER=`echo "$PHP_XMLREADER"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_TIDY=yes
+  PHP_XMLREADER=yes
   ;;
 no)
   ext_output=no
@@ -95936,171 +100695,72 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test "$PHP_TIDY" != "no"; then
-
-  if test "$PHP_TIDY" != "yes"; then
-    TIDY_SEARCH_DIRS=$PHP_TIDY
-  else
-    TIDY_SEARCH_DIRS="/usr/local /usr"
-  fi
-
-  for i in $TIDY_SEARCH_DIRS; do
-    if test -f $i/include/tidy/tidy.h; then
-      TIDY_DIR=$i
-      TIDY_INCDIR=$i/include/tidy
-    elif test -f $i/include/tidy.h; then
-      TIDY_DIR=$i
-      TIDY_INCDIR=$i/include
-    fi
-  done
-
-  if test -z "$TIDY_DIR"; then
-    { echo "configure: error: Cannot find libtidy" 1>&2; exit 1; }
-  fi
-
-  TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR
-
-  
-
-  if test "$ext_shared" = "yes"; then
-    TIDY_SHARED_LIBADD="-ltidy $TIDY_SHARED_LIBADD"
-    if test -n "$TIDY_LIBDIR"; then
-      
-  if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$TIDY_LIBDIR
-  else
-    
-    ep_dir="`echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$TIDY_LIBDIR\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        TIDY_SHARED_LIBADD="-L$ai_p $TIDY_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && TIDY_SHARED_LIBADD="$ld_runpath_switch$ai_p $TIDY_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+if test -z "$PHP_LIBXML_DIR"; then
   
-  fi
-
-
-      fi
-    
-  fi
-
-    fi
-  else
-    
-
-  if test -n "$TIDY_LIBDIR"; then
-    
-  if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$TIDY_LIBDIR
-  else
-    
-    ep_dir="`echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$TIDY_LIBDIR\"`"
-  fi
+php_with_libxml_dir=no
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
+echo "configure:100704: checking libxml2 install dir" >&5
+# Check whether --with-libxml-dir or --without-libxml-dir was given.
+if test "${with_libxml_dir+set}" = set; then
+  withval="$with_libxml_dir"
+  PHP_LIBXML_DIR=$withval
+else
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  PHP_LIBXML_DIR=no
   
-  fi
-
 
-    
-  fi
+fi
 
-  fi
-  
-  
-  case tidy in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-ltidy $LIBS" 
-   ;;
-  esac
 
+ext_output=$PHP_LIBXML_DIR
+echo "$ac_t""$ext_output" 1>&6
 
 
 
-  fi
+fi
 
+if test "$PHP_XMLREADER" != "no"; then
 
-  
-  if test "$TIDY_INCDIR" != "/usr/include"; then
-    
-  if test -z "$TIDY_INCDIR" || echo "$TIDY_INCDIR" | grep '^/' >/dev/null ; then
-    ai_p=$TIDY_INCDIR
-  else
-    
-    ep_dir="`echo $TIDY_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$TIDY_INCDIR\"`"
+  if test "$PHP_LIBXML" = "no"; then
+    { echo "configure: error: XMLReader extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
   fi
 
-    
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
+echo "configure:100732: checking for xml2-config path" >&5
+if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+  for i in $PHP_LIBXML_DIR /usr/local /usr; do
+    if test -x "$i/bin/xml2-config"; then
+      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+      break
+    fi
+  done
 
-  fi
+fi
 
+echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
 
-  
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff=""
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
-  
-  for ac_i in $ac_stuff; do
+  if test -x "$ac_cv_php_xml2_config_path"; then
+    XML2_CONFIG="$ac_cv_php_xml2_config_path"
+    libxml_full_version=`$XML2_CONFIG --version`
+    ac_IFS=$IFS
+    IFS="."
+    set $libxml_full_version
+    IFS=$ac_IFS
+    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
+    if test "$LIBXML_VERSION" -ge "2006011"; then
+      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_INCS=`$XML2_CONFIG --cflags`
+      
+  for ac_i in $LIBXML_LIBS; do
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
+        XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -pthread"
       else
         
   
@@ -96122,7 +100782,7 @@ if test "$PHP_TIDY" != "no"; then
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
+        XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -l$ac_ii" 
     else
       
   
@@ -96157,8 +100817,8 @@ if test "$PHP_TIDY" != "no"; then
 
     
       if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+        XMLREADER_SHARED_LIBADD="-L$ai_p $XMLREADER_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XMLREADER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLREADER_SHARED_LIBADD"
       else
         
   
@@ -96184,77 +100844,128 @@ if test "$PHP_TIDY" != "no"; then
     esac
   done
 
-  echo $ac_n "checking for tidyOptGetDoc in -ltidy""... $ac_c" 1>&6
-echo "configure:96189: checking for tidyOptGetDoc in -ltidy" >&5
-ac_lib_var=`echo tidy'_'tidyOptGetDoc | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+      
+  for ac_i in $LIBXML_INCS; do
+    case $ac_i in
+    -I*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/include"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    ;;
+    esac
+  done
+
+
+            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
+echo "configure:100890: checking whether libxml build works" >&5
+if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-ltidy  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 96197 "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 tidyOptGetDoc();
-
-int main() {
-tidyOptGetDoc()
-; return 0; }
-EOF
-if { (eval echo configure:96208: \"$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"
+  
+        
+  old_LIBS=$LIBS
+  LIBS="
+          $XMLREADER_SHARED_LIBADD
+         $LIBS"
+  if test "$cross_compiling" = yes; then
+  
+    LIBS=$old_LIBS
+  
 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"
+  cat > conftest.$ac_ext <<EOF
+#line 100906 "configure"
+#include "confdefs.h"
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
     
-  cat >> confdefs.h <<\EOF
-#define HAVE_TIDYOPTGETDOC 1
+    char xmlInitParser();
+    int main() {
+      xmlInitParser();
+      return 0;
+    }
+  
 EOF
-
+if { (eval echo configure:100917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
+    LIBS=$old_LIBS
+    
+          php_cv_libxml_build_works=yes
+        
   
 else
-  echo "$ac_t""no" 1>&6
-
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_tidy_tidyOptGetDoc
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+    LIBS=$old_LIBS
     
+          echo "$ac_t""no" 1>&6
+          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
+        
   
 fi
+rm -fr conftest*
+fi
 
 
+      
+fi
 
-  
-  ext_builddir=ext/tidy
-  ext_srcdir=$abs_srcdir/ext/tidy
+echo "$ac_t""$php_cv_libxml_build_works" 1>&6
+      if test "$php_cv_libxml_build_works" = "yes"; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBXML 1
+EOF
+
+      fi
+      
+    cat >> confdefs.h <<\EOF
+#define HAVE_XMLREADER 1
+EOF
+
+    
+  ext_builddir=ext/xmlreader
+  ext_srcdir=$abs_srcdir/ext/xmlreader
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_TIDY_SHARED=no
+    PHP_XMLREADER_SHARED=no
     
   
-  case ext/tidy in
+  case ext/xmlreader in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -96269,7 +100980,7 @@ fi
 
 
   old_IFS=$IFS
-  for ac_src in tidy.c; do
+  for ac_src in php_xmlreader.c; do
   
       IFS=.
       set $ac_src
@@ -96292,18 +101003,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC tidy"
+    EXT_STATIC="$EXT_STATIC xmlreader"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC tidy"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlreader"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_TIDY_SHARED=yes
+      PHP_XMLREADER_SHARED=yes
       
-  case ext/tidy in
+  case ext/xmlreader in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -96318,14 +101029,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in tidy.c; do
+  for ac_src in php_xmlreader.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_tidy="$shared_objects_tidy $ac_bdir$ac_obj.lo"
+      shared_objects_xmlreader="$shared_objects_xmlreader $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -96348,31 +101059,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phptidy.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(PHPTIDY_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phptidy.so '$ext_builddir'/phptidy.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlreader.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(PHPXMLREADER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlreader.so '$ext_builddir'/phpxmlreader.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPTIDY, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLREADER, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(PHPTIDY_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(PHPXMLREADER_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phptidy.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlreader.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phptidy.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlreader.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tidy"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlreader"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phptidy.$suffix: $ext_builddir/phptidy.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phptidy.$suffix \$(phplibdir)
+\$(phplibdir)/phpxmlreader.$suffix: $ext_builddir/phpxmlreader.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlreader.$suffix \$(phplibdir)
 
-$ext_builddir/phptidy.$suffix: \$(shared_objects_tidy) \$(PHPTIDY_SHARED_DEPENDENCIES)
+$ext_builddir/phpxmlreader.$suffix: \$(shared_objects_xmlreader) \$(PHPXMLREADER_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -96385,31 +101096,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/tidy.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(TIDY_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/tidy.so '$ext_builddir'/tidy.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlreader.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(XMLREADER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlreader.so '$ext_builddir'/xmlreader.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(TIDY, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLREADER, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tidy) $(TIDY_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(XMLREADER_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/tidy.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlreader.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/tidy.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlreader.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tidy"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlreader"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/tidy.$suffix: $ext_builddir/tidy.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/tidy.$suffix \$(phplibdir)
+\$(phplibdir)/xmlreader.$suffix: $ext_builddir/xmlreader.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlreader.$suffix \$(phplibdir)
 
-$ext_builddir/tidy.$suffix: \$(shared_objects_tidy) \$(TIDY_SHARED_DEPENDENCIES)
+$ext_builddir/xmlreader.$suffix: \$(shared_objects_xmlreader) \$(XMLREADER_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -96417,22 +101128,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_TIDY 1
+#define COMPILE_DL_XMLREADER 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_TIDY_SHARED=no
+    PHP_XMLREADER_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/tidy in
+  case ext/xmlreader in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -96447,7 +101158,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in tidy.c; do
+  for ac_src in php_xmlreader.c; do
   
       IFS=.
       set $ac_src
@@ -96470,15 +101181,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC tidy"
+        EXT_STATIC="$EXT_STATIC xmlreader"
         ;;
       *)
         
   
-  case ext/tidy in
+  case ext/xmlreader in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -96493,7 +101204,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in tidy.c; do
+  for ac_src in php_xmlreader.c; do
   
       IFS=.
       set $ac_src
@@ -96518,7 +101229,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC tidy"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlreader"
   fi
   
   
@@ -96527,36 +101238,72 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=tidy
+    PHP_PECL_EXTENSION=xmlreader
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
+    
+  am_i_shared=$PHP_XMLREADER_SHARED
+  is_it_shared=$PHP_DOM_SHARED
+  is_it_enabled=$PHP_DOM
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension xmlreader to build statically, but it
+depends on extension dom, which you've configured to build shared.
+You either need to build xmlreader shared or build dom statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension xmlreader, which depends on extension dom,
+but you've either not enabled dom, or have disabled it.
+" 1>&2; exit 1; }
+  fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST TIDY_SHARED_LIBADD"
+    
+  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLREADER_SHARED_LIBADD"
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_TIDY 1
-EOF
+  
+    else
+      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
+    fi
+else 
+    { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; }
+  
+  fi
 
 fi
 
 
+# Local macros for automake & autoconf
 
 
-php_enable_tokenizer=yes
 
-echo $ac_n "checking whether to enable tokenizer support""... $ac_c" 1>&6
-echo "configure:96552: checking whether to enable tokenizer support" >&5
-# Check whether --enable-tokenizer or --disable-tokenizer was given.
-if test "${enable_tokenizer+set}" = set; then
-  enableval="$enable_tokenizer"
-  PHP_TOKENIZER=$enableval
+
+
+
+
+
+
+
+
+
+
+php_with_xmlrpc=no
+
+echo $ac_n "checking for XMLRPC-EPI support""... $ac_c" 1>&6
+echo "configure:101299: checking for XMLRPC-EPI support" >&5
+# Check whether --with-xmlrpc or --without-xmlrpc was given.
+if test "${with_xmlrpc+set}" = set; then
+  withval="$with_xmlrpc"
+  PHP_XMLRPC=$withval
 else
   
-  PHP_TOKENIZER=yes
-  test "$PHP_ENABLE_ALL" && PHP_TOKENIZER=$PHP_ENABLE_ALL
+  PHP_XMLRPC=no
+  test "$PHP_ENABLE_ALL" && PHP_XMLRPC=$PHP_ENABLE_ALL
 
 fi
 
@@ -96564,12 +101311,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_TOKENIZER in
+case $PHP_XMLRPC in
 shared,*)
-  PHP_TOKENIZER=`echo "$PHP_TOKENIZER"|$SED 's/^shared,//'`
+  PHP_XMLRPC=`echo "$PHP_XMLRPC"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_TOKENIZER=yes
+  PHP_XMLRPC=yes
   ;;
 no)
   ext_output=no
@@ -96588,199 +101335,341 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test "$PHP_TOKENIZER" != "no"; then
+if test -z "$PHP_LIBXML_DIR"; then
   
-  ext_builddir=ext/tokenizer
-  ext_srcdir=$abs_srcdir/ext/tokenizer
-
-  ac_extra=
+php_with_libxml_dir=no
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_TOKENIZER_SHARED=no
-    
-  
-  case ext/tokenizer in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
+echo "configure:101344: checking libxml2 install dir" >&5
+# Check whether --with-libxml-dir or --without-libxml-dir was given.
+if test "${with_libxml_dir+set}" = set; then
+  withval="$with_libxml_dir"
+  PHP_LIBXML_DIR=$withval
+else
   
+  PHP_LIBXML_DIR=no
   
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+fi
 
 
-  old_IFS=$IFS
-  for ac_src in tokenizer.c tokenizer_data.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+ext_output=$PHP_LIBXML_DIR
+echo "$ac_t""$ext_output" 1>&6
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
 
+fi
 
-    EXT_STATIC="$EXT_STATIC tokenizer"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC tokenizer"
-    fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_TOKENIZER_SHARED=yes
-      
-  case ext/tokenizer in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+
+php_with_libexpat_dir=no
+
+echo $ac_n "checking libexpat dir for XMLRPC-EPI""... $ac_c" 1>&6
+echo "configure:101368: checking libexpat dir for XMLRPC-EPI" >&5
+# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
+if test "${with_libexpat_dir+set}" = set; then
+  withval="$with_libexpat_dir"
+  PHP_LIBEXPAT_DIR=$withval
+else
   
+  PHP_LIBEXPAT_DIR=no
   
 
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
+fi
 
 
-  old_IFS=$IFS
-  for ac_src in tokenizer.c tokenizer_data.c; do
+ext_output=$PHP_LIBEXPAT_DIR
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+
+php_with_iconv_dir=no
+
+echo $ac_n "checking iconv dir for XMLRPC-EPI""... $ac_c" 1>&6
+echo "configure:101391: checking iconv dir for XMLRPC-EPI" >&5
+# Check whether --with-iconv-dir or --without-iconv-dir was given.
+if test "${with_iconv_dir+set}" = set; then
+  withval="$with_iconv_dir"
+  PHP_ICONV_DIR=$withval
+else
+  
+  PHP_ICONV_DIR=no
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_tokenizer="$shared_objects_tokenizer $ac_bdir$ac_obj.lo"
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+fi
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+
+ext_output=$PHP_ICONV_DIR
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+if test "$PHP_XMLRPC" != "no"; then
+
+  
+  am_i_shared=$PHP_XMLRPC_SHARED
+  is_it_shared=$PHP_LIBXML_SHARED
+  is_it_enabled=$PHP_LIBXML
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension xmlrpc to build statically, but it
+depends on extension libxml, which you've configured to build shared.
+You either need to build xmlrpc shared or build libxml statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension xmlrpc, which depends on extension libxml,
+but you've either not enabled libxml, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLRPC_SHARED_LIBADD"
+
+  cat >> confdefs.h <<\EOF
+#define HAVE_XMLRPC 1
 EOF
+
+
+        if test "$PHP_LIBEXPAT_DIR" = "no"; then
+
+    if test "$PHP_LIBXML" = "no"; then
+      { echo "configure: error: XML-RPC extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
+    fi
+
+    
+echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
+echo "configure:101447: checking for xml2-config path" >&5
+if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  for i in $PHP_LIBXML_DIR /usr/local /usr; do
+    if test -x "$i/bin/xml2-config"; then
+      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+      break
+    fi
   done
 
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
+fi
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phptokenizer.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(PHPTOKENIZER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phptokenizer.so '$ext_builddir'/phptokenizer.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPTOKENIZER, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(PHPTOKENIZER_SHARED_LIBADD)'
-      ;;
+echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
+
+  if test -x "$ac_cv_php_xml2_config_path"; then
+    XML2_CONFIG="$ac_cv_php_xml2_config_path"
+    libxml_full_version=`$XML2_CONFIG --version`
+    ac_IFS=$IFS
+    IFS="."
+    set $libxml_full_version
+    IFS=$ac_IFS
+    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
+    if test "$LIBXML_VERSION" -ge "2006011"; then
+      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_INCS=`$XML2_CONFIG --cflags`
+      
+  for ac_i in $LIBXML_LIBS; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        XMLRPC_SHARED_LIBADD="$XMLRPC_SHARED_LIBADD -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        XMLRPC_SHARED_LIBADD="$XMLRPC_SHARED_LIBADD -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
   esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phptokenizer.$suffix"
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phptokenizer.$suffix"
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
+      else
+        
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tokenizer"
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phptokenizer.$suffix: $ext_builddir/phptokenizer.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phptokenizer.$suffix \$(phplibdir)
 
-$ext_builddir/phptokenizer.$suffix: \$(shared_objects_tokenizer) \$(PHPTOKENIZER_SHARED_DEPENDENCIES)
-	$link_cmd
+      fi
+    
+  fi
 
-EOF
+    ;;
+    esac
+  done
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
+      
+  for ac_i in $LIBXML_INCS; do
+    case $ac_i in
+    -I*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/include"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/tokenizer.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(TOKENIZER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/tokenizer.so '$ext_builddir'/tokenizer.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(TOKENIZER, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_tokenizer) $(TOKENIZER_SHARED_LIBADD)'
-      ;;
-  esac
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/tokenizer.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/tokenizer.$suffix"
   fi
+
+    ;;
+    esac
+  done
+
+
+            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
+echo "configure:101605: checking whether libxml build works" >&5
+if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tokenizer"
+        
+  old_LIBS=$LIBS
+  LIBS="
+          $XMLRPC_SHARED_LIBADD
+         $LIBS"
+  if test "$cross_compiling" = yes; then
+  
+    LIBS=$old_LIBS
+  
+else
+  cat > conftest.$ac_ext <<EOF
+#line 101621 "configure"
+#include "confdefs.h"
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/tokenizer.$suffix: $ext_builddir/tokenizer.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/tokenizer.$suffix \$(phplibdir)
+    
+    char xmlInitParser();
+    int main() {
+      xmlInitParser();
+      return 0;
+    }
+  
+EOF
+if { (eval echo configure:101632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  
+    LIBS=$old_LIBS
+    
+          php_cv_libxml_build_works=yes
+        
+  
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+    LIBS=$old_LIBS
+    
+          echo "$ac_t""no" 1>&6
+          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
+        
+  
+fi
+rm -fr conftest*
+fi
 
-$ext_builddir/tokenizer.$suffix: \$(shared_objects_tokenizer) \$(TOKENIZER_SHARED_DEPENDENCIES)
-	$link_cmd
 
-EOF
+      
+fi
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_TOKENIZER 1
+echo "$ac_t""$php_cv_libxml_build_works" 1>&6
+      if test "$php_cv_libxml_build_works" = "yes"; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBXML 1
 EOF
 
-    fi
-  fi
-
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_TOKENIZER_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
+      fi
+      
+      if test "$PHP_XML" = "no"; then
         
   
-  case ext/tokenizer in
+  case ext/xml in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -96795,7 +101684,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in tokenizer.c tokenizer_data.c; do
+  for ac_src in compat.c; do
   
       IFS=.
       set $ac_src
@@ -96805,10 +101694,10 @@ EOF
       PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
       case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+        *.c) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre  $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
       esac
 
     cat >>Makefile.objects<<EOF
@@ -96818,212 +101707,505 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC tokenizer"
-        ;;
-      *)
         
   
-  case ext/tokenizer in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
+    BUILD_DIR="$BUILD_DIR ext/xml"
   
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+      fi
+    
+    else
+      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
+    fi
+else 
+      { echo "configure: error: xml2-config not found. Use --with-libxml-dir=<DIR>" 1>&2; exit 1; }
+    
+  fi
 
+  else
+    testval=no
+    for i in $PHP_LIBEXPAT_DIR $XMLRPC_DIR /usr/local /usr; do
+      if test -f $i/$PHP_LIBDIR/libexpat.a || test -f $i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBEXPAT 1
+EOF
 
-  old_IFS=$IFS
-  for ac_src in tokenizer.c tokenizer_data.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+        
+
+  if test "$ext_shared" = "yes"; then
+    XMLRPC_SHARED_LIBADD="-lexpat $XMLRPC_SHARED_LIBADD"
+    if test -n "$i/$PHP_LIBDIR"; then
       
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  if test "$i/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$i/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$i/$PHP_LIBDIR" || echo "$i/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$i/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $i/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$i/$PHP_LIBDIR\"`"
+  fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+    
+      if test "$ext_shared" = "yes"; then
+        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
 
+      fi
+    
+  fi
+
+    fi
+  else
+    
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC tokenizer"
+  if test -n "$i/$PHP_LIBDIR"; then
+    
+  if test "$i/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$i/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$i/$PHP_LIBDIR" || echo "$i/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$i/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $i/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$i/$PHP_LIBDIR\"`"
   fi
+
+    
+      
   
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  fi
 
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=tokenizer
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+  fi
+
+  fi
+  
+  
+  case expat in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lexpat $LIBS" 
+   ;;
+  esac
 
+
+
+
+  fi
+
+
+        
+  if test "$i/include" != "/usr/include"; then
+    
+  if test -z "$i/include" || echo "$i/include" | grep '^/' >/dev/null ; then
+    ai_p=$i/include
+  else
+    
+    ep_dir="`echo $i/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$i/include\"`"
   fi
 
+    
   
-  src=$ext_srcdir/Makefile.frag
-  ac_srcdir=$ext_srcdir
-  ac_builddir=$ext_builddir
-  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+        testval=yes
+        break
+      fi
+    done
+
+    if test "$testval" = "no"; then
+      { echo "configure: error: XML-RPC support requires libexpat. Use --with-libexpat-dir=<DIR> (deprecated!)" 1>&2; exit 1; }
+    fi
+  fi
+
+    if test "$PHP_ICONV_SHARED" = "yes" || test "$PHP_ICONV" = "no"; then
+
+    if test "$PHP_ICONV_DIR" != "no"; then
+      PHP_ICONV=$PHP_ICONV_DIR
+    fi
+  
+    if test -z "$PHP_ICONV" || test "$PHP_ICONV" = "no"; then
+      PHP_ICONV=yes
+    fi
+  
+    
+  found_iconv=no
+  unset ICONV_DIR
+
+  # Create the directories for a VPATH build:
+  $php_shtool mkdir -p ext/iconv
+
+  echo > ext/iconv/php_have_bsd_iconv.h
+  echo > ext/iconv/php_have_ibm_iconv.h
+  echo > ext/iconv/php_have_glibc_iconv.h
+  echo > ext/iconv/php_have_libiconv.h
+  echo > ext/iconv/php_have_iconv.h
+  echo > ext/iconv/php_php_iconv_impl.h
+  echo > ext/iconv/php_iconv_aliased_libiconv.h
+  echo > ext/iconv/php_php_iconv_h_path.h
+  echo > ext/iconv/php_iconv_supports_errno.h
+
+        if test "$PHP_ICONV" = "yes"; then
+    echo $ac_n "checking for iconv""... $ac_c" 1>&6
+echo "configure:101901: checking for iconv" >&5
+if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 101906 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char iconv(); below.  */
+#include <assert.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 iconv();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_iconv) || defined (__stub___iconv)
+choke me
+#else
+iconv();
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:101929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_iconv=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_iconv=no"
+fi
+rm -f conftest*
 fi
 
+if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+      found_iconv=yes
+    
+else
+  echo "$ac_t""no" 1>&6
+
+      echo $ac_n "checking for libiconv""... $ac_c" 1>&6
+echo "configure:101950: checking for libiconv" >&5
+if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 101955 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char libiconv(); below.  */
+#include <assert.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 libiconv();
 
+int main() {
 
-php_enable_wddx=no
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_libiconv) || defined (__stub___libiconv)
+choke me
+#else
+libiconv();
+#endif
 
-echo $ac_n "checking whether to enable WDDX support""... $ac_c" 1>&6
-echo "configure:96898: checking whether to enable WDDX support" >&5
-# Check whether --enable-wddx or --disable-wddx was given.
-if test "${enable_wddx+set}" = set; then
-  enableval="$enable_wddx"
-  PHP_WDDX=$enableval
+; return 0; }
+EOF
+if { (eval echo configure:101978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_libiconv=yes"
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_libiconv=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   
-  PHP_WDDX=no
-  test "$PHP_ENABLE_ALL" && PHP_WDDX=$PHP_ENABLE_ALL
+        
+  echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h
+
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBICONV 1
+EOF
 
+        found_iconv=yes
+      
+else
+  echo "$ac_t""no" 1>&6
 fi
 
+    
+fi
 
+  fi
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_WDDX in
-shared,*)
-  PHP_WDDX=`echo "$PHP_WDDX"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_WDDX=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
+        if test "$found_iconv" = "no"; then
 
+    for i in $PHP_ICONV /usr/local /usr; do
+      if test -r $i/include/giconv.h; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_GICONV_H 1
+EOF
 
+        ICONV_DIR=$i
+        iconv_lib_name=giconv
+        break
+      elif test -r $i/include/iconv.h; then
+        ICONV_DIR=$i
+        iconv_lib_name=iconv
+        break
+      fi
+    done
 
-echo "$ac_t""$ext_output" 1>&6
+    if test -z "$ICONV_DIR"; then
+      { echo "configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>" 1>&2; exit 1; }
+    fi
+  
+    if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
+       test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
+    then
+      
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+        -L$ICONV_DIR/$PHP_LIBDIR
+      "
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
 
+    fi
+   ;;
+  esac
 
 
-if test -z "$PHP_LIBXML_DIR"; then
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-php_with_libxml_dir=no
-
-echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:96943: checking libxml2 install dir" >&5
-# Check whether --with-libxml-dir or --without-libxml-dir was given.
-if test "${with_libxml_dir+set}" = set; then
-  withval="$with_libxml_dir"
-  PHP_LIBXML_DIR=$withval
-else
   
-  PHP_LIBXML_DIR=no
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-fi
-
-
-ext_output=$PHP_LIBXML_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-fi
 
+      fi
+    
+  fi
 
-php_with_libexpat_dir=no
+    ;;
+    esac
+  done
 
-echo $ac_n "checking libexpat dir for WDDX""... $ac_c" 1>&6
-echo "configure:96967: checking libexpat dir for WDDX" >&5
-# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
-if test "${with_libexpat_dir+set}" = set; then
-  withval="$with_libexpat_dir"
-  PHP_LIBEXPAT_DIR=$withval
+  echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6
+echo "configure:102134: checking for libiconv in -l$iconv_lib_name" >&5
+ac_lib_var=`echo $iconv_lib_name'_'libiconv | 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
-  
-  PHP_LIBEXPAT_DIR=no
-  
+  ac_save_LIBS="$LIBS"
+LIBS="-l$iconv_lib_name  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 102142 "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 libiconv();
 
+int main() {
+libiconv()
+; return 0; }
+EOF
+if { (eval echo configure:102153: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+        found_iconv=yes
+        
+  echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h
 
-ext_output=$PHP_LIBEXPAT_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
+        cat >> confdefs.h <<\EOF
+#define HAVE_LIBICONV 1
+EOF
 
+        
+  echo "#define ICONV_ALIASED_LIBICONV 1" > ext/iconv/php_iconv_aliased_libiconv.h
 
-if test "$PHP_WDDX" != "no"; then
+        cat >> confdefs.h <<\EOF
+#define ICONV_ALIASED_LIBICONV 1
+EOF
 
-        if test "$PHP_LIBEXPAT_DIR" = "no"; then
-    if test "$PHP_LIBXML" = "no"; then
-      { echo "configure: error: WDDX extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
-    fi
+      
+  
+else
+  echo "$ac_t""no" 1>&6
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_$iconv_lib_name_libiconv
     
-echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:96995: checking for xml2-config path" >&5
-if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
+        
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="
+          -L$ICONV_DIR/$PHP_LIBDIR
+        "
   
-  for i in $PHP_LIBXML_DIR /usr/local /usr; do
-    if test -x "$i/bin/xml2-config"; then
-      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
-      break
-    fi
-  done
-
-fi
-
-echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
-
-  if test -x "$ac_cv_php_xml2_config_path"; then
-    XML2_CONFIG="$ac_cv_php_xml2_config_path"
-    libxml_full_version=`$XML2_CONFIG --version`
-    ac_IFS=$IFS
-    IFS="."
-    set $libxml_full_version
-    IFS=$ac_IFS
-    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
-    if test "$LIBXML_VERSION" -ge "2006011"; then
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
-      LIBXML_INCS=`$XML2_CONFIG --cflags`
-      
-  for ac_i in $LIBXML_LIBS; do
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        WDDX_SHARED_LIBADD="$WDDX_SHARED_LIBADD -pthread"
+        LDFLAGS="$LDFLAGS -pthread"
       else
         
   
@@ -97045,7 +102227,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        WDDX_SHARED_LIBADD="$WDDX_SHARED_LIBADD -l$ac_ii" 
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
     else
       
   
@@ -97080,8 +102262,123 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
     
       if test "$ext_shared" = "yes"; then
-        WDDX_SHARED_LIBADD="-L$ai_p $WDDX_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && WDDX_SHARED_LIBADD="$ld_runpath_switch$ai_p $WDDX_SHARED_LIBADD"
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6
+echo "configure:102294: checking for iconv in -l$iconv_lib_name" >&5
+ac_lib_var=`echo $iconv_lib_name'_'iconv | 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="-l$iconv_lib_name  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 102302 "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 iconv();
+
+int main() {
+iconv()
+; return 0; }
+EOF
+if { (eval echo configure:102313: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    
+          found_iconv=yes
+        
+  
+else
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_$iconv_lib_name_iconv
+    
+  
+fi
+
+      
+  
+fi
+
+    fi
+  fi
+
+  if test "$found_iconv" = "yes"; then
+    
+  echo "#define HAVE_ICONV 1" > ext/iconv/php_have_iconv.h
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_ICONV 1
+EOF
+
+    if test -n "$ICONV_DIR"; then
+      
+
+  if test "$ext_shared" = "yes"; then
+    XMLRPC_SHARED_LIBADD="-l$iconv_lib_name $XMLRPC_SHARED_LIBADD"
+    if test -n "$ICONV_DIR/$PHP_LIBDIR"; then
+      
+  if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$ICONV_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
       else
         
   
@@ -97099,343 +102396,681 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   fi
 
 
-      fi
-    
-  fi
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$ICONV_DIR/$PHP_LIBDIR"; then
+    
+  if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$ICONV_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+    
+  fi
+
+  fi
+  
+  
+  case $iconv_lib_name in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-l$iconv_lib_name $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
+
+      
+  if test "$ICONV_DIR/include" != "/usr/include"; then
+    
+  if test -z "$ICONV_DIR/include" || echo "$ICONV_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$ICONV_DIR/include
+  else
+    
+    ep_dir="`echo $ICONV_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ICONV_DIR/include\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+    fi
+    
+else 
+      { echo "configure: error: iconv not found, in order to build xmlrpc you need the iconv library" 1>&2; exit 1; }
+    
+  fi
+
+  fi
+fi
+
+if test "$PHP_XMLRPC" = "yes"; then
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:102503: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:102531: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat > conftest.$ac_ext <<EOF
+#line 102538 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:102545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+  inline | yes) ;;
+  no) cat >> confdefs.h <<\EOF
+#define inline 
+EOF
+ ;;
+  *)  cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+	
+
+
+
+
+
+cat >> confdefs.h <<\EOF
+#define UNDEF_THREADS_HACK 
+EOF
+
+
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:102583: 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 102588 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:102596: \"$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*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+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 102613 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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 102631 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 102652 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:102663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
 
-    ;;
-    esac
-  done
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
 
-      
-  for ac_i in $LIBXML_INCS; do
-    case $ac_i in
-    -I*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/include"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
+fi
 
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+for ac_hdr in xmlparse.h xmltok.h stdlib.h strings.h string.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:102690: checking for $ac_hdr" >&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 102695 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:102700: \"$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
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
-  fi
 
-    ;;
-    esac
-  done
 
 
-            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:97153: checking whether libxml build works" >&5
-if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
+
+
+echo $ac_n "checking size of char""... $ac_c" 1>&6
+echo "configure:102732: checking size of char" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-        
-  old_LIBS=$LIBS
-  LIBS="
-          $WDDX_SHARED_LIBADD
-         $LIBS"
   if test "$cross_compiling" = yes; then
-  
-    LIBS=$old_LIBS
-  
+  ac_cv_sizeof_char=1
 else
   cat > conftest.$ac_ext <<EOF
-#line 97169 "configure"
+#line 102740 "configure"
 #include "confdefs.h"
-
-    
-    char xmlInitParser();
-    int main() {
-      xmlInitParser();
-      return 0;
-    }
-  
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(char));
+  exit(0);
+}
 EOF
-if { (eval echo configure:97180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:102752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  
-    LIBS=$old_LIBS
-    
-          php_cv_libxml_build_works=yes
-        
-  
+  ac_cv_sizeof_char=`cat conftestval`
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  
-    LIBS=$old_LIBS
-    
-          echo "$ac_t""no" 1>&6
-          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
-        
-  
+  ac_cv_sizeof_char=0
 fi
 rm -fr conftest*
 fi
 
-
-      
 fi
-
-echo "$ac_t""$php_cv_libxml_build_works" 1>&6
-      if test "$php_cv_libxml_build_works" = "yes"; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBXML 1
+echo "$ac_t""$ac_cv_sizeof_char" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
 EOF
 
-      fi
-      
-      if test "$PHP_XML" = "no"; then
-        
-  
-  case ext/xml in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
 
-  old_IFS=$IFS
-  for ac_src in compat.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre  $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:102773: checking size of int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_int=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 102781 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(int));
+  exit(0);
+}
+EOF
+if { (eval echo configure:102793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_int=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_int=0
+fi
+rm -fr conftest*
+fi
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+fi
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
 EOF
-  done
 
 
-        
-  
-    BUILD_DIR="$BUILD_DIR ext/xml"
-  
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:102813: checking size of long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_long=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 102821 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:102833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_long=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long=0
+fi
+rm -fr conftest*
+fi
 
-      fi
-    
-    else
-      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
-    fi
-else 
-      { echo "configure: error: xml2-config not found. Use --with-libxml-dir=<DIR>" 1>&2; exit 1; }
-    
-  fi
+fi
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
 
-  fi
 
-        if test "$PHP_LIBEXPAT_DIR" != "no"; then
-    for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do
-      if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then
-        EXPAT_DIR=$i
-        break
-      fi
-    done
+echo $ac_n "checking size of long long""... $ac_c" 1>&6
+echo "configure:102853: checking size of long long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_long_long=8
+else
+  cat > conftest.$ac_ext <<EOF
+#line 102861 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:102873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_long_long=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long_long=0
+fi
+rm -fr conftest*
+fi
 
-    if test -z "$EXPAT_DIR"; then
-      { echo "configure: error: not found. Please reinstall the expat distribution." 1>&2; exit 1; }
-    fi
+fi
+echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+EOF
 
-    
-  if test "$EXPAT_DIR/include" != "/usr/include"; then
-    
-  if test -z "$EXPAT_DIR/include" || echo "$EXPAT_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$EXPAT_DIR/include
-  else
-    
-    ep_dir="`echo $EXPAT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/include\"`"
-  fi
 
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:102893: 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 102898 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
 
-  fi
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
 
-    
+fi
 
-  if test "$ext_shared" = "yes"; then
-    WDDX_SHARED_LIBADD="-lexpat $WDDX_SHARED_LIBADD"
-    if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
-      
-  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$EXPAT_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
-  fi
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:102926: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 102931 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:102940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
 
-    
-      if test "$ext_shared" = "yes"; then
-        WDDX_SHARED_LIBADD="-L$ai_p $WDDX_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && WDDX_SHARED_LIBADD="$ld_runpath_switch$ai_p $WDDX_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
 
+fi
 
-      fi
-    
-  fi
+echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:102961: checking for uid_t in sys/types.h" >&5
+if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 102966 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_uid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
 
-    fi
-  else
-    
+fi
 
-  if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
-    
-  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$EXPAT_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
-  fi
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define uid_t int
+EOF
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
+  cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
 
+fi
 
-    
-  fi
 
-  fi
-  
-  
-  case expat in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lexpat $LIBS" 
-   ;;
-  esac
 
 
 
 
-  fi
+# Standard XMLRPC list
+for ac_func in \
+ strtoul strtoull snprintf \
+ strstr strpbrk strerror\
+ memcpy memmove
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:103006: 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 103011 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.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 $ac_func();
 
+int main() {
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBEXPAT 1
-EOF
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
 
-  fi
+; return 0; }
+EOF
+if { (eval echo configure:103034: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_WDDX 1
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
 EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
 
   
-  ext_builddir=ext/wddx
-  ext_srcdir=$abs_srcdir/ext/wddx
+  ext_builddir=ext/xmlrpc
+  ext_srcdir=$abs_srcdir/ext/xmlrpc
 
-  ac_extra=
+  ac_extra=`echo "-I@ext_srcdir@/libxmlrpc -DVERSION="0.50""|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_WDDX_SHARED=no
+    PHP_XMLRPC_SHARED=no
     
   
-  case ext/wddx in
+  case ext/xmlrpc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -97450,7 +103085,12 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in wddx.c; do
+  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
+          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
+          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
+          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
+          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
+          libxmlrpc/xml_to_soap.c; do
   
       IFS=.
       set $ac_src
@@ -97473,18 +103113,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC wddx"
+    EXT_STATIC="$EXT_STATIC xmlrpc"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC wddx"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_WDDX_SHARED=yes
+      PHP_XMLRPC_SHARED=yes
       
-  case ext/wddx in
+  case ext/xmlrpc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -97499,14 +103139,19 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in wddx.c; do
+  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
+          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
+          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
+          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
+          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
+          libxmlrpc/xml_to_soap.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_wddx="$shared_objects_wddx $ac_bdir$ac_obj.lo"
+      shared_objects_xmlrpc="$shared_objects_xmlrpc $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -97529,31 +103174,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpwddx.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(PHPWDDX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpwddx.so '$ext_builddir'/phpwddx.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlrpc.so '$ext_builddir'/phpxmlrpc.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPWDDX, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLRPC, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(PHPWDDX_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpwddx.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlrpc.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpwddx.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlrpc.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_wddx"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpwddx.$suffix: $ext_builddir/phpwddx.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpwddx.$suffix \$(phplibdir)
+\$(phplibdir)/phpxmlrpc.$suffix: $ext_builddir/phpxmlrpc.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlrpc.$suffix \$(phplibdir)
 
-$ext_builddir/phpwddx.$suffix: \$(shared_objects_wddx) \$(PHPWDDX_SHARED_DEPENDENCIES)
+$ext_builddir/phpxmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(PHPXMLRPC_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -97566,555 +103211,205 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/wddx.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(WDDX_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/wddx.so '$ext_builddir'/wddx.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlrpc.so '$ext_builddir'/xmlrpc.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(WDDX, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLRPC, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_wddx) $(WDDX_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD)'
       ;;
   esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/wddx.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/wddx.$suffix"
-  fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_wddx"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/wddx.$suffix: $ext_builddir/wddx.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/wddx.$suffix \$(phplibdir)
-
-$ext_builddir/wddx.$suffix: \$(shared_objects_wddx) \$(WDDX_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
-
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_WDDX 1
-EOF
-
-    fi
-  fi
-
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_WDDX_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
-  
-  case ext/wddx in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in wddx.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-
-        EXT_STATIC="$EXT_STATIC wddx"
-        ;;
-      *)
-        
-  
-  case ext/wddx in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in wddx.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC wddx"
-  fi
-  
-  
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
-
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=wddx
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
-  fi
-
-  
-  am_i_shared=$PHP_WDDX_SHARED
-  is_it_shared=$PHP_LIBXML_SHARED
-  is_it_enabled=$PHP_LIBXML
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension wddx to build statically, but it
-depends on extension libxml, which you've configured to build shared.
-You either need to build wddx shared or build libxml statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension wddx, which depends on extension libxml,
-but you've either not enabled libxml, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLRPC_SHARED_LIBADD"
-
-fi
-
-
-
-php_enable_xml=yes
-
-echo $ac_n "checking whether to enable XML support""... $ac_c" 1>&6
-echo "configure:97747: checking whether to enable XML support" >&5
-# Check whether --enable-xml or --disable-xml was given.
-if test "${enable_xml+set}" = set; then
-  enableval="$enable_xml"
-  PHP_XML=$enableval
-else
-  
-  PHP_XML=yes
-  test "$PHP_ENABLE_ALL" && PHP_XML=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_XML in
-shared,*)
-  PHP_XML=`echo "$PHP_XML"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_XML=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test -z "$PHP_LIBXML_DIR"; then
-  
-php_with_libxml_dir=no
-
-echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:97792: checking libxml2 install dir" >&5
-# Check whether --with-libxml-dir or --without-libxml-dir was given.
-if test "${with_libxml_dir+set}" = set; then
-  withval="$with_libxml_dir"
-  PHP_LIBXML_DIR=$withval
-else
-  
-  PHP_LIBXML_DIR=no
-  
-
-fi
-
-
-ext_output=$PHP_LIBXML_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-fi
-
-
-php_with_libexpat_dir=no
-
-echo $ac_n "checking libexpat install dir""... $ac_c" 1>&6
-echo "configure:97816: checking libexpat install dir" >&5
-# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
-if test "${with_libexpat_dir+set}" = set; then
-  withval="$with_libexpat_dir"
-  PHP_LIBEXPAT_DIR=$withval
-else
-  
-  PHP_LIBEXPAT_DIR=no
-  
-
-fi
-
-
-ext_output=$PHP_LIBEXPAT_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_XML" != "no"; then
-
-        if test "$PHP_LIBEXPAT_DIR" = "no"; then
-
-    if test "$PHP_LIBXML" = "no"; then
-      { echo "configure: error: XML extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
-    fi
-
-    
-echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:97845: checking for xml2-config path" >&5
-if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  for i in $PHP_LIBXML_DIR /usr/local /usr; do
-    if test -x "$i/bin/xml2-config"; then
-      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
-      break
-    fi
-  done
-
-fi
-
-echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
-
-  if test -x "$ac_cv_php_xml2_config_path"; then
-    XML2_CONFIG="$ac_cv_php_xml2_config_path"
-    libxml_full_version=`$XML2_CONFIG --version`
-    ac_IFS=$IFS
-    IFS="."
-    set $libxml_full_version
-    IFS=$ac_IFS
-    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
-    if test "$LIBXML_VERSION" -ge "2006011"; then
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
-      LIBXML_INCS=`$XML2_CONFIG --cflags`
-      
-  for ac_i in $LIBXML_LIBS; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        XML_SHARED_LIBADD="$XML_SHARED_LIBADD -pthread"
-      else
-        
-  
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
-
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        XML_SHARED_LIBADD="$XML_SHARED_LIBADD -l$ac_ii" 
-    else
-      
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
-
-
-    fi
-   ;;
-  esac
-
-
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
-  fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
-
-
-      fi
-    
-  fi
-
-    ;;
-    esac
-  done
-
-      
-  for ac_i in $LIBXML_INCS; do
-    case $ac_i in
-    -I*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/include"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlrpc.$suffix"
   else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlrpc.$suffix"
   fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
 
-  fi
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/xmlrpc.$suffix: $ext_builddir/xmlrpc.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlrpc.$suffix \$(phplibdir)
 
-    ;;
-    esac
-  done
+$ext_builddir/xmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(XMLRPC_SHARED_DEPENDENCIES)
+	$link_cmd
 
+EOF
 
-            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:98003: checking whether libxml build works" >&5
-if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_XMLRPC 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_XMLRPC_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
         
-  old_LIBS=$LIBS
-  LIBS="
-          $XML_SHARED_LIBADD
-         $LIBS"
-  if test "$cross_compiling" = yes; then
   
-    LIBS=$old_LIBS
+  case ext/xmlrpc in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-else
-  cat > conftest.$ac_ext <<EOF
-#line 98019 "configure"
-#include "confdefs.h"
 
-    
-    char xmlInitParser();
-    int main() {
-      xmlInitParser();
-      return 0;
-    }
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
+          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
+          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
+          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
+          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
+          libxmlrpc/xml_to_soap.c; do
   
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
-if { (eval echo configure:98030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-    LIBS=$old_LIBS
-    
-          php_cv_libxml_build_works=yes
+  done
+
+
+        EXT_STATIC="$EXT_STATIC xmlrpc"
+        ;;
+      *)
         
   
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
+  case ext/xmlrpc in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-    LIBS=$old_LIBS
-    
-          echo "$ac_t""no" 1>&6
-          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
-        
   
-fi
-rm -fr conftest*
-fi
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
 
+  old_IFS=$IFS
+  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
+          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
+          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
+          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
+          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
+          libxmlrpc/xml_to_soap.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-fi
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
-echo "$ac_t""$php_cv_libxml_build_works" 1>&6
-      if test "$php_cv_libxml_build_works" = "yes"; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBXML 1
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-      fi
-      
-      xml_extra_sources="compat.c"
-      
-  am_i_shared=$PHP_XML_SHARED
-  is_it_shared=$PHP_LIBXML_SHARED
-  is_it_enabled=$PHP_LIBXML
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension xml to build statically, but it
-depends on extension libxml, which you've configured to build shared.
-You either need to build xml shared or build libxml statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension xml, which depends on extension libxml,
-but you've either not enabled libxml, or have disabled it.
-" 1>&2; exit 1; }
+
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
   fi
   
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
+
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=xmlrpc
     
-    else
-      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
-    fi
-else 
-      { echo "configure: error: xml2-config not found. Use --with-libxml-dir=<DIR>" 1>&2; exit 1; }
-    
-  fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
+
   
-        if test "$PHP_LIBEXPAT_DIR" != "no"; then
-    for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do
-      if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then
-        EXPAT_DIR=$i
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir/libxmlrpc"
+  
+
+  XMLRPC_MODULE_TYPE=builtin
+
+elif test "$PHP_XMLRPC" != "no"; then
+
+  if test -r $PHP_XMLRPC/include/xmlrpc.h; then
+    XMLRPC_DIR=$PHP_XMLRPC/include
+  elif test -r $PHP_XMLRPC/include/xmlrpc-epi/xmlrpc.h; then
+    XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi
+  else
+    echo $ac_n "checking for XMLRPC-EPI in default path""... $ac_c" 1>&6
+echo "configure:103388: checking for XMLRPC-EPI in default path" >&5
+    for i in /usr/local /usr; do
+      if test -r $i/include/xmlrpc.h; then
+        XMLRPC_DIR=$i/include
+        echo "$ac_t""found in $i" 1>&6
         break
       fi
     done
+  fi
 
-    if test -z "$EXPAT_DIR"; then
-      { echo "configure: error: not found. Please reinstall the expat distribution." 1>&2; exit 1; }
-    fi
+  if test -z "$XMLRPC_DIR"; then
+    echo "$ac_t""not found" 1>&6
+    { echo "configure: error: Please reinstall the XMLRPC-EPI distribution" 1>&2; exit 1; }
+  fi
 
+  
+  if test "$XMLRPC_DIR" != "/usr/include"; then
     
-  if test "$EXPAT_DIR/include" != "/usr/include"; then
-    
-  if test -z "$EXPAT_DIR/include" || echo "$EXPAT_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$EXPAT_DIR/include
+  if test -z "$XMLRPC_DIR" || echo "$XMLRPC_DIR" | grep '^/' >/dev/null ; then
+    ai_p=$XMLRPC_DIR
   else
     
-    ep_dir="`echo $EXPAT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $XMLRPC_DIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/include\"`"
+    ai_p="$ep_realdir/`basename \"$XMLRPC_DIR\"`"
   fi
 
     
@@ -98135,28 +103430,28 @@ else
 
   fi
 
-    
+  
 
   if test "$ext_shared" = "yes"; then
-    XML_SHARED_LIBADD="-lexpat $XML_SHARED_LIBADD"
-    if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
+    XMLRPC_SHARED_LIBADD="-lxmlrpc $XMLRPC_SHARED_LIBADD"
+    if test -n "$XMLRPC_DIR/$PHP_LIBDIR"; then
       
-  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$EXPAT_DIR/$PHP_LIBDIR
+  if test -z "$XMLRPC_DIR/$PHP_LIBDIR" || echo "$XMLRPC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$XMLRPC_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $XMLRPC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$XMLRPC_DIR/$PHP_LIBDIR\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD"
+        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
       else
         
   
@@ -98182,18 +103477,18 @@ else
   else
     
 
-  if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then
+  if test -n "$XMLRPC_DIR/$PHP_LIBDIR"; then
     
-  if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$EXPAT_DIR/$PHP_LIBDIR
+  if test -z "$XMLRPC_DIR/$PHP_LIBDIR" || echo "$XMLRPC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$XMLRPC_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $XMLRPC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$XMLRPC_DIR/$PHP_LIBDIR\"`"
   fi
 
     
@@ -98219,10 +103514,10 @@ else
   fi
   
   
-  case expat in
+  case xmlrpc in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lexpat $LIBS" 
+      LIBS="-lxmlrpc $LIBS" 
    ;;
   esac
 
@@ -98232,26 +103527,20 @@ else
   fi
 
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_LIBEXPAT 1
-EOF
-
-  fi
-
   
-  ext_builddir=ext/xml
-  ext_srcdir=$abs_srcdir/ext/xml
+  ext_builddir=ext/xmlrpc
+  ext_srcdir=$abs_srcdir/ext/xmlrpc
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_XML_SHARED=no
+    PHP_XMLRPC_SHARED=no
     
   
-  case ext/xml in
+  case ext/xmlrpc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -98266,7 +103555,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in xml.c $xml_extra_sources; do
+  for ac_src in xmlrpc-epi-php.c; do
   
       IFS=.
       set $ac_src
@@ -98289,18 +103578,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC xml"
+    EXT_STATIC="$EXT_STATIC xmlrpc"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC xml"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_XML_SHARED=yes
+      PHP_XMLRPC_SHARED=yes
       
-  case ext/xml in
+  case ext/xmlrpc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -98315,14 +103604,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in xml.c $xml_extra_sources; do
+  for ac_src in xmlrpc-epi-php.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_xml="$shared_objects_xml $ac_bdir$ac_obj.lo"
+      shared_objects_xmlrpc="$shared_objects_xmlrpc $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -98345,31 +103634,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(PHPXML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxml.so '$ext_builddir'/phpxml.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlrpc.so '$ext_builddir'/phpxmlrpc.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXML, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLRPC, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(PHPXML_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxml.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlrpc.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxml.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlrpc.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xml"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpxml.$suffix: $ext_builddir/phpxml.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxml.$suffix \$(phplibdir)
+\$(phplibdir)/phpxmlrpc.$suffix: $ext_builddir/phpxmlrpc.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlrpc.$suffix \$(phplibdir)
 
-$ext_builddir/phpxml.$suffix: \$(shared_objects_xml) \$(PHPXML_SHARED_DEPENDENCIES)
+$ext_builddir/phpxmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(PHPXMLRPC_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -98382,31 +103671,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xml.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(XML_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xml.so '$ext_builddir'/xml.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlrpc.so '$ext_builddir'/xmlrpc.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XML, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLRPC, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xml) $(XML_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xml.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlrpc.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xml.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlrpc.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xml"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/xml.$suffix: $ext_builddir/xml.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/xml.$suffix \$(phplibdir)
+\$(phplibdir)/xmlrpc.$suffix: $ext_builddir/xmlrpc.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlrpc.$suffix \$(phplibdir)
 
-$ext_builddir/xml.$suffix: \$(shared_objects_xml) \$(XML_SHARED_DEPENDENCIES)
+$ext_builddir/xmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(XMLRPC_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -98414,22 +103703,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_XML 1
+#define COMPILE_DL_XMLRPC 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_XML_SHARED=no
+    PHP_XMLRPC_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/xml in
+  case ext/xmlrpc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -98444,7 +103733,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in xml.c $xml_extra_sources; do
+  for ac_src in xmlrpc-epi-php.c; do
   
       IFS=.
       set $ac_src
@@ -98467,15 +103756,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC xml"
+        EXT_STATIC="$EXT_STATIC xmlrpc"
         ;;
       *)
         
   
-  case ext/xml in
+  case ext/xmlrpc in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -98490,7 +103779,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in xml.c $xml_extra_sources; do
+  for ac_src in xmlrpc-epi-php.c; do
   
       IFS=.
       set $ac_src
@@ -98515,7 +103804,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC xml"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
   fi
   
   
@@ -98524,53 +103813,29 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=xml
+    PHP_PECL_EXTENSION=xmlrpc
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST XML_SHARED_LIBADD"
-
-  
-  
-    for header_file in ext/xml/; do
-      
-  
-  unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INSTALLHEADERS$unique=set"
-    
-        INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
-      
-  fi
-
-    done 
-  
-
-  cat >> confdefs.h <<\EOF
-#define HAVE_XML 1
-EOF
-
+  XMLRPC_MODULE_TYPE=external
 fi
 
 
 
-php_enable_xmlreader=yes
+php_enable_xmlwriter=yes
 
-echo $ac_n "checking whether to enable XMLReader support""... $ac_c" 1>&6
-echo "configure:98566: checking whether to enable XMLReader support" >&5
-# Check whether --enable-xmlreader or --disable-xmlreader was given.
-if test "${enable_xmlreader+set}" = set; then
-  enableval="$enable_xmlreader"
-  PHP_XMLREADER=$enableval
+echo $ac_n "checking whether to enable XMLWriter support""... $ac_c" 1>&6
+echo "configure:103831: checking whether to enable XMLWriter support" >&5
+# Check whether --enable-xmlwriter or --disable-xmlwriter was given.
+if test "${enable_xmlwriter+set}" = set; then
+  enableval="$enable_xmlwriter"
+  PHP_XMLWRITER=$enableval
 else
   
-  PHP_XMLREADER=yes
-  test "$PHP_ENABLE_ALL" && PHP_XMLREADER=$PHP_ENABLE_ALL
+  PHP_XMLWRITER=yes
+  test "$PHP_ENABLE_ALL" && PHP_XMLWRITER=$PHP_ENABLE_ALL
 
 fi
 
@@ -98578,12 +103843,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_XMLREADER in
+case $PHP_XMLWRITER in
 shared,*)
-  PHP_XMLREADER=`echo "$PHP_XMLREADER"|$SED 's/^shared,//'`
+  PHP_XMLWRITER=`echo "$PHP_XMLWRITER"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_XMLREADER=yes
+  PHP_XMLWRITER=yes
   ;;
 no)
   ext_output=no
@@ -98607,7 +103872,7 @@ if test -z "$PHP_LIBXML_DIR"; then
 php_with_libxml_dir=no
 
 echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:98611: checking libxml2 install dir" >&5
+echo "configure:103876: checking libxml2 install dir" >&5
 # Check whether --with-libxml-dir or --without-libxml-dir was given.
 if test "${with_libxml_dir+set}" = set; then
   withval="$with_libxml_dir"
@@ -98627,15 +103892,15 @@ echo "$ac_t""$ext_output" 1>&6
 
 fi
 
-if test "$PHP_XMLREADER" != "no"; then
+if test "$PHP_XMLWRITER" != "no"; then
 
   if test "$PHP_LIBXML" = "no"; then
-    { echo "configure: error: XMLReader extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
+    { echo "configure: error: XMLWriter extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
   fi
 
   
 echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:98639: checking for xml2-config path" >&5
+echo "configure:103904: checking for xml2-config path" >&5
 if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -98667,7 +103932,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -pthread"
+        XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -pthread"
       else
         
   
@@ -98689,7 +103954,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -l$ac_ii" 
+        XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -l$ac_ii" 
     else
       
   
@@ -98724,8 +103989,8 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
     
       if test "$ext_shared" = "yes"; then
-        XMLREADER_SHARED_LIBADD="-L$ai_p $XMLREADER_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XMLREADER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLREADER_SHARED_LIBADD"
+        XMLWRITER_SHARED_LIBADD="-L$ai_p $XMLWRITER_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XMLWRITER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLWRITER_SHARED_LIBADD"
       else
         
   
@@ -98793,7 +104058,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
 
             echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:98797: checking whether libxml build works" >&5
+echo "configure:104062: checking whether libxml build works" >&5
 if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -98801,7 +104066,7 @@ else
         
   old_LIBS=$LIBS
   LIBS="
-          $XMLREADER_SHARED_LIBADD
+          $XMLWRITER_SHARED_LIBADD
          $LIBS"
   if test "$cross_compiling" = yes; then
   
@@ -98809,7 +104074,7 @@ else
   
 else
   cat > conftest.$ac_ext <<EOF
-#line 98813 "configure"
+#line 104078 "configure"
 #include "confdefs.h"
 
     
@@ -98820,7 +104085,7 @@ else
     }
   
 EOF
-if { (eval echo configure:98824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:104089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     LIBS=$old_LIBS
@@ -98856,23 +104121,23 @@ EOF
       fi
       
     cat >> confdefs.h <<\EOF
-#define HAVE_XMLREADER 1
+#define HAVE_XMLWRITER 1
 EOF
 
     
-  ext_builddir=ext/xmlreader
-  ext_srcdir=$abs_srcdir/ext/xmlreader
+  ext_builddir=ext/xmlwriter
+  ext_srcdir=$abs_srcdir/ext/xmlwriter
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_XMLREADER_SHARED=no
+    PHP_XMLWRITER_SHARED=no
     
   
-  case ext/xmlreader in
+  case ext/xmlwriter in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -98887,7 +104152,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_xmlreader.c; do
+  for ac_src in php_xmlwriter.c; do
   
       IFS=.
       set $ac_src
@@ -98910,18 +104175,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC xmlreader"
+    EXT_STATIC="$EXT_STATIC xmlwriter"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlreader"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlwriter"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_XMLREADER_SHARED=yes
+      PHP_XMLWRITER_SHARED=yes
       
-  case ext/xmlreader in
+  case ext/xmlwriter in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -98936,14 +104201,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_xmlreader.c; do
+  for ac_src in php_xmlwriter.c; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_xmlreader="$shared_objects_xmlreader $ac_bdir$ac_obj.lo"
+      shared_objects_xmlwriter="$shared_objects_xmlwriter $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -98966,31 +104231,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlreader.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(PHPXMLREADER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlreader.so '$ext_builddir'/phpxmlreader.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlwriter.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(PHPXMLWRITER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlwriter.so '$ext_builddir'/phpxmlwriter.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLREADER, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLWRITER, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(PHPXMLREADER_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(PHPXMLWRITER_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlreader.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlwriter.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlreader.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlwriter.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlreader"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlwriter"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpxmlreader.$suffix: $ext_builddir/phpxmlreader.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlreader.$suffix \$(phplibdir)
+\$(phplibdir)/phpxmlwriter.$suffix: $ext_builddir/phpxmlwriter.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlwriter.$suffix \$(phplibdir)
 
-$ext_builddir/phpxmlreader.$suffix: \$(shared_objects_xmlreader) \$(PHPXMLREADER_SHARED_DEPENDENCIES)
+$ext_builddir/phpxmlwriter.$suffix: \$(shared_objects_xmlwriter) \$(PHPXMLWRITER_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -99003,31 +104268,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlreader.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(XMLREADER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlreader.so '$ext_builddir'/xmlreader.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlwriter.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(XMLWRITER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlwriter.so '$ext_builddir'/xmlwriter.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLREADER, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLWRITER, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlreader) $(XMLREADER_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(XMLWRITER_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlreader.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlwriter.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlreader.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlwriter.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlreader"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlwriter"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/xmlreader.$suffix: $ext_builddir/xmlreader.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlreader.$suffix \$(phplibdir)
+\$(phplibdir)/xmlwriter.$suffix: $ext_builddir/xmlwriter.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlwriter.$suffix \$(phplibdir)
 
-$ext_builddir/xmlreader.$suffix: \$(shared_objects_xmlreader) \$(XMLREADER_SHARED_DEPENDENCIES)
+$ext_builddir/xmlwriter.$suffix: \$(shared_objects_xmlwriter) \$(XMLWRITER_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -99035,22 +104300,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_XMLREADER 1
+#define COMPILE_DL_XMLWRITER 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_XMLREADER_SHARED=no
+    PHP_XMLWRITER_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/xmlreader in
+  case ext/xmlwriter in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -99065,7 +104330,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_xmlreader.c; do
+  for ac_src in php_xmlwriter.c; do
   
       IFS=.
       set $ac_src
@@ -99088,15 +104353,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC xmlreader"
+        EXT_STATIC="$EXT_STATIC xmlwriter"
         ;;
       *)
         
   
-  case ext/xmlreader in
+  case ext/xmlwriter in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -99111,7 +104376,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_xmlreader.c; do
+  for ac_src in php_xmlwriter.c; do
   
       IFS=.
       set $ac_src
@@ -99136,7 +104401,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlreader"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlwriter"
   fi
   
   
@@ -99145,33 +104410,14 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=xmlreader
+    PHP_PECL_EXTENSION=xmlwriter
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
     
-  am_i_shared=$PHP_XMLREADER_SHARED
-  is_it_shared=$PHP_DOM_SHARED
-  is_it_enabled=$PHP_DOM
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension xmlreader to build statically, but it
-depends on extension dom, which you've configured to build shared.
-You either need to build xmlreader shared or build dom statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension xmlreader, which depends on extension dom,
-but you've either not enabled dom, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLREADER_SHARED_LIBADD"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLWRITER_SHARED_LIBADD"
 
   
     else
@@ -99185,32 +104431,19 @@ else
 fi
 
 
-# Local macros for automake & autoconf
-
-
-
-
-
-
-
-
-
-
 
+php_with_xsl=no
 
-
-php_with_xmlrpc=no
-
-echo $ac_n "checking for XMLRPC-EPI support""... $ac_c" 1>&6
-echo "configure:99206: checking for XMLRPC-EPI support" >&5
-# Check whether --with-xmlrpc or --without-xmlrpc was given.
-if test "${with_xmlrpc+set}" = set; then
-  withval="$with_xmlrpc"
-  PHP_XMLRPC=$withval
+echo $ac_n "checking for XSL support""... $ac_c" 1>&6
+echo "configure:104439: checking for XSL support" >&5
+# Check whether --with-xsl or --without-xsl was given.
+if test "${with_xsl+set}" = set; then
+  withval="$with_xsl"
+  PHP_XSL=$withval
 else
   
-  PHP_XMLRPC=no
-  test "$PHP_ENABLE_ALL" && PHP_XMLRPC=$PHP_ENABLE_ALL
+  PHP_XSL=no
+  test "$PHP_ENABLE_ALL" && PHP_XSL=$PHP_ENABLE_ALL
 
 fi
 
@@ -99218,12 +104451,12 @@ fi
 
 ext_output="yes, shared"
 ext_shared=yes
-case $PHP_XMLRPC in
+case $PHP_XSL in
 shared,*)
-  PHP_XMLRPC=`echo "$PHP_XMLRPC"|$SED 's/^shared,//'`
+  PHP_XSL=`echo "$PHP_XSL"|$SED 's/^shared,//'`
   ;;
 shared)
-  PHP_XMLRPC=yes
+  PHP_XSL=yes
   ;;
 no)
   ext_output=no
@@ -99242,147 +104475,41 @@ echo "$ac_t""$ext_output" 1>&6
 
 
 
-if test -z "$PHP_LIBXML_DIR"; then
-  
-php_with_libxml_dir=no
-
-echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:99251: checking libxml2 install dir" >&5
-# Check whether --with-libxml-dir or --without-libxml-dir was given.
-if test "${with_libxml_dir+set}" = set; then
-  withval="$with_libxml_dir"
-  PHP_LIBXML_DIR=$withval
-else
-  
-  PHP_LIBXML_DIR=no
-  
-
-fi
-
-
-ext_output=$PHP_LIBXML_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-fi
-
-
-php_with_libexpat_dir=no
-
-echo $ac_n "checking libexpat dir for XMLRPC-EPI""... $ac_c" 1>&6
-echo "configure:99275: checking libexpat dir for XMLRPC-EPI" >&5
-# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
-if test "${with_libexpat_dir+set}" = set; then
-  withval="$with_libexpat_dir"
-  PHP_LIBEXPAT_DIR=$withval
-else
-  
-  PHP_LIBEXPAT_DIR=no
-  
-
-fi
-
-
-ext_output=$PHP_LIBEXPAT_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-
-php_with_iconv_dir=no
-
-echo $ac_n "checking iconv dir for XMLRPC-EPI""... $ac_c" 1>&6
-echo "configure:99298: checking iconv dir for XMLRPC-EPI" >&5
-# Check whether --with-iconv-dir or --without-iconv-dir was given.
-if test "${with_iconv_dir+set}" = set; then
-  withval="$with_iconv_dir"
-  PHP_ICONV_DIR=$withval
-else
-  
-  PHP_ICONV_DIR=no
-  
-
-fi
-
-
-ext_output=$PHP_ICONV_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
-
-
-if test "$PHP_XMLRPC" != "no"; then
+if test "$PHP_XSL" != "no"; then
 
-  
-  am_i_shared=$PHP_XMLRPC_SHARED
-  is_it_shared=$PHP_LIBXML_SHARED
-  is_it_enabled=$PHP_LIBXML
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension xmlrpc to build statically, but it
-depends on extension libxml, which you've configured to build shared.
-You either need to build xmlrpc shared or build libxml statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension xmlrpc, which depends on extension libxml,
-but you've either not enabled libxml, or have disabled it.
-" 1>&2; exit 1; }
+  if test "$PHP_LIBXML" = "no"; then
+    { echo "configure: error: XSL extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
   fi
   
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLRPC_SHARED_LIBADD"
-
-  cat >> confdefs.h <<\EOF
-#define HAVE_XMLRPC 1
-EOF
-
-
-        if test "$PHP_LIBEXPAT_DIR" = "no"; then
-
-    if test "$PHP_LIBXML" = "no"; then
-      { echo "configure: error: XML-RPC extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
-    fi
+  if test "$PHP_DOM" = "no"; then
+    { echo "configure: error: XSL extension requires DOM extension, add --enable-dom" 1>&2; exit 1; }
+  fi
 
-    
-echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:99354: checking for xml2-config path" >&5
-if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  for i in $PHP_LIBXML_DIR /usr/local /usr; do
-    if test -x "$i/bin/xml2-config"; then
-      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+  for i in $PHP_XSL /usr/local /usr; do
+    if test -x "$i/bin/xslt-config"; then
+      XSLT_CONFIG=$i/bin/xslt-config
       break
     fi
   done
 
-fi
-
-echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
-
-  if test -x "$ac_cv_php_xml2_config_path"; then
-    XML2_CONFIG="$ac_cv_php_xml2_config_path"
-    libxml_full_version=`$XML2_CONFIG --version`
+  if test -z "$XSLT_CONFIG"; then
+    { echo "configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution" 1>&2; exit 1; }
+  else
+    libxslt_full_version=`$XSLT_CONFIG --version`
     ac_IFS=$IFS
     IFS="."
-    set $libxml_full_version
+    set $libxslt_full_version
     IFS=$ac_IFS
-    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
-    if test "$LIBXML_VERSION" -ge "2006011"; then
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
-      LIBXML_INCS=`$XML2_CONFIG --cflags`
+    LIBXSLT_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
+    if test "$LIBXSLT_VERSION" -ge "1001000"; then
+      XSL_LIBS=`$XSLT_CONFIG --libs`
+      XSL_INCS=`$XSLT_CONFIG --cflags`
       
-  for ac_i in $LIBXML_LIBS; do
+  for ac_i in $XSL_LIBS; do
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        XMLRPC_SHARED_LIBADD="$XMLRPC_SHARED_LIBADD -pthread"
+        XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -pthread"
       else
         
   
@@ -99404,7 +104531,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        XMLRPC_SHARED_LIBADD="$XMLRPC_SHARED_LIBADD -l$ac_ii" 
+        XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -l$ac_ii" 
     else
       
   
@@ -99439,8 +104566,8 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
     
       if test "$ext_shared" = "yes"; then
-        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
+        XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD"
       else
         
   
@@ -99467,7 +104594,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   done
 
       
-  for ac_i in $LIBXML_INCS; do
+  for ac_i in $XSL_INCS; do
     case $ac_i in
     -I*)
       ac_ii=`echo $ac_i|cut -c 3-`
@@ -99502,81 +104629,359 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
   fi
 
-    ;;
-    esac
-  done
-
+    ;;
+    esac
+  done
+
+      
+      echo $ac_n "checking for EXSLT support""... $ac_c" 1>&6
+echo "configure:104639: checking for EXSLT support" >&5
+      for i in $PHP_XSL /usr/local /usr; do
+        if test -r "$i/include/libexslt/exslt.h"; then
+          PHP_XSL_EXSL_DIR=$i
+          break
+        fi
+      done
+      if test -z "$PHP_XSL_EXSL_DIR"; then
+        echo "$ac_t""not found" 1>&6
+      else 
+        echo "$ac_t""found" 1>&6
+        
+
+  if test "$ext_shared" = "yes"; then
+    XSL_SHARED_LIBADD="-lexslt $XSL_SHARED_LIBADD"
+    if test -n "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR"; then
+      
+  if test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" || echo "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PHP_XSL_EXSL_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $PHP_XSL_EXSL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
+
+    fi
+  else
+    
+
+  if test -n "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR"; then
+    
+  if test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" || echo "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PHP_XSL_EXSL_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $PHP_XSL_EXSL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
+      
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+    
+  fi
+
+  fi
+  
+  
+  case exslt in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lexslt $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
+
+        
+  if test "$PHP_XSL_EXSL_DIR/include" != "/usr/include"; then
+    
+  if test -z "$PHP_XSL_EXSL_DIR/include" || echo "$PHP_XSL_EXSL_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$PHP_XSL_EXSL_DIR/include
+  else
+    
+    ep_dir="`echo $PHP_XSL_EXSL_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/include\"`"
+  fi
+
+    
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+        cat >> confdefs.h <<\EOF
+#define HAVE_XSL_EXSLT 1
+EOF
+
+      fi
+    else
+      { echo "configure: error: libxslt version 1.1.0 or greater required." 1>&2; exit 1; }
+    fi
+    
+  
+  fi
+  
+  cat >> confdefs.h <<\EOF
+#define HAVE_XSL 1
+EOF
+
+  
+  ext_builddir=ext/xsl
+  ext_srcdir=$abs_srcdir/ext/xsl
+
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_XSL_SHARED=no
+    
+  
+  case ext/xsl in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_xsl.c xsltprocessor.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+    EXT_STATIC="$EXT_STATIC xsl"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC xsl"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_XSL_SHARED=yes
+      
+  case ext/xsl in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
+
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_xsl.c xsltprocessor.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_xsl="$shared_objects_xsl $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(PHPXSL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxsl.so '$ext_builddir'/phpxsl.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXSL, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(PHPXSL_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxsl.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxsl.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xsl"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpxsl.$suffix: $ext_builddir/phpxsl.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxsl.$suffix \$(phplibdir)
 
-            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:99512: checking whether libxml build works" >&5
-if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-        
-  old_LIBS=$LIBS
-  LIBS="
-          $XMLRPC_SHARED_LIBADD
-         $LIBS"
-  if test "$cross_compiling" = yes; then
-  
-    LIBS=$old_LIBS
-  
-else
-  cat > conftest.$ac_ext <<EOF
-#line 99528 "configure"
-#include "confdefs.h"
+$ext_builddir/phpxsl.$suffix: \$(shared_objects_xsl) \$(PHPXSL_SHARED_DEPENDENCIES)
+	$link_cmd
 
-    
-    char xmlInitParser();
-    int main() {
-      xmlInitParser();
-      return 0;
-    }
-  
 EOF
-if { (eval echo configure:99539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-    LIBS=$old_LIBS
-    
-          php_cv_libxml_build_works=yes
-        
-  
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  
-    LIBS=$old_LIBS
-    
-          echo "$ac_t""no" 1>&6
-          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
-        
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(XSL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xsl.so '$ext_builddir'/xsl.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XSL, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(XSL_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xsl.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xsl.$suffix"
+  fi
   
-fi
-rm -fr conftest*
-fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xsl"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/xsl.$suffix: $ext_builddir/xsl.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/xsl.$suffix \$(phplibdir)
 
+$ext_builddir/xsl.$suffix: \$(shared_objects_xsl) \$(XSL_SHARED_DEPENDENCIES)
+	$link_cmd
 
-      
-fi
+EOF
 
-echo "$ac_t""$php_cv_libxml_build_works" 1>&6
-      if test "$php_cv_libxml_build_works" = "yes"; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBXML 1
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_XSL 1
 EOF
 
-      fi
-      
-      if test "$PHP_XML" = "no"; then
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_XSL_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
         
   
-  case ext/xml in
+  case ext/xsl in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -99591,7 +104996,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in compat.c; do
+  for ac_src in php_xsl.c xsltprocessor.c; do
   
       IFS=.
       set $ac_src
@@ -99601,10 +105006,10 @@ EOF
       PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
 
       case $ac_src in
-        *.c) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre  $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre  $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
       esac
 
     cat >>Makefile.objects<<EOF
@@ -99614,1751 +105019,2731 @@ EOF
   done
 
 
+        EXT_STATIC="$EXT_STATIC xsl"
+        ;;
+      *)
         
   
-    BUILD_DIR="$BUILD_DIR ext/xml"
+  case ext/xsl in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
 
-      fi
-    
-    else
-      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
-    fi
-else 
-      { echo "configure: error: xml2-config not found. Use --with-libxml-dir=<DIR>" 1>&2; exit 1; }
-    
-  fi
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-  else
-    testval=no
-    for i in $PHP_LIBEXPAT_DIR $XMLRPC_DIR /usr/local /usr; do
-      if test -f $i/$PHP_LIBDIR/libexpat.a || test -f $i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBEXPAT 1
+
+  old_IFS=$IFS
+  for ac_src in php_xsl.c xsltprocessor.c; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
-        
 
-  if test "$ext_shared" = "yes"; then
-    XMLRPC_SHARED_LIBADD="-lexpat $XMLRPC_SHARED_LIBADD"
-    if test -n "$i/$PHP_LIBDIR"; then
-      
-  if test "$i/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$i/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$i/$PHP_LIBDIR" || echo "$i/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$i/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $i/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$i/$PHP_LIBDIR\"`"
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC xsl"
   fi
-
-    
-      if test "$ext_shared" = "yes"; then
-        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
-      else
-        
-  
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
   
-  fi
 
 
-      fi
-    
-  fi
-
-    fi
-  else
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=xsl
     
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
-  if test -n "$i/$PHP_LIBDIR"; then
-    
-  if test "$i/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$i/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$i/$PHP_LIBDIR" || echo "$i/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$i/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $i/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$i/$PHP_LIBDIR\"`"
   fi
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST XSL_SHARED_LIBADD"
+
   
+  am_i_shared=$PHP_XSL_SHARED
+  is_it_shared=$PHP_LIBXML_SHARED
+  is_it_enabled=$PHP_LIBXML
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension xsl to build statically, but it
+depends on extension libxml, which you've configured to build shared.
+You either need to build xsl shared or build libxml statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension xsl, which depends on extension libxml,
+but you've either not enabled libxml, or have disabled it.
+" 1>&2; exit 1; }
   fi
+  
+fi
 
 
-    
-  fi
 
-  fi
-  
+php_enable_zip=no
+
+echo $ac_n "checking for zip archive read/writesupport""... $ac_c" 1>&6
+echo "configure:105115: checking for zip archive read/writesupport" >&5
+# Check whether --enable-zip or --disable-zip was given.
+if test "${enable_zip+set}" = set; then
+  enableval="$enable_zip"
+  PHP_ZIP=$enableval
+else
   
-  case expat in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lexpat $LIBS" 
-   ;;
-  esac
+  PHP_ZIP=no
+  test "$PHP_ENABLE_ALL" && PHP_ZIP=$PHP_ENABLE_ALL
 
+fi
 
 
 
-  fi
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_ZIP in
+shared,*)
+  PHP_ZIP=`echo "$PHP_ZIP"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_ZIP=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
 
 
-        
-  if test "$i/include" != "/usr/include"; then
-    
-  if test -z "$i/include" || echo "$i/include" | grep '^/' >/dev/null ; then
-    ai_p=$i/include
-  else
-    
-    ep_dir="`echo $i/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$i/include\"`"
-  fi
 
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
+echo "$ac_t""$ext_output" 1>&6
 
-  fi
 
-        testval=yes
-        break
-      fi
-    done
 
-    if test "$testval" = "no"; then
-      { echo "configure: error: XML-RPC support requires libexpat. Use --with-libexpat-dir=<DIR> (deprecated!)" 1>&2; exit 1; }
-    fi
-  fi
 
-    if test "$PHP_ICONV_SHARED" = "yes" || test "$PHP_ICONV" = "no"; then
+if test -z "$PHP_ZLIB_DIR"; then
+  
+php_with_zlib_dir=no
 
-    if test "$PHP_ICONV_DIR" != "no"; then
-      PHP_ICONV=$PHP_ICONV_DIR
-    fi
+echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
+echo "configure:105160: checking for the location of libz" >&5
+# Check whether --with-zlib-dir or --without-zlib-dir was given.
+if test "${with_zlib_dir+set}" = set; then
+  withval="$with_zlib_dir"
+  PHP_ZLIB_DIR=$withval
+else
   
-    if test -z "$PHP_ICONV" || test "$PHP_ICONV" = "no"; then
-      PHP_ICONV=yes
-    fi
+  PHP_ZLIB_DIR=no
   
-    
-  found_iconv=no
-  unset ICONV_DIR
 
-  # Create the directories for a VPATH build:
-  $php_shtool mkdir -p ext/iconv
+fi
 
-  echo > ext/iconv/php_have_bsd_iconv.h
-  echo > ext/iconv/php_have_ibm_iconv.h
-  echo > ext/iconv/php_have_glibc_iconv.h
-  echo > ext/iconv/php_have_libiconv.h
-  echo > ext/iconv/php_have_iconv.h
-  echo > ext/iconv/php_php_iconv_impl.h
-  echo > ext/iconv/php_iconv_aliased_libiconv.h
-  echo > ext/iconv/php_php_iconv_h_path.h
-  echo > ext/iconv/php_iconv_supports_errno.h
 
-        if test "$PHP_ICONV" = "yes"; then
-    echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:99808: checking for iconv" >&5
-if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 99813 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char iconv(); below.  */
-#include <assert.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 iconv();
+ext_output=$PHP_ZLIB_DIR
+echo "$ac_t""$ext_output" 1>&6
 
-int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_iconv) || defined (__stub___iconv)
-choke me
-#else
-iconv();
-#endif
 
-; return 0; }
-EOF
-if { (eval echo configure:99836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_iconv=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_iconv=no"
-fi
-rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-      found_iconv=yes
-    
-else
-  echo "$ac_t""no" 1>&6
 
-      echo $ac_n "checking for libiconv""... $ac_c" 1>&6
-echo "configure:99857: checking for libiconv" >&5
-if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+php_with_pcre_dir=no
+
+echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6
+echo "configure:105184: checking pcre install prefix" >&5
+# Check whether --with-pcre-dir or --without-pcre-dir was given.
+if test "${with_pcre_dir+set}" = set; then
+  withval="$with_pcre_dir"
+  PHP_PCRE_DIR=$withval
 else
-  cat > conftest.$ac_ext <<EOF
-#line 99862 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char libiconv(); below.  */
-#include <assert.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 libiconv();
+  
+  PHP_PCRE_DIR=no
+  
 
-int main() {
+fi
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_libiconv) || defined (__stub___libiconv)
-choke me
-#else
-libiconv();
-#endif
 
-; return 0; }
-EOF
-if { (eval echo configure:99885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_libiconv=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_libiconv=no"
-fi
-rm -f conftest*
-fi
+ext_output=$PHP_PCRE_DIR
+echo "$ac_t""$ext_output" 1>&6
 
-if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-        
-  echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h
 
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBICONV 1
-EOF
 
-        found_iconv=yes
-      
-else
-  echo "$ac_t""no" 1>&6
-fi
 
+if test "$PHP_ZIP" != "no"; then
+
+  if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
+    if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
+      PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+      PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
+    elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
+      PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+      PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
+    else
+      { echo "configure: error: Can not find zlib headers under "$PHP_ZLIB_DIR"" 1>&2; exit 1; }
+    fi
+  else
+    for i in /usr/local /usr; do
+      if test -f "$i/include/zlib/zlib.h"; then
+        PHP_ZLIB_DIR="$i"
+        PHP_ZLIB_INCDIR="$i/include/zlib"
+      elif test -f "$i/include/zlib.h"; then
+        PHP_ZLIB_DIR="$i"
+        PHP_ZLIB_INCDIR="$i/include"
+      fi
+    done
+  fi
+
+    echo $ac_n "checking for the location of zlib""... $ac_c" 1>&6
+echo "configure:105228: checking for the location of zlib" >&5
+  if test "$PHP_ZLIB_DIR" = "no"; then
+    { echo "configure: error: zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located" 1>&2; exit 1; }
+  else
+    echo "$ac_t""$PHP_ZLIB_DIR" 1>&6
     
-fi
 
+  if test "$ext_shared" = "yes"; then
+    ZIP_SHARED_LIBADD="-lz $ZIP_SHARED_LIBADD"
+    if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then
+      
+  if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`"
   fi
 
-        if test "$found_iconv" = "no"; then
+    
+      if test "$ext_shared" = "yes"; then
+        ZIP_SHARED_LIBADD="-L$ai_p $ZIP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && ZIP_SHARED_LIBADD="$ld_runpath_switch$ai_p $ZIP_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-    for i in $PHP_ICONV /usr/local /usr; do
-      if test -r $i/include/giconv.h; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_GICONV_H 1
-EOF
 
-        ICONV_DIR=$i
-        iconv_lib_name=giconv
-        break
-      elif test -r $i/include/iconv.h; then
-        ICONV_DIR=$i
-        iconv_lib_name=iconv
-        break
       fi
-    done
+    
+  fi
 
-    if test -z "$ICONV_DIR"; then
-      { echo "configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>" 1>&2; exit 1; }
     fi
-  
-    if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
-       test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
-    then
+  else
+    
+
+  if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then
+    
+  if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`"
+  fi
+
+    
       
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-        -L$ICONV_DIR/$PHP_LIBDIR
-      "
-  
-  save_ext_shared=$ext_shared
-  ext_shared=yes
   
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
-        
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
   fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
+
+    
+  fi
+
+  fi
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
-      
   
-  case $ac_ii in
+  case z in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="$LIBS -l$ac_ii" 
+      LIBS="-lz $LIBS" 
    ;;
   esac
 
 
-    fi
-   ;;
-  esac
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+  fi
+
+
     
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+  if test "$PHP_ZLIB_INCDIR" != "/usr/include"; then
+    
+  if test -z "$PHP_ZLIB_INCDIR" || echo "$PHP_ZLIB_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$PHP_ZLIB_INCDIR
   else
     
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $PHP_ZLIB_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    ai_p="$ep_realdir/`basename \"$PHP_ZLIB_INCDIR\"`"
   fi
 
     
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
-  
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
     
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
   fi
 
+  fi
 
-      fi
-    
   fi
 
-    ;;
-    esac
-  done
+    old_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS=$INCLUDES
+  cat > conftest.$ac_ext <<EOF
+#line 105366 "configure"
+#include "confdefs.h"
 
-  echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:100041: checking for libiconv in -l$iconv_lib_name" >&5
-ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+#include <main/php_config.h>
+#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
+yes
+#endif
+  
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+    PHP_PCRE_REGEX=yes
+  
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-l$iconv_lib_name  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 100049 "configure"
+  rm -rf conftest*
+  
+    cat > conftest.$ac_ext <<EOF
+#line 105385 "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 libiconv();
 
-int main() {
-libiconv()
-; return 0; }
+#include <main/php_config.h>
+#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE)
+yes
+#endif
+    
 EOF
-if { (eval echo configure:100060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  
+      PHP_PCRE_REGEX=pecl
+    
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  
+      PHP_PCRE_REGEX=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
+rm -f conftest*
+
+  CPPFLAGS=$old_CPPFLAGS
+
+  PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \
+                         lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c  \
+                         lib/zip_strerror.c lib/zip_close.c lib/zip_error_get.c \
+                         lib/zip_file_error_get.c lib/zip_free.c lib/zip_rename.c \
+                         lib/zip_source_free.c lib/zip_unchange_all.c lib/zip_delete.c \
+                         lib/zip_error_get_sys_type.c lib/zip_file_get_offset.c \
+                         lib/zip_get_name.c lib/zip_replace.c lib/zip_source_function.c \
+                         lib/zip_unchange.c lib/zip_dirent.c lib/zip_error_strerror.c \
+                         lib/zip_filerange_crc.c lib/zip_file_strerror.c lib/zip_get_num_files.c \
+                         lib/zip_get_archive_flag.c lib/zip_set_archive_flag.c \
+                         lib/zip_set_name.c lib/zip_source_zip.c lib/zip_unchange_data.c \
+                         lib/zip_entry_free.c lib/zip_error_to_str.c lib/zip_fopen.c \
+                         lib/zip_name_locate.c lib/zip_source_buffer.c lib/zip_stat.c \
+                         lib/zip_entry_new.c lib/zip_err_str.c lib/zip_fopen_index.c \
+                         lib/zip_get_archive_comment.c lib/zip_get_file_comment.c \
+                         lib/zip_new.c lib/zip_source_file.c lib/zip_stat_index.c \
+                         lib/zip_set_archive_comment.c lib/zip_set_file_comment.c \
+                         lib/zip_unchange_archive.c lib/zip_memdup.c lib/zip_stat_init.c lib/zip_add_dir.c \
+                         lib/zip_error_clear.c lib/zip_file_error_clear.c"
+
+  cat >> confdefs.h <<\EOF
+#define HAVE_ZIP 1
+EOF
+
   
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
+  ext_builddir=ext/zip
+  ext_srcdir=$abs_srcdir/ext/zip
+
+  ac_extra=
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
+    PHP_ZIP_SHARED=no
     
-        found_iconv=yes
-        
-  echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h
+  
+  case ext/zip in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
+  
 
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBICONV 1
-EOF
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
 
-        
-  echo "#define ICONV_ALIASED_LIBICONV 1" > ext/iconv/php_iconv_aliased_libiconv.h
 
-        cat >> confdefs.h <<\EOF
-#define ICONV_ALIASED_LIBICONV 1
+  old_IFS=$IFS
+  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
 EOF
+  done
 
+
+    EXT_STATIC="$EXT_STATIC zip"
+    if test "$ext_shared" != "nocli"; then
+      EXT_CLI_STATIC="$EXT_CLI_STATIC zip"
+    fi
+  else
+    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
+      PHP_ZIP_SHARED=yes
       
+  case ext/zip in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-else
-  echo "$ac_t""no" 1>&6
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_$iconv_lib_name_libiconv
-    
+  b_c_pre=$shared_c_pre
+  b_cxx_pre=$shared_cxx_pre
+  b_c_meta=$shared_c_meta
+  b_cxx_meta=$shared_cxx_meta
+  b_c_post=$shared_c_post
+  b_cxx_post=$shared_cxx_post
+  b_lo=$shared_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      shared_objects_zip="$shared_objects_zip $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+      case $host_alias in
+        *netware*)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpzip.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(PHPZIP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpzip.so '$ext_builddir'/phpzip.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPZIP, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(PHPZIP_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpzip.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpzip.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_zip"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/phpzip.$suffix: $ext_builddir/phpzip.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phpzip.$suffix \$(phplibdir)
+
+$ext_builddir/phpzip.$suffix: \$(shared_objects_zip) \$(PHPZIP_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+        *)
+          
+  install_modules="install-modules"
+
+  case $host_alias in
+    *aix*)
+      suffix=so
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/zip.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(ZIP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/zip.so '$ext_builddir'/zip.so'
+      ;;
+    *netware*)
+      suffix=nlm
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(ZIP, 3)_SHARED_LIBADD)'
+      ;;
+    *)
+      suffix=la
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(ZIP_SHARED_LIBADD)'
+      ;;
+  esac
+
+  if test "x" = "xyes"; then
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/zip.$suffix"
+  else
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/zip.$suffix"
+  fi
+  
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_zip"
+
+  cat >>Makefile.objects<<EOF
+\$(phplibdir)/zip.$suffix: $ext_builddir/zip.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/zip.$suffix \$(phplibdir)
+
+$ext_builddir/zip.$suffix: \$(shared_objects_zip) \$(ZIP_SHARED_DEPENDENCIES)
+	$link_cmd
+
+EOF
+
+          ;;
+      esac
+      cat >> confdefs.h <<EOF
+#define COMPILE_DL_ZIP 1
+EOF
+
+    fi
+  fi
+
+  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
+    PHP_ZIP_SHARED=no
+    case "$PHP_SAPI" in
+      cgi|embed)
         
-  save_old_LDFLAGS=$LDFLAGS
-  ac_stuff="
-          -L$ICONV_DIR/$PHP_LIBDIR
-        "
   
-  save_ext_shared=$ext_shared
-  ext_shared=yes
+  case ext/zip in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
   
-  for ac_i in $ac_stuff; do
-    case $ac_i in
-    -pthread)
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -pthread"
-      else
+  
+
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
+  
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
+      
+      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
+
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
+
+
+        EXT_STATIC="$EXT_STATIC zip"
+        ;;
+      *)
         
   
-  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  case ext/zip in
+  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  esac
+  
   
-  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "EXTRA_LDFLAGS$unique=set"
-    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
-  fi
 
-      fi
-    ;;
-    -l*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
+  b_c_pre=$php_c_pre
+  b_cxx_pre=$php_cxx_pre
+  b_c_meta=$php_c_meta
+  b_cxx_meta=$php_cxx_meta
+  b_c_post=$php_c_post
+  b_cxx_post=$php_cxx_post
+  b_lo=$php_lo
+
+
+  old_IFS=$IFS
+  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
   
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-    if test "$ext_shared" = "yes"; then
-        LDFLAGS="$LDFLAGS -l$ac_ii" 
-    else
+      IFS=.
+      set $ac_src
+      ac_obj=$1
+      IFS=$old_IFS
       
-  
-  case $ac_ii in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="$LIBS -l$ac_ii" 
-   ;;
-  esac
+      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
 
+      case $ac_src in
+        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
+        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
+      esac
 
-    fi
-   ;;
-  esac
+    cat >>Makefile.objects<<EOF
+$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
+	$ac_comp
+EOF
+  done
 
 
-    ;;
-    -L*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-    
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
-  else
-    
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+        ;;
+    esac
+    EXT_CLI_STATIC="$EXT_CLI_STATIC zip"
   fi
+  
+  
+    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  
+
 
+  if test "$ext_builddir" = "."; then
+    PHP_PECL_EXTENSION=zip
     
-      if test "$ext_shared" = "yes"; then
-        LDFLAGS="-L$ai_p $LDFLAGS"
-        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
-      else
-        
+  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+
+  fi
+
   
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+    $php_shtool mkdir -p $ext_builddir/lib
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+
   
-  fi
+  PHP_VAR_SUBST="$PHP_VAR_SUBST ZIP_SHARED_LIBADD"
 
 
-      fi
     
-  fi
+  src=$ext_srcdir/Makefile.frag
+  ac_srcdir=$ext_srcdir
+  ac_builddir=$ext_builddir
+  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
 
-    ;;
-    esac
-  done
+fi
 
-  echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:100201: checking for iconv in -l$iconv_lib_name" >&5
-ac_lib_var=`echo $iconv_lib_name'_'iconv | 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="-l$iconv_lib_name  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 100209 "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 iconv();
 
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:100220: \"$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"
+
+php_enable_http=no
+
+echo $ac_n "checking whether to enable extended HTTP support""... $ac_c" 1>&6
+echo "configure:105752: checking whether to enable extended HTTP support" >&5
+# Check whether --enable-http or --disable-http was given.
+if test "${enable_http+set}" = set; then
+  enableval="$enable_http"
+  PHP_HTTP=$enableval
 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"
+  
+  PHP_HTTP=no
+  test "$PHP_ENABLE_ALL" && PHP_HTTP=$PHP_ENABLE_ALL
 
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+
+
+
+ext_output="yes, shared"
+ext_shared=yes
+case $PHP_HTTP in
+shared,*)
+  PHP_HTTP=`echo "$PHP_HTTP"|$SED 's/^shared,//'`
+  ;;
+shared)
+  PHP_HTTP=yes
+  ;;
+no)
+  ext_output=no
+  ext_shared=no
+  ;;
+*)
+  ext_output=yes
+  ext_shared=no
+  ;;
+esac
+
+
+
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+php_with_http_shared_deps=$PHP_HTTP
+
+echo $ac_n "checking whether to depend on extensions which have been built shared""... $ac_c" 1>&6
+echo "configure:105795: checking whether to depend on extensions which have been built shared" >&5
+# Check whether --with-http-shared-deps or --without-http-shared-deps was given.
+if test "${with_http_shared_deps+set}" = set; then
+  withval="$with_http_shared_deps"
+  PHP_HTTP_SHARED_DEPS=$withval
+else
   
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    
-          found_iconv=yes
-        
+  PHP_HTTP_SHARED_DEPS=$PHP_HTTP
   
-else
-  echo "$ac_t""no" 1>&6
 
-    LDFLAGS=$save_old_LDFLAGS
-    ext_shared=$save_ext_shared
-    unset ac_cv_lib_$iconv_lib_name_iconv
-    
-  
 fi
 
-      
-  
-fi
 
-    fi
-  fi
+ext_output=$PHP_HTTP_SHARED_DEPS
+echo "$ac_t""$ext_output" 1>&6
 
-  if test "$found_iconv" = "yes"; then
-    
-  echo "#define HAVE_ICONV 1" > ext/iconv/php_have_iconv.h
 
-    cat >> confdefs.h <<\EOF
-#define HAVE_ICONV 1
-EOF
 
-    if test -n "$ICONV_DIR"; then
-      
 
-  if test "$ext_shared" = "yes"; then
-    XMLRPC_SHARED_LIBADD="-l$iconv_lib_name $XMLRPC_SHARED_LIBADD"
-    if test -n "$ICONV_DIR/$PHP_LIBDIR"; then
-      
-  if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$ICONV_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`"
-  fi
+php_with_http_curl_requests=$PHP_HTTP
 
-    
-      if test "$ext_shared" = "yes"; then
-        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
-      else
-        
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+echo $ac_n "checking whether to enable cURL HTTP request support""... $ac_c" 1>&6
+echo "configure:105817: checking whether to enable cURL HTTP request support" >&5
+# Check whether --with-http-curl-requests or --without-http-curl-requests was given.
+if test "${with_http_curl_requests+set}" = set; then
+  withval="$with_http_curl_requests"
+  PHP_HTTP_CURL_REQUESTS=$withval
+else
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  PHP_HTTP_CURL_REQUESTS=$PHP_HTTP
   
-  fi
 
+fi
 
-      fi
-    
-  fi
 
-    fi
-  else
-    
+ext_output=$PHP_HTTP_CURL_REQUESTS
+echo "$ac_t""$ext_output" 1>&6
 
-  if test -n "$ICONV_DIR/$PHP_LIBDIR"; then
-    
-  if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then
-    
-  if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$ICONV_DIR/$PHP_LIBDIR
-  else
-    
-    ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`"
-  fi
 
-    
-      
-  
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+
+php_with_http_curl_libevent=$PHP_HTTP_CURL_REQUESTS
+
+echo $ac_n "checking whether to enable libevent support fur cURL""... $ac_c" 1>&6
+echo "configure:105839: checking whether to enable libevent support fur cURL" >&5
+# Check whether --with-http-curl-libevent or --without-http-curl-libevent was given.
+if test "${with_http_curl_libevent+set}" = set; then
+  withval="$with_http_curl_libevent"
+  PHP_HTTP_CURL_LIBEVENT=$withval
+else
   
-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  PHP_HTTP_CURL_LIBEVENT=$PHP_HTTP_CURL_REQUESTS
   
-  fi
 
+fi
 
-    
-  fi
 
-  fi
+ext_output=$PHP_HTTP_CURL_LIBEVENT
+echo "$ac_t""$ext_output" 1>&6
+
+
+
+
+php_with_http_zlib_compression=$PHP_HTTP
+
+echo $ac_n "checking whether to enable zlib encodings support""... $ac_c" 1>&6
+echo "configure:105861: checking whether to enable zlib encodings support" >&5
+# Check whether --with-http-zlib-compression or --without-http-zlib-compression was given.
+if test "${with_http_zlib_compression+set}" = set; then
+  withval="$with_http_zlib_compression"
+  PHP_HTTP_ZLIB_COMPRESSION=$withval
+else
   
+  PHP_HTTP_ZLIB_COMPRESSION=$PHP_HTTP
   
-  case $iconv_lib_name in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-l$iconv_lib_name $LIBS" 
-   ;;
-  esac
 
+fi
 
 
+ext_output=$PHP_HTTP_ZLIB_COMPRESSION
+echo "$ac_t""$ext_output" 1>&6
 
-  fi
 
 
-      
-  if test "$ICONV_DIR/include" != "/usr/include"; then
-    
-  if test -z "$ICONV_DIR/include" || echo "$ICONV_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$ICONV_DIR/include
-  else
-    
-    ep_dir="`echo $ICONV_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ICONV_DIR/include\"`"
-  fi
 
-    
+php_with_http_magic_mime="no"
+
+echo $ac_n "checking whether to enable response content type guessing""... $ac_c" 1>&6
+echo "configure:105883: checking whether to enable response content type guessing" >&5
+# Check whether --with-http-magic-mime or --without-http-magic-mime was given.
+if test "${with_http_magic_mime+set}" = set; then
+  withval="$with_http_magic_mime"
+  PHP_HTTP_MAGIC_MIME=$withval
+else
   
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  PHP_HTTP_MAGIC_MIME="no"
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
 
-  fi
+fi
+
+
+ext_output=$PHP_HTTP_MAGIC_MIME
+echo "$ac_t""$ext_output" 1>&6
+
+
+
 
+if test "$PHP_HTTP" != "no"; then
+
+	
+		echo $ac_n "checking for egrep""... $ac_c" 1>&6
+echo "configure:105906: checking for egrep" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_egrep'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
     fi
-    
-else 
-      { echo "configure: error: iconv not found, in order to build xmlrpc you need the iconv library" 1>&2; exit 1; }
-    
-  fi
+fi
+
+echo "$ac_t""$ac_cv_prog_egrep" 1>&6
+ EGREP=$ac_cv_prog_egrep
+ 
 
+	
+	
+		
+			echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
+echo "configure:105924: checking for a sed that does not truncate output" >&5
+if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
   fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+
 fi
 
-if test "$PHP_XMLRPC" = "yes"; then
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:100410: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+SED=$lt_cv_path_SED
+echo "$ac_t""$SED" 1>&6
+
+		
+	
+	
+	echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:105983: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 105998 "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:106004: \"$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
+  :
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 106015 "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:106021: \"$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
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 106032 "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:106038: \"$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
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+	
+	if test "$PHP_HTTP_SHARED_DEPS" != "no"; then
+		cat >> confdefs.h <<\EOF
+#define HTTP_SHARED_DEPS 1
+EOF
+
+	else
+		cat >> confdefs.h <<\EOF
+#define HTTP_SHARED_DEPS 0
+EOF
+
+	fi
+	
+				
+	
+				
+	
+				if test "x$PHP_LIBDIR" = "x"; then
+		PHP_LIBDIR=lib
+	fi
+
+	for ac_hdr in netdb.h unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:106087: checking for $ac_hdr" >&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 106092 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:106097: \"$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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:100438: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+	
+  unset ac_cv_func_gethostname
+  unset ac_cv_func___gethostname
+  unset found
+  
+  echo $ac_n "checking for gethostname""... $ac_c" 1>&6
+echo "configure:106129: checking for gethostname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 100445 "configure"
+#line 106134 "configure"
 #include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostname(); below.  */
+#include <assert.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 gethostname();
 
 int main() {
-} $ac_kw foo() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostname) || defined (__stub___gethostname)
+choke me
+#else
+gethostname();
+#endif
+
 ; return 0; }
 EOF
-if { (eval echo configure:100452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:106157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_c_inline=$ac_kw; break
+  eval "ac_cv_func_gethostname=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_gethostname=no"
 fi
 rm -f conftest*
-done
-
 fi
 
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
-  inline | yes) ;;
-  no) cat >> confdefs.h <<\EOF
-#define inline 
-EOF
- ;;
-  *)  cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
+if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __gethostname""... $ac_c" 1>&6
+echo "configure:106175: checking for __gethostname" >&5
+if eval "test \"`echo '$''{'ac_cv_func___gethostname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 106180 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __gethostname(); below.  */
+#include <assert.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 __gethostname();
 
-	
+int main() {
 
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___gethostname) || defined (__stub_____gethostname)
+choke me
+#else
+__gethostname();
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:106203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___gethostname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___gethostname=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'__gethostname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
+fi
 
 
-cat >> confdefs.h <<\EOF
-#define UNDEF_THREADS_HACK 
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETHOSTNAME 1
 EOF
 
-
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:100490: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+    ac_cv_func_gethostname=yes
+  ;;
+  
+    *) 
+  
+  unset ac_cv_lib_nsl_gethostname
+  unset ac_cv_lib_nsl___gethostname
+  unset found
+  echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
+echo "configure:106241: checking for gethostname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostname | 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
-  cat > conftest.$ac_ext <<EOF
-#line 100495 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 106249 "configure"
 #include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.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 gethostname();
+
+int main() {
+gethostname()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:100503: \"$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
+if { (eval echo configure:106260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_header_stdc=yes
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
-  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_header_stdc=no
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+
+    echo $ac_n "checking for __gethostname in -lnsl""... $ac_c" 1>&6
+echo "configure:106280: checking for __gethostname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'__gethostname | 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="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 100520 "configure"
+#line 106288 "configure"
 #include "confdefs.h"
-#include <string.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 __gethostname();
+
+int main() {
+__gethostname()
+; return 0; }
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
+if { (eval echo configure:106299: \"$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*
-  ac_cv_header_stdc=no
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 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 100538 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
 else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
+  echo "$ac_t""no" 1>&6
+found=no
 fi
-rm -f conftest*
 
+  
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
+
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lnsl"
+    if test "$cross_compiling" = yes; then
+  found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 100559 "configure"
+#line 106331 "configure"
 #include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
+main() { return (0); }
 EOF
-if { (eval echo configure:100570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  :
+  found=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_header_stdc=no
+  found=no
 fi
 rm -fr conftest*
 fi
 
-fi
-fi
+    LIBS=$ac_libs
+  fi
 
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
+  if test "$found" = "yes"; then
+    
+  
+  case nsl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lnsl $LIBS" 
+   ;;
+  esac
+
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETHOSTNAME 1
 EOF
 
-fi
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBNSL 1
+EOF
 
-for ac_hdr in xmlparse.h xmltok.h stdlib.h strings.h string.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:100597: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+    ac_cv_func_gethostname=yes
+  else
+    
+  :
+
+  fi
+  
+ ;;
+  
+  esac
+
+	
+  unset ac_cv_func_getdomainname
+  unset ac_cv_func___getdomainname
+  unset found
+  
+  echo $ac_n "checking for getdomainname""... $ac_c" 1>&6
+echo "configure:106386: checking for getdomainname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getdomainname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 100602 "configure"
+#line 106391 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getdomainname(); below.  */
+#include <assert.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 getdomainname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getdomainname) || defined (__stub___getdomainname)
+choke me
+#else
+getdomainname();
+#endif
+
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:100607: \"$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
+if { (eval echo configure:106414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_func_getdomainname=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"
+  eval "ac_cv_func_getdomainname=no"
 fi
 rm -f conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+
+if eval "test \"`echo '$ac_cv_func_'getdomainname`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __getdomainname""... $ac_c" 1>&6
+echo "configure:106432: checking for __getdomainname" >&5
+if eval "test \"`echo '$''{'ac_cv_func___getdomainname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 106437 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __getdomainname(); below.  */
+#include <assert.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 __getdomainname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___getdomainname) || defined (__stub_____getdomainname)
+choke me
+#else
+__getdomainname();
+#endif
+
+; return 0; }
 EOF
- 
+if { (eval echo configure:106460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___getdomainname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___getdomainname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'__getdomainname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
 else
   echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
 fi
-done
 
 
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETDOMAINNAME 1
+EOF
 
+    ac_cv_func_getdomainname=yes
+  ;;
+  
+    *) 
+  
+  unset ac_cv_lib_nsl_getdomainname
+  unset ac_cv_lib_nsl___getdomainname
+  unset found
+  echo $ac_n "checking for getdomainname in -lnsl""... $ac_c" 1>&6
+echo "configure:106498: checking for getdomainname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'getdomainname | 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="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 106506 "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 getdomainname();
 
+int main() {
+getdomainname()
+; return 0; }
+EOF
+if { (eval echo configure:106517: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-echo $ac_n "checking size of char""... $ac_c" 1>&6
-echo "configure:100639: checking size of char" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
+    echo $ac_n "checking for __getdomainname in -lnsl""... $ac_c" 1>&6
+echo "configure:106537: checking for __getdomainname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'__getdomainname | 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 "$cross_compiling" = yes; then
-  ac_cv_sizeof_char=1
-else
-  cat > conftest.$ac_ext <<EOF
-#line 100647 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 106545 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(char));
-  exit(0);
-}
+/* 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 __getdomainname();
+
+int main() {
+__getdomainname()
+; return 0; }
 EOF
-if { (eval echo configure:100659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_char=`cat conftestval`
+if { (eval echo configure:106556: \"$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 -fr conftest*
-  ac_cv_sizeof_char=0
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
-echo "$ac_t""$ac_cv_sizeof_char" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_CHAR $ac_cv_sizeof_char
-EOF
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
+  
+fi
 
 
-echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:100680: checking size of int" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_int=4
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lnsl"
+    if test "$cross_compiling" = yes; then
+  found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 100688 "configure"
+#line 106588 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(int));
-  exit(0);
-}
+main() { return (0); }
 EOF
-if { (eval echo configure:100700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  ac_cv_sizeof_int=`cat conftestval`
+  found=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_sizeof_int=0
+  found=no
 fi
 rm -fr conftest*
 fi
 
-fi
-echo "$ac_t""$ac_cv_sizeof_int" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_INT $ac_cv_sizeof_int
+    LIBS=$ac_libs
+  fi
+
+  if test "$found" = "yes"; then
+    
+  
+  case nsl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lnsl $LIBS" 
+   ;;
+  esac
+
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETDOMAINNAME 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBNSL 1
 EOF
 
+    ac_cv_func_getdomainname=yes
+  else
+    
+  :
+
+  fi
+  
+ ;;
+  
+  esac
+
+	
+  unset ac_cv_func_getservbyport
+  unset ac_cv_func___getservbyport
+  unset found
+  
+  echo $ac_n "checking for getservbyport""... $ac_c" 1>&6
+echo "configure:106643: checking for getservbyport" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getservbyport'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 106648 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getservbyport(); below.  */
+#include <assert.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 getservbyport();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getservbyport) || defined (__stub___getservbyport)
+choke me
+#else
+getservbyport();
+#endif
 
-echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:100720: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_long=4
-else
-  cat > conftest.$ac_ext <<EOF
-#line 100728 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long));
-  exit(0);
-}
+; return 0; }
 EOF
-if { (eval echo configure:100740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long=`cat conftestval`
+if { (eval echo configure:106671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_getservbyport=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long=0
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  eval "ac_cv_func_getservbyport=no"
 fi
-
+rm -f conftest*
 fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-EOF
-
 
-echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:100760: checking size of long long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if eval "test \"`echo '$ac_cv_func_'getservbyport`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
 else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_long_long=8
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __getservbyport""... $ac_c" 1>&6
+echo "configure:106689: checking for __getservbyport" >&5
+if eval "test \"`echo '$''{'ac_cv_func___getservbyport'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 100768 "configure"
+#line 106694 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-#include <sys/types.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long long));
-  exit(0);
-}
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __getservbyport(); below.  */
+#include <assert.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 __getservbyport();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___getservbyport) || defined (__stub_____getservbyport)
+choke me
+#else
+__getservbyport();
+#endif
+
+; return 0; }
 EOF
-if { (eval echo configure:100780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long_long=`cat conftestval`
+if { (eval echo configure:106717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___getservbyport=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long_long=0
+  rm -rf conftest*
+  eval "ac_cv_func___getservbyport=no"
 fi
-rm -fr conftest*
+rm -f conftest*
 fi
 
+if eval "test \"`echo '$ac_cv_func_'__getservbyport`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
 fi
-echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-EOF
 
 
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:100800: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETSERVBYPORT 1
+EOF
+
+    ac_cv_func_getservbyport=yes
+  ;;
+  
+    *) 
+  
+  unset ac_cv_lib_nsl_getservbyport
+  unset ac_cv_lib_nsl___getservbyport
+  unset found
+  echo $ac_n "checking for getservbyport in -lnsl""... $ac_c" 1>&6
+echo "configure:106755: checking for getservbyport in -lnsl" >&5
+ac_lib_var=`echo nsl'_'getservbyport | 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
-  cat > conftest.$ac_ext <<EOF
-#line 100805 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 106763 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
+/* 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 getservbyport();
+
+int main() {
+getservbyport()
+; return 0; }
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+if { (eval echo configure:106774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_type_size_t=yes
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_type_size_t=no
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:100833: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+    echo $ac_n "checking for __getservbyport in -lnsl""... $ac_c" 1>&6
+echo "configure:106794: checking for __getservbyport in -lnsl" >&5
+ac_lib_var=`echo nsl'_'__getservbyport | 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
-  cat > conftest.$ac_ext <<EOF
-#line 100838 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 106802 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.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 __getservbyport();
+
 int main() {
-struct tm *tp;
+__getservbyport()
 ; return 0; }
 EOF
-if { (eval echo configure:100847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:106813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_header_time=yes
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_header_time=no
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
-  cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
+  
 fi
 
-echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:100868: checking for uid_t in sys/types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lnsl"
+    if test "$cross_compiling" = yes; then
+  found=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 100873 "configure"
+#line 106845 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
+main() { return (0); }
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "uid_t" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_uid_t=yes
+if { (eval echo configure:106849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
 else
-  rm -rf conftest*
-  ac_cv_type_uid_t=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
 fi
-rm -f conftest*
-
+rm -fr conftest*
 fi
 
-echo "$ac_t""$ac_cv_type_uid_t" 1>&6
-if test $ac_cv_type_uid_t = no; then
-  cat >> confdefs.h <<\EOF
-#define uid_t int
+    LIBS=$ac_libs
+  fi
+
+  if test "$found" = "yes"; then
+    
+  
+  case nsl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lnsl $LIBS" 
+   ;;
+  esac
+
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETSERVBYPORT 1
 EOF
 
-  cat >> confdefs.h <<\EOF
-#define gid_t int
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBNSL 1
 EOF
 
-fi
+    ac_cv_func_getservbyport=yes
+  else
+    
+  :
 
+  fi
+  
+ ;;
+  
+  esac
 
+	
+  unset ac_cv_func_getservbyname
+  unset ac_cv_func___getservbyname
+  unset found
+  
+  echo $ac_n "checking for getservbyname""... $ac_c" 1>&6
+echo "configure:106900: checking for getservbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getservbyname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 106905 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getservbyname(); below.  */
+#include <assert.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 getservbyname();
 
+int main() {
 
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getservbyname) || defined (__stub___getservbyname)
+choke me
+#else
+getservbyname();
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:106928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_getservbyname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_getservbyname=no"
+fi
+rm -f conftest*
+fi
 
-# Standard XMLRPC list
-for ac_func in \
- strtoul strtoull snprintf \
- strstr strpbrk strerror\
- memcpy memmove
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:100913: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+if eval "test \"`echo '$ac_cv_func_'getservbyname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for __getservbyname""... $ac_c" 1>&6
+echo "configure:106946: checking for __getservbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func___getservbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 100918 "configure"
+#line 106951 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char __getservbyname(); below.  */
 #include <assert.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 $ac_func();
+char __getservbyname();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub___getservbyname) || defined (__stub_____getservbyname)
 choke me
 #else
-$ac_func();
+__getservbyname();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:100941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:106974: \"$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"
+  eval "ac_cv_func___getservbyname=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_func___getservbyname=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'__getservbyname`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
+  found=yes
 else
   echo "$ac_t""no" 1>&6
+found=no
+fi
+ 
 fi
-done
-
-
-
 
-  
-  ext_builddir=ext/xmlrpc
-  ext_srcdir=$abs_srcdir/ext/xmlrpc
 
-  ac_extra=`echo "-I@ext_srcdir@/libxmlrpc -DVERSION="0.50""|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
+  case $found in
+  yes) 
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETSERVBYNAME 1
+EOF
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_XMLRPC_SHARED=no
-    
-  
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
+    ac_cv_func_getservbyname=yes
+  ;;
   
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
-          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
-          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
-          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
-          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
-          libxmlrpc/xml_to_soap.c; do
+    *) 
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+  unset ac_cv_lib_nsl_getservbyname
+  unset ac_cv_lib_nsl___getservbyname
+  unset found
+  echo $ac_n "checking for getservbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:107012: checking for getservbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'getservbyname | 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="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 107020 "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 getservbyname();
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+int main() {
+getservbyname()
+; return 0; }
 EOF
-  done
+if { (eval echo configure:107031: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
 
-    EXT_STATIC="$EXT_STATIC xmlrpc"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
-    fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_XMLRPC_SHARED=yes
-      
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
+    echo $ac_n "checking for __getservbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:107051: checking for __getservbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'__getservbyname | 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="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 107059 "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 __getservbyname();
 
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
+int main() {
+__getservbyname()
+; return 0; }
+EOF
+if { (eval echo configure:107070: \"$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
+  found=yes
+else
+  echo "$ac_t""no" 1>&6
+found=no
+fi
 
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
-          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
-          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
-          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
-          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
-          libxmlrpc/xml_to_soap.c; do
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_xmlrpc="$shared_objects_xmlrpc $ac_bdir$ac_obj.lo"
+fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+  if test "$found" = "yes"; then
+    ac_libs=$LIBS
+    LIBS="$LIBS -lnsl"
+    if test "$cross_compiling" = yes; then
+  found=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 107102 "configure"
+#include "confdefs.h"
+main() { return (0); }
 EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlrpc.so '$ext_builddir'/phpxmlrpc.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLRPC, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD)'
-      ;;
-  esac
+if { (eval echo configure:107106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  found=no
+fi
+rm -fr conftest*
+fi
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlrpc.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlrpc.$suffix"
+    LIBS=$ac_libs
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpxmlrpc.$suffix: $ext_builddir/phpxmlrpc.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlrpc.$suffix \$(phplibdir)
+  if test "$found" = "yes"; then
+    
+  
+  case nsl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lnsl $LIBS" 
+   ;;
+  esac
 
-$ext_builddir/phpxmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(PHPXMLRPC_SHARED_DEPENDENCIES)
-	$link_cmd
 
+    cat >> confdefs.h <<\EOF
+#define HAVE_GETSERVBYNAME 1
 EOF
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
+    cat >> confdefs.h <<\EOF
+#define HAVE_LIBNSL 1
+EOF
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlrpc.so '$ext_builddir'/xmlrpc.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLRPC, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD)'
-      ;;
+    ac_cv_func_getservbyname=yes
+  else
+    
+  :
+
+  fi
+  
+ ;;
+  
   esac
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlrpc.$suffix"
+
+	if test "$PHP_HTTP_ZLIB_COMPRESSION" != "no"; then
+		echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
+echo "configure:107154: checking for zlib.h" >&5
+		ZLIB_DIR=
+		for i in "$PHP_HTTP_ZLIB_COMPRESSION" "$PHP_ZLIB_DIR" "$PHP_ZLIB" /usr/local /usr /opt; do
+			if test -f "$i/include/zlib.h"; then
+				ZLIB_DIR=$i
+				break;
+			fi
+		done
+		if test "x$ZLIB_DIR" = "x"; then
+			echo "$ac_t""not found" 1>&6
+			{ echo "configure: error: could not find zlib.h" 1>&2; exit 1; }
+		else
+			echo "$ac_t""found in $ZLIB_DIR" 1>&6
+			echo $ac_n "checking for zlib version >= 1.2.0.4""... $ac_c" 1>&6
+echo "configure:107168: checking for zlib version >= 1.2.0.4" >&5
+			ZLIB_VERSION=`$EGREP "define ZLIB_VERSION" $ZLIB_DIR/include/zlib.h | $SED -e 's/[^0-9\.]//g'`
+			echo "$ac_t""$ZLIB_VERSION" 1>&6
+			if test `echo $ZLIB_VERSION | $SED -e 's/[^0-9]/ /g' | $AWK '{print $1*1000000 + $2*10000 + $3*100 + $4}'` -lt 1020004; then
+				{ echo "configure: error: libz version greater or equal to 1.2.0.4 required" 1>&2; exit 1; }
+			else
+				
+  if test "$ZLIB_DIR/include" != "/usr/include"; then
+    
+  if test -z "$ZLIB_DIR/include" || echo "$ZLIB_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$ZLIB_DIR/include
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlrpc.$suffix"
+    
+    ep_dir="`echo $ZLIB_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ZLIB_DIR/include\"`"
   fi
+
+    
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/xmlrpc.$suffix: $ext_builddir/xmlrpc.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlrpc.$suffix \$(phplibdir)
+  fi
 
-$ext_builddir/xmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(XMLRPC_SHARED_DEPENDENCIES)
-	$link_cmd
+				
 
-EOF
+  if test "$ext_shared" = "yes"; then
+    HTTP_SHARED_LIBADD="-lz $HTTP_SHARED_LIBADD"
+    if test -n "$ZLIB_DIR/$PHP_LIBDIR"; then
+      
+  if test "$ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$ZLIB_DIR/$PHP_LIBDIR" || echo "$ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$ZLIB_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ZLIB_DIR/$PHP_LIBDIR\"`"
+  fi
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_XMLRPC 1
-EOF
+    
+      if test "$ext_shared" = "yes"; then
+        HTTP_SHARED_LIBADD="-L$ai_p $HTTP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && HTTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $HTTP_SHARED_LIBADD"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
+      fi
+    
+  fi
 
     fi
+  else
+    
+
+  if test -n "$ZLIB_DIR/$PHP_LIBDIR"; then
+    
+  if test "$ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$ZLIB_DIR/$PHP_LIBDIR" || echo "$ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$ZLIB_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ZLIB_DIR/$PHP_LIBDIR\"`"
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_XMLRPC_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
+    
+      
   
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+    
+  fi
 
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
-          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
-          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
-          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
-          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
-          libxmlrpc/xml_to_soap.c; do
+  fi
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
+  
+  case z in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lz $LIBS" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
 
 
-        EXT_STATIC="$EXT_STATIC xmlrpc"
-        ;;
-      *)
-        
-  
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+  fi
+
+
+				cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_ZLIB 1
+EOF
+
+			fi
+		fi
+	fi
+	
+	if test "$PHP_HTTP_CURL_REQUESTS" != "no"; then
+		echo $ac_n "checking for curl/curl.h""... $ac_c" 1>&6
+echo "configure:107312: checking for curl/curl.h" >&5
+		CURL_DIR=
+		for i in "$PHP_HTTP_CURL_REQUESTS" /usr/local /usr /opt; do
+			if test -f "$i/include/curl/curl.h"; then
+				CURL_DIR=$i
+				break
+			fi
+		done
+		if test "x$CURL_DIR" = "x"; then
+			echo "$ac_t""not found" 1>&6
+			{ echo "configure: error: could not find curl/curl.h" 1>&2; exit 1; }
+		else
+			echo "$ac_t""found in $CURL_DIR" 1>&6
+		fi
+		
+		echo $ac_n "checking for curl-config""... $ac_c" 1>&6
+echo "configure:107328: checking for curl-config" >&5
+		CURL_CONFIG=
+		for i in "$CURL_DIR/bin/curl-config" "$CURL_DIR/curl-config" `which curl-config`; do
+			if test -x "$i"; then
+				CURL_CONFIG=$i
+				break
+			fi
+		done
+		if test "x$CURL_CONFIG" = "x"; then
+			echo "$ac_t""not found" 1>&6
+			{ echo "configure: error: could not find curl-config" 1>&2; exit 1; }
+		else
+			echo "$ac_t""found: $CURL_CONFIG" 1>&6
+		fi
+		
+				echo $ac_n "checking for curl version >= 7.12.3""... $ac_c" 1>&6
+echo "configure:107344: checking for curl version >= 7.12.3" >&5
+		CURL_VERSION=`$CURL_CONFIG --version | $SED -e 's/[^0-9\.]//g'`
+		echo "$ac_t""$CURL_VERSION" 1>&6
+		if test `echo $CURL_VERSION | $SED -e 's/[^0-9]/ /g' | $AWK '{print $1*10000 + $2*100 + $3}'` -lt 71203; then
+			{ echo "configure: error: libcurl version greater or equal to 7.12.3 required" 1>&2; exit 1; }
+		fi
+		
+								
+		save_INCLUDES="$INCLUDES"
+		INCLUDES=
+		save_LIBS="$LIBS"
+		LIBS=
+		save_CFLAGS="$CFLAGS"
+		CFLAGS=`$CURL_CONFIG --cflags`
+		save_LDFLAGS="$LDFLAGS"
+		LDFLAGS=`$CURL_CONFIG --libs`
+		LDFLAGS="$LDFLAGS $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
+		
+		echo $ac_n "checking for SSL support in libcurl""... $ac_c" 1>&6
+echo "configure:107363: checking for SSL support in libcurl" >&5
+		CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
+		if test "$CURL_SSL" = "SSL"; then
+			echo "$ac_t""yes" 1>&6
+			cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_SSL 1
+EOF
+
+			
+			echo $ac_n "checking for openssl support in libcurl""... $ac_c" 1>&6
+echo "configure:107373: checking for openssl support in libcurl" >&5
+			if test "$cross_compiling" = yes; then
+  
+				echo "$ac_t""no" 1>&6
+			
+else
+  cat > conftest.$ac_ext <<EOF
+#line 107380 "configure"
+#include "confdefs.h"
+
+				#include <curl/curl.h>
+				int main(int argc, char *argv[]) {
+					curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+					if (data && data->ssl_version && *data->ssl_version) {
+						const char *ptr = data->ssl_version;
+						while(*ptr == ' ') ++ptr;
+						return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
+					}
+					return 1;
+				}
+			
+EOF
+if { (eval echo configure:107395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
+				echo "$ac_t""yes" 1>&6
+				ac_safe=`echo "openssl/crypto.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for openssl/crypto.h""... $ac_c" 1>&6
+echo "configure:107401: checking for openssl/crypto.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 107406 "configure"
+#include "confdefs.h"
+#include <openssl/crypto.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:107411: \"$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
   
+					cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_OPENSSL 1
+EOF
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
+				
+else
+  echo "$ac_t""no" 1>&6
+fi
 
+			
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+				echo "$ac_t""no" 1>&6
+			
+fi
+rm -fr conftest*
+fi
 
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \
-          libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
-          libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
-          libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
-          libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
-          libxmlrpc/xml_to_soap.c; do
+			
+			echo $ac_n "checking for gnutls support in libcurl""... $ac_c" 1>&6
+echo "configure:107451: checking for gnutls support in libcurl" >&5
+			if test "$cross_compiling" = yes; then
+  
+				echo "$ac_t""no" 1>&6
+			
+else
+  cat > conftest.$ac_ext <<EOF
+#line 107458 "configure"
+#include "confdefs.h"
+
+				#include <curl/curl.h>
+				int main(int argc, char *argv[]) {
+					curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+					if (data && data->ssl_version && *data->ssl_version) {
+						const char *ptr = data->ssl_version;
+						while(*ptr == ' ') ++ptr;
+						return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
+					}
+					return 1;
+				}
+			
+EOF
+if { (eval echo configure:107473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+				echo "$ac_t""yes" 1>&6
+				ac_safe=`echo "gcrypt.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for gcrypt.h""... $ac_c" 1>&6
+echo "configure:107479: checking for gcrypt.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 107484 "configure"
+#include "confdefs.h"
+#include <gcrypt.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:107489: \"$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
+  
+					cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_GNUTLS 1
+EOF
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
+				
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+			
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+				echo "$ac_t""no" 1>&6
+			
+fi
+rm -fr conftest*
+fi
 
+		else
+			echo "$ac_t""no" 1>&6
+		fi
+		
+		INCLUDES="$save_INCLUDES"
+		LIBS="$save_LIBS"
+		CFLAGS="$save_CFLAGS"
+		LDFLAGS="$save_LDFLAGS"
+		
+				
+		echo $ac_n "checking for bundled SSL CA info""... $ac_c" 1>&6
+echo "configure:107538: checking for bundled SSL CA info" >&5
+		CURL_CAINFO=
+		for i in `$CURL_CONFIG --ca` "/etc/ssl/certs/ca-certificates.crt"; do
+			if test -f "$i"; then
+				CURL_CAINFO="$i"
+				break
+			fi
+		done
+		if test "x$CURL_CAINFO" = "x"; then
+			echo "$ac_t""not found" 1>&6
+		else
+			echo "$ac_t""$CURL_CAINFO" 1>&6
+			cat >> confdefs.h <<EOF
+#define HTTP_CURL_CAINFO "$CURL_CAINFO"
+EOF
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
+		fi
+		
+		
+  if test "$CURL_DIR/include" != "/usr/include"; then
+    
+  if test -z "$CURL_DIR/include" || echo "$CURL_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$CURL_DIR/include
+  else
+    
+    ep_dir="`echo $CURL_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$CURL_DIR/include\"`"
   fi
+
+    
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
+  fi
 
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=xmlrpc
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
+		
 
+  if test "$ext_shared" = "yes"; then
+    HTTP_SHARED_LIBADD="-lcurl $HTTP_SHARED_LIBADD"
+    if test -n "$CURL_DIR/$PHP_LIBDIR"; then
+      
+  if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$CURL_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`"
   fi
 
+    
+      if test "$ext_shared" = "yes"; then
+        HTTP_SHARED_LIBADD="-L$ai_p $HTTP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && HTTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $HTTP_SHARED_LIBADD"
+      else
+        
   
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir/libxmlrpc"
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-  XMLRPC_MODULE_TYPE=builtin
-
-elif test "$PHP_XMLRPC" != "no"; then
 
-  if test -r $PHP_XMLRPC/include/xmlrpc.h; then
-    XMLRPC_DIR=$PHP_XMLRPC/include
-  elif test -r $PHP_XMLRPC/include/xmlrpc-epi/xmlrpc.h; then
-    XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi
-  else
-    echo $ac_n "checking for XMLRPC-EPI in default path""... $ac_c" 1>&6
-echo "configure:101295: checking for XMLRPC-EPI in default path" >&5
-    for i in /usr/local /usr; do
-      if test -r $i/include/xmlrpc.h; then
-        XMLRPC_DIR=$i/include
-        echo "$ac_t""found in $i" 1>&6
-        break
       fi
-    done
+    
   fi
 
-  if test -z "$XMLRPC_DIR"; then
-    echo "$ac_t""not found" 1>&6
-    { echo "configure: error: Please reinstall the XMLRPC-EPI distribution" 1>&2; exit 1; }
-  fi
+    fi
+  else
+    
 
-  
-  if test "$XMLRPC_DIR" != "/usr/include"; then
+  if test -n "$CURL_DIR/$PHP_LIBDIR"; then
     
-  if test -z "$XMLRPC_DIR" || echo "$XMLRPC_DIR" | grep '^/' >/dev/null ; then
-    ai_p=$XMLRPC_DIR
+  if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$CURL_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $XMLRPC_DIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$XMLRPC_DIR\"`"
+    ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`"
   fi
 
     
+      
+  
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
+    eval "LIBPATH$unique=set"
     
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
+
+
     
   fi
 
   fi
+  
+  
+  case curl in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-lcurl $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
 
+		
+  for ac_i in `$CURL_CONFIG --libs`; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        HTTP_SHARED_LIBADD="$HTTP_SHARED_LIBADD -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  if test "$ext_shared" = "yes"; then
-    XMLRPC_SHARED_LIBADD="-lxmlrpc $XMLRPC_SHARED_LIBADD"
-    if test -n "$XMLRPC_DIR/$PHP_LIBDIR"; then
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
       
-  if test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        HTTP_SHARED_LIBADD="$HTTP_SHARED_LIBADD -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
     
-  if test -z "$XMLRPC_DIR/$PHP_LIBDIR" || echo "$XMLRPC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$XMLRPC_DIR/$PHP_LIBDIR
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
-    ep_dir="`echo $XMLRPC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$XMLRPC_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD"
+        HTTP_SHARED_LIBADD="-L$ai_p $HTTP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && HTTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $HTTP_SHARED_LIBADD"
       else
         
   
@@ -101380,26 +107765,88 @@ echo "configure:101295: checking for XML
     
   fi
 
+    ;;
+    esac
+  done
+
+		cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_CURL 1
+EOF
+
+		
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+		"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
     fi
-  else
-    
+   ;;
+  esac
 
-  if test -n "$XMLRPC_DIR/$PHP_LIBDIR"; then
-    
-  if test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
     
-  if test -z "$XMLRPC_DIR/$PHP_LIBDIR" || echo "$XMLRPC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$XMLRPC_DIR/$PHP_LIBDIR
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
   else
     
-    ep_dir="`echo $XMLRPC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$XMLRPC_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
 
     
-      
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
@@ -101415,431 +107862,676 @@ echo "configure:101295: checking for XML
   fi
 
 
+      fi
     
   fi
 
-  fi
-  
-  
-  case xmlrpc in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lxmlrpc $LIBS" 
-   ;;
-  esac
-
-
+    ;;
+    esac
+  done
 
+  echo $ac_n "checking for curl_share_strerror in -lcurl""... $ac_c" 1>&6
+echo "configure:107875: checking for curl_share_strerror in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_share_strerror | 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="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 107883 "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 curl_share_strerror();
 
-  fi
+int main() {
+curl_share_strerror()
+; return 0; }
+EOF
+if { (eval echo configure:107894: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_SHARE_STRERROR 1
+EOF
 
   
-  ext_builddir=ext/xmlrpc
-  ext_srcdir=$abs_srcdir/ext/xmlrpc
+else
+  echo "$ac_t""no" 1>&6
 
-  ac_extra=
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_share_strerror
+     
+  
+fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_XMLRPC_SHARED=no
-    
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+		"
   
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
   
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c; do
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
       
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
 
-    EXT_STATIC="$EXT_STATIC xmlrpc"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
     fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_XMLRPC_SHARED=yes
-      
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+   ;;
   esac
-  
-  
 
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
 
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c; do
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_xmlrpc="$shared_objects_xmlrpc $ac_bdir$ac_obj.lo"
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
+      fi
+    
+  fi
+
+    ;;
+    esac
   done
 
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
+  echo $ac_n "checking for curl_multi_strerror in -lcurl""... $ac_c" 1>&6
+echo "configure:108024: checking for curl_multi_strerror in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_multi_strerror | 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="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 108032 "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 curl_multi_strerror();
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlrpc.so '$ext_builddir'/phpxmlrpc.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLRPC, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(PHPXMLRPC_SHARED_LIBADD)'
-      ;;
-  esac
+int main() {
+curl_multi_strerror()
+; return 0; }
+EOF
+if { (eval echo configure:108043: \"$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"
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlrpc.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlrpc.$suffix"
-  fi
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpxmlrpc.$suffix: $ext_builddir/phpxmlrpc.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlrpc.$suffix \$(phplibdir)
-
-$ext_builddir/phpxmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(PHPXMLRPC_SHARED_DEPENDENCIES)
-	$link_cmd
-
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_MULTI_STRERROR 1
 EOF
 
-          ;;
-        *)
-          
-  install_modules="install-modules"
+  
+else
+  echo "$ac_t""no" 1>&6
 
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlrpc.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlrpc.so '$ext_builddir'/xmlrpc.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLRPC, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlrpc) $(XMLRPC_SHARED_LIBADD)'
-      ;;
-  esac
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_multi_strerror
+     
+  
+fi
 
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlrpc.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlrpc.$suffix"
-  fi
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+		"
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlrpc"
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/xmlrpc.$suffix: $ext_builddir/xmlrpc.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlrpc.$suffix \$(phplibdir)
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-$ext_builddir/xmlrpc.$suffix: \$(shared_objects_xmlrpc) \$(XMLRPC_SHARED_DEPENDENCIES)
-	$link_cmd
 
-EOF
+    fi
+   ;;
+  esac
 
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_XMLRPC 1
-EOF
 
-    fi
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_XMLRPC_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
         
   
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
 
+      fi
+    
+  fi
+
+    ;;
+    esac
+  done
+
+  echo $ac_n "checking for curl_easy_strerror in -lcurl""... $ac_c" 1>&6
+echo "configure:108173: checking for curl_easy_strerror in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_easy_strerror | 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="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 108181 "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 curl_easy_strerror();
+
+int main() {
+curl_easy_strerror()
+; return 0; }
+EOF
+if { (eval echo configure:108192: \"$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"
 
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c; do
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_EASY_STRERROR 1
 EOF
-  done
 
+  
+else
+  echo "$ac_t""no" 1>&6
 
-        EXT_STATIC="$EXT_STATIC xmlrpc"
-        ;;
-      *)
-        
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_easy_strerror
+     
   
-  case ext/xmlrpc in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
+fi
+
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+		"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
   
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
   
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in xmlrpc-epi-php.c; do
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
       
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
 
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+    fi
+   ;;
+  esac
 
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlrpc"
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
   fi
+
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
   
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=xmlrpc
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
   fi
 
-  XMLRPC_MODULE_TYPE=external
-fi
-
 
+      fi
+    
+  fi
 
-php_enable_xmlwriter=yes
+    ;;
+    esac
+  done
 
-echo $ac_n "checking whether to enable XMLWriter support""... $ac_c" 1>&6
-echo "configure:101738: checking whether to enable XMLWriter support" >&5
-# Check whether --enable-xmlwriter or --disable-xmlwriter was given.
-if test "${enable_xmlwriter+set}" = set; then
-  enableval="$enable_xmlwriter"
-  PHP_XMLWRITER=$enableval
+  echo $ac_n "checking for curl_easy_reset in -lcurl""... $ac_c" 1>&6
+echo "configure:108322: checking for curl_easy_reset in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_easy_reset | 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
-  
-  PHP_XMLWRITER=yes
-  test "$PHP_ENABLE_ALL" && PHP_XMLWRITER=$PHP_ENABLE_ALL
+  ac_save_LIBS="$LIBS"
+LIBS="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 108330 "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 curl_easy_reset();
 
+int main() {
+curl_easy_reset()
+; return 0; }
+EOF
+if { (eval echo configure:108341: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_EASY_RESET 1
+EOF
 
+  
+else
+  echo "$ac_t""no" 1>&6
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_XMLWRITER in
-shared,*)
-  PHP_XMLWRITER=`echo "$PHP_XMLWRITER"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_XMLWRITER=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_easy_reset
+     
+  
+fi
 
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+		"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-echo "$ac_t""$ext_output" 1>&6
 
+    fi
+   ;;
+  esac
 
 
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
-if test -z "$PHP_LIBXML_DIR"; then
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
   
-php_with_libxml_dir=no
-
-echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:101783: checking libxml2 install dir" >&5
-# Check whether --with-libxml-dir or --without-libxml-dir was given.
-if test "${with_libxml_dir+set}" = set; then
-  withval="$with_libxml_dir"
-  PHP_LIBXML_DIR=$withval
-else
   
-  PHP_LIBXML_DIR=no
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-
-fi
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
 
-ext_output=$PHP_LIBXML_DIR
-echo "$ac_t""$ext_output" 1>&6
+      fi
+    
+  fi
 
+    ;;
+    esac
+  done
 
+  echo $ac_n "checking for curl_formget in -lcurl""... $ac_c" 1>&6
+echo "configure:108471: checking for curl_formget in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_formget | 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="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 108479 "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 curl_formget();
 
+int main() {
+curl_formget()
+; return 0; }
+EOF
+if { (eval echo configure:108490: \"$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"
 
-if test "$PHP_XMLWRITER" != "no"; then
-
-  if test "$PHP_LIBXML" = "no"; then
-    { echo "configure: error: XMLWriter extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
-  fi
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_FORMGET 1
+EOF
 
   
-echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:101811: checking for xml2-config path" >&5
-if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-  for i in $PHP_LIBXML_DIR /usr/local /usr; do
-    if test -x "$i/bin/xml2-config"; then
-      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
-      break
-    fi
-  done
+  echo "$ac_t""no" 1>&6
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_formget
+     
+  
 fi
 
-echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
-
-  if test -x "$ac_cv_php_xml2_config_path"; then
-    XML2_CONFIG="$ac_cv_php_xml2_config_path"
-    libxml_full_version=`$XML2_CONFIG --version`
-    ac_IFS=$IFS
-    IFS="."
-    set $libxml_full_version
-    IFS=$ac_IFS
-    LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
-    if test "$LIBXML_VERSION" -ge "2006011"; then
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
-      LIBXML_INCS=`$XML2_CONFIG --cflags`
-      
-  for ac_i in $LIBXML_LIBS; do
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+		"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -pthread"
+        LDFLAGS="$LDFLAGS -pthread"
       else
         
   
@@ -101861,7 +108553,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -l$ac_ii" 
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
     else
       
   
@@ -101896,8 +108588,8 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
 
     
       if test "$ext_shared" = "yes"; then
-        XMLWRITER_SHARED_LIBADD="-L$ai_p $XMLWRITER_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XMLWRITER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLWRITER_SHARED_LIBADD"
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
       else
         
   
@@ -101923,13 +108615,115 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
     esac
   done
 
-      
-  for ac_i in $LIBXML_INCS; do
+  echo $ac_n "checking for curl_multi_setopt in -lcurl""... $ac_c" 1>&6
+echo "configure:108620: checking for curl_multi_setopt in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_multi_setopt | 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="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 108628 "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 curl_multi_setopt();
+
+int main() {
+curl_multi_setopt()
+; return 0; }
+EOF
+if { (eval echo configure:108639: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_MULTI_SETOPT 1
+EOF
+
+  
+else
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_multi_setopt
+     
+  
+fi
+
+		
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+		"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
     case $ac_i in
-    -I*)
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
+
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
+  
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
+
+
+    fi
+   ;;
+  esac
+
+
+    ;;
+    -L*)
       ac_ii=`echo $ac_i|cut -c 3-`
       
-  if test "$ac_ii" != "/usr/include"; then
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
     
   if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
     ai_p=$ac_ii
@@ -101942,481 +108736,290 @@ echo "$ac_t""$ac_cv_php_xml2_config_path
   fi
 
     
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
   
   unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
+    eval "LIBPATH$unique=set"
     
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
   fi
 
+
+      fi
+    
   fi
 
     ;;
     esac
   done
 
-
-            echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:101969: checking whether libxml build works" >&5
-if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
+  echo $ac_n "checking for curl_multi_timeout in -lcurl""... $ac_c" 1>&6
+echo "configure:108769: checking for curl_multi_timeout in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_multi_timeout | 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
-  
-        
-  old_LIBS=$LIBS
-  LIBS="
-          $XMLWRITER_SHARED_LIBADD
-         $LIBS"
-  if test "$cross_compiling" = yes; then
-  
-    LIBS=$old_LIBS
-  
-else
-  cat > conftest.$ac_ext <<EOF
-#line 101985 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 108777 "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 curl_multi_timeout();
 
-    
-    char xmlInitParser();
-    int main() {
-      xmlInitParser();
-      return 0;
-    }
-  
+int main() {
+curl_multi_timeout()
+; return 0; }
 EOF
-if { (eval echo configure:101996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  
-    LIBS=$old_LIBS
-    
-          php_cv_libxml_build_works=yes
-        
-  
+if { (eval echo configure:108788: \"$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 -fr conftest*
-  
-    LIBS=$old_LIBS
-    
-          echo "$ac_t""no" 1>&6
-          { echo "configure: error: build test failed.  Please check the config.log for details." 1>&2; exit 1; }
-        
-  
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-
-      
 fi
-
-echo "$ac_t""$php_cv_libxml_build_works" 1>&6
-      if test "$php_cv_libxml_build_works" = "yes"; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_LIBXML 1
-EOF
-
-      fi
-      
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
     cat >> confdefs.h <<\EOF
-#define HAVE_XMLWRITER 1
+#define HAVE_CURL_MULTI_TIMEOUT 1
 EOF
 
-    
-  ext_builddir=ext/xmlwriter
-  ext_srcdir=$abs_srcdir/ext/xmlwriter
-
-  ac_extra=
-
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_XMLWRITER_SHARED=no
-    
-  
-  case ext/xmlwriter in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
   
+else
+  echo "$ac_t""no" 1>&6
 
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in php_xmlwriter.c; do
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_multi_timeout
+     
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
+fi
 
-    EXT_STATIC="$EXT_STATIC xmlwriter"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlwriter"
-    fi
+		
+								
+		if test "$PHP_HTTP_CURL_LIBEVENT" != "no"; then
+			
+		extname=event
+		haveext=$PHP_EVENT
+		
+		echo $ac_n "checking for ext/$extname support""... $ac_c" 1>&6
+echo "configure:108829: checking for ext/$extname support" >&5
+		if test -x "$PHP_EXECUTABLE"; then
+			grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$`
+			if test "$grepext" = "$extname"; then
+				HTTP_HAVE_EXT_EVENT=1
+				echo "$ac_t""yes" 1>&6
+				
+				echo "configure: warning: event support is incompatible with pecl/event; continuing without libevent support" 1>&2
+			
+			else
+				HTTP_HAVE_EXT_EVENT=
+				echo "$ac_t""no" 1>&6
+				
+				echo $ac_n "checking for event.h""... $ac_c" 1>&6
+echo "configure:108843: checking for event.h" >&5
+				EVENT_DIR=
+				for i in "$PHP_HTTP_CURL_LIBEVENT" /usr/local /usr /opt; do
+					if test -f "$i/include/event.h"; then
+						EVENT_DIR=$i
+						break
+					fi
+				done
+				if test "x$EVENT_DIR" = "x"; then
+					echo "$ac_t""not found" 1>&6
+					echo "configure: warning: continuing without libevent support" 1>&2
+				else
+					echo "$ac_t""found in $EVENT_DIR" 1>&6
+					
+					echo $ac_n "checking for libevent version, roughly""... $ac_c" 1>&6
+echo "configure:108858: checking for libevent version, roughly" >&5
+					EVENT_VER="1.1b or lower"
+					if test -f "$EVENT_DIR/include/evhttp.h" && test -f "$EVENT_DIR/include/evdns.h"; then
+						if test -f "$EVENT_DIR/include/evrpc.h"; then
+							EVENT_VER="1.4 or greater"
+						else
+							EVENT_VER="1.2 or greater"
+						fi
+					fi
+					cat >> confdefs.h <<EOF
+#define HTTP_EVENT_VERSION "$EVENT_VER"
+EOF
+
+					echo "$ac_t""$EVENT_VER" 1>&6
+					
+					echo $ac_n "checking for libcurl version >= 7.16.0""... $ac_c" 1>&6
+echo "configure:108874: checking for libcurl version >= 7.16.0" >&5
+					echo "$ac_t""$CURL_VERSION" 1>&6
+					if test `echo $CURL_VERSION | $SED -e 's/[^0-9]/ /g' | $AWK '{print $1*10000 + $2*100 + $3}'` -lt 71600; then
+						echo "configure: warning: libcurl version greater or equal to 7.16.0 required; continuing without libevent support" 1>&2
+					else
+						
+  if test "$EVENT_DIR/include" != "/usr/include"; then
+    
+  if test -z "$EVENT_DIR/include" || echo "$EVENT_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$EVENT_DIR/include
   else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_XMLWRITER_SHARED=yes
-      
-  case ext/xmlwriter in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
-
+    
+    ep_dir="`echo $EVENT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EVENT_DIR/include\"`"
+  fi
 
-  old_IFS=$IFS
-  for ac_src in php_xmlwriter.c; do
+    
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_xmlwriter="$shared_objects_xmlwriter $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxmlwriter.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(PHPXMLWRITER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxmlwriter.so '$ext_builddir'/phpxmlwriter.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXMLWRITER, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(PHPXMLWRITER_SHARED_LIBADD)'
-      ;;
-  esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxmlwriter.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxmlwriter.$suffix"
-  fi
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlwriter"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpxmlwriter.$suffix: $ext_builddir/phpxmlwriter.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxmlwriter.$suffix \$(phplibdir)
-
-$ext_builddir/phpxmlwriter.$suffix: \$(shared_objects_xmlwriter) \$(PHPXMLWRITER_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
-
-          ;;
-        *)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xmlwriter.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(XMLWRITER_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xmlwriter.so '$ext_builddir'/xmlwriter.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XMLWRITER, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xmlwriter) $(XMLWRITER_SHARED_LIBADD)'
-      ;;
-  esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlwriter.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlwriter.$suffix"
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
   fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlwriter"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/xmlwriter.$suffix: $ext_builddir/xmlwriter.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/xmlwriter.$suffix \$(phplibdir)
-
-$ext_builddir/xmlwriter.$suffix: \$(shared_objects_xmlwriter) \$(XMLWRITER_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
-
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_XMLWRITER 1
-EOF
 
-    fi
   fi
 
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_XMLWRITER_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
-  
-  case ext/xmlwriter in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
+						
 
-  old_IFS=$IFS
-  for ac_src in php_xmlwriter.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
+  if test "$ext_shared" = "yes"; then
+    HTTP_SHARED_LIBADD="-levent $HTTP_SHARED_LIBADD"
+    if test -n "$EVENT_DIR/$PHP_LIBDIR"; then
       
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
+  if test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$EVENT_DIR/$PHP_LIBDIR" || echo "$EVENT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EVENT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $EVENT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EVENT_DIR/$PHP_LIBDIR\"`"
+  fi
 
-        EXT_STATIC="$EXT_STATIC xmlwriter"
-        ;;
-      *)
+    
+      if test "$ext_shared" = "yes"; then
+        HTTP_SHARED_LIBADD="-L$ai_p $HTTP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && HTTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $HTTP_SHARED_LIBADD"
+      else
         
   
-  case ext/xmlwriter in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
   
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in php_xmlwriter.c; do
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
+  fi
 
 
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlwriter"
+      fi
+    
   fi
-  
-  
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
 
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=xmlwriter
+    fi
+  else
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
+  if test -n "$EVENT_DIR/$PHP_LIBDIR"; then
+    
+  if test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+    
+  if test -z "$EVENT_DIR/$PHP_LIBDIR" || echo "$EVENT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EVENT_DIR/$PHP_LIBDIR
+  else
+    
+    ep_dir="`echo $EVENT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$EVENT_DIR/$PHP_LIBDIR\"`"
   fi
 
     
-  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLWRITER_SHARED_LIBADD"
-
+      
   
-    else
-      { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; }
-    fi
-else 
-    { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; }
   
-  fi
-
-fi
-
-
-
-php_with_xsl=no
-
-echo $ac_n "checking for XSL support""... $ac_c" 1>&6
-echo "configure:102346: checking for XSL support" >&5
-# Check whether --with-xsl or --without-xsl was given.
-if test "${with_xsl+set}" = set; then
-  withval="$with_xsl"
-  PHP_XSL=$withval
-else
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
   
-  PHP_XSL=no
-  test "$PHP_ENABLE_ALL" && PHP_XSL=$PHP_ENABLE_ALL
-
-fi
-
-
-
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_XSL in
-shared,*)
-  PHP_XSL=`echo "$PHP_XSL"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_XSL=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
-
-
-
-echo "$ac_t""$ext_output" 1>&6
-
-
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
 
-if test "$PHP_XSL" != "no"; then
+    
+  fi
 
-  if test "$PHP_LIBXML" = "no"; then
-    { echo "configure: error: XSL extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; }
   fi
   
-  if test "$PHP_DOM" = "no"; then
-    { echo "configure: error: XSL extension requires DOM extension, add --enable-dom" 1>&2; exit 1; }
-  fi
-
-  for i in $PHP_XSL /usr/local /usr; do
-    if test -x "$i/bin/xslt-config"; then
-      XSLT_CONFIG=$i/bin/xslt-config
-      break
-    fi
-  done
-
-  if test -z "$XSLT_CONFIG"; then
-    { echo "configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution" 1>&2; exit 1; }
-  else
-    libxslt_full_version=`$XSLT_CONFIG --version`
-    ac_IFS=$IFS
-    IFS="."
-    set $libxslt_full_version
-    IFS=$ac_IFS
-    LIBXSLT_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
-    if test "$LIBXSLT_VERSION" -ge "1001000"; then
-      XSL_LIBS=`$XSLT_CONFIG --libs`
-      XSL_INCS=`$XSLT_CONFIG --cflags`
-      
-  for ac_i in $XSL_LIBS; do
+  
+  case event in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-levent $LIBS" 
+   ;;
+  esac
+
+
+
+
+  fi
+
+
+						cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_EVENT 1
+EOF
+
+						
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+						"
+  
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
     case $ac_i in
     -pthread)
       if test "$ext_shared" = "yes"; then
-        XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -pthread"
+        LDFLAGS="$LDFLAGS -pthread"
       else
         
   
@@ -102438,7 +109041,7 @@ if test "$PHP_XSL" != "no"; then
   c|c_r|pthread*) ;;
   *) 
     if test "$ext_shared" = "yes"; then
-        XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -l$ac_ii" 
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
     else
       
   
@@ -102473,8 +109076,8 @@ if test "$PHP_XSL" != "no"; then
 
     
       if test "$ext_shared" = "yes"; then
-        XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD"
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
       else
         
   
@@ -102500,22 +109103,121 @@ if test "$PHP_XSL" != "no"; then
     esac
   done
 
-      
-  for ac_i in $XSL_INCS; do
-    case $ac_i in
-    -I*)
-      ac_ii=`echo $ac_i|cut -c 3-`
-      
-  if test "$ac_ii" != "/usr/include"; then
+  echo $ac_n "checking for curl_multi_socket_action in -lcurl""... $ac_c" 1>&6
+echo "configure:109108: checking for curl_multi_socket_action in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_multi_socket_action | 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="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 109116 "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 curl_multi_socket_action();
+
+int main() {
+curl_multi_socket_action()
+; return 0; }
+EOF
+if { (eval echo configure:109127: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_MULTI_SOCKET_ACTION 1
+EOF
+
+  
+else
+  echo "$ac_t""no" 1>&6
+
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_multi_socket_action
+     
+  
+fi
+
+					fi
+				fi
+			
+			fi
+		elif test "$haveext" != "no" && test "x$haveext" != "x"; then
+			HTTP_HAVE_EXT_EVENT=1
+			echo "$ac_t""yes" 1>&6
+			
+				echo "configure: warning: event support is incompatible with pecl/event; continuing without libevent support" 1>&2
+			
+		else
+			HTTP_HAVE_EXT_EVENT=
+			echo "$ac_t""no" 1>&6
+			
+				echo $ac_n "checking for event.h""... $ac_c" 1>&6
+echo "configure:109175: checking for event.h" >&5
+				EVENT_DIR=
+				for i in "$PHP_HTTP_CURL_LIBEVENT" /usr/local /usr /opt; do
+					if test -f "$i/include/event.h"; then
+						EVENT_DIR=$i
+						break
+					fi
+				done
+				if test "x$EVENT_DIR" = "x"; then
+					echo "$ac_t""not found" 1>&6
+					echo "configure: warning: continuing without libevent support" 1>&2
+				else
+					echo "$ac_t""found in $EVENT_DIR" 1>&6
+					
+					echo $ac_n "checking for libevent version, roughly""... $ac_c" 1>&6
+echo "configure:109190: checking for libevent version, roughly" >&5
+					EVENT_VER="1.1b or lower"
+					if test -f "$EVENT_DIR/include/evhttp.h" && test -f "$EVENT_DIR/include/evdns.h"; then
+						if test -f "$EVENT_DIR/include/evrpc.h"; then
+							EVENT_VER="1.4 or greater"
+						else
+							EVENT_VER="1.2 or greater"
+						fi
+					fi
+					cat >> confdefs.h <<EOF
+#define HTTP_EVENT_VERSION "$EVENT_VER"
+EOF
+
+					echo "$ac_t""$EVENT_VER" 1>&6
+					
+					echo $ac_n "checking for libcurl version >= 7.16.0""... $ac_c" 1>&6
+echo "configure:109206: checking for libcurl version >= 7.16.0" >&5
+					echo "$ac_t""$CURL_VERSION" 1>&6
+					if test `echo $CURL_VERSION | $SED -e 's/[^0-9]/ /g' | $AWK '{print $1*10000 + $2*100 + $3}'` -lt 71600; then
+						echo "configure: warning: libcurl version greater or equal to 7.16.0 required; continuing without libevent support" 1>&2
+					else
+						
+  if test "$EVENT_DIR/include" != "/usr/include"; then
     
-  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
-    ai_p=$ac_ii
+  if test -z "$EVENT_DIR/include" || echo "$EVENT_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$EVENT_DIR/include
   else
     
-    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $EVENT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+    ai_p="$ep_realdir/`basename \"$EVENT_DIR/include\"`"
   fi
 
     
@@ -102536,45 +109238,28 @@ if test "$PHP_XSL" != "no"; then
 
   fi
 
-    ;;
-    esac
-  done
-
-      
-      echo $ac_n "checking for EXSLT support""... $ac_c" 1>&6
-echo "configure:102546: checking for EXSLT support" >&5
-      for i in $PHP_XSL /usr/local /usr; do
-        if test -r "$i/include/libexslt/exslt.h"; then
-          PHP_XSL_EXSL_DIR=$i
-          break
-        fi
-      done
-      if test -z "$PHP_XSL_EXSL_DIR"; then
-        echo "$ac_t""not found" 1>&6
-      else 
-        echo "$ac_t""found" 1>&6
-        
+						
 
   if test "$ext_shared" = "yes"; then
-    XSL_SHARED_LIBADD="-lexslt $XSL_SHARED_LIBADD"
-    if test -n "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR"; then
+    HTTP_SHARED_LIBADD="-levent $HTTP_SHARED_LIBADD"
+    if test -n "$EVENT_DIR/$PHP_LIBDIR"; then
       
-  if test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" || echo "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PHP_XSL_EXSL_DIR/$PHP_LIBDIR
+  if test -z "$EVENT_DIR/$PHP_LIBDIR" || echo "$EVENT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EVENT_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $PHP_XSL_EXSL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $EVENT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$EVENT_DIR/$PHP_LIBDIR\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD"
+        HTTP_SHARED_LIBADD="-L$ai_p $HTTP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && HTTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $HTTP_SHARED_LIBADD"
       else
         
   
@@ -102600,18 +109285,18 @@ echo "configure:102546: checking for EXS
   else
     
 
-  if test -n "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR"; then
+  if test -n "$EVENT_DIR/$PHP_LIBDIR"; then
     
-  if test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EVENT_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" || echo "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PHP_XSL_EXSL_DIR/$PHP_LIBDIR
+  if test -z "$EVENT_DIR/$PHP_LIBDIR" || echo "$EVENT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$EVENT_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $PHP_XSL_EXSL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $EVENT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$EVENT_DIR/$PHP_LIBDIR\"`"
   fi
 
     
@@ -102623,541 +109308,264 @@ echo "configure:102546: checking for EXS
   cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
   if test -n "$unique" && test "`eval $cmd`" = "" ; then
     eval "LIBPATH$unique=set"
-    
-    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
-    LDFLAGS="$LDFLAGS -L$ai_p"
-    PHP_RPATHS="$PHP_RPATHS $ai_p"
-  
-  fi
-
-
-    
-  fi
-
-  fi
-  
-  
-  case exslt in
-  c|c_r|pthread*) ;;
-  *) 
-      LIBS="-lexslt $LIBS" 
-   ;;
-  esac
-
-
-
-
-  fi
-
-
-        
-  if test "$PHP_XSL_EXSL_DIR/include" != "/usr/include"; then
-    
-  if test -z "$PHP_XSL_EXSL_DIR/include" || echo "$PHP_XSL_EXSL_DIR/include" | grep '^/' >/dev/null ; then
-    ai_p=$PHP_XSL_EXSL_DIR/include
-  else
-    
-    ep_dir="`echo $PHP_XSL_EXSL_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
-    
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/include\"`"
-  fi
-
-    
-  
-  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-  
-  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
-    eval "INCLUDEPATH$unique=set"
-    
-      if test ""; then
-        INCLUDES="-I$ai_p $INCLUDES"
-      else
-        INCLUDES="$INCLUDES -I$ai_p"
-      fi
-    
-  fi
-
-  fi
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_XSL_EXSLT 1
-EOF
-
-      fi
-    else
-      { echo "configure: error: libxslt version 1.1.0 or greater required." 1>&2; exit 1; }
-    fi
-    
-  
-  fi
-  
-  cat >> confdefs.h <<\EOF
-#define HAVE_XSL 1
-EOF
-
-  
-  ext_builddir=ext/xsl
-  ext_srcdir=$abs_srcdir/ext/xsl
-
-  ac_extra=
-
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_XSL_SHARED=no
-    
-  
-  case ext/xsl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in php_xsl.c xsltprocessor.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-
-    EXT_STATIC="$EXT_STATIC xsl"
-    if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC xsl"
-    fi
-  else
-    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_XSL_SHARED=yes
-      
-  case ext/xsl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$shared_c_pre
-  b_cxx_pre=$shared_cxx_pre
-  b_c_meta=$shared_c_meta
-  b_cxx_meta=$shared_cxx_meta
-  b_c_post=$shared_c_post
-  b_cxx_post=$shared_cxx_post
-  b_lo=$shared_lo
-
-
-  old_IFS=$IFS
-  for ac_src in php_xsl.c xsltprocessor.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      shared_objects_xsl="$shared_objects_xsl $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-      case $host_alias in
-        *netware*)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpxsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(PHPXSL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpxsl.so '$ext_builddir'/phpxsl.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPXSL, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(PHPXSL_SHARED_LIBADD)'
-      ;;
-  esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpxsl.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpxsl.$suffix"
-  fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xsl"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpxsl.$suffix: $ext_builddir/phpxsl.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpxsl.$suffix \$(phplibdir)
-
-$ext_builddir/phpxsl.$suffix: \$(shared_objects_xsl) \$(PHPXSL_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
-
-          ;;
-        *)
-          
-  install_modules="install-modules"
-
-  case $host_alias in
-    *aix*)
-      suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/xsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(XSL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/xsl.so '$ext_builddir'/xsl.so'
-      ;;
-    *netware*)
-      suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(XSL, 3)_SHARED_LIBADD)'
-      ;;
-    *)
-      suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xsl) $(XSL_SHARED_LIBADD)'
-      ;;
-  esac
-
-  if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xsl.$suffix"
-  else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xsl.$suffix"
-  fi
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xsl"
-
-  cat >>Makefile.objects<<EOF
-\$(phplibdir)/xsl.$suffix: $ext_builddir/xsl.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/xsl.$suffix \$(phplibdir)
-
-$ext_builddir/xsl.$suffix: \$(shared_objects_xsl) \$(XSL_SHARED_DEPENDENCIES)
-	$link_cmd
-
-EOF
-
-          ;;
-      esac
-      cat >> confdefs.h <<EOF
-#define COMPILE_DL_XSL 1
-EOF
-
-    fi
-  fi
-
-  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_XSL_SHARED=no
-    case "$PHP_SAPI" in
-      cgi|embed)
-        
-  
-  case ext/xsl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in php_xsl.c xsltprocessor.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-
-        EXT_STATIC="$EXT_STATIC xsl"
-        ;;
-      *)
-        
-  
-  case ext/xsl in
-  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
-  esac
-  
-  
-
-  b_c_pre=$php_c_pre
-  b_cxx_pre=$php_cxx_pre
-  b_c_meta=$php_c_meta
-  b_cxx_meta=$php_cxx_meta
-  b_c_post=$php_c_post
-  b_cxx_post=$php_cxx_post
-  b_lo=$php_lo
-
-
-  old_IFS=$IFS
-  for ac_src in php_xsl.c xsltprocessor.c; do
-  
-      IFS=.
-      set $ac_src
-      ac_obj=$1
-      IFS=$old_IFS
-      
-      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
-
-      case $ac_src in
-        *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
-        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
-      esac
-
-    cat >>Makefile.objects<<EOF
-$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
-	$ac_comp
-EOF
-  done
-
-
-        ;;
-    esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC xsl"
-  fi
-  
-  
-    BUILD_DIR="$BUILD_DIR $ext_builddir"
-  
-
-
-  if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=xsl
-    
-  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
-
-  fi
-
-  
-  PHP_VAR_SUBST="$PHP_VAR_SUBST XSL_SHARED_LIBADD"
-
-  
-  am_i_shared=$PHP_XSL_SHARED
-  is_it_shared=$PHP_LIBXML_SHARED
-  is_it_enabled=$PHP_LIBXML
-  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
-    { echo "configure: error: 
-You've configured extension xsl to build statically, but it
-depends on extension libxml, which you've configured to build shared.
-You either need to build xsl shared or build libxml statically for the
-build to be successful.
-" 1>&2; exit 1; }
-  fi
-  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
-    { echo "configure: error: 
-You've configured extension xsl, which depends on extension libxml,
-but you've either not enabled libxml, or have disabled it.
-" 1>&2; exit 1; }
-  fi
-  
-fi
-
-
-
-php_enable_zip=no
-
-echo $ac_n "checking for zip archive read/writesupport""... $ac_c" 1>&6
-echo "configure:103022: checking for zip archive read/writesupport" >&5
-# Check whether --enable-zip or --disable-zip was given.
-if test "${enable_zip+set}" = set; then
-  enableval="$enable_zip"
-  PHP_ZIP=$enableval
-else
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
   
-  PHP_ZIP=no
-  test "$PHP_ENABLE_ALL" && PHP_ZIP=$PHP_ENABLE_ALL
-
-fi
+  fi
 
 
+    
+  fi
 
-ext_output="yes, shared"
-ext_shared=yes
-case $PHP_ZIP in
-shared,*)
-  PHP_ZIP=`echo "$PHP_ZIP"|$SED 's/^shared,//'`
-  ;;
-shared)
-  PHP_ZIP=yes
-  ;;
-no)
-  ext_output=no
-  ext_shared=no
-  ;;
-*)
-  ext_output=yes
-  ext_shared=no
-  ;;
-esac
+  fi
+  
+  
+  case event in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="-levent $LIBS" 
+   ;;
+  esac
 
 
 
-echo "$ac_t""$ext_output" 1>&6
 
+  fi
 
 
+						cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_EVENT 1
+EOF
 
-if test -z "$PHP_ZLIB_DIR"; then
+						
+  save_old_LDFLAGS=$LDFLAGS
+  ac_stuff="$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+						"
   
-php_with_zlib_dir=no
+  save_ext_shared=$ext_shared
+  ext_shared=yes
+  
+  for ac_i in $ac_stuff; do
+    case $ac_i in
+    -pthread)
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -pthread"
+      else
+        
+  
+  unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "EXTRA_LDFLAGS$unique=set"
+    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+  fi
 
-echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:103067: checking for the location of libz" >&5
-# Check whether --with-zlib-dir or --without-zlib-dir was given.
-if test "${with_zlib_dir+set}" = set; then
-  withval="$with_zlib_dir"
-  PHP_ZLIB_DIR=$withval
-else
+      fi
+    ;;
+    -l*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
   
-  PHP_ZLIB_DIR=no
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+    if test "$ext_shared" = "yes"; then
+        LDFLAGS="$LDFLAGS -l$ac_ii" 
+    else
+      
   
+  case $ac_ii in
+  c|c_r|pthread*) ;;
+  *) 
+      LIBS="$LIBS -l$ac_ii" 
+   ;;
+  esac
 
-fi
 
+    fi
+   ;;
+  esac
 
-ext_output=$PHP_ZLIB_DIR
-echo "$ac_t""$ext_output" 1>&6
 
+    ;;
+    -L*)
+      ac_ii=`echo $ac_i|cut -c 3-`
+      
+  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+    
+  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+    ai_p=$ac_ii
+  else
+    
+    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+  fi
 
+    
+      if test "$ext_shared" = "yes"; then
+        LDFLAGS="-L$ai_p $LDFLAGS"
+        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+      else
+        
+  
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "LIBPATH$unique=set"
+    
+    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+    LDFLAGS="$LDFLAGS -L$ai_p"
+    PHP_RPATHS="$PHP_RPATHS $ai_p"
+  
+  fi
 
-fi
 
+      fi
+    
+  fi
 
-php_with_pcre_dir=no
+    ;;
+    esac
+  done
 
-echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6
-echo "configure:103091: checking pcre install prefix" >&5
-# Check whether --with-pcre-dir or --without-pcre-dir was given.
-if test "${with_pcre_dir+set}" = set; then
-  withval="$with_pcre_dir"
-  PHP_PCRE_DIR=$withval
+  echo $ac_n "checking for curl_multi_socket_action in -lcurl""... $ac_c" 1>&6
+echo "configure:109440: checking for curl_multi_socket_action in -lcurl" >&5
+ac_lib_var=`echo curl'_'curl_multi_socket_action | 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
-  
-  PHP_PCRE_DIR=no
-  
+  ac_save_LIBS="$LIBS"
+LIBS="-lcurl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 109448 "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 curl_multi_socket_action();
 
+int main() {
+curl_multi_socket_action()
+; return 0; }
+EOF
+if { (eval echo configure:109459: \"$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
+  
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    cat >> confdefs.h <<\EOF
+#define HAVE_CURL_MULTI_SOCKET_ACTION 1
+EOF
 
-ext_output=$PHP_PCRE_DIR
-echo "$ac_t""$ext_output" 1>&6
-
-
+  
+else
+  echo "$ac_t""no" 1>&6
 
+    LDFLAGS=$save_old_LDFLAGS
+    ext_shared=$save_ext_shared
+    unset ac_cv_lib_curl_curl_multi_socket_action
+     
+  
+fi
 
-if test "$PHP_ZIP" != "no"; then
+					fi
+				fi
+			
+		fi
+	
+		fi
+	fi
 
-  if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
-    if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
-      PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
-      PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
-    elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
-      PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
-      PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
-    else
-      { echo "configure: error: Can not find zlib headers under "$PHP_ZLIB_DIR"" 1>&2; exit 1; }
-    fi
+	if test "$PHP_HTTP_MAGIC_MIME" != "no"; then
+		echo $ac_n "checking for magic.h""... $ac_c" 1>&6
+echo "configure:109502: checking for magic.h" >&5
+		MAGIC_DIR=
+		for i in "$PHP_HTTP_MAGIC_MIME" /usr/local /usr /opt; do
+			if test -f "$i/include/magic.h"; then
+				MAGIC_DIR=$i
+				break
+			fi
+		done
+		if test "x$MAGIC_DIR" = "x"; then
+			echo "$ac_t""not found" 1>&6
+			{ echo "configure: error: could not find magic.h" 1>&2; exit 1; }
+		else
+			echo "$ac_t""found in $MAGIC_DIR" 1>&6
+		fi
+		
+		
+  if test "$MAGIC_DIR/include" != "/usr/include"; then
+    
+  if test -z "$MAGIC_DIR/include" || echo "$MAGIC_DIR/include" | grep '^/' >/dev/null ; then
+    ai_p=$MAGIC_DIR/include
   else
-    for i in /usr/local /usr; do
-      if test -f "$i/include/zlib/zlib.h"; then
-        PHP_ZLIB_DIR="$i"
-        PHP_ZLIB_INCDIR="$i/include/zlib"
-      elif test -f "$i/include/zlib.h"; then
-        PHP_ZLIB_DIR="$i"
-        PHP_ZLIB_INCDIR="$i/include"
-      fi
-    done
+    
+    ep_dir="`echo $MAGIC_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`"
+    
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$MAGIC_DIR/include\"`"
   fi
 
-    echo $ac_n "checking for the location of zlib""... $ac_c" 1>&6
-echo "configure:103135: checking for the location of zlib" >&5
-  if test "$PHP_ZLIB_DIR" = "no"; then
-    { echo "configure: error: zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located" 1>&2; exit 1; }
-  else
-    echo "$ac_t""$PHP_ZLIB_DIR" 1>&6
     
+  
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
+
+  fi
+
+		
 
   if test "$ext_shared" = "yes"; then
-    ZIP_SHARED_LIBADD="-lz $ZIP_SHARED_LIBADD"
-    if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then
+    HTTP_SHARED_LIBADD="-lmagic $HTTP_SHARED_LIBADD"
+    if test -n "$MAGIC_DIR/$PHP_LIBDIR"; then
       
-  if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$MAGIC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MAGIC_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR
+  if test -z "$MAGIC_DIR/$PHP_LIBDIR" || echo "$MAGIC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$MAGIC_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $MAGIC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$MAGIC_DIR/$PHP_LIBDIR\"`"
   fi
 
     
       if test "$ext_shared" = "yes"; then
-        ZIP_SHARED_LIBADD="-L$ai_p $ZIP_SHARED_LIBADD"
-        test -n "$ld_runpath_switch" && ZIP_SHARED_LIBADD="$ld_runpath_switch$ai_p $ZIP_SHARED_LIBADD"
+        HTTP_SHARED_LIBADD="-L$ai_p $HTTP_SHARED_LIBADD"
+        test -n "$ld_runpath_switch" && HTTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $HTTP_SHARED_LIBADD"
       else
         
   
@@ -103183,18 +109591,18 @@ echo "configure:103135: checking for the
   else
     
 
-  if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then
+  if test -n "$MAGIC_DIR/$PHP_LIBDIR"; then
     
-  if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then
+  if test "$MAGIC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MAGIC_DIR/$PHP_LIBDIR" != "/usr/lib"; then
     
-  if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR
+  if test -z "$MAGIC_DIR/$PHP_LIBDIR" || echo "$MAGIC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
+    ai_p=$MAGIC_DIR/$PHP_LIBDIR
   else
     
-    ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $MAGIC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`"
+    ai_p="$ep_realdir/`basename \"$MAGIC_DIR/$PHP_LIBDIR\"`"
   fi
 
     
@@ -103220,10 +109628,10 @@ echo "configure:103135: checking for the
   fi
   
   
-  case z in
+  case magic in
   c|c_r|pthread*) ;;
   *) 
-      LIBS="-lz $LIBS" 
+      LIBS="-lmagic $LIBS" 
    ;;
   esac
 
@@ -103233,17 +109641,57 @@ echo "configure:103135: checking for the
   fi
 
 
+		cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_MAGIC 1
+EOF
+
+	fi
+
+	
+		extname=hash
+		haveext=$PHP_HASH
+		
+		echo $ac_n "checking for ext/$extname support""... $ac_c" 1>&6
+echo "configure:109656: checking for ext/$extname support" >&5
+		if test -x "$PHP_EXECUTABLE"; then
+			grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$`
+			if test "$grepext" = "$extname"; then
+				HTTP_HAVE_EXT_HASH=1
+				echo "$ac_t""yes" 1>&6
+				
+		echo $ac_n "checking for php_hash.h""... $ac_c" 1>&6
+echo "configure:109664: checking for php_hash.h" >&5
+		HTTP_EXT_HASH_INCDIR=
+		for i in `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../hash; do
+			if test -d $i; then
+				if test -f $i/php_hash.h; then
+					HTTP_EXT_HASH_INCDIR=$i
+					break
+				elif test -f $i/ext/hash/php_hash.h; then
+					HTTP_EXT_HASH_INCDIR=$i/ext/hash
+					break
+				fi
+			fi
+		done
+		if test "x$HTTP_EXT_HASH_INCDIR" = "x"; then
+			echo "$ac_t""not found" 1>&6
+		else
+			echo "$ac_t""$HTTP_EXT_HASH_INCDIR" 1>&6
+			cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_PHP_HASH_H 1
+EOF
+
+			
+  if test "$HTTP_EXT_HASH_INCDIR" != "/usr/include"; then
     
-  if test "$PHP_ZLIB_INCDIR" != "/usr/include"; then
-    
-  if test -z "$PHP_ZLIB_INCDIR" || echo "$PHP_ZLIB_INCDIR" | grep '^/' >/dev/null ; then
-    ai_p=$PHP_ZLIB_INCDIR
+  if test -z "$HTTP_EXT_HASH_INCDIR" || echo "$HTTP_EXT_HASH_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$HTTP_EXT_HASH_INCDIR
   else
     
-    ep_dir="`echo $PHP_ZLIB_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+    ep_dir="`echo $HTTP_EXT_HASH_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
-    ai_p="$ep_realdir/`basename \"$PHP_ZLIB_INCDIR\"`"
+    ai_p="$ep_realdir/`basename \"$HTTP_EXT_HASH_INCDIR\"`"
   fi
 
     
@@ -103264,97 +109712,160 @@ echo "configure:103135: checking for the
 
   fi
 
-  fi
-
-    old_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS=$INCLUDES
-  cat > conftest.$ac_ext <<EOF
-#line 103273 "configure"
-#include "confdefs.h"
-
-#include <main/php_config.h>
-#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
-yes
-#endif
-  
+		fi
+	
+			else
+				HTTP_HAVE_EXT_HASH=
+				echo "$ac_t""no" 1>&6
+				
+			fi
+		elif test "$haveext" != "no" && test "x$haveext" != "x"; then
+			HTTP_HAVE_EXT_HASH=1
+			echo "$ac_t""yes" 1>&6
+			
+		echo $ac_n "checking for php_hash.h""... $ac_c" 1>&6
+echo "configure:109728: checking for php_hash.h" >&5
+		HTTP_EXT_HASH_INCDIR=
+		for i in `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../hash; do
+			if test -d $i; then
+				if test -f $i/php_hash.h; then
+					HTTP_EXT_HASH_INCDIR=$i
+					break
+				elif test -f $i/ext/hash/php_hash.h; then
+					HTTP_EXT_HASH_INCDIR=$i/ext/hash
+					break
+				fi
+			fi
+		done
+		if test "x$HTTP_EXT_HASH_INCDIR" = "x"; then
+			echo "$ac_t""not found" 1>&6
+		else
+			echo "$ac_t""$HTTP_EXT_HASH_INCDIR" 1>&6
+			cat >> confdefs.h <<\EOF
+#define HTTP_HAVE_PHP_HASH_H 1
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-    PHP_PCRE_REGEX=yes
-  
-else
-  rm -rf conftest*
-  
-    cat > conftest.$ac_ext <<EOF
-#line 103292 "configure"
-#include "confdefs.h"
 
-#include <main/php_config.h>
-#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE)
-yes
-#endif
+			
+  if test "$HTTP_EXT_HASH_INCDIR" != "/usr/include"; then
     
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-      PHP_PCRE_REGEX=pecl
+  if test -z "$HTTP_EXT_HASH_INCDIR" || echo "$HTTP_EXT_HASH_INCDIR" | grep '^/' >/dev/null ; then
+    ai_p=$HTTP_EXT_HASH_INCDIR
+  else
     
-else
-  rm -rf conftest*
-  
-      PHP_PCRE_REGEX=no
+    ep_dir="`echo $HTTP_EXT_HASH_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
     
-fi
-rm -f conftest*
+    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ai_p="$ep_realdir/`basename \"$HTTP_EXT_HASH_INCDIR\"`"
+  fi
 
+    
   
-fi
-rm -f conftest*
+  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+  
+  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INCLUDEPATH$unique=set"
+    
+      if test ""; then
+        INCLUDES="-I$ai_p $INCLUDES"
+      else
+        INCLUDES="$INCLUDES -I$ai_p"
+      fi
+    
+  fi
 
-  CPPFLAGS=$old_CPPFLAGS
+  fi
 
-  PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \
-                         lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c  \
-                         lib/zip_strerror.c lib/zip_close.c lib/zip_error_get.c \
-                         lib/zip_file_error_get.c lib/zip_free.c lib/zip_rename.c \
-                         lib/zip_source_free.c lib/zip_unchange_all.c lib/zip_delete.c \
-                         lib/zip_error_get_sys_type.c lib/zip_file_get_offset.c \
-                         lib/zip_get_name.c lib/zip_replace.c lib/zip_source_function.c \
-                         lib/zip_unchange.c lib/zip_dirent.c lib/zip_error_strerror.c \
-                         lib/zip_filerange_crc.c lib/zip_file_strerror.c lib/zip_get_num_files.c \
-                         lib/zip_get_archive_flag.c lib/zip_set_archive_flag.c \
-                         lib/zip_set_name.c lib/zip_source_zip.c lib/zip_unchange_data.c \
-                         lib/zip_entry_free.c lib/zip_error_to_str.c lib/zip_fopen.c \
-                         lib/zip_name_locate.c lib/zip_source_buffer.c lib/zip_stat.c \
-                         lib/zip_entry_new.c lib/zip_err_str.c lib/zip_fopen_index.c \
-                         lib/zip_get_archive_comment.c lib/zip_get_file_comment.c \
-                         lib/zip_new.c lib/zip_source_file.c lib/zip_stat_index.c \
-                         lib/zip_set_archive_comment.c lib/zip_set_file_comment.c \
-                         lib/zip_unchange_archive.c lib/zip_memdup.c lib/zip_stat_init.c lib/zip_add_dir.c \
-                         lib/zip_error_clear.c lib/zip_file_error_clear.c"
+		fi
+	
+		else
+			HTTP_HAVE_EXT_HASH=
+			echo "$ac_t""no" 1>&6
+			
+		fi
+	
 
-  cat >> confdefs.h <<\EOF
-#define HAVE_ZIP 1
-EOF
+	
+		extname=iconv
+		haveext=$PHP_ICONV
+		
+		echo $ac_n "checking for ext/$extname support""... $ac_c" 1>&6
+echo "configure:109794: checking for ext/$extname support" >&5
+		if test -x "$PHP_EXECUTABLE"; then
+			grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$`
+			if test "$grepext" = "$extname"; then
+				HTTP_HAVE_EXT_ICONV=1
+				echo "$ac_t""yes" 1>&6
+				
+			else
+				HTTP_HAVE_EXT_ICONV=
+				echo "$ac_t""no" 1>&6
+				
+			fi
+		elif test "$haveext" != "no" && test "x$haveext" != "x"; then
+			HTTP_HAVE_EXT_ICONV=1
+			echo "$ac_t""yes" 1>&6
+			
+		else
+			HTTP_HAVE_EXT_ICONV=
+			echo "$ac_t""no" 1>&6
+			
+		fi
+	
 
-  
-  ext_builddir=ext/zip
-  ext_srcdir=$abs_srcdir/ext/zip
+	
+		extname=session
+		haveext=$PHP_SESSION
+		
+		echo $ac_n "checking for ext/$extname support""... $ac_c" 1>&6
+echo "configure:109822: checking for ext/$extname support" >&5
+		if test -x "$PHP_EXECUTABLE"; then
+			grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$`
+			if test "$grepext" = "$extname"; then
+				HTTP_HAVE_EXT_SESSION=1
+				echo "$ac_t""yes" 1>&6
+				
+			else
+				HTTP_HAVE_EXT_SESSION=
+				echo "$ac_t""no" 1>&6
+				
+			fi
+		elif test "$haveext" != "no" && test "x$haveext" != "x"; then
+			HTTP_HAVE_EXT_SESSION=1
+			echo "$ac_t""yes" 1>&6
+			
+		else
+			HTTP_HAVE_EXT_SESSION=
+			echo "$ac_t""no" 1>&6
+			
+		fi
+	
+
+	PHP_HTTP_SOURCES="missing.c http.c http_functions.c phpstr/phpstr.c \
+		http_util_object.c http_message_object.c http_request_object.c http_request_pool_api.c \
+		http_response_object.c http_exception_object.c http_requestpool_object.c \
+		http_api.c http_cache_api.c http_request_api.c http_request_info.c http_date_api.c \
+		http_headers_api.c http_message_api.c http_send_api.c http_url_api.c \
+		http_info_api.c http_request_method_api.c http_encoding_api.c \
+		http_filter_api.c http_request_body_api.c http_querystring_object.c \
+		http_deflatestream_object.c http_inflatestream_object.c http_cookie_api.c \
+		http_querystring_api.c http_request_datashare_api.c http_requestdatashare_object.c \
+		http_persistent_handle_api.c"
+	
+	
+  ext_builddir=ext/http
+  ext_srcdir=$abs_srcdir/ext/http
 
   ac_extra=
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
-    PHP_ZIP_SHARED=no
+    PHP_HTTP_SHARED=no
     
   
-  case ext/zip in
+  case ext/http in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/http"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/http/"; ac_bdir="ext/http/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -103369,7 +109880,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
+  for ac_src in $PHP_HTTP_SOURCES; do
   
       IFS=.
       set $ac_src
@@ -103392,18 +109903,18 @@ EOF
   done
 
 
-    EXT_STATIC="$EXT_STATIC zip"
+    EXT_STATIC="$EXT_STATIC http"
     if test "$ext_shared" != "nocli"; then
-      EXT_CLI_STATIC="$EXT_CLI_STATIC zip"
+      EXT_CLI_STATIC="$EXT_CLI_STATIC http"
     fi
   else
     if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
-      PHP_ZIP_SHARED=yes
+      PHP_HTTP_SHARED=yes
       
-  case ext/zip in
+  case ext/http in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/http"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/http/"; ac_bdir="ext/http/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -103418,14 +109929,14 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
+  for ac_src in $PHP_HTTP_SOURCES; do
   
       IFS=.
       set $ac_src
       ac_obj=$1
       IFS=$old_IFS
       
-      shared_objects_zip="$shared_objects_zip $ac_bdir$ac_obj.lo"
+      shared_objects_http="$shared_objects_http $ac_bdir$ac_obj.lo"
 
       case $ac_src in
         *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
@@ -103448,31 +109959,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpzip.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(PHPZIP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpzip.so '$ext_builddir'/phpzip.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phphttp.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_http) $(PHPHTTP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phphttp.so '$ext_builddir'/phphttp.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPZIP, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_http) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(PHPHTTP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(PHPZIP_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_http) $(PHPHTTP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpzip.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phphttp.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpzip.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phphttp.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_zip"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_http"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/phpzip.$suffix: $ext_builddir/phpzip.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/phpzip.$suffix \$(phplibdir)
+\$(phplibdir)/phphttp.$suffix: $ext_builddir/phphttp.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/phphttp.$suffix \$(phplibdir)
 
-$ext_builddir/phpzip.$suffix: \$(shared_objects_zip) \$(PHPZIP_SHARED_DEPENDENCIES)
+$ext_builddir/phphttp.$suffix: \$(shared_objects_http) \$(PHPHTTP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -103485,31 +109996,31 @@ EOF
   case $host_alias in
     *aix*)
       suffix=so
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/zip.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(ZIP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/zip.so '$ext_builddir'/zip.so'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/http.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_http) $(HTTP_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/http.so '$ext_builddir'/http.so'
       ;;
     *netware*)
       suffix=nlm
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(ZIP, 3)_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_http) -L$(top_builddir)/netware -lphp5lib $(M4_SUBSTR(HTTP, 3)_SHARED_LIBADD)'
       ;;
     *)
       suffix=la
-      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_zip) $(ZIP_SHARED_LIBADD)'
+      link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_http) $(HTTP_SHARED_LIBADD)'
       ;;
   esac
 
   if test "x" = "xyes"; then
-    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/zip.$suffix"
+    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/http.$suffix"
   else
-    PHP_MODULES="$PHP_MODULES \$(phplibdir)/zip.$suffix"
+    PHP_MODULES="$PHP_MODULES \$(phplibdir)/http.$suffix"
   fi
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_zip"
+  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_http"
 
   cat >>Makefile.objects<<EOF
-\$(phplibdir)/zip.$suffix: $ext_builddir/zip.$suffix
-	\$(LIBTOOL) --mode=install cp $ext_builddir/zip.$suffix \$(phplibdir)
+\$(phplibdir)/http.$suffix: $ext_builddir/http.$suffix
+	\$(LIBTOOL) --mode=install cp $ext_builddir/http.$suffix \$(phplibdir)
 
-$ext_builddir/zip.$suffix: \$(shared_objects_zip) \$(ZIP_SHARED_DEPENDENCIES)
+$ext_builddir/http.$suffix: \$(shared_objects_http) \$(HTTP_SHARED_DEPENDENCIES)
 	$link_cmd
 
 EOF
@@ -103517,22 +110028,22 @@ EOF
           ;;
       esac
       cat >> confdefs.h <<EOF
-#define COMPILE_DL_ZIP 1
+#define COMPILE_DL_HTTP 1
 EOF
 
     fi
   fi
 
   if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
-    PHP_ZIP_SHARED=no
+    PHP_HTTP_SHARED=no
     case "$PHP_SAPI" in
       cgi|embed)
         
   
-  case ext/zip in
+  case ext/http in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/http"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/http/"; ac_bdir="ext/http/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -103547,7 +110058,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
+  for ac_src in $PHP_HTTP_SOURCES; do
   
       IFS=.
       set $ac_src
@@ -103570,15 +110081,15 @@ EOF
   done
 
 
-        EXT_STATIC="$EXT_STATIC zip"
+        EXT_STATIC="$EXT_STATIC http"
         ;;
       *)
         
   
-  case ext/zip in
+  case ext/http in
   "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
-  /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
-  *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
+  /*) ac_srcdir=`echo "ext/http"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
+  *) ac_srcdir="$abs_srcdir/ext/http/"; ac_bdir="ext/http/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
   esac
   
   
@@ -103593,7 +110104,7 @@ EOF
 
 
   old_IFS=$IFS
-  for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do
+  for ac_src in $PHP_HTTP_SOURCES; do
   
       IFS=.
       set $ac_src
@@ -103618,7 +110129,7 @@ EOF
 
         ;;
     esac
-    EXT_CLI_STATIC="$EXT_CLI_STATIC zip"
+    EXT_CLI_STATIC="$EXT_CLI_STATIC http"
   fi
   
   
@@ -103627,26 +110138,172 @@ EOF
 
 
   if test "$ext_builddir" = "."; then
-    PHP_PECL_EXTENSION=zip
+    PHP_PECL_EXTENSION=http
     
   PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
 
   fi
 
+	
+		
+		extname=hash
+		haveext=$HTTP_HAVE_EXT_HASH
+		
+		echo $ac_n "checking whether to add a dependency on ext/$extname""... $ac_c" 1>&6
+echo "configure:110154: checking whether to add a dependency on ext/$extname" >&5
+		if test "$PHP_HTTP_SHARED_DEPS" = "no"; then
+			echo "$ac_t""no" 1>&6
+			
+		elif test "$haveext"; then
+			echo "$ac_t""yes" 1>&6
+			
+				
+  am_i_shared=$PHP_HTTP_SHARED
+  is_it_shared=$PHP_HASH_SHARED
+  is_it_enabled=$PHP_HASH
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension http to build statically, but it
+depends on extension hash, which you've configured to build shared.
+You either need to build http shared or build hash statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension http, which depends on extension hash,
+but you've either not enabled hash, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+			
+			
+		else
+			echo "$ac_t""no" 1>&6
+			
+		fi
+	
+	
+		extname=iconv
+		haveext=$HTTP_HAVE_EXT_ICONV
+		
+		echo $ac_n "checking whether to add a dependency on ext/$extname""... $ac_c" 1>&6
+echo "configure:110192: checking whether to add a dependency on ext/$extname" >&5
+		if test "$PHP_HTTP_SHARED_DEPS" = "no"; then
+			echo "$ac_t""no" 1>&6
+			
+		elif test "$haveext"; then
+			echo "$ac_t""yes" 1>&6
+			
+				
+  am_i_shared=$PHP_HTTP_SHARED
+  is_it_shared=$PHP_ICONV_SHARED
+  is_it_enabled=$PHP_ICONV
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension http to build statically, but it
+depends on extension iconv, which you've configured to build shared.
+You either need to build http shared or build iconv statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension http, which depends on extension iconv,
+but you've either not enabled iconv, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+			
+			
+		else
+			echo "$ac_t""no" 1>&6
+			
+		fi
+	
+	
+		extname=session
+		haveext=$HTTP_HAVE_EXT_SESSION
+		
+		echo $ac_n "checking whether to add a dependency on ext/$extname""... $ac_c" 1>&6
+echo "configure:110230: checking whether to add a dependency on ext/$extname" >&5
+		if test "$PHP_HTTP_SHARED_DEPS" = "no"; then
+			echo "$ac_t""no" 1>&6
+			
+		elif test "$haveext"; then
+			echo "$ac_t""yes" 1>&6
+			
+				
+  am_i_shared=$PHP_HTTP_SHARED
+  is_it_shared=$PHP_SESSION_SHARED
+  is_it_enabled=$PHP_SESSION
+  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
+    { echo "configure: error: 
+You've configured extension http to build statically, but it
+depends on extension session, which you've configured to build shared.
+You either need to build http shared or build session statically for the
+build to be successful.
+" 1>&2; exit 1; }
+  fi
+  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
+    { echo "configure: error: 
+You've configured extension http, which depends on extension session,
+but you've either not enabled session, or have disabled it.
+" 1>&2; exit 1; }
+  fi
+  
+			
+			
+		else
+			echo "$ac_t""no" 1>&6
+			
+		fi
+	
+	
+	
+  
+    $php_shtool mkdir -p $ext_builddir/phpstr
+  
+
+	
+  PHP_VAR_SUBST="$PHP_VAR_SUBST HTTP_SHARED_LIBADD"
+
+
+	PHP_HTTP_HEADERS="php_http_std_defs.h php_http.h php_http_api.h php_http_cache_api.h \
+		php_http_date_api.h php_http_headers_api.h php_http_info_api.h php_http_message_api.h \
+		php_http_request_api.h php_http_request_method_api.h php_http_send_api.h php_http_url_api.h \
+		php_http_encoding_api.h phpstr/phpstr.h missing.h php_http_request_body_api.h \
+		php_http_exception_object.h php_http_message_object.h php_http_request_object.h \
+		php_http_requestpool_object.h php_http_response_object.h php_http_util_object.h \
+		php_http_querystring_object.h php_http_deflatestream_object.h php_http_inflatestream_object.h \
+		php_http_cookie_api.h php_http_querystring_api.h php_http_request_datashare_api.h php_http_requestdatashare_object.h \
+		php_http_persistent_handle_api.h"
+	
+		
   
+    header_path=ext/http
+    for header_file in $PHP_HTTP_HEADERS; do
+      hp_hf="$header_path/$header_file"
+      
   
-    $php_shtool mkdir -p $ext_builddir/lib
+  unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
   
+  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
+  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+    eval "INSTALLHEADERS$unique=set"
+    
+        INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
+      
+  fi
 
+    done 
   
-  PHP_VAR_SUBST="$PHP_VAR_SUBST ZIP_SHARED_LIBADD"
 
+	
 
-    
-  src=$ext_srcdir/Makefile.frag
-  ac_srcdir=$ext_srcdir
-  ac_builddir=$ext_builddir
-  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
+	cat >> confdefs.h <<\EOF
+#define HAVE_HTTP 1
+EOF
 
 fi
 
@@ -103656,7 +110313,7 @@ fi
 php_enable_mysqlnd_compression_support=yes
 
 echo $ac_n "checking whether to enable compressed protocol support in mysqlnd""... $ac_c" 1>&6
-echo "configure:103660: checking whether to enable compressed protocol support in mysqlnd" >&5
+echo "configure:110317: checking whether to enable compressed protocol support in mysqlnd" >&5
 # Check whether --enable-mysqlnd_compression_support or --disable-mysqlnd_compression_support was given.
 if test "${enable_mysqlnd_compression_support+set}" = set; then
   enableval="$enable_mysqlnd_compression_support"
@@ -103680,7 +110337,7 @@ if test -z "$PHP_ZLIB_DIR"; then
 php_with_zlib_dir=no
 
 echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:103684: checking for the location of libz" >&5
+echo "configure:110341: checking for the location of libz" >&5
 # Check whether --with-zlib-dir or --without-zlib-dir was given.
 if test "${with_zlib_dir+set}" = set; then
   withval="$with_zlib_dir"
@@ -104047,7 +110704,7 @@ if test "$PHP_MYSQLND_ENABLED" = "yes" |
     
   for php_typename in int8 uint8 int16 uint16 int32 uint32 uchar ulong int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t; do
     echo $ac_n "checking whether $php_typename exists""... $ac_c" 1>&6
-echo "configure:104051: checking whether $php_typename exists" >&5
+echo "configure:110708: checking whether $php_typename exists" >&5
     
   php_cache_value=php_cv_sizeof_$php_typename
   if eval "test \"`echo '$''{'php_cv_sizeof_$php_typename'+set}'`\" = set"; then
@@ -104064,7 +110721,7 @@ else
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 104068 "configure"
+#line 110725 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #if STDC_HEADERS
@@ -104094,7 +110751,7 @@ int main()
 }
   
 EOF
-if { (eval echo configure:104098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:110755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
     eval $php_cache_value=`cat conftestval`
@@ -104234,7 +110891,7 @@ if test "$PHP_RECODE" != "no"; then
   done
 
   echo $ac_n "checking for hash_insert in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:104238: checking for hash_insert in -l$MYSQL_LIBNAME" >&5
+echo "configure:110895: checking for hash_insert in -l$MYSQL_LIBNAME" >&5
 ac_lib_var=`echo $MYSQL_LIBNAME'_'hash_insert | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -104242,7 +110899,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$MYSQL_LIBNAME  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 104246 "configure"
+#line 110903 "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
@@ -104253,7 +110910,7 @@ int main() {
 hash_insert()
 ; return 0; }
 EOF
-if { (eval echo configure:104257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:110914: \"$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
@@ -104355,7 +111012,7 @@ fi
 php_with_pear=DEFAULT
 
 echo $ac_n "checking whether to install PEAR""... $ac_c" 1>&6
-echo "configure:104359: checking whether to install PEAR" >&5
+echo "configure:111016: checking whether to install PEAR" >&5
 # Check whether --with-pear or --without-pear was given.
 if test "${with_pear+set}" = set; then
   withval="$with_pear"
@@ -104457,7 +111114,7 @@ fi
   bison_version=none
   if test "$YACC"; then
     echo $ac_n "checking for bison version""... $ac_c" 1>&6
-echo "configure:104461: checking for bison version" >&5
+echo "configure:111118: checking for bison version" >&5
 if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -104513,17 +111170,17 @@ dlfcn.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:104517: checking for $ac_hdr" >&5
+echo "configure:111174: checking for $ac_hdr" >&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 104522 "configure"
+#line 111179 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:104527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:111184: \"$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*
@@ -104551,12 +111208,12 @@ done
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:104555: checking for size_t" >&5
+echo "configure:111212: 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 104560 "configure"
+#line 111217 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -104584,12 +111241,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:104588: checking return type of signal handlers" >&5
+echo "configure:111245: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 104593 "configure"
+#line 111250 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -104606,7 +111263,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:104610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:111267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -104630,12 +111287,12 @@ EOF
 
 
 echo $ac_n "checking for uint""... $ac_c" 1>&6
-echo "configure:104634: checking for uint" >&5
+echo "configure:111291: checking for uint" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uint'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 104639 "configure"
+#line 111296 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -104663,12 +111320,12 @@ EOF
 fi
 
 echo $ac_n "checking for ulong""... $ac_c" 1>&6
-echo "configure:104667: checking for ulong" >&5
+echo "configure:111324: checking for ulong" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ulong'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 104672 "configure"
+#line 111329 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -104698,9 +111355,9 @@ fi
 
 
 echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:104702: checking for int32_t" >&5
+echo "configure:111359: checking for int32_t" >&5
 cat > conftest.$ac_ext <<EOF
-#line 104704 "configure"
+#line 111361 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_TYPES_H  
@@ -104719,7 +111376,7 @@ if (sizeof (int32_t))
 
 ; return 0; }
 EOF
-if { (eval echo configure:104723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:111380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
   cat >> confdefs.h <<EOF
@@ -104738,9 +111395,9 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
-echo "configure:104742: checking for uint32_t" >&5
+echo "configure:111399: checking for uint32_t" >&5
 cat > conftest.$ac_ext <<EOF
-#line 104744 "configure"
+#line 111401 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_TYPES_H  
@@ -104759,7 +111416,7 @@ if (sizeof (uint32_t))
 
 ; return 0; }
 EOF
-if { (eval echo configure:104763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:111420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
   cat >> confdefs.h <<EOF
@@ -104778,12 +111435,12 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:104782: checking for vprintf" >&5
+echo "configure:111439: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 104787 "configure"
+#line 111444 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -104806,7 +111463,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:104810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -104830,12 +111487,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:104834: checking for _doprnt" >&5
+echo "configure:111491: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 104839 "configure"
+#line 111496 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -104858,7 +111515,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:104862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -104883,7 +111540,7 @@ fi
 fi
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:104887: checking for 8-bit clean memcmp" >&5
+echo "configure:111544: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -104891,7 +111548,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 104895 "configure"
+#line 111552 "configure"
 #include "confdefs.h"
 
 main()
@@ -104901,7 +111558,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:104905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:111562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -104921,19 +111578,19 @@ test $ac_cv_func_memcmp_clean = no && LI
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:104925: checking for working alloca.h" >&5
+echo "configure:111582: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 104930 "configure"
+#line 111587 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:104937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -104954,12 +111611,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:104958: checking for alloca" >&5
+echo "configure:111615: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 104963 "configure"
+#line 111620 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -104987,7 +111644,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:104991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -105019,12 +111676,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:105023: checking whether alloca needs Cray hooks" >&5
+echo "configure:111680: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 105028 "configure"
+#line 111685 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -105049,12 +111706,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:105053: checking for $ac_func" >&5
+echo "configure:111710: 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 105058 "configure"
+#line 111715 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -105077,7 +111734,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:105081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111738: \"$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
@@ -105104,7 +111761,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:105108: checking stack direction for C alloca" >&5
+echo "configure:111765: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -105112,7 +111769,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 105116 "configure"
+#line 111773 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -105131,7 +111788,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:105135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:111792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -105155,12 +111812,12 @@ fi
 for ac_func in memcpy strdup getpid kill strtod strtol finite fpclass sigsetjmp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:105159: checking for $ac_func" >&5
+echo "configure:111816: 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 105164 "configure"
+#line 111821 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -105183,7 +111840,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:105187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111844: \"$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
@@ -105209,7 +111866,7 @@ done
 
 
   echo $ac_n "checking whether sprintf is broken""... $ac_c" 1>&6
-echo "configure:105213: checking whether sprintf is broken" >&5
+echo "configure:111870: checking whether sprintf is broken" >&5
 if eval "test \"`echo '$''{'ac_cv_broken_sprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -105220,11 +111877,11 @@ else
     
 else
   cat > conftest.$ac_ext <<EOF
-#line 105224 "configure"
+#line 111881 "configure"
 #include "confdefs.h"
 main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }
 EOF
-if { (eval echo configure:105228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:111885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
       ac_cv_broken_sprintf=no
@@ -105258,12 +111915,12 @@ EOF
 for ac_func in finite isfinite isinf isnan
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:105262: checking for $ac_func" >&5
+echo "configure:111919: 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 105267 "configure"
+#line 111924 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -105286,7 +111943,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:105290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111947: \"$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
@@ -105313,13 +111970,13 @@ done
 
 
   echo $ac_n "checking whether fp_except is defined""... $ac_c" 1>&6
-echo "configure:105317: checking whether fp_except is defined" >&5
+echo "configure:111974: checking whether fp_except is defined" >&5
 if eval "test \"`echo '$''{'ac_cv_type_fp_except'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 105323 "configure"
+#line 111980 "configure"
 #include "confdefs.h"
 
 #include <floatingpoint.h>
@@ -105330,7 +111987,7 @@ fp_except x = (fp_except) 0;
 
 ; return 0; }
 EOF
-if { (eval echo configure:105334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:111991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
      ac_cv_type_fp_except=yes
@@ -105357,9 +112014,9 @@ EOF
 
 
   echo $ac_n "checking for usable _FPU_SETCW""... $ac_c" 1>&6
-echo "configure:105361: checking for usable _FPU_SETCW" >&5
+echo "configure:112018: checking for usable _FPU_SETCW" >&5
   cat > conftest.$ac_ext <<EOF
-#line 105363 "configure"
+#line 112020 "configure"
 #include "confdefs.h"
 
     #include <fpu_control.h>
@@ -105379,7 +112036,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:105383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cfp_have__fpu_setcw=yes
 else
@@ -105400,9 +112057,9 @@ EOF
   fi
   
   echo $ac_n "checking for usable fpsetprec""... $ac_c" 1>&6
-echo "configure:105404: checking for usable fpsetprec" >&5
+echo "configure:112061: checking for usable fpsetprec" >&5
   cat > conftest.$ac_ext <<EOF
-#line 105406 "configure"
+#line 112063 "configure"
 #include "confdefs.h"
 
     #include <machine/ieeefp.h>
@@ -105421,7 +112078,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:105425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cfp_have_fpsetprec=yes
 else
@@ -105442,9 +112099,9 @@ EOF
   fi
 
   echo $ac_n "checking for usable _controlfp""... $ac_c" 1>&6
-echo "configure:105446: checking for usable _controlfp" >&5
+echo "configure:112103: checking for usable _controlfp" >&5
   cat > conftest.$ac_ext <<EOF
-#line 105448 "configure"
+#line 112105 "configure"
 #include "confdefs.h"
 
     #include <float.h>
@@ -105463,7 +112120,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:105467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cfp_have__controlfp=yes
 else
@@ -105484,9 +112141,9 @@ EOF
   fi
 
   echo $ac_n "checking for usable _controlfp_s""... $ac_c" 1>&6
-echo "configure:105488: checking for usable _controlfp_s" >&5
+echo "configure:112145: checking for usable _controlfp_s" >&5
   cat > conftest.$ac_ext <<EOF
-#line 105490 "configure"
+#line 112147 "configure"
 #include "confdefs.h"
 
    #include <float.h>
@@ -105506,7 +112163,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:105510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cfp_have__controlfp_s=yes
 else
@@ -105527,9 +112184,9 @@ EOF
   fi
 
   echo $ac_n "checking whether FPU control word can be manipulated by inline assembler""... $ac_c" 1>&6
-echo "configure:105531: checking whether FPU control word can be manipulated by inline assembler" >&5
+echo "configure:112188: checking whether FPU control word can be manipulated by inline assembler" >&5
   cat > conftest.$ac_ext <<EOF
-#line 105533 "configure"
+#line 112190 "configure"
 #include "confdefs.h"
 
     /* nothing */
@@ -105551,7 +112208,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:105555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cfp_have_fpu_inline_asm_x86=yes
 else
@@ -105573,7 +112230,7 @@ EOF
 
 
 echo $ac_n "checking whether double cast to long preserves least significant bits""... $ac_c" 1>&6
-echo "configure:105577: checking whether double cast to long preserves least significant bits" >&5
+echo "configure:112234: checking whether double cast to long preserves least significant bits" >&5
 
 if test "$cross_compiling" = yes; then
   
@@ -105581,7 +112238,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 105585 "configure"
+#line 112242 "configure"
 #include "confdefs.h"
 
 #include <limits.h>
@@ -105605,7 +112262,7 @@ int main()
 }
 
 EOF
-if { (eval echo configure:105609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:112266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   cat >> confdefs.h <<\EOF
@@ -105631,17 +112288,17 @@ for ac_hdr in dlfcn.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:105635: checking for $ac_hdr" >&5
+echo "configure:112292: checking for $ac_hdr" >&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 105640 "configure"
+#line 112297 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:105645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:112302: \"$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*
@@ -105669,14 +112326,14 @@ done
 
 
 echo $ac_n "checking whether dlsym() requires a leading underscore in symbol names""... $ac_c" 1>&6
-echo "configure:105673: checking whether dlsym() requires a leading underscore in symbol names" >&5
+echo "configure:112330: checking whether dlsym() requires a leading underscore in symbol names" >&5
 if test "$cross_compiling" = yes; then :
   
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 105680 "configure"
+#line 112337 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -105739,7 +112396,7 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo configure:105743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:112400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -105822,23 +112479,23 @@ fi
 
 
 echo $ac_n "checking virtual machine dispatch method""... $ac_c" 1>&6
-echo "configure:105826: checking virtual machine dispatch method" >&5
+echo "configure:112483: checking virtual machine dispatch method" >&5
 echo "$ac_t""$PHP_ZEND_VM" 1>&6
 
 echo $ac_n "checking whether to enable thread-safety""... $ac_c" 1>&6
-echo "configure:105830: checking whether to enable thread-safety" >&5
+echo "configure:112487: checking whether to enable thread-safety" >&5
 echo "$ac_t""$ZEND_MAINTAINER_ZTS" 1>&6
 
 echo $ac_n "checking whether to enable inline optimization for GCC""... $ac_c" 1>&6
-echo "configure:105834: checking whether to enable inline optimization for GCC" >&5
+echo "configure:112491: checking whether to enable inline optimization for GCC" >&5
 echo "$ac_t""$ZEND_INLINE_OPTIMIZATION" 1>&6
 
 echo $ac_n "checking whether to enable Zend debugging""... $ac_c" 1>&6
-echo "configure:105838: checking whether to enable Zend debugging" >&5
+echo "configure:112495: checking whether to enable Zend debugging" >&5
 echo "$ac_t""$ZEND_DEBUG" 1>&6
 
 echo $ac_n "checking whether to enable Zend multibyte""... $ac_c" 1>&6
-echo "configure:105842: checking whether to enable Zend multibyte" >&5
+echo "configure:112499: checking whether to enable Zend multibyte" >&5
 echo "$ac_t""$ZEND_MULTIBYTE" 1>&6
 
 case $PHP_ZEND_VM in
@@ -105911,21 +112568,21 @@ fi
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:105915: checking for inline" >&5
+echo "configure:112572: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 105922 "configure"
+#line 112579 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:105929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:112586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -105954,7 +112611,7 @@ esac
 
 
 echo $ac_n "checking target system is Darwin""... $ac_c" 1>&6
-echo "configure:105958: checking target system is Darwin" >&5
+echo "configure:112615: checking target system is Darwin" >&5
 if echo "$target" | grep "darwin" > /dev/null; then
   cat >> confdefs.h <<\EOF
 #define DARWIN 1
@@ -105966,7 +112623,7 @@ else
 fi
 
 echo $ac_n "checking for MM alignment and log values""... $ac_c" 1>&6
-echo "configure:105970: checking for MM alignment and log values" >&5
+echo "configure:112627: checking for MM alignment and log values" >&5
 
 if test "$cross_compiling" = yes; then
   
@@ -105974,7 +112631,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 105978 "configure"
+#line 112635 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -106010,7 +112667,7 @@ int main()
 }
 
 EOF
-if { (eval echo configure:106014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:112671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
@@ -106035,7 +112692,7 @@ fi
 echo "$ac_t""done" 1>&6
 
 echo $ac_n "checking for memory allocation using mmap(MAP_ANON)""... $ac_c" 1>&6
-echo "configure:106039: checking for memory allocation using mmap(MAP_ANON)" >&5
+echo "configure:112696: checking for memory allocation using mmap(MAP_ANON)" >&5
 
 if test "$cross_compiling" = yes; then
   
@@ -106043,7 +112700,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 106047 "configure"
+#line 112704 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -106079,7 +112736,7 @@ int main()
 }
 
 EOF
-if { (eval echo configure:106083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:112740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   cat >> confdefs.h <<\EOF
@@ -106101,7 +112758,7 @@ fi
 
 
 echo $ac_n "checking for memory allocation using mmap("/dev/zero")""... $ac_c" 1>&6
-echo "configure:106105: checking for memory allocation using mmap("/dev/zero")" >&5
+echo "configure:112762: checking for memory allocation using mmap("/dev/zero")" >&5
 
 if test "$cross_compiling" = yes; then
   
@@ -106109,7 +112766,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 106113 "configure"
+#line 112770 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -106155,7 +112812,7 @@ int main()
 }
 
 EOF
-if { (eval echo configure:106159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:112816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   cat >> confdefs.h <<\EOF
@@ -106179,12 +112836,12 @@ fi
 for ac_func in mremap
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:106183: checking for $ac_func" >&5
+echo "configure:112840: 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 106188 "configure"
+#line 112845 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -106207,7 +112864,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:106211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112868: \"$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
@@ -106274,17 +112931,17 @@ for ac_hdr in stdarg.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:106278: checking for $ac_hdr" >&5
+echo "configure:112935: checking for $ac_hdr" >&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 106283 "configure"
+#line 112940 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:106288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:112945: \"$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*
@@ -106361,7 +113018,7 @@ if test "$TSRM_PTH" != "no"; then
   
 
 echo $ac_n "checking for GNU Pth""... $ac_c" 1>&6
-echo "configure:106365: checking for GNU Pth" >&5
+echo "configure:113022: checking for GNU Pth" >&5
 PTH_PREFIX="`$TSRM_PTH --prefix`"
 if test -z "$PTH_PREFIX"; then
   echo "$ac_t""Please check your Pth installation" 1>&6
@@ -106391,17 +113048,17 @@ elif test "$TSRM_ST" != "no"; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:106395: checking for $ac_hdr" >&5
+echo "configure:113052: checking for $ac_hdr" >&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 106400 "configure"
+#line 113057 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:106405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:113062: \"$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*
@@ -106431,7 +113088,7 @@ done
 
   LIBS="$LIBS -lst"
   echo $ac_n "checking for SGI's State Threads""... $ac_c" 1>&6
-echo "configure:106435: checking for SGI's State Threads" >&5
+echo "configure:113092: checking for SGI's State Threads" >&5
   echo "$ac_t""yes" 1>&6
   cat >> confdefs.h <<\EOF
 #define TSRM_ST 1
@@ -106470,7 +113127,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 106474 "configure"
+#line 113131 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -106488,7 +113145,7 @@ int main() {
     return pthread_create(&thd, NULL, thread_routine, &data);
 } 
 EOF
-if { (eval echo configure:106492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:113149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   pthreads_working=yes
@@ -106508,7 +113165,7 @@ fi
   CFLAGS=$save_CFLAGS
 
   echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6
-echo "configure:106512: checking for pthreads_cflags" >&5
+echo "configure:113169: checking for pthreads_cflags" >&5
 if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -106530,7 +113187,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 106534 "configure"
+#line 113191 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -106548,7 +113205,7 @@ int main() {
     return pthread_create(&thd, NULL, thread_routine, &data);
 } 
 EOF
-if { (eval echo configure:106552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:113209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   pthreads_working=yes
@@ -106578,7 +113235,7 @@ fi
 echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6
 
 echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6
-echo "configure:106582: checking for pthreads_lib" >&5
+echo "configure:113239: checking for pthreads_lib" >&5
 if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -106600,7 +113257,7 @@ if test "$cross_compiling" = yes; then
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 106604 "configure"
+#line 113261 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -106618,7 +113275,7 @@ int main() {
     return pthread_create(&thd, NULL, thread_routine, &data);
 } 
 EOF
-if { (eval echo configure:106622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:113279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
   pthreads_working=yes
@@ -106669,7 +113326,7 @@ EOF
 
 
   echo $ac_n "checking for POSIX threads""... $ac_c" 1>&6
-echo "configure:106673: checking for POSIX threads" >&5
+echo "configure:113330: checking for POSIX threads" >&5
   echo "$ac_t""yes" 1>&6
 fi
 
@@ -107305,7 +113962,7 @@ fi
 
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:107309: checking build system type" >&5
+echo "configure:113966: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -107334,7 +113991,7 @@ ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
   echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6
-echo "configure:107338: checking for ld used by $CC" >&5
+echo "configure:113995: checking for ld used by $CC" >&5
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -107364,10 +114021,10 @@ echo "configure:107338: checking for ld
   esac
 elif test "$with_gnu_ld" = yes; then
   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:107368: checking for GNU ld" >&5
+echo "configure:114025: checking for GNU ld" >&5
 else
   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:107371: checking for non-GNU ld" >&5
+echo "configure:114028: checking for non-GNU ld" >&5
 fi
 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -107406,7 +114063,7 @@ else
 fi
 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:107410: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:114067: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -107426,7 +114083,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:107430: checking for $LD option to reload object files" >&5
+echo "configure:114087: checking for $LD option to reload object files" >&5
 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -107451,7 +114108,7 @@ case $host_os in
 esac
 
 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:107455: checking for BSD-compatible nm" >&5
+echo "configure:114112: checking for BSD-compatible nm" >&5
 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -107504,7 +114161,7 @@ echo "$ac_t""$lt_cv_path_NM" 1>&6
 NM="$lt_cv_path_NM"
 
 echo $ac_n "checking how to recognize dependent libraries""... $ac_c" 1>&6
-echo "configure:107508: checking how to recognize dependent libraries" >&5
+echo "configure:114165: checking how to recognize dependent libraries" >&5
 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -107696,13 +114353,13 @@ deplibs_check_method=$lt_cv_deplibs_chec
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:107700: checking for object suffix" >&5
+echo "configure:114357: 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:107706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:114363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   for ac_file in conftest.*; do
     case $ac_file in
     *.c) ;;
@@ -107722,7 +114379,7 @@ ac_objext=$ac_cv_objext
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:107726: checking for executable suffix" >&5
+echo "configure:114383: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -107732,7 +114389,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:107736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:114393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.$ac_ext | *.c | *.o | *.obj) ;;
@@ -107778,7 +114435,7 @@ case $host in
 ia64-*-hpux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
-  if { (eval echo configure:107782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  if { (eval echo configure:114439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case `/usr/bin/file conftest.$ac_objext` in
     *ELF-32*)
       HPUX_IA64_MODE="32"
@@ -107792,8 +114449,8 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 107796 "configure"' > conftest.$ac_ext
-  if { (eval echo configure:107797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  echo '#line 114453 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:114454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    if test "$lt_cv_prog_gnu_ld" = yes; then
     case `/usr/bin/file conftest.$ac_objext` in
     *32-bit*)
@@ -107827,7 +114484,7 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc
 s390*-*linux*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
-  if { (eval echo configure:107831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  if { (eval echo configure:114488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case `/usr/bin/file conftest.o` in
     *32-bit*)
       case $host in
@@ -107877,7 +114534,7 @@ s390*-*linux*|sparc*-*linux*)
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:107881: checking whether the C compiler needs -belf" >&5
+echo "configure:114538: checking whether the C compiler needs -belf" >&5
 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -107890,14 +114547,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext
 cross_compiling=$ac_cv_prog_cc_cross
 
      cat > conftest.$ac_ext <<EOF
-#line 107894 "configure"
+#line 114551 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:107901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_cc_needs_belf=yes
 else
@@ -107925,7 +114582,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
 sparc*-*solaris*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
-  if { (eval echo configure:107929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  if { (eval echo configure:114586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
@@ -107954,7 +114611,7 @@ if test -n "$CXX" && ( test "X$CXX" != "
     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
     (test "X$CXX" != "Xg++"))) ; then
   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:107958: checking how to run the C++ preprocessor" >&5
+echo "configure:114615: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -107967,12 +114624,12 @@ ac_link='${CXX-g++} -o conftest${ac_exee
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 107971 "configure"
+#line 114628 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:107976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:114633: \"$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
   :
@@ -108002,7 +114659,7 @@ fi
 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 # find the maximum length of command line arguments
 echo $ac_n "checking the maximum length of command line arguments""... $ac_c" 1>&6
-echo "configure:108006: checking the maximum length of command line arguments" >&5
+echo "configure:114663: checking the maximum length of command line arguments" >&5
 if eval "test \"`echo '$''{'lt_cv_sys_max_cmd_len'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108124,7 +114781,7 @@ fi
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 echo $ac_n "checking command to parse $NM output from $compiler object""... $ac_c" 1>&6
-echo "configure:108128: checking command to parse $NM output from $compiler object" >&5
+echo "configure:114785: checking command to parse $NM output from $compiler object" >&5
 if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108228,10 +114885,10 @@ void nm_test_func(){}
 int main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
-  if { (eval echo configure:108232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  if { (eval echo configure:114889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { (eval echo configure:108235: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
+    if { (eval echo configure:114892: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
@@ -108282,7 +114939,7 @@ EOF
 	  lt_save_CFLAGS="$CFLAGS"
 	  LIBS="conftstm.$ac_objext"
 	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-	  if { (eval echo configure:108286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+	  if { (eval echo configure:114943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
 	  LIBS="$lt_save_LIBS"
@@ -108322,7 +114979,7 @@ else
 fi
 
 echo $ac_n "checking for objdir""... $ac_c" 1>&6
-echo "configure:108326: checking for objdir" >&5
+echo "configure:114983: checking for objdir" >&5
 if eval "test \"`echo '$''{'lt_cv_objdir'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108388,7 +115045,7 @@ with_gnu_ld="$lt_cv_prog_gnu_ld"
 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108392: checking for $ac_word" >&5
+echo "configure:115049: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108420,7 +115077,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108424: checking for $ac_word" >&5
+echo "configure:115081: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108455,7 +115112,7 @@ fi
 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108459: checking for $ac_word" >&5
+echo "configure:115116: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108487,7 +115144,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108491: checking for $ac_word" >&5
+echo "configure:115148: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108522,7 +115179,7 @@ fi
 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108526: checking for $ac_word" >&5
+echo "configure:115183: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108554,7 +115211,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108558: checking for $ac_word" >&5
+echo "configure:115215: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108641,7 +115298,7 @@ case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:108645: checking for ${ac_tool_prefix}file" >&5
+echo "configure:115302: checking for ${ac_tool_prefix}file" >&5
 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108701,7 +115358,7 @@ fi
 if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
     echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:108705: checking for file" >&5
+echo "configure:115362: checking for file" >&5
 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108773,7 +115430,7 @@ esac
     # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108777: checking for $ac_word" >&5
+echo "configure:115434: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DSYMUTIL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108805,7 +115462,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "dsymutil", so it can be a program name with args.
 set dummy dsymutil; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108809: checking for $ac_word" >&5
+echo "configure:115466: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DSYMUTIL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108840,7 +115497,7 @@ fi
     # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108844: checking for $ac_word" >&5
+echo "configure:115501: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_NMEDIT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108872,7 +115529,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "nmedit", so it can be a program name with args.
 set dummy nmedit; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108876: checking for $ac_word" >&5
+echo "configure:115533: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_NMEDIT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108906,7 +115563,7 @@ fi
 
 
     echo $ac_n "checking for -single_module linker flag""... $ac_c" 1>&6
-echo "configure:108910: checking for -single_module linker flag" >&5
+echo "configure:115567: checking for -single_module linker flag" >&5
 if eval "test \"`echo '$''{'lt_cv_apple_cc_single_mod'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108929,7 +115586,7 @@ fi
 
 echo "$ac_t""$lt_cv_apple_cc_single_mod" 1>&6
     echo $ac_n "checking for -exported_symbols_list linker flag""... $ac_c" 1>&6
-echo "configure:108933: checking for -exported_symbols_list linker flag" >&5
+echo "configure:115590: checking for -exported_symbols_list linker flag" >&5
 if eval "test \"`echo '$''{'lt_cv_ld_exported_symbols_list'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -108939,12 +115596,12 @@ else
       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
       
 cat > conftest.$ac_ext <<EOF
-#line 108943 "configure"
+#line 115600 "configure"
 #include "confdefs.h"
 int main() {
 ; return 0; }
 EOF
-if { (eval echo configure:108948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:115605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  lt_cv_ld_exported_symbols_list=yes
   rm -rf conftest*
 else
@@ -109078,7 +115735,7 @@ if test "$GCC" = yes; then
 
   
 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
-echo "configure:109082: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo "configure:115739: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_compiler_rtti_exceptions'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -109095,11 +115752,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"configure:109099: $lt_compile\"" >&5)
+   (eval echo "\"configure:115756: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "configure:109103: \$? = $ac_status" >&5
+   echo "configure:115760: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -109128,7 +115785,7 @@ lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:109132: checking for $compiler option to produce PIC" >&5
+echo "configure:115789: checking for $compiler option to produce PIC" >&5
  
   if test "$GCC" = yes; then
     lt_prog_compiler_wl='-Wl,'
@@ -109375,7 +116032,7 @@ echo "$ac_t""$lt_prog_compiler_pic" 1>&6
 if test -n "$lt_prog_compiler_pic"; then
   
 echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic works""... $ac_c" 1>&6
-echo "configure:109379: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo "configure:116036: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_compiler_pic_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -109392,11 +116049,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"configure:109396: $lt_compile\"" >&5)
+   (eval echo "\"configure:116053: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "configure:109400: \$? = $ac_status" >&5
+   echo "configure:116057: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -109438,7 +116095,7 @@ esac
 #
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
 echo $ac_n "checking if $compiler static flag $lt_tmp_static_flag works""... $ac_c" 1>&6
-echo "configure:109442: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo "configure:116099: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_compiler_static_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -109476,7 +116133,7 @@ fi
 
 
 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
-echo "configure:109480: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo "configure:116137: checking if $compiler supports -c -o file.$ac_objext" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -109496,11 +116153,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"configure:109500: $lt_compile\"" >&5)
+   (eval echo "\"configure:116157: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "configure:109504: \$? = $ac_status" >&5
+   echo "configure:116161: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -109530,7 +116187,7 @@ hard_links="nottested"
 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
-echo "configure:109534: checking if we can lock with hard links" >&5
+echo "configure:116191: checking if we can lock with hard links" >&5
   hard_links=yes
   $rm conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
@@ -109547,7 +116204,7 @@ else
 fi
 
 echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:109551: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo "configure:116208: checking whether the $compiler linker ($LD) supports shared libraries" >&5
 
   runpath_var=
   allow_undefined_flag=
@@ -109958,12 +116615,12 @@ _LT_EOF
        # Determine the default libpath from the value encoded in an empty executable.
        
 cat > conftest.$ac_ext <<EOF
-#line 109962 "configure"
+#line 116619 "configure"
 #include "confdefs.h"
 int main() {
 ; return 0; }
 EOF
-if { (eval echo configure:109967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:116624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
@@ -109996,12 +116653,12 @@ if test -z "$aix_libpath"; then aix_libp
 	 # Determine the default libpath from the value encoded in an empty executable.
 	 
 cat > conftest.$ac_ext <<EOF
-#line 110000 "configure"
+#line 116657 "configure"
 #include "confdefs.h"
 int main() {
 ; return 0; }
 EOF
-if { (eval echo configure:110005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:116662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
@@ -110491,11 +117148,11 @@ x|xyes)
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
       echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
-echo "configure:110495: checking whether -lc should be explicitly linked in" >&5
+echo "configure:117152: checking whether -lc should be explicitly linked in" >&5
       $rm conftest*
       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo configure:110499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
+      if { (eval echo configure:117156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
         soname=conftest
         lib=conftest
         libobjs=conftest.$ac_objext
@@ -110509,7 +117166,7 @@ echo "configure:110495: checking whether
         libname=conftest
         lt_save_allow_undefined_flag=$allow_undefined_flag
         allow_undefined_flag=
-        if { (eval echo configure:110513: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
+        if { (eval echo configure:117170: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
         then
 	  archive_cmds_need_lc=no
         else
@@ -110528,7 +117185,7 @@ echo "configure:110495: checking whether
 esac
 
 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:110532: checking dynamic linker characteristics" >&5
+echo "configure:117189: checking dynamic linker characteristics" >&5
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -111153,7 +117810,7 @@ if test "$GCC" = yes; then
 fi
 
 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:111157: checking how to hardcode library paths into programs" >&5
+echo "configure:117814: checking how to hardcode library paths into programs" >&5
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" || \
    test -n "$runpath_var" || \
@@ -111191,7 +117848,7 @@ fi
 striplib=
 old_striplib=
 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
-echo "configure:111195: checking whether stripping libraries is possible" >&5
+echo "configure:117852: checking whether stripping libraries is possible" >&5
 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
@@ -111242,7 +117899,7 @@ else
   darwin*)
   # if libdl is installed we need to link against it
     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:111246: checking for dlopen in -ldl" >&5
+echo "configure:117903: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -111250,7 +117907,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 111254 "configure"
+#line 117911 "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
@@ -111261,7 +117918,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:111265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:117922: \"$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
@@ -111290,12 +117947,12 @@ fi
 
   *)
     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:111294: checking for shl_load" >&5
+echo "configure:117951: checking for shl_load" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 111299 "configure"
+#line 117956 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shl_load(); below.  */
@@ -111318,7 +117975,7 @@ shl_load();
 
 ; return 0; }
 EOF
-if { (eval echo configure:111322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:117979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shl_load=yes"
 else
@@ -111336,7 +117993,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:111340: checking for shl_load in -ldld" >&5
+echo "configure:117997: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -111344,7 +118001,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 111348 "configure"
+#line 118005 "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
@@ -111355,7 +118012,7 @@ int main() {
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:111359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:118016: \"$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
@@ -111374,12 +118031,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:111378: checking for dlopen" >&5
+echo "configure:118035: checking for dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 111383 "configure"
+#line 118040 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
@@ -111402,7 +118059,7 @@ dlopen();
 
 ; return 0; }
 EOF
-if { (eval echo configure:111406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:118063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dlopen=yes"
 else
@@ -111420,7 +118077,7 @@ if eval "test \"`echo '$ac_cv_func_'dlop
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:111424: checking for dlopen in -ldl" >&5
+echo "configure:118081: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -111428,7 +118085,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 111432 "configure"
+#line 118089 "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
@@ -111439,7 +118096,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:111443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:118100: \"$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
@@ -111458,7 +118115,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "configure:111462: checking for dlopen in -lsvld" >&5
+echo "configure:118119: checking for dlopen in -lsvld" >&5
 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -111466,7 +118123,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsvld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 111470 "configure"
+#line 118127 "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
@@ -111477,7 +118134,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:111481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:118138: \"$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
@@ -111496,7 +118153,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:111500: checking for dld_link in -ldld" >&5
+echo "configure:118157: checking for dld_link in -ldld" >&5
 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -111504,7 +118161,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 111508 "configure"
+#line 118165 "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
@@ -111515,7 +118172,7 @@ int main() {
 dld_link()
 ; return 0; }
 EOF
-if { (eval echo configure:111519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:118176: \"$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
@@ -111571,7 +118228,7 @@ fi
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "configure:111575: checking whether a program can dlopen itself" >&5
+echo "configure:118232: checking whether a program can dlopen itself" >&5
 if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -111581,7 +118238,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 111585 "configure"
+#line 118242 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -111644,7 +118301,7 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo configure:111648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:118305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -111667,7 +118324,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
     if test "x$lt_cv_dlopen_self" = xyes; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "configure:111671: checking whether a statically linked program can dlopen itself" >&5
+echo "configure:118328: checking whether a statically linked program can dlopen itself" >&5
 if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -111677,7 +118334,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 111681 "configure"
+#line 118338 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -111740,7 +118397,7 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo configure:111744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:118401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -111781,11 +118438,11 @@ fi
 
 # Report which library types will actually be built
 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
-echo "configure:111785: checking if libtool supports shared libraries" >&5
+echo "configure:118442: checking if libtool supports shared libraries" >&5
 echo "$ac_t""$can_build_shared" 1>&6
 
 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
-echo "configure:111789: checking whether to build shared libraries" >&5
+echo "configure:118446: checking whether to build shared libraries" >&5
 test "$can_build_shared" = "no" && enable_shared=no
 
 # On AIX, shared libraries and static libraries use the same namespace, and
@@ -111808,7 +118465,7 @@ esac
 echo "$ac_t""$enable_shared" 1>&6
 
 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
-echo "configure:111812: checking whether to build static libraries" >&5
+echo "configure:118469: checking whether to build static libraries" >&5
 # Make sure either enable_shared or enable_static is yes.
 test "$enable_shared" = yes || enable_static=yes
 echo "$ac_t""$enable_static" 1>&6
@@ -112494,7 +119151,7 @@ ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
   echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6
-echo "configure:112498: checking for ld used by $CC" >&5
+echo "configure:119155: checking for ld used by $CC" >&5
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -112524,10 +119181,10 @@ echo "configure:112498: checking for ld
   esac
 elif test "$with_gnu_ld" = yes; then
   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:112528: checking for GNU ld" >&5
+echo "configure:119185: checking for GNU ld" >&5
 else
   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:112531: checking for non-GNU ld" >&5
+echo "configure:119188: checking for non-GNU ld" >&5
 fi
 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -112566,7 +119223,7 @@ else
 fi
 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:112570: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:119227: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -112632,7 +119289,7 @@ fi
 
 # PORTME: fill in a description of your system's C++ link characteristics
 echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:112636: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo "configure:119293: checking whether the $compiler linker ($LD) supports shared libraries" >&5
 ld_shlibs_CXX=yes
 case $host_os in
   aix3*)
@@ -112730,12 +119387,12 @@ case $host_os in
       # Determine the default libpath from the value encoded in an empty executable.
       
 cat > conftest.$ac_ext <<EOF
-#line 112734 "configure"
+#line 119391 "configure"
 #include "confdefs.h"
 int main() {
 ; return 0; }
 EOF
-if { (eval echo configure:112739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:119396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
@@ -112769,12 +119426,12 @@ if test -z "$aix_libpath"; then aix_libp
 	# Determine the default libpath from the value encoded in an empty executable.
 	
 cat > conftest.$ac_ext <<EOF
-#line 112773 "configure"
+#line 119430 "configure"
 #include "confdefs.h"
 int main() {
 ; return 0; }
 EOF
-if { (eval echo configure:112778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:119435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
@@ -113541,7 +120198,7 @@ private:
 };
 EOF
 
-if { (eval echo configure:113545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:120202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   # Parse the compiler output and extract the necessary
   # objects, libraries and library flags.
 
@@ -113697,7 +120354,7 @@ lt_prog_compiler_pic_CXX=
 lt_prog_compiler_static_CXX=
 
 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:113701: checking for $compiler option to produce PIC" >&5
+echo "configure:120358: checking for $compiler option to produce PIC" >&5
  
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
@@ -113994,7 +120651,7 @@ echo "$ac_t""$lt_prog_compiler_pic_CXX"
 if test -n "$lt_prog_compiler_pic_CXX"; then
   
 echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works""... $ac_c" 1>&6
-echo "configure:113998: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo "configure:120655: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_compiler_pic_works_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -114011,11 +120668,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"configure:114015: $lt_compile\"" >&5)
+   (eval echo "\"configure:120672: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "configure:114019: \$? = $ac_status" >&5
+   echo "configure:120676: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -114057,7 +120714,7 @@ esac
 #
 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
 echo $ac_n "checking if $compiler static flag $lt_tmp_static_flag works""... $ac_c" 1>&6
-echo "configure:114061: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo "configure:120718: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_compiler_static_works_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -114095,7 +120752,7 @@ fi
 
 
 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
-echo "configure:114099: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo "configure:120756: checking if $compiler supports -c -o file.$ac_objext" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -114115,11 +120772,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"configure:114119: $lt_compile\"" >&5)
+   (eval echo "\"configure:120776: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "configure:114123: \$? = $ac_status" >&5
+   echo "configure:120780: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -114149,7 +120806,7 @@ hard_links="nottested"
 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
-echo "configure:114153: checking if we can lock with hard links" >&5
+echo "configure:120810: checking if we can lock with hard links" >&5
   hard_links=yes
   $rm conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
@@ -114166,7 +120823,7 @@ else
 fi
 
 echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:114170: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo "configure:120827: checking whether the $compiler linker ($LD) supports shared libraries" >&5
 
   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   case $host_os in
@@ -114212,11 +120869,11 @@ x|xyes)
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
       echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
-echo "configure:114216: checking whether -lc should be explicitly linked in" >&5
+echo "configure:120873: checking whether -lc should be explicitly linked in" >&5
       $rm conftest*
       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo configure:114220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
+      if { (eval echo configure:120877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
         soname=conftest
         lib=conftest
         libobjs=conftest.$ac_objext
@@ -114230,7 +120887,7 @@ echo "configure:114216: checking whether
         libname=conftest
         lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
         allow_undefined_flag_CXX=
-        if { (eval echo configure:114234: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
+        if { (eval echo configure:120891: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
         then
 	  archive_cmds_need_lc_CXX=no
         else
@@ -114249,7 +120906,7 @@ echo "configure:114216: checking whether
 esac
 
 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:114253: checking dynamic linker characteristics" >&5
+echo "configure:120910: checking dynamic linker characteristics" >&5
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -114822,7 +121479,7 @@ if test "$GCC" = yes; then
 fi
 
 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:114826: checking how to hardcode library paths into programs" >&5
+echo "configure:121483: checking how to hardcode library paths into programs" >&5
 hardcode_action_CXX=
 if test -n "$hardcode_libdir_flag_spec_CXX" || \
    test -n "$runpath_var_CXX" || \
--- a/generated_lists
+++ b/generated_lists
@@ -1,3 +1,3 @@
 makefile_am_files = Zend/Makefile.am TSRM/Makefile.am
 config_h_files = Zend/acconfig.h TSRM/acconfig.h
-config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/date/config0.m4 ext/dba/config.m4 ext/dom/config.m4 ext/enchant/config.m4 ext/ereg/config0.m4 ext/exif/config.m4 ext/fileinfo/config.m4 ext/filter/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hash/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/interbase/config.m4 ext/intl/config.m4 ext/json/config.m4 ext/ldap/config.m4 ext/libxml/config0.m4 ext/mbstring/config.m4 ext/mcrypt/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/mysqli/config.m4 ext/mysqlnd/config9.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/pcntl/config.m4 ext/pcre/config0.m4 ext/pdo/config.m4 ext/pdo_dblib/config.m4 ext/pdo_firebird/config.m4 ext/pdo_mysql/config.m4 ext/pdo_oci/config.m4 ext/pdo_odbc/config.m4 ext/pdo_pgsql/config.m4 ext/pdo_sqlite/config.m4 ext/pgsql/config.m4 ext/phar/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/readline/config.m4 ext/recode/config.m4 ext/recode/config9.m4 ext/reflection/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/simplexml/config.m4 ext/snmp/config.m4 ext/soap/config.m4 ext/sockets/config.m4 ext/spl/config.m4 ext/sqlite/config.m4 ext/sqlite3/config0.m4 ext/standard/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tidy/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlreader/config.m4 ext/xmlrpc/config.m4 ext/xmlwriter/config.m4 ext/xsl/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/apache_hooks/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/continuity/config.m4 sapi/embed/config.m4 sapi/fpm/config.m4 sapi/isapi/config.m4 sapi/litespeed/config.m4 sapi/milter/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4
+config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/apc/config.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/date/config0.m4 ext/dba/config.m4 ext/dio/config.m4 ext/dom/config.m4 ext/enchant/config.m4 ext/ereg/config0.m4 ext/exif/config.m4 ext/fileinfo/config.m4 ext/filter/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hash/config.m4 ext/http/config9.m4 ext/http/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/interbase/config.m4 ext/intl/config.m4 ext/json/config.m4 ext/ldap/config.m4 ext/libevent/config.m4 ext/libxml/config0.m4 ext/mbstring/config.m4 ext/mcrypt/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/mysqli/config.m4 ext/mysqlnd/config9.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/pcntl/config.m4 ext/pcre/config0.m4 ext/pdo/config.m4 ext/pdo_dblib/config.m4 ext/pdo_firebird/config.m4 ext/pdo_mysql/config.m4 ext/pdo_oci/config.m4 ext/pdo_odbc/config.m4 ext/pdo_pgsql/config.m4 ext/pdo_sqlite/config.m4 ext/pgsql/config.m4 ext/phar/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/readline/config.m4 ext/recode/config9.m4 ext/recode/config.m4 ext/reflection/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/simplexml/config.m4 ext/snmp/config.m4 ext/soap/config.m4 ext/sockets/config.m4 ext/spl/config.m4 ext/sqlite3/config0.m4 ext/sqlite/config.m4 ext/standard/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tidy/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlreader/config.m4 ext/xmlrpc/config.m4 ext/xmlwriter/config.m4 ext/xsl/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/apache/config.m4 sapi/apache_hooks/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/continuity/config.m4 sapi/embed/config.m4 sapi/fpm/config.m4 sapi/isapi/config.m4 sapi/litespeed/config.m4 sapi/milter/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4
--- a/main/php_config.h.in
+++ b/main/php_config.h.in
@@ -1262,6 +1262,12 @@
 /*  Define if uint32_t type is present.  */
 #undef HAVE_UINT32_T
 
+/* Define if system timezone data is used */
+#undef HAVE_SYSTEM_TZDATA
+
+/* Define for location of system timezone data */
+#undef HAVE_SYSTEM_TZDATA_PREFIX
+
 /* Whether to build date as dynamic module */
 #undef COMPILE_DL_DATE
 
@@ -1334,6 +1340,51 @@
 /*   */
 #undef HAVE_ZLIB
 
+/*   */
+#undef APC_MMAP
+
+/*   */
+#undef APC_FILEHITS
+
+/*   */
+#undef __DEBUG_APC__
+
+/*   */
+#undef APC_SEM_LOCKS
+
+/*   */
+#undef APC_SPIN_LOCKS
+
+/*   */
+#undef APC_PTHREADMUTEX_LOCKS
+
+/*   */
+#undef APC_FCNTL_LOCKS
+
+/*  shm/mmap memory protection  */
+#undef APC_MEMPROTECT
+
+/*   */
+#undef APC_HAVE_LOOKUP_HOOKS
+
+/*   */
+#undef APC_HAVE_LOOKUP_HOOKS
+
+/*   */
+#undef HAVE_SEMUN
+
+/*   */
+#undef HAVE_SEMUN
+
+/* enable valgrind memchecks */
+#undef HAVE_VALGRIND_MEMCHECK_H
+
+/* Whether to build apc as dynamic module */
+#undef COMPILE_DL_APC
+
+/*   */
+#undef HAVE_APC
+
 /* Whether to build bcmath as dynamic module */
 #undef COMPILE_DL_BCMATH
 
@@ -1472,6 +1523,9 @@
 /* Whether to build dba as dynamic module */
 #undef COMPILE_DL_DBA
 
+/* Whether to build dio as dynamic module */
+#undef COMPILE_DL_DIO
+
 /*   */
 #undef HAVE_LIBXML
 
@@ -1895,6 +1949,9 @@
 /* LDAP SASL support */
 #undef HAVE_LDAP_SASL
 
+/* Whether to build libevent as dynamic module */
+#undef COMPILE_DL_LIBEVENT
+
 /* whether to have multibyte string support */
 #undef HAVE_MBSTRING
 
@@ -2813,6 +2870,120 @@
 /* Whether to build zip as dynamic module */
 #undef COMPILE_DL_ZIP
 
+/*   */
+#undef HTTP_SHARED_DEPS
+
+/*   */
+#undef HTTP_SHARED_DEPS
+
+/*   */
+#undef HAVE_GETHOSTNAME
+
+/*   */
+#undef HAVE_GETHOSTNAME
+
+/*   */
+#undef HAVE_LIBNSL
+
+/*   */
+#undef HAVE_GETDOMAINNAME
+
+/*   */
+#undef HAVE_GETDOMAINNAME
+
+/*   */
+#undef HAVE_LIBNSL
+
+/*   */
+#undef HAVE_GETSERVBYPORT
+
+/*   */
+#undef HAVE_GETSERVBYPORT
+
+/*   */
+#undef HAVE_LIBNSL
+
+/*   */
+#undef HAVE_GETSERVBYNAME
+
+/*   */
+#undef HAVE_GETSERVBYNAME
+
+/*   */
+#undef HAVE_LIBNSL
+
+/* Have zlib support */
+#undef HTTP_HAVE_ZLIB
+
+/*   */
+#undef HTTP_HAVE_SSL
+
+/*   */
+#undef HTTP_HAVE_OPENSSL
+
+/*   */
+#undef HTTP_HAVE_GNUTLS
+
+/* path to bundled SSL CA info */
+#undef HTTP_CURL_CAINFO
+
+/* Have cURL support */
+#undef HTTP_HAVE_CURL
+
+/*   */
+#undef HAVE_CURL_SHARE_STRERROR
+
+/*   */
+#undef HAVE_CURL_MULTI_STRERROR
+
+/*   */
+#undef HAVE_CURL_EASY_STRERROR
+
+/*   */
+#undef HAVE_CURL_EASY_RESET
+
+/*   */
+#undef HAVE_CURL_FORMGET
+
+/*   */
+#undef HAVE_CURL_MULTI_SETOPT
+
+/*   */
+#undef HAVE_CURL_MULTI_TIMEOUT
+
+/*   */
+#undef HTTP_EVENT_VERSION
+
+/* Have libevent support for cURL */
+#undef HTTP_HAVE_EVENT
+
+/*   */
+#undef HAVE_CURL_MULTI_SOCKET_ACTION
+
+/*   */
+#undef HTTP_EVENT_VERSION
+
+/* Have libevent support for cURL */
+#undef HTTP_HAVE_EVENT
+
+/*   */
+#undef HAVE_CURL_MULTI_SOCKET_ACTION
+
+/* Have magic mime support */
+#undef HTTP_HAVE_MAGIC
+
+/* Have ext/hash support */
+#undef HTTP_HAVE_PHP_HASH_H
+
+/* Have ext/hash support */
+#undef HTTP_HAVE_PHP_HASH_H
+
+/* Whether to build http as dynamic module */
+#undef COMPILE_DL_HTTP
+
+/* Have extended HTTP support */
+#undef HAVE_HTTP
+
 /* Enable compressed protocol support */
 #undef MYSQLND_COMPRESSION_WANTED