#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-maintainer-mode enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer"
ac_help="$ac_help
  --with-system-regex     Do not use the bundled regex library"
ac_help="$ac_help
  --with-apxs[=FILE]      Build shared Apache module.  FILE is the optional
                          pathname to the Apache apxs tool; defaults to "apxs".
                          (This option needs Perl installed)"
ac_help="$ac_help
  --with-shared-apache[=DIR] Build shared Apache module.  DIR is the top-level 
                          Apache build directory, defaults to /usr/local/etc/httpd.
                          (This option needs Perl installed)"
ac_help="$ac_help
  --with-apache[=DIR]     Build Apache module.  DIR is the top-level Apache
                          build directory, defaults to /usr/local/etc/httpd."
ac_help="$ac_help
  --with-mod_charset      Enable transfer tables for mod_charset (Rus Apache)."
ac_help="$ac_help
  --with-fhttpd[=DIR]     Build fhttpd module.  DIR is the fhttpd sources
                          directory, defaults to /usr/local/src/fhttpd."
ac_help="$ac_help
  --with-imap[=DIR]   Include IMAP support (DIR is IMAP's include dir and c-client.a dir)."
ac_help="$ac_help
  --without-gd            Disable GD support.
  --with-gd[=DIR]         Include GD support (DIR is GD's install dir)."
ac_help="$ac_help
  --with-oracle[=DIR]     Include Oracle database support.  DIR is Oracle's
                          home directory, defaults to \$ORACLE_HOME."
ac_help="$ac_help
  --with-iodbc[=DIR]      Include iODBC support.  DIR is the iODBC base
                          install directory, defaults to /usr/local."
ac_help="$ac_help
  --with-openlink[=DIR]   Include OpenLink ODBC support.  DIR is the
                          OpenLink base install directory, defaults to
                          /usr/local/openlink."
ac_help="$ac_help
  --with-adabas[=DIR]     Include Adabas D support.  DIR is the Adabas base
                          install directory, defaults to /usr/local."
ac_help="$ac_help
  --with-sybase[=DIR]     Include Sybase-DB support.  DIR is the Sybase home
                          directory, defaults to /home/sybase."
ac_help="$ac_help
  --with-sybase-ct[=DIR]  Include Sybase-CT support.  DIR is the Sybase home
                          directory, defaults to /home/sybase."
ac_help="$ac_help
  --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL base
                          install directory, defaults to /usr/local."
ac_help="$ac_help
  --with-msql[=DIR]       Include mSQL support.  DIR is the mSQL base
                          install directory, defaults to /usr/local/Hughes."
ac_help="$ac_help
  --with-pgsql[=DIR]      Include PostgresSQL support.  DIR is the PostgresSQL
                          base install directory, defaults to /usr/local/pgsql."
ac_help="$ac_help
  --with-solid[=DIR]      Include Solid support.  DIR is the Solid base
                          install directory, defaults to /usr/local/solid"
ac_help="$ac_help
  --with-ldap[=DIR]       Include LDAP support.  DIR is the LDAP base
                          install directory, defaults to /usr/local/ldap"
ac_help="$ac_help
  --with-snmp[=DIR]       Include SNMP support.  DIR is the SNMP base
                          install directory, defaults to /usr/local"
ac_help="$ac_help
  --with-velocis[=DIR]      Include Velocis support.  DIR is the Velocis
			  base install directory, defaults to /usr/local/velocis."
ac_help="$ac_help
  --with-informix[=DIR]   Include Informix support.  DIR is the Informix base
                          install directory, defaults to ${INFORMIXDIR:-nothing}."
ac_help="$ac_help
  --with-custom-odbc[=DIR]      Include a user defined ODBC support.
                          The DIR is ODBC install base directory, 
                          which defaults to /usr/local.
                          Make sure to define CUSTOM_ODBC_LIBS and
                          have some odbc.h in your include dirs.
                          E.g., you should define following for 
                          Sybase SQL Anywhere 5.5.00 on QNX, prior to
                          run configure script:
                              CFLAGS=\"-DODBC_QNX -DSQLANY_BUG\"
                              LDFLAGS=-lunix
                              CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\"."
ac_help="$ac_help
  --with-hyperwave        Include Hyperwave support"
ac_help="$ac_help
  --with-zlib[=DIR]       Include zlib support (requires zlib >= 1.0.9).
                          DIR is the zlib install directory,
                          defaults to /usr."
ac_help="$ac_help
  --with-dbase            Include the bundled dbase library"
ac_help="$ac_help
  --with-filepro          Include the bundled read-only filePro support"
ac_help="$ac_help
  --disable-unified-odbc   Disable unified ODBC support. Only applicable if
                           iODBC, Adabas, Solid, Velocis or a custom ODBC
                           interface is enabled."
ac_help="$ac_help
  --with-config-file-path=PATH  Sets the path in which to look for php3.ini
                          defaults to /usr/local/lib"
ac_help="$ac_help
  --enable-debug          Compile with debugging symbols"
ac_help="$ac_help
  --enable-safe-mode      Enable safe mode by default."
ac_help="$ac_help
  --with-exec-dir[=DIR]   Only allow executables in DIR when in safe mode
                          defaults to /usr/local/php/bin"
ac_help="$ac_help
  --enable-track-vars     Enable GET/POST/Cookie track variables by default."
ac_help="$ac_help
  --enable-magic-quotes   Enable magic quotes by default."
ac_help="$ac_help
  --enable-debugger       Compile with remote debugging functions."
ac_help="$ac_help
  --disable-bcmath        Compile without bc style precision math functions. "
ac_help="$ac_help
  --enable-force-cgi-redirect Enable the security check for internal server
                              redirects.  You should use this if you are
                              running the CGI version with Apache. "
ac_help="$ac_help
  --enable-discard-path   If this is enabled, the PHP CGI binary
                          can safely be placed outside of the
                          web tree and people will not be able
                          to circumvent .htaccess security. "
ac_help="$ac_help
  --enable-memory-limit   Compile with memory limit support. "
ac_help="$ac_help
  --disable-short-tags    Disable the short-form <? start tag by default."
ac_help="$ac_help
  --disable-url-fopen-wrapper Disable the URL-aware fopen wrapper that allows
                              accessing files via http or ftp."

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.12"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=main.c

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi



PHP_VERSION=`cut -d\" -f 2 $srcdir/php_version.h`



echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:657: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
   if test "" = "X"; then
      # -L didn't work.
      set X `ls -t $srcdir/configure conftestfile`
   fi
   test "$2" = conftestfile
   )
then
   # Ok.
   :
else
   { echo "configure: error: newly created file is older than distributed files!
Check your system clock" 1>&2; exit 1; }
fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:684: checking whether to enable maintainer-specific portions of Makefiles" >&5
    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
  enableval="$enable_maintainer_mode"
  USE_MAINTAINER_MODE=$enableval
else
  USE_MAINTAINER_MODE=no
fi

  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
  if test $USE_MAINTAINER_MODE = yes; then
    MAINT=
  else
    MAINT='#M#'
  fi
  


test -z "$CFLAGS" && auto_cflags=1

for ac_prog in 'bison -y' byacc
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:709: 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
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_YACC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
YACC="$ac_cv_prog_YACC"
if test -n "$YACC"; then
  echo "$ac_t""$YACC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"

if test "$YACC" != "bison -y"; then
    echo "configure: warning: You will need bison if you'd want to regenerate the PHP 3.0 parsers." 1>&2
else
    echo $ac_n "checking bison version""... $ac_c" 1>&6
echo "configure:742: checking bison version" >&5
    set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
    if test "$1" = "1" -a "$2" -lt "25"; then
        echo "configure: warning: You will need bison 1.25 if you'd want to regenerate the PHP 3.0 parsers (found $1.$2)." 1>&2
    fi
    echo "$ac_t""$1.$2 (ok)" 1>&6
fi
# 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:752: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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:781: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  ac_prog_rejected=no
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:829: 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.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext <<EOF
#line 839 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
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:863: 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:868: 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
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:877: \"$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
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
  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:892: 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
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS="$ac_save_CFLAGS"
  elif test $ac_cv_prog_cc_g = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-O2"
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi

# 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:922: 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="${IFS}:"
  for ac_dir in $PATH; 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

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:950: 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:953: 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]/_/'`"
if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'foo(){}' > conftest.c
# Make sure it works both with $CC and with simple cc.
# 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:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
   test -f conftest.o && { (eval echo configure:966: \"$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:971: \"$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:973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
	 test -f conftest.o && { (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
      then
        # cc works too.
        :
      else
        # cc exists but doesn't like -o.
        eval ac_cv_prog_cc_${ac_cc}_c_o=no
      fi
    fi
  fi
else
  eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
  cat >> confdefs.h <<\EOF
#define NO_MINUS_C_MINUS_O 1
EOF

fi

# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1003: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL_PATH'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PERL_PATH" in
  /*)
  ac_cv_path_PERL_PATH="$PERL_PATH" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PERL_PATH="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PERL_PATH="$ac_cv_path_PERL_PATH"
if test -n "$PERL_PATH"; then
  echo "$ac_t""$PERL_PATH" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
   "`uname -sv`" = "AIX 4"; then
	CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
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:1040: 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
  case "$PROG_SENDMAIL" in
  /*)
  ac_cv_path_PROG_SENDMAIL="$PROG_SENDMAIL" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PROG_SENDMAIL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_PROG_SENDMAIL" && ac_cv_path_PROG_SENDMAIL="/usr/lib/sendmail"
  ;;
esac
fi
PROG_SENDMAIL="$ac_cv_path_PROG_SENDMAIL"
if test -n "$PROG_SENDMAIL"; then
  echo "$ac_t""$PROG_SENDMAIL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -n "$PROG_SENDMAIL"; then
  cat >> confdefs.h <<\EOF
#define HAVE_SENDMAIL 1
EOF

fi

if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
       CFLAGS="$CFLAGS -I/usr/pkg/include"
       LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi


  echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
echo "configure:1083: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lgdbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1091 "configure"
#include "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 gdbm_open();

int main() {
gdbm_open()
; return 0; }
EOF
if { (eval echo configure:1102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 GDBM 1
EOF
 DBM_TYPE=gdbm; DBM_LIB=-lgdbm
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbm_open in -ldb""... $ac_c" 1>&6
echo "configure:1124: checking for dbm_open in -ldb" >&5
ac_lib_var=`echo db'_'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
else
  ac_save_LIBS="$LIBS"
LIBS="-ldb  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1132 "configure"
#include "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 dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 NDBM 1
EOF
 DBM_TYPE=ndbm; DBM_LIB=-ldb
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbm_open in -lc""... $ac_c" 1>&6
echo "configure:1165: checking for dbm_open in -lc" >&5
ac_lib_var=`echo c'_'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
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1173 "configure"
#include "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 dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 NDBM 1
EOF
 DBM_TYPE=ndbm; DBM_LIB=
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
echo "configure:1206: checking for dbm_open in -ldbm" >&5
ac_lib_var=`echo dbm'_'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
else
  ac_save_LIBS="$LIBS"
LIBS="-ldbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1214 "configure"
#include "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 dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:1225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 NDBM 1
EOF
 DBM_TYPE=ndbm; DBM_LIB=-ldbm
else
  echo "$ac_t""no" 1>&6
DBM_TYPE=""
fi

fi

fi

fi

  echo $ac_n "checking preferred dbm library""... $ac_c" 1>&6
echo "configure:1256: checking preferred dbm library" >&5
  if test "a$DBM_TYPE" = a; then
    echo "$ac_t""none found" 1>&6
    echo "configure: warning: No dbm library found - using built-in flatfile support" 1>&2
  else
    echo "$ac_t""$DBM_TYPE chosen" 1>&6
  fi
  
  


echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
echo "configure:1268: 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 1276 "configure"
#include "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 gethostname();

int main() {
gethostname()
; return 0; }
EOF
if { (eval echo configure:1287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
  LIBS="-lnsl $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBNSL 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for socket in -lc""... $ac_c" 1>&6
echo "configure:1314: checking for socket in -lc" >&5
ac_lib_var=`echo c'_'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
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1322 "configure"
#include "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 socket();

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:1333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  :
else
  echo "$ac_t""no" 1>&6

 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:1353: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1361 "configure"
#include "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 socket();

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
  LIBS="-lsocket $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBSOCKET 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
 
fi


echo $ac_n "checking for gethostbyaddr in -lc""... $ac_c" 1>&6
echo "configure:1401: checking for gethostbyaddr in -lc" >&5
ac_lib_var=`echo c'_'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
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1409 "configure"
#include "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 gethostbyaddr();

int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  :
else
  echo "$ac_t""no" 1>&6

 echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6
echo "configure:1440: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1448 "configure"
#include "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 gethostbyaddr();

int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
  LIBS="-lnsl $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBNSL 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
 
fi


echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
echo "configure:1488: checking for crypt in -lc" >&5
ac_lib_var=`echo c'_'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="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1496 "configure"
#include "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:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  :
else
  echo "$ac_t""no" 1>&6

 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
echo "configure:1527: 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 1535 "configure"
#include "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:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
  LIBS="-lcrypt $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBCRYPT 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
 
fi


echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
echo "configure:1575: checking for dlopen in -lc" >&5
ac_lib_var=`echo c'_'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
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1583 "configure"
#include "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 dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
 # fake it
 cat >> confdefs.h <<\EOF
#define HAVE_LIBDL 1
EOF
 
else
  echo "$ac_t""no" 1>&6

 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:1619: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1627 "configure"
#include "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 dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
  LIBS="-ldl $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBDL 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
 
fi


echo $ac_n "checking for sin in -lc""... $ac_c" 1>&6
echo "configure:1667: checking for sin in -lc" >&5
ac_lib_var=`echo c'_'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
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1675 "configure"
#include "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 sin();

int main() {
sin()
; return 0; }
EOF
if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  :
else
  echo "$ac_t""no" 1>&6

 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
echo "configure:1706: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1714 "configure"
#include "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 sin();

int main() {
sin()
; return 0; }
EOF
if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi
 
fi


echo $ac_n "checking for res_search in -lsocket""... $ac_c" 1>&6
echo "configure:1756: 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 1764 "configure"
#include "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:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
 echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6
echo "configure:1792: 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 1800 "configure"
#include "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:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lresolv $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

 LIBS="$LIBS -lsocket"
 cat >> confdefs.h <<\EOF
#define HAVE_LIBSOCKET 1
EOF
 
else
  echo "$ac_t""no" 1>&6

 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
echo "configure:1847: 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 1855 "configure"
#include "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:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  
  LIBS="$LIBS -lresolv"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBRESOLV 1
EOF
 
 
else
  echo "$ac_t""no" 1>&6

  echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6
echo "configure:1892: 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 1900 "configure"
#include "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:1911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lresolv $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

 
fi
 

fi


echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1946: 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 1961 "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:1967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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 1978 "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:1984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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*
  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 ANSI C header files""... $ac_c" 1>&6
echo "configure:2007: 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 2012 "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:2020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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 2037 "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 2055 "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 2076 "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:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./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

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

fi


if test "`uname -s 2>/dev/null`" != "QNX"; then
	ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
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:2117: 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 2122 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$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
 ac_header_dirent=$ac_hdr; break
else
  echo "$ac_t""no" 1>&6
fi
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:2155: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-ldir  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2163 "configure"
#include "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 opendir();

int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LIBS="$LIBS -ldir"
else
  echo "$ac_t""no" 1>&6
fi

else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:2196: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lx  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2204 "configure"
#include "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 opendir();

int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LIBS="$LIBS -lx"
else
  echo "$ac_t""no" 1>&6
fi

fi

else
	for ac_hdr in dirent.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2242: 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 2247 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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 for fclose declaration""... $ac_c" 1>&6
echo "configure:2281: checking for fclose declaration" >&5
  cat > conftest.$ac_ext <<EOF
#line 2283 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
int (*func)() = fclose
; return 0; }
EOF
if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
#define MISSING_FCLOSE_DECL 0
EOF

    echo "$ac_t""ok" 1>&6
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
#define MISSING_FCLOSE_DECL 1
EOF

    echo "$ac_t""missing" 1>&6
  
fi
rm -f conftest*

for ac_hdr in fcntl.h unistd.h crypt.h sys/file.h memory.h pwd.h grp.h sys/socket.h sys/wait.h syslog.h string.h sys/varargs.h stdarg.h sys/time.h signal.h netinet/in.h dlfcn.h limits.h sys/types.h unix.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2317: 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 2322 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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 "$DBM_LIB" = "-lgdbm"; then
	ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6
echo "configure:2356: checking for gdbm.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 2361 "configure"
#include "confdefs.h"
#include <gdbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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
   GDBM_INCLUDE="" 
else
  echo "$ac_t""no" 1>&6
 
		echo "$ac_t"""Try /usr/local/include/gdbm.h"" 1>&6; 
		ac_safe=`echo "/usr/local/include/gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /usr/local/include/gdbm.h""... $ac_c" 1>&6
echo "configure:2389: checking for /usr/local/include/gdbm.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 2394 "configure"
#include "confdefs.h"
#include </usr/local/include/gdbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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
   GDBM_INCLUDE="-I/usr/local/include" 
else
  echo "$ac_t""no" 1>&6

			echo "$ac_t"""Try /opt/local/include/gdbm.h"" 1>&6;
			ac_safe=`echo "/opt/local/include/gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /opt/local/include/gdbm.h""... $ac_c" 1>&6
echo "configure:2422: checking for /opt/local/include/gdbm.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 2427 "configure"
#include "confdefs.h"
#include </opt/local/include/gdbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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
   GDBM_INCLUDE="-I/opt/local/include" 
else
  echo "$ac_t""no" 1>&6

								echo "$ac_t"""Try /usr/pkg/include/gdbm.h"" 1>&6;
				ac_safe=`echo "/usr/pkg/include/gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /usr/pkg/include/gdbm.h""... $ac_c" 1>&6
echo "configure:2455: checking for /usr/pkg/include/gdbm.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 2460 "configure"
#include "confdefs.h"
#include </usr/pkg/include/gdbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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
   GDBM_INCLUDE="" 
else
  echo "$ac_t""no" 1>&6

					echo "$ac_t"""Giving up - You need to install gdbm.h somewhere"" 1>&6;
					exit
				
fi

			
fi

		
fi
	
	
fi

	
fi

echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:2503: 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 2508 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_tm=sys/time.h
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_tm" 1>&6
if test $ac_cv_struct_tm = sys/time.h; then
  cat >> confdefs.h <<\EOF
#define TM_IN_SYS_TIME 1
EOF

fi

echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
echo "configure:2537: 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 2542 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm_zone=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_tm_zone=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
if test "$ac_cv_struct_tm_zone" = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_TM_ZONE 1
EOF

else
  echo $ac_n "checking for tzname""... $ac_c" 1>&6
echo "configure:2570: 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 2575 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI.  */
extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
#endif
int main() {
atoi(*tzname);
; return 0; }
EOF
if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  ac_cv_var_tzname=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_tzname=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_var_tzname" 1>&6
  if test $ac_cv_var_tzname = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_TZNAME 1
EOF

  fi
fi


echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
echo "configure:2608: 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 2613 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_st_blksize=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_st_blksize=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
if test $ac_cv_struct_st_blksize = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ST_BLKSIZE 1
EOF

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:2643: 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 2648 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
if { (eval echo configure:2656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_st_blocks=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_st_blocks=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
if test $ac_cv_struct_st_blocks = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ST_BLOCKS 1
EOF

else
  LIBOBJS="$LIBOBJS fileblocks.o"
fi

else
    echo "configure: warning: warnings level for cc set to 0" 1>&2
	WARNING_LEVEL=0
	
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
echo "configure:2684: 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 2689 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_st_rdev=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_st_rdev=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
if test $ac_cv_struct_st_rdev = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ST_RDEV 1
EOF

fi


echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:2719: 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 2724 "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 "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
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

echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:2752: 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 2757 "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

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

  cat >> confdefs.h <<\EOF
#define gid_t int
EOF

fi

echo $ac_n "checking for uint""... $ac_c" 1>&6
echo "configure:2786: 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 2791 "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 "uint[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uint=yes
else
  rm -rf conftest*
  ac_cv_type_uint=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_uint" 1>&6
if test $ac_cv_type_uint = no; then
  cat >> confdefs.h <<\EOF
#define uint unsigned int 
EOF

fi

echo $ac_n "checking for ulong""... $ac_c" 1>&6
echo "configure:2819: 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 2824 "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 "ulong[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_ulong=yes
else
  rm -rf conftest*
  ac_cv_type_ulong=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_ulong" 1>&6
if test $ac_cv_type_ulong = no; then
  cat >> confdefs.h <<\EOF
#define ulong unsigned long 
EOF

fi


echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:2853: 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 2858 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vprintf(); 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 vprintf();

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_vprintf) || defined (__stub___vprintf)
choke me
#else
vprintf();
#endif

; return 0; }
EOF
if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_vprintf=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:2905: 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 2910 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt(); 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 _doprnt();

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__doprnt) || defined (__stub____doprnt)
choke me
#else
_doprnt();
#endif

; return 0; }
EOF
if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func__doprnt=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

fi

for ac_func in memcpy memmove strdup strerror strcasecmp strstr flock lockf putenv tempnam usleep setlocale gettimeofday setvbuf srand48 lrand48 srandom random link symlink regcomp getlogin cuserid vsnprintf snprintf gcvt utime crypt setitimer rint unsetenv strftime setsockopt tzset
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2960: 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 2965 "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:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 whether utime accepts a null argument""... $ac_c" 1>&6
echo "configure:3013: 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
  rm -f conftestdata; > conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
if test "$cross_compiling" = yes; then
  ac_cv_func_utime_null=no
else
  cat > conftest.$ac_ext <<EOF
#line 3023 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
main() {
struct stat s, t;
exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
&& t.st_mtime - s.st_mtime < 120));
}
EOF
if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_utime_null=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_utime_null=no
fi
rm -fr conftest*
fi

rm -f core core.* *.core
fi

echo "$ac_t""$ac_cv_func_utime_null" 1>&6
if test $ac_cv_func_utime_null = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_UTIME_NULL 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:3060: 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 3065 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:3093: 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 3098 "configure"
#include "confdefs.h"

#ifdef __GNUC__
# define alloca __builtin_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

int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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.o
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:3153: 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 3158 "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:3183: 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 3188 "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:3211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:3238: 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 3246 "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:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./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 broken sprintf""... $ac_c" 1>&6
echo "configure:3288: checking for broken sprintf" >&5
  if test "$cross_compiling" = yes; then
  
    cat >> confdefs.h <<\EOF
#define BROKEN_SPRINTF 0
EOF

    echo "$ac_t""cannot check" 1>&6
  
else
  cat > conftest.$ac_ext <<EOF
#line 3299 "configure"
#include "confdefs.h"
main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }
EOF
if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
    cat >> confdefs.h <<\EOF
#define BROKEN_SPRINTF 0
EOF

    echo "$ac_t""ok" 1>&6
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
    cat >> confdefs.h <<\EOF
#define BROKEN_SPRINTF 1
EOF

    echo "$ac_t""broken" 1>&6
  
fi
rm -fr conftest*
fi


for ac_func in getopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3331: 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 3336 "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:3359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



if eval "test \"`echo '$''{'ac_cv_type_$1'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3390 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "in_addr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_in_addr_t=yes
else
  rm -rf conftest*
  ac_cv_type_in_addr_t=no
fi
rm -f conftest*

fi

if test $ac_cv_type_in_addr_t = no; then
  cat >> confdefs.h <<\EOF
#define in_addr_t u_int
EOF

fi



  echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6
echo "configure:3423: checking for standard DES crypt" >&5
  if test "$cross_compiling" = yes; then
  
    cat >> confdefs.h <<\EOF
#define PHP3_STD_DES_CRYPT 1
EOF

    echo "$ac_t""cannot check" 1>&6
  
else
  cat > conftest.$ac_ext <<EOF
#line 3434 "configure"
#include "confdefs.h"

main() {
#if HAVE_CRYPT
    exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
#else
	exit(0);
#endif
}
EOF
if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
    cat >> confdefs.h <<\EOF
#define PHP3_STD_DES_CRYPT 1
EOF

    echo "$ac_t""yes" 1>&6
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
    cat >> confdefs.h <<\EOF
#define PHP3_STD_DES_CRYPT 0
EOF

    echo "$ac_t""no" 1>&6
  
fi
rm -fr conftest*
fi


  echo $ac_n "checking for extended DES crypt""... $ac_c" 1>&6
echo "configure:3471: checking for extended DES crypt" >&5
  if test "$cross_compiling" = yes; then
  
    cat >> confdefs.h <<\EOF
#define PHP3_EXT_DES_CRYPT 0
EOF

    echo "$ac_t""cannot check" 1>&6
  
else
  cat > conftest.$ac_ext <<EOF
#line 3482 "configure"
#include "confdefs.h"

main() {
#if HAVE_CRYPT
    exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
#else
	exit(0);
#endif
}
EOF
if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
    cat >> confdefs.h <<\EOF
#define PHP3_EXT_DES_CRYPT 1
EOF

    echo "$ac_t""yes" 1>&6
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
    cat >> confdefs.h <<\EOF
#define PHP3_EXT_DES_CRYPT 0
EOF

    echo "$ac_t""no" 1>&6
  
fi
rm -fr conftest*
fi


  echo $ac_n "checking for MD5 crypt""... $ac_c" 1>&6
echo "configure:3519: checking for MD5 crypt" >&5
  if test "$cross_compiling" = yes; then
  
    cat >> confdefs.h <<\EOF
#define PHP3_MD5_CRYPT 0
EOF

    echo "$ac_t""cannot check" 1>&6
  
else
  cat > conftest.$ac_ext <<EOF
#line 3530 "configure"
#include "confdefs.h"

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:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
    cat >> confdefs.h <<\EOF
#define PHP3_MD5_CRYPT 1
EOF

    echo "$ac_t""yes" 1>&6
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
    cat >> confdefs.h <<\EOF
#define PHP3_MD5_CRYPT 0
EOF

    echo "$ac_t""no" 1>&6
  
fi
rm -fr conftest*
fi


  echo $ac_n "checking for Blowfish crypt""... $ac_c" 1>&6
echo "configure:3576: checking for Blowfish crypt" >&5
  if test "$cross_compiling" = yes; then
  
    cat >> confdefs.h <<\EOF
#define PHP3_BLOWFISH_CRYPT 0
EOF

    echo "$ac_t""cannot check" 1>&6
  
else
  cat > conftest.$ac_ext <<EOF
#line 3587 "configure"
#include "confdefs.h"

main() {
#if HAVE_CRYPT
    char salt[25], 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[16],"O............gl95GkTKn53Of.H4YchXl5PwvvW.5ri");
    exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
#else
	exit(0);
#endif
}
EOF
if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
    cat >> confdefs.h <<\EOF
#define PHP3_BLOWFISH_CRYPT 1
EOF

    echo "$ac_t""yes" 1>&6
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
    cat >> confdefs.h <<\EOF
#define PHP3_BLOWFISH_CRYPT 0
EOF

    echo "$ac_t""no" 1>&6
  
fi
rm -fr conftest*
fi



echo $ac_n "checking whether to use bundled regex library""... $ac_c" 1>&6
echo "configure:3631: checking whether to use bundled regex library" >&5
# Check whether --with-system-regex or --without-system-regex was given.
if test "${with_system_regex+set}" = set; then
  withval="$with_system_regex"
  
	REGEX_LIB=
	HSREGEX=no
 	echo "$ac_t""no" 1>&6
	cat >> confdefs.h <<\EOF
#define REGEX 0
EOF


else
  
	REGEX_LIB=regex/libregex.a
	HSREGEX=yes
 	echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<\EOF
#define HSREGEX 1
EOF

	cat >> confdefs.h <<\EOF
#define REGEX 1
EOF


fi




echo $ac_n "checking for Apache module support via DSO through APXS""... $ac_c" 1>&6
echo "configure:3664: checking for Apache module support via DSO through APXS" >&5
# Check whether --with-apxs or --without-apxs was given.
if test "${with_apxs+set}" = set; then
  withval="$with_apxs"
  
    if test "$withval" = "yes"; then
        withval=apxs
    fi
    APXS="$withval"
    APXS_LDFLAGS="@DBASE_LIB@ @ORACLE_LFLAGS@ @ORACLE_LIBS@ @IODBC_LFLAGS@ @IODBC_LIBS@ @SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @MYSQL_LFLAGS@ @MYSQL_LIBS@ @MSQL_LFLAGS@ @MSQL_LIBS@ @ADA_LFLAGS@ @ADA_LIBS@ @SOLID_LIBS@ @OPENLINK_LIBS@ @PGSQL_LFLAGS@ @PGSQL_LIBS@ @LDAP_LFLAGS@ @LDAP_LIBS@ @VELOCIS_LIBS@ @CODBC_LFLAGS@ @CODBC_LIBS@ @ZLIB_LIBS@ @IFX_LFLAGS@ @IFX_LIBS@"
    APACHE_INCLUDE="-I`$APXS -q INCLUDEDIR`"
    BINNAME=libphp3.so
    INSTALL_IT="\$(APXS) -i -a -n php3 $BINNAME"
    CFLAGS_SHLIB=`perl -V:cccdlflags | cut -d\' -f2`
    LDFLAGS_SHLIB=`perl -V:lddlflags | cut -d\' -f2`
    LDFLAGS_SHLIB_EXPORT=`perl -V:ccdlflags | cut -d\' -f2`
    PHP_LIBS=
    STRONGHOLD=
    cat >> confdefs.h <<\EOF
#define APACHE 1
EOF

    
    
    
    
    
    cat >> confdefs.h <<\EOF
#define HAVE_AP_CONFIG_H 1
EOF

	cat >> confdefs.h <<\EOF
#define HAVE_AP_COMPAT_H 1
EOF

    echo "$ac_t""yes" 1>&6

else
  
    echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking for Apache module support via DSO through APACI""... $ac_c" 1>&6
echo "configure:3709: checking for Apache module support via DSO through APACI" >&5
# Check whether --with-shared-apache or --without-shared-apache was given.
if test "${with_shared_apache+set}" = set; then
  withval="$with_shared_apache"
  
	if test "$withval" = "yes"; then
	  # Apache's default directory
	  withval=/usr/local/etc/httpd
	fi
	if test "$withval" != "no"; then
	  if test -f $withval/src/include/httpd.h; then
	    APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
	    APACHE_TARGET=$withval/src/modules/php3
		if test ! -d $APACHE_TARGET; then
			mkdir $APACHE_TARGET
		fi
		CFLAGS_SHLIB=`perl -V:cccdlflags | cut -d\' -f2`
		LDFLAGS_SHLIB=`perl -V:lddlflags | cut -d\' -f2`
		LDFLAGS_SHLIB_EXPORT=`perl -V:ccdlflags | cut -d\' -f2`
		PHP_LIBS=
	    BINNAME=libmodphp3-so.a
	    INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module $APACHE_TARGET; cp apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
	    cat >> confdefs.h <<\EOF
#define APACHE 1
EOF

	    echo "$ac_t""yes - Shared Apache 1.3.x" 1>&6
		STRONGHOLD=
		if test -f $withval/src/include/ap_config.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_CONFIG_H 1
EOF

		fi
		if test -f $withval/src/include/ap_compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_COMPAT_H 1
EOF

		if test ! -f $withval/src/include/ap_config_auto.h; then
    	{ echo "configure: error: Please run Apache's configure or src/Configure program once and try again" 1>&2; exit 1; }
		fi
		else
		if test -f $withval/src/include/compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_OLD_COMPAT_H 1
EOF

		fi
		fi
      else
	    echo "$ac_t""no" 1>&6
	    { echo "configure: error: Invalid Apache directory - unable to find httpd.h under $withval/src/include" 1>&2; exit 1; }
	  fi
	fi
	
	
	
	
	

else
  
	echo "$ac_t""no" 1>&6

fi


if test "$BINNAME" != "libmodphp3-so.a"; then
if test "$BINNAME" != "libphp3.so"; then
echo $ac_n "checking for Apache module support""... $ac_c" 1>&6
echo "configure:3780: checking for Apache module support" >&5
# Check whether --with-apache or --without-apache was given.
if test "${with_apache+set}" = set; then
  withval="$with_apache"
  
	if test "$withval" = "yes"; then
	  # Apache's default directory
	  withval=/usr/local/etc/httpd
	fi
	if test "$withval" != "no"; then
# For Apache 1.2.x
	  if test -f $withval/src/httpd.h; then 
	    APACHE_INCLUDE=-I$withval/src
	    APACHE_TARGET=$withval/src
	    BINNAME=libphp3.a
	    if test "$with_dbase" = "yes"; then
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module dbase/libdbf.a $APACHE_TARGET"
	      PHP_LIBS="-L. -lphp3 -ldbf"
	    else
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module $APACHE_TARGET"
	      PHP_LIBS="-L. -lphp3"
	    fi
	    cat >> confdefs.h <<\EOF
#define APACHE 1
EOF

	    echo "$ac_t""yes - Apache 1.2.x" 1>&6
		STRONGHOLD=
		if test -f $withval/src/ap_config.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_CONFIG_H 1
EOF

		fi
# For Apache 1.3.x
	  elif test -f $withval/src/main/httpd.h; then
	    APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap"
	    APACHE_TARGET=$withval/src/modules/php3
		if test ! -d $APACHE_TARGET; then
			mkdir $APACHE_TARGET
		fi
	    BINNAME=libmodphp3.a
	    if test "$with_dbase" = "yes"; then
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module dbase/libdbf.a $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -ldbf"
	    else
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3"
		fi
	    cat >> confdefs.h <<\EOF
#define APACHE 1
EOF

	    echo "$ac_t""yes - Apache 1.3.x" 1>&6
		STRONGHOLD=
		if test -f $withval/src/include/ap_config.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_CONFIG_H 1
EOF

		fi
		if test -f $withval/src/include/ap_compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_COMPAT_H 1
EOF

		if test ! -f $withval/src/include/ap_config_auto.h; then
    	{ echo "configure: error: Please run Apache's configure or src/Configure program once and try again" 1>&2; exit 1; }
		fi
		else
		if test -f $withval/src/include/compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_OLD_COMPAT_H 1
EOF

		fi
		fi
# Also for Apache 1.3.x
	  elif test -f $withval/src/include/httpd.h; then
	    APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
	    APACHE_TARGET=$withval/src/modules/php3
		if test ! -d $APACHE_TARGET; then
			mkdir $APACHE_TARGET
		fi
	    BINNAME=libmodphp3.a
	    if test "$with_dbase" = "yes"; then
	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -ldbf"
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h dbase/libdbf.a $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir; cp libphp3.module $APACHE_TARGET"
	    else
	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3"
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir; cp libphp3.module $APACHE_TARGET"
	    fi
	    cat >> confdefs.h <<\EOF
#define APACHE 1
EOF

	    echo "$ac_t""yes - Apache 1.3.x" 1>&6
		STRONGHOLD=
		if test -f $withval/src/include/ap_config.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_CONFIG_H 1
EOF

		fi
		if test -f $withval/src/include/ap_compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_COMPAT_H 1
EOF

		if test ! -f $withval/src/include/ap_config_auto.h; then
    	{ echo "configure: error: Please run Apache's configure or src/Configure program once and try again" 1>&2; exit 1; }
		fi
		else
		if test -f $withval/src/include/compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_OLD_COMPAT_H 1
EOF

		fi
		fi
# For StrongHold 2.2
	  elif test -f $withval/apache/httpd.h; then
	    APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include"
	    APACHE_TARGET=$withval/apache
	    BINNAME=libmodphp3.a
	    if test "$with_dbase" = "yes"; then
	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -ldbf"
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module dbase/libdbf.a $APACHE_TARGET"
	    else
	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3"
	      INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module $APACHE_TARGET"
	    fi
		STRONGHOLD=-DSTRONGHOLD=1
	    cat >> confdefs.h <<\EOF
#define APACHE 1
EOF

		echo "$ac_t""yes - StrongHold" 1>&6
		if test -f $withval/apache/ap_config.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_CONFIG_H 1
EOF

		fi
		if test -f $withval/src/ap_compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_AP_COMPAT_H 1
EOF

		if test ! -f $withval/src/include/ap_config_auto.h; then
    	{ echo "configure: error: Please run Apache's configure or src/Configure program once and try again" 1>&2; exit 1; }
		fi
		else
		if test -f $withval/src/compat.h; then
		cat >> confdefs.h <<\EOF
#define HAVE_OLD_COMPAT_H 1
EOF

		fi
		fi
	  else
	    echo "$ac_t""no" 1>&6
	    { echo "configure: error: Invalid Apache directory - unable to find httpd.h under $withval" 1>&2; exit 1; }
	  fi
	else
	  echo "$ac_t""no" 1>&6
	  BINNAME=php
	  INSTALL_IT="cp $BINNAME \$(bindir)"
	fi

else
  
	echo "$ac_t""no" 1>&6
	BINNAME=php
	INSTALL_IT="cp $BINNAME \$(bindir)"

fi







fi
fi

echo $ac_n "checking for mod_charset compatibility option""... $ac_c" 1>&6
echo "configure:3968: checking for mod_charset compatibility option" >&5
# Check whether --with-mod_charset or --without-mod_charset was given.
if test "${with_mod_charset+set}" = set; then
  withval="$with_mod_charset"
  
	echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<\EOF
#define USE_TRANSFER_TABLES 1
EOF


else
  
	echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking for fhttpd module support""... $ac_c" 1>&6
echo "configure:3987: checking for fhttpd module support" >&5
# Check whether --with-fhttpd or --without-fhttpd was given.
if test "${with_fhttpd+set}" = set; then
  withval="$with_fhttpd"
  
	if test "$withval" = "yes"; then
	  # fhttpd source directory
	  withval=/usr/local/src/fhttpd
	fi
	if test "$withval" != "no"; then
# For fhttpd 0.3.x
	  if test -f $withval/servproc.h; then 
	    FHTTPD_INCLUDE=-I$withval/
            FHTTPD_LIB=$withval/servproc.o
	    FHTTPD_TARGET=$withval/
	    BINNAME=php
	    cat >> confdefs.h <<\EOF
#define FHTTPD 1
EOF

	    echo "$ac_t""yes - fhttpd 0.3.x" 1>&6
	  else
	    echo "$ac_t""no" 1>&6
	    { echo "configure: error: Invalid fhttpd directory - unable to find servproc.h under $withval" 1>&2; exit 1; }
	  fi
	else
	  echo "$ac_t""no" 1>&6
	fi

else
  
	echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking for IMAP support""... $ac_c" 1>&6
echo "configure:4027: checking for IMAP support" >&5
# Check whether --with-imap or --without-imap was given.
if test "${with_imap+set}" = set; then
  withval="$with_imap"
  
  if test "$withval" != "no"; then
	if test "$withval" = "yes"; then
        IMAP_DIR=/usr/local
	else
		IMAP_DIR=$withval
    fi
    if test ! -f $IMAP_DIR/include/mail.h; then
      { echo "configure: error: could not find mail.h in $IMAP_DIR/include !" 1>&2; exit 1; }
	fi
    if test ! -f  $IMAP_DIR/include/rfc822.h; then
      { echo "configure: error: could not find rfc822.h in $IMAP_DIR/include !" 1>&2; exit 1; }
	fi
    if test ! -f $IMAP_DIR/include/linkage.h; then
      { echo "configure: error: could not find linkage.h in $IMAP_DIR/include !" 1>&2; exit 1; }
	fi
    if test ! -f $IMAP_DIR/lib/c-client.a; then
      { echo "configure: error: could not find c-client.a in $IMAP_DIR/lib !" 1>&2; exit 1; }
	fi
         IMAP_INCLUDE="-I$IMAP_DIR/include/"
       IMAP_LIBS="$IMAP_DIR/lib/c-client.a"
		
		
        cat >> confdefs.h <<\EOF
#define HAVE_IMAP 1
EOF

	    echo "$ac_t""yes" 1>&6
	else
	    { echo "configure: error: could not find imap library!" 1>&2; exit 1; }
     fi

else
  
    echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking whether to include GD support""... $ac_c" 1>&6
echo "configure:4071: checking whether to include GD support" >&5
# Check whether --with-gd or --without-gd was given.
if test "${with_gd+set}" = set; then
  withval="$with_gd"
  
  case "$withval" in
    no)
      echo "$ac_t""no" 1>&6 ;;
    yes)
      GD_LIBS="-lgd"
      cat >> confdefs.h <<\EOF
#define HAVE_LIBGD 1
EOF

      echo "$ac_t""yes" 1>&6
      echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6
echo "configure:4087: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4095 "configure"
#include "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 gdImageString16();

int main() {
gdImageString16()
; return 0; }
EOF
if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_LIBGD13 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi

      ac_cv_lib_gd_gdImageLine=yes
      ;;
    *)
      test -f $withval/include/gd1.3/gd.h && GD_INCLUDE="-I$withval/include/gd1.3"
      test -f $withval/include/gd/gd.h && GD_INCLUDE="-I$withval/include/gd"
      test -f $withval/include/gd.h && GD_INCLUDE="-I$withval/include"
      test -f $withval/gd1.3/gd.h && GD_INCLUDE="-I$withval/gd1.3"
      test -f $withval/gd/gd.h && GD_INCLUDE="-I$withval/gd"
      test -f $withval/gd.h && GD_INCLUDE="-I$withval"

      test -f $withval/lib/libgd.a && GD_LIB="$withval/lib"
      test -f $withval/lib/gd/libgd.a && GD_LIB="$withval/lib/gd"
      test -f $withval/lib/gd1.3/libgd.a && GD_LIB="$withval/lib/gd1.3"
      test -f $withval/libgd.a && GD_LIB="$withval"
      test -f $withval/gd/libgd.a && GD_LIB="$withval/gd"
      test -f $withval/gd1.3/libgd.a && GD_LIB="$withval/gd1.3"

      if test -n "$GD_INCLUDE" && test -n "$GD_LIB" ; then
        GD_LIBS="-L$GD_LIB -lgd"
        cat >> confdefs.h <<\EOF
#define HAVE_LIBGD 1
EOF

        echo "$ac_t""yes" 1>&6
        echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6
echo "configure:4154: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4162 "configure"
#include "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 gdImageString16();

int main() {
gdImageString16()
; return 0; }
EOF
if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_LIBGD13 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi

	ac_cv_lib_gd_gdImageLine=yes
      else
        echo "$ac_t""no" 1>&6
      fi ;;
  esac

else
  
  echo $ac_n "checking for gdImageLine in -lgd""... $ac_c" 1>&6
echo "configure:4205: checking for gdImageLine in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageLine | 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="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4213 "configure"
#include "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 gdImageLine();

int main() {
gdImageLine()
; return 0; }
EOF
if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lgd $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

  echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6
echo "configure:4252: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4260 "configure"
#include "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 gdImageString16();

int main() {
gdImageString16()
; return 0; }
EOF
if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_LIBGD13 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi


fi


if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then
       GD_INCLUDE="-I/usr/pkg/include/gd"
fi

if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
  echo $ac_n "checking for TT_Open_Face in -lttf""... $ac_c" 1>&6
echo "configure:4304: checking for TT_Open_Face in -lttf" >&5
ac_lib_var=`echo ttf'_'TT_Open_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
else
  ac_save_LIBS="$LIBS"
LIBS="-lttf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4312 "configure"
#include "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 TT_Open_Face();

int main() {
TT_Open_Face()
; return 0; }
EOF
if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo ttf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lttf $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

fi

  

echo $ac_n "checking for Oracle support""... $ac_c" 1>&6
echo "configure:4355: checking for Oracle support" >&5
# Check whether --with-oracle or --without-oracle was given.
if test "${with_oracle+set}" = set; then
  withval="$with_oracle"
  
 case "$withval" in
    yes)
      ORACLEINST_TOP=$ORACLE_HOME
      echo "$ac_t""yes" 1>&6
      ;;
    no)
      ORACLEINST_TOP=
      echo "$ac_t""no" 1>&6
      ;;
    *)
      echo "$ac_t""yes" 1>&6
      ORACLEINST_TOP=$withval
      ;;
  esac

  if test "$ORACLEINST_TOP" != ""
  then

    # Oracle include files

    if test -d "$ORACLEINST_TOP/rdbms/public"
    then
      # V8.0.5
      ORACLE_INCLUDE="$ORACLE_INCLUDE -I$ORACLEINST_TOP/rdbms/public"
	elif test -d "$ORACLEINST_TOP/rdbms/demo"
    then
      # V7.[0123]
      ORACLE_INCLUDE=-I$ORACLEINST_TOP/rdbms/demo
    fi

    if test -d "$ORACLEINST_TOP/network/public"
    then
      # V8
      ORACLE_INCLUDE="$ORACLE_INCLUDE -I$ORACLEINST_TOP/network/public"
    fi

    if test -d "$ORACLEINST_TOP/plsql/public"
    then
      # V8
      ORACLE_INCLUDE="$ORACLE_INCLUDE -I$ORACLEINST_TOP/plsql/public"
    fi

    # Need to know the version, otherwhise we will mixup nlsrtl
    
  echo $ac_n "checking Oracle version""... $ac_c" 1>&6
echo "configure:4405: checking Oracle version" >&5
  if test -f "$ORACLEINST_TOP/orainst/unix.rgs"
  then
	ORACLE_VERSION=`grep '"ocommon"' $ORACLEINST_TOP/orainst/unix.rgs | sed 's/  */:/g' | cut -d: -f 6 | cut -c 2-4`
    test -z "$ORACLE_VERSION" && ORACLE_VERSION=7.3
  else
    ORACLE_VERSION=8.0
  fi
  echo "$ac_t""$ORACLE_VERSION" 1>&6


    # Oracle libs - nightmare :-)

    ORACLE_LIBDIR=lib
    ORACLE_LFLAGS=-L$ORACLEINST_TOP/$ORACLE_LIBDIR
    if test -f "$ORACLEINST_TOP/rdbms/lib/sysliblist"
    then
      ORA_SYSLIB="`cat $ORACLEINST_TOP/rdbms/lib/sysliblist`"
    else
      ORA_SYSLIB="-lm"
    fi

    # Oracle Static libs
    case $ORACLE_VERSION in
      7.0|7.1)
  	ORACLE_STLIBS="-locic $ORACLEINST_TOP/$ORACLE_LIBDIR/osntab.o \
            -lsqlnet -lora -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 \
            -lcore $ORA_SYSLIB -lcore $ORA_SYSLIB"
    if test "`uname -s 2>/dev/null`" = "AIX"; then
      ORACLE_STLIBS="$ORACLE_STLIBS -bI:$ORACLE_HOME/lib/mili.exp"
    fi
  	;;
      7.2)
  	ORACLE_STLIBS="-locic $ORACLEINST_TOP/$ORACLE_LIBDIR/osntab.o \
            -lsqlnet -lora -lsqlnet -lora -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 \
            -lcore3 $ORA_SYSLIB -lcore3 $ORA_SYSLIB"
  	;;
      7.3)
  	ORACLE_STLIBS="-lclient -lsqlnet -lncr -lsqlnet -lclient -lcommon \
  	    -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric \
            -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 \
            $ORA_SYSLIB -lcore3 $ORA_SYSLIB"
  	;;
      8.0)
  	ORACLE_STLIBS="-lclient -lsqlnet -lncr -lsqlnet -lclient -lcommon \
  	    -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric \
            -lepc -lnlsrtl3 -lc3v6 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 \
            $ORA_SYSLIB -lcore3 $ORA_SYSLIB"
	;;
      *)
  	ORACLE_STLIBS=
  	;;
    esac
  
    # Oracle shared libs
    case $ORACLE_VERSION in
      7.0)
  	# shared libs not supported
  	ORACLE_SHLIBS="$ORACLE_STLIBS"
  	;;
      7.1)
  	if test -f $ORACLEINST_TOP/$ORACLE_LIBDIR/liboracle.s?
  	then
  	  ORACLE_SHLIBS="-loracle $ORA_SYSLIB"
  	else
  	  ORACLE_SHLIBS="$ORACLE_STLIBS"
  	fi
  	;;
      7.2|7.3)
    	if test -f $ORACLEINST_TOP/$ORACLE_LIBDIR/libclntsh.s?
    	then
    	  ORACLE_SHLIBS="-lclntsh $ORA_SYSLIB"
    	else
    	  ORACLE_SHLIBS="$ORACLE_STLIBS"
    	fi
    	;;
      8.0)
	if test -f $ORACLEINST_TOP/$ORACLE_LIBDIR/libclntsh.s? -o \
	        -f $ORACLEINST_TOP/$ORACLE_LIBDIR/libclntsh.a # AIX
    	then
	  if test "$CC" = "gcc" -a "`uname -sv`" = "AIX 4"; then
	    # for Oracle 8 on AIX 4
	    ORA_SYSLIB="$ORA_SYSLIB -nostdlib /lib/crt0_r.o /usr/lib/libpthreads.a /usr/lib/libc_r.a -lgcc"
	  fi
    	  ORACLE_SHLIBS="-lclntsh -lpsa -lcore4 -lnlsrtl3 -lclntsh $ORA_SYSLIB"
    	else
    	  ORACLE_SHLIBS="$ORACLE_STLIBS"
    	fi
        cat >> confdefs.h <<\EOF
#define HAVE_OCI8 1
EOF

    	;;
      *)
  	ORACLE_SHLIBS=
  	;;
    esac
  
    # only using shared libs right now
    ORACLE_LIBS=$ORACLE_SHLIBS

    cat >> confdefs.h <<\EOF
#define HAVE_ORACLE 1
EOF


  fi


else
  echo "$ac_t""no" 1>&6
fi










echo $ac_n "checking for iODBC support""... $ac_c" 1>&6
echo "configure:4528: checking for iODBC support" >&5
# Check whether --with-iodbc or --without-iodbc was given.
if test "${with_iodbc+set}" = set; then
  withval="$with_iodbc"
  
	if test "$withval" = "yes"; then
	  withval=/usr/local
	fi
	if test "$withval" != "no"; then

	  IODBC_INCDIR=$withval/include
	  IODBC_LIBDIR=$withval/lib
	  IODBC_LFLAGS=-L$IODBC_LIBDIR
	  IODBC_INCLUDE=-I$IODBC_INCDIR
	  IODBC_LIBS=-liodbc
      UODBC_DEFAULT=yes

	  cat >> confdefs.h <<\EOF
#define HAVE_IODBC 1
EOF


	  echo "$ac_t""yes" 1>&6

	fi

else
  
	echo "$ac_t""no" 1>&6

fi






echo $ac_n "checking for OpenLink ODBC support""... $ac_c" 1>&6
echo "configure:4566: checking for OpenLink ODBC support" >&5
# Check whether --with-openlink or --without-openlink was given.
if test "${with_openlink+set}" = set; then
  withval="$with_openlink"
  
	if test "$withval" = "yes"; then
	  withval=/usr/local/openlink
	fi
	if test "$withval" != "no"; then

	  OPENLINK_INCDIR=$withval/odbcsdk/include
	  OPENLINK_LIBDIR=$withval/odbcsdk/lib
	  OPENLINK_LFLAGS=-L$OPENLINK_LIBDIR
	  OPENLINK_INCLUDE=-I$OPENLINK_INCDIR
	  OPENLINK_LIBS=-liodbc
      UODBC_DEFAULT=yes

	  cat >> confdefs.h <<\EOF
#define HAVE_OPENLINK 1
EOF


	  echo "$ac_t""yes" 1>&6

	fi

else
  
	echo "$ac_t""no" 1>&6

fi






echo $ac_n "checking for Adabas support""... $ac_c" 1>&6
echo "configure:4604: checking for Adabas support" >&5
# Check whether --with-adabas or --without-adabas was given.
if test "${with_adabas+set}" = set; then
  withval="$with_adabas"
  
  if test "$withval" = "yes"; then
    withval=/usr/local
  fi
  if test "$withval" != "no"; then
    ADA_INCDIR=$withval/incl
    ADA_LIBDIR=$withval/lib
    ADA_LFLAGS=-L$ADA_LIBDIR
    ADA_INCLUDE=-I$ADA_INCDIR
    ADA_LIBS="${ADA_LIBDIR}/odbclib.a -lsqlrte -lsqlptc"
    UODBC_DEFAULT=yes

    cat >> confdefs.h <<\EOF
#define HAVE_ADABAS 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi






echo $ac_n "checking for Sybase support""... $ac_c" 1>&6
echo "configure:4641: checking for Sybase support" >&5
# Check whether --with-sybase or --without-sybase was given.
if test "${with_sybase+set}" = set; then
  withval="$with_sybase"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
		SYBASE_INCDIR=/home/sybase/include
		SYBASE_LIBDIR=/home/sybase/lib
   	else
   		SYBASE_INCDIR=$withval/include
   		SYBASE_LIBDIR=$withval/lib
   	fi
    SYBASE_INCLUDE=-I$SYBASE_INCDIR
    SYBASE_LFLAGS="-L$SYBASE_LIBDIR -L$SYBASE_LIBDIR"
    SYBASE_LIBS=-lsybdb
    echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
echo "configure:4659: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4667 "configure"
#include "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 dnet_addr();

int main() {
dnet_addr()
; return 0; }
EOF
if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
   SYBASE_LIBS="$SYBASE_LIBS -ldnet_stub"
        cat >> confdefs.h <<\EOF
#define HAVE_LIBDNET_STUB 1
EOF

     
else
  echo "$ac_t""no" 1>&6
fi

    cat >> confdefs.h <<\EOF
#define HAVE_SYBASE 1
EOF

  else
  	echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6
echo "configure:4722: 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"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
		SYBASE_CT_INCDIR=/home/sybase/include
		SYBASE_CT_LIBDIR=/home/sybase/lib
   	else
   		SYBASE_CT_INCDIR=$withval/include
   		SYBASE_CT_LIBDIR=$withval/lib
   	fi
    SYBASE_CT_INCLUDE=-I$SYBASE_CT_INCDIR
    SYBASE_CT_LFLAGS="-L$SYBASE_CT_LIBDIR"
    SYBASE_CT_LIBS="-lcs -lct -lcomn -lintl -lsybtcl -linsck"
    echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_SYBASE_CT 1
EOF

  else
  	echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi






echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
echo "configure:4759: checking for MySQL support" >&5
# Check whether --with-mysql or --without-mysql was given.
if test "${with_mysql+set}" = set; then
  withval="$with_mysql"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
		MYSQL_INCDIR=/usr/local/include/mysql
   		MYSQL_LIBDIR=/usr/local/lib/mysql
   	else
		if test -f $withval/include/mysql/mysql.h; then
   			MYSQL_INCDIR=$withval/include/mysql
   			MYSQL_LIBDIR=$withval/lib/mysql
		elif test -f $withval/include/mysql.h; then
   			MYSQL_INCDIR=$withval/include
   			MYSQL_LIBDIR=$withval/lib
		else
	    		echo "$ac_t""no" 1>&6
	    		{ echo "configure: error: Invalid MySQL directory - unable to find mysql.h under $withval" 1>&2; exit 1; }
		fi
   	fi
    MYSQL_INCLUDE=-I$MYSQL_INCDIR
    MYSQL_LFLAGS=-L$MYSQL_LIBDIR
    MYSQL_LIBS=-lmysqlclient

    cat >> confdefs.h <<\EOF
#define HAVE_MYSQL 1
EOF

    echo "$ac_t""yes" 1>&6

        old_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
    for ac_hdr in errmsg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4796: 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 4801 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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

    CPPFLAGS="$old_CPPFLAGS"
  else
  	echo "$ac_t""no" 1>&6
  	cat >> confdefs.h <<\EOF
#define HAVE_MYSQL 1
EOF

  fi

else
  
  echo "$ac_t""no" 1>&6

fi






echo $ac_n "checking for mSQL support""... $ac_c" 1>&6
echo "configure:4853: checking for mSQL support" >&5
# Check whether --with-msql or --without-msql was given.
if test "${with_msql+set}" = set; then
  withval="$with_msql"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
      MSQL_INCDIR=/usr/local/Hughes/include
      MSQL_LIBDIR=/usr/local/Hughes/lib
   	else
      MSQL_INCDIR=$withval/include
      MSQL_LIBDIR=$withval/lib
   	fi
    MSQL_INCLUDE=-I$MSQL_INCDIR
    MSQL_LFLAGS=-L$MSQL_LIBDIR
    MSQL_LIBS=-lmsql

    cat >> confdefs.h <<\EOF
#define HAVE_MSQL 1
EOF

    echo "$ac_t""yes" 1>&6
    
  echo $ac_n "checking mSQL version""... $ac_c" 1>&6
echo "configure:4877: checking mSQL version" >&5
  ac_php_oldcflags=$CFLAGS
  CFLAGS="$MSQL_INCLUDE $CFLAGS";
  cat > conftest.$ac_ext <<EOF
#line 4881 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include "msql.h"
int main() {
int i = IDX_TYPE
; return 0; }
EOF
if { (eval echo configure:4889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
#define MSQL1 0
EOF

    MSQL_VERSION="2.0 or newer"
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
#define MSQL1 1
EOF

    MSQL_VERSION="1.0"
  
fi
rm -f conftest*
  CFLAGS=$ac_php_oldcflags
  echo "$ac_t""$MSQL_VERSION" 1>&6

  else
  	echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking for PostgresSQL support""... $ac_c" 1>&6
echo "configure:4929: checking for PostgresSQL support" >&5
# Check whether --with-pgsql or --without-pgsql was given.
if test "${with_pgsql+set}" = set; then
  withval="$with_pgsql"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	    PGSQL_INCDIR=/usr/local/pgsql/include
   		PGSQL_LIBDIR=/usr/local/pgsql/lib
   	else
   		PGSQL_INCDIR=$withval/include
   		test -d $withval/include/pgsql && PGSQL_INCDIR=$withval/include/pgsql
   		PGSQL_LIBDIR=$withval/lib
   		test -d $withval/lib/pgsql && PGSQL_LIBDIR=$withval/lib/pgsql
   	fi
    PGSQL_INCLUDE=-I$PGSQL_INCDIR
    PGSQL_LFLAGS=-L$PGSQL_LIBDIR
    PGSQL_LIBS=-lpq

    old_CFLAGS=$CFLAGS; old_LDFLAGS=$LDFLAGS; old_LIBS=$LIBS
    CFLAGS="$CFLAGS $PGSQL_INCLUDE"
    LDFLAGS="$LDFLAGS $PGSQL_LFLAGS"
    LIBS="$LIBS $PGSQL_LIBS"
    cat >> confdefs.h <<\EOF
#define HAVE_PGSQL 1
EOF

    echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for PQcmdTuples""... $ac_c" 1>&6
echo "configure:4958: checking for PQcmdTuples" >&5
if eval "test \"`echo '$''{'ac_cv_func_PQcmdTuples'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4963 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char PQcmdTuples(); 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 PQcmdTuples();

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_PQcmdTuples) || defined (__stub___PQcmdTuples)
choke me
#else
PQcmdTuples();
#endif

; return 0; }
EOF
if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_PQcmdTuples=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_PQcmdTuples=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'PQcmdTuples`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_PQCMDTUPLES 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

    CFLAGS=$old_CFLAGS; LDFLAGS=$old_LDFLAGS; LIBS=$old_LIBS
  else
    echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi






echo $ac_n "checking for Solid support""... $ac_c" 1>&6
echo "configure:5025: checking for Solid support" >&5
# Check whether --with-solid or --without-solid was given.
if test "${with_solid+set}" = set; then
  withval="$with_solid"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	    SOLID_INCDIR=/usr/local/solid/include
   		SOLID_LIBDIR=/usr/local/solid/lib
   	else
   		SOLID_INCDIR=$withval/include
   		SOLID_LIBDIR=$withval/lib
   	fi
    SOLID_INCLUDE=-I$SOLID_INCDIR
    UODBC_DEFAULT=yes

    cat >> confdefs.h <<\EOF
#define HAVE_SOLID 1
EOF


    echo "$ac_t""yes" 1>&6
  else
  	echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi

if test "$SOLID_LIBDIR" != ""; then
  
  echo $ac_n "checking Solid library file""... $ac_c" 1>&6
echo "configure:5060: checking Solid library file" >&5
  ac_solid_uname_s=`uname -s 2>/dev/null`
  case $ac_solid_uname_s in
    AIX) ac_solid_os=a3x;;
    HP-UX) ac_solid_os=h9x;;
    IRIX) ac_solid_os=irx;;
    Linux) ac_solid_os=lux;;
    SunOS) ac_solid_os=ssx;; # should we deal with SunOS 4?
    FreeBSD) ac_solid_os=fbx;;
    # "uname -s" on SCO makes no sense.
  esac
  SOLID_LIBS=`echo $SOLID_LIBDIR/scl${ac_solid_os}*.so | cut -d' ' -f1`
  if test ! -f $SOLID_LIBS; then
    SOLID_LIBS=`echo $SOLID_LIBDIR/scl${ac_solid_os}*.a | cut -d' ' -f1`
  fi
  if test ! -f $SOLID_LIBS; then
    SOLID_LIBS=`echo $SOLID_LIBDIR/bcl${ac_solid_os}*.so | cut -d' ' -f1`
  fi
  if test ! -f $SOLID_LIBS; then
    SOLID_LIBS=`echo $SOLID_LIBDIR/bcl${ac_solid_os}*.a | cut -d' ' -f1`
  fi
  echo "$ac_t""`echo $SOLID_LIBS | sed -e 's!.*/!!'`" 1>&6

fi




echo $ac_n "checking for LDAP support""... $ac_c" 1>&6
echo "configure:5089: checking for LDAP support" >&5
# Check whether --with-ldap or --without-ldap was given.
if test "${with_ldap+set}" = set; then
  withval="$with_ldap"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	    LDAP_INCDIR=/usr/local/ldap/include
   		LDAP_LIBDIR=/usr/local/ldap/lib
   	else
   		LDAP_INCDIR=$withval/include
   		LDAP_LIBDIR=$withval/lib
   	fi
    LDAP_INCLUDE=-I$LDAP_INCDIR
    LDAP_LFLAGS=-L$LDAP_LIBDIR
    LDAP_LIBS="-lldap -llber"

    cat >> confdefs.h <<\EOF
#define HAVE_LDAP 1
EOF


    echo "$ac_t""yes" 1>&6
  else
  	echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking for SNMP support""... $ac_c" 1>&6
echo "configure:5127: checking for SNMP support" >&5
# Check whether --with-snmp or --without-snmp was given.
if test "${with_snmp+set}" = set; then
  withval="$with_snmp"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	   	SNMP_INCDIR=/usr/local/include
   		test -d /usr/local/include/ucd-snmp && SNMP_INCDIR=/usr/local/include/ucd-snmp
   		SNMP_LIBDIR=/usr/local/lib
   	else
   		SNMP_INCDIR=$withval/include
   		test -d $withval/include/ucd-snmp && SNMP_INCDIR=$withval/include/ucd-snmp
   		SNMP_LIBDIR=$withval/lib
   	fi
    SNMP_INCLUDE=-I$SNMP_INCDIR
    SNMP_LFLAGS=-L$SNMP_LIBDIR
    SNMP_LIBS="-lsnmp"

    cat >> confdefs.h <<\EOF
#define HAVE_SNMP 1
EOF


    echo "$ac_t""yes" 1>&6
  else
  	echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking for Velocis support""... $ac_c" 1>&6
echo "configure:5167: checking for Velocis support" >&5
# Check whether --with-velocis or --without-velocis was given.
if test "${with_velocis+set}" = set; then
  withval="$with_velocis"
  
  if test "$withval" != "no"; then
    VELOCIS_OS=`uname`
  	if test "$withval" = "yes"; then
	    VELOCIS_INCDIR=/usr/local/velocis/include
		VELOCIS_LIBDIR=/usr/local/velocis
   	else
		VELOCIS_INCDIR=$withval/include
		VELOCIS_LIBDIR=$withval
   	fi
    VELOCIS_INCLUDE=-I$VELOCIS_INCDIR
    VELOCIS_LIBDIR="$VELOCIS_LIBDIR/bin"
    VELOCIS_LIBS="-l_rdbc -l_sql"
    if test $VELOCIS_OS = "FreeBSD"; then
	VELOCIS_LIBS="$VELOCIS_LIBDIR/../lib/rdscli.a -lcompat"
    fi
    if test $VELOCIS_OS = "BSD/OS"; then
	VELOCIS_LIBS="$VELOCIS_LIBDIR/../lib/rdscli.a -lcompat"
    fi
    old_CFLAGS=$CFLAGS; old_LDFLAGS=$LDFLAGS
	CFLAGS="$CFLAGS $VELOCIS_INCLUDE"
	LDFLAGS="$LDFLAGS $VELOCIS_LIBS"
    UODBC_DEFAULT=yes

    cat >> confdefs.h <<\EOF
#define HAVE_VELOCIS 1
EOF

    echo "$ac_t""yes" 1>&6
  else
  	echo "$ac_t""no" 1>&6
  fi

else
  
  echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking for Informix support""... $ac_c" 1>&6
echo "configure:5215: checking for Informix support" >&5
# Check whether --with-informix or --without-informix was given.
if test "${with_informix+set}" = set; then
  withval="$with_informix"
  
	if test "$withval" != "no"; then
		if test "$INFORMIXDIR" = ""; then
			INFORMIX_WARNING="
WARNING: You asked for Informix support, but don't have \\\$INFORMIXDIR
	 environment value set up. Configuring and compiling Informix
	 support to PHP3 is impossible and has been turned off. Please
	 try again after setting up your environment."
			echo "$ac_t""no" 1>&6
		else
			if test "$withval" = "yes"; then
				IFX_INCDIR=$INFORMIXDIR/incl/esql
				IFX_LIBDIR="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql"
			else
				IFX_INCDIR=$withval/incl/esql
				IFX_LIBDIR="-L$withval/lib -L$withval/lib/esql"
				if test "$withval" != "$INFORMIXDIR"; then
					INFORMIX_WARNING="
WARNING: You specified Informix base install directory that is different
	 than your \\\$INFORMIXDIR environment variable. You'd better know
	 exactly what you are doing."
				fi
    		fi
			IFX_INCLUDE=-I$IFX_INCDIR
			IFX_LFLAGS=$IFX_LIBDIR
			if test -z "$IFX_LIBS"; then
				IFX_LIBS=`esql -libs | sed -e 's/-lm//'`
								IFX_LIBS=`echo $IFX_LIBS | sed -e 's/Libraries to be used://g' -e 's/esql: error -55923: No source or object file\.//g'`
											else
								IFX_LIBS="$IFX_LIBS"
			fi
			CFLAGS="$CFLAGS $IFX_INCLUDE"
			LDFLAGS="$LDFLAGS $IFX_LFLAGS"
			cat >> confdefs.h <<\EOF
#define HAVE_IFX 1
EOF

			echo $ac_n "checking Informix version""... $ac_c" 1>&6
echo "configure:5257: checking Informix version" >&5
			IFX_VERSION=`esql -V | sed -ne '1 s/^[^0-9]*\([0-9]\)\.\([0-9]*\).*/\1\2/p'`
			if test $IFX_VERSION -ge "900"; then
				cat >> confdefs.h <<\EOF
#define HAVE_IFX_IUS 1
EOF

				IFX_ESQL_FLAGS="-EDHAVE_IFX_IUS"
			else
				IFX_ESQL_FLAGS="-EUHAVE_IFX_IUS"
			fi
			
			cat >> confdefs.h <<EOF
#define IFX_VERSION $IFX_VERSION
EOF

			echo "$ac_t""yes" 1>&6
		fi
	else
		echo "$ac_t""no" 1>&6
	fi

else
  
  echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking for a custom ODBC support""... $ac_c" 1>&6
echo "configure:5290: checking for a custom ODBC support" >&5
# Check whether --with-custom-odbc or --without-custom-odbc was given.
if test "${with_custom_odbc+set}" = set; then
  withval="$with_custom_odbc"
  
	if test "$withval" = "yes"; then
	  withval=/usr/local
	fi
	if test "$withval" != "no"; then

	  CODBC_INCDIR=$withval/include
	  CODBC_LIBDIR=$withval/lib
	  CODBC_LFLAGS=-L$CODBC_LIBDIR
	  CODBC_INCLUDE=-I$CODBC_INCDIR
	  CODBC_LIBS=$CUSTOM_ODBC_LIBS
      UODBC_DEFAULT=yes

	  cat >> confdefs.h <<\EOF
#define HAVE_CODBC 1
EOF


	  echo "$ac_t""yes" 1>&6

	fi

else
  
	echo "$ac_t""no" 1>&6

fi






echo $ac_n "checking for Hyperwave support""... $ac_c" 1>&6
echo "configure:5328: checking for Hyperwave support" >&5
# Check whether --with-hyperwave or --without-hyperwave was given.
if test "${with_hyperwave+set}" = set; then
  withval="$with_hyperwave"
  
  if test "$withval" != "no"; then
    cat >> confdefs.h <<\EOF
#define HYPERWAVE 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define HYPERWAVE 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
  cat >> confdefs.h <<\EOF
#define HYPERWAVE 0
EOF

  echo "$ac_t""no" 1>&6

fi



echo $ac_n "checking whether to include zlib support""... $ac_c" 1>&6
echo "configure:5360: checking whether to include zlib support" >&5
# Check whether --with-zlib or --without-zlib was given.
if test "${with_zlib+set}" = set; then
  withval="$with_zlib"
  
  case "$withval" in
    no)
      echo "$ac_t""no" 1>&6 ;;
    yes)
      echo "$ac_t""yes" 1>&6
      echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6
echo "configure:5371: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lz  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5379 "configure"
#include "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 gzgets();

int main() {
gzgets()
; return 0; }
EOF
if { (eval echo configure:5390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_ZLIB 1
EOF
 ZLIB_LIBS="-lz"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Zlib module requires zlib >= 1.0.9." 1>&2; exit 1; }
fi
 ;;
    *)
      test -f $withval/include/zlib/zlib.h && ZLIB_INCLUDE="-I$withval/include/zlib"
      test -f $withval/include/zlib.h && ZLIB_INCLUDE="-I$withval/include"
      if test -n "$ZLIB_INCLUDE" ; then
        echo "$ac_t""yes" 1>&6
        echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6
echo "configure:5420: 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
else
  ac_save_LIBS="$LIBS"
LIBS="-lz  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5428 "configure"
#include "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 gzgets();

int main() {
gzgets()
; return 0; }
EOF
if { (eval echo configure:5439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_ZLIB 1
EOF
 ZLIB_LIBS="-L$withval/lib -lz"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Zlib module requires zlib >= 1.0.9." 1>&2; exit 1; }
fi

      else
        echo "$ac_t""no" 1>&6
      fi ;;
  esac

else
  
  echo "$ac_t""no" 1>&6

fi





echo $ac_n "checking whether to include the bundled dbase library""... $ac_c" 1>&6
echo "configure:5479: checking whether to include the bundled dbase library" >&5
# Check whether --with-dbase or --without-dbase was given.
if test "${with_dbase+set}" = set; then
  withval="$with_dbase"
  
  if test "$withval" = "yes"; then
	echo "$ac_t""yes" 1>&6
	cat >> confdefs.h <<\EOF
#define DBASE 1
EOF

	DBASE_LIB=dbase/libdbf.a
  else
	echo "$ac_t""no" 1>&6
	cat >> confdefs.h <<\EOF
#define DBASE 0
EOF

	DBASE_LIB=
  fi

else
  
  echo "$ac_t""no" 1>&6
  cat >> confdefs.h <<\EOF
#define DBASE 0
EOF

  DBASE_LIB=

fi




echo $ac_n "checking whether to include the bundled filePro support""... $ac_c" 1>&6
echo "configure:5515: checking whether to include the bundled filePro support" >&5
# Check whether --with-filepro or --without-filepro was given.
if test "${with_filepro+set}" = set; then
  withval="$with_filepro"
  
  if test "$withval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_FILEPRO 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define HAVE_FILEPRO 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
  cat >> confdefs.h <<\EOF
#define HAVE_FILEPRO 0
EOF

  echo "$ac_t""no" 1>&6

fi
 


echo $ac_n "checking whether to enable unified ODBC support""... $ac_c" 1>&6
echo "configure:5547: checking whether to enable unified ODBC support" >&5
# Check whether --enable-unified-odbc or --disable-unified-odbc was given.
if test "${enable_unified_odbc+set}" = set; then
  enableval="$enable_unified_odbc"
  
  if test "$enableval" = "no"; then
    cat >> confdefs.h <<\EOF
#define HAVE_UODBC 0
EOF

    echo "$ac_t""no" 1>&6
  else
    if test "$with_solid" != ""; then
      UODBC_TYPE=solid
    elif test "$with_iodbc" != ""; then
      UODBC_TYPE=iodbc
    elif test "$with_adabas" != ""; then
      UODBC_TYPE=adabas
    elif test "$with_velocis" != ""; then
      UODBC_TYPE=velocis
    elif test "$with_custom_odbc" != ""; then
      UODBC_TYPE=custom
    else
      { echo "configure: error: no ODBC library!  Include Solid, iODBC, Velocis, Adabas D or a custom ODBC support." 1>&2; exit 1; }
    fi
    cat >> confdefs.h <<\EOF
#define HAVE_UODBC 1
EOF

    echo "$ac_t""yes, using $UODBC_TYPE" 1>&6
  fi

else
  
  if test "$UODBC_DEFAULT" = "yes"; then
  	cat >> confdefs.h <<\EOF
#define HAVE_UODBC 1
EOF

  	echo "$ac_t""yes" 1>&6
  else
  	cat >> confdefs.h <<\EOF
#define HAVE_UODBC 0
EOF

  	echo "$ac_t""no" 1>&6
  fi

fi



echo $ac_n "checking whether to use a configuration file""... $ac_c" 1>&6
echo "configure:5600: checking whether to use a 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"
  
  if test "$withval" = "yes"; then
    cat >> confdefs.h <<EOF
#define CONFIGURATION_FILE_PATH "/usr/local/lib"
EOF

    cat >> confdefs.h <<\EOF
#define USE_CONFIG_FILE 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    if test "$withval" != "no"; then
      cat >> confdefs.h <<EOF
#define CONFIGURATION_FILE_PATH "$withval"
EOF

      cat >> confdefs.h <<\EOF
#define USE_CONFIG_FILE 1
EOF

      echo "$ac_t""yes" 1>&6
    else
      cat >> confdefs.h <<\EOF
#define CONFIGURATION_FILE_PATH 0
EOF

      cat >> confdefs.h <<\EOF
#define USE_CONFIG_FILE 0
EOF

      echo "$ac_t""no" 1>&6
    fi
  fi

else
  
  cat >> confdefs.h <<EOF
#define CONFIGURATION_FILE_PATH "/usr/local/lib"
EOF

  cat >> confdefs.h <<\EOF
#define USE_CONFIG_FILE 1
EOF

  echo "$ac_t""yes" 1>&6

fi
 


echo $ac_n "checking whether to include debugging symbols""... $ac_c" 1>&6
echo "configure:5656: 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"
  
  if test "$enableval" = "yes"; then
    echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<\EOF
#define DEBUG 1
EOF

    PHP_DEBUG=1
    DEBUG_CFLAGS="-g"
    test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
    test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
      DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
  else
    echo "$ac_t""no" 1>&6
    cat >> confdefs.h <<\EOF
#define DEBUG 0
EOF

    PHP_DEBUG=0
    DEBUG_CFLAGS=""
  fi

else
  
  echo "$ac_t""no" 1>&6
  cat >> confdefs.h <<\EOF
#define DEBUG 0
EOF

  PHP_DEBUG=0
  DEBUG_CFLAGS=""

fi
 




echo $ac_n "checking whether to enable safe mode by default""... $ac_c" 1>&6
echo "configure:5699: 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"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define PHP_SAFE_MODE 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define PHP_SAFE_MODE 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
    cat >> confdefs.h <<\EOF
#define PHP_SAFE_MODE 0
EOF

    echo "$ac_t""no" 1>&6

fi
 


echo $ac_n "checking for safe mode exec dir""... $ac_c" 1>&6
echo "configure:5731: checking for safe mode exec dir" >&5
# Check whether --with-exec-dir or --without-exec-dir was given.
if test "${with_exec_dir+set}" = set; then
  withval="$with_exec_dir"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
		cat >> confdefs.h <<\EOF
#define PHP_SAFE_MODE_EXEC_DIR "/usr/local/php/bin"
EOF

    	echo "$ac_t""/usr/local/php/bin" 1>&6
   	else
		cat >> confdefs.h <<EOF
#define PHP_SAFE_MODE_EXEC_DIR "$withval"
EOF

    	echo "$ac_t""$withval" 1>&6
   	fi
  else
	cat >> confdefs.h <<\EOF
#define PHP_SAFE_MODE_EXEC_DIR "/usr/local/php/bin"
EOF

   	echo "$ac_t""/usr/local/php/bin" 1>&6
  fi

else
  
	cat >> confdefs.h <<\EOF
#define PHP_SAFE_MODE_EXEC_DIR "/usr/local/php/bin"
EOF

   	echo "$ac_t""/usr/local/php/bin" 1>&6

fi



echo $ac_n "checking whether to enable track_vars variables by default""... $ac_c" 1>&6
echo "configure:5771: checking whether to enable track_vars variables by default" >&5
# Check whether --enable-track-vars or --disable-track-vars was given.
if test "${enable_track_vars+set}" = set; then
  enableval="$enable_track_vars"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define PHP_TRACK_VARS 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define PHP_TRACK_VARS 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
    cat >> confdefs.h <<\EOF
#define PHP_TRACK_VARS 0
EOF

    echo "$ac_t""no" 1>&6

fi
 


echo $ac_n "checking whether to enable magic quotes by default""... $ac_c" 1>&6
echo "configure:5803: 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"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define MAGIC_QUOTES 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define MAGIC_QUOTES 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
    cat >> confdefs.h <<\EOF
#define MAGIC_QUOTES 0
EOF

    echo "$ac_t""no" 1>&6

fi
 


echo $ac_n "checking whether to enable remote debugger support""... $ac_c" 1>&6
echo "configure:5835: checking whether to enable remote debugger support" >&5
# Check whether --enable-debugger or --disable-debugger was given.
if test "${enable_debugger+set}" = set; then
  enableval="$enable_debugger"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define PHP_DEBUGGER 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define PHP_DEBUGGER 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
  cat >> confdefs.h <<\EOF
#define PHP_DEBUGGER 0
EOF

  echo "$ac_t""no" 1>&6

fi
 

echo $ac_n "checking whether to enable bc style precision math functions""... $ac_c" 1>&6
echo "configure:5866: 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"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define WITH_BCMATH 1
EOF

    echo "$ac_t""yes" 1>&6
    BCMATH_SRC="functions/bcmath.c functions/number.c"
  else
    cat >> confdefs.h <<\EOF
#define WITH_BCMATH 0
EOF

    echo "$ac_t""no" 1>&6
    BCMATH_SRC=""
  fi

else
  
  cat >> confdefs.h <<\EOF
#define WITH_BCMATH 1
EOF

  echo "$ac_t""yes" 1>&6
  BCMATH_SRC="functions/bcmath.c functions/number.c"

fi
 


if test "$BINNAME" = "php"; then
echo $ac_n "checking whether to force Apache CGI redirect""... $ac_c" 1>&6
echo "configure:5902: checking whether to force Apache CGI redirect" >&5
# Check whether --enable-force-cgi-redirect or --disable-force-cgi-redirect was given.
if test "${enable_force_cgi_redirect+set}" = set; then
  enableval="$enable_force_cgi_redirect"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define FORCE_CGI_REDIRECT 1
EOF

    echo "$ac_t""yes" 1>&6
    REDIRECT=1
  else
    cat >> confdefs.h <<\EOF
#define FORCE_CGI_REDIRECT 0
EOF

    echo "$ac_t""no" 1>&6
    REDIRECT=0
  fi

else
  
  cat >> confdefs.h <<\EOF
#define FORCE_CGI_REDIRECT 0
EOF

  echo "$ac_t""no" 1>&6
  REDIRECT=0

fi
 

echo $ac_n "checking whether to discard path_info + path_translated""... $ac_c" 1>&6
echo "configure:5936: checking whether to discard path_info + path_translated" >&5
# Check whether --enable-discard_path or --disable-discard_path was given.
if test "${enable_discard_path+set}" = set; then
  enableval="$enable_discard_path"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define DISCARD_PATH 1
EOF

    echo "$ac_t""yes" 1>&6
    DISCARD_PATH=1
  else
    cat >> confdefs.h <<\EOF
#define DISCARD_PATH 0
EOF

    echo "$ac_t""no" 1>&6
    DISCARD_PATH=0
  fi

else
  
  cat >> confdefs.h <<\EOF
#define DISCARD_PATH 0
EOF

  echo "$ac_t""no" 1>&6
  DISCARD_PATH=0

fi
 
fi

echo $ac_n "checking whether to enable a memory limit""... $ac_c" 1>&6
echo "configure:5971: checking whether to enable a memory limit" >&5
# Check whether --enable-memory-limit or --disable-memory-limit was given.
if test "${enable_memory_limit+set}" = set; then
  enableval="$enable_memory_limit"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define MEMORY_LIMIT 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define MEMORY_LIMIT 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
  cat >> confdefs.h <<\EOF
#define MEMORY_LIMIT 0
EOF

  echo "$ac_t""no" 1>&6

fi
 

echo $ac_n "checking whether to enable short tags by default""... $ac_c" 1>&6
echo "configure:6002: 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"
  
  if test "$enableval" = "no"; then
    cat >> confdefs.h <<\EOF
#define DEFAULT_SHORT_OPEN_TAG 0
EOF

    echo "$ac_t""no" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define DEFAULT_SHORT_OPEN_TAG 1
EOF

    echo "$ac_t""yes" 1>&6
  fi

else
  
  cat >> confdefs.h <<\EOF
#define DEFAULT_SHORT_OPEN_TAG 1
EOF

  echo "$ac_t""yes" 1>&6

fi
 

echo $ac_n "checking whether to enable the URL-aware fopen wrapper""... $ac_c" 1>&6
echo "configure:6033: checking whether to enable the URL-aware fopen wrapper" >&5
# Check whether --enable-url-fopen-wrapper or --disable-url-fopen-wrapper was given.
if test "${enable_url_fopen_wrapper+set}" = set; then
  enableval="$enable_url_fopen_wrapper"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define PHP3_URL_FOPEN 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define PHP3_URL_FOPEN 0
EOF

    echo "$ac_t""no" 1>&6
  fi

else
  
  cat >> confdefs.h <<\EOF
#define PHP3_URL_FOPEN 1
EOF

  echo "$ac_t""yes" 1>&6

fi


test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2"

if test -n "$auto_cflags" && test "`uname -s 2>/dev/null`" = "HP-UX"; then
   test -n "$GCC" || CFLAGS="-Ae $CFLAGS"
fi








if test ! -d functions; then
	mkdir functions
fi
if test ! -d extra; then
	mkdir extra
fi
if test ! -d extra/gd; then
	mkdir extra/gd
fi

PHP_BUILD_DATE=`date '+%Y-%m-%d'`

cat >> confdefs.h <<EOF
#define PHP_BUILD_DATE "$PHP_BUILD_DATE"
EOF

PHP_UNAME=`uname -a`
cat >> confdefs.h <<EOF
#define PHP_UNAME "$PHP_UNAME"
EOF

PHP_OS=`uname`
cat >> confdefs.h <<EOF
#define PHP_OS "$PHP_OS"
EOF


trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H

# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.12"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir

trap 'rm -fr `echo "Makefile build-defs.h stamp-h libphp3.module doc/Makefile
          doc/version.ent doc/checkdoc extra/gd/bdf2gdfont regex/Makefile
          dbase/Makefile doc/funcparse config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@PHP_VERSION@%$PHP_VERSION%g
s%@MAINT@%$MAINT%g
s%@YACC@%$YACC%g
s%@CC@%$CC%g
s%@RANLIB@%$RANLIB%g
s%@PERL_PATH@%$PERL_PATH%g
s%@PROG_SENDMAIL@%$PROG_SENDMAIL%g
s%@DBM_LIB@%$DBM_LIB%g
s%@DBM_TYPE@%$DBM_TYPE%g
s%@CPP@%$CPP%g
s%@GDBM_INCLUDE@%$GDBM_INCLUDE%g
s%@LIBOBJS@%$LIBOBJS%g
s%@WARNING_LEVEL@%$WARNING_LEVEL%g
s%@ALLOCA@%$ALLOCA%g
s%@REGEX_LIB@%$REGEX_LIB%g
s%@HSREGEX@%$HSREGEX%g
s%@APXS@%$APXS%g
s%@APXS_LDFLAGS@%$APXS_LDFLAGS%g
s%@BINNAME@%$BINNAME%g
s%@INSTALL_IT@%$INSTALL_IT%g
s%@PHP_LIBS@%$PHP_LIBS%g
s%@APACHE_INCLUDE@%$APACHE_INCLUDE%g
s%@APACHE_TARGET@%$APACHE_TARGET%g
s%@STRONGHOLD@%$STRONGHOLD%g
s%@FHTTPD_INCLUDE@%$FHTTPD_INCLUDE%g
s%@FHTTPD_LIB@%$FHTTPD_LIB%g
s%@FHTTPD_TARGET@%$FHTTPD_TARGET%g
s%@IMAP_INCLUDE@%$IMAP_INCLUDE%g
s%@IMAP_LIBS@%$IMAP_LIBS%g
s%@GD_LIBS@%$GD_LIBS%g
s%@GD_INCLUDE@%$GD_INCLUDE%g
s%@ORACLE_SHLIBS@%$ORACLE_SHLIBS%g
s%@ORACLE_STLIBS@%$ORACLE_STLIBS%g
s%@ORACLE_LIBS@%$ORACLE_LIBS%g
s%@ORACLE_LFLAGS@%$ORACLE_LFLAGS%g
s%@ORACLE_INCLUDE@%$ORACLE_INCLUDE%g
s%@ORACLE_HOME@%$ORACLE_HOME%g
s%@ORACLE_VERSION@%$ORACLE_VERSION%g
s%@IODBC_LIBS@%$IODBC_LIBS%g
s%@IODBC_LFLAGS@%$IODBC_LFLAGS%g
s%@IODBC_INCLUDE@%$IODBC_INCLUDE%g
s%@OPENLINK_LIBS@%$OPENLINK_LIBS%g
s%@OPENLINK_LFLAGS@%$OPENLINK_LFLAGS%g
s%@OPENLINK_INCLUDE@%$OPENLINK_INCLUDE%g
s%@ADA_LIBS@%$ADA_LIBS%g
s%@ADA_LFLAGS@%$ADA_LFLAGS%g
s%@ADA_INCLUDE@%$ADA_INCLUDE%g
s%@SYBASE_LIBS@%$SYBASE_LIBS%g
s%@SYBASE_LFLAGS@%$SYBASE_LFLAGS%g
s%@SYBASE_INCLUDE@%$SYBASE_INCLUDE%g
s%@SYBASE_CT_LIBS@%$SYBASE_CT_LIBS%g
s%@SYBASE_CT_LFLAGS@%$SYBASE_CT_LFLAGS%g
s%@SYBASE_CT_INCLUDE@%$SYBASE_CT_INCLUDE%g
s%@MYSQL_LIBS@%$MYSQL_LIBS%g
s%@MYSQL_LFLAGS@%$MYSQL_LFLAGS%g
s%@MYSQL_INCLUDE@%$MYSQL_INCLUDE%g
s%@MSQL_LIBS@%$MSQL_LIBS%g
s%@MSQL_LFLAGS@%$MSQL_LFLAGS%g
s%@MSQL_INCLUDE@%$MSQL_INCLUDE%g
s%@PGSQL_LIBS@%$PGSQL_LIBS%g
s%@PGSQL_LFLAGS@%$PGSQL_LFLAGS%g
s%@PGSQL_INCLUDE@%$PGSQL_INCLUDE%g
s%@SOLID_INCLUDE@%$SOLID_INCLUDE%g
s%@SOLID_LIBS@%$SOLID_LIBS%g
s%@LDAP_LIBS@%$LDAP_LIBS%g
s%@LDAP_LFLAGS@%$LDAP_LFLAGS%g
s%@LDAP_INCLUDE@%$LDAP_INCLUDE%g
s%@SNMP_LIBS@%$SNMP_LIBS%g
s%@SNMP_LFLAGS@%$SNMP_LFLAGS%g
s%@SNMP_INCLUDE@%$SNMP_INCLUDE%g
s%@VELOCIS_LIBS@%$VELOCIS_LIBS%g
s%@VELOCIS_LFLAGS@%$VELOCIS_LFLAGS%g
s%@VELOCIS_INCLUDE@%$VELOCIS_INCLUDE%g
s%@IFX_ESQL_FLAGS@%$IFX_ESQL_FLAGS%g
s%@IFX_LIBS@%$IFX_LIBS%g
s%@IFX_LFLAGS@%$IFX_LFLAGS%g
s%@IFX_INCLUDE@%$IFX_INCLUDE%g
s%@CODBC_LIBS@%$CODBC_LIBS%g
s%@CODBC_LFLAGS@%$CODBC_LFLAGS%g
s%@CODBC_INCLUDE@%$CODBC_INCLUDE%g
s%@ZLIB_LIBS@%$ZLIB_LIBS%g
s%@ZLIB_INCLUDE@%$ZLIB_INCLUDE%g
s%@DBASE_LIB@%$DBASE_LIB%g
s%@DEBUG_CFLAGS@%$DEBUG_CFLAGS%g
s%@PHP_DEBUG@%$PHP_DEBUG%g
s%@BCMATH_SRC@%$BCMATH_SRC%g
s%@CFLAGS_SHLIB@%$CFLAGS_SHLIB%g
s%@LDFLAGS_SHLIB@%$LDFLAGS_SHLIB%g
s%@LDFLAGS_SHLIB_EXPORT@%$LDFLAGS_SHLIB_EXPORT%g
s%@PHP_BUILD_DATE@%$PHP_BUILD_DATE%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile build-defs.h stamp-h libphp3.module doc/Makefile
          doc/version.ent doc/checkdoc extra/gd/bdf2gdfont regex/Makefile
          dbase/Makefile doc/funcparse"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac


  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="config.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  echo 'CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
done
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF


if test "$BINNAME" = "php"; then
	if test "$REDIRECT" = "0"; then
		if test "$DISCARD_PATH" = "0"; then
		echo "WARNING: You will be compiling the CGI version of PHP without any"
		echo "         redirection checking.  By putting this cgi binary somewhere"
		echo "         in your web space, users may be able to circumvent existing .htaccess"
		echo "         security by loading files directly through the parser.  See"
		echo "         http://www.php.net/manual/configuration05.php3 for more details."
		fi
	fi
fi
if test "$INFORMIX_WARNING" != ""; then
		echo "$INFORMIX_WARNING"
fi

EOF
cat >> $CONFIG_STATUS <<\EOF

  chmod +x doc/checkdoc extra/gd/bdf2gdfont doc/funcparse

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

# Local Variables:
# tab-width: 4
# End:
