#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# 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-apxs[=FILE]      Build shared Apache module.  FILE is the optional
                          pathname to the Apache apxs tool; defaults to "apxs"."
ac_help="$ac_help
  --enable-versioning     Take advantage of versioning and scoping
                          Provided by Solaris 2.x and Linux"
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-system-regex     Do not use the bundled regex library"
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
  --with-imsp[=DIR]       Include IMSp support (DIR is IMSP's include dir and libimsp.a dir)."
ac_help="$ac_help
  --with-aspell[=DIR]     Include ASPELL support."
ac_help="$ac_help
  --with-mcal[=DIR]     Include MCAL support."
ac_help="$ac_help
  --with-ftp     Include FTP support."
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-jpeg-dir[=DIR]   jpeg dir for gd-1.8+"
ac_help="$ac_help
  --with-ttf[=DIR]        Include FreeType support"
ac_help="$ac_help
  --enable-t1lib          Enable t1lib support."
ac_help="$ac_help
  --with-gettext[=DIR]    Include GNU gettext support.  DIR is the gettext
                          intall directory, defaults to /usr/local"
ac_help="$ac_help
  --with-imagick[=DIR]    Include ImageMagick support.  DIR is the
                          intall directory, and if left out, PHP will
                          try to find it on its own. [experimental]"
ac_help="$ac_help
  --with-x                use the X Window System"
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 searching through
                          a number of common places for the MySQL files."
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-ibm-db2[=DIR]    Include IBM DB2 support.  DIR is the DB2 base
                          install directory, defaults to /home/db2inst1/sqllib"
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-empress[=DIR]    Include Empress support.  DIR is the Empress base
                          install directory, defaults to \$EMPRESSPATH"
ac_help="$ac_help
  --with-ldap[=DIR]       Include LDAP support.  DIR is the LDAP base
                          install directory, defaults to /usr and /usr/local"
ac_help="$ac_help
  --with-mck[=DIR]        Include Cybercash MCK support. DIR is the cybercash
                          mck build directory, defaults to
                          /usr/src/mck-3.2.0.3-linux for help look in
                          extra/cyberlib"
ac_help="$ac_help
  --with-openssl[=DIR]    Include OpenSSL support in SNMP."
ac_help="$ac_help
  --with-snmp[=DIR]       Include SNMP support.  DIR is the SNMP base
                          install directory, defaults to searching through
                          a number of common locations for the snmp install.
                          Set DIR to "shared" to build as a dl, or "shared,DIR"
                          to build as a dl and still specify DIR."
ac_help="$ac_help
  --enable-ucd-snmp-hack  Enable UCD SNMP hack"
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-interbase[=DIR]  Include InterBase support.  DIR is the InterBase base
                          install directory, defaults to /usr/interbase"
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-xml              Include XML support"
ac_help="$ac_help
  --with-yp          Include YP 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-pdflib[=DIR]     Include pdflib support (tested with 0.6 and 2.0).
                          DIR is the pdflib install directory,
                          defaults to /usr/local."
ac_help="$ac_help
  --with-zlib-dir[=DIR]   zlib dir for pdflib 2.0 or include zlib support"
ac_help="$ac_help
  --with-jpeg-dir[=DIR]   jpeg dir for pdflib 2.0"
ac_help="$ac_help
  --with-tiff-dir[=DIR]   tiff dir for pdflib 2.0"
ac_help="$ac_help
  --with-cpdflib[=DIR]    Include ClibPDF support.
                          DIR is the ClibPDF install directory,
                          defaults to /usr/local."
ac_help="$ac_help
  --with-fdftk[=DIR]      Include fdftk support.
                          DIR is the fdftk install directory,
                          defaults to /usr/local."
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
  --with-mod-dav=DIR      Include DAV support through Apache's mod_dav,
                          DIR is mod_dav's installation directory (Apache
                          module version only!)"
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-sigchild       Enable PHP's own SIGCHLD handler."
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."
ac_help="$ac_help
  --enable-sysvsem        Enable System V semaphore support."
ac_help="$ac_help
  --enable-sysvshm        Enable the System V shared memory support"
ac_help="$ac_help
  --disable-display-source  Compile without displaying source support"
ac_help="$ac_help
  --with-gdbm[=DIR]       Include GDBM support"
ac_help="$ac_help
  --with-ndbm[=DIR]       Include NDBM support"
ac_help="$ac_help
  --with-db2[=DIR]        Include Berkeley DB2 support"
ac_help="$ac_help
  --with-dbm[=DIR]        Include DBM support"
ac_help="$ac_help
  --with-cdb[=DIR]        Include CDB support"
ac_help="$ac_help
  --with-mcrypt[=DIR]     Include mcrypt support.  DIR is the mcrypt
                          install directory."
ac_help="$ac_help
  --with-mhash[=DIR]      Include mhash support.  DIR is the mhash
                          install directory."
ac_help="$ac_help
  --without-pcre-regex    Don't include Perl Compatible Regular Expressions support"
ac_help="$ac_help
  --without-posix         Don't include POSIX functions"
ac_help="$ac_help
  --with-recode[=DIR]     Include GNU recode support."
ac_help="$ac_help
  --enable-dmalloc        Enable dmalloc"

# 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=
SHELL=${CONFIG_SHELL-/bin/sh}
# 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.13"
    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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
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:761: 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:788: 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
  


CONFIGURE_COMMAND=$0
for arg in "$@"; do
    CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
done


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:819: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_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:853: checking bison version" >&5
    set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /g'`
    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:863: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_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:893: 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=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; 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

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:944: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      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
 ;;
    esac
  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:976: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 987 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    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*
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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

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:1018: 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:1023: 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:1032: \"$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
else
  GCC=
fi

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:1051: 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
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi




echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
echo "configure:1086: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  am_cv_prog_cc_stdc=no
ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX			-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  cat > conftest.$ac_ext <<EOF
#line 1102 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;

int main() {

return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];

; return 0; }
EOF
if { (eval echo configure:1139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  am_cv_prog_cc_stdc="$ac_arg"; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
CC="$ac_save_CC"

fi

if test -z "$am_cv_prog_cc_stdc"; then
  echo "$ac_t""none needed" 1>&6
else
  echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
fi
case "x$am_cv_prog_cc_stdc" in
  x|xno) ;;
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
esac

# 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:1165: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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:1194: 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:1197: 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:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
   test -f conftest.o && { (eval echo configure:1210: \"$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:1215: \"$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:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
	 test -f conftest.o && { (eval echo configure:1218: \"$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

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1245: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
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:1268: 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.
  ;;
  ?:/*)			 
  ac_cv_path_PERL_PATH="$PERL_PATH" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_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

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


echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1338: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1343 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x = {0,0};
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

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

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi

if test "$ac_cv_c_const" = "yes" ; then
  LEX_CFLAGS="-DYY_USE_CONST"
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

if test "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then
	APXS_EXP="-bE:mod_php3.exp"
fi


if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
        CPPFLAGS="$CPPFLAGS -traditional-cpp"
fi

echo $ac_n "checking if compiler supports -R""... $ac_c" 1>&6
echo "configure:1432: checking if compiler supports -R" >&5
if eval "test \"`echo '$''{'php_cv_cc_dashr'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	SAVE_LIBS="${LIBS}"
	LIBS="-R /usr/lib ${LIBS}"
	cat > conftest.$ac_ext <<EOF
#line 1440 "configure"
#include "confdefs.h"

int main() {

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

echo "$ac_t""$php_cv_cc_dashr" 1>&6
if test $php_cv_cc_dashr = "yes"; then
	ld_runpath_switch="-R"
	apxs_runpath_switch="-Wl,-R'"
else
	echo $ac_n "checking if compiler supports -Wl,-rpath,""... $ac_c" 1>&6
echo "configure:1466: checking if compiler supports -Wl,-rpath," >&5
	if eval "test \"`echo '$''{'php_cv_cc_rpath'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		SAVE_LIBS="${LIBS}"
		LIBS="-Wl,-rpath,/usr/lib ${LIBS}"
		cat > conftest.$ac_ext <<EOF
#line 1474 "configure"
#include "confdefs.h"

int main() {

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

	echo "$ac_t""$php_cv_cc_rpath" 1>&6
	if test $php_cv_cc_rpath = "yes"; then
		ld_runpath_switch="-Wl,-rpath,"
		apxs_runpath_switch="-Wl,'-rpath "
	else
				ld_runpath_switch="-L"
		apxs_runpath_switch="-L'"
	fi
fi

echo $ac_n "checking if compiler supports -Wl,--version-script""... $ac_c" 1>&6
echo "configure:1505: checking if compiler supports -Wl,--version-script" >&5
if eval "test \"`echo '$''{'php_cv_cc_vscript'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        SLIBS=$LIBS
        LIBS="-Wl,--version-script=$srcdir/php.map $LIBS"
        cat > conftest.$ac_ext <<EOF
#line 1513 "configure"
#include "confdefs.h"

int main() {

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

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

echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:1536: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 1544 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:1575: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 1583 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF



# 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:1617: 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.
  ;;
  ?:/*)			 
  ac_cv_path_PROG_SENDMAIL="$PROG_SENDMAIL" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib"
  for ac_dir in $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 gethostent""... $ac_c" 1>&6
echo "configure:1663: checking for gethostent" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostent'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1668 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostent(); 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 gethostent();

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_gethostent) || defined (__stub___gethostent)
choke me
#else
gethostent();
#endif

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

if eval "test \"`echo '$ac_cv_func_'gethostent`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

  echo $ac_n "checking for gethostent in -lnsl""... $ac_c" 1>&6
echo "configure:1710: checking for gethostent in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostent | 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 1718 "configure"
#include "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 gethostent();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
    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 socket in -lc""... $ac_c" 1>&6
echo "configure:1758: 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 1766 "configure"
#include "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:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  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:1845: 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 1853 "configure"
#include "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:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  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:1932: 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 1940 "configure"
#include "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:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  LIBS="-lcrypt $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBCRYPT 1
EOF
 
 
else
  echo "$ac_t""no" 1>&6

  echo $ac_n "checking for crypt in -lufc""... $ac_c" 1>&6
echo "configure:2016: checking for crypt in -lufc" >&5
ac_lib_var=`echo ufc'_'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="-lufc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2024 "configure"
#include "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:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
    LIBS="-lufc $LIBS"
    cat >> confdefs.h <<\EOF
#define HAVE_LIBCRYPT 1
EOF

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

 
fi
 

fi


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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
 # 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:2113: 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 2121 "configure"
#include "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:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  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:2161: 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 2169 "configure"
#include "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:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_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:2250: 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 2258 "configure"
#include "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:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_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:2389: 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 2397 "configure"
#include "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:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  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:2434: 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 2442 "configure"
#include "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:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_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 for pam_start in -lpam""... $ac_c" 1>&6
echo "configure:2535: checking for pam_start in -lpam" >&5
ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpam  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2543 "configure"
#include "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 pam_start();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  LIBS="-lpam $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_LIBPAM 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6
echo "configure:2581: checking for inet_aton in -lbind" >&5
ac_lib_var=`echo bind'_'inet_aton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbind  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2589 "configure"
#include "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 inet_aton();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  LIBS="$LIBS -lbind" 
else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2623: 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 2638 "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:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 2655 "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:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 2672 "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:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2703: 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 2708 "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:2716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2733 "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 2751 "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 2772 "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:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

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:2813: 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 2818 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:2826: \"$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:2851: 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 2859 "configure"
#include "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:2870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  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:2892: 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 2900 "configure"
#include "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:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  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:2938: 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 2943 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

fi

  echo $ac_n "checking for fclose declaration""... $ac_c" 1>&6
echo "configure:2977: checking for fclose declaration" >&5
  cat > conftest.$ac_ext <<EOF
#line 2979 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
int (*func)() = fclose
; return 0; }
EOF
if { (eval echo configure:2986: \"$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 stdlib.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/resource.h sys/time.h signal.h netinet/in.h dlfcn.h limits.h sys/types.h sys/statvfs.h sys/statfs.h unix.h db.h dbm.h ndbm.h db1/ndbm.h locale.h features.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3013: 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 3018 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:3051: 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 3056 "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:3064: \"$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:3085: 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 3090 "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:3098: \"$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:3118: 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 3123 "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:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 tm_gmtoff in struct tm""... $ac_c" 1>&6
echo "configure:3156: checking for tm_gmtoff in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_gmtoff'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3161 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
int main() {
struct tm tm; tm.tm_gmtoff;
; return 0; }
EOF
if { (eval echo configure:3169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm_gmtoff=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_tm_gmtoff=no
fi
rm -f conftest*
fi

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

if test "$ac_cv_struct_tm_gmtoff" = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_TM_GMTOFF 1
EOF

fi

echo $ac_n "checking for struct flock""... $ac_c" 1>&6
echo "configure:3191: checking for struct flock" >&5
if eval "test \"`echo '$''{'php_struct_flock'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3196 "configure"
#include "confdefs.h"

#include <unistd.h>
#include <fcntl.h>
        
int main() {
struct flock x;
; return 0; }
EOF
if { (eval echo configure:3206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
          php_struct_flock=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
          php_struct_flock=no
        
fi
rm -f conftest*

fi

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

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

fi

echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
echo "configure:3237: 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 3242 "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:3250: \"$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
	if test "`uname -s 2>/dev/null`" != "OS/2"; then
		echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
echo "configure:3273: 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 3278 "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:3286: \"$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.${ac_objext}"
fi

	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:3315: 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 3320 "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:3328: \"$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:3350: 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 3355 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*

fi
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:3383: 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 3388 "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:3417: 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 3422 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])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 ushort""... $ac_c" 1>&6
echo "configure:3450: checking for ushort" >&5
if eval "test \"`echo '$''{'ac_cv_type_ushort'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3455 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])ushort[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_ushort=yes
else
  rm -rf conftest*
  ac_cv_type_ushort=no
fi
rm -f conftest*

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

fi

echo $ac_n "checking for ulong""... $ac_c" 1>&6
echo "configure:3483: 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 3488 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])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 ptrdiff_t""... $ac_c" 1>&6
echo "configure:3516: checking for ptrdiff_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3521 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_ptrdiff_t=yes
else
  rm -rf conftest*
  ac_cv_type_ptrdiff_t=no
fi
rm -f conftest*

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

fi

	
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:3550: 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 3555 "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:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_vprintf=yes"
else
  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:3602: 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 3607 "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:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func__doprnt=yes"
else
  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 gcvt utime crypt setitimer rint unsetenv strftime setsockopt tzset statvfs statfs inet_aton shutdown truncate getpgid getsid getrlimit snprintf ctermid setsid mkfifo getrusage
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3657: 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 3662 "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:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
echo "configure:3710: 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 3720 "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:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_utime_null=yes
else
  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:3757: 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 3762 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
void *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

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

fi

echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:3790: 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 3795 "configure"
#include "confdefs.h"

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

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

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

fi

if test $ac_cv_func_alloca_works = no; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.${ac_objext}
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:3855: 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 3860 "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:3885: 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 3890 "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:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

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

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

done
fi

echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:3940: 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 3948 "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:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi


  echo $ac_n "checking for broken sprintf""... $ac_c" 1>&6
echo "configure:3990: 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 4001 "configure"
#include "confdefs.h"
main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }
EOF
if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4033: 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 4038 "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:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done




  echo $ac_n "checking for declared timezone""... $ac_c" 1>&6
echo "configure:4090: checking for declared timezone" >&5
if eval "test \"`echo '$''{'ac_cv_declared_timezone'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 4096 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <time.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif

int main() {

    time_t foo = (time_t) timezone;

; return 0; }
EOF
if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
  ac_cv_declared_timezone=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
  ac_cv_declared_timezone=no

fi
rm -f conftest*
fi

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

  fi


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 4140 "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:4173: 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 4184 "configure"
#include "confdefs.h"

#if HAVE_CRYPT_H
#include <crypt.h>
#endif

main() {
#if HAVE_CRYPT
    exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
#else
	exit(0);
#endif
}
EOF
if { (eval echo configure:4199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4225: 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 4236 "configure"
#include "confdefs.h"

#if HAVE_CRYPT_H
#include <crypt.h>
#endif

main() {
#if HAVE_CRYPT
    exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
#else
	exit(0);
#endif
}
EOF
if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4277: 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 4288 "configure"
#include "confdefs.h"

#if HAVE_CRYPT_H
#include <crypt.h>
#endif

main() {
#if HAVE_CRYPT
    char salt[15], answer[40];

    salt[0]='$'; salt[1]='1'; salt[2]='$'; 
    salt[3]='r'; salt[4]='a'; salt[5]='s';
    salt[6]='m'; salt[7]='u'; salt[8]='s';
    salt[9]='l'; salt[10]='e'; salt[11]='$';
    salt[12]='\0';
    strcpy(answer,salt);
    strcat(answer,"rISCgZzpwk3UhDidwXvin0");
    exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
#else
	exit(0);
#endif
}
EOF
if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4338: 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 4349 "configure"
#include "confdefs.h"

#if HAVE_CRYPT_H
#include <crypt.h>
#endif

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:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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 for Apache module support via DSO through APXS""... $ac_c" 1>&6
echo "configure:4397: 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="@EXTRA_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @FHTTPD_LIB@ @ORACLE_LFLAGS@ @ORACLE_LIBS@ @IODBC_LFLAGS@ @IODBC_LIBS@ @SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @ADA_LFLAGS@ @ADA_LIBS@ @SOLID_LIBS@ @EMPRESS_LIBS@ @OPENLINK_LFLAGS@ @OPENLINK_LIBS@ @VELOCIS_LIBS@ @CODBC_LFLAGS@ @CODBC_LIBS@ @ZLIB_LIBS@ @PDFLIB_LIBS@ @CPDFLIB_LIBS@ @FDFLIB_LIBS@ @IFX_LFLAGS@ @IFX_LIBS@ @IBASE_LFLAGS@ @IBASE_LIBS@ @DBM_LIB@"

    APACHE_INCLUDE="-I`$APXS -q INCLUDEDIR`"
    BINNAME=libphp3.so
    INSTALL_IT="\$(APXS) -i -a -n php3 $BINNAME"
    CFLAGS_SHLIB="`$APXS -q CFLAGS_SHLIB`"
    LDFLAGS_SHLIB="`$APXS -q LDFLAGS_SHLIB`"
    CFLAGS="$CFLAGS `$APXS -q CFLAGS`"
	if test "a`$APXS -q LD_SHLIB`" = "a" || test "`$APXS -q LIBEXECDIR`" = "modules"; then
		PHP_APXS_BROKEN=yes
	fi
    PHP_LIBS=-L/usr/local/lib
    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


if test -n "$APXS" ; then
  APXS_CC="`$APXS -q CC`"
fi


abs_srcdir="`(cd $srcdir && pwd)`"
versioning="no"
echo $ac_n "checking whether to enable versioning""... $ac_c" 1>&6
echo "configure:4453: checking whether to enable versioning" >&5
# Check whether --enable-versioning or --disable-versioning was given.
if test "${enable_versioning+set}" = set; then
  enableval="$enable_versioning"
  
  if test "$enableval" = "yes" ; then
    case "`uname -sr`" in
    "SunOS 5"*)
        VERSION_SCRIPT="-Wl,'-M $abs_srcdir/php.map'"
    ;;
    *)
        if test "$php_cv_cc_vscript" = "yes" ; then
          VERSION_SCRIPT="-Wl,--version-script=$abs_srcdir/php.map"
        else
          { echo "configure: error: versioning is not supported on your OS" 1>&2; exit 1; }
        fi
    ;;
    esac
    versioning="yes"
  fi

fi

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


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:4482: 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
	    APACHE_WITHVAL=$withval
# figure out extra library nonsense
# 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
	    INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module $extra_copy $APACHE_TARGET"
	    PHP_LIBS="-L. -lphp3 $extra_l"
	    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
	    INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module $extra_copy $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 $extra_l"
	    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
	    PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 $extra_l"
	    INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h $extra_copy $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir; cp libphp3.module $APACHE_TARGET"
	    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
	    PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 $extra_l"
	    INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $srcdir/mod_php3.* $srcdir/php_version.h libphp3.module $extra_copy $APACHE_TARGET"
		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 whether to use bundled regex library""... $ac_c" 1>&6
echo "configure:4652: 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"
  
	if test -n "$APXS"; then
		if test -n "`$APXS -q CFLAGS | grep USE_HSREGEX`"; then		
			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

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

		fi
	else
		if test "$withval" = "no"; then
			REGEX_LIB=regex/libregex.a
			HSREGEX=yes
			echo "$ac_t""yes" 1>&6
			cat >> confdefs.h <<\EOF
#define REGEX 1
EOF

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

		fi
	fi

else
  
	if test -n "$APXS"; then
		if test -n "`$APXS -q CFLAGS | grep USE_HSREGEX`"; then		
			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

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

		fi
	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

fi





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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define 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:4785: 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 4793 "configure"
#include "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:4804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define 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:4826: 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 4834 "configure"
#include "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:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define 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:4867: 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 4875 "configure"
#include "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:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define 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:4917: 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
  
  


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:4931: 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 4936 "configure"
#include "confdefs.h"
#include <gdbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   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:4964: 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 4969 "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:4974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   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:4997: 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 5002 "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:5007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   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:5030: 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 5035 "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:5040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   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

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

	
fi

echo $ac_n "checking for mod_charset compatibility option""... $ac_c" 1>&6
echo "configure:5082: 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"
  
    if test "$withval" = "yes"; then
	echo "$ac_t""yes" 1>&6
	cat >> confdefs.h <<\EOF
#define USE_TRANSFER_TABLES 1
EOF

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

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

fi


echo $ac_n "checking for fhttpd module support""... $ac_c" 1>&6
echo "configure:5105: 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:5145: 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" = "yes"; then
		if test -f /usr/local/include/mail.h; then
			withval=/usr/local
		elif test -f /usr/include/mail.h; then
			withval=/usr
		elif test -f /usr/include/imap/mail.h; then
			withval=/usr
		fi
    fi
	if test "$withval" != "no" && test "$withval" != "yes"; then
		IMAP_DIR=$withval
		if test -f $IMAP_DIR/include/imap/mail.h; then
			IMAP_INC_DIR=$IMAP_DIR/include/imap
		else
			IMAP_INC_DIR=$withval/include
		fi
		
        if test ! -f $IMAP_INC_DIR/mail.h; then
			{ echo "configure: error: could not find mail.h in $IMAP_INC_DIR !" 1>&2; exit 1; }
		fi
		if test ! -f  $IMAP_INC_DIR/rfc822.h; then
			{ echo "configure: error: could not find rfc822.h in $IMAP_INC_DIR !" 1>&2; exit 1; }
		fi
		if test ! -f $IMAP_INC_DIR/linkage.h; then
			{ echo "configure: error: could not find linkage.h in $IMAP_INC_DIR !" 1>&2; exit 1; }
		fi

		
  if test -z "$IMAP_DIR" || echo "$IMAP_DIR" | grep '^/' >/dev/null ; then
    IMAP_DIR="$IMAP_DIR"
  else
    IMAP_DIR="`pwd`/$IMAP_DIR"
  fi

		if test -f "$IMAP_DIR/lib/libimap.a" ; then
		  
  
  if test "$IMAP_DIR/lib" != "/usr/lib"; then
    
  if test -z "$IMAP_DIR/lib" || echo "$IMAP_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$IMAP_DIR/lib"
  else
    ai_p="`pwd`/$IMAP_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "imap$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -limap"
  
  fi



		elif test -f "$IMAP_DIR/lib/libc-client4.a" || test -f "$IMAP_DIR/lib/libc-client4.so"; then
		  
  
  if test "$IMAP_DIR/lib" != "/usr/lib"; then
    
  if test -z "$IMAP_DIR/lib" || echo "$IMAP_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$IMAP_DIR/lib"
  else
    ai_p="`pwd`/$IMAP_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "c-client4$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lc-client4"
  
  fi



	    elif test -f "$IMAP_DIR/lib/libc-client.a" || test -f "$IMAP_DIR/lib/libc-client.so"; then
		  
  
  if test "$IMAP_DIR/lib" != "/usr/lib"; then
    
  if test -z "$IMAP_DIR/lib" || echo "$IMAP_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$IMAP_DIR/lib"
  else
    ai_p="`pwd`/$IMAP_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "c-client$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lc-client"
  
  fi



        elif test -f "$IMAP_DIR/lib/c-client.a" ; then
          EXTRA_LIBS="$EXTRA_LIBS $IMAP_DIR/lib/c-client.a"
		else
		  { echo "configure: error: Please copy or link $IMAP_DIR/lib/c-client.a to $IMAP_DIR/lib/libc-client.a" 1>&2; exit 1; }
        fi
		
  if test "$IMAP_INC_DIR" != "/usr/include"; then
    
  if test -z "$IMAP_INC_DIR" || echo "$IMAP_INC_DIR" | grep '^/' >/dev/null ; then
    ai_p="$IMAP_INC_DIR"
  else
    ai_p="`pwd`/$IMAP_INC_DIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

        cat >> confdefs.h <<\EOF
#define HAVE_IMAP 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 IMSP support""... $ac_c" 1>&6
echo "configure:5350: checking for IMSP support" >&5
# Check whether --with-imsp or --without-imsp was given.
if test "${with_imsp+set}" = set; then
  withval="$with_imsp"
  
    if test "$withval" = "yes"; then
		if test -f /usr/local/include/imsp.h; then
			withval=/usr/local
		elif test -f /usr/include/imsp.h; then
			withval=/usr
		elif test -f /usr/include/imsp/imsp.h; then
			withval=/usr
		fi
    fi
	if test "$withval" != "no"; then
		IMSP_DIR=$withval
		if test -f $IMSP_DIR/include/imsp/mail.h; then
			IMSP_INC_DIR=$IMSP_DIR/include/imsp
		else
			IMSP_INC_DIR=$withval/include
		fi
		
        if test ! -f $IMSP_INC_DIR/imsp.h; then
			{ echo "configure: error: could not find imsp.h in $IMSP_INC_DIR !" 1>&2; exit 1; }
		fi
		if test ! -f  $IMSP_INC_DIR/support.h; then
			{ echo "configure: error: could not find support.h in $IMSP_INC_DIR !" 1>&2; exit 1; }
		fi
		if test ! -f $IMSP_INC_DIR/imutil.h; then
			{ echo "configure: error: could not find imutil.h in $IMSP_INC_DIR !" 1>&2; exit 1; }
		fi

		if test -f "$IMSP_DIR/lib/libimsp.a" ; then
		  
  
  if test "$IMSP_DIR/lib" != "/usr/lib"; then
    
  if test -z "$IMSP_DIR/lib" || echo "$IMSP_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$IMSP_DIR/lib"
  else
    ai_p="`pwd`/$IMSP_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "imsp$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -limsp"
  
  fi



        elif test -f "$IMSP_DIR/lib/imsp.a" ; then
          EXTRA_LIBS="$EXTRA_LIBS $IMSP_DIR/lib/imsp.a"
		else
		  { echo "configure: error: Please copy or link $IMSP_DIR/lib/imsp.a to $IMSP_DIR/lib/libimsp.a" 1>&2; exit 1; }
        fi
		
  if test "$IMSP_INC_DIR" != "/usr/include"; then
    
  if test -z "$IMSP_INC_DIR" || echo "$IMSP_INC_DIR" | grep '^/' >/dev/null ; then
    ai_p="$IMSP_INC_DIR"
  else
    ai_p="`pwd`/$IMSP_INC_DIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

        cat >> confdefs.h <<\EOF
#define HAVE_IMSP 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 ASPELL support""... $ac_c" 1>&6
echo "configure:5467: checking for ASPELL support" >&5
# Check whether --with-aspell or --without-aspell was given.
if test "${with_aspell+set}" = set; then
  withval="$with_aspell"
  
  if test "$withval" != "no"; then
    if test "$withval" = "yes"; then
      ASPELL_DIR=/usr/local
    else
      ASPELL_DIR=$withval
    fi
    
    
  if test "$ASPELL_DIR/include" != "/usr/include"; then
    
  if test -z "$ASPELL_DIR/include" || echo "$ASPELL_DIR/include" | grep '^/' >/dev/null ; then
    ai_p="$ASPELL_DIR/include"
  else
    ai_p="`pwd`/$ASPELL_DIR/include"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

    
  
  if test "$ASPELL_DIR/lib" != "/usr/lib"; then
    
  if test -z "$ASPELL_DIR/lib" || echo "$ASPELL_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$ASPELL_DIR/lib"
  else
    ai_p="`pwd`/$ASPELL_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "aspell$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -laspell"
  
  fi



    
    if test ! -f "$ASPELL_DIR/include/aspell-c.h"; then
      { echo "configure: error: Could not find aspell-c.h in $ASPELL_DIR/include - please copy it manually from the aspell sources to $ASPELL_DIR/include" 1>&2; exit 1; }
    fi
    cat >> confdefs.h <<\EOF
#define HAVE_ASPELL 1
EOF

    echo "$ac_t""yes" 1>&6
  else
    { echo "configure: error: no" 1>&2; exit 1; }
  fi

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

fi


echo $ac_n "checking for MCAL support""... $ac_c" 1>&6
echo "configure:5561: checking for MCAL support" >&5
# Check whether --with-mcal or --without-mcal was given.
if test "${with_mcal+set}" = set; then
  withval="$with_mcal"
  
  if test "$withval" != "no"; then
    if test "$withval" = "yes"; then
      MCAL_DIR=/usr/local
    else
      MCAL_DIR=$withval
    fi
    
    
  if test "$MCAL_DIR/" != "/usr/include"; then
    
  if test -z "$MCAL_DIR/" || echo "$MCAL_DIR/" | grep '^/' >/dev/null ; then
    ai_p="$MCAL_DIR/"
  else
    ai_p="`pwd`/$MCAL_DIR/"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

    
  
  if test "$MCAL_DIR/" != "/usr/lib"; then
    
  if test -z "$MCAL_DIR/" || echo "$MCAL_DIR/" | grep '^/' >/dev/null ; then
    ai_p="$MCAL_DIR/"
  else
    ai_p="`pwd`/$MCAL_DIR/"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "mcal$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lmcal"
  
  fi



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

    echo "$ac_t""yes" 1>&6
  else
    { echo "configure: error: no" 1>&2; exit 1; }
  fi

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

fi


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

    echo "$ac_t""yes" 1>&6
  else
    { echo "configure: error: no" 1>&2; exit 1; }
  fi

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

fi


# 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_n "checking whether to include GD support""... $ac_c" 1>&6
echo "configure:5680: checking whether to include GD support" >&5
      echo "$ac_t""no" 1>&6
      ;;
    yes)
            old_LIBS=$LIBS
      echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
echo "configure:5686: checking for compress in -lz" >&5
ac_lib_var=`echo z'_'compress | 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 5694 "configure"
#include "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 compress();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lz"
else
  echo "$ac_t""no" 1>&6
fi

      echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6
echo "configure:5726: checking for png_info_init in -lpng" >&5
ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpng  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5734 "configure"
#include "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 png_info_init();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lpng"
else
  echo "$ac_t""no" 1>&6
fi

      echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6
echo "configure:5766: checking for gdImageCreateFromPng in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5774 "configure"
#include "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 gdImageCreateFromPng();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_PNG 1
EOF

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

      LIBS=$old_LIBS
      if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
        
  
  unique=`echo $ac_n "png$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lpng"
  
  fi


        
  
  unique=`echo $ac_n "z$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lz"
  
  fi


      fi

      old_LIBS=$LIBS
      echo $ac_n "checking for libjpeg (needed by gd-1.8+)""... $ac_c" 1>&6
echo "configure:5838: checking for libjpeg (needed by gd-1.8+)" >&5
      # Check whether --with-jpeg-dir or --without-jpeg-dir was given.
if test "${with_jpeg_dir+set}" = set; then
  withval="$with_jpeg_dir"
  
        echo "$ac_t""yes" 1>&6
        if test -z $withval; then
          withval="/usr/local"
        fi
        LIBS="$LIBS -L$withval/lib -ljpeg"
        echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
echo "configure:5849: checking for jpeg_read_header in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ljpeg  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5857 "configure"
#include "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 jpeg_read_header();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -L$withval/lib -ljpeg"
else
  echo "$ac_t""no" 1>&6
fi

      
else
  
        echo "$ac_t""no" 1>&6
        echo "configure: warning: If configure fails try --with-jpeg-dir=<DIR>" 1>&2
      
fi
 
      withval=$old_withval
      echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6
echo "configure:5898: checking for gdImageCreateFromJpeg in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5906 "configure"
#include "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 gdImageCreateFromJpeg();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_JPG 1
EOF

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

      LIBS=$old_LIBS
      if test "$ac_cv_lib_gd_gdImageCreateFromJpeg" = "yes"; then
        
  
  unique=`echo $ac_n "jpeg$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ljpeg"
  
  fi


      fi
      
      echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6
echo "configure:5957: checking for gdImageCreateFromGif in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5965 "configure"
#include "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 gdImageCreateFromGif();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_GIF 1
EOF

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

      echo $ac_n "checking for gdImageLzw in -lgd""... $ac_c" 1>&6
echo "configure:6000: checking for gdImageLzw in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageLzw | 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 6008 "configure"
#include "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 gdImageLzw();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_LZW 1
EOF

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

      echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6
echo "configure:6043: checking for gdImageColorResolve in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6051 "configure"
#include "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 gdImageColorResolve();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_COLORRESOLVE 1
EOF

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_GD_ANCIENT 1
EOF

fi

      
            if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then
         
  if test "/usr/pkg/include/gd" != "/usr/include"; then
    
  if test -z "/usr/pkg/include/gd" || echo "/usr/pkg/include/gd" | grep '^/' >/dev/null ; then
    ai_p="/usr/pkg/include/gd"
  else
    ai_p="`pwd`//usr/pkg/include/gd"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

      fi

      echo $ac_n "checking whether to include GD support""... $ac_c" 1>&6
echo "configure:6155: checking whether to include GD support" >&5
      if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "no" && 
         test "$ac_cv_lib_gd_gdImageCreateFromGif" = "no"; then
        echo "$ac_t""no" 1>&6
      else
        
  
  unique=`echo $ac_n "gd$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lgd"
  
  fi


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

        PHP_HAVE_GD=yes
        echo "$ac_t""yes" 1>&6
      fi
      ;;
    *)
      test -f $withval/include/gd1.7/gd.h && GD_INCLUDE="$withval/include/gd1.7"
      test -f $withval/include/gd1.6/gd.h && GD_INCLUDE="$withval/include/gd1.6"
      test -f $withval/include/gd1.5/gd.h && GD_INCLUDE="$withval/include/gd1.5"
      test -f $withval/include/gd1.4/gd.h && GD_INCLUDE="$withval/include/gd1.4"
      test -f $withval/include/gd1.3/gd.h && GD_INCLUDE="$withval/include/gd1.3"
      test -f $withval/include/gd/gd.h && GD_INCLUDE="$withval/include/gd"
      test -f $withval/include/gd.h && GD_INCLUDE="$withval/include"
      test -f $withval/gd1.6/gd.h && GD_INCLUDE="$withval/gd1.6"
      test -f $withval/gd1.5/gd.h && GD_INCLUDE="$withval/gd1.5"
      test -f $withval/gd1.4/gd.h && GD_INCLUDE="$withval/gd1.4"
      test -f $withval/gd1.3/gd.h && GD_INCLUDE="$withval/gd1.3"
      test -f $withval/gd/gd.h && GD_INCLUDE="$withval/gd"
      test -f $withval/gd.h && GD_INCLUDE="$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.7/libgd.a && GD_LIB="$withval/lib/gd1.7"
      test -f $withval/lib/gd1.6/libgd.a && GD_LIB="$withval/lib/gd1.6"
      test -f $withval/lib/gd1.5/libgd.a && GD_LIB="$withval/lib/gd1.5"
      test -f $withval/lib/gd1.4/libgd.a && GD_LIB="$withval/lib/gd1.4"
      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.7/libgd.a && GD_LIB="$withval/gd1.7"
      test -f $withval/gd1.6/libgd.a && GD_LIB="$withval/gd1.6"
      test -f $withval/gd1.5/libgd.a && GD_LIB="$withval/gd1.5"
      test -f $withval/gd1.4/libgd.a && GD_LIB="$withval/gd1.4"
      test -f $withval/gd1.3/libgd.a && GD_LIB="$withval/gd1.3"

      if test -n "$GD_INCLUDE" && test -n "$GD_LIB" ; then
        
  if test "$GD_INCLUDE" != "/usr/include"; then
    
  if test -z "$GD_INCLUDE" || echo "$GD_INCLUDE" | grep '^/' >/dev/null ; then
    ai_p="$GD_INCLUDE"
  else
    ai_p="`pwd`/$GD_INCLUDE"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

        
  
  if test "$GD_LIB" != "/usr/lib"; then
    
  if test -z "$GD_LIB" || echo "$GD_LIB" | grep '^/' >/dev/null ; then
    ai_p="$GD_LIB"
  else
    ai_p="`pwd`/$GD_LIB"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "gd$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lgd"
  
  fi



 
        old_LDFLAGS=$LDFLAGS
        LDFLAGS="$LDFLAGS -L$GD_LIB"
        
                old_LIBS=$LIBS
        echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
echo "configure:6278: checking for compress in -lz" >&5
ac_lib_var=`echo z'_'compress | 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 6286 "configure"
#include "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 compress();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lz"
else
  echo "$ac_t""no" 1>&6
fi

        echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6
echo "configure:6318: checking for png_info_init in -lpng" >&5
ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpng  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6326 "configure"
#include "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 png_info_init();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lpng"
else
  echo "$ac_t""no" 1>&6
fi

        echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6
echo "configure:6358: checking for gdImageCreateFromPng in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6366 "configure"
#include "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 gdImageCreateFromPng();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_PNG 1
EOF

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

        echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6
echo "configure:6401: checking for gdImageCreateFromJpeg in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6409 "configure"
#include "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 gdImageCreateFromJpeg();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_JPG 1
EOF

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

        LIBS=$old_LIBS
        if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
          
  
  unique=`echo $ac_n "png$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lpng"
  
  fi


          
  
  unique=`echo $ac_n "z$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lz"
  
  fi


        fi
        
        echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6
echo "configure:6472: checking for gdImageCreateFromGif in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6480 "configure"
#include "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 gdImageCreateFromGif();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_GIF 1
EOF

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

        echo $ac_n "checking for gdImageLzw in -lgd""... $ac_c" 1>&6
echo "configure:6515: checking for gdImageLzw in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageLzw | 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 6523 "configure"
#include "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 gdImageLzw();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_LZW 1
EOF

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

        echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6
echo "configure:6558: checking for gdImageColorResolve in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6566 "configure"
#include "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 gdImageColorResolve();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_COLORRESOLVE 1
EOF

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_GD_ANCIENT 1
EOF

fi

            
        LDFLAGS=$old_LDFLAGS;

        echo $ac_n "checking whether to include GD support""... $ac_c" 1>&6
echo "configure:6648: checking whether to include GD support" >&5
        if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "no" &&
           test "$ac_cv_lib_gd_gdImageCreateFromGif" = "no"; then
          echo "$ac_t""no" 1>&6
        else
          cat >> confdefs.h <<\EOF
#define HAVE_LIBGD 1
EOF

          PHP_HAVE_GD=yes
          echo "$ac_t""yes" 1>&6
        fi
      else
        echo $ac_n "checking whether to include GD support""... $ac_c" 1>&6
echo "configure:6662: checking whether to include GD support" >&5
        echo "$ac_t""no" 1>&6
      fi
      ;;
  esac

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
    cat >> confdefs.h <<\EOF
#define HAVE_LIBGD 1
EOF

    
  
  unique=`echo $ac_n "gd$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lgd"
  
  fi


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

  
  if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
        old_LIBS=$LIBS
    echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
echo "configure:6731: checking for compress in -lz" >&5
ac_lib_var=`echo z'_'compress | 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 6739 "configure"
#include "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 compress();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lz"
else
  echo "$ac_t""no" 1>&6
fi

    echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6
echo "configure:6771: checking for png_info_init in -lpng" >&5
ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpng  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6779 "configure"
#include "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 png_info_init();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lpng"
else
  echo "$ac_t""no" 1>&6
fi

    echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6
echo "configure:6811: checking for gdImageCreateFromPng in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6819 "configure"
#include "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 gdImageCreateFromPng();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_PNG 1
EOF

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

    echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6
echo "configure:6854: checking for gdImageCreateFromJpeg in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6862 "configure"
#include "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 gdImageCreateFromJpeg();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_JPG 1
EOF

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

    LIBS=$old_LIBS
    if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
      
  
  unique=`echo $ac_n "png$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lpng"
  
  fi


      
  
  unique=`echo $ac_n "z$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lz"
  
  fi


    fi
      
    echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6
echo "configure:6925: checking for gdImageCreateFromGif in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6933 "configure"
#include "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 gdImageCreateFromGif();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_GIF 1
EOF

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

    echo $ac_n "checking for gdImageLzw in -lgd""... $ac_c" 1>&6
echo "configure:6968: checking for gdImageLzw in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageLzw | 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 6976 "configure"
#include "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 gdImageLzw();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_LZW 1
EOF

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

    echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6
echo "configure:7011: checking for gdImageColorResolve in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7019 "configure"
#include "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 gdImageColorResolve();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GD_COLORRESOLVE 1
EOF

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_GD_ANCIENT 1
EOF

fi

    
        if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then
       
  if test "/usr/pkg/include/gd" != "/usr/include"; then
    
  if test -z "/usr/pkg/include/gd" || echo "/usr/pkg/include/gd" | grep '^/' >/dev/null ; then
    ai_p="/usr/pkg/include/gd"
  else
    ai_p="`pwd`//usr/pkg/include/gd"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

    fi

    echo $ac_n "checking whether to include GD support""... $ac_c" 1>&6
echo "configure:7123: checking whether to include GD support" >&5
    if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "no" &&
       test "$ac_cv_lib_gd_gdImageCreateFromGif" = "no"; then
      echo "$ac_t""no" 1>&6
    else
      cat >> confdefs.h <<\EOF
#define HAVE_LIBGD 1
EOF

      PHP_HAVE_GD=yes
      echo "$ac_t""yes" 1>&6
    fi
  else
    echo $ac_n "checking whether to include GD support""... $ac_c" 1>&6
echo "configure:7137: checking whether to include GD support" >&5
    echo "$ac_t""no" 1>&6
  fi

fi


echo $ac_n "checking whether to include FreeType support""... $ac_c" 1>&6
echo "configure:7145: checking whether to include FreeType support" >&5
# Check whether --with-ttf or --without-ttf was given.
if test "${with_ttf+set}" = set; then
  withval="$with_ttf"
  
  PHP_TTF=$withval

else
  
  PHP_TTF=yes

fi

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







if test "$PHP_TTF" != "no" && test "$PHP_HAVE_GD" != "yes"; then
  echo "configure: warning: No gd support found. Skipping FreeType Configuration" 1>&2
elif test "$PHP_TTF" != "no"; then
  for i in /usr/local /usr $PHP_TTF; do
    if 
test -f "$i/freetype.h"; then TTF_PREFIX="$i"; TTF_INCLUDE="$i/freetype.h";

    elif 
test -f "$i/include/freetype.h"; then TTF_PREFIX="$i"; TTF_INCLUDE="$i/include/freetype.h";

    elif 
test -f "$i/include/freetype/freetype.h"; then TTF_PREFIX="$i"; TTF_INCLUDE="$i/include/freetype/freetype.h";

    fi
    
    if 
test -f "$i/truetype.h"; then FREETYPE_PREFIX="$i"; FREETYPE_INCLUDE="$i/truetype.h";

    elif 
test -f "$i/include/truetype.h"; then FREETYPE_PREFIX="$i"; FREETYPE_INCLUDE="$i/include/truetype.h";

    elif 
test -f "$i/include/freetype/truetype.h"; then FREETYPE_PREFIX="$i"; FREETYPE_INCLUDE="$i/include/freetype/truetype.h";

    fi
  done

  if test -n "$FREETYPE_PREFIX"; then
    
    for i in lib lib/freetype ""; do
      ac_save_ldflags="$LDFLAGS"
      ac_save_libs="$LIBS"
      LDFLAGS="$LDFLAGS -L$FREETYPE_PREFIX/$i"
      unset ac_cv_lib_freetype_TT_Init_FreeType
      echo $ac_n "checking for TT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
echo "configure:7201: checking for TT_Init_FreeType in -lfreetype" >&5
ac_lib_var=`echo freetype'_'TT_Init_FreeType | 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="-lfreetype  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7209 "configure"
#include "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_Init_FreeType();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
        LDFLAGS="$ac_save_ldflags"
        LIBS="$ac_save_libs"
        
  
  if test "$FREETYPE_PREFIX/$i" != "/usr/lib"; then
    
  if test -z "$FREETYPE_PREFIX/$i" || echo "$FREETYPE_PREFIX/$i" | grep '^/' >/dev/null ; then
    ai_p="$FREETYPE_PREFIX/$i"
  else
    ai_p="`pwd`/$FREETYPE_PREFIX/$i"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "freetype$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lfreetype"
  
  fi



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

        dir=`dirname $FREETYPE_INCLUDE`
        
  if test "$dir" != "/usr/include"; then
    
  if test -z "$dir" || echo "$dir" | grep '^/' >/dev/null ; then
    ai_p="$dir"
  else
    ai_p="`pwd`/$dir"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

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

      LDFLAGS="$ac_save_ldflags"
    done

  elif test -n "$TTF_PREFIX"; then
    
    for i in lib lib/freetype ""; do
      ac_save_ldflags="$LDFLAGS"
      ac_save_libs="$LIBS"
      LDFLAGS="$LDFLAGS -L$TTF_PREFIX/$i"
      unset ac_cv_lib_ttf_TT_Init_FreeType
      echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6
echo "configure:7321: checking for TT_Init_FreeType in -lttf" >&5
ac_lib_var=`echo ttf'_'TT_Init_FreeType | 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 7329 "configure"
#include "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_Init_FreeType();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
        LDFLAGS="$ac_save_ldflags"
        LIBS="$ac_save_libs"
        
  
  if test "$TTF_PREFIX/$i" != "/usr/lib"; then
    
  if test -z "$TTF_PREFIX/$i" || echo "$TTF_PREFIX/$i" | grep '^/' >/dev/null ; then
    ai_p="$TTF_PREFIX/$i"
  else
    ai_p="`pwd`/$TTF_PREFIX/$i"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "ttf$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lttf"
  
  fi



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

        dir=`dirname $TTF_INCLUDE`
        
  if test "$dir" != "/usr/include"; then
    
  if test -z "$dir" || echo "$dir" | grep '^/' >/dev/null ; then
    ai_p="$dir"
  else
    ai_p="`pwd`/$dir"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

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

      LDFLAGS="$ac_save_ldflags"
    done

  fi
fi

# Check whether --enable-t1lib or --disable-t1lib was given.
if test "${enable_t1lib+set}" = set; then
  enableval="$enable_t1lib"
  
  if test "$enableval" = "yes"; then
    echo $ac_n "checking for T1_SetDefaultEncoding in -lt1""... $ac_c" 1>&6
echo "configure:7442: checking for T1_SetDefaultEncoding in -lt1" >&5
ac_lib_var=`echo t1'_'T1_SetDefaultEncoding | 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="-lt1  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7450 "configure"
#include "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 T1_SetDefaultEncoding();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   cat >> confdefs.h <<\EOF
#define HAVE_LIBT1 1
EOF
 
else
  echo "$ac_t""no" 1>&6

      { echo "configure: error: T1lib version 0.8 or higher required" 1>&2; exit 1; }
    
fi

    echo $ac_n "checking for T1_GetCharOutline in -lt1""... $ac_c" 1>&6
echo "configure:7488: checking for T1_GetCharOutline in -lt1" >&5
ac_lib_var=`echo t1'_'T1_GetCharOutline | 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="-lt1  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7496 "configure"
#include "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 T1_GetCharOutline();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
      cat >> confdefs.h <<\EOF
#define HAVE_LIBT1_OUTLINE 1
EOF

      T1LIB_WARNING="WARNING: You *must* read README.t1lib for a necessary patch"
    
else
  echo "$ac_t""no" 1>&6
fi

    echo $ac_n "checking for T1_GetExtend in -lt1""... $ac_c" 1>&6
echo "configure:7534: checking for T1_GetExtend in -lt1" >&5
ac_lib_var=`echo t1'_'T1_GetExtend | 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="-lt1  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7542 "configure"
#include "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 T1_GetExtend();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   T1LIB_WARNING="" 
else
  echo "$ac_t""no" 1>&6
fi
    
  
  unique=`echo $ac_n "t1$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lt1"
  
  fi


    echo $ac_n "checking whether to enable t1lib support""... $ac_c" 1>&6
echo "configure:7585: checking whether to enable t1lib support" >&5
    echo "$ac_t""yes" 1>&6
  else
    cat >> confdefs.h <<\EOF
#define HAVE_LIBT1 0
EOF

    echo $ac_n "checking whether to enable t1lib support""... $ac_c" 1>&6
echo "configure:7593: checking whether to enable t1lib support" >&5
    echo "$ac_t""no" 1>&6
  fi

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

  echo $ac_n "checking whether to enable t1lib support""... $ac_c" 1>&6
echo "configure:7604: checking whether to enable t1lib support" >&5
  echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking whether to include GNU gettext support""... $ac_c" 1>&6
echo "configure:7611: checking whether to include GNU gettext support" >&5
# Check whether --with-gettext or --without-gettext was given.
if test "${with_gettext+set}" = set; then
  withval="$with_gettext"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	   	GETTEXT_INCDIR=/usr/local/include
   		test -f /usr/local/include/libintl.h && GETTEXT_INCDIR=/usr/local/include/
   		GETTEXT_LIBDIR=/usr/local/lib
   	else
   		GETTEXT_INCDIR=$withval/include
   		test -f $withval/include/libintl.h && GETTEXT_INCDIR=$withval/include
   		GETTEXT_LIBDIR=$withval/lib
   	fi
    
    
  if test "$GETTEXT_INCDIR" != "/usr/include"; then
    
  if test -z "$GETTEXT_INCDIR" || echo "$GETTEXT_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$GETTEXT_INCDIR"
  else
    ai_p="`pwd`/$GETTEXT_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

    
  if test "$GETTEXT_LIBDIR" != "/usr/lib"; then
    
  if test -z "$GETTEXT_LIBDIR" || echo "$GETTEXT_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$GETTEXT_LIBDIR"
  else
    ai_p="`pwd`/$GETTEXT_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

    
    GETTEXT_INCLUDE=-I$GETTEXT_INCDIR
    GETTEXT_LFLAGS=-L$GETTEXT_LIBDIR
	O_CPPFLAGS="$CPPFLAGS"
	O_LDFLAGS=$LDFLAGS
	CPPFLAGS="$CPPFLAGS -I$GETTEXT_INCDIR"
	LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
	GETTEXT_LIBS=
    echo "$ac_t""yes" 1>&6
	echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
echo "configure:7684: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lintl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7692 "configure"
#include "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 bindtextdomain();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  GETTEXT_LIBS="intl"
else
  echo "$ac_t""no" 1>&6

		echo $ac_n "checking for bindtextdomain in -lc""... $ac_c" 1>&6
echo "configure:7723: checking for bindtextdomain in -lc" >&5
ac_lib_var=`echo c'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7731 "configure"
#include "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 bindtextdomain();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  GETTEXT_LIBS=
else
  echo "$ac_t""no" 1>&6

			{ echo "configure: error: Unable to find required gettext library" 1>&2; exit 1; }
		
fi

	
fi

    
  
  unique=`echo $ac_n "$GETTEXT_LIBS$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$GETTEXT_LIBS"
  
  fi



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


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

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

fi


echo $ac_n "checking whether to include ImageMagick support""... $ac_c" 1>&6
echo "configure:7798: checking whether to include ImageMagick support" >&5
# Check whether --with-imagick or --without-imagick was given.
if test "${with_imagick+set}" = set; then
  withval="$with_imagick"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	   	IMAGICK_INCDIR=/usr/X11R6/include/X11/magick
   		IMAGICK_LIBDIR=/usr/X11R6/lib/
   		test -f /usr/local/include/magick/magick.h && IMAGICK_INCDIR=/usr/local/include/magick
		test -f /usr/local/lib/libMagick.a && IMAGICK_LIBDIR=/usr/local/lib
   	else
   		IMAGICK_INCDIR=$withval
   		IMAGICK_LIBDIR=$withval
   		test -f $withval/include/magick.h && IMAGICK_INCDIR=$withval/include
   		test -f $withval/lib/libMagick.a && IMAGICK_LIBDIR=$withval/lib
   		test -f $withval/include/magick/magick.h && IMAGICK_INCDIR=$withval/include/magick
   		test -f $withval/lib/magick/libMagick.a && IMAGICK_LIBDIR=$withval/lib/magick
   	fi
	echo "$ac_t""yes" 1>&6
	# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:7823: checking for X" >&5

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"
  :
fi

# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=NO ac_x_libraries=NO
rm -fr conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat > Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
        test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case "$ac_im_incroot" in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
    esac
    case "$ac_im_usrlibdir" in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
    esac
  fi
  cd ..
  rm -fr conftestdir
fi

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 7885 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  # Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
  for ac_dir in               \
    /usr/X11/include          \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/include              \
    /usr/local/include        \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    ; \
  do
    if test -r "$ac_dir/$x_direct_test_include"; then
      ac_x_includes=$ac_dir
      break
    fi
  done
fi
rm -f conftest*
fi # $ac_x_includes = NO

if test "$ac_x_libraries" = NO; then
  # Check for the libraries.

  test -z "$x_direct_test_library" && x_direct_test_library=Xt
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7959 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:7966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
fi # $ac_x_libraries = NO

if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$ac_t""$have_x" 1>&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi

    
  if test "$IMAGICK_LIBDIR" != "/usr/lib"; then
    
  if test -z "$IMAGICK_LIBDIR" || echo "$IMAGICK_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$IMAGICK_LIBDIR"
  else
    ai_p="`pwd`/$IMAGICK_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

    
  if test "${ac_x_libraries}" != "/usr/lib"; then
    
  if test -z "${ac_x_libraries}" || echo "${ac_x_libraries}" | grep '^/' >/dev/null ; then
    ai_p="${ac_x_libraries}"
  else
    ai_p="`pwd`/${ac_x_libraries}"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

    
  
  unique=`echo $ac_n "Magick$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lMagick"
  
  fi


    
  
  unique=`echo $ac_n "X11$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lX11"
  
  fi


    
  if test "$IMAGICK_INCDIR" != "/usr/include"; then
    
  if test -z "$IMAGICK_INCDIR" || echo "$IMAGICK_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$IMAGICK_INCDIR"
  else
    ai_p="`pwd`/$IMAGICK_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

    
  if test "${ac_x_includes}/X11" != "/usr/include"; then
    
  if test -z "${ac_x_includes}/X11" || echo "${ac_x_includes}/X11" | grep '^/' >/dev/null ; then
    ai_p="${ac_x_includes}/X11"
  else
    ai_p="`pwd`/${ac_x_includes}/X11"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

	
    O_CPPFLAGS="$CPPFLAGS"
	O_LDFLAGS=$LDFLAGS
	CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
	LDFLAGS="$LDFLAGS -L${ac_x_libraries}"
	echo $ac_n "checking for bzBuffToBuffCompress in -lbz2""... $ac_c" 1>&6
echo "configure:8176: checking for bzBuffToBuffCompress in -lbz2" >&5
ac_lib_var=`echo bz2'_'bzBuffToBuffCompress | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbz2  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8184 "configure"
#include "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 bzBuffToBuffCompress();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "bz2$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lbz2"
  
  fi


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

	echo $ac_n "checking for XShapeCombineMask in -lXext""... $ac_c" 1>&6
echo "configure:8227: checking for XShapeCombineMask in -lXext" >&5
ac_lib_var=`echo Xext'_'XShapeCombineMask | 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="-lXext  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8235 "configure"
#include "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 XShapeCombineMask();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "Xext$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lXext"
  
  fi


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

	echo $ac_n "checking for DPSInitialize in -ldps""... $ac_c" 1>&6
echo "configure:8278: checking for DPSInitialize in -ldps" >&5
ac_lib_var=`echo dps'_'DPSInitialize | 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="-ldps  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8286 "configure"
#include "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 DPSInitialize();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "dps$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ldps"
  
  fi


else
  echo "$ac_t""no" 1>&6
fi
 
	echo $ac_n "checking for XDPSPixelsPerPoint in -ldpstk""... $ac_c" 1>&6
echo "configure:8329: checking for XDPSPixelsPerPoint in -ldpstk" >&5
ac_lib_var=`echo dpstk'_'XDPSPixelsPerPoint | 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="-ldpstk  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8337 "configure"
#include "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 XDPSPixelsPerPoint();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "dpstk$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ldpstk"
  
  fi


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

    echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
echo "configure:8380: checking for TIFFOpen in -ltiff" >&5
ac_lib_var=`echo tiff'_'TIFFOpen | 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="-ltiff  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8388 "configure"
#include "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 TIFFOpen();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "tiff$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ltiff"
  
  fi


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

    echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
echo "configure:8431: checking for jpeg_read_header in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ljpeg  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8439 "configure"
#include "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 jpeg_read_header();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "jpeg$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ljpeg"
  
  fi


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

	echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
echo "configure:8482: checking for compress in -lz" >&5
ac_lib_var=`echo z'_'compress | 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 8490 "configure"
#include "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 compress();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "z$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lz"
  
  fi


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

	echo $ac_n "checking for FPX_OpenImageByFilename in -lfpx""... $ac_c" 1>&6
echo "configure:8533: checking for FPX_OpenImageByFilename in -lfpx" >&5
ac_lib_var=`echo fpx'_'FPX_OpenImageByFilename | 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="-lfpx  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8541 "configure"
#include "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 FPX_OpenImageByFilename();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "fpx$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lfpx"
  
  fi


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

	echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6
echo "configure:8584: checking for png_info_init in -lpng" >&5
ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpng  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8592 "configure"
#include "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 png_info_init();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "png$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lpng"
  
  fi


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

	echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6
echo "configure:8635: checking for TT_Init_FreeType in -lttf" >&5
ac_lib_var=`echo ttf'_'TT_Init_FreeType | 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 8643 "configure"
#include "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_Init_FreeType();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "ttf$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lttf"
  
  fi


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

	echo $ac_n "checking for DFANputlabel in -ldf""... $ac_c" 1>&6
echo "configure:8686: checking for DFANputlabel in -ldf" >&5
ac_lib_var=`echo df'_'DFANputlabel | 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="-ldf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8694 "configure"
#include "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 DFANputlabel();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "df$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ldf"
  
  fi


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

	echo $ac_n "checking for jbg_dec_init in -ljbig""... $ac_c" 1>&6
echo "configure:8737: checking for jbg_dec_init in -ljbig" >&5
ac_lib_var=`echo jbig'_'jbg_dec_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ljbig  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8745 "configure"
#include "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 jbg_dec_init();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
  
  unique=`echo $ac_n "jbig$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ljbig"
  
  fi


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

	
	CPPFLAGS=$O_CPPFLAGS
	LDFLAGS=$O_LDFLAGS
	cat >> confdefs.h <<\EOF
#define HAVE_LIBMAGICK 1
EOF


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

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

fi


echo $ac_n "checking for Oracle support""... $ac_c" 1>&6
echo "configure:8807: 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
      ORACLE_INCLUDE="$ORACLE_INCLUDE -I$ORACLEINST_TOP/rdbms/public"
	fi

	if test -d "$ORACLEINST_TOP/rdbms/demo/";then
      ORACLE_INCLUDE="$ORACLE_INCLUDE -I$ORACLEINST_TOP/rdbms/demo"
    fi

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

    if test -d "$ORACLEINST_TOP/plsql/public"; then
      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:8851: 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
    if test -f "$ORACLEINST_TOP/lib/libclntsh.so.8.0"
    then
        ORACLE_VERSION=8.1
    else
        ORACLE_VERSION=8.0
    fi
  fi
  echo "$ac_t""$ORACLE_VERSION" 1>&6


    # Oracle libs - nightmare :-)

    ORACLE_LIBDIR=lib
    
  if test "$ORACLEINST_TOP/$ORACLE_LIBDIR" != "/usr/lib"; then
    
  if test -z "$ORACLEINST_TOP/$ORACLE_LIBDIR" || echo "$ORACLEINST_TOP/$ORACLE_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$ORACLEINST_TOP/$ORACLE_LIBDIR"
  else
    ai_p="`pwd`/$ORACLEINST_TOP/$ORACLE_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

    if test -f "$ORACLEINST_TOP/rdbms/lib/sysliblist"
    then
      ORA_SYSLIB="`cat $ORACLEINST_TOP/rdbms/lib/sysliblist`"
    elif test -f "$ORACLEINST_TOP/lib/sysliblist"
	then
      ORA_SYSLIB="`cat $ORACLEINST_TOP/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

    	;;
      8.1)
        ORACLE_SHLIBS="-lclntsh $ORA_SYSLIB"
        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


	  echo "+--------------------------------------------------------------------+"
	  echo "| Notice:                                                            |"
	  echo "| If you encounter <defunc> processes when using a local Oracle-DB   |"
	  echo "| please recompile PHP and specify --enable-sigchild when configuring|"
	  echo "| (This problem has been reported un Linux using Oracle >= 8.1.5)    |"
	  echo "+--------------------------------------------------------------------+"

  fi


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










echo $ac_n "checking for iODBC support""... $ac_c" 1>&6
echo "configure:9021: 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:9059: 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:9097: 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:9134: 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:9152: 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 9160 "configure"
#include "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:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   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:9215: 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
    echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_SYBASE_CT 1
EOF

  	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"
    old_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -L$SYBASE_CT_LIBDIR"
    echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6
echo "configure:9239: checking for netg_errstr in -ltcl" >&5
ac_lib_var=`echo tcl'_'netg_errstr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ltcl  $SYBASE_CT_LIBS  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9247 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char netg_errstr();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   SYBASE_CT_LIBS="$SYBASE_CT_LIBS -ltcl" 
else
  echo "$ac_t""no" 1>&6
 SYBASE_CT_LIBS="$SYBASE_CT_LIBS -lsybtcl" 
fi

    echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
echo "configure:9280: checking for insck__getVdate in -linsck" >&5
ac_lib_var=`echo insck'_'insck__getVdate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-linsck  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9288 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char insck__getVdate();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   SYBASE_CT_LIBS="$SYBASE_CT_LIBS -linsck" 
else
  echo "$ac_t""no" 1>&6
fi

      LDFLAGS=$old_LDFLAGS
  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:9335: 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
      # Autodetect
      for w in /usr/include /usr/local/include /usr/mysql /usr/local/mysql /opt /opt/mysql; do
        # check for plain setups
        if test -f $w/mysql.h; then
          MYSQL_INCDIR=$w
          break
        fi
        # check for "/usr/include/<packagename>" type setups
        if test -f $w/mysql/mysql.h; then
          MYSQL_INCDIR=$w/mysql
          break
        fi
        # check for "/usr/<packagename>/include" type setups
        if test -f $w/mysql/include/mysql.h; then
          MYSQL_INCDIR=$w/mysql/include
          break
        fi
      done

      for w in /usr/lib /usr/local/lib /usr/mysql /usr/local/mysql /opt /opt/mysql; do
        # check for plain setups
        if test -f $w/libmysqlclient.a -o -f $w/libmysqlclient.so; then
          MYSQL_LIBDIR=$w
          break
        fi
        # check for "/usr/lib/<packagename>" type setups
        if test -f $w/mysql/libmysqlclient.a -o -f $w/mysql/libmysqlclient.so; then
          MYSQL_LIBDIR=$w/mysql
          break
        fi
        # check for "/usr/<packagename>/lib" type setups
        if test -f $w/mysql/lib/libmysqlclient.a -o -f $w/mysql/lib/libmysqlclient.so; then
          MYSQL_LIBDIR=$w/mysql/lib
          break
        fi
      done
    else
      # Manual detection for <withval>/include/<packagename>
      # and <withval>/include.
      if test -f $withval/include/mysql/mysql.h; then
        MYSQL_INCDIR=$withval/include/mysql
      elif test -f $withval/include/mysql.h; then
        MYSQL_INCDIR=$withval/include
      fi
      
      # Manual detection for <withval>/lib/<packagename>
      # and <withval>/lib.
      if test -f $withval/lib/mysql/libmysqlclient.a -o -f $withval/lib/mysql/libmysqlclient.so; then
        MYSQL_LIBDIR=$withval/lib/mysql
      elif test -f $withval/lib/libmysqlclient.a -o -f $withval/lib/libmysqlclient.so; then
        MYSQL_LIBDIR=$withval/lib
      fi
    fi
    
    ## Did we find anything?
    if test -z "$MYSQL_LIBDIR" ; then
      echo "$ac_t""no" 1>&6
      { echo "configure: error: Invalid MySQL directory - unable to find libmysqlclient.a or libmysqlclient.so." 1>&2; exit 1; }
    fi
    if test -z "$MYSQL_INCDIR" ; then
      echo "$ac_t""no" 1>&6
      { echo "configure: error: Invalid MySQL directory - unable to find mysql.h." 1>&2; exit 1; }
    fi

    
  
  if test "$MYSQL_LIBDIR" != "/usr/lib"; then
    
  if test -z "$MYSQL_LIBDIR" || echo "$MYSQL_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$MYSQL_LIBDIR"
  else
    ai_p="`pwd`/$MYSQL_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "mysqlclient$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lmysqlclient"
  
  fi



    
  if test "$MYSQL_INCDIR" != "/usr/include"; then
    
  if test -z "$MYSQL_INCDIR" || echo "$MYSQL_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$MYSQL_INCDIR"
  else
    ai_p="`pwd`/$MYSQL_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi


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

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

        old_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -I$MYSQL_INCDIR"
    for ac_hdr in errmsg.h mysql.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9480: 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 9485 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    CPPFLAGS="$old_CPPFLAGS"
  else
  	echo "$ac_t""no" 1>&6
  fi

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

fi


echo $ac_n "checking for mSQL support""... $ac_c" 1>&6
echo "configure:9529: 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
    
  
  if test "$MSQL_LIBDIR" != "/usr/lib"; then
    
  if test -z "$MSQL_LIBDIR" || echo "$MSQL_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$MSQL_LIBDIR"
  else
    ai_p="`pwd`/$MSQL_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "msql$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lmsql"
  
  fi



    
  if test "$MSQL_INCDIR" != "/usr/include"; then
    
  if test -z "$MSQL_INCDIR" || echo "$MSQL_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$MSQL_INCDIR"
  else
    ai_p="`pwd`/$MSQL_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi


    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:9611: checking mSQL version" >&5
  ac_php_oldcflags=$CFLAGS
  CFLAGS="$INCLUDES $CFLAGS";
  cat > conftest.$ac_ext <<EOF
#line 9615 "configure"
#include "confdefs.h"
#include <sys/types.h>
#define APIENTRY
#include "msql.h"
int main() {
int i = IDX_TYPE
; return 0; }
EOF
if { (eval echo configure:9624: \"$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:9661: 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
	withval=/usr/local

    fi

    PGSQL_INCDIR=$withval/include
    test -d $withval/include/pgsql && PGSQL_INCDIR=$withval/include/pgsql
    test -d $withval/pgsql/include && PGSQL_INCDIR=$withval/pgsql/include
    test -d $withval/include/postgresql && PGSQL_INCDIR=$withval/include/postgresql
    PGSQL_LIBDIR=$withval/lib
    test -d $withval/lib/pgsql && PGSQL_LIBDIR=$withval/lib/pgsql
    test -d $withval/pgsql/lib && PGSQL_LIBDIR=$withval/pgsql/lib
    test -d $withval/lib/postgresql && PGSQL_LIBDIR=$withval/lib/postgresql

    PGSQL_INCLUDE=-I$PGSQL_INCDIR
    PGSQL_LFLAGS=-L$PGSQL_LIBDIR
    PGSQL_LIBS=-lpq
    
  
  if test "$PGSQL_LIBDIR" != "/usr/lib"; then
    
  if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$PGSQL_LIBDIR"
  else
    ai_p="`pwd`/$PGSQL_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "pq$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lpq"
  
  fi



    
  if test "$PGSQL_INCDIR" != "/usr/include"; then
    
  if test -z "$PGSQL_INCDIR" || echo "$PGSQL_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$PGSQL_INCDIR"
  else
    ai_p="`pwd`/$PGSQL_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi


    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:9756: 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 9761 "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:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 IBM DB2 support""... $ac_c" 1>&6
echo "configure:9819: checking for IBM DB2 support" >&5
# Check whether --with-ibm-db2 or --without-ibm-db2 was given.
if test "${with_ibm_db2+set}" = set; then
  withval="$with_ibm_db2"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	    IBMDB2_INCDIR=/home/db2inst1/sqllib/include
   		IBMDB2_LIBDIR=/home/db2inst1/sqllib/lib
   	else
   		IBMDB2_INCDIR=$withval/include
   		IBMDB2_LIBDIR=$withval/lib
   	fi
    IBMDB2_INCLUDE=-I$IBMDB2_INCDIR
    UODBC_DEFAULT=yes
    
  
  if test "$IBMDB2_LIBDIR" != "/usr/lib"; then
    
  if test -z "$IBMDB2_LIBDIR" || echo "$IBMDB2_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$IBMDB2_LIBDIR"
  else
    ai_p="`pwd`/$IBMDB2_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "db2$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -ldb2"
  
  fi



    
  if test "$IBMDB2_INCDIR" != "/usr/include"; then
    
  if test -z "$IBMDB2_INCDIR" || echo "$IBMDB2_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$IBMDB2_INCDIR"
  else
    ai_p="`pwd`/$IBMDB2_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi


    cat >> confdefs.h <<\EOF
#define HAVE_IBMDB2 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 Solid support""... $ac_c" 1>&6
echo "configure:9914: 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:9949: 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/scl2x${ac_solid_os}*.a | cut -d' ' -f1`
  fi
  if test ! -f $SOLID_LIBS; then
    SOLID_LIBS=`echo $SOLID_LIBDIR/scl2x${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
  if test ! -f $SOLID_LIBS; then
    SOLID_LIBS="-L$SOLID_LIBDIR -lsolcli"
  fi
  echo "$ac_t""`echo $SOLID_LIBS | sed -e 's!.*/!!'`" 1>&6
  
  echo $ac_n "checking whether Solid needs pthreads""... $ac_c" 1>&6
echo "configure:9982: checking whether Solid needs pthreads" >&5
  save_LIBS=$LIBS
  LIBS="$SOLID_LIBS"
  cat > conftest.$ac_ext <<EOF
#line 9986 "configure"
#include "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 SQLAllocEnv();

int main() {
SQLAllocEnv()
; return 0; }
EOF
if { (eval echo configure:9997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LIBS="$save_LIBS"
                    echo "$ac_t""no" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="-lpthread $save_LIBS"
                    echo "$ac_t""yes" 1>&6
fi
rm -f conftest*


fi




echo $ac_n "checking for Empress support""... $ac_c" 1>&6
echo "configure:10017: checking for Empress support" >&5
# Check whether --with-empress or --without-empress was given.
if test "${with_empress+set}" = set; then
  withval="$with_empress"
  
  if test "$withval" != "no"; then
        if test "$withval" = "yes"; then
                EMPRESS_INCDIR=$EMPRESSPATH/odbccl/include
                EMPRESS_LIBDIR=$EMPRESSPATH/odbccl/lib
        else
                EMPRESS_INCDIR=$withval/include
                EMPRESS_LIBDIR=$withval/lib
        fi
    EMPRESS_INCLUDE=-I$EMPRESS_INCDIR
    UODBC_DEFAULT=yes

    cat >> confdefs.h <<\EOF
#define HAVE_EMPRESS 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 "$EMPRESS_LIBDIR" != ""; then
  
  echo $ac_n "checking Empress library file""... $ac_c" 1>&6
echo "configure:10052: checking Empress library file" >&5
  EMPRESS_LIBS=`echo $EMPRESS_LIBDIR/empodbc.so | cut -d' ' -f1`
  if test ! -f $EMPRESS_LIBS; then
    EMPRESS_LIBS=`echo $EMPRESS_LIBDIR/empodbc.a | cut -d' ' -f1`
  fi
  echo "$ac_t""`echo $EMPRESS_LIBS | sed -e 's!.*/!!'`" 1>&6

fi




echo $ac_n "checking for LDAP support""... $ac_c" 1>&6
echo "configure:10065: 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
		if test -f /usr/include/ldap.h; then
			LDAP_INCDIR=/usr/include
			LDAP_LIBDIR=/usr/lib
		elif test -f /usr/local/include/ldap.h; then
			LDAP_INCDIR=/usr/local/include
			LDAP_LIBDIR=/usr/local/lib
		else
    		echo "$ac_t""no" 1>&6
    		{ echo "configure: error: Unable to find ldap.h" 1>&2; exit 1; }
		fi
   	else
		if test -f $withval/include/ldap.h; then
			LDAP_INCDIR=$withval/include
			LDAP_LIBDIR=$withval/lib
		else
    		echo "$ac_t""no" 1>&6
    		{ echo "configure: error: Unable to find $withval/include/ldap.h" 1>&2; exit 1; }
		fi
   	fi


	if test `uname` = "Linux"; then
		LDAP_PTHREAD="pthread"
	else
		LDAP_PTHREAD=
	fi

	if test -f $LDAP_LIBDIR/liblber.a; then
        
  
  unique=`echo $ac_n "ldap$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lldap"
  
  fi


        
  
  unique=`echo $ac_n "lber$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -llber"
  
  fi


	elif test -f $LDAP_LIBDIR/libldapssl30.so; then
        
  
  unique=`echo $ac_n "ldapssl30$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lldapssl30"
  
  fi


        
  
  unique=`echo $ac_n "$LDAP_PTHREAD$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$LDAP_PTHREAD"
  
  fi


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

	elif test -f $LDAP_LIBDIR/libldapssl30.sl; then
		
  
  unique=`echo $ac_n "ldapssl30$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lldapssl30"
  
  fi


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

	elif test -f $LDAP_LIBDIR/libldap30.so; then
		
  
  unique=`echo $ac_n "ldap30$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lldap30"
  
  fi


        
  
  unique=`echo $ac_n "$LDAP_PTHREAD$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$LDAP_PTHREAD"
  
  fi


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

	elif test -f $LDAP_LIBDIR/libldap30.sl; then
        
  
  unique=`echo $ac_n "ldap30$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lldap30"
  
  fi


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

	fi

    
  if test "$LDAP_LIBDIR" != "/usr/lib"; then
    
  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$LDAP_LIBDIR"
  else
    ai_p="`pwd`/$LDAP_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

    
  if test "$LDAP_INCDIR" != "/usr/include"; then
    
  if test -z "$LDAP_INCDIR" || echo "$LDAP_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$LDAP_INCDIR"
  else
    ai_p="`pwd`/$LDAP_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi


    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 Cybercash MCK support""... $ac_c" 1>&6
echo "configure:10284: checking for Cybercash MCK support" >&5
# Check whether --with-mck or --without-mck was given.
if test "${with_mck+set}" = set; then
  withval="$with_mck"
  
  if test "$withval" != "no"; then
       if test "$withval" = "yes"; then
          MCK_INCDIR=/usr/src/mck-3.2.0.3-linux/c-api
          MCK_LIBDIR=/usr/src/mck-3.2.0.3-linux/c-api/lib
       else
          MCK_INCDIR=$withval/c-api
          MCK_LIBDIR=$withval/c-api/lib
       fi
    
  
  if test "$MCK_LIBDIR" != "/usr/lib"; then
    
  if test -z "$MCK_LIBDIR" || echo "$MCK_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$MCK_LIBDIR"
  else
    ai_p="`pwd`/$MCK_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "mckcrypto$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lmckcrypto"
  
  fi



    
  if test "$MCK_INCDIR" != "/usr/include"; then
    
  if test -z "$MCK_INCDIR" || echo "$MCK_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$MCK_INCDIR"
  else
    ai_p="`pwd`/$MCK_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi


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


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

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

fi






# Check whether --with-openssl or --without-openssl was given.
if test "${with_openssl+set}" = set; then
  withval="$with_openssl"
  
  PHP_OPENSSL=$withval

else
  
  PHP_OPENSSL=no

fi




echo $ac_n "checking for SNMP support""... $ac_c" 1>&6
echo "configure:10396: checking for SNMP support" >&5
# Check whether --with-snmp or --without-snmp was given.
if test "${with_snmp+set}" = set; then
  withval="$with_snmp"
  
  case $withval in
    shared)
      shared=yes
      withval=yes
      ;;
    shared,*)
      shared=yes
      withval=`echo $withval | sed -e 's/^shared,//'`      
      ;;
    *)
      shared=no
      ;;
  esac
  if test "$withval" != "no"; then
    if test "$withval" = "yes"; then
      SNMP_INCDIR=/usr/local/include
      SNMP_LIBDIR=/usr/local/lib
      test -f /usr/local/include/ucd-snmp/snmp.h && SNMP_INCDIR=/usr/local/include/ucd-snmp
	  test -f /usr/include/ucd-snmp/snmp.h && SNMP_INCDIR=/usr/include/ucd-snmp
	  test -f /usr/include/snmp/snmp.h && SNMP_INCDIR=/usr/include/snmp
	  test -f /usr/include/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=/usr/include/snmp/include/ucd-snmp
	  test -f /usr/lib/libsnmp.a && SNMP_LIBDIR=/usr/lib
	  test -f /usr/lib/libsnmp.so && SNMP_LIBDIR=/usr/lib
	  test -f /usr/local/lib/libsnmp.a && SNMP_LIBDIR=/usr/local/lib
	  test -f /usr/local/lib/libsnmp.so && SNMP_LIBDIR=/usr/local/lib
	  test -f /usr/local/snmp/lib/libsnmp.a && SNMP_LIBDIR=/usr/local/snmp/lib
	  test -f /usr/local/snmp/lib/libsnmp.so && SNMP_LIBDIR=/usr/local/snmp/lib
    else
      SNMP_INCDIR=$withval/include
      test -d $withval/include/ucd-snmp && SNMP_INCDIR=$withval/include/ucd-snmp
      SNMP_LIBDIR=$withval/lib
    fi
    cat >> confdefs.h <<\EOF
#define HAVE_SNMP 1
EOF

    if test "$shared" = "yes"; then
      echo "$ac_t""yes (shared)" 1>&6
      SNMP_INCLUDE="-I$SNMP_INCDIR"
      SNMP_SHARED="snmp.la"
    else
      echo "$ac_t""yes (static)" 1>&6
      
  
  if test "$SNMP_LIBDIR" != "/usr/lib"; then
    
  if test -z "$SNMP_LIBDIR" || echo "$SNMP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p="$SNMP_LIBDIR"
  else
    ai_p="`pwd`/$SNMP_LIBDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "snmp$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lsnmp"
  
  fi



      
  if test "$SNMP_INCDIR" != "/usr/include"; then
    
  if test -z "$SNMP_INCDIR" || echo "$SNMP_INCDIR" | grep '^/' >/dev/null ; then
    ai_p="$SNMP_INCDIR"
  else
    ai_p="`pwd`/$SNMP_INCDIR"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

      SNMP_STATIC="libphpext_snmp.la"
    fi
	old_CPPFLAGS="$CPPFLAGS"
	CPPFLAGS="$INCLUDES $CPPFLAGS"
	for ac_hdr in default_store.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10512: 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 10517 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:10522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

	if test "$ac_cv_header_default_store_h" = "yes"; then
				if test "$cross_compiling" = yes; then
  
			SNMP_SSL=no
		
else
  cat > conftest.$ac_ext <<EOF
#line 10555 "configure"
#include "confdefs.h"

#include <ucd-snmp-config.h>
main() { exit(USE_OPENSSL != 1); }
		
EOF
if { (eval echo configure:10562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
			SNMP_SSL=yes
		
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
			SNMP_SSL=no
		
fi
rm -fr conftest*
fi

		if test "$SNMP_SSL" = "yes"; then
			
  for i in /usr/local/ssl /usr/local /usr /usr/local/openssl $PHP_OPENSSL; do
    if test -r $i/include/openssl/evp.h; then
      OPENSSL_DIR=$i
      OPENSSL_INC=$i/include/openssl
    elif test -r $i/include/evp.h; then
      OPENSSL_DIR=$i
      OPENSSL_INC=$i/include
    fi
  done

  echo $ac_n "checking for OpenSSL""... $ac_c" 1>&6
echo "configure:10591: checking for OpenSSL" >&5

  if test -z "$OPENSSL_DIR"; then
    { echo "configure: error: Cannot find OpenSSL's <evp.h>" 1>&2; exit 1; }
  fi

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

  
  if test "$OPENSSL_DIR/lib" != "/usr/lib"; then
    
  if test -z "$OPENSSL_DIR/lib" || echo "$OPENSSL_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$OPENSSL_DIR/lib"
  else
    ai_p="`pwd`/$OPENSSL_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "ssl$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lssl"
  
  fi


  
  
  unique=`echo $ac_n "crypto$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lcrypto"
  
  fi


  
  if test "$OPENSSL_INC" != "/usr/include"; then
    
  if test -z "$OPENSSL_INC" || echo "$OPENSSL_INC" | grep '^/' >/dev/null ; then
    ai_p="$OPENSSL_INC"
  else
    ai_p="`pwd`/$OPENSSL_INC"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi


		fi
	fi
	CPPFLAGS="$old_CPPFLAGS"
	
	echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6
echo "configure:10676: checking for kstat_read in -lkstat" >&5
ac_lib_var=`echo kstat'_'kstat_read | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lkstat  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10684 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char kstat_read();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
	  if test "$shared" = yes; then
	    KSTAT_LIBS="-lkstat"
	  else 
	    
  
  unique=`echo $ac_n "kstat$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lkstat"
  
  fi


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

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

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

fi





echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6
echo "configure:10747: checking whether to enable UCD SNMP hack" >&5
# Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given.
if test "${enable_ucd_snmp_hack+set}" = set; then
  enableval="$enable_ucd_snmp_hack"
  
  if test "$enableval" = "yes" ; then
    cat >> confdefs.h <<\EOF
#define UCD_SNMP_HACK 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:10771: 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:10819: 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."
			IFX_C_MAKE='touch functions/ifx.c'
			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"

		    if test "`uname -s 2>/dev/null`" = "AIX"; then
				CFLAGS="$CFLAGS -D__H_LOCALEDEF"
			fi
			cat >> confdefs.h <<\EOF
#define HAVE_IFX 1
EOF

			echo $ac_n "checking Informix version""... $ac_c" 1>&6
echo "configure:10866: 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
		IFX_C_MAKE="(esql -e $IFX_ESQL_FLAGS functions/ifx.ec; mv ifx.c functions)"
		fi
	else
		INFORMIXDIR=
		IFX_C_MAKE='touch functions/ifx.c'
		echo "$ac_t""no" 1>&6
	fi

else
  
  IFX_C_MAKE='touch functions/ifx.c'
  echo "$ac_t""no" 1>&6

fi







echo $ac_n "checking for InterBase support""... $ac_c" 1>&6
echo "configure:10905: checking for InterBase support" >&5
# Check whether --with-interbase or --without-interbase was given.
if test "${with_interbase+set}" = set; then
  withval="$with_interbase"
  
  if test "$withval" != "no"; then
  	if test "$withval" = "yes"; then
	   	IBASE_INCDIR=/usr/interbase/include
   		IBASE_LIBDIR=/usr/interbase/lib
   	else
   		IBASE_INCDIR=$withval/include
   		IBASE_LIBDIR=$withval/lib
   	fi
    IBASE_INCLUDE=-I$IBASE_INCDIR
    IBASE_LFLAGS=-L$IBASE_LIBDIR
    IBASE_LIBS="-lgds"

    cat >> confdefs.h <<\EOF
#define HAVE_IBASE 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 a custom ODBC support""... $ac_c" 1>&6
echo "configure:10943: 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:10981: 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 for XML support""... $ac_c" 1>&6
echo "configure:11012: checking for XML support" >&5
# Check whether --with-xml or --without-xml was given.
if test "${with_xml+set}" = set; then
  withval="$with_xml"
  
  if test "$withval" != "no" ; then
    for i in $withval /usr /usr/local; do
      if test -f "$i/include/xml/xmltok.h" ; then
        XML_DIR=$i
        XML_INCLUDE="$i/include"
        XML_LIB="$i/lib"
      fi
    done
    if test "$XML_DIR" = "" ; then
      if test -n "$APACHE_WITHVAL"; then
        if test -f "$APACHE_WITHVAL/src/lib/expat-lite/xmltok.h"; then
          XML_DIR=$APACHE_WITHVAL
          XML_INCLUDE="$APACHE_WITHVAL/src/lib/expat-lite"
          cat >> confdefs.h <<\EOF
#define RAW_XML_INCLUDEPATH 1
EOF

        fi
      fi
    fi
    if test -n "$APXS"; then
        i="`$APXS -q INCLUDEDIR`"
        if test -f "$i/xml/xmltok.h"; then
            XML_DIR=$i
            XML_INCLUDE=$i
        fi
    fi
    if test "$XML_DIR" = "" ; then
      { echo "configure: error: cannot find XML include files" 1>&2; exit 1; }
    fi

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

    echo "$ac_t""yes" 1>&6
    if test "$XML_LIB" != ""; then
        
  
  if test "$XML_LIB" != "/usr/lib"; then
    
  if test -z "$XML_LIB" || echo "$XML_LIB" | grep '^/' >/dev/null ; then
    ai_p="$XML_LIB"
  else
    ai_p="`pwd`/$XML_LIB"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "expat$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lexpat"
  
  fi



    fi
    
  if test "$XML_INCLUDE" != "/usr/include"; then
    
  if test -z "$XML_INCLUDE" || echo "$XML_INCLUDE" | grep '^/' >/dev/null ; then
    ai_p="$XML_INCLUDE"
  else
    ai_p="`pwd`/$XML_INCLUDE"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

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

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

fi
 

echo $ac_n "checking whether to include YP support""... $ac_c" 1>&6
echo "configure:11128: checking whether to include YP support" >&5
# Check whether --with-yp or --without-yp was given.
if test "${with_yp+set}" = set; then
  withval="$with_yp"
  
	if test "$withval" = "yes"; then
		echo "$ac_t""yes" 1>&6
		cat >> confdefs.h <<\EOF
#define HAVE_YP 1
EOF

		if test `uname` = "SunOS";then
			release=`uname -r`
			case "$release" in
				5*)
					cat >> confdefs.h <<\EOF
#define SOLARIS_YP 1
EOF

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

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

fi


echo $ac_n "checking whether to include zlib support""... $ac_c" 1>&6
echo "configure:11164: 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:11175: 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 11183 "configure"
#include "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:11194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_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
        old_LIBS=$LIBS
        LIBS="$LIBS -L$withval/lib"
        echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6
echo "configure:11226: 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 11234 "configure"
#include "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:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_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

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

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

fi





echo $ac_n "checking whether to include pdflib support""... $ac_c" 1>&6
echo "configure:11286: checking whether to include pdflib support" >&5
# Check whether --with-pdflib or --without-pdflib was given.
if test "${with_pdflib+set}" = set; then
  withval="$with_pdflib"
  
  case "$withval" in
    no)
      echo "$ac_t""no" 1>&6 ;;
    yes)
      LIBS="$LIBS -L/usr/local/lib $ZLIB_LIBS -ltiff -lz"
      echo "$ac_t""yes" 1>&6
      echo "configure: warning: !!!!! Note for pdflib 0.6 !!!!!" 1>&2
      echo "configure: warning: In order to ensure the pdf module works correctly" 1>&2
      echo "configure: warning: modify the pdflib distribution. Take out line 190 in" 1>&2
      echo "configure: warning: file p_basic.c which closes the pdf file. Read the php3" 1>&2
      echo "configure: warning: documentation for more information." 1>&2
      echo $ac_n "checking for PDF_close in -lpdf""... $ac_c" 1>&6
echo "configure:11303: checking for PDF_close in -lpdf" >&5
ac_lib_var=`echo pdf'_'PDF_close | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpdf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11311 "configure"
#include "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 PDF_close();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_PDFLIB 1
EOF
 PDFLIB_LIBS="-L/usr/local/lib -lpdf" PDFLIB_INCLUDE="-I/usr/local/include"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: pdflib module requires at least pdflib 0.6" 1>&2; exit 1; }
fi

      echo $ac_n "checking for PDF_new in -lpdf""... $ac_c" 1>&6
echo "configure:11347: checking for PDF_new in -lpdf" >&5
ac_lib_var=`echo pdf'_'PDF_new | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpdf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11355 "configure"
#include "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 PDF_new();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_PDFLIB2 1
EOF
 PDFLIB_LIBS="-L/usr/local/lib $ZLIB_LIBS -lpdf -ltiff -lz" PDFLIB_INCLUDE="-I/usr/local/include"
else
  echo "$ac_t""no" 1>&6
echo "configure: warning: No pdflib 2.0 support. Consider an update." 1>&2
fi

      LIBS=$old_LIBS;;
    *)
      test -d $withval/include && PDFLIB_INCLUDE="-I$withval/include"
      if test -f $withval/include/pdf.h ; then
        echo "$ac_t""yes" 1>&6
        echo "configure: warning: !!!!! Note for pdflib 0.6 !!!!!" 1>&2
        echo "configure: warning: In order to ensure the pdf module works correctly" 1>&2
        echo "configure: warning: modify the pdflib distribution. Take out line 190 in" 1>&2
        echo "configure: warning: file p_basic.c which closes the pdf file. Read" 1>&2
        echo "configure: warning: the php3 documentation for more information." 1>&2
        old_LIBS=$LIBS
        LIBS="$LIBS -L$withval/lib"
        echo $ac_n "checking for PDF_open in -lpdf""... $ac_c" 1>&6
echo "configure:11403: checking for PDF_open in -lpdf" >&5
ac_lib_var=`echo pdf'_'PDF_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="-lpdf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11411 "configure"
#include "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 PDF_open();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_PDFLIB 1
EOF
 PDFLIB_LIBS="-L$withval/lib -lpdf"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: pdflib module requires at least pdflib 0.6." 1>&2; exit 1; }
fi

        LIBS=$old_LIBS
      else
        if test -f $withval/include/pdflib.h ; then
          old_LIBS=$LIBS
          echo "$ac_t""yes" 1>&6

          old_withval=$withval
          if test -z $ZLIB_LIBS; then
          echo $ac_n "checking for zlib (needed by pdflib 2.0)""... $ac_c" 1>&6
echo "configure:11455: checking for zlib (needed by pdflib 2.0)" >&5
          # Check whether --with-zlib-dir or --without-zlib-dir was given.
if test "${with_zlib_dir+set}" = set; then
  withval="$with_zlib_dir"
  
            echo "$ac_t""" 1>&6
            if test -z $withval; then
              withval="/usr/local"
            fi
            LIBS="$LIBS -L$withval/lib -lz"
            echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
echo "configure:11466: checking for deflate in -lz" >&5
ac_lib_var=`echo z'_'deflate | 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 11474 "configure"
#include "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 deflate();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  PDFLIB_LIBS="-L$withval/lib -lz"
else
  echo "$ac_t""no" 1>&6
echo "$ac_t""no" 1>&6
fi

          
else
  
            echo "$ac_t""no" 1>&6
            echo "configure: warning: If configure fails try --with-zlib=<DIR>" 1>&2
          
fi
 
          else
          echo "checking for libz needed by pdflib 2.0... already zlib support"
          PDFLIB_LIBS="$ZLIB_LIBS"
          LIBS="$LIBS $ZLIB_LIBS"
          fi

          echo $ac_n "checking for libjpeg (needed by pdflib 2.0)""... $ac_c" 1>&6
echo "configure:11521: checking for libjpeg (needed by pdflib 2.0)" >&5
          # Check whether --with-jpeg-dir or --without-jpeg-dir was given.
if test "${with_jpeg_dir+set}" = set; then
  withval="$with_jpeg_dir"
  
            echo "$ac_t""yes" 1>&6
            if test -z $withval; then
              withval="/usr/local"
            fi
            LIBS="$LIBS -L$withval/lib -ljpeg"
            echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
echo "configure:11532: checking for jpeg_read_header in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ljpeg  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11540 "configure"
#include "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 jpeg_read_header();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -ljpeg"
else
  echo "$ac_t""no" 1>&6
echo "$ac_t""no" 1>&6
fi

          
else
  
            echo "$ac_t""no" 1>&6
            echo "configure: warning: If configure fails try --with-jpeg-dir=<DIR>" 1>&2
          
fi
 
          withval=$old_withval

          echo $ac_n "checking for libtiff (needed by pdflib 2.0)""... $ac_c" 1>&6
echo "configure:11583: checking for libtiff (needed by pdflib 2.0)" >&5
          # Check whether --with-tiff-dir or --without-tiff-dir was given.
if test "${with_tiff_dir+set}" = set; then
  withval="$with_tiff_dir"
  
            echo "$ac_t""yes" 1>&6
            if test -z $withval; then
              withval="/usr/local"
            fi
            LIBS="$LIBS -L$withval/lib -ltiff"
            echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
echo "configure:11594: checking for TIFFOpen in -ltiff" >&5
ac_lib_var=`echo tiff'_'TIFFOpen | 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="-ltiff  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11602 "configure"
#include "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 TIFFOpen();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -ltiff"
else
  echo "$ac_t""no" 1>&6
echo "$ac_t""no" 1>&6
fi

          
else
  
            echo "$ac_t""no" 1>&6
            echo "configure: warning: If configure fails try --with-tiff-dir=<DIR>" 1>&2
          
fi
 
          withval=$old_withval

          LIBS="$LIBS -L$withval/lib"
          echo $ac_n "checking for PDF_new in -lpdf""... $ac_c" 1>&6
echo "configure:11646: checking for PDF_new in -lpdf" >&5
ac_lib_var=`echo pdf'_'PDF_new | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpdf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11654 "configure"
#include "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 PDF_new();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_PDFLIB 1
EOF
 cat >> confdefs.h <<\EOF
#define HAVE_PDFLIB2 1
EOF
 PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -lpdf"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Check if zlib libjpeg and libtiff has been found.  If not specify --with-zlib-dir=<DIR> --with-jpeg-dir=<DIR> and --with-tiff-dir=<DIR>." 1>&2; exit 1; }
fi

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

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

fi





echo $ac_n "checking whether to include cpdflib support""... $ac_c" 1>&6
echo "configure:11710: checking whether to include cpdflib support" >&5
# Check whether --with-cpdflib or --without-cpdflib was given.
if test "${with_cpdflib+set}" = set; then
  withval="$with_cpdflib"
  
  case "$withval" in
    no)
      echo "$ac_t""no" 1>&6 ;;
    yes)
      echo "$ac_t""yes" 1>&6
      echo $ac_n "checking for cpdf_open in -lcpdf""... $ac_c" 1>&6
echo "configure:11721: checking for cpdf_open in -lcpdf" >&5
ac_lib_var=`echo cpdf'_'cpdf_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="-lcpdf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11729 "configure"
#include "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 cpdf_open();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_CPDFLIB 1
EOF
 CPDFLIB_LIBS="-lcpdf"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: cpdflib module requires cpdflib" 1>&2; exit 1; }
fi
 ;;
    *)
      test -f $withval/include/cpdflib.h && CPDFLIB_INCLUDE="-I$withval/include"
      if test -n "$CPDFLIB_INCLUDE" ; then
        echo "$ac_t""yes" 1>&6
        old_LIBS=$LIBS
        LIBS="$LIBS -L$withval/lib"
        echo $ac_n "checking for cpdf_open in -lcpdf""... $ac_c" 1>&6
echo "configure:11771: checking for cpdf_open in -lcpdf" >&5
ac_lib_var=`echo cpdf'_'cpdf_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="-lcpdf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11779 "configure"
#include "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 cpdf_open();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_CPDFLIB 1
EOF
 CPDFLIB_LIBS="-L$withval/lib -lcpdf"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: cpdflib module requires cpdflib" 1>&2; exit 1; }
fi

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

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

fi





echo $ac_n "checking whether to include fdftk support""... $ac_c" 1>&6
echo "configure:11831: checking whether to include fdftk support" >&5
# Check whether --with-fdftk or --without-fdftk was given.
if test "${with_fdftk+set}" = set; then
  withval="$with_fdftk"
  
  case "$withval" in
    no)
      echo "$ac_t""no" 1>&6 ;;
    yes)
      echo "$ac_t""yes" 1>&6
      echo $ac_n "checking for FDFOpen in -lFdfTk""... $ac_c" 1>&6
echo "configure:11842: checking for FDFOpen in -lFdfTk" >&5
ac_lib_var=`echo FdfTk'_'FDFOpen | 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="-lFdfTk  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11850 "configure"
#include "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 FDFOpen();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_FDFLIB 1
EOF
 FDFLIB_LIBS="-lFdfTk"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: fdftk module requires fdftk 2.0" 1>&2; exit 1; }
fi
 ;;
    *)
      test -f $withval/include/FdfTk.h && FDFLIB_INCLUDE="-I$withval/include"
      if test -n "$FDFLIB_INCLUDE" ; then
        echo "$ac_t""yes" 1>&6
        old_LIBS=$LIBS
        LIBS="$LIBS -L$withval/lib"
        echo $ac_n "checking for FDFOpen in -lFdfTk""... $ac_c" 1>&6
echo "configure:11892: checking for FDFOpen in -lFdfTk" >&5
ac_lib_var=`echo FdfTk'_'FDFOpen | 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="-lFdfTk  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11900 "configure"
#include "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 FDFOpen();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_FDFLIB 1
EOF
 FDFLIB_LIBS="-L$withval/lib -lFdfTk"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: fdftk module requires ftftk lib 2.0." 1>&2; exit 1; }
fi

        LIBS=$old_LIBS
      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:11952: 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
	DBASE_LIBS="-L./dbase -ldbf"
	DBASE_OBJS="\$(DBF_OBJS)"
  else
	echo "$ac_t""no" 1>&6
	cat >> confdefs.h <<\EOF
#define DBASE 0
EOF

	DBASE_LIB=
	DBASE_OBJS=
  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:11992: 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 DAV support through mod_dav""... $ac_c" 1>&6
echo "configure:12024: checking whether to enable DAV support through mod_dav" >&5
# Check whether --with-mod-dav or --without-mod-dav was given.
if test "${with_mod_dav+set}" = set; then
  withval="$with_mod_dav"
  
  if test "$withval" = "yes"; then
    { echo "configure: error: Must give parameter to --with-mod-dav!" 1>&2; exit 1; }
  else
    if test "$withval" != "no"; then
      echo "$ac_t""yes" 1>&6
      cat >> confdefs.h <<\EOF
#define HAVE_MOD_DAV 1
EOF

      MOD_DAV_CFLAGS="-DHAVE_MOD_DAV -I$withval"
      APACHE_INCLUDE="$APACHE_INCLUDE -I$withval"
    else
      echo "$ac_t""no" 1>&6
      cat >> confdefs.h <<\EOF
#define HAVE_MOD_DAV 0
EOF

    fi
  fi

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


fi



echo $ac_n "checking whether to enable unified ODBC support""... $ac_c" 1>&6
echo "configure:12062: 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:12120: 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:12176: 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:12219: 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:12251: 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 PHP's own SIGCHLD handler""... $ac_c" 1>&6
echo "configure:12291: checking whether to enable PHP's own SIGCHLD handler" >&5
# Check whether --enable-sigchild or --disable-sigchild was given.
if test "${enable_sigchild+set}" = set; then
  enableval="$enable_sigchild"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define PHP_SIGCHILD 1
EOF

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

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

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

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

fi
 

echo $ac_n "checking whether to enable track_vars variables by default""... $ac_c" 1>&6
echo "configure:12322: 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:12354: 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:12386: 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:12419: 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:12455: 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:12489: 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:12524: 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:12555: 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:12586: 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


echo $ac_n "checking whether to enable System V semaphore support""... $ac_c" 1>&6
echo "configure:12617: checking whether to enable System V semaphore support" >&5
# Check whether --enable-sysvsem or --disable-sysvsem was given.
if test "${enable_sysvsem+set}" = set; then
  enableval="$enable_sysvsem"
  
  if test "$enableval" = "yes"; then
    echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_SYSVSEM 1
EOF

    echo $ac_n "checking for union semun""... $ac_c" 1>&6
echo "configure:12629: checking for union semun" >&5
if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12634 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
			
int main() {
union semun x;
; return 0; }
EOF
if { (eval echo configure:12645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
				php_cv_semun=yes
			
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
				php_cv_semun=no
			
fi
rm -f conftest*
		
fi

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

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

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

  fi

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


fi



echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6
echo "configure:12695: checking whether to enable System V shared memory support" >&5
# Check whether --enable-sysvshm or --disable-sysvshm was given.
if test "${enable_sysvshm+set}" = set; then
  enableval="$enable_sysvshm"
  
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_SYSVSHM 1
EOF

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

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

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

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

fi
 

echo $ac_n "checking whether to enable displaying source support""... $ac_c" 1>&6
echo "configure:12726: checking whether to enable displaying source support" >&5
# Check whether --enable-display-source or --disable-display-source was given.
if test "${enable_display_source+set}" = set; then
  enableval="$enable_display_source"
  
   if test "$enableval" = "yes"; then
     cat >> confdefs.h <<\EOF
#define HAVE_DISPLAY_SOURCE 1
EOF

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

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

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

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

fi


# Check whether --with-gdbm or --without-gdbm was given.
if test "${with_gdbm+set}" = set; then
  withval="$with_gdbm"
  
  if test "$withval" != "no"; then
    for i in /usr/local /usr $withval; do
      if test -f "$i/include/gdbm.h"; then
        THIS_PREFIX="$i"
      fi
    done

    unset ac_cv_lib_gdbm_gdbm_open
    
  old_LDFLAGS="$LDFLAGS"
  LDFLAGS="-L$THIS_PREFIX/lib $LDFLAGS"
  
    echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
echo "configure:12773: 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 12781 "configure"
#include "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:12792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define DBA_GDBM 1
EOF
 THIS_LIBS="gdbm"
else
  echo "$ac_t""no" 1>&6
fi

    
  LDFLAGS="$old_LDFLAGS"

    
    
  if test "$THIS_PREFIX" != "" -a "$THIS_PREFIX" != "/usr"; then
    THIS_INCLUDE="$THIS_PREFIX/include"
    THIS_LFLAGS="$THIS_PREFIX/lib"
  fi

    
  THIS_RESULT="yes"
  if test "$THIS_PREFIX" != "/usr"; then
  if test "$THIS_INCLUDE" = "" ; then
    { echo "configure: error: cannot find necessary header file(s)" 1>&2; exit 1; }
  elif test "$THIS_LIBS" = "" ; then
    { echo "configure: error: cannot find necessary library" 1>&2; exit 1; }
  fi
  fi

    
  
  if test "$THIS_INCLUDE" != "/usr/include"; then
    
  if test -z "$THIS_INCLUDE" || echo "$THIS_INCLUDE" | grep '^/' >/dev/null ; then
    ai_p="$THIS_INCLUDE"
  else
    ai_p="`pwd`/$THIS_INCLUDE"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

  
  
  if test "$THIS_LFLAGS" != "/usr/lib"; then
    
  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p="$THIS_LFLAGS"
  else
    ai_p="`pwd`/$THIS_LFLAGS"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "$THIS_LIBS$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$THIS_LIBS"
  
  fi




  THIS_INCLUDE=""
  THIS_LIBS=""
  THIS_LFLAGS=""
  THIS_PREFIX=""

  fi

fi

echo $ac_n "checking for GDBM support""... $ac_c" 1>&6
echo "configure:12908: checking for GDBM support" >&5

  if test "$THIS_RESULT" = "yes"; then
    HAVE_DBA=1
    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  THIS_RESULT=""


# Check whether --with-ndbm or --without-ndbm was given.
if test "${with_ndbm+set}" = set; then
  withval="$with_ndbm"
  
  if test "$withval" != "no"; then
    for i in /usr/local /usr $withval; do
      if test -f "$i/include/db1/ndbm.h" ; then
        THIS_PREFIX="$i"
        NDBM_EXTRA="NDBM_DB1_NDBM_H"
      elif test -f "$i/include/ndbm.h" ; then
        THIS_PREFIX="$i"
        NDBM_EXTRA="NDBM_NDBM_H"
      fi
	done
    
    if test "$NDBM_EXTRA" != ""; then
      eval "cat >> confdefs.h <<\EOF
#define $NDBM_EXTRA 1
EOF
"
    fi

    for LIB in db1 ndbm c; do
      
  old_LDFLAGS="$LDFLAGS"
  LDFLAGS="-L$THIS_PREFIX/lib $LDFLAGS"
  
      echo $ac_n "checking for dbm_open in -l$LIB""... $ac_c" 1>&6
echo "configure:12947: checking for dbm_open in -l$LIB" >&5
ac_lib_var=`echo $LIB'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-l$LIB  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 12955 "configure"
#include "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:12966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define DBA_NDBM 1
EOF
 THIS_LIBS="$LIB"
else
  echo "$ac_t""no" 1>&6
fi

      
  LDFLAGS="$old_LDFLAGS"

    done
    
    
  if test "$THIS_PREFIX" != "" -a "$THIS_PREFIX" != "/usr"; then
    THIS_INCLUDE="$THIS_PREFIX/include"
    THIS_LFLAGS="$THIS_PREFIX/lib"
  fi

    
  THIS_RESULT="yes"
  if test "$THIS_PREFIX" != "/usr"; then
  if test "$THIS_INCLUDE" = "" ; then
    { echo "configure: error: cannot find necessary header file(s)" 1>&2; exit 1; }
  elif test "$THIS_LIBS" = "" ; then
    { echo "configure: error: cannot find necessary library" 1>&2; exit 1; }
  fi
  fi

    
  
  if test "$THIS_INCLUDE" != "/usr/include"; then
    
  if test -z "$THIS_INCLUDE" || echo "$THIS_INCLUDE" | grep '^/' >/dev/null ; then
    ai_p="$THIS_INCLUDE"
  else
    ai_p="`pwd`/$THIS_INCLUDE"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

  
  
  if test "$THIS_LFLAGS" != "/usr/lib"; then
    
  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p="$THIS_LFLAGS"
  else
    ai_p="`pwd`/$THIS_LFLAGS"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "$THIS_LIBS$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$THIS_LIBS"
  
  fi




  THIS_INCLUDE=""
  THIS_LIBS=""
  THIS_LFLAGS=""
  THIS_PREFIX=""

  fi

fi

echo $ac_n "checking for NDBM support""... $ac_c" 1>&6
echo "configure:13083: checking for NDBM support" >&5

  if test "$THIS_RESULT" = "yes"; then
    HAVE_DBA=1
    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  THIS_RESULT=""


# Check whether --with-db2 or --without-db2 was given.
if test "${with_db2+set}" = set; then
  withval="$with_db2"
  
  if test "$withval" != "no"; then
    for i in /usr/local /usr /usr/BerkeleyDB $withval; do
      if test -f "$i/db2/db.h"; then
        THIS_PREFIX="$i"
        DB2_EXTRA="db2"
      elif test -f "$i/include/db2/db.h"; then
        THIS_PREFIX="$i"
        DB2_EXTRA="DB2_DB2_DB_H"
      elif test -f "$i/include/db/db2.h"; then
        THIS_PREFIX="$i"
        DB2_EXTRA="DB2_DB_DB2_H"
      elif test -f "$i/include/db2.h"; then
        THIS_PREFIX="$i"
        DB2_EXTRA="DB2_DB2_H"
      elif test -f "$i/include/db.h" ; then
        THIS_PREFIX="$i"
        DB2_EXTRA="DB2_DB_H"
      fi
	done

    if test "$DB2_EXTRA" = "db2" ; then
      DBA_INCLUDE="$DBA_INCLUDE -I$THIS_PREFIX/db2"
      DB2_EXTRA="DB2_DB_H"
    fi
    
    if test "$DB2_EXTRA" != ""; then
      eval "cat >> confdefs.h <<\EOF
#define $DB2_EXTRA 1
EOF
"
    fi

    for LIB in db db2 c; do
      
  old_LDFLAGS="$LDFLAGS"
  LDFLAGS="-L$THIS_PREFIX/lib $LDFLAGS"
  
      echo $ac_n "checking for db_appinit in -l$LIB""... $ac_c" 1>&6
echo "configure:13136: checking for db_appinit in -l$LIB" >&5
ac_lib_var=`echo $LIB'_'db_appinit | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-l$LIB  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 13144 "configure"
#include "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 db_appinit();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define DBA_DB2 1
EOF
 THIS_LIBS="$LIB"
else
  echo "$ac_t""no" 1>&6
fi

      
  LDFLAGS="$old_LDFLAGS"

    done
    
    
  if test "$THIS_PREFIX" != "" -a "$THIS_PREFIX" != "/usr"; then
    THIS_INCLUDE="$THIS_PREFIX/include"
    THIS_LFLAGS="$THIS_PREFIX/lib"
  fi

    
  THIS_RESULT="yes"
  if test "$THIS_PREFIX" != "/usr"; then
  if test "$THIS_INCLUDE" = "" ; then
    { echo "configure: error: cannot find necessary header file(s)" 1>&2; exit 1; }
  elif test "$THIS_LIBS" = "" ; then
    { echo "configure: error: cannot find necessary library" 1>&2; exit 1; }
  fi
  fi

    
  
  if test "$THIS_INCLUDE" != "/usr/include"; then
    
  if test -z "$THIS_INCLUDE" || echo "$THIS_INCLUDE" | grep '^/' >/dev/null ; then
    ai_p="$THIS_INCLUDE"
  else
    ai_p="`pwd`/$THIS_INCLUDE"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

  
  
  if test "$THIS_LFLAGS" != "/usr/lib"; then
    
  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p="$THIS_LFLAGS"
  else
    ai_p="`pwd`/$THIS_LFLAGS"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "$THIS_LIBS$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$THIS_LIBS"
  
  fi




  THIS_INCLUDE=""
  THIS_LIBS=""
  THIS_LFLAGS=""
  THIS_PREFIX=""

  fi

fi

echo $ac_n "checking for Berkeley DB2 support""... $ac_c" 1>&6
echo "configure:13272: checking for Berkeley DB2 support" >&5

  if test "$THIS_RESULT" = "yes"; then
    HAVE_DBA=1
    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  THIS_RESULT=""


# Check whether --with-dbm or --without-dbm was given.
if test "${with_dbm+set}" = set; then
  withval="$with_dbm"
  
  if test "$withval" != "no"; then
    for i in /usr/local /usr $withval; do
      if test -f "$i/include/dbm.h" ; then
        THIS_PREFIX="$i"
      fi
	done

    for LIB in db1 dbm c; do
      
  old_LDFLAGS="$LDFLAGS"
  LDFLAGS="-L$THIS_PREFIX/lib $LDFLAGS"
  
      echo $ac_n "checking for dbminit in -l$LIB""... $ac_c" 1>&6
echo "configure:13300: checking for dbminit in -l$LIB" >&5
ac_lib_var=`echo $LIB'_'dbminit | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-l$LIB  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 13308 "configure"
#include "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 dbminit();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define DBA_DBM 1
EOF
 THIS_LIBS="$LIB"
else
  echo "$ac_t""no" 1>&6
fi

      
  LDFLAGS="$old_LDFLAGS"

    done
    
    
  if test "$THIS_PREFIX" != "" -a "$THIS_PREFIX" != "/usr"; then
    THIS_INCLUDE="$THIS_PREFIX/include"
    THIS_LFLAGS="$THIS_PREFIX/lib"
  fi

    
  THIS_RESULT="yes"
  if test "$THIS_PREFIX" != "/usr"; then
  if test "$THIS_INCLUDE" = "" ; then
    { echo "configure: error: cannot find necessary header file(s)" 1>&2; exit 1; }
  elif test "$THIS_LIBS" = "" ; then
    { echo "configure: error: cannot find necessary library" 1>&2; exit 1; }
  fi
  fi

    
  
  if test "$THIS_INCLUDE" != "/usr/include"; then
    
  if test -z "$THIS_INCLUDE" || echo "$THIS_INCLUDE" | grep '^/' >/dev/null ; then
    ai_p="$THIS_INCLUDE"
  else
    ai_p="`pwd`/$THIS_INCLUDE"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

  
  
  if test "$THIS_LFLAGS" != "/usr/lib"; then
    
  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p="$THIS_LFLAGS"
  else
    ai_p="`pwd`/$THIS_LFLAGS"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "$THIS_LIBS$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$THIS_LIBS"
  
  fi




  THIS_INCLUDE=""
  THIS_LIBS=""
  THIS_LFLAGS=""
  THIS_PREFIX=""

  fi

fi

echo $ac_n "checking for DBM support""... $ac_c" 1>&6
echo "configure:13436: checking for DBM support" >&5

  if test "$THIS_RESULT" = "yes"; then
    HAVE_DBA=1
    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  THIS_RESULT=""


# Check whether --with-cdb or --without-cdb was given.
if test "${with_cdb+set}" = set; then
  withval="$with_cdb"
  
  if test "$withval" != "no"; then
    for i in /usr/local /usr $withval; do
      if test -f "$i/include/cdb.h" ; then
        THIS_PREFIX="$i"
      fi
	done

    for LIB in cdb c; do
      
  old_LDFLAGS="$LDFLAGS"
  LDFLAGS="-L$THIS_PREFIX/lib $LDFLAGS"
  
      echo $ac_n "checking for cdb_bread in -l$LIB""... $ac_c" 1>&6
echo "configure:13464: checking for cdb_bread in -l$LIB" >&5
ac_lib_var=`echo $LIB'_'cdb_bread | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-l$LIB  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 13472 "configure"
#include "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 cdb_bread();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define DBA_CDB 1
EOF
 THIS_LIBS="$LIB"
else
  echo "$ac_t""no" 1>&6
fi

      
  LDFLAGS="$old_LDFLAGS"

    done
    
    
  if test "$THIS_PREFIX" != "" -a "$THIS_PREFIX" != "/usr"; then
    THIS_INCLUDE="$THIS_PREFIX/include"
    THIS_LFLAGS="$THIS_PREFIX/lib"
  fi

    
  THIS_RESULT="yes"
  if test "$THIS_PREFIX" != "/usr"; then
  if test "$THIS_INCLUDE" = "" ; then
    { echo "configure: error: cannot find necessary header file(s)" 1>&2; exit 1; }
  elif test "$THIS_LIBS" = "" ; then
    { echo "configure: error: cannot find necessary library" 1>&2; exit 1; }
  fi
  fi

    
  
  if test "$THIS_INCLUDE" != "/usr/include"; then
    
  if test -z "$THIS_INCLUDE" || echo "$THIS_INCLUDE" | grep '^/' >/dev/null ; then
    ai_p="$THIS_INCLUDE"
  else
    ai_p="`pwd`/$THIS_INCLUDE"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

  
  
  if test "$THIS_LFLAGS" != "/usr/lib"; then
    
  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p="$THIS_LFLAGS"
  else
    ai_p="`pwd`/$THIS_LFLAGS"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "$THIS_LIBS$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -l$THIS_LIBS"
  
  fi




  THIS_INCLUDE=""
  THIS_LIBS=""
  THIS_LFLAGS=""
  THIS_PREFIX=""

  fi

fi

echo $ac_n "checking for CDB support""... $ac_c" 1>&6
echo "configure:13600: checking for CDB support" >&5

  if test "$THIS_RESULT" = "yes"; then
    HAVE_DBA=1
    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  THIS_RESULT=""


echo $ac_n "checking whether to enable DBA interface""... $ac_c" 1>&6
echo "configure:13612: checking whether to enable DBA interface" >&5
if test "$HAVE_DBA" = "1"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_DBA 1
EOF

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

fi

echo $ac_n "checking for mcrypt support""... $ac_c" 1>&6
echo "configure:13628: checking for mcrypt support" >&5
# Check whether --with-mcrypt or --without-mcrypt was given.
if test "${with_mcrypt+set}" = set; then
  withval="$with_mcrypt"
  
  if test "$withval" != "no"; then
    for i in /usr/local /usr $withval; do
      if test -f $i/include/mcrypt.h; then
        MCRYPT_DIR=$i
      fi
    done
    if test "$MCRYPT_DIR" = ""; then
      { echo "configure: error: Please install mcrypt.h and libmcrypt.a as explained in the documentation - I cannot find mcrypt.h" 1>&2; exit 1; }
    fi
    
  if test "$MCRYPT_DIR/include" != "/usr/include"; then
    
  if test -z "$MCRYPT_DIR/include" || echo "$MCRYPT_DIR/include" | grep '^/' >/dev/null ; then
    ai_p="$MCRYPT_DIR/include"
  else
    ai_p="`pwd`/$MCRYPT_DIR/include"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

    
  
  if test "$MCRYPT_DIR/lib" != "/usr/lib"; then
    
  if test -z "$MCRYPT_DIR/lib" || echo "$MCRYPT_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$MCRYPT_DIR/lib"
  else
    ai_p="`pwd`/$MCRYPT_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "mcrypt$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lmcrypt"
  
  fi




    cat >> confdefs.h <<\EOF
#define HAVE_LIBMCRYPT 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 mhash support""... $ac_c" 1>&6
echo "configure:13723: checking for mhash support" >&5
# Check whether --with-mhash or --without-mhash was given.
if test "${with_mhash+set}" = set; then
  withval="$with_mhash"
  
  if test "$withval" != "no"; then
    for i in /usr/local /usr /opt/mhash $withval; do
      if test -f $i/include/mhash.h; then
        MHASH_DIR=$i
      fi
    done
    if test "$MHASH_DIR" = ""; then
      { echo "configure: error: Please reinstall libmhash - I cannot find mhash.h" 1>&2; exit 1; }
    fi
    
  if test "$MHASH_DIR/include" != "/usr/include"; then
    
  if test -z "$MHASH_DIR/include" || echo "$MHASH_DIR/include" | grep '^/' >/dev/null ; then
    ai_p="$MHASH_DIR/include"
  else
    ai_p="`pwd`/$MHASH_DIR/include"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

    
  
  if test "$MHASH_DIR/lib" != "/usr/lib"; then
    
  if test -z "$MHASH_DIR/lib" || echo "$MHASH_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$MHASH_DIR/lib"
  else
    ai_p="`pwd`/$MHASH_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "mhash$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lmhash"
  
  fi




    cat >> confdefs.h <<\EOF
#define HAVE_LIBMHASH 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 whether to include PCRE support""... $ac_c" 1>&6
echo "configure:13818: checking whether to include PCRE support" >&5
# Check whether --with-pcre-regex or --without-pcre-regex was given.
if test "${with_pcre_regex+set}" = set; then
  withval="$with_pcre_regex"
  
  if test "$withval" = "yes"; then
    PCRE_LIB="pcrelib/libpcre.a"
    PCRE_LIBS="-Lpcrelib -lpcre"
    PCRE_OBJS="\$(PCRE_OBJS)"
    cat >> confdefs.h <<\EOF
#define HAVE_PCRE 1
EOF

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

else
  
  PCRE_LIB="pcrelib/libpcre.a"
  PCRE_LIBS="-Lpcrelib -lpcre"
  PCRE_OBJS="\$(PCRE_OBJS)"
  cat >> confdefs.h <<\EOF
#define HAVE_PCRE 1
EOF

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

fi





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

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_memmove) || defined (__stub___memmove)
choke me
#else
memmove();
#endif

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

if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define USE_BCOPY 1
EOF

fi


echo $ac_n "checking whether to include POSIX support""... $ac_c" 1>&6
echo "configure:13907: checking whether to include POSIX support" >&5
# Check whether --with-posix or --without-posix was given.
if test "${with_posix+set}" = set; then
  withval="$with_posix"
  
  if test "$withval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_POSIX 1
EOF

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

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

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

fi


RESULT=no
echo $ac_n "checking whether to include GNU recode support""... $ac_c" 1>&6
echo "configure:13935: checking whether to include GNU recode support" >&5
# Check whether --with-recode or --without-recode was given.
if test "${with_recode+set}" = set; then
  withval="$with_recode"
  
    if test "$withval" != "no"; then
        for i in /usr/local /usr /opt/recode $withval; do
            if test -f $i/include/recode.h; then
                RECODE_DIR=$i
                RECODE_INC=
            elif test -f $i/include/recode/recode.h; then
                RECODE_DIR=$i
                RECODE_INC=/recode
            fi
        done

        if test -z "$RECODE_DIR"; then
            { echo "configure: error: Cannot find recode.h. Please install recode-3.5 or higher" 1>&2; exit 1; }
        fi

        
  if test "$RECODE_DIR$RECODE_INC" != "/usr/include"; then
    
  if test -z "$RECODE_DIR$RECODE_INC" || echo "$RECODE_DIR$RECODE_INC" | grep '^/' >/dev/null ; then
    ai_p="$RECODE_DIR$RECODE_INC"
  else
    ai_p="`pwd`/$RECODE_DIR$RECODE_INC"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"
    
      INCLUDES="$INCLUDES -I$ai_p"
    
  fi

  fi

		
        old_LDFLAGS="$LDFLAGS"
        old_LIBS="$LIBS"
        LDFLAGS="$LDFLAGS -L$RECODE_DIR/lib"
        LIBS="$LIBS -lrecode"
        cat > conftest.$ac_ext <<EOF
#line 13982 "configure"
#include "confdefs.h"

char *program_name;

int main() {

recode_format_table();

; return 0; }
EOF
if { (eval echo configure:13993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
            { echo "configure: error: Cannot find librecode. Please install recode-3.5 or higher" 1>&2; exit 1; }
fi
rm -f conftest*
        LIBS="$old_LIBS"
        LDFLAGS="$old_LDFLAGS"

        
  
  if test "$RECODE_DIR/lib" != "/usr/lib"; then
    
  if test -z "$RECODE_DIR/lib" || echo "$RECODE_DIR/lib" | grep '^/' >/dev/null ; then
    ai_p="$RECODE_DIR/lib"
  else
    ai_p="`pwd`/$RECODE_DIR/lib"
  fi

    
  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBPATH$unique=set"
    
      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
      if test -n "$APXS" ; then
        RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
      else
        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
      fi
    
  fi

  fi

  
  
  unique=`echo $ac_n "recode$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lrecode"
  
  fi



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

        RESULT=yes
	fi

fi

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

echo $ac_n "checking whether to enable dmalloc support""... $ac_c" 1>&6
echo "configure:14058: checking whether to enable dmalloc support" >&5
# Check whether --enable-dmalloc or --disable-dmalloc was given.
if test "${enable_dmalloc+set}" = set; then
  enableval="$enable_dmalloc"
  
  if test "$enableval" = "yes" ; then
    LIBS="$LIBS -ldmalloc"
    CFLAGS="$CFLAGS -DDMALLOC_FUNC_CHECK"
    cat >> confdefs.h <<\EOF
#define HAVE_DMALLOC 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 __dn_skipname in -lbind""... $ac_c" 1>&6
echo "configure:14081: checking for __dn_skipname in -lbind" >&5
ac_lib_var=`echo bind'_'__dn_skipname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbind  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 14089 "configure"
#include "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:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   
  
  unique=`echo $ac_n "bind$ac_c" | tr -c -d a-zA-Z0-9`
  cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "LIBRARY$unique=set"
    
    EXTRA_LIBS="$EXTRA_LIBS -lbind"
  
  fi

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


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









	
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 | grep ac_space) 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.13"
    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
	  extra/gd/bdf2gdfont regex/Makefile pcrelib/Makefile dbase/Makefile 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%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%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%@CONFIGURE_COMMAND@%$CONFIGURE_COMMAND%g
s%@YACC@%$YACC%g
s%@CC@%$CC%g
s%@RANLIB@%$RANLIB%g
s%@LN_S@%$LN_S%g
s%@PERL_PATH@%$PERL_PATH%g
s%@SH@%$SH%g
s%@LEX_CFLAGS@%$LEX_CFLAGS%g
s%@APXS_EXP@%$APXS_EXP%g
s%@PROG_SENDMAIL@%$PROG_SENDMAIL%g
s%@CPP@%$CPP%g
s%@LIBOBJS@%$LIBOBJS%g
s%@WARNING_LEVEL@%$WARNING_LEVEL%g
s%@ALLOCA@%$ALLOCA%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%@VERSION_SCRIPT@%$VERSION_SCRIPT%g
s%@APACHE_INCLUDE@%$APACHE_INCLUDE%g
s%@APACHE_TARGET@%$APACHE_TARGET%g
s%@STRONGHOLD@%$STRONGHOLD%g
s%@REGEX_LIB@%$REGEX_LIB%g
s%@HSREGEX@%$HSREGEX%g
s%@DBM_LIB@%$DBM_LIB%g
s%@DBM_TYPE@%$DBM_TYPE%g
s%@GDBM_INCLUDE@%$GDBM_INCLUDE%g
s%@FHTTPD_INCLUDE@%$FHTTPD_INCLUDE%g
s%@FHTTPD_LIB@%$FHTTPD_LIB%g
s%@FHTTPD_TARGET@%$FHTTPD_TARGET%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%@SOLID_INCLUDE@%$SOLID_INCLUDE%g
s%@SOLID_LIBS@%$SOLID_LIBS%g
s%@EMPRESS_INCLUDE@%$EMPRESS_INCLUDE%g
s%@EMPRESS_LIBS@%$EMPRESS_LIBS%g
s%@MCK_LIBS@%$MCK_LIBS%g
s%@MCK_LFLAGS@%$MCK_LFLAGS%g
s%@MCK_INCLUDE@%$MCK_INCLUDE%g
s%@SNMP_LIBDIR@%$SNMP_LIBDIR%g
s%@SNMP_INCLUDE@%$SNMP_INCLUDE%g
s%@KSTAT_LIBS@%$KSTAT_LIBS%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%@INFORMIXDIR@%$INFORMIXDIR%g
s%@IFX_C_MAKE@%$IFX_C_MAKE%g
s%@IBASE_INCLUDE@%$IBASE_INCLUDE%g
s%@IBASE_LIBS@%$IBASE_LIBS%g
s%@IBASE_LFLAGS@%$IBASE_LFLAGS%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%@PDFLIB_LIBS@%$PDFLIB_LIBS%g
s%@PDFLIB_INCLUDE@%$PDFLIB_INCLUDE%g
s%@CPDFLIB_LIBS@%$CPDFLIB_LIBS%g
s%@CPDFLIB_INCLUDE@%$CPDFLIB_INCLUDE%g
s%@FDFLIB_LIBS@%$FDFLIB_LIBS%g
s%@FDFLIB_INCLUDE@%$FDFLIB_INCLUDE%g
s%@DBASE_LIB@%$DBASE_LIB%g
s%@DBASE_LIBS@%$DBASE_LIBS%g
s%@DBASE_OBJS@%$DBASE_OBJS%g
s%@MOD_DAV_CFLAGS@%$MOD_DAV_CFLAGS%g
s%@DEBUG_CFLAGS@%$DEBUG_CFLAGS%g
s%@PHP_DEBUG@%$PHP_DEBUG%g
s%@BCMATH_SRC@%$BCMATH_SRC%g
s%@PCRE_LIB@%$PCRE_LIB%g
s%@PCRE_LIBS@%$PCRE_LIBS%g
s%@PCRE_OBJS@%$PCRE_OBJS%g
s%@CFLAGS_SHLIB@%$CFLAGS_SHLIB%g
s%@LDFLAGS_SHLIB@%$LDFLAGS_SHLIB%g
s%@INCLUDES@%$INCLUDES%g
s%@EXTRA_LIBS@%$EXTRA_LIBS%g
s%@RPATHS@%$RPATHS%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
	  extra/gd/bdf2gdfont regex/Makefile pcrelib/Makefile dbase/Makefile"}
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 -n "$PHP_APXS_BROKEN" ; then
	echo "=================================================================="
	echo "WARNING: Your $APXS script is most likely broken."
	echo ""
	echo "Please go read http://www.php.net/FAQ.php3#6.11 and make the"
	echo "changes described there and try again."
	echo "=================================================================="
fi

if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
  echo "=================================================================="
  echo "WARNING: You have chosen to compile PHP with a different compiler"
  echo "         as you used for compiling Apache."
  echo ""
  echo "    Current compiler:      $CC"
  echo "   Apache's compiler:      $APXS_CC"
  echo ""
  echo "This might result in an unusable PHP module and linking problems."
  echo "=================================================================="
fi

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/security.php for more details."
		fi
	fi
fi
if test "$INFORMIX_WARNING" != ""; then
		echo "$INFORMIX_WARNING"
fi
if test "$T1LIB_WARNING" != ""; then
		echo "$T1LIB_WARNING"
fi

EOF
cat >> $CONFIG_STATUS <<\EOF

  chmod +x extra/gd/bdf2gdfont

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:
