diff -Naur php-5.2.5/configure php-5.2.5-suhosin/configure --- php-5.2.5/configure 2007-11-08 16:36:28.000000000 +0100 +++ php-5.2.5-suhosin/configure 2007-11-12 12:38:56.000000000 +0100 @@ -18496,6 +18496,9 @@ fi +cat >> confdefs.h <<\EOF +#define SUHOSIN_PATCH 1 +EOF echo $ac_n "checking for declared timezone""... $ac_c" 1>&6 echo "configure:18502: checking for declared timezone" >&5 @@ -115677,7 +115680,7 @@ php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \ network.c php_open_temporary_file.c php_logos.c \ - output.c ; do + output.c suhosin_patch.c ; do IFS=. set $ac_src @@ -115879,7 +115882,7 @@ zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \ zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \ zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \ - zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c; do + zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_canary.c; do IFS=. set $ac_src diff -Naur php-5.2.5/configure.in php-5.2.5-suhosin/configure.in --- php-5.2.5/configure.in 2007-11-08 14:44:11.000000000 +0100 +++ php-5.2.5-suhosin/configure.in 2007-11-12 12:38:56.000000000 +0100 @@ -227,6 +227,7 @@ sinclude(TSRM/threads.m4) sinclude(TSRM/tsrm.m4) +sinclude(main/suhosin_patch.m4) divert(2) @@ -1301,7 +1302,7 @@ php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \ network.c php_open_temporary_file.c php_logos.c \ - output.c ) + output.c suhosin_patch.c ) PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \ plain_wrapper.c userspace.c transports.c xp_socket.c mmap.c) @@ -1327,7 +1328,7 @@ zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \ zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \ zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \ - zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c) + zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_canary.c ) if test -r "$abs_srcdir/Zend/zend_objects.c"; then PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c \ diff -Naur php-5.2.5/configure.orig php-5.2.5-suhosin/configure.orig --- php-5.2.5/configure.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/configure.orig 2007-11-08 16:36:28.000000000 +0100 @@ -0,0 +1,116703 @@ +#! /bin/sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +## Free Software Foundation, Inc. +## Originally by Gordon Matzigkeit , 1996 +## +## This file is free software; the Free Software Foundation gives +## unlimited permission to copy and/or distribute it, with or without +## modifications, as long as this notice is preserved. + +# serial 47 AC_PROG_LIBTOOL + + +# autoconf 2.13 compatibility +# Set PATH_SEPARATOR variable +# --------------------------------- +# Find the correct PATH separator. Usually this is :', but +# DJGPP uses ;' like DOS. +if test "X${PATH_SEPARATOR+set}" != Xset; then + UNAME=${UNAME-`uname 2>/dev/null`} + case X$UNAME in + *-DOS) lt_cv_sys_path_separator=';' ;; + *) lt_cv_sys_path_separator=':' ;; + esac + PATH_SEPARATOR=$lt_cv_sys_path_separator +fi + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. + + +# AC_PROG_LIBTOOL +# --------------- +# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. + + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +# _LT_LINKER_BOILERPLATE + + + + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# -------------------- +# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ------------------------------------------------------------------ +# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ------------------- +# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +#- set the default shared flag to --disable-shared +# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. + + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +# AC_PROG_LD + + +# AC_PROG_LD_GNU +# -------------- +# AC_PROG_LD_GNU + + +# AC_PROG_LD_RELOAD_FLAG +# ---------------------- +# find reload flag for linker +# -- PORTME Some linkers may need a different reload flag. +# AC_PROG_LD_RELOAD_FLAG + + +# AC_DEPLIBS_CHECK_METHOD +# ----------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# --------------- +# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +#AC_DEFUN([AC_LIBTOOL_F77], +#[AC_REQUIRE([_LT_AC_LANG_F77]) +#])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +#AC_DEFUN([_LT_AC_LANG_F77], +#[AC_REQUIRE([AC_PROG_F77]) +#_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +#])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +#AC_DEFUN([AC_LIBTOOL_GCJ], +#[AC_REQUIRE([_LT_AC_LANG_GCJ]) +#])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +#AC_DEFUN([_LT_AC_LANG_GCJ], +#[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], +# [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], +# [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], +# [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], +# [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], +# [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +#_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +#])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# -------------- +# enable support for Windows resource files +#AC_DEFUN([AC_LIBTOOL_RC], +#[AC_REQUIRE([LT_AC_PROG_RC]) +#_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +#])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. + +# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. + +# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +#AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +#AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +#[AC_REQUIRE([AC_PROG_F77]) +#AC_LANG_SAVE +#AC_LANG_FORTRAN77 +# +#_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +#_LT_AC_TAGVAR(allow_undefined_flag, $1)= +#_LT_AC_TAGVAR(always_export_symbols, $1)=no +#_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +#_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +#_LT_AC_TAGVAR(hardcode_direct, $1)=no +#_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +#_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +#_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +#_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +#_LT_AC_TAGVAR(hardcode_automatic, $1)=no +#_LT_AC_TAGVAR(module_cmds, $1)= +#_LT_AC_TAGVAR(module_expsym_cmds, $1)= +#_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +#_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +#_LT_AC_TAGVAR(no_undefined_flag, $1)= +#_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +#_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no +# +## Source file extension for f77 test sources. +#ac_ext=f +# +## Object file extension for compiled f77 test sources. +#objext=o +#_LT_AC_TAGVAR(objext, $1)=$objext +# +## Code to be used in simple compile tests +#lt_simple_compile_test_code=" subroutine t\n return\n end\n" +# +## Code to be used in simple link tests +#lt_simple_link_test_code=" program t\n end\n" +# +## ltmain only uses $CC for tagged configurations so make sure $CC is set. +#_LT_AC_SYS_COMPILER +# +## save warnings/boilerplate of simple test code +#_LT_COMPILER_BOILERPLATE +#_LT_LINKER_BOILERPLATE +# +## Allow CC to be a program name with arguments. +#lt_save_CC="$CC" +#CC=${F77-"f77"} +#compiler=$CC +#_LT_AC_TAGVAR(compiler, $1)=$CC +#_LT_CC_BASENAME([$compiler]) +# +#AC_MSG_CHECKING([if libtool supports shared libraries]) +#AC_MSG_RESULT([$can_build_shared]) +# +#AC_MSG_CHECKING([whether to build shared libraries]) +#test "$can_build_shared" = "no" && enable_shared=no +# +## On AIX, shared libraries and static libraries use the same namespace, and +## are all built from PIC. +#case "$host_os" in +#aix3*) +# test "$enable_shared" = yes && enable_static=no +# if test -n "$RANLIB"; then +# archive_cmds="$archive_cmds~\$RANLIB \$lib" +# postinstall_cmds='$RANLIB $lib' +# fi +# ;; +#aix4* | aix5*) +# if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then +# test "$enable_shared" = yes && enable_static=no +# fi +# ;; +#esac +#AC_MSG_RESULT([$enable_shared]) +# +#AC_MSG_CHECKING([whether to build static libraries]) +## Make sure either enable_shared or enable_static is yes. +#test "$enable_shared" = yes || enable_static=yes +#AC_MSG_RESULT([$enable_static]) +# +#test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +# +#_LT_AC_TAGVAR(GCC, $1)="$G77" +#_LT_AC_TAGVAR(LD, $1)="$LD" +# +#AC_LIBTOOL_PROG_COMPILER_PIC($1) +#AC_LIBTOOL_PROG_CC_C_O($1) +#AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +#AC_LIBTOOL_PROG_LD_SHLIBS($1) +#AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +#AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +#AC_LIBTOOL_SYS_LIB_STRIP +# +# +#AC_LIBTOOL_CONFIG($1) +# +#AC_LANG_RESTORE +#CC="$lt_save_CC" +#])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +#AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +#AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +#[AC_LANG_SAVE +# +## Source file extension for Java test sources. +#ac_ext=java +# +## Object file extension for compiled Java test sources. +#objext=o +#_LT_AC_TAGVAR(objext, $1)=$objext +# +## Code to be used in simple compile tests +#lt_simple_compile_test_code="class foo {}\n" +# +## Code to be used in simple link tests +#lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' +# +## ltmain only uses $CC for tagged configurations so make sure $CC is set. +#_LT_AC_SYS_COMPILER +# +## save warnings/boilerplate of simple test code +#_LT_COMPILER_BOILERPLATE +#_LT_LINKER_BOILERPLATE +# +## Allow CC to be a program name with arguments. +#lt_save_CC="$CC" +#CC=${GCJ-"gcj"} +#compiler=$CC +#_LT_AC_TAGVAR(compiler, $1)=$CC +#_LT_CC_BASENAME([$compiler]) +# +## GCJ did not exist at the time GCC didn't implicitly link libc in. +#_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +# +#_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +# +### CAVEAT EMPTOR: +### There is no encapsulation within the following macros, do not change +### the running order or otherwise move them around unless you know exactly +### what you are doing... +#AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +#AC_LIBTOOL_PROG_COMPILER_PIC($1) +#AC_LIBTOOL_PROG_CC_C_O($1) +#AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +#AC_LIBTOOL_PROG_LD_SHLIBS($1) +#AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +#AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +#AC_LIBTOOL_SYS_LIB_STRIP +#AC_LIBTOOL_DLOPEN_SELF($1) +# +#AC_LIBTOOL_CONFIG($1) +# +#AC_LANG_RESTORE +#CC="$lt_save_CC" +#])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# -------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +#AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +#AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +#[AC_LANG_SAVE +# +## Source file extension for RC test sources. +#ac_ext=rc +# +## Object file extension for compiled RC test sources. +#objext=o +#_LT_AC_TAGVAR(objext, $1)=$objext +# +## Code to be used in simple compile tests +#lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +# +## Code to be used in simple link tests +#lt_simple_link_test_code="$lt_simple_compile_test_code" +# +## ltmain only uses $CC for tagged configurations so make sure $CC is set. +#_LT_AC_SYS_COMPILER +# +## save warnings/boilerplate of simple test code +#_LT_COMPILER_BOILERPLATE +#_LT_LINKER_BOILERPLATE +# +## Allow CC to be a program name with arguments. +#lt_save_CC="$CC" +#CC=${RC-"windres"} +#compiler=$CC +#_LT_AC_TAGVAR(compiler, $1)=$CC +#_LT_CC_BASENAME([$compiler]) +#_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes +# +#AC_LIBTOOL_CONFIG($1) +# +#AC_LANG_RESTORE +#CC="$lt_save_CC" +#])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then create an initial libtool script +# with a default configuration from the untagged config vars. Otherwise +# add code to config.status for appending the configuration named by +# TAGNAME from the matching tagged config vars. +# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- + # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- + + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- + + + +# old names + + + + + + + + +# This is just to silence aclocal about the macro not being used + + +#AC_DEFUN([LT_AC_PROG_GCJ], +#[AC_CHECK_TOOL(GCJ, gcj, no) +# test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" +# AC_SUBST(GCJFLAGS) +#]) + +#AC_DEFUN([LT_AC_PROG_RC], +#[AC_CHECK_TOOL(RC, windres, no) +#]) + +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. + +# 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 + --with-libdir=NAME Look for libraries in .../NAME rather than .../lib" +ac_help="$ac_help + --disable-rpath Disable passing additional runtime library + search paths" +ac_help="$ac_help + +SAPI modules: +" +ac_help="$ac_help + --with-aolserver=DIR Specify path to the installed AOLserver" +ac_help="$ac_help + --with-apxs[=FILE] Build shared Apache 1.x module. FILE is the optional + pathname to the Apache apxs tool [apxs]" +ac_help="$ac_help + --with-apache[=DIR] Build Apache 1.x module. DIR is the top-level Apache + build directory [/usr/local/apache]" +ac_help="$ac_help + --enable-mod-charset APACHE: Enable transfer tables for mod_charset (Rus Apache)" +ac_help="$ac_help + --with-apxs2filter[=FILE] + EXPERIMENTAL: Build shared Apache 2.0 Filter module. FILE is the optional + pathname to the Apache apxs tool [apxs]" +ac_help="$ac_help + --with-apxs2[=FILE] Build shared Apache 2.0 Handler module. FILE is the optional + pathname to the Apache apxs tool [apxs]" +ac_help="$ac_help + --with-apache-hooks[=FILE] + EXPERIMENTAL: Build shared Apache 1.x module. FILE is the optional + pathname to the Apache apxs tool [apxs]" +ac_help="$ac_help + --with-apache-hooks-static[=DIR] + EXPERIMENTAL: Build Apache 1.x module. DIR is the top-level Apache + build directory [/usr/local/apache]" +ac_help="$ac_help + --enable-mod-charset APACHE (hooks): Enable transfer tables for mod_charset (Rus Apache)" +ac_help="$ac_help + --with-caudium[=DIR] Build PHP as a Pike module for use with Caudium. + DIR is the Caudium server dir [/usr/local/caudium/server]" +ac_help="$ac_help + --disable-cli Disable building CLI version of PHP + (this forces --without-pear)" +ac_help="$ac_help + --with-continuity=DIR Build PHP as Continuity Server module. + DIR is path to the installed Continuity Server root" +ac_help="$ac_help + --enable-embed[=TYPE] EXPERIMENTAL: Enable building of embedded SAPI library + TYPE is either 'shared' or 'static'. [TYPE=shared]" +ac_help="$ac_help + --with-isapi[=DIR] Build PHP as an ISAPI module for use with Zeus" +ac_help="$ac_help + --with-milter[=DIR] Build PHP as Milter application" +ac_help="$ac_help + --with-nsapi=DIR Build PHP as NSAPI module for Netscape/iPlanet/Sun Webserver" +ac_help="$ac_help + --with-phttpd=DIR Build PHP as phttpd module" +ac_help="$ac_help + --with-pi3web[=DIR] Build PHP as Pi3Web module" +ac_help="$ac_help + --with-roxen=DIR Build PHP as a Pike module. DIR is the base Roxen + directory, normally /usr/local/roxen/server" +ac_help="$ac_help + --enable-roxen-zts ROXEN: Build the Roxen module using Zend Thread Safety" +ac_help="$ac_help + --with-thttpd=SRCDIR Build PHP as thttpd module" +ac_help="$ac_help + --with-tux=MODULEDIR Build PHP as a TUX module (Linux only)" +ac_help="$ac_help + --with-webjames=SRCDIR Build PHP as a WebJames module (RISC OS only)" +ac_help="$ac_help + --disable-cgi Disable building CGI version of PHP" +ac_help="$ac_help + --enable-fastcgi CGI: Enable FastCGI support in the CGI binary" +ac_help="$ac_help + --enable-force-cgi-redirect + CGI: Enable security check for internal server + redirects. Use this if you run the PHP CGI with Apache" +ac_help="$ac_help + --enable-discard-path CGI: When 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 + --disable-path-info-check CGI: If this is disabled, paths such as + /info.php/test?a=b will fail to work" +ac_help="$ac_help + +General settings: +" +ac_help="$ac_help + --enable-gcov Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!" +ac_help="$ac_help + --enable-debug Compile with debugging symbols" +ac_help="$ac_help + --with-layout=TYPE Set how installed files will be laid out. Type can + be either PHP or GNU [PHP]" +ac_help="$ac_help + --with-config-file-path=PATH + Set the path in which to look for php.ini [PREFIX/lib]" +ac_help="$ac_help + --with-config-file-scan-dir=PATH + Set the path where to scan for configuration files" +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 under safe-mode + [/usr/local/php/bin]" +ac_help="$ac_help + --enable-sigchild Enable PHP's own SIGCHLD handler" +ac_help="$ac_help + --enable-magic-quotes Enable magic quotes by default." +ac_help="$ac_help + --enable-libgcc Enable explicitly linking against libgcc" +ac_help="$ac_help + --disable-short-tags Disable the short-form = 0.9.6)" +ac_help="$ac_help + --with-kerberos[=DIR] OPENSSL: Include Kerberos support" +ac_help="$ac_help + --without-pcre-regex Do not include Perl Compatible Regular Expressions support. + DIR is the PCRE install prefix [BUNDLED]" +ac_help="$ac_help + --with-zlib[=DIR] Include ZLIB support (requires zlib >= 1.0.9)" +ac_help="$ac_help + --with-zlib-dir= Define the location of zlib install directory" +ac_help="$ac_help + --enable-bcmath Enable bc style precision math functions" +ac_help="$ac_help + --with-bz2[=DIR] Include BZip2 support" +ac_help="$ac_help + --enable-calendar Enable support for calendar conversion" +ac_help="$ac_help + --disable-ctype Disable ctype functions" +ac_help="$ac_help + --with-curl[=DIR] Include cURL support" +ac_help="$ac_help + --with-curlwrappers Use cURL for url streams" +ac_help="$ac_help + --enable-dba Build DBA with bundled modules. To build shared DBA + extension use --enable-dba=shared" +ac_help="$ac_help + --with-qdbm[=DIR] DBA: QDBM support" +ac_help="$ac_help + --with-gdbm[=DIR] DBA: GDBM support" +ac_help="$ac_help + --with-ndbm[=DIR] DBA: NDBM support" +ac_help="$ac_help + --with-db4[=DIR] DBA: Berkeley DB4 support" +ac_help="$ac_help + --with-db3[=DIR] DBA: Berkeley DB3 support" +ac_help="$ac_help + --with-db2[=DIR] DBA: Berkeley DB2 support" +ac_help="$ac_help + --with-db1[=DIR] DBA: Berkeley DB1 support/emulation" +ac_help="$ac_help + --with-dbm[=DIR] DBA: DBM support" +ac_help="$ac_help + --without-cdb[=DIR] DBA: CDB support (bundled)" +ac_help="$ac_help + --disable-inifile DBA: INI support (bundled)" +ac_help="$ac_help + --disable-flatfile DBA: FlatFile support (bundled)" +ac_help="$ac_help + --enable-dbase Enable the bundled dbase library" +ac_help="$ac_help + --disable-dom Disable DOM support" +ac_help="$ac_help + --with-libxml-dir[=DIR] DOM: libxml2 install prefix" +ac_help="$ac_help + --enable-exif Enable EXIF (metadata from images) support" +ac_help="$ac_help + --with-fbsql[=DIR] Include FrontBase support. DIR is the FrontBase base directory" +ac_help="$ac_help + --with-fdftk[=DIR] Include FDF support" +ac_help="$ac_help + --disable-filter Disable input filter support" +ac_help="$ac_help + --with-pcre-dir FILTER: pcre install prefix" +ac_help="$ac_help + --enable-ftp Enable FTP support" +ac_help="$ac_help + --with-openssl-dir[=DIR] FTP: openssl install prefix" +ac_help="$ac_help + --with-gd[=DIR] Include GD support. DIR is the GD library base + install directory [BUNDLED]" +ac_help="$ac_help + --with-jpeg-dir[=DIR] GD: Set the path to libjpeg install prefix" +ac_help="$ac_help + --with-png-dir[=DIR] GD: Set the path to libpng install prefix" +ac_help="$ac_help + --with-zlib-dir[=DIR] GD: Set the path to libz install prefix" +ac_help="$ac_help + --with-xpm-dir[=DIR] GD: Set the path to libXpm install prefix" +ac_help="$ac_help + --with-ttf[=DIR] GD: Include FreeType 1.x support" +ac_help="$ac_help + --with-freetype-dir[=DIR] GD: Set the path to FreeType 2 install prefix" +ac_help="$ac_help + --with-t1lib[=DIR] GD: Include T1lib support. T1lib version >= 5.0.0 required" +ac_help="$ac_help + --enable-gd-native-ttf GD: Enable TrueType string function" +ac_help="$ac_help + --enable-gd-jis-conv GD: Enable JIS-mapped Japanese font support" +ac_help="$ac_help + --with-gettext[=DIR] Include GNU gettext support" +ac_help="$ac_help + --with-gmp[=DIR] Include GNU MP support" +ac_help="$ac_help + --disable-hash Disable hash support" +ac_help="$ac_help + --without-iconv[=DIR] Exclude iconv support" +ac_help="$ac_help + --with-imap[=DIR] Include IMAP support. DIR is the c-client install prefix" +ac_help="$ac_help + --with-kerberos[=DIR] IMAP: Include Kerberos support. DIR is the Kerberos install prefix" +ac_help="$ac_help + --with-imap-ssl[=DIR] IMAP: Include SSL support. DIR is the OpenSSL install prefix" +ac_help="$ac_help + --with-interbase[=DIR] Include InterBase support. DIR is the InterBase base + install directory [/usr/interbase]" +ac_help="$ac_help + --disable-json Disable JavaScript Object Serialization support" +ac_help="$ac_help + --with-ldap[=DIR] Include LDAP support" +ac_help="$ac_help + --with-ldap-sasl[=DIR] LDAP: Include Cyrus SASL support" +ac_help="$ac_help + --enable-mbstring Enable multibyte string support" +ac_help="$ac_help + --disable-mbregex MBSTRING: Disable multibyte regex support" +ac_help="$ac_help + --disable-mbregex-backtrack + MBSTRING: Disable multibyte regex backtrack check" +ac_help="$ac_help + --with-libmbfl[=DIR] MBSTRING: Use external libmbfl. DIR is the libmbfl base + install directory [BUNDLED]" +ac_help="$ac_help + --with-mcrypt[=DIR] Include mcrypt support" +ac_help="$ac_help + --with-mhash[=DIR] Include mhash support" +ac_help="$ac_help + --with-mime-magic[=FILE] + Include mime_magic support (DEPRECATED!!)" +ac_help="$ac_help + --with-ming[=DIR] Include MING support" +ac_help="$ac_help + --with-msql[=DIR] Include mSQL support. DIR is the mSQL base + install directory [/usr/local/Hughes]" +ac_help="$ac_help + --with-mssql[=DIR] Include MSSQL-DB support. DIR is the FreeTDS home + directory [/usr/local/freetds]" +ac_help="$ac_help + --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base directory" +ac_help="$ac_help + --with-mysql-sock[=DIR] MySQL: Location of the MySQL unix socket pointer. + If unspecified, the default locations are searched" +ac_help="$ac_help + --with-zlib-dir[=DIR] MySQL: Set the path to libz install prefix" +ac_help="$ac_help + --with-mysqli[=FILE] Include MySQLi support. FILE is the optional pathname + to mysql_config [mysql_config]" +ac_help="$ac_help + --enable-embedded-mysqli MYSQLi: Enable embedded support" +ac_help="$ac_help + --with-ncurses[=DIR] Include ncurses support (CLI/CGI only)" +ac_help="$ac_help + --with-oci8[=DIR] Include Oracle (OCI8) support. DIR defaults to \$ORACLE_HOME. + Use --with-oci8=instantclient,/path/to/oic/lib + for an Oracle Instant Client installation" +ac_help="$ac_help + --with-adabas[=DIR] Include Adabas D support [/usr/local]" +ac_help="$ac_help + --with-sapdb[=DIR] Include SAP DB support [/usr/local]" +ac_help="$ac_help + --with-solid[=DIR] Include Solid support [/usr/local/solid]" +ac_help="$ac_help + --with-ibm-db2[=DIR] Include IBM DB2 support [/home/db2inst1/sqllib]" +ac_help="$ac_help + --with-ODBCRouter[=DIR] Include ODBCRouter.com support [/usr]" +ac_help="$ac_help + --with-empress[=DIR] Include Empress support [\$EMPRESSPATH] + (Empress Version >= 8.60 required)" +ac_help="$ac_help + --with-empress-bcs[=DIR] + Include Empress Local Access support [\$EMPRESSPATH] + (Empress Version >= 8.60 required)" +ac_help="$ac_help + --with-birdstep[=DIR] Include Birdstep support [/usr/local/birdstep]" +ac_help="$ac_help + --with-custom-odbc[=DIR] + Include user defined ODBC support. DIR is ODBC install base + directory [/usr/local]. Make sure to define CUSTOM_ODBC_LIBS and + have some odbc.h in your include dirs. f.e. you should define + following for Sybase SQL Anywhere 5.5.00 on QNX, prior to + running this configure script: + CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\" + LDFLAGS=-lunix + CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\"" +ac_help="$ac_help + --with-iodbc[=DIR] Include iODBC support [/usr/local]" +ac_help="$ac_help + --with-esoob[=DIR] Include Easysoft OOB support [/usr/local/easysoft/oob/client]" +ac_help="$ac_help + --with-unixODBC[=DIR] Include unixODBC support [/usr/local]" +ac_help="$ac_help + --with-dbmaker[=DIR] Include DBMaker support" +ac_help="$ac_help + --enable-pcntl Enable experimental pcntl support (CLI/CGI only)" +ac_help="$ac_help + --disable-pdo Disable PHP Data Objects support" +ac_help="$ac_help + --with-pdo-dblib[=DIR] PDO: DBLIB-DB support. DIR is the FreeTDS home + directory" +ac_help="$ac_help + --with-pdo-firebird[=DIR] PDO: Firebird support. DIR is the Firebird base + install directory [/opt/firebird]" +ac_help="$ac_help + --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory" +ac_help="$ac_help + --with-zlib-dir[=DIR] PDO_MySQL: Set the path to libz install prefix" +ac_help="$ac_help + --with-pdo-oci[=DIR] PDO: Oracle OCI support. DIR defaults to \$ORACLE_HOME. + Use --with-pdo-oci=instantclient,prefix,version + for an Oracle Instant Client SDK. + For Linux with 10.2.0.3 RPMs (for example) use: + --with-pdo-oci=instantclient,/usr,10.2.0.3" +ac_help="$ac_help + --with-pdo-odbc=flavour,dir + PDO: Support for 'flavour' ODBC driver. + include and lib dirs are looked for under 'dir'. + + 'flavour' can be one of: ibm-db2, unixODBC, generic + If ',dir' part is omitted, default for the flavour + you have selected will used. e.g.: + + --with-pdo-odbc=unixODBC + + will check for unixODBC under /usr/local. You may attempt + to use an otherwise unsupported driver using the \"generic\" + flavour. The syntax for generic ODBC support is: + + --with-pdo-odbc=generic,dir,libname,ldflags,cflags + + When build as shared the extension filename is always pdo_odbc.so" +ac_help="$ac_help + --with-pdo-pgsql[=DIR] PDO: PostgreSQL support. DIR is the PostgreSQL base + install directory or the path to pg_config" +ac_help="$ac_help + --without-pdo-sqlite[=DIR] + PDO: sqlite 3 support. DIR is the sqlite base + install directory [BUNDLED]" +ac_help="$ac_help + --with-pgsql[=DIR] Include PostgreSQL support. DIR is the PostgreSQL + base install directory or the path to pg_config" +ac_help="$ac_help + --disable-posix Disable POSIX-like functions" +ac_help="$ac_help + --with-pspell[=DIR] Include PSPELL support. + GNU Aspell version 0.50.0 or higher required" +ac_help="$ac_help + --with-libedit[=DIR] Include libedit readline replacement (CLI/CGI only)" +ac_help="$ac_help + --with-readline[=DIR] Include readline support (CLI/CGI only)" +ac_help="$ac_help + --with-recode[=DIR] Include recode support" +ac_help="$ac_help + --disable-reflection Disable reflection support" +ac_help="$ac_help + --disable-session Disable session support" +ac_help="$ac_help + --with-mm[=DIR] SESSION: Include mm support for session storage" +ac_help="$ac_help + --enable-shmop Enable shmop support" +ac_help="$ac_help + --disable-simplexml Disable SimpleXML support" +ac_help="$ac_help + --with-libxml-dir=DIR SimpleXML: libxml2 install prefix" +ac_help="$ac_help + --with-snmp[=DIR] Include SNMP support" +ac_help="$ac_help + --with-openssl-dir[=DIR] SNMP: openssl install prefix" +ac_help="$ac_help + --enable-ucd-snmp-hack SNMP: Enable UCD SNMP hack" +ac_help="$ac_help + --enable-soap Enable SOAP support" +ac_help="$ac_help + --with-libxml-dir=DIR SOAP: libxml2 install prefix" +ac_help="$ac_help + --enable-sockets Enable sockets support" +ac_help="$ac_help + --disable-spl Disable Standard PHP Library" +ac_help="$ac_help + --without-sqlite Do not include sqlite support. DIR is the sqlite base + install directory [BUNDLED]" +ac_help="$ac_help + --enable-sqlite-utf8 SQLite: Enable UTF-8 support for SQLite" +ac_help="$ac_help + --with-regex=TYPE regex library type: system, apache, php. [TYPE=php] + WARNING: Do NOT use unless you know what you are doing!" +ac_help="$ac_help + --with-sybase[=DIR] Include Sybase-DB support. DIR is the Sybase home + directory [/home/sybase]" +ac_help="$ac_help + --with-sybase-ct[=DIR] Include Sybase-CT support. DIR is the Sybase home + directory [/home/sybase]" +ac_help="$ac_help + --enable-sysvmsg Enable sysvmsg support" +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 + --with-tidy[=DIR] Include TIDY support" +ac_help="$ac_help + --disable-tokenizer Disable tokenizer support" +ac_help="$ac_help + --enable-wddx Enable WDDX support" +ac_help="$ac_help + --with-libxml-dir=DIR WDDX: libxml2 install prefix" +ac_help="$ac_help + --with-libexpat-dir=DIR WDDX: libexpat dir for XMLRPC-EPI (deprecated)" +ac_help="$ac_help + --disable-xml Disable XML support" +ac_help="$ac_help + --with-libxml-dir=DIR XML: libxml2 install prefix" +ac_help="$ac_help + --with-libexpat-dir=DIR XML: libexpat install prefix (deprecated)" +ac_help="$ac_help + --disable-xmlreader Disable XMLReader support" +ac_help="$ac_help + --with-libxml-dir=DIR XMLReader: libxml2 install prefix" +ac_help="$ac_help + --with-xmlrpc[=DIR] Include XMLRPC-EPI support" +ac_help="$ac_help + --with-libxml-dir=DIR XMLRPC-EPI: libxml2 install prefix" +ac_help="$ac_help + --with-libexpat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI (deprecated)" +ac_help="$ac_help + --with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI" +ac_help="$ac_help + --disable-xmlwriter Disable XMLWriter support" +ac_help="$ac_help + --with-libxml-dir=DIR XMLWriter: libxml2 install prefix" +ac_help="$ac_help + --with-xsl[=DIR] Include XSL support. DIR is the libxslt base + install directory (libxslt >= 1.1.0 required)" +ac_help="$ac_help + --enable-zip Include Zip read/write support" +ac_help="$ac_help + --with-zlib-dir[=DIR] ZIP: Set the path to libz install prefix" +ac_help="$ac_help + +PEAR: +" +ac_help="$ac_help + --with-pear=DIR Install PEAR in DIR [PREFIX/lib/php] + --without-pear Do not install PEAR" +ac_help="$ac_help + +Zend: +" +ac_help="$ac_help + --with-zend-vm=TYPE Set virtual machine dispatch method. Type is + one of "CALL", "SWITCH" or "GOTO" [TYPE=CALL]" +ac_help="$ac_help + --enable-maintainer-zts Enable thread safety - for code maintainers only!!" +ac_help="$ac_help + --disable-inline-optimization + If building zend_execute.lo fails, try this switch" +ac_help="$ac_help + --enable-zend-multibyte Compile with zend multibyte support" +ac_help="$ac_help + +TSRM: +" +ac_help="$ac_help + --with-tsrm-pth[=pth-config] + Use GNU Pth" +ac_help="$ac_help + --with-tsrm-st Use SGI's State Threads" +ac_help="$ac_help + --with-tsrm-pthreads Use POSIX threads (default)" +ac_help="$ac_help + +Libtool: +" +ac_help="$ac_help + --enable-shared[=PKGS] build shared libraries [default=yes]" +ac_help="$ac_help + --enable-static[=PKGS] build static libraries [default=yes]" +ac_help="$ac_help + --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" +ac_help="$ac_help + --with-gnu-ld assume the C compiler uses GNU ld [default=no]" + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + +ac_help="$ac_help + --disable-libtool-lock avoid locking (might break parallel builds)" +ac_help="$ac_help + --with-pic try to use only PIC/non-PIC objects [default=use both]" +ac_help="$ac_help + --with-tags[=TAGS] include additional configurations [automatic] +" +ac_help="$ac_help + --with-gnu-ld assume the C compiler uses GNU ld [default=no]" + +tagnames=${tagnames+${tagnames},}CXX + +# 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=README.CVS-RULES + +# 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 + + + + + +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:2153: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:2186: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for egrep""... $ac_c" 1>&6 +echo "configure:2217: checking for egrep" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_egrep'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi + +echo "$ac_t""$ac_cv_prog_egrep" 1>&6 + EGREP=$ac_cv_prog_egrep + + +echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6 +echo "configure:2232: checking for a sed that does not truncate output" >&5 +if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done + +fi + +SED=$lt_cv_path_SED +echo "$ac_t""$SED" 1>&6 + + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST EGREP" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST SED" + + + + test -f config.nice && mv config.nice config.nice.old + rm -f config.nice.old + cat >config.nice<> config.nice + fi + done + + echo "'$0' \\" >> config.nice + if test `expr -- $0 : "'.*"` = 0; then + CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$0'" + else + CONFIGURE_COMMAND="$CONFIGURE_COMMAND $0" + fi + for arg in $ac_configure_args; do + if test `expr -- $arg : "'.*"` = 0; then + if test `expr -- $arg : "--.*"` = 0; then + break; + fi + echo "'$arg' \\" >> config.nice + CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '$arg'" + else + if test `expr -- $arg : "'--.*"` = 0; then + break; + fi + echo "$arg \\" >> config.nice + CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $arg" + fi + done + echo '"$@"' >> config.nice + chmod +x config.nice + CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST CONFIGURE_COMMAND" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST CONFIGURE_OPTIONS" + + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:2382: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:2403: checking target system type" >&5 + +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$target" 1>&6 + + + if test -z "$host_alias" && test -n "$host"; then + host_alias=$host + fi + if test -z "$host_alias"; then + { echo "configure: error: host_alias is not set!" 1>&2; exit 1; } + fi + + + + +PHP_MAJOR_VERSION=5 +PHP_MINOR_VERSION=2 +PHP_RELEASE_VERSION=5 +PHP_EXTRA_VERSION="" +PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" +PHP_VERSION_ID=`expr $PHP_MAJOR_VERSION \* 10000 + $PHP_MINOR_VERSION \* 100 + $PHP_RELEASE_VERSION` + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_MAJOR_VERSION" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_MINOR_VERSION" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_RELEASE_VERSION" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_EXTRA_VERSION" + + + + +echo "/* automatically generated by configure */" > php_version.h.new +echo "/* edit configure.in to change version number */" >> php_version.h.new +echo "#define PHP_MAJOR_VERSION $PHP_MAJOR_VERSION" >> php_version.h.new +echo "#define PHP_MINOR_VERSION $PHP_MINOR_VERSION" >> php_version.h.new +echo "#define PHP_RELEASE_VERSION $PHP_RELEASE_VERSION" >> php_version.h.new +echo "#define PHP_EXTRA_VERSION \"$PHP_EXTRA_VERSION\"" >> php_version.h.new +echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new +echo "#define PHP_VERSION_ID $PHP_VERSION_ID" >> php_version.h.new +cmp php_version.h.new $srcdir/main/php_version.h >/dev/null 2>&1 +if test $? -ne 0 ; then + rm -f $srcdir/main/php_version.h && mv php_version.h.new $srcdir/main/php_version.h && \ + echo 'Updated main/php_version.h' +else + rm -f php_version.h.new +fi + + + +if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then + { echo "configure: error: --with-shared-apache is not supported. Please refer to the documentation for using APXS" 1>&2; exit 1; } +fi + +if test -n "$with_apache" && test -n "$with_apxs"; then + { echo "configure: error: --with-apache and --with-apxs cannot be used together" 1>&2; exit 1; } +fi + +if test -n "$with_apxs2filter" && test -n "$with_apxs2"; then + { echo "configure: error: --with-apxs2filter and --with-apxs2 cannot be used together" 1>&2; exit 1; } +fi + + + +cwd=`pwd` + +php_shtool=$srcdir/build/shtool +T_MD=`$php_shtool echo -n -e %B` +T_ME=`$php_shtool echo -n -e %b` + + +test -d include || $php_shtool mkdir include +> Makefile.objects +> Makefile.fragments +pattern=define +$EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null + + +test -z "$CFLAGS" && auto_cflags=1 + +abs_srcdir=`(cd $srcdir; pwd)` +abs_builddir=`pwd` + +php_abs_top_srcdir=$abs_srcdir +php_abs_top_builddir=$abs_builddir + + +$php_shtool mkdir -p libs +rm -f libs/* + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2515: 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:2545: 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:2596: 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:2628: 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 2639 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:2644: \"$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:2670: 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:2675: 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 <&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:2703: 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 how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:2735: 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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2756: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2773: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2790: \"$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 + + + ICC="no" + echo $ac_n "checking for icc""... $ac_c" 1>&6 +echo "configure:2817: checking for icc" >&5 + cat > conftest.$ac_ext <&5 | + egrep "^__INTEL_COMPILER" >/dev/null 2>&1; then + rm -rf conftest* + ICC="no" + echo "$ac_t""no" 1>&6 +else + rm -rf conftest* + ICC="yes" + echo "$ac_t""yes" 1>&6 + +fi +rm -f conftest* + + +if test "x$CC" != xcc; then + echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 +echo "configure:2839: 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:2842: 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:2854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:2855: \"$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:2860: \"$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:2862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:2863: \"$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 how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:2890: 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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2911: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2928: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2945: \"$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 AIX""... $ac_c" 1>&6 +echo "configure:2970: checking for AIX" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF +#define _ALL_SOURCE 1 +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:2994: 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 + + + +php_with_libdir=lib + +echo $ac_n "checking for system library directory""... $ac_c" 1>&6 +echo "configure:3019: checking for system library directory" >&5 +# Check whether --with-libdir or --without-libdir was given. +if test "${with_libdir+set}" = set; then + withval="$with_libdir" + PHP_LIBDIR=$withval +else + + PHP_LIBDIR=lib + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBDIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBDIR +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_rpath=yes + +echo $ac_n "checking whether to enable runpaths""... $ac_c" 1>&6 +echo "configure:3045: checking whether to enable runpaths" >&5 +# Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + PHP_RPATH=$enableval +else + + PHP_RPATH=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_RPATH=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_RPATH +echo "$ac_t""$ext_output" 1>&6 + + + + + +echo $ac_n "checking if compiler supports -R""... $ac_c" 1>&6 +echo "configure:3069: 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/$PHP_LIBDIR $LIBS" + cat > conftest.$ac_ext <&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 +else + echo $ac_n "checking if compiler supports -Wl,-rpath,""... $ac_c" 1>&6 +echo "configure:3102: 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/$PHP_LIBDIR $LIBS" + cat > conftest.$ac_ext <&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, + else + ld_runpath_switch=-L + fi +fi +if test "$PHP_RPATH" = "no"; then + ld_runpath_switch= +fi + + + + # Extract the first word of "re2c", so it can be a program name with args. +set dummy re2c; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3146: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RE2C'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RE2C"; then + ac_cv_prog_RE2C="$RE2C" # 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_RE2C="re2c" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +RE2C="$ac_cv_prog_RE2C" +if test -n "$RE2C"; then + echo "$ac_t""$RE2C" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -n "$RE2C"; then + echo $ac_n "checking for re2c version""... $ac_c" 1>&6 +echo "configure:3174: checking for re2c version" >&5 +if eval "test \"`echo '$''{'php_cv_re2c_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + re2c_vernum=`re2c --vernum 2>/dev/null` + if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1200"; then + php_cv_re2c_version=invalid + else + php_cv_re2c_version="`re2c --version | cut -d ' ' -f 2 2>/dev/null` (ok)" + fi + +fi + +echo "$ac_t""$php_cv_re2c_version" 1>&6 + fi + case $php_cv_re2c_version in + ""|invalid) + echo "configure: warning: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers." 1>&2 + RE2C="exit 0;" + ;; + esac + + PHP_VAR_SUBST="$PHP_VAR_SUBST RE2C" + + + + for ac_prog in gawk nawk awk mawk +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:3206: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/xpg4/bin/:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done +test -n "$AWK" || AWK="bork" + + case "$AWK" in + *mawk) + echo "configure: warning: mawk is known to have problems on some systems. You should install GNU awk" 1>&2 + ;; + *gawk) + ;; + bork) + { echo "configure: error: Could not find awk; Install GNU awk" 1>&2; exit 1; } + ;; + *) + echo $ac_n "checking if $AWK is broken""... $ac_c" 1>&6 +echo "configure:3247: checking if $AWK is broken" >&5 + if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then + echo "$ac_t""yes" 1>&6 + { echo "configure: error: You should install GNU awk" 1>&2; exit 1; } + else + echo "$ac_t""no" 1>&6 + fi + ;; + esac + + PHP_VAR_SUBST="$PHP_VAR_SUBST AWK" + + + + 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:3266: 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" + + + # we only support certain bison versions + bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3" + + # for standalone build of Zend Engine + test -z "$SED" && SED=sed + + bison_version=none + if test "$YACC"; then + echo $ac_n "checking for bison version""... $ac_c" 1>&6 +echo "configure:3306: checking for bison version" >&5 +if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z` + php_cv_bison_version=invalid + if test -n "$bison_version_vars"; then + set $bison_version_vars + bison_version="${1}.${2}" + for bison_check_version in $bison_version_list; do + if test "$bison_version" = "$bison_check_version"; then + php_cv_bison_version="$bison_check_version (ok)" + break + fi + done + fi + +fi + +echo "$ac_t""$php_cv_bison_version" 1>&6 + fi + case $php_cv_bison_version in + ""|invalid) + bison_msg="bison versions supported for regeneration of the Zend/PHP parsers: $bison_version_list (found: $bison_version)." + echo "configure: warning: $bison_msg" 1>&2 + YACC="exit 0;" + ;; + esac + + + PHP_VAR_SUBST="$PHP_VAR_SUBST YACC" + + + + flex_version_list="2.5.4" + + # Extract the first word of "flex", so it can be a program name with args. +set dummy flex; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3346: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # 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_LEX="flex" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" +fi +fi +LEX="$ac_cv_prog_LEX" +if test -n "$LEX"; then + echo "$ac_t""$LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$LEXLIB" +then + case "$LEX" in + flex*) ac_lib=fl ;; + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +echo "configure:3380: checking for yywrap in -l$ac_lib" >&5 +ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` +if eval "test \"`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$ac_lib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LEXLIB="-l$ac_lib" +else + echo "$ac_t""no" 1>&6 +fi + +fi + + if test "$LEX" = "flex"; then + echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +echo "configure:3423: checking lex output file root" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +echo '%% +%%' | $LEX +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } +fi +fi + +echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 +echo "configure:3444: checking whether yytext is a pointer" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS="$LIBS" +LIBS="$LIBS $LEXLIB" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_prog_lex_yytext_pointer=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +rm -f "${LEX_OUTPUT_ROOT}.c" + +fi + +echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then + cat >> confdefs.h <<\EOF +#define YYTEXT_POINTER 1 +EOF + +fi + + : + fi + echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:3487: 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 <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:3541: \"$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 "$LEX" = "flex"; then + echo $ac_n "checking for flex version""... $ac_c" 1>&6 +echo "configure:3567: checking for flex version" >&5 +if eval "test \"`echo '$''{'php_cv_flex_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'` + php_cv_flex_version=invalid + for flex_check_version in $flex_version_list; do + if test "$flex_version" = "$flex_check_version"; then + php_cv_flex_version="$flex_check_version (ok)" + fi + done + +fi + +echo "$ac_t""$php_cv_flex_version" 1>&6 + else + flex_version=none + fi + + case $php_cv_flex_version in + ""|invalid) + if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then + echo "configure: warning: flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)" 1>&2 + else + flex_msg="Supported flex versions are: $flex_version_list" + if test "$flex_version" = "none"; then + flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg" + else + flex_msg="Found invalid flex version: $flex_version. $flex_msg" + fi + { echo "configure: error: $flex_msg" 1>&2; exit 1; } + fi + LEX="exit 0;" + ;; + esac + + PHP_VAR_SUBST="$PHP_VAR_SUBST LEX" + + + + +case $host_cpu in +alpha*) + if test "$GCC" = "yes"; then + CFLAGS="$CFLAGS -mieee" + else + CFLAGS="$CFLAGS -ieee" + fi + ;; +esac + +case $host_alias in +*solaris*) + CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" + if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then + enable_libgcc=yes + fi + ;; +*dgux*) + CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";; +*darwin*|*rhapsody*) + if test -n "$GCC"; then + + gcc_arg_name=ac_cv_gcc_arg_no_cpp_precomp + echo $ac_n "checking whether $CC supports -no-cpp-precomp""... $ac_c" 1>&6 +echo "configure:3633: checking whether $CC supports -no-cpp-precomp" >&5 +if eval "test \"`echo '$''{'ac_cv_gcc_arg_no_cpp_precomp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo 'void somefunc() { };' > conftest.c + cmd='$CC -no-cpp-precomp -c conftest.c' + if eval $cmd 2>&1 | $EGREP -e -no-cpp-precomp >/dev/null ; then + ac_result=no + else + ac_result=yes + fi + eval $gcc_arg_name=$ac_result + rm -f conftest.* + +fi + +echo "$ac_t""$ac_cv_gcc_arg_no_cpp_precomp" 1>&6 + if eval test "\$$gcc_arg_name" = "yes"; then + gcc_no_cpp_precomp=yes + else + : + + fi + + if test "$gcc_no_cpp_precomp" = "yes"; then + CPPFLAGS="$CPPFLAGS -no-cpp-precomp" + fi + fi + cat >> confdefs.h <<\EOF +#define BIND_8_COMPAT 1 +EOF + + php_multiple_shlib_versions_ok=yes;; +*beos*) + beos_threads=1 + LIBS="$LIBS -lbe -lroot";; +*mips*) + CPPFLAGS="$CPPFLAGS -D_XPG_IV";; +*hpux*) + if test "$GCC" = "yes"; then + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" + fi + ;; +*netware*) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + + + case /main in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "/main"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir//main/"; ac_bdir="/main/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in internal_functions.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<&6 +echo "configure:3831: checking whether to force non-PIC code in shared modules" >&5 +case $host_alias in +i?86-*-linux*|i?86-*-freebsd*) + if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then + with_pic=no + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + ;; +*) echo "$ac_t""no" 1>&6 ;; +esac + + + + + + + + + + + + + + + +echo $ac_n "checking whether /dev/urandom exists""... $ac_c" 1>&6 +echo "configure:3859: checking whether /dev/urandom exists" >&5 +if test -r "/dev/urandom" && test -c "/dev/urandom"; then + cat >> confdefs.h <<\EOF +#define HAVE_DEV_URANDOM 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + + + + + + + + + + + + + + + + + + + + + + +if test "$beos_threads" = "1"; then + pthreads_working="yes" + ac_cv_pthreads_cflags="" +else + save_CFLAGS=$CFLAGS + save_LIBS=$LIBS + +if test -n "$ac_cv_pthreads_lib"; then + LIBS="$LIBS -l$ac_cv_pthreads_lib" +fi + +if test -n "$ac_cv_pthreads_cflags"; then + CFLAGS="$CFLAGS $ac_cv_pthreads_cflags" +fi + + +if test "$cross_compiling" = yes; then + + pthreads_working=no + case $host_alias in + *netware*) + pthreads_working=yes + esac + + +else + cat > conftest.$ac_ext < +#include + +void *thread_routine(void *data) { + return data; +} + +int main() { + pthread_t thd; + pthread_mutexattr_t mattr; + int data = 1; + pthread_mutexattr_init(&mattr); + return pthread_create(&thd, NULL, thread_routine, &data); +} +EOF +if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + pthreads_working=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + pthreads_working=no + +fi +rm -fr conftest* +fi + + LIBS=$save_LIBS + CFLAGS=$save_CFLAGS + + echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6 +echo "configure:3958: checking for pthreads_cflags" >&5 +if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ac_cv_pthreads_cflags= + if test "$pthreads_working" != "yes"; then + for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do + ac_save=$CFLAGS + CFLAGS="$CFLAGS $flag" + +if test "$cross_compiling" = yes; then + + pthreads_working=no + case $host_alias in + *netware*) + pthreads_working=yes + esac + + +else + cat > conftest.$ac_ext < +#include + +void *thread_routine(void *data) { + return data; +} + +int main() { + pthread_t thd; + pthread_mutexattr_t mattr; + int data = 1; + pthread_mutexattr_init(&mattr); + return pthread_create(&thd, NULL, thread_routine, &data); +} +EOF +if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + pthreads_working=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + pthreads_working=no + +fi +rm -fr conftest* +fi + + CFLAGS=$ac_save + if test "$pthreads_working" = "yes"; then + ac_cv_pthreads_cflags=$flag + break + fi + done + fi +fi + +fi + +echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6 + +echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6 +echo "configure:4028: checking for pthreads_lib" >&5 +if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_cv_pthreads_lib= +if test "$pthreads_working" != "yes"; then + for lib in pthread pthreads c_r; do + ac_save=$LIBS + LIBS="$LIBS -l$lib" + +if test "$cross_compiling" = yes; then + + pthreads_working=no + case $host_alias in + *netware*) + pthreads_working=yes + esac + + +else + cat > conftest.$ac_ext < +#include + +void *thread_routine(void *data) { + return data; +} + +int main() { + pthread_t thd; + pthread_mutexattr_t mattr; + int data = 1; + pthread_mutexattr_init(&mattr); + return pthread_create(&thd, NULL, thread_routine, &data); +} +EOF +if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + pthreads_working=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + pthreads_working=no + +fi +rm -fr conftest* +fi + + LIBS=$ac_save + if test "$pthreads_working" = "yes"; then + ac_cv_pthreads_lib=$lib + break + fi + done +fi + +fi + +echo "$ac_t""$ac_cv_pthreads_lib" 1>&6 + +if test "$pthreads_working" = "yes"; then + threads_result="POSIX-Threads found" +else + threads_result="POSIX-Threads not found" +fi + + +# Check whether --enable- or --disable- was given. +if test "${enable_+set}" = set; then + enableval="$enable_" + : +fi + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST SHLIB_SUFFIX_NAME" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST SHLIB_DL_SUFFIX_NAME" + + + + SHLIB_SUFFIX_NAME=so + SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME + case $host_alias in + *hpux*) + SHLIB_SUFFIX_NAME=sl + SHLIB_DL_SUFFIX_NAME=sl + ;; + *darwin*) + SHLIB_SUFFIX_NAME=dylib + SHLIB_DL_SUFFIX_NAME=so + ;; + esac + +PHP_SAPI=default + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + + + +SAPI_SHARED=libs/libphp$PHP_MAJOR_VERSION.$SHLIB_DL_SUFFIX_NAME +SAPI_STATIC=libs/libphp$PHP_MAJOR_VERSION.a +SAPI_LIBTOOL=libphp$PHP_MAJOR_VERSION.la + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}Configuring SAPI modules${T_ME}" 1>&6 + + + + + +php_with_aolserver=no + + +# Check whether --with-aolserver or --without-aolserver was given. +if test "${with_aolserver+set}" = set; then + withval="$with_aolserver" + PHP_AOLSERVER=$withval +else + + PHP_AOLSERVER=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_AOLSERVER=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_AOLSERVER + + + + + +echo $ac_n "checking for AOLserver support""... $ac_c" 1>&6 +echo "configure:4202: checking for AOLserver support" >&5 + +if test "$PHP_AOLSERVER" != "no"; then + if test -d "$PHP_AOLSERVER/include"; then + PHP_AOLSERVER_SRC=$PHP_AOLSERVER + fi + if test -z "$PHP_AOLSERVER_SRC" || test ! -d $PHP_AOLSERVER_SRC/include; then + { echo "configure: error: Please specify the path to the source distribution of AOLserver using --with-aolserver-src=DIR" 1>&2; exit 1; } + fi + if test ! -d $PHP_AOLSERVER/bin ; then + { echo "configure: error: Please specify the path to the root of AOLserver using --with-aolserver=DIR" 1>&2; exit 1; } + fi + + enable_maintainer_zts=yes + if test "$pthreads_working" != "yes"; then + { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; } + fi + + + if test "$PHP_AOLSERVER_SRC/include" != "/usr/include"; then + + if test -z "$PHP_AOLSERVER_SRC/include" || echo "$PHP_AOLSERVER_SRC/include" | grep '^/' >/dev/null ; then + ai_p=$PHP_AOLSERVER_SRC/include + else + + ep_dir="`echo $PHP_AOLSERVER_SRC/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_AOLSERVER_SRC/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_AOLSERVER 1 +EOF + + + PHP_SAPI=aolserver + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/aolserver in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/aolserver"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/aolserver/"; ac_bdir="sapi/aolserver/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in aolserver.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + + + + + +php_with_apxs=no + + +# Check whether --with-apxs or --without-apxs was given. +if test "${with_apxs+set}" = set; then + withval="$with_apxs" + PHP_APXS=$withval +else + + PHP_APXS=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_APXS=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_APXS + + + + + +echo $ac_n "checking for Apache 1.x module support via DSO through APXS""... $ac_c" 1>&6 +echo "configure:4459: checking for Apache 1.x module support via DSO through APXS" >&5 + +if test "$PHP_APXS" != "no"; then + if test "$PHP_APXS" = "yes"; then + APXS=apxs + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0" && test -x /usr/sbin/apxs; then #SUSE 6.x + APXS=/usr/sbin/apxs + fi + else + + if test -z "$PHP_APXS" || echo "$PHP_APXS" | grep '^/' >/dev/null ; then + APXS=$PHP_APXS + else + + ep_dir="`echo $PHP_APXS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + APXS="$ep_realdir/`basename \"$PHP_APXS\"`" + fi + + fi + + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0"; then + echo "$ac_t""" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""Sorry, I was not able to successfully run APXS. Possible reasons:" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""1. Perl is not installed;" 1>&6 + echo "$ac_t""2. Apache was not compiled with DSO support (--enable-module=so);" 1>&6 + echo "$ac_t""3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs" 1>&6 + echo "$ac_t""The output of $APXS follows" 1>&6 + $APXS -q CFLAGS + { echo "configure: error: Aborting" 1>&2; exit 1; } + fi + + APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@" + APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR` + APXS_CFLAGS=`$APXS -q CFLAGS` + APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET` + APACHE_INCLUDE=-I$APXS_INCLUDEDIR + + # Test that we're trying to configure with apache 1.x + + ac_output=`$APXS_HTTPD -v 2>&1 | grep version` + ac_IFS=$IFS +IFS="- /. +" + set $ac_output + IFS=$ac_IFS + + APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6` + + if test "$APACHE_VERSION" -ge 2000000; then + { echo "configure: error: You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2" 1>&2; exit 1; } + fi + + for flag in $APXS_CFLAGS; do + case $flag in + -D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";; + esac + done + + case $host_alias in + *aix*) + APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR` + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp" + PHP_AIX_LDFLAGS="-Wl,-brtl" + build_type=shared + ;; + *darwin*) + MH_BUNDLE_FLAGS="-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD" + + PHP_VAR_SUBST="$PHP_VAR_SUBST MH_BUNDLE_FLAGS" + + SAPI_SHARED=libs/libphp5.so + build_type=bundle + ;; + *) + build_type=shared + ;; + esac + + + PHP_SAPI=apache + + case "$build_type" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache/"; ac_bdir="sapi/apache/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects</dev/null 2>&1 + + if test "$?" != "0"; then + APACHE_INSTALL="$APXS -i -a -n php5 $SAPI_SHARED" # Old apxs does not have -S option + else + APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` + if test -z `$APXS -q SYSCONFDIR`; then + APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -i -n php5 $SAPI_SHARED" + else + APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` + APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -S SYSCONFDIR='$APXS_SYSCONFDIR' \ + -i -a -n php5 $SAPI_SHARED" + fi + fi + + if test -z "`$APXS -q LD_SHLIB`" || test "`$APXS -q LIBEXECDIR`" = "modules"; then + PHP_APXS_BROKEN=yes + fi + STRONGHOLD= + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_APACHE 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +php_with_apache=no + + +# Check whether --with-apache or --without-apache was given. +if test "${with_apache+set}" = set; then + withval="$with_apache" + PHP_APACHE=$withval +else + + PHP_APACHE=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_APACHE=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_APACHE + + + + + +echo $ac_n "checking for Apache 1.x module support""... $ac_c" 1>&6 +echo "configure:4782: checking for Apache 1.x module support" >&5 + +if test "$PHP_SAPI" != "apache" && test "$PHP_APACHE" != "no"; then + + if test "$PHP_APACHE" = "yes"; then + # Apache's default directory + PHP_APACHE=/usr/local/apache + fi + + APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php5.* sapi/apache/libphp5.module" + + cat >> confdefs.h <<\EOF +#define HAVE_APACHE 1 +EOF + + APACHE_MODULE=yes + + if test -z "$PHP_APACHE" || echo "$PHP_APACHE" | grep '^/' >/dev/null ; then + PHP_APACHE=$PHP_APACHE + else + + ep_dir="`echo $PHP_APACHE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + PHP_APACHE="$ep_realdir/`basename \"$PHP_APACHE\"`" + fi + + # For Apache 1.2.x + if test -f $PHP_APACHE/src/httpd.h; then + APACHE_INCLUDE=-I$PHP_APACHE/src + APACHE_TARGET=$PHP_APACHE/src + + PHP_SAPI=apache + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache/"; ac_bdir="sapi/apache/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + STRONGHOLD= + if test -f $PHP_APACHE/src/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + # For Apache 2.0.x + elif test -f $PHP_APACHE/include/httpd.h && test -f $PHP_APACHE/srclib/apr/include/apr_general.h ; then + { echo "configure: error: Use --with-apxs2 with Apache 2.x!" 1>&2; exit 1; } + # For Apache 1.3.x + elif test -f $PHP_APACHE/src/main/httpd.h; then + APACHE_HAS_REGEX=1 + APACHE_INCLUDE="-I$PHP_APACHE/src/main -I$PHP_APACHE/src/os/unix -I$PHP_APACHE/src/ap" + APACHE_TARGET=$PHP_APACHE/src/modules/php5 + if test ! -d $APACHE_TARGET; then + mkdir $APACHE_TARGET + fi + + PHP_SAPI=apache + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache/"; ac_bdir="sapi/apache/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + STRONGHOLD= + if test -f $PHP_APACHE/src/include/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + if test -f $PHP_APACHE/src/include/ap_compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + if test ! -f $PHP_APACHE/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 + elif test -f $PHP_APACHE/src/include/compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_OLD_COMPAT_H 1 +EOF + + fi + # Also for Apache 1.3.x + elif test -f $PHP_APACHE/src/include/httpd.h; then + APACHE_HAS_REGEX=1 + APACHE_INCLUDE="-I$PHP_APACHE/src/include -I$PHP_APACHE/src/os/unix" + APACHE_TARGET=$PHP_APACHE/src/modules/php5 + if test ! -d $APACHE_TARGET; then + mkdir $APACHE_TARGET + fi + + PHP_SAPI=apache + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache/"; ac_bdir="sapi/apache/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + STRONGHOLD= + if test -f $PHP_APACHE/src/include/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + if test -f $PHP_APACHE/src/include/ap_compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + if test ! -f $PHP_APACHE/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 + elif test -f $PHP_APACHE/src/include/compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_OLD_COMPAT_H 1 +EOF + + fi + # For StrongHold 2.2 + elif test -f $PHP_APACHE/apache/httpd.h; then + APACHE_INCLUDE="-I$PHP_APACHE/apache -I$PHP_APACHE/ssl/include" + APACHE_TARGET=$PHP_APACHE/apache + + PHP_SAPI=apache + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache/"; ac_bdir="sapi/apache/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + if test -f $PHP_APACHE/apache/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + if test -f $PHP_APACHE/src/ap_compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + if test ! -f $PHP_APACHE/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 + elif test -f $PHP_APACHE/src/compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_OLD_COMPAT_H 1 +EOF + + fi + else + echo "$ac_t""no" 1>&6 + { echo "configure: error: Invalid Apache directory - unable to find httpd.h under $PHP_APACHE" 1>&2; exit 1; } + fi +else + echo "$ac_t""no" 1>&6 +fi + +# compatibility +if test -z "$enable_mod_charset" && test "$with_mod_charset"; then + enable_mod_charset=$with_mod_charset +fi + + +php_enable_mod_charset=no + +echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6 +echo "configure:5615: checking whether to enable Apache charset compatibility option" >&5 +# Check whether --enable-mod-charset or --disable-mod-charset was given. +if test "${enable_mod_charset+set}" = set; then + enableval="$enable_mod_charset" + PHP_MOD_CHARSET=$enableval +else + + PHP_MOD_CHARSET=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MOD_CHARSET=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MOD_CHARSET +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MOD_CHARSET" = "yes"; then + cat >> confdefs.h <<\EOF +#define USE_TRANSFER_TABLES 1 +EOF + +fi + +if test "$APACHE_MODULE" = "yes"; then + + if test -n "$GCC"; then + + gcc_arg_name=ac_cv_gcc_arg_rdynamic + echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 +echo "configure:5650: checking whether $CC supports -rdynamic" >&5 +if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo 'void somefunc() { };' > conftest.c + cmd='$CC -rdynamic -c conftest.c' + if eval $cmd 2>&1 | $EGREP -e -rdynamic >/dev/null ; then + ac_result=no + else + ac_result=yes + fi + eval $gcc_arg_name=$ac_result + rm -f conftest.* + +fi + +echo "$ac_t""$ac_cv_gcc_arg_rdynamic" 1>&6 + if eval test "\$$gcc_arg_name" = "yes"; then + gcc_rdynamic=yes + else + : + + fi + + if test "$gcc_rdynamic" = "yes"; then + PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic" + fi + fi + + $php_shtool mkdir -p sapi/apache + + PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES sapi/apache/libphp5.module" + +fi + +if test -n "$APACHE_INSTALL"; then + if test "x$APXS" != "x" -a "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then + APXS_EXP=-bE:sapi/apache/mod_php5.exp + fi + + +echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6 +echo "configure:5693: checking for member fd in BUFF *" >&5 +if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + save=$CPPFLAGS + if test -n "$APXS_INCLUDEDIR"; then + CPPFLAGS="$CPPFLAGS -I$APXS_INCLUDEDIR" + else + CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE" + fi + cat > conftest.$ac_ext < +int main() { +conn_rec *c; int fd = c->client->fd; +; return 0; } +EOF +if { (eval echo configure:5712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_php_fd_in_buff=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_php_fd_in_buff=no +fi +rm -f conftest* + CPPFLAGS=$save + +fi + +echo "$ac_t""$ac_cv_php_fd_in_buff" 1>&6 +if test "$ac_cv_php_fd_in_buff" = "yes"; then + cat >> confdefs.h <<\EOF +#define PHP_APACHE_HAVE_CLIENT_FD 1 +EOF + +fi + + INSTALL_IT=$APACHE_INSTALL + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS_EXP" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APACHE_INCLUDE" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APACHE_TARGET" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS_LDFLAGS" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APACHE_INSTALL" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST STRONGHOLD" + +fi + + + + +php_with_apxs2filter=no + + +# Check whether --with-apxs2filter or --without-apxs2filter was given. +if test "${with_apxs2filter+set}" = set; then + withval="$with_apxs2filter" + PHP_APXS2FILTER=$withval +else + + PHP_APXS2FILTER=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_APXS2FILTER=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_APXS2FILTER + + + + + +echo $ac_n "checking for Apache 2.0 filter-module support via DSO through APXS""... $ac_c" 1>&6 +echo "configure:5788: checking for Apache 2.0 filter-module support via DSO through APXS" >&5 + +if test "$PHP_APXS2FILTER" != "no"; then + if test "$PHP_APXS2FILTER" = "yes"; then + APXS=apxs + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0" && test -x /usr/sbin/apxs; then + APXS=/usr/sbin/apxs + fi + else + + if test -z "$PHP_APXS2FILTER" || echo "$PHP_APXS2FILTER" | grep '^/' >/dev/null ; then + APXS=$PHP_APXS2FILTER + else + + ep_dir="`echo $PHP_APXS2FILTER|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + APXS="$ep_realdir/`basename \"$PHP_APXS2FILTER\"`" + fi + + fi + + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0"; then + echo "$ac_t""" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""Sorry, I cannot run apxs. Possible reasons follow:" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""1. Perl is not installed" 1>&6 + echo "$ac_t""2. apxs was not found. Try to pass the path using --with-apxs2filter=/path/to/apxs" 1>&6 + echo "$ac_t""3. Apache was not built using --enable-so (the apxs usage page is displayed)" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""The output of $APXS follows:" 1>&6 + $APXS -q CFLAGS + { echo "configure: error: Aborting" 1>&2; exit 1; } + fi + + APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR` + APXS_BINDIR=`$APXS -q BINDIR` + APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET` + APXS_CFLAGS=`$APXS -q CFLAGS` + APXS_MPM=`$APXS -q MPM_NAME` + APU_BINDIR=`$APXS -q APU_BINDIR` + APR_BINDIR=`$APXS -q APR_BINDIR` + + # Pick up ap[ru]-N-config if using httpd >=2.1 + APR_CONFIG=`$APXS -q APR_CONFIG 2>/dev/null || + echo $APR_BINDIR/apr-config` + APU_CONFIG=`$APXS -q APU_CONFIG 2>/dev/null || + echo $APU_BINDIR/apu-config` + + APR_CFLAGS="`$APR_CONFIG --cppflags --includes`" + APU_CFLAGS="`$APU_CONFIG --includes`" + + for flag in $APXS_CFLAGS; do + case $flag in + -D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";; + esac + done + + APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS" + + # Test that we're trying to configure with apache 2.x + + ac_output=`$APXS_HTTPD -v 2>&1 | grep version` + ac_IFS=$IFS +IFS="- /. +" + set $ac_output + IFS=$ac_IFS + + APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6` + + if test "$APACHE_VERSION" -le 2000000; then + { echo "configure: error: You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)" 1>&2; exit 1; } + elif test "$APACHE_VERSION" -lt 2000040; then + { echo "configure: error: Please note that Apache version >= 2.0.40 is required" 1>&2; exit 1; } + fi + + APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` + if test -z `$APXS -q SYSCONFDIR`; then + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -i -n php5" + else + APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -S SYSCONFDIR='$APXS_SYSCONFDIR' \ + -i -a -n php5" + fi + + case $host_alias in + *aix*) + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp" + + PHP_SAPI=apache2filter + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache2filter in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache2filter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache2filter/"; ac_bdir="sapi/apache2filter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache2.c apache_config.c php_functions.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_CFLAGS $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + + fi + echo "$ac_t""yes" 1>&6 + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS" + +else + echo "$ac_t""no" 1>&6 +fi + + + + +php_with_apxs2=no + + +# Check whether --with-apxs2 or --without-apxs2 was given. +if test "${with_apxs2+set}" = set; then + withval="$with_apxs2" + PHP_APXS2=$withval +else + + PHP_APXS2=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_APXS2=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_APXS2 + + + + + +echo $ac_n "checking for Apache 2.0 handler-module support via DSO through APXS""... $ac_c" 1>&6 +echo "configure:6636: checking for Apache 2.0 handler-module support via DSO through APXS" >&5 + +if test "$PHP_APXS2" != "no"; then + if test "$PHP_APXS2" = "yes"; then + APXS=apxs + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0" && test -x /usr/sbin/apxs; then + APXS=/usr/sbin/apxs + fi + else + + if test -z "$PHP_APXS2" || echo "$PHP_APXS2" | grep '^/' >/dev/null ; then + APXS=$PHP_APXS2 + else + + ep_dir="`echo $PHP_APXS2|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + APXS="$ep_realdir/`basename \"$PHP_APXS2\"`" + fi + + fi + + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0"; then + echo "$ac_t""" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""Sorry, I cannot run apxs. Possible reasons follow:" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""1. Perl is not installed" 1>&6 + echo "$ac_t""2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs" 1>&6 + echo "$ac_t""3. Apache was not built using --enable-so (the apxs usage page is displayed)" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""The output of $APXS follows:" 1>&6 + $APXS -q CFLAGS + { echo "configure: error: Aborting" 1>&2; exit 1; } + fi + + APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR` + APXS_BINDIR=`$APXS -q BINDIR` + APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET` + APXS_CFLAGS=`$APXS -q CFLAGS` + APXS_MPM=`$APXS -q MPM_NAME` + APU_BINDIR=`$APXS -q APU_BINDIR` + APR_BINDIR=`$APXS -q APR_BINDIR` + + # Pick up ap[ru]-N-config if using httpd >=2.1 + APR_CONFIG=`$APXS -q APR_CONFIG 2>/dev/null || + echo $APR_BINDIR/apr-config` + APU_CONFIG=`$APXS -q APU_CONFIG 2>/dev/null || + echo $APU_BINDIR/apu-config` + + APR_CFLAGS="`$APR_CONFIG --cppflags --includes`" + APU_CFLAGS="`$APU_CONFIG --includes`" + + for flag in $APXS_CFLAGS; do + case $flag in + -D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";; + esac + done + + APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS" + + # Test that we're trying to configure with apache 2.x + + ac_output=`$APXS_HTTPD -v 2>&1 | grep version` + ac_IFS=$IFS +IFS="- /. +" + set $ac_output + IFS=$ac_IFS + + APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6` + + if test "$APACHE_VERSION" -le 2000000; then + { echo "configure: error: You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)" 1>&2; exit 1; } + elif test "$APACHE_VERSION" -lt 2000044; then + { echo "configure: error: Please note that Apache version >= 2.0.44 is required" 1>&2; exit 1; } + fi + + APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` + if test -z `$APXS -q SYSCONFDIR`; then + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -i -n php5" + else + APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -S SYSCONFDIR='$APXS_SYSCONFDIR' \ + -i -a -n php5" + fi + + case $host_alias in + *aix*) + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp" + + PHP_SAPI=apache2handler + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache2handler in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache2handler"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache2handler/"; ac_bdir="sapi/apache2handler/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in mod_php5.c sapi_apache2.c apache_config.c php_functions.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_CFLAGS $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + + fi + echo "$ac_t""yes" 1>&6 + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS" + +else + echo "$ac_t""no" 1>&6 +fi + + + + + +php_with_apache_hooks=no + + +# Check whether --with-apache-hooks or --without-apache-hooks was given. +if test "${with_apache_hooks+set}" = set; then + withval="$with_apache_hooks" + PHP_APACHE_HOOKS=$withval +else + + PHP_APACHE_HOOKS=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_APACHE_HOOKS=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_APACHE_HOOKS + + + + + +echo $ac_n "checking for Apache 1.x (hooks) module support via DSO through APXS""... $ac_c" 1>&6 +echo "configure:7485: checking for Apache 1.x (hooks) module support via DSO through APXS" >&5 + +if test "$PHP_APACHE_HOOKS" != "no"; then + if test "$PHP_APACHE_HOOKS" = "yes"; then + APXS=apxs + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0" && test -x /usr/sbin/apxs; then #SUSE 6.x + APXS=/usr/sbin/apxs + fi + else + + if test -z "$PHP_APACHE_HOOKS" || echo "$PHP_APACHE_HOOKS" | grep '^/' >/dev/null ; then + APXS=$PHP_APACHE_HOOKS + else + + ep_dir="`echo $PHP_APACHE_HOOKS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + APXS="$ep_realdir/`basename \"$PHP_APACHE_HOOKS\"`" + fi + + fi + + $APXS -q CFLAGS >/dev/null 2>&1 + if test "$?" != "0"; then + echo "$ac_t""" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""Sorry, I was not able to successfully run APXS. Possible reasons:" 1>&6 + echo "$ac_t""" 1>&6 + echo "$ac_t""1. Perl is not installed;" 1>&6 + echo "$ac_t""2. Apache was not compiled with DSO support (--enable-module=so);" 1>&6 + echo "$ac_t""3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs" 1>&6 + echo "$ac_t""The output of $APXS follows" 1>&6 + $APXS -q CFLAGS + { echo "configure: error: Aborting" 1>&2; exit 1; } + fi + + APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@" + APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR` + APXS_CFLAGS=`$APXS -q CFLAGS` + APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET` + APACHE_INCLUDE=-I$APXS_INCLUDEDIR + + # Test that we're trying to configure with apache 1.x + + ac_output=`$APXS_HTTPD -v 2>&1 | grep version` + ac_IFS=$IFS +IFS="- /. +" + set $ac_output + IFS=$ac_IFS + + APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6` + + if test "$APACHE_VERSION" -ge 2000000; then + { echo "configure: error: You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2" 1>&2; exit 1; } + fi + + for flag in $APXS_CFLAGS; do + case $flag in + -D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";; + esac + done + + case $host_alias in + *aix*) + APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR` + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp" + PHP_AIX_LDFLAGS="-Wl,-brtl" + build_type=shared + ;; + *darwin*) + MH_BUNDLE_FLAGS="-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD" + + PHP_VAR_SUBST="$PHP_VAR_SUBST MH_BUNDLE_FLAGS" + + SAPI_SHARED=libs/libphp5.so + build_type=bundle + ;; + *) + build_type=shared + ;; + esac + + + PHP_SAPI=apache_hooks + + case "$build_type" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache_hooks in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache_hooks"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache_hooks/"; ac_bdir="sapi/apache_hooks/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects</dev/null 2>&1 + + if test "$?" != "0"; then + APACHE_HOOKS_INSTALL="$APXS -i -a -n php5 $SAPI_SHARED" # Old apxs does not have -S option + else + APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` + if test -z `$APXS -q SYSCONFDIR`; then + APACHE_HOOKS_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -i -n php5 $SAPI_SHARED" + else + APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` + APACHE_HOOKS_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -S SYSCONFDIR='$APXS_SYSCONFDIR' \ + -i -a -n php5 $SAPI_SHARED" + fi + fi + + if test -z "`$APXS -q LD_SHLIB`" || test "`$APXS -q LIBEXECDIR`" = "modules"; then + PHP_APXS_BROKEN=yes + fi + STRONGHOLD= + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_APACHE_HOOKS 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +php_with_apache_hooks_static=no + + +# Check whether --with-apache-hooks-static or --without-apache-hooks-static was given. +if test "${with_apache_hooks_static+set}" = set; then + withval="$with_apache_hooks_static" + PHP_APACHE_HOOKS_STATIC=$withval +else + + PHP_APACHE_HOOKS_STATIC=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_APACHE_HOOKS_STATIC=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_APACHE_HOOKS_STATIC + + + + + +echo $ac_n "checking for Apache 1.x (hooks) module support""... $ac_c" 1>&6 +echo "configure:7808: checking for Apache 1.x (hooks) module support" >&5 + +if test "$PHP_SAPI" != "apache" && test "$PHP_SAPI" != "apache_hooks" && test "$PHP_APACHE_HOOKS_STATIC" != "no"; then + + if test "$PHP_APACHE_HOOKS_STATIC" = "yes"; then + # Apache's default directory + PHP_APACHE_HOOKS_STATIC=/usr/local/apache + fi + + APACHE_HOOKS_INSTALL_FILES="\$(srcdir)/sapi/apache_hooks/mod_php5.* sapi/apache_hooks/libphp5.module" + + cat >> confdefs.h <<\EOF +#define HAVE_APACHE 1 +EOF + + APACHE_HOOKS_MODULE=yes + + if test -z "$PHP_APACHE_HOOKS_STATIC" || echo "$PHP_APACHE_HOOKS_STATIC" | grep '^/' >/dev/null ; then + PHP_APACHE_HOOKS_STATIC=$PHP_APACHE_HOOKS_STATIC + else + + ep_dir="`echo $PHP_APACHE_HOOKS_STATIC|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + PHP_APACHE_HOOKS_STATIC="$ep_realdir/`basename \"$PHP_APACHE_HOOKS_STATIC\"`" + fi + + # For Apache 1.2.x + if test -f $PHP_APACHE_HOOKS_STATIC/src/httpd.h; then + APACHE_INCLUDE=-I$PHP_APACHE_HOOKS_STATIC/src + APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/src + + PHP_SAPI=apache_hooks + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache_hooks in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache_hooks"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache_hooks/"; ac_bdir="sapi/apache_hooks/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + STRONGHOLD= + if test -f $PHP_APACHE_HOOKS_STATIC/src/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + # For Apache 2.0.x + elif test -f $PHP_APACHE_HOOKS_STATIC/include/httpd.h && test -f $PHP_APACHE_HOOKS_STATIC/srclib/apr/include/apr_general.h ; then + { echo "configure: error: Use --with-apxs2 with Apache 2.x!" 1>&2; exit 1; } + # For Apache 1.3.x + elif test -f $PHP_APACHE_HOOKS_STATIC/src/main/httpd.h; then + APACHE_HAS_REGEX=1 + APACHE_INCLUDE="-I$PHP_APACHE_HOOKS_STATIC/src/main -I$PHP_APACHE_HOOKS_STATIC/src/os/unix -I$PHP_APACHE_HOOKS_STATIC/src/ap" + APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/src/modules/php5 + if test ! -d $APACHE_TARGET; then + mkdir $APACHE_TARGET + fi + + PHP_SAPI=apache_hooks + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache_hooks in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache_hooks"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache_hooks/"; ac_bdir="sapi/apache_hooks/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + STRONGHOLD= + if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + if test ! -f $PHP_APACHE_HOOKS_STATIC/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 + elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_OLD_COMPAT_H 1 +EOF + + fi + # Also for Apache 1.3.x + elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/httpd.h; then + APACHE_HAS_REGEX=1 + APACHE_INCLUDE="-I$PHP_APACHE_HOOKS_STATIC/src/include -I$PHP_APACHE_HOOKS_STATIC/src/os/unix" + APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/src/modules/php5 + if test ! -d $APACHE_TARGET; then + mkdir $APACHE_TARGET + fi + + PHP_SAPI=apache_hooks + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache_hooks in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache_hooks"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache_hooks/"; ac_bdir="sapi/apache_hooks/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + STRONGHOLD= + if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + if test ! -f $PHP_APACHE_HOOKS_STATIC/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 + elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_OLD_COMPAT_H 1 +EOF + + fi + # For StrongHold 2.2 + elif test -f $PHP_APACHE_HOOKS_STATIC/apache/httpd.h; then + APACHE_INCLUDE="-I$PHP_APACHE_HOOKS_STATIC/apache -I$PHP_APACHE_HOOKS_STATIC/ssl/include" + APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/apache + + PHP_SAPI=apache_hooks + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/apache_hooks in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/apache_hooks"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/apache_hooks/"; ac_bdir="sapi/apache_hooks/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sapi_apache.c mod_php5.c php_apache.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $APACHE_INCLUDE $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $APACHE_INCLUDE $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 + if test -f $PHP_APACHE_HOOKS_STATIC/apache/ap_config.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_CONFIG_H 1 +EOF + + fi + if test -f $PHP_APACHE_HOOKS_STATIC/src/ap_compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_AP_COMPAT_H 1 +EOF + + if test ! -f $PHP_APACHE_HOOKS_STATIC/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 + elif test -f $PHP_APACHE_HOOKS_STATIC/src/compat.h; then + cat >> confdefs.h <<\EOF +#define HAVE_OLD_COMPAT_H 1 +EOF + + fi + else + echo "$ac_t""no" 1>&6 + { echo "configure: error: Invalid Apache directory - unable to find httpd.h under $PHP_APACHE_HOOKS_STATIC" 1>&2; exit 1; } + fi +else + echo "$ac_t""no" 1>&6 +fi + +# compatibility +if test -z "$enable_mod_charset" && test "$with_mod_charset"; then + enable_mod_charset=$with_mod_charset +fi + + +php_enable_mod_charset=no + +echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6 +echo "configure:8641: checking whether to enable Apache charset compatibility option" >&5 +# Check whether --enable-mod-charset or --disable-mod-charset was given. +if test "${enable_mod_charset+set}" = set; then + enableval="$enable_mod_charset" + PHP_MOD_CHARSET=$enableval +else + + PHP_MOD_CHARSET=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MOD_CHARSET=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MOD_CHARSET +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MOD_CHARSET" = "yes"; then + cat >> confdefs.h <<\EOF +#define USE_TRANSFER_TABLES 1 +EOF + +fi + +if test "$APACHE_HOOKS_MODULE" = "yes"; then + + if test -n "$GCC"; then + + gcc_arg_name=ac_cv_gcc_arg_rdynamic + echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 +echo "configure:8676: checking whether $CC supports -rdynamic" >&5 +if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo 'void somefunc() { };' > conftest.c + cmd='$CC -rdynamic -c conftest.c' + if eval $cmd 2>&1 | $EGREP -e -rdynamic >/dev/null ; then + ac_result=no + else + ac_result=yes + fi + eval $gcc_arg_name=$ac_result + rm -f conftest.* + +fi + +echo "$ac_t""$ac_cv_gcc_arg_rdynamic" 1>&6 + if eval test "\$$gcc_arg_name" = "yes"; then + gcc_rdynamic=yes + else + : + + fi + + if test "$gcc_rdynamic" = "yes"; then + PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic" + fi + fi + + $php_shtool mkdir -p sapi/apache_hooks + + PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES sapi/apache_hooks/libphp5.module" + +fi + +if test -n "$APACHE_HOOKS_INSTALL"; then + if test "x$APXS" != "x" -a "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then + APXS_EXP=-bE:sapi/apache_hooks/mod_php5.exp + fi + + +echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6 +echo "configure:8719: checking for member fd in BUFF *" >&5 +if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + save=$CPPFLAGS + if test -n "$APXS_INCLUDEDIR"; then + CPPFLAGS="$CPPFLAGS -I$APXS_INCLUDEDIR" + else + CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE" + fi + cat > conftest.$ac_ext < +int main() { +conn_rec *c; int fd = c->client->fd; +; return 0; } +EOF +if { (eval echo configure:8738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_php_fd_in_buff=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_php_fd_in_buff=no +fi +rm -f conftest* + CPPFLAGS=$save + +fi + +echo "$ac_t""$ac_cv_php_fd_in_buff" 1>&6 +if test "$ac_cv_php_fd_in_buff" = "yes"; then + cat >> confdefs.h <<\EOF +#define PHP_APACHE_HAVE_CLIENT_FD 1 +EOF + +fi + + INSTALL_IT=$APACHE_HOOKS_INSTALL + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS_EXP" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APACHE_INCLUDE" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APACHE_TARGET" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APXS_LDFLAGS" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST APACHE_HOOKS_INSTALL" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST STRONGHOLD" + +fi + + + +RESULT=no + +php_with_caudium=no + + +# Check whether --with-caudium or --without-caudium was given. +if test "${with_caudium+set}" = set; then + withval="$with_caudium" + PHP_CAUDIUM=$withval +else + + PHP_CAUDIUM=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CAUDIUM=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CAUDIUM + + + + + +echo $ac_n "checking for Caudium support""... $ac_c" 1>&6 +echo "configure:8815: checking for Caudium support" >&5 + +if test "$PHP_CAUDIUM" != "no"; then + if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi + if test ! -d $PHP_CAUDIUM ; then + if test "$prefix" = "NONE"; then + PHP_CAUDIUM=/usr/local/caudium/server/ + else + PHP_CAUDIUM=$prefix/caudium/server/ + fi + fi + if test -f $PHP_CAUDIUM/bin/caudium; then + PIKE=$PHP_CAUDIUM/bin/caudium + elif test -f $PHP_CAUDIUM/bin/pike; then + PIKE=$PHP_CAUDIUM/bin/pike + else + { echo "configure: error: Could not find a pike in $PHP_CAUDIUM/bin/" 1>&2; exit 1; } + fi + if $PIKE -e 'float v; int rel;sscanf(version(), "Pike v%f release %d", v, rel);v += rel/10000.0; if(v < 7.0268) exit(1); exit(0);'; then + PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'` + PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,' ` + if test -z "$PIKE_INCLUDE_DIR" || test -z "$PIKE_MODULE_DIR"; then + { echo "configure: error: Failed to figure out Pike module and include directories" 1>&2; exit 1; } + fi + echo "$ac_t""yes" 1>&6 + PIKE=`echo $PIKE | pike -e 'int tries=100; + string orig,pike=Stdio.File("stdin")->read()-"\n"; + orig=pike; + if(search(orig, "/")) + orig = combine_path(getcwd(), orig); + while(!catch(pike=readlink(pike)) && tries--) + ; + write(combine_path(dirname(orig), pike)); '` + + if test "$PIKE_INCLUDE_DIR" != "/usr/include"; then + + if test -z "$PIKE_INCLUDE_DIR" || echo "$PIKE_INCLUDE_DIR" | grep '^/' >/dev/null ; then + ai_p=$PIKE_INCLUDE_DIR + else + + ep_dir="`echo $PIKE_INCLUDE_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PIKE_INCLUDE_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + if test "$prefix" != "NONE"; then + PIKE_C_INCLUDE=$prefix/include/`basename $PIKE` + else + PIKE_C_INCLUDE=/usr/local/include/`basename $PIKE` + fi + echo $ac_n "checking for C includes in $PIKE_C_INCLUDE""... $ac_c" 1>&6 +echo "configure:8885: checking for C includes in $PIKE_C_INCLUDE" >&5 + if test -f $PIKE_C_INCLUDE/version.h; then + PIKE_TEST_VER=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'` + ###### VERSION MATCH CHECK ####### + PMAJOR="^#define PIKE_MAJOR_VERSION" + PMINOR="^#define PIKE_MINOR_VERSION" + PBUILD="^#define PIKE_BUILD_VERSION" + + PIKE_CMAJOR_VERSION=0 + PIKE_CMINOR_VERSION=0 + PIKE_CBUILD_VERSION=0 + + PIKE_CMAJOR_VERSION=`grep "$PMAJOR" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'` + if test -z "$PIKE_CMAJOR_VERSION"; then + if test -n "`grep f_version $PIKE_C_INCLUDE/version.h`"; then + PIKE_CMAJOR_VERSION=6 + fi + else + PIKE_CMINOR_VERSION=`grep "$PMINOR" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'` + PIKE_CBUILD_VERSION=`grep "$PBUILD" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'` + fi + + if test "$PIKE_TEST_VER" = "${PIKE_CMAJOR_VERSION}.${PIKE_CMINOR_VERSION}.${PIKE_CBUILD_VERSION}"; then + + if test "$PIKE_C_INCLUDE" != "/usr/include"; then + + if test -z "$PIKE_C_INCLUDE" || echo "$PIKE_C_INCLUDE" | grep '^/' >/dev/null ; then + ai_p=$PIKE_C_INCLUDE + else + + ep_dir="`echo $PIKE_C_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PIKE_C_INCLUDE\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + PIKE_INCLUDE_DIR="$PIKE_INCLUDE_DIR, $PIKE_C_INCLUDE" + echo "$ac_t""found" 1>&6 + else + echo "$ac_t""version mismatch" 1>&6 + fi + else + echo "$ac_t""not found" 1>&6 + fi + else + { echo "configure: error: Caudium PHP5 requires Pike 7.0 or newer" 1>&2; exit 1; } + fi + PIKE_VERSION=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'` + cat >> confdefs.h <<\EOF +#define HAVE_CAUDIUM 1 +EOF + + + PHP_SAPI=caudium + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/caudium in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/caudium"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/caudium/"; ac_bdir="sapi/caudium/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in caudium.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&2; exit 1; } + fi + +fi +echo "$ac_t""$RESULT" 1>&6 + + + + +php_enable_cli=yes + + +# Check whether --enable-cli or --disable-cli was given. +if test "${enable_cli+set}" = set; then + enableval="$enable_cli" + PHP_CLI=$enableval +else + + PHP_CLI=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CLI=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CLI + + + + + +echo $ac_n "checking for CLI build""... $ac_c" 1>&6 +echo "configure:9166: checking for CLI build" >&5 +if test "$PHP_CLI" != "no"; then + + src=$abs_srcdir/sapi/cli/Makefile.frag + ac_srcdir=$abs_srcdir/sapi/cli + ac_builddir=sapi/cli + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + + SAPI_CLI_PATH=sapi/cli/php + + PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_CLI_PATH" + + + case $host_alias in + *aix*) + BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" + ;; + *darwin*) + BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" + ;; + *netware*) + BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)" + ;; + *) + BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" + ;; + esac + INSTALL_CLI="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(bindir); \$(INSTALL) -m 0755 \$(SAPI_CLI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_CLI" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST INSTALL_CLI" + + + PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES sapi/cli/php.1" + +fi +echo "$ac_t""$PHP_CLI" 1>&6 + + + +php_with_continuity=no + +echo $ac_n "checking for Continuity support""... $ac_c" 1>&6 +echo "configure:9212: checking for Continuity support" >&5 +# Check whether --with-continuity or --without-continuity was given. +if test "${with_continuity+set}" = set; then + withval="$with_continuity" + PHP_CONTINUITY=$withval +else + + PHP_CONTINUITY=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CONTINUITY=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CONTINUITY +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_CONTINUITY" != "no"; then + if test ! -d $PHP_CONTINUITY; then + { echo "configure: error: Please specify the path to the root of your Continuity server using --with-continuity=DIR" 1>&2; exit 1; } + fi + echo $ac_n "checking for Continuity include files""... $ac_c" 1>&6 +echo "configure:9239: checking for Continuity include files" >&5 + if test -d $PHP_CONTINUITY/include ; then + CAPI_INCLUDE=$PHP_CONTINUITY/include + echo "$ac_t""Continuity Binary Distribution" 1>&6 + else + { echo "configure: error: Cannot find your CAPI include files in either DIR/src or DIR/include" 1>&2; exit 1; } + fi + + + PHP_SAPI=continuity + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/continuity in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/continuity"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/continuity/"; ac_bdir="sapi/continuity/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in capi.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects</dev/null ; then + ai_p=$CAPI_INCLUDE + else + + ep_dir="`echo $CAPI_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$CAPI_INCLUDE\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + enable_maintainer_zts=yes + if test "$pthreads_working" != "yes"; then + { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define HAVE_CONTINUITY 1 +EOF + + INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_CONTINUITY/lib/" +fi + + + + +php_enable_embed=no + + +# Check whether --enable-embed or --disable-embed was given. +if test "${enable_embed+set}" = set; then + enableval="$enable_embed" + PHP_EMBED=$enableval +else + + PHP_EMBED=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_EMBED=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_EMBED + + + + + +echo $ac_n "checking for embedded SAPI library support""... $ac_c" 1>&6 +echo "configure:9489: checking for embedded SAPI library support" >&5 + +if test "$PHP_EMBED" != "no"; then + case "$PHP_EMBED" in + yes|shared) + PHP_EMBED_TYPE=shared + INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib" + ;; + static) + PHP_EMBED_TYPE=static + INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0644 $SAPI_STATIC \$(INSTALL_ROOT)\$(prefix)/lib" + ;; + *) + PHP_EMBED_TYPE=no + ;; + esac + if test "$PHP_EMBED_TYPE" != "no"; then + + PHP_SAPI=embed + + case "$PHP_EMBED_TYPE" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/embed in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/embed"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/embed/"; ac_bdir="sapi/embed/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_embed.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 +else + echo "$ac_t""no" 1>&6 +fi + + + + +php_with_isapi=no + +echo $ac_n "checking for Zeus ISAPI support""... $ac_c" 1>&6 +echo "configure:9706: checking for Zeus ISAPI support" >&5 +# Check whether --with-isapi or --without-isapi was given. +if test "${with_isapi+set}" = set; then + withval="$with_isapi" + PHP_ISAPI=$withval +else + + PHP_ISAPI=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ISAPI=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ISAPI +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_ISAPI" != "no"; then + if test "$PHP_ISAPI" = "yes"; then + ZEUSPATH=/usr/local/zeus # the default + else + ZEUSPATH=$PHP_ISAPI + fi + test -f "$ZEUSPATH/web/include/httpext.h" || { echo "configure: error: Unable to find httpext.h in $ZEUSPATH/web/include" 1>&2; exit 1; } + + enable_maintainer_zts=yes + if test "$pthreads_working" != "yes"; then + { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define WITH_ZEUS 1 +EOF + + + if test "$ZEUSPATH/web/include" != "/usr/include"; then + + if test -z "$ZEUSPATH/web/include" || echo "$ZEUSPATH/web/include" | grep '^/' >/dev/null ; then + ai_p=$ZEUSPATH/web/include + else + + ep_dir="`echo $ZEUSPATH/web/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ZEUSPATH/web/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_SAPI=isapi + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/isapi in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/isapi"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/isapi/"; ac_bdir="sapi/isapi/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php5isapi.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 +echo "configure:9955: checking for Milter support" >&5 +# Check whether --with-milter or --without-milter was given. +if test "${with_milter+set}" = set; then + withval="$with_milter" + PHP_MILTER=$withval +else + + PHP_MILTER=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MILTER=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MILTER +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MILTER" != "no"; then + if test "$PHP_MILTER" = "yes"; then + if test -f /usr/lib/libmilter.a ; then + MILTERPATH=/usr/lib + else + if test -f /usr/lib/libmilter/libmilter.a ; then + MILTERPATH=/usr/lib/libmilter + else + { echo "configure: error: Unable to find libmilter.a" 1>&2; exit 1; } + fi + fi + else + MILTERPATH=$PHP_MILTER + fi + + SAPI_MILTER_PATH=sapi/milter/php-milter + + enable_maintainer_zts=yes + if test "$pthreads_working" != "yes"; then + { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; } + fi + + + src=$abs_srcdir/sapi/milter/Makefile.frag + ac_srcdir=$ext_srcdir + ac_builddir=$ext_builddir + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + + + PHP_SAPI=milter + + case "program" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET='$(SAPI_MILTER_PATH)' + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/milter in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/milter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/milter/"; ac_bdir="sapi/milter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_milter.c getopt.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects</dev/null ; then + ai_p=$MILTERPATH + else + + ep_dir="`echo $MILTERPATH|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MILTERPATH\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case milter in + c|c_r|pthread*) ;; + *) + LIBS="-lmilter $LIBS" + ;; + esac + + + + + BUILD_MILTER="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_MILTER_PATH)" + INSTALL_IT="\$(INSTALL) -m 0755 \$(SAPI_MILTER_PATH) \$(bindir)/php-milter" + + PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_MILTER_PATH" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_MILTER" + +fi + + + +php_with_nsapi=no + +echo $ac_n "checking for NSAPI support""... $ac_c" 1>&6 +echo "configure:10239: checking for NSAPI support" >&5 +# Check whether --with-nsapi or --without-nsapi was given. +if test "${with_nsapi+set}" = set; then + withval="$with_nsapi" + PHP_NSAPI=$withval +else + + PHP_NSAPI=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_NSAPI=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_NSAPI +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_NSAPI" != "no"; then + if test ! -d $PHP_NSAPI/bin ; then + { echo "configure: error: Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR" 1>&2; exit 1; } + fi + echo $ac_n "checking for NSAPI include files""... $ac_c" 1>&6 +echo "configure:10266: checking for NSAPI include files" >&5 + if test -d $PHP_NSAPI/include ; then + NSAPI_INC_DIR="$PHP_NSAPI/include" + echo "$ac_t""Netscape 3.x / Sun 7.x style" 1>&6 + for ac_hdr in $NSAPI_INC_DIR/nsapi.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:10274: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:10284: \"$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 <&6 +fi +done + + NSAPI_INCLUDE="-I$NSAPI_INC_DIR" + fi + if test -d $PHP_NSAPI/plugins/include ; then + NSAPI_INC_DIR="$PHP_NSAPI/plugins/include" + echo "$ac_t""iPlanet 4.x / Sun 6.x style" 1>&6 + for ac_hdr in $NSAPI_INC_DIR/nsapi.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:10319: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:10329: \"$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 <&6 +fi +done + + NSAPI_INCLUDE="$NSAPI_INCLUDE -I$NSAPI_INC_DIR" + fi + if test -z "$NSAPI_INCLUDE"; then + { echo "configure: error: Please check you have nsapi.h in either $PHP_NSAPI/include or $PHP_NSAPI/plugins/include" 1>&2; exit 1; } + fi + + + for ac_i in $NSAPI_INCLUDE; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + enable_maintainer_zts=yes + if test "$pthreads_working" != "yes"; then + { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define HAVE_NSAPI 1 +EOF + + + PHP_SAPI=nsapi + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/nsapi in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/nsapi"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/nsapi/"; ac_bdir="sapi/nsapi/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in nsapi.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 +echo "configure:10591: checking for PHTTPD support" >&5 +# Check whether --with-phttpd or --without-phttpd was given. +if test "${with_phttpd+set}" = set; then + withval="$with_phttpd" + PHP_PHTTPD=$withval +else + + PHP_PHTTPD=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_PHTTPD=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_PHTTPD +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PHTTPD" != "no"; then + if test ! -d $PHP_PHTTPD ; then + { echo "configure: error: You did not specify a directory" 1>&2; exit 1; } + fi + + enable_maintainer_zts=yes + if test "$pthreads_working" != "yes"; then + { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; } + fi + + + if test "$PHP_PHTTPD/include" != "/usr/include"; then + + if test -z "$PHP_PHTTPD/include" || echo "$PHP_PHTTPD/include" | grep '^/' >/dev/null ; then + ai_p=$PHP_PHTTPD/include + else + + ep_dir="`echo $PHP_PHTTPD/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_PHTTPD/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_PHTTPD 1 +EOF + + + PHP_SAPI=phttpd + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/phttpd in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/phttpd"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/phttpd/"; ac_bdir="sapi/phttpd/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in phttpd.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 +echo "configure:10837: checking for Pi3Web support" >&5 +# Check whether --with-pi3web or --without-pi3web was given. +if test "${with_pi3web+set}" = set; then + withval="$with_pi3web" + PHP_PI3WEB=$withval +else + + PHP_PI3WEB=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_PI3WEB=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_PI3WEB +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PI3WEB" != "no"; then + if test "$PHP_PI3WEB" = "yes"; then + PI3PATH=../.. # the default + else + PI3PATH=$PHP_PI3WEB + fi + test -f "$PI3PATH/PiAPI/PiAPI.h" || { echo "configure: error: Unable to find PiAPI.h in $PI3PATH/PiAPI" 1>&2; exit 1; } + + enable_maintainer_zts=yes + if test "$pthreads_working" != "yes"; then + { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define WITH_PI3WEB 1 +EOF + + + if test "$PI3PATH/PiAPI" != "/usr/include"; then + + if test -z "$PI3PATH/PiAPI" || echo "$PI3PATH/PiAPI" | grep '^/' >/dev/null ; then + ai_p=$PI3PATH/PiAPI + else + + ep_dir="`echo $PI3PATH/PiAPI|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PI3PATH/PiAPI\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$PI3PATH/Pi2API" != "/usr/include"; then + + if test -z "$PI3PATH/Pi2API" || echo "$PI3PATH/Pi2API" | grep '^/' >/dev/null ; then + ai_p=$PI3PATH/Pi2API + else + + ep_dir="`echo $PI3PATH/Pi2API|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PI3PATH/Pi2API\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$PI3PATH/Pi3API" != "/usr/include"; then + + if test -z "$PI3PATH/Pi3API" || echo "$PI3PATH/Pi3API" | grep '^/' >/dev/null ; then + ai_p=$PI3PATH/Pi3API + else + + ep_dir="`echo $PI3PATH/Pi3API|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PI3PATH/Pi3API\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$PI3PATH/PHP5" != "/usr/include"; then + + if test -z "$PI3PATH/PHP5" || echo "$PI3PATH/PHP5" | grep '^/' >/dev/null ; then + ai_p=$PI3PATH/PHP5 + else + + ep_dir="`echo $PI3PATH/PHP5|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PI3PATH/PHP5\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_SAPI=pi3web + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/pi3web in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/pi3web"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/pi3web/"; ac_bdir="sapi/pi3web/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pi3web_sapi.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 +echo "configure:11204: checking whether Roxen module is build using ZTS" >&5 +# Check whether --enable-roxen-zts or --disable-roxen-zts was given. +if test "${enable_roxen_zts+set}" = set; then + enableval="$enable_roxen_zts" + PHP_ROXEN_ZTS=$enableval +else + + PHP_ROXEN_ZTS=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ROXEN_ZTS=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ROXEN_ZTS +echo "$ac_t""$ext_output" 1>&6 + + + + +RESULT= +echo $ac_n "checking for Roxen/Pike support""... $ac_c" 1>&6 +echo "configure:11228: checking for Roxen/Pike support" >&5 +if test "$PHP_ROXEN" != "no"; then + if test ! -d $PHP_ROXEN ; then + { echo "configure: error: You did not specify a directory" 1>&2; exit 1; } + fi + if test -f $PHP_ROXEN/bin/roxen; then + PIKE=$PHP_ROXEN/bin/roxen + elif test -f $PHP_ROXEN/bin/pike; then + PIKE=$PHP_ROXEN/bin/pike + else + { echo "configure: error: Could not find a pike in $PHP_ROXEN/bin/" 1>&2; exit 1; } + fi + + if $PIKE -e 'float v; catch(v = __VERSION__ + (__BUILD__/10000.0)); if(v < 0.7079) exit(1); exit(0);'; then + PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'` + PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,'` + if test -z "$PIKE_INCLUDE_DIR" || test -z "$PIKE_MODULE_DIR"; then + { echo "configure: error: Failed to figure out Pike module and include directories" 1>&2; exit 1; } + fi + else + { echo "configure: error: Roxen/PHP requires Pike 0.7.79 or newer" 1>&2; exit 1; } + fi + + + if test "$PIKE_INCLUDE_DIR" != "/usr/include"; then + + if test -z "$PIKE_INCLUDE_DIR" || echo "$PIKE_INCLUDE_DIR" | grep '^/' >/dev/null ; then + ai_p=$PIKE_INCLUDE_DIR + else + + ep_dir="`echo $PIKE_INCLUDE_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PIKE_INCLUDE_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_ROXEN 1 +EOF + + + PHP_SAPI=roxen + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/roxen in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/roxen"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/roxen/"; ac_bdir="sapi/roxen/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in roxen.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define ROXEN_USE_ZTS 1 +EOF + + fi +fi +echo "$ac_t""$RESULT" 1>&6 + + + + +php_with_thttpd=no + + +# Check whether --with-thttpd or --without-thttpd was given. +if test "${with_thttpd+set}" = set; then + withval="$with_thttpd" + PHP_THTTPD=$withval +else + + PHP_THTTPD=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_THTTPD=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_THTTPD + + + + + +echo $ac_n "checking for thttpd""... $ac_c" 1>&6 +echo "configure:11506: checking for thttpd" >&5 + +if test "$PHP_THTTPD" != "no"; then + if test ! -d $PHP_THTTPD; then + echo "$ac_t""thttpd directory does not exist ($PHP_THTTPD)" 1>&6 + fi + + + if test -z "$PHP_THTTPD" || echo "$PHP_THTTPD" | grep '^/' >/dev/null ; then + THTTPD=$PHP_THTTPD + else + + ep_dir="`echo $PHP_THTTPD|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + THTTPD="$ep_realdir/`basename \"$PHP_THTTPD\"`" + fi + + + if grep thttpd.2.21b $PHP_THTTPD/version.h >/dev/null; then + patch="test -f $THTTPD/php_patched || \ + (cd $THTTPD && patch -p1 < $abs_srcdir/sapi/thttpd/thttpd_patch && touch php_patched)" + + elif grep Premium $PHP_THTTPD/version.h >/dev/null; then + patch= + else + { echo "configure: error: This version only supports thttpd-2.21b and Premium thttpd" 1>&2; exit 1; } + fi + + if test -n "$GCC"; then + + gcc_arg_name=ac_cv_gcc_arg_rdynamic + echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 +echo "configure:11539: checking whether $CC supports -rdynamic" >&5 +if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo 'void somefunc() { };' > conftest.c + cmd='$CC -rdynamic -c conftest.c' + if eval $cmd 2>&1 | $EGREP -e -rdynamic >/dev/null ; then + ac_result=no + else + ac_result=yes + fi + eval $gcc_arg_name=$ac_result + rm -f conftest.* + +fi + +echo "$ac_t""$ac_cv_gcc_arg_rdynamic" 1>&6 + if eval test "\$$gcc_arg_name" = "yes"; then + gcc_rdynamic=yes + else + : + + fi + + if test "$gcc_rdynamic" = "yes"; then + PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic" + fi + fi + + INSTALL_IT="\ + echo 'PHP_LIBS = -L. -lphp5 \$(PHP_LIBS) \$(EXTRA_LIBS)' > $THTTPD/php_makefile; \ + echo 'PHP_LDFLAGS = \$(NATIVE_RPATHS) \$(PHP_LDFLAGS)' >> $THTTPD/php_makefile; \ + echo 'PHP_CFLAGS = \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(CPPFLAGS) \$(EXTRA_CFLAGS)' >> $THTTPD/php_makefile; \ + rm -f $THTTPD/php_thttpd.c $THTTPD/php_thttpd.h $THTTPD/libphp5.a; \ + \$(LN_S) $abs_srcdir/sapi/thttpd/thttpd.c $THTTPD/php_thttpd.c; \ + \$(LN_S) $abs_srcdir/sapi/thttpd/php_thttpd.h $abs_builddir/$SAPI_STATIC $THTTPD/;\ + $patch" + PHP_THTTPD="yes, using $THTTPD" + + if test "$THTTPD" != "/usr/include"; then + + if test -z "$THTTPD" || echo "$THTTPD" | grep '^/' >/dev/null ; then + ai_p=$THTTPD + else + + ep_dir="`echo $THTTPD|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THTTPD\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_SAPI=thttpd + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + +fi +echo "$ac_t""$PHP_THTTPD" 1>&6 + + + +php_with_tux=no + + +# Check whether --with-tux or --without-tux was given. +if test "${with_tux+set}" = set; then + withval="$with_tux" + PHP_TUX=$withval +else + + PHP_TUX=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_TUX=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_TUX + + + + + +echo $ac_n "checking for TUX""... $ac_c" 1>&6 +echo "configure:11767: checking for TUX" >&5 +if test "$PHP_TUX" != "no"; then + INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_TUX/php5.tux.so" + for ac_hdr in tuxmodule.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:11774: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:11784: \"$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 <&6 +{ echo "configure: error: Cannot find tuxmodule.h" 1>&2; exit 1; } +fi +done + + + PHP_SAPI=tux + + case "shared" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/tux in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/tux"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/tux/"; ac_bdir="sapi/tux/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_tux.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 +else + echo "$ac_t""no" 1>&6 +fi + + + +php_with_webjames=no + + +# Check whether --with-webjames or --without-webjames was given. +if test "${with_webjames+set}" = set; then + withval="$with_webjames" + PHP_WEBJAMES=$withval +else + + PHP_WEBJAMES=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_WEBJAMES=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_WEBJAMES + + + + + +echo $ac_n "checking for webjames""... $ac_c" 1>&6 +echo "configure:12013: checking for webjames" >&5 + +if test "$PHP_WEBJAMES" != "no"; then + + if test -z "$PHP_WEBJAMES" || echo "$PHP_WEBJAMES" | grep '^/' >/dev/null ; then + PHP_WEBJAMES=$PHP_WEBJAMES + else + + ep_dir="`echo $PHP_WEBJAMES|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + PHP_WEBJAMES="$ep_realdir/`basename \"$PHP_WEBJAMES\"`" + fi + + INSTALL_IT="\ + echo 'PHP_LIBS = -l$abs_srcdir/$SAPI_STATIC \$(PHP_LIBS) \$(EXTRA_LIBS)' > $PHP_WEBJAMES/build/php; \ + echo 'PHP_LDFLAGS = \$(NATIVE_RPATHS) \$(PHP_LDFLAGS)' >> $PHP_WEBJAMES/build/php; \ + echo 'PHP_CFLAGS = -DPHP \$(COMMON_FLAGS) \$(EXTRA_CFLAGS) -I$abs_srcdir/sapi/webjames' >> $PHP_WEBJAMES/build/php;" + + if test "$PHP_WEBJAMES" != "/usr/include"; then + + if test -z "$PHP_WEBJAMES" || echo "$PHP_WEBJAMES" | grep '^/' >/dev/null ; then + ai_p=$PHP_WEBJAMES + else + + ep_dir="`echo $PHP_WEBJAMES|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_WEBJAMES\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_SAPI=webjames + + case "static" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/webjames in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/webjames"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/webjames/"; ac_bdir="sapi/webjames/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in webjames.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&6 +else + echo "$ac_t""no" 1>&6 +fi + + + +php_enable_cgi=yes + + +# Check whether --enable-cgi or --disable-cgi was given. +if test "${enable_cgi+set}" = set; then + enableval="$enable_cgi" + PHP_CGI=$enableval +else + + PHP_CGI=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CGI=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CGI + + + + + + +php_enable_fastcgi=no + + +# Check whether --enable-fastcgi or --disable-fastcgi was given. +if test "${enable_fastcgi+set}" = set; then + enableval="$enable_fastcgi" + PHP_FASTCGI=$enableval +else + + PHP_FASTCGI=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_FASTCGI=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_FASTCGI + + + + + + +php_enable_force_cgi_redirect=no + + +# 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" + PHP_FORCE_CGI_REDIRECT=$enableval +else + + PHP_FORCE_CGI_REDIRECT=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_FORCE_CGI_REDIRECT=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_FORCE_CGI_REDIRECT + + + + + + +php_enable_discard_path=no + + +# Check whether --enable-discard-path or --disable-discard-path was given. +if test "${enable_discard_path+set}" = set; then + enableval="$enable_discard_path" + PHP_DISCARD_PATH=$enableval +else + + PHP_DISCARD_PATH=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DISCARD_PATH=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DISCARD_PATH + + + + + + +php_enable_path_info_check=yes + + +# Check whether --enable-path-info-check or --disable-path-info-check was given. +if test "${enable_path_info_check+set}" = set; then + enableval="$enable_path_info_check" + PHP_PATH_INFO_CHECK=$enableval +else + + PHP_PATH_INFO_CHECK=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_PATH_INFO_CHECK=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_PATH_INFO_CHECK + + + + + +if test "$PHP_SAPI" = "default"; then + echo $ac_n "checking whether to build CGI binary""... $ac_c" 1>&6 +echo "configure:12365: checking whether to build CGI binary" >&5 + if test "$PHP_CGI" != "no"; then + echo "$ac_t""yes" 1>&6 + + src=$abs_srcdir/sapi/cgi/Makefile.frag + ac_srcdir=$ext_srcdir + ac_builddir=$ext_builddir + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + + + case $host_alias in + *cygwin* ) + SAPI_CGI_PATH=sapi/cgi/php-cgi.exe + ;; + * ) + SAPI_CGI_PATH=sapi/cgi/php-cgi + ;; + esac + + PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_CGI_PATH" + + + echo $ac_n "checking whether to enable fastcgi support""... $ac_c" 1>&6 +echo "configure:12388: checking whether to enable fastcgi support" >&5 + if test "$PHP_FASTCGI" = "yes"; then + PHP_ENABLE_FASTCGI=1 + PHP_FCGI_FILES="fastcgi.c" + else + PHP_ENABLE_FASTCGI=0 + PHP_FCGI_FILES= + fi + cat >> confdefs.h <&6 + + echo $ac_n "checking whether to force Apache CGI redirect""... $ac_c" 1>&6 +echo "configure:12403: checking whether to force Apache CGI redirect" >&5 + if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then + CGI_REDIRECT=1 + else + CGI_REDIRECT=0 + fi + cat >> confdefs.h <&6 + + echo $ac_n "checking whether to discard path_info + path_translated""... $ac_c" 1>&6 +echo "configure:12416: checking whether to discard path_info + path_translated" >&5 + if test "$PHP_DISCARD_PATH" = "yes"; then + DISCARD_PATH=1 + else + DISCARD_PATH=0 + fi + cat >> confdefs.h <&6 + + echo $ac_n "checking whether to enable path info checking""... $ac_c" 1>&6 +echo "configure:12429: checking whether to enable path info checking" >&5 + if test "$PHP_PATH_INFO_CHECK" = "yes"; then + ENABLE_PATHINFO_CHECK=1 + else + ENABLE_PATHINFO_CHECK=0 + fi + cat >> confdefs.h <&6 + + INSTALL_IT="@echo \"Installing PHP CGI binary: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-cgi\$(program_suffix)\$(EXEEXT)" + + PHP_SAPI=cgi + + case "program" in + static) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=static +;; + shared) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la + php_build_target=shared + + php_c_pre=$shared_c_pre + php_c_meta=$shared_c_meta + php_c_post=$shared_c_post + php_cxx_pre=$shared_cxx_pre + php_cxx_meta=$shared_cxx_meta + php_cxx_post=$shared_cxx_post + php_lo=$shared_lo +;; + bundle) + + OVERALL_TARGET=php + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program + + OVERALL_TARGET=libs/libphp$PHP_MAJOR_VERSION.bundle + php_build_target=static +;; + program) + OVERALL_TARGET='$(SAPI_CGI_PATH)' + php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= + php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo + + case $with_pic in + yes) pic_setting='-prefer-pic';; + no) pic_setting='-prefer-non-pic';; + esac + + shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= + shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo + + php_build_target=program +;; + esac + + + + case sapi/cgi in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "sapi/cgi"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/sapi/cgi/"; ac_bdir="sapi/cgi/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in $PHP_FCGI_FILES cgi_main.c getopt.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; + *darwin*) + BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; + *) + BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; + esac + + + PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_CGI" + + + elif test "$PHP_CLI" != "no"; then + echo "$ac_t""no" 1>&6 + OVERALL_TARGET= + PHP_SAPI=cli + else + { echo "configure: error: No SAPIs selected." 1>&2; exit 1; } + fi +fi + + + +echo $ac_n "checking for chosen SAPI module""... $ac_c" 1>&6 +echo "configure:12641: checking for chosen SAPI module" >&5 +echo "$ac_t""$PHP_SAPI" 1>&6 + +if test "$enable_maintainer_zts" = "yes"; then + +if test -n "$ac_cv_pthreads_lib"; then + LIBS="$LIBS -l$ac_cv_pthreads_lib" +fi + +if test -n "$ac_cv_pthreads_cflags"; then + CFLAGS="$CFLAGS $ac_cv_pthreads_cflags" +fi + + + if test -z "$host_alias" && test -n "$host"; then + host_alias=$host + fi + if test -z "$host_alias"; then + { echo "configure: error: host_alias is not set. Make sure to run config.guess" 1>&2; exit 1; } + fi + case $host_alias in + *solaris*) + PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";; + *freebsd*) + PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";; + *linux*) + PTHREAD_FLAGS=-D_REENTRANT;; + *aix*) + PTHREAD_FLAGS=-D_THREAD_SAFE;; + *irix*) + PTHREAD_FLAGS=-D_POSIX_THREAD_SAFE_FUNCTIONS;; + *hpux*) + PTHREAD_FLAGS=-D_REENTRANT;; + *sco*) + PTHREAD_FLAGS=-D_REENTRANT;; + esac + + if test -n "$PTHREAD_FLAGS"; then + CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS" + fi + +fi + + + + + + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}Running system checks${T_ME}" 1>&6 + + + + PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib + # 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:12699: 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:$PHP_ALT_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_PROG_SENDMAIL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +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 + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PROG_SENDMAIL" + + + + + echo $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6 +echo "configure:12738: checking whether system uses EBCDIC" >&5 +if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + + ac_cv_ebcdic=no + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_ebcdic=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_ebcdic=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_ebcdic" 1>&6 + if test "$ac_cv_ebcdic" = "yes"; then + cat >> confdefs.h <<\EOF +#define CHARSET_EBCDIC 1 +EOF + + fi + + +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:12785: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ac_cv_c_bigendian_php=unknown + if test "$cross_compiling" = yes; then + ac_cv_c_bigendian_php=unknown +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian_php=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian_php=no +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_c_bigendian_php" 1>&6 + if test $ac_cv_c_bigendian_php = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN +EOF + + fi + + + + echo $ac_n "checking whether writing to stdout works""... $ac_c" 1>&6 +echo "configure:12837: checking whether writing to stdout works" >&5 +if eval "test \"`echo '$''{'ac_cv_write_stdout'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + + ac_cv_write_stdout=no + +else + cat > conftest.$ac_ext < +#endif + +#define TEXT "This is the test message -- " + +main() +{ + int n; + + n = write(1, TEXT, sizeof(TEXT)-1); + return (!(n == sizeof(TEXT)-1)); +} + +EOF +if { (eval echo configure:12866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_write_stdout=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_write_stdout=no + +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_write_stdout" 1>&6 + if test "$ac_cv_write_stdout" = "yes"; then + cat >> confdefs.h <<\EOF +#define PHP_WRITE_STDOUT 1 +EOF + + fi + + +if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then + CPPFLAGS="$CPPFLAGS -I/usr/pkg/include" + LDFLAGS="$LDFLAGS -L/usr/pkg/lib" +fi +test -d /usr/ucblib && + if test "/usr/ucblib" != "/usr/$PHP_LIBDIR" && test "/usr/ucblib" != "/usr/lib"; then + + if test -z "/usr/ucblib" || echo "/usr/ucblib" | grep '^/' >/dev/null ; then + ai_p=/usr/ucblib + else + + ep_dir="`echo /usr/ucblib|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"/usr/ucblib\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + + + + + + unset ac_cv_func_socket + unset ac_cv_func___socket + unset found + + echo $ac_n "checking for socket""... $ac_c" 1>&6 +echo "configure:12941: checking for socket" >&5 +if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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_socket) || defined (__stub___socket) +choke me +#else +socket(); +#endif + +; return 0; } +EOF +if { (eval echo configure:12969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_socket=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_socket=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __socket""... $ac_c" 1>&6 +echo "configure:12987: checking for __socket" >&5 +if eval "test \"`echo '$''{'ac_cv_func___socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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___socket) || defined (__stub_____socket) +choke me +#else +__socket(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___socket=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___socket=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__socket`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_SOCKET 1 +EOF + + ac_cv_func_socket=yes + ;; + + *) + + unset ac_cv_lib_socket_socket + unset ac_cv_lib_socket___socket + unset found + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:13053: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __socket in -lsocket""... $ac_c" 1>&6 +echo "configure:13092: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lsocket" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case socket in + c|c_r|pthread*) ;; + *) + LIBS="-lsocket $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_SOCKET 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + ac_cv_func_socket=yes + else + + : + + fi + + ;; + + esac + + + unset ac_cv_func_socketpair + unset ac_cv_func___socketpair + unset found + + echo $ac_n "checking for socketpair""... $ac_c" 1>&6 +echo "configure:13198: checking for socketpair" >&5 +if eval "test \"`echo '$''{'ac_cv_func_socketpair'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socketpair(); + +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_socketpair) || defined (__stub___socketpair) +choke me +#else +socketpair(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_socketpair=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_socketpair=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'socketpair`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __socketpair""... $ac_c" 1>&6 +echo "configure:13244: checking for __socketpair" >&5 +if eval "test \"`echo '$''{'ac_cv_func___socketpair'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __socketpair(); + +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___socketpair) || defined (__stub_____socketpair) +choke me +#else +__socketpair(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___socketpair=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___socketpair=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__socketpair`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_SOCKETPAIR 1 +EOF + + ac_cv_func_socketpair=yes + ;; + + *) + + unset ac_cv_lib_socket_socketpair + unset ac_cv_lib_socket___socketpair + unset found + echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 +echo "configure:13310: checking for socketpair in -lsocket" >&5 +ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __socketpair in -lsocket""... $ac_c" 1>&6 +echo "configure:13349: checking for __socketpair in -lsocket" >&5 +ac_lib_var=`echo socket'_'__socketpair | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lsocket" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case socket in + c|c_r|pthread*) ;; + *) + LIBS="-lsocket $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_SOCKETPAIR 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + ac_cv_func_socketpair=yes + else + + : + + fi + + ;; + + esac + + + unset ac_cv_func_htonl + unset ac_cv_func___htonl + unset found + + echo $ac_n "checking for htonl""... $ac_c" 1>&6 +echo "configure:13455: checking for htonl" >&5 +if eval "test \"`echo '$''{'ac_cv_func_htonl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char htonl(); + +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_htonl) || defined (__stub___htonl) +choke me +#else +htonl(); +#endif + +; 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_func_htonl=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_htonl=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'htonl`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __htonl""... $ac_c" 1>&6 +echo "configure:13501: checking for __htonl" >&5 +if eval "test \"`echo '$''{'ac_cv_func___htonl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __htonl(); + +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___htonl) || defined (__stub_____htonl) +choke me +#else +__htonl(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___htonl=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___htonl=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__htonl`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_HTONL 1 +EOF + + ac_cv_func_htonl=yes + ;; + + *) + + unset ac_cv_lib_socket_htonl + unset ac_cv_lib_socket___htonl + unset found + echo $ac_n "checking for htonl in -lsocket""... $ac_c" 1>&6 +echo "configure:13567: checking for htonl in -lsocket" >&5 +ac_lib_var=`echo socket'_'htonl | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __htonl in -lsocket""... $ac_c" 1>&6 +echo "configure:13606: checking for __htonl in -lsocket" >&5 +ac_lib_var=`echo socket'_'__htonl | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lsocket" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case socket in + c|c_r|pthread*) ;; + *) + LIBS="-lsocket $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_HTONL 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + ac_cv_func_htonl=yes + else + + : + + fi + + ;; + + esac + + + unset ac_cv_func_gethostname + unset ac_cv_func___gethostname + unset found + + echo $ac_n "checking for gethostname""... $ac_c" 1>&6 +echo "configure:13712: checking for gethostname" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostname(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostname) || defined (__stub___gethostname) +choke me +#else +gethostname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __gethostname""... $ac_c" 1>&6 +echo "configure:13758: checking for __gethostname" >&5 +if eval "test \"`echo '$''{'ac_cv_func___gethostname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __gethostname(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub___gethostname) || defined (__stub_____gethostname) +choke me +#else +__gethostname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___gethostname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___gethostname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__gethostname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_GETHOSTNAME 1 +EOF + + ac_cv_func_gethostname=yes + ;; + + *) + + unset ac_cv_lib_nsl_gethostname + unset ac_cv_lib_nsl___gethostname + unset found + echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 +echo "configure:13824: checking for gethostname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __gethostname in -lnsl""... $ac_c" 1>&6 +echo "configure:13863: checking for __gethostname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'__gethostname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lnsl" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case nsl in + c|c_r|pthread*) ;; + *) + LIBS="-lnsl $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_GETHOSTNAME 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBNSL 1 +EOF + + ac_cv_func_gethostname=yes + else + + : + + fi + + ;; + + esac + + + unset ac_cv_func_gethostbyaddr + unset ac_cv_func___gethostbyaddr + unset found + + echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6 +echo "configure:13969: checking for gethostbyaddr" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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_gethostbyaddr) || defined (__stub___gethostbyaddr) +choke me +#else +gethostbyaddr(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyaddr=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyaddr=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyaddr`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __gethostbyaddr""... $ac_c" 1>&6 +echo "configure:14015: checking for __gethostbyaddr" >&5 +if eval "test \"`echo '$''{'ac_cv_func___gethostbyaddr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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___gethostbyaddr) || defined (__stub_____gethostbyaddr) +choke me +#else +__gethostbyaddr(); +#endif + +; return 0; } +EOF +if { (eval echo configure:14043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___gethostbyaddr=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___gethostbyaddr=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__gethostbyaddr`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_GETHOSTBYADDR 1 +EOF + + ac_cv_func_gethostbyaddr=yes + ;; + + *) + + unset ac_cv_lib_nsl_gethostbyaddr + unset ac_cv_lib_nsl___gethostbyaddr + unset found + echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6 +echo "configure:14081: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __gethostbyaddr in -lnsl""... $ac_c" 1>&6 +echo "configure:14120: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lnsl" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case nsl in + c|c_r|pthread*) ;; + *) + LIBS="-lnsl $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_GETHOSTBYADDR 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBNSL 1 +EOF + + ac_cv_func_gethostbyaddr=yes + else + + : + + fi + + ;; + + esac + + + unset ac_cv_func_yp_get_default_domain + unset ac_cv_func___yp_get_default_domain + unset found + + echo $ac_n "checking for yp_get_default_domain""... $ac_c" 1>&6 +echo "configure:14226: checking for yp_get_default_domain" >&5 +if eval "test \"`echo '$''{'ac_cv_func_yp_get_default_domain'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char yp_get_default_domain(); + +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_yp_get_default_domain) || defined (__stub___yp_get_default_domain) +choke me +#else +yp_get_default_domain(); +#endif + +; return 0; } +EOF +if { (eval echo configure:14254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_yp_get_default_domain=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_yp_get_default_domain=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'yp_get_default_domain`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __yp_get_default_domain""... $ac_c" 1>&6 +echo "configure:14272: checking for __yp_get_default_domain" >&5 +if eval "test \"`echo '$''{'ac_cv_func___yp_get_default_domain'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __yp_get_default_domain(); + +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___yp_get_default_domain) || defined (__stub_____yp_get_default_domain) +choke me +#else +__yp_get_default_domain(); +#endif + +; return 0; } +EOF +if { (eval echo configure:14300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___yp_get_default_domain=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___yp_get_default_domain=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__yp_get_default_domain`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_YP_GET_DEFAULT_DOMAIN 1 +EOF + + ac_cv_func_yp_get_default_domain=yes + ;; + + *) + + unset ac_cv_lib_nsl_yp_get_default_domain + unset ac_cv_lib_nsl___yp_get_default_domain + unset found + echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 +echo "configure:14338: checking for yp_get_default_domain in -lnsl" >&5 +ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __yp_get_default_domain in -lnsl""... $ac_c" 1>&6 +echo "configure:14377: checking for __yp_get_default_domain in -lnsl" >&5 +ac_lib_var=`echo nsl'_'__yp_get_default_domain | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lnsl" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case nsl in + c|c_r|pthread*) ;; + *) + LIBS="-lnsl $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_YP_GET_DEFAULT_DOMAIN 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBNSL 1 +EOF + + ac_cv_func_yp_get_default_domain=yes + else + + : + + fi + + ;; + + esac + + + + unset ac_cv_func_dlopen + unset ac_cv_func___dlopen + unset found + + echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +echo "configure:14484: checking for dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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_dlopen) || defined (__stub___dlopen) +choke me +#else +dlopen(); +#endif + +; return 0; } +EOF +if { (eval echo configure:14512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __dlopen""... $ac_c" 1>&6 +echo "configure:14530: checking for __dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func___dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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___dlopen) || defined (__stub_____dlopen) +choke me +#else +__dlopen(); +#endif + +; return 0; } +EOF +if { (eval echo configure:14558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___dlopen=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___dlopen=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_DLOPEN 1 +EOF + + ac_cv_func_dlopen=yes + ;; + + *) + + unset ac_cv_lib_dl_dlopen + unset ac_cv_lib_dl___dlopen + unset found + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:14596: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:14635: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -ldl" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case dl in + c|c_r|pthread*) ;; + *) + LIBS="-ldl $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_DLOPEN 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBDL 1 +EOF + + ac_cv_func_dlopen=yes + else + + : + + fi + + ;; + + esac + +if test "$ac_cv_func_dlopen" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBDL 1 +EOF + +fi +echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 +echo "configure:14742: 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 <&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 <&6 +fi + + + + unset ac_cv_func_res_search + unset ac_cv_func___res_search + unset found + + echo $ac_n "checking for res_search""... $ac_c" 1>&6 +echo "configure:14795: checking for res_search" >&5 +if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_res_search) || defined (__stub___res_search) +choke me +#else +res_search(); +#endif + +; return 0; } +EOF +if { (eval echo configure:14823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_search=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_res_search=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __res_search""... $ac_c" 1>&6 +echo "configure:14841: checking for __res_search" >&5 +if eval "test \"`echo '$''{'ac_cv_func___res_search'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub___res_search) || defined (__stub_____res_search) +choke me +#else +__res_search(); +#endif + +; return 0; } +EOF +if { (eval echo configure:14869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___res_search=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___res_search=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__res_search`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_RES_SEARCH 1 +EOF + + ac_cv_func_res_search=yes + ;; + + *) + + unset ac_cv_lib_resolv_res_search + unset ac_cv_lib_resolv___res_search + unset found + echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 +echo "configure:14907: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_search in -lresolv""... $ac_c" 1>&6 +echo "configure:14946: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lresolv" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case resolv in + c|c_r|pthread*) ;; + *) + LIBS="-lresolv $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_SEARCH 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBRESOLV 1 +EOF + + ac_cv_func_res_search=yes + else + + + unset ac_cv_lib_bind_res_search + unset ac_cv_lib_bind___res_search + unset found + echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6 +echo "configure:15043: checking for res_search in -lbind" >&5 +ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lbind $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6 +echo "configure:15082: checking for __res_search in -lbind" >&5 +ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lbind $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lbind" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case bind in + c|c_r|pthread*) ;; + *) + LIBS="-lbind $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_SEARCH 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBBIND 1 +EOF + + ac_cv_func_res_search=yes + else + + + unset ac_cv_lib_socket_res_search + unset ac_cv_lib_socket___res_search + unset found + echo $ac_n "checking for res_search in -lsocket""... $ac_c" 1>&6 +echo "configure:15179: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_search in -lsocket""... $ac_c" 1>&6 +echo "configure:15218: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lsocket" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case socket in + c|c_r|pthread*) ;; + *) + LIBS="-lsocket $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_SEARCH 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + ac_cv_func_res_search=yes + else + + : + + fi + + + fi + + + fi + + ;; + + esac + + + + unset ac_cv_func_inet_aton + unset ac_cv_func___inet_aton + unset found + + echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 +echo "configure:15331: checking for inet_aton" >&5 +if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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_inet_aton) || defined (__stub___inet_aton) +choke me +#else +inet_aton(); +#endif + +; return 0; } +EOF +if { (eval echo configure:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_inet_aton=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_inet_aton=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __inet_aton""... $ac_c" 1>&6 +echo "configure:15377: checking for __inet_aton" >&5 +if eval "test \"`echo '$''{'ac_cv_func___inet_aton'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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___inet_aton) || defined (__stub_____inet_aton) +choke me +#else +__inet_aton(); +#endif + +; return 0; } +EOF +if { (eval echo configure:15405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___inet_aton=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___inet_aton=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__inet_aton`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_INET_ATON 1 +EOF + + ac_cv_func_inet_aton=yes + ;; + + *) + + unset ac_cv_lib_resolv_inet_aton + unset ac_cv_lib_resolv___inet_aton + unset found + echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 +echo "configure:15443: checking for inet_aton in -lresolv" >&5 +ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __inet_aton in -lresolv""... $ac_c" 1>&6 +echo "configure:15482: checking for __inet_aton in -lresolv" >&5 +ac_lib_var=`echo resolv'_'__inet_aton | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lresolv" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case resolv in + c|c_r|pthread*) ;; + *) + LIBS="-lresolv $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_INET_ATON 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBRESOLV 1 +EOF + + ac_cv_func_inet_aton=yes + else + + + unset ac_cv_lib_bind_inet_aton + unset ac_cv_lib_bind___inet_aton + unset found + echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6 +echo "configure:15579: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __inet_aton in -lbind""... $ac_c" 1>&6 +echo "configure:15618: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lbind" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case bind in + c|c_r|pthread*) ;; + *) + LIBS="-lbind $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_INET_ATON 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBBIND 1 +EOF + + ac_cv_func_inet_aton=yes + else + + : + + fi + + + fi + + ;; + + esac + + + unset ac_cv_func_dn_skipname + unset ac_cv_func___dn_skipname + unset found + + echo $ac_n "checking for dn_skipname""... $ac_c" 1>&6 +echo "configure:15727: checking for dn_skipname" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dn_skipname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dn_skipname(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dn_skipname) || defined (__stub___dn_skipname) +choke me +#else +dn_skipname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:15755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dn_skipname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dn_skipname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dn_skipname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __dn_skipname""... $ac_c" 1>&6 +echo "configure:15773: checking for __dn_skipname" >&5 +if eval "test \"`echo '$''{'ac_cv_func___dn_skipname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __dn_skipname(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub___dn_skipname) || defined (__stub_____dn_skipname) +choke me +#else +__dn_skipname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:15801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___dn_skipname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___dn_skipname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__dn_skipname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_DN_SKIPNAME 1 +EOF + + ac_cv_func_dn_skipname=yes + ;; + + *) + + unset ac_cv_lib_resolv_dn_skipname + unset ac_cv_lib_resolv___dn_skipname + unset found + echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6 +echo "configure:15839: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_skipname in -lresolv""... $ac_c" 1>&6 +echo "configure:15878: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lresolv" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case resolv in + c|c_r|pthread*) ;; + *) + LIBS="-lresolv $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_DN_SKIPNAME 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBRESOLV 1 +EOF + + ac_cv_func_dn_skipname=yes + else + + + unset ac_cv_lib_bind_dn_skipname + unset ac_cv_lib_bind___dn_skipname + unset found + echo $ac_n "checking for dn_skipname in -lbind""... $ac_c" 1>&6 +echo "configure:15975: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_skipname in -lbind""... $ac_c" 1>&6 +echo "configure:16014: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lbind" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case bind in + c|c_r|pthread*) ;; + *) + LIBS="-lbind $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_DN_SKIPNAME 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBBIND 1 +EOF + + ac_cv_func_dn_skipname=yes + else + + : + + fi + + + fi + + ;; + + esac + + + + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:16121: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:16134: \"$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 +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 +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 < +#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:16201: \"$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 + +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:16229: 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 < +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:16242: \"$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 <&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:16267: 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 <&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:16308: 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 <&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 + + +for ac_hdr in \ +inttypes.h \ +stdint.h \ +dirent.h \ +ApplicationServices/ApplicationServices.h \ +sys/param.h \ +sys/types.h \ +sys/time.h \ +netinet/in.h \ +alloca.h \ +arpa/inet.h \ +arpa/nameser.h \ +assert.h \ +crypt.h \ +fcntl.h \ +grp.h \ +ieeefp.h \ +langinfo.h \ +limits.h \ +locale.h \ +monetary.h \ +mach-o/dyld.h \ +netdb.h \ +pwd.h \ +resolv.h \ +signal.h \ +stdarg.h \ +stdlib.h \ +string.h \ +syslog.h \ +sysexits.h \ +sys/ioctl.h \ +sys/file.h \ +sys/mman.h \ +sys/mount.h \ +sys/poll.h \ +sys/resource.h \ +sys/select.h \ +sys/socket.h \ +sys/stat.h \ +sys/statfs.h \ +sys/statvfs.h \ +sys/vfs.h \ +sys/sysexits.h \ +sys/varargs.h \ +sys/wait.h \ +sys/loadavg.h \ +termios.h \ +unistd.h \ +unix.h \ +utime.h \ +sys/utsname.h \ +sys/ipc.h \ +dlfcn.h \ +assert.h + +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:16409: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:16419: \"$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 <&6 +fi +done + + + + echo $ac_n "checking for fopencookie""... $ac_c" 1>&6 +echo "configure:16448: checking for fopencookie" >&5 +if eval "test \"`echo '$''{'ac_cv_func_fopencookie'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char fopencookie(); + +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_fopencookie) || defined (__stub___fopencookie) +choke me +#else +fopencookie(); +#endif + +; return 0; } +EOF +if { (eval echo configure:16476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_fopencookie=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_fopencookie=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'fopencookie`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_glibc_fopencookie=yes +else + echo "$ac_t""no" 1>&6 +fi + + + if test "$have_glibc_fopencookie" = "yes"; then +cat > conftest.$ac_ext < + +int main() { +cookie_io_functions_t cookie; +; return 0; } +EOF +if { (eval echo configure:16508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + have_cookie_io_functions_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + + if test "$have_cookie_io_functions_t" = "yes"; then + cookie_io_functions_t=cookie_io_functions_t + have_fopen_cookie=yes + +if test "$cross_compiling" = yes; then + + cookie_io_functions_use_off64_t=no + +else + cat > conftest.$ac_ext < + +struct cookiedata { + __off64_t pos; +}; + +__ssize_t reader(void *cookie, char *buffer, size_t size) +{ return size; } +__ssize_t writer(void *cookie, const char *buffer, size_t size) +{ return size; } +int closer(void *cookie) +{ return 0; } +int seeker(void *cookie, __off64_t *position, int whence) +{ ((struct cookiedata*)cookie)->pos = *position; return 0; } + +cookie_io_functions_t funcs = {reader, writer, seeker, closer}; + +main() { + struct cookiedata g = { 0 }; + FILE *fp = fopencookie(&g, "r", funcs); + + if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192) + exit(0); + exit(1); +} + + +EOF +if { (eval echo configure:16559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + cookie_io_functions_use_off64_t=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + cookie_io_functions_use_off64_t=no + +fi +rm -fr conftest* +fi + + + else + +cat > conftest.$ac_ext < + +int main() { + _IO_cookie_io_functions_t cookie; +; return 0; } +EOF +if { (eval echo configure:16589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + have_IO_cookie_io_functions_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + if test "$have_cookie_io_functions_t" = "yes" ; then + cookie_io_functions_t=_IO_cookie_io_functions_t + have_fopen_cookie=yes + fi + fi + + if test "$have_fopen_cookie" = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_FOPENCOOKIE 1 +EOF + + cat >> confdefs.h <> confdefs.h <<\EOF +#define COOKIE_SEEKER_USES_OFF64_T 1 +EOF + + fi + fi + fi + + + echo $ac_n "checking for broken getcwd""... $ac_c" 1>&6 +echo "configure:16623: checking for broken getcwd" >&5 + os=`uname -sr 2>/dev/null` + case $os in + SunOS*) + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_GETCWD 1 +EOF + + echo "$ac_t""yes" 1>&6;; + *) + echo "$ac_t""no" 1>&6;; + esac + + + echo $ac_n "checking for broken libc stdio""... $ac_c" 1>&6 +echo "configure:16638: checking for broken libc stdio" >&5 + if eval "test \"`echo '$''{'have_broken_glibc_fopen_append'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < + +int main() { + +#if !__GLIBC_PREREQ(2,2) +choke me +#endif + +; return 0; } +EOF +if { (eval echo configure:16658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + have_broken_glibc_fopen_append=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + have_broken_glibc_fopen_append=no +fi +rm -f conftest* + +else + cat > conftest.$ac_ext < +int main(int argc, char *argv[]) +{ + FILE *fp; + long position; + char *filename = "/tmp/phpglibccheck"; + + fp = fopen(filename, "w"); + if (fp == NULL) { + perror("fopen"); + exit(2); + } + fputs("foobar", fp); + fclose(fp); + + fp = fopen(filename, "a+"); + position = ftell(fp); + fclose(fp); + unlink(filename); + if (position == 0) + return 1; + return 0; +} + +EOF +if { (eval echo configure:16699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + have_broken_glibc_fopen_append=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + have_broken_glibc_fopen_append=yes +fi +rm -fr conftest* +fi + +fi + + + if test "$have_broken_glibc_fopen_append" = "yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_GLIBC_FOPEN_APPEND 1 +EOF + + else + echo "$ac_t""no" 1>&6 + fi + + + +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:16727: 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 < +#include +int main() { +struct tm *tp; tp->tm_sec; +; return 0; } +EOF +if { (eval echo configure:16740: \"$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:16761: 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 < +#include <$ac_cv_struct_tm> +int main() { +struct tm tm; tm.tm_zone; +; return 0; } +EOF +if { (eval echo configure:16774: \"$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:16794: 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 < +#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:16809: \"$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 missing declarations of reentrant functions""... $ac_c" 1>&6 +echo "configure:16833: checking for missing declarations of reentrant functions" >&5 + cat > conftest.$ac_ext < +int main() { +struct tm *(*func)() = localtime_r +; return 0; } +EOF +if { (eval echo configure:16842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define MISSING_LOCALTIME_R_DECL 1 +EOF + + +fi +rm -f conftest* + cat > conftest.$ac_ext < +int main() { +struct tm *(*func)() = gmtime_r +; return 0; } +EOF +if { (eval echo configure:16867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define MISSING_GMTIME_R_DECL 1 +EOF + + +fi +rm -f conftest* + cat > conftest.$ac_ext < +int main() { +char *(*func)() = asctime_r +; return 0; } +EOF +if { (eval echo configure:16892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define MISSING_ASCTIME_R_DECL 1 +EOF + + +fi +rm -f conftest* + cat > conftest.$ac_ext < +int main() { +char *(*func)() = ctime_r +; return 0; } +EOF +if { (eval echo configure:16917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define MISSING_CTIME_R_DECL 1 +EOF + + +fi +rm -f conftest* + cat > conftest.$ac_ext < +int main() { +char *(*func)() = strtok_r +; return 0; } +EOF +if { (eval echo configure:16942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define MISSING_STRTOK_R_DECL 1 +EOF + + +fi +rm -f conftest* + echo "$ac_t""done" 1>&6 + + + echo $ac_n "checking for fclose declaration""... $ac_c" 1>&6 +echo "configure:16963: checking for fclose declaration" >&5 + cat > conftest.$ac_ext < +int main() { +int (*func)() = fclose +; return 0; } +EOF +if { (eval echo configure:16972: \"$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* + + + +echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 +echo "configure:16998: 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 < +#include <$ac_cv_struct_tm> +int main() { +struct tm tm; tm.tm_gmtoff; +; return 0; } +EOF +if { (eval echo configure:17011: \"$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:17034: checking for struct flock" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_flock'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include + +int main() { +struct flock x; +; return 0; } +EOF +if { (eval echo configure:17049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_struct_flock=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_struct_flock=no + +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_struct_flock" 1>&6 +if test "$ac_cv_struct_flock" = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_FLOCK 1 +EOF + +fi + + +echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 +echo "configure:17076: checking for socklen_t" >&5 +if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include + +int main() { + +socklen_t x; + +; return 0; } +EOF +if { (eval echo configure:17093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_socklen_t=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_socklen_t=no + +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_socklen_t" 1>&6 +if test "$ac_cv_socklen_t" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SOCKLEN_T 1 +EOF + +fi + + +echo $ac_n "checking size of size_t""... $ac_c" 1>&6 +echo "configure:17119: checking size of size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_size_t=8 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(size_t)); + return(0); +} +EOF +if { (eval echo configure:17138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_size_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_size_t=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:17158: checking size of long long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long_long=8 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long long)); + return(0); +} +EOF +if { (eval echo configure:17177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long_long=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_long=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 +cat >> confdefs.h <&6 +echo "configure:17197: checking size of long long int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long_long_int=8 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long long int)); + return(0); +} +EOF +if { (eval echo configure:17216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long_long_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_long_int=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:17236: 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 < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long)); + return(0); +} +EOF +if { (eval echo configure:17255: \"$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 <&6 +echo "configure:17275: 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 < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(int)); + return(0); +} +EOF +if { (eval echo configure:17294: \"$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 <&6 +echo "configure:17316: checking size of intmax_t" >&5 + + php_cache_value=php_cv_sizeof_intmax_t + if eval "test \"`echo '$''{'php_cv_sizeof_intmax_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + old_LIBS=$LIBS + LIBS= + old_LDFLAGS=$LDFLAGS + LDFLAGS= + if test "$cross_compiling" = yes; then + + eval $php_cache_value=0 + +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + + +int main() +{ + FILE *fp = fopen("conftestval", "w"); + if (!fp) return(1); + fprintf(fp, "%d\n", sizeof(intmax_t)); + return(0); +} + +EOF +if { (eval echo configure:17357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + eval $php_cache_value=`cat conftestval` + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + eval $php_cache_value=0 + +fi +rm -fr conftest* +fi + + LDFLAGS=$old_LDFLAGS + LIBS=$old_LIBS + +fi + + if eval test "\$$php_cache_value" != "0"; then + + cat >> confdefs.h <> confdefs.h <&6 + + + echo $ac_n "checking size of ssize_t""... $ac_c" 1>&6 +echo "configure:17396: checking size of ssize_t" >&5 + + php_cache_value=php_cv_sizeof_ssize_t + if eval "test \"`echo '$''{'php_cv_sizeof_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + old_LIBS=$LIBS + LIBS= + old_LDFLAGS=$LDFLAGS + LDFLAGS= + if test "$cross_compiling" = yes; then + + eval $php_cache_value=8 + +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + + +int main() +{ + FILE *fp = fopen("conftestval", "w"); + if (!fp) return(1); + fprintf(fp, "%d\n", sizeof(ssize_t)); + return(0); +} + +EOF +if { (eval echo configure:17437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + eval $php_cache_value=`cat conftestval` + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + eval $php_cache_value=0 + +fi +rm -fr conftest* +fi + + LDFLAGS=$old_LDFLAGS + LIBS=$old_LIBS + +fi + + if eval test "\$$php_cache_value" != "0"; then + + cat >> confdefs.h <> confdefs.h <&6 + + + echo $ac_n "checking size of ptrdiff_t""... $ac_c" 1>&6 +echo "configure:17476: checking size of ptrdiff_t" >&5 + + php_cache_value=php_cv_sizeof_ptrdiff_t + if eval "test \"`echo '$''{'php_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + old_LIBS=$LIBS + LIBS= + old_LDFLAGS=$LDFLAGS + LDFLAGS= + if test "$cross_compiling" = yes; then + + eval $php_cache_value=8 + +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + + +int main() +{ + FILE *fp = fopen("conftestval", "w"); + if (!fp) return(1); + fprintf(fp, "%d\n", sizeof(ptrdiff_t)); + return(0); +} + +EOF +if { (eval echo configure:17517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + eval $php_cache_value=`cat conftestval` + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + eval $php_cache_value=0 + +fi +rm -fr conftest* +fi + + LDFLAGS=$old_LDFLAGS + LIBS=$old_LIBS + +fi + + if eval test "\$$php_cache_value" != "0"; then + + cat >> confdefs.h <> confdefs.h <&6 + + +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +echo "configure:17556: 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 < +#include +int main() { +struct stat s; s.st_blksize; +; return 0; } +EOF +if { (eval echo configure:17569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_blksize=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 +if test $ac_cv_struct_st_blksize = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLKSIZE 1 +EOF + +fi + +if test "`uname -s 2>/dev/null`" != "QNX"; then + echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:17591: 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 < +#include +int main() { +struct stat s; s.st_blocks; +; return 0; } +EOF +if { (eval echo configure:17604: \"$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 + +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:17631: 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 < +#include +int main() { +struct stat s; s.st_rdev; +; return 0; } +EOF +if { (eval echo configure:17644: \"$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:17666: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#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:17699: 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 +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 struct sockaddr_storage""... $ac_c" 1>&6 +echo "configure:17735: checking for struct sockaddr_storage" >&5 +if eval "test \"`echo '$''{'ac_cv_sockaddr_storage'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct sockaddr_storage s; s +; return 0; } +EOF +if { (eval echo configure:17748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sockaddr_storage=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_sockaddr_storage=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_sockaddr_storage" 1>&6 + if test "$ac_cv_sockaddr_storage" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SOCKADDR_STORAGE 1 +EOF + + fi + echo $ac_n "checking for field sa_len in struct sockaddr""... $ac_c" 1>&6 +echo "configure:17769: checking for field sa_len in struct sockaddr" >&5 +if eval "test \"`echo '$''{'ac_cv_sockaddr_sa_len'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +#include +int main() { +static struct sockaddr sa; int n = (int) sa.sa_len; return n; +; return 0; } +EOF +if { (eval echo configure:17783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sockaddr_sa_len=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_sockaddr_sa_len=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_sockaddr_sa_len" 1>&6 + if test "$ac_cv_sockaddr_sa_len" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SOCKADDR_SA_LEN 1 +EOF + + fi + + +echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6 +echo "configure:17806: checking for IPv6 support" >&5 +if eval "test \"`echo '$''{'ac_cv_ipv6_support'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; +; return 0; } +EOF +if { (eval echo configure:17820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_ipv6_support=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_ipv6_support=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_ipv6_support" 1>&6 + + +echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +echo "configure:17836: 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 < +/* Override any gcc2 internal prototype to avoid an 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:17864: \"$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:17888: 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 < +/* Override any gcc2 internal prototype to avoid an 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:17916: \"$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 alphasort \ +asctime_r \ +chroot \ +ctime_r \ +cuserid \ +crypt \ +flock \ +ftok \ +funopen \ +gai_strerror \ +gcvt \ +getloadavg \ +getlogin \ +getprotobyname \ +getprotobynumber \ +getservbyname \ +getservbyport \ +getrusage \ +gettimeofday \ +gmtime_r \ +getpwnam_r \ +getgrnam_r \ +getpwuid_r \ +grantpt \ +inet_ntoa \ +inet_ntop \ +inet_pton \ +isascii \ +link \ +localtime_r \ +lockf \ +lchown \ +lrand48 \ +memcpy \ +memmove \ +mkstemp \ +mmap \ +nl_langinfo \ +perror \ +poll \ +ptsname \ +putenv \ +realpath \ +random \ +rand_r \ +regcomp \ +res_search \ +scandir \ +setitimer \ +setlocale \ +localeconv \ +setenv \ +setpgid \ +setsockopt \ +setvbuf \ +shutdown \ +sin \ +snprintf \ +srand48 \ +srandom \ +statfs \ +statvfs \ +std_syslog \ +strcasecmp \ +strcoll \ +strdup \ +strerror \ +strftime \ +strptime \ +strstr \ +strtok_r \ +symlink \ +tempnam \ +tzset \ +unlockpt \ +unsetenv \ +usleep \ +nanosleep \ +utime \ +vsnprintf \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18023: 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 < +/* Override any gcc2 internal prototype to avoid an 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:18051: \"$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 <&6 +fi +done + + +echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 +echo "configure:18077: checking for getaddrinfo" >&5 +if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g); +; return 0; } +EOF +if { (eval echo configure:18089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + if test "$cross_compiling" = yes; then + ac_cv_func_getaddrinfo=no +else + cat > conftest.$ac_ext < +#include +#ifndef AF_INET +# include +#endif +int main(void) { + struct addrinfo *ai, *pai, hints; + + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_NUMERICHOST; + + if (getaddrinfo("127.0.0.1", 0, &hints, &ai) < 0) { + exit(1); + } + + if (ai == 0) { + exit(1); + } + + pai = ai; + + while (pai) { + if (pai->ai_family != AF_INET) { + /* 127.0.0.1/NUMERICHOST should only resolve ONE way */ + exit(1); + } + if (pai->ai_addr->sa_family != AF_INET) { + /* 127.0.0.1/NUMERICHOST should only resolve ONE way */ + exit(1); + } + pai = pai->ai_next; + } + freeaddrinfo(ai); + exit(0); +} + +EOF +if { (eval echo configure:18135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_getaddrinfo=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_getaddrinfo=no +fi +rm -fr conftest* +fi + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_getaddrinfo=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_func_getaddrinfo" 1>&6 +if test "$ac_cv_func_getaddrinfo" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_GETADDRINFO 1 +EOF + +fi + +for ac_func in strlcat strlcpy getopt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18167: 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 < +/* Override any gcc2 internal prototype to avoid an 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:18195: \"$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 <&6 +LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" +fi +done + + +echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 +echo "configure:18222: 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 < +#include +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:18243: \"$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:18269: 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 < +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:18281: \"$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:18302: 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 < +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# 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:18335: \"$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:18367: 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 <&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:18397: 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 < +/* Override any gcc2 internal prototype to avoid an 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:18425: \"$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 <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:18452: 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 < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:18479: \"$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 <&6 +echo "configure:18502: 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 < +#include +#ifdef HAVE_SYS_TIME_H +#include +#endif + +int main() { + + time_t foo = (time_t) timezone; + +; return 0; } +EOF +if { (eval echo configure:18523: \"$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 + + +echo $ac_n "checking for type of reentrant time-related functions""... $ac_c" 1>&6 +echo "configure:18549: checking for type of reentrant time-related functions" >&5 +if eval "test \"`echo '$''{'ac_cv_time_r_type'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_time_r_type=POSIX + +else + cat > conftest.$ac_ext < + +main() { +char buf[27]; +struct tm t; +time_t old = 0; +int r, s; + +s = gmtime_r(&old, &t); +r = (int) asctime_r(&t, buf, 26); +if (r == s && s == 0) return (0); +return (1); +} + +EOF +if { (eval echo configure:18578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_time_r_type=hpux + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + if test "$cross_compiling" = yes; then + + ac_cv_time_r_type=POSIX + +else + cat > conftest.$ac_ext < +main() { + struct tm t, *s; + time_t old = 0; + char buf[27], *p; + + s = gmtime_r(&old, &t); + p = asctime_r(&t, buf, 26); + if (p == buf && s == &t) return (0); + return (1); +} + +EOF +if { (eval echo configure:18610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_time_r_type=irix + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_time_r_type=POSIX + +fi +rm -fr conftest* +fi + + +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_time_r_type" 1>&6 + case $ac_cv_time_r_type in + hpux) cat >> confdefs.h <<\EOF +#define PHP_HPUX_TIME_R 1 +EOF + ;; + irix) cat >> confdefs.h <<\EOF +#define PHP_IRIX_TIME_R 1 +EOF + ;; + esac + + + echo $ac_n "checking for readdir_r""... $ac_c" 1>&6 +echo "configure:18648: checking for readdir_r" >&5 +if eval "test \"`echo '$''{'ac_cv_func_readdir_r'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char readdir_r(); + +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_readdir_r) || defined (__stub___readdir_r) +choke me +#else +readdir_r(); +#endif + +; return 0; } +EOF +if { (eval echo configure:18676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_readdir_r=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_readdir_r=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'readdir_r`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_func_readdir_r=yes +else + echo "$ac_t""no" 1>&6 +ac_cv_func_readdir=no +fi + + if test "$ac_cv_func_readdir_r" = "yes"; then + echo $ac_n "checking for type of readdir_r""... $ac_c" 1>&6 +echo "configure:18698: checking for type of readdir_r" >&5 +if eval "test \"`echo '$''{'ac_cv_what_readdir_r'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + + ac_cv_what_readdir_r=none + +else + cat > conftest.$ac_ext < +#include + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +main() { + DIR *dir; + char entry[sizeof(struct dirent)+PATH_MAX]; + struct dirent *pentry = (struct dirent *) &entry; + + dir = opendir("/"); + if (!dir) + exit(1); + if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) + exit(0); + exit(1); +} + +EOF +if { (eval echo configure:18734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_what_readdir_r=POSIX + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + cat > conftest.$ac_ext < +#include +int readdir_r(DIR *, struct dirent *); + +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:18755: \"$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_what_readdir_r=old-style + +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_what_readdir_r=none + +fi +rm -f conftest* + +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_what_readdir_r" 1>&6 + case $ac_cv_what_readdir_r in + POSIX) + cat >> confdefs.h <<\EOF +#define HAVE_POSIX_READDIR_R 1 +EOF +;; + old-style) + cat >> confdefs.h <<\EOF +#define HAVE_OLD_READDIR_R 1 +EOF +;; + esac + fi + + +echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6 +echo "configure:18797: checking for in_addr_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_in_addr_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#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 +echo "$ac_t""$ac_cv_type_in_addr_t" 1>&6 +if test $ac_cv_type_in_addr_t = no; then + cat >> confdefs.h <<\EOF +#define in_addr_t u_int +EOF + +fi + + +for ac_func in crypt_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18836: 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 < +/* Override any gcc2 internal prototype to avoid an 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:18864: \"$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 <&6 +php_crypt_r="0" +fi +done + +if test "x$php_crypt_r" = "x1"; then + + echo $ac_n "checking which data struct is used by crypt_r""... $ac_c" 1>&6 +echo "configure:18892: checking which data struct is used by crypt_r" >&5 +if eval "test \"`echo '$''{'php_cv_crypt_r_style'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + php_cv_crypt_r_style=none + cat > conftest.$ac_ext < + +int main() { + +CRYPTD buffer; +crypt_r("passwd", "hash", &buffer); + +; return 0; } +EOF +if { (eval echo configure:18912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + php_cv_crypt_r_style=cryptd +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + + if test "$php_cv_crypt_r_style" = "none"; then + cat > conftest.$ac_ext < + +int main() { + +struct crypt_data buffer; +crypt_r("passwd", "hash", &buffer); + +; return 0; } +EOF +if { (eval echo configure:18936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + php_cv_crypt_r_style=struct_crypt_data +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + fi + + if test "$php_cv_crypt_r_style" = "none"; then + cat > conftest.$ac_ext < + +int main() { + +struct crypt_data buffer; +crypt_r("passwd", "hash", &buffer); + +; return 0; } +EOF +if { (eval echo configure:18962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + php_cv_crypt_r_style=struct_crypt_data_gnu_source +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + fi + +fi + +echo "$ac_t""$php_cv_crypt_r_style" 1>&6 + + if test "$php_cv_crypt_r_style" = "cryptd"; then + cat >> confdefs.h <<\EOF +#define CRYPT_R_CRYPTD 1 +EOF + + fi + if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then + cat >> confdefs.h <<\EOF +#define CRYPT_R_STRUCT_CRYPT_DATA 1 +EOF + + fi + if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then + cat >> confdefs.h <<\EOF +#define CRYPT_R_GNU_SOURCE 1 +EOF + + fi + if test "$php_cv_crypt_r_style" = "none"; then + { echo "configure: error: Unable to detect data struct used by crypt_r" 1>&2; exit 1; } + fi + +fi + + + + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}General settings${T_ME}" 1>&6 + + + +# Check whether --enable- or --disable- was given. +if test "${enable_+set}" = set; then + enableval="$enable_" + : +fi + + + + +php_enable_gcov=no + +echo $ac_n "checking whether to include gcov symbols""... $ac_c" 1>&6 +echo "configure:19021: checking whether to include gcov symbols" >&5 +# Check whether --enable-gcov or --disable-gcov was given. +if test "${enable_gcov+set}" = set; then + enableval="$enable_gcov" + PHP_GCOV=$enableval +else + + PHP_GCOV=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_GCOV=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_GCOV +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_GCOV" = "yes"; then + + if test "$GCC" != "yes"; then + { echo "configure: error: GCC is required for --enable-gcov" 1>&2; exit 1; } + fi + + case `$php_shtool path $CC` in + *ccache*) gcc_ccache=yes;; + *) gcc_ccache=no;; + esac + + if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then + { echo "configure: error: ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1." 1>&2; exit 1; } + fi + + ltp_version_list="1.5 1.6" + + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:19063: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LTP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LTP"; then + ac_cv_prog_LTP="$LTP" # 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_LTP="lcov" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LTP="$ac_cv_prog_LTP" +if test -n "$LTP"; then + echo "$ac_t""$LTP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:19092: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LTP_GENHTML'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LTP_GENHTML"; then + ac_cv_prog_LTP_GENHTML="$LTP_GENHTML" # 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_LTP_GENHTML="genhtml" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LTP_GENHTML="$ac_cv_prog_LTP_GENHTML" +if test -n "$LTP_GENHTML"; then + echo "$ac_t""$LTP_GENHTML" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST LTP" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST LTP_GENHTML" + + + if test "$LTP"; then + echo $ac_n "checking for ltp version""... $ac_c" 1>&6 +echo "configure:19127: checking for ltp version" >&5 +if eval "test \"`echo '$''{'php_cv_ltp_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + php_cv_ltp_version=invalid + ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'` + for ltp_check_version in $ltp_version_list; do + if test "$ltp_version" = "$ltp_check_version"; then + php_cv_ltp_version="$ltp_check_version (ok)" + fi + done + +fi + +echo "$ac_t""$php_cv_ltp_version" 1>&6 + else + ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list" + { echo "configure: error: $ltp_msg" 1>&2; exit 1; } + fi + + case $php_cv_ltp_version in + ""|invalid) + ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)." + { echo "configure: error: $ltp_msg" 1>&2; exit 1; } + LTP="exit 0;" + ;; + esac + + if test -z "$LTP_GENHTML"; then + { echo "configure: error: Could not find genhtml from the LTP package" 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define HAVE_GCOV 1 +EOF + + + src=$abs_srcdir/Makefile.gcov + ac_srcdir=$abs_srcdir + ac_builddir=$ext_builddir + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + + + + CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` + CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` + + + CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage" + CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage" +fi + + +php_enable_debug=no + +echo $ac_n "checking whether to include debugging symbols""... $ac_c" 1>&6 +echo "configure:19184: 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" + PHP_DEBUG=$enableval +else + + PHP_DEBUG=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DEBUG=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DEBUG +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_DEBUG" = "yes"; then + PHP_DEBUG=1 + ZEND_DEBUG=yes + + CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` + CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` + + if test "$GCC" = "yes" || test "$ICC" = "yes"; then + CFLAGS="$CFLAGS -O0" + CXXFLAGS="$CXXFLAGS -O0" + fi +else + PHP_DEBUG=0 + ZEND_DEBUG=no +fi + + +php_with_layout=PHP + +echo $ac_n "checking layout of installed files""... $ac_c" 1>&6 +echo "configure:19226: checking layout of installed files" >&5 +# Check whether --with-layout or --without-layout was given. +if test "${with_layout+set}" = set; then + withval="$with_layout" + PHP_LAYOUT=$withval +else + + PHP_LAYOUT=PHP + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LAYOUT=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LAYOUT +echo "$ac_t""$ext_output" 1>&6 + + + + +case $PHP_LAYOUT in + GNU) + oldstyleextdir=no + ;; + *) + oldstyleextdir=yes + ;; +esac + + +php_with_config_file_path=DEFAULT + +echo $ac_n "checking path to configuration file""... $ac_c" 1>&6 +echo "configure:19261: checking path to configuration file" >&5 +# Check whether --with-config-file-path or --without-config-file-path was given. +if test "${with_config_file_path+set}" = set; then + withval="$with_config_file_path" + PHP_CONFIG_FILE_PATH=$withval +else + + PHP_CONFIG_FILE_PATH=DEFAULT + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CONFIG_FILE_PATH=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CONFIG_FILE_PATH +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then + case $PHP_LAYOUT in + GNU) + PHP_CONFIG_FILE_PATH=$sysconfdir + ;; + *) + PHP_CONFIG_FILE_PATH=$libdir + ;; + esac +fi + +echo $ac_n "checking where to scan for configuration files""... $ac_c" 1>&6 +echo "configure:19295: checking where to scan for configuration files" >&5 + +php_with_config_file_scan_dir=DEFAULT + + +# Check whether --with-config-file-scan-dir or --without-config-file-scan-dir was given. +if test "${with_config_file_scan_dir+set}" = set; then + withval="$with_config_file_scan_dir" + PHP_CONFIG_FILE_SCAN_DIR=$withval +else + + PHP_CONFIG_FILE_SCAN_DIR=DEFAULT + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CONFIG_FILE_SCAN_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CONFIG_FILE_SCAN_DIR + + + + +if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then + PHP_CONFIG_FILE_SCAN_DIR= +fi +echo "$ac_t""$PHP_CONFIG_FILE_SCAN_DIR" 1>&6 + +test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS" + + +php_enable_safe_mode=no + +echo $ac_n "checking whether to enable safe mode by default""... $ac_c" 1>&6 +echo "configure:19331: 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" + PHP_SAFE_MODE=$enableval +else + + PHP_SAFE_MODE=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_SAFE_MODE=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_SAFE_MODE +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SAFE_MODE" = "yes"; then + cat >> confdefs.h <<\EOF +#define PHP_SAFE_MODE 1 +EOF + +else + cat >> confdefs.h <<\EOF +#define PHP_SAFE_MODE 0 +EOF + +fi + +echo $ac_n "checking for safe mode exec dir""... $ac_c" 1>&6 +echo "configure:19366: checking for safe mode exec dir" >&5 + +php_with_exec_dir=no + + +# Check whether --with-exec-dir or --without-exec-dir was given. +if test "${with_exec_dir+set}" = set; then + withval="$with_exec_dir" + PHP_EXEC_DIR=$withval +else + + PHP_EXEC_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_EXEC_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_EXEC_DIR + + + + + +if test "$PHP_EXEC_DIR" != "no" && test "$PHP_EXEC_DIR" != "yes" ; then + cat >> confdefs.h <&6 +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 + + +php_enable_sigchild=no + +echo $ac_n "checking whether to enable PHP's own SIGCHLD handler""... $ac_c" 1>&6 +echo "configure:19410: 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" + PHP_SIGCHILD=$enableval +else + + PHP_SIGCHILD=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_SIGCHILD=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_SIGCHILD +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SIGCHILD" = "yes"; then + cat >> confdefs.h <<\EOF +#define PHP_SIGCHILD 1 +EOF + +else + cat >> confdefs.h <<\EOF +#define PHP_SIGCHILD 0 +EOF + +fi + + +php_enable_magic_quotes=no + +echo $ac_n "checking whether to enable magic quotes by default""... $ac_c" 1>&6 +echo "configure:19448: 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" + PHP_MAGIC_QUOTES=$enableval +else + + PHP_MAGIC_QUOTES=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MAGIC_QUOTES=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MAGIC_QUOTES +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MAGIC_QUOTES" = "yes"; then + cat >> confdefs.h <<\EOF +#define MAGIC_QUOTES 1 +EOF + +else + cat >> confdefs.h <<\EOF +#define MAGIC_QUOTES 0 +EOF + +fi + + +php_enable_libgcc=no + +echo $ac_n "checking whether to explicitly link against libgcc""... $ac_c" 1>&6 +echo "configure:19486: checking whether to explicitly link against libgcc" >&5 +# Check whether --enable-libgcc or --disable-libgcc was given. +if test "${enable_libgcc+set}" = set; then + enableval="$enable_libgcc" + PHP_LIBGCC=$enableval +else + + PHP_LIBGCC=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBGCC=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBGCC +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_LIBGCC" = "yes"; then + + + libgcc_libpath=`gcc --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'` + + + if test -z "$libgcc_libpath"; then + { echo "configure: error: Cannot locate libgcc. Make sure that gcc is in your path" 1>&2; exit 1; } + fi + + if test "$libgcc_libpath" != "/usr/$PHP_LIBDIR" && test "$libgcc_libpath" != "/usr/lib"; then + + if test -z "$libgcc_libpath" || echo "$libgcc_libpath" | grep '^/' >/dev/null ; then + ai_p=$libgcc_libpath + else + + ep_dir="`echo $libgcc_libpath|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$libgcc_libpath\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + + + case gcc in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lgcc" + ;; + esac + + +fi + + +php_enable_short_tags=yes + +echo $ac_n "checking whether to enable short tags by default""... $ac_c" 1>&6 +echo "configure:19566: 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" + PHP_SHORT_TAGS=$enableval +else + + PHP_SHORT_TAGS=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_SHORT_TAGS=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_SHORT_TAGS +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SHORT_TAGS" = "yes"; then + cat >> confdefs.h <<\EOF +#define DEFAULT_SHORT_OPEN_TAG "1" +EOF + +else + cat >> confdefs.h <<\EOF +#define DEFAULT_SHORT_OPEN_TAG "0" +EOF + +fi + + +php_enable_dmalloc=no + +echo $ac_n "checking whether to enable dmalloc""... $ac_c" 1>&6 +echo "configure:19604: checking whether to enable dmalloc" >&5 +# Check whether --enable-dmalloc or --disable-dmalloc was given. +if test "${enable_dmalloc+set}" = set; then + enableval="$enable_dmalloc" + PHP_DMALLOC=$enableval +else + + PHP_DMALLOC=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DMALLOC=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DMALLOC +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_DMALLOC" = "yes"; then + echo $ac_n "checking for dmalloc_error in -ldmalloc""... $ac_c" 1>&6 +echo "configure:19628: checking for dmalloc_error in -ldmalloc" >&5 +ac_lib_var=`echo dmalloc'_'dmalloc_error | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldmalloc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + + case dmalloc in + c|c_r|pthread*) ;; + *) + LIBS="-ldmalloc $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_DMALLOC 1 +EOF + + CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK" + +else + echo "$ac_t""no" 1>&6 + + { echo "configure: error: Problem with enabling dmalloc. Please check config.log for details." 1>&2; exit 1; } + +fi + +fi + + +php_enable_ipv6=yes + +echo $ac_n "checking whether to enable IPv6 support""... $ac_c" 1>&6 +echo "configure:19692: checking whether to enable IPv6 support" >&5 +# Check whether --enable-ipv6 or --disable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then + enableval="$enable_ipv6" + PHP_IPV6=$enableval +else + + PHP_IPV6=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_IPV6=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_IPV6 +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_IPV6 1 +EOF + +fi + +echo $ac_n "checking how big to make fd sets""... $ac_c" 1>&6 +echo "configure:19722: checking how big to make fd sets" >&5 + +php_enable_fd_setsize=no + + +# Check whether --enable-fd-setsize or --disable-fd-setsize was given. +if test "${enable_fd_setsize+set}" = set; then + enableval="$enable_fd_setsize" + PHP_FD_SETSIZE=$enableval +else + + PHP_FD_SETSIZE=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_FD_SETSIZE=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_FD_SETSIZE + + + + + +if test "$PHP_FD_SETSIZE" != "no"; then + if test "0$PHP_FD_SETSIZE" -gt 0 2>/dev/null; then + CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PHP_FD_SETSIZE" + echo "$ac_t""using $PHP_FD_SETSIZE" 1>&6 + else + { echo "configure: error: Invalid value passed to --enable-fd-setsize!" 1>&2; exit 1; } + fi +else + echo "$ac_t""using system default" 1>&6 +fi + + + + + + +# Check whether --enable- or --disable- was given. +if test "${enable_+set}" = set; then + enableval="$enable_" + : +fi + + + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}Configuring extensions${T_ME}" 1>&6 + + + +# Check whether --enable-all or --disable-all was given. +if test "${enable_all+set}" = set; then + enableval="$enable_all" + + PHP_ENABLE_ALL=$enableval + +fi + + +# reading config stubs + + +php_enable_libxml=yes + +echo $ac_n "checking whether to enable LIBXML support""... $ac_c" 1>&6 +echo "configure:19793: checking whether to enable LIBXML support" >&5 +# Check whether --enable-libxml or --disable-libxml was given. +if test "${enable_libxml+set}" = set; then + enableval="$enable_libxml" + PHP_LIBXML=$enableval +else + + PHP_LIBXML=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_LIBXML=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_LIBXML in +shared,*) + PHP_LIBXML=`echo "$PHP_LIBXML"|$SED 's/^shared,//'` + ;; +shared) + PHP_LIBXML=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:19841: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_LIBXML" != "no"; then + + ext_shared=no + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:19870: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LIBXML_SHARED_LIBADD="$LIBXML_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LIBXML_SHARED_LIBADD="$LIBXML_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LIBXML_SHARED_LIBADD="-L$ai_p $LIBXML_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LIBXML_SHARED_LIBADD="$ld_runpath_switch$ai_p $LIBXML_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:20028: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $LIBXML_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + + ext_builddir=ext/libxml + ext_srcdir=$abs_srcdir/ext/libxml + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_LIBXML_SHARED=no + + + case ext/libxml in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/libxml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/libxml/"; ac_bdir="ext/libxml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in libxml.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; } + + fi + +fi + + + +php_with_openssl=no + +echo $ac_n "checking for OpenSSL support""... $ac_c" 1>&6 +echo "configure:20409: checking for OpenSSL support" >&5 +# 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 + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_OPENSSL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_OPENSSL in +shared,*) + PHP_OPENSSL=`echo "$PHP_OPENSSL"|$SED 's/^shared,//'` + ;; +shared) + PHP_OPENSSL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_kerberos=no + +echo $ac_n "checking for Kerberos support""... $ac_c" 1>&6 +echo "configure:20456: checking for Kerberos support" >&5 +# Check whether --with-kerberos or --without-kerberos was given. +if test "${with_kerberos+set}" = set; then + withval="$with_kerberos" + PHP_KERBEROS=$withval +else + + PHP_KERBEROS=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_KERBEROS=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_KERBEROS +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_OPENSSL" != "no"; then + + ext_builddir=ext/openssl + ext_srcdir=$abs_srcdir/ext/openssl + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_OPENSSL_SHARED=no + + + case ext/openssl in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/openssl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/openssl/"; ac_bdir="ext/openssl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in openssl.c xp_ssl.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:20774: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$KRB5_CONFIG" in + /*) + ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/usr/kerberos/bin:/usr/local/bin" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_KRB5_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_KRB5_CONFIG" && ac_cv_path_KRB5_CONFIG="no" + ;; +esac +fi +KRB5_CONFIG="$ac_cv_path_KRB5_CONFIG" +if test -n "$KRB5_CONFIG"; then + echo "$ac_t""$KRB5_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then + KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi` + KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi` + + if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then + found_kerberos=yes + + for ac_i in $KERBEROS_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="-L$ai_p $OPENSSL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OPENSSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $OPENSSL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $KERBEROS_CFLAGS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + fi + fi + + if test "$found_kerberos" = "no"; then + + if test "$PHP_KERBEROS" = "yes"; then + PHP_KERBEROS="/usr/kerberos /usr/local /usr" + fi + + for i in $PHP_KERBEROS; do + if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then + PHP_KERBEROS_DIR=$i + break + fi + done + + if test "$PHP_KERBEROS_DIR"; then + found_kerberos=yes + + if test "$PHP_KERBEROS_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_KERBEROS_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_KERBEROS_DIR/$PHP_LIBDIR" || echo "$PHP_KERBEROS_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_KERBEROS_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_KERBEROS_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_KERBEROS_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="-L$ai_p $OPENSSL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OPENSSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $OPENSSL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + + + case gssapi_krb5 in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -lgssapi_krb5" + else + + + case gssapi_krb5 in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lgssapi_krb5" + ;; + esac + + + fi + ;; + esac + + + + + case krb5 in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -lkrb5" + else + + + case krb5 in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lkrb5" + ;; + esac + + + fi + ;; + esac + + + + + case k5crypto in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -lk5crypto" + else + + + case k5crypto in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lk5crypto" + ;; + esac + + + fi + ;; + esac + + + + + case com_err in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -lcom_err" + else + + + case com_err in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lcom_err" + ;; + esac + + + fi + ;; + esac + + + + if test "$PHP_KERBEROS_DIR/include" != "/usr/include"; then + + if test -z "$PHP_KERBEROS_DIR/include" || echo "$PHP_KERBEROS_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$PHP_KERBEROS_DIR/include + else + + ep_dir="`echo $PHP_KERBEROS_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_KERBEROS_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + fi + fi + + if test "$found_kerberos" = "yes"; then +: + + fi + + fi + + echo $ac_n "checking for DSA_get_default_method in -lssl""... $ac_c" 1>&6 +echo "configure:21134: checking for DSA_get_default_method in -lssl" >&5 +ac_lib_var=`echo ssl'_'DSA_get_default_method | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lssl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DSA_DEFAULT_METHOD 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + + found_openssl=no + unset OPENSSL_INCDIR + unset OPENSSL_LIBDIR + + test -z "$PHP_OPENSSL" && PHP_OPENSSL=no + test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no + + if test "$PHP_OPENSSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_OPENSSL + elif test "$PHP_IMAP_SSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_IMAP_SSL + fi + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:21195: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then + if $PKG_CONFIG --atleast-version=0.9.6 openssl; then + found_openssl=yes + OPENSSL_LIBS=`$PKG_CONFIG --libs openssl` + OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl` + OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl` + else + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + fi + + if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then + + for ac_i in $OPENSSL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="-L$ai_p $OPENSSL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OPENSSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $OPENSSL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $OPENSSL_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + fi + fi + + if test "$found_openssl" = "no"; then + + if test "$PHP_OPENSSL_DIR" = "yes"; then + PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" + fi + + for i in $PHP_OPENSSL_DIR; do + if test -r $i/include/openssl/evp.h; then + OPENSSL_INCDIR=$i/include + fi + if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then + OPENSSL_LIBDIR=$i/$PHP_LIBDIR + fi + test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break + done + + if test -z "$OPENSSL_INCDIR"; then + { echo "configure: error: Cannot find OpenSSL's " 1>&2; exit 1; } + fi + + if test -z "$OPENSSL_LIBDIR"; then + { echo "configure: error: Cannot find OpenSSL's libraries" 1>&2; exit 1; } + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +echo "configure:21400: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +#if OPENSSL_VERSION_NUMBER >= 0x0090600fL + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t"">= 0.9.6" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + +fi +rm -f conftest* + + CPPFLAGS=$old_CPPFLAGS + + + if test "$OPENSSL_INCDIR" != "/usr/include"; then + + if test -z "$OPENSSL_INCDIR" || echo "$OPENSSL_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_INCDIR + else + + ep_dir="`echo $OPENSSL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +echo "configure:21557: checking for CRYPTO_free in -lcrypto" >&5 +ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypto $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case crypto in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="-lcrypto $OPENSSL_SHARED_LIBADD" + else + + + case crypto in + c|c_r|pthread*) ;; + *) + LIBS="-lcrypto $LIBS" + ;; + esac + + + fi + ;; + esac + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_crypto_CRYPTO_free + + { echo "configure: error: libcrypto not found!" 1>&2; exit 1; } + + +fi + + + old_LIBS=$LIBS + LIBS="$LIBS -lcrypto" + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +echo "configure:21733: checking for SSL_CTX_set_ssl_version in -lssl" >&5 +ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lssl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_openssl=yes + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version + + { echo "configure: error: libssl not found!" 1>&2; exit 1; } + + +fi + + LIBS=$old_LIBS + + + case ssl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="-lssl $OPENSSL_SHARED_LIBADD" + else + + + case ssl in + c|c_r|pthread*) ;; + *) + LIBS="-lssl $LIBS" + ;; + esac + + + fi + ;; + esac + + + + + if test "$OPENSSL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$OPENSSL_LIBDIR" != "/usr/lib"; then + + if test -z "$OPENSSL_LIBDIR" || echo "$OPENSSL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_LIBDIR + else + + ep_dir="`echo $OPENSSL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + OPENSSL_SHARED_LIBADD="-L$ai_p $OPENSSL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OPENSSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $OPENSSL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + + if test "$found_openssl" = "yes"; then + OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR + + + + cat >> confdefs.h <<\EOF +#define HAVE_OPENSSL_EXT 1 +EOF + + +else + { echo "configure: error: OpenSSL check failed. Please check config.log for more information." 1>&2; exit 1; } + + fi + +fi + + + + +php_with_pcre_regex=yes + +echo $ac_n "checking for PCRE support""... $ac_c" 1>&6 +echo "configure:21874: checking for 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" + PHP_PCRE_REGEX=$withval +else + + PHP_PCRE_REGEX=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PCRE_REGEX=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PCRE_REGEX in +shared,*) + PHP_PCRE_REGEX=`echo "$PHP_PCRE_REGEX"|$SED 's/^shared,//'` + ;; +shared) + PHP_PCRE_REGEX=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PCRE_REGEX" != "no"; then + if test "$PHP_PCRE_REGEX" = "yes"; then + + ext_builddir=ext/pcre + ext_srcdir=$abs_srcdir/ext/pcre + + ac_extra=`echo "-I@ext_srcdir@/pcrelib"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PCRE_SHARED=no + + + case ext/pcre in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pcre"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pcre/"; ac_bdir="ext/pcre/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pcrelib/pcre_chartables.c pcrelib/pcre_ucp_searchfuncs.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_BUNDLED_PCRE 1 +EOF + + else + for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre; do + test -f $i/pcre.h && PCRE_INCDIR=$i + done + + if test -z "$PCRE_INCDIR"; then + { echo "configure: error: Could not find pcre.h in $PHP_PCRE_REGEX" 1>&2; exit 1; } + fi + + for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do + test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j + done + + if test -z "$PCRE_LIBDIR" ; then + { echo "configure: error: Could not find libpcre.(a|$SHLIB_SUFFIX_NAME) in $PHP_PCRE_REGEX" 1>&2; exit 1; } + fi + + + pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'` + pcre_minor=`grep PCRE_MINOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'` + + pcre_minor_length=`echo "$pcre_minor" | wc -c | sed -e 's/^0-9//g'` + if test "$pcre_minor_length" -eq 2 ; then + pcre_minor="$pcre_minor"0 + fi + pcre_version=$pcre_major$pcre_minor + if test "$pcre_version" -lt 660; then + { echo "configure: error: The PCRE extension requires PCRE library version >= 6.6" 1>&2; exit 1; } + fi + + + + if test "$ext_shared" = "yes"; then + PCRE_SHARED_LIBADD="-lpcre $PCRE_SHARED_LIBADD" + if test -n "$PCRE_LIBDIR"; then + + if test "$PCRE_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PCRE_LIBDIR" != "/usr/lib"; then + + if test -z "$PCRE_LIBDIR" || echo "$PCRE_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PCRE_LIBDIR + else + + ep_dir="`echo $PCRE_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PCRE_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PCRE_SHARED_LIBADD="-L$ai_p $PCRE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PCRE_SHARED_LIBADD="$ld_runpath_switch$ai_p $PCRE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PCRE_LIBDIR"; then + + if test "$PCRE_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PCRE_LIBDIR" != "/usr/lib"; then + + if test -z "$PCRE_LIBDIR" || echo "$PCRE_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PCRE_LIBDIR + else + + ep_dir="`echo $PCRE_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PCRE_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case pcre in + c|c_r|pthread*) ;; + *) + LIBS="-lpcre $LIBS" + ;; + esac + + + + + fi + + + + cat >> confdefs.h <<\EOF +#define HAVE_PCRE 1 +EOF + + + if test "$PCRE_INCDIR" != "/usr/include"; then + + if test -z "$PCRE_INCDIR" || echo "$PCRE_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$PCRE_INCDIR + else + + ep_dir="`echo $PCRE_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PCRE_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + ext_builddir=ext/pcre + ext_srcdir=$abs_srcdir/ext/pcre + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PCRE_SHARED=no + + + case ext/pcre in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pcre"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pcre/"; ac_bdir="ext/pcre/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_pcre.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:22706: checking for ZLIB support" >&5 +# Check whether --with-zlib or --without-zlib was given. +if test "${with_zlib+set}" = set; then + withval="$with_zlib" + PHP_ZLIB=$withval +else + + PHP_ZLIB=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_ZLIB=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_ZLIB in +shared,*) + PHP_ZLIB=`echo "$PHP_ZLIB"|$SED 's/^shared,//'` + ;; +shared) + PHP_ZLIB=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_zlib_dir=no + +echo $ac_n "checking if the location of ZLIB install directory is defined""... $ac_c" 1>&6 +echo "configure:22753: checking if the location of ZLIB install directory is defined" >&5 +# Check whether --with-zlib-dir or --without-zlib-dir was given. +if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" + PHP_ZLIB_DIR=$withval +else + + PHP_ZLIB_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ZLIB_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ZLIB_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then + + ext_builddir=ext/zlib + ext_srcdir=$abs_srcdir/ext/zlib + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_ZLIB_SHARED=no + + + case ext/zlib in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/zlib"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/zlib/"; ac_bdir="ext/zlib/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in zlib.c zlib_fopen_wrapper.c zlib_filter.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + + case $ZLIB_DIR in + /usr) ac_extra= ;; + *) ac_extra=-L$ZLIB_DIR/$PHP_LIBDIR ;; + esac + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $ac_extra + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6 +echo "configure:23188: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_ZLIB 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_z_gzgets + + { echo "configure: error: ZLIB extension requires zlib >= 1.0.9" 1>&2; exit 1; } + + +fi + + + + if test "$ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$ZLIB_DIR/$PHP_LIBDIR" || echo "$ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$ZLIB_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ZLIB_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + ZLIB_SHARED_LIBADD="-L$ai_p $ZLIB_SHARED_LIBADD" + test -n "$ld_runpath_switch" && ZLIB_SHARED_LIBADD="$ld_runpath_switch$ai_p $ZLIB_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + + PHP_ZLIB_DIR=$ZLIB_DIR + + + case z in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + ZLIB_SHARED_LIBADD="-lz $ZLIB_SHARED_LIBADD" + else + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + fi + ;; + esac + + + + if test "$ZLIB_INCDIR" != "/usr/include"; then + + if test -z "$ZLIB_INCDIR" || echo "$ZLIB_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$ZLIB_INCDIR + else + + ep_dir="`echo $ZLIB_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ZLIB_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + +fi + + + +php_enable_bcmath=no + +echo $ac_n "checking whether to enable bc style precision math functions""... $ac_c" 1>&6 +echo "configure:23347: checking whether to enable bc style precision math functions" >&5 +# Check whether --enable-bcmath or --disable-bcmath was given. +if test "${enable_bcmath+set}" = set; then + enableval="$enable_bcmath" + PHP_BCMATH=$enableval +else + + PHP_BCMATH=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_BCMATH=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_BCMATH in +shared,*) + PHP_BCMATH=`echo "$PHP_BCMATH"|$SED 's/^shared,//'` + ;; +shared) + PHP_BCMATH=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_BCMATH" != "no"; then + + ext_builddir=ext/bcmath + ext_srcdir=$abs_srcdir/ext/bcmath + + ac_extra=`echo "-I@ext_srcdir@/libbcmath/src"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_BCMATH_SHARED=no + + + case ext/bcmath in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/bcmath"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/bcmath/"; ac_bdir="ext/bcmath/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in bcmath.c \ +libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \ +libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \ +libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \ +libbcmath/src/rmzero.c libbcmath/src/str2num.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_BCMATH 1 +EOF + +fi + + + +php_with_bz2=no + +echo $ac_n "checking for BZip2 support""... $ac_c" 1>&6 +echo "configure:23704: checking for BZip2 support" >&5 +# Check whether --with-bz2 or --without-bz2 was given. +if test "${with_bz2+set}" = set; then + withval="$with_bz2" + PHP_BZ2=$withval +else + + PHP_BZ2=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_BZ2=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_BZ2 in +shared,*) + PHP_BZ2=`echo "$PHP_BZ2"|$SED 's/^shared,//'` + ;; +shared) + PHP_BZ2=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_BZ2" != "no"; then + if test -r $PHP_BZ2/include/bzlib.h; then + BZIP_DIR=$PHP_BZ2 + else + echo $ac_n "checking for BZip2 in default path""... $ac_c" 1>&6 +echo "configure:23752: checking for BZip2 in default path" >&5 + for i in /usr/local /usr; do + if test -r $i/include/bzlib.h; then + BZIP_DIR=$i + echo "$ac_t""found in $i" 1>&6 + break + fi + done + fi + + if test -z "$BZIP_DIR"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Please reinstall the BZip2 distribution" 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$BZIP_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for BZ2_bzerror in -lbz2""... $ac_c" 1>&6 +echo "configure:23865: checking for BZ2_bzerror in -lbz2" >&5 +ac_lib_var=`echo bz2'_'BZ2_bzerror | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lbz2 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$BZIP_DIR/include" != "/usr/include"; then + + if test -z "$BZIP_DIR/include" || echo "$BZIP_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$BZIP_DIR/include + else + + ep_dir="`echo $BZIP_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$BZIP_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + BZ2_SHARED_LIBADD="-lbz2 $BZ2_SHARED_LIBADD" + if test -n "$BZIP_DIR/$PHP_LIBDIR"; then + + if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$BZIP_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$BZIP_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + BZ2_SHARED_LIBADD="-L$ai_p $BZ2_SHARED_LIBADD" + test -n "$ld_runpath_switch" && BZ2_SHARED_LIBADD="$ld_runpath_switch$ai_p $BZ2_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$BZIP_DIR/$PHP_LIBDIR"; then + + if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$BZIP_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$BZIP_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case bz2 in + c|c_r|pthread*) ;; + *) + LIBS="-lbz2 $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_BZ2 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_bz2_BZ2_bzerror + + { echo "configure: error: bz2 module requires libbz2 >= 1.0.0" 1>&2; exit 1; } + + +fi + + + + ext_builddir=ext/bz2 + ext_srcdir=$abs_srcdir/ext/bz2 + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_BZ2_SHARED=no + + + case ext/bz2 in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/bz2"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/bz2/"; ac_bdir="ext/bz2/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in bz2.c bz2_filter.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:24341: checking whether to enable calendar conversion support" >&5 +# Check whether --enable-calendar or --disable-calendar was given. +if test "${enable_calendar+set}" = set; then + enableval="$enable_calendar" + PHP_CALENDAR=$enableval +else + + PHP_CALENDAR=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_CALENDAR=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_CALENDAR in +shared,*) + PHP_CALENDAR=`echo "$PHP_CALENDAR"|$SED 's/^shared,//'` + ;; +shared) + PHP_CALENDAR=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_CALENDAR" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_CALENDAR 1 +EOF + + + ext_builddir=ext/calendar + ext_srcdir=$abs_srcdir/ext/calendar + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_CALENDAR_SHARED=no + + + case ext/calendar in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/calendar"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/calendar/"; ac_bdir="ext/calendar/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:24677: checking whether to enable ctype functions" >&5 +# Check whether --enable-ctype or --disable-ctype was given. +if test "${enable_ctype+set}" = set; then + enableval="$enable_ctype" + PHP_CTYPE=$enableval +else + + PHP_CTYPE=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_CTYPE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_CTYPE in +shared,*) + PHP_CTYPE=`echo "$PHP_CTYPE"|$SED 's/^shared,//'` + ;; +shared) + PHP_CTYPE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_CTYPE" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_CTYPE 1 +EOF + + + ext_builddir=ext/ctype + ext_srcdir=$abs_srcdir/ext/ctype + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_CTYPE_SHARED=no + + + case ext/ctype in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/ctype"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/ctype/"; ac_bdir="ext/ctype/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in ctype.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:25013: checking for cURL support" >&5 +# Check whether --with-curl or --without-curl was given. +if test "${with_curl+set}" = set; then + withval="$with_curl" + PHP_CURL=$withval +else + + PHP_CURL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_CURL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_CURL in +shared,*) + PHP_CURL=`echo "$PHP_CURL"|$SED 's/^shared,//'` + ;; +shared) + PHP_CURL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_curlwrappers=no + +echo $ac_n "checking if we should use cURL for url streams""... $ac_c" 1>&6 +echo "configure:25060: checking if we should use cURL for url streams" >&5 +# Check whether --with-curlwrappers or --without-curlwrappers was given. +if test "${with_curlwrappers+set}" = set; then + withval="$with_curlwrappers" + PHP_CURLWRAPPERS=$withval +else + + PHP_CURLWRAPPERS=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CURLWRAPPERS=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CURLWRAPPERS +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_CURL" != "no"; then + if test -r $PHP_CURL/include/curl/easy.h; then + CURL_DIR=$PHP_CURL + else + echo $ac_n "checking for cURL in default path""... $ac_c" 1>&6 +echo "configure:25087: checking for cURL in default path" >&5 + for i in /usr/local /usr; do + if test -r $i/include/curl/easy.h; then + CURL_DIR=$i + echo "$ac_t""found in $i" 1>&6 + break + fi + done + fi + + if test -z "$CURL_DIR"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Please reinstall the libcurl distribution - + easy.h should be in /include/curl/" 1>&2; exit 1; } + fi + + CURL_CONFIG="curl-config" + echo $ac_n "checking for cURL 7.10.5 or greater""... $ac_c" 1>&6 +echo "configure:25105: checking for cURL 7.10.5 or greater" >&5 + + if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then + CURL_CONFIG=${CURL_DIR}/bin/curl-config + else + if ${CURL_DIR}/curl-config --libs > /dev/null 2>&1; then + CURL_CONFIG=${CURL_DIR}/curl-config + fi + fi + + curl_version_full=`$CURL_CONFIG --version` + curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + if test "$curl_version" -ge 7010005; then + echo "$ac_t""$curl_version_full" 1>&6 + CURL_LIBS=`$CURL_CONFIG --libs` + else + { echo "configure: error: cURL version 7.10.5 or later is required to compile php with cURL support" 1>&2; exit 1; } + fi + + echo $ac_n "checking for SSL support in libcurl""... $ac_c" 1>&6 +echo "configure:25125: checking for SSL support in libcurl" >&5 + CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL` + if test "$CURL_SSL" = "SSL"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_CURL_SSL 1 +EOF + + + save_CFLAGS="$CFLAGS" + CFLAGS="`$CURL_CONFIG --cflags`" + save_LDFLAGS="$LDFLAGS" + LDFLAGS="`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR" + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:25140: 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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:25161: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:25178: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:25195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking for openssl support in libcurl""... $ac_c" 1>&6 +echo "configure:25220: checking for openssl support in libcurl" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + +else + cat > conftest.$ac_ext < + int main(int argc, char *argv[]) { + curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); + if (data && data->ssl_version && *data->ssl_version) { + const char *ptr = data->ssl_version; + while(*ptr == ' ') ++ptr; + return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1); + } + return 1; + } + +EOF +if { (eval echo configure:25242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + echo "$ac_t""yes" 1>&6 + ac_safe=`echo "openssl/crypto.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for openssl/crypto.h""... $ac_c" 1>&6 +echo "configure:25248: checking for openssl/crypto.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:25258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + cat >> confdefs.h <<\EOF +#define HAVE_CURL_OPENSSL 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -fr conftest* +fi + + + echo $ac_n "checking for gnutls support in libcurl""... $ac_c" 1>&6 +echo "configure:25298: checking for gnutls support in libcurl" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + +else + cat > conftest.$ac_ext < + int main(int argc, char *argv[]) { + curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); + if (data && data->ssl_version && *data->ssl_version) { + const char *ptr = data->ssl_version; + while(*ptr == ' ') ++ptr; + return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1); + } + return 1; + } + +EOF +if { (eval echo configure:25320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + echo "$ac_t""yes" 1>&6 + ac_safe=`echo "gcrypt.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for gcrypt.h""... $ac_c" 1>&6 +echo "configure:25326: checking for gcrypt.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:25336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + cat >> confdefs.h <<\EOF +#define HAVE_CURL_GNUTLS 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -fr conftest* +fi + + + CFLAGS="$save_CFLAGS" + LDFLAGS="$save_LDFLAGS" + else + echo "$ac_t""no" 1>&6 + fi + + + if test "$CURL_DIR/include" != "/usr/include"; then + + if test -z "$CURL_DIR/include" || echo "$CURL_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$CURL_DIR/include + else + + ep_dir="`echo $CURL_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$CURL_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + for ac_i in $CURL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + CURL_SHARED_LIBADD="-L$ai_p $CURL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && CURL_SHARED_LIBADD="$ld_runpath_switch$ai_p $CURL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + + if test "$ext_shared" = "yes"; then + CURL_SHARED_LIBADD="-lcurl $CURL_SHARED_LIBADD" + if test -n "$CURL_DIR/$PHP_LIBDIR"; then + + if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$CURL_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + CURL_SHARED_LIBADD="-L$ai_p $CURL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && CURL_SHARED_LIBADD="$ld_runpath_switch$ai_p $CURL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$CURL_DIR/$PHP_LIBDIR"; then + + if test "$CURL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$CURL_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$CURL_DIR/$PHP_LIBDIR" || echo "$CURL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$CURL_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $CURL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$CURL_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case curl in + c|c_r|pthread*) ;; + *) + LIBS="-lcurl $LIBS" + ;; + esac + + + + + fi + + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for curl_easy_perform in -lcurl""... $ac_c" 1>&6 +echo "configure:25697: checking for curl_easy_perform in -lcurl" >&5 +ac_lib_var=`echo curl'_'curl_easy_perform | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_CURL 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_curl_curl_easy_perform + + { echo "configure: error: There is something wrong. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for curl_version_info in -lcurl""... $ac_c" 1>&6 +echo "configure:25852: checking for curl_version_info in -lcurl" >&5 +ac_lib_var=`echo curl'_'curl_version_info | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_CURL_VERSION_INFO 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_curl_curl_version_info + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for curl_easy_strerror in -lcurl""... $ac_c" 1>&6 +echo "configure:26005: checking for curl_easy_strerror in -lcurl" >&5 +ac_lib_var=`echo curl'_'curl_easy_strerror | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_CURL_EASY_STRERROR 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_curl_curl_easy_strerror + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for curl_multi_strerror in -lcurl""... $ac_c" 1>&6 +echo "configure:26158: checking for curl_multi_strerror in -lcurl" >&5 +ac_lib_var=`echo curl'_'curl_multi_strerror | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_CURL_MULTI_STRERROR 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_curl_curl_multi_strerror + + +fi + + + if test "$PHP_CURLWRAPPERS" != "no" ; then + cat >> confdefs.h <<\EOF +#define PHP_CURL_URL_WRAPPERS 1 +EOF + + fi + + + ext_builddir=ext/curl + ext_srcdir=$abs_srcdir/ext/curl + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_CURL_SHARED=no + + + case ext/curl in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/curl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/curl/"; ac_bdir="ext/curl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in interface.c multi.c streams.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:26511: 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 < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long)); + return(0); +} +EOF +if { (eval echo configure:26530: \"$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 <&6 +echo "configure:26550: 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 < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(int)); + return(0); +} +EOF +if { (eval echo configure:26569: \"$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 <&6 +echo "configure:26590: checking for int32_t" >&5 +if eval "test \"`echo '$''{'ac_cv_int_type_int32_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +#endif +#if HAVE_INTTYPES_H +# include +#elif HAVE_STDINT_H +# include +#endif +int main() { +if ((int32_t *) 0) + return 0; +if (sizeof (int32_t)) + return 0; + +; return 0; } +EOF +if { (eval echo configure:26615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int_type_int32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_int_type_int32_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_int_type_int32_t" 1>&6 +if test "$ac_cv_int_type_int32_t" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_INT32_T 1 +EOF + +fi + + +echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 +echo "configure:26638: checking for uint32_t" >&5 +if eval "test \"`echo '$''{'ac_cv_int_type_uint32_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +#endif +#if HAVE_INTTYPES_H +# include +#elif HAVE_STDINT_H +# include +#endif +int main() { +if ((uint32_t *) 0) + return 0; +if (sizeof (uint32_t)) + return 0; + +; return 0; } +EOF +if { (eval echo configure:26663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int_type_uint32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_int_type_uint32_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_int_type_uint32_t" 1>&6 +if test "$ac_cv_int_type_uint32_t" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UINT32_T 1 +EOF + +fi + + +for ac_hdr in \ +sys/types.h \ +inttypes.h \ +stdint.h \ +string.h \ +stdlib.h + +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:26695: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:26705: \"$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 <&6 +fi +done + + +for ac_func in strtoll atoll strftime +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:26735: 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 < +/* Override any gcc2 internal prototype to avoid an 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:26763: \"$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 <&6 +fi +done + + + + +PHP_DATE_CFLAGS="-I@ext_builddir@/lib" +timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c + lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c" + + + ext_builddir=ext/date + ext_srcdir=$abs_srcdir/ext/date + + ac_extra=`echo "$PHP_DATE_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then + PHP_DATE_SHARED=no + + + case ext/date in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/date"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/date/"; ac_bdir="ext/date/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_date.c $timelib_sources; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects</dev/null ; then + ai_p=$ext_builddir/lib + else + + ep_dir="`echo $ext_builddir/lib|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ext_builddir/lib\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$ext_srcdir/lib" != "/usr/include"; then + + if test -z "$ext_srcdir/lib" || echo "$ext_srcdir/lib" | grep '^/' >/dev/null ; then + ai_p=$ext_srcdir/lib + else + + ep_dir="`echo $ext_srcdir/lib|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ext_srcdir/lib\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + + header_path=ext/date + for header_file in php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h; do + hp_hf="$header_path/$header_file" + + + unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INSTALLHEADERS$unique=set" + + INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf" + + fi + + done + + + +cat > $ext_builddir/lib/timelib_config.h < +#endif +EOF + + + + + + + + + + + + + + + + + +php_enable_dba=no + + +# Check whether --enable-dba or --disable-dba was given. +if test "${enable_dba+set}" = set; then + enableval="$enable_dba" + PHP_DBA=$enableval +else + + PHP_DBA=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_DBA=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_DBA in +shared,*) + PHP_DBA=`echo "$PHP_DBA"|$SED 's/^shared,//'` + ;; +shared) + PHP_DBA=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + +php_with_qdbm=no + + +# Check whether --with-qdbm or --without-qdbm was given. +if test "${with_qdbm+set}" = set; then + withval="$with_qdbm" + PHP_QDBM=$withval +else + + PHP_QDBM=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_QDBM=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_QDBM + + + + + + +php_with_gdbm=no + + +# Check whether --with-gdbm or --without-gdbm was given. +if test "${with_gdbm+set}" = set; then + withval="$with_gdbm" + PHP_GDBM=$withval +else + + PHP_GDBM=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_GDBM=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_GDBM + + + + + + +php_with_ndbm=no + + +# Check whether --with-ndbm or --without-ndbm was given. +if test "${with_ndbm+set}" = set; then + withval="$with_ndbm" + PHP_NDBM=$withval +else + + PHP_NDBM=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_NDBM=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_NDBM + + + + + + +php_with_db4=no + + +# Check whether --with-db4 or --without-db4 was given. +if test "${with_db4+set}" = set; then + withval="$with_db4" + PHP_DB4=$withval +else + + PHP_DB4=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DB4=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DB4 + + + + + + +php_with_db3=no + + +# Check whether --with-db3 or --without-db3 was given. +if test "${with_db3+set}" = set; then + withval="$with_db3" + PHP_DB3=$withval +else + + PHP_DB3=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DB3=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DB3 + + + + + + +php_with_db2=no + + +# Check whether --with-db2 or --without-db2 was given. +if test "${with_db2+set}" = set; then + withval="$with_db2" + PHP_DB2=$withval +else + + PHP_DB2=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DB2=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DB2 + + + + + + +php_with_db1=no + + +# Check whether --with-db1 or --without-db1 was given. +if test "${with_db1+set}" = set; then + withval="$with_db1" + PHP_DB1=$withval +else + + PHP_DB1=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DB1=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DB1 + + + + + + +php_with_dbm=no + + +# Check whether --with-dbm or --without-dbm was given. +if test "${with_dbm+set}" = set; then + withval="$with_dbm" + PHP_DBM=$withval +else + + PHP_DBM=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_DBM=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_DBM + + + + + + +# QDBM +if test "$PHP_QDBM" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + for i in $PHP_QDBM /usr/local /usr; do + if test -f "$i/include/depot.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/depot.h + break + fi + done + + if test -n "$THIS_INCLUDE"; then + for LIB in qdbm; do + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for dpopen in -l$LIB""... $ac_c" 1>&6 +echo "configure:27546: checking for dpopen in -l$LIB" >&5 +ac_lib_var=`echo $LIB'_'dpopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$LIB $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <> confdefs.h <<\EOF +#define DBA_QDBM 1 +EOF + + THIS_LIBS=$LIB + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$LIB_dpopen + + +fi + + if test -n "$THIS_LIBS"; then + break + fi + done + fi + + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + THIS_RESULT=yes + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + if test -z "$THIS_LIBS"; then + { echo "configure: error: DBA: Could not find necessary library." 1>&2; exit 1; } + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + +fi + + THIS_NAME=QDBM + if test -n ""; then + THIS_FULL_NAME="" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:27734: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# GDBM +if test "$PHP_GDBM" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + if test "$HAVE_QDBM" = "1"; then + + THIS_NAME=GDBM + if test -n "gdbm"; then + THIS_FULL_NAME="gdbm" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:27762: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-gdbm with --with-qdbm"; then + { echo "configure: error: You cannot combine --with-gdbm with --with-qdbm" 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + fi + for i in $PHP_GDBM /usr/local /usr; do + if test -f "$i/include/gdbm.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/gdbm.h + break + fi + done + + if test -n "$THIS_INCLUDE"; then + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 +echo "configure:27881: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <> confdefs.h <<\EOF +#define DBA_GDBM 1 +EOF + + THIS_LIBS=gdbm + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gdbm_gdbm_open + + +fi + + fi + + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + THIS_RESULT=yes + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + if test -z "$THIS_LIBS"; then + { echo "configure: error: DBA: Could not find necessary library." 1>&2; exit 1; } + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + +fi + + THIS_NAME=GDBM + if test -n ""; then + THIS_FULL_NAME="" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:28065: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# NDBM +if test "$PHP_NDBM" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + for i in $PHP_NDBM /usr/local /usr; do + if test -f "$i/include/ndbm.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/ndbm.h + break + elif test -f "$i/include/db1/ndbm.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db1/ndbm.h + break + fi + done + + if test -n "$THIS_INCLUDE"; then + for LIB in ndbm db1 c; do + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for dbm_open in -l$LIB""... $ac_c" 1>&6 +echo "configure:28194: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <> confdefs.h <<\EOF +#define DBA_NDBM 1 +EOF + + THIS_LIBS=$LIB + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$LIB_dbm_open + + +fi + + if test -n "$THIS_LIBS"; then + break + fi + done + fi + + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + THIS_RESULT=yes + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + if test -z "$THIS_LIBS"; then + { echo "configure: error: DBA: Could not find necessary library." 1>&2; exit 1; } + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + +fi + + THIS_NAME=NDBM + if test -n ""; then + THIS_FULL_NAME="" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:28382: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + + + +# DB4 +if test "$PHP_DB4" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + for i in $PHP_DB4 /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do + if test -f "$i/db4/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/db4/db.h + break + elif test -f "$i/include/db4.5/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db4.5/db.h + break + elif test -f "$i/include/db4/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db4/db.h + break + elif test -f "$i/include/db/db4.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db/db4.h + break + elif test -f "$i/include/db4.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db4.h + break + elif test -f "$i/include/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db.h + break + fi + done + + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + for LIB in db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do + if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then + lib_found=""; + + old_LDFLAGS=$LDFLAGS + LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS" + old_LIBS=$LIBS + LIBS="-l$LIB $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + THIS_LIBS=$LIB + lib_found=1 + +fi +rm -f conftest* + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + + LDFLAGS=$old_LDFLAGS + LIBS=$old_LIBS + + if test -n "$lib_found"; then + lib_found=""; + break; + fi + fi + done + if test -z "$THIS_LIBS"; then + echo $ac_n "checking for db4 major version""... $ac_c" 1>&6 +echo "configure:28496: checking for db4 major version" >&5 + { echo "configure: error: Header contains different version" 1>&2; exit 1; } + fi + if test "4" = "4"; then + echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6 +echo "configure:28501: checking for db4 minor version and patch level" >&5 + cat > conftest.$ac_ext <= 25 + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t""ok" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: Version 4.1 requires patch level 25" 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + if test "$ext_shared" = "yes"; then + echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6 +echo "configure:28529: checking if dba can be used as shared extension" >&5 + cat > conftest.$ac_ext < 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2) + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: At least version 3.3 is required" 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + if test -n "$THIS_LIBS"; then + cat >> confdefs.h <<\EOF +#define DBA_DB4 1 +EOF + + if test -n "$THIS_INCLUDE"; then + cat >> confdefs.h <&2; exit 1; } + fi + THIS_RESULT=yes + DB4_LIBS=$THIS_LIBS + DB4_PREFIX=$THIS_PREFIX + DB4_INCLUDE=$THIS_INCLUDE + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + + +fi + + THIS_NAME=DB4 + if test -n "Berkeley DB4"; then + THIS_FULL_NAME="Berkeley DB4" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:28688: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# DB3 +if test "$PHP_DB3" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + if test "$HAVE_DB4" = "1"; then + + THIS_NAME=DB3 + if test -n "Berkeley DB3"; then + THIS_FULL_NAME="Berkeley DB3" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:28716: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-db3 with --with-db4"; then + { echo "configure: error: You cannot combine --with-db3 with --with-db4" 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + fi + for i in $PHP_DB3 /usr/local/BerkeleyDB.3.3 /usr/local/BerkeleyDB.3.2 /usr/local/BerkeleyDB.3.1 /usr/local/BerkeleyDB.3.0 /usr/local /usr; do + if test -f "$i/db3/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db3/db.h + break + elif test -f "$i/include/db3/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db3/db.h + break + elif test -f "$i/include/db/db3.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db/db3.h + break + elif test -f "$i/include/db3.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db3.h + break + elif test -f "$i/include/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db.h + break + fi + done + + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + for LIB in db-3.3 db-3.2 db-3.1 db-3.0 db-3 db3 db; do + if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then + lib_found=""; + + old_LDFLAGS=$LDFLAGS + LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS" + old_LIBS=$LIBS + LIBS="-l$LIB $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + THIS_LIBS=$LIB + lib_found=1 + +fi +rm -f conftest* + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + + LDFLAGS=$old_LDFLAGS + LIBS=$old_LIBS + + if test -n "$lib_found"; then + lib_found=""; + break; + fi + fi + done + if test -z "$THIS_LIBS"; then + echo $ac_n "checking for db3 major version""... $ac_c" 1>&6 +echo "configure:28819: checking for db3 major version" >&5 + { echo "configure: error: Header contains different version" 1>&2; exit 1; } + fi + if test "3" = "4"; then + echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6 +echo "configure:28824: checking for db4 minor version and patch level" >&5 + cat > conftest.$ac_ext <= 25 + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t""ok" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: Version 4.1 requires patch level 25" 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + if test "$ext_shared" = "yes"; then + echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6 +echo "configure:28852: checking if dba can be used as shared extension" >&5 + cat > conftest.$ac_ext < 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2) + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: At least version 3.3 is required" 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + if test -n "$THIS_LIBS"; then + cat >> confdefs.h <<\EOF +#define DBA_DB3 1 +EOF + + if test -n "$THIS_INCLUDE"; then + cat >> confdefs.h <&2; exit 1; } + fi + THIS_RESULT=yes + DB3_LIBS=$THIS_LIBS + DB3_PREFIX=$THIS_PREFIX + DB3_INCLUDE=$THIS_INCLUDE + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + + +fi + + THIS_NAME=DB3 + if test -n "Berkeley DB3"; then + THIS_FULL_NAME="Berkeley DB3" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:29011: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# DB2 +if test "$PHP_DB2" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + if test "$HAVE_DB3" = "1" || test "$HAVE_DB4" = "1"; then + + THIS_NAME=DB2 + if test -n "Berkeley DB2"; then + THIS_FULL_NAME="Berkeley DB2" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:29039: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then + { echo "configure: error: You cannot combine --with-db2 with --with-db3 or --with-db4" 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + fi + for i in $PHP_DB2 $PHP_DB2/BerkeleyDB /usr/BerkeleyDB /usr/local /usr; do + if test -f "$i/db2/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/db2/db.h + break + elif test -f "$i/include/db2/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db2/db.h + break + elif test -f "$i/include/db/db2.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db/db2.h + break + elif test -f "$i/include/db2.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db2.h + break + elif test -f "$i/include/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db.h + break + fi + done + + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + for LIB in db-2 db2 db; do + if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then + lib_found=""; + + old_LDFLAGS=$LDFLAGS + LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS" + old_LIBS=$LIBS + LIBS="-l$LIB $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + THIS_LIBS=$LIB + lib_found=1 + +fi +rm -f conftest* + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + + LDFLAGS=$old_LDFLAGS + LIBS=$old_LIBS + + if test -n "$lib_found"; then + lib_found=""; + break; + fi + fi + done + if test -z "$THIS_LIBS"; then + echo $ac_n "checking for db2 major version""... $ac_c" 1>&6 +echo "configure:29142: checking for db2 major version" >&5 + { echo "configure: error: Header contains different version" 1>&2; exit 1; } + fi + if test "2" = "4"; then + echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6 +echo "configure:29147: checking for db4 minor version and patch level" >&5 + cat > conftest.$ac_ext <= 25 + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t""ok" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: Version 4.1 requires patch level 25" 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + if test "$ext_shared" = "yes"; then + echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6 +echo "configure:29175: checking if dba can be used as shared extension" >&5 + cat > conftest.$ac_ext < 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2) + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: At least version 3.3 is required" 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + if test -n "$THIS_LIBS"; then + cat >> confdefs.h <<\EOF +#define DBA_DB2 1 +EOF + + if test -n "$THIS_INCLUDE"; then + cat >> confdefs.h <&2; exit 1; } + fi + THIS_RESULT=yes + DB2_LIBS=$THIS_LIBS + DB2_PREFIX=$THIS_PREFIX + DB2_INCLUDE=$THIS_INCLUDE + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + + +fi + + THIS_NAME=DB2 + if test -n "Berkeley DB2"; then + THIS_FULL_NAME="Berkeley DB2" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:29334: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# DB1 +if test "$PHP_DB1" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + echo $ac_n "checking for DB1 in library""... $ac_c" 1>&6 +echo "configure:29354: checking for DB1 in library" >&5 + if test "$HAVE_DB4" = "1"; then + THIS_VERSION=4 + THIS_LIBS=$DB4_LIBS + THIS_PREFIX=$DB4_PREFIX + elif test "$HAVE_DB3" = "1"; then + THIS_LIBS=$DB3_LIBS + THIS_PREFIX=$DB3_PREFIX + elif test "$HAVE_DB2" = "1"; then + THIS_VERSION=2 + THIS_LIBS=$DB2_LIBS + THIS_PREFIX=$DB2_PREFIX + fi + if test "$HAVE_DB4" = "1" || test "$HAVE_DB3" = "1" || test "$HAVE_DB2" = "1"; then + cat >> confdefs.h <> confdefs.h <&6 + echo $ac_n "checking for DB1 in header""... $ac_c" 1>&6 +echo "configure:29402: checking for DB1 in header" >&5 + echo "$ac_t""$THIS_INCLUDE" 1>&6 + if test -n "$THIS_INCLUDE"; then + + old_LDFLAGS=$LDFLAGS + LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS" + old_LIBS=$LIBS + LIBS="-l$THIS_LIBS $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat >> confdefs.h <> confdefs.h <<\EOF +#define DBA_DB1 1 +EOF + + THIS_RESULT=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + THIS_RESULT=no + +fi +rm -f conftest* + + LDFLAGS=$old_LDFLAGS + LIBS=$old_LIBS + + fi + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + THIS_RESULT=yes + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + if test -z "$THIS_LIBS"; then + { echo "configure: error: DBA: Could not find necessary library." 1>&2; exit 1; } + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + +fi + + THIS_NAME=DB1 + if test -n "DB1"; then + THIS_FULL_NAME="DB1" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:29573: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# DBM +if test "$PHP_DBM" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + if test "$HAVE_QDBM" = "1"; then + + THIS_NAME=DBM + if test -n "dbm"; then + THIS_FULL_NAME="dbm" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:29601: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-dbm with --with-qdbm"; then + { echo "configure: error: You cannot combine --with-dbm with --with-qdbm" 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + fi + for i in $PHP_DBM /usr/local /usr; do + if test -f "$i/include/dbm.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/dbm.h + break + elif test -f "$i/include/gdbm/dbm.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/gdbm/dbm.h + break + fi + done + + if test -n "$THIS_INCLUDE"; then + for LIB in dbm c gdbm; do + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for dbminit in -l$LIB""... $ac_c" 1>&6 +echo "configure:29725: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + echo $ac_n "checking for DBM using GDBM""... $ac_c" 1>&6 +echo "configure:29764: checking for DBM using GDBM" >&5 + cat >> confdefs.h <> confdefs.h <&6 + else + cat >> confdefs.h <&6 + fi + cat >> confdefs.h <<\EOF +#define DBA_DBM 1 +EOF + + THIS_LIBS=$LIB + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$LIB_dbminit + + +fi + + if test -n "$THIS_LIBS"; then + break + fi + done + fi + + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + THIS_RESULT=yes + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + if test -z "$THIS_LIBS"; then + { echo "configure: error: DBA: Could not find necessary library." 1>&2; exit 1; } + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + +fi + + THIS_NAME=DBM + if test -n ""; then + THIS_FULL_NAME="" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:29928: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +if test "$PHP_DBA" != "no" || test "$HAVE_DBA" = "1" || test "$with_cdb" = "yes" || test "$enable_inifile" = "yes" || test "$enable_flatfile" = "yes"; then + php_dba_enable=yes +else + php_dba_enable=no +fi + + +php_with_cdb=$php_dba_enable + + +# Check whether --with-cdb or --without-cdb was given. +if test "${with_cdb+set}" = set; then + withval="$with_cdb" + PHP_CDB=$withval +else + + PHP_CDB=$php_dba_enable + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_CDB=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_CDB + + + + + + +php_enable_inifile=$php_dba_enable + + +# Check whether --enable-inifile or --disable-inifile was given. +if test "${enable_inifile+set}" = set; then + enableval="$enable_inifile" + PHP_INIFILE=$enableval +else + + PHP_INIFILE=$php_dba_enable + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_INIFILE=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_INIFILE + + + + + + +php_enable_flatfile=$php_dba_enable + + +# Check whether --enable-flatfile or --disable-flatfile was given. +if test "${enable_flatfile+set}" = set; then + enableval="$enable_flatfile" + PHP_FLATFILE=$enableval +else + + PHP_FLATFILE=$php_dba_enable + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_FLATFILE=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_FLATFILE + + + + + +# CDB +if test "$PHP_CDB" = "yes"; then + cat >> confdefs.h <<\EOF +#define DBA_CDB_BUILTIN 1 +EOF + + cat >> confdefs.h <<\EOF +#define DBA_CDB_MAKE 1 +EOF + + cat >> confdefs.h <<\EOF +#define DBA_CDB 1 +EOF + + cdb_sources="libcdb/cdb.c libcdb/cdb_make.c libcdb/uint32.c" + THIS_RESULT="builtin" +elif test "$PHP_CDB" != "no"; then + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + for i in $PHP_CDB /usr/local /usr; do + if test -f "$i/include/cdb.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/cdb.h + break + fi + done + + if test -n "$THIS_INCLUDE"; then + for LIB in cdb c; do + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for cdb_read in -l$LIB""... $ac_c" 1>&6 +echo "configure:30149: checking for cdb_read in -l$LIB" >&5 +ac_lib_var=`echo $LIB'_'cdb_read | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$LIB $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <> confdefs.h <<\EOF +#define DBA_CDB 1 +EOF + + THIS_LIBS=$LIB + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$LIB_cdb_read + + +fi + + if test -n "$THIS_LIBS"; then + break + fi + done + fi + + + if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then + THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR + fi + + + THIS_RESULT=yes + if test -z "$THIS_INCLUDE"; then + { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } + fi + if test -z "$THIS_LIBS"; then + { echo "configure: error: DBA: Could not find necessary library." 1>&2; exit 1; } + fi + + + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD" + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + if test "$ext_shared" = "yes"; then + DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$THIS_LFLAGS"; then + + if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then + + if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then + ai_p=$THIS_LFLAGS + else + + ep_dir="`echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$THIS_LFLAGS\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $THIS_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$THIS_LIBS $LIBS" + ;; + esac + + + + + fi + + + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + +fi + + THIS_NAME=CDB + if test -n ""; then + THIS_FULL_NAME="" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:30337: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# INIFILE +if test "$PHP_INIFILE" != "no"; then + cat >> confdefs.h <<\EOF +#define DBA_INIFILE 1 +EOF + + ini_sources="libinifile/inifile.c" + THIS_RESULT="builtin" +fi + + THIS_NAME=INIFILE + if test -n "INI File"; then + THIS_FULL_NAME="INI File" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:30368: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +# FLATFILE +if test "$PHP_FLATFILE" != "no"; then + cat >> confdefs.h <<\EOF +#define DBA_FLATFILE 1 +EOF + + flat_sources="libflatfile/flatfile.c" + THIS_RESULT="builtin" +fi + + THIS_NAME=FLATFILE + if test -n "FlatFile"; then + THIS_FULL_NAME="FlatFile" + else + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +echo "configure:30399: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi + if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then + HAVE_DBA=1 + eval HAVE_$THIS_NAME=1 + echo "$ac_t""$THIS_RESULT" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + unset THIS_RESULT THIS_NAME THIS_FULL_NAME + + +echo $ac_n "checking whether to enable DBA interface""... $ac_c" 1>&6 +echo "configure:30414: checking whether to enable DBA interface" >&5 +if test "$HAVE_DBA" = "1"; then + if test "$ext_shared" = "yes"; then + echo "$ac_t""yes, shared" 1>&6 + else + echo "$ac_t""yes" 1>&6 + fi + cat >> confdefs.h <<\EOF +#define HAVE_DBA 1 +EOF + + + ext_builddir=ext/dba + ext_srcdir=$abs_srcdir/ext/dba + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_DBA_SHARED=no + + + case ext/dba in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/dba"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/dba/"; ac_bdir="ext/dba/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in dba.c dba_cdb.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_flatfile.c dba_inifile.c dba_qdbm.c $cdb_sources $flat_sources $ini_sources; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +fi + + + +php_enable_dbase=no + +echo $ac_n "checking whether to enable dbase support""... $ac_c" 1>&6 +echo "configure:30733: checking whether to enable dbase support" >&5 +# Check whether --enable-dbase or --disable-dbase was given. +if test "${enable_dbase+set}" = set; then + enableval="$enable_dbase" + PHP_DBASE=$enableval +else + + PHP_DBASE=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_DBASE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_DBASE in +shared,*) + PHP_DBASE=`echo "$PHP_DBASE"|$SED 's/^shared,//'` + ;; +shared) + PHP_DBASE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_DBASE" = "yes"; then + cat >> confdefs.h <<\EOF +#define DBASE 1 +EOF + + + ext_builddir=ext/dbase + ext_srcdir=$abs_srcdir/ext/dbase + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_DBASE_SHARED=no + + + case ext/dbase in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/dbase"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/dbase/"; ac_bdir="ext/dbase/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:31069: checking whether to enable DOM support" >&5 +# Check whether --enable-dom or --disable-dom was given. +if test "${enable_dom+set}" = set; then + enableval="$enable_dom" + PHP_DOM=$enableval +else + + PHP_DOM=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_DOM=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_DOM in +shared,*) + PHP_DOM=`echo "$PHP_DOM"|$SED 's/^shared,//'` + ;; +shared) + PHP_DOM=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:31117: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_DOM" != "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: DOM extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:31148: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + DOM_SHARED_LIBADD="$DOM_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + DOM_SHARED_LIBADD="$DOM_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + DOM_SHARED_LIBADD="-L$ai_p $DOM_SHARED_LIBADD" + test -n "$ld_runpath_switch" && DOM_SHARED_LIBADD="$ld_runpath_switch$ai_p $DOM_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:31306: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $DOM_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_DOM 1 +EOF + + + ext_builddir=ext/dom + ext_srcdir=$abs_srcdir/ext/dom + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_DOM_SHARED=no + + + case ext/dom in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/dom"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/dom/"; ac_bdir="ext/dom/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_dom.c attr.c document.c domerrorhandler.c \ + domstringlist.c domexception.c namelist.c \ + processinginstruction.c cdatasection.c \ + documentfragment.c domimplementation.c \ + element.c node.c string_extend.c characterdata.c \ + documenttype.c domimplementationlist.c entity.c \ + nodelist.c text.c comment.c domconfiguration.c \ + domimplementationsource.c entityreference.c \ + notation.c xpath.c dom_iterators.c \ + typeinfo.c domerror.c domlocator.c namednodemap.c userdatahandler.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension dom, which depends on extension libxml, +but you've either not enabled libxml, or have disabled it. +" 1>&2; exit 1; } + fi + + + else + { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; } + + fi + +fi + + + +php_enable_exif=no + +echo $ac_n "checking whether to enable EXIF (metadata from images) support""... $ac_c" 1>&6 +echo "configure:31745: checking whether to enable EXIF (metadata from images) support" >&5 +# Check whether --enable-exif or --disable-exif was given. +if test "${enable_exif+set}" = set; then + enableval="$enable_exif" + PHP_EXIF=$enableval +else + + PHP_EXIF=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_EXIF=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_EXIF in +shared,*) + PHP_EXIF=`echo "$PHP_EXIF"|$SED 's/^shared,//'` + ;; +shared) + PHP_EXIF=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_EXIF" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_EXIF 1 +EOF + + + ext_builddir=ext/exif + ext_srcdir=$abs_srcdir/ext/exif + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_EXIF_SHARED=no + + + case ext/exif in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/exif"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/exif/"; ac_bdir="ext/exif/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in exif.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:32081: checking for FrontBase SQL92 (fbsql) support" >&5 +# Check whether --with-fbsql or --without-fbsql was given. +if test "${with_fbsql+set}" = set; then + withval="$with_fbsql" + PHP_FBSQL=$withval +else + + PHP_FBSQL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_FBSQL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_FBSQL in +shared,*) + PHP_FBSQL=`echo "$PHP_FBSQL"|$SED 's/^shared,//'` + ;; +shared) + PHP_FBSQL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_FBSQL" != "no"; then + + cat >> confdefs.h <<\EOF +#define HAVE_FBSQL 1 +EOF + + + ext_builddir=ext/fbsql + ext_srcdir=$abs_srcdir/ext/fbsql + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_FBSQL_SHARED=no + + + case ext/fbsql in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/fbsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/fbsql/"; ac_bdir="ext/fbsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_fbsql.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + + elif test "$PHP_FBSQL" != "no"; then + + if test -f $PHP_FBSQL/include/FBCAccess/FBCAccess.h; then + FBSQL_INSTALLATION_DIR=$PHP_FBSQL + else + { echo "configure: error: Directory $PHP_FBSQL is not a FrontBase installation directory" 1>&2; exit 1; } + fi + fi + + if test ! -r "$FBSQL_INSTALLATION_DIR/lib/libFBCAccess.a"; then + { echo "configure: error: Could not find $FBSQL_INSTALLATION_DIR/lib/libFBCAccess.a" 1>&2; exit 1; } + fi + + + + if test "$ext_shared" = "yes"; then + FBSQL_SHARED_LIBADD="-lFBCAccess $FBSQL_SHARED_LIBADD" + if test -n "$FBSQL_INSTALLATION_DIR/lib"; then + + if test "$FBSQL_INSTALLATION_DIR/lib" != "/usr/$PHP_LIBDIR" && test "$FBSQL_INSTALLATION_DIR/lib" != "/usr/lib"; then + + if test -z "$FBSQL_INSTALLATION_DIR/lib" || echo "$FBSQL_INSTALLATION_DIR/lib" | grep '^/' >/dev/null ; then + ai_p=$FBSQL_INSTALLATION_DIR/lib + else + + ep_dir="`echo $FBSQL_INSTALLATION_DIR/lib|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FBSQL_INSTALLATION_DIR/lib\"`" + fi + + + if test "$ext_shared" = "yes"; then + FBSQL_SHARED_LIBADD="-L$ai_p $FBSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && FBSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $FBSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$FBSQL_INSTALLATION_DIR/lib"; then + + if test "$FBSQL_INSTALLATION_DIR/lib" != "/usr/$PHP_LIBDIR" && test "$FBSQL_INSTALLATION_DIR/lib" != "/usr/lib"; then + + if test -z "$FBSQL_INSTALLATION_DIR/lib" || echo "$FBSQL_INSTALLATION_DIR/lib" | grep '^/' >/dev/null ; then + ai_p=$FBSQL_INSTALLATION_DIR/lib + else + + ep_dir="`echo $FBSQL_INSTALLATION_DIR/lib|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FBSQL_INSTALLATION_DIR/lib\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case FBCAccess in + c|c_r|pthread*) ;; + *) + LIBS="-lFBCAccess $LIBS" + ;; + esac + + + + + fi + + + + if test "$FBSQL_INSTALLATION_DIR/include" != "/usr/include"; then + + if test -z "$FBSQL_INSTALLATION_DIR/include" || echo "$FBSQL_INSTALLATION_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$FBSQL_INSTALLATION_DIR/include + else + + ep_dir="`echo $FBSQL_INSTALLATION_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FBSQL_INSTALLATION_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST FBSQL_SHARED_LIBADD" + +fi + + + +php_with_fdftk=no + +echo $ac_n "checking for FDF support""... $ac_c" 1>&6 +echo "configure:32577: checking for FDF support" >&5 +# Check whether --with-fdftk or --without-fdftk was given. +if test "${with_fdftk+set}" = set; then + withval="$with_fdftk" + PHP_FDFTK=$withval +else + + PHP_FDFTK=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_FDFTK=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_FDFTK in +shared,*) + PHP_FDFTK=`echo "$PHP_FDFTK"|$SED 's/^shared,//'` + ;; +shared) + PHP_FDFTK=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_FDFTK" != "no"; then + + case $host_os in + aix*) + libtype=aix + ;; + solaris*) + libtype=solaris + ;; + linux*) + libtype=linux + ;; + *) + { echo "configure: error: The fdf toolkit is not available for $host_os." 1>&2; exit 1; } + ;; + esac + + if test "$PHP_FDFTK" = "yes"; then + PHP_FDFTK="/usr/local /usr ../FDFToolkitForUNIX ext/fdf/FDFToolkitForUNIX ../fdftk ext/fdf/fdftk" + fi + + for dir in $PHP_FDFTK; do + for subdir in include HeadersAndLibraries/headers; do + if test -r $dir/$subdir/FdfTk.h; then + FDFTK_DIR=$dir + FDFTK_H_DIR=$dir/$subdir + break 2 + elif test -r $dir/$subdir/fdftk.h; then + cat >> confdefs.h <<\EOF +#define HAVE_FDFTK_H_LOWER 1 +EOF + + FDFTK_DIR=$dir + FDFTK_H_DIR=$dir/$subdir + break 2 + fi + done + done + + if test -z "$FDFTK_DIR"; then + { echo "configure: error: FdfTk.h or fdftk.h not found. Please reinstall the fdf toolkit." 1>&2; exit 1; } + fi + + + if test "$FDFTK_H_DIR" != "/usr/include"; then + + if test -z "$FDFTK_H_DIR" || echo "$FDFTK_H_DIR" | grep '^/' >/dev/null ; then + ai_p=$FDFTK_H_DIR + else + + ep_dir="`echo $FDFTK_H_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FDFTK_H_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + FDFLIBRARY="" + for file in fdftk FdfTk; do + for dir in $FDFTK_DIR/lib $FDFTK_DIR/HeadersAndLibraries/$libtype/C; do + if test -r $dir/lib$file.so; then + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$dir -lm" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for FDFOpen in -l$file""... $ac_c" 1>&6 +echo "configure:32795: checking for FDFOpen in -l$file" >&5 +ac_lib_var=`echo $file'_'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="-l$file $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + FDFLIBRARY=$file + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$file_FDFOpen + + +fi + + if test "$FDFLIBRARY"; then + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$dir -lm" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for FDFGetFDFVersion in -l$file""... $ac_c" 1>&6 +echo "configure:32941: checking for FDFGetFDFVersion in -l$file" >&5 +ac_lib_var=`echo $file'_'FDFGetFDFVersion | sed 'y%./+-%__p_%'` +if eval "test \"`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$file $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_FDFTK_5 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$file_FDFGetFDFVersion + + +fi + + FDFTK_LIB_DIR=$dir + break 2 + fi + fi + done + done + + if test -z "$FDFLIBRARY"; then + { echo "configure: error: no usable fdf library found" 1>&2; exit 1; } + fi + + + + if test "$ext_shared" = "yes"; then + FDF_SHARED_LIBADD="-l$FDFLIBRARY $FDF_SHARED_LIBADD" + if test -n "$FDFTK_LIB_DIR"; then + + if test "$FDFTK_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$FDFTK_LIB_DIR" != "/usr/lib"; then + + if test -z "$FDFTK_LIB_DIR" || echo "$FDFTK_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$FDFTK_LIB_DIR + else + + ep_dir="`echo $FDFTK_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FDFTK_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + FDF_SHARED_LIBADD="-L$ai_p $FDF_SHARED_LIBADD" + test -n "$ld_runpath_switch" && FDF_SHARED_LIBADD="$ld_runpath_switch$ai_p $FDF_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$FDFTK_LIB_DIR"; then + + if test "$FDFTK_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$FDFTK_LIB_DIR" != "/usr/lib"; then + + if test -z "$FDFTK_LIB_DIR" || echo "$FDFTK_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$FDFTK_LIB_DIR + else + + ep_dir="`echo $FDFTK_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FDFTK_LIB_DIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $FDFLIBRARY in + c|c_r|pthread*) ;; + *) + LIBS="-l$FDFLIBRARY $LIBS" + ;; + esac + + + + + fi + + + + + ext_builddir=ext/fdf + ext_srcdir=$abs_srcdir/ext/fdf + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_FDF_SHARED=no + + + case ext/fdf in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/fdf"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/fdf/"; ac_bdir="ext/fdf/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in fdf.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_FDFLIB 1 +EOF + +fi + + + +php_enable_filter=yes + +echo $ac_n "checking whether to enable input filter support""... $ac_c" 1>&6 +echo "configure:33397: checking whether to enable input filter support" >&5 +# Check whether --enable-filter or --disable-filter was given. +if test "${enable_filter+set}" = set; then + enableval="$enable_filter" + PHP_FILTER=$enableval +else + + PHP_FILTER=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_FILTER=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_FILTER in +shared,*) + PHP_FILTER=`echo "$PHP_FILTER"|$SED 's/^shared,//'` + ;; +shared) + PHP_FILTER=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_pcre_dir=no + +echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6 +echo "configure:33444: checking pcre install prefix" >&5 +# Check whether --with-pcre-dir or --without-pcre-dir was given. +if test "${with_pcre_dir+set}" = set; then + withval="$with_pcre_dir" + PHP_PCRE_DIR=$withval +else + + PHP_PCRE_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_PCRE_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_PCRE_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_FILTER" != "no"; then + + if test -n "$PHP_VERSION"; then + ext_shared=no + else + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$INCLUDES + cat > conftest.$ac_ext < +#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) +yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + PHP_PCRE_REGEX=yes + +else + rm -rf conftest* + + cat > conftest.$ac_ext < +#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) +yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + PHP_PCRE_REGEX=pecl + +else + rm -rf conftest* + + PHP_PCRE_REGEX=no + +fi +rm -f conftest* + + +fi +rm -f conftest* + + CPPFLAGS=$old_CPPFLAGS + fi + + + ext_builddir=ext/filter + ext_srcdir=$abs_srcdir/ext/filter + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_FILTER_SHARED=no + + + case ext/filter in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/filter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/filter/"; ac_bdir="ext/filter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in filter.c sanitizing_filters.c logical_filters.c callback_filter.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension filter, which depends on extension pcre, +but you've either not enabled pcre, or have disabled it. +" 1>&2; exit 1; } + fi + +fi + + + +php_enable_ftp=no + +echo $ac_n "checking whether to enable FTP support""... $ac_c" 1>&6 +echo "configure:33852: checking whether to enable FTP support" >&5 +# Check whether --enable-ftp or --disable-ftp was given. +if test "${enable_ftp+set}" = set; then + enableval="$enable_ftp" + PHP_FTP=$enableval +else + + PHP_FTP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_FTP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_FTP in +shared,*) + PHP_FTP=`echo "$PHP_FTP"|$SED 's/^shared,//'` + ;; +shared) + PHP_FTP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_openssl_dir=no + +echo $ac_n "checking OpenSSL dir for FTP""... $ac_c" 1>&6 +echo "configure:33899: checking OpenSSL dir for FTP" >&5 +# Check whether --with-openssl-dir or --without-openssl-dir was given. +if test "${with_openssl_dir+set}" = set; then + withval="$with_openssl_dir" + PHP_OPENSSL_DIR=$withval +else + + PHP_OPENSSL_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_OPENSSL_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_OPENSSL_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_FTP" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_FTP 1 +EOF + + + ext_builddir=ext/ftp + ext_srcdir=$abs_srcdir/ext/ftp + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_FTP_SHARED=no + + + case ext/ftp in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/ftp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/ftp/"; ac_bdir="ext/ftp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_ftp.c ftp.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:34229: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then + if $PKG_CONFIG --atleast-version=0.9.6 openssl; then + found_openssl=yes + OPENSSL_LIBS=`$PKG_CONFIG --libs openssl` + OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl` + OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl` + else + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + fi + + if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then + + for ac_i in $OPENSSL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + FTP_SHARED_LIBADD="$FTP_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + FTP_SHARED_LIBADD="$FTP_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + FTP_SHARED_LIBADD="-L$ai_p $FTP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && FTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $FTP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $OPENSSL_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + fi + fi + + if test "$found_openssl" = "no"; then + + if test "$PHP_OPENSSL_DIR" = "yes"; then + PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" + fi + + for i in $PHP_OPENSSL_DIR; do + if test -r $i/include/openssl/evp.h; then + OPENSSL_INCDIR=$i/include + fi + if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then + OPENSSL_LIBDIR=$i/$PHP_LIBDIR + fi + test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break + done + + if test -z "$OPENSSL_INCDIR"; then + { echo "configure: error: Cannot find OpenSSL's " 1>&2; exit 1; } + fi + + if test -z "$OPENSSL_LIBDIR"; then + { echo "configure: error: Cannot find OpenSSL's libraries" 1>&2; exit 1; } + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +echo "configure:34434: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +#if OPENSSL_VERSION_NUMBER >= 0x0090600fL + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t"">= 0.9.6" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + +fi +rm -f conftest* + + CPPFLAGS=$old_CPPFLAGS + + + if test "$OPENSSL_INCDIR" != "/usr/include"; then + + if test -z "$OPENSSL_INCDIR" || echo "$OPENSSL_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_INCDIR + else + + ep_dir="`echo $OPENSSL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +echo "configure:34591: checking for CRYPTO_free in -lcrypto" >&5 +ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypto $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case crypto in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + FTP_SHARED_LIBADD="-lcrypto $FTP_SHARED_LIBADD" + else + + + case crypto in + c|c_r|pthread*) ;; + *) + LIBS="-lcrypto $LIBS" + ;; + esac + + + fi + ;; + esac + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_crypto_CRYPTO_free + + { echo "configure: error: libcrypto not found!" 1>&2; exit 1; } + + +fi + + + old_LIBS=$LIBS + LIBS="$LIBS -lcrypto" + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +echo "configure:34767: checking for SSL_CTX_set_ssl_version in -lssl" >&5 +ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lssl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_openssl=yes + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version + + { echo "configure: error: libssl not found!" 1>&2; exit 1; } + + +fi + + LIBS=$old_LIBS + + + case ssl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + FTP_SHARED_LIBADD="-lssl $FTP_SHARED_LIBADD" + else + + + case ssl in + c|c_r|pthread*) ;; + *) + LIBS="-lssl $LIBS" + ;; + esac + + + fi + ;; + esac + + + + + if test "$OPENSSL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$OPENSSL_LIBDIR" != "/usr/lib"; then + + if test -z "$OPENSSL_LIBDIR" || echo "$OPENSSL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_LIBDIR + else + + ep_dir="`echo $OPENSSL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + FTP_SHARED_LIBADD="-L$ai_p $FTP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && FTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $FTP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + + if test "$found_openssl" = "yes"; then + OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR + + +: + + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST FTP_SHARED_LIBADD" + + fi +fi + + + + +php_with_gd=no + +echo $ac_n "checking for GD support""... $ac_c" 1>&6 +echo "configure:34905: checking for GD support" >&5 +# Check whether --with-gd or --without-gd was given. +if test "${with_gd+set}" = set; then + withval="$with_gd" + PHP_GD=$withval +else + + PHP_GD=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_GD=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_GD in +shared,*) + PHP_GD=`echo "$PHP_GD"|$SED 's/^shared,//'` + ;; +shared) + PHP_GD=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_JPEG_DIR"; then + +php_with_jpeg_dir=no + +echo $ac_n "checking for the location of libjpeg""... $ac_c" 1>&6 +echo "configure:34953: checking for the location of libjpeg" >&5 +# Check whether --with-jpeg-dir or --without-jpeg-dir was given. +if test "${with_jpeg_dir+set}" = set; then + withval="$with_jpeg_dir" + PHP_JPEG_DIR=$withval +else + + PHP_JPEG_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_JPEG_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_JPEG_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test -z "$PHP_PNG_DIR"; then + +php_with_png_dir=no + +echo $ac_n "checking for the location of libpng""... $ac_c" 1>&6 +echo "configure:34981: checking for the location of libpng" >&5 +# Check whether --with-png-dir or --without-png-dir was given. +if test "${with_png_dir+set}" = set; then + withval="$with_png_dir" + PHP_PNG_DIR=$withval +else + + PHP_PNG_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_PNG_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_PNG_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test -z "$PHP_ZLIB_DIR"; then + +php_with_zlib_dir=no + +echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +echo "configure:35009: checking for the location of libz" >&5 +# Check whether --with-zlib-dir or --without-zlib-dir was given. +if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" + PHP_ZLIB_DIR=$withval +else + + PHP_ZLIB_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ZLIB_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ZLIB_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + + +php_with_xpm_dir=no + +echo $ac_n "checking for the location of libXpm""... $ac_c" 1>&6 +echo "configure:35036: checking for the location of libXpm" >&5 +# Check whether --with-xpm-dir or --without-xpm-dir was given. +if test "${with_xpm_dir+set}" = set; then + withval="$with_xpm_dir" + PHP_XPM_DIR=$withval +else + + PHP_XPM_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_XPM_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_XPM_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_ttf=no + +echo $ac_n "checking for FreeType 1.x support""... $ac_c" 1>&6 +echo "configure:35062: checking for FreeType 1.x 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=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_TTF=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_TTF +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_freetype_dir=no + +echo $ac_n "checking for FreeType 2""... $ac_c" 1>&6 +echo "configure:35088: checking for FreeType 2" >&5 +# Check whether --with-freetype-dir or --without-freetype-dir was given. +if test "${with_freetype_dir+set}" = set; then + withval="$with_freetype_dir" + PHP_FREETYPE_DIR=$withval +else + + PHP_FREETYPE_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_FREETYPE_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_FREETYPE_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_t1lib=no + +echo $ac_n "checking for T1lib support""... $ac_c" 1>&6 +echo "configure:35114: checking for T1lib support" >&5 +# Check whether --with-t1lib or --without-t1lib was given. +if test "${with_t1lib+set}" = set; then + withval="$with_t1lib" + PHP_T1LIB=$withval +else + + PHP_T1LIB=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_T1LIB=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_T1LIB +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_gd_native_ttf=no + +echo $ac_n "checking whether to enable truetype string function in GD""... $ac_c" 1>&6 +echo "configure:35140: checking whether to enable truetype string function in GD" >&5 +# Check whether --enable-gd-native-ttf or --disable-gd-native-ttf was given. +if test "${enable_gd_native_ttf+set}" = set; then + enableval="$enable_gd_native_ttf" + PHP_GD_NATIVE_TTF=$enableval +else + + PHP_GD_NATIVE_TTF=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_GD_NATIVE_TTF=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_GD_NATIVE_TTF +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_gd_jis_conv=no + +echo $ac_n "checking whether to enable JIS-mapped Japanese font support in GD""... $ac_c" 1>&6 +echo "configure:35166: checking whether to enable JIS-mapped Japanese font support in GD" >&5 +# Check whether --enable-gd-jis-conv or --disable-gd-jis-conv was given. +if test "${enable_gd_jis_conv+set}" = set; then + enableval="$enable_gd_jis_conv" + PHP_GD_JIS_CONV=$enableval +else + + PHP_GD_JIS_CONV=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_GD_JIS_CONV=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_GD_JIS_CONV +echo "$ac_t""$ext_output" 1>&6 + + + + + + + + + + + + + + + + + + + + + + + + + + +if test "$PHP_GD" = "yes"; then + GD_MODULE_TYPE=builtin + extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \ + libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_png.c libgd/gd_jpeg.c \ + libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c libgd/gdfontmb.c libgd/gdfontl.c \ + libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c libgd/gdkanji.c \ + libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c libgd/gd_gif_in.c \ + libgd/xbm.c libgd/gd_gif_out.c libgd/gd_security.c" + + for ac_func in fabsf floorf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:35222: 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 < +/* Override any gcc2 internal prototype to avoid an 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:35250: \"$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 <&6 +fi +done + + + test "$PHP_PNG_DIR" = "no" && PHP_PNG_DIR=yes + + + if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then + if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then + PHP_ZLIB_DIR="$PHP_ZLIB_DIR" + PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib" + elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then + PHP_ZLIB_DIR="$PHP_ZLIB_DIR" + PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include" + else + { echo "configure: error: Can't find zlib headers under "$PHP_ZLIB_DIR"" 1>&2; exit 1; } + fi + else + for i in /usr/local /usr; do + if test -f "$i/include/zlib/zlib.h"; then + PHP_ZLIB_DIR="$i" + PHP_ZLIB_INCDIR="$i/include/zlib" + elif test -f "$i/include/zlib.h"; then + PHP_ZLIB_DIR="$i" + PHP_ZLIB_INCDIR="$i/include" + fi + done + fi + + + if test "$PHP_GD_NATIVE_TTF" = "yes"; then + cat >> confdefs.h <<\EOF +#define USE_GD_IMGSTRTTF 1 +EOF + + fi + + + if test "$PHP_GD_JIS_CONV" = "yes"; then + USE_GD_JIS_CONV=1 + fi + + + if test "$PHP_JPEG_DIR" != "no"; then + + for i in $PHP_JPEG_DIR /usr/local /usr; do + test -f $i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libjpeg.a && GD_JPEG_DIR=$i && break + done + + if test -z "$GD_JPEG_DIR"; then + { echo "configure: error: libjpeg.(a|so) not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GD_JPEG_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 +echo "configure:35422: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$GD_JPEG_DIR/include" != "/usr/include"; then + + if test -z "$GD_JPEG_DIR/include" || echo "$GD_JPEG_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$GD_JPEG_DIR/include + else + + ep_dir="`echo $GD_JPEG_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_JPEG_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-ljpeg $GD_SHARED_LIBADD" + if test -n "$GD_JPEG_DIR/$PHP_LIBDIR"; then + + if test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_JPEG_DIR/$PHP_LIBDIR" || echo "$GD_JPEG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_JPEG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_JPEG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_JPEG_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_JPEG_DIR/$PHP_LIBDIR"; then + + if test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_JPEG_DIR/$PHP_LIBDIR" || echo "$GD_JPEG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_JPEG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_JPEG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_JPEG_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case jpeg in + c|c_r|pthread*) ;; + *) + LIBS="-ljpeg $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_jpeg_jpeg_read_header + + { echo "configure: error: Problem with libjpeg.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + else + echo "$ac_t""If configure fails try --with-jpeg-dir=" 1>&6 + fi + + + if test "$PHP_PNG_DIR" != "no"; then + + for i in $PHP_PNG_DIR /usr/local /usr; do + test -f $i/$PHP_LIBDIR/libpng.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libpng.a && GD_PNG_DIR=$i && break + done + + if test -z "$GD_PNG_DIR"; then + { echo "configure: error: libpng.(a|so) not found." 1>&2; exit 1; } + fi + + if test "$PHP_ZLIB_DIR" = "no"; then + { echo "configure: error: PNG support requires ZLIB. Use --with-zlib-dir=" 1>&2; exit 1; } + fi + + if test ! -f $GD_PNG_DIR/include/png.h; then + { echo "configure: error: png.h not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz -L$GD_PNG_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6 +echo "configure:35723: checking for png_write_image in -lpng" >&5 +ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpng $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$GD_PNG_DIR/include" != "/usr/include"; then + + if test -z "$GD_PNG_DIR/include" || echo "$GD_PNG_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$GD_PNG_DIR/include + else + + ep_dir="`echo $GD_PNG_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_PNG_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lz $GD_SHARED_LIBADD" + if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then + + if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then + + if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lpng $GD_SHARED_LIBADD" + if test -n "$GD_PNG_DIR/$PHP_LIBDIR"; then + + if test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_PNG_DIR/$PHP_LIBDIR" || echo "$GD_PNG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_PNG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_PNG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_PNG_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_PNG_DIR/$PHP_LIBDIR"; then + + if test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_PNG_DIR/$PHP_LIBDIR" || echo "$GD_PNG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_PNG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_PNG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_PNG_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case png in + c|c_r|pthread*) ;; + *) + LIBS="-lpng $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_png_png_write_image + + { echo "configure: error: Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + + else + echo "$ac_t""If configure fails try --with-png-dir= and --with-zlib-dir=" 1>&6 + fi + + + if test "$PHP_XPM_DIR" != "no"; then + + for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do + test -f $i/$PHP_LIBDIR/libXpm.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libXpm.a && GD_XPM_DIR=$i && break + done + + if test -z "$GD_XPM_DIR"; then + { echo "configure: error: libXpm.(a|so) not found." 1>&2; exit 1; } + fi + + for i in include include/X11; do + test -f $GD_XPM_DIR/$i/xpm.h && GD_XPM_INC=$GD_XPM_DIR/include + done + + if test -z "$GD_XPM_INC"; then + { echo "configure: error: xpm.h not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GD_XPM_DIR/$PHP_LIBDIR -lX11 + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 +echo "configure:36122: checking for XpmFreeXpmImage in -lXpm" >&5 +ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXpm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$GD_XPM_INC" != "/usr/include"; then + + if test -z "$GD_XPM_INC" || echo "$GD_XPM_INC" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_INC + else + + ep_dir="`echo $GD_XPM_INC|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_INC\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lXpm $GD_SHARED_LIBADD" + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case Xpm in + c|c_r|pthread*) ;; + *) + LIBS="-lXpm $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lX11 $GD_SHARED_LIBADD" + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case X11 in + c|c_r|pthread*) ;; + *) + LIBS="-lX11 $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_Xpm_XpmFreeXpmImage + + { echo "configure: error: Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + else + echo "$ac_t""If configure fails try --with-xpm-dir=" 1>&6 + fi + + + if test "$PHP_FREETYPE_DIR" != "no"; then + + for i in $PHP_FREETYPE_DIR /usr/local /usr; do + if test -f "$i/include/freetype2/freetype/freetype.h"; then + FREETYPE2_DIR=$i + FREETYPE2_INC_DIR=$i/include/freetype2 + break + fi + done + + if test -z "$FREETYPE2_DIR"; then + { echo "configure: error: freetype.h not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$FREETYPE2_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6 +echo "configure:36516: checking for FT_New_Face in -lfreetype" >&5 +ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lfreetype $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lfreetype $GD_SHARED_LIBADD" + if test -n "$FREETYPE2_DIR/$PHP_LIBDIR"; then + + if test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$FREETYPE2_DIR/$PHP_LIBDIR" || echo "$FREETYPE2_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $FREETYPE2_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$FREETYPE2_DIR/$PHP_LIBDIR"; then + + if test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$FREETYPE2_DIR/$PHP_LIBDIR" || echo "$FREETYPE2_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $FREETYPE2_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case freetype in + c|c_r|pthread*) ;; + *) + LIBS="-lfreetype $LIBS" + ;; + esac + + + + + fi + + + + if test "$FREETYPE2_DIR/include" != "/usr/include"; then + + if test -z "$FREETYPE2_DIR/include" || echo "$FREETYPE2_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_DIR/include + else + + ep_dir="`echo $FREETYPE2_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$FREETYPE2_INC_DIR" != "/usr/include"; then + + if test -z "$FREETYPE2_INC_DIR" || echo "$FREETYPE2_INC_DIR" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_INC_DIR + else + + ep_dir="`echo $FREETYPE2_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define USE_GD_IMGSTRTTF 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBFREETYPE 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_freetype_FT_New_Face + + { echo "configure: error: Problem with freetype.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + else + echo "$ac_t""If configure fails try --with-freetype-dir=" 1>&6 + fi + + + if test "$PHP_TTF" != "no"; then + if test "$PHP_FREETYPE_DIR" = "no" || test "$PHP_FREETYPE_DIR" = ""; then + if test -n "$PHP_TTF"; then + for i in $PHP_TTF /usr/local /usr; do + if test -f "$i/include/freetype.h"; then + TTF_DIR=$i + unset TTF_INC_DIR + fi + if test -f "$i/include/freetype/freetype.h"; then + TTF_DIR=$i + TTF_INC_DIR=$i/include/freetype + fi + if test -f "$i/include/freetype1/freetype/freetype.h"; then + TTF_DIR=$i + TTF_INC_DIR=$i/include/freetype1/freetype + fi + test -n "$TTF_DIR" && break + done + fi + if test -n "$TTF_DIR" ; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBTTF 1 +EOF + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lttf $GD_SHARED_LIBADD" + if test -n "$TTF_DIR/$PHP_LIBDIR"; then + + if test "$TTF_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TTF_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$TTF_DIR/$PHP_LIBDIR" || echo "$TTF_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$TTF_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $TTF_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TTF_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$TTF_DIR/$PHP_LIBDIR"; then + + if test "$TTF_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TTF_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$TTF_DIR/$PHP_LIBDIR" || echo "$TTF_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$TTF_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $TTF_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TTF_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ttf in + c|c_r|pthread*) ;; + *) + LIBS="-lttf $LIBS" + ;; + esac + + + + + fi + + + fi + if test -z "$TTF_INC_DIR"; then + TTF_INC_DIR=$TTF_DIR/include + fi + + if test "$TTF_INC_DIR" != "/usr/include"; then + + if test -z "$TTF_INC_DIR" || echo "$TTF_INC_DIR" | grep '^/' >/dev/null ; then + ai_p=$TTF_INC_DIR + else + + ep_dir="`echo $TTF_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TTF_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + else + echo $ac_n "checking for FreeType 1 support""... $ac_c" 1>&6 +echo "configure:36898: checking for FreeType 1 support" >&5 + echo "$ac_t""no - FreeType 2.x is to be used instead" 1>&6 + fi + fi + + + if test "$PHP_T1LIB" != "no"; then + + for i in $PHP_T1LIB /usr/local /usr; do + test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break + done + + if test -z "$GD_T1_DIR"; then + { echo "configure: error: Your t1lib distribution is not installed correctly. Please reinstall it." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GD_T1_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6 +echo "configure:37012: checking for T1_StrError in -lt1" >&5 +ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lt1 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_LIBT1 1 +EOF + + + if test "$GD_T1_DIR/include" != "/usr/include"; then + + if test -z "$GD_T1_DIR/include" || echo "$GD_T1_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$GD_T1_DIR/include + else + + ep_dir="`echo $GD_T1_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_T1_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lt1 $GD_SHARED_LIBADD" + if test -n "$GD_T1_DIR/$PHP_LIBDIR"; then + + if test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_T1_DIR/$PHP_LIBDIR" || echo "$GD_T1_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_T1_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_T1_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_T1_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_T1_DIR/$PHP_LIBDIR"; then + + if test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_T1_DIR/$PHP_LIBDIR" || echo "$GD_T1_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_T1_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_T1_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_T1_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case t1 in + c|c_r|pthread*) ;; + *) + LIBS="-lt1 $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_t1_T1_StrError + + { echo "configure: error: Problem with libt1.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD13 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD15 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD20 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD204 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_IMAGESETTILE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_IMAGESETBRUSH 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GDIMAGECOLORRESOLVE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_COLORCLOSESTHWB 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_WBMP 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_GD2 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_PNG 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_XBM 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_BUNDLED 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_GIF_READ 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_GIF_CREATE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_IMAGEELLIPSE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_FONTCACHESHUTDOWN 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_FONTMUTEX 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_DYNAMIC_CTX_EX 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_GIF_CTX 1 +EOF + + + GDLIB_CFLAGS="-DHAVE_LIBPNG" + + + if test -n "$GD_JPEG_DIR"; then + cat >> confdefs.h <<\EOF +#define HAVE_GD_JPG 1 +EOF + + GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBJPEG" + fi + + if test -n "$GD_XPM_DIR"; then + cat >> confdefs.h <<\EOF +#define HAVE_GD_XPM 1 +EOF + + GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM" + fi + + if test -n "$FREETYPE2_DIR"; then + cat >> confdefs.h <<\EOF +#define HAVE_GD_STRINGFT 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_GD_STRINGFTEX 1 +EOF + + GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBFREETYPE" + fi + + if test -n "$TTF_DIR"; then + GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBTTF" + fi + + if test -n "$USE_GD_JIS_CONV"; then + cat >> confdefs.h <<\EOF +#define USE_GD_JISX0208 1 +EOF + + GDLIB_CFLAGS="$GDLIB_CFLAGS -DJISX0208" + fi + +else + + if test "$PHP_GD" != "no"; then + GD_MODULE_TYPE=external + extra_sources="gdcache.c" + + + if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then + if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then + PHP_ZLIB_DIR="$PHP_ZLIB_DIR" + PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib" + elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then + PHP_ZLIB_DIR="$PHP_ZLIB_DIR" + PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include" + else + { echo "configure: error: Can't find zlib headers under "$PHP_ZLIB_DIR"" 1>&2; exit 1; } + fi + else + for i in /usr/local /usr; do + if test -f "$i/include/zlib/zlib.h"; then + PHP_ZLIB_DIR="$i" + PHP_ZLIB_INCDIR="$i/include/zlib" + elif test -f "$i/include/zlib.h"; then + PHP_ZLIB_DIR="$i" + PHP_ZLIB_INCDIR="$i/include" + fi + done + fi + + + if test "$PHP_GD_NATIVE_TTF" = "yes"; then + cat >> confdefs.h <<\EOF +#define USE_GD_IMGSTRTTF 1 +EOF + + fi + + + if test "$PHP_JPEG_DIR" != "no"; then + + for i in $PHP_JPEG_DIR /usr/local /usr; do + test -f $i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libjpeg.a && GD_JPEG_DIR=$i && break + done + + if test -z "$GD_JPEG_DIR"; then + { echo "configure: error: libjpeg.(a|so) not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GD_JPEG_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 +echo "configure:37473: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$GD_JPEG_DIR/include" != "/usr/include"; then + + if test -z "$GD_JPEG_DIR/include" || echo "$GD_JPEG_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$GD_JPEG_DIR/include + else + + ep_dir="`echo $GD_JPEG_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_JPEG_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-ljpeg $GD_SHARED_LIBADD" + if test -n "$GD_JPEG_DIR/$PHP_LIBDIR"; then + + if test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_JPEG_DIR/$PHP_LIBDIR" || echo "$GD_JPEG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_JPEG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_JPEG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_JPEG_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_JPEG_DIR/$PHP_LIBDIR"; then + + if test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_JPEG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_JPEG_DIR/$PHP_LIBDIR" || echo "$GD_JPEG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_JPEG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_JPEG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_JPEG_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case jpeg in + c|c_r|pthread*) ;; + *) + LIBS="-ljpeg $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_jpeg_jpeg_read_header + + { echo "configure: error: Problem with libjpeg.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + else + echo "$ac_t""If configure fails try --with-jpeg-dir=" 1>&6 + fi + + + if test "$PHP_PNG_DIR" != "no"; then + + for i in $PHP_PNG_DIR /usr/local /usr; do + test -f $i/$PHP_LIBDIR/libpng.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libpng.a && GD_PNG_DIR=$i && break + done + + if test -z "$GD_PNG_DIR"; then + { echo "configure: error: libpng.(a|so) not found." 1>&2; exit 1; } + fi + + if test "$PHP_ZLIB_DIR" = "no"; then + { echo "configure: error: PNG support requires ZLIB. Use --with-zlib-dir=" 1>&2; exit 1; } + fi + + if test ! -f $GD_PNG_DIR/include/png.h; then + { echo "configure: error: png.h not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz -L$GD_PNG_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6 +echo "configure:37774: checking for png_write_image in -lpng" >&5 +ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpng $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$GD_PNG_DIR/include" != "/usr/include"; then + + if test -z "$GD_PNG_DIR/include" || echo "$GD_PNG_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$GD_PNG_DIR/include + else + + ep_dir="`echo $GD_PNG_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_PNG_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lz $GD_SHARED_LIBADD" + if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then + + if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then + + if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lpng $GD_SHARED_LIBADD" + if test -n "$GD_PNG_DIR/$PHP_LIBDIR"; then + + if test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_PNG_DIR/$PHP_LIBDIR" || echo "$GD_PNG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_PNG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_PNG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_PNG_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_PNG_DIR/$PHP_LIBDIR"; then + + if test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_PNG_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_PNG_DIR/$PHP_LIBDIR" || echo "$GD_PNG_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_PNG_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_PNG_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_PNG_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case png in + c|c_r|pthread*) ;; + *) + LIBS="-lpng $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_png_png_write_image + + { echo "configure: error: Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + + else + echo "$ac_t""If configure fails try --with-png-dir= and --with-zlib-dir=" 1>&6 + fi + + + if test "$PHP_XPM_DIR" != "no"; then + + for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do + test -f $i/$PHP_LIBDIR/libXpm.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libXpm.a && GD_XPM_DIR=$i && break + done + + if test -z "$GD_XPM_DIR"; then + { echo "configure: error: libXpm.(a|so) not found." 1>&2; exit 1; } + fi + + for i in include include/X11; do + test -f $GD_XPM_DIR/$i/xpm.h && GD_XPM_INC=$GD_XPM_DIR/include + done + + if test -z "$GD_XPM_INC"; then + { echo "configure: error: xpm.h not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GD_XPM_DIR/$PHP_LIBDIR -lX11 + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 +echo "configure:38173: checking for XpmFreeXpmImage in -lXpm" >&5 +ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXpm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$GD_XPM_INC" != "/usr/include"; then + + if test -z "$GD_XPM_INC" || echo "$GD_XPM_INC" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_INC + else + + ep_dir="`echo $GD_XPM_INC|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_INC\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lXpm $GD_SHARED_LIBADD" + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case Xpm in + c|c_r|pthread*) ;; + *) + LIBS="-lXpm $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lX11 $GD_SHARED_LIBADD" + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_XPM_DIR/$PHP_LIBDIR"; then + + if test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_XPM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_XPM_DIR/$PHP_LIBDIR" || echo "$GD_XPM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_XPM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_XPM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_XPM_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case X11 in + c|c_r|pthread*) ;; + *) + LIBS="-lX11 $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_Xpm_XpmFreeXpmImage + + { echo "configure: error: Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + else + echo "$ac_t""If configure fails try --with-xpm-dir=" 1>&6 + fi + + + if test "$PHP_FREETYPE_DIR" != "no"; then + + for i in $PHP_FREETYPE_DIR /usr/local /usr; do + if test -f "$i/include/freetype2/freetype/freetype.h"; then + FREETYPE2_DIR=$i + FREETYPE2_INC_DIR=$i/include/freetype2 + break + fi + done + + if test -z "$FREETYPE2_DIR"; then + { echo "configure: error: freetype.h not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$FREETYPE2_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6 +echo "configure:38567: checking for FT_New_Face in -lfreetype" >&5 +ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lfreetype $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lfreetype $GD_SHARED_LIBADD" + if test -n "$FREETYPE2_DIR/$PHP_LIBDIR"; then + + if test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$FREETYPE2_DIR/$PHP_LIBDIR" || echo "$FREETYPE2_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $FREETYPE2_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$FREETYPE2_DIR/$PHP_LIBDIR"; then + + if test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FREETYPE2_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$FREETYPE2_DIR/$PHP_LIBDIR" || echo "$FREETYPE2_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $FREETYPE2_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case freetype in + c|c_r|pthread*) ;; + *) + LIBS="-lfreetype $LIBS" + ;; + esac + + + + + fi + + + + if test "$FREETYPE2_DIR/include" != "/usr/include"; then + + if test -z "$FREETYPE2_DIR/include" || echo "$FREETYPE2_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_DIR/include + else + + ep_dir="`echo $FREETYPE2_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$FREETYPE2_INC_DIR" != "/usr/include"; then + + if test -z "$FREETYPE2_INC_DIR" || echo "$FREETYPE2_INC_DIR" | grep '^/' >/dev/null ; then + ai_p=$FREETYPE2_INC_DIR + else + + ep_dir="`echo $FREETYPE2_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETYPE2_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define USE_GD_IMGSTRTTF 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBFREETYPE 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_freetype_FT_New_Face + + { echo "configure: error: Problem with freetype.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + else + echo "$ac_t""If configure fails try --with-freetype-dir=" 1>&6 + fi + + + if test "$PHP_TTF" != "no"; then + if test "$PHP_FREETYPE_DIR" = "no" || test "$PHP_FREETYPE_DIR" = ""; then + if test -n "$PHP_TTF"; then + for i in $PHP_TTF /usr/local /usr; do + if test -f "$i/include/freetype.h"; then + TTF_DIR=$i + unset TTF_INC_DIR + fi + if test -f "$i/include/freetype/freetype.h"; then + TTF_DIR=$i + TTF_INC_DIR=$i/include/freetype + fi + if test -f "$i/include/freetype1/freetype/freetype.h"; then + TTF_DIR=$i + TTF_INC_DIR=$i/include/freetype1/freetype + fi + test -n "$TTF_DIR" && break + done + fi + if test -n "$TTF_DIR" ; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBTTF 1 +EOF + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lttf $GD_SHARED_LIBADD" + if test -n "$TTF_DIR/$PHP_LIBDIR"; then + + if test "$TTF_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TTF_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$TTF_DIR/$PHP_LIBDIR" || echo "$TTF_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$TTF_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $TTF_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TTF_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$TTF_DIR/$PHP_LIBDIR"; then + + if test "$TTF_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TTF_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$TTF_DIR/$PHP_LIBDIR" || echo "$TTF_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$TTF_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $TTF_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TTF_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ttf in + c|c_r|pthread*) ;; + *) + LIBS="-lttf $LIBS" + ;; + esac + + + + + fi + + + fi + if test -z "$TTF_INC_DIR"; then + TTF_INC_DIR=$TTF_DIR/include + fi + + if test "$TTF_INC_DIR" != "/usr/include"; then + + if test -z "$TTF_INC_DIR" || echo "$TTF_INC_DIR" | grep '^/' >/dev/null ; then + ai_p=$TTF_INC_DIR + else + + ep_dir="`echo $TTF_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TTF_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + else + echo $ac_n "checking for FreeType 1 support""... $ac_c" 1>&6 +echo "configure:38949: checking for FreeType 1 support" >&5 + echo "$ac_t""no - FreeType 2.x is to be used instead" 1>&6 + fi + fi + + + if test "$PHP_T1LIB" != "no"; then + + for i in $PHP_T1LIB /usr/local /usr; do + test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break + done + + if test -z "$GD_T1_DIR"; then + { echo "configure: error: Your t1lib distribution is not installed correctly. Please reinstall it." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GD_T1_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6 +echo "configure:39063: checking for T1_StrError in -lt1" >&5 +ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lt1 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_LIBT1 1 +EOF + + + if test "$GD_T1_DIR/include" != "/usr/include"; then + + if test -z "$GD_T1_DIR/include" || echo "$GD_T1_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$GD_T1_DIR/include + else + + ep_dir="`echo $GD_T1_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_T1_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lt1 $GD_SHARED_LIBADD" + if test -n "$GD_T1_DIR/$PHP_LIBDIR"; then + + if test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_T1_DIR/$PHP_LIBDIR" || echo "$GD_T1_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_T1_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_T1_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_T1_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_T1_DIR/$PHP_LIBDIR"; then + + if test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GD_T1_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GD_T1_DIR/$PHP_LIBDIR" || echo "$GD_T1_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GD_T1_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GD_T1_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_T1_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case t1 in + c|c_r|pthread*) ;; + *) + LIBS="-lt1 $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_t1_T1_StrError + + { echo "configure: error: Problem with libt1.(a|so). Please check config.log for more information." 1>&2; exit 1; } + + +fi + + fi + + + for i in include/gd1.3 include/gd include gd1.3 gd ""; do + test -f "$PHP_GD/$i/gd.h" && GD_INCLUDE="$PHP_GD/$i" + done + + for i in $PHP_LIBDIR/gd1.3 $PHP_LIBDIR/gd $PHP_LIBDIR gd1.3 gd ""; do + test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" || test -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i" + done + + if test -n "$GD_INCLUDE" && test -n "$GD_LIB"; then + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-lgd $GD_SHARED_LIBADD" + if test -n "$GD_LIB"; then + + if test "$GD_LIB" != "/usr/$PHP_LIBDIR" && test "$GD_LIB" != "/usr/lib"; then + + if test -z "$GD_LIB" || echo "$GD_LIB" | grep '^/' >/dev/null ; then + ai_p=$GD_LIB + else + + ep_dir="`echo $GD_LIB|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_LIB\"`" + fi + + + if test "$ext_shared" = "yes"; then + GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GD_LIB"; then + + if test "$GD_LIB" != "/usr/$PHP_LIBDIR" && test "$GD_LIB" != "/usr/lib"; then + + if test -z "$GD_LIB" || echo "$GD_LIB" | grep '^/' >/dev/null ; then + ai_p=$GD_LIB + else + + ep_dir="`echo $GD_LIB|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_LIB\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case gd in + c|c_r|pthread*) ;; + *) + LIBS="-lgd $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD 1 +EOF + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6 +echo "configure:39457: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD13 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageString16 + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImagePaletteCopy in -lgd""... $ac_c" 1>&6 +echo "configure:39605: checking for gdImagePaletteCopy in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImagePaletteCopy | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD15 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImagePaletteCopy + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6 +echo "configure:39753: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_PNG 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageCreateFromPng + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6 +echo "configure:39901: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_GIF_READ 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageCreateFromGif + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageGif in -lgd""... $ac_c" 1>&6 +echo "configure:40049: checking for gdImageGif in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageGif | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_GIF_CREATE 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageGif + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageWBMP in -lgd""... $ac_c" 1>&6 +echo "configure:40197: checking for gdImageWBMP in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageWBMP | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_WBMP 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageWBMP + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6 +echo "configure:40345: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_JPG 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageCreateFromJpeg + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageCreateFromXpm in -lgd""... $ac_c" 1>&6 +echo "configure:40493: checking for gdImageCreateFromXpm in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageCreateFromXpm | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_XPM 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageCreateFromXpm + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageCreateFromGd2 in -lgd""... $ac_c" 1>&6 +echo "configure:40641: checking for gdImageCreateFromGd2 in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageCreateFromGd2 | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_GD2 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageCreateFromGd2 + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageCreateTrueColor in -lgd""... $ac_c" 1>&6 +echo "configure:40789: checking for gdImageCreateTrueColor in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageCreateTrueColor | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD20 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageCreateTrueColor + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageSetTile in -lgd""... $ac_c" 1>&6 +echo "configure:40937: checking for gdImageSetTile in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageSetTile | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_IMAGESETTILE 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageSetTile + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageEllipse in -lgd""... $ac_c" 1>&6 +echo "configure:41085: checking for gdImageEllipse in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageEllipse | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_IMAGEELLIPSE 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageEllipse + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageSetBrush in -lgd""... $ac_c" 1>&6 +echo "configure:41233: checking for gdImageSetBrush in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageSetBrush | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_IMAGESETBRUSH 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageSetBrush + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageStringTTF in -lgd""... $ac_c" 1>&6 +echo "configure:41381: checking for gdImageStringTTF in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageStringTTF | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_STRINGTTF 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageStringTTF + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageStringFT in -lgd""... $ac_c" 1>&6 +echo "configure:41529: checking for gdImageStringFT in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageStringFT | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_STRINGFT 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageStringFT + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageStringFTEx in -lgd""... $ac_c" 1>&6 +echo "configure:41677: checking for gdImageStringFTEx in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageStringFTEx | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_STRINGFTEX 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageStringFTEx + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageColorClosestHWB in -lgd""... $ac_c" 1>&6 +echo "configure:41825: checking for gdImageColorClosestHWB in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageColorClosestHWB | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_COLORCLOSESTHWB 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageColorClosestHWB + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6 +echo "configure:41973: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GDIMAGECOLORRESOLVE 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageColorResolve + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageGifCtx in -lgd""... $ac_c" 1>&6 +echo "configure:42121: checking for gdImageGifCtx in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageGifCtx | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_GIF_CTX 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageGifCtx + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdCacheCreate in -lgd""... $ac_c" 1>&6 +echo "configure:42269: checking for gdCacheCreate in -lgd" >&5 +ac_lib_var=`echo gd'_'gdCacheCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_CACHE_CREATE 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdCacheCreate + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdFontCacheShutdown in -lgd""... $ac_c" 1>&6 +echo "configure:42417: checking for gdFontCacheShutdown in -lgd" >&5 +ac_lib_var=`echo gd'_'gdFontCacheShutdown | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_FONTCACHESHUTDOWN 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdFontCacheShutdown + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdFreeFontCache in -lgd""... $ac_c" 1>&6 +echo "configure:42565: checking for gdFreeFontCache in -lgd" >&5 +ac_lib_var=`echo gd'_'gdFreeFontCache | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_FREEFONTCACHE 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdFreeFontCache + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdFontCacheMutexSetup in -lgd""... $ac_c" 1>&6 +echo "configure:42713: checking for gdFontCacheMutexSetup in -lgd" >&5 +ac_lib_var=`echo gd'_'gdFontCacheMutexSetup | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_FONTMUTEX 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdFontCacheMutexSetup + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdNewDynamicCtxEx in -lgd""... $ac_c" 1>&6 +echo "configure:42861: checking for gdNewDynamicCtxEx in -lgd" >&5 +ac_lib_var=`echo gd'_'gdNewDynamicCtxEx | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_GD_DYNAMIC_CTX_EX 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdNewDynamicCtxEx + + +fi + + + elif test -z "$GD_INCLUDE"; then + { echo "configure: error: Unable to find gd.h anywhere under $PHP_GD" 1>&2; exit 1; } + else + { echo "configure: error: Unable to find libgd.(a|so) anywhere under $PHP_GD" 1>&2; exit 1; } + fi + + + if test -z "$GD_INCLUDE" || echo "$GD_INCLUDE" | grep '^/' >/dev/null ; then + GD_INCLUDE=$GD_INCLUDE + else + + ep_dir="`echo $GD_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + GD_INCLUDE="$ep_realdir/`basename \"$GD_INCLUDE\"`" + fi + + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$GD_INCLUDE + cat > conftest.$ac_ext < +#include + +int main() { + +gdIOCtx *ctx; +ctx = malloc(sizeof(gdIOCtx)); +ctx->gd_free = 1; + +; return 0; } +EOF +if { (eval echo configure:42949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGD204 1 +EOF + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + CPPFLAGS=$old_CPPFLAGS + + fi +fi + +if test "$PHP_GD" != "no"; then + + ext_builddir=ext/gd + ext_srcdir=$abs_srcdir/ext/gd + + ac_extra=`echo "\\$(GDLIB_CFLAGS)"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_GD_SHARED=no + + + case ext/gd in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/gd"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/gd/"; ac_bdir="ext/gd/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in gd.c gdttf.c $extra_sources; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects< conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + { echo "configure: error: GD build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + else + GD_HEADER_DIRS="ext/gd/" + GDLIB_CFLAGS="-I$GD_INCLUDE $GDLIB_CFLAGS" + + if test "$GD_INCLUDE" != "/usr/include"; then + + if test -z "$GD_INCLUDE" || echo "$GD_INCLUDE" | grep '^/' >/dev/null ; then + ai_p=$GD_INCLUDE + else + + ep_dir="`echo $GD_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GD_INCLUDE\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" -L$GD_LIB $GD_SHARED_LIBADD " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6 +echo "configure:43431: checking for gdImageCreate in -lgd" >&5 +ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gd_gdImageCreate + + { echo "configure: error: GD build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi + + fi + + + + for header_file in $GD_HEADER_DIRS; do + + + unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INSTALLHEADERS$unique=set" + + INSTALL_HEADERS="$INSTALL_HEADERS $header_file" + + fi + + done + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST GDLIB_CFLAGS" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST GD_SHARED_LIBADD" + +fi + + + +php_with_gettext=no + +echo $ac_n "checking for GNU gettext support""... $ac_c" 1>&6 +echo "configure:43515: checking for GNU gettext support" >&5 +# Check whether --with-gettext or --without-gettext was given. +if test "${with_gettext+set}" = set; then + withval="$with_gettext" + PHP_GETTEXT=$withval +else + + PHP_GETTEXT=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_GETTEXT=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_GETTEXT in +shared,*) + PHP_GETTEXT=`echo "$PHP_GETTEXT"|$SED 's/^shared,//'` + ;; +shared) + PHP_GETTEXT=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_GETTEXT" != "no"; then + for i in $PHP_GETTEXT /usr/local /usr; do + test -r $i/include/libintl.h && GETTEXT_DIR=$i && break + done + + if test -z "$GETTEXT_DIR"; then + { echo "configure: error: Cannot locate header file libintl.h" 1>&2; exit 1; } + fi + + GETTEXT_LIBDIR=$GETTEXT_DIR/$PHP_LIBDIR + GETTEXT_INCDIR=$GETTEXT_DIR/include + + O_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR" + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +echo "configure:43573: 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 <&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 + GETTEXT_CHECK_IN_LIB=intl + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for bindtextdomain in -lc""... $ac_c" 1>&6 +echo "configure:43614: 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 <&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= + GETTEXT_CHECK_IN_LIB=c + +else + echo "$ac_t""no" 1>&6 + + { echo "configure: error: Unable to find required gettext library" 1>&2; exit 1; } + +fi + + +fi + + LDFLAGS=$O_LDFLAGS + + cat >> confdefs.h <<\EOF +#define HAVE_LIBINTL 1 +EOF + + + ext_builddir=ext/gettext + ext_srcdir=$abs_srcdir/ext/gettext + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_GETTEXT_SHARED=no + + + case ext/gettext in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/gettext"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/gettext/"; ac_bdir="ext/gettext/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in gettext.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects</dev/null ; then + ai_p=$GETTEXT_LIBDIR + else + + ep_dir="`echo $GETTEXT_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GETTEXT_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GETTEXT_SHARED_LIBADD="-L$ai_p $GETTEXT_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GETTEXT_SHARED_LIBADD="$ld_runpath_switch$ai_p $GETTEXT_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GETTEXT_LIBDIR"; then + + if test "$GETTEXT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GETTEXT_LIBDIR" != "/usr/lib"; then + + if test -z "$GETTEXT_LIBDIR" || echo "$GETTEXT_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GETTEXT_LIBDIR + else + + ep_dir="`echo $GETTEXT_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GETTEXT_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $GETTEXT_LIBS in + c|c_r|pthread*) ;; + *) + LIBS="-l$GETTEXT_LIBS $LIBS" + ;; + esac + + + + + fi + + + 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 + + ep_dir="`echo $GETTEXT_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GETTEXT_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + echo $ac_n "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +echo "configure:44086: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 +ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'ngettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_NGETTEXT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +echo "configure:44129: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 +ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dngettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DNGETTEXT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +echo "configure:44172: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 +ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dcngettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DCNGETTEXT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +echo "configure:44215: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5 +ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'bind_textdomain_codeset | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + + +php_with_gmp=no + +echo $ac_n "checking for GNU MP support""... $ac_c" 1>&6 +echo "configure:44265: checking for GNU MP support" >&5 +# Check whether --with-gmp or --without-gmp was given. +if test "${with_gmp+set}" = set; then + withval="$with_gmp" + PHP_GMP=$withval +else + + PHP_GMP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_GMP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_GMP in +shared,*) + PHP_GMP=`echo "$PHP_GMP"|$SED 's/^shared,//'` + ;; +shared) + PHP_GMP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_GMP" != "no"; then + + for i in $PHP_GMP /usr/local /usr; do + test -f $i/include/gmp.h && GMP_DIR=$i && break + done + + if test -z "$GMP_DIR"; then + { echo "configure: error: Unable to locate gmp.h" 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GMP_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for __gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6 +echo "configure:44416: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5 +ac_lib_var=`echo gmp'_'__gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgmp $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gmp___gmp_randinit_lc_2exp_size + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$GMP_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6 +echo "configure:44560: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5 +ac_lib_var=`echo gmp'_'gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgmp $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gmp_gmp_randinit_lc_2exp_size + + { echo "configure: error: GNU MP Library version 4.1.2 or greater required." 1>&2; exit 1; } + + +fi + + + +fi + + + + + if test "$ext_shared" = "yes"; then + GMP_SHARED_LIBADD="-lgmp $GMP_SHARED_LIBADD" + if test -n "$GMP_DIR/$PHP_LIBDIR"; then + + if test "$GMP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GMP_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GMP_DIR/$PHP_LIBDIR" || echo "$GMP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GMP_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GMP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GMP_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + GMP_SHARED_LIBADD="-L$ai_p $GMP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && GMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $GMP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$GMP_DIR/$PHP_LIBDIR"; then + + if test "$GMP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GMP_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$GMP_DIR/$PHP_LIBDIR" || echo "$GMP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$GMP_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $GMP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GMP_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case gmp in + c|c_r|pthread*) ;; + *) + LIBS="-lgmp $LIBS" + ;; + esac + + + + + fi + + + + if test "$GMP_DIR/include" != "/usr/include"; then + + if test -z "$GMP_DIR/include" || echo "$GMP_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$GMP_DIR/include + else + + ep_dir="`echo $GMP_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$GMP_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + ext_builddir=ext/gmp + ext_srcdir=$abs_srcdir/ext/gmp + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_GMP_SHARED=no + + + case ext/gmp in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/gmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/gmp/"; ac_bdir="ext/gmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in gmp.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_GMP 1 +EOF + +fi + + + +php_enable_hash=yes + +echo $ac_n "checking whether to enable hash support""... $ac_c" 1>&6 +echo "configure:45040: checking whether to enable hash support" >&5 +# Check whether --enable-hash or --disable-hash was given. +if test "${enable_hash+set}" = set; then + enableval="$enable_hash" + PHP_HASH=$enableval +else + + PHP_HASH=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_HASH=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_HASH in +shared,*) + PHP_HASH=`echo "$PHP_HASH"|$SED 's/^shared,//'` + ;; +shared) + PHP_HASH=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_HASH" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_HASH_EXT 1 +EOF + + + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:45090: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ac_cv_c_bigendian_php=unknown + if test "$cross_compiling" = yes; then + ac_cv_c_bigendian_php=unknown +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian_php=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian_php=no +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_c_bigendian_php" 1>&6 + if test $ac_cv_c_bigendian_php = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN +EOF + + fi + + + echo $ac_n "checking size of short""... $ac_c" 1>&6 +echo "configure:45141: checking size of short" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_short=2 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(short)); + return(0); +} +EOF +if { (eval echo configure:45160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_short=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_short=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_short" 1>&6 +cat >> confdefs.h <&6 +echo "configure:45180: 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 < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(int)); + return(0); +} +EOF +if { (eval echo configure:45199: \"$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 <&6 +echo "configure:45219: checking size of long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long=4 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long)); + return(0); +} +EOF +if { (eval echo configure:45238: \"$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 <&6 +echo "configure:45258: checking size of long long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long_long=8 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long long)); + return(0); +} +EOF +if { (eval echo configure:45277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long_long=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_long=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 +cat >> confdefs.h <>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:45614: checking for iconv support" >&5 +# Check whether --with-iconv or --without-iconv was given. +if test "${with_iconv+set}" = set; then + withval="$with_iconv" + PHP_ICONV=$withval +else + + PHP_ICONV=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_ICONV=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_ICONV in +shared,*) + PHP_ICONV=`echo "$PHP_ICONV"|$SED 's/^shared,//'` + ;; +shared) + PHP_ICONV=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_ICONV" != "no"; then + + + found_iconv=no + unset ICONV_DIR + + # Create the directories for a VPATH build: + $php_shtool mkdir -p ext/iconv + + echo > ext/iconv/php_have_bsd_iconv.h + echo > ext/iconv/php_have_glibc_iconv.h + echo > ext/iconv/php_have_libiconv.h + echo > ext/iconv/php_have_iconv.h + echo > ext/iconv/php_php_iconv_impl.h + echo > ext/iconv/php_php_iconv_h_path.h + echo > ext/iconv/php_iconv_supports_errno.h + + if test "$PHP_ICONV" = "yes"; then + echo $ac_n "checking for iconv""... $ac_c" 1>&6 +echo "configure:45676: checking for iconv" >&5 +if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char iconv(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_iconv) || defined (__stub___iconv) +choke me +#else +iconv(); +#endif + +; return 0; } +EOF +if { (eval echo configure:45704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_iconv=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_iconv=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + found_iconv=yes + +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for libiconv""... $ac_c" 1>&6 +echo "configure:45725: checking for libiconv" >&5 +if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char libiconv(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_libiconv) || defined (__stub___libiconv) +choke me +#else +libiconv(); +#endif + +; return 0; } +EOF +if { (eval echo configure:45753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_libiconv=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_libiconv=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_LIBICONV 1 +EOF + + found_iconv=yes + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + fi + + if test "$found_iconv" = "no"; then + + for i in $PHP_ICONV /usr/local /usr; do + if test -r $i/include/giconv.h; then + cat >> confdefs.h <<\EOF +#define HAVE_GICONV_H 1 +EOF + + ICONV_DIR=$i + iconv_lib_name=giconv + break + elif test -r $i/include/iconv.h; then + ICONV_DIR=$i + iconv_lib_name=iconv + break + fi + done + + if test -z "$ICONV_DIR"; then + { echo "configure: error: Please specify the install prefix of iconv with --with-iconv=" 1>&2; exit 1; } + fi + + if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a || + test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME + then + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$ICONV_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6 +echo "configure:45909: checking for libiconv in -l$iconv_lib_name" >&5 +ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$iconv_lib_name $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_iconv=yes + + echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_LIBICONV 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$iconv_lib_name_libiconv + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$ICONV_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6 +echo "configure:46062: checking for iconv in -l$iconv_lib_name" >&5 +ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$iconv_lib_name $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_iconv=yes + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$iconv_lib_name_iconv + + +fi + + + +fi + + fi + fi + + if test "$found_iconv" = "yes"; then + + echo "#define HAVE_ICONV 1" > ext/iconv/php_have_iconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_ICONV 1 +EOF + + if test -n "$ICONV_DIR"; then + + + if test "$ext_shared" = "yes"; then + ICONV_SHARED_LIBADD="-l$iconv_lib_name $ICONV_SHARED_LIBADD" + if test -n "$ICONV_DIR/$PHP_LIBDIR"; then + + if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$ICONV_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + ICONV_SHARED_LIBADD="-L$ai_p $ICONV_SHARED_LIBADD" + test -n "$ld_runpath_switch" && ICONV_SHARED_LIBADD="$ld_runpath_switch$ai_p $ICONV_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$ICONV_DIR/$PHP_LIBDIR"; then + + if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$ICONV_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $iconv_lib_name in + c|c_r|pthread*) ;; + *) + LIBS="-l$iconv_lib_name $LIBS" + ;; + esac + + + + + fi + + + + if test "$ICONV_DIR/include" != "/usr/include"; then + + if test -z "$ICONV_DIR/include" || echo "$ICONV_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$ICONV_DIR/include + else + + ep_dir="`echo $ICONV_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ICONV_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + fi + + iconv_avail="yes"; + +else + iconv_avail="no"; + + fi + + + if test "$iconv_avail" != "no"; then + if test -z "$ICONV_DIR"; then + for i in /usr/local /usr; do + if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then + PHP_ICONV_PREFIX="$i" + break + fi + done + if test -z "$PHP_ICONV_PREFIX"; then + PHP_ICONV_PREFIX="/usr" + fi + else + PHP_ICONV_PREFIX="$ICONV_DIR" + fi + + CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS" + LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS" + + if test -r "$PHP_ICONV_PREFIX/include/giconv.h"; then + PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" + else + PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h" + fi + + echo $ac_n "checking if iconv is glibc's""... $ac_c" 1>&6 +echo "configure:46292: checking if iconv is glibc's" >&5 + cat > conftest.$ac_ext < +int main() { +gnu_get_libc_version(); +; return 0; } +EOF +if { (eval echo configure:46301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 + iconv_impl_name="glibc" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -f conftest* + + if test -z "$iconv_impl_name"; then + echo $ac_n "checking if using GNU libiconv""... $ac_c" 1>&6 +echo "configure:46319: checking if using GNU libiconv" >&5 + php_iconv_old_ld="$LDFLAGS" + LDFLAGS="-liconv $LDFLAGS" + if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + LDFLAGS="$php_iconv_old_ld" + +else + cat > conftest.$ac_ext < +int main() { + printf("%d", _libiconv_version); + return 0; +} + +EOF +if { (eval echo configure:46339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + echo "$ac_t""yes" 1>&6 + iconv_impl_name="gnu_libiconv" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo "$ac_t""no" 1>&6 + LDFLAGS="$php_iconv_old_ld" + +fi +rm -fr conftest* +fi + + fi + + if test -z "$iconv_impl_name"; then + echo $ac_n "checking if iconv is Konstantin Chuguev's""... $ac_c" 1>&6 +echo "configure:46361: checking if iconv is Konstantin Chuguev's" >&5 + cat > conftest.$ac_ext < +int main() { +iconv_ccs_init(NULL, NULL); +; return 0; } +EOF +if { (eval echo configure:46370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 + iconv_impl_name="bsd" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -f conftest* + fi + + echo > ext/iconv/php_have_bsd_iconv.h + echo > ext/iconv/php_have_glibc_iconv.h + echo > ext/iconv/php_have_libiconv.h + + case "$iconv_impl_name" in + gnu_libiconv ) + + echo "#define PHP_ICONV_IMPL \"libiconv\"" > ext/iconv/php_php_iconv_impl.h + + cat >> confdefs.h <<\EOF +#define PHP_ICONV_IMPL "libiconv" +EOF + + + echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h + + + + if test "$ext_shared" = "yes"; then + ICONV_SHARED_LIBADD="-liconv $ICONV_SHARED_LIBADD" + if test -n ""$PHP_ICONV_PREFIX/$PHP_LIBDIR""; then + + if test ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" != "/usr/$PHP_LIBDIR" && test ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" != "/usr/lib"; then + + if test -z ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" || echo ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" | grep '^/' >/dev/null ; then + ai_p="$PHP_ICONV_PREFIX/$PHP_LIBDIR" + else + + ep_dir="`echo "$PHP_ICONV_PREFIX/$PHP_LIBDIR"|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \""$PHP_ICONV_PREFIX/$PHP_LIBDIR"\"`" + fi + + + if test "$ext_shared" = "yes"; then + ICONV_SHARED_LIBADD="-L$ai_p $ICONV_SHARED_LIBADD" + test -n "$ld_runpath_switch" && ICONV_SHARED_LIBADD="$ld_runpath_switch$ai_p $ICONV_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n ""$PHP_ICONV_PREFIX/$PHP_LIBDIR""; then + + if test ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" != "/usr/$PHP_LIBDIR" && test ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" != "/usr/lib"; then + + if test -z ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" || echo ""$PHP_ICONV_PREFIX/$PHP_LIBDIR"" | grep '^/' >/dev/null ; then + ai_p="$PHP_ICONV_PREFIX/$PHP_LIBDIR" + else + + ep_dir="`echo "$PHP_ICONV_PREFIX/$PHP_LIBDIR"|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \""$PHP_ICONV_PREFIX/$PHP_LIBDIR"\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case iconv in + c|c_r|pthread*) ;; + *) + LIBS="-liconv $LIBS" + ;; + esac + + + + + fi + + + ;; + + bsd ) + + echo "#define HAVE_BSD_ICONV 1" > ext/iconv/php_have_bsd_iconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_BSD_ICONV 1 +EOF + + + echo "#define PHP_ICONV_IMPL \"BSD iconv\"" > ext/iconv/php_php_iconv_impl.h + + cat >> confdefs.h <<\EOF +#define PHP_ICONV_IMPL "BSD iconv" +EOF + + ;; + + glibc ) + + echo "#define HAVE_GLIBC_ICONV 1" > ext/iconv/php_have_glibc_iconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_GLIBC_ICONV 1 +EOF + + + echo "#define PHP_ICONV_IMPL \"glibc\"" > ext/iconv/php_php_iconv_impl.h + + cat >> confdefs.h <<\EOF +#define PHP_ICONV_IMPL "glibc" +EOF + + ;; + esac + + echo $ac_n "checking if iconv supports errno""... $ac_c" 1>&6 +echo "configure:46538: checking if iconv supports errno" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + + echo "#define ICONV_SUPPORTS_ERRNO 0" > ext/iconv/php_iconv_supports_errno.h + + cat >> confdefs.h <<\EOF +#define ICONV_SUPPORTS_ERRNO 0 +EOF + + +else + cat > conftest.$ac_ext < +#include + +int main() { + iconv_t cd; + cd = iconv_open( "*blahblah*", "*blahblah*" ); + if (cd == (iconv_t)(-1)) { + if (errno == EINVAL) { + return 0; + } else { + return 1; + } + } + iconv_close( cd ); + return 2; +} + +EOF +if { (eval echo configure:46573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + echo "$ac_t""yes" 1>&6 + + echo "#define ICONV_SUPPORTS_ERRNO 1" > ext/iconv/php_iconv_supports_errno.h + + cat >> confdefs.h <<\EOF +#define ICONV_SUPPORTS_ERRNO 1 +EOF + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo "$ac_t""no" 1>&6 + + echo "#define ICONV_SUPPORTS_ERRNO 0" > ext/iconv/php_iconv_supports_errno.h + + cat >> confdefs.h <<\EOF +#define ICONV_SUPPORTS_ERRNO 0 +EOF + + +fi +rm -fr conftest* +fi + + + echo $ac_n "checking if your cpp allows macro usage in include lines""... $ac_c" 1>&6 +echo "configure:46605: checking if your cpp allows macro usage in include lines" >&5 + cat > conftest.$ac_ext < +#include FOO + +int main() { + +; return 0; } +EOF +if { (eval echo configure:46617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 + + echo "#define PHP_ICONV_H_PATH <$PHP_ICONV_H_PATH>" > ext/iconv/php_php_iconv_h_path.h + + cat >> confdefs.h < +EOF + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -f conftest* + + + ext_builddir=ext/iconv + ext_srcdir=$abs_srcdir/ext/iconv + + ac_extra=`echo "-I\"$PHP_ICONV_PREFIX/include\""|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_ICONV_SHARED=no + + + case ext/iconv in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/iconv"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/iconv/"; ac_bdir="ext/iconv/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in iconv.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi +fi + + + + + + + + + + + + + + +php_with_imap=no + +echo $ac_n "checking for IMAP support""... $ac_c" 1>&6 +echo "configure:46962: checking for IMAP support" >&5 +# Check whether --with-imap or --without-imap was given. +if test "${with_imap+set}" = set; then + withval="$with_imap" + PHP_IMAP=$withval +else + + PHP_IMAP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_IMAP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_IMAP in +shared,*) + PHP_IMAP=`echo "$PHP_IMAP"|$SED 's/^shared,//'` + ;; +shared) + PHP_IMAP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_kerberos=no + +echo $ac_n "checking for IMAP Kerberos support""... $ac_c" 1>&6 +echo "configure:47009: checking for IMAP Kerberos support" >&5 +# Check whether --with-kerberos or --without-kerberos was given. +if test "${with_kerberos+set}" = set; then + withval="$with_kerberos" + PHP_KERBEROS=$withval +else + + PHP_KERBEROS=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_KERBEROS=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_KERBEROS +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_imap_ssl=no + +echo $ac_n "checking for IMAP SSL support""... $ac_c" 1>&6 +echo "configure:47035: checking for IMAP SSL support" >&5 +# Check whether --with-imap-ssl or --without-imap-ssl was given. +if test "${with_imap_ssl+set}" = set; then + withval="$with_imap_ssl" + PHP_IMAP_SSL=$withval +else + + PHP_IMAP_SSL=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_IMAP_SSL=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_IMAP_SSL +echo "$ac_t""$ext_output" 1>&6 + + + + + +if test "$PHP_IMAP" != "no"; then + + PHP_VAR_SUBST="$PHP_VAR_SUBST IMAP_SHARED_LIBADD" + + + ext_builddir=ext/imap + ext_srcdir=$abs_srcdir/ext/imap + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_IMAP_SHARED=no + + + case ext/imap in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/imap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/imap/"; ac_bdir="ext/imap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_imap.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_IMAP 1 +EOF + + + for i in $PHP_IMAP /usr/local /usr; do + if test -r "$i/c-client.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2000 1 +EOF + + IMAP_DIR=$i + IMAP_INC_DIR=$i + break + elif test -r "$i/rfc822.h"; then + IMAP_DIR=$i; + IMAP_INC_DIR=$i + break + + elif test -r "$i/include/c-client/c-client.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2000 1 +EOF + + IMAP_DIR=$i + IMAP_INC_DIR=$i/include/c-client + break + elif test -r "$i/include/c-client/rfc822.h"; then + IMAP_DIR=$i; + IMAP_INC_DIR=$i/include/c-client + break + + elif test -r "$i/include/imap/c-client.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2000 1 +EOF + + IMAP_DIR=$i + IMAP_INC_DIR=$i/include/imap + break + elif test -r "$i/include/imap/rfc822.h"; then + IMAP_DIR=$i; + IMAP_INC_DIR=$i/include/imap + break + + elif test -r "$i/include/c-client.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2000 1 +EOF + + IMAP_DIR=$i + IMAP_INC_DIR=$i/include + break + elif test -r "$i/include/rfc822.h"; then + IMAP_DIR=$i; + IMAP_INC_DIR=$i/include + break + + elif test -r "$i/imap/c-client.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2000 1 +EOF + + IMAP_DIR=$i + IMAP_INC_DIR=$i/imap + break + elif test -r "$i/imap/rfc822.h"; then + IMAP_DIR=$i; + IMAP_INC_DIR=$i/imap + break + + elif test -r "$i/c-client/c-client.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2000 1 +EOF + + IMAP_DIR=$i + IMAP_INC_DIR=$i/c-client + break + elif test -r "$i/c-client/rfc822.h"; then + IMAP_DIR=$i; + IMAP_INC_DIR=$i/c-client + break + + fi + done + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mail_fetch_overview_sequence" >/dev/null 2>&1; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2004 1 +EOF + + +fi +rm -f conftest* + + + old_CFLAGS=$CFLAGS + CFLAGS="-I$IMAP_INC_DIR" + echo $ac_n "checking for utf8_mime2text signature""... $ac_c" 1>&6 +echo "configure:47451: checking for utf8_mime2text signature" >&5 +if eval "test \"`echo '$''{'ac_cv_utf8_mime2text'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include + +int main() { + + SIZEDTEXT *src, *dst; + utf8_mime2text(src, dst); + +; return 0; } +EOF +if { (eval echo configure:47469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_utf8_mime2text=old + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_utf8_mime2text=new + +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_utf8_mime2text" 1>&6 + if test "$ac_cv_utf8_mime2text" = "new"; then + cat >> confdefs.h <<\EOF +#define HAVE_NEW_MIME2TEXT 1 +EOF + + fi + CFLAGS=$old_CFLAGS + + old_CFLAGS=$CFLAGS + CFLAGS="-I$IMAP_INC_DIR" + echo $ac_n "checking for U8T_CANONICAL""... $ac_c" 1>&6 +echo "configure:47498: checking for U8T_CANONICAL" >&5 +if eval "test \"`echo '$''{'ac_cv_u8t_canonical'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + +int main() { + + int i = U8T_CANONICAL; + +; return 0; } +EOF +if { (eval echo configure:47514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_u8t_canonical=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_u8t_canonical=no + +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_u8t_canonical" 1>&6 + CFLAGS=$old_CFLAGS + + if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then + { echo "configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." 1>&2; exit 1; } + fi + if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then + { echo "configure: error: utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." 1>&2; exit 1; } + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$IMAP_INC_DIR + cat > conftest.$ac_ext <&5 | + egrep "this_is_true" >/dev/null 2>&1; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define HAVE_IMAP2001 1 +EOF + + +fi +rm -f conftest* + + CPPFLAGS=$old_CPPFLAGS + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6 +echo "configure:47663: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case pam in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-lpam $IMAP_SHARED_LIBADD" + else + + + case pam in + c|c_r|pthread*) ;; + *) + LIBS="-lpam $LIBS" + ;; + esac + + + fi + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBPAM 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_pam_pam_start + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:47837: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case crypt in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-lcrypt $IMAP_SHARED_LIBADD" + else + + + case crypt in + c|c_r|pthread*) ;; + *) + LIBS="-lcrypt $LIBS" + ;; + esac + + + fi + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBCRYPT 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_crypt_crypt + + +fi + + + + if test -z "$IMAP_DIR" || echo "$IMAP_DIR" | grep '^/' >/dev/null ; then + IMAP_DIR=$IMAP_DIR + else + + ep_dir="`echo $IMAP_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + IMAP_DIR="$ep_realdir/`basename \"$IMAP_DIR\"`" + fi + + + if test -z "$IMAP_DIR"; then + { echo "configure: error: Cannot find rfc822.h. Please check your c-client installation." 1>&2; exit 1; } + fi + + if test -r "$IMAP_DIR/c-client/c-client.a"; then + ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 + elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then + ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 + fi + + for lib in c-client4 c-client imap; do + IMAP_LIB=$lib + + str="$IMAP_DIR/$PHP_LIBDIR/lib$lib.*" + for i in `echo $str`; do + test -r $i && IMAP_LIBDIR=$IMAP_DIR/$PHP_LIBDIR && break 2 + done + + + str="$IMAP_DIR/c-client/lib$lib.*" + for i in `echo $str`; do + test -r $i && IMAP_LIBDIR=$IMAP_DIR/c-client && break 2 + done + + done + + if test -z "$IMAP_LIBDIR"; then + { echo "configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation." 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 + + ep_dir="`echo $IMAP_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$IMAP_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + case $IMAP_LIB in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-l$IMAP_LIB $IMAP_SHARED_LIBADD" + else + + + case $IMAP_LIB in + c|c_r|pthread*) ;; + *) + DLIBS="-l$IMAP_LIB $DLIBS" + ;; + esac + + + fi + ;; + esac + + + + if test "$IMAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$IMAP_LIBDIR" != "/usr/lib"; then + + if test -z "$IMAP_LIBDIR" || echo "$IMAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$IMAP_LIBDIR + else + + ep_dir="`echo $IMAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$IMAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-L$ai_p $IMAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && IMAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $IMAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + + if test "$PHP_KERBEROS" != "no"; then + + found_kerberos=no + unset KERBEROS_CFLAGS + unset KERBEROS_LIBS + + if test -z "$KRB5_CONFIG"; then + # Extract the first word of "krb5-config", so it can be a program name with args. +set dummy krb5-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:48060: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$KRB5_CONFIG" in + /*) + ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/usr/kerberos/bin:/usr/local/bin" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_KRB5_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_KRB5_CONFIG" && ac_cv_path_KRB5_CONFIG="no" + ;; +esac +fi +KRB5_CONFIG="$ac_cv_path_KRB5_CONFIG" +if test -n "$KRB5_CONFIG"; then + echo "$ac_t""$KRB5_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then + KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi` + KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi` + + if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then + found_kerberos=yes + + for ac_i in $KERBEROS_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-L$ai_p $IMAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && IMAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $IMAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $KERBEROS_CFLAGS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + fi + fi + + if test "$found_kerberos" = "no"; then + + if test "$PHP_KERBEROS" = "yes"; then + PHP_KERBEROS="/usr/kerberos /usr/local /usr" + fi + + for i in $PHP_KERBEROS; do + if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then + PHP_KERBEROS_DIR=$i + break + fi + done + + if test "$PHP_KERBEROS_DIR"; then + found_kerberos=yes + + if test "$PHP_KERBEROS_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_KERBEROS_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_KERBEROS_DIR/$PHP_LIBDIR" || echo "$PHP_KERBEROS_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_KERBEROS_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_KERBEROS_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_KERBEROS_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-L$ai_p $IMAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && IMAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $IMAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + + + case gssapi_krb5 in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lgssapi_krb5" + else + + + case gssapi_krb5 in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lgssapi_krb5" + ;; + esac + + + fi + ;; + esac + + + + + case krb5 in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lkrb5" + else + + + case krb5 in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lkrb5" + ;; + esac + + + fi + ;; + esac + + + + + case k5crypto in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lk5crypto" + else + + + case k5crypto in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lk5crypto" + ;; + esac + + + fi + ;; + esac + + + + + case com_err in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lcom_err" + else + + + case com_err in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lcom_err" + ;; + esac + + + fi + ;; + esac + + + + if test "$PHP_KERBEROS_DIR/include" != "/usr/include"; then + + if test -z "$PHP_KERBEROS_DIR/include" || echo "$PHP_KERBEROS_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$PHP_KERBEROS_DIR/include + else + + ep_dir="`echo $PHP_KERBEROS_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_KERBEROS_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + fi + fi + + if test "$found_kerberos" = "yes"; then + + cat >> confdefs.h <<\EOF +#define HAVE_IMAP_KRB 1 +EOF + + +else + { echo "configure: error: Kerberos libraries not found. + + Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr ) + " 1>&2; exit 1; } + + fi + + else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "auth_gss" >/dev/null 2>&1; then + rm -rf conftest* + + { echo "configure: error: This c-client library is built with Kerberos support. + + Add --with-kerberos to your configure line. Check config.log for details. + " 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + + + if test "$PHP_IMAP_SSL" != "no"; then + if test "$PHP_OPENSSL" = ""; then + PHP_OPENSSL='no' + fi + + found_openssl=no + unset OPENSSL_INCDIR + unset OPENSSL_LIBDIR + + test -z "$PHP_OPENSSL" && PHP_OPENSSL=no + test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no + + if test "$PHP_OPENSSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_OPENSSL + elif test "$PHP_IMAP_SSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_IMAP_SSL + fi + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:48470: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then + if $PKG_CONFIG --atleast-version=0.9.6 openssl; then + found_openssl=yes + OPENSSL_LIBS=`$PKG_CONFIG --libs openssl` + OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl` + OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl` + else + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + fi + + if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then + + for ac_i in $OPENSSL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-L$ai_p $IMAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && IMAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $IMAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $OPENSSL_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + fi + fi + + if test "$found_openssl" = "no"; then + + if test "$PHP_OPENSSL_DIR" = "yes"; then + PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" + fi + + for i in $PHP_OPENSSL_DIR; do + if test -r $i/include/openssl/evp.h; then + OPENSSL_INCDIR=$i/include + fi + if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then + OPENSSL_LIBDIR=$i/$PHP_LIBDIR + fi + test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break + done + + if test -z "$OPENSSL_INCDIR"; then + { echo "configure: error: Cannot find OpenSSL's " 1>&2; exit 1; } + fi + + if test -z "$OPENSSL_LIBDIR"; then + { echo "configure: error: Cannot find OpenSSL's libraries" 1>&2; exit 1; } + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +echo "configure:48675: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +#if OPENSSL_VERSION_NUMBER >= 0x0090600fL + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t"">= 0.9.6" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + +fi +rm -f conftest* + + CPPFLAGS=$old_CPPFLAGS + + + if test "$OPENSSL_INCDIR" != "/usr/include"; then + + if test -z "$OPENSSL_INCDIR" || echo "$OPENSSL_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_INCDIR + else + + ep_dir="`echo $OPENSSL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +echo "configure:48832: checking for CRYPTO_free in -lcrypto" >&5 +ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypto $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case crypto in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-lcrypto $IMAP_SHARED_LIBADD" + else + + + case crypto in + c|c_r|pthread*) ;; + *) + LIBS="-lcrypto $LIBS" + ;; + esac + + + fi + ;; + esac + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_crypto_CRYPTO_free + + { echo "configure: error: libcrypto not found!" 1>&2; exit 1; } + + +fi + + + old_LIBS=$LIBS + LIBS="$LIBS -lcrypto" + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +echo "configure:49008: checking for SSL_CTX_set_ssl_version in -lssl" >&5 +ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lssl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_openssl=yes + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version + + { echo "configure: error: libssl not found!" 1>&2; exit 1; } + + +fi + + LIBS=$old_LIBS + + + case ssl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-lssl $IMAP_SHARED_LIBADD" + else + + + case ssl in + c|c_r|pthread*) ;; + *) + LIBS="-lssl $LIBS" + ;; + esac + + + fi + ;; + esac + + + + + if test "$OPENSSL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$OPENSSL_LIBDIR" != "/usr/lib"; then + + if test -z "$OPENSSL_LIBDIR" || echo "$OPENSSL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_LIBDIR + else + + ep_dir="`echo $OPENSSL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + IMAP_SHARED_LIBADD="-L$ai_p $IMAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && IMAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $IMAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + + if test "$found_openssl" = "yes"; then + OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR + + + + cat >> confdefs.h <<\EOF +#define HAVE_IMAP_SSL 1 +EOF + + +else + { echo "configure: error: OpenSSL libraries not found. + + Check the path given to --with-openssl-dir and output in config.log) + " 1>&2; exit 1; } + + fi + + elif test -f "$IMAP_INC_DIR/linkage.c"; then + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "ssl_onceonlyinit" >/dev/null 2>&1; then + rm -rf conftest* + + { echo "configure: error: This c-client library is built with SSL support. + + Add --with-imap-ssl to your configure line. Check config.log for details. + " 1>&2; exit 1; } + +fi +rm -f conftest* + + fi + + + TST_LIBS="$DLIBS $IMAP_SHARED_LIBADD" + + + + old_LIBS=$LIBS + LIBS="$TST_LIBS $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + cat >> confdefs.h <<\EOF +#define HAVE_IMAP_AUTH_GSS 1 +EOF + + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + +fi +rm -fr conftest* +fi + + + + + echo $ac_n "checking whether build with IMAP works""... $ac_c" 1>&6 +echo "configure:49231: checking whether build with IMAP works" >&5 + + + old_LIBS=$LIBS + LIBS="$TST_LIBS $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + echo "$ac_t""yes" 1>&6 + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + + + +php_with_interbase=no + +echo $ac_n "checking for InterBase support""... $ac_c" 1>&6 +echo "configure:49301: checking for InterBase support" >&5 +# Check whether --with-interbase or --without-interbase was given. +if test "${with_interbase+set}" = set; then + withval="$with_interbase" + PHP_INTERBASE=$withval +else + + PHP_INTERBASE=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_INTERBASE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_INTERBASE in +shared,*) + PHP_INTERBASE=`echo "$PHP_INTERBASE"|$SED 's/^shared,//'` + ;; +shared) + PHP_INTERBASE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_INTERBASE" != "no"; then + if test "$PHP_INTERBASE" = "yes"; then + IBASE_INCDIR=/usr/interbase/include + IBASE_LIBDIR=/usr/interbase/lib + else + IBASE_INCDIR=$PHP_INTERBASE/include + IBASE_LIBDIR=$PHP_INTERBASE/$PHP_LIBDIR + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$IBASE_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6 +echo "configure:49451: checking for isc_detach_database in -lfbclient" >&5 +ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lfbclient $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + IBASE_LIBNAME=fbclient + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_fbclient_isc_detach_database + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$IBASE_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6 +echo "configure:49597: checking for isc_detach_database in -lgds" >&5 +ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgds $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + IBASE_LIBNAME=gds + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gds_isc_detach_database + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$IBASE_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6 +echo "configure:49743: checking for isc_detach_database in -lib_util" >&5 +ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lib_util $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + IBASE_LIBNAME=ib_util + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ib_util_isc_detach_database + + { echo "configure: error: libgds, libib_util or libfbclient not found! Check config.log for more information." 1>&2; exit 1; } + + +fi + + + +fi + + + +fi + + + + + if test "$ext_shared" = "yes"; then + INTERBASE_SHARED_LIBADD="-l$IBASE_LIBNAME $INTERBASE_SHARED_LIBADD" + if test -n "$IBASE_LIBDIR"; then + + if test "$IBASE_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$IBASE_LIBDIR" != "/usr/lib"; then + + if test -z "$IBASE_LIBDIR" || echo "$IBASE_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$IBASE_LIBDIR + else + + ep_dir="`echo $IBASE_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$IBASE_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + INTERBASE_SHARED_LIBADD="-L$ai_p $INTERBASE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && INTERBASE_SHARED_LIBADD="$ld_runpath_switch$ai_p $INTERBASE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$IBASE_LIBDIR"; then + + if test "$IBASE_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$IBASE_LIBDIR" != "/usr/lib"; then + + if test -z "$IBASE_LIBDIR" || echo "$IBASE_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$IBASE_LIBDIR + else + + ep_dir="`echo $IBASE_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$IBASE_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $IBASE_LIBNAME in + c|c_r|pthread*) ;; + *) + LIBS="-l$IBASE_LIBNAME $LIBS" + ;; + esac + + + + + fi + + + + if test "$IBASE_INCDIR" != "/usr/include"; then + + if test -z "$IBASE_INCDIR" || echo "$IBASE_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$IBASE_INCDIR + else + + ep_dir="`echo $IBASE_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$IBASE_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_IBASE 1 +EOF + + + ext_builddir=ext/interbase + ext_srcdir=$abs_srcdir/ext/interbase + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_INTERBASE_SHARED=no + + + case ext/interbase in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/interbase"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/interbase/"; ac_bdir="ext/interbase/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:50228: checking whether to enable JavaScript Object Serialization support" >&5 +# Check whether --enable-json or --disable-json was given. +if test "${enable_json+set}" = set; then + enableval="$enable_json" + PHP_JSON=$enableval +else + + PHP_JSON=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_JSON=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_JSON in +shared,*) + PHP_JSON=`echo "$PHP_JSON"|$SED 's/^shared,//'` + ;; +shared) + PHP_JSON=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_JSON" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_JSON 1 +EOF + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:50277: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:50290: \"$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 +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 +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 < +#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:50357: \"$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 + + + + ext_builddir=ext/json + ext_srcdir=$abs_srcdir/ext/json + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_JSON_SHARED=no + + + case ext/json in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/json"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/json/"; ac_bdir="ext/json/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in json.c utf8_to_utf16.c utf8_decode.c JSON_parser.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:50676: checking for LDAP support" >&5 +# Check whether --with-ldap or --without-ldap was given. +if test "${with_ldap+set}" = set; then + withval="$with_ldap" + PHP_LDAP=$withval +else + + PHP_LDAP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_LDAP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_LDAP in +shared,*) + PHP_LDAP=`echo "$PHP_LDAP"|$SED 's/^shared,//'` + ;; +shared) + PHP_LDAP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_ldap_sasl=no + +echo $ac_n "checking for LDAP Cyrus SASL support""... $ac_c" 1>&6 +echo "configure:50723: checking for LDAP Cyrus SASL support" >&5 +# Check whether --with-ldap-sasl or --without-ldap-sasl was given. +if test "${with_ldap_sasl+set}" = set; then + withval="$with_ldap_sasl" + PHP_LDAP_SASL=$withval +else + + PHP_LDAP_SASL=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LDAP_SASL=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LDAP_SASL +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_LDAP" != "no"; then + + + ext_builddir=ext/ldap + ext_srcdir=$abs_srcdir/ext/ldap + + ac_extra=`echo "-DLDAP_DEPRECATED=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_LDAP_SHARED=no + + + case ext/ldap in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/ldap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/ldap/"; ac_bdir="ext/ldap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in ldap.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + + + if test `uname` = "Linux"; then + LDAP_PTHREAD=pthread + else + LDAP_PTHREAD= + fi + + if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-llber $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case lber in + c|c_r|pthread*) ;; + *) + LIBS="-llber $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lldap $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ldap in + c|c_r|pthread*) ;; + *) + LIBS="-lldap $LIBS" + ;; + esac + + + + + fi + + + + elif test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME.3 || test -f $LDAP_LIBDIR/libldap.3.dylib; then + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lldap $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ldap in + c|c_r|pthread*) ;; + *) + LIBS="-lldap $LIBS" + ;; + esac + + + + + fi + + + + elif test -f $LDAP_LIBDIR/libssldap50.$SHLIB_SUFFIX_NAME; then + if test -n "$LDAP_PTHREAD"; then + + + case $LDAP_PTHREAD in + c|c_r|pthread*) ;; + *) + LIBS="-l$LDAP_PTHREAD $LIBS" + ;; + esac + + + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lnspr4 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case nspr4 in + c|c_r|pthread*) ;; + *) + LIBS="-lnspr4 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lplc4 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case plc4 in + c|c_r|pthread*) ;; + *) + LIBS="-lplc4 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lplds4 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case plds4 in + c|c_r|pthread*) ;; + *) + LIBS="-lplds4 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lssldap50 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ssldap50 in + c|c_r|pthread*) ;; + *) + LIBS="-lssldap50 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lldap50 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ldap50 in + c|c_r|pthread*) ;; + *) + LIBS="-lldap50 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lprldap50 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case prldap50 in + c|c_r|pthread*) ;; + *) + LIBS="-lprldap50 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lssl3 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ssl3 in + c|c_r|pthread*) ;; + *) + LIBS="-lssl3 $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_NSLDAP 1 +EOF + + + elif test -f $LDAP_LIBDIR/libldapssl41.$SHLIB_SUFFIX_NAME; then + if test -n "$LDAP_PTHREAD"; then + + + case $LDAP_PTHREAD in + c|c_r|pthread*) ;; + *) + LIBS="-l$LDAP_PTHREAD $LIBS" + ;; + esac + + + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lnspr3 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case nspr3 in + c|c_r|pthread*) ;; + *) + LIBS="-lnspr3 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lplc3 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case plc3 in + c|c_r|pthread*) ;; + *) + LIBS="-lplc3 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lplds3 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case plds3 in + c|c_r|pthread*) ;; + *) + LIBS="-lplds3 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lldapssl41 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ldapssl41 in + c|c_r|pthread*) ;; + *) + LIBS="-lldapssl41 $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_NSLDAP 1 +EOF + + + elif test -f $LDAP_LIBDIR/libldapssl30.$SHLIB_SUFFIX_NAME; then + if test -n "$LDAP_PTHREAD"; then + + + case $LDAP_PTHREAD in + c|c_r|pthread*) ;; + *) + LIBS="-l$LDAP_PTHREAD $LIBS" + ;; + esac + + + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lldapssl30 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ldapssl30 in + c|c_r|pthread*) ;; + *) + LIBS="-lldapssl30 $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_NSLDAP 1 +EOF + + + elif test -f $LDAP_LIBDIR/libldap30.$SHLIB_SUFFIX_NAME; then + if test -n "$LDAP_PTHREAD"; then + + + case $LDAP_PTHREAD in + c|c_r|pthread*) ;; + *) + LIBS="-l$LDAP_PTHREAD $LIBS" + ;; + esac + + + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lldap30 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ldap30 in + c|c_r|pthread*) ;; + *) + LIBS="-lldap30 $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_NSLDAP 1 +EOF + + + elif test -f $LDAP_LIBDIR/libumich_ldap.$SHLIB_SUFFIX_NAME; then + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lumich_lber $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case umich_lber in + c|c_r|pthread*) ;; + *) + LIBS="-lumich_lber $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lumich_ldap $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case umich_ldap in + c|c_r|pthread*) ;; + *) + LIBS="-lumich_ldap $LIBS" + ;; + esac + + + + + fi + + + + elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME; then + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lclntsh $LDAP_SHARED_LIBADD" + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_LIBDIR"; then + + if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_LIBDIR + else + + ep_dir="`echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="-lclntsh $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_ORALDAP 1 +EOF + + if test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then + cat >> confdefs.h <<\EOF +#define HAVE_ORALDAP_10 1 +EOF + + fi + else + { echo "configure: error: Cannot find ldap libraries in $LDAP_LIBDIR." 1>&2; exit 1; } + 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 + + ep_dir="`echo $LDAP_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST LDAP_SHARED_LIBADD" + + cat >> confdefs.h <<\EOF +#define HAVE_LDAP 1 +EOF + + + _SAVE_CPPFLAGS=$CPPFLAGS + _SAVE_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS -I$LDAP_INCDIR" + LIBS="$LIBS $LDAP_SHARED_LIBADD" + + echo $ac_n "checking for 3 arg ldap_set_rebind_proc""... $ac_c" 1>&6 +echo "configure:53057: checking for 3 arg ldap_set_rebind_proc" >&5 +if eval "test \"`echo '$''{'ac_cv_3arg_setrebindproc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +ldap_set_rebind_proc(0,0,0) +; return 0; } +EOF +if { (eval echo configure:53069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_3arg_setrebindproc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_3arg_setrebindproc=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_3arg_setrebindproc" 1>&6 + if test "$ac_cv_3arg_setrebindproc" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_3ARG_SETREBINDPROC 1 +EOF + + fi + + for ac_func in ldap_parse_result ldap_parse_reference ldap_start_tls_s +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:53092: 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 < +/* Override any gcc2 internal prototype to avoid an 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:53120: \"$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 <&6 +fi +done + + + if test "$PHP_LDAP_SASL" != "no"; then + + if test "$PHP_LDAP_SASL" = "yes"; then + SEARCH_DIRS="/usr/local /usr" + else + SEARCH_DIRS=$PHP_LDAP_SASL + fi + + for i in $SEARCH_DIRS; do + if test -f $i/include/sasl/sasl.h; then + LDAP_SASL_DIR=$i + cat >> confdefs.h <<\EOF +#define HAVE_LDAP_SASL_SASL_H 1 +EOF + + break + elif test -f $i/include/sasl.h; then + LDAP_SASL_DIR=$i + cat >> confdefs.h <<\EOF +#define HAVE_LDAP_SASL_H 1 +EOF + + break + fi + done + + if test "$LDAP_SASL_DIR"; then + LDAP_SASL_INCDIR=$LDAP_SASL_DIR/include + LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/$PHP_LIBDIR + else + { echo "configure: error: sasl.h not found!" 1>&2; exit 1; } + fi + + if test "$PHP_LDAP_SASL" = "yes"; then + SASL_LIB="-lsasl2" + else + SASL_LIB="-L$LDAP_SASL_LIBDIR -lsasl2" + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $LDAP_SHARED_LIBADD $SASL_LIB + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for sasl_version in -lldap""... $ac_c" 1>&6 +echo "configure:53282: checking for sasl_version in -lldap" >&5 +ac_lib_var=`echo ldap'_'sasl_version | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lldap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + if test "$LDAP_SASL_INCDIR" != "/usr/include"; then + + if test -z "$LDAP_SASL_INCDIR" || echo "$LDAP_SASL_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_SASL_INCDIR + else + + ep_dir="`echo $LDAP_SASL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_SASL_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-lsasl2 $LDAP_SHARED_LIBADD" + if test -n "$LDAP_SASL_LIBDIR"; then + + if test "$LDAP_SASL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_SASL_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_SASL_LIBDIR" || echo "$LDAP_SASL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_SASL_LIBDIR + else + + ep_dir="`echo $LDAP_SASL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_SASL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LDAP_SASL_LIBDIR"; then + + if test "$LDAP_SASL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_SASL_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_SASL_LIBDIR" || echo "$LDAP_SASL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LDAP_SASL_LIBDIR + else + + ep_dir="`echo $LDAP_SASL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LDAP_SASL_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case sasl2 in + c|c_r|pthread*) ;; + *) + LIBS="-lsasl2 $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LDAP_SASL 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ldap_sasl_version + + { echo "configure: error: LDAP SASL check failed. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + + fi + + echo $ac_n "checking for ldap_bind_s""... $ac_c" 1>&6 +echo "configure:53470: checking for ldap_bind_s" >&5 +if eval "test \"`echo '$''{'ac_cv_func_ldap_bind_s'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char ldap_bind_s(); + +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_ldap_bind_s) || defined (__stub___ldap_bind_s) +choke me +#else +ldap_bind_s(); +#endif + +; return 0; } +EOF +if { (eval echo configure:53498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_ldap_bind_s=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_ldap_bind_s=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'ldap_bind_s`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 + + { echo "configure: error: LDAP build check failed. Please check config.log for more information." 1>&2; exit 1; } + +fi + + + CPPFLAGS=$_SAVE_CPPFLAGS + LIBS=$_SAVE_LIBS +fi + + + + + + + + + + + + + + + + + + + + + + +php_enable_mbstring=no + +echo $ac_n "checking whether to enable multibyte string support""... $ac_c" 1>&6 +echo "configure:53549: checking whether to enable multibyte string support" >&5 +# Check whether --enable-mbstring or --disable-mbstring was given. +if test "${enable_mbstring+set}" = set; then + enableval="$enable_mbstring" + PHP_MBSTRING=$enableval +else + + PHP_MBSTRING=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MBSTRING=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MBSTRING in +shared,*) + PHP_MBSTRING=`echo "$PHP_MBSTRING"|$SED 's/^shared,//'` + ;; +shared) + PHP_MBSTRING=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_mbregex=yes + +echo $ac_n "checking whether to enable multibyte regex support""... $ac_c" 1>&6 +echo "configure:53596: checking whether to enable multibyte regex support" >&5 +# Check whether --enable-mbregex or --disable-mbregex was given. +if test "${enable_mbregex+set}" = set; then + enableval="$enable_mbregex" + PHP_MBREGEX=$enableval +else + + PHP_MBREGEX=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MBREGEX=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MBREGEX +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_mbregex_backtrack=yes + +echo $ac_n "checking whether to check multibyte regex backtrack""... $ac_c" 1>&6 +echo "configure:53622: checking whether to check multibyte regex backtrack" >&5 +# Check whether --enable-mbregex_backtrack or --disable-mbregex_backtrack was given. +if test "${enable_mbregex_backtrack+set}" = set; then + enableval="$enable_mbregex_backtrack" + PHP_MBREGEX_BACKTRACK=$enableval +else + + PHP_MBREGEX_BACKTRACK=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MBREGEX_BACKTRACK=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MBREGEX_BACKTRACK +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_libmbfl=no + +echo $ac_n "checking for external libmbfl""... $ac_c" 1>&6 +echo "configure:53648: checking for external libmbfl" >&5 +# Check whether --with-libmbfl or --without-libmbfl was given. +if test "${with_libmbfl+set}" = set; then + withval="$with_libmbfl" + PHP_LIBMBFL=$withval +else + + PHP_LIBMBFL=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBMBFL=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBMBFL +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MBSTRING" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_MBSTRING 1 +EOF + + + + PHP_MBSTRING_BASE_SOURCES="$PHP_MBSTRING_BASE_SOURCES mbstring.c php_unicode.c mb_gpc.c" + + + if test "$PHP_MBREGEX" != "no"; then + + if test "$PHP_MBREGEX" = "yes"; then + echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 +echo "configure:53684: checking for variable length prototypes and stdarg.h" >&5 +if eval "test \"`echo '$''{'cv_php_mbstring_stdarg'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + + case $host_alias in +*netware*) +cv_php_mbstring_stdarg=yes +;; +*) +cv_php_mbstring_stdarg=no +;; +esac + + +else + cat > conftest.$ac_ext < +int foo(int x, ...) { + va_list va; + va_start(va, x); + va_arg(va, int); + va_arg(va, char *); + va_arg(va, double); + return 0; +} +int main() { return foo(10, "", 3.14); } + +EOF +if { (eval echo configure:53718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + cv_php_mbstring_stdarg=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + cv_php_mbstring_stdarg=no +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$cv_php_mbstring_stdarg" 1>&6 + + for ac_hdr in stdlib.h string.h strings.h unistd.h sys/time.h sys/times.h stdarg.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:53739: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:53749: \"$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 <&6 +fi +done + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +echo "configure:53776: 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 < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(int)); + return(0); +} +EOF +if { (eval echo configure:53795: \"$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 <&6 +echo "configure:53815: checking size of short" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_short=2 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(short)); + return(0); +} +EOF +if { (eval echo configure:53834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_short=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_short=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_short" 1>&6 +cat >> confdefs.h <&6 +echo "configure:53854: checking size of long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long=4 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long)); + return(0); +} +EOF +if { (eval echo configure:53873: \"$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 <&6 +echo "configure:53893: 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 <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:53947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:53968: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:53982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:54005: 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 < +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:54017: \"$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:54038: 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 < +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# 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:54071: \"$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:54103: 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 <&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:54133: 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 < +/* Override any gcc2 internal prototype to avoid an 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:54161: \"$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 <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:54188: 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 < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:54215: \"$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 <&6 +echo "configure:54237: checking for 8-bit clean memcmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_clean=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_memcmp_clean=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + + + cat >> confdefs.h <<\EOF +#define HAVE_MBREGEX 1 +EOF + + + + if test "$PHP_MBREGEX_BACKTRACK" != "no"; then + cat >> confdefs.h <<\EOF +#define USE_COMBINATION_EXPLOSION_CHECK 1 +EOF + + fi + + + PHP_MBSTRING_CFLAGS="$PHP_MBSTRING_CFLAGS -DNOT_RUBY" + + + PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS oniguruma" + + + PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS oniguruma/enc" + + + PHP_MBSTRING_EXTRA_INCLUDES="$PHP_MBSTRING_EXTRA_INCLUDES oniguruma" + + + PHP_MBSTRING_EXTRA_CONFIG_HEADERS="$PHP_MBSTRING_EXTRA_CONFIG_HEADERS oniguruma/config.h" + + + + PHP_MBSTRING_BASE_SOURCES="$PHP_MBSTRING_BASE_SOURCES php_mbregex.c" + + + PHP_MBSTRING_SOURCES="$PHP_MBSTRING_SOURCES + oniguruma/regcomp.c + oniguruma/regerror.c + oniguruma/regexec.c + oniguruma/reggnu.c + oniguruma/regparse.c + oniguruma/regenc.c + oniguruma/regext.c + oniguruma/regsyntax.c + oniguruma/regtrav.c + oniguruma/regversion.c + oniguruma/st.c + oniguruma/enc/unicode.c + oniguruma/enc/ascii.c + oniguruma/enc/utf8.c + oniguruma/enc/euc_jp.c + oniguruma/enc/euc_tw.c + oniguruma/enc/euc_kr.c + oniguruma/enc/sjis.c + oniguruma/enc/iso8859_1.c + oniguruma/enc/iso8859_2.c + oniguruma/enc/iso8859_3.c + oniguruma/enc/iso8859_4.c + oniguruma/enc/iso8859_5.c + oniguruma/enc/iso8859_6.c + oniguruma/enc/iso8859_7.c + oniguruma/enc/iso8859_8.c + oniguruma/enc/iso8859_9.c + oniguruma/enc/iso8859_10.c + oniguruma/enc/iso8859_11.c + oniguruma/enc/iso8859_13.c + oniguruma/enc/iso8859_14.c + oniguruma/enc/iso8859_15.c + oniguruma/enc/iso8859_16.c + oniguruma/enc/koi8.c + oniguruma/enc/koi8_r.c + oniguruma/enc/big5.c + oniguruma/enc/utf16_be.c + oniguruma/enc/utf16_le.c + oniguruma/enc/utf32_be.c + oniguruma/enc/utf32_le.c + oniguruma/enc/gb18030.c + " + + fi + + fi + + + if test "$PHP_LIBMBFL" = "yes" || test "$PHP_LIBMBFL" = "no"; then + + PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl" + + + PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl/mbfl" + + + PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl/filters" + + + PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl/nls" + + + PHP_MBSTRING_EXTRA_INCLUDES="$PHP_MBSTRING_EXTRA_INCLUDES libmbfl" + + + PHP_MBSTRING_EXTRA_INCLUDES="$PHP_MBSTRING_EXTRA_INCLUDES libmbfl/mbfl" + + + PHP_MBSTRING_EXTRA_CONFIG_HEADERS="$PHP_MBSTRING_EXTRA_CONFIG_HEADERS libmbfl/config.h" + + + + PHP_MBSTRING_SOURCES="$PHP_MBSTRING_SOURCES + libmbfl/filters/html_entities.c + libmbfl/filters/mbfilter_7bit.c + libmbfl/filters/mbfilter_ascii.c + libmbfl/filters/mbfilter_base64.c + libmbfl/filters/mbfilter_big5.c + libmbfl/filters/mbfilter_byte2.c + libmbfl/filters/mbfilter_byte4.c + libmbfl/filters/mbfilter_cp1251.c + libmbfl/filters/mbfilter_cp1252.c + libmbfl/filters/mbfilter_cp866.c + libmbfl/filters/mbfilter_cp932.c + libmbfl/filters/mbfilter_cp936.c + libmbfl/filters/mbfilter_euc_cn.c + libmbfl/filters/mbfilter_euc_jp.c + libmbfl/filters/mbfilter_euc_jp_win.c + libmbfl/filters/mbfilter_cp51932.c + libmbfl/filters/mbfilter_euc_kr.c + libmbfl/filters/mbfilter_euc_tw.c + libmbfl/filters/mbfilter_htmlent.c + libmbfl/filters/mbfilter_hz.c + libmbfl/filters/mbfilter_iso2022_kr.c + libmbfl/filters/mbfilter_iso8859_1.c + libmbfl/filters/mbfilter_iso8859_10.c + libmbfl/filters/mbfilter_iso8859_13.c + libmbfl/filters/mbfilter_iso8859_14.c + libmbfl/filters/mbfilter_iso8859_15.c + libmbfl/filters/mbfilter_iso8859_16.c + libmbfl/filters/mbfilter_iso8859_2.c + libmbfl/filters/mbfilter_iso8859_3.c + libmbfl/filters/mbfilter_iso8859_4.c + libmbfl/filters/mbfilter_iso8859_5.c + libmbfl/filters/mbfilter_iso8859_6.c + libmbfl/filters/mbfilter_iso8859_7.c + libmbfl/filters/mbfilter_iso8859_8.c + libmbfl/filters/mbfilter_iso8859_9.c + libmbfl/filters/mbfilter_jis.c + libmbfl/filters/mbfilter_iso2022_jp_ms.c + libmbfl/filters/mbfilter_koi8r.c + libmbfl/filters/mbfilter_armscii8.c + libmbfl/filters/mbfilter_qprint.c + libmbfl/filters/mbfilter_sjis.c + libmbfl/filters/mbfilter_ucs2.c + libmbfl/filters/mbfilter_ucs4.c + libmbfl/filters/mbfilter_uhc.c + libmbfl/filters/mbfilter_utf16.c + libmbfl/filters/mbfilter_utf32.c + libmbfl/filters/mbfilter_utf7.c + libmbfl/filters/mbfilter_utf7imap.c + libmbfl/filters/mbfilter_utf8.c + libmbfl/filters/mbfilter_uuencode.c + libmbfl/mbfl/mbfilter.c + libmbfl/mbfl/mbfilter_8bit.c + libmbfl/mbfl/mbfilter_pass.c + libmbfl/mbfl/mbfilter_wchar.c + libmbfl/mbfl/mbfl_convert.c + libmbfl/mbfl/mbfl_encoding.c + libmbfl/mbfl/mbfl_filter_output.c + libmbfl/mbfl/mbfl_ident.c + libmbfl/mbfl/mbfl_language.c + libmbfl/mbfl/mbfl_memory_device.c + libmbfl/mbfl/mbfl_string.c + libmbfl/mbfl/mbfl_allocators.c + libmbfl/nls/nls_de.c + libmbfl/nls/nls_en.c + libmbfl/nls/nls_ja.c + libmbfl/nls/nls_kr.c + libmbfl/nls/nls_neutral.c + libmbfl/nls/nls_ru.c + libmbfl/nls/nls_uni.c + libmbfl/nls/nls_zh.c + libmbfl/nls/nls_hy.c + libmbfl/nls/nls_tr.c + " + + + PHP_MBSTRING_CFLAGS="$PHP_MBSTRING_CFLAGS -DHAVE_CONFIG_H" + + else + for inc in include include/mbfl-1.0 include/mbfl; do + if test -f "$PHP_LIBMBFL/$inc/mbfilter.h"; then + PHP_LIBMBFL_INCLUDE="$inc" + break + fi + done + + if test -z "$PHP_LIBMBFL_INCLUDE"; then + { echo "configure: error: mbfilter.h not found. Please reinstall libmbfl library." 1>&2; exit 1; } + else + + if test "$PHP_LIBMBFL_INCLUDE" != "/usr/include"; then + + if test -z "$PHP_LIBMBFL_INCLUDE" || echo "$PHP_LIBMBFL_INCLUDE" | grep '^/' >/dev/null ; then + ai_p=$PHP_LIBMBFL_INCLUDE + else + + ep_dir="`echo $PHP_LIBMBFL_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_LIBMBFL_INCLUDE\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PHP_LIBMBFL/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mbfl_buffer_converter_new in -lmbfl""... $ac_c" 1>&6 +echo "configure:54599: checking for mbfl_buffer_converter_new in -lmbfl" >&5 +ac_lib_var=`echo mbfl'_'mbfl_buffer_converter_new | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmbfl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + MBSTRING_SHARED_LIBADD="-lmbfl $MBSTRING_SHARED_LIBADD" + if test -n "$PHP_LIBMBFL/$PHP_LIBDIR"; then + + if test "$PHP_LIBMBFL/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_LIBMBFL/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_LIBMBFL/$PHP_LIBDIR" || echo "$PHP_LIBMBFL/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_LIBMBFL/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_LIBMBFL/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_LIBMBFL/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MBSTRING_SHARED_LIBADD="-L$ai_p $MBSTRING_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MBSTRING_SHARED_LIBADD="$ld_runpath_switch$ai_p $MBSTRING_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PHP_LIBMBFL/$PHP_LIBDIR"; then + + if test "$PHP_LIBMBFL/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_LIBMBFL/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_LIBMBFL/$PHP_LIBDIR" || echo "$PHP_LIBMBFL/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_LIBMBFL/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_LIBMBFL/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_LIBMBFL/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case mbfl in + c|c_r|pthread*) ;; + *) + LIBS="-lmbfl $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_mbfl_mbfl_buffer_converter_new + + { echo "configure: error: Problem with libmbfl. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + fi + + + + ext_builddir=ext/mbstring + ext_srcdir=$abs_srcdir/ext/mbstring + + ac_extra=`echo "$PHP_MBSTRING_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MBSTRING_SHARED=no + + + case ext/mbstring in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mbstring"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mbstring/"; ac_bdir="ext/mbstring/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in $PHP_MBSTRING_SOURCES; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects</dev/null ; then + ai_p=$ext_srcdir/$dir + else + + ep_dir="`echo $ext_srcdir/$dir|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ext_srcdir/$dir\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$ext_builddir/$dir" != "/usr/include"; then + + if test -z "$ext_builddir/$dir" || echo "$ext_builddir/$dir" | grep '^/' >/dev/null ; then + ai_p=$ext_builddir/$dir + else + + ep_dir="`echo $ext_builddir/$dir|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ext_builddir/$dir\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + done + + if test "$ext_shared" = "no"; then + + + case ext/mbstring in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mbstring"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mbstring/"; ac_bdir="ext/mbstring/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in $PHP_MBSTRING_BASE_SOURCES; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects< $ext_builddir/$cfg <&6 +echo "configure:55241: checking for mcrypt support" >&5 +# Check whether --with-mcrypt or --without-mcrypt was given. +if test "${with_mcrypt+set}" = set; then + withval="$with_mcrypt" + PHP_MCRYPT=$withval +else + + PHP_MCRYPT=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MCRYPT=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MCRYPT in +shared,*) + PHP_MCRYPT=`echo "$PHP_MCRYPT"|$SED 's/^shared,//'` + ;; +shared) + PHP_MCRYPT=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MCRYPT" != "no"; then + for i in $PHP_MCRYPT /usr/local /usr; do + test -f $i/include/mcrypt.h && MCRYPT_DIR=$i && break + done + + if test -z "$MCRYPT_DIR"; then + { echo "configure: error: mcrypt.h not found. Please reinstall libmcrypt." 1>&2; exit 1; } + fi + + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$MCRYPT_DIR/include + echo $ac_n "checking for libmcrypt version""... $ac_c" 1>&6 +echo "configure:55297: checking for libmcrypt version" >&5 + cat > conftest.$ac_ext < +#if MCRYPT_API_VERSION >= 20021217 + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t"">= 2.5.6" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: libmcrypt version 2.5.6 or greater required." 1>&2; exit 1; } + +fi +rm -f conftest* + + CPPFLAGS=$old_CPPFLAGS + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$MCRYPT_DIR/$PHP_LIBDIR -lltdl + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6 +echo "configure:55423: checking for mcrypt_module_open in -lmcrypt" >&5 +ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmcrypt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case ltdl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + MCRYPT_SHARED_LIBADD="-lltdl $MCRYPT_SHARED_LIBADD" + else + + + case ltdl in + c|c_r|pthread*) ;; + *) + LIBS="-lltdl $LIBS" + ;; + esac + + + fi + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBMCRYPT 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_mcrypt_mcrypt_module_open + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$MCRYPT_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6 +echo "configure:55595: checking for mcrypt_module_open in -lmcrypt" >&5 +ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmcrypt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_LIBMCRYPT 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_mcrypt_mcrypt_module_open + + { echo "configure: error: Sorry, I was not able to diagnose which libmcrypt version you have installed." 1>&2; exit 1; } + + +fi + + + +fi + + + + + if test "$ext_shared" = "yes"; then + MCRYPT_SHARED_LIBADD="-lmcrypt $MCRYPT_SHARED_LIBADD" + if test -n "$MCRYPT_DIR/$PHP_LIBDIR"; then + + if test "$MCRYPT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MCRYPT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MCRYPT_DIR/$PHP_LIBDIR" || echo "$MCRYPT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MCRYPT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MCRYPT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MCRYPT_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MCRYPT_SHARED_LIBADD="-L$ai_p $MCRYPT_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MCRYPT_SHARED_LIBADD="$ld_runpath_switch$ai_p $MCRYPT_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$MCRYPT_DIR/$PHP_LIBDIR"; then + + if test "$MCRYPT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MCRYPT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MCRYPT_DIR/$PHP_LIBDIR" || echo "$MCRYPT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MCRYPT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MCRYPT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MCRYPT_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case mcrypt in + c|c_r|pthread*) ;; + *) + LIBS="-lmcrypt $LIBS" + ;; + esac + + + + + 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 + + ep_dir="`echo $MCRYPT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MCRYPT_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST MCRYPT_SHARED_LIBADD" + + + ext_builddir=ext/mcrypt + ext_srcdir=$abs_srcdir/ext/mcrypt + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MCRYPT_SHARED=no + + + case ext/mcrypt in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mcrypt"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mcrypt/"; ac_bdir="ext/mcrypt/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in mcrypt.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:56076: checking for mhash support" >&5 +# Check whether --with-mhash or --without-mhash was given. +if test "${with_mhash+set}" = set; then + withval="$with_mhash" + PHP_MHASH=$withval +else + + PHP_MHASH=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MHASH=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MHASH in +shared,*) + PHP_MHASH=`echo "$PHP_MHASH"|$SED 's/^shared,//'` + ;; +shared) + PHP_MHASH=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MHASH" != "no"; then + for i in $PHP_MHASH /usr/local /usr /opt/mhash; do + test -f $i/include/mhash.h && MHASH_DIR=$i && break + done + + if test -z "$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 + + ep_dir="`echo $MHASH_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MHASH_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + MHASH_SHARED_LIBADD="-lmhash $MHASH_SHARED_LIBADD" + if test -n "$MHASH_DIR/$PHP_LIBDIR"; then + + if test "$MHASH_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MHASH_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MHASH_DIR/$PHP_LIBDIR" || echo "$MHASH_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MHASH_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MHASH_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MHASH_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MHASH_SHARED_LIBADD="-L$ai_p $MHASH_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MHASH_SHARED_LIBADD="$ld_runpath_switch$ai_p $MHASH_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$MHASH_DIR/$PHP_LIBDIR"; then + + if test "$MHASH_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MHASH_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MHASH_DIR/$PHP_LIBDIR" || echo "$MHASH_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MHASH_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MHASH_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MHASH_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case mhash in + c|c_r|pthread*) ;; + *) + LIBS="-lmhash $LIBS" + ;; + esac + + + + + fi + + + + + ext_builddir=ext/mhash + ext_srcdir=$abs_srcdir/ext/mhash + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MHASH_SHARED=no + + + case ext/mhash in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mhash"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mhash/"; ac_bdir="ext/mhash/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in mhash.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_LIBMHASH 1 +EOF + +fi + + + +php_with_mime_magic=no + +echo $ac_n "checking whether to include mime_magic support""... $ac_c" 1>&6 +echo "configure:56552: checking whether to include mime_magic support" >&5 +# Check whether --with-mime-magic or --without-mime-magic was given. +if test "${with_mime_magic+set}" = set; then + withval="$with_mime_magic" + PHP_MIME_MAGIC=$withval +else + + PHP_MIME_MAGIC=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MIME_MAGIC=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MIME_MAGIC in +shared,*) + PHP_MIME_MAGIC=`echo "$PHP_MIME_MAGIC"|$SED 's/^shared,//'` + ;; +shared) + PHP_MIME_MAGIC=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MIME_MAGIC" != "no"; then + + + ext_builddir=ext/mime_magic + ext_srcdir=$abs_srcdir/ext/mime_magic + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MIME_MAGIC_SHARED=no + + + case ext/mime_magic in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mime_magic"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mime_magic/"; ac_bdir="ext/mime_magic/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in mime_magic.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + else + MAGIC_MIME_LOCATIONS="/usr/local/apache/conf/magic /usr/local/etc/apache/conf/magic /etc/apache/magic /etc/httpd/conf/magic /usr/share/magic.mime /usr/share/misc/magic.mime /etc/magic.mime" + + for i in $MAGIC_MIME_LOCATIONS; do + if test -f $i; then + PHP_MIME_MAGIC_FILE_PATH=$i + break + fi + done + fi + + cat >> confdefs.h <&6 +echo "configure:56910: checking for MING support" >&5 +# Check whether --with-ming or --without-ming was given. +if test "${with_ming+set}" = set; then + withval="$with_ming" + PHP_MING=$withval +else + + PHP_MING=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MING=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MING in +shared,*) + PHP_MING=`echo "$PHP_MING"|$SED 's/^shared,//'` + ;; +shared) + PHP_MING=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MING" != "no"; then + echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 +echo "configure:56955: 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 <&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 <&6 +fi + + + for i in $PHP_MING /usr/local /usr; do + if test -f $i/$PHP_LIBDIR/libming.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libming.a; then + MING_DIR=$i + break + fi + done + + if test -z "$MING_DIR"; then + { echo "configure: error: Please reinstall ming distribution. libming.(a|so) not found." 1>&2; exit 1; } + fi + + for i in $MING_DIR/include $MING_DIR/include/ming $MING_DIR/ming/include; do + if test -f $i/ming.h; then + MING_INC_DIR=$i + fi + done + + if test -z "$MING_INC_DIR"; then + { echo "configure: error: Please reinstall ming distribution. ming.h not found." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$MING_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for Ming_useSWFVersion in -lming""... $ac_c" 1>&6 +echo "configure:57121: checking for Ming_useSWFVersion in -lming" >&5 +ac_lib_var=`echo ming'_'Ming_useSWFVersion | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lming $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_MING 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ming_Ming_useSWFVersion + + { echo "configure: error: Ming library 0.2a or greater required." 1>&2; exit 1; } + + +fi + + + + if test "$MING_INC_DIR" != "/usr/include"; then + + if test -z "$MING_INC_DIR" || echo "$MING_INC_DIR" | grep '^/' >/dev/null ; then + ai_p=$MING_INC_DIR + else + + ep_dir="`echo $MING_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MING_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + MING_SHARED_LIBADD="-lming $MING_SHARED_LIBADD" + if test -n "$MING_DIR/$PHP_LIBDIR"; then + + if test "$MING_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MING_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MING_DIR/$PHP_LIBDIR" || echo "$MING_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MING_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MING_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MING_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MING_SHARED_LIBADD="-L$ai_p $MING_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MING_SHARED_LIBADD="$ld_runpath_switch$ai_p $MING_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$MING_DIR/$PHP_LIBDIR"; then + + if test "$MING_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MING_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MING_DIR/$PHP_LIBDIR" || echo "$MING_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MING_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MING_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MING_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case ming in + c|c_r|pthread*) ;; + *) + LIBS="-lming $LIBS" + ;; + esac + + + + + fi + + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SWFPrebuiltClip in -lming""... $ac_c" 1>&6 +echo "configure:57403: checking for SWFPrebuiltClip in -lming" >&5 +ac_lib_var=`echo ming'_'SWFPrebuiltClip | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lming $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_SWFPREBUILTCLIP 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ming_SWFPrebuiltClip + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SWFMovie_namedAnchor in -lming""... $ac_c" 1>&6 +echo "configure:57551: checking for SWFMovie_namedAnchor in -lming" >&5 +ac_lib_var=`echo ming'_'SWFMovie_namedAnchor | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lming $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_SWFMOVIE_NAMEDANCHOR 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ming_SWFMovie_namedAnchor + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for Ming_setSWFCompression in -lming""... $ac_c" 1>&6 +echo "configure:57699: checking for Ming_setSWFCompression in -lming" >&5 +ac_lib_var=`echo ming'_'Ming_setSWFCompression | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lming $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + cat >> confdefs.h <<\EOF +#define HAVE_MING_SETSWFCOMPRESSION 1 +EOF + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ming_Ming_setSWFCompression + + +fi + + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$MING_INC_DIR + echo $ac_n "checking for destroySWFBlock""... $ac_c" 1>&6 +echo "configure:57755: checking for destroySWFBlock" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""unknown" 1>&6 + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + echo "$ac_t""missing" 1>&6 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + cat >> confdefs.h <<\EOF +#define HAVE_DESTROY_SWF_BLOCK 1 +EOF + + echo "$ac_t""ok" 1>&6 + +fi +rm -fr conftest* +fi + + + cat > conftest.$ac_ext < +#ifdef SWF_SOUND_COMPRESSION +yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define HAVE_NEW_MING 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_MING_ZLIB 1 +EOF + + +fi +rm -f conftest* + + + cat > conftest.$ac_ext < + +int main() { + +SWFMovie_output(NULL, NULL, NULL, 0); + +; return 0; } +EOF +if { (eval echo configure:57834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define HAVE_MING_MOVIE_LEVEL 1 +EOF + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + CPPFLAGS=$old_CPPFLAGS + + + ext_builddir=ext/ming + ext_srcdir=$abs_srcdir/ext/ming + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MING_SHARED=no + + + case ext/ming in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/ming"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/ming/"; ac_bdir="ext/ming/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in ming.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:58142: checking for mSQL support" >&5 +# Check whether --with-msql or --without-msql was given. +if test "${with_msql+set}" = set; then + withval="$with_msql" + PHP_MSQL=$withval +else + + PHP_MSQL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MSQL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MSQL in +shared,*) + PHP_MSQL=`echo "$PHP_MSQL"|$SED 's/^shared,//'` + ;; +shared) + PHP_MSQL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + if test "$PHP_MSQL" != "no"; then + if test "$PHP_MSQL" = "yes"; then + MSQL_INCDIR=/usr/local/Hughes/include + MSQL_LIBDIR=/usr/local/Hughes/lib + else + MSQL_INCDIR=$PHP_MSQL/include + MSQL_LIBDIR=$PHP_MSQL/lib + fi + + + if test "$ext_shared" = "yes"; then + MSQL_SHARED_LIBADD="-lmsql $MSQL_SHARED_LIBADD" + if test -n "$MSQL_LIBDIR"; then + + if test "$MSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MSQL_LIBDIR" != "/usr/lib"; then + + if test -z "$MSQL_LIBDIR" || echo "$MSQL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MSQL_LIBDIR + else + + ep_dir="`echo $MSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MSQL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MSQL_SHARED_LIBADD="-L$ai_p $MSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $MSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$MSQL_LIBDIR"; then + + if test "$MSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MSQL_LIBDIR" != "/usr/lib"; then + + if test -z "$MSQL_LIBDIR" || echo "$MSQL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MSQL_LIBDIR + else + + ep_dir="`echo $MSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MSQL_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case msql in + c|c_r|pthread*) ;; + *) + LIBS="-lmsql $LIBS" + ;; + esac + + + + + 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 + + ep_dir="`echo $MSQL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MSQL_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_MSQL 1 +EOF + + + PHP_VAR_SUBST="$PHP_VAR_SUBST MSQL_SHARED_LIBADD" + + + ext_builddir=ext/msql + ext_srcdir=$abs_srcdir/ext/msql + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MSQL_SHARED=no + + + case ext/msql in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/msql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/msql/"; ac_bdir="ext/msql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_msql.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:58611: checking mSQL version" >&5 + ac_php_oldcppflags=$CPPFLAGS + CPPFLAGS="$INCLUDES $CPPFLAGS" + cat > conftest.$ac_ext < +#include "msql.h" +int main() { +int i = IDX_TYPE +; return 0; } +EOF +if { (eval echo configure:58623: \"$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* + CPPFLAGS=$ac_php_oldcppflags + echo "$ac_t""$MSQL_VERSION" 1>&6 + + fi + + + +php_with_mssql=no + +echo $ac_n "checking for MSSQL support via FreeTDS""... $ac_c" 1>&6 +echo "configure:58655: checking for MSSQL support via FreeTDS" >&5 +# Check whether --with-mssql or --without-mssql was given. +if test "${with_mssql+set}" = set; then + withval="$with_mssql" + PHP_MSSQL=$withval +else + + PHP_MSSQL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MSSQL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MSSQL in +shared,*) + PHP_MSSQL=`echo "$PHP_MSSQL"|$SED 's/^shared,//'` + ;; +shared) + PHP_MSSQL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MSSQL" != "no"; then + + if test "$PHP_MSSQL" = "yes"; then + for i in /usr/local /usr; do + if test -f $i/include/tds.h; then + FREETDS_INSTALLATION_DIR=$i + FREETDS_INCLUDE_DIR=$i/include + break + elif test -f $i/include/freetds/tds.h; then + FREETDS_INSTALLATION_DIR=$i + FREETDS_INCLUDE_DIR=$i/include/freetds + break + fi + done + + if test -z "$FREETDS_INSTALLATION_DIR"; then + { echo "configure: error: Cannot find FreeTDS in known installation directories" 1>&2; exit 1; } + fi + + elif test "$PHP_MSSQL" != "no"; then + + if test -f $PHP_MSSQL/include/tds.h; then + FREETDS_INSTALLATION_DIR=$PHP_MSSQL + FREETDS_INCLUDE_DIR=$PHP_MSSQL/include + elif test -f $PHP_MSSQL/include/freetds/tds.h; then + FREETDS_INSTALLATION_DIR=$PHP_MSSQL + FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds + else + { echo "configure: error: Directory $PHP_MSSQL is not a FreeTDS installation directory" 1>&2; exit 1; } + fi + fi + + if test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so"; then + { echo "configure: error: Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a|so" 1>&2; exit 1; } + fi + + + if test "$FREETDS_INCLUDE_DIR" != "/usr/include"; then + + if test -z "$FREETDS_INCLUDE_DIR" || echo "$FREETDS_INCLUDE_DIR" | grep '^/' >/dev/null ; then + ai_p=$FREETDS_INCLUDE_DIR + else + + ep_dir="`echo $FREETDS_INCLUDE_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETDS_INCLUDE_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + MSSQL_SHARED_LIBADD="-lsybdb $MSSQL_SHARED_LIBADD" + if test -n "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR"; then + + if test "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" || echo "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MSSQL_SHARED_LIBADD="-L$ai_p $MSSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MSSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $MSSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR"; then + + if test "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" || echo "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case sybdb in + c|c_r|pthread*) ;; + *) + LIBS="-lsybdb $LIBS" + ;; + esac + + + + + fi + + + + + ext_builddir=ext/mssql + ext_srcdir=$abs_srcdir/ext/mssql + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MSSQL_SHARED=no + + + case ext/mssql in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mssql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mssql/"; ac_bdir="ext/mssql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_mssql.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:59145: 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 <&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 "$ext_shared" = "yes"; then + MSSQL_SHARED_LIBADD="-ldnet_stub $MSSQL_SHARED_LIBADD" + if test -n ""; then + + if test "" != "/usr/$PHP_LIBDIR" && test "" != "/usr/lib"; then + + if test -z "" || echo "" | grep '^/' >/dev/null ; then + ai_p= + else + + ep_dir="`echo |$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"\"`" + fi + + + if test "$ext_shared" = "yes"; then + MSSQL_SHARED_LIBADD="-L$ai_p $MSSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MSSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $MSSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n ""; then + + if test "" != "/usr/$PHP_LIBDIR" && test "" != "/usr/lib"; then + + if test -z "" || echo "" | grep '^/' >/dev/null ; then + ai_p= + else + + ep_dir="`echo |$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case dnet_stub in + c|c_r|pthread*) ;; + *) + LIBS="-ldnet_stub $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBDNET_STUB 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + cat >> confdefs.h <<\EOF +#define HAVE_MSSQL 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_FREETDS 1 +EOF + + + PHP_VAR_SUBST="$PHP_VAR_SUBST MSSQL_SHARED_LIBADD" + +fi + + + + + + + + +php_with_mysql=no + +echo $ac_n "checking for MySQL support""... $ac_c" 1>&6 +echo "configure:59308: checking for MySQL support" >&5 +# Check whether --with-mysql or --without-mysql was given. +if test "${with_mysql+set}" = set; then + withval="$with_mysql" + PHP_MYSQL=$withval +else + + PHP_MYSQL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MYSQL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MYSQL in +shared,*) + PHP_MYSQL=`echo "$PHP_MYSQL"|$SED 's/^shared,//'` + ;; +shared) + PHP_MYSQL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_mysql_sock=no + +echo $ac_n "checking for specified location of the MySQL UNIX socket""... $ac_c" 1>&6 +echo "configure:59355: checking for specified location of the MySQL UNIX socket" >&5 +# Check whether --with-mysql-sock or --without-mysql-sock was given. +if test "${with_mysql_sock+set}" = set; then + withval="$with_mysql_sock" + PHP_MYSQL_SOCK=$withval +else + + PHP_MYSQL_SOCK=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MYSQL_SOCK=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MYSQL_SOCK +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_ZLIB_DIR"; then + +php_with_zlib_dir=no + +echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +echo "configure:59382: checking for the location of libz" >&5 +# Check whether --with-zlib-dir or --without-zlib-dir was given. +if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" + PHP_ZLIB_DIR=$withval +else + + PHP_ZLIB_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ZLIB_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ZLIB_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + + +if test "$PHP_MYSQL" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_MYSQL 1 +EOF + + + echo $ac_n "checking for MySQL UNIX socket location""... $ac_c" 1>&6 +echo "configure:59413: checking for MySQL UNIX socket location" >&5 + if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then + MYSQL_SOCK=$PHP_MYSQL_SOCK + cat >> confdefs.h <&6 + elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then + + for i in \ + /var/run/mysqld/mysqld.sock \ + /var/tmp/mysql.sock \ + /var/run/mysql/mysql.sock \ + /var/lib/mysql/mysql.sock \ + /var/mysql/mysql.sock \ + /usr/local/mysql/var/mysql.sock \ + /Private/tmp/mysql.sock \ + /private/tmp/mysql.sock \ + /tmp/mysql.sock \ + ; do + if test -r $i; then + MYSQL_SOCK=$i + break 2 + fi + done + + if test -n "$MYSQL_SOCK"; then + cat >> confdefs.h <&6 + else + echo "$ac_t""no" 1>&6 + fi + + else + echo "$ac_t""no" 1>&6 + fi + + MYSQL_DIR= + MYSQL_INC_DIR= + + for i in $PHP_MYSQL /usr/local /usr; do + if test -r $i/include/mysql/mysql.h; then + MYSQL_DIR=$i + MYSQL_INC_DIR=$i/include/mysql + break + elif test -r $i/include/mysql.h; then + MYSQL_DIR=$i + MYSQL_INC_DIR=$i/include + break + fi + done + + if test -z "$MYSQL_DIR"; then + { echo "configure: error: Cannot find MySQL header files under $PHP_MYSQL. +Note that the MySQL client library is not bundled anymore!" 1>&2; exit 1; } + fi + + if test "$enable_maintainer_zts" = "yes"; then + MYSQL_LIBNAME=mysqlclient_r + else + MYSQL_LIBNAME=mysqlclient + fi + case $host_alias in + *netware*) + MYSQL_LIBNAME=mysql + ;; + esac + + if test -z "$PHP_LIBDIR"; then + PHP_LIBDIR=lib + fi + + for i in $PHP_LIBDIR $PHP_LIBDIR/mysql; do + + str="$MYSQL_DIR/$i/lib$MYSQL_LIBNAME.*" + for j in `echo $str`; do + if test -r $j; then + MYSQL_LIB_DIR=$MYSQL_DIR/$i + break 2 + fi + done + + done + + if test -z "$MYSQL_LIB_DIR"; then + { echo "configure: error: Cannot find lib$MYSQL_LIBNAME under $MYSQL_DIR. +Note that the MySQL client library is not bundled anymore!" 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$MYSQL_LIB_DIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_close in -l$MYSQL_LIBNAME""... $ac_c" 1>&6 +echo "configure:59604: checking for mysql_close in -l$MYSQL_LIBNAME" >&5 +ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_close | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$MYSQL_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$MYSQL_LIBNAME_mysql_close + + if test "$PHP_ZLIB_DIR" != "no"; then + + + if test "$ext_shared" = "yes"; then + MYSQL_SHARED_LIBADD="-lz $MYSQL_SHARED_LIBADD" + if test -n "$PHP_ZLIB_DIR"; then + + if test "$PHP_ZLIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR" || echo "$PHP_ZLIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR + else + + ep_dir="`echo $PHP_ZLIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MYSQL_SHARED_LIBADD="-L$ai_p $MYSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MYSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $MYSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PHP_ZLIB_DIR"; then + + if test "$PHP_ZLIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR" || echo "$PHP_ZLIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR + else + + ep_dir="`echo $PHP_ZLIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PHP_ZLIB_DIR/$PHP_LIBDIR -L$MYSQL_LIB_DIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_error in -l$MYSQL_LIBNAME""... $ac_c" 1>&6 +echo "configure:59846: checking for mysql_error in -l$MYSQL_LIBNAME" >&5 +ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_error | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$MYSQL_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$MYSQL_LIBNAME_mysql_error + + { echo "configure: error: mysql configure failed. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + MYSQL_LIBS="-L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz" + else + + + case z in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + MYSQL_SHARED_LIBADD="-lz $MYSQL_SHARED_LIBADD" + else + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + fi + ;; + esac + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$MYSQL_LIB_DIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_errno in -l$MYSQL_LIBNAME""... $ac_c" 1>&6 +echo "configure:60020: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5 +ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_errno | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$MYSQL_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$MYSQL_LIBNAME_mysql_errno + + { echo "configure: error: Try adding --with-zlib-dir=. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + MYSQL_LIBS="-lz" + fi + + +fi + + + + + if test "$ext_shared" = "yes"; then + MYSQL_SHARED_LIBADD="-l$MYSQL_LIBNAME $MYSQL_SHARED_LIBADD" + if test -n "$MYSQL_LIB_DIR"; then + + if test "$MYSQL_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$MYSQL_LIB_DIR" != "/usr/lib"; then + + if test -z "$MYSQL_LIB_DIR" || echo "$MYSQL_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$MYSQL_LIB_DIR + else + + ep_dir="`echo $MYSQL_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MYSQL_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + MYSQL_SHARED_LIBADD="-L$ai_p $MYSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MYSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $MYSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$MYSQL_LIB_DIR"; then + + if test "$MYSQL_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$MYSQL_LIB_DIR" != "/usr/lib"; then + + if test -z "$MYSQL_LIB_DIR" || echo "$MYSQL_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$MYSQL_LIB_DIR + else + + ep_dir="`echo $MYSQL_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MYSQL_LIB_DIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $MYSQL_LIBNAME in + c|c_r|pthread*) ;; + *) + LIBS="-l$MYSQL_LIBNAME $LIBS" + ;; + esac + + + + + fi + + + + if test "$MYSQL_INC_DIR" != "/usr/include"; then + + if test -z "$MYSQL_INC_DIR" || echo "$MYSQL_INC_DIR" | grep '^/' >/dev/null ; then + ai_p=$MYSQL_INC_DIR + else + + ep_dir="`echo $MYSQL_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MYSQL_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + ext_builddir=ext/mysql + ext_srcdir=$abs_srcdir/ext/mysql + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MYSQL_SHARED=no + + + case ext/mysql in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mysql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mysql/"; ac_bdir="ext/mysql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_mysql.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:60521: checking for MySQLi support" >&5 +# Check whether --with-mysqli or --without-mysqli was given. +if test "${with_mysqli+set}" = set; then + withval="$with_mysqli" + PHP_MYSQLI=$withval +else + + PHP_MYSQLI=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_MYSQLI=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_MYSQLI in +shared,*) + PHP_MYSQLI=`echo "$PHP_MYSQLI"|$SED 's/^shared,//'` + ;; +shared) + PHP_MYSQLI=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_embedded_mysqli=no + +echo $ac_n "checking whether to enable embedded MySQLi support""... $ac_c" 1>&6 +echo "configure:60568: checking whether to enable embedded MySQLi support" >&5 +# Check whether --enable-embedded_mysqli or --disable-embedded_mysqli was given. +if test "${enable_embedded_mysqli+set}" = set; then + enableval="$enable_embedded_mysqli" + PHP_EMBEDDED_MYSQLI=$enableval +else + + PHP_EMBEDDED_MYSQLI=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_EMBEDDED_MYSQLI=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_EMBEDDED_MYSQLI +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_MYSQLI" != "no"; then + + + if test "$PHP_MYSQLI" = "yes"; then + MYSQL_CONFIG=`$php_shtool path mysql_config` + else + MYSQL_CONFIG=$PHP_MYSQLI + fi + + MYSQL_LIB_NAME='mysqlclient' + if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_EMBEDDED_MYSQLI 1 +EOF + + MYSQL_LIB_CFG='--libmysqld-libs' + elif test "$enable_maintainer_zts" = "yes"; then + MYSQL_LIB_CFG='--libs_r' + MYSQL_LIB_NAME='mysqlclient_r' + else + MYSQL_LIB_CFG='--libs' + fi + + if test -x "$MYSQL_CONFIG" && $MYSQL_CONFIG $MYSQL_LIB_CFG > /dev/null 2>&1; then + MYSQLI_INCLINE=`$MYSQL_CONFIG --cflags | $SED -e "s/'//g"` + MYSQLI_LIBLINE=`$MYSQL_CONFIG $MYSQL_LIB_CFG | $SED -e "s/'//g"` + else + echo "$ac_t""mysql_config not found" 1>&6 + { echo "configure: error: Please reinstall the mysql distribution" 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $MYSQLI_LIBLINE + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_set_server_option in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6 +echo "configure:60719: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5 +ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_set_server_option | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$MYSQL_LIB_NAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + for ac_i in $MYSQLI_INCLINE; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + for ac_i in $MYSQLI_LIBLINE; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + MYSQLI_SHARED_LIBADD="$MYSQLI_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + MYSQLI_SHARED_LIBADD="$MYSQLI_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + MYSQLI_SHARED_LIBADD="-L$ai_p $MYSQLI_SHARED_LIBADD" + test -n "$ld_runpath_switch" && MYSQLI_SHARED_LIBADD="$ld_runpath_switch$ai_p $MYSQLI_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + cat >> confdefs.h <<\EOF +#define HAVE_MYSQLILIB 1 +EOF + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="$MYSQLI_LIBLINE" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6 +echo "configure:60986: checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME" >&5 +ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_stmt_field_count | sed 'y%./+-%__p_%'` +if eval "test \"`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$MYSQL_LIB_NAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$MYSQL_LIB_NAME_mysql_stmt_field_count + + { echo "configure: error: MySQLI doesn't support versions < 4.1.3 (for MySQL 4.1.x) and < 5.0.1 for (MySQL 5.0.x) anymore. Please update your libraries." 1>&2; exit 1; } + + +fi + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$MYSQL_LIB_NAME_mysql_set_server_option + + { echo "configure: error: wrong mysql library version or lib not found. Check config.log for more information." 1>&2; exit 1; } + + +fi + + + + ext_builddir=ext/mysqli + ext_srcdir=$abs_srcdir/ext/mysqli + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_MYSQLI_SHARED=no + + + case ext/mysqli in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/mysqli"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/mysqli/"; ac_bdir="ext/mysqli/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c mysqli_fe.c mysqli_report.c mysqli_repl.c mysqli_driver.c mysqli_warning.c mysqli_exception.c mysqli_embedded.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:61343: checking for ncurses support" >&5 +# Check whether --with-ncurses or --without-ncurses was given. +if test "${with_ncurses+set}" = set; then + withval="$with_ncurses" + PHP_NCURSES=$withval +else + + PHP_NCURSES=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_NCURSES=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_NCURSES in +shared,*) + PHP_NCURSES=`echo "$PHP_NCURSES"|$SED 's/^shared,//'` + ;; +shared) + PHP_NCURSES=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_NCURSES" != "no"; then + + SEARCH_PATH="$PHP_NCURSES /usr/local /usr" + + for dir in $SEARCH_PATH; do + for subdir in include/ncurses include; do + if test -d $dir/$subdir; then + if test -r $dir/$subdir/ncurses.h; then + NCURSES_DIR=$dir + NCURSES_INCDIR=$dir/$subdir + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_H 1 +EOF + + break 2 + elif test -r $dir/$subdir/curses.h; then + NCURSES_DIR=$dir + NCURSES_INCDIR=$dir/$subdir + break 2 + fi + fi + done + done + + if test -z "$NCURSES_DIR"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Please reinstall the ncurses distribution" 1>&2; exit 1; } + fi + + # --with-ncurses -> add include path + + if test "$NCURSES_INCDIR" != "/usr/include"; then + + if test -z "$NCURSES_INCDIR" || echo "$NCURSES_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$NCURSES_INCDIR + else + + ep_dir="`echo $NCURSES_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$NCURSES_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + # --with-ncurses -> chech for lib and symbol presence + LIBNAME=ncurses + LIBSYMBOL=initscr + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$NCURSES_DIR/$PHP_LIBDIR -lm + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6 +echo "configure:61550: checking for $LIBSYMBOL in -l$LIBNAME" >&5 +ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_NCURSESLIB 1 +EOF + + + + if test "$ext_shared" = "yes"; then + NCURSES_SHARED_LIBADD="-l$LIBNAME $NCURSES_SHARED_LIBADD" + if test -n "$NCURSES_DIR/$PHP_LIBDIR"; then + + if test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$NCURSES_DIR/$PHP_LIBDIR" || echo "$NCURSES_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$NCURSES_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $NCURSES_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$NCURSES_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + NCURSES_SHARED_LIBADD="-L$ai_p $NCURSES_SHARED_LIBADD" + test -n "$ld_runpath_switch" && NCURSES_SHARED_LIBADD="$ld_runpath_switch$ai_p $NCURSES_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$NCURSES_DIR/$PHP_LIBDIR"; then + + if test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$NCURSES_DIR/$PHP_LIBDIR" || echo "$NCURSES_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$NCURSES_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $NCURSES_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$NCURSES_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $LIBNAME in + c|c_r|pthread*) ;; + *) + LIBS="-l$LIBNAME $LIBS" + ;; + esac + + + + + fi + + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$NCURSES_DIR/$PHP_LIBDIR -l$LIBNAME -lm + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6 +echo "configure:61788: checking for new_panel in -lpanel" >&5 +ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpanel $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_PANEL 1 +EOF + + + + if test "$ext_shared" = "yes"; then + NCURSES_SHARED_LIBADD="-lpanel $NCURSES_SHARED_LIBADD" + if test -n "$NCURSES_DIR/$PHP_LIBDIR"; then + + if test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$NCURSES_DIR/$PHP_LIBDIR" || echo "$NCURSES_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$NCURSES_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $NCURSES_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$NCURSES_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + NCURSES_SHARED_LIBADD="-L$ai_p $NCURSES_SHARED_LIBADD" + test -n "$ld_runpath_switch" && NCURSES_SHARED_LIBADD="$ld_runpath_switch$ai_p $NCURSES_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$NCURSES_DIR/$PHP_LIBDIR"; then + + if test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$NCURSES_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$NCURSES_DIR/$PHP_LIBDIR" || echo "$NCURSES_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$NCURSES_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $NCURSES_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$NCURSES_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case panel in + c|c_r|pthread*) ;; + *) + LIBS="-lpanel $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_panel_new_panel + + +fi + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$LIBNAME_$LIBSYMBOL + + { echo "configure: error: Wrong ncurses lib version or lib not found" 1>&2; exit 1; } + + +fi + + + echo $ac_n "checking for color_set in -l$LIBNAME""... $ac_c" 1>&6 +echo "configure:61955: checking for color_set in -l$LIBNAME" >&5 +ac_lib_var=`echo $LIBNAME'_'color_set | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_COLOR_SET 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for slk_color in -l$LIBNAME""... $ac_c" 1>&6 +echo "configure:61998: checking for slk_color in -l$LIBNAME" >&5 +ac_lib_var=`echo $LIBNAME'_'slk_color | sed 'y%./+-%__p_%'` +if eval "test \"`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$LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_SLK_COLOR 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for assume_default_colors in -l$LIBNAME""... $ac_c" 1>&6 +echo "configure:62041: checking for assume_default_colors in -l$LIBNAME" >&5 +ac_lib_var=`echo $LIBNAME'_'assume_default_colors | sed 'y%./+-%__p_%'` +if eval "test \"`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$LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_ASSUME_DEFAULT_COLORS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for use_extended_names in -l$LIBNAME""... $ac_c" 1>&6 +echo "configure:62084: checking for use_extended_names in -l$LIBNAME" >&5 +ac_lib_var=`echo $LIBNAME'_'use_extended_names | sed 'y%./+-%__p_%'` +if eval "test \"`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$LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_USE_EXTENDED_NAMES 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + + ext_builddir=ext/ncurses + ext_srcdir=$abs_srcdir/ext/ncurses + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" != "cli"; then + PHP_NCURSES_SHARED=no + + + case ext/ncurses in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/ncurses"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/ncurses/"; ac_bdir="ext/ncurses/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in ncurses.c ncurses_fe.c ncurses_functions.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:62435: checking for Oracle (OCI8) support" >&5 +# Check whether --with-oci8 or --without-oci8 was given. +if test "${with_oci8+set}" = set; then + withval="$with_oci8" + PHP_OCI8=$withval +else + + PHP_OCI8=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_OCI8=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_OCI8 in +shared,*) + PHP_OCI8=`echo "$PHP_OCI8"|$SED 's/^shared,//'` + ;; +shared) + PHP_OCI8=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_OCI8" != "no"; then + echo $ac_n "checking PHP version""... $ac_c" 1>&6 +echo "configure:62480: checking PHP version" >&5 + + tmp_version=$PHP_VERSION + if test -z "$tmp_version"; then + if test -z "$PHP_CONFIG"; then + { echo "configure: error: php-config not found" 1>&2; exit 1; } + fi + php_version=`$PHP_CONFIG --version 2>/dev/null|head -n 1|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'` + else + php_version=`echo "$tmp_version"|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'` + fi + + if test -z "$php_version"; then + { echo "configure: error: failed to detect PHP version, please report" 1>&2; exit 1; } + fi + + ac_IFS=$IFS + IFS="." + set $php_version + IFS=$ac_IFS + oci8_php_version=`expr $1 \* 1000000 + $2 \* 1000 + $3` + + if test "$oci8_php_version" -le "4003010"; then + { echo "configure: error: You need at least PHP 4.3.10 to be able to use this version of OCI8. PHP $php_version found" 1>&2; exit 1; } + else + echo "$ac_t""$php_version, ok" 1>&6 + fi +fi + +PHP_OCI8_INSTANT_CLIENT="no" + +if test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then + PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f3`" + PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f1,4`" + if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then + PHP_OCI8_INSTANT_CLIENT="yes" + fi + if test -z "$PHP_OCI8"; then + PHP_OCI8=yes + fi +elif test "`echo $PHP_OCI8 | cut -d, -f1`" = "instantclient"; then + PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f2`" + PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f3,4`" + if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then + PHP_OCI8_INSTANT_CLIENT="yes" + fi + if test -z "$PHP_OCI8"; then + PHP_OCI8=yes + fi +fi + +if test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then + + echo $ac_n "checking Oracle Install Directory""... $ac_c" 1>&6 +echo "configure:62534: checking Oracle Install Directory" >&5 + if test "$PHP_OCI8" = "yes"; then + OCI8_DIR=$ORACLE_HOME + else + OCI8_DIR=$PHP_OCI8 + fi + echo "$ac_t""$OCI8_DIR" 1>&6 + + + echo $ac_n "checking size of long int""... $ac_c" 1>&6 +echo "configure:62544: checking size of long int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long_int=4 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long int)); + return(0); +} +EOF +if { (eval echo configure:62563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_int=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:62583: checking if we're on a 64-bit platform" >&5 + if test "$ac_cv_sizeof_long_int" = "4" ; then + echo "$ac_t""no" 1>&6 + TMP_OCI8_LIB_DIR=lib32 + else + echo "$ac_t""yes" 1>&6 + TMP_OCI8_LIB_DIR=lib + fi + + echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6 +echo "configure:62593: checking OCI8 libraries dir" >&5 + if test -d "$OCI8_DIR/lib" && test ! -d "$OCI8_DIR/lib32"; then + OCI8_LIB_DIR=lib + elif test ! -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then + OCI8_LIB_DIR=lib32 + elif test -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then + OCI8_LIB_DIR=$TMP_OCI8_LIB_DIR + else + { echo "configure: error: Oracle (OCI8) required libraries not found" 1>&2; exit 1; } + fi + echo "$ac_t""$OCI8_LIB_DIR" 1>&6 + + + if test -d "$OCI8_DIR/rdbms/public"; then + + if test "$OCI8_DIR/rdbms/public" != "/usr/include"; then + + if test -z "$OCI8_DIR/rdbms/public" || echo "$OCI8_DIR/rdbms/public" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/rdbms/public + else + + ep_dir="`echo $OCI8_DIR/rdbms/public|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/rdbms/public\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/rdbms/public" + fi + if test -d "$OCI8_DIR/rdbms/demo"; then + + if test "$OCI8_DIR/rdbms/demo" != "/usr/include"; then + + if test -z "$OCI8_DIR/rdbms/demo" || echo "$OCI8_DIR/rdbms/demo" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/rdbms/demo + else + + ep_dir="`echo $OCI8_DIR/rdbms/demo|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/rdbms/demo\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/rdbms/demo" + fi + if test -d "$OCI8_DIR/network/public"; then + + if test "$OCI8_DIR/network/public" != "/usr/include"; then + + if test -z "$OCI8_DIR/network/public" || echo "$OCI8_DIR/network/public" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/network/public + else + + ep_dir="`echo $OCI8_DIR/network/public|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/network/public\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/network/public" + fi + if test -d "$OCI8_DIR/plsql/public"; then + + if test "$OCI8_DIR/plsql/public" != "/usr/include"; then + + if test -z "$OCI8_DIR/plsql/public" || echo "$OCI8_DIR/plsql/public" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/plsql/public + else + + ep_dir="`echo $OCI8_DIR/plsql/public|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/plsql/public\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/plsql/public" + fi + + if test -f "$OCI8_DIR/$OCI8_LIB_DIR/sysliblist"; then + + for ac_i in `cat $OCI8_DIR/$OCI8_LIB_DIR/sysliblist`; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="$OCI8_SYSLIB -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="$OCI8_SYSLIB -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="-L$ai_p $OCI8_SYSLIB" + test -n "$ld_runpath_switch" && OCI8_SYSLIB="$ld_runpath_switch$ai_p $OCI8_SYSLIB" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + elif test -f "$OCI8_DIR/rdbms/$OCI8_LIB_DIR/sysliblist"; then + + for ac_i in `cat $OCI8_DIR/rdbms/$OCI8_LIB_DIR/sysliblist`; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="$OCI8_SYSLIB -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="$OCI8_SYSLIB -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="-L$ai_p $OCI8_SYSLIB" + test -n "$ld_runpath_switch" && OCI8_SYSLIB="$ld_runpath_switch$ai_p $OCI8_SYSLIB" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + fi + + + echo $ac_n "checking Oracle version""... $ac_c" 1>&6 +echo "configure:62927: checking Oracle version" >&5 + if test -s "$OCI8_DIR/orainst/unix.rgs"; then + OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/ */:/g' | cut -d: -f 6 | cut -c 2-4` + test -z "$OCI8_VERSION" && OCI8_VERSION=7.3 + elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then + OCI8_VERSION=11.1 + elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then + OCI8_VERSION=10.1 + elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then + OCI8_VERSION=9.0 + elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then + OCI8_VERSION=8.1 + elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then + OCI8_VERSION=8.0 + elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.a; then + if test -f $OCI8_DIR/$OCI8_LIB_DIR/libcore4.a; then + OCI8_VERSION=8.0 + else + OCI8_VERSION=8.1 + fi + else + { echo "configure: error: Oracle-OCI8 needed libraries not found" 1>&2; exit 1; } + fi + echo "$ac_t""$OCI8_VERSION" 1>&6 + + + case $OCI8_VERSION in + 8.0) + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-lnlsrtl3 $OCI8_SHARED_LIBADD" + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case nlsrtl3 in + c|c_r|pthread*) ;; + *) + LIBS="-lnlsrtl3 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-lcore4 $OCI8_SHARED_LIBADD" + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case core4 in + c|c_r|pthread*) ;; + *) + LIBS="-lcore4 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-lpsa $OCI8_SHARED_LIBADD" + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case psa in + c|c_r|pthread*) ;; + *) + LIBS="-lpsa $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-lclntsh $OCI8_SHARED_LIBADD" + if test -n "$OCI8_DIR/$OCI8_LIB_DIR"; then + + if test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/lib"; then + + if test -z "$OCI8_DIR/$OCI8_LIB_DIR" || echo "$OCI8_DIR/$OCI8_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/$OCI8_LIB_DIR + else + + ep_dir="`echo $OCI8_DIR/$OCI8_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/$OCI8_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$OCI8_DIR/$OCI8_LIB_DIR"; then + + if test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/lib"; then + + if test -z "$OCI8_DIR/$OCI8_LIB_DIR" || echo "$OCI8_DIR/$OCI8_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/$OCI8_LIB_DIR + else + + ep_dir="`echo $OCI8_DIR/$OCI8_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/$OCI8_LIB_DIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="-lclntsh $LIBS" + ;; + esac + + + + + fi + + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6 +echo "configure:63442: checking for OCIEnvCreate in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_CREATE 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIEnvCreate + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6 +echo "configure:63595: checking for OCIStmtPrepare2 in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_STMT_PREPARE2 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIStmtPrepare2 + + +fi + + ;; + + 8.1) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="$OCI8_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + + if test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/lib"; then + + if test -z "$OCI8_DIR/$OCI8_LIB_DIR" || echo "$OCI8_DIR/$OCI8_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/$OCI8_LIB_DIR + else + + ep_dir="`echo $OCI8_DIR/$OCI8_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/$OCI8_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6 +echo "configure:63812: checking for OCIEnvCreate in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_CREATE 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIEnvCreate + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6 +echo "configure:63965: checking for OCIStmtPrepare2 in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_STMT_PREPARE2 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIStmtPrepare2 + + +fi + + + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$OCI8_INCLUDES + cat > conftest.$ac_ext < +#if defined(OCI_ATTR_STATEMENT) + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + CPPFLAGS=$old_CPPFLAGS + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_ATTR_STATEMENT 1 +EOF + + +else + rm -rf conftest* + + CPPFLAGS=$old_CPPFLAGS + +fi +rm -f conftest* + + + ;; + + 9.0) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="$OCI8_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + + if test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/lib"; then + + if test -z "$OCI8_DIR/$OCI8_LIB_DIR" || echo "$OCI8_DIR/$OCI8_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/$OCI8_LIB_DIR + else + + ep_dir="`echo $OCI8_DIR/$OCI8_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/$OCI8_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_ATTR_STATEMENT 1 +EOF + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6 +echo "configure:64219: checking for OCIEnvNlsCreate in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCINlsCharSetNameToId in -lclntsh""... $ac_c" 1>&6 +echo "configure:64355: checking for OCINlsCharSetNameToId in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCINlsCharSetNameToId | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_NLS_CREATE 1 +EOF + + OCI8_VERSION=9.2 + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCINlsCharSetNameToId + + +fi + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIEnvNlsCreate + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6 +echo "configure:64521: checking for OCIEnvCreate in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_CREATE 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIEnvCreate + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6 +echo "configure:64674: checking for OCIStmtPrepare2 in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_STMT_PREPARE2 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIStmtPrepare2 + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCILobRead2 in -lclntsh""... $ac_c" 1>&6 +echo "configure:64827: checking for OCILobRead2 in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCILobRead2 | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_LOB_READ2 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCILobRead2 + + +fi + + + ;; + + 11.1|10.1) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="$OCI8_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + + if test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$OCI8_DIR/$OCI8_LIB_DIR" != "/usr/lib"; then + + if test -z "$OCI8_DIR/$OCI8_LIB_DIR" || echo "$OCI8_DIR/$OCI8_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$OCI8_DIR/$OCI8_LIB_DIR + else + + ep_dir="`echo $OCI8_DIR/$OCI8_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCI8_DIR/$OCI8_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_ATTR_STATEMENT 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_NLS_CREATE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_CREATE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_STMT_PREPARE2 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_LOB_READ2 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_TEMP_LOB 1 +EOF + + cat >> confdefs.h <<\EOF +#define PHP_OCI8_HAVE_COLLECTIONS 1 +EOF + + ;; + *) + { echo "configure: error: Unsupported Oracle version!" 1>&2; exit 1; } + ;; + esac + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6 +echo "configure:65078: checking for OCILobIsTemporary in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_TEMP_LOB 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCILobIsTemporary + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6 +echo "configure:65227: checking for OCILobIsTemporary in -locijdbc8" >&5 +ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-locijdbc8 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case ocijdbc8 in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="$OCI8_SHARED_LIBADD -locijdbc8" + else + + + case ocijdbc8 in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -locijdbc8" + ;; + esac + + + fi + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_TEMP_LOB 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ocijdbc8_OCILobIsTemporary + + +fi + + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6 +echo "configure:65407: checking for OCICollAssign in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define PHP_OCI8_HAVE_COLLECTIONS 1 +EOF + + + ext_builddir=ext/oci8 + ext_srcdir=$abs_srcdir/ext/oci8 + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_OCI8_SHARED=no + + + case ext/oci8 in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/oci8"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/oci8/"; ac_bdir="ext/oci8/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCICollAssign + + + ext_builddir=ext/oci8 + ext_srcdir=$abs_srcdir/ext/oci8 + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_OCI8_SHARED=no + + + case ext/oci8 in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/oci8"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/oci8/"; ac_bdir="ext/oci8/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in oci8.c oci8_lob.c oci8_statement.c oci8_interface.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_OCI8 1 +EOF + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST OCI8_SHARED_LIBADD" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST OCI8_DIR" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST OCI8_VERSION" + + + + +elif test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then + + echo $ac_n "checking Oracle Instant Client directory""... $ac_c" 1>&6 +echo "configure:66052: checking Oracle Instant Client directory" >&5 + if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then + PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1` + if test -z "$PHP_OCI8_INSTANT_CLIENT"; then + { echo "configure: error: Oracle Instant Client directory not found. Try --with-oci8=instantclient,DIR" 1>&2; exit 1; } + fi + fi + echo "$ac_t""$PHP_OCI8_INSTANT_CLIENT" 1>&6 + + OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT + + echo $ac_n "checking Oracle Instant Client SDK header directory""... $ac_c" 1>&6 +echo "configure:66064: checking Oracle Instant Client SDK header directory" >&5 + + OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib/*$!/usr/include/oracle/\1/client!'` + + OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include + + OCISDKMANINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!\(.*\)/lib/*$!\1/include!'` + + if test -f "$OCISDKRPMINC/oci.h"; then + echo "$ac_t""$OCISDKRPMINC" 1>&6 + + if test "$OCISDKRPMINC" != "/usr/include"; then + + if test -z "$OCISDKRPMINC" || echo "$OCISDKRPMINC" | grep '^/' >/dev/null ; then + ai_p=$OCISDKRPMINC + else + + ep_dir="`echo $OCISDKRPMINC|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCISDKRPMINC\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + OCI8INCDIR=$OCISDKRPMINC + elif test -f "$OCISDKZIPINC/oci.h"; then + echo "$ac_t""$OCISDKZIPINC" 1>&6 + + if test "$OCISDKZIPINC" != "/usr/include"; then + + if test -z "$OCISDKZIPINC" || echo "$OCISDKZIPINC" | grep '^/' >/dev/null ; then + ai_p=$OCISDKZIPINC + else + + ep_dir="`echo $OCISDKZIPINC|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCISDKZIPINC\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + OCI8INCDIR=$OCISDKZIPINC + elif test -f "$OCISDKMANINC/oci.h"; then + echo "$ac_t""$OCISDKMANINC" 1>&6 + + if test "$OCISDKMANINC" != "/usr/include"; then + + if test -z "$OCISDKMANINC" || echo "$OCISDKMANINC" | grep '^/' >/dev/null ; then + ai_p=$OCISDKMANINC + else + + ep_dir="`echo $OCISDKMANINC|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OCISDKMANINC\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + OCI8INCDIR=$OCISDKMANINC + else + { echo "configure: error: Oracle Instant Client SDK header files not found" 1>&2; exit 1; } + fi + + OCISYSLIBLIST=`echo "$OCI8INCDIR" | $PHP_OCI8_SED -e 's!\(.*\)/include$!\1/demo/sysliblist!'` + if test -f "$OCISYSLIBLIST"; then + + for ac_i in `cat $OCISYSLIBLIST`; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="$OCI8_SYSLIB -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="$OCI8_SYSLIB -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SYSLIB="-L$ai_p $OCI8_SYSLIB" + test -n "$ld_runpath_switch" && OCI8_SYSLIB="$ld_runpath_switch$ai_p $OCI8_SYSLIB" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + fi + + + echo $ac_n "checking Oracle Instant Client version""... $ac_c" 1>&6 +echo "configure:66273: checking Oracle Instant Client version" >&5 + if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz11.$SHLIB_SUFFIX_NAME; then + if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then + if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then + { echo "configure: error: Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.11.1 not found" 1>&2; exit 1; } + fi + OCI8_VERSION=11.1 + else + { echo "configure: error: Oracle Instant Client library version not supported" 1>&2; exit 1; } + fi + elif test -f $PHP_OCI8_INSTANT_CLIENT/libnnz10.$SHLIB_SUFFIX_NAME; then + if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then + if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then + { echo "configure: error: Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.10.1 not found" 1>&2; exit 1; } + fi + OCI8_VERSION=10.1 + else + { echo "configure: error: Oracle Instant Client library version not supported" 1>&2; exit 1; } + fi + else + { echo "configure: error: Oracle Instant Client libraries not found" 1>&2; exit 1; } + fi + echo "$ac_t""$OCI8_VERSION" 1>&6 + + case $OCI8_VERSION in + 11.1|10.1) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="$OCI8_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + + if test "$PHP_OCI8_INSTANT_CLIENT" != "/usr/$PHP_LIBDIR" && test "$PHP_OCI8_INSTANT_CLIENT" != "/usr/lib"; then + + if test -z "$PHP_OCI8_INSTANT_CLIENT" || echo "$PHP_OCI8_INSTANT_CLIENT" | grep '^/' >/dev/null ; then + ai_p=$PHP_OCI8_INSTANT_CLIENT + else + + ep_dir="`echo $PHP_OCI8_INSTANT_CLIENT|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_OCI8_INSTANT_CLIENT\"`" + fi + + + if test "$ext_shared" = "yes"; then + OCI8_SHARED_LIBADD="-L$ai_p $OCI8_SHARED_LIBADD" + test -n "$ld_runpath_switch" && OCI8_SHARED_LIBADD="$ld_runpath_switch$ai_p $OCI8_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + + *) + { echo "configure: error: Unsupported Oracle Instant Client version" 1>&2; exit 1; } + ;; + esac + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_INSTANT_CLIENT 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_ATTR_STATEMENT 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_NLS_CREATE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_ENV_CREATE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_STMT_PREPARE2 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI_LOB_READ2 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_OCI8_TEMP_LOB 1 +EOF + + cat >> confdefs.h <<\EOF +#define PHP_OCI8_HAVE_COLLECTIONS 1 +EOF + + + + ext_builddir=ext/oci8 + ext_srcdir=$abs_srcdir/ext/oci8 + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_OCI8_SHARED=no + + + case ext/oci8 in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/oci8"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/oci8/"; ac_bdir="ext/oci8/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_OCI8 1 +EOF + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST OCI8_SHARED_LIBADD" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST OCI8_DIR" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST OCI8_VERSION" + + + + +fi + + + + + + + + + + + + +if test -z "$ODBC_TYPE"; then + +php_with_adabas=no + + +# Check whether --with-adabas or --without-adabas was given. +if test "${with_adabas+set}" = set; then + withval="$with_adabas" + PHP_ADABAS=$withval +else + + PHP_ADABAS=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_ADABAS=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_ADABAS in +shared,*) + PHP_ADABAS=`echo "$PHP_ADABAS"|$SED 's/^shared,//'` + ;; +shared) + PHP_ADABAS=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_ADABAS" != "no"; then + echo $ac_n "checking for Adabas support""... $ac_c" 1>&6 +echo "configure:66767: checking for Adabas support" >&5 + if test "$PHP_ADABAS" = "yes"; then + PHP_ADABAS=/usr/local + fi + + if test "$PHP_ADABAS/incl" != "/usr/include"; then + + if test -z "$PHP_ADABAS/incl" || echo "$PHP_ADABAS/incl" | grep '^/' >/dev/null ; then + ai_p=$PHP_ADABAS/incl + else + + ep_dir="`echo $PHP_ADABAS/incl|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ADABAS/incl\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$PHP_ADABAS/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ADABAS/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_ADABAS/$PHP_LIBDIR" || echo "$PHP_ADABAS/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ADABAS/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_ADABAS/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ADABAS/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + ODBC_OBJS="$PHP_ADABAS/$PHP_LIBDIR/odbclib.a" + ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a" + $srcdir/build/shtool mkdir -f -p ext/odbc + rm -f "$ODBC_LIB" + cp "$ODBC_OBJS" "$ODBC_LIB" + + + case sqlptc in + c|c_r|pthread*) ;; + *) + LIBS="-lsqlptc $LIBS" + ;; + esac + + + + + case sqlrte in + c|c_r|pthread*) ;; + *) + LIBS="-lsqlrte $LIBS" + ;; + esac + + + + + if test -n "$abs_builddir/ext/odbc"; then + + if test "$abs_builddir/ext/odbc" != "/usr/$PHP_LIBDIR" && test "$abs_builddir/ext/odbc" != "/usr/lib"; then + + if test -z "$abs_builddir/ext/odbc" || echo "$abs_builddir/ext/odbc" | grep '^/' >/dev/null ; then + ai_p=$abs_builddir/ext/odbc + else + + ep_dir="`echo $abs_builddir/ext/odbc|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$abs_builddir/ext/odbc\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case odbc_adabas in + c|c_r|pthread*) ;; + *) + LIBS="-lodbc_adabas $LIBS" + ;; + esac + + + + + ODBC_TYPE=adabas + ODBC_INCDIR=$PHP_ADABAS/incl + +if ! test -f "$ODBC_INCDIR/sqlext.h"; then + { echo "configure: error: ODBC header file '$ODBC_INCDIR/sqlext.h' not found!" 1>&2; exit 1; } +fi + + cat >> confdefs.h <<\EOF +#define HAVE_ADABAS 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_sapdb=no + + +# Check whether --with-sapdb or --without-sapdb was given. +if test "${with_sapdb+set}" = set; then + withval="$with_sapdb" + PHP_SAPDB=$withval +else + + PHP_SAPDB=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SAPDB=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SAPDB in +shared,*) + PHP_SAPDB=`echo "$PHP_SAPDB"|$SED 's/^shared,//'` + ;; +shared) + PHP_SAPDB=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_SAPDB" != "no"; then + echo $ac_n "checking for SAP DB support""... $ac_c" 1>&6 +echo "configure:66973: checking for SAP DB support" >&5 + if test "$PHP_SAPDB" = "yes"; then + PHP_SAPDB=/usr/local + fi + + if test "$PHP_SAPDB/incl" != "/usr/include"; then + + if test -z "$PHP_SAPDB/incl" || echo "$PHP_SAPDB/incl" | grep '^/' >/dev/null ; then + ai_p=$PHP_SAPDB/incl + else + + ep_dir="`echo $PHP_SAPDB/incl|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_SAPDB/incl\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + if test "$PHP_SAPDB/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_SAPDB/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_SAPDB/$PHP_LIBDIR" || echo "$PHP_SAPDB/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_SAPDB/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_SAPDB/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_SAPDB/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + + + case sqlod in + c|c_r|pthread*) ;; + *) + LIBS="-lsqlod $LIBS" + ;; + esac + + + ODBC_TYPE=sapdb + cat >> confdefs.h <<\EOF +#define HAVE_SAPDB 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_solid=no + + +# Check whether --with-solid or --without-solid was given. +if test "${with_solid+set}" = set; then + withval="$with_solid" + PHP_SOLID=$withval +else + + PHP_SOLID=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SOLID=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SOLID in +shared,*) + PHP_SOLID=`echo "$PHP_SOLID"|$SED 's/^shared,//'` + ;; +shared) + PHP_SOLID=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_SOLID" != "no"; then + echo $ac_n "checking for Solid support""... $ac_c" 1>&6 +echo "configure:67109: checking for Solid support" >&5 + if test "$PHP_SOLID" = "yes"; then + PHP_SOLID=/usr/local/solid + fi + ODBC_INCDIR=$PHP_SOLID/include + ODBC_LIBDIR=$PHP_SOLID/$PHP_LIBDIR + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_TYPE=solid + if test -f $ODBC_LIBDIR/soc*35.a; then + cat >> confdefs.h <<\EOF +#define HAVE_SOLID_35 1 +EOF + + elif test -f $ODBC_LIBDIR/scl*30.a; then + cat >> confdefs.h <<\EOF +#define HAVE_SOLID_30 1 +EOF + + elif test -f $ODBC_LIBDIR/scl*23.a; then + cat >> confdefs.h <<\EOF +#define HAVE_SOLID 1 +EOF + + fi + echo "$ac_t""$ext_output" 1>&6 + + echo $ac_n "checking Solid library file""... $ac_c" 1>&6 +echo "configure:67136: checking Solid library file" >&5 + ac_solid_uname_r=`uname -r 2>/dev/null` + ac_solid_uname_s=`uname -s 2>/dev/null` + case $ac_solid_uname_s in + AIX) ac_solid_os=a3x;; # a4x for AIX4/ Solid 2.3/3.0 only + HP-UX) ac_solid_os=h9x;; # h1x for hpux11, h0x for hpux10 + IRIX) ac_solid_os=irx;; # Solid 2.3(?)/ 3.0 only + Linux) + if ldd -v /bin/sh | grep GLIBC > /dev/null; then + cat >> confdefs.h <<\EOF +#define SS_LINUX 1 +EOF + + ac_solid_os=l2x + else + cat >> confdefs.h <<\EOF +#define SS_LINUX 1 +EOF + + ac_solid_os=lux + fi;; + SunOS) + ac_solid_os=ssx;; # should we deal with SunOS 4? + FreeBSD) + if test `expr $ac_solid_uname_r : '\(.\)'` -gt "2"; then + cat >> confdefs.h <<\EOF +#define SS_FBX 1 +EOF + + ac_solid_os=fex + else + cat >> confdefs.h <<\EOF +#define SS_FBX 1 +EOF + + ac_solid_os=fbx + fi;; + esac + + if test -f $ODBC_LIBDIR/soc${ac_solid_os}35.a; then + ac_solid_version=35 + ac_solid_prefix=soc + elif test -f $ODBC_LIBDIR/scl${ac_solid_os}30.a; then + ac_solid_version=30 + ac_solid_prefix=scl + elif test -f $ODBC_LIBDIR/scl${ac_solid_os}23.a; then + ac_solid_version=23 + ac_solid_prefix=scl + fi + +# +# Check for the library files, and setup the ODBC_LIBS path... +# +if test ! -f $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ + ! -f $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then + # + # we have an error and should bail out, as we can't find the libs! + # + echo "" + echo "*********************************************************************" + echo "* Unable to locate $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" + echo "* Please correct this by creating the following links and reconfiguring:" + echo "* $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" + echo "* $ODBC_LIBDIR/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" + echo "*********************************************************************" +else + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} +fi + + echo "$ac_t""`echo $ODBC_LIBS | sed -e 's!.*/!!'`" 1>&6 + + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_ibm_db2=no + + +# Check whether --with-ibm-db2 or --without-ibm-db2 was given. +if test "${with_ibm_db2+set}" = set; then + withval="$with_ibm_db2" + PHP_IBM_DB2=$withval +else + + PHP_IBM_DB2=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_IBM_DB2=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_IBM_DB2 in +shared,*) + PHP_IBM_DB2=`echo "$PHP_IBM_DB2"|$SED 's/^shared,//'` + ;; +shared) + PHP_IBM_DB2=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_IBM_DB2" != "no"; then + echo $ac_n "checking for IBM DB2 support""... $ac_c" 1>&6 +echo "configure:67260: checking for IBM DB2 support" >&5 + if test "$PHP_IBM_DB2" = "yes"; then + ODBC_INCDIR=/home/db2inst1/sqllib/include + ODBC_LIBDIR=/home/db2inst1/sqllib/lib + else + ODBC_INCDIR=$PHP_IBM_DB2/include + ODBC_LIBDIR=$PHP_IBM_DB2/$PHP_LIBDIR + fi + + +if ! test -f "$ODBC_INCDIR/sqlcli1.h"; then + { echo "configure: error: ODBC header file '$ODBC_INCDIR/sqlcli1.h' not found!" 1>&2; exit 1; } +fi + + + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_TYPE=ibm-db2 + ODBC_LIBS=-ldb2 + + + old_LIBS=$LIBS + LIBS=" + $ODBC_LFLAGS $ODBC_LIBS + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + cat >> confdefs.h <<\EOF +#define HAVE_IBMDB2 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: +build test failed. Please check the config.log for details. +You need to source your DB2 environment before running PHP configure: +# . \$IBM_DB2/db2profile +" 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_odbcrouter=no + + +# Check whether --with-ODBCRouter or --without-ODBCRouter was given. +if test "${with_ODBCRouter+set}" = set; then + withval="$with_ODBCRouter" + PHP_ODBCROUTER=$withval +else + + PHP_ODBCROUTER=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_ODBCROUTER=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_ODBCROUTER in +shared,*) + PHP_ODBCROUTER=`echo "$PHP_ODBCROUTER"|$SED 's/^shared,//'` + ;; +shared) + PHP_ODBCROUTER=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_ODBCROUTER" != "no"; then + echo $ac_n "checking for ODBCRouter.com support""... $ac_c" 1>&6 +echo "configure:67386: checking for ODBCRouter.com support" >&5 + if test "$PHP_ODBCROUTER" = "yes"; then + PHP_ODBCROUTER=/usr + fi + ODBC_INCDIR=$PHP_ODBCROUTER/include + ODBC_LIBDIR=$PHP_ODBCROUTER/lib + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LIBS=-lodbcsdk + ODBC_TYPE=ODBCRouter + cat >> confdefs.h <<\EOF +#define HAVE_ODBC_ROUTER 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_empress=no + + +# Check whether --with-empress or --without-empress was given. +if test "${with_empress+set}" = set; then + withval="$with_empress" + PHP_EMPRESS=$withval +else + + PHP_EMPRESS=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_EMPRESS=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_EMPRESS in +shared,*) + PHP_EMPRESS=`echo "$PHP_EMPRESS"|$SED 's/^shared,//'` + ;; +shared) + PHP_EMPRESS=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_EMPRESS" != "no"; then + echo $ac_n "checking for Empress support""... $ac_c" 1>&6 +echo "configure:67453: checking for Empress support" >&5 + if test "$PHP_EMPRESS" = "yes"; then + ODBC_INCDIR=$EMPRESSPATH/include/odbc + ODBC_LIBDIR=$EMPRESSPATH/shlib + else + ODBC_INCDIR=$PHP_EMPRESS/include/odbc + ODBC_LIBDIR=$PHP_EMPRESS/shlib + fi + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_TYPE=empress + cat >> confdefs.h <<\EOF +#define HAVE_EMPRESS 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + + echo $ac_n "checking Empress library file""... $ac_c" 1>&6 +echo "configure:67471: checking Empress library file" >&5 + ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1` + if test ! -f $ODBC_LIBS; then + ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1` + fi + echo "$ac_t""`echo $ODBC_LIBS | sed -e 's!.*/!!'`" 1>&6 + + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_empress_bcs=no + + +# Check whether --with-empress-bcs or --without-empress-bcs was given. +if test "${with_empress_bcs+set}" = set; then + withval="$with_empress_bcs" + PHP_EMPRESS_BCS=$withval +else + + PHP_EMPRESS_BCS=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_EMPRESS_BCS=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_EMPRESS_BCS in +shared,*) + PHP_EMPRESS_BCS=`echo "$PHP_EMPRESS_BCS"|$SED 's/^shared,//'` + ;; +shared) + PHP_EMPRESS_BCS=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_EMPRESS_BCS" != "no"; then + echo $ac_n "checking for Empress local access support""... $ac_c" 1>&6 +echo "configure:67530: checking for Empress local access support" >&5 + if test "$PHP_EMPRESS_BCS" = "yes"; then + ODBC_INCDIR=$EMPRESSPATH/include/odbc + ODBC_LIBDIR=$EMPRESSPATH/shlib + else + ODBC_INCDIR=$PHP_EMPRESS_BCS/include/odbc + ODBC_LIBDIR=$PHP_EMPRESS_BCS/shlib + fi + CC="empocc -bcs";export CC; + LD="empocc -bcs";export LD; + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + LIST=`empocc -listlines -bcs -o a a.c` + + NEWLIST= + for I in $LIST + do + case $I in + $EMPRESSPATH/odbccl/lib/* | \ + $EMPRESSPATH/rdbms/lib/* | \ + $EMPRESSPATH/common/lib/*) + NEWLIST="$NEWLIST $I" + ;; + esac + done + ODBC_LIBS="-lempphpbcs -lms -lmscfg -lbasic -lbasic_os -lnlscstab -lnlsmsgtab -lm -ldl -lcrypt" + ODBC_TYPE=empress-bcs + cat >> confdefs.h <<\EOF +#define HAVE_EMPRESS 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + + echo $ac_n "checking Empress local access library file""... $ac_c" 1>&6 +echo "configure:67564: checking Empress local access library file" >&5 + ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1` + if test ! -f $ODBCBCS_LIBS; then + ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1` + fi + echo "$ac_t""`echo $ODBCBCS_LIBS | sed -e 's!.*/!!'`" 1>&6 + + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_birdstep=no + + +# Check whether --with-birdstep or --without-birdstep was given. +if test "${with_birdstep+set}" = set; then + withval="$with_birdstep" + PHP_BIRDSTEP=$withval +else + + PHP_BIRDSTEP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_BIRDSTEP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_BIRDSTEP in +shared,*) + PHP_BIRDSTEP=`echo "$PHP_BIRDSTEP"|$SED 's/^shared,//'` + ;; +shared) + PHP_BIRDSTEP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_BIRDSTEP" != "no"; then + echo $ac_n "checking for Birdstep support""... $ac_c" 1>&6 +echo "configure:67623: checking for Birdstep support" >&5 + if test "$PHP_BIRDSTEP" = "yes"; then + ODBC_INCDIR=/usr/local/birdstep/include + ODBC_LIBDIR=/usr/local/birdstep/lib + else + ODBC_INCDIR=$PHP_BIRDSTEP/include + ODBC_LIBDIR=$PHP_BIRDSTEP/$PHP_LIBDIR + fi + + case $host_alias in + *aix*) + cat >> confdefs.h <<\EOF +#define AIX 1 +EOF +;; + *hpux*) + cat >> confdefs.h <<\EOF +#define HPUX 1 +EOF +;; + *linux*) + cat >> confdefs.h <<\EOF +#define LINUX 1 +EOF +;; + *qnx*) + cat >> confdefs.h <<\EOF +#define NEUTRINO 1 +EOF +;; + i?86-*-solaris*) + cat >> confdefs.h <<\EOF +#define ISOLARIS 1 +EOF +;; + sparc-*-solaris*) + cat >> confdefs.h <<\EOF +#define SOLARIS 1 +EOF +;; + *unixware*) + cat >> confdefs.h <<\EOF +#define UNIXWARE 1 +EOF +;; + esac + + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_TYPE=birdstep + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil" + + if test -f "$ODBC_LIBDIR/libCrdbc32.$SHLIB_SUFFIX_NAME"; then + ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32 -lCrpc32 -lutil" + elif test -f "$ODBC_LIBDIR/libCrdbc.$SHLIB_SUFFIX_NAME"; then + ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil" + fi + + cat >> confdefs.h <<\EOF +#define HAVE_BIRDSTEP 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_custom_odbc=no + + +# Check whether --with-custom-odbc or --without-custom-odbc was given. +if test "${with_custom_odbc+set}" = set; then + withval="$with_custom_odbc" + PHP_CUSTOM_ODBC=$withval +else + + PHP_CUSTOM_ODBC=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_CUSTOM_ODBC=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_CUSTOM_ODBC in +shared,*) + PHP_CUSTOM_ODBC=`echo "$PHP_CUSTOM_ODBC"|$SED 's/^shared,//'` + ;; +shared) + PHP_CUSTOM_ODBC=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_CUSTOM_ODBC" != "no"; then + echo $ac_n "checking for a custom ODBC support""... $ac_c" 1>&6 +echo "configure:67738: checking for a custom ODBC support" >&5 + if test "$PHP_CUSTOM_ODBC" = "yes"; then + PHP_CUSTOM_ODBC=/usr/local + fi + ODBC_INCDIR=$PHP_CUSTOM_ODBC/include + ODBC_LIBDIR=$PHP_CUSTOM_ODBC/$PHP_LIBDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LIBS=$CUSTOM_ODBC_LIBS + ODBC_TYPE=custom-odbc + cat >> confdefs.h <<\EOF +#define HAVE_CODBC 1 +EOF + + echo "$ac_t""$ext_ouput" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_iodbc=no + + +# Check whether --with-iodbc or --without-iodbc was given. +if test "${with_iodbc+set}" = set; then + withval="$with_iodbc" + PHP_IODBC=$withval +else + + PHP_IODBC=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_IODBC=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_IODBC in +shared,*) + PHP_IODBC=`echo "$PHP_IODBC"|$SED 's/^shared,//'` + ;; +shared) + PHP_IODBC=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_IODBC" != "no"; then + echo $ac_n "checking for iODBC support""... $ac_c" 1>&6 +echo "configure:67805: checking for iODBC support" >&5 + if test "$PHP_IODBC" = "yes"; then + PHP_IODBC=/usr/local + fi + + + if test -n "$PHP_IODBC/$PHP_LIBDIR"; then + + if test "$PHP_IODBC/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_IODBC/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_IODBC/$PHP_LIBDIR" || echo "$PHP_IODBC/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_IODBC/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_IODBC/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_IODBC/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case iodbc in + c|c_r|pthread*) ;; + *) + LIBS="-liodbc $LIBS" + ;; + esac + + + + + + if test "$PHP_IODBC/include" != "/usr/include"; then + + if test -z "$PHP_IODBC/include" || echo "$PHP_IODBC/include" | grep '^/' >/dev/null ; then + ai_p=$PHP_IODBC/include + else + + ep_dir="`echo $PHP_IODBC/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_IODBC/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test "1"; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ODBC_TYPE=iodbc + ODBC_INCLUDE=-I$PHP_IODBC/include + ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR + ODBC_LIBS=-liodbc + cat >> confdefs.h <<\EOF +#define HAVE_IODBC 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_ODBC2 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_esoob=no + + +# Check whether --with-esoob or --without-esoob was given. +if test "${with_esoob+set}" = set; then + withval="$with_esoob" + PHP_ESOOB=$withval +else + + PHP_ESOOB=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_ESOOB=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_ESOOB in +shared,*) + PHP_ESOOB=`echo "$PHP_ESOOB"|$SED 's/^shared,//'` + ;; +shared) + PHP_ESOOB=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_ESOOB" != "no"; then + echo $ac_n "checking for Easysoft ODBC-ODBC Bridge support""... $ac_c" 1>&6 +echo "configure:67954: checking for Easysoft ODBC-ODBC Bridge support" >&5 + if test "$PHP_ESOOB" = "yes"; then + PHP_ESOOB=/usr/local/easysoft/oob/client + fi + ODBC_INCDIR=$PHP_ESOOB/include + ODBC_LIBDIR=$PHP_ESOOB/$PHP_LIBDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LIBS=-lesoobclient + ODBC_TYPE=esoob + cat >> confdefs.h <<\EOF +#define HAVE_ESOOB 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_unixodbc=no + + +# Check whether --with-unixODBC or --without-unixODBC was given. +if test "${with_unixODBC+set}" = set; then + withval="$with_unixODBC" + PHP_UNIXODBC=$withval +else + + PHP_UNIXODBC=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_UNIXODBC=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_UNIXODBC in +shared,*) + PHP_UNIXODBC=`echo "$PHP_UNIXODBC"|$SED 's/^shared,//'` + ;; +shared) + PHP_UNIXODBC=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_UNIXODBC" != "no"; then + echo $ac_n "checking for unixODBC support""... $ac_c" 1>&6 +echo "configure:68021: checking for unixODBC support" >&5 + if test "$PHP_UNIXODBC" = "yes"; then + PHP_UNIXODBC=/usr/local + fi + ODBC_INCDIR=$PHP_UNIXODBC/include + ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LIBS=-lodbc + ODBC_TYPE=unixODBC + +if ! test -f "$ODBC_INCDIR/sqlext.h"; then + { echo "configure: error: ODBC header file '$ODBC_INCDIR/sqlext.h' not found!" 1>&2; exit 1; } +fi + + cat >> confdefs.h <<\EOF +#define HAVE_UNIXODBC 1 +EOF + + echo "$ac_t""$ext_output" 1>&6 + fi +fi + +if test -z "$ODBC_TYPE"; then + +php_with_dbmaker=no + + +# Check whether --with-dbmaker or --without-dbmaker was given. +if test "${with_dbmaker+set}" = set; then + withval="$with_dbmaker" + PHP_DBMAKER=$withval +else + + PHP_DBMAKER=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_DBMAKER=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_DBMAKER in +shared,*) + PHP_DBMAKER=`echo "$PHP_DBMAKER"|$SED 's/^shared,//'` + ;; +shared) + PHP_DBMAKER=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + + + + + + + if test "$PHP_DBMAKER" != "no"; then + echo $ac_n "checking for DBMaker support""... $ac_c" 1>&6 +echo "configure:68093: checking for DBMaker support" >&5 + if test "$PHP_DBMAKER" = "yes"; then + # find dbmaker's home directory + DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'` + + # check DBMaker version (from 5.0 to 2.0) + DBMAKER_VERSION=5.0 + + while test ! -d $DBMAKER_HOME/$DBMAKER_VERSION -a "$DBMAKER_VERSION" != "2.9"; do + DM_VER=`echo $DBMAKER_VERSION | sed -e 's/\.//' | $AWK '{ print $1-1;}'` + MAJOR_V=`echo $DM_VER | $AWK '{ print $1/10; }' | $AWK -F. '{ print $1; }'` + MINOR_V=`echo $DM_VER | $AWK '{ print $1%10; }'` + DBMAKER_VERSION=$MAJOR_V.$MINOR_V + done + + if test "$DBMAKER_VERSION" = "2.9"; then + PHP_DBMAKER=$DBMAKER_HOME + else + PHP_DBMAKER=$DBMAKER_HOME/$DBMAKER_VERSION + fi + fi + + ODBC_INCDIR=$PHP_DBMAKER/include + ODBC_LIBDIR=$PHP_DBMAKER/$PHP_LIBDIR + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_INCLUDE=-I$ODBC_INCDIR + ODBC_LIBS="-ldmapic -lc" + ODBC_TYPE=dbmaker + + cat >> confdefs.h <<\EOF +#define HAVE_DBMAKER 1 +EOF + + + if test "$ext_shared" = "yes"; then + echo "$ac_t""yes (shared)" 1>&6 + ODBC_LIBS="-ldmapic -lc -lm" + ODBC_SHARED="odbc.la" + else + echo "$ac_t""yes (static)" 1>&6 + + + if test -n "$ODBC_LIBDIR"; then + + if test "$ODBC_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ODBC_LIBDIR" != "/usr/lib"; then + + if test -z "$ODBC_LIBDIR" || echo "$ODBC_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$ODBC_LIBDIR + else + + ep_dir="`echo $ODBC_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ODBC_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case dmapic in + c|c_r|pthread*) ;; + *) + LIBS="-ldmapic $LIBS" + ;; + esac + + + + + + if test "$ODBC_INCDIR" != "/usr/include"; then + + if test -z "$ODBC_INCDIR" || echo "$ODBC_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$ODBC_INCDIR + else + + ep_dir="`echo $ODBC_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ODBC_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ODBC_STATIC="libphpext_odbc.la" + fi + fi +fi + +if test -n "$ODBC_TYPE"; then + if test "$ODBC_TYPE" != "dbmaker"; then + + for ac_i in $ODBC_LFLAGS $ODBC_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + ODBC_SHARED_LIBADD="$ODBC_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + ODBC_SHARED_LIBADD="$ODBC_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + ODBC_SHARED_LIBADD="-L$ai_p $ODBC_SHARED_LIBADD" + test -n "$ld_runpath_switch" && ODBC_SHARED_LIBADD="$ld_runpath_switch$ai_p $ODBC_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + if test "$ODBC_TYPE" != "birdstep" && test "$ODBC_TYPE" != "solid"; then + cat >> confdefs.h <<\EOF +#define HAVE_SQLDATASOURCES 1 +EOF + + fi + fi + + cat >> confdefs.h <<\EOF +#define HAVE_UODBC 1 +EOF + + + PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_SHARED_LIBADD" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_INCDIR" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_LIBDIR" + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_INCLUDE" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_LIBS" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_LFLAGS" + + + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_TYPE" + + + + + + ext_builddir=ext/odbc + ext_srcdir=$abs_srcdir/ext/odbc + + ac_extra=`echo "$ODBC_INCLUDE"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_ODBC_SHARED=no + + + case ext/odbc in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/odbc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/odbc/"; ac_bdir="ext/odbc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_odbc.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:68645: checking whether to enable pcntl support" >&5 +# Check whether --enable-pcntl or --disable-pcntl was given. +if test "${enable_pcntl+set}" = set; then + enableval="$enable_pcntl" + PHP_PCNTL=$enableval +else + + PHP_PCNTL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PCNTL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PCNTL in +shared,*) + PHP_PCNTL=`echo "$PHP_PCNTL"|$SED 's/^shared,//'` + ;; +shared) + PHP_PCNTL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PCNTL" != "no"; then + + for ac_func in fork +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:68693: 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 < +/* Override any gcc2 internal prototype to avoid an 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:68721: \"$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 <> confdefs.h <<\EOF +#define HAVE_FORK 1 +EOF + +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: pcntl: fork() not supported by this platform" 1>&2; exit 1; } +fi +done + + for ac_func in waitpid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:68752: 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 < +/* Override any gcc2 internal prototype to avoid an 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:68780: \"$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 <> confdefs.h <<\EOF +#define HAVE_WAITPID 1 +EOF + +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: pcntl: fork() not supported by this platform" 1>&2; exit 1; } +fi +done + + for ac_func in sigaction +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:68811: 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 < +/* Override any gcc2 internal prototype to avoid an 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:68839: \"$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 <> confdefs.h <<\EOF +#define HAVE_SIGACTION 1 +EOF + +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: pcntl: sigaction() not supported by this platform" 1>&2; exit 1; } +fi +done + + for ac_func in getpriority setpriority wait3 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:68870: 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 < +/* Override any gcc2 internal prototype to avoid an 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:68898: \"$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 <&6 +fi +done + + + + ext_builddir=ext/pcntl + ext_srcdir=$abs_srcdir/ext/pcntl + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" != "cli"; then + PHP_PCNTL_SHARED=no + + + case ext/pcntl in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pcntl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pcntl/"; ac_bdir="ext/pcntl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pcntl.c php_signal.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:69213: checking whether to enable PDO support" >&5 +# Check whether --enable-pdo or --disable-pdo was given. +if test "${enable_pdo+set}" = set; then + enableval="$enable_pdo" + PHP_PDO=$enableval +else + + PHP_PDO=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO in +shared,*) + PHP_PDO=`echo "$PHP_PDO"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PDO" != "no"; then + + + pdo_running_under_pear=0 + case `pwd` in + /var/tmp/pear-build-*) + pdo_running_under_pear=1 + ;; + esac + + if test "$pdo_running_under_pear$PHP_PEAR_VERSION" = "1"; then + # we're running in an environment that smells like pear, + # and the PHP_PEAR_VERSION env var is not set. That implies + # that we're running under a slightly broken pear installer + { echo "configure: error: +PDO requires that you upgrade your PEAR installer tools. Please +do so now by running: + + % sudo pear upgrade pear + +or by manually downloading and installing PEAR version 1.3.5 or higher. + +Once you've upgraded, please re-try your PDO install. + " 1>&2; exit 1; } + fi + + + if test "$ext_shared" = "yes" ; then + case $host_alias in + *darwin*) + { echo "configure: error: +Due to the way that loadable modules work on OSX/Darwin, you need to +compile the PDO package statically into the PHP core. + +Please follow the instructions at: http://netevil.org/node.php?nid=202 +for more detail on this issue. + " 1>&2; exit 1; } + ext_shared=no + ;; + esac + fi + + ext_builddir=ext/pdo + ext_srcdir=$abs_srcdir/ext/pdo + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_SHARED=no + + + case ext/pdo in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo/"; ac_bdir="ext/pdo/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo, which depends on extension spl, +but you've either not enabled spl, or have disabled it. +" 1>&2; exit 1; } + fi + + + + + + + header_path=ext/pdo + for header_file in php_pdo.h php_pdo_driver.h; do + hp_hf="$header_path/$header_file" + + + unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INSTALLHEADERS$unique=set" + + INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf" + + fi + + done + + + + + + src=$ext_srcdir/Makefile.frag + ac_srcdir=$ext_srcdir + ac_builddir=$ext_builddir + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + +fi + + + +if test "$PHP_PDO" != "no"; then + +php_with_pdo_dblib=no + +echo $ac_n "checking for PDO_DBLIB support via FreeTDS""... $ac_c" 1>&6 +echo "configure:69638: checking for PDO_DBLIB support via FreeTDS" >&5 +# Check whether --with-pdo-dblib or --without-pdo-dblib was given. +if test "${with_pdo_dblib+set}" = set; then + withval="$with_pdo_dblib" + PHP_PDO_DBLIB=$withval +else + + PHP_PDO_DBLIB=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO_DBLIB=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO_DBLIB in +shared,*) + PHP_PDO_DBLIB=`echo "$PHP_PDO_DBLIB"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO_DBLIB=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +if test "$PHP_PDO_DBLIB" != "no"; then + + if test "$PHP_PDO_DBLIB" = "yes"; then + + for i in /usr/local /usr; do + if test -f $i/include/tds.h; then + PDO_FREETDS_INSTALLATION_DIR=$i + PDO_FREETDS_INCLUDE_DIR=$i/include + break + elif test -f $i/include/freetds/tds.h; then + PDO_FREETDS_INSTALLATION_DIR=$i + PDO_FREETDS_INCLUDE_DIR=$i/include/freetds + break; + fi + done + + if test -z "$PDO_FREETDS_INSTALLATION_DIR"; then + { echo "configure: error: Cannot find FreeTDS in known installation directories" 1>&2; exit 1; } + fi + + elif test "$PHP_PDO_DBLIB" != "no"; then + + if test -f $PHP_PDO_DBLIB/include/tds.h; then + PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB + PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include + elif test -f $PHP_PDO_DBLIB/include/freetds/tds.h; then + PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB + PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds + else + { echo "configure: error: Directory $PHP_PDO_DBLIB is not a FreeTDS installation directory" 1>&2; exit 1; } + fi + fi + + if test "x$PHP_LIBDIR" = "x" ; then + PHP_LIBDIR=lib + fi + + if test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a" && test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so"; then + { echo "configure: error: Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a|so" 1>&2; exit 1; } + fi + + + if test "$PDO_FREETDS_INCLUDE_DIR" != "/usr/include"; then + + if test -z "$PDO_FREETDS_INCLUDE_DIR" || echo "$PDO_FREETDS_INCLUDE_DIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_FREETDS_INCLUDE_DIR + else + + ep_dir="`echo $PDO_FREETDS_INCLUDE_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_FREETDS_INCLUDE_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + PDO_DBLIB_SHARED_LIBADD="-lsybdb $PDO_DBLIB_SHARED_LIBADD" + if test -n "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR"; then + + if test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" || echo "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_DBLIB_SHARED_LIBADD="-L$ai_p $PDO_DBLIB_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_DBLIB_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_DBLIB_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR"; then + + if test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" || echo "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case sybdb in + c|c_r|pthread*) ;; + *) + LIBS="-lsybdb $LIBS" + ;; + esac + + + + + fi + + + + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:69855: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:69861: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +{ echo "configure: error: Cannot find php_pdo_driver.h." 1>&2; exit 1; } + fi + + + + PDO_DBLIB_DEFS="-DPDO_DBLIB_FLAVOUR=\\\"freetds\\\"" + + ext_builddir=ext/pdo_dblib + ext_srcdir=$abs_srcdir/ext/pdo_dblib + + ac_extra=`echo "-I$pdo_inc_path $PDO_DBLIB_DEFS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_DBLIB_SHARED=no + + + case ext/pdo_dblib in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo_dblib"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo_dblib/"; ac_bdir="ext/pdo_dblib/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pdo_dblib.c dblib_driver.c dblib_stmt.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:70164: 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 <&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 "$ext_shared" = "yes"; then + PDO_DBLIB_SHARED_LIBADD="-ldnet_stub $PDO_DBLIB_SHARED_LIBADD" + if test -n ""; then + + if test "" != "/usr/$PHP_LIBDIR" && test "" != "/usr/lib"; then + + if test -z "" || echo "" | grep '^/' >/dev/null ; then + ai_p= + else + + ep_dir="`echo |$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_DBLIB_SHARED_LIBADD="-L$ai_p $PDO_DBLIB_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_DBLIB_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_DBLIB_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n ""; then + + if test "" != "/usr/$PHP_LIBDIR" && test "" != "/usr/lib"; then + + if test -z "" || echo "" | grep '^/' >/dev/null ; then + ai_p= + else + + ep_dir="`echo |$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case dnet_stub in + c|c_r|pthread*) ;; + *) + LIBS="-ldnet_stub $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBDNET_STUB 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + cat >> confdefs.h <<\EOF +#define HAVE_PDO_DBLIB 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_FREETDS 1 +EOF + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_DBLIB_SHARED_LIBADD" + + + + + am_i_shared=$PHP_PDO_DBLIB_SHARED + is_it_shared=$PHP_PDO_SHARED + is_it_enabled=$PHP_PDO + if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then + { echo "configure: error: +You've configured extension pdo_dblib to build statically, but it +depends on extension pdo, which you've configured to build shared. +You either need to build pdo_dblib shared or build pdo statically for the +build to be successful. +" 1>&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo_dblib, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + + +fi + +fi + + +if test "$PHP_PDO" != "no"; then + + +php_with_pdo_firebird=no + +echo $ac_n "checking for Firebird support for PDO""... $ac_c" 1>&6 +echo "configure:70348: checking for Firebird support for PDO" >&5 +# Check whether --with-pdo-firebird or --without-pdo-firebird was given. +if test "${with_pdo_firebird+set}" = set; then + withval="$with_pdo_firebird" + PHP_PDO_FIREBIRD=$withval +else + + PHP_PDO_FIREBIRD=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO_FIREBIRD=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO_FIREBIRD in +shared,*) + PHP_PDO_FIREBIRD=`echo "$PHP_PDO_FIREBIRD"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO_FIREBIRD=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PDO_FIREBIRD" != "no"; then + if test "$PHP_PDO_FIREBIRD" = "yes"; then + FIREBIRD_INCDIR=/opt/firebird/include + FIREBIRD_LIBDIR=/opt/firebird/lib + else + FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include + FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$FIREBIRD_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6 +echo "configure:70498: checking for isc_detach_database in -lfbclient" >&5 +ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lfbclient $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + FIREBIRD_LIBNAME=fbclient + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_fbclient_isc_detach_database + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$FIREBIRD_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6 +echo "configure:70644: checking for isc_detach_database in -lgds" >&5 +ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgds $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + FIREBIRD_LIBNAME=gds + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_gds_isc_detach_database + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$FIREBIRD_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6 +echo "configure:70790: checking for isc_detach_database in -lib_util" >&5 +ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lib_util $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + FIREBIRD_LIBNAME=ib_util + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ib_util_isc_detach_database + + { echo "configure: error: libfbclient, libgds or libib_util not found! Check config.log for more information." 1>&2; exit 1; } + + +fi + + + +fi + + + +fi + + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:70854: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:70860: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +{ echo "configure: error: Cannot find php_pdo_driver.h." 1>&2; exit 1; } + fi + + + + + if test "$ext_shared" = "yes"; then + PDO_FIREBIRD_SHARED_LIBADD="-l$FIREBIRD_LIBNAME $PDO_FIREBIRD_SHARED_LIBADD" + if test -n "$FIREBIRD_LIBDIR"; then + + if test "$FIREBIRD_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FIREBIRD_LIBDIR" != "/usr/lib"; then + + if test -z "$FIREBIRD_LIBDIR" || echo "$FIREBIRD_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FIREBIRD_LIBDIR + else + + ep_dir="`echo $FIREBIRD_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FIREBIRD_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_FIREBIRD_SHARED_LIBADD="-L$ai_p $PDO_FIREBIRD_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_FIREBIRD_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_FIREBIRD_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$FIREBIRD_LIBDIR"; then + + if test "$FIREBIRD_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FIREBIRD_LIBDIR" != "/usr/lib"; then + + if test -z "$FIREBIRD_LIBDIR" || echo "$FIREBIRD_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$FIREBIRD_LIBDIR + else + + ep_dir="`echo $FIREBIRD_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FIREBIRD_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $FIREBIRD_LIBNAME in + c|c_r|pthread*) ;; + *) + LIBS="-l$FIREBIRD_LIBNAME $LIBS" + ;; + esac + + + + + fi + + + + if test "$FIREBIRD_INCDIR" != "/usr/include"; then + + if test -z "$FIREBIRD_INCDIR" || echo "$FIREBIRD_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$FIREBIRD_INCDIR + else + + ep_dir="`echo $FIREBIRD_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$FIREBIRD_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_PDO_FIREBIRD 1 +EOF + + + ext_builddir=ext/pdo_firebird + ext_srcdir=$abs_srcdir/ext/pdo_firebird + + ac_extra=`echo "-I$pdo_inc_path"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_FIREBIRD_SHARED=no + + + case ext/pdo_firebird in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo_firebird"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo_firebird/"; ac_bdir="ext/pdo_firebird/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pdo_firebird.c firebird_driver.c firebird_statement.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo_firebird, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + +fi + +fi + + +if test "$PHP_PDO" != "no"; then + + + + +php_with_pdo_mysql=no + +echo $ac_n "checking for MySQL support for PDO""... $ac_c" 1>&6 +echo "configure:71327: checking for MySQL support for PDO" >&5 +# Check whether --with-pdo-mysql or --without-pdo-mysql was given. +if test "${with_pdo_mysql+set}" = set; then + withval="$with_pdo_mysql" + PHP_PDO_MYSQL=$withval +else + + PHP_PDO_MYSQL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO_MYSQL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO_MYSQL in +shared,*) + PHP_PDO_MYSQL=`echo "$PHP_PDO_MYSQL"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO_MYSQL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_ZLIB_DIR"; then + +php_with_zlib_dir=no + +echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +echo "configure:71375: checking for the location of libz" >&5 +# Check whether --with-zlib-dir or --without-zlib-dir was given. +if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" + PHP_ZLIB_DIR=$withval +else + + PHP_ZLIB_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ZLIB_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ZLIB_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_PDO_MYSQL" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_MYSQL 1 +EOF + + + echo $ac_n "checking for mysql_config""... $ac_c" 1>&6 +echo "configure:71405: checking for mysql_config" >&5 + + if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then + PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL + elif test "$PHP_PDO_MYSQL" != "yes"; then + if test -d "$PHP_PDO_MYSQL" ; then + if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then + PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config" + else + PDO_MYSQL_DIR="$PHP_PDO_MYSQL" + fi + else + echo "$ac_t""$PHP_PDO_MYSQL is not a directory" 1>&6 + { echo "configure: error: can not find mysql under the "$PHP_PDO_MYSQL" that you specified" 1>&2; exit 1; } + fi + else + for i in /usr/local /usr ; do + if test -x "$i/bin/mysql_config" ; then + PDO_MYSQL_CONFIG="$i/bin/mysql_config" + break; + fi + if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then + PDO_MYSQL_DIR="$i" + break; + fi + done + fi + + if test -n "$PDO_MYSQL_CONFIG" && test -x "$PDO_MYSQL_CONFIG" ; then + echo "$ac_t""$PDO_MYSQL_CONFIG" 1>&6 + if test "x$SED" = "x"; then + # Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:71439: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$SED" in + /*) + ac_cv_path_SED="$SED" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_SED="$SED" # 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_SED="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +SED="$ac_cv_path_SED" +if test -n "$SED"; then + echo "$ac_t""$SED" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + if test "$enable_maintainer_zts" = "yes"; then + PDO_MYSQL_LIBNAME=mysqlclient_r + PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs_r | $SED -e "s/'//g"` + else + PDO_MYSQL_LIBNAME=mysqlclient + PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"` + fi + PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"` + PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket` + elif test -z "$PDO_MYSQL_DIR"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Cannot find MySQL header files under $PDO_MYSQL_DIR" 1>&2; exit 1; } + else + echo "$ac_t""not found" 1>&6 + echo $ac_n "checking for mysql install under $PDO_MYSQL_DIR""... $ac_c" 1>&6 +echo "configure:71487: checking for mysql install under $PDO_MYSQL_DIR" >&5 + if test -r $PDO_MYSQL_DIR/include/mysql; then + PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include/mysql + else + PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include + fi + if test -r $PDO_MYSQL_DIR/$PHP_LIBDIR/mysql; then + PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR/mysql + else + PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR + fi + + if test -r "$PDO_MYSQL_LIB_DIR"; then + echo "$ac_t""libs under $PDO_MYSQL_LIB_DIR; seems promising" 1>&6 + else + echo "$ac_t""can not find it" 1>&6 + { echo "configure: error: Unable to find your mysql installation" 1>&2; exit 1; } + fi + + + + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="-l$PDO_MYSQL_LIBNAME $PDO_MYSQL_SHARED_LIBADD" + if test -n "$PDO_MYSQL_LIB_DIR"; then + + if test "$PDO_MYSQL_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PDO_MYSQL_LIB_DIR" != "/usr/lib"; then + + if test -z "$PDO_MYSQL_LIB_DIR" || echo "$PDO_MYSQL_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_MYSQL_LIB_DIR + else + + ep_dir="`echo $PDO_MYSQL_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_MYSQL_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="-L$ai_p $PDO_MYSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_MYSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_MYSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PDO_MYSQL_LIB_DIR"; then + + if test "$PDO_MYSQL_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PDO_MYSQL_LIB_DIR" != "/usr/lib"; then + + if test -z "$PDO_MYSQL_LIB_DIR" || echo "$PDO_MYSQL_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_MYSQL_LIB_DIR + else + + ep_dir="`echo $PDO_MYSQL_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_MYSQL_LIB_DIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $PDO_MYSQL_LIBNAME in + c|c_r|pthread*) ;; + *) + LIBS="-l$PDO_MYSQL_LIBNAME $LIBS" + ;; + esac + + + + + fi + + + + if test "$PDO_MYSQL_INC_DIR" != "/usr/include"; then + + if test -z "$PDO_MYSQL_INC_DIR" || echo "$PDO_MYSQL_INC_DIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_MYSQL_INC_DIR + else + + ep_dir="`echo $PDO_MYSQL_INC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_MYSQL_INC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + PDO_MYSQL_INCLUDE=-I$PDO_MYSQL_INC_DIR + fi + + cat >> confdefs.h </dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6 +echo "configure:71741: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 +ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$PDO_MYSQL_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + for ac_i in $PDO_MYSQL_INCLUDE; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + for ac_i in $PDO_MYSQL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="$PDO_MYSQL_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="$PDO_MYSQL_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="-L$ai_p $PDO_MYSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_MYSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_MYSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$PDO_MYSQL_LIBNAME_mysql_query + + if test "$PHP_ZLIB_DIR" != "no"; then + + + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="-lz $PDO_MYSQL_SHARED_LIBADD" + if test -n "$PHP_ZLIB_DIR"; then + + if test "$PHP_ZLIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR" || echo "$PHP_ZLIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR + else + + ep_dir="`echo $PHP_ZLIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="-L$ai_p $PDO_MYSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_MYSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_MYSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PHP_ZLIB_DIR"; then + + if test "$PHP_ZLIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR" || echo "$PHP_ZLIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR + else + + ep_dir="`echo $PHP_ZLIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PHP_ZLIB_DIR/$PHP_LIBDIR -L$PDO_MYSQL_LIB_DIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6 +echo "configure:72113: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 +ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$PDO_MYSQL_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$PDO_MYSQL_LIBNAME_mysql_query + + { echo "configure: error: PDO_MYSQL configure failed. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + PDO_MYSQL_LIBS="$PDO_MYSQL_LIBS -L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz" + else + + + case z in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="-lz $PDO_MYSQL_SHARED_LIBADD" + else + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + fi + ;; + esac + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_MYSQL_LIB_DIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6 +echo "configure:72287: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 +ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$PDO_MYSQL_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$PDO_MYSQL_LIBNAME_mysql_query + + { echo "configure: error: Try adding --with-zlib-dir=. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + PDO_MYSQL_LIBS="$PDO_MYSQL_LIBS -lz" + fi + + + for ac_i in $PDO_MYSQL_INCLUDE; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + for ac_i in $PDO_MYSQL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="$PDO_MYSQL_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="$PDO_MYSQL_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_MYSQL_SHARED_LIBADD="-L$ai_p $PDO_MYSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_MYSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_MYSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + +fi + + _SAVE_LIBS=$LIBS + LIBS="$LIBS $PDO_MYSQL_LIBS" + for ac_func in mysql_commit mysql_stmt_prepare mysql_next_result mysql_sqlstate +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:72479: 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 < +/* Override any gcc2 internal prototype to avoid an 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:72507: \"$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 <&6 +fi +done + + LIBS=$_SAVE_LIBS + + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:72536: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:72542: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +{ echo "configure: error: Cannot find php_pdo_driver.h." 1>&2; exit 1; } + fi + + + + + ext_builddir=ext/pdo_mysql + ext_srcdir=$abs_srcdir/ext/pdo_mysql + + ac_extra=`echo "-I$pdo_inc_path"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_MYSQL_SHARED=no + + + case ext/pdo_mysql in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo_mysql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo_mysql/"; ac_bdir="ext/pdo_mysql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pdo_mysql.c mysql_driver.c mysql_statement.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo_mysql, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + + + PDO_MYSQL_MODULE_TYPE=external + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_MYSQL_SHARED_LIBADD" + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_MYSQL_MODULE_TYPE" + + + +fi + +fi + + +if test "$PHP_PDO" != "no"; then + + + + + + +php_with_pdo_oci=no + +echo $ac_n "checking Oracle OCI support for PDO""... $ac_c" 1>&6 +echo "configure:72890: checking Oracle OCI support for PDO" >&5 +# Check whether --with-pdo-oci or --without-pdo-oci was given. +if test "${with_pdo_oci+set}" = set; then + withval="$with_pdo_oci" + PHP_PDO_OCI=$withval +else + + PHP_PDO_OCI=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO_OCI=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO_OCI in +shared,*) + PHP_PDO_OCI=`echo "$PHP_PDO_OCI"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO_OCI=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PDO_OCI" != "no"; then + echo $ac_n "checking Oracle Install-Dir""... $ac_c" 1>&6 +echo "configure:72935: checking Oracle Install-Dir" >&5 + if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then + PDO_OCI_DIR=$ORACLE_HOME + else + PDO_OCI_DIR=$PHP_PDO_OCI + fi + echo "$ac_t""$PHP_PDO_OCI" 1>&6 + + echo $ac_n "checking if that is sane""... $ac_c" 1>&6 +echo "configure:72944: checking if that is sane" >&5 + if test -z "$PDO_OCI_DIR"; then + { echo "configure: error: +You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_HOME. +" 1>&2; exit 1; } + else + echo "$ac_t""yes" 1>&6 + fi + + if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then + PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`" + PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`" + echo $ac_n "checking for oci.h""... $ac_c" 1>&6 +echo "configure:72957: checking for oci.h" >&5 + if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then + + if test "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" != "/usr/include"; then + + if test -z "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" || echo "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client + else + + ep_dir="`echo $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + echo "$ac_t""$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" 1>&6 + elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then + + if test "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include" != "/usr/include"; then + + if test -z "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include" || echo "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include + else + + ep_dir="`echo $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + echo "$ac_t""$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include" 1>&6 + elif test -f $PDO_OCI_IC_PREFIX/sdk/include/oci.h ; then + + if test "$PDO_OCI_IC_PREFIX/sdk/include" != "/usr/include"; then + + if test -z "$PDO_OCI_IC_PREFIX/sdk/include" || echo "$PDO_OCI_IC_PREFIX/sdk/include" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_IC_PREFIX/sdk/include + else + + ep_dir="`echo $PDO_OCI_IC_PREFIX/sdk/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_IC_PREFIX/sdk/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + echo "$ac_t""$PDO_OCI_IC_PREFIX/sdk/include" 1>&6 + elif test -f $PDO_OCI_IC_PREFIX/client/include/oci.h ; then + + if test "$PDO_OCI_IC_PREFIX/client/include" != "/usr/include"; then + + if test -z "$PDO_OCI_IC_PREFIX/client/include" || echo "$PDO_OCI_IC_PREFIX/client/include" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_IC_PREFIX/client/include + else + + ep_dir="`echo $PDO_OCI_IC_PREFIX/client/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_IC_PREFIX/client/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + echo "$ac_t""$PDO_OCI_IC_PREFIX/client/include" 1>&6 + else + { echo "configure: error: I'm too dumb to figure out where the include dir is in your Instant Client install" 1>&2; exit 1; } + fi + if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so" ; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" + elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.so" ; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib" + elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" + else + { echo "configure: error: I'm too dumb to figure out where the libraries are in your Instant Client install" 1>&2; exit 1; } + fi + PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`" + else + + echo $ac_n "checking size of long int""... $ac_c" 1>&6 +echo "configure:73106: checking size of long int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long_int=4 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long int)); + return(0); +} +EOF +if { (eval echo configure:73125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_int=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:73145: checking if we're on a 64-bit platform" >&5 + if test "$ac_cv_sizeof_long_int" = "4" ; then + echo "$ac_t""no" 1>&6 + TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32" + else + echo "$ac_t""yes" 1>&6 + TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib" + fi + + echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6 +echo "configure:73155: checking OCI8 libraries dir" >&5 + if test -d "$PDO_OCI_DIR/lib" && test ! -d "$PDO_OCI_DIR/lib32"; then + PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib" + elif test ! -d "$PDO_OCI_DIR/lib" && test -d "$PDO_OCI_DIR/lib32"; then + PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32" + elif test -d "$PDO_OCI_DIR/lib" && test -d "$PDO_OCI_DIR/lib32"; then + PDO_OCI_LIB_DIR=$TMP_PDO_OCI_LIB_DIR + else + { echo "configure: error: Oracle (OCI8) required libraries not found" 1>&2; exit 1; } + fi + echo "$ac_t""$PDO_OCI_LIB_DIR" 1>&6 + + + if test -d "$PDO_OCI_DIR/rdbms/public"; then + + if test "$PDO_OCI_DIR/rdbms/public" != "/usr/include"; then + + if test -z "$PDO_OCI_DIR/rdbms/public" || echo "$PDO_OCI_DIR/rdbms/public" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_DIR/rdbms/public + else + + ep_dir="`echo $PDO_OCI_DIR/rdbms/public|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_DIR/rdbms/public\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/rdbms/public" + fi + if test -d "$PDO_OCI_DIR/rdbms/demo"; then + + if test "$PDO_OCI_DIR/rdbms/demo" != "/usr/include"; then + + if test -z "$PDO_OCI_DIR/rdbms/demo" || echo "$PDO_OCI_DIR/rdbms/demo" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_DIR/rdbms/demo + else + + ep_dir="`echo $PDO_OCI_DIR/rdbms/demo|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_DIR/rdbms/demo\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/rdbms/demo" + fi + if test -d "$PDO_OCI_DIR/network/public"; then + + if test "$PDO_OCI_DIR/network/public" != "/usr/include"; then + + if test -z "$PDO_OCI_DIR/network/public" || echo "$PDO_OCI_DIR/network/public" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_DIR/network/public + else + + ep_dir="`echo $PDO_OCI_DIR/network/public|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_DIR/network/public\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/network/public" + fi + if test -d "$PDO_OCI_DIR/plsql/public"; then + + if test "$PDO_OCI_DIR/plsql/public" != "/usr/include"; then + + if test -z "$PDO_OCI_DIR/plsql/public" || echo "$PDO_OCI_DIR/plsql/public" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_DIR/plsql/public + else + + ep_dir="`echo $PDO_OCI_DIR/plsql/public|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_DIR/plsql/public\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/plsql/public" + fi + if test -d "$PDO_OCI_DIR/include"; then + + if test "$PDO_OCI_DIR/include" != "/usr/include"; then + + if test -z "$PDO_OCI_DIR/include" || echo "$PDO_OCI_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_DIR/include + else + + ep_dir="`echo $PDO_OCI_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/include" + fi + + if test -f "$PDO_OCI_LIB_DIR/sysliblist"; then + + for ac_i in `cat $PDO_OCI_LIB_DIR/sysliblist`; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + PDO_OCI_SYSLIB="$PDO_OCI_SYSLIB -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SYSLIB="$PDO_OCI_SYSLIB -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SYSLIB="-L$ai_p $PDO_OCI_SYSLIB" + test -n "$ld_runpath_switch" && PDO_OCI_SYSLIB="$ld_runpath_switch$ai_p $PDO_OCI_SYSLIB" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + elif test -f "$PDO_OCI_DIR/rdbms/lib/sysliblist"; then + + for ac_i in `cat $PDO_OCI_DIR/rdbms/lib/sysliblist`; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + PDO_OCI_SYSLIB="$PDO_OCI_SYSLIB -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SYSLIB="$PDO_OCI_SYSLIB -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SYSLIB="-L$ai_p $PDO_OCI_SYSLIB" + test -n "$ld_runpath_switch" && PDO_OCI_SYSLIB="$ld_runpath_switch$ai_p $PDO_OCI_SYSLIB" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + fi + + echo $ac_n "checking Oracle version""... $ac_c" 1>&6 +echo "configure:73522: checking Oracle version" >&5 + if test -s "$PDO_OCI_DIR/orainst/unix.rgs"; then + PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4` + test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then + PDO_OCI_VERSION=11.1 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then + PDO_OCI_VERSION=10.1 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then + PDO_OCI_VERSION=9.0 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then + PDO_OCI_VERSION=8.1 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then + PDO_OCI_VERSION=8.0 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.a; then + if test -f $PDO_OCI_LIB_DIR/libcore4.a; then + PDO_OCI_VERSION=8.0 + else + PDO_OCI_VERSION=8.1 + fi + else + { echo "configure: error: Oracle OCI libraries not found under $PDO_OCI_DIR" 1>&2; exit 1; } + fi + echo "$ac_t""$PDO_OCI_VERSION" 1>&6 + + fi + + case $PDO_OCI_VERSION in + 8.0) + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-lnlsrtl3 $PDO_OCI_SHARED_LIBADD" + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-L$ai_p $PDO_OCI_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_OCI_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_OCI_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case nlsrtl3 in + c|c_r|pthread*) ;; + *) + LIBS="-lnlsrtl3 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-lcore4 $PDO_OCI_SHARED_LIBADD" + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-L$ai_p $PDO_OCI_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_OCI_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_OCI_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case core4 in + c|c_r|pthread*) ;; + *) + LIBS="-lcore4 $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-lpsa $PDO_OCI_SHARED_LIBADD" + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-L$ai_p $PDO_OCI_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_OCI_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_OCI_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n """"; then + + if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then + + if test -z """" || echo """" | grep '^/' >/dev/null ; then + ai_p="" + else + + ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"""\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case psa in + c|c_r|pthread*) ;; + *) + LIBS="-lpsa $LIBS" + ;; + esac + + + + + fi + + + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-lclntsh $PDO_OCI_SHARED_LIBADD" + if test -n "$PDO_OCI_LIB_DIR"; then + + if test "$PDO_OCI_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PDO_OCI_LIB_DIR" != "/usr/lib"; then + + if test -z "$PDO_OCI_LIB_DIR" || echo "$PDO_OCI_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_LIB_DIR + else + + ep_dir="`echo $PDO_OCI_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-L$ai_p $PDO_OCI_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_OCI_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_OCI_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PDO_OCI_LIB_DIR"; then + + if test "$PDO_OCI_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PDO_OCI_LIB_DIR" != "/usr/lib"; then + + if test -z "$PDO_OCI_LIB_DIR" || echo "$PDO_OCI_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_LIB_DIR + else + + ep_dir="`echo $PDO_OCI_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_LIB_DIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="-lclntsh $LIBS" + ;; + esac + + + + + fi + + + ;; + + 8.1) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="$PDO_OCI_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + ;; + + 9.0) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="$PDO_OCI_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + ;; + + 10.1) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="$PDO_OCI_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + ;; + + 10.2) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="$PDO_OCI_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + ;; + + 11.1) + + + case clntsh in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="$PDO_OCI_SHARED_LIBADD -lclntsh" + else + + + case clntsh in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -lclntsh" + ;; + esac + + + fi + ;; + esac + + + ;; + + *) + { echo "configure: error: Unsupported Oracle version! $PDO_OCI_VERSION" 1>&2; exit 1; } + ;; + esac + + + if test "$PDO_OCI_LIB_DIR" != "/usr/$PHP_LIBDIR" && test "$PDO_OCI_LIB_DIR" != "/usr/lib"; then + + if test -z "$PDO_OCI_LIB_DIR" || echo "$PDO_OCI_LIB_DIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_OCI_LIB_DIR + else + + ep_dir="`echo $PDO_OCI_LIB_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_OCI_LIB_DIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="-L$ai_p $PDO_OCI_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_OCI_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_OCI_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6 +echo "configure:74213: checking for OCIEnvCreate in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCIENVCREATE 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIEnvCreate + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6 +echo "configure:74366: checking for OCIEnvNlsCreate in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCIENVNLSCREATE 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIEnvNlsCreate + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6 +echo "configure:74519: checking for OCILobIsTemporary in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCILOBISTEMPORARY 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCILobIsTemporary + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6 +echo "configure:74668: checking for OCILobIsTemporary in -locijdbc8" >&5 +ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-locijdbc8 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case ocijdbc8 in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_OCI_SHARED_LIBADD="$PDO_OCI_SHARED_LIBADD -locijdbc8" + else + + + case ocijdbc8 in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -locijdbc8" + ;; + esac + + + fi + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_OCILOBISTEMPORARY 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ocijdbc8_OCILobIsTemporary + + +fi + + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6 +echo "configure:74848: checking for OCICollAssign in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCICOLLASSIGN 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCICollAssign + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for OCIStmtFetch2 in -lclntsh""... $ac_c" 1>&6 +echo "configure:75001: checking for OCIStmtFetch2 in -lclntsh" >&5 +ac_lib_var=`echo clntsh'_'OCIStmtFetch2 | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lclntsh $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_OCISTMTFETCH2 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_clntsh_OCIStmtFetch2 + + +fi + + + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:75059: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:75065: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +{ echo "configure: error: Cannot find php_pdo_driver.h." 1>&2; exit 1; } + fi + + + + + ext_builddir=ext/pdo_oci + ext_srcdir=$abs_srcdir/ext/pdo_oci + + ac_extra=`echo "-I$pdo_inc_path"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_OCI_SHARED=no + + + case ext/pdo_oci in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo_oci"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo_oci/"; ac_bdir="ext/pdo_oci/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pdo_oci.c oci_driver.c oci_statement.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo_oci, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + + + + cat >> confdefs.h <&6 +echo "configure:75425: checking for ODBC v3 support for PDO" >&5 +# Check whether --with-pdo-odbc or --without-pdo-odbc was given. +if test "${with_pdo_odbc+set}" = set; then + withval="$with_pdo_odbc" + PHP_PDO_ODBC=$withval +else + + PHP_PDO_ODBC=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO_ODBC=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO_ODBC in +shared,*) + PHP_PDO_ODBC=`echo "$PHP_PDO_ODBC"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO_ODBC=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + + + +if test "$PHP_PDO_ODBC" != "no"; then + + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:75476: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:75482: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +{ echo "configure: error: Cannot find php_pdo_driver.h." 1>&2; exit 1; } + fi + + + + echo $ac_n "checking for selected PDO ODBC flavour""... $ac_c" 1>&6 +echo "configure:75503: checking for selected PDO ODBC flavour" >&5 + + pdo_odbc_flavour="`echo $PHP_PDO_ODBC | cut -d, -f1`" + pdo_odbc_dir="`echo $PHP_PDO_ODBC | cut -d, -f2`" + + if test "$pdo_odbc_dir" = "$PHP_PDO_ODBC" ; then + pdo_odbc_dir= + fi + + case $pdo_odbc_flavour in + ibm-db2) + pdo_odbc_def_libdir=/home/db2inst1/sqllib/lib + pdo_odbc_def_incdir=/home/db2inst1/sqllib/include + pdo_odbc_def_lib=db2 + ;; + + unixODBC|unixodbc) + pdo_odbc_def_libdir=/usr/local/$PHP_LIBDIR + pdo_odbc_def_incdir=/usr/local/include + pdo_odbc_def_lib=odbc + ;; + + ODBCRouter|odbcrouter) + pdo_odbc_def_libdir=/usr/$PHP_LIBDIR + pdo_odbc_def_incdir=/usr/include + pdo_odbc_def_lib=odbcsdk + ;; + + generic) + pdo_odbc_def_lib="`echo $PHP_PDO_ODBC | cut -d, -f3`" + pdo_odbc_def_ldflags="`echo $PHP_PDO_ODBC | cut -d, -f4`" + pdo_odbc_def_cflags="`echo $PHP_PDO_ODBC | cut -d, -f5`" + pdo_odbc_flavour="generic-$pdo_odbc_def_lib" + ;; + + *) + { echo "configure: error: Unknown ODBC flavour $pdo_odbc_flavour + include and lib dirs are looked for under 'dir'. + + 'flavour' can be one of: ibm-db2, unixODBC, generic + If ',dir' part is omitted, default for the flavour + you have selected will used. e.g.: + + --with-pdo-odbc=unixODBC + + will check for unixODBC under /usr/local. You may attempt + to use an otherwise unsupported driver using the \"generic\" + flavour. The syntax for generic ODBC support is: + + --with-pdo-odbc=generic,dir,libname,ldflags,cflags + + When build as shared the extension filename is always pdo_odbc.so" 1>&2; exit 1; } + ;; + esac + + if test -n "$pdo_odbc_dir"; then + PDO_ODBC_INCDIR="$pdo_odbc_dir/include" + PDO_ODBC_LIBDIR="$pdo_odbc_dir/$PHP_LIBDIR" + else + PDO_ODBC_INCDIR="$pdo_odbc_def_incdir" + PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir" + fi + + echo "$ac_t""$pdo_odbc_flavour + libs $PDO_ODBC_LIBDIR, + headers $PDO_ODBC_INCDIR" 1>&6 + + if test ! -d "$PDO_ODBC_LIBDIR" ; then + echo "configure: warning: library dir $PDO_ODBC_LIBDIR does not exist" 1>&2 + fi + + + echo $ac_n "checking for odbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75576: checking for odbc.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/odbc.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_ODBC_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for odbcsdk.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75590: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/odbcsdk.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_ODBCSDK_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for iodbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75604: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/iodbc.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_IODBC_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for sqlunix.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75618: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlunix.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_SQLUNIX_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for sqltypes.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75632: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqltypes.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_SQLTYPES_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for sqlucode.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75646: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlucode.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_SQLUCODE_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for sql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75660: checking for sql.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sql.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_SQL_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for isql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75674: checking for isql.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/isql.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_ISQL_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for sqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75688: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_SQLEXT_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for isqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75702: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/isqlext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_ISQLEXT_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for udbcext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75716: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/udbcext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_UDBCEXT_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for sqlcli1.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75730: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlcli1.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_SQLCLI1_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for LibraryManager.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75744: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/LibraryManager.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_LIBRARYMANAGER_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for cli0core.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75758: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0core.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_CLI0CORE_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for cli0ext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75772: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0ext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_CLI0EXT_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for cli0cli.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75786: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0cli.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_CLI0CLI_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for cli0defs.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75800: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0defs.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_CLI0DEFS_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking for cli0env.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +echo "configure:75814: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0env.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +#define HAVE_CLI0ENV_H 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + if test "$php_pdo_have_header" != "yes"; then + { echo "configure: error: Cannot find header file(s) for pdo_odbc" 1>&2; exit 1; } + fi + + PDO_ODBC_INCLUDE="$pdo_odbc_def_cflags -I$PDO_ODBC_INCDIR -DPDO_ODBC_TYPE=\\\"$pdo_odbc_flavour\\\"" + PDO_ODBC_LDFLAGS="$pdo_odbc_def_ldflags -L$PDO_ODBC_LIBDIR -l$pdo_odbc_def_lib" + + + for ac_i in $PDO_ODBC_LDFLAGS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + PDO_ODBC_SHARED_LIBADD="$PDO_ODBC_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_ODBC_SHARED_LIBADD="$PDO_ODBC_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_ODBC_SHARED_LIBADD="-L$ai_p $PDO_ODBC_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_ODBC_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_ODBC_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="$PDO_ODBC_LDFLAGS" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SQLBindCol in -l$pdo_odbc_def_lib""... $ac_c" 1>&6 +echo "configure:76020: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5 +ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLBindCol | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$pdo_odbc_def_lib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="$PDO_ODBC_LDFLAGS" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SQLAllocHandle in -l$pdo_odbc_def_lib""... $ac_c" 1>&6 +echo "configure:76154: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5 +ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLAllocHandle | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$pdo_odbc_def_lib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$pdo_odbc_def_lib_SQLAllocHandle + + { echo "configure: error: +Your ODBC library does not appear to be ODBC 3 compatible. +You should consider using unixODBC instead, and loading your +libraries as a driver in that environment; it will emulate the +functions required for PDO support. +" 1>&2; exit 1; } + +fi + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$pdo_odbc_def_lib_SQLBindCol + + { echo "configure: error: Your ODBC library does not exist or there was an error. Check config.log for more information" 1>&2; exit 1; } + + +fi + + + + ext_builddir=ext/pdo_odbc + ext_srcdir=$abs_srcdir/ext/pdo_odbc + + ac_extra=`echo "-I$pdo_inc_path $PDO_ODBC_INCLUDE"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_ODBC_SHARED=no + + + case ext/pdo_odbc in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo_odbc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo_odbc/"; ac_bdir="ext/pdo_odbc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pdo_odbc.c odbc_driver.c odbc_stmt.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo_odbc, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + + +fi + +fi + + +if test "$PHP_PDO" != "no"; then + + +php_with_pdo_pgsql=no + +echo $ac_n "checking for PostgreSQL support for PDO""... $ac_c" 1>&6 +echo "configure:76540: checking for PostgreSQL support for PDO" >&5 +# Check whether --with-pdo-pgsql or --without-pdo-pgsql was given. +if test "${with_pdo_pgsql+set}" = set; then + withval="$with_pdo_pgsql" + PHP_PDO_PGSQL=$withval +else + + PHP_PDO_PGSQL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO_PGSQL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO_PGSQL in +shared,*) + PHP_PDO_PGSQL=`echo "$PHP_PDO_PGSQL"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO_PGSQL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PDO_PGSQL" != "no"; then + + if test -z "$PGSQL_INCLUDE" || echo "$PGSQL_INCLUDE" | grep '^/' >/dev/null ; then + PGSQL_INCLUDE=$PGSQL_INCLUDE + else + + ep_dir="`echo $PGSQL_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + PGSQL_INCLUDE="$ep_realdir/`basename \"$PGSQL_INCLUDE\"`" + fi + + + echo $ac_n "checking for pg_config""... $ac_c" 1>&6 +echo "configure:76597: checking for pg_config" >&5 + for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do + if test -x $i/pg_config; then + PG_CONFIG="$i/pg_config" + break; + fi + done + + if test -n "$PG_CONFIG"; then + echo "$ac_t""$PG_CONFIG" 1>&6 + PGSQL_INCLUDE=`$PG_CONFIG --includedir` + PGSQL_LIBDIR=`$PG_CONFIG --libdir` + cat >> confdefs.h <<\EOF +#define HAVE_PG_CONFIG_H 1 +EOF + + else + echo "$ac_t""not found" 1>&6 + if test "$PHP_PDO_PGSQL" = "yes"; then + PGSQL_SEARCH_PATHS="/usr /usr/local /usr/local/pgsql" + else + PGSQL_SEARCH_PATHS=$PHP_PDO_PGSQL + fi + + for i in $PGSQL_SEARCH_PATHS; do + for j in include include/pgsql include/postgres include/postgresql ""; do + if test -r "$i/$j/libpq-fe.h"; then + PGSQL_INC_BASE=$i + PGSQL_INCLUDE=$i/$j + if test -r "$i/$j/pg_config.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_PG_CONFIG_H 1 +EOF + + fi + fi + done + + for j in $PHP_LIBDIR $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then + PGSQL_LIBDIR=$i/$j + fi + done + done + fi + + if test -z "$PGSQL_INCLUDE"; then + { echo "configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path" 1>&2; exit 1; } + fi + + if test -z "$PGSQL_LIBDIR"; then + { echo "configure: error: Cannot find libpq.so. Please specify correct PostgreSQL installation path" 1>&2; exit 1; } + fi + + if test -z "$PGSQL_INCLUDE" -a -z "$PGSQL_LIBDIR" ; then + { echo "configure: error: Unable to find libpq anywhere under $PGSQL_SEARCH_PATHS" 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define HAVE_PDO_PGSQL 1 +EOF + + + echo $ac_n "checking for openssl dependencies""... $ac_c" 1>&6 +echo "configure:76661: checking for openssl dependencies" >&5 + if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then + echo "$ac_t""yes" 1>&6 + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:76667: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then + PDO_PGSQL_CFLAGS=`$PKG_CONFIG openssl --cflags` + fi + else + echo "$ac_t""no" 1>&6 + fi + + old_LIBS=$LIBS + old_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR" + echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6 +echo "configure:76711: checking for PQescapeString in -lpq" >&5 +ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQESCAPE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6 +echo "configure:76754: checking for PQescapeStringConn in -lpq" >&5 +ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQESCAPE_CONN 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6 +echo "configure:76797: checking for PQescapeByteaConn in -lpq" >&5 +ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQESCAPE_BYTEA_CONN 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6 +echo "configure:76840: checking for PQsetnonblocking in -lpq" >&5 +ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQSETNONBLOCKING 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6 +echo "configure:76883: checking for PQcmdTuples in -lpq" >&5 +ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQCMDTUPLES 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6 +echo "configure:76926: checking for PQoidValue in -lpq" >&5 +ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQOIDVALUE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6 +echo "configure:76969: checking for PQclientEncoding in -lpq" >&5 +ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQCLIENTENCODING 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6 +echo "configure:77012: checking for PQparameterStatus in -lpq" >&5 +ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPARAMETERSTATUS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6 +echo "configure:77055: checking for PQprotocolVersion in -lpq" >&5 +ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPROTOCOLVERSION 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6 +echo "configure:77098: checking for PQtransactionStatus in -lpq" >&5 +ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PGTRANSACTIONSTATUS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6 +echo "configure:77141: checking for PQunescapeBytea in -lpq" >&5 +ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQUNESCAPEBYTEA 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQExecParams in -lpq""... $ac_c" 1>&6 +echo "configure:77184: checking for PQExecParams in -lpq" >&5 +ac_lib_var=`echo pq'_'PQExecParams | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQEXECPARAMS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6 +echo "configure:77227: checking for PQresultErrorField in -lpq" >&5 +ac_lib_var=`echo pq'_'PQresultErrorField | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQRESULTERRORFIELD 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6 +echo "configure:77270: checking for pg_encoding_to_char in -lpq" >&5 +ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6 +echo "configure:77314: checking for PQprepare in -lpq" >&5 +ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPREPARE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + LIBS=$old_LIBS + LDFLAGS=$old_LDFLAGS + + + + if test "$ext_shared" = "yes"; then + PDO_PGSQL_SHARED_LIBADD="-lpq $PDO_PGSQL_SHARED_LIBADD" + if test -n "$PGSQL_LIBDIR"; then + + if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then + + if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PGSQL_LIBDIR + else + + ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_PGSQL_SHARED_LIBADD="-L$ai_p $PDO_PGSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_PGSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_PGSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PGSQL_LIBDIR"; then + + if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then + + if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PGSQL_LIBDIR + else + + ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case pq in + c|c_r|pthread*) ;; + *) + LIBS="-lpq $LIBS" + ;; + esac + + + + + fi + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_PGSQL_SHARED_LIBADD" + + + + if test "$PGSQL_INCLUDE" != "/usr/include"; then + + if test -z "$PGSQL_INCLUDE" || echo "$PGSQL_INCLUDE" | grep '^/' >/dev/null ; then + ai_p=$PGSQL_INCLUDE + else + + ep_dir="`echo $PGSQL_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PGSQL_INCLUDE\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:77496: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:77502: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +{ echo "configure: error: Cannot find php_pdo_driver.h." 1>&2; exit 1; } + fi + + + + + ext_builddir=ext/pdo_pgsql + ext_srcdir=$abs_srcdir/ext/pdo_pgsql + + ac_extra=`echo "-I$pdo_inc_path $PDO_PGSQL_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_PGSQL_SHARED=no + + + case ext/pdo_pgsql in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo_pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo_pgsql/"; ac_bdir="ext/pdo_pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pdo_pgsql.c pgsql_driver.c pgsql_statement.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo_pgsql, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + + +fi + +fi + + +if test "$PHP_PDO" != "no"; then + + +php_with_pdo_sqlite=yes + +echo $ac_n "checking for sqlite 3 support for PDO""... $ac_c" 1>&6 +echo "configure:77835: checking for sqlite 3 support for PDO" >&5 +# Check whether --with-pdo-sqlite or --without-pdo-sqlite was given. +if test "${with_pdo_sqlite+set}" = set; then + withval="$with_pdo_sqlite" + PHP_PDO_SQLITE=$withval +else + + PHP_PDO_SQLITE=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PDO_SQLITE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PDO_SQLITE in +shared,*) + PHP_PDO_SQLITE=`echo "$PHP_PDO_SQLITE"|$SED 's/^shared,//'` + ;; +shared) + PHP_PDO_SQLITE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PDO_SQLITE" != "no"; then + + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:77883: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:77889: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +{ echo "configure: error: Cannot find php_pdo_driver.h." 1>&2; exit 1; } + fi + + + + php_pdo_sqlite_sources_core="pdo_sqlite.c sqlite_driver.c sqlite_statement.c" + + if test "$PHP_PDO_SQLITE" != "yes"; then + SEARCH_PATH="$PHP_PDO_SQLITE /usr/local /usr" # you might want to change this + SEARCH_FOR="/include/sqlite3.h" # you most likely want to change this + if test -r $PHP_PDO_SQLITE/$SEARCH_FOR; then # path given as parameter + PDO_SQLITE_DIR=$PHP_PDO_SQLITE + else # search default path list + echo $ac_n "checking for sqlite3 files in default path""... $ac_c" 1>&6 +echo "configure:77918: checking for sqlite3 files in default path" >&5 + for i in $SEARCH_PATH ; do + if test -r $i/$SEARCH_FOR; then + PDO_SQLITE_DIR=$i + echo "$ac_t""found in $i" 1>&6 + fi + done + fi + if test -z "$PDO_SQLITE_DIR"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Please reinstall the sqlite3 distribution" 1>&2; exit 1; } + fi + + + if test "$PDO_SQLITE_DIR/include" != "/usr/include"; then + + if test -z "$PDO_SQLITE_DIR/include" || echo "$PDO_SQLITE_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$PDO_SQLITE_DIR/include + else + + ep_dir="`echo $PDO_SQLITE_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_SQLITE_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + LIBNAME=sqlite3 + LIBSYMBOL=sqlite3_open + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PDO_SQLITE_DIR/$PHP_LIBDIR -lm + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6 +echo "configure:78064: checking for $LIBSYMBOL in -l$LIBNAME" >&5 +ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + PDO_SQLITE_SHARED_LIBADD="-l$LIBNAME $PDO_SQLITE_SHARED_LIBADD" + if test -n "$PDO_SQLITE_DIR/$PHP_LIBDIR"; then + + if test "$PDO_SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PDO_SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PDO_SQLITE_DIR/$PHP_LIBDIR" || echo "$PDO_SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_SQLITE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PDO_SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_SQLITE_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PDO_SQLITE_SHARED_LIBADD="-L$ai_p $PDO_SQLITE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PDO_SQLITE_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_SQLITE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PDO_SQLITE_DIR/$PHP_LIBDIR"; then + + if test "$PDO_SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PDO_SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PDO_SQLITE_DIR/$PHP_LIBDIR" || echo "$PDO_SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PDO_SQLITE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PDO_SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PDO_SQLITE_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $LIBNAME in + c|c_r|pthread*) ;; + *) + LIBS="-l$LIBNAME $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_PDO_SQLITELIB 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$LIBNAME_$LIBSYMBOL + + { echo "configure: error: wrong sqlite lib version or lib not found" 1>&2; exit 1; } + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for sqlite3_key in -lsqlite3""... $ac_c" 1>&6 +echo "configure:78313: checking for sqlite3_key in -lsqlite3" >&5 +ac_lib_var=`echo sqlite3'_'sqlite3_key | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsqlite3 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_SQLITE3_KEY 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_sqlite3_sqlite3_key + + +fi + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_SQLITE_SHARED_LIBADD" + + + ext_builddir=ext/pdo_sqlite + ext_srcdir=$abs_srcdir/ext/pdo_sqlite + + ac_extra=`echo "-I$pdo_inc_path"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PDO_SQLITE_SHARED=no + + + case ext/pdo_sqlite in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pdo_sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pdo_sqlite/"; ac_bdir="ext/pdo_sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in $php_pdo_sqlite_sources_core; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:78963: checking size of char *" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_char_p=4 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(char *)); + return(0); +} +EOF +if { (eval echo configure:78982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_char_p=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_char_p=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6 +cat >> confdefs.h <> confdefs.h <<\EOF +#define SQLITE_PTR_SZ SIZEOF_CHAR_P +EOF + + PDO_SQLITE_VERSION=`cat $ext_srcdir/sqlite/VERSION | sed 's/^0-9.//g'` + PDO_SQLITE_VERSION_NUMBER=`echo $PDO_SQLITE_VERSION | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}'` + sed -e s/--VERS--/$PDO_SQLITE_VERSION/ -e s/--VERSION-NUMBER--/$PDO_SQLITE_VERSION_NUMBER/ $ext_srcdir/sqlite/src/sqlite.h.in > $ext_srcdir/sqlite/src/sqlite3.h + + touch $ext_srcdir/sqlite/src/parse.c $ext_srcdir/sqlite/src/parse.h + + if test "$ext_shared" = "no" || test "$ext_srcdir" != "$abs_srcdir"; then + echo '#include ' > $ext_srcdir/sqlite/src/config.h + else + echo "#include \"$abs_builddir/config.h\"" > $ext_srcdir/sqlite/src/config.h + fi + cat >> $ext_srcdir/sqlite/src/config.h <&6 +echo "configure:79029: 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 < +/* Override any gcc2 internal prototype to avoid an 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:79057: \"$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 <&6 +fi +done + + for ac_hdr in time.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:79085: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:79095: \"$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 <&6 +fi +done + + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for fdatasync in -lrt""... $ac_c" 1>&6 +echo "configure:79219: checking for fdatasync in -lrt" >&5 +ac_lib_var=`echo rt'_'fdatasync | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lrt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + case rt in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + PDO_SQLITE_SHARED_LIBADD="-lrt $PDO_SQLITE_SHARED_LIBADD" + else + + + case rt in + c|c_r|pthread*) ;; + *) + LIBS="-lrt $LIBS" + ;; + esac + + + fi + ;; + esac + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_rt_fdatasync + + +fi + + + + + am_i_shared=$PHP_PDO_SQLITE_SHARED + is_it_shared=$PHP_PDO_SHARED + is_it_enabled=$PHP_PDO + if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then + { echo "configure: error: +You've configured extension pdo_sqlite to build statically, but it +depends on extension pdo, which you've configured to build shared. +You either need to build pdo_sqlite shared or build pdo statically for the +build to be successful. +" 1>&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension pdo_sqlite, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + + +fi + +fi + + + +php_with_pgsql=no + +echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6 +echo "configure:79321: checking for PostgreSQL support" >&5 +# Check whether --with-pgsql or --without-pgsql was given. +if test "${with_pgsql+set}" = set; then + withval="$with_pgsql" + PHP_PGSQL=$withval +else + + PHP_PGSQL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PGSQL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PGSQL in +shared,*) + PHP_PGSQL=`echo "$PHP_PGSQL"|$SED 's/^shared,//'` + ;; +shared) + PHP_PGSQL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PGSQL" != "no"; then + + if test -z "$PGSQL_INCLUDE" || echo "$PGSQL_INCLUDE" | grep '^/' >/dev/null ; then + PGSQL_INCLUDE=$PGSQL_INCLUDE + else + + ep_dir="`echo $PGSQL_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + PGSQL_INCLUDE="$ep_realdir/`basename \"$PGSQL_INCLUDE\"`" + fi + + + echo $ac_n "checking for pg_config""... $ac_c" 1>&6 +echo "configure:79378: checking for pg_config" >&5 + for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do + if test -x $i/pg_config; then + PG_CONFIG="$i/pg_config" + break; + fi + done + + if test -n "$PG_CONFIG"; then + echo "$ac_t""$PG_CONFIG" 1>&6 + PGSQL_INCLUDE=`$PG_CONFIG --includedir` + PGSQL_LIBDIR=`$PG_CONFIG --libdir` + if test -r "$PGSQL_INCLUDE/pg_config.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_PG_CONFIG_H 1 +EOF + + fi + else + echo "$ac_t""not found" 1>&6 + if test "$PHP_PGSQL" = "yes"; then + PGSQL_SEARCH_PATHS="/usr /usr/local /usr/local/pgsql" + else + PGSQL_SEARCH_PATHS=$PHP_PGSQL + fi + + for i in $PGSQL_SEARCH_PATHS; do + for j in include include/pgsql include/postgres include/postgresql ""; do + if test -r "$i/$j/libpq-fe.h"; then + PGSQL_INC_BASE=$i + PGSQL_INCLUDE=$i/$j + if test -r "$i/$j/pg_config.h"; then + cat >> confdefs.h <<\EOF +#define HAVE_PG_CONFIG_H 1 +EOF + + fi + fi + done + + for j in lib $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then + PGSQL_LIBDIR=$i/$j + fi + done + done + fi + + if test -z "$PGSQL_INCLUDE"; then + { echo "configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path" 1>&2; exit 1; } + fi + + if test -z "$PGSQL_LIBDIR"; then + { echo "configure: error: Cannot find libpq.so. Please specify correct PostgreSQL installation path" 1>&2; exit 1; } + fi + + if test -z "$PGSQL_INCLUDE" -a -z "$PGSQL_LIBDIR" ; then + { echo "configure: error: Unable to find libpq anywhere under $PGSQL_SEARCH_PATHS" 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define HAVE_PGSQL 1 +EOF + + old_LIBS=$LIBS + old_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR" + echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6 +echo "configure:79446: checking for PQescapeString in -lpq" >&5 +ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQESCAPE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6 +echo "configure:79489: checking for PQunescapeBytea in -lpq" >&5 +ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQUNESCAPEBYTEA 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6 +echo "configure:79532: checking for PQsetnonblocking in -lpq" >&5 +ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQSETNONBLOCKING 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6 +echo "configure:79575: checking for PQcmdTuples in -lpq" >&5 +ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQCMDTUPLES 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6 +echo "configure:79618: checking for PQoidValue in -lpq" >&5 +ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQOIDVALUE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6 +echo "configure:79661: checking for PQclientEncoding in -lpq" >&5 +ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQCLIENTENCODING 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6 +echo "configure:79704: checking for PQparameterStatus in -lpq" >&5 +ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPARAMETERSTATUS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6 +echo "configure:79747: checking for PQprotocolVersion in -lpq" >&5 +ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPROTOCOLVERSION 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6 +echo "configure:79790: checking for PQtransactionStatus in -lpq" >&5 +ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PGTRANSACTIONSTATUS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQexecParams in -lpq""... $ac_c" 1>&6 +echo "configure:79833: checking for PQexecParams in -lpq" >&5 +ac_lib_var=`echo pq'_'PQexecParams | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQEXECPARAMS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6 +echo "configure:79876: checking for PQprepare in -lpq" >&5 +ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPREPARE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQexecPrepared in -lpq""... $ac_c" 1>&6 +echo "configure:79919: checking for PQexecPrepared in -lpq" >&5 +ac_lib_var=`echo pq'_'PQexecPrepared | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQEXECPREPARED 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6 +echo "configure:79962: checking for PQresultErrorField in -lpq" >&5 +ac_lib_var=`echo pq'_'PQresultErrorField | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQRESULTERRORFIELD 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQsendQueryParams in -lpq""... $ac_c" 1>&6 +echo "configure:80005: checking for PQsendQueryParams in -lpq" >&5 +ac_lib_var=`echo pq'_'PQsendQueryParams | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQSENDQUERYPARAMS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQsendPrepare in -lpq""... $ac_c" 1>&6 +echo "configure:80048: checking for PQsendPrepare in -lpq" >&5 +ac_lib_var=`echo pq'_'PQsendPrepare | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQSENDPREPARE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQsendQueryPrepared in -lpq""... $ac_c" 1>&6 +echo "configure:80091: checking for PQsendQueryPrepared in -lpq" >&5 +ac_lib_var=`echo pq'_'PQsendQueryPrepared | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQSENDQUERYPREPARED 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQputCopyData in -lpq""... $ac_c" 1>&6 +echo "configure:80134: checking for PQputCopyData in -lpq" >&5 +ac_lib_var=`echo pq'_'PQputCopyData | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPUTCOPYDATA 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQputCopyEnd in -lpq""... $ac_c" 1>&6 +echo "configure:80177: checking for PQputCopyEnd in -lpq" >&5 +ac_lib_var=`echo pq'_'PQputCopyEnd | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQPUTCOPYEND 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQgetCopyData in -lpq""... $ac_c" 1>&6 +echo "configure:80220: checking for PQgetCopyData in -lpq" >&5 +ac_lib_var=`echo pq'_'PQgetCopyData | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQGETCOPYDATA 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQfreemem in -lpq""... $ac_c" 1>&6 +echo "configure:80263: checking for PQfreemem in -lpq" >&5 +ac_lib_var=`echo pq'_'PQfreemem | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQFREEMEM 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQsetErrorVerbosity in -lpq""... $ac_c" 1>&6 +echo "configure:80306: checking for PQsetErrorVerbosity in -lpq" >&5 +ac_lib_var=`echo pq'_'PQsetErrorVerbosity | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQSETERRORVERBOSITY 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQftable in -lpq""... $ac_c" 1>&6 +echo "configure:80349: checking for PQftable in -lpq" >&5 +ac_lib_var=`echo pq'_'PQftable | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQFTABLE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6 +echo "configure:80392: checking for PQescapeStringConn in -lpq" >&5 +ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQESCAPE_CONN 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6 +echo "configure:80435: checking for PQescapeByteaConn in -lpq" >&5 +ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PQESCAPE_BYTEA_CONN 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6 +echo "configure:80478: checking for pg_encoding_to_char in -lpq" >&5 +ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + LIBS=$old_LIBS + LDFLAGS=$old_LDFLAGS + + + + if test "$ext_shared" = "yes"; then + PGSQL_SHARED_LIBADD="-lpq $PGSQL_SHARED_LIBADD" + if test -n "$PGSQL_LIBDIR"; then + + if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then + + if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PGSQL_LIBDIR + else + + ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PGSQL_SHARED_LIBADD="-L$ai_p $PGSQL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PGSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PGSQL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PGSQL_LIBDIR"; then + + if test "$PGSQL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PGSQL_LIBDIR" != "/usr/lib"; then + + if test -z "$PGSQL_LIBDIR" || echo "$PGSQL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PGSQL_LIBDIR + else + + ep_dir="`echo $PGSQL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PGSQL_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case pq in + c|c_r|pthread*) ;; + *) + LIBS="-lpq $LIBS" + ;; + esac + + + + + fi + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PGSQL_SHARED_LIBADD" + + + + if test "$PGSQL_INCLUDE" != "/usr/include"; then + + if test -z "$PGSQL_INCLUDE" || echo "$PGSQL_INCLUDE" | grep '^/' >/dev/null ; then + ai_p=$PGSQL_INCLUDE + else + + ep_dir="`echo $PGSQL_INCLUDE|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PGSQL_INCLUDE\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + ext_builddir=ext/pgsql + ext_srcdir=$abs_srcdir/ext/pgsql + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PGSQL_SHARED=no + + + case ext/pgsql in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pgsql"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pgsql/"; ac_bdir="ext/pgsql/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pgsql.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:80946: checking whether to enable POSIX-like functions" >&5 +# Check whether --enable-posix or --disable-posix was given. +if test "${enable_posix+set}" = set; then + enableval="$enable_posix" + PHP_POSIX=$enableval +else + + PHP_POSIX=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_POSIX=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_POSIX in +shared,*) + PHP_POSIX=`echo "$PHP_POSIX"|$SED 's/^shared,//'` + ;; +shared) + PHP_POSIX=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_POSIX" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_POSIX 1 +EOF + + + ext_builddir=ext/posix + ext_srcdir=$abs_srcdir/ext/posix + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_POSIX_SHARED=no + + + case ext/posix in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/posix"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/posix/"; ac_bdir="ext/posix/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in posix.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:81280: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:81290: \"$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 <&6 +fi +done + + + for ac_func in seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:81320: 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 < +/* Override any gcc2 internal prototype to avoid an 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:81348: \"$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 <&6 +fi +done + + + echo $ac_n "checking for working ttyname_r() implementation""... $ac_c" 1>&6 +echo "configure:81374: checking for working ttyname_r() implementation" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" 1>&6 + +else + cat > conftest.$ac_ext < + +int main(int argc, char *argv[]) +{ + char buf[64]; + + return ttyname_r(0, buf, 64) ? 1 : 0; +} + +EOF +if { (eval echo configure:81394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_TTYNAME_R 1 +EOF + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo "$ac_t""no, posix_ttyname() will be thread-unsafe" 1>&6 + +fi +rm -fr conftest* +fi + +fi + + + +php_with_pspell=no + +echo $ac_n "checking for PSPELL support""... $ac_c" 1>&6 +echo "configure:81421: checking for PSPELL support" >&5 +# Check whether --with-pspell or --without-pspell was given. +if test "${with_pspell+set}" = set; then + withval="$with_pspell" + PHP_PSPELL=$withval +else + + PHP_PSPELL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PSPELL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PSPELL in +shared,*) + PHP_PSPELL=`echo "$PHP_PSPELL"|$SED 's/^shared,//'` + ;; +shared) + PHP_PSPELL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PSPELL" != "no"; then + + ext_builddir=ext/pspell + ext_srcdir=$abs_srcdir/ext/pspell + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_PSPELL_SHARED=no + + + case ext/pspell in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/pspell"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/pspell/"; ac_bdir="ext/pspell/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in pspell.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + + PSPELL_LIBDIR=$PSPELL_DIR/$PHP_LIBDIR + + + + if test "$ext_shared" = "yes"; then + PSPELL_SHARED_LIBADD="-lpspell $PSPELL_SHARED_LIBADD" + if test -n "$PSPELL_LIBDIR"; then + + if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then + + if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PSPELL_LIBDIR + else + + ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PSPELL_SHARED_LIBADD="-L$ai_p $PSPELL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PSPELL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PSPELL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PSPELL_LIBDIR"; then + + if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then + + if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PSPELL_LIBDIR + else + + ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case pspell in + c|c_r|pthread*) ;; + *) + LIBS="-lpspell $LIBS" + ;; + esac + + + + + fi + + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$PSPELL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for new_aspell_config in -laspell""... $ac_c" 1>&6 +echo "configure:81963: checking for new_aspell_config in -laspell" >&5 +ac_lib_var=`echo aspell'_'new_aspell_config | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-laspell $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + PSPELL_SHARED_LIBADD="-laspell $PSPELL_SHARED_LIBADD" + if test -n "$PSPELL_LIBDIR"; then + + if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then + + if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PSPELL_LIBDIR + else + + ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + PSPELL_SHARED_LIBADD="-L$ai_p $PSPELL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && PSPELL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PSPELL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PSPELL_LIBDIR"; then + + if test "$PSPELL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PSPELL_LIBDIR" != "/usr/lib"; then + + if test -z "$PSPELL_LIBDIR" || echo "$PSPELL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PSPELL_LIBDIR + else + + ep_dir="`echo $PSPELL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PSPELL_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case aspell in + c|c_r|pthread*) ;; + *) + LIBS="-laspell $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_aspell_new_aspell_config + + +fi + + + + if test "$PSPELL_INCDIR" != "/usr/include"; then + + if test -z "$PSPELL_INCDIR" || echo "$PSPELL_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$PSPELL_INCDIR + else + + ep_dir="`echo $PSPELL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PSPELL_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST PSPELL_SHARED_LIBADD" + + cat >> confdefs.h <<\EOF +#define HAVE_PSPELL 1 +EOF + +fi + + + +php_with_libedit=no + +echo $ac_n "checking for libedit readline replacement""... $ac_c" 1>&6 +echo "configure:82156: checking for libedit readline replacement" >&5 +# Check whether --with-libedit or --without-libedit was given. +if test "${with_libedit+set}" = set; then + withval="$with_libedit" + PHP_LIBEDIT=$withval +else + + PHP_LIBEDIT=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_LIBEDIT=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_LIBEDIT in +shared,*) + PHP_LIBEDIT=`echo "$PHP_LIBEDIT"|$SED 's/^shared,//'` + ;; +shared) + PHP_LIBEDIT=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_LIBEDIT" = "no"; then + +php_with_readline=no + +echo $ac_n "checking for readline support""... $ac_c" 1>&6 +echo "configure:82204: checking for readline support" >&5 +# Check whether --with-readline or --without-readline was given. +if test "${with_readline+set}" = set; then + withval="$with_readline" + PHP_READLINE=$withval +else + + PHP_READLINE=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_READLINE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_READLINE in +shared,*) + PHP_READLINE=`echo "$PHP_READLINE"|$SED 's/^shared,//'` + ;; +shared) + PHP_READLINE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then + for i in $PHP_READLINE /usr/local /usr; do + test -f $i/include/readline/readline.h && READLINE_DIR=$i && break + done + + if test -z "$READLINE_DIR"; then + { echo "configure: error: Please reinstall readline - I cannot find readline.h" 1>&2; exit 1; } + fi + + + if test "$READLINE_DIR/include" != "/usr/include"; then + + if test -z "$READLINE_DIR/include" || echo "$READLINE_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$READLINE_DIR/include + else + + ep_dir="`echo $READLINE_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$READLINE_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_READLINE_LIBS="" + echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +echo "configure:82291: checking for tgetent in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + + case ncurses in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD" + else + + + case ncurses in + c|c_r|pthread*) ;; + *) + LIBS="-lncurses $LIBS" + ;; + esac + + + fi + ;; + esac + + + PHP_READLINE_LIBS="$PHP_READLINE_LIBS -lncurses" + +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +echo "configure:82355: checking for tgetent in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + + case termcap in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD" + else + + + case termcap in + c|c_r|pthread*) ;; + *) + LIBS="-ltermcap $LIBS" + ;; + esac + + + fi + ;; + esac + + + PHP_READLINE_LIBS="$PHP_READLINE_LIBS -ltermcap" + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:82521: checking for readline in -lreadline" >&5 +ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lreadline $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-lreadline $READLINE_SHARED_LIBADD" + if test -n "$READLINE_DIR/$PHP_LIBDIR"; then + + if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$READLINE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$READLINE_DIR/$PHP_LIBDIR"; then + + if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$READLINE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case readline in + c|c_r|pthread*) ;; + *) + LIBS="-lreadline $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_readline_readline + + { echo "configure: error: readline library not found" 1>&2; exit 1; } + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for rl_callback_read_char in -lreadline""... $ac_c" 1>&6 +echo "configure:82769: checking for rl_callback_read_char in -lreadline" >&5 +ac_lib_var=`echo readline'_'rl_callback_read_char | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lreadline $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_RL_CALLBACK_READ_CHAR 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_readline_rl_callback_read_char + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6 +echo "configure:82922: checking for add_history in -lhistory" >&5 +ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lhistory $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-lhistory $READLINE_SHARED_LIBADD" + if test -n "$READLINE_DIR/$PHP_LIBDIR"; then + + if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$READLINE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$READLINE_DIR/$PHP_LIBDIR"; then + + if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$READLINE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$READLINE_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case history in + c|c_r|pthread*) ;; + *) + LIBS="-lhistory $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_history_add_history + + { echo "configure: error: history library required by readline not found" 1>&2; exit 1; } + + +fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBREADLINE 1 +EOF + + +elif test "$PHP_LIBEDIT" != "no"; then + + for i in $PHP_LIBEDIT /usr/local /usr; do + test -f $i/include/readline/readline.h && LIBEDIT_DIR=$i && break + done + + if test -z "$LIBEDIT_DIR"; then + { echo "configure: error: Please reinstall libedit - I cannot find readline.h" 1>&2; exit 1; } + fi + + + if test "$LIBEDIT_DIR/include" != "/usr/include"; then + + if test -z "$LIBEDIT_DIR/include" || echo "$LIBEDIT_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$LIBEDIT_DIR/include + else + + ep_dir="`echo $LIBEDIT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +echo "configure:83120: checking for tgetent in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + + case ncurses in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD" + else + + + case ncurses in + c|c_r|pthread*) ;; + *) + LIBS="-lncurses $LIBS" + ;; + esac + + + fi + ;; + esac + + + +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +echo "configure:83183: checking for tgetent in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + + case termcap in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD" + else + + + case termcap in + c|c_r|pthread*) ;; + *) + LIBS="-ltermcap $LIBS" + ;; + esac + + + fi + ;; + esac + + + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$READLINE_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6 +echo "configure:83348: checking for readline in -ledit" >&5 +ac_lib_var=`echo edit'_'readline | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ledit $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-ledit $READLINE_SHARED_LIBADD" + if test -n "$LIBEDIT_DIR/$PHP_LIBDIR"; then + + if test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$LIBEDIT_DIR/$PHP_LIBDIR" || echo "$LIBEDIT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LIBEDIT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $LIBEDIT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$LIBEDIT_DIR/$PHP_LIBDIR"; then + + if test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LIBEDIT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$LIBEDIT_DIR/$PHP_LIBDIR" || echo "$LIBEDIT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$LIBEDIT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $LIBEDIT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$LIBEDIT_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case edit in + c|c_r|pthread*) ;; + *) + LIBS="-ledit $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_edit_readline + + { echo "configure: error: edit library required by readline not found" 1>&2; exit 1; } + + +fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBEDIT 1 +EOF + +fi + +if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then + for ac_func in rl_completion_matches +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:83508: 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 < +/* Override any gcc2 internal prototype to avoid an 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:83536: \"$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 <&6 +fi +done + + + ext_builddir=ext/readline + ext_srcdir=$abs_srcdir/ext/readline + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" != "cli"; then + PHP_READLINE_SHARED=no + + + case ext/readline in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/readline"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/readline/"; ac_bdir="ext/readline/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in readline.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:83851: checking for recode support" >&5 +# Check whether --with-recode or --without-recode was given. +if test "${with_recode+set}" = set; then + withval="$with_recode" + PHP_RECODE=$withval +else + + PHP_RECODE=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_RECODE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_RECODE in +shared,*) + PHP_RECODE=`echo "$PHP_RECODE"|$SED 's/^shared,//'` + ;; +shared) + PHP_RECODE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_RECODE" != "no"; then + RECODE_LIST="$PHP_RECODE /usr/local /usr /opt" + + for i in $RECODE_LIST; do + if test -f $i/include/recode.h; then + RECODE_DIR=$i + RECODE_INC=include + RECODE_LIB=$PHP_LIBDIR + fi + if test -f $i/include/recode/recode.h; then + RECODE_DIR=$i + RECODE_INC=include/recode + RECODE_LIB=$PHP_LIBDIR/recode + fi + if test -f $i/recode/include/recode.h; then + RECODE_DIR=$i/recode + RECODE_INC=include + RECODE_LIB=$PHP_LIBDIR + fi + test -n "$RECODE_DIR" && break + done + + if test -z "$RECODE_DIR"; then + { echo "configure: error: Can not find recode.h anywhere under $RECODE_LIST." 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$RECODE_DIR/$RECODE_LIB + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for recode_format_table in -lrecode""... $ac_c" 1>&6 +echo "configure:84018: checking for recode_format_table in -lrecode" >&5 +ac_lib_var=`echo recode'_'recode_format_table | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lrecode $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + RECODE_SHARED_LIBADD="-lrecode $RECODE_SHARED_LIBADD" + if test -n "$RECODE_DIR/$RECODE_LIB"; then + + if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then + + if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then + ai_p=$RECODE_DIR/$RECODE_LIB + else + + ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`" + fi + + + if test "$ext_shared" = "yes"; then + RECODE_SHARED_LIBADD="-L$ai_p $RECODE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && RECODE_SHARED_LIBADD="$ld_runpath_switch$ai_p $RECODE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$RECODE_DIR/$RECODE_LIB"; then + + if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then + + if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then + ai_p=$RECODE_DIR/$RECODE_LIB + else + + ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case recode in + c|c_r|pthread*) ;; + *) + LIBS="-lrecode $LIBS" + ;; + esac + + + + + fi + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_recode_recode_format_table + + old_LDFLAGS=$LDFLAGS + old_LIBS=$LIBS + LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB" + LIBS="$LIBS -lrecode" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + + + if test "$ext_shared" = "yes"; then + RECODE_SHARED_LIBADD="-lrecode $RECODE_SHARED_LIBADD" + if test -n "$RECODE_DIR/$RECODE_LIB"; then + + if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then + + if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then + ai_p=$RECODE_DIR/$RECODE_LIB + else + + ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`" + fi + + + if test "$ext_shared" = "yes"; then + RECODE_SHARED_LIBADD="-L$ai_p $RECODE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && RECODE_SHARED_LIBADD="$ld_runpath_switch$ai_p $RECODE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$RECODE_DIR/$RECODE_LIB"; then + + if test "$RECODE_DIR/$RECODE_LIB" != "/usr/$PHP_LIBDIR" && test "$RECODE_DIR/$RECODE_LIB" != "/usr/lib"; then + + if test -z "$RECODE_DIR/$RECODE_LIB" || echo "$RECODE_DIR/$RECODE_LIB" | grep '^/' >/dev/null ; then + ai_p=$RECODE_DIR/$RECODE_LIB + else + + ep_dir="`echo $RECODE_DIR/$RECODE_LIB|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_LIB\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case recode in + c|c_r|pthread*) ;; + *) + DLIBS="-lrecode $DLIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_RECODE 1 +EOF + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + { echo "configure: error: I cannot link librecode (-L$RECODE_DIR/$RECODE_LIB -lrecode). Is it installed?" 1>&2; exit 1; } + +fi +rm -f conftest* + LIBS=$old_LIBS + LDFLAGS=$old_LDFLAGS + + +fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBRECODE 1 +EOF + + + if test "$RECODE_DIR/$RECODE_INC" != "/usr/include"; then + + if test -z "$RECODE_DIR/$RECODE_INC" || echo "$RECODE_DIR/$RECODE_INC" | grep '^/' >/dev/null ; then + ai_p=$RECODE_DIR/$RECODE_INC + else + + ep_dir="`echo $RECODE_DIR/$RECODE_INC|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$RECODE_DIR/$RECODE_INC\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST RECODE_SHARED_LIBADD" + + for ac_hdr in stdbool.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:84341: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:84351: \"$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 <&6 +fi +done + + + ext_builddir=ext/recode + ext_srcdir=$abs_srcdir/ext/recode + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_RECODE_SHARED=no + + + case ext/recode in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/recode"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/recode/"; ac_bdir="ext/recode/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in recode.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:84665: checking whether to enable reflection support" >&5 +# Check whether --enable-reflection or --disable-reflection was given. +if test "${enable_reflection+set}" = set; then + enableval="$enable_reflection" + PHP_REFLECTION=$enableval +else + + PHP_REFLECTION=yes + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_REFLECTION=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_REFLECTION +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_REFLECTION" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_REFLECTION 1 +EOF + + + ext_builddir=ext/reflection + ext_srcdir=$abs_srcdir/ext/reflection + + ac_extra= + + if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then + PHP_REFLECTION_SHARED=no + + + case ext/reflection in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/reflection"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/reflection/"; ac_bdir="ext/reflection/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_reflection.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:84980: checking whether to enable PHP sessions" >&5 +# Check whether --enable-session or --disable-session was given. +if test "${enable_session+set}" = set; then + enableval="$enable_session" + PHP_SESSION=$enableval +else + + PHP_SESSION=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SESSION=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SESSION in +shared,*) + PHP_SESSION=`echo "$PHP_SESSION"|$SED 's/^shared,//'` + ;; +shared) + PHP_SESSION=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_mm=no + +echo $ac_n "checking for mm support""... $ac_c" 1>&6 +echo "configure:85027: checking for mm support" >&5 +# Check whether --with-mm or --without-mm was given. +if test "${with_mm+set}" = set; then + withval="$with_mm" + PHP_MM=$withval +else + + PHP_MM=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_MM=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_MM +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SESSION" != "no"; then + + echo $ac_n "checking whether pwrite works""... $ac_c" 1>&6 +echo "configure:85052: checking whether pwrite works" >&5 +if eval "test \"`echo '$''{'ac_cv_pwrite'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + if test "$cross_compiling" = yes; then + + ac_cv_pwrite=no + +else + cat > conftest.$ac_ext < +#include +#include +#include +#include + + main() { + int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600); + + if (fd < 0) exit(1); + if (pwrite(fd, "text", 4, 0) != 4) exit(1); + /* Linux glibc breakage until 2.2.5 */ + if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1); + exit(0); + } + + +EOF +if { (eval echo configure:85085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_pwrite=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_pwrite=no + +fi +rm -fr conftest* +fi + + + if test "$ac_cv_pwrite" = "no"; then + + if test "$cross_compiling" = yes; then + + ac_cv_pwrite=no + +else + cat > conftest.$ac_ext < +#include +#include +#include +#include +ssize_t pwrite(int, void *, size_t, off64_t); + main() { + int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600); + + if (fd < 0) exit(1); + if (pwrite(fd, "text", 4, 0) != 4) exit(1); + /* Linux glibc breakage until 2.2.5 */ + if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1); + exit(0); + } + + +EOF +if { (eval echo configure:85131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_pwrite=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_pwrite=no + +fi +rm -fr conftest* +fi + + + if test "$ac_cv_pwrite" = "yes"; then + ac_cv_pwrite=64 + fi + fi + +fi + +echo "$ac_t""$ac_cv_pwrite" 1>&6 + + if test "$ac_cv_pwrite" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_PWRITE 1 +EOF + + if test "$ac_cv_pwrite" = "64"; then + cat >> confdefs.h <<\EOF +#define PHP_PWRITE_64 1 +EOF + + fi + fi + + + echo $ac_n "checking whether pread works""... $ac_c" 1>&6 +echo "configure:85172: checking whether pread works" >&5 +if eval "test \"`echo '$''{'ac_cv_pread'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + echo test > conftest_in + if test "$cross_compiling" = yes; then + + ac_cv_pread=no + +else + cat > conftest.$ac_ext < +#include +#include +#include +#include + + main() { + char buf[3]; + int fd = open("conftest_in", O_RDONLY); + if (fd < 0) exit(1); + if (pread(fd, buf, 2, 0) != 2) exit(1); + /* Linux glibc breakage until 2.2.5 */ + if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1); + exit(0); + } + +EOF +if { (eval echo configure:85205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_pread=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_pread=no + +fi +rm -fr conftest* +fi + + rm -f conftest_in + + if test "$ac_cv_pread" = "no"; then + + echo test > conftest_in + if test "$cross_compiling" = yes; then + + ac_cv_pread=no + +else + cat > conftest.$ac_ext < +#include +#include +#include +#include +ssize_t pread(int, void *, size_t, off64_t); + main() { + char buf[3]; + int fd = open("conftest_in", O_RDONLY); + if (fd < 0) exit(1); + if (pread(fd, buf, 2, 0) != 2) exit(1); + /* Linux glibc breakage until 2.2.5 */ + if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1); + exit(0); + } + +EOF +if { (eval echo configure:85252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_pread=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_pread=no + +fi +rm -fr conftest* +fi + + rm -f conftest_in + + if test "$ac_cv_pread" = "yes"; then + ac_cv_pread=64 + fi + fi + +fi + +echo "$ac_t""$ac_cv_pread" 1>&6 + + if test "$ac_cv_pread" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_PREAD 1 +EOF + + if test "$ac_cv_pread" = "64"; then + cat >> confdefs.h <<\EOF +#define PHP_PREAD_64 1 +EOF + + fi + fi + + + ext_builddir=ext/session + ext_srcdir=$abs_srcdir/ext/session + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SESSION_SHARED=no + + + case ext/session in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/session"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/session/"; ac_bdir="ext/session/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in session.c mod_files.c mod_mm.c mod_user.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_PHP_SESSION 1 +EOF + +fi + +if test "$PHP_MM" != "no"; then + for i in $PHP_MM /usr/local /usr; do + test -f "$i/include/mm.h" && MM_DIR=$i && break + done + + if test -z "$MM_DIR" ; then + { echo "configure: error: cannot find mm library" 1>&2; exit 1; } + fi + + + + if test "$ext_shared" = "yes"; then + SESSION_SHARED_LIBADD="-lmm $SESSION_SHARED_LIBADD" + if test -n "$MM_DIR/$PHP_LIBDIR"; then + + if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MM_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + SESSION_SHARED_LIBADD="-L$ai_p $SESSION_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SESSION_SHARED_LIBADD="$ld_runpath_switch$ai_p $SESSION_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$MM_DIR/$PHP_LIBDIR"; then + + if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$MM_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MM_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case mm in + c|c_r|pthread*) ;; + *) + LIBS="-lmm $LIBS" + ;; + esac + + + + + fi + + + + if test "$MM_DIR/include" != "/usr/include"; then + + if test -z "$MM_DIR/include" || echo "$MM_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$MM_DIR/include + else + + ep_dir="`echo $MM_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$MM_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + for header_file in ext/session/mod_mm.h; do + + + unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INSTALLHEADERS$unique=set" + + INSTALL_HEADERS="$INSTALL_HEADERS $header_file" + + fi + + done + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBMM 1 +EOF + +fi + + +php_enable_shmop=no + +echo $ac_n "checking whether to enable shmop support""... $ac_c" 1>&6 +echo "configure:85767: checking whether to enable shmop support" >&5 +# Check whether --enable-shmop or --disable-shmop was given. +if test "${enable_shmop+set}" = set; then + enableval="$enable_shmop" + PHP_SHMOP=$enableval +else + + PHP_SHMOP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SHMOP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SHMOP in +shared,*) + PHP_SHMOP=`echo "$PHP_SHMOP"|$SED 's/^shared,//'` + ;; +shared) + PHP_SHMOP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SHMOP" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_SHMOP 1 +EOF + + + ext_builddir=ext/shmop + ext_srcdir=$abs_srcdir/ext/shmop + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SHMOP_SHARED=no + + + case ext/shmop in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/shmop"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/shmop/"; ac_bdir="ext/shmop/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in shmop.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:86103: checking whether to enable SimpleXML support" >&5 +# Check whether --enable-simplexml or --disable-simplexml was given. +if test "${enable_simplexml+set}" = set; then + enableval="$enable_simplexml" + PHP_SIMPLEXML=$enableval +else + + PHP_SIMPLEXML=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SIMPLEXML=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SIMPLEXML in +shared,*) + PHP_SIMPLEXML=`echo "$PHP_SIMPLEXML"|$SED 's/^shared,//'` + ;; +shared) + PHP_SIMPLEXML=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:86151: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_SIMPLEXML" != "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: SimpleXML extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:86182: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + SIMPLEXML_SHARED_LIBADD="-L$ai_p $SIMPLEXML_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SIMPLEXML_SHARED_LIBADD="$ld_runpath_switch$ai_p $SIMPLEXML_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:86340: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $SIMPLEXML_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_SIMPLEXML 1 +EOF + + + ext_builddir=ext/simplexml + ext_srcdir=$abs_srcdir/ext/simplexml + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SIMPLEXML_SHARED=no + + + case ext/simplexml in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/simplexml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/simplexml/"; ac_bdir="ext/simplexml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in simplexml.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; } + + fi + + + am_i_shared=$PHP_SIMPLEXML_SHARED + is_it_shared=$PHP_LIBXML_SHARED + is_it_enabled=$PHP_LIBXML + if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then + { echo "configure: error: +You've configured extension simplexml to build statically, but it +depends on extension libxml, which you've configured to build shared. +You either need to build simplexml shared or build libxml statically for the +build to be successful. +" 1>&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension simplexml, which depends on extension libxml, +but you've either not enabled libxml, or have disabled it. +" 1>&2; exit 1; } + fi + + + am_i_shared=$PHP_SIMPLEXML_SHARED + is_it_shared=$PHP_SPL_SHARED + is_it_enabled=$PHP_SPL + if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then + { echo "configure: error: +You've configured extension simplexml to build statically, but it +depends on extension spl, which you've configured to build shared. +You either need to build simplexml shared or build spl statically for the +build to be successful. +" 1>&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then + { echo "configure: error: +You've configured extension simplexml, which depends on extension spl, +but you've either not enabled spl, or have disabled it. +" 1>&2; exit 1; } + fi + +fi + + + +php_with_snmp=no + +echo $ac_n "checking for SNMP support""... $ac_c" 1>&6 +echo "configure:86744: checking for SNMP support" >&5 +# Check whether --with-snmp or --without-snmp was given. +if test "${with_snmp+set}" = set; then + withval="$with_snmp" + PHP_SNMP=$withval +else + + PHP_SNMP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SNMP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SNMP in +shared,*) + PHP_SNMP=`echo "$PHP_SNMP"|$SED 's/^shared,//'` + ;; +shared) + PHP_SNMP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_openssl_dir=no + +echo $ac_n "checking OpenSSL dir for SNMP""... $ac_c" 1>&6 +echo "configure:86791: checking OpenSSL dir for SNMP" >&5 +# Check whether --with-openssl-dir or --without-openssl-dir was given. +if test "${with_openssl_dir+set}" = set; then + withval="$with_openssl_dir" + PHP_OPENSSL_DIR=$withval +else + + PHP_OPENSSL_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_OPENSSL_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_OPENSSL_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_ucd_snmp_hack=no + +echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6 +echo "configure:86817: checking whether to enable UCD SNMP hack" >&5 +# Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given. +if test "${enable_ucd_snmp_hack+set}" = set; then + enableval="$enable_ucd_snmp_hack" + PHP_UCD_SNMP_HACK=$enableval +else + + PHP_UCD_SNMP_HACK=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_UCD_SNMP_HACK=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_UCD_SNMP_HACK +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SNMP" != "no"; then + + if test "$PHP_SNMP" = "yes"; then + # Extract the first word of "net-snmp-config", so it can be a program name with args. +set dummy net-snmp-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:86845: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_SNMP_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$SNMP_CONFIG" in + /*) + ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/local/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_SNMP_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +SNMP_CONFIG="$ac_cv_path_SNMP_CONFIG" +if test -n "$SNMP_CONFIG"; then + echo "$ac_t""$SNMP_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + else + SNMP_CONFIG="$PHP_SNMP/bin/net-snmp-config" + fi + + if test -x "$SNMP_CONFIG"; then + SNMP_LIBS=`$SNMP_CONFIG --netsnmp-libs` + SNMP_LIBS="$SNMP_LIBS `$SNMP_CONFIG --external-libs`" + SNMP_PREFIX=`$SNMP_CONFIG --prefix` + + if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then + + if test "${SNMP_PREFIX}/include" != "/usr/include"; then + + if test -z "${SNMP_PREFIX}/include" || echo "${SNMP_PREFIX}/include" | grep '^/' >/dev/null ; then + ai_p=${SNMP_PREFIX}/include + else + + ep_dir="`echo $SNMP_PREFIX/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"${SNMP_PREFIX}/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + for ac_i in $SNMP_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + cat >> confdefs.h <<\EOF +#define HAVE_NET_SNMP 1 +EOF + + SNMP_LIBNAME=netsnmp + else + { echo "configure: error: Could not find the required paths. Please check your net-snmp installation." 1>&2; exit 1; } + fi + else + + + if test "$PHP_SNMP" = "yes"; then + for i in /usr/include /usr/local/include; do + test -f $i/snmp.h && SNMP_INCDIR=$i + test -f $i/ucd-snmp/snmp.h && SNMP_INCDIR=$i/ucd-snmp + test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp + test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp + done + for i in /usr/$PHP_LIBDIR /usr/snmp/lib /usr/local/$PHP_LIBDIR /usr/local/lib /usr/local/snmp/lib; do + test -f $i/libsnmp.a || test -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i + done + else + SNMP_INCDIR=$PHP_SNMP/include + test -d $PHP_SNMP/include/ucd-snmp && SNMP_INCDIR=$PHP_SNMP/include/ucd-snmp + SNMP_LIBDIR=$PHP_SNMP/lib + fi + + if test -z "$SNMP_INCDIR"; then + { echo "configure: error: snmp.h not found. Check your SNMP installation." 1>&2; exit 1; } + elif test -z "$SNMP_LIBDIR"; then + { echo "configure: error: libsnmp not found. Check your SNMP installation." 1>&2; exit 1; } + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$SNMP_INCDIR + for ac_hdr in default_store.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:87046: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:87056: \"$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 <&6 +fi +done + + if test "$ac_cv_header_default_store_h" = "yes"; then + echo $ac_n "checking for OpenSSL support in SNMP libraries""... $ac_c" 1>&6 +echo "configure:87084: checking for OpenSSL support in SNMP libraries" >&5 + cat > conftest.$ac_ext < +#if USE_OPENSSL + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + SNMP_SSL=yes + +else + rm -rf conftest* + + SNMP_SSL=no + +fi +rm -f conftest* + + fi + CPPFLAGS=$old_CPPFLAGS + echo "$ac_t""$SNMP_SSL" 1>&6 + + if test "$SNMP_SSL" = "yes"; then + if test "$PHP_OPENSSL_DIR" != "no"; then + PHP_OPENSSL=$PHP_OPENSSL_DIR + fi + + if test "$PHP_OPENSSL" = "no"; then + { echo "configure: error: The UCD-SNMP in this system is built with SSL support. + + Add --with-openssl-dir=DIR to your configure line." 1>&2; exit 1; } + else + + found_openssl=no + unset OPENSSL_INCDIR + unset OPENSSL_LIBDIR + + test -z "$PHP_OPENSSL" && PHP_OPENSSL=no + test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no + + if test "$PHP_OPENSSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_OPENSSL + elif test "$PHP_IMAP_SSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_IMAP_SSL + fi + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:87141: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then + if $PKG_CONFIG --atleast-version=0.9.6 openssl; then + found_openssl=yes + OPENSSL_LIBS=`$PKG_CONFIG --libs openssl` + OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl` + OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl` + else + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + fi + + if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then + + for ac_i in $OPENSSL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $OPENSSL_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + fi + fi + + if test "$found_openssl" = "no"; then + + if test "$PHP_OPENSSL_DIR" = "yes"; then + PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" + fi + + for i in $PHP_OPENSSL_DIR; do + if test -r $i/include/openssl/evp.h; then + OPENSSL_INCDIR=$i/include + fi + if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then + OPENSSL_LIBDIR=$i/$PHP_LIBDIR + fi + test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break + done + + if test -z "$OPENSSL_INCDIR"; then + { echo "configure: error: Cannot find OpenSSL's " 1>&2; exit 1; } + fi + + if test -z "$OPENSSL_LIBDIR"; then + { echo "configure: error: Cannot find OpenSSL's libraries" 1>&2; exit 1; } + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +echo "configure:87346: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +#if OPENSSL_VERSION_NUMBER >= 0x0090600fL + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t"">= 0.9.6" 1>&6 + +else + rm -rf conftest* + + { echo "configure: error: OpenSSL version 0.9.6 or greater required." 1>&2; exit 1; } + +fi +rm -f conftest* + + CPPFLAGS=$old_CPPFLAGS + + + if test "$OPENSSL_INCDIR" != "/usr/include"; then + + if test -z "$OPENSSL_INCDIR" || echo "$OPENSSL_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_INCDIR + else + + ep_dir="`echo $OPENSSL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +echo "configure:87503: checking for CRYPTO_free in -lcrypto" >&5 +ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypto $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case crypto in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-lcrypto $SNMP_SHARED_LIBADD" + else + + + case crypto in + c|c_r|pthread*) ;; + *) + LIBS="-lcrypto $LIBS" + ;; + esac + + + fi + ;; + esac + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_crypto_CRYPTO_free + + { echo "configure: error: libcrypto not found!" 1>&2; exit 1; } + + +fi + + + old_LIBS=$LIBS + LIBS="$LIBS -lcrypto" + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$OPENSSL_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +echo "configure:87679: checking for SSL_CTX_set_ssl_version in -lssl" >&5 +ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lssl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_openssl=yes + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version + + { echo "configure: error: libssl not found!" 1>&2; exit 1; } + + +fi + + LIBS=$old_LIBS + + + case ssl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-lssl $SNMP_SHARED_LIBADD" + else + + + case ssl in + c|c_r|pthread*) ;; + *) + LIBS="-lssl $LIBS" + ;; + esac + + + fi + ;; + esac + + + + + if test "$OPENSSL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$OPENSSL_LIBDIR" != "/usr/lib"; then + + if test -z "$OPENSSL_LIBDIR" || echo "$OPENSSL_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$OPENSSL_LIBDIR + else + + ep_dir="`echo $OPENSSL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$OPENSSL_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + + if test "$found_openssl" = "yes"; then + OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR + + +: +else + { echo "configure: error: SNMP: OpenSSL check failed. Please check config.log for more information." 1>&2; exit 1; } + + fi + + fi + fi + + echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6 +echo "configure:87811: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + case kstat in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-lkstat $SNMP_SHARED_LIBADD" + else + + + case kstat in + c|c_r|pthread*) ;; + *) + LIBS="-lkstat $LIBS" + ;; + esac + + + fi + ;; + esac + + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "$SNMP_INCDIR" != "/usr/include"; then + + if test -z "$SNMP_INCDIR" || echo "$SNMP_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$SNMP_INCDIR + else + + ep_dir="`echo $SNMP_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SNMP_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-lsnmp $SNMP_SHARED_LIBADD" + if test -n "$SNMP_LIBDIR"; then + + if test "$SNMP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SNMP_LIBDIR" != "/usr/lib"; then + + if test -z "$SNMP_LIBDIR" || echo "$SNMP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$SNMP_LIBDIR + else + + ep_dir="`echo $SNMP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SNMP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$SNMP_LIBDIR"; then + + if test "$SNMP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SNMP_LIBDIR" != "/usr/lib"; then + + if test -z "$SNMP_LIBDIR" || echo "$SNMP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$SNMP_LIBDIR + else + + ep_dir="`echo $SNMP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SNMP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case snmp in + c|c_r|pthread*) ;; + *) + LIBS="-lsnmp $LIBS" + ;; + esac + + + + + fi + + + SNMP_LIBNAME=snmp + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $SNMP_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for snmp_parse_oid in -l$SNMP_LIBNAME""... $ac_c" 1>&6 +echo "configure:88101: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5 +ac_lib_var=`echo $SNMP_LIBNAME'_'snmp_parse_oid | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$SNMP_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_SNMP_PARSE_OID 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$SNMP_LIBNAME_snmp_parse_oid + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $SNMP_SHARED_LIBADD + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for init_snmp in -l$SNMP_LIBNAME""... $ac_c" 1>&6 +echo "configure:88254: checking for init_snmp in -l$SNMP_LIBNAME" >&5 +ac_lib_var=`echo $SNMP_LIBNAME'_'init_snmp | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$SNMP_LIBNAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_SNMP 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$SNMP_LIBNAME_init_snmp + + { echo "configure: error: SNMP sanity check failed. Please check config.log for more information." 1>&2; exit 1; } + + +fi + + + if test "$PHP_UCD_SNMP_HACK" = "yes" ; then + cat >> confdefs.h <<\EOF +#define UCD_SNMP_HACK 1 +EOF + + fi + + + ext_builddir=ext/snmp + ext_srcdir=$abs_srcdir/ext/snmp + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SNMP_SHARED=no + + + case ext/snmp in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/snmp"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/snmp/"; ac_bdir="ext/snmp/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in snmp.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:88609: checking whether to enable SOAP support" >&5 +# Check whether --enable-soap or --disable-soap was given. +if test "${enable_soap+set}" = set; then + enableval="$enable_soap" + PHP_SOAP=$enableval +else + + PHP_SOAP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SOAP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SOAP in +shared,*) + PHP_SOAP=`echo "$PHP_SOAP"|$SED 's/^shared,//'` + ;; +shared) + PHP_SOAP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:88657: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_SOAP" != "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: SOAP extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:88688: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + SOAP_SHARED_LIBADD="-L$ai_p $SOAP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SOAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SOAP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:88846: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $SOAP_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_SOAP 1 +EOF + + + ext_builddir=ext/soap + ext_srcdir=$abs_srcdir/ext/soap + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SOAP_SHARED=no + + + case ext/soap in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/soap"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/soap/"; ac_bdir="ext/soap/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; } + + fi + +fi + + + +php_enable_sockets=no + +echo $ac_n "checking whether to enable sockets support""... $ac_c" 1>&6 +echo "configure:89212: checking whether to enable sockets support" >&5 +# Check whether --enable-sockets or --disable-sockets was given. +if test "${enable_sockets+set}" = set; then + enableval="$enable_sockets" + PHP_SOCKETS=$enableval +else + + PHP_SOCKETS=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SOCKETS=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SOCKETS in +shared,*) + PHP_SOCKETS=`echo "$PHP_SOCKETS"|$SED 's/^shared,//'` + ;; +shared) + PHP_SOCKETS=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SOCKETS" != "no"; then + echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6 +echo "configure:89257: checking for struct cmsghdr" >&5 +if eval "test \"`echo '$''{'ac_cv_cmsghdr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +#include +int main() { +struct cmsghdr s; s +; return 0; } +EOF +if { (eval echo configure:89272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cmsghdr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cmsghdr=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_cmsghdr" 1>&6 + + if test "$ac_cv_cmsghdr" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CMSGHDR 1 +EOF + + fi + + for ac_func in hstrerror socketpair +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:89297: 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 < +/* Override any gcc2 internal prototype to avoid an 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:89325: \"$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 <&6 +fi +done + + for ac_hdr in netdb.h netinet/tcp.h sys/un.h errno.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:89353: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:89363: \"$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 <&6 +fi +done + + cat > conftest.$ac_ext < +#include + +int main() { +static struct msghdr tp; int n = (int) tp.msg_flags; return n +; return 0; } +EOF +if { (eval echo configure:89400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define MISSING_MSGHDR_MSGFLAGS 1 +EOF + + +fi +rm -f conftest* + cat >> confdefs.h <<\EOF +#define HAVE_SOCKETS 1 +EOF + + + + ext_builddir=ext/sockets + ext_srcdir=$abs_srcdir/ext/sockets + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SOCKETS_SHARED=no + + + case ext/sockets in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/sockets"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/sockets/"; ac_bdir="ext/sockets/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sockets.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:89706: checking enable SPL suppport" >&5 +# Check whether --enable-spl or --disable-spl was given. +if test "${enable_spl+set}" = set; then + enableval="$enable_spl" + PHP_SPL=$enableval +else + + PHP_SPL=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SPL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SPL in +shared,*) + PHP_SPL=`echo "$PHP_SPL"|$SED 's/^shared,//'` + ;; +shared) + PHP_SPL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SPL" != "no"; then + echo $ac_n "checking whether zend_object_value is packed""... $ac_c" 1>&6 +echo "configure:89751: checking whether zend_object_value is packed" >&5 + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS" + if test "$cross_compiling" = yes; then + + ac_result=0 + echo "$ac_t""no" 1>&6 + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_result=1 + echo "$ac_t""yes" 1>&6 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_result=0 + echo "$ac_t""no" 1>&6 + +fi +rm -fr conftest* +fi + + CPPFLAGS=$old_CPPFLAGS + cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_SPL 1 +EOF + + + ext_builddir=ext/spl + ext_srcdir=$abs_srcdir/ext/spl + + ac_extra= + + if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then + PHP_SPL_SHARED=no + + + case ext/spl in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/spl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/spl/"; ac_bdir="ext/spl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then + { echo "configure: error: +You've configured extension spl, which depends on extension pcre, +but you've either not enabled pcre, or have disabled it. +" 1>&2; exit 1; } + fi + +fi + + + +php_with_sqlite=yes + +echo $ac_n "checking for sqlite support""... $ac_c" 1>&6 +echo "configure:90124: checking for sqlite support" >&5 +# Check whether --with-sqlite or --without-sqlite was given. +if test "${with_sqlite+set}" = set; then + withval="$with_sqlite" + PHP_SQLITE=$withval +else + + PHP_SQLITE=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SQLITE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SQLITE in +shared,*) + PHP_SQLITE=`echo "$PHP_SQLITE"|$SED 's/^shared,//'` + ;; +shared) + PHP_SQLITE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_enable_sqlite_utf8=no + +echo $ac_n "checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)""... $ac_c" 1>&6 +echo "configure:90171: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5 +# Check whether --enable-sqlite-utf8 or --disable-sqlite-utf8 was given. +if test "${enable_sqlite_utf8+set}" = set; then + enableval="$enable_sqlite_utf8" + PHP_SQLITE_UTF8=$enableval +else + + PHP_SQLITE_UTF8=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_SQLITE_UTF8=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_SQLITE_UTF8 +echo "$ac_t""$ext_output" 1>&6 + + + + + + + + + +if test "$PHP_SQLITE" != "no"; then + if test "$PHP_PDO" != "no"; then + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:90202: checking for PDO includes" >&5 +if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +echo "configure:90208: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + fi + +fi + +echo "$ac_t""$pdo_inc_path" 1>&6 + if test -n "$pdo_inc_path"; then +: + else +echo "configure: warning: Cannot find php_pdo_driver.h." 1>&2 + fi + + if test -n "$pdo_inc_path"; then + cat >> confdefs.h <<\EOF +#define PHP_SQLITE2_HAVE_PDO 1 +EOF + + pdo_inc_path="-I$pdo_inc_path" + fi + fi + + if test "$PHP_SQLITE" != "yes"; then + SEARCH_PATH="/usr/local /usr" + SEARCH_FOR="/include/sqlite.h" + if test -r $PHP_SQLITE/; then # path given as parameter + SQLITE_DIR=$PHP_SQLITE + else # search default path list + echo $ac_n "checking for sqlite files in default path""... $ac_c" 1>&6 +echo "configure:90242: checking for sqlite files in default path" >&5 + for i in $SEARCH_PATH ; do + if test -r $i/$SEARCH_FOR; then + SQLITE_DIR=$i + echo "$ac_t""found in $i" 1>&6 + fi + done + fi + + if test -z "$SQLITE_DIR"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org" 1>&2; exit 1; } + fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$SQLITE_DIR/$PHP_LIBDIR -lm + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for sqlite_open in -lsqlite""... $ac_c" 1>&6 +echo "configure:90354: checking for sqlite_open in -lsqlite" >&5 +ac_lib_var=`echo sqlite'_'sqlite_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsqlite $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + if test "$ext_shared" = "yes"; then + SQLITE_SHARED_LIBADD="-lsqlite $SQLITE_SHARED_LIBADD" + if test -n "$SQLITE_DIR/$PHP_LIBDIR"; then + + if test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$SQLITE_DIR/$PHP_LIBDIR" || echo "$SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$SQLITE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SQLITE_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + SQLITE_SHARED_LIBADD="-L$ai_p $SQLITE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SQLITE_SHARED_LIBADD="$ld_runpath_switch$ai_p $SQLITE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$SQLITE_DIR/$PHP_LIBDIR"; then + + if test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SQLITE_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$SQLITE_DIR/$PHP_LIBDIR" || echo "$SQLITE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$SQLITE_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $SQLITE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SQLITE_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case sqlite in + c|c_r|pthread*) ;; + *) + LIBS="-lsqlite $LIBS" + ;; + esac + + + + + fi + + + + if test "$SQLITE_DIR/include" != "/usr/include"; then + + if test -z "$SQLITE_DIR/include" || echo "$SQLITE_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$SQLITE_DIR/include + else + + ep_dir="`echo $SQLITE_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SQLITE_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_sqlite_sqlite_open + + { echo "configure: error: wrong sqlite lib version or lib not found" 1>&2; exit 1; } + + +fi + + SQLITE_MODULE_TYPE=external + PHP_SQLITE_CFLAGS=$pdo_inc_path + sqlite_extra_sources="libsqlite/src/encode.c" + else + # use bundled library + + # we only support certain lemon versions + lemon_version_list="1.0" + + # Extract the first word of "lemon", so it can be a program name with args. +set dummy lemon; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:90546: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LEMON'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEMON"; then + ac_cv_prog_LEMON="$LEMON" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEMON="lemon" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LEMON="$ac_cv_prog_LEMON" +if test -n "$LEMON"; then + echo "$ac_t""$LEMON" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$LEMON"; then + echo $ac_n "checking for lemon version""... $ac_c" 1>&6 +echo "configure:90574: checking for lemon version" >&5 +if eval "test \"`echo '$''{'php_cv_lemon_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + lemon_version=`$LEMON -x 2>/dev/null | $SED -e 's/^.* //'` + php_cv_lemon_version=invalid + for lemon_check_version in $lemon_version_list; do + if test "$lemon_version" = "$lemon_check_version"; then + php_cv_lemon_version="$lemon_check_version (ok)" + fi + done + +fi + +echo "$ac_t""$php_cv_lemon_version" 1>&6 + else + lemon_version=none + fi + case $php_cv_lemon_version in + ""|invalid) + lemon_msg="lemon versions supported for regeneration of libsqlite parsers: $lemon_version_list (found: $lemon_version)." + echo "configure: warning: $lemon_msg" 1>&2 + LEMON="exit 0;" + ;; + esac + + PHP_VAR_SUBST="$PHP_VAR_SUBST LEMON" + + + SQLITE_MODULE_TYPE=builtin + PHP_SQLITE_CFLAGS="-I@ext_srcdir@/libsqlite/src -I@ext_builddir@/libsqlite/src $pdo_inc_path" + sqlite_extra_sources="libsqlite/src/opcodes.c \ + libsqlite/src/parse.c libsqlite/src/encode.c \ + libsqlite/src/auth.c libsqlite/src/btree.c libsqlite/src/build.c \ + libsqlite/src/delete.c libsqlite/src/expr.c libsqlite/src/func.c \ + libsqlite/src/hash.c libsqlite/src/insert.c libsqlite/src/main.c \ + libsqlite/src/os.c libsqlite/src/pager.c \ + libsqlite/src/printf.c libsqlite/src/random.c \ + libsqlite/src/select.c libsqlite/src/table.c libsqlite/src/tokenize.c \ + libsqlite/src/update.c libsqlite/src/util.c libsqlite/src/vdbe.c \ + libsqlite/src/attach.c libsqlite/src/btree_rb.c libsqlite/src/pragma.c \ + libsqlite/src/vacuum.c libsqlite/src/copy.c \ + libsqlite/src/vdbeaux.c libsqlite/src/date.c \ + libsqlite/src/where.c libsqlite/src/trigger.c" + fi + sqlite_sources="sqlite.c sess_sqlite.c pdo_sqlite2.c $sqlite_extra_sources" + + ext_builddir=ext/sqlite + ext_srcdir=$abs_srcdir/ext/sqlite + + ac_extra=`echo "$PHP_SQLITE_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SQLITE_SHARED=no + + + case ext/sqlite in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in $sqlite_sources; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then + { echo "configure: error: +You've configured extension sqlite, which depends on extension spl, +but you've either not enabled spl, or have disabled it. +" 1>&2; exit 1; } + fi + + + am_i_shared=$PHP_SQLITE_SHARED + is_it_shared=$PHP_PDO_SHARED + is_it_enabled=$PHP_PDO + if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then + { echo "configure: error: +You've configured extension sqlite to build statically, but it +depends on extension pdo, which you've configured to build shared. +You either need to build sqlite shared or build pdo statically for the +build to be successful. +" 1>&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then + { echo "configure: error: +You've configured extension sqlite, which depends on extension pdo, +but you've either not enabled pdo, or have disabled it. +" 1>&2; exit 1; } + fi + + + + src=$ext_srcdir/Makefile.frag + ac_srcdir=$ext_srcdir + ac_builddir=$ext_builddir + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + + + PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_SHARED_LIBADD" + + + + for header_file in $ext_builddir/libsqlite/src/sqlite.h; do + + + unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INSTALLHEADERS$unique=set" + + INSTALL_HEADERS="$INSTALL_HEADERS $header_file" + + fi + + done + + + + if test "$SQLITE_MODULE_TYPE" = "builtin"; then + + + $php_shtool mkdir -p $ext_builddir/libsqlite/src + + + echo $ac_n "checking size of char *""... $ac_c" 1>&6 +echo "configure:90976: checking size of char *" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_char_p=4 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(char *)); + return(0); +} +EOF +if { (eval echo configure:90995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_char_p=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_char_p=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6 +cat >> confdefs.h <> confdefs.h <<\EOF +#define SQLITE_PTR_SZ SIZEOF_CHAR_P +EOF + + if test "$PHP_SQLITE_UTF8" = "yes"; then + SQLITE_ENCODING="UTF8" + cat >> confdefs.h <<\EOF +#define SQLITE_UTF8 1 +EOF + + else + SQLITE_ENCODING="ISO8859" + fi + + PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_ENCODING" + + + SQLITE_VERSION=`cat $ext_srcdir/libsqlite/VERSION` + + PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_VERSION" + + + sed -e s/--VERS--/$SQLITE_VERSION/ -e s/--ENCODING--/$SQLITE_ENCODING/ $ext_srcdir/libsqlite/src/sqlite.h.in > $ext_builddir/libsqlite/src/sqlite.h + + if test "$ext_shared" = "no" || test "$ext_srcdir" != "$abs_srcdir"; then + echo '#include ' > $ext_builddir/libsqlite/src/config.h + else + echo "#include \"$abs_builddir/config.h\"" > $ext_builddir/libsqlite/src/config.h + fi + + cat >> $ext_builddir/libsqlite/src/config.h <&6 +echo "configure:91057: 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 < +/* Override any gcc2 internal prototype to avoid an 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:91085: \"$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 <&6 +fi +done + + for ac_hdr in time.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:91113: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:91123: \"$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 <&6 +fi +done + +fi + + + +echo $ac_n "checking whether flush should be called explicitly after a buffered io""... $ac_c" 1>&6 +echo "configure:91154: checking whether flush should be called explicitly after a buffered io" >&5 +if eval "test \"`echo '$''{'ac_cv_flush_io'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_flush_io=no + +else + cat > conftest.$ac_ext < +#include + +int main(int argc, char **argv) +{ + char *filename = tmpnam(NULL); + char buffer[64]; + int result = 0; + + FILE *fp = fopen(filename, "wb"); + if (NULL == fp) + return 0; + fputs("line 1\n", fp); + fputs("line 2\n", fp); + fclose(fp); + + fp = fopen(filename, "rb+"); + if (NULL == fp) + return 0; + fgets(buffer, sizeof(buffer), fp); + fputs("line 3\n", fp); + rewind(fp); + fgets(buffer, sizeof(buffer), fp); + if (0 != strcmp(buffer, "line 1\n")) + result = 1; + fgets(buffer, sizeof(buffer), fp); + if (0 != strcmp(buffer, "line 3\n")) + result = 1; + fclose(fp); + unlink(filename); + + exit(result); +} + +EOF +if { (eval echo configure:91203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_flush_io=no + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_flush_io=yes + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_flush_io" 1>&6 +if test "$ac_cv_flush_io" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_FLUSHIO 1 +EOF + +fi + +if test "$ac_cv_func_crypt" = "no"; then + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:91231: 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 <&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 -lcrypt" + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6 +echo "configure:91279: checking for standard DES crypt" >&5 +if eval "test \"`echo '$''{'ac_cv_crypt_des'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + + ac_cv_crypt_des=yes + +else + cat > conftest.$ac_ext < +#endif + +#if HAVE_CRYPT_H +#include +#endif + +main() { +#if HAVE_CRYPT + exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M")); +#else + exit(0); +#endif +} +EOF +if { (eval echo configure:91309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_crypt_des=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_crypt_des=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_crypt_des" 1>&6 +if test "$ac_cv_crypt_des" = "yes"; then + ac_result=1 +else + ac_result=0 +fi +cat >> confdefs.h <&6 +echo "configure:91339: checking for extended DES crypt" >&5 +if eval "test \"`echo '$''{'ac_cv_crypt_ext_des'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + + ac_cv_crypt_ext_des=no + +else + cat > conftest.$ac_ext < +#endif + +#if HAVE_CRYPT_H +#include +#endif + +main() { +#if HAVE_CRYPT + exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc")); +#else + exit(0); +#endif +} +EOF +if { (eval echo configure:91369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_crypt_ext_des=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_crypt_ext_des=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_crypt_ext_des" 1>&6 +if test "$ac_cv_crypt_ext_des" = "yes"; then + ac_result=1 +else + ac_result=0 +fi +cat >> confdefs.h <&6 +echo "configure:91399: checking for MD5 crypt" >&5 +if eval "test \"`echo '$''{'ac_cv_crypt_md5'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_crypt_md5=no + +else + cat > conftest.$ac_ext < +#endif + +#if HAVE_CRYPT_H +#include +#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:91438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_crypt_md5=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_crypt_md5=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_crypt_md5" 1>&6 +if test "$ac_cv_crypt_md5" = "yes"; then + ac_result=1 +else + if test "$ac_cv_crypt_des" != "yes"; then + + DEBUG_LOG=debug.log + cat >debug.log <conftest.$ac_ext <>debug.log 2>&1 + rm -fr conftest* + + fi + ac_result=0 +fi +cat >> confdefs.h <&6 +echo "configure:91497: checking for Blowfish crypt" >&5 +if eval "test \"`echo '$''{'ac_cv_crypt_blowfish'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_crypt_blowfish=no + +else + cat > conftest.$ac_ext < +#endif + +#if HAVE_CRYPT_H +#include +#endif + +main() { +#if HAVE_CRYPT + char salt[30], answer[70]; + + salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0'; + strcat(salt,"rasmuslerd............"); + strcpy(answer,salt); + strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra"); + exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer)); +#else + exit(0); +#endif +} +EOF +if { (eval echo configure:91533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_crypt_blowfish=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_crypt_blowfish=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_crypt_blowfish" 1>&6 +if test "$ac_cv_crypt_blowfish" = "yes"; then + ac_result=1 +else + ac_result=0 +fi +cat >> confdefs.h <&6 +echo "configure:91565: 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 < +/* Override any gcc2 internal prototype to avoid an 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:91593: \"$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 <&6 +fi +done + +echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6 +echo "configure:91618: checking for working fnmatch" >&5 +if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # Some versions of Solaris or SCO have a broken fnmatch function. +# So we run a test program. If we are cross-compiling, take no chance. +# Thanks to John Oleynick and Franc,ois Pinard for this test. +if test "$cross_compiling" = yes; then + ac_cv_func_fnmatch_works=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_fnmatch_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_fnmatch_works=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6 +if test $ac_cv_func_fnmatch_works = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FNMATCH 1 +EOF + +fi + + + + +php_with_regex=php + + +# Check whether --with-regex or --without-regex was given. +if test "${with_regex+set}" = set; then + withval="$with_regex" + PHP_REGEX=$withval +else + + PHP_REGEX=php + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_REGEX=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_REGEX + + + + + +case $PHP_REGEX in + system) + if test "$PHP_SAPI" = "apache" || test "$PHP_SAPI" = "apache2filter" || test "$PHP_SAPI" = "apache2handler"; then + REGEX_TYPE=php + else + REGEX_TYPE=system + fi + ;; + apache) + REGEX_TYPE=apache + ;; + php) + REGEX_TYPE=php + ;; + *) + REGEX_TYPE=php + echo "configure: warning: Invalid regex library type selected. Using default value: php" 1>&2 + ;; +esac + +if test "$REGEX_TYPE" = "php"; then + cat >> confdefs.h <<\EOF +#define HAVE_REGEX_T_RE_MAGIC 1 +EOF + + cat >> confdefs.h <<\EOF +#define HSREGEX 1 +EOF + + cat >> confdefs.h <<\EOF +#define REGEX 1 +EOF + + + + case regex in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "regex"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/regex/"; ac_bdir="regex/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in regcomp.c regexec.c regerror.c regfree.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<> confdefs.h <<\EOF +#define REGEX 0 +EOF + + echo $ac_n "checking whether field re_magic exists in struct regex_t""... $ac_c" 1>&6 +echo "configure:91764: checking whether field re_magic exists in struct regex_t" >&5 +if eval "test \"`echo '$''{'ac_cv_regex_t_re_magic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +#include +int main() { +regex_t rt; rt.re_magic; +; return 0; } +EOF +if { (eval echo configure:91778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_regex_t_re_magic=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_regex_t_re_magic=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_regex_t_re_magic" 1>&6 + if test "$ac_cv_regex_t_re_magic" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_REGEX_T_RE_MAGIC +EOF + + fi +fi +echo $ac_n "checking which regex library to use""... $ac_c" 1>&6 +echo "configure:91799: checking which regex library to use" >&5 +echo "$ac_t""$REGEX_TYPE" 1>&6 + +echo $ac_n "checking whether rounding works as expected""... $ac_c" 1>&6 +echo "configure:91803: checking whether rounding works as expected" >&5 +if test "$cross_compiling" = yes; then + + PHP_ROUND_FUZZ=0.50000000001 + echo "$ac_t""cross compile" 1>&6 + +else + cat > conftest.$ac_ext < + /* keep this out-of-line to prevent use of gcc inline floor() */ + double somefn(double n) { + return floor(n*pow(10,2) + 0.5); + } + int main() { + return somefn(0.045)/10.0 != 0.5; + } + +EOF +if { (eval echo configure:91824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + PHP_ROUND_FUZZ=0.5 + echo "$ac_t""yes" 1>&6 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + PHP_ROUND_FUZZ=0.50000000001 + echo "$ac_t""no" 1>&6 + +fi +rm -fr conftest* +fi + +cat >> confdefs.h <&6 +else + +for ac_func in fork CreateProcess +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:91854: 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 < +/* Override any gcc2 internal prototype to avoid an 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:91882: \"$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 <&6 +php_can_support_proc_open=no + +fi +done + +fi + +echo $ac_n "checking if your OS can spawn processes with inherited handles""... $ac_c" 1>&6 +echo "configure:91914: checking if your OS can spawn processes with inherited handles" >&5 +if test "$php_can_support_proc_open" = "yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define PHP_CAN_SUPPORT_PROC_OPEN 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = "embed"; then + cat >> confdefs.h <<\EOF +#define ENABLE_CHROOT_FUNC 1 +EOF + +fi + + + unset ac_cv_func_res_nmkquery + unset ac_cv_func___res_nmkquery + unset found + + echo $ac_n "checking for res_nmkquery""... $ac_c" 1>&6 +echo "configure:91939: checking for res_nmkquery" >&5 +if eval "test \"`echo '$''{'ac_cv_func_res_nmkquery'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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_nmkquery(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_res_nmkquery) || defined (__stub___res_nmkquery) +choke me +#else +res_nmkquery(); +#endif + +; return 0; } +EOF +if { (eval echo configure:91967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_nmkquery=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_res_nmkquery=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'res_nmkquery`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __res_nmkquery""... $ac_c" 1>&6 +echo "configure:91985: checking for __res_nmkquery" >&5 +if eval "test \"`echo '$''{'ac_cv_func___res_nmkquery'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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_nmkquery(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub___res_nmkquery) || defined (__stub_____res_nmkquery) +choke me +#else +__res_nmkquery(); +#endif + +; return 0; } +EOF +if { (eval echo configure:92013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___res_nmkquery=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___res_nmkquery=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__res_nmkquery`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_RES_NMKQUERY 1 +EOF + + ac_cv_func_res_nmkquery=yes + ;; + + *) + + unset ac_cv_lib_resolv_res_nmkquery + unset ac_cv_lib_resolv___res_nmkquery + unset found + echo $ac_n "checking for res_nmkquery in -lresolv""... $ac_c" 1>&6 +echo "configure:92051: checking for res_nmkquery in -lresolv" >&5 +ac_lib_var=`echo resolv'_'res_nmkquery | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nmkquery in -lresolv""... $ac_c" 1>&6 +echo "configure:92090: checking for __res_nmkquery in -lresolv" >&5 +ac_lib_var=`echo resolv'_'__res_nmkquery | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lresolv" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case resolv in + c|c_r|pthread*) ;; + *) + LIBS="-lresolv $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_NMKQUERY 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBRESOLV 1 +EOF + + ac_cv_func_res_nmkquery=yes + else + + + unset ac_cv_lib_bind_res_nmkquery + unset ac_cv_lib_bind___res_nmkquery + unset found + echo $ac_n "checking for res_nmkquery in -lbind""... $ac_c" 1>&6 +echo "configure:92187: checking for res_nmkquery in -lbind" >&5 +ac_lib_var=`echo bind'_'res_nmkquery | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nmkquery in -lbind""... $ac_c" 1>&6 +echo "configure:92226: checking for __res_nmkquery in -lbind" >&5 +ac_lib_var=`echo bind'_'__res_nmkquery | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lbind" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case bind in + c|c_r|pthread*) ;; + *) + LIBS="-lbind $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_NMKQUERY 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBBIND 1 +EOF + + ac_cv_func_res_nmkquery=yes + else + + + unset ac_cv_lib_socket_res_nmkquery + unset ac_cv_lib_socket___res_nmkquery + unset found + echo $ac_n "checking for res_nmkquery in -lsocket""... $ac_c" 1>&6 +echo "configure:92323: checking for res_nmkquery in -lsocket" >&5 +ac_lib_var=`echo socket'_'res_nmkquery | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nmkquery in -lsocket""... $ac_c" 1>&6 +echo "configure:92362: checking for __res_nmkquery in -lsocket" >&5 +ac_lib_var=`echo socket'_'__res_nmkquery | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lsocket" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case socket in + c|c_r|pthread*) ;; + *) + LIBS="-lsocket $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_NMKQUERY 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + ac_cv_func_res_nmkquery=yes + else + + : + + fi + + + fi + + + fi + + ;; + + esac + + + unset ac_cv_func_res_nsend + unset ac_cv_func___res_nsend + unset found + + echo $ac_n "checking for res_nsend""... $ac_c" 1>&6 +echo "configure:92474: checking for res_nsend" >&5 +if eval "test \"`echo '$''{'ac_cv_func_res_nsend'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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_nsend(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_res_nsend) || defined (__stub___res_nsend) +choke me +#else +res_nsend(); +#endif + +; return 0; } +EOF +if { (eval echo configure:92502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_nsend=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_res_nsend=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'res_nsend`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __res_nsend""... $ac_c" 1>&6 +echo "configure:92520: checking for __res_nsend" >&5 +if eval "test \"`echo '$''{'ac_cv_func___res_nsend'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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_nsend(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub___res_nsend) || defined (__stub_____res_nsend) +choke me +#else +__res_nsend(); +#endif + +; return 0; } +EOF +if { (eval echo configure:92548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___res_nsend=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___res_nsend=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__res_nsend`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_RES_NSEND 1 +EOF + + ac_cv_func_res_nsend=yes + ;; + + *) + + unset ac_cv_lib_resolv_res_nsend + unset ac_cv_lib_resolv___res_nsend + unset found + echo $ac_n "checking for res_nsend in -lresolv""... $ac_c" 1>&6 +echo "configure:92586: checking for res_nsend in -lresolv" >&5 +ac_lib_var=`echo resolv'_'res_nsend | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nsend in -lresolv""... $ac_c" 1>&6 +echo "configure:92625: checking for __res_nsend in -lresolv" >&5 +ac_lib_var=`echo resolv'_'__res_nsend | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lresolv" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case resolv in + c|c_r|pthread*) ;; + *) + LIBS="-lresolv $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_NSEND 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBRESOLV 1 +EOF + + ac_cv_func_res_nsend=yes + else + + + unset ac_cv_lib_bind_res_nsend + unset ac_cv_lib_bind___res_nsend + unset found + echo $ac_n "checking for res_nsend in -lbind""... $ac_c" 1>&6 +echo "configure:92722: checking for res_nsend in -lbind" >&5 +ac_lib_var=`echo bind'_'res_nsend | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nsend in -lbind""... $ac_c" 1>&6 +echo "configure:92761: checking for __res_nsend in -lbind" >&5 +ac_lib_var=`echo bind'_'__res_nsend | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lbind" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case bind in + c|c_r|pthread*) ;; + *) + LIBS="-lbind $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_NSEND 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBBIND 1 +EOF + + ac_cv_func_res_nsend=yes + else + + + unset ac_cv_lib_socket_res_nsend + unset ac_cv_lib_socket___res_nsend + unset found + echo $ac_n "checking for res_nsend in -lsocket""... $ac_c" 1>&6 +echo "configure:92858: checking for res_nsend in -lsocket" >&5 +ac_lib_var=`echo socket'_'res_nsend | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nsend in -lsocket""... $ac_c" 1>&6 +echo "configure:92897: checking for __res_nsend in -lsocket" >&5 +ac_lib_var=`echo socket'_'__res_nsend | sed 'y%./+-%__p_%'` +if eval "test \"`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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lsocket" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case socket in + c|c_r|pthread*) ;; + *) + LIBS="-lsocket $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_RES_NSEND 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + ac_cv_func_res_nsend=yes + else + + : + + fi + + + fi + + + fi + + ;; + + esac + + + unset ac_cv_func_dn_expand + unset ac_cv_func___dn_expand + unset found + + echo $ac_n "checking for dn_expand""... $ac_c" 1>&6 +echo "configure:93009: checking for dn_expand" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dn_expand'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dn_expand(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dn_expand) || defined (__stub___dn_expand) +choke me +#else +dn_expand(); +#endif + +; return 0; } +EOF +if { (eval echo configure:93037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dn_expand=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dn_expand=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dn_expand`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __dn_expand""... $ac_c" 1>&6 +echo "configure:93055: checking for __dn_expand" >&5 +if eval "test \"`echo '$''{'ac_cv_func___dn_expand'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __dn_expand(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub___dn_expand) || defined (__stub_____dn_expand) +choke me +#else +__dn_expand(); +#endif + +; return 0; } +EOF +if { (eval echo configure:93083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___dn_expand=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___dn_expand=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'__dn_expand`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + +fi + + + case $found in + yes) + cat >> confdefs.h <<\EOF +#define HAVE_DN_EXPAND 1 +EOF + + ac_cv_func_dn_expand=yes + ;; + + *) + + unset ac_cv_lib_resolv_dn_expand + unset ac_cv_lib_resolv___dn_expand + unset found + echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 +echo "configure:93121: checking for dn_expand in -lresolv" >&5 +ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_expand in -lresolv""... $ac_c" 1>&6 +echo "configure:93160: checking for __dn_expand in -lresolv" >&5 +ac_lib_var=`echo resolv'_'__dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lresolv" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case resolv in + c|c_r|pthread*) ;; + *) + LIBS="-lresolv $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_DN_EXPAND 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBRESOLV 1 +EOF + + ac_cv_func_dn_expand=yes + else + + + unset ac_cv_lib_bind_dn_expand + unset ac_cv_lib_bind___dn_expand + unset found + echo $ac_n "checking for dn_expand in -lbind""... $ac_c" 1>&6 +echo "configure:93257: checking for dn_expand in -lbind" >&5 +ac_lib_var=`echo bind'_'dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lbind $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_expand in -lbind""... $ac_c" 1>&6 +echo "configure:93296: checking for __dn_expand in -lbind" >&5 +ac_lib_var=`echo bind'_'__dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lbind $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lbind" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case bind in + c|c_r|pthread*) ;; + *) + LIBS="-lbind $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_DN_EXPAND 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBBIND 1 +EOF + + ac_cv_func_dn_expand=yes + else + + + unset ac_cv_lib_socket_dn_expand + unset ac_cv_lib_socket___dn_expand + unset found + echo $ac_n "checking for dn_expand in -lsocket""... $ac_c" 1>&6 +echo "configure:93393: checking for dn_expand in -lsocket" >&5 +ac_lib_var=`echo socket'_'dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_expand in -lsocket""... $ac_c" 1>&6 +echo "configure:93432: checking for __dn_expand in -lsocket" >&5 +ac_lib_var=`echo socket'_'__dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + found=yes +else + echo "$ac_t""no" 1>&6 +found=no +fi + + +fi + + + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -lsocket" + if test "$cross_compiling" = yes; then + found=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + found=no +fi +rm -fr conftest* +fi + + LIBS=$ac_libs + fi + + if test "$found" = "yes"; then + + + case socket in + c|c_r|pthread*) ;; + *) + LIBS="-lsocket $LIBS" + ;; + esac + + + cat >> confdefs.h <<\EOF +#define HAVE_DN_EXPAND 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + ac_cv_func_dn_expand=yes + else + + : + + fi + + + fi + + + fi + + ;; + + esac + + +echo $ac_n "checking whether atof() accepts NAN""... $ac_c" 1>&6 +echo "configure:93540: checking whether atof() accepts NAN" >&5 +if eval "test \"`echo '$''{'ac_cv_atof_accept_nan'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_atof_accept_nan=no + +else + cat > conftest.$ac_ext < +#include + +#ifdef HAVE_ISNAN +#define zend_isnan(a) isnan(a) +#elif defined(HAVE_FPCLASS) +#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) +#else +#define zend_isnan(a) 0 +#endif + +int main(int argc, char** argv) +{ + return zend_isnan(atof("NAN")) ? 0 : 1; +} + +EOF +if { (eval echo configure:93571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_atof_accept_nan=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_atof_accept_nan=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_atof_accept_nan" 1>&6 +if test "$ac_cv_atof_accept_nan" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_ATOF_ACCEPTS_NAN 1 +EOF + +fi + +echo $ac_n "checking whether atof() accepts INF""... $ac_c" 1>&6 +echo "configure:93598: checking whether atof() accepts INF" >&5 +if eval "test \"`echo '$''{'ac_cv_atof_accept_inf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_atof_accept_inf=no + +else + cat > conftest.$ac_ext < +#include + +#ifdef HAVE_ISINF +#define zend_isinf(a) isinf(a) +#elif defined(INFINITY) +/* Might not work, but is required by ISO C99 */ +#define zend_isinf(a) (((a)==INFINITY)?1:0) +#elif defined(HAVE_FPCLASS) +#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF)) +#else +#define zend_isinf(a) 0 +#endif + +int main(int argc, char** argv) +{ + return zend_isinf(atof("INF")) && zend_isinf(atof("-INF")) ? 0 : 1; +} + +EOF +if { (eval echo configure:93632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_atof_accept_inf=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_atof_accept_inf=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_atof_accept_inf" 1>&6 +if test "$ac_cv_atof_accept_inf" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_ATOF_ACCEPTS_INF 1 +EOF + +fi + +echo $ac_n "checking whether HUGE_VAL == INF""... $ac_c" 1>&6 +echo "configure:93659: checking whether HUGE_VAL == INF" >&5 +if eval "test \"`echo '$''{'ac_cv_huge_val_inf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_huge_val_inf=yes + +else + cat > conftest.$ac_ext < +#include + +#ifdef HAVE_ISINF +#define zend_isinf(a) isinf(a) +#elif defined(INFINITY) +/* Might not work, but is required by ISO C99 */ +#define zend_isinf(a) (((a)==INFINITY)?1:0) +#elif defined(HAVE_FPCLASS) +#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF)) +#else +#define zend_isinf(a) 0 +#endif + +int main(int argc, char** argv) +{ + return zend_isinf(HUGE_VAL) ? 0 : 1; +} + +EOF +if { (eval echo configure:93693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_huge_val_inf=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_huge_val_inf=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_huge_val_inf" 1>&6 +if test "$ac_cv_huge_val_inf" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_HUGE_VAL_INF 1 +EOF + +fi + +echo $ac_n "checking whether HUGE_VAL + -HUGEVAL == NAN""... $ac_c" 1>&6 +echo "configure:93720: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5 +if eval "test \"`echo '$''{'ac_cv_huge_val_nan'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + + ac_cv_huge_val_nan=yes + +else + cat > conftest.$ac_ext < +#include + +#ifdef HAVE_ISNAN +#define zend_isnan(a) isnan(a) +#elif defined(HAVE_FPCLASS) +#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) +#else +#define zend_isnan(a) 0 +#endif + +int main(int argc, char** argv) +{ +#if defined(__sparc__) && !(__GNUC__ >= 3) + /* prevent bug #27830 */ + return 1; +#else + return zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1; +#endif +} + +EOF +if { (eval echo configure:93756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_huge_val_nan=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_huge_val_nan=no + +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_huge_val_nan" 1>&6 +if test "$ac_cv_huge_val_nan" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_HUGE_VAL_NAN 1 +EOF + +fi + +echo $ac_n "checking whether strptime() declaration fails""... $ac_c" 1>&6 +echo "configure:93783: checking whether strptime() declaration fails" >&5 +if eval "test \"`echo '$''{'ac_cv_strptime_decl_fails'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < + +int main() { + +#ifndef HAVE_STRPTIME +#error no strptime() on this platform +#else +/* use invalid strptime() declaration to see if it fails to compile */ +int strptime(const char *s, const char *format, struct tm *tm); +#endif + +; return 0; } +EOF +if { (eval echo configure:93805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_strptime_decl_fails=no + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_strptime_decl_fails=yes + +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_strptime_decl_fails" 1>&6 +if test "$ac_cv_strptime_decl_fails" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STRPTIME_DECL_FAILS 1 +EOF + +fi + +for ac_hdr in wchar.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:93833: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:93843: \"$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 <&6 +fi +done + +for ac_func in mblen +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:93872: 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 < +/* Override any gcc2 internal prototype to avoid an 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:93900: \"$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 <&6 +fi +done + +for ac_func in mbrlen mbsinit +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:93927: 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 < +/* Override any gcc2 internal prototype to avoid an 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:93955: \"$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 <&6 +fi +done + +echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6 +echo "configure:93980: checking for mbstate_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +#endif + +int main() { + +int __tmp__() { mbstate_t a; } + +; return 0; } +EOF +if { (eval echo configure:93999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_type_mbstate_t=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_type_mbstate_t=no + +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_mbstate_t" 1>&6 +if test "$ac_cv_type_mbstate_t" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_MBSTATE_T 1 +EOF + +fi + + + ext_builddir=ext/standard + ext_srcdir=$abs_srcdir/ext/standard + + ac_extra= + + if test "" != "shared" && test "" != "yes" && test "" != "cli"; then + PHP_STANDARD_SHARED=no + + + case ext/standard in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/standard"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/standard/"; ac_bdir="ext/standard/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \ + cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \ + flock_compat.c formatted_print.c fsock.c head.c html.c image.c \ + info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \ + microtime.c pack.c pageinfo.c quot_print.c rand.c \ + reg.c soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \ + url_scanner.c var.c versioning.c assert.c strnatcmp.c levenshtein.c \ + incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \ + http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \ + var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \ + filters.c proc_open.c streamsfuncs.c http.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> Makefile.fragments + + + + for header_file in ext/standard/; do + + + unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INSTALLHEADERS$unique=set" + + INSTALL_HEADERS="$INSTALL_HEADERS $header_file" + + fi + + done + + + + + +php_with_sybase=no + +echo $ac_n "checking for Sybase support""... $ac_c" 1>&6 +echo "configure:94375: checking for Sybase support" >&5 +# Check whether --with-sybase or --without-sybase was given. +if test "${with_sybase+set}" = set; then + withval="$with_sybase" + PHP_SYBASE=$withval +else + + PHP_SYBASE=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SYBASE=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SYBASE in +shared,*) + PHP_SYBASE=`echo "$PHP_SYBASE"|$SED 's/^shared,//'` + ;; +shared) + PHP_SYBASE=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SYBASE" != "no"; then + if test "$PHP_SYBASE" = "yes"; then + SYBASE_INCDIR=/home/sybase/include + SYBASE_LIBDIR=/home/sybase/lib + else + SYBASE_INCDIR=$PHP_SYBASE/include + SYBASE_LIBDIR=$PHP_SYBASE/lib + fi + + if test "$SYBASE_INCDIR" != "/usr/include"; then + + if test -z "$SYBASE_INCDIR" || echo "$SYBASE_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$SYBASE_INCDIR + else + + ep_dir="`echo $SYBASE_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SYBASE_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + SYBASE_SHARED_LIBADD="-lsybdb $SYBASE_SHARED_LIBADD" + if test -n "$SYBASE_LIBDIR"; then + + if test "$SYBASE_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SYBASE_LIBDIR" != "/usr/lib"; then + + if test -z "$SYBASE_LIBDIR" || echo "$SYBASE_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$SYBASE_LIBDIR + else + + ep_dir="`echo $SYBASE_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SYBASE_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + SYBASE_SHARED_LIBADD="-L$ai_p $SYBASE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SYBASE_SHARED_LIBADD="$ld_runpath_switch$ai_p $SYBASE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$SYBASE_LIBDIR"; then + + if test "$SYBASE_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SYBASE_LIBDIR" != "/usr/lib"; then + + if test -z "$SYBASE_LIBDIR" || echo "$SYBASE_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$SYBASE_LIBDIR + else + + ep_dir="`echo $SYBASE_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SYBASE_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case sybdb in + c|c_r|pthread*) ;; + *) + LIBS="-lsybdb $LIBS" + ;; + esac + + + + + fi + + + + ext_builddir=ext/sybase + ext_srcdir=$abs_srcdir/ext/sybase + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SYBASE_SHARED=no + + + case ext/sybase in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/sybase"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/sybase/"; ac_bdir="ext/sybase/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_sybase_db.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:94836: 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 <&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 "$ext_shared" = "yes"; then + SYBASE_SHARED_LIBADD="-ldnet_stub $SYBASE_SHARED_LIBADD" + if test -n ""; then + + if test "" != "/usr/$PHP_LIBDIR" && test "" != "/usr/lib"; then + + if test -z "" || echo "" | grep '^/' >/dev/null ; then + ai_p= + else + + ep_dir="`echo |$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"\"`" + fi + + + if test "$ext_shared" = "yes"; then + SYBASE_SHARED_LIBADD="-L$ai_p $SYBASE_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SYBASE_SHARED_LIBADD="$ld_runpath_switch$ai_p $SYBASE_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n ""; then + + if test "" != "/usr/$PHP_LIBDIR" && test "" != "/usr/lib"; then + + if test -z "" || echo "" | grep '^/' >/dev/null ; then + ai_p= + else + + ep_dir="`echo |$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case dnet_stub in + c|c_r|pthread*) ;; + *) + LIBS="-ldnet_stub $LIBS" + ;; + esac + + + + + fi + + + 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 + + echo $ac_n "checking for tdsdbopen in -lsybdb""... $ac_c" 1>&6 +echo "configure:94981: checking for tdsdbopen in -lsybdb" >&5 +ac_lib_var=`echo sybdb'_'tdsdbopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsybdb $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define PHP_SYBASE_DBOPEN tdsdbopen +EOF + + cat >> confdefs.h <<\EOF +#define DBMFIX 1 +EOF + +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<\EOF +#define PHP_SYBASE_DBOPEN dbopen +EOF + +fi + + + + PHP_VAR_SUBST="$PHP_VAR_SUBST SYBASE_SHARED_LIBADD" + +fi + + + +php_with_sybase_ct=no + +echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6 +echo "configure:95042: checking for Sybase-CT support" >&5 +# Check whether --with-sybase-ct or --without-sybase-ct was given. +if test "${with_sybase_ct+set}" = set; then + withval="$with_sybase_ct" + PHP_SYBASE_CT=$withval +else + + PHP_SYBASE_CT=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SYBASE_CT=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SYBASE_CT in +shared,*) + PHP_SYBASE_CT=`echo "$PHP_SYBASE_CT"|$SED 's/^shared,//'` + ;; +shared) + PHP_SYBASE_CT=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SYBASE_CT" != "no"; then + + if test "$PHP_SYBASE" != "no" && test "$ext_shared" = "no"; then + { echo "configure: error: You can not use both --with-sybase and --with-sybase-ct in same build!" 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define HAVE_SYBASE_CT 1 +EOF + + + ext_builddir=ext/sybase_ct + ext_srcdir=$abs_srcdir/ext/sybase_ct + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SYBASE_CT_SHARED=no + + + case ext/sybase_ct in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/sybase_ct"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/sybase_ct/"; ac_bdir="ext/sybase_ct/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_sybase_ct.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects</dev/null ; then + ai_p=$SYBASE_CT_INCDIR + else + + ep_dir="`echo $SYBASE_CT_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SYBASE_CT_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + else + { echo "configure: error: ctpublic.h missing!" 1>&2; exit 1; } + fi + + + if test "$SYBASE_CT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$SYBASE_CT_LIBDIR" != "/usr/lib"; then + + if test -z "$SYBASE_CT_LIBDIR" || echo "$SYBASE_CT_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$SYBASE_CT_LIBDIR + else + + ep_dir="`echo $SYBASE_CT_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$SYBASE_CT_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-L$ai_p $SYBASE_CT_SHARED_LIBADD" + test -n "$ld_runpath_switch" && SYBASE_CT_SHARED_LIBADD="$ld_runpath_switch$ai_p $SYBASE_CT_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + if test -f $SYBASE_CT_INCDIR/tds.h; then + + + case ct in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-lct $SYBASE_CT_SHARED_LIBADD" + else + + + case ct in + c|c_r|pthread*) ;; + *) + LIBS="-lct $LIBS" + ;; + esac + + + fi + ;; + esac + + + SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct" + else + + + case cs in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-lcs $SYBASE_CT_SHARED_LIBADD" + else + + + case cs in + c|c_r|pthread*) ;; + *) + LIBS="-lcs $LIBS" + ;; + esac + + + fi + ;; + esac + + + + + case ct in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-lct $SYBASE_CT_SHARED_LIBADD" + else + + + case ct in + c|c_r|pthread*) ;; + *) + LIBS="-lct $LIBS" + ;; + esac + + + fi + ;; + esac + + + + + case comn in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-lcomn $SYBASE_CT_SHARED_LIBADD" + else + + + case comn in + c|c_r|pthread*) ;; + *) + LIBS="-lcomn $LIBS" + ;; + esac + + + fi + ;; + esac + + + + + case intl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-lintl $SYBASE_CT_SHARED_LIBADD" + else + + + case intl in + c|c_r|pthread*) ;; + *) + LIBS="-lintl $LIBS" + ;; + esac + + + fi + ;; + esac + + + + SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl" + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + $SYBASE_CT_LIBS + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6 +echo "configure:95681: checking for netg_errstr in -ltcl" >&5 +ac_lib_var=`echo tcl'_'netg_errstr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltcl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + + case tcl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-ltcl $SYBASE_CT_SHARED_LIBADD" + else + + + case tcl in + c|c_r|pthread*) ;; + *) + LIBS="-ltcl $LIBS" + ;; + esac + + + fi + ;; + esac + + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_tcl_netg_errstr + + + + case sybtcl in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD" + else + + + case sybtcl in + c|c_r|pthread*) ;; + *) + LIBS="-lsybtcl $LIBS" + ;; + esac + + + fi + ;; + esac + + + + +fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$SYBASE_CT_LIBDIR" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6 +echo "configure:95875: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + case insck in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" + else + + + case insck in + c|c_r|pthread*) ;; + *) + LIBS="-linsck $LIBS" + ;; + esac + + + fi + ;; + esac + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_insck_insck__getVdate + + +fi + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="-L$SYBASE_CT_LIBDIR" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6 +echo "configure:96042: checking for bsd_tcp in -linsck" >&5 +ac_lib_var=`echo insck'_'bsd_tcp | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-linsck $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + + case insck in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + SYBASE_CT_SHARED_LIBADD="-linsck $SYBASE_CT_SHARED_LIBADD" + else + + + case insck in + c|c_r|pthread*) ;; + *) + LIBS="-linsck $LIBS" + ;; + esac + + + fi + ;; + esac + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_insck_bsd_tcp + + +fi + + fi +fi + + + +php_enable_sysvmsg=no + +echo $ac_n "checking whether to enable System V IPC support""... $ac_c" 1>&6 +echo "configure:96121: checking whether to enable System V IPC support" >&5 +# Check whether --enable-sysvmsg or --disable-sysvmsg was given. +if test "${enable_sysvmsg+set}" = set; then + enableval="$enable_sysvmsg" + PHP_SYSVMSG=$enableval +else + + PHP_SYSVMSG=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SYSVMSG=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SYSVMSG in +shared,*) + PHP_SYSVMSG=`echo "$PHP_SYSVMSG"|$SED 's/^shared,//'` + ;; +shared) + PHP_SYSVMSG=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SYSVMSG" != "no"; then + ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 +echo "configure:96167: checking for sys/msg.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:96177: \"$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 + : +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: Cannot enable System V IPC support, sys/msg.h is missing" 1>&2; exit 1; } + +fi + + + cat >> confdefs.h <<\EOF +#define HAVE_SYSVMSG 1 +EOF + + + ext_builddir=ext/sysvmsg + ext_srcdir=$abs_srcdir/ext/sysvmsg + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SYSVMSG_SHARED=no + + + case ext/sysvmsg in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/sysvmsg"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/sysvmsg/"; ac_bdir="ext/sysvmsg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sysvmsg.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:96493: checking whether to enable System V semaphore support" >&5 +# Check whether --enable-sysvsem or --disable-sysvsem was given. +if test "${enable_sysvsem+set}" = set; then + enableval="$enable_sysvsem" + PHP_SYSVSEM=$enableval +else + + PHP_SYSVSEM=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SYSVSEM=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SYSVSEM in +shared,*) + PHP_SYSVSEM=`echo "$PHP_SYSVSEM"|$SED 's/^shared,//'` + ;; +shared) + PHP_SYSVSEM=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SYSVSEM" != "no"; then + + ext_builddir=ext/sysvsem + ext_srcdir=$abs_srcdir/ext/sysvsem + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SYSVSEM_SHARED=no + + + case ext/sysvsem in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/sysvsem"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/sysvsem/"; ac_bdir="ext/sysvsem/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sysvsem.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_SYSVSEM 1 +EOF + + echo $ac_n "checking for union semun""... $ac_c" 1>&6 +echo "configure:96823: 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 < +#include +#include + +int main() { +union semun x; +; return 0; } +EOF +if { (eval echo configure:96839: \"$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 +fi + + + +php_enable_sysvshm=no + +echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6 +echo "configure:96875: checking whether to enable System V shared memory support" >&5 +# Check whether --enable-sysvshm or --disable-sysvshm was given. +if test "${enable_sysvshm+set}" = set; then + enableval="$enable_sysvshm" + PHP_SYSVSHM=$enableval +else + + PHP_SYSVSHM=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_SYSVSHM=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_SYSVSHM in +shared,*) + PHP_SYSVSHM=`echo "$PHP_SYSVSHM"|$SED 's/^shared,//'` + ;; +shared) + PHP_SYSVSHM=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_SYSVSHM" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_SYSVSHM 1 +EOF + + + ext_builddir=ext/sysvshm + ext_srcdir=$abs_srcdir/ext/sysvshm + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_SYSVSHM_SHARED=no + + + case ext/sysvshm in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/sysvshm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/sysvshm/"; ac_bdir="ext/sysvshm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in sysvshm.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:97211: checking for TIDY support" >&5 +# Check whether --with-tidy or --without-tidy was given. +if test "${with_tidy+set}" = set; then + withval="$with_tidy" + PHP_TIDY=$withval +else + + PHP_TIDY=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_TIDY=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_TIDY in +shared,*) + PHP_TIDY=`echo "$PHP_TIDY"|$SED 's/^shared,//'` + ;; +shared) + PHP_TIDY=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_TIDY" != "no"; then + + if test "$PHP_TIDY" != "yes"; then + TIDY_SEARCH_DIRS=$PHP_TIDY + else + TIDY_SEARCH_DIRS="/usr/local /usr" + fi + + for i in $TIDY_SEARCH_DIRS; do + if test -f $i/include/tidy/tidy.h; then + TIDY_DIR=$i + TIDY_INCDIR=$i/include/tidy + elif test -f $i/include/tidy.h; then + TIDY_DIR=$i + TIDY_INCDIR=$i/include + fi + done + + if test -z "$TIDY_DIR"; then + { echo "configure: error: Cannot find libtidy" 1>&2; exit 1; } + fi + + TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR + + + + if test "$ext_shared" = "yes"; then + TIDY_SHARED_LIBADD="-ltidy $TIDY_SHARED_LIBADD" + if test -n "$TIDY_LIBDIR"; then + + if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then + + if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$TIDY_LIBDIR + else + + ep_dir="`echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TIDY_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + TIDY_SHARED_LIBADD="-L$ai_p $TIDY_SHARED_LIBADD" + test -n "$ld_runpath_switch" && TIDY_SHARED_LIBADD="$ld_runpath_switch$ai_p $TIDY_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$TIDY_LIBDIR"; then + + if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then + + if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$TIDY_LIBDIR + else + + ep_dir="`echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TIDY_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case tidy in + c|c_r|pthread*) ;; + *) + LIBS="-ltidy $LIBS" + ;; + esac + + + + + fi + + + + if test "$TIDY_INCDIR" != "/usr/include"; then + + if test -z "$TIDY_INCDIR" || echo "$TIDY_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$TIDY_INCDIR + else + + ep_dir="`echo $TIDY_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$TIDY_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff="" + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for tidyOptGetDoc in -ltidy""... $ac_c" 1>&6 +echo "configure:97503: checking for tidyOptGetDoc in -ltidy" >&5 +ac_lib_var=`echo tidy'_'tidyOptGetDoc | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltidy $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + cat >> confdefs.h <<\EOF +#define HAVE_TIDYOPTGETDOC 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_tidy_tidyOptGetDoc + + +fi + + + + + ext_builddir=ext/tidy + ext_srcdir=$abs_srcdir/ext/tidy + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_TIDY_SHARED=no + + + case ext/tidy in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/tidy"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/tidy/"; ac_bdir="ext/tidy/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in tidy.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_TIDY 1 +EOF + +fi + + + + +php_enable_tokenizer=yes + +echo $ac_n "checking whether to enable tokenizer support""... $ac_c" 1>&6 +echo "configure:97855: checking whether to enable tokenizer support" >&5 +# Check whether --enable-tokenizer or --disable-tokenizer was given. +if test "${enable_tokenizer+set}" = set; then + enableval="$enable_tokenizer" + PHP_TOKENIZER=$enableval +else + + PHP_TOKENIZER=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_TOKENIZER=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_TOKENIZER in +shared,*) + PHP_TOKENIZER=`echo "$PHP_TOKENIZER"|$SED 's/^shared,//'` + ;; +shared) + PHP_TOKENIZER=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_TOKENIZER" != "no"; then + + ext_builddir=ext/tokenizer + ext_srcdir=$abs_srcdir/ext/tokenizer + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_TOKENIZER_SHARED=no + + + case ext/tokenizer in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/tokenizer"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/tokenizer/"; ac_bdir="ext/tokenizer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in tokenizer.c tokenizer_data.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> Makefile.fragments + +fi + + + +php_enable_wddx=no + +echo $ac_n "checking whether to enable WDDX support""... $ac_c" 1>&6 +echo "configure:98193: checking whether to enable WDDX support" >&5 +# Check whether --enable-wddx or --disable-wddx was given. +if test "${enable_wddx+set}" = set; then + enableval="$enable_wddx" + PHP_WDDX=$enableval +else + + PHP_WDDX=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_WDDX=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_WDDX in +shared,*) + PHP_WDDX=`echo "$PHP_WDDX"|$SED 's/^shared,//'` + ;; +shared) + PHP_WDDX=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:98241: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + + +php_with_libexpat_dir=no + +echo $ac_n "checking libexpat dir for WDDX""... $ac_c" 1>&6 +echo "configure:98268: checking libexpat dir for WDDX" >&5 +# Check whether --with-libexpat-dir or --without-libexpat-dir was given. +if test "${with_libexpat_dir+set}" = set; then + withval="$with_libexpat_dir" + PHP_LIBEXPAT_DIR=$withval +else + + PHP_LIBEXPAT_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBEXPAT_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBEXPAT_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_WDDX" != "no"; then + + if test "$PHP_LIBEXPAT_DIR" = "no"; then + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: WDDX extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:98299: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + WDDX_SHARED_LIBADD="$WDDX_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + WDDX_SHARED_LIBADD="$WDDX_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + WDDX_SHARED_LIBADD="-L$ai_p $WDDX_SHARED_LIBADD" + test -n "$ld_runpath_switch" && WDDX_SHARED_LIBADD="$ld_runpath_switch$ai_p $WDDX_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:98457: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $WDDX_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + if test "$PHP_XML" = "no"; then + + + case ext/xml in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in compat.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Use --with-libxml-dir=" 1>&2; exit 1; } + + fi + + fi + + if test "$PHP_LIBEXPAT_DIR" != "no"; then + for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do + if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then + EXPAT_DIR=$i + break + fi + done + + if test -z "$EXPAT_DIR"; then + { echo "configure: error: not found. Please reinstall the expat distribution." 1>&2; exit 1; } + fi + + + if test "$EXPAT_DIR/include" != "/usr/include"; then + + if test -z "$EXPAT_DIR/include" || echo "$EXPAT_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$EXPAT_DIR/include + else + + ep_dir="`echo $EXPAT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$EXPAT_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + WDDX_SHARED_LIBADD="-lexpat $WDDX_SHARED_LIBADD" + if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then + + if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$EXPAT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + WDDX_SHARED_LIBADD="-L$ai_p $WDDX_SHARED_LIBADD" + test -n "$ld_runpath_switch" && WDDX_SHARED_LIBADD="$ld_runpath_switch$ai_p $WDDX_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then + + if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$EXPAT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case expat in + c|c_r|pthread*) ;; + *) + LIBS="-lexpat $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBEXPAT 1 +EOF + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_WDDX 1 +EOF + + + ext_builddir=ext/wddx + ext_srcdir=$abs_srcdir/ext/wddx + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_WDDX_SHARED=no + + + case ext/wddx in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/wddx"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/wddx/"; ac_bdir="ext/wddx/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in wddx.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension wddx, which depends on extension libxml, +but you've either not enabled libxml, or have disabled it. +" 1>&2; exit 1; } + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST XMLRPC_SHARED_LIBADD" + +fi + + + +php_enable_xml=yes + +echo $ac_n "checking whether to enable XML support""... $ac_c" 1>&6 +echo "configure:99040: checking whether to enable XML support" >&5 +# Check whether --enable-xml or --disable-xml was given. +if test "${enable_xml+set}" = set; then + enableval="$enable_xml" + PHP_XML=$enableval +else + + PHP_XML=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_XML=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_XML in +shared,*) + PHP_XML=`echo "$PHP_XML"|$SED 's/^shared,//'` + ;; +shared) + PHP_XML=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:99088: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + + +php_with_libexpat_dir=no + +echo $ac_n "checking libexpat install dir""... $ac_c" 1>&6 +echo "configure:99115: checking libexpat install dir" >&5 +# Check whether --with-libexpat-dir or --without-libexpat-dir was given. +if test "${with_libexpat_dir+set}" = set; then + withval="$with_libexpat_dir" + PHP_LIBEXPAT_DIR=$withval +else + + PHP_LIBEXPAT_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBEXPAT_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBEXPAT_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_XML" != "no"; then + + if test "$PHP_LIBEXPAT_DIR" = "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: XML extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:99147: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + XML_SHARED_LIBADD="$XML_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + XML_SHARED_LIBADD="$XML_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:99305: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $XML_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + xml_extra_sources="compat.c" + + am_i_shared=$PHP_XML_SHARED + is_it_shared=$PHP_LIBXML_SHARED + is_it_enabled=$PHP_LIBXML + if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then + { echo "configure: error: +You've configured extension xml to build statically, but it +depends on extension libxml, which you've configured to build shared. +You either need to build xml shared or build libxml statically for the +build to be successful. +" 1>&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension xml, which depends on extension libxml, +but you've either not enabled libxml, or have disabled it. +" 1>&2; exit 1; } + fi + + + else + { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Use --with-libxml-dir=" 1>&2; exit 1; } + + fi + + fi + + if test "$PHP_LIBEXPAT_DIR" != "no"; then + for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do + if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then + EXPAT_DIR=$i + break + fi + done + + if test -z "$EXPAT_DIR"; then + { echo "configure: error: not found. Please reinstall the expat distribution." 1>&2; exit 1; } + fi + + + if test "$EXPAT_DIR/include" != "/usr/include"; then + + if test -z "$EXPAT_DIR/include" || echo "$EXPAT_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$EXPAT_DIR/include + else + + ep_dir="`echo $EXPAT_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$EXPAT_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + XML_SHARED_LIBADD="-lexpat $XML_SHARED_LIBADD" + if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then + + if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$EXPAT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$EXPAT_DIR/$PHP_LIBDIR"; then + + if test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$EXPAT_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$EXPAT_DIR/$PHP_LIBDIR" || echo "$EXPAT_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$EXPAT_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $EXPAT_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$EXPAT_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case expat in + c|c_r|pthread*) ;; + *) + LIBS="-lexpat $LIBS" + ;; + esac + + + + + fi + + + cat >> confdefs.h <<\EOF +#define HAVE_LIBEXPAT 1 +EOF + + fi + + + ext_builddir=ext/xml + ext_srcdir=$abs_srcdir/ext/xml + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_XML_SHARED=no + + + case ext/xml in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in xml.c $xml_extra_sources; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF +#define HAVE_XML 1 +EOF + +fi + + + +php_enable_xmlreader=yes + +echo $ac_n "checking whether to enable XMLReader support""... $ac_c" 1>&6 +echo "configure:99857: checking whether to enable XMLReader support" >&5 +# Check whether --enable-xmlreader or --disable-xmlreader was given. +if test "${enable_xmlreader+set}" = set; then + enableval="$enable_xmlreader" + PHP_XMLREADER=$enableval +else + + PHP_XMLREADER=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_XMLREADER=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_XMLREADER in +shared,*) + PHP_XMLREADER=`echo "$PHP_XMLREADER"|$SED 's/^shared,//'` + ;; +shared) + PHP_XMLREADER=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:99905: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_XMLREADER" != "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: XMLReader extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:99936: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + XMLREADER_SHARED_LIBADD="-L$ai_p $XMLREADER_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XMLREADER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLREADER_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:100094: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $XMLREADER_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_XMLREADER 1 +EOF + + + ext_builddir=ext/xmlreader + ext_srcdir=$abs_srcdir/ext/xmlreader + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_XMLREADER_SHARED=no + + + case ext/xmlreader in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xmlreader"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xmlreader/"; ac_bdir="ext/xmlreader/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_xmlreader.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then + { echo "configure: error: +You've configured extension xmlreader, which depends on extension dom, +but you've either not enabled dom, or have disabled it. +" 1>&2; exit 1; } + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST XMLREADER_SHARED_LIBADD" + + + else + { echo "configure: error: libxml2 version 2.6.11 or greater required." 1>&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; } + + fi + +fi + + +# Local macros for automake & autoconf + + + + + + + + + + + + + +php_with_xmlrpc=no + +echo $ac_n "checking for XMLRPC-EPI support""... $ac_c" 1>&6 +echo "configure:100492: checking for XMLRPC-EPI support" >&5 +# Check whether --with-xmlrpc or --without-xmlrpc was given. +if test "${with_xmlrpc+set}" = set; then + withval="$with_xmlrpc" + PHP_XMLRPC=$withval +else + + PHP_XMLRPC=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_XMLRPC=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_XMLRPC in +shared,*) + PHP_XMLRPC=`echo "$PHP_XMLRPC"|$SED 's/^shared,//'` + ;; +shared) + PHP_XMLRPC=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:100540: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + + +php_with_libexpat_dir=no + +echo $ac_n "checking libexpat dir for XMLRPC-EPI""... $ac_c" 1>&6 +echo "configure:100567: checking libexpat dir for XMLRPC-EPI" >&5 +# Check whether --with-libexpat-dir or --without-libexpat-dir was given. +if test "${with_libexpat_dir+set}" = set; then + withval="$with_libexpat_dir" + PHP_LIBEXPAT_DIR=$withval +else + + PHP_LIBEXPAT_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBEXPAT_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBEXPAT_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + + +php_with_iconv_dir=no + +echo $ac_n "checking iconv dir for XMLRPC-EPI""... $ac_c" 1>&6 +echo "configure:100593: checking iconv dir for XMLRPC-EPI" >&5 +# Check whether --with-iconv-dir or --without-iconv-dir was given. +if test "${with_iconv_dir+set}" = set; then + withval="$with_iconv_dir" + PHP_ICONV_DIR=$withval +else + + PHP_ICONV_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ICONV_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ICONV_DIR +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_XMLRPC" != "no"; then + + + am_i_shared=$PHP_XMLRPC_SHARED + is_it_shared=$PHP_LIBXML_SHARED + is_it_enabled=$PHP_LIBXML + if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then + { echo "configure: error: +You've configured extension xmlrpc to build statically, but it +depends on extension libxml, which you've configured to build shared. +You either need to build xmlrpc shared or build libxml statically for the +build to be successful. +" 1>&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension xmlrpc, which depends on extension libxml, +but you've either not enabled libxml, or have disabled it. +" 1>&2; exit 1; } + fi + + + PHP_VAR_SUBST="$PHP_VAR_SUBST XMLRPC_SHARED_LIBADD" + + cat >> confdefs.h <<\EOF +#define HAVE_XMLRPC 1 +EOF + + + if test "$PHP_LIBEXPAT_DIR" = "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: XML-RPC extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:100652: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="$XMLRPC_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="$XMLRPC_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:100810: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $XMLRPC_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + if test "$PHP_XML" = "no"; then + + + case ext/xml in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xml"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xml/"; ac_bdir="ext/xml/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in compat.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Use --with-libxml-dir=" 1>&2; exit 1; } + + fi + + else + testval=no + for i in $PHP_LIBEXPAT_DIR $XMLRPC_DIR /usr/local /usr; do + if test -f $i/$PHP_LIBDIR/libexpat.a || test -f $i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBEXPAT 1 +EOF + + + + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="-lexpat $XMLRPC_SHARED_LIBADD" + if test -n "$i/$PHP_LIBDIR"; then + + if test "$i/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$i/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$i/$PHP_LIBDIR" || echo "$i/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$i/$PHP_LIBDIR + else + + ep_dir="`echo $i/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$i/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$i/$PHP_LIBDIR"; then + + if test "$i/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$i/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$i/$PHP_LIBDIR" || echo "$i/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$i/$PHP_LIBDIR + else + + ep_dir="`echo $i/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$i/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case expat in + c|c_r|pthread*) ;; + *) + LIBS="-lexpat $LIBS" + ;; + esac + + + + + fi + + + + if test "$i/include" != "/usr/include"; then + + if test -z "$i/include" || echo "$i/include" | grep '^/' >/dev/null ; then + ai_p=$i/include + else + + ep_dir="`echo $i/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$i/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + testval=yes + break + fi + done + + if test "$testval" = "no"; then + { echo "configure: error: XML-RPC support requires libexpat. Use --with-libexpat-dir= (deprecated!)" 1>&2; exit 1; } + fi + fi + + if test "$PHP_ICONV_DIR" != "no"; then + PHP_ICONV=$PHP_ICONV_DIR + fi + + if test -z "$PHP_ICONV" || test "$PHP_ICONV" = "no"; then + PHP_ICONV=yes + fi + + + found_iconv=no + unset ICONV_DIR + + # Create the directories for a VPATH build: + $php_shtool mkdir -p ext/iconv + + echo > ext/iconv/php_have_bsd_iconv.h + echo > ext/iconv/php_have_glibc_iconv.h + echo > ext/iconv/php_have_libiconv.h + echo > ext/iconv/php_have_iconv.h + echo > ext/iconv/php_php_iconv_impl.h + echo > ext/iconv/php_php_iconv_h_path.h + echo > ext/iconv/php_iconv_supports_errno.h + + if test "$PHP_ICONV" = "yes"; then + echo $ac_n "checking for iconv""... $ac_c" 1>&6 +echo "configure:101102: checking for iconv" >&5 +if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char iconv(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_iconv) || defined (__stub___iconv) +choke me +#else +iconv(); +#endif + +; return 0; } +EOF +if { (eval echo configure:101130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_iconv=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_iconv=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + found_iconv=yes + +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for libiconv""... $ac_c" 1>&6 +echo "configure:101151: checking for libiconv" >&5 +if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char libiconv(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_libiconv) || defined (__stub___libiconv) +choke me +#else +libiconv(); +#endif + +; return 0; } +EOF +if { (eval echo configure:101179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_libiconv=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_libiconv=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + + echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_LIBICONV 1 +EOF + + found_iconv=yes + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + fi + + if test "$found_iconv" = "no"; then + + for i in $PHP_ICONV /usr/local /usr; do + if test -r $i/include/giconv.h; then + cat >> confdefs.h <<\EOF +#define HAVE_GICONV_H 1 +EOF + + ICONV_DIR=$i + iconv_lib_name=giconv + break + elif test -r $i/include/iconv.h; then + ICONV_DIR=$i + iconv_lib_name=iconv + break + fi + done + + if test -z "$ICONV_DIR"; then + { echo "configure: error: Please specify the install prefix of iconv with --with-iconv=" 1>&2; exit 1; } + fi + + if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a || + test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME + then + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$ICONV_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6 +echo "configure:101335: checking for libiconv in -l$iconv_lib_name" >&5 +ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$iconv_lib_name $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_iconv=yes + + echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_LIBICONV 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$iconv_lib_name_libiconv + + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" + -L$ICONV_DIR/$PHP_LIBDIR + " + + save_ext_shared=$ext_shared + ext_shared=yes + + for ac_i in $ac_stuff; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + LDFLAGS="$LDFLAGS -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + LDFLAGS="-L$ai_p $LDFLAGS" + test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6 +echo "configure:101488: checking for iconv in -l$iconv_lib_name" >&5 +ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$iconv_lib_name $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + + found_iconv=yes + + +else + echo "$ac_t""no" 1>&6 + + LDFLAGS=$save_old_LDFLAGS + ext_shared=$save_ext_shared + unset ac_cv_lib_$iconv_lib_name_iconv + + +fi + + + +fi + + fi + fi + + if test "$found_iconv" = "yes"; then + + echo "#define HAVE_ICONV 1" > ext/iconv/php_have_iconv.h + + cat >> confdefs.h <<\EOF +#define HAVE_ICONV 1 +EOF + + if test -n "$ICONV_DIR"; then + + + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="-l$iconv_lib_name $XMLRPC_SHARED_LIBADD" + if test -n "$ICONV_DIR/$PHP_LIBDIR"; then + + if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$ICONV_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$ICONV_DIR/$PHP_LIBDIR"; then + + if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$ICONV_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ICONV_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case $iconv_lib_name in + c|c_r|pthread*) ;; + *) + LIBS="-l$iconv_lib_name $LIBS" + ;; + esac + + + + + fi + + + + if test "$ICONV_DIR/include" != "/usr/include"; then + + if test -z "$ICONV_DIR/include" || echo "$ICONV_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$ICONV_DIR/include + else + + ep_dir="`echo $ICONV_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ICONV_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + fi + +else + { echo "configure: error: iconv not found, in order to build xmlrpc you need the iconv library" 1>&2; exit 1; } + + fi + +fi + +if test "$PHP_XMLRPC" = "yes"; then + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:101696: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:101724: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <> confdefs.h <<\EOF +#define UNDEF_THREADS_HACK +EOF + + + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:101776: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:101789: \"$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 +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 +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 < +#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:101856: \"$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 + +for ac_hdr in xmlparse.h xmltok.h stdlib.h strings.h string.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:101883: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:101893: \"$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 <&6 +fi +done + + + + + + +echo $ac_n "checking size of char""... $ac_c" 1>&6 +echo "configure:101925: checking size of char" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_char=1 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(char)); + return(0); +} +EOF +if { (eval echo configure:101944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_char=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_char=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_char" 1>&6 +cat >> confdefs.h <&6 +echo "configure:101965: 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 < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(int)); + return(0); +} +EOF +if { (eval echo configure:101984: \"$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 <&6 +echo "configure:102004: checking size of long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long=4 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long)); + return(0); +} +EOF +if { (eval echo configure:102023: \"$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 <&6 +echo "configure:102043: checking size of long long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long_long=8 +else + cat > conftest.$ac_ext < +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long long)); + return(0); +} +EOF +if { (eval echo configure:102062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long_long=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_long=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 +cat >> confdefs.h <&6 +echo "configure:102082: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#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 whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:102115: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:102129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:102150: 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 +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 + + + + + + +# Standard XMLRPC list +for ac_func in \ + strtoul strtoull snprintf \ + strstr strpbrk strerror\ + memcpy memmove +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:102195: 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 < +/* Override any gcc2 internal prototype to avoid an 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:102223: \"$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 <&6 +fi +done + + + + + + ext_builddir=ext/xmlrpc + ext_srcdir=$abs_srcdir/ext/xmlrpc + + ac_extra=`echo "-I@ext_srcdir@/libxmlrpc -DVERSION="0.50""|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_XMLRPC_SHARED=no + + + case ext/xmlrpc in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in xmlrpc-epi-php.c libxmlrpc/base64.c \ + libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \ + libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \ + libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \ + libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \ + libxmlrpc/xml_to_soap.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:102566: checking for XMLRPC-EPI in default path" >&5 + for i in /usr/local /usr; do + if test -r $i/include/xmlrpc.h; then + XMLRPC_DIR=$i/include + echo "$ac_t""found in $i" 1>&6 + break + fi + done + fi + + if test -z "$XMLRPC_DIR"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Please reinstall the XMLRPC-EPI distribution" 1>&2; exit 1; } + fi + + + if test "$XMLRPC_DIR" != "/usr/include"; then + + if test -z "$XMLRPC_DIR" || echo "$XMLRPC_DIR" | grep '^/' >/dev/null ; then + ai_p=$XMLRPC_DIR + else + + ep_dir="`echo $XMLRPC_DIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$XMLRPC_DIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + + + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="-lxmlrpc $XMLRPC_SHARED_LIBADD" + if test -n "$XMLRPC_DIR/$PHP_LIBDIR"; then + + if test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$XMLRPC_DIR/$PHP_LIBDIR" || echo "$XMLRPC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$XMLRPC_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $XMLRPC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$XMLRPC_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + XMLRPC_SHARED_LIBADD="-L$ai_p $XMLRPC_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XMLRPC_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLRPC_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$XMLRPC_DIR/$PHP_LIBDIR"; then + + if test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$XMLRPC_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$XMLRPC_DIR/$PHP_LIBDIR" || echo "$XMLRPC_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$XMLRPC_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $XMLRPC_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$XMLRPC_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case xmlrpc in + c|c_r|pthread*) ;; + *) + LIBS="-lxmlrpc $LIBS" + ;; + esac + + + + + fi + + + + ext_builddir=ext/xmlrpc + ext_srcdir=$abs_srcdir/ext/xmlrpc + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_XMLRPC_SHARED=no + + + case ext/xmlrpc in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xmlrpc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xmlrpc/"; ac_bdir="ext/xmlrpc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in xmlrpc-epi-php.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 +echo "configure:102998: checking whether to enable XMLWriter support" >&5 +# Check whether --enable-xmlwriter or --disable-xmlwriter was given. +if test "${enable_xmlwriter+set}" = set; then + enableval="$enable_xmlwriter" + PHP_XMLWRITER=$enableval +else + + PHP_XMLWRITER=yes + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_XMLWRITER=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_XMLWRITER in +shared,*) + PHP_XMLWRITER=`echo "$PHP_XMLWRITER"|$SED 's/^shared,//'` + ;; +shared) + PHP_XMLWRITER=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_LIBXML_DIR"; then + +php_with_libxml_dir=no + +echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +echo "configure:103046: checking libxml2 install dir" >&5 +# Check whether --with-libxml-dir or --without-libxml-dir was given. +if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" + PHP_LIBXML_DIR=$withval +else + + PHP_LIBXML_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_LIBXML_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_LIBXML_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_XMLWRITER" != "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: XMLWriter extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + +echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +echo "configure:103077: checking for xml2-config path" >&5 +if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for i in $PHP_LIBXML_DIR /usr/local /usr; do + if test -x "$i/bin/xml2-config"; then + ac_cv_php_xml2_config_path="$i/bin/xml2-config" + break + fi + done + +fi + +echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6 + + if test -x "$ac_cv_php_xml2_config_path"; then + XML2_CONFIG="$ac_cv_php_xml2_config_path" + libxml_full_version=`$XML2_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxml_full_version + IFS=$ac_IFS + LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXML_VERSION" -ge "2006011"; then + LIBXML_LIBS=`$XML2_CONFIG --libs` + LIBXML_INCS=`$XML2_CONFIG --cflags` + + for ac_i in $LIBXML_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + XMLWRITER_SHARED_LIBADD="-L$ai_p $XMLWRITER_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XMLWRITER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLWRITER_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $LIBXML_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +echo "configure:103235: checking whether libxml build works" >&5 +if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + old_LIBS=$LIBS + LIBS=" + $XMLWRITER_SHARED_LIBADD + $LIBS" + if test "$cross_compiling" = yes; then + + LIBS=$old_LIBS + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBS=$old_LIBS + + php_cv_libxml_build_works=yes + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + LIBS=$old_LIBS + + echo "$ac_t""no" 1>&6 + { echo "configure: error: build test failed. Please check the config.log for details." 1>&2; exit 1; } + + +fi +rm -fr conftest* +fi + + + +fi + +echo "$ac_t""$php_cv_libxml_build_works" 1>&6 + if test "$php_cv_libxml_build_works" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBXML 1 +EOF + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_XMLWRITER 1 +EOF + + + ext_builddir=ext/xmlwriter + ext_srcdir=$abs_srcdir/ext/xmlwriter + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_XMLWRITER_SHARED=no + + + case ext/xmlwriter in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xmlwriter"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xmlwriter/"; ac_bdir="ext/xmlwriter/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_xmlwriter.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi +else + { echo "configure: error: xml2-config not found. Please check your libxml2 installation." 1>&2; exit 1; } + + fi + +fi + + + +php_with_xsl=no + +echo $ac_n "checking for XSL support""... $ac_c" 1>&6 +echo "configure:103601: checking for XSL support" >&5 +# Check whether --with-xsl or --without-xsl was given. +if test "${with_xsl+set}" = set; then + withval="$with_xsl" + PHP_XSL=$withval +else + + PHP_XSL=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_XSL=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_XSL in +shared,*) + PHP_XSL=`echo "$PHP_XSL"|$SED 's/^shared,//'` + ;; +shared) + PHP_XSL=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_XSL" != "no"; then + + if test "$PHP_LIBXML" = "no"; then + { echo "configure: error: XSL extension requires LIBXML extension, add --enable-libxml" 1>&2; exit 1; } + fi + + if test "$PHP_DOM" = "no"; then + { echo "configure: error: XSL extension requires DOM extension, add --enable-dom" 1>&2; exit 1; } + fi + + for i in $PHP_XSL /usr/local /usr; do + if test -x "$i/bin/xslt-config"; then + XSLT_CONFIG=$i/bin/xslt-config + break + fi + done + + if test -z "$XSLT_CONFIG"; then + { echo "configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution" 1>&2; exit 1; } + else + libxslt_full_version=`$XSLT_CONFIG --version` + ac_IFS=$IFS + IFS="." + set $libxslt_full_version + IFS=$ac_IFS + LIBXSLT_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3` + if test "$LIBXSLT_VERSION" -ge "1001000"; then + XSL_LIBS=`$XSLT_CONFIG --libs` + XSL_INCS=`$XSLT_CONFIG --cflags` + + for ac_i in $XSL_LIBS; do + case $ac_i in + -pthread) + if test "$ext_shared" = "yes"; then + XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -pthread" + else + + + unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "EXTRA_LDFLAGS$unique=set" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" + fi + + fi + ;; + -l*) + ac_ii=`echo $ac_i|cut -c 3-` + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + if test "$ext_shared" = "yes"; then + XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -l$ac_ii" + else + + + case $ac_ii in + c|c_r|pthread*) ;; + *) + LIBS="$LIBS -l$ac_ii" + ;; + esac + + + fi + ;; + esac + + + ;; + -L*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + if test "$ext_shared" = "yes"; then + XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + ;; + esac + done + + + for ac_i in $XSL_INCS; do + case $ac_i in + -I*) + ac_ii=`echo $ac_i|cut -c 3-` + + if test "$ac_ii" != "/usr/include"; then + + if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then + ai_p=$ac_ii + else + + ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$ac_ii\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + ;; + esac + done + + + echo $ac_n "checking for EXSLT support""... $ac_c" 1>&6 +echo "configure:103804: checking for EXSLT support" >&5 + for i in $PHP_XSL /usr/local /usr; do + if test -r "$i/include/libexslt/exslt.h"; then + PHP_XSL_EXSL_DIR=$i + break + fi + done + if test -z "$PHP_XSL_EXSL_DIR"; then + echo "$ac_t""not found" 1>&6 + else + echo "$ac_t""found" 1>&6 + + + if test "$ext_shared" = "yes"; then + XSL_SHARED_LIBADD="-lexslt $XSL_SHARED_LIBADD" + if test -n "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR"; then + + if test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" || echo "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_XSL_EXSL_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_XSL_EXSL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD" + test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR"; then + + if test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" || echo "$PHP_XSL_EXSL_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_XSL_EXSL_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_XSL_EXSL_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case exslt in + c|c_r|pthread*) ;; + *) + LIBS="-lexslt $LIBS" + ;; + esac + + + + + fi + + + + if test "$PHP_XSL_EXSL_DIR/include" != "/usr/include"; then + + if test -z "$PHP_XSL_EXSL_DIR/include" || echo "$PHP_XSL_EXSL_DIR/include" | grep '^/' >/dev/null ; then + ai_p=$PHP_XSL_EXSL_DIR/include + else + + ep_dir="`echo $PHP_XSL_EXSL_DIR/include|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_XSL_EXSL_DIR/include\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_XSL_EXSLT 1 +EOF + + fi + else + { echo "configure: error: libxslt version 1.1.0 or greater required." 1>&2; exit 1; } + fi + + + fi + + cat >> confdefs.h <<\EOF +#define HAVE_XSL 1 +EOF + + + ext_builddir=ext/xsl + ext_srcdir=$abs_srcdir/ext/xsl + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_XSL_SHARED=no + + + case ext/xsl in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/xsl"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/xsl/"; ac_bdir="ext/xsl/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_xsl.c xsltprocessor.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi + if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then + { echo "configure: error: +You've configured extension xsl, which depends on extension libxml, +but you've either not enabled libxml, or have disabled it. +" 1>&2; exit 1; } + fi + +fi + + + +php_enable_zip=no + +echo $ac_n "checking for zip archive read/writesupport""... $ac_c" 1>&6 +echo "configure:104269: checking for zip archive read/writesupport" >&5 +# Check whether --enable-zip or --disable-zip was given. +if test "${enable_zip+set}" = set; then + enableval="$enable_zip" + PHP_ZIP=$enableval +else + + PHP_ZIP=no + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_ZIP=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_ZIP in +shared,*) + PHP_ZIP=`echo "$PHP_ZIP"|$SED 's/^shared,//'` + ;; +shared) + PHP_ZIP=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test -z "$PHP_ZLIB_DIR"; then + +php_with_zlib_dir=no + +echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +echo "configure:104317: checking for the location of libz" >&5 +# Check whether --with-zlib-dir or --without-zlib-dir was given. +if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" + PHP_ZLIB_DIR=$withval +else + + PHP_ZLIB_DIR=no + + if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then + PHP_ZLIB_DIR=$PHP_ENABLE_ALL + fi + +fi + + +ext_output=$PHP_ZLIB_DIR +echo "$ac_t""$ext_output" 1>&6 + + + +fi + +if test "$PHP_ZIP" != "no"; then + + if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then + if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then + PHP_ZLIB_DIR="$PHP_ZLIB_DIR" + PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib" + elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then + PHP_ZLIB_DIR="$PHP_ZLIB_DIR" + PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include" + else + { echo "configure: error: Can't find zlib headers under "$PHP_ZLIB_DIR"" 1>&2; exit 1; } + fi + else + for i in /usr/local /usr; do + if test -f "$i/include/zlib/zlib.h"; then + PHP_ZLIB_DIR="$i" + PHP_ZLIB_INCDIR="$i/include/zlib" + elif test -f "$i/include/zlib.h"; then + PHP_ZLIB_DIR="$i" + PHP_ZLIB_INCDIR="$i/include" + fi + done + fi + + echo $ac_n "checking for the location of zlib""... $ac_c" 1>&6 +echo "configure:104365: checking for the location of zlib" >&5 + if test "$PHP_ZLIB_DIR" = "no"; then + { echo "configure: error: zip support requires ZLIB. Use --with-zlib-dir= to specify prefix where ZLIB include and library are located" 1>&2; exit 1; } + else + echo "$ac_t""$PHP_ZLIB_DIR" 1>&6 + + + if test "$ext_shared" = "yes"; then + ZIP_SHARED_LIBADD="-lz $ZIP_SHARED_LIBADD" + if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then + + if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`" + fi + + + if test "$ext_shared" = "yes"; then + ZIP_SHARED_LIBADD="-L$ai_p $ZIP_SHARED_LIBADD" + test -n "$ld_runpath_switch" && ZIP_SHARED_LIBADD="$ld_runpath_switch$ai_p $ZIP_SHARED_LIBADD" + else + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + fi + + fi + + fi + else + + + if test -n "$PHP_ZLIB_DIR/$PHP_LIBDIR"; then + + if test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PHP_ZLIB_DIR/$PHP_LIBDIR" != "/usr/lib"; then + + if test -z "$PHP_ZLIB_DIR/$PHP_LIBDIR" || echo "$PHP_ZLIB_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_DIR/$PHP_LIBDIR + else + + ep_dir="`echo $PHP_ZLIB_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_DIR/$PHP_LIBDIR\"`" + fi + + + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "LIBPATH$unique=set" + + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" + LDFLAGS="$LDFLAGS -L$ai_p" + PHP_RPATHS="$PHP_RPATHS $ai_p" + + fi + + + + fi + + fi + + + case z in + c|c_r|pthread*) ;; + *) + LIBS="-lz $LIBS" + ;; + esac + + + + + fi + + + + if test "$PHP_ZLIB_INCDIR" != "/usr/include"; then + + if test -z "$PHP_ZLIB_INCDIR" || echo "$PHP_ZLIB_INCDIR" | grep '^/' >/dev/null ; then + ai_p=$PHP_ZLIB_INCDIR + else + + ep_dir="`echo $PHP_ZLIB_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`" + + ep_realdir="`(cd \"$ep_dir\" && pwd)`" + ai_p="$ep_realdir/`basename \"$PHP_ZLIB_INCDIR\"`" + fi + + + + unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INCLUDEPATH$unique=set" + + if test ""; then + INCLUDES="-I$ai_p $INCLUDES" + else + INCLUDES="$INCLUDES -I$ai_p" + fi + + fi + + fi + + fi + + PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \ + lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c \ + lib/zip_strerror.c lib/zip_close.c lib/zip_error_get.c \ + lib/zip_file_error_get.c lib/zip_free.c lib/zip_rename.c \ + lib/zip_source_free.c lib/zip_unchange_all.c lib/zip_delete.c \ + lib/zip_error_get_sys_type.c lib/zip_file_get_offset.c \ + lib/zip_get_name.c lib/zip_replace.c lib/zip_source_function.c \ + lib/zip_unchange.c lib/zip_dirent.c lib/zip_error_strerror.c \ + lib/zip_file_strerror.c lib/zip_get_num_files.c \ + lib/zip_set_name.c lib/zip_source_zip.c lib/zip_unchange_data.c \ + lib/zip_entry_free.c lib/zip_error_to_str.c lib/zip_fopen.c \ + lib/zip_name_locate.c lib/zip_source_buffer.c lib/zip_stat.c \ + lib/zip_entry_new.c lib/zip_err_str.c lib/zip_fopen_index.c \ + lib/zip_new.c lib/zip_source_file.c lib/zip_stat_index.c lib/zip_get_archive_comment.c \ + lib/zip_get_file_comment.c lib/zip_set_archive_comment.c lib/zip_set_file_comment.c \ + lib/zip_unchange_archive.c lib/zip_memdup.c lib/zip_stat_init.c lib/zip_add_dir.c \ + lib/zip_error_clear.c lib/zip_file_error_clear.c" + + cat >> confdefs.h <<\EOF +#define HAVE_ZIP 1 +EOF + + + ext_builddir=ext/zip + ext_srcdir=$abs_srcdir/ext/zip + + ac_extra= + + if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then + PHP_ZIP_SHARED=no + + + case ext/zip in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "ext/zip"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/ext/zip/"; ac_bdir="ext/zip/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in php_zip.c zip_stream.c $PHP_ZIP_SOURCES; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&2; exit 1; } + fi +fi + + + + +enable_shared=yes +enable_static=yes + +case $php_build_target in +program|static) + standard_libtool_flag='-prefer-non-pic -static' + if test -z "$PHP_MODULES"; then + enable_shared=no + fi +;; +shared) + enable_static=no + case $with_pic in + yes) standard_libtool_flag='-prefer-pic';; + no) standard_libtool_flag='-prefer-non-pic';; + esac + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module" +;; +esac + +EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" + +if test "$ac_cv_lib_crypt_crypt" = "yes"; then + EXTRA_LIBS="-lcrypt $EXTRA_LIBS -lcrypt" +fi + +unset LIBS LDFLAGS + + + +# Check whether --enable- or --disable- was given. +if test "${enable_+set}" = set; then + enableval="$enable_" + : +fi + + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}Configuring PEAR${T_ME}" 1>&6 + + +# compatibility +if test -z "$with_pear" && test "$enable_pear" = "no"; then + with_pear=no +fi + +# If CLI is disabled -> disable PEAR +if test "$PHP_CLI" = "no"; then + with_pear=no +fi + + +php_with_pear=DEFAULT + +echo $ac_n "checking whether to install PEAR""... $ac_c" 1>&6 +echo "configure:104882: checking whether to install PEAR" >&5 +# Check whether --with-pear or --without-pear was given. +if test "${with_pear+set}" = set; then + withval="$with_pear" + PHP_PEAR=$withval +else + + PHP_PEAR=DEFAULT + + if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then + PHP_PEAR=$PHP_ENABLE_ALL + fi + +fi + + + +ext_output="yes, shared" +ext_shared=yes +case $PHP_PEAR in +shared,*) + PHP_PEAR=`echo "$PHP_PEAR"|$SED 's/^shared,//'` + ;; +shared) + PHP_PEAR=yes + ;; +no) + ext_output=no + ext_shared=no + ;; +*) + ext_output=yes + ext_shared=no + ;; +esac + + + +echo "$ac_t""$ext_output" 1>&6 + + + + +if test "$PHP_PEAR" != "no"; then + + if test "$PHP_PCRE_REGEX" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --without-pear)" + fi + if test "$PHP_XML" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --without-pear)" + fi + + + if test "$pear_error_msg"; then + { echo "configure: error: $pear_error_msg" 1>&2; exit 1; } + fi + + install_pear="install-pear" + PEAR_INSTALLDIR=$PHP_PEAR + + if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then + case $PHP_LAYOUT in + GNU) PEAR_INSTALLDIR=$datadir/pear;; + *) PEAR_INSTALLDIR=$libdir/php;; + esac + fi + + + src=$abs_srcdir/pear/Makefile.frag + ac_srcdir=$abs_srcdir/pear + ac_builddir=pear + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + +fi + + + + +# Check whether --enable- or --disable- was given. +if test "${enable_+set}" = set; then + enableval="$enable_" + : +fi + + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}Configuring Zend${T_ME}" 1>&6 + + + + + + + + + + + + # we only support certain bison versions + bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3" + + # for standalone build of Zend Engine + test -z "$SED" && SED=sed + + bison_version=none + if test "$YACC"; then + echo $ac_n "checking for bison version""... $ac_c" 1>&6 +echo "configure:104992: checking for bison version" >&5 +if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z` + php_cv_bison_version=invalid + if test -n "$bison_version_vars"; then + set $bison_version_vars + bison_version="${1}.${2}" + for bison_check_version in $bison_version_list; do + if test "$bison_version" = "$bison_check_version"; then + php_cv_bison_version="$bison_check_version (ok)" + break + fi + done + fi + +fi + +echo "$ac_t""$php_cv_bison_version" 1>&6 + fi + case $php_cv_bison_version in + ""|invalid) + bison_msg="bison versions supported for regeneration of the Zend/PHP parsers: $bison_version_list (found: $bison_version)." + echo "configure: warning: $bison_msg" 1>&2 + YACC="exit 0;" + ;; + esac + + +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 "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then + CPPFLAGS="$CPPFLAGS -traditional-cpp" +fi + +for ac_hdr in inttypes.h \ +stdint.h \ +limits.h \ +malloc.h \ +string.h \ +unistd.h \ +stdarg.h \ +sys/types.h \ +sys/time.h \ +signal.h \ +unix.h \ +stdlib.h \ +mach-o/dyld.h \ +dlfcn.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:105049: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:105059: \"$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 <&6 +fi +done + + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:105087: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#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 return type of signal handlers""... $ac_c" 1>&6 +echo "configure:105120: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:105142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:105166: 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 < +#if STDC_HEADERS +#include +#include +#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 ulong""... $ac_c" 1>&6 +echo "configure:105199: 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 < +#if STDC_HEADERS +#include +#include +#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 int32_t""... $ac_c" 1>&6 +echo "configure:105234: checking for int32_t" >&5 +cat > conftest.$ac_ext < +#endif +#if HAVE_INTTYPES_H +#include +#elif HAVE_STDINT_H +#include +#endif +int main() { +if ((int32_t *) 0) + return 0; +if (sizeof (int32_t)) + return 0; + +; return 0; } +EOF +if { (eval echo configure:105255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <&6 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + +fi +rm -f conftest* + +echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 +echo "configure:105274: checking for uint32_t" >&5 +cat > conftest.$ac_ext < +#endif +#if HAVE_INTTYPES_H +#include +#elif HAVE_STDINT_H +#include +#endif +int main() { +if ((uint32_t *) 0) + return 0; +if (sizeof (uint32_t)) + return 0; + +; return 0; } +EOF +if { (eval echo configure:105295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <&6 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + +fi +rm -f conftest* + +echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +echo "configure:105314: 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 < +/* Override any gcc2 internal prototype to avoid an 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:105342: \"$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:105366: 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 < +/* Override any gcc2 internal prototype to avoid an 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:105394: \"$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 + +echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +echo "configure:105419: checking for 8-bit clean memcmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_clean=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_memcmp_clean=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + +# 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:105457: 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 < +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:105469: \"$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:105490: 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 < +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# 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:105523: \"$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:105555: 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 <&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:105585: 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 < +/* Override any gcc2 internal prototype to avoid an 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:105613: \"$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 <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:105640: 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 < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:105667: \"$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 <&6 +echo "configure:105691: 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 < +/* Override any gcc2 internal prototype to avoid an 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:105719: \"$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 <&6 +fi +done + + + echo $ac_n "checking whether sprintf is broken""... $ac_c" 1>&6 +echo "configure:105745: checking whether sprintf is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_broken_sprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + + ac_cv_broken_sprintf=no + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + ac_cv_broken_sprintf=no + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + ac_cv_broken_sprintf=yes + +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_broken_sprintf" 1>&6 + if test "$ac_cv_broken_sprintf" = "yes"; then + ac_result=1 + else + ac_result=0 + fi + cat >> confdefs.h <&6 +echo "configure:105794: 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 < +/* Override any gcc2 internal prototype to avoid an 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:105822: \"$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 <&6 +fi +done + + + + echo $ac_n "checking whether fp_except is defined""... $ac_c" 1>&6 +echo "configure:105849: checking whether fp_except is defined" >&5 +if eval "test \"`echo '$''{'ac_cv_type_fp_except'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < + +int main() { + +fp_except x = (fp_except) 0; + +; return 0; } +EOF +if { (eval echo configure:105866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_type_fp_except=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ac_cv_type_fp_except=no + +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_fp_except" 1>&6 + if test "$ac_cv_type_fp_except" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_FP_EXCEPT 1 +EOF + + fi + + + +for ac_hdr in dlfcn.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:105896: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:105906: \"$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 <&6 +fi +done + + +echo $ac_n "checking whether dlsym() requires a leading underscore in symbol names""... $ac_c" 1>&6 +echo "configure:105934: checking whether dlsym() requires a leading underscore in symbol names" >&5 +if test "$cross_compiling" = yes; then : + +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo configure:106002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) + echo "$ac_t""no" 1>&6 + ;; + x$lt_dlneed_uscore) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define DLSYM_NEEDS_UNDERSCORE 1 +EOF + + ;; + x$lt_unknown|x*) + echo "$ac_t""no" 1>&6 + ;; + esac + else : + # compilation failed + + echo "$ac_t""no" 1>&6 + + fi +fi +rm -fr conftest* + + + + +# Check whether --with-zend-vm or --without-zend-vm was given. +if test "${with_zend_vm+set}" = set; then + withval="$with_zend_vm" + + PHP_ZEND_VM=$withval + +else + + PHP_ZEND_VM=CALL + +fi + + +# Check whether --enable-maintainer-zts or --disable-maintainer-zts was given. +if test "${enable_maintainer_zts+set}" = set; then + enableval="$enable_maintainer_zts" + + ZEND_MAINTAINER_ZTS=$enableval + +else + + ZEND_MAINTAINER_ZTS=no + +fi + + +# Check whether --enable-inline-optimization or --disable-inline-optimization was given. +if test "${enable_inline_optimization+set}" = set; then + enableval="$enable_inline_optimization" + + ZEND_INLINE_OPTIMIZATION=$enableval + +else + + ZEND_INLINE_OPTIMIZATION=yes + +fi + + +# Check whether --enable-zend-multibyte or --disable-zend-multibyte was given. +if test "${enable_zend_multibyte+set}" = set; then + enableval="$enable_zend_multibyte" + + ZEND_MULTIBYTE=$enableval + +else + + ZEND_MULTIBYTE=no + +fi + + +echo $ac_n "checking virtual machine dispatch method""... $ac_c" 1>&6 +echo "configure:106085: checking virtual machine dispatch method" >&5 +echo "$ac_t""$PHP_ZEND_VM" 1>&6 + +echo $ac_n "checking whether to enable thread-safety""... $ac_c" 1>&6 +echo "configure:106089: checking whether to enable thread-safety" >&5 +echo "$ac_t""$ZEND_MAINTAINER_ZTS" 1>&6 + +echo $ac_n "checking whether to enable inline optimization for GCC""... $ac_c" 1>&6 +echo "configure:106093: checking whether to enable inline optimization for GCC" >&5 +echo "$ac_t""$ZEND_INLINE_OPTIMIZATION" 1>&6 + +echo $ac_n "checking whether to enable Zend debugging""... $ac_c" 1>&6 +echo "configure:106097: checking whether to enable Zend debugging" >&5 +echo "$ac_t""$ZEND_DEBUG" 1>&6 + +echo $ac_n "checking whether to enable Zend multibyte""... $ac_c" 1>&6 +echo "configure:106101: checking whether to enable Zend multibyte" >&5 +echo "$ac_t""$ZEND_MULTIBYTE" 1>&6 + +case $PHP_ZEND_VM in + SWITCH) + cat >> confdefs.h <<\EOF +#define ZEND_VM_KIND ZEND_VM_KIND_SWITCH +EOF + + ;; + GOTO) + cat >> confdefs.h <<\EOF +#define ZEND_VM_KIND ZEND_VM_KIND_GOTO +EOF + + ;; + *) + PHP_ZEND_VM=CALL + cat >> confdefs.h <<\EOF +#define ZEND_VM_KIND ZEND_VM_KIND_CALL +EOF + + ;; +esac + +if test "$ZEND_DEBUG" = "yes"; then + cat >> confdefs.h <<\EOF +#define ZEND_DEBUG 1 +EOF + + echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g" + if test "$CFLAGS" = "-g -O2"; then + CFLAGS=-g + fi + 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 + cat >> confdefs.h <<\EOF +#define ZEND_DEBUG 0 +EOF + +fi + +test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS" + +if test "$ZEND_MAINTAINER_ZTS" = "yes"; then + cat >> confdefs.h <<\EOF +#define ZTS 1 +EOF + + CFLAGS="$CFLAGS -DZTS" + + + +fi + +if test "$ZEND_MULTIBYTE" = "yes"; then + cat >> confdefs.h <<\EOF +#define ZEND_MULTIBYTE 1 +EOF + +fi + + +if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then + INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//` +else + INLINE_CFLAGS="$CFLAGS" +fi + + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:106174: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <&6 +echo "configure:106217: checking target system is Darwin" >&5 +if echo "$target" | grep "darwin" > /dev/null; then + cat >> confdefs.h <<\EOF +#define DARWIN 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for MM alignment and log values""... $ac_c" 1>&6 +echo "configure:106229: checking for MM alignment and log values" >&5 + +if test "$cross_compiling" = yes; then + + LIBZEND_MM_ALIGN=8 + +else + cat > conftest.$ac_ext < + +typedef union _mm_align_test { + void *ptr; + double dbl; + long lng; +} mm_align_test; + +#if (defined (__GNUC__) && __GNUC__ >= 2) +#define ZEND_MM_ALIGNMENT (__alignof__ (mm_align_test)) +#else +#define ZEND_MM_ALIGNMENT (sizeof(mm_align_test)) +#endif + +int main() +{ + int i = ZEND_MM_ALIGNMENT; + int zeros = 0; + FILE *fp; + + while (i & ~0x1) { + zeros++; + i = i >> 1; + } + + fp = fopen("conftest.zend", "w"); + fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros); + fclose(fp); + + exit(0); +} + +EOF +if { (eval echo configure:106273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1` + LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2` + cat >> confdefs.h <> confdefs.h <&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + +echo "$ac_t""done" 1>&6 + +echo $ac_n "checking for memory allocation using mmap(MAP_ANON)""... $ac_c" 1>&6 +echo "configure:106298: checking for memory allocation using mmap(MAP_ANON)" >&5 + +if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + +else + cat > conftest.$ac_ext < +#include +#include +#include +#include +#include +#ifndef MAP_ANON +# ifdef MAP_ANONYMOUS +# define MAP_ANON MAP_ANONYMOUS +# endif +#endif +#ifndef MREMAP_MAYMOVE +# define MREMAP_MAYMOVE 0 +#endif +#ifndef MAP_FAILED +# define MAP_FAILED ((void*)-1) +#endif + +#define SEG_SIZE (256*1024) + +int main() +{ + void *seg = mmap(NULL, SEG_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); + if (seg == MAP_FAILED) { + return 1; + } + if (munmap(seg, SEG_SIZE) != 0) { + return 2; + } + return 0; +} + +EOF +if { (eval echo configure:106342: \"$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 HAVE_MEM_MMAP_ANON 1 +EOF + + echo "$ac_t""yes" 1>&6 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -fr conftest* +fi + + +echo $ac_n "checking for memory allocation using mmap("/dev/zero")""... $ac_c" 1>&6 +echo "configure:106364: checking for memory allocation using mmap("/dev/zero")" >&5 + +if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + +else + cat > conftest.$ac_ext < +#include +#include +#include +#include +#include +#ifndef MAP_ANON +# ifdef MAP_ANONYMOUS +# define MAP_ANON MAP_ANONYMOUS +# endif +#endif +#ifndef MREMAP_MAYMOVE +# define MREMAP_MAYMOVE 0 +#endif +#ifndef MAP_FAILED +# define MAP_FAILED ((void*)-1) +#endif + +#define SEG_SIZE (256*1024) + +int main() +{ + int fd; + void *seg; + + fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); + if (fd < 0) { + return 1; + } + seg = mmap(NULL, SEG_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); + if (seg == MAP_FAILED) { + return 2; + } + if (munmap(seg, SEG_SIZE) != 0) { + return 3; + } + if (close(fd) != 0) { + return 4; + } + return 0; +} + +EOF +if { (eval echo configure:106418: \"$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 HAVE_MEM_MMAP_ZERO 1 +EOF + + echo "$ac_t""yes" 1>&6 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -fr conftest* +fi + + +for ac_func in mremap +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:106442: 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 < +/* Override any gcc2 internal prototype to avoid an 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:106470: \"$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 <&6 +fi +done + + + + +if test "$ZEND_MAINTAINER_ZTS" = "yes"; then + cat >> confdefs.h <<\EOF +#define ZTS 1 +EOF + + PHP_THREAD_SAFETY=yes +else + PHP_THREAD_SAFETY=no +fi + +INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM" +INCLUDES="$INCLUDES -I\$(top_builddir)/Zend" + +if test "$abs_srcdir" != "$abs_builddir"; then + INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend" + INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM -I\$(top_builddir)/" +fi + +ZEND_EXTRA_LIBS="$LIBS" +unset LIBS LDFLAGS + + +# Check whether --enable- or --disable- was given. +if test "${enable_+set}" = set; then + enableval="$enable_" + : +fi + + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}Configuring TSRM${T_ME}" 1>&6 + + + + +for ac_hdr in stdarg.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:106537: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:106547: \"$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 <&6 +fi +done + + + +if test "$PHP_THREAD_SAFETY" = "yes"; then + + + +# Check whether --with-tsrm-pth or --without-tsrm-pth was given. +if test "${with_tsrm_pth+set}" = set; then + withval="$with_tsrm_pth" + + TSRM_PTH=$withval + +else + + TSRM_PTH=no + +fi + + +# Check whether --with-tsrm-st or --without-tsrm-st was given. +if test "${with_tsrm_st+set}" = set; then + withval="$with_tsrm_st" + + TSRM_ST=$withval + +else + + TSRM_ST=no + +fi + + +# Check whether --with-tsrm-pthreads or --without-tsrm-pthreads was given. +if test "${with_tsrm_pthreads+set}" = set; then + withval="$with_tsrm_pthreads" + + TSRM_PTHREADS=$withval + +else + + TSRM_PTHREADS=yes + +fi + + +test "$TSRM_PTH" = "yes" && TSRM_PTH=pth-config + +if test "$TSRM_PTH" != "no"; then + + +echo $ac_n "checking for GNU Pth""... $ac_c" 1>&6 +echo "configure:106624: checking for GNU Pth" >&5 +PTH_PREFIX="`$TSRM_PTH --prefix`" +if test -z "$PTH_PREFIX"; then + echo "$ac_t""Please check your Pth installation" 1>&6 +fi + +CPPFLAGS="$CPPFLAGS `$TSRM_PTH --cflags`" +LDFLAGS="$LDFLAGS `$TSRM_PTH --ldflags`" +LIBS="$LIBS `$TSRM_PTH --libs`" + +cat >> confdefs.h <<\EOF +#define GNUPTH 1 +EOF + +echo "$ac_t""yes - installed in $PTH_PREFIX" 1>&6 + + +elif test "$TSRM_ST" != "no"; then + + if test -r "$TSRM_ST/include/st.h"; then + CPPFLAGS="$CPPFLAGS -I$TSRM_ST/include" + LDFLAGS="$LDFLAGS -L$TSRM_ST/lib" + elif test -r "$TSRM_ST/st.h"; then + CPPFLAGS="$CPPFLAGS -I$TSRM_ST" + LDFLAGS="$LDFLAGS -L$TSRM_ST" + fi + for ac_hdr in st.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:106654: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:106664: \"$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 <&6 +{ echo "configure: error: Sorry, I was unable to locate the State Threads header file. Please specify the prefix using --with-tsrm-st=/prefix" 1>&2; exit 1; } + +fi +done + + LIBS="$LIBS -lst" + echo $ac_n "checking for SGI's State Threads""... $ac_c" 1>&6 +echo "configure:106694: checking for SGI's State Threads" >&5 + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define TSRM_ST 1 +EOF + + +elif test "$TSRM_PTHREADS" != "no"; then + + + + +if test "$beos_threads" = "1"; then + pthreads_working="yes" + ac_cv_pthreads_cflags="" +else + save_CFLAGS=$CFLAGS + save_LIBS=$LIBS + +if test -n "$ac_cv_pthreads_lib"; then + LIBS="$LIBS -l$ac_cv_pthreads_lib" +fi + +if test -n "$ac_cv_pthreads_cflags"; then + CFLAGS="$CFLAGS $ac_cv_pthreads_cflags" +fi + + +if test "$cross_compiling" = yes; then + + pthreads_working=no + case $host_alias in + *netware*) + pthreads_working=yes + esac + + +else + cat > conftest.$ac_ext < +#include + +void *thread_routine(void *data) { + return data; +} + +int main() { + pthread_t thd; + pthread_mutexattr_t mattr; + int data = 1; + pthread_mutexattr_init(&mattr); + return pthread_create(&thd, NULL, thread_routine, &data); +} +EOF +if { (eval echo configure:106751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + pthreads_working=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + pthreads_working=no + +fi +rm -fr conftest* +fi + + LIBS=$save_LIBS + CFLAGS=$save_CFLAGS + + echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6 +echo "configure:106771: checking for pthreads_cflags" >&5 +if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ac_cv_pthreads_cflags= + if test "$pthreads_working" != "yes"; then + for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do + ac_save=$CFLAGS + CFLAGS="$CFLAGS $flag" + +if test "$cross_compiling" = yes; then + + pthreads_working=no + case $host_alias in + *netware*) + pthreads_working=yes + esac + + +else + cat > conftest.$ac_ext < +#include + +void *thread_routine(void *data) { + return data; +} + +int main() { + pthread_t thd; + pthread_mutexattr_t mattr; + int data = 1; + pthread_mutexattr_init(&mattr); + return pthread_create(&thd, NULL, thread_routine, &data); +} +EOF +if { (eval echo configure:106811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + pthreads_working=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + pthreads_working=no + +fi +rm -fr conftest* +fi + + CFLAGS=$ac_save + if test "$pthreads_working" = "yes"; then + ac_cv_pthreads_cflags=$flag + break + fi + done + fi +fi + +fi + +echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6 + +echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6 +echo "configure:106841: checking for pthreads_lib" >&5 +if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_cv_pthreads_lib= +if test "$pthreads_working" != "yes"; then + for lib in pthread pthreads c_r; do + ac_save=$LIBS + LIBS="$LIBS -l$lib" + +if test "$cross_compiling" = yes; then + + pthreads_working=no + case $host_alias in + *netware*) + pthreads_working=yes + esac + + +else + cat > conftest.$ac_ext < +#include + +void *thread_routine(void *data) { + return data; +} + +int main() { + pthread_t thd; + pthread_mutexattr_t mattr; + int data = 1; + pthread_mutexattr_init(&mattr); + return pthread_create(&thd, NULL, thread_routine, &data); +} +EOF +if { (eval echo configure:106881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + pthreads_working=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + pthreads_working=no + +fi +rm -fr conftest* +fi + + LIBS=$ac_save + if test "$pthreads_working" = "yes"; then + ac_cv_pthreads_lib=$lib + break + fi + done +fi + +fi + +echo "$ac_t""$ac_cv_pthreads_lib" 1>&6 + +if test "$pthreads_working" = "yes"; then + threads_result="POSIX-Threads found" +else + threads_result="POSIX-Threads not found" +fi + + +if test "$beos_threads" = "1"; then + cat >> confdefs.h <<\EOF +#define BETHREADS 1 +EOF + +else + if test "$pthreads_working" != "yes"; then + { echo "configure: error: Your system seems to lack POSIX threads." 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define PTHREADS 1 +EOF + + + echo $ac_n "checking for POSIX threads""... $ac_c" 1>&6 +echo "configure:106932: checking for POSIX threads" >&5 + echo "$ac_t""yes" 1>&6 +fi + +fi + + +fi + +EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS" +EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS" +EXTRA_LIBS="$EXTRA_LIBS $LIBS" +unset LIBS LDFLAGS + +test "$prefix" = "NONE" && prefix=/usr/local +test "$exec_prefix" = "NONE" && exec_prefix='${prefix}' +test "$program_prefix" = "NONE" && program_prefix= +test "$program_suffix" = "NONE" && program_suffix= + +case $libdir in + '${exec_prefix}/lib') + libdir=$libdir/php + ;; +esac +case $datadir in + '${prefix}/share') + datadir=$datadir/php + ;; + *) ;; +esac + +phplibdir=`pwd`/modules +$php_shtool mkdir -p $phplibdir +phptempdir=`pwd`/libs + +old_exec_prefix=$exec_prefix +old_libdir=$libdir +old_datadir=$datadir +exec_prefix=`eval echo $exec_prefix` +libdir=`eval echo $libdir` +datadir=`eval echo $datadir` + + +ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO //'` + +if test -z "$EXTENSION_DIR"; then + extbasedir=$ZEND_MODULE_API_NO + if test "$oldstyleextdir" = "yes"; then + if test "$PHP_DEBUG" = "1"; then + part1=debug + else + part1=no-debug + fi + if test "$enable_maintainer_zts" = "yes"; then + part2=zts + else + part2=non-zts + fi + extbasedir=$part1-$part2-$extbasedir + EXTENSION_DIR=$libdir/extensions/$extbasedir + else + if test "$enable_maintainer_zts" = "yes"; then + extbasedir=$extbasedir-zts + fi + + if test "$PHP_DEBUG" = "1"; then + extbasedir=$extbasedir-debug + fi + EXTENSION_DIR=$libdir/$extbasedir + fi +fi + +case $PHP_LAYOUT in + GNU) + datarootdir=$prefix/share + ;; + *) + datarootdir=$prefix/php + ;; +esac + +EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR` +EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR` +EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir` +EXPANDED_BINDIR=`eval echo $bindir` +EXPANDED_LIBDIR=$libdir +EXPANDED_SYSCONFDIR=`eval echo $sysconfdir` +EXPANDED_DATADIR=$datadir +EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"` +EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"` +INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR + +exec_prefix=$old_exec_prefix +libdir=$old_libdir +datadir=$old_datadir + + + + + + + + + + + + +if test -n "$php_ldflags_add_usr_lib"; then + PHP_RPATHS="$PHP_RPATHS /usr/lib" +fi + + + OLD_RPATHS=$PHP_RPATHS + unset PHP_RPATHS + + for i in $OLD_RPATHS; do + PHP_LDFLAGS="$PHP_LDFLAGS -L$i" + PHP_RPATHS="$PHP_RPATHS -R $i" + NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i" + done + + if test "$PHP_RPATH" = "no"; then + unset PHP_RPATHS + unset NATIVE_RPATHS + fi + + +if test -z "$php_ldflags_add_usr_lib"; then + + unset ac_new_flags + for i in $PHP_LDFLAGS; do + case $i in + -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/) ;; + *) ac_new_flags="$ac_new_flags $i" ;; + esac + done + PHP_LDFLAGS=$ac_new_flags + + + unset ac_new_flags + for i in $LDFLAGS; do + case $i in + -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/) ;; + *) ac_new_flags="$ac_new_flags $i" ;; + esac + done + LDFLAGS=$ac_new_flags + +fi + +EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" +EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" + +PHP_BUILD_DATE=`date '+%Y-%m-%d'` +cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <>Makefile.objects<meta_ccld<&6 + echo "$ac_t""${T_MD}Configuring libtool${T_ME}" 1>&6 + + +LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS" + + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:107545: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6 +echo "configure:107574: checking for ld used by $CC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +echo "configure:107604: checking for GNU ld" >&5 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:107607: checking for non-GNU ld" >&5 +fi +if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &6 +else + echo "$ac_t""no" 1>&6 +fi +test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:107646: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + +echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 +echo "configure:107666: checking for $LD option to reload object files" >&5 +if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_ld_reload_flag='-r' +fi + +echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +echo "configure:107691: checking for BSD-compatible nm" >&5 +if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + esac + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi + +echo "$ac_t""$lt_cv_path_NM" 1>&6 +NM="$lt_cv_path_NM" + +echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6 +echo "configure:107737: checking how to recognise dependent libraries" >&5 +if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi + +echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:107915: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { (eval echo configure:107921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:107941: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:107951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +#AC_ARG_ENABLE([libtool-lock], +#[ --disable-libtool-lock avoid locking (might break parallel builds)]) +#test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:107994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 108008 "configure"' > conftest.$ac_ext + if { (eval echo configure:108009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:108042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 +echo "configure:108086: checking whether the C compiler needs -belf" >&5 +if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_cc_needs_belf=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + lt_cv_cc_needs_belf=no +fi +rm -f 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 + +fi + +echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; + +esac + +need_locks="$enable_libtool_lock" + + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 +echo "configure:108144: checking how to run the C++ preprocessor" >&5 +if test -z "$CXXCPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + CXXCPP="${CXX-g++} -E" + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:108162: \"$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* + CXXCPP=/lib/cpp +fi +rm -f conftest* + ac_cv_prog_CXXCPP="$CXXCPP" +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross +fi +fi +CXXCPP="$ac_cv_prog_CXXCPP" +echo "$ac_t""$CXXCPP" 1>&6 + +fi + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +echo $ac_n "checking the maximum length of command line arguments""... $ac_c" 1>&6 +echo "configure:108193: checking the maximum length of command line arguments" >&5 +if eval "test \"`echo '$''{'lt_cv_sys_max_cmd_len'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$ac_t""$lt_cv_sys_max_cmd_len" 1>&6 +else + echo "$ac_t""none" 1>&6 +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo $ac_n "checking command to parse $NM output from $compiler object""... $ac_c" 1>&6 +echo "configure:108294: checking command to parse $NM output from $compiler object" >&5 +if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris* | sysv5*) + symcode='[BDRT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo configure:108392: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo configure:108443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$ac_t""failed" 1>&6 +else + echo "$ac_t""ok" 1>&6 +fi + +echo $ac_n "checking for objdir""... $ac_c" 1>&6 +echo "configure:108483: checking for objdir" >&5 +if eval "test \"`echo '$''{'lt_cv_objdir'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi + +echo "$ac_t""$lt_cv_objdir" 1>&6 +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:108549: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AR="$ac_cv_prog_AR" +if test -n "$AR"; then + echo "$ac_t""$AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_AR"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:108581: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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_AR="ar" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="false" +fi +fi +AR="$ac_cv_prog_AR" +if test -n "$AR"; then + echo "$ac_t""$AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + AR="false" +fi +fi + +# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:108616: 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="${ac_tool_prefix}ranlib" + break + fi + done + IFS="$ac_save_ifs" +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 -z "$ac_cv_prog_RANLIB"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:108648: 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 + +else + RANLIB=":" +fi +fi + +# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:108683: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_STRIP"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:108715: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="strip" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + STRIP=":" +fi +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 +echo "configure:108801: checking for ${ac_tool_prefix}file" >&5 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo $ac_n "checking for file""... $ac_c" 1>&6 +echo "configure:108861: checking for file" >&5 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + : +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" + +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 + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# +# Check for any special shared library compilation flags. +# +lt_prog_cc_shlib= +if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + lt_prog_cc_shlib='-belf' + ;; + esac +fi +if test -n "$lt_prog_cc_shlib"; then + echo "configure: warning: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" 1>&2 + if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : + else + echo "configure: warning: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 + lt_cv_prog_cc_can_build_shared=no + fi +fi + + +# +# Check to make sure the static flag actually works. +# +echo $ac_n "checking if $compiler static flag $lt_prog_compiler_static works""... $ac_c" 1>&6 +echo "configure:109020: checking if $compiler static flag $lt_prog_compiler_static works" >&5 +if eval "test \"`echo '$''{'lt_prog_compiler_static_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_prog_compiler_static" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi + +echo "$ac_t""$lt_prog_compiler_static_works" 1>&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 +echo "configure:109070: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +if eval "test \"`echo '$''{'lt_cv_prog_compiler_rtti_exceptions'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"configure:109087: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "configure:109091: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi + +echo "$ac_t""$lt_cv_prog_compiler_rtti_exceptions" 1>&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 +echo "configure:109120: checking for $compiler option to produce PIC" >&5 + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic='-Kpic' + lt_prog_compiler_static='-dn' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +echo "$ac_t""$lt_prog_compiler_pic" 1>&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic works""... $ac_c" 1>&6 +echo "configure:109331: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +if eval "test \"`echo '$''{'lt_prog_compiler_pic_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"configure:109348: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "configure:109352: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi + +echo "$ac_t""$lt_prog_compiler_pic_works" 1>&6 + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 +echo "configure:109390: checking if $compiler supports -c -o file.$ac_objext" >&5 +if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"configure:109410: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "configure:109414: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp + $SED '/^$/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi + +echo "$ac_t""$lt_cv_prog_compiler_c_o" 1>&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 +echo "configure:109444: checking if we can lock with hard links" >&5 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$ac_t""$hard_links" 1>&6 + if test "$hard_links" = no; then + echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2 + need_locks=warn + fi +else + need_locks=no +fi + +echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6 +echo "configure:109461: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi + rm -rf conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&6 +fi +rm -f conftest* +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi + rm -rf conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&6 +fi +rm -f conftest* +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec=' ' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*|ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*|ia64*) + archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +echo "$ac_t""$ld_shlibs" 1>&6 +test "$ld_shlibs" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 +echo "configure:110322: checking whether -lc should be explicitly linked in" >&5 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo configure:110326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo configure:110339: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$ac_t""$archive_cmds_need_lc" 1>&6 + ;; + esac + fi + ;; +esac + +echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 +echo "configure:110358: checking dynamic linker characteristics" >&5 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case $host_cpu in + x86_64*|s390x*|powerpc64*) + echo '#line 110732 "configure"' > conftest.$ac_ext + if { (eval echo configure:110733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$ac_t""$dynamic_linker" 1>&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 +echo "configure:110932: checking how to hardcode library paths into programs" >&5 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$ac_t""$hardcode_action" 1>&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 +echo "configure:110970: checking whether stripping libraries is possible" >&5 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$ac_t""yes" 1>&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 +fi + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:111020: 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 <&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 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$ac_t""no" 1>&6 + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +echo "configure:111068: checking for shl_load" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load(); + +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_shl_load) || defined (__stub___shl_load) +choke me +#else +shl_load(); +#endif + +; return 0; } +EOF +if { (eval echo configure:111096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shl_load=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +echo "configure:111114: checking for shl_load in -ldld" >&5 +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +echo "configure:111152: checking for dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an 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() { + +/* 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_dlopen) || defined (__stub___dlopen) +choke me +#else +dlopen(); +#endif + +; return 0; } +EOF +if { (eval echo configure:111180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:111198: 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 <&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 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 +echo "configure:111236: checking for dlopen in -lsvld" >&5 +ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsvld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 +echo "configure:111274: checking for dld_link in -ldld" >&5 +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +echo "configure:111349: checking whether a program can dlopen itself" >&5 +if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo configure:111420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi + +echo "$ac_t""$lt_cv_dlopen_self" 1>&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +echo "configure:111443: checking whether a statically linked program can dlopen itself" >&5 +if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo configure:111514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi + +echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which librarie types wil actually be built +echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 +echo "configure:111555: checking if libtool supports shared libraries" >&5 +echo "$ac_t""$can_build_shared" 1>&6 + +echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 +echo "configure:111559: checking whether to build shared libraries" >&5 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$ac_t""$enable_shared" 1>&6 + +echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 +echo "configure:111582: checking whether to build static libraries" >&5 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$ac_t""$enable_static" 1>&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + echo "$ac_t"" +creating $ofile" 1>&6 + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC="$lt_save_CC" + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + echo "configure: warning: output file \`$ofile' does not exist" 1>&2 + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + echo "configure: warning: output file \`$ofile' does not look like a libtool script" 1>&2 + else + echo "configure: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2 + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { echo "configure: error: invalid tag name: $tagname" 1>&2; exit 1; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { echo "configure: error: tag name \"$tagname\" already exists" 1>&2; exit 1; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + # Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6 +echo "configure:112251: checking for ld used by $CC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +echo "configure:112281: checking for GNU ld" >&5 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:112284: checking for non-GNU ld" >&5 +fi +if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &6 +else + echo "$ac_t""no" 1>&6 +fi +test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:112323: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6 +echo "configure:112389: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi + rm -rf conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&6 +fi +rm -f conftest* +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi + rm -rf conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&6 +fi +rm -f conftest* +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_CXX=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX=' ' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + hardcode_libdir_separator_CXX=: + ;; + ia64*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + *) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*|ia64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + ia64*|hppa*64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sco*) + archive_cmds_need_lc_CXX=no + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + archive_cmds_need_lc_CXX=no + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$ac_t""$ld_shlibs_CXX" 1>&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... + +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 +echo "configure:113339: checking for $compiler option to produce PIC" >&5 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC*) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +echo "$ac_t""$lt_prog_compiler_pic_CXX" 1>&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works""... $ac_c" 1>&6 +echo "configure:113614: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +if eval "test \"`echo '$''{'lt_prog_compiler_pic_works_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"configure:113631: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "configure:113635: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi + +echo "$ac_t""$lt_prog_compiler_pic_works_CXX" 1>&6 + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 +echo "configure:113673: checking if $compiler supports -c -o file.$ac_objext" >&5 +if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"configure:113693: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "configure:113697: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp + $SED '/^$/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi + +echo "$ac_t""$lt_cv_prog_compiler_c_o_CXX" 1>&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 +echo "configure:113727: checking if we can lock with hard links" >&5 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$ac_t""$hard_links" 1>&6 + if test "$hard_links" = no; then + echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2 + need_locks=warn + fi +else + need_locks=no +fi + +echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6 +echo "configure:113744: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +echo "$ac_t""$ld_shlibs_CXX" 1>&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 +echo "configure:113794: checking whether -lc should be explicitly linked in" >&5 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo configure:113798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo configure:113811: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$ac_t""$archive_cmds_need_lc_CXX" 1>&6 + ;; + esac + fi + ;; +esac + +echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 +echo "configure:113830: checking dynamic linker characteristics" >&5 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case $host_cpu in + x86_64*|s390x*|powerpc64*) + echo '#line 114204 "configure"' > conftest.$ac_ext + if { (eval echo configure:114205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$ac_t""$dynamic_linker" 1>&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 +echo "configure:114404: checking how to hardcode library paths into programs" >&5 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$ac_t""$hardcode_action_CXX" 1>&6 + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 +echo "configure:114442: checking whether stripping libraries is possible" >&5 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$ac_t""yes" 1>&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 +fi + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:114492: 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 <&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 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$ac_t""no" 1>&6 + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +echo "configure:114543: checking for shl_load" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load(); + +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_shl_load) || defined (__stub___shl_load) +choke me +#else +shl_load(); +#endif + +; return 0; } +EOF +if { (eval echo configure:114574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shl_load=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +echo "configure:114592: checking for shl_load in -ldld" >&5 +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +echo "configure:114633: checking for dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* 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() { + +/* 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_dlopen) || defined (__stub___dlopen) +choke me +#else +dlopen(); +#endif + +; return 0; } +EOF +if { (eval echo configure:114664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:114682: 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 <&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 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 +echo "configure:114723: checking for dlopen in -lsvld" >&5 +ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsvld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 +echo "configure:114764: checking for dld_link in -ldld" >&5 +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +echo "configure:114842: checking whether a program can dlopen itself" >&5 +if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo configure:114913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi + +echo "$ac_t""$lt_cv_dlopen_self" 1>&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +echo "configure:114936: checking whether a statically linked program can dlopen itself" >&5 +if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo configure:115007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi + +echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + +# F77) +# if test -n "$F77" && test "X$F77" != "Xno"; then +# AC_LIBTOOL_LANG_F77_CONFIG +# else +# tagname="" +# fi +# ;; +# +# GCJ) +# if test -n "$GCJ" && test "X$GCJ" != "Xno"; then +# AC_LIBTOOL_LANG_GCJ_CONFIG +# else +# tagname="" +# fi +# ;; +# +# RC) +# AC_LIBTOOL_LANG_RC_CONFIG +# ;; + + *) + { echo "configure: error: Unsupported tag name: $tagname" 1>&2; exit 1; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { echo "configure: error: unable to update list of available tagged configurations." 1>&2; exit 1; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + +if test "$enable_debug" != "yes"; then + + if test -z "$LIBTOOL"; then + LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent' + else + LIBTOOL="$LIBTOOL --silent" + fi + +fi + + + if test -z "$LIBTOOL"; then + LIBTOOL='$(SHELL) $(top_builddir)/libtool --preserve-dup-deps' + else + LIBTOOL="$LIBTOOL --preserve-dup-deps" + fi + + +test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<' +test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<' +SHARED_LIBTOOL='$(LIBTOOL)' + +CC=$old_CC + + + echo "$ac_t""" 1>&6 + echo "$ac_t""${T_MD}Generating files${T_ME}" 1>&6 + + +CXXFLAGS_CLEAN=$CXXFLAGS +CFLAGS_CLEAN=$CFLAGS +CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag" +INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" +CXXFLAGS="$CXXFLAGS $standard_libtool_flag" + +all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET)" +install_targets="$install_modules install-build install-headers install-programs $install_pear" + +case $PHP_SAPI in + cli) + install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" + ;; + *) + install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets" + ;; +esac + + + PHP_VAR_SUBST="$PHP_VAR_SUBST all_targets" + + + PHP_VAR_SUBST="$PHP_VAR_SUBST install_targets" + + + + + for header_file in Zend/ TSRM/ include/ main/ main/streams/ regex/; do + + + unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'` + + cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\"" + if test -n "$unique" && test "`eval $cmd`" = "" ; then + eval "INSTALLHEADERS$unique=set" + + INSTALL_HEADERS="$INSTALL_HEADERS $header_file" + + fi + + done + + + + + + case TSRM in + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*) ac_srcdir=`echo "TSRM"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *) ac_srcdir="$abs_srcdir/TSRM/"; ac_bdir="TSRM/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; + esac + + + + b_c_pre=$php_c_pre + b_cxx_pre=$php_cxx_pre + b_c_meta=$php_c_meta + b_cxx_meta=$php_cxx_meta + b_c_post=$php_c_post + b_cxx_post=$php_cxx_post + b_lo=$php_lo + + + old_IFS=$IFS + for ac_src in TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c; do + + IFS=. + set $ac_src + ac_obj=$1 + IFS=$old_IFS + + PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" + + case $ac_src in + *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; + esac + + cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> Makefile.fragments + + + src=$abs_srcdir/Makefile.frag + ac_srcdir=$abs_srcdir/Zend + ac_builddir=Zend + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + + + src=$abs_srcdir/Zend/Makefile.frag + ac_srcdir=$abs_srcdir/Zend + ac_builddir=Zend + test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments + + + + $php_shtool mkdir -p $BUILD_DIR + + + cat >Makefile <> Makefile + done + + cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile + + +cat >> confdefs.h <<\EOF +#define HAVE_BUILD_DEFS_H 1 +EOF + + +$php_shtool mkdir -p pear/scripts +$php_shtool mkdir -p scripts +$php_shtool mkdir -p scripts/man1 + +ALL_OUTPUT_FILES="php5.spec main/build-defs.h \ +scripts/phpize scripts/man1/phpize.1 \ +scripts/php-config scripts/man1/php-config.1 \ +$PHP_OUTPUT_FILES" + + + for arg in $ac_configure_args; do + case $arg in + --with-*) + arg_name="`echo $arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`" + ;; + --without-*) + arg_name="`echo $arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`" + ;; + --enable-*) + arg_name="`echo $arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`" + ;; + --disable-*) + arg_name="`echo $arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`" + ;; + *) + continue + ;; + esac + case $arg_name in + # Allow --disable-all / --enable-all + enable-all);; + + # Allow certain libtool options + enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld);; + + # Allow certain TSRM options + with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads);; + + # Allow certain Zend options + with-zend-vm | enable-maintainer-zts | enable-inline-optimization);; + + # All the rest must be set using the PHP_ARG_* macros + # PHP_ARG_* macros set php_enable_ or php_with_ + *) + # Options that exist before PHP 6 + if test "$PHP_MAJOR_VERSION" -lt "6"; then + case $arg_name in + enable-zend-multibyte) continue;; + esac + fi + is_arg_set=php_`echo $arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'` + if eval test "x\$$is_arg_set" = "x"; then + PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS +$arg" + fi + ;; + esac + done + + +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 </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 "$ALL_OUTPUT_FILES main/php_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < 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%@EGREP@%$EGREP%g +s%@SED@%$SED%g +s%@CONFIGURE_COMMAND@%$CONFIGURE_COMMAND%g +s%@CONFIGURE_OPTIONS@%$CONFIGURE_OPTIONS%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@target@%$target%g +s%@target_alias@%$target_alias%g +s%@target_cpu@%$target_cpu%g +s%@target_vendor@%$target_vendor%g +s%@target_os@%$target_os%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@LN_S@%$LN_S%g +s%@RE2C@%$RE2C%g +s%@AWK@%$AWK%g +s%@YACC@%$YACC%g +s%@LEX@%$LEX%g +s%@LEXLIB@%$LEXLIB%g +s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g +s%@SHLIB_SUFFIX_NAME@%$SHLIB_SUFFIX_NAME%g +s%@SHLIB_DL_SUFFIX_NAME@%$SHLIB_DL_SUFFIX_NAME%g +s%@PROG_SENDMAIL@%$PROG_SENDMAIL%g +s%@LIBOBJS@%$LIBOBJS%g +s%@ALLOCA@%$ALLOCA%g +s%@LTP@%$LTP%g +s%@LTP_GENHTML@%$LTP_GENHTML%g +s%@KRB5_CONFIG@%$KRB5_CONFIG%g +s%@PKG_CONFIG@%$PKG_CONFIG%g +s%@OPENSSL_INCDIR_OPT@%$OPENSSL_INCDIR_OPT%g +s%@MYSQL_MODULE_TYPE@%$MYSQL_MODULE_TYPE%g +s%@MYSQL_LIBS@%$MYSQL_LIBS%g +s%@MYSQL_INCLUDE@%$MYSQL_INCLUDE%g +s%@OCI8_SHARED_LIBADD@%$OCI8_SHARED_LIBADD%g +s%@OCI8_DIR@%$OCI8_DIR%g +s%@OCI8_VERSION@%$OCI8_VERSION%g +s%@ODBC_INCLUDE@%$ODBC_INCLUDE%g +s%@ODBC_LIBS@%$ODBC_LIBS%g +s%@ODBC_LFLAGS@%$ODBC_LFLAGS%g +s%@ODBC_TYPE@%$ODBC_TYPE%g +s%@PDO_MYSQL_MODULE_TYPE@%$PDO_MYSQL_MODULE_TYPE%g +s%@PDO_OCI_SHARED_LIBADD@%$PDO_OCI_SHARED_LIBADD%g +s%@PDO_OCI_DIR@%$PDO_OCI_DIR%g +s%@PDO_OCI_VERSION@%$PDO_OCI_VERSION%g +s%@SNMP_CONFIG@%$SNMP_CONFIG%g +s%@LEMON@%$LEMON%g +s%@RANLIB@%$RANLIB%g +s%@INLINE_CFLAGS@%$INLINE_CFLAGS%g +s%@INCLUDE_PATH@%$INCLUDE_PATH%g +s%@EXPANDED_PEAR_INSTALLDIR@%$EXPANDED_PEAR_INSTALLDIR%g +s%@EXPANDED_EXTENSION_DIR@%$EXPANDED_EXTENSION_DIR%g +s%@EXPANDED_BINDIR@%$EXPANDED_BINDIR%g +s%@EXPANDED_LIBDIR@%$EXPANDED_LIBDIR%g +s%@EXPANDED_DATADIR@%$EXPANDED_DATADIR%g +s%@EXPANDED_SYSCONFDIR@%$EXPANDED_SYSCONFDIR%g +s%@EXPANDED_LOCALSTATEDIR@%$EXPANDED_LOCALSTATEDIR%g +s%@EXPANDED_PHP_CONFIG_FILE_PATH@%$EXPANDED_PHP_CONFIG_FILE_PATH%g +s%@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@%$EXPANDED_PHP_CONFIG_FILE_SCAN_DIR%g +s%@PHP_INSTALLED_SAPIS@%$PHP_INSTALLED_SAPIS%g +s%@abs_builddir@%$abs_builddir%g +s%@abs_srcdir@%$abs_srcdir%g +s%@php_abs_top_builddir@%$php_abs_top_builddir%g +s%@php_abs_top_srcdir@%$php_abs_top_srcdir%g +s%@program_prefix@%$program_prefix%g +s%@program_suffix@%$program_suffix%g +s%@DEBUG_CFLAGS@%$DEBUG_CFLAGS%g +s%@EXTENSION_DIR@%$EXTENSION_DIR%g +s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g +s%@EXTRA_LDFLAGS_PROGRAM@%$EXTRA_LDFLAGS_PROGRAM%g +s%@EXTRA_LIBS@%$EXTRA_LIBS%g +s%@ZEND_EXTRA_LIBS@%$ZEND_EXTRA_LIBS%g +s%@INCLUDES@%$INCLUDES%g +s%@EXTRA_INCLUDES@%$EXTRA_INCLUDES%g +s%@INSTALL_IT@%$INSTALL_IT%g +s%@NATIVE_RPATHS@%$NATIVE_RPATHS%g +s%@PEAR_INSTALLDIR@%$PEAR_INSTALLDIR%g +s%@PHP_LDFLAGS@%$PHP_LDFLAGS%g +s%@PHP_LIBS@%$PHP_LIBS%g +s%@PHP_VERSION@%$PHP_VERSION%g +s%@PHP_VERSION_ID@%$PHP_VERSION_ID%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g +s%@OBJEXT@%$OBJEXT%g +s%@EXEEXT@%$EXEEXT%g +s%@ECHO@%$ECHO%g +s%@AR@%$AR%g +s%@STRIP@%$STRIP%g +s%@CXXCPP@%$CXXCPP%g +s%@LIBTOOL@%$LIBTOOL%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 <> $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 <> $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 <> $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 <' > TSRM/tsrm_config.h + +test -d Zend || $php_shtool mkdir Zend + +cat >Zend/zend_config.h < +#if defined(APACHE) && defined(PHP_API_VERSION) +#undef HAVE_DLFCN_H +#endif +FEO + +# run this only when generating all the files? +if test -n "\$REDO_ALL"; then + # Hacking while airborne considered harmful. + # + echo "creating main/internal_functions.c" + extensions="$EXT_STATIC" + sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$extensions > main/internal_functions.c + + echo "creating main/internal_functions_cli.c" + cli_extensions="$EXT_CLI_STATIC" + sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$cli_extensions > main/internal_functions_cli.c + + + if test "$UNAME" = "FreeBSD" && test "$PHP_SAPI" = "apache2filter" && test "$TSRM_PTH" != "pth-config" ; then + echo "+--------------------------------------------------------------------+" + echo "| *** WARNING *** |" + echo "| |" + echo "| In order to build PHP as a Apache2 module on FreeBSD, you have to |" + echo "| add --with-tsrm-pth to your ./configure line. Therefore you need |" + echo "| to install gnu-pth from /usr/ports/devel/pth. |" + fi + + 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.build#faq.build.apxs |" + echo "| and make the changes described there and try again. |" + fi + + # Warn about CGI version with no extra security options. + if test "$PHP_SAPI" = "cgi"; then + if test "$PHP_FORCE_CGI_REDIRECT" = "no" && test "$PHP_DISCARD_PATH" = "no"; then + echo "+--------------------------------------------------------------------+" + echo "| *** WARNING *** |" + echo "| |" + echo "| You will be compiling the CGI version of PHP without any |" + echo "| redirection checking. By putting this cgi binary somewhere in |" + echo "| 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 + + + if test -n "$DEBUG_LOG"; then + rm -f config.cache +cat < processes when using a local Oracle-DB | +| please recompile PHP and specify --enable-sigchild when configuring| +| (This problem has been reported under Linux using Oracle >= 8.1.5) | +X + fi + fi + +cat <> $CONFIG_STATUS <<\EOF + +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 + + diff -Naur php-5.2.5/ext/standard/basic_functions.c php-5.2.5-suhosin/ext/standard/basic_functions.c --- php-5.2.5/ext/standard/basic_functions.c 2007-10-22 09:37:20.000000000 +0200 +++ php-5.2.5-suhosin/ext/standard/basic_functions.c 2007-11-12 12:38:56.000000000 +0100 @@ -3575,7 +3575,9 @@ PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_stream_get_meta_data) #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS) - PHP_FE(realpath, arginfo_realpath) +#undef realpath + PHP_NAMED_FE(realpath, PHP_FN(real_path), arginfo_realpath) +#define realpath real_path #endif #ifdef HAVE_FNMATCH diff -Naur php-5.2.5/ext/standard/basic_functions.c.orig php-5.2.5-suhosin/ext/standard/basic_functions.c.orig --- php-5.2.5/ext/standard/basic_functions.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/ext/standard/basic_functions.c.orig 2007-10-22 09:37:20.000000000 +0200 @@ -0,0 +1,6411 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2007 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Andi Gutmans | + | Zeev Suraski | + +----------------------------------------------------------------------+ + */ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +#include "php.h" +#include "php_streams.h" +#include "php_main.h" +#include "php_globals.h" +#include "php_ini.h" +#include "php_standard.h" +#include "php_math.h" +#include "php_http.h" +#include "php_incomplete_class.h" +#include "ext/standard/info.h" +#include "ext/session/php_session.h" +#include "zend_operators.h" +#include "ext/standard/dns.h" +#include "ext/standard/php_uuencode.h" + +#ifdef PHP_WIN32 +#include "win32/php_win32_globals.h" +#endif + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +#include "zend.h" +#include "zend_language_scanner.h" +#include + +#include +#include +#include +#include +#include + +#ifndef PHP_WIN32 +#include +#include +#endif + +#ifdef NETWARE +#include +#endif + +#include + +#if HAVE_ARPA_INET_H +# include +#endif + +#if HAVE_UNISTD_H +# include +#endif + +#if HAVE_STRING_H +# include +#else +# include +#endif + +#if HAVE_LOCALE_H +# include +#endif + +#if HAVE_SYS_MMAN_H +# include +#endif + +#if HAVE_SYS_LOADAVG_H +# include +#endif + +#ifdef HARTMUT_0 +#include +#endif + +#include "safe_mode.h" + +#ifdef PHP_WIN32 +# include "win32/unistd.h" +#endif + +#ifndef INADDR_NONE +#define INADDR_NONE ((unsigned long int) -1) +#endif + +#include "zend_globals.h" +#include "php_globals.h" +#include "SAPI.h" +#include "php_ticks.h" + + +#ifdef ZTS +PHPAPI int basic_globals_id; +#else +PHPAPI php_basic_globals basic_globals; +#endif + +#include "php_fopen_wrappers.h" +#include "streamsfuncs.h" + +static zend_class_entry *incomplete_class_entry = NULL; + +typedef struct _php_shutdown_function_entry { + zval **arguments; + int arg_count; +} php_shutdown_function_entry; + +typedef struct _user_tick_function_entry { + zval **arguments; + int arg_count; + int calling; +} user_tick_function_entry; + +/* some prototypes for local functions */ +static void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry); +static void user_tick_function_dtor(user_tick_function_entry *tick_function_entry); + +#undef sprintf + +/* {{{ arginfo */ +/* {{{ main/main.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_set_time_limit, 0) + ZEND_ARG_INFO(0, seconds) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ main/output.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_start, 0, 0, 0) + ZEND_ARG_INFO(0, user_function) + ZEND_ARG_INFO(0, chunk_size) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_flush, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_clean, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_end_flush, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_end_clean, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_get_flush, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_get_clean, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_get_contents, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_get_level, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_get_length, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ob_list_handlers, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_get_status, 0, 0, 0) + ZEND_ARG_INFO(0, full_status) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_implicit_flush, 0, 0, 0) + ZEND_ARG_INFO(0, flag) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_output_reset_rewrite_vars, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_output_add_rewrite_var, 0) + ZEND_ARG_INFO(0, name) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ main/streams/userspace.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_wrapper_register, 0, 0, 2) + ZEND_ARG_INFO(0, protocol) + ZEND_ARG_INFO(0, classname) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_unregister, 0) + ZEND_ARG_INFO(0, protocol) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_restore, 0) + ZEND_ARG_INFO(0, protocol) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_is_local, 0) + ZEND_ARG_INFO(0, stream) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ array.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_krsort, 0, 0, 1) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, sort_flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ksort, 0, 0, 1) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, sort_flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_count, 0, 0, 1) + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_natsort, 0) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_natcasesort, 0) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_asort, 0, 0, 1) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, sort_flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_arsort, 0, 0, 1) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, sort_flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_sort, 0, 0, 1) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, sort_flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_rsort, 0, 0, 1) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, sort_flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_usort, 0) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, cmp_function) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_uasort, 0) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, cmp_function) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_uksort, 0) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, cmp_function) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_end, 0) + ZEND_ARG_INFO(1, arg) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_prev, 0) + ZEND_ARG_INFO(1, arg) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_next, 0) + ZEND_ARG_INFO(1, arg) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_reset, 0) + ZEND_ARG_INFO(1, arg) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_current, ZEND_SEND_PREFER_REF) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_key, ZEND_SEND_PREFER_REF) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_min, 0, 0, 1) + ZEND_ARG_INFO(0, arg1) + ZEND_ARG_INFO(0, arg2) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_max, 0, 0, 1) + ZEND_ARG_INFO(0, arg1) + ZEND_ARG_INFO(0, arg2) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk, 0, 0, 2) + ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, funcname) + ZEND_ARG_INFO(0, userdata) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk_recursive, 0, 0, 2) + ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, funcname) + ZEND_ARG_INFO(0, userdata) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_in_array, 0, 0, 2) + ZEND_ARG_INFO(0, needle) + ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */ + ZEND_ARG_INFO(0, strict) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_search, 0, 0, 2) + ZEND_ARG_INFO(0, needle) + ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */ + ZEND_ARG_INFO(0, strict) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, extract_type) + ZEND_ARG_INFO(0, prefix) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_compact, 0, 0, 1) + ZEND_ARG_INFO(0, var_names) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_fill, 0) + ZEND_ARG_INFO(0, start_key) + ZEND_ARG_INFO(0, num) + ZEND_ARG_INFO(0, val) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_fill_keys, 0) + ZEND_ARG_INFO(0, keys) /* ARRAY_INFO(0, keys, 0) */ + ZEND_ARG_INFO(0, val) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_range, 0, 0, 2) + ZEND_ARG_INFO(0, low) + ZEND_ARG_INFO(0, high) + ZEND_ARG_INFO(0, step) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_shuffle, 0) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_push, 0, 0, 2) + ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */ + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_pop, 0) + ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_shift, 0) + ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_unshift, 0, 0, 2) + ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */ + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_splice, 0, 0, 2) + ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, length) + ZEND_ARG_INFO(0, replacement) /* ARRAY_INFO(0, arg, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_slice, 0, 0, 2) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(1, arg, 0) */ + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, length) + ZEND_ARG_INFO(0, preserve_keys) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, ..., 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge_recursive, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_keys, 0, 0, 1) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, search_value) + ZEND_ARG_INFO(0, strict) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_values, 0) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_count_values, 0) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reverse, 0, 0, 1) + ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, preserve_keys) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_pad, 0) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, pad_size) + ZEND_ARG_INFO(0, pad_value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_flip, 0) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_change_key_case, 0, 0, 1) + ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, case) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_unique, 0) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_key, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, ..., 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_ukey, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_key_compare_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, ..., 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_data_compare_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_assoc, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, ..., 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_assoc, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_data_compare_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_uassoc, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_key_compare_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_uassoc, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_data_compare_func) + ZEND_ARG_INFO(0, callback_key_compare_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_key, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, ..., 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_diff_ukey, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_key_comp_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, ..., 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_udiff, 0) + ZEND_ARG_INFO(0, arr1) + ZEND_ARG_INFO(0, arr2) + ZEND_ARG_INFO(0, callback_data_comp_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_assoc, 0, 0, 2) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, ...) /* ARRAY_INFO(0, ..., 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_diff_uassoc, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_data_comp_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_assoc, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_key_comp_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_uassoc, 0) + ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, callback_data_comp_func) + ZEND_ARG_INFO(0, callback_key_comp_func) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, ZEND_SEND_PREFER_REF, 0, 1) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr2) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, num_req) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_sum, 0) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_product, 0) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reduce, 0, 0, 2) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, callback) + ZEND_ARG_INFO(0, initial) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_filter, 0, 0, 1) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, callback) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_map, 0, 0, 3) + ZEND_ARG_INFO(0, callback) + ZEND_ARG_INFO(0, arg1) /* ARRAY_INFO(0, arg1, 0) */ + ZEND_ARG_INFO(0, arg2) /* ARRAY_INFO(0, arg2, 0) */ + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_key_exists, 0) + ZEND_ARG_INFO(0, key) + ZEND_ARG_INFO(0, search) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_array_chunk, 0, 0, 2) + ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(0, size) + ZEND_ARG_INFO(0, preserve_keys) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_array_combine, 0) + ZEND_ARG_INFO(0, keys) /* ARRAY_INFO(0, keys, 0) */ + ZEND_ARG_INFO(0, values) /* ARRAY_INFO(0, values, 0) */ +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ basic_functions.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_constant, 0) + ZEND_ARG_INFO(0, const_name) +ZEND_END_ARG_INFO() + +#ifdef HAVE_INET_NTOP +static +ZEND_BEGIN_ARG_INFO(arginfo_inet_ntop, 0) + ZEND_ARG_INFO(0, in_addr) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_INET_PTON +static +ZEND_BEGIN_ARG_INFO(arginfo_inet_pton, 0) + ZEND_ARG_INFO(0, ip_address) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_ip2long, 0) + ZEND_ARG_INFO(0, ip_address) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_long2ip, 0) + ZEND_ARG_INFO(0, proper_address) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_getenv, 0) + ZEND_ARG_INFO(0, varname) +ZEND_END_ARG_INFO() + +#ifdef HAVE_PUTENV +static +ZEND_BEGIN_ARG_INFO(arginfo_putenv, 0) + ZEND_ARG_INFO(0, setting) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_GETOPT +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_getopt, 0, 0, 1) + ZEND_ARG_INFO(0, options) + ZEND_ARG_INFO(0, opts) /* ARRAY_INFO(0, opts, 1) */ +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_flush, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_sleep, 0) + ZEND_ARG_INFO(0, seconds) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_usleep, 0) + ZEND_ARG_INFO(0, micro_seconds) +ZEND_END_ARG_INFO() + +#if HAVE_NANOSLEEP +static +ZEND_BEGIN_ARG_INFO(arginfo_time_nanosleep, 0) + ZEND_ARG_INFO(0, seconds) + ZEND_ARG_INFO(0, nanoseconds) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_time_sleep_until, 0) + ZEND_ARG_INFO(0, timestamp) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_get_current_user, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_get_cfg_var, 0) + ZEND_ARG_INFO(0, option_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_error_log, 0, 0, 1) + ZEND_ARG_INFO(0, message) + ZEND_ARG_INFO(0, message_type) + ZEND_ARG_INFO(0, destination) + ZEND_ARG_INFO(0, extra_headers) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_error_get_last, 0, 0, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_func, 0, 0, 1) + ZEND_ARG_INFO(0, function_name) + ZEND_ARG_INFO(0, parmeter) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_call_user_func_array, 0) + ZEND_ARG_INFO(0, function_name) + ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_method, 0, 0, 2) + ZEND_ARG_INFO(0, method_name) + ZEND_ARG_INFO(1, object) + ZEND_ARG_INFO(0, parameter) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_call_user_method_array, 0) + ZEND_ARG_INFO(0, method_name) + ZEND_ARG_INFO(1, object) + ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_register_shutdown_function, 0) + ZEND_ARG_INFO(0, function_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_file, 0, 0, 1) + ZEND_ARG_INFO(0, file_name) + ZEND_ARG_INFO(0, return) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_strip_whitespace, 0) + ZEND_ARG_INFO(0, file_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_string, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, return) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ini_get, 0) + ZEND_ARG_INFO(0, varname) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ini_get_all, 0, 0, 0) + ZEND_ARG_INFO(0, extension) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ini_set, 0) + ZEND_ARG_INFO(0, varname) + ZEND_ARG_INFO(0, newvalue) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ini_restore, 0) + ZEND_ARG_INFO(0, varname) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_set_include_path, 0) + ZEND_ARG_INFO(0, new_include_path) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_get_include_path, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_restore_include_path, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_print_r, 0, 0, 1) + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, return) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_connection_aborted, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_connection_status, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ignore_user_abort, 0, 0, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +#if HAVE_GETSERVBYNAME +static +ZEND_BEGIN_ARG_INFO(arginfo_getservbyname, 0) + ZEND_ARG_INFO(0, service) + ZEND_ARG_INFO(0, protocol) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_GETSERVBYPORT +static +ZEND_BEGIN_ARG_INFO(arginfo_getservbyport, 0) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(0, protocol) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_GETPROTOBYNAME +static +ZEND_BEGIN_ARG_INFO(arginfo_getprotobyname, 0) + ZEND_ARG_INFO(0, name) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_GETPROTOBYNUMBER +static +ZEND_BEGIN_ARG_INFO(arginfo_getprotobynumber, 0) + ZEND_ARG_INFO(0, proto) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_register_tick_function, 0, 0, 1) + ZEND_ARG_INFO(0, function_name) + ZEND_ARG_INFO(0, arg) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_unregister_tick_function, 0) + ZEND_ARG_INFO(0, function_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_uploaded_file, 0) + ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_move_uploaded_file, 0) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, new_path) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, process_sections) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1) + ZEND_ARG_INFO(0, types) + ZEND_ARG_INFO(0, prefix) +ZEND_END_ARG_INFO() + +#ifdef HAVE_GETLOADAVG +static +ZEND_BEGIN_ARG_INFO(arginfo_sys_getloadavg, 0) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ assert.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_assert, 0) + ZEND_ARG_INFO(0, assertion) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_assert_options, 0, 0, 1) + ZEND_ARG_INFO(0, what) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ base64.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_base64_encode, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_base64_decode, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, strict) +ZEND_END_ARG_INFO() + +/* }}} */ +/* {{{ browscap.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_get_browser, 0, 0, 0) + ZEND_ARG_INFO(0, browser_name) + ZEND_ARG_INFO(0, return_array) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ crc32.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_crc32, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +/* }}} */ +/* {{{ crypt.c */ +#if HAVE_CRYPT +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_crypt, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, salt) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ cyr_convert.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_convert_cyr_string, 0) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, from) + ZEND_ARG_INFO(0, to) +ZEND_END_ARG_INFO() + +/* }}} */ +/* {{{ datetime.c */ +#if HAVE_STRPTIME +static +ZEND_BEGIN_ARG_INFO(arginfo_strptime, 0) + ZEND_ARG_INFO(0, timestamp) + ZEND_ARG_INFO(0, format) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ dir.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_opendir, 0, 0, 1) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_dir, 0, 0, 1) + ZEND_ARG_INFO(0, directory) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_closedir, 0, 0, 0) + ZEND_ARG_INFO(0, dir_handle) +ZEND_END_ARG_INFO() + +#if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC +static +ZEND_BEGIN_ARG_INFO(arginfo_chroot, 0) + ZEND_ARG_INFO(0, directory) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_chdir, 0) + ZEND_ARG_INFO(0, directory) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_getcwd, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_rewinddir, 0, 0, 0) + ZEND_ARG_INFO(0, dir_handle) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_readdir, 0, 0, 0) + ZEND_ARG_INFO(0, dir_handle) +ZEND_END_ARG_INFO() + +#ifdef HAVE_GLOB +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_glob, 0, 0, 1) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_scandir, 0, 0, 1) + ZEND_ARG_INFO(0, dir) + ZEND_ARG_INFO(0, sorting_order) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ arginfo ext/standard/dl.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_dl, 0) + ZEND_ARG_INFO(0, extension_filename) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ dns.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_gethostbyaddr, 0) + ZEND_ARG_INFO(0, ip_address) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gethostbyname, 0) + ZEND_ARG_INFO(0, hostname) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gethostbynamel, 0) + ZEND_ARG_INFO(0, hostname) +ZEND_END_ARG_INFO() + +#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_check_record, 0, 0, 1) + ZEND_ARG_INFO(0, host) + ZEND_ARG_INFO(0, type) +ZEND_END_ARG_INFO() + +# if HAVE_DNS_FUNCS +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_record, 1, 0, 1) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(0, type) + ZEND_ARG_INFO(1, authns) /* ARRAY_INFO(1, authns, 1) */ + ZEND_ARG_INFO(1, addtl) /* ARRAY_INFO(1, addtl, 1) */ +ZEND_END_ARG_INFO() +# endif + +# if HAVE_DN_SKIPNAME && HAVE_DN_EXPAND +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_mx, 0, 0, 2) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(1, mxhosts) /* ARRAY_INFO(1, mxhosts, 1) */ + ZEND_ARG_INFO(1, weight) /* ARRAY_INFO(1, weight, 1) */ +ZEND_END_ARG_INFO() +# endif +#endif /* HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) */ +/* }}} */ +/* {{{ exec.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_exec, 0, 0, 1) + ZEND_ARG_INFO(0, command) + ZEND_ARG_INFO(1, output) /* ARRAY_INFO(1, output, 1) */ + ZEND_ARG_INFO(1, return_value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_system, 0, 0, 1) + ZEND_ARG_INFO(0, command) + ZEND_ARG_INFO(1, return_value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_passthru, 0, 0, 1) + ZEND_ARG_INFO(0, command) + ZEND_ARG_INFO(1, return_value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_escapeshellcmd, 0) + ZEND_ARG_INFO(0, command) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_escapeshellarg, 0) + ZEND_ARG_INFO(0, arg) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_shell_exec, 0) + ZEND_ARG_INFO(0, cmd) +ZEND_END_ARG_INFO() + +#ifdef HAVE_NICE +static +ZEND_BEGIN_ARG_INFO(arginfo_proc_nice, 0) + ZEND_ARG_INFO(0, priority) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ file.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_flock, 0, 0, 2) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, operation) + ZEND_ARG_INFO(1, wouldblock) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_get_meta_tags, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, use_include_path) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_file_get_contents, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, maxlen) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_file_put_contents, 0, 0, 2) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_file, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_tempnam, 0) + ZEND_ARG_INFO(0, dir) + ZEND_ARG_INFO(0, prefix) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_tmpfile, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fopen, 0, 0, 2) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, mode) + ZEND_ARG_INFO(0, use_include_path) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fclose, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_popen, 0) + ZEND_ARG_INFO(0, command) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_pclose, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_feof, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fgets, 0, 0, 1) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fgetc, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetss, 0, 0, 1) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, length) + ZEND_ARG_INFO(0, allowable_tags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fscanf, 1, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(1, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fwrite, 0, 0, 2) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fflush, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_rewind, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ftell, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fseek, 0, 0, 2) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, whence) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_mkdir, 0, 0, 1) + ZEND_ARG_INFO(0, pathname) + ZEND_ARG_INFO(0, mode) + ZEND_ARG_INFO(0, recursive) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_rmdir, 0, 0, 1) + ZEND_ARG_INFO(0, dirname) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_readfile, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_umask, 0, 0, 0) + ZEND_ARG_INFO(0, mask) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fpassthru, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_rename, 0, 0, 2) + ZEND_ARG_INFO(0, old_name) + ZEND_ARG_INFO(0, new_name) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_unlink, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ftruncate, 0) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, size) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fstat, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() +static +ZEND_BEGIN_ARG_INFO(arginfo_copy, 0) + ZEND_ARG_INFO(0, source_file) + ZEND_ARG_INFO(0, destination_file) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fread, 0) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fputcsv, 0, 0, 2) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, fields) /* ARRAY_INFO(0, fields, 1) */ + ZEND_ARG_INFO(0, delimiter) + ZEND_ARG_INFO(0, enclosure) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetcsv, 0, 0, 1) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, length) + ZEND_ARG_INFO(0, delimiter) + ZEND_ARG_INFO(0, enclosure) +ZEND_END_ARG_INFO() + +#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS) +static +ZEND_BEGIN_ARG_INFO(arginfo_realpath, 0) + ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_FNMATCH +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fnmatch, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() +#endif +static +ZEND_BEGIN_ARG_INFO(arginfo_sys_get_temp_dir, 0) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ filestat.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_disk_total_space, 0) + ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_disk_free_space, 0) + ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO() + +#ifndef NETWARE +static +ZEND_BEGIN_ARG_INFO(arginfo_chgrp, 0) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, group) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_chown, 0) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, user) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_LCHOWN +static +ZEND_BEGIN_ARG_INFO(arginfo_lchgrp, 0) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, group) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_lchown, 0) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, user) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_chmod, 0) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +#if HAVE_UTIME +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_touch, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, time) + ZEND_ARG_INFO(0, atime) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_clearstatcache, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fileperms, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fileinode, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_filesize, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fileowner, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_filegroup, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fileatime, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_filemtime, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_filectime, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_filetype, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_writable, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_readable, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_executable, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_file, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_dir, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_link, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_file_exists, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_lstat, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stat, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ formatted_print.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_sprintf, 0, 0, 2) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, arg1) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_vsprintf, 0) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_printf, 0, 0, 1) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, arg1) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_vprintf, 0) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fprintf, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, arg1) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_vfprintf, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */ +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ fsock.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(1, errno) + ZEND_ARG_INFO(1, errstr) + ZEND_ARG_INFO(0, timeout) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 2) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(1, errno) + ZEND_ARG_INFO(1, errstr) + ZEND_ARG_INFO(0, timeout) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ ftok.c */ +#if HAVE_FTOK +static +ZEND_BEGIN_ARG_INFO(arginfo_ftok, 0) + ZEND_ARG_INFO(0, pathname) + ZEND_ARG_INFO(0, proj) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ head.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_header, 0, 0, 1) + ZEND_ARG_INFO(0, header) + ZEND_ARG_INFO(0, replace) + ZEND_ARG_INFO(0, http_response_code) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_setcookie, 0, 0, 1) + ZEND_ARG_INFO(0, name) + ZEND_ARG_INFO(0, value) + ZEND_ARG_INFO(0, expires) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, domain) + ZEND_ARG_INFO(0, secure) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_setrawcookie, 0, 0, 1) + ZEND_ARG_INFO(0, name) + ZEND_ARG_INFO(0, value) + ZEND_ARG_INFO(0, expires) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, domain) + ZEND_ARG_INFO(0, secure) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_headers_sent, 0, 0, 0) + ZEND_ARG_INFO(1, file) + ZEND_ARG_INFO(1, line) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ html.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, quote_style) + ZEND_ARG_INFO(0, charset) + ZEND_ARG_INFO(0, double_encode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars_decode, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, quote_style) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_html_entity_decode, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, quote_style) + ZEND_ARG_INFO(0, charset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlentities, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, quote_style) + ZEND_ARG_INFO(0, charset) + ZEND_ARG_INFO(0, double_encode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_get_html_translation_table, 0, 0, 0) + ZEND_ARG_INFO(0, table) + ZEND_ARG_INFO(0, quote_style) +ZEND_END_ARG_INFO() + +/* }}} */ +/* {{{ http.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_http_build_query, 0, 0, 1) + ZEND_ARG_INFO(0, formdata) + ZEND_ARG_INFO(0, prefix) + ZEND_ARG_INFO(0, arg_separator) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ image.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_image_type_to_mime_type, 0) + ZEND_ARG_INFO(0, imagetype) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_image_type_to_extension, 0, 0, 1) + ZEND_ARG_INFO(0, imagetype) + ZEND_ARG_INFO(0, include_dot) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_getimagesize, 0, 0, 1) + ZEND_ARG_INFO(0, imagefile) + ZEND_ARG_INFO(1, info) /* ARRAY_INFO(1, info, 1) */ +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ info.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_phpinfo, 0, 0, 0) + ZEND_ARG_INFO(0, what) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_phpversion, 0, 0, 0) + ZEND_ARG_INFO(0, extension) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_phpcredits, 0, 0, 0) + ZEND_ARG_INFO(0, flag) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_logo_guid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_real_logo_guid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_egg_logo_guid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_zend_logo_guid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_sapi_name, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_uname, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_ini_scanned_files, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_php_ini_loaded_file, 0) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ iptc.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_iptcembed, 0, 0, 2) + ZEND_ARG_INFO(0, iptcdata) + ZEND_ARG_INFO(0, jpeg_file_name) + ZEND_ARG_INFO(0, spool) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_iptcparse, 0) + ZEND_ARG_INFO(0, iptcdata) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ lcg.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_lcg_value, 0) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ levenshtein.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_levenshtein, 0) + ZEND_ARG_INFO(0, str1) + ZEND_ARG_INFO(0, str2) + ZEND_ARG_INFO(0, cost_ins) + ZEND_ARG_INFO(0, cost_rep) + ZEND_ARG_INFO(0, cost_del) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ link.c */ +#ifdef HAVE_SYMLINK +static +ZEND_BEGIN_ARG_INFO(arginfo_readlink, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_linkinfo, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_symlink, 0) + ZEND_ARG_INFO(0, target) + ZEND_ARG_INFO(0, link) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_link, 0) + ZEND_ARG_INFO(0, target) + ZEND_ARG_INFO(0, link) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ mail.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_ezmlm_hash, 0) + ZEND_ARG_INFO(0, addr) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_mail, 0, 0, 3) + ZEND_ARG_INFO(0, to) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(0, message) + ZEND_ARG_INFO(0, additional_headers) + ZEND_ARG_INFO(0, additional_parameters) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ math.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_abs, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ceil, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_floor, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_round, 0, 0, 1) + ZEND_ARG_INFO(0, number) + ZEND_ARG_INFO(0, precision) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_sin, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_cos, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_tan, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_asin, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_acos, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_atan, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_atan2, 0) + ZEND_ARG_INFO(0, y) + ZEND_ARG_INFO(0, x) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_sinh, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_cosh, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_tanh, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +#ifdef HAVE_ASINH +static +ZEND_BEGIN_ARG_INFO(arginfo_asinh, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_ACOSH +static +ZEND_BEGIN_ARG_INFO(arginfo_acosh, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_ATANH +static +ZEND_BEGIN_ARG_INFO(arginfo_atanh, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_pi, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_finite, 0) + ZEND_ARG_INFO(0, val) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_infinite, 0) + ZEND_ARG_INFO(0, val) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_nan, 0) + ZEND_ARG_INFO(0, val) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_pow, 0) + ZEND_ARG_INFO(0, base) + ZEND_ARG_INFO(0, exponent) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_exp, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +#if !defined(PHP_WIN32) && !defined(NETWARE) +static +ZEND_BEGIN_ARG_INFO(arginfo_expm1, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +# ifdef HAVE_LOG1P +static +ZEND_BEGIN_ARG_INFO(arginfo_log1p, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() +# endif +#endif /* !defined(PHP_WIN32) && !defined(NETWARE) */ + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_log, 0, 0, 1) + ZEND_ARG_INFO(0, number) + ZEND_ARG_INFO(0, base) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_log10, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_sqrt, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_hypot, 0) + ZEND_ARG_INFO(0, num1) + ZEND_ARG_INFO(0, num2) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_deg2rad, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_rad2deg, 0) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_bindec, 0) + ZEND_ARG_INFO(0, binary_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_hexdec, 0) + ZEND_ARG_INFO(0, hexadecimal_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_octdec, 0) + ZEND_ARG_INFO(0, octal_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_decbin, 0) + ZEND_ARG_INFO(0, decimal_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_decoct, 0) + ZEND_ARG_INFO(0, decimal_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_dechex, 0) + ZEND_ARG_INFO(0, decimal_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_base_convert, 0) + ZEND_ARG_INFO(0, number) + ZEND_ARG_INFO(0, frombase) + ZEND_ARG_INFO(0, tobase) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_number_format, 0, 0, 1) + ZEND_ARG_INFO(0, number) + ZEND_ARG_INFO(0, num_decimal_places) + ZEND_ARG_INFO(0, dec_seperator) + ZEND_ARG_INFO(0, thousands_seperator) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0) + ZEND_ARG_INFO(0, x) + ZEND_ARG_INFO(0, y) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ md5.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_md5, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, raw_output) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_md5_file, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, raw_output) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ metaphone.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_metaphone, 0, 0, 1) + ZEND_ARG_INFO(0, text) + ZEND_ARG_INFO(0, phones) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ microtime.c */ +#ifdef HAVE_GETTIMEOFDAY +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_microtime, 0, 0, 0) + ZEND_ARG_INFO(0, get_as_float) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gettimeofday, 0, 0, 0) + ZEND_ARG_INFO(0, get_as_float) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_GETRUSAGE +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_getrusage, 0, 0, 0) + ZEND_ARG_INFO(0, who) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ pack.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_pack, 0, 0, 2) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, arg1) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_unpack, 0) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, input) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ pageinfo.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_getmyuid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_getmygid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_getmypid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_getmyinode, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_getlastmod, 0) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ proc_open.c */ +#ifdef PHP_CAN_SUPPORT_PROC_OPEN +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_terminate, 0, 0, 1) + ZEND_ARG_INFO(0, process) + ZEND_ARG_INFO(0, signal) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_proc_close, 0) + ZEND_ARG_INFO(0, process) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_proc_get_status, 0) + ZEND_ARG_INFO(0, process) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_open, 0, 0, 3) + ZEND_ARG_INFO(0, command) + ZEND_ARG_INFO(0, descriptorspec) /* ARRAY_INFO(0, descriptorspec, 1) */ + ZEND_ARG_INFO(1, pipes) /* ARRAY_INFO(1, pipes, 1) */ + ZEND_ARG_INFO(0, cwd) + ZEND_ARG_INFO(0, env) /* ARRAY_INFO(0, env, 1) */ + ZEND_ARG_INFO(0, other_options) /* ARRAY_INFO(0, other_options, 1) */ +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ quot_print.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_decode, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ rand.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_srand, 0, 0, 0) + ZEND_ARG_INFO(0, seed) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_srand, 0, 0, 0) + ZEND_ARG_INFO(0, seed) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_rand, 0, 0, 0) + ZEND_ARG_INFO(0, min) + ZEND_ARG_INFO(0, max) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_rand, 0, 0, 0) + ZEND_ARG_INFO(0, min) + ZEND_ARG_INFO(0, max) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_getrandmax, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_mt_getrandmax, 0) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ reg.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ereg, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(1, registers) /* ARRAY_INFO(1, registers, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_eregi, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(1, registers) /* ARRAY_INFO(1, registers, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ereg_replace, 0) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, replacement) + ZEND_ARG_INFO(0, string) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_eregi_replace, 0) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, replacement) + ZEND_ARG_INFO(0, string) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_split, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, limit) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_spliti, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, limit) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_sql_regcase, 0) + ZEND_ARG_INFO(0, string) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ sha1.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, raw_output) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1_file, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, raw_output) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ soundex.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_soundex, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ streamsfuncs.c */ +#if HAVE_SOCKETPAIR +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_pair, 0) + ZEND_ARG_INFO(0, domain) + ZEND_ARG_INFO(0, type) + ZEND_ARG_INFO(0, protocol) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1) + ZEND_ARG_INFO(0, remoteaddress) + ZEND_ARG_INFO(1, errcode) + ZEND_ARG_INFO(1, errstring) + ZEND_ARG_INFO(0, timeout) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1) + ZEND_ARG_INFO(0, localaddress) + ZEND_ARG_INFO(1, errcode) + ZEND_ARG_INFO(1, errstring) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1) + ZEND_ARG_INFO(0, serverstream) + ZEND_ARG_INFO(0, timeout) + ZEND_ARG_INFO(1, peername) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_get_name, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, want_peer) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_sendto, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, target_addr) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_recvfrom, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, amount) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(1, remote_addr) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_contents, 0, 0, 1) + ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, maxlen) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_copy_to_stream, 0, 0, 2) + ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, dest) + ZEND_ARG_INFO(0, maxlen) + ZEND_ARG_INFO(0, pos) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_get_meta_data, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_get_transports, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_get_wrappers, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_select, 0, 0, 4) + ZEND_ARG_INFO(1, read_streams) /* ARRAY_INFO(1, read_streams, 1) */ + ZEND_ARG_INFO(1, write_streams) /* ARRAY_INFO(1, write_streams, 1) */ + ZEND_ARG_INFO(1, except_streams) /* ARRAY_INFO(1, except_streams, 1) */ + ZEND_ARG_INFO(0, tv_sec) + ZEND_ARG_INFO(0, tv_usec) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_context_get_options, 0) + ZEND_ARG_INFO(0, stream_or_context) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_option, 0) + ZEND_ARG_INFO(0, stream_or_context) + ZEND_ARG_INFO(0, wrappername) + ZEND_ARG_INFO(0, optionname) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_params, 0) + ZEND_ARG_INFO(0, stream_or_context) + ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_default, 0, 0, 0) + ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0) + ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, filtername) + ZEND_ARG_INFO(0, read_write) + ZEND_ARG_INFO(0, filterparams) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_append, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, filtername) + ZEND_ARG_INFO(0, read_write) + ZEND_ARG_INFO(0, filterparams) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_remove, 0) + ZEND_ARG_INFO(0, stream_filter) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_line, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, maxlen) + ZEND_ARG_INFO(0, ending) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_set_blocking, 0) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +#if HAVE_SYS_TIME_H || defined(PHP_WIN32) +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_set_timeout, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, seconds) + ZEND_ARG_INFO(0, microseconds) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, buffer) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_enable_crypto, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, enable) + ZEND_ARG_INFO(0, cryptokind) + ZEND_ARG_INFO(0, sessionstream) +ZEND_END_ARG_INFO() + +#ifdef HAVE_SHUTDOWN +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_shutdown, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, how) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ string.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_bin2hex, 0) + ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strspn, 0, 0, 2) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, mask) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, len) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strcspn, 0, 0, 2) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, mask) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, len) +ZEND_END_ARG_INFO() + +#if HAVE_NL_LANGINFO +static +ZEND_BEGIN_ARG_INFO(arginfo_nl_langinfo, 0) + ZEND_ARG_INFO(0, item) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_STRCOLL +static +ZEND_BEGIN_ARG_INFO(arginfo_strcoll, 0) + ZEND_ARG_INFO(0, str1) + ZEND_ARG_INFO(0, str2) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_trim, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, character_mask) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_rtrim, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, character_mask) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ltrim, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, character_mask) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_wordwrap, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, width) + ZEND_ARG_INFO(0, break) + ZEND_ARG_INFO(0, cut) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_explode, 0, 0, 2) + ZEND_ARG_INFO(0, separator) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, limit) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_implode, 0) + ZEND_ARG_INFO(0, glue) + ZEND_ARG_INFO(0, pieces) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strtok, 0) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, token) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strtoupper, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strtolower, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_basename, 0, 0, 1) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, suffix) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_dirname, 0) + ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_pathinfo, 0, 0, 1) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stristr, 0) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strstr, 0) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strpos, 0, 0, 2) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stripos, 0, 0, 2) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strrpos, 0, 0, 2) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strripos, 0, 0, 2) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strrchr, 0) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_chunk_split, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, chunklen) + ZEND_ARG_INFO(0, ending) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_substr, 0, 0, 2) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_replace, 0, 0, 3) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, replace) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_quotemeta, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ord, 0) + ZEND_ARG_INFO(0, character) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_chr, 0) + ZEND_ARG_INFO(0, codepoint) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ucfirst, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_ucwords, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strtr, 0, 0, 2) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, from) + ZEND_ARG_INFO(0, to) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strrev, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_similar_text, 0, 0, 2) + ZEND_ARG_INFO(0, str1) + ZEND_ARG_INFO(0, str2) + ZEND_ARG_INFO(1, percent) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_addcslashes, 0) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, charlist) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_addslashes, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stripcslashes, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stripslashes, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_str_replace, 0, 0, 3) + ZEND_ARG_INFO(0, search) + ZEND_ARG_INFO(0, replace) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(1, replace_count) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_str_ireplace, 0, 0, 3) + ZEND_ARG_INFO(0, search) + ZEND_ARG_INFO(0, replace) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(1, replace_count) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrev, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, max_chars_per_line) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrevc, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, max_chars_per_line) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strip_tags, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, allowable_tags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_setlocale, 0, 0, 2) + ZEND_ARG_INFO(0, category) + ZEND_ARG_INFO(0, locale) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_str, 0, 0, 1) + ZEND_ARG_INFO(0, encoded_string) + ZEND_ARG_INFO(1, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_str_repeat, 0) + ZEND_ARG_INFO(0, input) + ZEND_ARG_INFO(0, mult) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_count_chars, 0, 0, 1) + ZEND_ARG_INFO(0, input) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strnatcmp, 0) + ZEND_ARG_INFO(0, s1) + ZEND_ARG_INFO(0, s2) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_localeconv, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strnatcasecmp, 0) + ZEND_ARG_INFO(0, s1) + ZEND_ARG_INFO(0, s2) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_count, 0, 0, 2) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, needle) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_str_pad, 0, 0, 2) + ZEND_ARG_INFO(0, input) + ZEND_ARG_INFO(0, pad_length) + ZEND_ARG_INFO(0, pad_string) + ZEND_ARG_INFO(0, pad_type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_sscanf, 1, 0, 2) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(1, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_str_rot13, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_str_shuffle, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_str_word_count, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, charlist) +ZEND_END_ARG_INFO() + +#ifdef HAVE_STRFMON +static +ZEND_BEGIN_ARG_INFO(arginfo_money_format, 0) + ZEND_ARG_INFO(0, format) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_str_split, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, split_length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 1) + ZEND_ARG_INFO(0, haystack) + ZEND_ARG_INFO(0, char_list) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_compare, 0, 0, 3) + ZEND_ARG_INFO(0, main_str) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, length) + ZEND_ARG_INFO(0, case_sensitivity) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ syslog.c */ +#ifdef HAVE_SYSLOG_H +static +ZEND_BEGIN_ARG_INFO(arginfo_define_syslog_variables, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_openlog, 0) + ZEND_ARG_INFO(0, ident) + ZEND_ARG_INFO(0, option) + ZEND_ARG_INFO(0, facility) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_closelog, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_syslog, 0) + ZEND_ARG_INFO(0, priority) + ZEND_ARG_INFO(0, message) +ZEND_END_ARG_INFO() +#endif +/* }}} */ +/* {{{ type.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_gettype, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_settype, 0) + ZEND_ARG_INFO(1, var) + ZEND_ARG_INFO(0, type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_intval, 0, 0, 1) + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, base) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_floatval, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_strval, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_null, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_resource, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_bool, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_long, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_float, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_string, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_array, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_object, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_numeric, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_is_scalar, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_is_callable, 0, 0, 1) + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, syntax_only) + ZEND_ARG_INFO(1, callable_name) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ uniqid.c */ +#ifdef HAVE_GETTIMEOFDAY +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_uniqid, 0, 0, 0) + ZEND_ARG_INFO(0, prefix) + ZEND_ARG_INFO(0, more_entropy) +ZEND_END_ARG_INFO() +#endif +/* }}} *//* {{{ url.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_url, 0, 0, 1) + ZEND_ARG_INFO(0, url) + ZEND_ARG_INFO(0, component) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_urlencode, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_urldecode, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_rawurlencode, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_rawurldecode, 0) + ZEND_ARG_INFO(0, str) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_get_headers, 0, 0, 1) + ZEND_ARG_INFO(0, url) + ZEND_ARG_INFO(0, format) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ user_filters.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_make_writeable, 0) + ZEND_ARG_INFO(0, brigade) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_prepend, 0) + ZEND_ARG_INFO(0, brigade) + ZEND_ARG_INFO(0, bucket) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_append, 0) + ZEND_ARG_INFO(0, brigade) + ZEND_ARG_INFO(0, bucket) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_new, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_INFO(0, buffer) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_get_filters, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_register, 0) + ZEND_ARG_INFO(0, filtername) + ZEND_ARG_INFO(0, classname) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ uuencode.c */ +static +ZEND_BEGIN_ARG_INFO(arginfo_convert_uuencode, 0) + ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_convert_uudecode, 0) + ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ var.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_var_dump, 0, 0, 1) + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_zval_dump, 0, 0, 1) + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_var_export, 0, 0, 1) + ZEND_ARG_INFO(0, var) + ZEND_ARG_INFO(0, return) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_serialize, 0) + ZEND_ARG_INFO(0, var) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_unserialize, 0) + ZEND_ARG_INFO(0, variable_representation) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_usage, 0, 0, 0) + ZEND_ARG_INFO(0, real_usage) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_peak_usage, 0, 0, 0) + ZEND_ARG_INFO(0, real_usage) +ZEND_END_ARG_INFO() +/* }}} */ +/* {{{ versioning.c */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_version_compare, 0, 0, 2) + ZEND_ARG_INFO(0, ver1) + ZEND_ARG_INFO(0, ver2) + ZEND_ARG_INFO(0, oper) +ZEND_END_ARG_INFO() +/* }}} */ +/* }}} */ + +zend_function_entry basic_functions[] = { + PHP_FE(constant, arginfo_constant) + PHP_FE(bin2hex, arginfo_bin2hex) + PHP_FE(sleep, arginfo_sleep) + PHP_FE(usleep, arginfo_usleep) +#if HAVE_NANOSLEEP + PHP_FE(time_nanosleep, arginfo_time_nanosleep) + PHP_FE(time_sleep_until, arginfo_time_sleep_until) +#endif + +#if HAVE_STRPTIME + PHP_FE(strptime, arginfo_strptime) +#endif + + PHP_FE(flush, arginfo_flush) + PHP_FE(wordwrap, arginfo_wordwrap) + PHP_FE(htmlspecialchars, arginfo_htmlspecialchars) + PHP_FE(htmlentities, arginfo_htmlentities) + PHP_FE(html_entity_decode, arginfo_html_entity_decode) + PHP_FE(htmlspecialchars_decode, arginfo_htmlspecialchars_decode) + PHP_FE(get_html_translation_table, arginfo_get_html_translation_table) + PHP_FE(sha1, arginfo_sha1) + PHP_FE(sha1_file, arginfo_sha1_file) + PHP_NAMED_FE(md5,php_if_md5, arginfo_md5) + PHP_NAMED_FE(md5_file,php_if_md5_file, arginfo_md5_file) + PHP_NAMED_FE(crc32,php_if_crc32, arginfo_crc32) + + PHP_FE(iptcparse, arginfo_iptcparse) + PHP_FE(iptcembed, arginfo_iptcembed) + PHP_FE(getimagesize, arginfo_getimagesize) + PHP_FE(image_type_to_mime_type, arginfo_image_type_to_mime_type) + PHP_FE(image_type_to_extension, arginfo_image_type_to_extension) + + PHP_FE(phpinfo, arginfo_phpinfo) + PHP_FE(phpversion, arginfo_phpversion) + PHP_FE(phpcredits, arginfo_phpcredits) + PHP_FE(php_logo_guid, arginfo_php_logo_guid) + PHP_FE(php_real_logo_guid, arginfo_php_real_logo_guid) + PHP_FE(php_egg_logo_guid, arginfo_php_egg_logo_guid) + PHP_FE(zend_logo_guid, arginfo_zend_logo_guid) + PHP_FE(php_sapi_name, arginfo_php_sapi_name) + PHP_FE(php_uname, arginfo_php_uname) + PHP_FE(php_ini_scanned_files, arginfo_php_ini_scanned_files) + PHP_FE(php_ini_loaded_file, arginfo_php_ini_loaded_file) + + PHP_FE(strnatcmp, arginfo_strnatcmp) + PHP_FE(strnatcasecmp, arginfo_strnatcasecmp) + PHP_FE(substr_count, arginfo_substr_count) + PHP_FE(strspn, arginfo_strspn) + PHP_FE(strcspn, arginfo_strcspn) + PHP_FE(strtok, arginfo_strtok) + PHP_FE(strtoupper, arginfo_strtoupper) + PHP_FE(strtolower, arginfo_strtolower) + PHP_FE(strpos, arginfo_strpos) + PHP_FE(stripos, arginfo_stripos) + PHP_FE(strrpos, arginfo_strrpos) + PHP_FE(strripos, arginfo_strripos) + PHP_FE(strrev, arginfo_strrev) + PHP_FE(hebrev, arginfo_hebrev) + PHP_FE(hebrevc, arginfo_hebrevc) + PHP_FE(nl2br, arginfo_nl2br) + PHP_FE(basename, arginfo_basename) + PHP_FE(dirname, arginfo_dirname) + PHP_FE(pathinfo, arginfo_pathinfo) + PHP_FE(stripslashes, arginfo_stripslashes) + PHP_FE(stripcslashes, arginfo_stripcslashes) + PHP_FE(strstr, arginfo_strstr) + PHP_FE(stristr, arginfo_stristr) + PHP_FE(strrchr, arginfo_strrchr) + PHP_FE(str_shuffle, arginfo_str_shuffle) + PHP_FE(str_word_count, arginfo_str_word_count) + PHP_FE(str_split, arginfo_str_split) + PHP_FE(strpbrk, arginfo_strpbrk) + PHP_FE(substr_compare, arginfo_substr_compare) + +#ifdef HAVE_STRCOLL + PHP_FE(strcoll, arginfo_strcoll) +#endif + +#ifdef HAVE_STRFMON + PHP_FE(money_format, arginfo_money_format) +#endif + + PHP_FE(substr, arginfo_substr) + PHP_FE(substr_replace, arginfo_substr_replace) + PHP_FE(quotemeta, arginfo_quotemeta) + PHP_FE(ucfirst, arginfo_ucfirst) + PHP_FE(ucwords, arginfo_ucwords) + PHP_FE(strtr, arginfo_strtr) + PHP_FE(addslashes, arginfo_addslashes) + PHP_FE(addcslashes, arginfo_addcslashes) + PHP_FE(rtrim, arginfo_rtrim) + PHP_FE(str_replace, arginfo_str_replace) + PHP_FE(str_ireplace, arginfo_str_ireplace) + PHP_FE(str_repeat, arginfo_str_repeat) + PHP_FE(count_chars, arginfo_count_chars) + PHP_FE(chunk_split, arginfo_chunk_split) + PHP_FE(trim, arginfo_trim) + PHP_FE(ltrim, arginfo_ltrim) + PHP_FE(strip_tags, arginfo_strip_tags) + PHP_FE(similar_text, arginfo_similar_text) + PHP_FE(explode, arginfo_explode) + PHP_FE(implode, arginfo_implode) + PHP_FE(setlocale, arginfo_setlocale) + PHP_FE(localeconv, arginfo_localeconv) + +#if HAVE_NL_LANGINFO + PHP_FE(nl_langinfo, arginfo_nl_langinfo) +#endif + + PHP_FE(soundex, arginfo_soundex) + PHP_FE(levenshtein, arginfo_levenshtein) + PHP_FE(chr, arginfo_chr) + PHP_FE(ord, arginfo_ord) + PHP_FE(parse_str, arginfo_parse_str) + PHP_FE(str_pad, arginfo_str_pad) + PHP_FALIAS(chop, rtrim, arginfo_rtrim) + PHP_FALIAS(strchr, strstr, arginfo_strstr) + PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), arginfo_sprintf) + PHP_NAMED_FE(printf, PHP_FN(user_printf), arginfo_printf) + PHP_FE(vprintf, arginfo_vprintf) + PHP_FE(vsprintf, arginfo_vsprintf) + PHP_FE(fprintf, arginfo_fprintf) + PHP_FE(vfprintf, arginfo_vfprintf) + PHP_FE(sscanf, arginfo_sscanf) + PHP_FE(fscanf, arginfo_fscanf) + PHP_FE(parse_url, arginfo_parse_url) + PHP_FE(urlencode, arginfo_urlencode) + PHP_FE(urldecode, arginfo_urldecode) + PHP_FE(rawurlencode, arginfo_rawurlencode) + PHP_FE(rawurldecode, arginfo_rawurldecode) + PHP_FE(http_build_query, arginfo_http_build_query) + +#ifdef HAVE_SYMLINK + PHP_FE(readlink, arginfo_readlink) + PHP_FE(linkinfo, arginfo_linkinfo) + PHP_FE(symlink, arginfo_symlink) + PHP_FE(link, arginfo_link) +#endif + + PHP_FE(unlink, arginfo_unlink) + PHP_FE(exec, arginfo_exec) + PHP_FE(system, arginfo_system) + PHP_FE(escapeshellcmd, arginfo_escapeshellcmd) + PHP_FE(escapeshellarg, arginfo_escapeshellarg) + PHP_FE(passthru, arginfo_passthru) + PHP_FE(shell_exec, arginfo_shell_exec) +#ifdef PHP_CAN_SUPPORT_PROC_OPEN + PHP_FE(proc_open, arginfo_proc_open) + PHP_FE(proc_close, arginfo_proc_close) + PHP_FE(proc_terminate, arginfo_proc_terminate) + PHP_FE(proc_get_status, arginfo_proc_get_status) +#endif + +#ifdef HAVE_NICE + PHP_FE(proc_nice, arginfo_proc_nice) +#endif + + PHP_FE(rand, arginfo_rand) + PHP_FE(srand, arginfo_srand) + PHP_FE(getrandmax, arginfo_getrandmax) + PHP_FE(mt_rand, arginfo_mt_rand) + PHP_FE(mt_srand, arginfo_mt_srand) + PHP_FE(mt_getrandmax, arginfo_mt_getrandmax) + +#if HAVE_GETSERVBYNAME + PHP_FE(getservbyname, arginfo_getservbyname) +#endif + +#if HAVE_GETSERVBYPORT + PHP_FE(getservbyport, arginfo_getservbyport) +#endif + +#if HAVE_GETPROTOBYNAME + PHP_FE(getprotobyname, arginfo_getprotobyname) +#endif + +#if HAVE_GETPROTOBYNUMBER + PHP_FE(getprotobynumber, arginfo_getprotobynumber) +#endif + + PHP_FE(getmyuid, arginfo_getmyuid) + PHP_FE(getmygid, arginfo_getmygid) + PHP_FE(getmypid, arginfo_getmypid) + PHP_FE(getmyinode, arginfo_getmyinode) + PHP_FE(getlastmod, arginfo_getlastmod) + + PHP_FE(base64_decode, arginfo_base64_decode) + PHP_FE(base64_encode, arginfo_base64_encode) + + PHP_FE(convert_uuencode, arginfo_convert_uuencode) + PHP_FE(convert_uudecode, arginfo_convert_uudecode) + + PHP_FE(abs, arginfo_abs) + PHP_FE(ceil, arginfo_ceil) + PHP_FE(floor, arginfo_floor) + PHP_FE(round, arginfo_round) + PHP_FE(sin, arginfo_sin) + PHP_FE(cos, arginfo_cos) + PHP_FE(tan, arginfo_tan) + PHP_FE(asin, arginfo_asin) + PHP_FE(acos, arginfo_acos) + PHP_FE(atan, arginfo_atan) + PHP_FE(atan2, arginfo_atan2) + PHP_FE(sinh, arginfo_sinh) + PHP_FE(cosh, arginfo_cosh) + PHP_FE(tanh, arginfo_tanh) + +#ifdef HAVE_ASINH + PHP_FE(asinh, arginfo_asinh) +#endif +#ifdef HAVE_ACOSH + PHP_FE(acosh, arginfo_acosh) +#endif +#ifdef HAVE_ATANH + PHP_FE(atanh, arginfo_atanh) +#endif +#if !defined(PHP_WIN32) && !defined(NETWARE) + PHP_FE(expm1, arginfo_expm1) +# ifdef HAVE_LOG1P + PHP_FE(log1p, arginfo_log1p) +# endif +#endif + + PHP_FE(pi, arginfo_pi) + PHP_FE(is_finite, arginfo_is_finite) + PHP_FE(is_nan, arginfo_is_nan) + PHP_FE(is_infinite, arginfo_is_infinite) + PHP_FE(pow, arginfo_pow) + PHP_FE(exp, arginfo_exp) + PHP_FE(log, arginfo_log) + PHP_FE(log10, arginfo_log10) + PHP_FE(sqrt, arginfo_sqrt) + PHP_FE(hypot, arginfo_hypot) + PHP_FE(deg2rad, arginfo_deg2rad) + PHP_FE(rad2deg, arginfo_rad2deg) + PHP_FE(bindec, arginfo_bindec) + PHP_FE(hexdec, arginfo_hexdec) + PHP_FE(octdec, arginfo_octdec) + PHP_FE(decbin, arginfo_decbin) + PHP_FE(decoct, arginfo_decoct) + PHP_FE(dechex, arginfo_dechex) + PHP_FE(base_convert, arginfo_base_convert) + PHP_FE(number_format, arginfo_number_format) + PHP_FE(fmod, arginfo_fmod) +#ifdef HAVE_INET_NTOP + PHP_RAW_NAMED_FE(inet_ntop, php_inet_ntop, arginfo_inet_ntop) +#endif +#ifdef HAVE_INET_PTON + PHP_RAW_NAMED_FE(inet_pton, php_inet_pton, arginfo_inet_pton) +#endif + PHP_FE(ip2long, arginfo_ip2long) + PHP_FE(long2ip, arginfo_long2ip) + + PHP_FE(getenv, arginfo_getenv) +#ifdef HAVE_PUTENV + PHP_FE(putenv, arginfo_putenv) +#endif + +#ifdef HAVE_GETOPT + PHP_FE(getopt, arginfo_getopt) +#endif +#ifdef HAVE_GETLOADAVG + PHP_FE(sys_getloadavg, arginfo_sys_getloadavg) +#endif +#ifdef HAVE_GETTIMEOFDAY + PHP_FE(microtime, arginfo_microtime) + PHP_FE(gettimeofday, arginfo_gettimeofday) +#endif + +#ifdef HAVE_GETRUSAGE + PHP_FE(getrusage, arginfo_getrusage) +#endif + +#ifdef HAVE_GETTIMEOFDAY + PHP_FE(uniqid, arginfo_uniqid) +#endif + + PHP_FE(quoted_printable_decode, arginfo_quoted_printable_decode) + PHP_FE(convert_cyr_string, arginfo_convert_cyr_string) + PHP_FE(get_current_user, arginfo_get_current_user) + PHP_FE(set_time_limit, arginfo_set_time_limit) + PHP_FE(get_cfg_var, arginfo_get_cfg_var) + PHP_FALIAS(magic_quotes_runtime, set_magic_quotes_runtime, NULL) + PHP_FE(set_magic_quotes_runtime, NULL) + PHP_FE(get_magic_quotes_gpc, NULL) + PHP_FE(get_magic_quotes_runtime, NULL) + + PHP_FE(import_request_variables, arginfo_import_request_variables) + PHP_FE(error_log, arginfo_error_log) + PHP_FE(error_get_last, arginfo_error_get_last) + PHP_FE(call_user_func, arginfo_call_user_func) + PHP_FE(call_user_func_array, arginfo_call_user_func_array) + PHP_DEP_FE(call_user_method, arginfo_call_user_method) + PHP_DEP_FE(call_user_method_array, arginfo_call_user_method_array) + PHP_FE(serialize, arginfo_serialize) + PHP_FE(unserialize, arginfo_unserialize) + + PHP_FE(var_dump, arginfo_var_dump) + PHP_FE(var_export, arginfo_var_export) + PHP_FE(debug_zval_dump, arginfo_debug_zval_dump) + PHP_FE(print_r, arginfo_print_r) + PHP_FE(memory_get_usage, arginfo_memory_get_usage) + PHP_FE(memory_get_peak_usage, arginfo_memory_get_peak_usage) + + PHP_FE(register_shutdown_function, arginfo_register_shutdown_function) + PHP_FE(register_tick_function, arginfo_register_tick_function) + PHP_FE(unregister_tick_function, arginfo_unregister_tick_function) + + PHP_FE(highlight_file, arginfo_highlight_file) + PHP_FALIAS(show_source, highlight_file, arginfo_highlight_file) + PHP_FE(highlight_string, arginfo_highlight_string) + PHP_FE(php_strip_whitespace, arginfo_php_strip_whitespace) + + PHP_FE(ini_get, arginfo_ini_get) + PHP_FE(ini_get_all, arginfo_ini_get_all) + PHP_FE(ini_set, arginfo_ini_set) + PHP_FALIAS(ini_alter, ini_set, arginfo_ini_set) + PHP_FE(ini_restore, arginfo_ini_restore) + PHP_FE(get_include_path, arginfo_get_include_path) + PHP_FE(set_include_path, arginfo_set_include_path) + PHP_FE(restore_include_path, arginfo_restore_include_path) + + PHP_FE(setcookie, arginfo_setcookie) + PHP_FE(setrawcookie, arginfo_setrawcookie) + PHP_FE(header, arginfo_header) + PHP_FE(headers_sent, arginfo_headers_sent) + PHP_FE(headers_list, arginfo_headers_list) + + PHP_FE(connection_aborted, arginfo_connection_aborted) + PHP_FE(connection_status, arginfo_connection_status) + PHP_FE(ignore_user_abort, arginfo_ignore_user_abort) + PHP_FE(parse_ini_file, arginfo_parse_ini_file) + PHP_FE(is_uploaded_file, arginfo_is_uploaded_file) + PHP_FE(move_uploaded_file, arginfo_move_uploaded_file) + + /* functions from dns.c */ + PHP_FE(gethostbyaddr, arginfo_gethostbyaddr) + PHP_FE(gethostbyname, arginfo_gethostbyname) + PHP_FE(gethostbynamel, arginfo_gethostbynamel) + +#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE)) + PHP_FE(dns_check_record, arginfo_dns_check_record) + PHP_FALIAS(checkdnsrr, dns_check_record, arginfo_dns_check_record) +# if HAVE_DN_SKIPNAME && HAVE_DN_EXPAND + PHP_FE(dns_get_mx, arginfo_dns_get_mx) + PHP_FALIAS(getmxrr, dns_get_mx, arginfo_dns_get_mx) +# endif +# if HAVE_DNS_FUNCS + PHP_FE(dns_get_record, arginfo_dns_get_record) +# endif +#endif + + /* functions from type.c */ + PHP_FE(intval, arginfo_intval) + PHP_FE(floatval, arginfo_floatval) + PHP_FALIAS(doubleval, floatval, arginfo_floatval) + PHP_FE(strval, arginfo_strval) + PHP_FE(gettype, arginfo_gettype) + PHP_FE(settype, arginfo_settype) + PHP_FE(is_null, arginfo_is_null) + PHP_FE(is_resource, arginfo_is_resource) + PHP_FE(is_bool, arginfo_is_bool) + PHP_FE(is_long, arginfo_is_long) + PHP_FE(is_float, arginfo_is_float) + PHP_FALIAS(is_int, is_long, arginfo_is_long) + PHP_FALIAS(is_integer, is_long, arginfo_is_long) + PHP_FALIAS(is_double, is_float, arginfo_is_float) + PHP_FALIAS(is_real, is_float, arginfo_is_float) + PHP_FE(is_numeric, arginfo_is_numeric) + PHP_FE(is_string, arginfo_is_string) + PHP_FE(is_array, arginfo_is_array) + PHP_FE(is_object, arginfo_is_object) + PHP_FE(is_scalar, arginfo_is_scalar) + PHP_FE(is_callable, arginfo_is_callable) + + /* functions from reg.c */ + PHP_FE(ereg, arginfo_ereg) + PHP_FE(ereg_replace, arginfo_ereg_replace) + PHP_FE(eregi, arginfo_eregi) + PHP_FE(eregi_replace, arginfo_eregi_replace) + PHP_FE(split, arginfo_split) + PHP_FE(spliti, arginfo_spliti) + PHP_FALIAS(join, implode, arginfo_implode) + PHP_FE(sql_regcase, arginfo_sql_regcase) + + /* functions from dl.c */ + PHP_FE(dl, arginfo_dl) + + /* functions from file.c */ + PHP_FE(pclose, arginfo_pclose) + PHP_FE(popen, arginfo_popen) + PHP_FE(readfile, arginfo_readfile) + PHP_FE(rewind, arginfo_rewind) + PHP_FE(rmdir, arginfo_rmdir) + PHP_FE(umask, arginfo_umask) + PHP_FE(fclose, arginfo_fclose) + PHP_FE(feof, arginfo_feof) + PHP_FE(fgetc, arginfo_fgetc) + PHP_FE(fgets, arginfo_fgets) + PHP_FE(fgetss, arginfo_fgetss) + PHP_FE(fread, arginfo_fread) + PHP_NAMED_FE(fopen, php_if_fopen, arginfo_fopen) + PHP_FE(fpassthru, arginfo_fpassthru) + PHP_NAMED_FE(ftruncate, php_if_ftruncate, arginfo_ftruncate) + PHP_NAMED_FE(fstat, php_if_fstat, arginfo_fstat) + PHP_FE(fseek, arginfo_fseek) + PHP_FE(ftell, arginfo_ftell) + PHP_FE(fflush, arginfo_fflush) + PHP_FE(fwrite, arginfo_fwrite) + PHP_FALIAS(fputs, fwrite, arginfo_fwrite) + PHP_FE(mkdir, arginfo_mkdir) + PHP_FE(rename, arginfo_rename) + PHP_FE(copy, arginfo_copy) + PHP_FE(tempnam, arginfo_tempnam) + PHP_NAMED_FE(tmpfile, php_if_tmpfile, arginfo_tmpfile) + PHP_FE(file, arginfo_file) + PHP_FE(file_get_contents, arginfo_file_get_contents) + PHP_FE(file_put_contents, arginfo_file_put_contents) + PHP_FE(stream_select, arginfo_stream_select) + PHP_FE(stream_context_create, arginfo_stream_context_create) + PHP_FE(stream_context_set_params, arginfo_stream_context_set_params) + PHP_FE(stream_context_set_option, arginfo_stream_context_set_option) + PHP_FE(stream_context_get_options, arginfo_stream_context_get_options) + PHP_FE(stream_context_get_default, arginfo_stream_context_get_default) + PHP_FE(stream_filter_prepend, arginfo_stream_filter_prepend) + PHP_FE(stream_filter_append, arginfo_stream_filter_append) + PHP_FE(stream_filter_remove, arginfo_stream_filter_remove) + PHP_FE(stream_socket_client, arginfo_stream_socket_client) + PHP_FE(stream_socket_server, arginfo_stream_socket_server) + PHP_FE(stream_socket_accept, arginfo_stream_socket_accept) + PHP_FE(stream_socket_get_name, arginfo_stream_socket_get_name) + PHP_FE(stream_socket_recvfrom, arginfo_stream_socket_recvfrom) + PHP_FE(stream_socket_sendto, arginfo_stream_socket_sendto) + PHP_FE(stream_socket_enable_crypto, arginfo_stream_socket_enable_crypto) +#ifdef HAVE_SHUTDOWN + PHP_FE(stream_socket_shutdown, arginfo_stream_socket_shutdown) +#endif +#if HAVE_SOCKETPAIR + PHP_FE(stream_socket_pair, arginfo_stream_socket_pair) +#endif + PHP_FE(stream_copy_to_stream, arginfo_stream_copy_to_stream) + PHP_FE(stream_get_contents, arginfo_stream_get_contents) + PHP_FE(fgetcsv, arginfo_fgetcsv) + PHP_FE(fputcsv, arginfo_fputcsv) + PHP_FE(flock, arginfo_flock) + PHP_FE(get_meta_tags, arginfo_get_meta_tags) + PHP_FE(stream_set_write_buffer, arginfo_stream_set_write_buffer) + PHP_FALIAS(set_file_buffer, stream_set_write_buffer, arginfo_stream_set_write_buffer) + + PHP_DEP_FALIAS(set_socket_blocking, stream_set_blocking, arginfo_stream_set_blocking) + PHP_FE(stream_set_blocking, arginfo_stream_set_blocking) + PHP_FALIAS(socket_set_blocking, stream_set_blocking, arginfo_stream_set_blocking) + + PHP_FE(stream_get_meta_data, arginfo_stream_get_meta_data) + PHP_FE(stream_get_line, arginfo_stream_get_line) + PHP_FE(stream_wrapper_register, arginfo_stream_wrapper_register) + PHP_FALIAS(stream_register_wrapper, stream_wrapper_register, arginfo_stream_wrapper_register) + PHP_FE(stream_wrapper_unregister, arginfo_stream_wrapper_unregister) + PHP_FE(stream_wrapper_restore, arginfo_stream_wrapper_restore) + PHP_FE(stream_get_wrappers, arginfo_stream_get_wrappers) + PHP_FE(stream_get_transports, arginfo_stream_get_transports) + PHP_FE(stream_is_local, arginfo_stream_is_local) + PHP_FE(get_headers, arginfo_get_headers) + +#if HAVE_SYS_TIME_H || defined(PHP_WIN32) + PHP_FE(stream_set_timeout, arginfo_stream_set_timeout) + PHP_FALIAS(socket_set_timeout, stream_set_timeout, arginfo_stream_set_timeout) +#endif + + PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_stream_get_meta_data) + +#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS) + PHP_FE(realpath, arginfo_realpath) +#endif + +#ifdef HAVE_FNMATCH + PHP_FE(fnmatch, arginfo_fnmatch) +#endif + + /* functions from fsock.c */ + PHP_FE(fsockopen, arginfo_fsockopen) + PHP_FE(pfsockopen, arginfo_pfsockopen) + + /* functions from pack.c */ + PHP_FE(pack, arginfo_pack) + PHP_FE(unpack, arginfo_unpack) + + /* functions from browscap.c */ + PHP_FE(get_browser, arginfo_get_browser) + +#if HAVE_CRYPT + /* functions from crypt.c */ + PHP_FE(crypt, arginfo_crypt) +#endif + + /* functions from dir.c */ + PHP_FE(opendir, arginfo_opendir) + PHP_FE(closedir, arginfo_closedir) + PHP_FE(chdir, arginfo_chdir) + +#if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC + PHP_FE(chroot, arginfo_chroot) +#endif + + PHP_FE(getcwd, arginfo_getcwd) + PHP_FE(rewinddir, arginfo_rewinddir) + PHP_NAMED_FE(readdir, php_if_readdir, arginfo_readdir) + PHP_FALIAS(dir, getdir, arginfo_dir) + PHP_FE(scandir, arginfo_scandir) +#ifdef HAVE_GLOB + PHP_FE(glob, arginfo_glob) +#endif + /* functions from filestat.c */ + PHP_FE(fileatime, arginfo_fileatime) + PHP_FE(filectime, arginfo_filectime) + PHP_FE(filegroup, arginfo_filegroup) + PHP_FE(fileinode, arginfo_fileinode) + PHP_FE(filemtime, arginfo_filemtime) + PHP_FE(fileowner, arginfo_fileowner) + PHP_FE(fileperms, arginfo_fileperms) + PHP_FE(filesize, arginfo_filesize) + PHP_FE(filetype, arginfo_filetype) + PHP_FE(file_exists, arginfo_file_exists) + PHP_FE(is_writable, arginfo_is_writable) + PHP_FALIAS(is_writeable, is_writable, arginfo_is_writable) + PHP_FE(is_readable, arginfo_is_readable) + PHP_FE(is_executable, arginfo_is_executable) + PHP_FE(is_file, arginfo_is_file) + PHP_FE(is_dir, arginfo_is_dir) + PHP_FE(is_link, arginfo_is_link) + PHP_NAMED_FE(stat, php_if_stat, arginfo_stat) + PHP_NAMED_FE(lstat, php_if_lstat, arginfo_lstat) +#ifndef NETWARE + PHP_FE(chown, arginfo_chown) + PHP_FE(chgrp, arginfo_chgrp) +#endif +#if HAVE_LCHOWN + PHP_FE(lchown, arginfo_lchown) + PHP_FE(lchgrp, arginfo_lchgrp) +#endif + PHP_FE(chmod, arginfo_chmod) +#if HAVE_UTIME + PHP_FE(touch, arginfo_touch) +#endif + PHP_FE(clearstatcache, arginfo_clearstatcache) + PHP_FE(disk_total_space, arginfo_disk_total_space) + PHP_FE(disk_free_space, arginfo_disk_free_space) + PHP_FALIAS(diskfreespace, disk_free_space, arginfo_disk_free_space) + + /* functions from mail.c */ + PHP_FE(mail, arginfo_mail) + PHP_FE(ezmlm_hash, arginfo_ezmlm_hash) + + /* functions from syslog.c */ +#ifdef HAVE_SYSLOG_H + PHP_FE(openlog, arginfo_openlog) + PHP_FE(syslog, arginfo_syslog) + PHP_FE(closelog, arginfo_closelog) + PHP_FE(define_syslog_variables, arginfo_define_syslog_variables) +#endif + + /* functions from lcg.c */ + PHP_FE(lcg_value, arginfo_lcg_value) + + /* functions from metaphone.c */ + PHP_FE(metaphone, arginfo_metaphone) + + /* functions from output.c */ + PHP_FE(ob_start, arginfo_ob_start) + PHP_FE(ob_flush, arginfo_ob_flush) + PHP_FE(ob_clean, arginfo_ob_clean) + PHP_FE(ob_end_flush, arginfo_ob_end_flush) + PHP_FE(ob_end_clean, arginfo_ob_end_clean) + PHP_FE(ob_get_flush, arginfo_ob_get_flush) + PHP_FE(ob_get_clean, arginfo_ob_get_clean) + PHP_FE(ob_get_length, arginfo_ob_get_length) + PHP_FE(ob_get_level, arginfo_ob_get_level) + PHP_FE(ob_get_status, arginfo_ob_get_status) + PHP_FE(ob_get_contents, arginfo_ob_get_contents) + PHP_FE(ob_implicit_flush, arginfo_ob_implicit_flush) + PHP_FE(ob_list_handlers, arginfo_ob_list_handlers) + + /* functions from array.c */ + PHP_FE(ksort, arginfo_ksort) + PHP_FE(krsort, arginfo_krsort) + PHP_FE(natsort, arginfo_natsort) + PHP_FE(natcasesort, arginfo_natcasesort) + PHP_FE(asort, arginfo_asort) + PHP_FE(arsort, arginfo_arsort) + PHP_FE(sort, arginfo_sort) + PHP_FE(rsort, arginfo_rsort) + PHP_FE(usort, arginfo_usort) + PHP_FE(uasort, arginfo_uasort) + PHP_FE(uksort, arginfo_uksort) + PHP_FE(shuffle, arginfo_shuffle) + PHP_FE(array_walk, arginfo_array_walk) + PHP_FE(array_walk_recursive, arginfo_array_walk_recursive) + PHP_FE(count, arginfo_count) + PHP_FE(end, arginfo_end) + PHP_FE(prev, arginfo_prev) + PHP_FE(next, arginfo_next) + PHP_FE(reset, arginfo_reset) + PHP_FE(current, arginfo_current) + PHP_FE(key, arginfo_key) + PHP_FE(min, arginfo_min) + PHP_FE(max, arginfo_max) + PHP_FE(in_array, arginfo_in_array) + PHP_FE(array_search, arginfo_array_search) + PHP_FE(extract, arginfo_extract) + PHP_FE(compact, arginfo_compact) + PHP_FE(array_fill, arginfo_array_fill) + PHP_FE(array_fill_keys, arginfo_array_fill_keys) + PHP_FE(range, arginfo_range) + PHP_FE(array_multisort, arginfo_array_multisort) + PHP_FE(array_push, arginfo_array_push) + PHP_FE(array_pop, arginfo_array_pop) + PHP_FE(array_shift, arginfo_array_shift) + PHP_FE(array_unshift, arginfo_array_unshift) + PHP_FE(array_splice, arginfo_array_splice) + PHP_FE(array_slice, arginfo_array_slice) + PHP_FE(array_merge, arginfo_array_merge) + PHP_FE(array_merge_recursive, arginfo_array_merge_recursive) + PHP_FE(array_keys, arginfo_array_keys) + PHP_FE(array_values, arginfo_array_values) + PHP_FE(array_count_values, arginfo_array_count_values) + PHP_FE(array_reverse, arginfo_array_reverse) + PHP_FE(array_reduce, arginfo_array_reduce) + PHP_FE(array_pad, arginfo_array_pad) + PHP_FE(array_flip, arginfo_array_flip) + PHP_FE(array_change_key_case, arginfo_array_change_key_case) + PHP_FE(array_rand, arginfo_array_rand) + PHP_FE(array_unique, arginfo_array_unique) + PHP_FE(array_intersect, arginfo_array_intersect) + PHP_FE(array_intersect_key, arginfo_array_intersect_key) + PHP_FE(array_intersect_ukey, arginfo_array_intersect_ukey) + PHP_FE(array_uintersect, arginfo_array_uintersect) + PHP_FE(array_intersect_assoc, arginfo_array_intersect_assoc) + PHP_FE(array_uintersect_assoc, arginfo_array_uintersect_assoc) + PHP_FE(array_intersect_uassoc, arginfo_array_intersect_uassoc) + PHP_FE(array_uintersect_uassoc, arginfo_array_uintersect_uassoc) + PHP_FE(array_diff, arginfo_array_diff) + PHP_FE(array_diff_key, arginfo_array_diff_key) + PHP_FE(array_diff_ukey, arginfo_array_diff_ukey) + PHP_FE(array_udiff, arginfo_array_udiff) + PHP_FE(array_diff_assoc, arginfo_array_diff_assoc) + PHP_FE(array_udiff_assoc, arginfo_array_udiff_assoc) + PHP_FE(array_diff_uassoc, arginfo_array_diff_uassoc) + PHP_FE(array_udiff_uassoc, arginfo_array_udiff_uassoc) + PHP_FE(array_sum, arginfo_array_sum) + PHP_FE(array_product, arginfo_array_product) + PHP_FE(array_filter, arginfo_array_filter) + PHP_FE(array_map, arginfo_array_map) + PHP_FE(array_chunk, arginfo_array_chunk) + PHP_FE(array_combine, arginfo_array_combine) + PHP_FE(array_key_exists, arginfo_array_key_exists) + + /* aliases from array.c */ + PHP_FALIAS(pos, current, arginfo_current) + PHP_FALIAS(sizeof, count, arginfo_count) + PHP_FALIAS(key_exists, array_key_exists, arginfo_array_key_exists) + + /* functions from assert.c */ + PHP_FE(assert, arginfo_assert) + PHP_FE(assert_options, arginfo_assert_options) + + /* functions from versioning.c */ + PHP_FE(version_compare, arginfo_version_compare) + + /* functions from ftok.c*/ +#if HAVE_FTOK + PHP_FE(ftok, arginfo_ftok) +#endif + + PHP_FE(str_rot13, arginfo_str_rot13) + PHP_FE(stream_get_filters, arginfo_stream_get_filters) + PHP_FE(stream_filter_register, arginfo_stream_filter_register) + PHP_FE(stream_bucket_make_writeable, arginfo_stream_bucket_make_writeable) + PHP_FE(stream_bucket_prepend, arginfo_stream_bucket_prepend) + PHP_FE(stream_bucket_append, arginfo_stream_bucket_append) + PHP_FE(stream_bucket_new, arginfo_stream_bucket_new) + + PHP_FE(output_add_rewrite_var, arginfo_output_add_rewrite_var) + PHP_FE(output_reset_rewrite_vars, arginfo_output_reset_rewrite_vars) + + PHP_FE(sys_get_temp_dir, arginfo_sys_get_temp_dir) + {NULL, NULL, NULL} +}; + + +static PHP_INI_MH(OnUpdateSafeModeProtectedEnvVars) +{ + char *protected_vars, *protected_var; + char *token_buf; + int dummy = 1; + + protected_vars = estrndup(new_value, new_value_length); + zend_hash_clean(&BG(sm_protected_env_vars)); + + protected_var = php_strtok_r(protected_vars, ", ", &token_buf); + while (protected_var) { + zend_hash_update(&BG(sm_protected_env_vars), protected_var, strlen(protected_var), &dummy, sizeof(int), NULL); + protected_var = php_strtok_r(NULL, ", ", &token_buf); + } + efree(protected_vars); + return SUCCESS; +} + + +static PHP_INI_MH(OnUpdateSafeModeAllowedEnvVars) +{ + if (BG(sm_allowed_env_vars)) { + free(BG(sm_allowed_env_vars)); + } + BG(sm_allowed_env_vars) = zend_strndup(new_value, new_value_length); + return SUCCESS; +} + + +PHP_INI_BEGIN() + PHP_INI_ENTRY_EX("safe_mode_protected_env_vars", SAFE_MODE_PROTECTED_ENV_VARS, PHP_INI_SYSTEM, OnUpdateSafeModeProtectedEnvVars, NULL) + PHP_INI_ENTRY_EX("safe_mode_allowed_env_vars", SAFE_MODE_ALLOWED_ENV_VARS, PHP_INI_SYSTEM, OnUpdateSafeModeAllowedEnvVars, NULL) +PHP_INI_END() + +static zend_module_dep standard_deps[] = { + ZEND_MOD_OPTIONAL("session") + {NULL, NULL, NULL} +}; + +zend_module_entry basic_functions_module = { + STANDARD_MODULE_HEADER_EX, + NULL, + standard_deps, + "standard", /* extension name */ + basic_functions, /* function list */ + PHP_MINIT(basic), /* process startup */ + PHP_MSHUTDOWN(basic), /* process shutdown */ + PHP_RINIT(basic), /* request startup */ + PHP_RSHUTDOWN(basic), /* request shutdown */ + PHP_MINFO(basic), /* extension info */ + PHP_VERSION, /* extension version */ + STANDARD_MODULE_PROPERTIES +}; + + +#if defined(HAVE_PUTENV) +static void php_putenv_destructor(putenv_entry *pe) +{ + if (pe->previous_value) { +#if _MSC_VER >= 1300 + /* VS.Net has a bug in putenv() when setting a variable that + * is already set; if the SetEnvironmentVariable() API call + * fails, the Crt will double free() a string. + * We try to avoid this by setting our own value first */ + SetEnvironmentVariable(pe->key, "bugbug"); +#endif + putenv(pe->previous_value); +# if defined(PHP_WIN32) + efree(pe->previous_value); +# endif + } else { +# if HAVE_UNSETENV + unsetenv(pe->key); +# elif defined(PHP_WIN32) + char *del_string = emalloc(pe->key_len+2); + snprintf(del_string, pe->key_len+2, "%s=", pe->key); + putenv(del_string); + efree(del_string); + SetEnvironmentVariable(pe->key, NULL); +# else + char **env; + + for (env = environ; env != NULL && *env != NULL; env++) { + if (!strncmp(*env, pe->key, pe->key_len) && (*env)[pe->key_len] == '=') { /* found it */ + *env = ""; + break; + } + } +# endif + } +#ifdef HAVE_TZSET + /* don't forget to reset the various libc globals that + * we might have changed by an earlier call to tzset(). */ + if (!strncmp(pe->key, "TZ", pe->key_len)) { + tzset(); + } +#endif + + efree(pe->putenv_string); + efree(pe->key); +} +#endif + + +static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) +{ + BG(rand_is_seeded) = 0; + BG(mt_rand_is_seeded) = 0; + BG(umask) = -1; + + BG(next) = NULL; + BG(left) = -1; + BG(user_tick_functions) = NULL; + BG(user_filter_map) = NULL; + BG(user_compare_fci_cache) = empty_fcall_info_cache; + zend_hash_init(&BG(sm_protected_env_vars), 5, NULL, NULL, 1); + BG(sm_allowed_env_vars) = NULL; + + memset(&BG(url_adapt_state), 0, sizeof(BG(url_adapt_state))); + memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex))); + +#if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T) + memset(&BG(mblen_state), 0, sizeof(BG(mblen_state))); +#endif + BG(incomplete_class) = incomplete_class_entry; +} + + +static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC) +{ + zend_hash_destroy(&BG(sm_protected_env_vars)); + if (BG(sm_allowed_env_vars)) { + free(BG(sm_allowed_env_vars)); + } + if (BG(url_adapt_state_ex).tags) { + zend_hash_destroy(BG(url_adapt_state_ex).tags); + free(BG(url_adapt_state_ex).tags); + } +} + + +#define PHP_DOUBLE_INFINITY_HIGH 0x7ff00000 +#define PHP_DOUBLE_QUIET_NAN_HIGH 0xfff80000 + +PHPAPI double php_get_nan(void) +{ +#if HAVE_HUGE_VAL_NAN + return HUGE_VAL + -HUGE_VAL; +#elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha) + double val = 0.0; + ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH; + ((php_uint32*)&val)[0] = 0; + return val; +#elif HAVE_ATOF_ACCEPTS_NAN + return atof("NAN"); +#else + return 0.0/0.0; +#endif +} + +PHPAPI double php_get_inf(void) +{ +#if HAVE_HUGE_VAL_INF + return HUGE_VAL; +#elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha) + double val = 0.0; + ((php_uint32*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH; + ((php_uint32*)&val)[0] = 0; + return val; +#elif HAVE_ATOF_ACCEPTS_INF + return atof("INF"); +#else + return 1.0/0.0; +#endif +} + +PHP_MINIT_FUNCTION(basic) +{ +#ifdef ZTS + ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor); +#ifdef PHP_WIN32 + ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor)php_win32_core_globals_ctor, (ts_allocate_dtor)php_win32_core_globals_dtor ); +#endif +#else + basic_globals_ctor(&basic_globals TSRMLS_CC); +#ifdef PHP_WIN32 + php_win32_core_globals_ctor(&the_php_win32_core_globals TSRMLS_CC); +#endif +#endif + + BG(incomplete_class) = incomplete_class_entry = php_create_incomplete_class(TSRMLS_C); + + REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CONNECTION_NORMAL", PHP_CONNECTION_NORMAL, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CONNECTION_TIMEOUT", PHP_CONNECTION_TIMEOUT, CONST_CS | CONST_PERSISTENT); + + REGISTER_LONG_CONSTANT("INI_USER", ZEND_INI_USER, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("INI_PERDIR", ZEND_INI_PERDIR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("INI_SYSTEM", ZEND_INI_SYSTEM, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("INI_ALL", ZEND_INI_ALL, CONST_CS | CONST_PERSISTENT); + + REGISTER_LONG_CONSTANT("PHP_URL_SCHEME", PHP_URL_SCHEME, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_HOST", PHP_URL_HOST, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_PORT", PHP_URL_PORT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_USER", PHP_URL_USER, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_PASS", PHP_URL_PASS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_PATH", PHP_URL_PATH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_QUERY", PHP_URL_QUERY, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_FRAGMENT", PHP_URL_FRAGMENT, CONST_CS | CONST_PERSISTENT); + +#define REGISTER_MATH_CONSTANT(x) REGISTER_DOUBLE_CONSTANT(#x, x, CONST_CS | CONST_PERSISTENT) + REGISTER_MATH_CONSTANT(M_E); + REGISTER_MATH_CONSTANT(M_LOG2E); + REGISTER_MATH_CONSTANT(M_LOG10E); + REGISTER_MATH_CONSTANT(M_LN2); + REGISTER_MATH_CONSTANT(M_LN10); + REGISTER_MATH_CONSTANT(M_PI); + REGISTER_MATH_CONSTANT(M_PI_2); + REGISTER_MATH_CONSTANT(M_PI_4); + REGISTER_MATH_CONSTANT(M_1_PI); + REGISTER_MATH_CONSTANT(M_2_PI); + REGISTER_MATH_CONSTANT(M_SQRTPI); + REGISTER_MATH_CONSTANT(M_2_SQRTPI); + REGISTER_MATH_CONSTANT(M_LNPI); + REGISTER_MATH_CONSTANT(M_EULER); + REGISTER_MATH_CONSTANT(M_SQRT2); + REGISTER_MATH_CONSTANT(M_SQRT1_2); + REGISTER_MATH_CONSTANT(M_SQRT3); + REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | CONST_PERSISTENT); + REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | CONST_PERSISTENT); + +#if ENABLE_TEST_CLASS + test_class_startup(); +#endif + + REGISTER_INI_ENTRIES(); + + register_phpinfo_constants(INIT_FUNC_ARGS_PASSTHRU); + register_html_constants(INIT_FUNC_ARGS_PASSTHRU); + register_string_constants(INIT_FUNC_ARGS_PASSTHRU); + + PHP_MINIT(regex)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(file)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(pack)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(browscap)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(standard_filters)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(user_filters)(INIT_FUNC_ARGS_PASSTHRU); + +#if defined(HAVE_LOCALECONV) && defined(ZTS) + PHP_MINIT(localeconv)(INIT_FUNC_ARGS_PASSTHRU); +#endif + +#if defined(HAVE_NL_LANGINFO) + PHP_MINIT(nl_langinfo)(INIT_FUNC_ARGS_PASSTHRU); +#endif + +#if HAVE_CRYPT + PHP_MINIT(crypt)(INIT_FUNC_ARGS_PASSTHRU); +#endif + + PHP_MINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU); + + PHP_MINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); +#ifdef HAVE_SYSLOG_H + PHP_MINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); +#endif + PHP_MINIT(array)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(assert)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); +#ifdef PHP_CAN_SUPPORT_PROC_OPEN + PHP_MINIT(proc_open)(INIT_FUNC_ARGS_PASSTHRU); +#endif + + PHP_MINIT(user_streams)(INIT_FUNC_ARGS_PASSTHRU); + PHP_MINIT(imagetypes)(INIT_FUNC_ARGS_PASSTHRU); + + php_register_url_stream_wrapper("php", &php_stream_php_wrapper TSRMLS_CC); + php_register_url_stream_wrapper("file", &php_plain_files_wrapper TSRMLS_CC); + php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC); +#ifndef PHP_CURL_URL_WRAPPERS + php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC); + php_register_url_stream_wrapper("ftp", &php_stream_ftp_wrapper TSRMLS_CC); +#endif + +#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) +# if HAVE_DNS_FUNCS + PHP_MINIT(dns)(INIT_FUNC_ARGS_PASSTHRU); +# endif +#endif + + return SUCCESS; +} + + +PHP_MSHUTDOWN_FUNCTION(basic) +{ +#ifdef HAVE_SYSLOG_H + PHP_MSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#endif +#ifdef ZTS + ts_free_id(basic_globals_id); +#ifdef PHP_WIN32 + ts_free_id(php_win32_core_globals_id); +#endif +#else + basic_globals_dtor(&basic_globals TSRMLS_CC); +#ifdef PHP_WIN32 + php_win32_core_globals_dtor(&the_php_win32_core_globals TSRMLS_CC); +#endif +#endif + + php_unregister_url_stream_wrapper("php" TSRMLS_CC); +#ifndef PHP_CURL_URL_WRAPPERS + php_unregister_url_stream_wrapper("http" TSRMLS_CC); + php_unregister_url_stream_wrapper("ftp" TSRMLS_CC); +#endif + + UNREGISTER_INI_ENTRIES(); + + PHP_MSHUTDOWN(regex)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_MSHUTDOWN(browscap)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_MSHUTDOWN(array)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_MSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_MSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_MSHUTDOWN(file)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_MSHUTDOWN(standard_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#if defined(HAVE_LOCALECONV) && defined(ZTS) + PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#endif + + return SUCCESS; +} + + +PHP_RINIT_FUNCTION(basic) +{ + memset(BG(strtok_table), 0, 256); + BG(strtok_string) = NULL; + BG(strtok_zval) = NULL; + BG(locale_string) = NULL; + BG(user_compare_func_name) = NULL; + BG(array_walk_func_name) = NULL; + BG(page_uid) = -1; + BG(page_gid) = -1; + BG(page_inode) = -1; + BG(page_mtime) = -1; +#ifdef HAVE_PUTENV + if (zend_hash_init(&BG(putenv_ht), 1, NULL, (void (*)(void *)) php_putenv_destructor, 0) == FAILURE) { + return FAILURE; + } +#endif + BG(user_shutdown_function_names) = NULL; + + PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU); +#ifdef HAVE_SYSLOG_H + PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); +#endif + PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); + PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); + + /* Reset magic_quotes_runtime */ + PG(magic_quotes_runtime) = INI_BOOL("magic_quotes_runtime"); + + /* Setup default context */ + FG(default_context) = NULL; + + /* Default to global wrappers only */ + FG(stream_wrappers) = NULL; + + /* Default to global filters only */ + FG(stream_filters) = NULL; + + return SUCCESS; +} + + +PHP_RSHUTDOWN_FUNCTION(basic) +{ + if (BG(strtok_zval)) { + zval_ptr_dtor(&BG(strtok_zval)); + } + BG(strtok_string) = NULL; + BG(strtok_zval) = NULL; +#ifdef HAVE_PUTENV + zend_hash_destroy(&BG(putenv_ht)); +#endif + + if (BG(umask) != -1) { + umask(BG(umask)); + } + + /* Check if locale was changed and change it back + to the value in startup environment */ + if (BG(locale_string) != NULL) { + setlocale(LC_ALL, "C"); + setlocale(LC_CTYPE, ""); + zend_update_current_locale(); + } + STR_FREE(BG(locale_string)); + BG(locale_string) = NULL; + + /* + FG(stream_wrappers) and FG(stream_filters) are destroyed + during php_request_shutdown() + */ + + PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#ifdef PHP_WIN32 +#ifdef HAVE_SYSLOG_H + PHP_RSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#endif +#endif + PHP_RSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_RSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_RSHUTDOWN(streams)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#ifdef PHP_WIN32 + PHP_RSHUTDOWN(win32_core_globals)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#endif + + if (BG(user_tick_functions)) { + zend_llist_destroy(BG(user_tick_functions)); + efree(BG(user_tick_functions)); + BG(user_tick_functions) = NULL; + } + + PHP_RSHUTDOWN(user_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + + return SUCCESS; +} + + +PHP_MINFO_FUNCTION(basic) +{ + php_info_print_table_start(); + PHP_MINFO(regex)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); + PHP_MINFO(dl)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); + PHP_MINFO(mail)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); + php_info_print_table_end(); + PHP_MINFO(assert)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); +} + + +/* {{{ proto mixed constant(string const_name) + Given the name of a constant this function will return the constants associated value */ +PHP_FUNCTION(constant) +{ + zval **const_name; + + if (ZEND_NUM_ARGS() != 1 || + zend_get_parameters_ex(1, &const_name) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(const_name); + + if (!zend_get_constant(Z_STRVAL_PP(const_name), Z_STRLEN_PP(const_name), return_value TSRMLS_CC)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %s", Z_STRVAL_PP(const_name)); + RETURN_NULL(); + } +} +/* }}} */ + +#ifdef HAVE_INET_NTOP +/* {{{ proto string inet_ntop(string in_addr) + Converts a packed inet address to a human readable IP address string */ +PHP_NAMED_FUNCTION(php_inet_ntop) +{ + char *address; + int address_len, af = AF_INET; + char buffer[40]; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) { + RETURN_FALSE; + } + +#ifdef HAVE_IPV6 + if (address_len == 16) { + af = AF_INET6; + } else +#endif + if (address_len != 4) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid in_addr value"); + RETURN_FALSE; + } + + if (!inet_ntop(af, address, buffer, sizeof(buffer))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "An unknown error occured"); + RETURN_FALSE; + } + + RETURN_STRING(buffer, 1); +} +/* }}} */ +#endif /* HAVE_INET_NTOP */ + +#ifdef HAVE_INET_PTON +/* {{{ proto string inet_pton(string ip_address) + Converts a human readable IP address to a packed binary string */ +PHP_NAMED_FUNCTION(php_inet_pton) +{ + int ret, af = AF_INET; + char *address; + int address_len; + char buffer[17]; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) { + RETURN_FALSE; + } + + memset(buffer, 0, sizeof(buffer)); + +#ifdef HAVE_IPV6 + if (strchr(address, ':')) { + af = AF_INET6; + } else +#endif + if (!strchr(address, '.')) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address); + RETURN_FALSE; + } + + ret = inet_pton(af, address, buffer); + + if (ret <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address); + RETURN_FALSE; + } + + RETURN_STRINGL(buffer, af == AF_INET ? 4 : 16, 1); +} +/* }}} */ +#endif /* HAVE_INET_PTON */ + + + +/* {{{ proto int ip2long(string ip_address) + Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address */ +PHP_FUNCTION(ip2long) +{ + zval **str; + unsigned long int ip; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(str); + + if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) == INADDR_NONE) { + /* the only special case when we should return -1 ourselves, + * because inet_addr() considers it wrong. We return 0xFFFFFFFF and + * not -1 or ~0 because of 32/64bit issues. + */ + if (Z_STRLEN_PP(str) == sizeof("255.255.255.255") - 1 && + !memcmp(Z_STRVAL_PP(str), "255.255.255.255", sizeof("255.255.255.255") - 1)) { + RETURN_LONG(0xFFFFFFFF); + } + + RETURN_FALSE; + } + + RETURN_LONG(ntohl(ip)); +} +/* }}} */ + +/* {{{ proto string long2ip(int proper_address) + Converts an (IPv4) Internet network address into a string in Internet standard dotted format */ +PHP_FUNCTION(long2ip) +{ + zval **num; + unsigned long n; + struct in_addr myaddr; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(num); + + n = strtoul(Z_STRVAL_PP(num), NULL, 0); + + myaddr.s_addr = htonl(n); + RETURN_STRING(inet_ntoa(myaddr), 1); +} +/* }}} */ + + +/******************** + * System Functions * + ********************/ + +/* {{{ proto string getenv(string varname) + Get the value of an environment variable */ +PHP_FUNCTION(getenv) +{ + char *ptr, *str; + int str_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) { + RETURN_FALSE; + } + ptr = sapi_getenv(str, str_len TSRMLS_CC); + if(ptr) RETURN_STRING(ptr, 0); + ptr = getenv(str); + if(ptr) RETURN_STRING(ptr, 1); + RETURN_FALSE; +} +/* }}} */ + +#ifdef HAVE_PUTENV +/* {{{ proto bool putenv(string setting) + Set the value of an environment variable */ +PHP_FUNCTION(putenv) +{ + zval **str; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(str); + + if (Z_STRVAL_PP(str) && *(Z_STRVAL_PP(str))) { + char *p, **env; + putenv_entry pe; + + pe.putenv_string = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str)); + pe.key = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str)); + if ((p = strchr(pe.key, '='))) { /* nullify the '=' if there is one */ + *p = '\0'; + } + pe.key_len = strlen(pe.key); + + if (PG(safe_mode)) { + /* Check the protected list */ + if (zend_hash_exists(&BG(sm_protected_env_vars), pe.key, pe.key_len)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Safe Mode warning: Cannot override protected environment variable '%s'", pe.key); + efree(pe.putenv_string); + efree(pe.key); + RETURN_FALSE; + } + + /* Check the allowed list */ + if (BG(sm_allowed_env_vars) && *BG(sm_allowed_env_vars)) { + char *allowed_env_vars = estrdup(BG(sm_allowed_env_vars)); + char *strtok_buf = NULL; + char *allowed_prefix = php_strtok_r(allowed_env_vars, ", ", &strtok_buf); + zend_bool allowed = 0; + + while (allowed_prefix) { + if (!strncmp(allowed_prefix, pe.key, strlen(allowed_prefix))) { + allowed = 1; + break; + } + allowed_prefix = php_strtok_r(NULL, ", ", &strtok_buf); + } + efree(allowed_env_vars); + if (!allowed) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Safe Mode warning: Cannot set environment variable '%s' - it's not in the allowed list", pe.key); + efree(pe.putenv_string); + efree(pe.key); + RETURN_FALSE; + } + } + } + + zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1); + + /* find previous value */ + pe.previous_value = NULL; + for (env = environ; env != NULL && *env != NULL; env++) { + if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */ +#if defined(PHP_WIN32) + /* must copy previous value because MSVCRT's putenv can free the string without notice */ + pe.previous_value = estrdup(*env); +#else + pe.previous_value = *env; +#endif + break; + } + } + +#if _MSC_VER >= 1300 + /* VS.Net has a bug in putenv() when setting a variable that + * is already set; if the SetEnvironmentVariable() API call + * fails, the Crt will double free() a string. + * We try to avoid this by setting our own value first */ + SetEnvironmentVariable(pe.key, "bugbug"); +#endif + +#if HAVE_UNSETENV + if (!p) { /* no '=' means we want to unset it */ + unsetenv(pe.putenv_string); + } + if (!p || putenv(pe.putenv_string) == 0) { /* success */ +#else + if (putenv(pe.putenv_string) == 0) { /* success */ +#endif + zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len+1, (void **) &pe, sizeof(putenv_entry), NULL); +#ifdef HAVE_TZSET + if (!strncmp(pe.key, "TZ", pe.key_len)) { + tzset(); + } +#endif + RETURN_TRUE; + } else { + efree(pe.putenv_string); + efree(pe.key); + RETURN_FALSE; + } + } + + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax"); + RETURN_FALSE; +} +/* }}} */ +#endif + +#ifdef HAVE_GETOPT +/* {{{ free_argv + Free the memory allocated to an argv array. */ +static void free_argv(char **argv, int argc) +{ + int i; + + if (argv) { + for (i = 0; i < argc; i++) { + if (argv[i]) { + efree(argv[i]); + } + } + efree(argv); + } +} +/* }}} */ + +#ifdef HARTMUT_0 +/* {{{ free_longopts + Free the memory allocated to an longopt array. */ +static void free_longopts(struct option *longopts) +{ + struct option *p; + + if(longopts) { + for(p=longopts; p->name; p++) { + efree((char *)(p->name)); + } + + efree(longopts); + } +} +/* }}} */ +#endif + +/* {{{ proto array getopt(string options [, array longopts]) + Get options from the command line argument list */ +PHP_FUNCTION(getopt) +{ + char *options = NULL, **argv = NULL; + char opt[2] = { '\0' }; + char *optname; + int argc = 0, options_len = 0, o; + zval *val, **args = NULL, *p_longopts = NULL; + int optname_len = 0; +#ifdef HARTMUT_0 + struct option *longopts = NULL; + int longindex = 0; +#endif + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", + &options, &options_len, &p_longopts) == FAILURE) { + RETURN_FALSE; + } + + /* + * Get argv from the global symbol table. We calculate argc ourselves + * in order to be on the safe side, even though it is also available + * from the symbol table. + */ + if (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || + zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) { + int pos = 0; + zval **arg; + + argc = zend_hash_num_elements(Z_ARRVAL_PP(args)); + + /* + * Attempt to allocate enough memory to hold all of the arguments + * and a trailing NULL + */ + argv = (char **) safe_emalloc(sizeof(char *), (argc + 1), 0); + + /* Reset the array indexes. */ + zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args)); + + /* Iterate over the hash to construct the argv array. */ + while (zend_hash_get_current_data(Z_ARRVAL_PP(args), + (void **)&arg) == SUCCESS) { + argv[pos++] = estrdup(Z_STRVAL_PP(arg)); + zend_hash_move_forward(Z_ARRVAL_PP(args)); + } + + /* + * The C Standard requires argv[argc] to be NULL - this might + * keep some getopt implementations happy. + */ + argv[argc] = NULL; + } else { + /* Return false if we can't find argv. */ + RETURN_FALSE; + } + + if(p_longopts) { +#ifdef HARTMUT_0 + int len, c = zend_hash_num_elements(Z_ARRVAL_P(p_longopts)); + struct option *p; + zval **arg; + char *name; + + longopts = (struct option *)ecalloc(c+1, sizeof(struct option)); + + if(!longopts) RETURN_FALSE; + + /* Reset the array indexes. */ + zend_hash_internal_pointer_reset(Z_ARRVAL_P(p_longopts)); + p = longopts; + + /* Iterate over the hash to construct the argv array. */ + while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts), + (void **)&arg) == SUCCESS) { + + p->has_arg = 0; + name = estrdup(Z_STRVAL_PP(arg)); + len = strlen(name); + if((len > 0) && (name[len-1] == ':')) { + p->has_arg++; + name[len-1] = '\0'; + if((len > 1) && (name[len-2] == ':')) { + p->has_arg++; + name[len-2] = '\0'; + } + } + + p->name = name; + p->flag = NULL; + p->val = 0; + + zend_hash_move_forward(Z_ARRVAL_P(p_longopts)); + p++; + } +#else + php_error_docref(NULL TSRMLS_CC, E_WARNING, "No support for long options in this build"); +#endif + } + + /* Initialize the return value as an array. */ + array_init(return_value); + + /* Disable getopt()'s error messages. */ + opterr = 0; + + /* Force reinitialization of getopt() (via optind reset) on every call. */ + optind = 1; + + /* Invoke getopt(3) on the argument array. */ +#ifdef HARTMUT_0 + while ((o = getopt_long(argc, argv, options, longopts, &longindex)) != -1) { +#else + while ((o = getopt(argc, argv, options)) != -1) { +#endif + /* Skip unknown arguments. */ + if (o == '?') { + continue; + } + + /* Prepare the option character and the argument string. */ + if(o == 0) { +#ifdef HARTMUT_0 + optname = (char *)longopts[longindex].name; +#else + /* o == 0 shall never happen so this only fixes a compiler warning */ + optname = NULL; +#endif + } else { + if(o == 1) o = '-'; + opt[0] = o; + optname = opt; + } + + MAKE_STD_ZVAL(val); + if (optarg != NULL) { + ZVAL_STRING(val, optarg, 1); + } else { + ZVAL_FALSE(val); + } + + /* Add this option / argument pair to the result hash. */ + optname_len = strlen(optname); + if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) { + /* numeric string */ + int optname_int = atoi(optname); + if(zend_hash_index_find(HASH_OF(return_value), optname_int, (void **)&args) != FAILURE) { + if(Z_TYPE_PP(args) != IS_ARRAY) { + convert_to_array_ex(args); + } + zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL); + } else { + zend_hash_index_update(HASH_OF(return_value), optname_int, &val, sizeof(zval *), NULL); + } + } else { + /* other strings */ + if(zend_hash_find(HASH_OF(return_value), optname, optname_len + 1, (void **)&args) != FAILURE) { + if(Z_TYPE_PP(args) != IS_ARRAY) { + convert_to_array_ex(args); + } + zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL); + } else { + zend_hash_add(HASH_OF(return_value), optname, optname_len + 1, (void *)&val, sizeof(zval *), NULL); + } + } + } + + free_argv(argv, argc); +#ifdef HARTMUT_0 + free_longopts(longopts); +#endif +} +/* }}} */ +#endif + +/* {{{ proto void flush(void) + Flush the output buffer */ +PHP_FUNCTION(flush) +{ + sapi_flush(TSRMLS_C); +} +/* }}} */ + +/* {{{ proto void sleep(int seconds) + Delay for a given number of seconds */ +PHP_FUNCTION(sleep) +{ + long num; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) { + RETURN_FALSE; + } + if (num < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of seconds must be greater than or equal to 0"); + RETURN_FALSE; + } +#ifdef PHP_SLEEP_NON_VOID + RETURN_LONG(php_sleep(num)); +#else + php_sleep(num); +#endif + +} +/* }}} */ + +/* {{{ proto void usleep(int micro_seconds) + Delay for a given number of micro seconds */ +PHP_FUNCTION(usleep) +{ +#if HAVE_USLEEP + long num; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) { + return; + } + if (num < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of microseconds must be greater than or equal to 0"); + RETURN_FALSE; + } + usleep(num); +#endif +} +/* }}} */ + +#if HAVE_NANOSLEEP +/* {{{ proto mixed time_nanosleep(long seconds, long nanoseconds) + Delay for a number of seconds and nano seconds */ +PHP_FUNCTION(time_nanosleep) +{ + long tv_sec, tv_nsec; + struct timespec php_req, php_rem; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec)) { + return; + } + + php_req.tv_sec = (time_t) tv_sec; + php_req.tv_nsec = tv_nsec; + if (!nanosleep(&php_req, &php_rem)) { + RETURN_TRUE; + } else if (errno == EINTR) { + array_init(return_value); + add_assoc_long_ex(return_value, "seconds", sizeof("seconds"), php_rem.tv_sec); + add_assoc_long_ex(return_value, "nanoseconds", sizeof("nanoseconds"), php_rem.tv_nsec); + return; + } else if (errno == EINVAL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "nanoseconds was not in the range 0 to 999 999 999 or seconds was negative"); + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto mixed time_sleep_until(float timestamp) + Make the script sleep until the specified time */ +PHP_FUNCTION(time_sleep_until) +{ + double d_ts, c_ts; + struct timeval tm; + struct timespec php_req, php_rem; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &d_ts)) { + return; + } + + if (gettimeofday((struct timeval *) &tm, NULL) != 0) { + RETURN_FALSE; + } + + c_ts = (double)(d_ts - tm.tv_sec - tm.tv_usec / 1000000.00); + if (c_ts < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sleep until to time is less than current time"); + RETURN_FALSE; + } + + php_req.tv_sec = (time_t) c_ts; + if (php_req.tv_sec > c_ts) { /* rounding up occurred */ + php_req.tv_sec--; + } + /* 1sec = 1000000000 nanoseconds */ + php_req.tv_nsec = (long) ((c_ts - php_req.tv_sec) * 1000000000.00); + + while (nanosleep(&php_req, &php_rem)) { + if (errno == EINTR) { + php_req.tv_sec = php_rem.tv_sec; + php_req.tv_nsec = php_rem.tv_nsec; + } else { + RETURN_FALSE; + } + } + + RETURN_TRUE; +} +/* }}} */ +#endif + +/* {{{ proto string get_current_user(void) + Get the name of the owner of the current PHP script */ +PHP_FUNCTION(get_current_user) +{ + if (ZEND_NUM_ARGS() != 0) { + WRONG_PARAM_COUNT; + } + + RETURN_STRING(php_get_current_user(), 1); +} +/* }}} */ + +/* {{{ proto string get_cfg_var(string option_name) + Get the value of a PHP configuration option */ +PHP_FUNCTION(get_cfg_var) +{ + zval **varname; + char *value; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(varname); + + if (cfg_get_string(Z_STRVAL_PP(varname), &value) == FAILURE) { + RETURN_FALSE; + } + RETURN_STRING(value, 1); +} +/* }}} */ + +/* {{{ proto bool set_magic_quotes_runtime(int new_setting) + Set the current active configuration setting of magic_quotes_runtime and return previous */ +PHP_FUNCTION(set_magic_quotes_runtime) +{ + zval **new_setting; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_setting) == FAILURE) { + RETURN_FALSE; + } + convert_to_boolean_ex(new_setting); + + PG(magic_quotes_runtime) = (zend_bool) Z_LVAL_PP(new_setting); + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto int get_magic_quotes_runtime(void) + Get the current active configuration setting of magic_quotes_runtime */ +PHP_FUNCTION(get_magic_quotes_runtime) +{ + RETURN_LONG(PG(magic_quotes_runtime)); +} + +/* }}} */ + +/* {{{ proto int get_magic_quotes_gpc(void) + Get the current active configuration setting of magic_quotes_gpc */ +PHP_FUNCTION(get_magic_quotes_gpc) +{ + RETURN_LONG(PG(magic_quotes_gpc)); +} +/* }}} */ + +/* + 1st arg = error message + 2nd arg = error option + 3rd arg = optional parameters (email address or tcp address) + 4th arg = used for additional headers if email + +error options: + 0 = send to php_error_log (uses syslog or file depending on ini setting) + 1 = send via email to 3rd parameter 4th option = additional headers + 2 = send via tcp/ip to 3rd parameter (name or ip:port) + 3 = save to file in 3rd parameter +*/ + +/* {{{ proto bool error_log(string message [, int message_type [, string destination [, string extra_headers]]]) + Send an error message somewhere */ +PHP_FUNCTION(error_log) +{ + zval **string, **erropt = NULL, **option = NULL, **emailhead = NULL; + int opt_err = 0; + char *message, *opt = NULL, *headers = NULL; + + switch (ZEND_NUM_ARGS()) { + case 1: + if (zend_get_parameters_ex(1, &string) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument 1 invalid"); + RETURN_FALSE; + } + break; + + case 2: + if (zend_get_parameters_ex(2, &string, &erropt) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments"); + RETURN_FALSE; + } + convert_to_long_ex(erropt); + opt_err = Z_LVAL_PP(erropt); + break; + + case 3: + if (zend_get_parameters_ex(3, &string, &erropt, &option) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments"); + RETURN_FALSE; + } + convert_to_long_ex(erropt); + opt_err = Z_LVAL_PP(erropt); + convert_to_string_ex(option); + opt = Z_STRVAL_PP(option); + break; + + case 4: + if (zend_get_parameters_ex (4, &string, &erropt, &option, &emailhead) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments"); + RETURN_FALSE; + } + break; + + default: + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(string); + message = Z_STRVAL_PP(string); + + if (erropt != NULL) { + convert_to_long_ex(erropt); + opt_err = Z_LVAL_PP(erropt); + } + + if (option != NULL) { + convert_to_string_ex(option); + opt = Z_STRVAL_PP(option); + } + + if (emailhead != NULL) { + convert_to_string_ex(emailhead); + headers = Z_STRVAL_PP(emailhead); + } + + if (_php_error_log(opt_err, message, opt, headers TSRMLS_CC) == FAILURE) { + RETURN_FALSE; + } + + RETURN_TRUE; +} +/* }}} */ + + +PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers TSRMLS_DC) +{ + php_stream *stream = NULL; + + switch (opt_err) { + + case 1: /*send an email */ + { + if (!php_mail(opt, "PHP error_log message", message, headers, NULL TSRMLS_CC)) { + return FAILURE; + } + } + break; + + case 2: /*send to an address */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "TCP/IP option not available!"); + return FAILURE; + break; + + case 3: /*save to a file */ + stream = php_stream_open_wrapper(opt, "a", IGNORE_URL_WIN | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL); + if (!stream) + return FAILURE; + php_stream_write(stream, message, strlen(message)); + php_stream_close(stream); + break; + + default: + php_log_err(message TSRMLS_CC); + break; + } + return SUCCESS; +} + +/* {{{ proto array error_get_last() + Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet. */ +PHP_FUNCTION(error_get_last) +{ + if (ZEND_NUM_ARGS()) { + WRONG_PARAM_COUNT; + } + if (PG(last_error_message)) { + array_init(return_value); + add_assoc_long_ex(return_value, "type", sizeof("type"), PG(last_error_type)); + add_assoc_string_ex(return_value, "message", sizeof("message"), PG(last_error_message), 1); + add_assoc_string_ex(return_value, "file", sizeof("file"), PG(last_error_file)?PG(last_error_file):"-", 1 ); + add_assoc_long_ex(return_value, "line", sizeof("line"), PG(last_error_lineno)); + } +} +/* }}} */ + +/* {{{ proto mixed call_user_func(string function_name [, mixed parmeter] [, mixed ...]) + Call a user function which is the first parameter */ +PHP_FUNCTION(call_user_func) +{ + zval ***params; + zval *retval_ptr; + char *name; + int argc = ZEND_NUM_ARGS(); + + if (argc < 1) { + WRONG_PARAM_COUNT; + } + + params = safe_emalloc(sizeof(zval **), argc, 0); + + if (zend_get_parameters_array_ex(1, params) == FAILURE) { + efree(params); + RETURN_FALSE; + } + + if (Z_TYPE_PP(params[0]) != IS_STRING && Z_TYPE_PP(params[0]) != IS_ARRAY) { + SEPARATE_ZVAL(params[0]); + convert_to_string_ex(params[0]); + } + + if (!zend_is_callable(*params[0], 0, &name)) { + php_error_docref1(NULL TSRMLS_CC, name, E_WARNING, "First argument is expected to be a valid callback"); + efree(name); + efree(params); + RETURN_NULL(); + } + + if (zend_get_parameters_array_ex(argc, params) == FAILURE) { + efree(params); + RETURN_FALSE; + } + + if (call_user_function_ex(EG(function_table), NULL, *params[0], &retval_ptr, argc-1, params+1, 0, NULL TSRMLS_CC) == SUCCESS) { + if (retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } + } else { + if (argc > 1) { + SEPARATE_ZVAL(params[1]); + convert_to_string_ex(params[1]); + if (argc > 2) { + SEPARATE_ZVAL(params[2]); + convert_to_string_ex(params[2]); + php_error_docref1(NULL TSRMLS_CC, name, E_WARNING, "Unable to call %s(%s,%s)", name, Z_STRVAL_PP(params[1]), Z_STRVAL_PP(params[2])); + } else { + php_error_docref1(NULL TSRMLS_CC, name, E_WARNING, "Unable to call %s(%s)", name, Z_STRVAL_PP(params[1])); + } + } else { + php_error_docref1(NULL TSRMLS_CC, name, E_WARNING, "Unable to call %s()", name); + } + } + + efree(name); + efree(params); +} +/* }}} */ + +/* {{{ proto mixed call_user_func_array(string function_name, array parameters) + Call a user function which is the first parameter with the arguments contained in array */ +PHP_FUNCTION(call_user_func_array) +{ + zval ***func_params, **func, **params; + zval *retval_ptr; + HashTable *func_params_ht; + char *name; + int count; + int current = 0; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &func, ¶ms) == FAILURE) { + WRONG_PARAM_COUNT; + } + + SEPARATE_ZVAL(params); + convert_to_array_ex(params); + + if (Z_TYPE_PP(func) != IS_STRING && Z_TYPE_PP(func) != IS_ARRAY) { + SEPARATE_ZVAL(func); + convert_to_string_ex(func); + } + + if (!zend_is_callable(*func, 0, &name)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "First argument is expected to be a valid callback, '%s' was given", name); + efree(name); + RETURN_NULL(); + } + + func_params_ht = Z_ARRVAL_PP(params); + + count = zend_hash_num_elements(func_params_ht); + if (count) { + func_params = safe_emalloc(sizeof(zval **), count, 0); + + for (zend_hash_internal_pointer_reset(func_params_ht); + zend_hash_get_current_data(func_params_ht, (void **) &func_params[current]) == SUCCESS; + zend_hash_move_forward(func_params_ht) + ) { + current++; + } + } else { + func_params = NULL; + } + + if (call_user_function_ex(EG(function_table), NULL, *func, &retval_ptr, count, func_params, 0, NULL TSRMLS_CC) == SUCCESS) { + if (retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", name); + } + + efree(name); + if (func_params) { + efree(func_params); + } +} +/* }}} */ + +/* {{{ proto mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...]) + Call a user method on a specific object or class */ +PHP_FUNCTION(call_user_method) +{ + zval ***params; + zval *retval_ptr; + int arg_count = ZEND_NUM_ARGS(); + + if (arg_count < 2) { + WRONG_PARAM_COUNT; + } + params = (zval ***) safe_emalloc(sizeof(zval **), arg_count, 0); + + if (zend_get_parameters_array_ex(arg_count, params) == FAILURE) { + efree(params); + RETURN_FALSE; + } + if (Z_TYPE_PP(params[1]) != IS_OBJECT && Z_TYPE_PP(params[1]) != IS_STRING) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name"); + efree(params); + RETURN_FALSE; + } + + SEPARATE_ZVAL(params[0]); + convert_to_string(*params[0]); + + if (call_user_function_ex(EG(function_table), params[1], *params[0], &retval_ptr, arg_count-2, params+2, 0, NULL TSRMLS_CC) == SUCCESS && retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_PP(params[0])); + } + efree(params); +} +/* }}} */ + +/* {{{ proto mixed call_user_method_array(string method_name, mixed object, array params) + Call a user method on a specific object or class using a parameter array */ +PHP_FUNCTION(call_user_method_array) +{ + zval **method_name, **obj, **params, ***method_args = NULL, *retval_ptr; + HashTable *params_ar; + int num_elems, element = 0; + + if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &method_name, &obj, ¶ms) == FAILURE) { + WRONG_PARAM_COUNT; + } + + if (Z_TYPE_PP(obj) != IS_OBJECT && Z_TYPE_PP(obj) != IS_STRING) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name"); + RETURN_FALSE; + } + + SEPARATE_ZVAL(method_name); + SEPARATE_ZVAL(params); + convert_to_string_ex(method_name); + convert_to_array_ex(params); + + params_ar = HASH_OF(*params); + num_elems = zend_hash_num_elements(params_ar); + method_args = (zval ***) safe_emalloc(sizeof(zval **), num_elems, 0); + + for (zend_hash_internal_pointer_reset(params_ar); + zend_hash_get_current_data(params_ar, (void **) &(method_args[element])) == SUCCESS; + zend_hash_move_forward(params_ar) + ) { + element++; + } + + if (call_user_function_ex(EG(function_table), obj, *method_name, &retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS && retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_PP(method_name)); + } + + efree(method_args); +} +/* }}} */ + + +void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry) +{ + int i; + + for (i = 0; i < shutdown_function_entry->arg_count; i++) { + zval_ptr_dtor(&shutdown_function_entry->arguments[i]); + } + efree(shutdown_function_entry->arguments); +} + +void user_tick_function_dtor(user_tick_function_entry *tick_function_entry) +{ + int i; + + for (i = 0; i < tick_function_entry->arg_count; i++) { + zval_ptr_dtor(&tick_function_entry->arguments[i]); + } + efree(tick_function_entry->arguments); +} + +static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) +{ + zval retval; + char *function_name = NULL; + + if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name)) { + php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name); + efree(function_name); + return 0; + } + efree(function_name); + + if (call_user_function(EG(function_table), NULL, + shutdown_function_entry->arguments[0], + &retval, + shutdown_function_entry->arg_count - 1, + shutdown_function_entry->arguments + 1 + TSRMLS_CC ) == SUCCESS) + { + zval_dtor(&retval); + } + return 0; +} + +static void user_tick_function_call(user_tick_function_entry *tick_fe TSRMLS_DC) +{ + zval retval; + zval *function = tick_fe->arguments[0]; + + /* Prevent reentrant calls to the same user ticks function */ + if (! tick_fe->calling) { + tick_fe->calling = 1; + + if (call_user_function( EG(function_table), NULL, + function, + &retval, + tick_fe->arg_count - 1, + tick_fe->arguments+1 + TSRMLS_CC) == SUCCESS) { + zval_dtor(&retval); + + } else { + zval **obj, **method; + + if (Z_TYPE_P(function) == IS_STRING) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", Z_STRVAL_P(function)); + } else if ( Z_TYPE_P(function) == IS_ARRAY + && zend_hash_index_find(Z_ARRVAL_P(function), 0, (void **) &obj) == SUCCESS + && zend_hash_index_find(Z_ARRVAL_P(function), 1, (void **) &method) == SUCCESS + && Z_TYPE_PP(obj) == IS_OBJECT + && Z_TYPE_PP(method) == IS_STRING ) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s::%s() - function does not exist", Z_OBJCE_PP(obj)->name, Z_STRVAL_PP(method)); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call tick function"); + } + } + + tick_fe->calling = 0; + } +} + +static void run_user_tick_functions(int tick_count) +{ + TSRMLS_FETCH(); + + zend_llist_apply(BG(user_tick_functions), (llist_apply_func_t) user_tick_function_call TSRMLS_CC); +} + +static int user_tick_function_compare(user_tick_function_entry * tick_fe1, user_tick_function_entry * tick_fe2) +{ + zval *func1 = tick_fe1->arguments[0]; + zval *func2 = tick_fe2->arguments[0]; + int ret; + TSRMLS_FETCH(); + + if (Z_TYPE_P(func1) == IS_STRING && Z_TYPE_P(func2) == IS_STRING) { + ret = (zend_binary_zval_strcmp(func1, func2) == 0); + } else if (Z_TYPE_P(func1) == IS_ARRAY && Z_TYPE_P(func2) == IS_ARRAY) { + zval result; + zend_compare_arrays(&result, func1, func2 TSRMLS_CC); + ret = (Z_LVAL(result) == 0); + } else { + ret = 0; + } + + if (ret && tick_fe1->calling) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to delete tick function executed at the moment"); + return 0; + } + return ret; +} + +void php_call_shutdown_functions(TSRMLS_D) +{ + if (BG(user_shutdown_function_names)) { + zend_try { + zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC); + } + zend_end_try(); + php_free_shutdown_functions(TSRMLS_C); + } +} + +void php_free_shutdown_functions(TSRMLS_D) +{ + if (BG(user_shutdown_function_names)) + zend_try { + zend_hash_destroy(BG(user_shutdown_function_names)); + FREE_HASHTABLE(BG(user_shutdown_function_names)); + BG(user_shutdown_function_names) = NULL; + } + zend_end_try(); +} + +/* {{{ proto void register_shutdown_function(string function_name) + Register a user-level function to be called on request termination */ +PHP_FUNCTION(register_shutdown_function) +{ + php_shutdown_function_entry shutdown_function_entry; + char *function_name = NULL; + int i; + + shutdown_function_entry.arg_count = ZEND_NUM_ARGS(); + + if (shutdown_function_entry.arg_count < 1) { + WRONG_PARAM_COUNT; + } + + shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0); + + if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) { + efree(shutdown_function_entry.arguments); + RETURN_FALSE; + } + + /* Prevent entering of anything but valid callback (syntax check only!) */ + if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name); + efree(shutdown_function_entry.arguments); + RETVAL_FALSE; + } else { + if (!BG(user_shutdown_function_names)) { + ALLOC_HASHTABLE(BG(user_shutdown_function_names)); + zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0); + } + + for (i = 0; i < shutdown_function_entry.arg_count; i++) { + shutdown_function_entry.arguments[i]->refcount++; + } + zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); + } + if (function_name) { + efree(function_name); + } +} +/* }}} */ + + +ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini) +{ + syntax_highlighter_ini->highlight_comment = INI_STR("highlight.comment"); + syntax_highlighter_ini->highlight_default = INI_STR("highlight.default"); + syntax_highlighter_ini->highlight_html = INI_STR("highlight.html"); + syntax_highlighter_ini->highlight_keyword = INI_STR("highlight.keyword"); + syntax_highlighter_ini->highlight_string = INI_STR("highlight.string"); +} + +/* {{{ proto bool highlight_file(string file_name [, bool return] ) + Syntax highlight a source file */ +PHP_FUNCTION(highlight_file) +{ + char *filename; + int filename_len; + zend_syntax_highlighter_ini syntax_highlighter_ini; + zend_bool i = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &filename, &filename_len, &i) == FAILURE) { + RETURN_FALSE; + } + + if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_ALLOW_ONLY_FILE))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(filename TSRMLS_CC)) { + RETURN_FALSE; + } + + if (i) { + php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC); + } + + php_get_highlight_struct(&syntax_highlighter_ini); + + if (highlight_file(filename, &syntax_highlighter_ini TSRMLS_CC) == FAILURE) { + if (i) { + int res = php_ob_get_buffer(return_value TSRMLS_CC); + + /* flush the buffer only if there is something to flush */ + if (res == SUCCESS && Z_STRLEN_P(return_value) > 0) { + php_end_ob_buffer (1, 0 TSRMLS_CC); + zval_dtor(return_value); + } else { + php_end_ob_buffer (0, 0 TSRMLS_CC); + if (res == SUCCESS) { + zval_dtor(return_value); + } + } + } + RETURN_FALSE; + } + + if (i) { + php_ob_get_buffer (return_value TSRMLS_CC); + php_end_ob_buffer (0, 0 TSRMLS_CC); + } else { + RETURN_TRUE; + } +} +/* }}} */ + +/* {{{ proto string php_strip_whitespace(string file_name) + Return source with stripped comments and whitespace */ +PHP_FUNCTION(php_strip_whitespace) +{ + char *filename; + int filename_len; + zend_lex_state original_lex_state; + zend_file_handle file_handle = {0}; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { + RETURN_FALSE; + } + + file_handle.type = ZEND_HANDLE_FILENAME; + file_handle.filename = filename; + file_handle.free_filename = 0; + file_handle.opened_path = NULL; + zend_save_lexical_state(&original_lex_state TSRMLS_CC); + if (open_file_for_scanning(&file_handle TSRMLS_CC)==FAILURE) { + zend_restore_lexical_state(&original_lex_state TSRMLS_CC); + RETURN_EMPTY_STRING(); + } + + php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC); + + zend_strip(TSRMLS_C); + + zend_destroy_file_handle(&file_handle TSRMLS_CC); + zend_restore_lexical_state(&original_lex_state TSRMLS_CC); + + php_ob_get_buffer(return_value TSRMLS_CC); + php_end_ob_buffer(0, 0 TSRMLS_CC); + + return; +} +/* }}} */ + +/* {{{ proto bool highlight_string(string string [, bool return] ) + Syntax highlight a string or optionally return it */ +PHP_FUNCTION(highlight_string) +{ + zval **expr; + zend_syntax_highlighter_ini syntax_highlighter_ini; + char *hicompiled_string_description; + zend_bool i = 0; + int old_error_reporting = EG(error_reporting); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|b", &expr, &i) == FAILURE) { + RETURN_FALSE; + } + convert_to_string_ex(expr); + + if (i) { + php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC); + } + + EG(error_reporting) = E_ERROR; + + php_get_highlight_struct(&syntax_highlighter_ini); + + hicompiled_string_description = zend_make_compiled_string_description("highlighted code" TSRMLS_CC); + + if (highlight_string(*expr, &syntax_highlighter_ini, hicompiled_string_description TSRMLS_CC) == FAILURE) { + efree(hicompiled_string_description); + EG(error_reporting) = old_error_reporting; + if (i) { + php_end_ob_buffer (1, 0 TSRMLS_CC); + } + RETURN_FALSE; + } + efree(hicompiled_string_description); + + EG(error_reporting) = old_error_reporting; + + if (i) { + php_ob_get_buffer (return_value TSRMLS_CC); + php_end_ob_buffer (0, 0 TSRMLS_CC); + } else { + RETURN_TRUE; + } +} +/* }}} */ + +/* {{{ proto string ini_get(string varname) + Get a configuration option */ +PHP_FUNCTION(ini_get) +{ + zval **varname; + char *str; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(varname); + + str = zend_ini_string(Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, 0); + + if (!str) { + RETURN_FALSE; + } + + RETURN_STRING(str, 1); +} +/* }}} */ + + +static int php_ini_get_option(zend_ini_entry *ini_entry, int num_args, va_list args, zend_hash_key *hash_key) +{ + zval *ini_array = va_arg(args, zval *); + int module_number = va_arg(args, int); + zval *option; + + if (module_number != 0 && ini_entry->module_number != module_number) { + return 0; + } + + if (hash_key->nKeyLength == 0 || hash_key->arKey[0] != 0) { + + MAKE_STD_ZVAL(option); + array_init(option); + + if (ini_entry->orig_value) { + add_assoc_stringl(option, "global_value", ini_entry->orig_value, ini_entry->orig_value_length, 1); + } else if (ini_entry->value) { + add_assoc_stringl(option, "global_value", ini_entry->value, ini_entry->value_length, 1); + } else { + add_assoc_null(option, "global_value"); + } + + if (ini_entry->value) { + add_assoc_stringl(option, "local_value", ini_entry->value, ini_entry->value_length, 1); + } else { + add_assoc_null(option, "local_value"); + } + + add_assoc_long(option, "access", ini_entry->modifiable); + + add_assoc_zval_ex(ini_array, ini_entry->name, ini_entry->name_length, option); + } + return 0; +} + +/* {{{ proto array ini_get_all([string extension]) + Get all configuration options */ +PHP_FUNCTION(ini_get_all) +{ + char *extname = NULL; + int extname_len = 0, extnumber = 0; + zend_module_entry *module; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &extname, &extname_len) == FAILURE) { + RETURN_FALSE; + } + + zend_ini_sort_entries(TSRMLS_C); + + if (extname) { + if (zend_hash_find(&module_registry, extname, extname_len+1, (void **) &module) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find extension '%s'", extname); + RETURN_FALSE; + } + extnumber = module->module_number; + } + + array_init(return_value); + zend_hash_apply_with_arguments(EG(ini_directives), (apply_func_args_t) php_ini_get_option, 2, return_value, extnumber TSRMLS_CC); +} +/* }}} */ + +static int php_ini_check_path(char *option_name, int option_len, char *new_option_name, int new_option_len) +{ + if ( option_len != (new_option_len-1) ) { + return 0; + } + + return !strncmp(option_name, new_option_name, option_len); +} + +/* {{{ proto string ini_set(string varname, string newvalue) + Set a configuration option, returns false on error and the old value of the configuration option on success */ +PHP_FUNCTION(ini_set) +{ + zval **varname, **new_value; + char *old_value; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &varname, &new_value) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(varname); + convert_to_string_ex(new_value); + + old_value = zend_ini_string(Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, 0); + + /* copy to return here, because alter might free it! */ + if (old_value) { + RETVAL_STRING(old_value, 1); + } else { + RETVAL_FALSE; + } + +#define _CHECK_PATH(var, ini) php_ini_check_path(Z_STRVAL_PP(var), Z_STRLEN_PP(var), ini, sizeof(ini)) + + /* safe_mode & basedir check */ + if (PG(safe_mode) || PG(open_basedir)) { + if (_CHECK_PATH(varname, "error_log") || + _CHECK_PATH(varname, "java.class.path") || + _CHECK_PATH(varname, "java.home") || + _CHECK_PATH(varname, "java.library.path") || + _CHECK_PATH(varname, "vpopmail.directory")) { + if (PG(safe_mode) &&(!php_checkuid(Z_STRVAL_PP(new_value), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + zval_dtor(return_value); + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(new_value) TSRMLS_CC)) { + zval_dtor(return_value); + RETURN_FALSE; + } + } + } + + /* checks that ensure the user does not overwrite certain ini settings when safe_mode is enabled */ + if (PG(safe_mode)) { + if (!strncmp("max_execution_time", Z_STRVAL_PP(varname), sizeof("max_execution_time")) || + !strncmp("memory_limit", Z_STRVAL_PP(varname), sizeof("memory_limit")) || + !strncmp("child_terminate", Z_STRVAL_PP(varname), sizeof("child_terminate"))) { + zval_dtor(return_value); + RETURN_FALSE; + } + } + + if (zend_alter_ini_entry(Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, Z_STRVAL_PP(new_value), Z_STRLEN_PP(new_value), + PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) { + zval_dtor(return_value); + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto void ini_restore(string varname) + Restore the value of a configuration option specified by varname */ +PHP_FUNCTION(ini_restore) +{ + zval **varname; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(varname); + + zend_restore_ini_entry(Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, PHP_INI_STAGE_RUNTIME); +} +/* }}} */ + +/* {{{ proto string set_include_path(string new_include_path) + Sets the include_path configuration option */ + +PHP_FUNCTION(set_include_path) +{ + zval **new_value; + char *old_value; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_value) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(new_value); + old_value = zend_ini_string("include_path", sizeof("include_path"), 0); + /* copy to return here, because alter might free it! */ + if (old_value) { + RETVAL_STRING(old_value, 1); + } else { + RETVAL_FALSE; + } + if (zend_alter_ini_entry("include_path", sizeof("include_path"), + Z_STRVAL_PP(new_value), Z_STRLEN_PP(new_value), + PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) { + zval_dtor(return_value); + RETURN_FALSE; + } +} + +/* }}} */ + +/* {{{ proto string get_include_path() + Get the current include_path configuration option */ + +PHP_FUNCTION(get_include_path) +{ + char *str; + if (ZEND_NUM_ARGS() != 0) { + WRONG_PARAM_COUNT; + } + str = zend_ini_string("include_path", sizeof("include_path"), 0); + if (str == NULL) { + RETURN_FALSE; + } + RETURN_STRING(str, 1); +} + +/* }}} */ + +/* {{{ proto void restore_include_path() + Restore the value of the include_path configuration option */ + +PHP_FUNCTION(restore_include_path) +{ + if (ZEND_NUM_ARGS() != 0) { + WRONG_PARAM_COUNT; + } + + zend_restore_ini_entry("include_path", sizeof("include_path"), + PHP_INI_STAGE_RUNTIME); +} + +/* }}} */ + +/* {{{ proto mixed print_r(mixed var [, bool return]) + Prints out or returns information about the specified variable */ +PHP_FUNCTION(print_r) +{ + zval *var; + zend_bool i = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &i) == FAILURE) { + RETURN_FALSE; + } + + if (i) { + php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC); + } + + zend_print_zval_r(var, 0 TSRMLS_CC); + + if (i) { + php_ob_get_buffer (return_value TSRMLS_CC); + php_end_ob_buffer (0, 0 TSRMLS_CC); + } else { + RETURN_TRUE; + } +} +/* }}} */ + +/* This should go back to PHP */ + +/* {{{ proto int connection_aborted(void) + Returns true if client disconnected */ +PHP_FUNCTION(connection_aborted) +{ + RETURN_LONG(PG(connection_status) & PHP_CONNECTION_ABORTED); +} +/* }}} */ + +/* {{{ proto int connection_status(void) + Returns the connection status bitfield */ +PHP_FUNCTION(connection_status) +{ + RETURN_LONG(PG(connection_status)); +} +/* }}} */ + +/* {{{ proto int ignore_user_abort(bool value) + Set whether we want to ignore a user abort event or not */ +PHP_FUNCTION(ignore_user_abort) +{ + zval **arg; + int old_setting; + + old_setting = PG(ignore_user_abort); + switch (ZEND_NUM_ARGS()) { + + case 0: + break; + + case 1: + if (zend_get_parameters_ex(1, &arg) == FAILURE) { + RETURN_FALSE; + } + convert_to_string_ex(arg); + zend_alter_ini_entry("ignore_user_abort", sizeof("ignore_user_abort"), Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), PHP_INI_USER, PHP_INI_STAGE_RUNTIME); + break; + + default: + WRONG_PARAM_COUNT; + break; + } + RETURN_LONG(old_setting); +} +/* }}} */ + +#if HAVE_GETSERVBYNAME +/* {{{ proto int getservbyname(string service, string protocol) + Returns port associated with service. Protocol must be "tcp" or "udp" */ +PHP_FUNCTION(getservbyname) +{ + zval **name, **proto; + struct servent *serv; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &name, &proto) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(name); + convert_to_string_ex(proto); + + serv = getservbyname(Z_STRVAL_PP(name), Z_STRVAL_PP(proto)); + + if (serv == NULL) { + RETURN_FALSE; + } + + RETURN_LONG(ntohs(serv->s_port)); +} +/* }}} */ +#endif + +#if HAVE_GETSERVBYPORT +/* {{{ proto string getservbyport(int port, string protocol) + Returns service name associated with port. Protocol must be "tcp" or "udp" */ +PHP_FUNCTION(getservbyport) +{ + zval **port, **proto; + struct servent *serv; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &port, &proto) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_long_ex(port); + convert_to_string_ex(proto); + + serv = getservbyport(htons((unsigned short) Z_LVAL_PP(port)), Z_STRVAL_PP(proto)); + + if (serv == NULL) { + RETURN_FALSE; + } + + RETURN_STRING(serv->s_name, 1); +} +/* }}} */ +#endif + +#if HAVE_GETPROTOBYNAME +/* {{{ proto int getprotobyname(string name) + Returns protocol number associated with name as per /etc/protocols */ +PHP_FUNCTION(getprotobyname) +{ + zval **name; + struct protoent *ent; + + if (ZEND_NUM_ARGS() != 1 + || zend_get_parameters_ex(1, &name) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(name); + + ent = getprotobyname(Z_STRVAL_PP(name)); + + if (ent == NULL) { + Z_LVAL_P(return_value) = -1; + Z_TYPE_P(return_value) = IS_LONG; + RETURN_FALSE; + } + + RETURN_LONG(ent->p_proto); +} +/* }}} */ +#endif + +#if HAVE_GETPROTOBYNUMBER +/* {{{ proto string getprotobynumber(int proto) + Returns protocol name associated with protocol number proto */ +PHP_FUNCTION(getprotobynumber) +{ + zval **proto; + struct protoent *ent; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &proto) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(proto); + + ent = getprotobynumber(Z_LVAL_PP(proto)); + + if (ent == NULL) { + RETURN_FALSE; + } + + RETURN_STRING(ent->p_name, 1); +} +/* }}} */ +#endif + +/* {{{ proto bool register_tick_function(string function_name [, mixed arg [, mixed ... ]]) + Registers a tick callback function */ +PHP_FUNCTION(register_tick_function) +{ + user_tick_function_entry tick_fe; + int i; + + tick_fe.calling = 0; + tick_fe.arg_count = ZEND_NUM_ARGS(); + + if (tick_fe.arg_count < 1) { + WRONG_PARAM_COUNT; + } + + tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0); + + if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) { + efree(tick_fe.arguments); + RETURN_FALSE; + } + + if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY) + convert_to_string_ex(&tick_fe.arguments[0]); + + if (!BG(user_tick_functions)) { + BG(user_tick_functions) = (zend_llist *) emalloc(sizeof(zend_llist)); + zend_llist_init(BG(user_tick_functions), + sizeof(user_tick_function_entry), + (llist_dtor_func_t) user_tick_function_dtor, 0); + php_add_tick_function(run_user_tick_functions); + } + + for (i = 0; i < tick_fe.arg_count; i++) { + tick_fe.arguments[i]->refcount++; + } + + zend_llist_add_element(BG(user_tick_functions), &tick_fe); + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto void unregister_tick_function(string function_name) + Unregisters a tick callback function */ +PHP_FUNCTION(unregister_tick_function) +{ + zval **function; + user_tick_function_entry tick_fe; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &function)) { + WRONG_PARAM_COUNT; + } + + if (!BG(user_tick_functions)) { + return; + } + + if (Z_TYPE_PP(function) != IS_ARRAY) { + convert_to_string_ex(function); + } + + tick_fe.arguments = (zval **) emalloc(sizeof(zval *)); + tick_fe.arguments[0] = *function; + tick_fe.arg_count = 1; + zend_llist_del_element(BG(user_tick_functions), &tick_fe, (int (*)(void *, void *)) user_tick_function_compare); + efree(tick_fe.arguments); +} +/* }}} */ + +/* {{{ proto bool is_uploaded_file(string path) + Check if file was created by rfc1867 upload */ +PHP_FUNCTION(is_uploaded_file) +{ + zval **path; + + if (!SG(rfc1867_uploaded_files)) { + RETURN_FALSE; + } + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &path) != SUCCESS) { + ZEND_WRONG_PARAM_COUNT(); + } + + convert_to_string_ex(path); + + if (zend_hash_exists(SG(rfc1867_uploaded_files), Z_STRVAL_PP(path), Z_STRLEN_PP(path)+1)) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto bool move_uploaded_file(string path, string new_path) + Move a file if and only if it was created by an upload */ +PHP_FUNCTION(move_uploaded_file) +{ + zval **path, **new_path; + zend_bool successful = 0; + +#ifndef PHP_WIN32 + int oldmask; int ret; +#endif + + if (!SG(rfc1867_uploaded_files)) { + RETURN_FALSE; + } + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &path, &new_path) != SUCCESS) { + ZEND_WRONG_PARAM_COUNT(); + } + convert_to_string_ex(path); + convert_to_string_ex(new_path); + + if (!zend_hash_exists(SG(rfc1867_uploaded_files), Z_STRVAL_PP(path), Z_STRLEN_PP(path)+1)) { + RETURN_FALSE; + } + + if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(new_path), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(new_path) TSRMLS_CC)) { + RETURN_FALSE; + } + + VCWD_UNLINK(Z_STRVAL_PP(new_path)); + if (VCWD_RENAME(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) { + successful = 1; +#ifndef PHP_WIN32 + oldmask = umask(077); + umask(oldmask); + + ret = VCWD_CHMOD(Z_STRVAL_PP(new_path), 0666 & ~oldmask); + + if (ret == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); + } +#endif + } else if (php_copy_file_ex(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path), STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { + VCWD_UNLINK(Z_STRVAL_PP(path)); + successful = 1; + } + + if (successful) { + zend_hash_del(SG(rfc1867_uploaded_files), Z_STRVAL_PP(path), Z_STRLEN_PP(path)+1); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to move '%s' to '%s'", Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)); + } + RETURN_BOOL(successful); +} +/* }}} */ + +/* {{{ php_simple_ini_parser_cb + */ +static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, zval *arr) +{ + zval *element; + + switch (callback_type) { + + case ZEND_INI_PARSER_ENTRY: + if (!arg2) { + /* bare string - nothing to do */ + break; + } + ALLOC_ZVAL(element); + *element = *arg2; + zval_copy_ctor(element); + INIT_PZVAL(element); + zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &element, sizeof(zval *), NULL); + break; + + case ZEND_INI_PARSER_POP_ENTRY: + { + zval *hash, **find_hash; + + if (!arg2) { + /* bare string - nothing to do */ + break; + } + + if (!(Z_STRLEN_P(arg1) > 1 && Z_STRVAL_P(arg1)[0] == '0') && is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == IS_LONG) { + ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)); + if (zend_hash_index_find(Z_ARRVAL_P(arr), key, (void **) &find_hash) == FAILURE) { + ALLOC_ZVAL(hash); + INIT_PZVAL(hash); + array_init(hash); + + zend_hash_index_update(Z_ARRVAL_P(arr), key, &hash, sizeof(zval *), NULL); + } else { + hash = *find_hash; + } + } else { + if (zend_hash_find(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, (void **) &find_hash) == FAILURE) { + ALLOC_ZVAL(hash); + INIT_PZVAL(hash); + array_init(hash); + + zend_hash_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &hash, sizeof(zval *), NULL); + } else { + hash = *find_hash; + } + } + + if (Z_TYPE_P(hash) != IS_ARRAY) { + zval_dtor(hash); + INIT_PZVAL(hash); + array_init(hash); + } + + ALLOC_ZVAL(element); + *element = *arg2; + zval_copy_ctor(element); + INIT_PZVAL(element); + add_next_index_zval(hash, element); + } + break; + + case ZEND_INI_PARSER_SECTION: + break; + } +} +/* }}} */ + +/* {{{ php_ini_parser_cb_with_sections + */ +static void php_ini_parser_cb_with_sections(zval *arg1, zval *arg2, int callback_type, zval *arr) +{ + TSRMLS_FETCH(); + + if (callback_type == ZEND_INI_PARSER_SECTION) { + MAKE_STD_ZVAL(BG(active_ini_file_section)); + array_init(BG(active_ini_file_section)); + zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &BG(active_ini_file_section), sizeof(zval *), NULL); + } else if (arg2) { + zval *active_arr; + + if (BG(active_ini_file_section)) { + active_arr = BG(active_ini_file_section); + } else { + active_arr = arr; + } + + php_simple_ini_parser_cb(arg1, arg2, callback_type, active_arr); + } +} +/* }}} */ + +/* {{{ proto array parse_ini_file(string filename [, bool process_sections]) + Parse configuration file */ +PHP_FUNCTION(parse_ini_file) +{ + zval **filename, **process_sections; + zend_file_handle fh; + zend_ini_parser_cb_t ini_parser_cb; + + switch (ZEND_NUM_ARGS()) { + + case 1: + if (zend_get_parameters_ex(1, &filename) == FAILURE) { + RETURN_FALSE; + } + ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb; + break; + + case 2: + if (zend_get_parameters_ex(2, &filename, &process_sections) == FAILURE) { + RETURN_FALSE; + } + + convert_to_boolean_ex(process_sections); + + if (Z_BVAL_PP(process_sections)) { + BG(active_ini_file_section) = NULL; + ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections; + } else { + ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb; + } + break; + + default: + ZEND_WRONG_PARAM_COUNT(); + break; + } + + convert_to_string_ex(filename); + + memset(&fh, 0, sizeof(fh)); + fh.filename = Z_STRVAL_PP(filename); + Z_TYPE(fh) = ZEND_HANDLE_FILENAME; + + array_init(return_value); + zend_parse_ini_file(&fh, 0, ini_parser_cb, return_value); +} +/* }}} */ + +static int copy_request_variable(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) +{ + char *prefix, *new_key; + uint prefix_len, new_key_len; + zval **var = (zval **) pDest; + TSRMLS_FETCH(); + + if (num_args != 2) { + return 0; + } + + prefix = va_arg(args, char *); + prefix_len = va_arg(args, uint); + + if (!prefix_len && !hash_key->nKeyLength) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard"); + return 0; + } + + if (hash_key->nKeyLength) { + new_key_len = prefix_len + hash_key->nKeyLength; + new_key = (char *) emalloc(new_key_len); /* +1 comes from nKeyLength */ + + memcpy(new_key, prefix, prefix_len); + memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength); + } else { + new_key_len = spprintf(&new_key, 0, "%s%ld", prefix, hash_key->h); + new_key_len++; + } + + if (php_varname_check(new_key, new_key_len, 0 TSRMLS_CC) == FAILURE) { + efree(new_key); + return 0; + } + + zend_delete_global_variable(new_key, new_key_len-1 TSRMLS_CC); + ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), new_key, new_key_len, *var, (*var)->refcount+1, 0); + + efree(new_key); + return 0; +} + +/* {{{ proto bool import_request_variables(string types [, string prefix]) + Import GET/POST/Cookie variables into the global scope */ +PHP_FUNCTION(import_request_variables) +{ + zval **z_types, **z_prefix; + char *types, *prefix; + uint prefix_len; + char *p; + + switch (ZEND_NUM_ARGS()) { + + case 1: + if (zend_get_parameters_ex(1, &z_types) == FAILURE) { + RETURN_FALSE; + } + prefix = ""; + prefix_len = 0; + break; + + case 2: + if (zend_get_parameters_ex(2, &z_types, &z_prefix) == FAILURE) { + RETURN_FALSE; + } + convert_to_string_ex(z_prefix); + prefix = Z_STRVAL_PP(z_prefix); + prefix_len = Z_STRLEN_PP(z_prefix); + break; + + default: + ZEND_WRONG_PARAM_COUNT(); + } + + if (prefix_len == 0) { + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "No prefix specified - possible security hazard"); + } + + convert_to_string_ex(z_types); + types = Z_STRVAL_PP(z_types); + + for (p = types; p && *p; p++) { + switch (*p) { + + case 'g': + case 'G': + zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len); + break; + + case 'p': + case 'P': + zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len); + zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_FILES]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len); + break; + + case 'c': + case 'C': + zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len); + break; + } + } +} +/* }}} */ + +#ifdef HAVE_GETLOADAVG +/* {{{ proto array sys_getloadavg() + */ +PHP_FUNCTION(sys_getloadavg) +{ + double load[3]; + + if (getloadavg(load, 3) == -1) { + RETURN_FALSE; + } else { + array_init(return_value); + add_index_double(return_value, 0, load[0]); + add_index_double(return_value, 1, load[1]); + add_index_double(return_value, 2, load[2]); + } +} +/* }}} */ +#endif + + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: fdm=marker + * vim: noet sw=4 ts=4 + */ diff -Naur php-5.2.5/ext/standard/dl.c php-5.2.5-suhosin/ext/standard/dl.c --- php-5.2.5/ext/standard/dl.c 2007-09-18 22:19:34.000000000 +0200 +++ php-5.2.5-suhosin/ext/standard/dl.c 2007-11-12 12:38:56.000000000 +0100 @@ -246,6 +246,19 @@ RETURN_FALSE; } } +#if SUHOSIN_PATCH + if (strncmp("suhosin", module_entry->name, sizeof("suhosin")-1) == 0) { + void *log_func; + /* sucessfully loaded suhosin extension, now check for logging function replacement */ + log_func = (void *) DL_FETCH_SYMBOL(handle, "suhosin_log"); + if (log_func == NULL) { + log_func = (void *) DL_FETCH_SYMBOL(handle, "_suhosin_log"); + } + if (log_func != NULL) { + zend_suhosin_log = log_func; + } + } +#endif RETURN_TRUE; } /* }}} */ diff -Naur php-5.2.5/ext/standard/dl.c.orig php-5.2.5-suhosin/ext/standard/dl.c.orig --- php-5.2.5/ext/standard/dl.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/ext/standard/dl.c.orig 2007-09-18 22:19:34.000000000 +0200 @@ -0,0 +1,280 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2007 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Brian Schaffner | + | Shane Caraveo | + | Zeev Suraski | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +#include "php.h" +#include "dl.h" +#include "php_globals.h" +#include "php_ini.h" +#include "ext/standard/info.h" + +#include "SAPI.h" + +#if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H +#include +#include + +#ifdef HAVE_STRING_H +#include +#else +#include +#endif +#ifdef PHP_WIN32 +#include "win32/param.h" +#include "win32/winutil.h" +#define GET_DL_ERROR() php_win_err() +#elif defined(NETWARE) +#include +#define GET_DL_ERROR() dlerror() +#else +#include +#define GET_DL_ERROR() DL_ERROR() +#endif + +#endif /* defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H */ + + +/* {{{ proto int dl(string extension_filename) + Load a PHP extension at runtime */ +PHP_FUNCTION(dl) +{ + zval **file; + + /* obtain arguments */ + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(file); + + if (!PG(enable_dl)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dynamically loaded extensions aren't enabled"); + RETURN_FALSE; + } else if (PG(safe_mode)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dynamically loaded extensions aren't allowed when running in Safe Mode"); + RETURN_FALSE; + } + + if (Z_STRLEN_PP(file) >= MAXPATHLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "File name exceeds the maximum allowed length of %d characters", MAXPATHLEN); + RETURN_FALSE; + } + + if ((strncmp(sapi_module.name, "cgi", 3)!=0) && + (strcmp(sapi_module.name, "cli")!=0) && + (strncmp(sapi_module.name, "embed", 5)!=0)) { +#ifdef ZTS + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in multithreaded Web servers - use extension=%s in your php.ini", Z_STRVAL_PP(file)); + RETURN_FALSE; +#else + php_error_docref(NULL TSRMLS_CC, E_STRICT, "dl() is deprecated - use extension=%s in your php.ini", Z_STRVAL_PP(file)); +#endif + } + + php_dl(*file, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC); + EG(full_tables_cleanup) = 1; +} + +/* }}} */ + + +#if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H + +#ifdef ZTS +#define USING_ZTS 1 +#else +#define USING_ZTS 0 +#endif + +/* {{{ php_dl + */ +void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC) +{ + void *handle; + char *libpath; + zend_module_entry *module_entry; + zend_module_entry *(*get_module)(void); + int error_type; + char *extension_dir; + + if (type == MODULE_PERSISTENT) { + extension_dir = INI_STR("extension_dir"); + } else { + extension_dir = PG(extension_dir); + } + + if (type == MODULE_TEMPORARY) { + error_type = E_WARNING; + } else { + error_type = E_CORE_WARNING; + } + + if (extension_dir && extension_dir[0]){ + int extension_dir_len = strlen(extension_dir); + + if (type == MODULE_TEMPORARY) { + if (strchr(Z_STRVAL_P(file), '/') != NULL || strchr(Z_STRVAL_P(file), DEFAULT_SLASH) != NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Temporary module name should contain only filename"); + RETURN_FALSE; + } + } + + if (IS_SLASH(extension_dir[extension_dir_len-1])) { + spprintf(&libpath, 0, "%s%s", extension_dir, Z_STRVAL_P(file)); + } else { + spprintf(&libpath, 0, "%s%c%s", extension_dir, DEFAULT_SLASH, Z_STRVAL_P(file)); + } + } else { + libpath = estrndup(Z_STRVAL_P(file), Z_STRLEN_P(file)); + } + + /* load dynamic symbol */ + handle = DL_LOAD(libpath); + if (!handle) { + php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s' - %s", libpath, GET_DL_ERROR()); + GET_DL_ERROR(); /* free the buffer storing the error */ + efree(libpath); + RETURN_FALSE; + } + + efree(libpath); + + get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "get_module"); + + /* + * some OS prepend _ to symbol names while their dynamic linker + * does not do that automatically. Thus we check manually for + * _get_module. + */ + + if (!get_module) + get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "_get_module"); + + if (!get_module) { + DL_UNLOAD(handle); + php_error_docref(NULL TSRMLS_CC, error_type, "Invalid library (maybe not a PHP library) '%s' ", Z_STRVAL_P(file)); + RETURN_FALSE; + } + module_entry = get_module(); + if ((module_entry->zend_debug != ZEND_DEBUG) || (module_entry->zts != USING_ZTS) + || (module_entry->zend_api != ZEND_MODULE_API_NO)) { + /* Check for pre-4.1.0 module which has a slightly different module_entry structure :( */ + struct pre_4_1_0_module_entry { + char *name; + zend_function_entry *functions; + int (*module_startup_func)(INIT_FUNC_ARGS); + int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS); + int (*request_startup_func)(INIT_FUNC_ARGS); + int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS); + void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS); + int (*global_startup_func)(void); + int (*global_shutdown_func)(void); + int globals_id; + int module_started; + unsigned char type; + void *handle; + int module_number; + unsigned char zend_debug; + unsigned char zts; + unsigned int zend_api; + }; + + char *name; + int zend_api; + unsigned char zend_debug, zts; + + if ((((struct pre_4_1_0_module_entry *)module_entry)->zend_api > 20000000) && + (((struct pre_4_1_0_module_entry *)module_entry)->zend_api < 20010901) + ) { + name = ((struct pre_4_1_0_module_entry *)module_entry)->name; + zend_api = ((struct pre_4_1_0_module_entry *)module_entry)->zend_api; + zend_debug = ((struct pre_4_1_0_module_entry *)module_entry)->zend_debug; + zts = ((struct pre_4_1_0_module_entry *)module_entry)->zts; + } else { + name = module_entry->name; + zend_api = module_entry->zend_api; + zend_debug = module_entry->zend_debug; + zts = module_entry->zts; + } + + php_error_docref(NULL TSRMLS_CC, error_type, + "%s: Unable to initialize module\n" + "Module compiled with module API=%d, debug=%d, thread-safety=%d\n" + "PHP compiled with module API=%d, debug=%d, thread-safety=%d\n" + "These options need to match\n", + name, zend_api, zend_debug, zts, + ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS); + DL_UNLOAD(handle); + RETURN_FALSE; + } + module_entry->type = type; + module_entry->module_number = zend_next_free_module(); + module_entry->handle = handle; + + if ((module_entry = zend_register_module_ex(module_entry TSRMLS_CC)) == NULL) { + DL_UNLOAD(handle); + RETURN_FALSE; + } + + if ((type == MODULE_TEMPORARY || start_now) && zend_startup_module_ex(module_entry TSRMLS_CC) == FAILURE) { + DL_UNLOAD(handle); + RETURN_FALSE; + } + + if ((type == MODULE_TEMPORARY || start_now) && module_entry->request_startup_func) { + if (module_entry->request_startup_func(type, module_entry->module_number TSRMLS_CC) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, error_type, "Unable to initialize module '%s'", module_entry->name); + DL_UNLOAD(handle); + RETURN_FALSE; + } + } + RETURN_TRUE; +} +/* }}} */ + +PHP_MINFO_FUNCTION(dl) +{ + php_info_print_table_row(2, "Dynamic Library Support", "enabled"); +} + +#else + +void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC) +{ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", Z_STRVAL_P(file)); + RETURN_FALSE; +} + +PHP_MINFO_FUNCTION(dl) +{ + PUTS("Dynamic Library support not available
.\n"); +} + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/ext/standard/file.c php-5.2.5-suhosin/ext/standard/file.c --- php-5.2.5/ext/standard/file.c 2007-09-04 14:51:49.000000000 +0200 +++ php-5.2.5-suhosin/ext/standard/file.c 2007-11-12 12:38:56.000000000 +0100 @@ -2361,7 +2361,7 @@ #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS) /* {{{ proto string realpath(string path) Return the resolved path */ -PHP_FUNCTION(realpath) +PHP_FUNCTION(real_path) { zval **path; char resolved_path_buff[MAXPATHLEN]; diff -Naur php-5.2.5/ext/standard/file.h php-5.2.5-suhosin/ext/standard/file.h --- php-5.2.5/ext/standard/file.h 2007-01-10 15:40:06.000000000 +0100 +++ php-5.2.5-suhosin/ext/standard/file.h 2007-11-12 12:38:56.000000000 +0100 @@ -61,7 +61,7 @@ PHP_FUNCTION(fd_set); PHP_FUNCTION(fd_isset); #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS) -PHP_FUNCTION(realpath); +PHP_FUNCTION(real_path); #endif #ifdef HAVE_FNMATCH PHP_FUNCTION(fnmatch); diff -Naur php-5.2.5/ext/standard/info.c php-5.2.5-suhosin/ext/standard/info.c --- php-5.2.5/ext/standard/info.c 2007-07-21 03:24:26.000000000 +0200 +++ php-5.2.5-suhosin/ext/standard/info.c 2007-11-12 12:38:56.000000000 +0100 @@ -627,6 +627,31 @@ php_info_print_table_end(); + /* Suhosin Patch */ + php_info_print_box_start(0); + if (expose_php && !sapi_module.phpinfo_as_text) { + PUTS("\"Suhosin\n"); + } + PUTS("This server is protected with the Suhosin Patch "); + if (sapi_module.phpinfo_as_text) { + PUTS(SUHOSIN_PATCH_VERSION); + } else { + zend_html_puts(SUHOSIN_PATCH_VERSION, strlen(SUHOSIN_PATCH_VERSION) TSRMLS_CC); + } + PUTS(!sapi_module.phpinfo_as_text?"
":"\n"); + if (sapi_module.phpinfo_as_text) { + PUTS("Copyright (c) 2006 Hardened-PHP Project\n"); + } else { + PUTS("Copyright (c) 2006 Hardened-PHP Project\n"); + } + php_info_print_box_end(); + /* Zend Engine */ php_info_print_box_start(0); if (expose_php && !sapi_module.phpinfo_as_text) { diff -Naur php-5.2.5/ext/standard/syslog.c php-5.2.5-suhosin/ext/standard/syslog.c --- php-5.2.5/ext/standard/syslog.c 2007-05-17 08:38:13.000000000 +0200 +++ php-5.2.5-suhosin/ext/standard/syslog.c 2007-11-12 12:38:56.000000000 +0100 @@ -42,6 +42,7 @@ */ PHP_MINIT_FUNCTION(syslog) { +#if !SUHOSIN_PATCH /* error levels */ REGISTER_LONG_CONSTANT("LOG_EMERG", LOG_EMERG, CONST_CS | CONST_PERSISTENT); /* system unusable */ REGISTER_LONG_CONSTANT("LOG_ALERT", LOG_ALERT, CONST_CS | CONST_PERSISTENT); /* immediate action required */ @@ -97,6 +98,7 @@ /* AIX doesn't have LOG_PERROR */ REGISTER_LONG_CONSTANT("LOG_PERROR", LOG_PERROR, CONST_CS | CONST_PERSISTENT); /*log to stderr*/ #endif +#endif BG(syslog_device)=NULL; return SUCCESS; diff -Naur php-5.2.5/main/fopen_wrappers.c php-5.2.5-suhosin/main/fopen_wrappers.c --- php-5.2.5/main/fopen_wrappers.c 2007-10-09 12:06:34.000000000 +0200 +++ php-5.2.5-suhosin/main/fopen_wrappers.c 2007-11-12 12:38:56.000000000 +0100 @@ -110,7 +110,7 @@ /* normalize and expand path */ if (expand_filepath(path, resolved_name TSRMLS_CC) == NULL) { - return -1; + return -2; } path_len = strlen(resolved_name); @@ -179,6 +179,12 @@ } } + if (resolved_name_len == resolved_basedir_len - 1) { + if (resolved_basedir[resolved_basedir_len - 1] == PHP_DIR_SEPARATOR) { + resolved_basedir_len--; + } + } + /* Check the path */ #if defined(PHP_WIN32) || defined(NETWARE) if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { @@ -202,7 +208,7 @@ } } else { /* Unable to resolve the real path, return -1 */ - return -1; + return -3; } } /* }}} */ @@ -221,22 +227,44 @@ char *pathbuf; char *ptr; char *end; + char path_copy[MAXPATHLEN]; + int path_len; + + /* Special case path ends with a trailing slash */ + path_len = strlen(path); + if (path_len >= MAXPATHLEN) { + errno = EPERM; /* we deny permission to open it */ + return -1; + } + if (path_len > 0 && path[path_len-1] == PHP_DIR_SEPARATOR) { + memcpy(path_copy, path, path_len+1); + while (path_len > 0 && path_copy[path_len-1] == PHP_DIR_SEPARATOR) path_len--; + path_copy[path_len] = '\0'; + path = (const char *)&path_copy; + } pathbuf = estrdup(PG(open_basedir)); ptr = pathbuf; while (ptr && *ptr) { + int res; end = strchr(ptr, DEFAULT_DIR_SEPARATOR); if (end != NULL) { *end = '\0'; end++; } - if (php_check_specific_open_basedir(ptr, path TSRMLS_CC) == 0) { + res = php_check_specific_open_basedir(ptr, path TSRMLS_CC); + if (res == 0) { efree(pathbuf); return 0; } + if (res == -2) { + efree(pathbuf); + errno = EPERM; + return -1; + } ptr = end; } diff -Naur php-5.2.5/main/fopen_wrappers.c.orig php-5.2.5-suhosin/main/fopen_wrappers.c.orig --- php-5.2.5/main/fopen_wrappers.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/fopen_wrappers.c.orig 2007-10-09 12:06:34.000000000 +0200 @@ -0,0 +1,660 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2007 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Rasmus Lerdorf | + | Jim Winstead | + +----------------------------------------------------------------------+ + */ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +/* {{{ includes + */ +#include "php.h" +#include "php_globals.h" +#include "SAPI.h" + +#include +#include +#include +#include +#include +#include + +#ifdef PHP_WIN32 +#define O_RDONLY _O_RDONLY +#include "win32/param.h" +#else +#include +#endif + +#include "safe_mode.h" +#include "ext/standard/head.h" +#include "ext/standard/php_standard.h" +#include "zend_compile.h" +#include "php_network.h" + +#if HAVE_PWD_H +#include +#endif + +#include +#if HAVE_SYS_SOCKET_H +#include +#endif + +#ifndef S_ISREG +#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) +#endif + +#ifdef PHP_WIN32 +#include +#elif defined(NETWARE) && defined(USE_WINSOCK) +#include +#else +#include +#include +#if HAVE_ARPA_INET_H +#include +#endif +#endif + +#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE) +#undef AF_UNIX +#endif + +#if defined(AF_UNIX) +#include +#endif +/* }}} */ + +/* {{{ php_check_specific_open_basedir + When open_basedir is not NULL, check if the given filename is located in + open_basedir. Returns -1 if error or not in the open_basedir, else 0. + When open_basedir is NULL, always return 0. +*/ +PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path TSRMLS_DC) +{ + char resolved_name[MAXPATHLEN]; + char resolved_basedir[MAXPATHLEN]; + char local_open_basedir[MAXPATHLEN]; + char path_tmp[MAXPATHLEN]; + char *path_file; + int resolved_basedir_len; + int resolved_name_len; + int path_len; + int nesting_level = 0; + + /* Special case basedir==".": Use script-directory */ + if (strcmp(basedir, ".") || !VCWD_GETCWD(local_open_basedir, MAXPATHLEN)) { + /* Else use the unmodified path */ + strlcpy(local_open_basedir, basedir, sizeof(local_open_basedir)); + } + + path_len = strlen(path); + if (path_len > (MAXPATHLEN - 1)) { + /* empty and too long paths are invalid */ + return -1; + } + + /* normalize and expand path */ + if (expand_filepath(path, resolved_name TSRMLS_CC) == NULL) { + return -1; + } + + path_len = strlen(resolved_name); + memcpy(path_tmp, resolved_name, path_len + 1); /* safe */ + + while (VCWD_REALPATH(path_tmp, resolved_name) == NULL) { +#ifdef HAVE_SYMLINK + if (nesting_level == 0) { + int ret; + char buf[MAXPATHLEN]; + + ret = readlink(path_tmp, buf, MAXPATHLEN - 1); + if (ret < 0) { + /* not a broken symlink, move along.. */ + } else { + /* put the real path into the path buffer */ + memcpy(path_tmp, buf, ret); + path_tmp[ret] = '\0'; + } + } +#endif + +#if defined(PHP_WIN32) || defined(NETWARE) + path_file = strrchr(path_tmp, DEFAULT_SLASH); + if (!path_file) { + path_file = strrchr(path_tmp, '/'); + } +#else + path_file = strrchr(path_tmp, DEFAULT_SLASH); +#endif + if (!path_file) { + /* none of the path components exist. definitely not in open_basedir.. */ + return -1; + } else { + path_len = path_file - path_tmp + 1; +#if defined(PHP_WIN32) || defined(NETWARE) + if (path_len > 1 && path_tmp[path_len - 2] == ':') { + /* this is c:\ */ + path_tmp[path_len] = '\0'; + } else { + path_tmp[path_len - 1] = '\0'; + } +#else + path_tmp[path_len - 1] = '\0'; +#endif + } + nesting_level++; + } + + /* Resolve open_basedir to resolved_basedir */ + if (expand_filepath(local_open_basedir, resolved_basedir TSRMLS_CC) != NULL) { + /* Handler for basedirs that end with a / */ + resolved_basedir_len = strlen(resolved_basedir); + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { + if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { + resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; + resolved_basedir[++resolved_basedir_len] = '\0'; + } + } + + resolved_name_len = strlen(resolved_name); + if (path_tmp[path_len - 1] == PHP_DIR_SEPARATOR) { + if (resolved_name[resolved_name_len - 1] != PHP_DIR_SEPARATOR) { + resolved_name[resolved_name_len] = PHP_DIR_SEPARATOR; + resolved_name[++resolved_name_len] = '\0'; + } + } + + /* Check the path */ +#if defined(PHP_WIN32) || defined(NETWARE) + if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { +#else + if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { +#endif + /* File is in the right directory */ + return 0; + } else { + /* /openbasedir/ and /openbasedir are the same directory */ + if (resolved_basedir_len == (resolved_name_len + 1) && resolved_basedir[resolved_basedir_len - 1] == PHP_DIR_SEPARATOR) { +#if defined(PHP_WIN32) || defined(NETWARE) + if (strncasecmp(resolved_basedir, resolved_name, resolved_name_len) == 0) { +#else + if (strncmp(resolved_basedir, resolved_name, resolved_name_len) == 0) { +#endif + return 0; + } + } + return -1; + } + } else { + /* Unable to resolve the real path, return -1 */ + return -1; + } +} +/* }}} */ + +PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC) +{ + return php_check_open_basedir_ex(path, 1 TSRMLS_CC); +} + +/* {{{ php_check_open_basedir + */ +PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC) +{ + /* Only check when open_basedir is available */ + if (PG(open_basedir) && *PG(open_basedir)) { + char *pathbuf; + char *ptr; + char *end; + + pathbuf = estrdup(PG(open_basedir)); + + ptr = pathbuf; + + while (ptr && *ptr) { + end = strchr(ptr, DEFAULT_DIR_SEPARATOR); + if (end != NULL) { + *end = '\0'; + end++; + } + + if (php_check_specific_open_basedir(ptr, path TSRMLS_CC) == 0) { + efree(pathbuf); + return 0; + } + + ptr = end; + } + if (warn) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s)", path, PG(open_basedir)); + } + efree(pathbuf); + errno = EPERM; /* we deny permission to open it */ + return -1; + } + + /* Nothing to check... */ + return 0; +} +/* }}} */ + +/* {{{ php_check_safe_mode_include_dir + */ +PHPAPI int php_check_safe_mode_include_dir(const char *path TSRMLS_DC) +{ + if (PG(safe_mode)) { + if (PG(safe_mode_include_dir) && *PG(safe_mode_include_dir)) { + char *pathbuf; + char *ptr; + char *end; + char resolved_name[MAXPATHLEN]; + + /* Resolve the real path into resolved_name */ + if (expand_filepath(path, resolved_name TSRMLS_CC) == NULL) { + return -1; + } + pathbuf = estrdup(PG(safe_mode_include_dir)); + ptr = pathbuf; + + while (ptr && *ptr) { + end = strchr(ptr, DEFAULT_DIR_SEPARATOR); + if (end != NULL) { + *end = '\0'; + end++; + } + + /* Check the path */ +#ifdef PHP_WIN32 + if (strncasecmp(ptr, resolved_name, strlen(ptr)) == 0) +#else + if (strncmp(ptr, resolved_name, strlen(ptr)) == 0) +#endif + { + /* File is in the right directory */ + efree(pathbuf); + return 0; + } + + ptr = end; + } + efree(pathbuf); + } + return -1; + } + + /* Nothing to check... */ + return 0; +} +/* }}} */ + +/* {{{ php_fopen_and_set_opened_path + */ +static FILE *php_fopen_and_set_opened_path(const char *path, const char *mode, char **opened_path TSRMLS_DC) +{ + FILE *fp; + + if (php_check_open_basedir((char *)path TSRMLS_CC)) { + return NULL; + } + fp = VCWD_FOPEN(path, mode); + if (fp && opened_path) { + *opened_path = expand_filepath(path, NULL TSRMLS_CC); + } + return fp; +} +/* }}} */ + +/* {{{ php_fopen_primary_script + */ +PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC) +{ + FILE *fp; +#ifndef PHP_WIN32 + struct stat st; +#endif + char *path_info, *filename; + int length; + + filename = SG(request_info).path_translated; + path_info = SG(request_info).request_uri; +#if HAVE_PWD_H + if (PG(user_dir) && *PG(user_dir) && path_info && '/' == path_info[0] && '~' == path_info[1]) { + char *s = strchr(path_info + 2, '/'); + + filename = NULL; /* discard the original filename, it must not be used */ + if (s) { /* if there is no path name after the file, do not bother */ + char user[32]; /* to try open the directory */ + struct passwd *pw; +#if defined(ZTS) && defined(HAVE_GETPWNAM_R) && defined(_SC_GETPW_R_SIZE_MAX) + struct passwd pwstruc; + long pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); + char *pwbuf; + + if (pwbuflen < 1) { + return FAILURE; + } + + pwbuf = emalloc(pwbuflen); +#endif + length = s - (path_info + 2); + if (length > (int)sizeof(user) - 1) { + length = sizeof(user) - 1; + } + memcpy(user, path_info + 2, length); + user[length] = '\0'; +#if defined(ZTS) && defined(HAVE_GETPWNAM_R) && defined(_SC_GETPW_R_SIZE_MAX) + if (getpwnam_r(user, &pwstruc, pwbuf, pwbuflen, &pw)) { + efree(pwbuf); + return FAILURE; + } +#else + pw = getpwnam(user); +#endif + if (pw && pw->pw_dir) { + spprintf(&filename, 0, "%s%c%s%c%s", pw->pw_dir, PHP_DIR_SEPARATOR, PG(user_dir), PHP_DIR_SEPARATOR, s + 1); /* Safe */ + STR_FREE(SG(request_info).path_translated); + SG(request_info).path_translated = filename; + } +#if defined(ZTS) && defined(HAVE_GETPWNAM_R) && defined(_SC_GETPW_R_SIZE_MAX) + efree(pwbuf); +#endif + } + } else +#endif + if (PG(doc_root) && path_info) { + length = strlen(PG(doc_root)); + if (IS_ABSOLUTE_PATH(PG(doc_root), length)) { + filename = emalloc(length + strlen(path_info) + 2); + if (filename) { + memcpy(filename, PG(doc_root), length); + if (!IS_SLASH(filename[length - 1])) { /* length is never 0 */ + filename[length++] = PHP_DIR_SEPARATOR; + } + if (IS_SLASH(path_info[0])) { + length--; + } + strcpy(filename + length, path_info); + STR_FREE(SG(request_info).path_translated); + SG(request_info).path_translated = filename; + } + } + } /* if doc_root && path_info */ + + if (!filename) { + /* we have to free SG(request_info).path_translated here because + * php_destroy_request_info assumes that it will get + * freed when the include_names hash is emptied, but + * we're not adding it in this case */ + STR_FREE(SG(request_info).path_translated); + SG(request_info).path_translated = NULL; + return FAILURE; + } + fp = VCWD_FOPEN(filename, "rb"); + +#ifndef PHP_WIN32 + /* refuse to open anything that is not a regular file */ + if (fp && (0 > fstat(fileno(fp), &st) || !S_ISREG(st.st_mode))) { + fclose(fp); + fp = NULL; + } +#endif + + if (!fp) { + STR_FREE(SG(request_info).path_translated); /* for same reason as above */ + SG(request_info).path_translated = NULL; + return FAILURE; + } + + file_handle->opened_path = expand_filepath(filename, NULL TSRMLS_CC); + + if (!(SG(options) & SAPI_OPTION_NO_CHDIR)) { + VCWD_CHDIR_FILE(filename); + } + SG(request_info).path_translated = filename; + + file_handle->filename = SG(request_info).path_translated; + file_handle->free_filename = 0; + file_handle->handle.fp = fp; + file_handle->type = ZEND_HANDLE_FP; + + return SUCCESS; +} +/* }}} */ + +/* {{{ php_fopen_with_path + * Tries to open a file with a PATH-style list of directories. + * If the filename starts with "." or "/", the path is ignored. + */ +PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, char **opened_path TSRMLS_DC) +{ + char *pathbuf, *ptr, *end; + char *exec_fname; + char trypath[MAXPATHLEN]; + struct stat sb; + FILE *fp; + int path_length; + int filename_length; + int exec_fname_length; + + if (opened_path) { + *opened_path = NULL; + } + + if (!filename) { + return NULL; + } + + filename_length = strlen(filename); + + /* Relative path open */ + if (*filename == '.') { + if (PG(safe_mode) && (!php_checkuid(filename, mode, CHECKUID_CHECK_MODE_PARAM))) { + return NULL; + } + return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); + } + + /* + * files in safe_mode_include_dir (or subdir) are excluded from + * safe mode GID/UID checks + */ + + /* Absolute path open */ + if (IS_ABSOLUTE_PATH(filename, filename_length)) { + if (php_check_safe_mode_include_dir(filename TSRMLS_CC) == 0) { + /* filename is in safe_mode_include_dir (or subdir) */ + return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); + } + if (PG(safe_mode) && (!php_checkuid(filename, mode, CHECKUID_CHECK_MODE_PARAM))) { + return NULL; + } + return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); + } + + if (!path || (path && !*path)) { + if (PG(safe_mode) && (!php_checkuid(filename, mode, CHECKUID_CHECK_MODE_PARAM))) { + return NULL; + } + return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); + } + + /* check in provided path */ + /* append the calling scripts' current working directory + * as a fall back case + */ + if (zend_is_executing(TSRMLS_C)) { + exec_fname = zend_get_executed_filename(TSRMLS_C); + exec_fname_length = strlen(exec_fname); + path_length = strlen(path); + + while ((--exec_fname_length >= 0) && !IS_SLASH(exec_fname[exec_fname_length])); + if ((exec_fname && exec_fname[0] == '[') || exec_fname_length <= 0) { + /* [no active file] or no path */ + pathbuf = estrdup(path); + } else { + pathbuf = (char *) emalloc(exec_fname_length + path_length + 1 + 1); + memcpy(pathbuf, path, path_length); + pathbuf[path_length] = DEFAULT_DIR_SEPARATOR; + memcpy(pathbuf + path_length + 1, exec_fname, exec_fname_length); + pathbuf[path_length + exec_fname_length + 1] = '\0'; + } + } else { + pathbuf = estrdup(path); + } + + ptr = pathbuf; + + while (ptr && *ptr) { + end = strchr(ptr, DEFAULT_DIR_SEPARATOR); + if (end != NULL) { + *end = '\0'; + end++; + } + snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename); + if (PG(safe_mode)) { + if (VCWD_STAT(trypath, &sb) == 0) { + /* file exists ... check permission */ + if (php_check_safe_mode_include_dir(trypath TSRMLS_CC) == 0 || + php_checkuid(trypath, mode, CHECKUID_CHECK_MODE_PARAM) + ) { + /* UID ok, or trypath is in safe_mode_include_dir */ + fp = php_fopen_and_set_opened_path(trypath, mode, opened_path TSRMLS_CC); + } else { + fp = NULL; + } + efree(pathbuf); + return fp; + } + } + fp = php_fopen_and_set_opened_path(trypath, mode, opened_path TSRMLS_CC); + if (fp) { + efree(pathbuf); + return fp; + } + ptr = end; + } /* end provided path */ + + efree(pathbuf); + return NULL; +} +/* }}} */ + +/* {{{ php_strip_url_passwd + */ +PHPAPI char *php_strip_url_passwd(char *url) +{ + register char *p, *url_start; + + if (url == NULL) { + return ""; + } + + p = url; + + while (*p) { + if (*p == ':' && *(p + 1) == '/' && *(p + 2) == '/') { + /* found protocol */ + url_start = p = p + 3; + + while (*p) { + if (*p == '@') { + int i; + + for (i = 0; i < 3 && url_start < p; i++, url_start++) { + *url_start = '.'; + } + for (; *p; p++) { + *url_start++ = *p; + } + *url_start=0; + break; + } + p++; + } + return url; + } + p++; + } + return url; +} +/* }}} */ + +/* {{{ expand_filepath + */ +PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC) +{ + cwd_state new_state; + char cwd[MAXPATHLEN]; + int copy_len; + + if (!filepath[0]) { + return NULL; + } else if (IS_ABSOLUTE_PATH(filepath, strlen(filepath))) { + cwd[0] = '\0'; + } else { + const char *iam = SG(request_info).path_translated; + char *result = VCWD_GETCWD(cwd, MAXPATHLEN); + + if (!result && (iam != filepath)) { + int fdtest = -1; + + fdtest = VCWD_OPEN(filepath, O_RDONLY); + if (fdtest != -1) { + /* return a relative file path if for any reason + * we cannot cannot getcwd() and the requested, + * relatively referenced file is accessible */ + copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath); + real_path = estrndup(filepath, copy_len); + return real_path; + } else { + cwd[0] = '\0'; + } + } else if (!result) { + cwd[0] = '\0'; + } + } + + new_state.cwd = strdup(cwd); + new_state.cwd_length = strlen(cwd); + + if (virtual_file_ex(&new_state, filepath, NULL, CWD_FILEPATH)) { + free(new_state.cwd); + return NULL; + } + + if (real_path) { + copy_len = new_state.cwd_length > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : new_state.cwd_length; + memcpy(real_path, new_state.cwd, copy_len); + real_path[copy_len] = '\0'; + } else { + real_path = estrndup(new_state.cwd, new_state.cwd_length); + } + free(new_state.cwd); + + return real_path; +} +/* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/main/main.c php-5.2.5-suhosin/main/main.c --- php-5.2.5/main/main.c 2007-10-18 15:11:30.000000000 +0200 +++ php-5.2.5-suhosin/main/main.c 2007-11-12 12:38:56.000000000 +0100 @@ -88,6 +88,9 @@ #include "SAPI.h" #include "rfc1867.h" +#if SUHOSIN_PATCH +#include "suhosin_globals.h" +#endif /* }}} */ #ifndef ZTS @@ -1369,7 +1372,7 @@ /* used to close fd's in the 3..255 range here, but it's problematic */ - shutdown_memory_manager(1, 1 TSRMLS_CC); + shutdown_memory_manager(1, 1 TSRMLS_CC); } /* }}} */ @@ -1410,6 +1413,9 @@ zend_try { shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC); +#if SUHOSIN_PATCH + suhosin_clear_mm_canaries(TSRMLS_C); +#endif } zend_end_try(); zend_try { @@ -1502,6 +1508,9 @@ /* 11. Free Willy (here be crashes) */ zend_try { shutdown_memory_manager(CG(unclean_shutdown) || !report_memleaks, 0 TSRMLS_CC); +#if SUHOSIN_PATCH + suhosin_clear_mm_canaries(TSRMLS_C); +#endif } zend_end_try(); /* 12. Reset max_execution_time */ @@ -1661,6 +1670,9 @@ #ifdef ZTS tsrm_ls = ts_resource(0); #endif +#if SUHOSIN_PATCH + suhosin_startup(); +#endif module_shutdown = 0; module_startup = 1; @@ -1790,6 +1802,10 @@ REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_PATH", PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT("PHP_SHLIB_SUFFIX", PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS); +#if SUHOSIN_PATCH + REGISTER_MAIN_LONG_CONSTANT("SUHOSIN_PATCH", 1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("SUHOSIN_PATCH_VERSION", SUHOSIN_PATCH_VERSION, sizeof(SUHOSIN_PATCH_VERSION)-1, CONST_PERSISTENT | CONST_CS); +#endif REGISTER_MAIN_STRINGL_CONSTANT("PHP_EOL", PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), CONST_PERSISTENT | CONST_CS); @@ -1839,7 +1855,9 @@ module_startup = 0; shutdown_memory_manager(1, 0 TSRMLS_CC); - +#if SUHOSIN_PATCH + suhosin_clear_mm_canaries(TSRMLS_C); +#endif /* we're done */ return SUCCESS; } @@ -1898,6 +1916,9 @@ #ifndef ZTS zend_ini_shutdown(TSRMLS_C); shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC); +#if SUHOSIN_PATCH + suhosin_clear_mm_canaries(TSRMLS_C); +#endif core_globals_dtor(&core_globals TSRMLS_CC); #else zend_ini_global_shutdown(TSRMLS_C); diff -Naur php-5.2.5/main/main.c.orig php-5.2.5-suhosin/main/main.c.orig --- php-5.2.5/main/main.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/main.c.orig 2007-10-18 15:11:30.000000000 +0200 @@ -0,0 +1,2154 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2007 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Andi Gutmans | + | Rasmus Lerdorf | + | Zeev Suraski | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +/* {{{ includes + */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS + +#include "php.h" +#include +#include +#ifdef PHP_WIN32 +#include "win32/time.h" +#include "win32/signal.h" +#include "win32/php_win32_globals.h" +#include +#elif defined(NETWARE) +#include +#ifdef USE_WINSOCK +#include +#endif +#endif +#if HAVE_SYS_TIME_H +#include +#endif +#if HAVE_UNISTD_H +#include +#endif +#if HAVE_SIGNAL_H +#include +#endif +#if HAVE_SETLOCALE +#include +#endif +#include "zend.h" +#include "zend_extensions.h" +#include "php_ini.h" +#include "php_globals.h" +#include "php_main.h" +#include "fopen_wrappers.h" +#include "ext/standard/php_standard.h" +#include "php_variables.h" +#include "ext/standard/credits.h" +#ifdef PHP_WIN32 +#include +#include "win32/php_registry.h" +#include "ext/standard/flock_compat.h" +#endif +#include "php_syslog.h" +#include "Zend/zend_exceptions.h" + +#if PHP_SIGCHILD +#include +#include +#endif + +#include "zend_compile.h" +#include "zend_execute.h" +#include "zend_highlight.h" +#include "zend_indent.h" +#include "zend_extensions.h" +#include "zend_ini.h" + +#include "php_content_types.h" +#include "php_ticks.h" +#include "php_logos.h" +#include "php_streams.h" +#include "php_open_temporary_file.h" + +#include "SAPI.h" +#include "rfc1867.h" +/* }}} */ + +#ifndef ZTS +php_core_globals core_globals; +#else +PHPAPI int core_globals_id; +#endif + +#define SAFE_FILENAME(f) ((f)?(f):"-") + +/* {{{ PHP_INI_MH + */ +static PHP_INI_MH(OnSetPrecision) +{ + int i = atoi(new_value); + if (i >= 0) { + EG(precision) = i; + return SUCCESS; + } else { + return FAILURE; + } +} +/* }}} */ + +/* {{{ PHP_INI_MH + */ +static PHP_INI_MH(OnChangeMemoryLimit) +{ + if (new_value) { + PG(memory_limit) = zend_atoi(new_value, new_value_length); + } else { + PG(memory_limit) = 1<<30; /* effectively, no limit */ + } + return zend_set_memory_limit(PG(memory_limit)); +} +/* }}} */ + + +/* {{{ php_disable_functions + */ +static void php_disable_functions(TSRMLS_D) +{ + char *s = NULL, *e; + + if (!*(INI_STR("disable_functions"))) { + return; + } + + e = PG(disable_functions) = strdup(INI_STR("disable_functions")); + + while (*e) { + switch (*e) { + case ' ': + case ',': + if (s) { + *e = '\0'; + zend_disable_function(s, e-s TSRMLS_CC); + s = NULL; + } + break; + default: + if (!s) { + s = e; + } + break; + } + e++; + } + if (s) { + zend_disable_function(s, e-s TSRMLS_CC); + } +} +/* }}} */ + +/* {{{ php_disable_classes + */ +static void php_disable_classes(TSRMLS_D) +{ + char *s = NULL, *e; + + if (!*(INI_STR("disable_classes"))) { + return; + } + + e = PG(disable_classes) = strdup(INI_STR("disable_classes")); + + while (*e) { + switch (*e) { + case ' ': + case ',': + if (s) { + *e = '\0'; + zend_disable_class(s, e-s TSRMLS_CC); + s = NULL; + } + break; + default: + if (!s) { + s = e; + } + break; + } + e++; + } + if (s) { + zend_disable_class(s, e-s TSRMLS_CC); + } +} +/* }}} */ + +/* {{{ PHP_INI_MH + */ +static PHP_INI_MH(OnUpdateTimeout) +{ + EG(timeout_seconds) = atoi(new_value); + if (stage==PHP_INI_STAGE_STARTUP) { + /* Don't set a timeout on startup, only per-request */ + return SUCCESS; + } + zend_unset_timeout(TSRMLS_C); + zend_set_timeout(EG(timeout_seconds)); + return SUCCESS; +} +/* }}} */ + +/* {{{ php_get_display_errors_mode() helper function + */ +static int php_get_display_errors_mode(char *value, int value_length) +{ + int mode; + + if (!value) { + return PHP_DISPLAY_ERRORS_STDOUT; + } + + if (value_length == 2 && !strcasecmp("on", value)) { + mode = PHP_DISPLAY_ERRORS_STDOUT; + } else if (value_length == 3 && !strcasecmp("yes", value)) { + mode = PHP_DISPLAY_ERRORS_STDOUT; + } else if (value_length == 4 && !strcasecmp("true", value)) { + mode = PHP_DISPLAY_ERRORS_STDOUT; + } else if (value_length == 6 && !strcasecmp(value, "stderr")) { + mode = PHP_DISPLAY_ERRORS_STDERR; + } else if (value_length == 6 && !strcasecmp(value, "stdout")) { + mode = PHP_DISPLAY_ERRORS_STDOUT; + } else { + mode = atoi(value); + if (mode && mode != PHP_DISPLAY_ERRORS_STDOUT && mode != PHP_DISPLAY_ERRORS_STDERR) { + mode = PHP_DISPLAY_ERRORS_STDOUT; + } + } + + return mode; +} +/* }}} */ + +/* {{{ PHP_INI_MH + */ +static PHP_INI_MH(OnUpdateDisplayErrors) +{ + PG(display_errors) = (zend_bool) php_get_display_errors_mode(new_value, new_value_length); + + return SUCCESS; +} +/* }}} */ + +/* {{{ PHP_INI_DISP + */ +static PHP_INI_DISP(display_errors_mode) +{ + int mode, tmp_value_length, cgi_or_cli; + char *tmp_value; + TSRMLS_FETCH(); + + if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) { + tmp_value = (ini_entry->orig_value ? ini_entry->orig_value : NULL ); + tmp_value_length = ini_entry->orig_value_length; + } else if (ini_entry->value) { + tmp_value = ini_entry->value; + tmp_value_length = ini_entry->value_length; + } else { + tmp_value = NULL; + tmp_value_length = 0; + } + + mode = php_get_display_errors_mode(tmp_value, tmp_value_length); + + /* Display 'On' for other SAPIs instead of STDOUT or STDERR */ + cgi_or_cli = (!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi")); + + switch (mode) { + case PHP_DISPLAY_ERRORS_STDERR: + if (cgi_or_cli ) { + PUTS("STDERR"); + } else { + PUTS("On"); + } + break; + + case PHP_DISPLAY_ERRORS_STDOUT: + if (cgi_or_cli ) { + PUTS("STDOUT"); + } else { + PUTS("On"); + } + break; + + default: + PUTS("Off"); + break; + } +} +/* }}} */ + +/* {{{ PHP_INI_MH + */ +static PHP_INI_MH(OnUpdateErrorLog) +{ + /* Only do the safemode/open_basedir check at runtime */ + if ((stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) && + strcmp(new_value, "syslog")) { + if (PG(safe_mode) && (!php_checkuid(new_value, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + return FAILURE; + } + + if (PG(open_basedir) && php_check_open_basedir(new_value TSRMLS_CC)) { + return FAILURE; + } + + } + OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); + return SUCCESS; +} +/* }}} */ + +/* {{{ PHP_INI_MH + */ +static PHP_INI_MH(OnChangeMailForceExtra) +{ + /* Don't allow changing it in htaccess */ + if (stage == PHP_INI_STAGE_HTACCESS) { + return FAILURE; + } + return SUCCESS; +} +/* }}} */ + + +/* Need to convert to strings and make use of: + * PHP_SAFE_MODE + * + * Need to be read from the environment (?): + * PHP_AUTO_PREPEND_FILE + * PHP_AUTO_APPEND_FILE + * PHP_DOCUMENT_ROOT + * PHP_USER_DIR + * PHP_INCLUDE_PATH + */ + +#ifndef PHP_SAFE_MODE_EXEC_DIR +# define PHP_SAFE_MODE_EXEC_DIR "" +#endif + +#if defined(PHP_PROG_SENDMAIL) && !defined(NETWARE) +# define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL " -t -i " +#elif defined(PHP_WIN32) +# define DEFAULT_SENDMAIL_PATH NULL +#else +# define DEFAULT_SENDMAIL_PATH "/usr/sbin/sendmail -t -i" +#endif +/* {{{ PHP_INI + */ +PHP_INI_BEGIN() + PHP_INI_ENTRY_EX("define_syslog_variables", "0", PHP_INI_ALL, NULL, php_ini_boolean_displayer_cb) + PHP_INI_ENTRY_EX("highlight.bg", HL_BG_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) + PHP_INI_ENTRY_EX("highlight.comment", HL_COMMENT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) + PHP_INI_ENTRY_EX("highlight.default", HL_DEFAULT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) + PHP_INI_ENTRY_EX("highlight.html", HL_HTML_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) + PHP_INI_ENTRY_EX("highlight.keyword", HL_KEYWORD_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) + PHP_INI_ENTRY_EX("highlight.string", HL_STRING_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) + + STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, allow_call_time_pass_reference, zend_compiler_globals, compiler_globals) + STD_PHP_INI_BOOLEAN("asp_tags", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, asp_tags, zend_compiler_globals, compiler_globals) + STD_PHP_INI_ENTRY_EX("display_errors", "1", PHP_INI_ALL, OnUpdateDisplayErrors, display_errors, php_core_globals, core_globals, display_errors_mode) + STD_PHP_INI_BOOLEAN("display_startup_errors", "0", PHP_INI_ALL, OnUpdateBool, display_startup_errors, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("enable_dl", "1", PHP_INI_SYSTEM, OnUpdateBool, enable_dl, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("expose_php", "1", PHP_INI_SYSTEM, OnUpdateBool, expose_php, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("docref_root", "", PHP_INI_ALL, OnUpdateString, docref_root, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("docref_ext", "", PHP_INI_ALL, OnUpdateString, docref_ext, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("html_errors", "1", PHP_INI_ALL, OnUpdateBool, html_errors, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("xmlrpc_errors", "0", PHP_INI_SYSTEM, OnUpdateBool, xmlrpc_errors, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("xmlrpc_error_number", "0", PHP_INI_ALL, OnUpdateLong, xmlrpc_error_number, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("max_input_time", "-1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong, max_input_time, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("ignore_user_abort", "0", PHP_INI_ALL, OnUpdateBool, ignore_user_abort, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("implicit_flush", "0", PHP_INI_ALL, OnUpdateBool, implicit_flush, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("log_errors", "0", PHP_INI_ALL, OnUpdateBool, log_errors, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("log_errors_max_len", "1024", PHP_INI_ALL, OnUpdateLong, log_errors_max_len, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("ignore_repeated_errors", "0", PHP_INI_ALL, OnUpdateBool, ignore_repeated_errors, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("ignore_repeated_source", "0", PHP_INI_ALL, OnUpdateBool, ignore_repeated_source, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("report_memleaks", "1", PHP_INI_ALL, OnUpdateBool, report_memleaks, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("report_zend_debug", "1", PHP_INI_ALL, OnUpdateBool, report_zend_debug, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("magic_quotes_gpc", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, magic_quotes_gpc, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("magic_quotes_runtime", "0", PHP_INI_ALL, OnUpdateBool, magic_quotes_runtime, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("magic_quotes_sybase", "0", PHP_INI_ALL, OnUpdateBool, magic_quotes_sybase, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("output_buffering", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateLong, output_buffering, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("output_handler", NULL, PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateString, output_handler, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("register_globals", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_globals, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("register_long_arrays", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_long_arrays, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("auto_globals_jit", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, auto_globals_jit, php_core_globals, core_globals) +#if PHP_SAFE_MODE + STD_PHP_INI_BOOLEAN("safe_mode", "1", PHP_INI_SYSTEM, OnUpdateBool, safe_mode, php_core_globals, core_globals) +#else + STD_PHP_INI_BOOLEAN("safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, safe_mode, php_core_globals, core_globals) +#endif + STD_PHP_INI_ENTRY("safe_mode_include_dir", NULL, PHP_INI_SYSTEM, OnUpdateString, safe_mode_include_dir, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("safe_mode_gid", "0", PHP_INI_SYSTEM, OnUpdateBool, safe_mode_gid, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("short_open_tag", DEFAULT_SHORT_OPEN_TAG, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, short_tags, zend_compiler_globals, compiler_globals) + STD_PHP_INI_BOOLEAN("sql.safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, sql_safe_mode, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("track_errors", "0", PHP_INI_ALL, OnUpdateBool, track_errors, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("y2k_compliance", "1", PHP_INI_ALL, OnUpdateBool, y2k_compliance, php_core_globals, core_globals) + + STD_PHP_INI_ENTRY("unserialize_callback_func", NULL, PHP_INI_ALL, OnUpdateString, unserialize_callback_func, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("serialize_precision", "100", PHP_INI_ALL, OnUpdateLongGEZero, serialize_precision, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("arg_separator.output", "&", PHP_INI_ALL, OnUpdateStringUnempty, arg_separator.output, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("arg_separator.input", "&", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateStringUnempty, arg_separator.input, php_core_globals, core_globals) + + STD_PHP_INI_ENTRY("auto_append_file", NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, auto_append_file, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("auto_prepend_file", NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, auto_prepend_file, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("doc_root", NULL, PHP_INI_SYSTEM, OnUpdateStringUnempty, doc_root, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("default_charset", SAPI_DEFAULT_CHARSET, PHP_INI_ALL, OnUpdateString, default_charset, sapi_globals_struct,sapi_globals) + STD_PHP_INI_ENTRY("default_mimetype", SAPI_DEFAULT_MIMETYPE, PHP_INI_ALL, OnUpdateString, default_mimetype, sapi_globals_struct,sapi_globals) + STD_PHP_INI_ENTRY("error_log", NULL, PHP_INI_ALL, OnUpdateErrorLog, error_log, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("extension_dir", PHP_EXTENSION_DIR, PHP_INI_SYSTEM, OnUpdateStringUnempty, extension_dir, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("include_path", PHP_INCLUDE_PATH, PHP_INI_ALL, OnUpdateStringUnempty, include_path, php_core_globals, core_globals) + PHP_INI_ENTRY("max_execution_time", "30", PHP_INI_ALL, OnUpdateTimeout) + STD_PHP_INI_ENTRY("open_basedir", NULL, PHP_INI_SYSTEM, OnUpdateString, open_basedir, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("safe_mode_exec_dir", PHP_SAFE_MODE_EXEC_DIR, PHP_INI_SYSTEM, OnUpdateString, safe_mode_exec_dir, php_core_globals, core_globals) + + STD_PHP_INI_BOOLEAN("file_uploads", "1", PHP_INI_SYSTEM, OnUpdateBool, file_uploads, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("upload_max_filesize", "2M", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong, upload_max_filesize, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("post_max_size", "8M", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong, post_max_size, sapi_globals_struct,sapi_globals) + STD_PHP_INI_ENTRY("upload_tmp_dir", NULL, PHP_INI_SYSTEM, OnUpdateStringUnempty, upload_tmp_dir, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("max_input_nesting_level", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLongGEZero, max_input_nesting_level, php_core_globals, core_globals) + + STD_PHP_INI_ENTRY("user_dir", NULL, PHP_INI_SYSTEM, OnUpdateString, user_dir, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("variables_order", "EGPCS", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateStringUnempty, variables_order, php_core_globals, core_globals) + + STD_PHP_INI_ENTRY("error_append_string", NULL, PHP_INI_ALL, OnUpdateString, error_append_string, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("error_prepend_string", NULL, PHP_INI_ALL, OnUpdateString, error_prepend_string, php_core_globals, core_globals) + + PHP_INI_ENTRY("SMTP", "localhost",PHP_INI_ALL, NULL) + PHP_INI_ENTRY("smtp_port", "25", PHP_INI_ALL, NULL) + PHP_INI_ENTRY("browscap", NULL, PHP_INI_SYSTEM, NULL) + PHP_INI_ENTRY("memory_limit", "128M", PHP_INI_ALL, OnChangeMemoryLimit) + PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision) + PHP_INI_ENTRY("sendmail_from", NULL, PHP_INI_ALL, NULL) + PHP_INI_ENTRY("sendmail_path", DEFAULT_SENDMAIL_PATH, PHP_INI_SYSTEM, NULL) + PHP_INI_ENTRY("mail.force_extra_parameters",NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnChangeMailForceExtra) + PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL) + PHP_INI_ENTRY("disable_classes", "", PHP_INI_SYSTEM, NULL) + + STD_PHP_INI_BOOLEAN("allow_url_fopen", "1", PHP_INI_SYSTEM, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("allow_url_include", "0", PHP_INI_SYSTEM, OnUpdateBool, allow_url_include, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("always_populate_raw_post_data", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, always_populate_raw_post_data, php_core_globals, core_globals) + + STD_PHP_INI_ENTRY("realpath_cache_size", "16K", PHP_INI_SYSTEM, OnUpdateLong, realpath_cache_size_limit, virtual_cwd_globals, cwd_globals) + STD_PHP_INI_ENTRY("realpath_cache_ttl", "120", PHP_INI_SYSTEM, OnUpdateLong, realpath_cache_ttl, virtual_cwd_globals, cwd_globals) +PHP_INI_END() +/* }}} */ + +/* True globals (no need for thread safety */ +/* But don't make them a single int bitfield */ +static int module_initialized = 0; +static int module_startup = 1; +static int module_shutdown = 0; + +/* {{{ php_log_err + */ +PHPAPI void php_log_err(char *log_message TSRMLS_DC) +{ + int fd = -1; + char error_time_str[128]; + struct tm tmbuf; + time_t error_time; + + /* Try to use the specified logging location. */ + if (PG(error_log) != NULL) { +#ifdef HAVE_SYSLOG_H + if (!strcmp(PG(error_log), "syslog")) { + php_syslog(LOG_NOTICE, "%.500s", log_message); + return; + } +#endif + fd = VCWD_OPEN_MODE(PG(error_log), O_CREAT | O_APPEND | O_WRONLY, 0644); + if (fd != -1) { + char *tmp; + int len; + time(&error_time); + strftime(error_time_str, sizeof(error_time_str), "%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); + len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL); +#ifdef PHP_WIN32 + php_flock(fd, 2); +#endif + write(fd, tmp, len); + efree(tmp); + close(fd); + return; + } + } + + /* Otherwise fall back to the default logging location, if we have one */ + + if (sapi_module.log_message) { + sapi_module.log_message(log_message); + } +} +/* }}} */ + +/* {{{ php_write + wrapper for modules to use PHPWRITE */ +PHPAPI int php_write(void *buf, uint size TSRMLS_DC) +{ + return PHPWRITE(buf, size); +} +/* }}} */ + +/* {{{ php_printf + */ +PHPAPI int php_printf(const char *format, ...) +{ + va_list args; + int ret; + char *buffer; + int size; + TSRMLS_FETCH(); + + va_start(args, format); + size = vspprintf(&buffer, 0, format, args); + ret = PHPWRITE(buffer, size); + efree(buffer); + va_end(args); + + return ret; +} +/* }}} */ + +/* {{{ php_verror helpers */ + +/* {{{ php_during_module_startup */ +static int php_during_module_startup(void) +{ + return module_startup; +} +/* }}} */ + +/* {{{ php_during_module_shutdown */ +static int php_during_module_shutdown(void) +{ + return module_shutdown; +} +/* }}} */ + +/* }}} */ + +/* {{{ php_verror */ +/* php_verror is called from php_error_docref functions. + * Its purpose is to unify error messages and automatically generate clickable + * html error messages if correcponding ini setting (html_errors) is activated. + * See: CODING_STANDARDS for details. + */ +PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) +{ + char *buffer = NULL, *docref_buf = NULL, *target = NULL; + char *docref_target = "", *docref_root = ""; + char *p; + int buffer_len = 0; + char *space; + char *class_name = get_active_class_name(&space TSRMLS_CC); + char *function; + int origin_len; + char *origin; + char *message; + int is_function = 0; + + /* get error text into buffer and escape for html if necessary */ + buffer_len = vspprintf(&buffer, 0, format, args); + if (PG(html_errors)) { + int len; + char *replace = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC); + efree(buffer); + buffer = replace; + buffer_len = len; + } + + /* which function caused the problem if any at all */ + if (php_during_module_startup()) { + function = "PHP Startup"; + } else if (php_during_module_shutdown()) { + function = "PHP Shutdown"; + } else if (EG(current_execute_data) && + EG(current_execute_data)->opline && + EG(current_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL + ) { + switch (EG(current_execute_data)->opline->op2.u.constant.value.lval) { + case ZEND_EVAL: + function = "eval"; + is_function = 1; + break; + case ZEND_INCLUDE: + function = "include"; + is_function = 1; + break; + case ZEND_INCLUDE_ONCE: + function = "include_once"; + is_function = 1; + break; + case ZEND_REQUIRE: + function = "require"; + is_function = 1; + break; + case ZEND_REQUIRE_ONCE: + function = "require_once"; + is_function = 1; + break; + default: + function = "Unknown"; + } + } else { + function = get_active_function_name(TSRMLS_C); + if (!function || !strlen(function)) { + function = "Unknown"; + } else { + is_function = 1; + } + } + + /* if we still have memory then format the origin */ + if (is_function) { + origin_len = spprintf(&origin, 0, "%s%s%s(%s)", class_name, space, function, params); + } else { + origin_len = spprintf(&origin, 0, "%s", function); + } + + if (PG(html_errors)) { + int len; + char *replace = php_escape_html_entities(origin, origin_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC); + efree(origin); + origin = replace; + } + + /* origin and buffer available, so lets come up with the error message */ + if (docref && docref[0] == '#') { + docref_target = strchr(docref, '#'); + docref = NULL; + } + + /* no docref given but function is known (the default) */ + if (!docref && is_function) { + if (space[0] == '\0') { + spprintf(&docref_buf, 0, "function.%s", function); + } else { + spprintf(&docref_buf, 0, "function.%s-%s", class_name, function); + } + while((p = strchr(docref_buf, '_')) != NULL) { + *p = '-'; + } + docref = docref_buf; + } + + /* we have a docref for a function AND + * - we show erroes in html mode OR + * - the user wants to see the links anyway + */ + if (docref && is_function && (PG(html_errors) || strlen(PG(docref_root)))) { + if (strncmp(docref, "http://", 7)) { + /* We don't have 'http://' so we use docref_root */ + + char *ref; /* temp copy for duplicated docref */ + + docref_root = PG(docref_root); + + ref = estrdup(docref); + if (docref_buf) { + efree(docref_buf); + } + docref_buf = ref; + /* strip of the target if any */ + p = strrchr(ref, '#'); + if (p) { + target = estrdup(p); + if (target) { + docref_target = target; + *p = '\0'; + } + } + /* add the extension if it is set in ini */ + if (PG(docref_ext) && strlen(PG(docref_ext))) { + spprintf(&docref_buf, 0, "%s%s", ref, PG(docref_ext)); + efree(ref); + } + docref = docref_buf; + } + /* display html formatted or only show the additional links */ + if (PG(html_errors)) { + spprintf(&message, 0, "%s [%s]: %s", origin, docref_root, docref, docref_target, docref, buffer); + } else { + spprintf(&message, 0, "%s [%s%s%s]: %s", origin, docref_root, docref, docref_target, buffer); + } + if (target) { + efree(target); + } + } else { + spprintf(&message, 0, "%s: %s", origin, buffer); + } + efree(origin); + if (docref_buf) { + efree(docref_buf); + } + + if (PG(track_errors) && module_initialized && EG(active_symbol_table) && + (!EG(user_error_handler) || !(EG(user_error_handler_error_reporting) & type))) { + zval *tmp; + ALLOC_INIT_ZVAL(tmp); + ZVAL_STRINGL(tmp, buffer, buffer_len, 1); + zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) &tmp, sizeof(zval *), NULL); + } + efree(buffer); + + php_error(type, "%s", message); + efree(message); +} +/* }}} */ + +/* {{{ php_error_docref0 */ +/* See: CODING_STANDARDS for details. */ +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...) +{ + va_list args; + + va_start(args, format); + php_verror(docref, "", type, format, args TSRMLS_CC); + va_end(args); +} +/* }}} */ + +/* {{{ php_error_docref1 */ +/* See: CODING_STANDARDS for details. */ +PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...) +{ + va_list args; + + va_start(args, format); + php_verror(docref, param1, type, format, args TSRMLS_CC); + va_end(args); +} +/* }}} */ + +/* {{{ php_error_docref2 */ +/* See: CODING_STANDARDS for details. */ +PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...) +{ + char *params; + va_list args; + + spprintf(¶ms, 0, "%s,%s", param1, param2); + va_start(args, format); + php_verror(docref, params ? params : "...", type, format, args TSRMLS_CC); + va_end(args); + if (params) { + efree(params); + } +} +/* }}} */ + +/* {{{ php_html_puts */ +PHPAPI void php_html_puts(const char *str, uint size TSRMLS_DC) +{ + zend_html_puts(str, size TSRMLS_CC); +} +/* }}} */ + +/* {{{ php_suppress_errors */ +PHPAPI void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC) +{ + PG(error_handling) = error_handling; + PG(exception_class) = exception_class; + if (PG(last_error_message)) { + free(PG(last_error_message)); + PG(last_error_message) = NULL; + } + if (PG(last_error_file)) { + free(PG(last_error_file)); + PG(last_error_file) = NULL; + } + PG(last_error_lineno) = 0; +} +/* }}} */ + +/* {{{ php_error_cb + extended error handling function */ +static void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) +{ + char *buffer; + int buffer_len, display; + TSRMLS_FETCH(); + + buffer_len = vspprintf(&buffer, PG(log_errors_max_len), format, args); + + /* check for repeated errors to be ignored */ + if (PG(ignore_repeated_errors) && PG(last_error_message)) { + /* no check for PG(last_error_file) is needed since it cannot + * be NULL if PG(last_error_message) is not NULL */ + if (strcmp(PG(last_error_message), buffer) + || (!PG(ignore_repeated_source) + && ((PG(last_error_lineno) != (int)error_lineno) + || strcmp(PG(last_error_file), error_filename)))) { + display = 1; + } else { + display = 0; + } + } else { + display = 1; + } + + /* store the error if it has changed */ + if (display) { + if (PG(last_error_message)) { + free(PG(last_error_message)); + } + if (PG(last_error_file)) { + free(PG(last_error_file)); + } + PG(last_error_type) = type; + PG(last_error_message) = strdup(buffer); + PG(last_error_file) = strdup(error_filename); + PG(last_error_lineno) = error_lineno; + } + + /* according to error handling mode, suppress error, throw exception or show it */ + if (PG(error_handling) != EH_NORMAL) { + switch (type) { + case E_ERROR: + case E_CORE_ERROR: + case E_COMPILE_ERROR: + case E_USER_ERROR: + case E_PARSE: + /* fatal errors are real errors and cannot be made exceptions */ + break; + case E_STRICT: + /* for the sake of BC to old damaged code */ + break; + case E_NOTICE: + case E_USER_NOTICE: + /* notices are no errors and are not treated as such like E_WARNINGS */ + break; + default: + /* throw an exception if we are in EH_THROW mode + * but DO NOT overwrite a pending exception + */ + if (PG(error_handling) == EH_THROW && !EG(exception)) { + zend_throw_error_exception(PG(exception_class), buffer, 0, type TSRMLS_CC); + } + efree(buffer); + return; + } + } + + /* display/log the error if necessary */ + if (display && (EG(error_reporting) & type || (type & E_CORE)) + && (PG(log_errors) || PG(display_errors) || (!module_initialized))) { + char *error_type_str; + + switch (type) { + case E_ERROR: + case E_CORE_ERROR: + case E_COMPILE_ERROR: + case E_USER_ERROR: + error_type_str = "Fatal error"; + break; + case E_RECOVERABLE_ERROR: + error_type_str = "Catchable fatal error"; + break; + case E_WARNING: + case E_CORE_WARNING: + case E_COMPILE_WARNING: + case E_USER_WARNING: + error_type_str = "Warning"; + break; + case E_PARSE: + error_type_str = "Parse error"; + break; + case E_NOTICE: + case E_USER_NOTICE: + error_type_str = "Notice"; + break; + case E_STRICT: + error_type_str = "Strict Standards"; + break; + default: + error_type_str = "Unknown error"; + break; + } + + if (!module_initialized || PG(log_errors)) { + char *log_buffer; +#ifdef PHP_WIN32 + if ((type == E_CORE_ERROR || type == E_CORE_WARNING) && PG(display_startup_errors)) { + MessageBox(NULL, buffer, error_type_str, MB_OK|ZEND_SERVICE_MB_STYLE); + } +#endif + spprintf(&log_buffer, 0, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno); + php_log_err(log_buffer TSRMLS_CC); + efree(log_buffer); + } + if (PG(display_errors) + && ((module_initialized && !PG(during_request_startup)) + || (PG(display_startup_errors) + && (OG(php_body_write)==php_default_output_func || OG(php_body_write)==php_ub_body_write_no_header || OG(php_body_write)==php_ub_body_write) + ) + ) + ) { + + if (PG(xmlrpc_errors)) { + php_printf("faultCode%ldfaultString%s:%s in %s on line %d", PG(xmlrpc_error_number), error_type_str, buffer, error_filename, error_lineno); + } else { + char *prepend_string = INI_STR("error_prepend_string"); + char *append_string = INI_STR("error_append_string"); + + if (PG(html_errors)) { + if (type == E_ERROR) { + int len; + char *buf = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC); + php_printf("%s
\n%s: %s in %s on line %d
\n%s", STR_PRINT(prepend_string), error_type_str, buf, error_filename, error_lineno, STR_PRINT(append_string)); + efree(buf); + } else { + php_printf("%s
\n%s: %s in %s on line %d
\n%s", STR_PRINT(prepend_string), error_type_str, buffer, error_filename, error_lineno, STR_PRINT(append_string)); + } + } else { + /* Write CLI/CGI errors to stderr if display_errors = "stderr" */ + if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi")) && + PG(display_errors) == PHP_DISPLAY_ERRORS_STDERR + ) { + fprintf(stderr, "%s: %s in %s on line %d\n", error_type_str, buffer, error_filename, error_lineno); + } else { + php_printf("%s\n%s: %s in %s on line %d\n%s", STR_PRINT(prepend_string), error_type_str, buffer, error_filename, error_lineno, STR_PRINT(append_string)); + } + } + } + } +#if ZEND_DEBUG + if (PG(report_zend_debug)) { + zend_bool trigger_break; + + switch (type) { + case E_ERROR: + case E_CORE_ERROR: + case E_COMPILE_ERROR: + case E_USER_ERROR: + trigger_break=1; + break; + default: + trigger_break=0; + break; + } + zend_output_debug_string(trigger_break, "%s(%d) : %s - %s", error_filename, error_lineno, error_type_str, buffer); + } +#endif + } + + /* Bail out if we can't recover */ + switch (type) { + case E_CORE_ERROR: + if(!module_initialized) { + /* bad error in module startup - no way we can live with this */ + exit(-2); + } + /* no break - intentionally */ + case E_ERROR: + case E_RECOVERABLE_ERROR: + case E_PARSE: + case E_COMPILE_ERROR: + case E_USER_ERROR: + EG(exit_status) = 255; + if (module_initialized) { + if (!PG(display_errors) && + !SG(headers_sent) && + SG(sapi_headers).http_response_code == 200 + ) { + sapi_header_line ctr = {0}; + + ctr.line = "HTTP/1.0 500 Internal Server Error"; + ctr.line_len = strlen(ctr.line); + sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); + } + /* the parser would return 1 (failure), we can bail out nicely */ + if (type != E_PARSE) { + /* restore memory limit */ + zend_set_memory_limit(PG(memory_limit)); + efree(buffer); + zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC); + zend_bailout(); + return; + } + } + break; + } + + /* Log if necessary */ + if (!display) { + efree(buffer); + return; + } + + if (PG(track_errors) && module_initialized && EG(active_symbol_table)) { + zval *tmp; + ALLOC_INIT_ZVAL(tmp); + ZVAL_STRINGL(tmp, buffer, buffer_len, 1); + zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, sizeof(zval *), NULL); + } + + efree(buffer); +} +/* }}} */ + +/* {{{ proto bool set_time_limit(int seconds) + Sets the maximum time a script can run */ +PHP_FUNCTION(set_time_limit) +{ + zval **new_timeout; + + if (PG(safe_mode)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot set time limit in safe mode"); + RETURN_FALSE; + } + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_timeout) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_string_ex(new_timeout); + if (zend_alter_ini_entry("max_execution_time", sizeof("max_execution_time"), Z_STRVAL_PP(new_timeout), Z_STRLEN_PP(new_timeout), PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == SUCCESS) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ php_fopen_wrapper_for_zend + */ +static FILE *php_fopen_wrapper_for_zend(const char *filename, char **opened_path) +{ + TSRMLS_FETCH(); + + return php_stream_open_wrapper_as_file((char *)filename, "rb", ENFORCE_SAFE_MODE|USE_PATH|IGNORE_URL_WIN|REPORT_ERRORS|STREAM_OPEN_FOR_INCLUDE, opened_path); +} +/* }}} */ + +static void stream_closer_for_zend(void *handle TSRMLS_DC) /* {{{ */ +{ + php_stream_close((php_stream*)handle); +} +/* }}} */ + +static long stream_fteller_for_zend(void *handle TSRMLS_DC) /* {{{ */ +{ + return (long)php_stream_tell((php_stream*)handle); +} +/* }}} */ + +static int php_stream_open_for_zend(const char *filename, zend_file_handle *handle TSRMLS_DC) /* {{{ */ +{ + return php_stream_open_for_zend_ex(filename, handle, ENFORCE_SAFE_MODE|USE_PATH|REPORT_ERRORS|STREAM_OPEN_FOR_INCLUDE TSRMLS_CC); +} +/* }}} */ + +PHPAPI int php_stream_open_for_zend_ex(const char *filename, zend_file_handle *handle, int mode TSRMLS_DC) /* {{{ */ +{ + php_stream *stream; + + stream = php_stream_open_wrapper((char *)filename, "rb", mode, &handle->opened_path); + + if (stream) { + handle->type = ZEND_HANDLE_STREAM; + handle->filename = (char*)filename; + handle->free_filename = 0; + handle->handle.stream.handle = stream; + handle->handle.stream.reader = (zend_stream_reader_t)_php_stream_read; + handle->handle.stream.closer = stream_closer_for_zend; + handle->handle.stream.fteller = stream_fteller_for_zend; + handle->handle.stream.interactive = 0; + /* suppress warning if this stream is not explicitly closed */ + php_stream_auto_cleanup(stream); + + return SUCCESS; + } + return FAILURE; +} +/* }}} */ + +/* {{{ php_get_configuration_directive_for_zend + */ +static int php_get_configuration_directive_for_zend(char *name, uint name_length, zval *contents) +{ + zval *retval = cfg_get_entry(name, name_length); + + if (retval) { + *contents = *retval; + return SUCCESS; + } else { + return FAILURE; + } +} +/* }}} */ + +/* {{{ php_message_handler_for_zend + */ +static void php_message_handler_for_zend(long message, void *data) +{ + TSRMLS_FETCH(); + + switch (message) { + case ZMSG_FAILED_INCLUDE_FOPEN: + php_error_docref("function.include" TSRMLS_CC, E_WARNING, "Failed opening '%s' for inclusion (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path))); + break; + case ZMSG_FAILED_REQUIRE_FOPEN: + php_error_docref("function.require" TSRMLS_CC, E_COMPILE_ERROR, "Failed opening required '%s' (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path))); + break; + case ZMSG_FAILED_HIGHLIGHT_FOPEN: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed opening '%s' for highlighting", php_strip_url_passwd((char *) data)); + break; + case ZMSG_MEMORY_LEAK_DETECTED: + case ZMSG_MEMORY_LEAK_REPEATED: +#if ZEND_DEBUG + if (EG(error_reporting) & E_WARNING) { + char memory_leak_buf[1024]; + + if (message==ZMSG_MEMORY_LEAK_DETECTED) { + zend_leak_info *t = (zend_leak_info *) data; + + snprintf(memory_leak_buf, 512, "%s(%d) : Freeing 0x%.8lX (%zu bytes), script=%s\n", t->filename, t->lineno, (zend_uintptr_t)t->addr, t->size, SAFE_FILENAME(SG(request_info).path_translated)); + if (t->orig_filename) { + char relay_buf[512]; + + snprintf(relay_buf, 512, "%s(%d) : Actual location (location was relayed)\n", t->orig_filename, t->orig_lineno); + strlcat(memory_leak_buf, relay_buf, sizeof(memory_leak_buf)); + } + } else { + unsigned long leak_count = (zend_uintptr_t) data; + + snprintf(memory_leak_buf, 512, "Last leak repeated %ld time%s\n", leak_count, (leak_count>1?"s":"")); + } +# if defined(PHP_WIN32) + OutputDebugString(memory_leak_buf); +# else + fprintf(stderr, "%s", memory_leak_buf); +# endif + } +#endif + break; + case ZMSG_MEMORY_LEAKS_GRAND_TOTAL: +#if ZEND_DEBUG + if (EG(error_reporting) & E_WARNING) { + char memory_leak_buf[512]; + + snprintf(memory_leak_buf, 512, "=== Total %d memory leaks detected ===\n", *((zend_uint *) data)); +# if defined(PHP_WIN32) + OutputDebugString(memory_leak_buf); +# else + fprintf(stderr, "%s", memory_leak_buf); +# endif + } +#endif + break; + case ZMSG_LOG_SCRIPT_NAME: { + struct tm *ta, tmbuf; + time_t curtime; + char *datetime_str, asctimebuf[52]; + char memory_leak_buf[4096]; + + time(&curtime); + ta = php_localtime_r(&curtime, &tmbuf); + datetime_str = php_asctime_r(ta, asctimebuf); + if (datetime_str) { + datetime_str[strlen(datetime_str)-1]=0; /* get rid of the trailing newline */ + snprintf(memory_leak_buf, sizeof(memory_leak_buf), "[%s] Script: '%s'\n", datetime_str, SAFE_FILENAME(SG(request_info).path_translated)); + } else { + snprintf(memory_leak_buf, sizeof(memory_leak_buf), "[null] Script: '%s'\n", SAFE_FILENAME(SG(request_info).path_translated)); + } +# if defined(PHP_WIN32) + OutputDebugString(memory_leak_buf); +# else + fprintf(stderr, "%s", memory_leak_buf); +# endif + } + break; + } +} +/* }}} */ + + +void php_on_timeout(int seconds TSRMLS_DC) +{ + PG(connection_status) |= PHP_CONNECTION_TIMEOUT; + zend_set_timeout(EG(timeout_seconds)); +} + +#if PHP_SIGCHILD +/* {{{ sigchld_handler + */ +static void sigchld_handler(int apar) +{ + while (waitpid(-1, NULL, WNOHANG) > 0); + signal(SIGCHLD, sigchld_handler); +} +/* }}} */ +#endif + +/* {{{ php_start_sapi() + */ +static int php_start_sapi(TSRMLS_D) +{ + int retval = SUCCESS; + + if(!SG(sapi_started)) { + zend_try { + PG(during_request_startup) = 1; + + /* initialize global variables */ + PG(modules_activated) = 0; + PG(header_is_being_sent) = 0; + PG(connection_status) = PHP_CONNECTION_NORMAL; + + zend_activate(TSRMLS_C); + zend_set_timeout(EG(timeout_seconds)); + zend_activate_modules(TSRMLS_C); + PG(modules_activated)=1; + } zend_catch { + retval = FAILURE; + } zend_end_try(); + + SG(sapi_started) = 1; + } + return retval; +} + +/* }}} */ + +/* {{{ php_request_startup + */ +#ifndef APACHE_HOOKS +int php_request_startup(TSRMLS_D) +{ + int retval = SUCCESS; + +#ifdef PHP_WIN32 + PG(com_initialized) = 0; +#endif + +#if PHP_SIGCHILD + signal(SIGCHLD, sigchld_handler); +#endif + + zend_try { + PG(during_request_startup) = 1; + + php_output_activate(TSRMLS_C); + + /* initialize global variables */ + PG(modules_activated) = 0; + PG(header_is_being_sent) = 0; + PG(connection_status) = PHP_CONNECTION_NORMAL; + PG(in_user_include) = 0; + + zend_activate(TSRMLS_C); + sapi_activate(TSRMLS_C); + + if (PG(max_input_time) == -1) { + zend_set_timeout(EG(timeout_seconds)); + } else { + zend_set_timeout(PG(max_input_time)); + } + + /* Disable realpath cache if safe_mode or open_basedir are set */ + if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { + CWDG(realpath_cache_size_limit) = 0; + } + + if (PG(expose_php)) { + sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1); + } + + if (PG(output_handler) && PG(output_handler)[0]) { + php_start_ob_buffer_named(PG(output_handler), 0, 1 TSRMLS_CC); + } else if (PG(output_buffering)) { + if (PG(output_buffering)>1) { + php_start_ob_buffer(NULL, PG(output_buffering), 1 TSRMLS_CC); + } else { + php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC); + } + } else if (PG(implicit_flush)) { + php_start_implicit_flush(TSRMLS_C); + } + + /* We turn this off in php_execute_script() */ + /* PG(during_request_startup) = 0; */ + + php_hash_environment(TSRMLS_C); + zend_activate_modules(TSRMLS_C); + PG(modules_activated)=1; + } zend_catch { + retval = FAILURE; + } zend_end_try(); + + SG(sapi_started) = 1; + + return retval; +} +# else +int php_request_startup(TSRMLS_D) +{ + int retval = SUCCESS; + +#if PHP_SIGCHILD + signal(SIGCHLD, sigchld_handler); +#endif + + if (php_start_sapi() == FAILURE) { + return FAILURE; + } + + php_output_activate(TSRMLS_C); + sapi_activate(TSRMLS_C); + php_hash_environment(TSRMLS_C); + + zend_try { + PG(during_request_startup) = 1; + php_output_activate(TSRMLS_C); + if (PG(expose_php)) { + sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1); + } + } zend_catch { + retval = FAILURE; + } zend_end_try(); + + return retval; +} +# endif +/* }}} */ + +/* {{{ php_request_startup_for_hook + */ +int php_request_startup_for_hook(TSRMLS_D) +{ + int retval = SUCCESS; + +#if PHP_SIGCHLD + signal(SIGCHLD, sigchld_handler); +#endif + + if (php_start_sapi(TSRMLS_C) == FAILURE) { + return FAILURE; + } + + php_output_activate(TSRMLS_C); + sapi_activate_headers_only(TSRMLS_C); + php_hash_environment(TSRMLS_C); + + return retval; +} +/* }}} */ + +/* {{{ php_request_shutdown_for_exec + */ +void php_request_shutdown_for_exec(void *dummy) +{ + TSRMLS_FETCH(); + + /* used to close fd's in the 3..255 range here, but it's problematic + */ + shutdown_memory_manager(1, 1 TSRMLS_CC); +} +/* }}} */ + +/* {{{ php_request_shutdown_for_hook + */ +void php_request_shutdown_for_hook(void *dummy) +{ + TSRMLS_FETCH(); + + if (PG(modules_activated)) zend_try { + php_call_shutdown_functions(TSRMLS_C); + } zend_end_try(); + + if (PG(modules_activated)) { + zend_deactivate_modules(TSRMLS_C); + php_free_shutdown_functions(TSRMLS_C); + } + + zend_try { + int i; + + for (i = 0; i < NUM_TRACK_VARS; i++) { + if (PG(http_globals)[i]) { + zval_ptr_dtor(&PG(http_globals)[i]); + } + } + } zend_end_try(); + + zend_deactivate(TSRMLS_C); + + zend_try { + sapi_deactivate(TSRMLS_C); + } zend_end_try(); + + zend_try { + php_shutdown_stream_hashes(TSRMLS_C); + } zend_end_try(); + + zend_try { + shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC); + } zend_end_try(); + + zend_try { + zend_unset_timeout(TSRMLS_C); + } zend_end_try(); +} + +/* }}} */ + +/* {{{ php_request_shutdown + */ +void php_request_shutdown(void *dummy) +{ + zend_bool report_memleaks; + TSRMLS_FETCH(); + + report_memleaks = PG(report_memleaks); + + /* EG(opline_ptr) points into nirvana and therefore cannot be safely accessed + * inside zend_executor callback functions. + */ + EG(opline_ptr) = NULL; + EG(active_op_array) = NULL; + + /* 1. Call all possible shutdown functions registered with register_shutdown_function() */ + if (PG(modules_activated)) zend_try { + php_call_shutdown_functions(TSRMLS_C); + } zend_end_try(); + + /* 2. Call all possible __destruct() functions */ + zend_try { + zend_call_destructors(TSRMLS_C); + } zend_end_try(); + + /* 3. Flush all output buffers */ + zend_try { + php_end_ob_buffers((zend_bool)(SG(request_info).headers_only?0:1) TSRMLS_CC); + } zend_end_try(); + + /* 4. Send the set HTTP headers (note: This must be done AFTER php_end_ob_buffers() !!) */ + zend_try { + sapi_send_headers(TSRMLS_C); + } zend_end_try(); + + /* 5. Call all extensions RSHUTDOWN functions */ + if (PG(modules_activated)) { + zend_deactivate_modules(TSRMLS_C); + php_free_shutdown_functions(TSRMLS_C); + } + + /* 6. Destroy super-globals */ + zend_try { + int i; + + for (i=0; ilast_error_message) { + free(core_globals->last_error_message); + } + if (core_globals->last_error_file) { + free(core_globals->last_error_file); + } + if (core_globals->disable_functions) { + free(core_globals->disable_functions); + } + if (core_globals->disable_classes) { + free(core_globals->disable_classes); + } +} +/* }}} */ + +/* {{{ php_register_extensions + */ +int php_register_extensions(zend_module_entry **ptr, int count TSRMLS_DC) +{ + zend_module_entry **end = ptr + count; + + while (ptr < end) { + if (*ptr) { + if (zend_register_internal_module(*ptr TSRMLS_CC)==NULL) { + return FAILURE; + } + } + ptr++; + } + return SUCCESS; +} +/* }}} */ + +#if defined(PHP_WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1400) +static _invalid_parameter_handler old_invalid_parameter_handler; + +void dummy_invalid_parameter_handler( + const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t pEwserved) +{ + static int called = 0; + char buf[1024]; + int len; + + if (!called) { + called = 1; + if (function) { + if (file) { + len = _snprintf(buf, sizeof(buf)-1, "Invalid parameter detected in CRT function '%ws' (%ws:%d)", function, file, line); + } else { + len = _snprintf(buf, sizeof(buf)-1, "Invalid parameter detected in CRT function '%ws'", function); + } + } else { + len = _snprintf(buf, sizeof(buf)-1, "Invalid CRT parameters detected"); + } + zend_error(E_WARNING, "%s", buf); + called = 0; + } +} +#endif + +/* {{{ php_module_startup + */ +int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint num_additional_modules) +{ + zend_utility_functions zuf; + zend_utility_values zuv; + int module_number=0; /* for REGISTER_INI_ENTRIES() */ + char *php_os; +#ifdef ZTS + zend_executor_globals *executor_globals; + void ***tsrm_ls; + + php_core_globals *core_globals; +#endif +#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK)) + WORD wVersionRequested = MAKEWORD(2, 0); + WSADATA wsaData; +#endif +#ifdef PHP_WIN32 + { + DWORD dwVersion = GetVersion(); + + /* Get build numbers for Windows NT or Win95 */ + if (dwVersion < 0x80000000){ + php_os="WINNT"; + } else { + php_os="WIN32"; + } + } +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + old_invalid_parameter_handler = + _set_invalid_parameter_handler(dummy_invalid_parameter_handler); + if (old_invalid_parameter_handler != NULL) { + _set_invalid_parameter_handler(old_invalid_parameter_handler); + } +#endif +#else + php_os=PHP_OS; +#endif + +#ifdef ZTS + tsrm_ls = ts_resource(0); +#endif + + module_shutdown = 0; + module_startup = 1; + sapi_initialize_empty_request(TSRMLS_C); + sapi_activate(TSRMLS_C); + + if (module_initialized) { + return SUCCESS; + } + + sapi_module = *sf; + + php_output_startup(); + + zuf.error_function = php_error_cb; + zuf.printf_function = php_printf; + zuf.write_function = php_body_write_wrapper; + zuf.fopen_function = php_fopen_wrapper_for_zend; + zuf.message_handler = php_message_handler_for_zend; + zuf.block_interruptions = sapi_module.block_interruptions; + zuf.unblock_interruptions = sapi_module.unblock_interruptions; + zuf.get_configuration_directive = php_get_configuration_directive_for_zend; + zuf.ticks_function = php_run_ticks; + zuf.on_timeout = php_on_timeout; + zuf.stream_open_function = php_stream_open_for_zend; + zuf.vspprintf_function = vspprintf; + zuf.getenv_function = sapi_getenv; + zend_startup(&zuf, NULL, 1); + +#ifdef ZTS + executor_globals = ts_resource(executor_globals_id); + ts_allocate_id(&core_globals_id, sizeof(php_core_globals), (ts_allocate_ctor) core_globals_ctor, (ts_allocate_dtor) core_globals_dtor); + core_globals = ts_resource(core_globals_id); +#ifdef PHP_WIN32 + ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor) php_win32_core_globals_ctor, (ts_allocate_dtor) php_win32_core_globals_dtor); +#endif +#endif + EG(bailout) = NULL; + EG(error_reporting) = E_ALL & ~E_NOTICE; + + PG(header_is_being_sent) = 0; + SG(request_info).headers_only = 0; + SG(request_info).argv0 = NULL; + SG(request_info).argc=0; + SG(request_info).argv=(char **)NULL; + PG(connection_status) = PHP_CONNECTION_NORMAL; + PG(during_request_startup) = 0; + PG(last_error_message) = NULL; + PG(last_error_file) = NULL; + PG(last_error_lineno) = 0; + PG(error_handling) = EH_NORMAL; + PG(disable_functions) = NULL; + PG(disable_classes) = NULL; + +#if HAVE_SETLOCALE + setlocale(LC_CTYPE, ""); + zend_update_current_locale(); +#endif + +#if HAVE_TZSET + tzset(); +#endif + +#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK)) + /* start up winsock services */ + if (WSAStartup(wVersionRequested, &wsaData) != 0) { + php_printf("\nwinsock.dll unusable. %d\n", WSAGetLastError()); + return FAILURE; + } +#endif + + le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index pointer", 0); + + /* this will read in php.ini, set up the configuration parameters, + load zend extensions and register php function extensions + to be loaded later */ + if (php_init_config(TSRMLS_C) == FAILURE) { + return FAILURE; + } + + /* Register PHP core ini entries */ + REGISTER_INI_ENTRIES(); + + /* Register Zend ini entries */ + zend_register_standard_ini_entries(TSRMLS_C); + + /* Disable realpath cache if safe_mode or open_basedir are set */ + if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { + CWDG(realpath_cache_size_limit) = 0; + } + + /* initialize stream wrappers registry + * (this uses configuration parameters from php.ini) + */ + if (php_init_stream_wrappers(module_number TSRMLS_CC) == FAILURE) { + php_printf("PHP: Unable to initialize stream url wrappers.\n"); + return FAILURE; + } + + /* initialize registry for images to be used in phpinfo() + (this uses configuration parameters from php.ini) + */ + if (php_init_info_logos() == FAILURE) { + php_printf("PHP: Unable to initialize info phpinfo logos.\n"); + return FAILURE; + } + + zuv.html_errors = 1; + zuv.import_use_extension = ".php"; + php_startup_auto_globals(TSRMLS_C); + zend_set_utility_values(&zuv); + php_startup_sapi_content_types(TSRMLS_C); + + REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php_os, strlen(php_os), CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_SAPI", sapi_module.name, strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("DEFAULT_INCLUDE_PATH", PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PEAR_INSTALL_DIR", PEAR_INSTALLDIR, sizeof(PEAR_INSTALLDIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PEAR_EXTENSION_DIR", PHP_EXTENSION_DIR, sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_EXTENSION_DIR", PHP_EXTENSION_DIR, sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_PREFIX", PHP_PREFIX, sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_BINDIR", PHP_BINDIR, sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_LIBDIR", PHP_LIBDIR, sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_DATADIR", PHP_DATADIR, sizeof(PHP_DATADIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_SYSCONFDIR", PHP_SYSCONFDIR, sizeof(PHP_SYSCONFDIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_LOCALSTATEDIR", PHP_LOCALSTATEDIR, sizeof(PHP_LOCALSTATEDIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_PATH", PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_SHLIB_SUFFIX", PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_EOL", PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), CONST_PERSISTENT | CONST_CS); + php_output_register_constants(TSRMLS_C); + php_rfc1867_register_constants(TSRMLS_C); + + if (php_startup_ticks(TSRMLS_C) == FAILURE) { + php_printf("Unable to start PHP ticks\n"); + return FAILURE; + } + + /* Register internal Zend classes */ + zend_register_default_classes(TSRMLS_C); + + /* startup extensions staticly compiled in */ + if (php_register_internal_extensions(TSRMLS_C) == FAILURE) { + php_printf("Unable to start builtin modules\n"); + return FAILURE; + } + + /* start additional PHP extensions */ + php_register_extensions(&additional_modules, num_additional_modules TSRMLS_CC); + + /* load and startup extensions compiled as shared objects (aka DLLs) + as requested by php.ini entries + theese are loaded after initialization of internal extensions + as extensions *might* rely on things from ext/standard + which is always an internal extension and to be initialized + ahead of all other internals + */ + php_ini_register_extensions(TSRMLS_C); + zend_startup_modules(TSRMLS_C); + + /* disable certain classes and functions as requested by php.ini */ + php_disable_functions(TSRMLS_C); + php_disable_classes(TSRMLS_C); + + /* start Zend extensions */ + zend_startup_extensions(); + +#ifdef ZTS + zend_post_startup(TSRMLS_C); +#endif + + module_initialized = 1; + sapi_deactivate(TSRMLS_C); + module_startup = 0; + + shutdown_memory_manager(1, 0 TSRMLS_CC); + + /* we're done */ + return SUCCESS; +} +/* }}} */ + +void php_module_shutdown_for_exec(void) +{ + /* used to close fd's in the range 3.255 here, but it's problematic */ +} + +/* {{{ php_module_shutdown_wrapper + */ +int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals) +{ + TSRMLS_FETCH(); + php_module_shutdown(TSRMLS_C); + return SUCCESS; +} +/* }}} */ + +/* {{{ php_module_shutdown + */ +void php_module_shutdown(TSRMLS_D) +{ + int module_number=0; /* for UNREGISTER_INI_ENTRIES() */ + + module_shutdown = 1; + + if (!module_initialized) { + return; + } + +#ifdef ZTS + ts_free_worker_threads(); +#endif + +#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK)) + /*close winsock */ + WSACleanup(); +#endif + + php_shutdown_ticks(TSRMLS_C); + sapi_flush(TSRMLS_C); + + zend_shutdown(TSRMLS_C); + + /* Destroys filter & transport registries too */ + php_shutdown_stream_wrappers(module_number TSRMLS_CC); + + php_shutdown_info_logos(); + UNREGISTER_INI_ENTRIES(); + + /* close down the ini config */ + php_shutdown_config(); + +#ifndef ZTS + zend_ini_shutdown(TSRMLS_C); + shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC); + core_globals_dtor(&core_globals TSRMLS_CC); +#else + zend_ini_global_shutdown(TSRMLS_C); + ts_free_id(core_globals_id); +#endif + + php_shutdown_temporary_directory(); + + module_initialized = 0; + +#if defined(PHP_WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1400) + if (old_invalid_parameter_handler == NULL) { + _set_invalid_parameter_handler(old_invalid_parameter_handler); + } +#endif +} +/* }}} */ + +/* {{{ php_execute_script + */ +PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC) +{ + zend_file_handle *prepend_file_p, *append_file_p; + zend_file_handle prepend_file = {0}, append_file = {0}; +#if HAVE_BROKEN_GETCWD + int old_cwd_fd = -1; +#else + char *old_cwd; +#endif + int retval = 0; + + EG(exit_status) = 0; + if (php_handle_special_queries(TSRMLS_C)) { + zend_file_handle_dtor(primary_file); + return 0; + } +#ifndef HAVE_BROKEN_GETCWD +# define OLD_CWD_SIZE 4096 + old_cwd = do_alloca(OLD_CWD_SIZE); + old_cwd[0] = '\0'; +#endif + + zend_try { + char realfile[MAXPATHLEN]; + +#ifdef PHP_WIN32 + UpdateIniFromRegistry(primary_file->filename TSRMLS_CC); +#endif + + PG(during_request_startup) = 0; + + if ((primary_file->type == ZEND_HANDLE_FILENAME || primary_file->type == ZEND_HANDLE_STREAM) && primary_file->filename) { +#if HAVE_BROKEN_GETCWD + /* this looks nasty to me */ + old_cwd_fd = open(".", 0); +#else + VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1); +#endif + VCWD_CHDIR_FILE(primary_file->filename); + } + + /* Only lookup the real file path and add it to the included_files list if already opened + * otherwise it will get opened and added to the included_files list in zend_execute_scripts + */ + if (primary_file->filename && + primary_file->opened_path == NULL && + primary_file->type != ZEND_HANDLE_FILENAME + ) { + int realfile_len; + int dummy = 1; + + if (expand_filepath(primary_file->filename, realfile TSRMLS_CC)) { + realfile_len = strlen(realfile); + zend_hash_add(&EG(included_files), realfile, realfile_len+1, (void *)&dummy, sizeof(int), NULL); + primary_file->opened_path = estrndup(realfile, realfile_len); + } + } + + if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) { + prepend_file.filename = PG(auto_prepend_file); + prepend_file.opened_path = NULL; + prepend_file.free_filename = 0; + prepend_file.type = ZEND_HANDLE_FILENAME; + prepend_file_p = &prepend_file; + } else { + prepend_file_p = NULL; + } + + if (PG(auto_append_file) && PG(auto_append_file)[0]) { + append_file.filename = PG(auto_append_file); + append_file.opened_path = NULL; + append_file.free_filename = 0; + append_file.type = ZEND_HANDLE_FILENAME; + append_file_p = &append_file; + } else { + append_file_p = NULL; + } + if (PG(max_input_time) != -1) { +#ifdef PHP_WIN32 + zend_unset_timeout(TSRMLS_C); +#endif + zend_set_timeout(INI_INT("max_execution_time")); + } + retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == SUCCESS); + + } zend_end_try(); + +#if HAVE_BROKEN_GETCWD + if (old_cwd_fd != -1) { + fchdir(old_cwd_fd); + close(old_cwd_fd); + } +#else + if (old_cwd[0] != '\0') { + VCWD_CHDIR(old_cwd); + } + free_alloca(old_cwd); +#endif + return retval; +} +/* }}} */ + +/* {{{ php_execute_simple_script + */ +PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval **ret TSRMLS_DC) +{ + char *old_cwd; + + EG(exit_status) = 0; +#define OLD_CWD_SIZE 4096 + old_cwd = do_alloca(OLD_CWD_SIZE); + old_cwd[0] = '\0'; + + zend_try { +#ifdef PHP_WIN32 + UpdateIniFromRegistry(primary_file->filename TSRMLS_CC); +#endif + + PG(during_request_startup) = 0; + + if (primary_file->type == ZEND_HANDLE_FILENAME && primary_file->filename) { + VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1); + VCWD_CHDIR_FILE(primary_file->filename); + } + zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, ret, 1, primary_file); + } zend_end_try(); + + if (old_cwd[0] != '\0') { + VCWD_CHDIR(old_cwd); + } + + free_alloca(old_cwd); + return EG(exit_status); +} +/* }}} */ + +/* {{{ php_handle_aborted_connection + */ +PHPAPI void php_handle_aborted_connection(void) +{ + TSRMLS_FETCH(); + + PG(connection_status) = PHP_CONNECTION_ABORTED; + php_output_set_status(0 TSRMLS_CC); + + if (!PG(ignore_user_abort)) { + zend_bailout(); + } +} +/* }}} */ + +/* {{{ php_handle_auth_data + */ +PHPAPI int php_handle_auth_data(const char *auth TSRMLS_DC) +{ + int ret = -1; + + if (auth && auth[0] != '\0' && strncmp(auth, "Basic ", 6) == 0) { + char *pass; + char *user; + + user = php_base64_decode(auth + 6, strlen(auth) - 6, NULL); + if (user) { + pass = strchr(user, ':'); + if (pass) { + *pass++ = '\0'; + SG(request_info).auth_user = user; + SG(request_info).auth_password = estrdup(pass); + ret = 0; + } else { + efree(user); + } + } + } + + if (ret == -1) { + SG(request_info).auth_user = SG(request_info).auth_password = NULL; + } else { + SG(request_info).auth_digest = NULL; + } + + if (ret == -1 && auth && auth[0] != '\0' && strncmp(auth, "Digest ", 7) == 0) { + SG(request_info).auth_digest = estrdup(auth + 7); + ret = 0; + } + + if (ret == -1) { + SG(request_info).auth_digest = NULL; + } + + return ret; +} +/* }}} */ + +/* {{{ php_lint_script + */ +PHPAPI int php_lint_script(zend_file_handle *file TSRMLS_DC) +{ + zend_op_array *op_array; + int retval = FAILURE; + + zend_try { + op_array = zend_compile_file(file, ZEND_INCLUDE TSRMLS_CC); + zend_destroy_file_handle(file TSRMLS_CC); + + if (op_array) { + destroy_op_array(op_array TSRMLS_CC); + efree(op_array); + retval = SUCCESS; + } + } zend_end_try(); + + return retval; +} +/* }}} */ + +#ifdef PHP_WIN32 +/* {{{ dummy_indent + just so that this symbol gets exported... */ +PHPAPI void dummy_indent(void) +{ + zend_indent(); +} +/* }}} */ +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/main/php_config.h.in php-5.2.5-suhosin/main/php_config.h.in --- php-5.2.5/main/php_config.h.in 2007-11-08 16:36:36.000000000 +0100 +++ php-5.2.5-suhosin/main/php_config.h.in 2007-11-12 12:38:56.000000000 +0100 @@ -803,6 +803,9 @@ /* Define if the target system has /dev/urandom device */ #undef HAVE_DEV_URANDOM +/* Suhosin-Patch for PHP */ +#undef SUHOSIN_PATCH + /* Whether you have AOLserver */ #undef HAVE_AOLSERVER diff -Naur php-5.2.5/main/php.h php-5.2.5-suhosin/main/php.h --- php-5.2.5/main/php.h 2007-08-31 09:48:05.000000000 +0200 +++ php-5.2.5-suhosin/main/php.h 2007-11-12 12:38:56.000000000 +0100 @@ -40,6 +40,13 @@ #undef sprintf #define sprintf php_sprintf +#if SUHOSIN_PATCH +#if HAVE_REALPATH +#undef realpath +#define realpath php_realpath +#endif +#endif + /* PHP's DEBUG value must match Zend's ZEND_DEBUG value */ #undef PHP_DEBUG #define PHP_DEBUG ZEND_DEBUG @@ -448,6 +455,10 @@ #endif #endif /* !XtOffsetOf */ +#if SUHOSIN_PATCH +#include "suhosin_patch.h" +#endif + #endif /* diff -Naur php-5.2.5/main/php.h.orig php-5.2.5-suhosin/main/php.h.orig --- php-5.2.5/main/php.h.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/php.h.orig 2007-08-31 09:48:05.000000000 +0200 @@ -0,0 +1,460 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2007 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Andi Gutmans | + | Zeev Suraski | + +----------------------------------------------------------------------+ + */ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +#ifndef PHP_H +#define PHP_H + +#ifdef HAVE_DMALLOC +#include +#endif + +#define PHP_API_VERSION 20041225 +#define PHP_HAVE_STREAMS +#define YYDEBUG 0 + +#include "php_version.h" +#include "zend.h" +#include "zend_qsort.h" +#include "php_compat.h" + +#include "zend_API.h" + +#undef sprintf +#define sprintf php_sprintf + +/* PHP's DEBUG value must match Zend's ZEND_DEBUG value */ +#undef PHP_DEBUG +#define PHP_DEBUG ZEND_DEBUG + +#ifdef PHP_WIN32 +#include "tsrm_win32.h" +#include "win95nt.h" +# ifdef PHP_EXPORTS +# define PHPAPI __declspec(dllexport) +# else +# define PHPAPI __declspec(dllimport) +# endif +#define PHP_DIR_SEPARATOR '\\' +#define PHP_EOL "\r\n" +#else +#define PHPAPI +#define THREAD_LS +#define PHP_DIR_SEPARATOR '/' +#if defined(__MacOSX__) +#define PHP_EOL "\r" +#else +#define PHP_EOL "\n" +#endif +#endif + +#ifdef NETWARE +/* For php_get_uname() function */ +#define PHP_UNAME "NetWare" +#define PHP_OS PHP_UNAME +#endif + +#include "php_regex.h" + +#if HAVE_ASSERT_H +#if PHP_DEBUG +#undef NDEBUG +#else +#ifndef NDEBUG +#define NDEBUG +#endif +#endif +#include +#else /* HAVE_ASSERT_H */ +#define assert(expr) ((void) (0)) +#endif /* HAVE_ASSERT_H */ + +#define APACHE 0 + +#if HAVE_UNIX_H +#include +#endif + +#if HAVE_ALLOCA_H +#include +#endif + +#if HAVE_BUILD_DEFS_H +#include +#endif + +/* + * This is a fast version of strlcpy which should be used, if you + * know the size of the destination buffer and if you know + * the length of the source string. + * + * size is the allocated number of bytes of dst + * src_size is the number of bytes excluding the NUL of src + */ + +#define PHP_STRLCPY(dst, src, size, src_size) \ + { \ + size_t php_str_len; \ + \ + if (src_size >= size) \ + php_str_len = size - 1; \ + else \ + php_str_len = src_size; \ + memcpy(dst, src, php_str_len); \ + dst[php_str_len] = '\0'; \ + } + +#ifndef HAVE_STRLCPY +BEGIN_EXTERN_C() +PHPAPI size_t php_strlcpy(char *dst, const char *src, size_t siz); +END_EXTERN_C() +#undef strlcpy +#define strlcpy php_strlcpy +#endif + +#ifndef HAVE_STRLCAT +BEGIN_EXTERN_C() +PHPAPI size_t php_strlcat(char *dst, const char *src, size_t siz); +END_EXTERN_C() +#undef strlcat +#define strlcat php_strlcat +#endif + +#ifndef HAVE_STRTOK_R +BEGIN_EXTERN_C() +char *strtok_r(char *s, const char *delim, char **last); +END_EXTERN_C() +#endif + +#ifndef HAVE_SOCKLEN_T +typedef unsigned int socklen_t; +#endif + +#define CREATE_MUTEX(a, b) +#define SET_MUTEX(a) +#define FREE_MUTEX(a) + +/* + * Then the ODBC support can use both iodbc and Solid, + * uncomment this. + * #define HAVE_ODBC (HAVE_IODBC|HAVE_SOLID) + */ + +#include +#include +#if HAVE_UNISTD_H +#include +#endif +#if HAVE_STDARG_H +#include +#else +# if HAVE_SYS_VARARGS_H +# include +# endif +#endif + + +#include "zend_hash.h" +#include "php3_compat.h" +#include "zend_alloc.h" +#include "zend_stack.h" + +#if STDC_HEADERS +# include +#else +# ifndef HAVE_MEMCPY +# define memcpy(d, s, n) bcopy((s), (d), (n)) +# endif +# ifndef HAVE_MEMMOVE +# define memmove(d, s, n) bcopy ((s), (d), (n)) +# endif +#endif + +#include "safe_mode.h" + +#ifndef HAVE_STRERROR +char *strerror(int); +#endif + +#if (REGEX == 1 || REGEX == 0) && !defined(NO_REGEX_EXTRA_H) +#include "regex/regex_extra.h" +#endif + +#if HAVE_PWD_H +# ifdef PHP_WIN32 +#include "win32/param.h" +# else +#include +#include +# endif +#endif + +#if HAVE_LIMITS_H +#include +#endif + +#ifndef LONG_MAX +#define LONG_MAX 2147483647L +#endif + +#ifndef LONG_MIN +#define LONG_MIN (- LONG_MAX - 1) +#endif + +#ifndef INT_MAX +#define INT_MAX 2147483647 +#endif + +#ifndef INT_MIN +#define INT_MIN (- INT_MAX - 1) +#endif + +#define PHP_GCC_VERSION ZEND_GCC_VERSION +#define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC +#define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT + +BEGIN_EXTERN_C() +#include "snprintf.h" +END_EXTERN_C() +#include "spprintf.h" + +#define EXEC_INPUT_BUF 4096 + +#define PHP_MIME_TYPE "application/x-httpd-php" + +/* macros */ +#define STR_PRINT(str) ((str)?(str):"") + +#ifndef MAXPATHLEN +# ifdef PATH_MAX +# define MAXPATHLEN PATH_MAX +# elif defined(MAX_PATH) +# define MAXPATHLEN MAX_PATH +# else +# define MAXPATHLEN 256 /* Should be safe for any weird systems that do not define it */ +# endif +#endif + + +/* global variables */ +#if !defined(PHP_WIN32) +#define PHP_SLEEP_NON_VOID +#define php_sleep sleep +extern char **environ; +#endif /* !defined(PHP_WIN32) */ + +#ifdef PHP_PWRITE_64 +ssize_t pwrite(int, void *, size_t, off64_t); +#endif + +#ifdef PHP_PREAD_64 +ssize_t pread(int, void *, size_t, off64_t); +#endif + +BEGIN_EXTERN_C() +void phperror(char *error); +PHPAPI int php_write(void *buf, uint size TSRMLS_DC); +PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, + 2); +PHPAPI void php_log_err(char *log_message TSRMLS_DC); +int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); +int cfgparse(void); +END_EXTERN_C() + +#define php_error zend_error + +typedef enum { + EH_NORMAL = 0, + EH_SUPPRESS, + EH_THROW +} error_handling_t; + +BEGIN_EXTERN_C() +PHPAPI void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC); +#define php_std_error_handling() php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC) + +PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); + +#ifdef ZTS +#define PHP_ATTR_FMT_OFFSET 1 +#else +#define PHP_ATTR_FMT_OFFSET 0 +#endif + +/* PHPAPI void php_error(int type, const char *format, ...); */ +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4); +PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5); +PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6); +END_EXTERN_C() + +#define php_error_docref php_error_docref0 + +#define zenderror phperror +#define zendlex phplex + +#define phpparse zendparse +#define phprestart zendrestart +#define phpin zendin + +#define php_memnstr zend_memnstr + +/* functions */ +BEGIN_EXTERN_C() +int php_register_internal_extensions(TSRMLS_D); + +int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC); + +PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata); + +PHPAPI void php_com_initialize(TSRMLS_D); +END_EXTERN_C() + +/* PHP-named Zend macro wrappers */ +#define PHP_FN ZEND_FN +#define PHP_MN ZEND_MN +#define PHP_NAMED_FUNCTION ZEND_NAMED_FUNCTION +#define PHP_FUNCTION ZEND_FUNCTION +#define PHP_METHOD ZEND_METHOD + +#define PHP_RAW_NAMED_FE ZEND_RAW_NAMED_FE +#define PHP_NAMED_FE ZEND_NAMED_FE +#define PHP_FE ZEND_FE +#define PHP_DEP_FE ZEND_DEP_FE +#define PHP_FALIAS ZEND_FALIAS +#define PHP_DEP_FALIAS ZEND_DEP_FALIAS +#define PHP_ME ZEND_ME +#define PHP_MALIAS ZEND_MALIAS +#define PHP_ABSTRACT_ME ZEND_ABSTRACT_ME +#define PHP_ME_MAPPING ZEND_ME_MAPPING + +#define PHP_MODULE_STARTUP_N ZEND_MODULE_STARTUP_N +#define PHP_MODULE_SHUTDOWN_N ZEND_MODULE_SHUTDOWN_N +#define PHP_MODULE_ACTIVATE_N ZEND_MODULE_ACTIVATE_N +#define PHP_MODULE_DEACTIVATE_N ZEND_MODULE_DEACTIVATE_N +#define PHP_MODULE_INFO_N ZEND_MODULE_INFO_N + +#define PHP_MODULE_STARTUP_D ZEND_MODULE_STARTUP_D +#define PHP_MODULE_SHUTDOWN_D ZEND_MODULE_SHUTDOWN_D +#define PHP_MODULE_ACTIVATE_D ZEND_MODULE_ACTIVATE_D +#define PHP_MODULE_DEACTIVATE_D ZEND_MODULE_DEACTIVATE_D +#define PHP_MODULE_INFO_D ZEND_MODULE_INFO_D + +/* Compatibility macros */ +#define PHP_MINIT ZEND_MODULE_STARTUP_N +#define PHP_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N +#define PHP_RINIT ZEND_MODULE_ACTIVATE_N +#define PHP_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N +#define PHP_MINFO ZEND_MODULE_INFO_N +#define PHP_GINIT ZEND_GINIT +#define PHP_GSHUTDOWN ZEND_GSHUTDOWN + +#define PHP_MINIT_FUNCTION ZEND_MODULE_STARTUP_D +#define PHP_MSHUTDOWN_FUNCTION ZEND_MODULE_SHUTDOWN_D +#define PHP_RINIT_FUNCTION ZEND_MODULE_ACTIVATE_D +#define PHP_RSHUTDOWN_FUNCTION ZEND_MODULE_DEACTIVATE_D +#define PHP_MINFO_FUNCTION ZEND_MODULE_INFO_D +#define PHP_GINIT_FUNCTION ZEND_GINIT_FUNCTION +#define PHP_GSHUTDOWN_FUNCTION ZEND_GSHUTDOWN_FUNCTION + +#define PHP_MODULE_GLOBALS ZEND_MODULE_GLOBALS + + +/* Output support */ +#include "main/php_output.h" +#define PHPWRITE(str, str_len) php_body_write((str), (str_len) TSRMLS_CC) +#define PUTS(str) do { \ + const char *__str = (str); \ + php_body_write(__str, strlen(__str) TSRMLS_CC); \ +} while (0) + +#define PUTC(c) (php_body_write(&(c), 1 TSRMLS_CC), (c)) +#define PHPWRITE_H(str, str_len) php_header_write((str), (str_len) TSRMLS_CC) +#define PUTS_H(str) do { \ + const char *__str = (str); \ + php_header_write(__str, strlen(__str) TSRMLS_CC); \ +} while (0) + +#define PUTC_H(c) (php_header_write(&(c), 1 TSRMLS_CC), (c)) + +#include "php_streams.h" +#include "php_memory_streams.h" +#include "fopen_wrappers.h" + + +/* Virtual current working directory support */ +#include "tsrm_virtual_cwd.h" + +#include "zend_constants.h" + +/* connection status states */ +#define PHP_CONNECTION_NORMAL 0 +#define PHP_CONNECTION_ABORTED 1 +#define PHP_CONNECTION_TIMEOUT 2 + +#include "php_reentrancy.h" + +/* Finding offsets of elements within structures. + * Taken from the Apache code, which in turn, was taken from X code... + */ + +#ifndef XtOffset +#if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__riscos__))) +#ifdef __STDC__ +#define XtOffset(p_type, field) _Offsetof(p_type, field) +#else +#ifdef CRAY2 +#define XtOffset(p_type, field) \ + (sizeof(int)*((unsigned int)&(((p_type)NULL)->field))) + +#else /* !CRAY2 */ + +#define XtOffset(p_type, field) ((unsigned int)&(((p_type)NULL)->field)) + +#endif /* !CRAY2 */ +#endif /* __STDC__ */ +#else /* ! (CRAY || __arm) */ + +#define XtOffset(p_type, field) \ + ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) + +#endif /* !CRAY */ +#endif /* ! XtOffset */ + +#ifndef XtOffsetOf +#ifdef offsetof +#define XtOffsetOf(s_type, field) offsetof(s_type, field) +#else +#define XtOffsetOf(s_type, field) XtOffset(s_type*, field) +#endif +#endif /* !XtOffsetOf */ + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/main/php_logos.c php-5.2.5-suhosin/main/php_logos.c --- php-5.2.5/main/php_logos.c 2007-01-06 21:44:51.000000000 +0100 +++ php-5.2.5-suhosin/main/php_logos.c 2007-11-12 12:38:56.000000000 +0100 @@ -50,6 +50,10 @@ return zend_hash_del(&phpinfo_logo_hash, logo_string, strlen(logo_string)); } +#if SUHOSIN_PATCH +#include "suhosin_logo.h" +#endif + int php_init_info_logos(void) { if(zend_hash_init(&phpinfo_logo_hash, 0, NULL, NULL, 1)==FAILURE) @@ -58,6 +62,9 @@ php_register_info_logo(PHP_LOGO_GUID , "image/gif", php_logo , sizeof(php_logo)); php_register_info_logo(PHP_EGG_LOGO_GUID, "image/gif", php_egg_logo, sizeof(php_egg_logo)); php_register_info_logo(ZEND_LOGO_GUID , "image/gif", zend_logo , sizeof(zend_logo)); +#if SUHOSIN_PATCH + php_register_info_logo(SUHOSIN_LOGO_GUID, "image/jpeg", suhosin_logo, sizeof(suhosin_logo)); +#endif return SUCCESS; } diff -Naur php-5.2.5/main/snprintf.c php-5.2.5-suhosin/main/snprintf.c --- php-5.2.5/main/snprintf.c 2007-10-01 17:23:15.000000000 +0200 +++ php-5.2.5-suhosin/main/snprintf.c 2007-11-12 12:38:56.000000000 +0100 @@ -1080,7 +1080,11 @@ case 'n': +#if SUHOSIN_PATCH + zend_suhosin_log(S_MISC, "'n' specifier within format string"); +#else *(va_arg(ap, int *)) = cc; +#endif goto skip_output; /* diff -Naur php-5.2.5/main/snprintf.c.orig php-5.2.5-suhosin/main/snprintf.c.orig --- php-5.2.5/main/snprintf.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/snprintf.c.orig 2007-10-01 17:23:15.000000000 +0200 @@ -0,0 +1,1264 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2007 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + + +#include "php.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_INTTYPES_H +#include +#endif + +#ifdef HAVE_LOCALE_H +#include +#define LCONV_DECIMAL_POINT (*lconv->decimal_point) +#else +#define LCONV_DECIMAL_POINT '.' +#endif + +/* + * Copyright (c) 2002, 2006 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ + +static char * __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad) /* {{{ */ +{ + register char *s = NULL; + char *p, *rve, c; + size_t siz; + + if (ndigit < 0) { + siz = -ndigit + 1; + } else { + siz = ndigit + 1; + } + + /* __dtoa() doesn't allocate space for 0 so we do it by hand */ + if (value == 0.0) { + *decpt = 1 - fmode; /* 1 for 'e', 0 for 'f' */ + *sign = 0; + if ((rve = s = (char *)malloc(ndigit?siz:2)) == NULL) { + return(NULL); + } + *rve++ = '0'; + *rve = '\0'; + if (!ndigit) { + return(s); + } + } else { + p = zend_dtoa(value, fmode + 2, ndigit, decpt, sign, &rve); + if (*decpt == 9999) { + /* Infinity or Nan, convert to inf or nan like printf */ + *decpt = 0; + c = *p; + zend_freedtoa(p); + return(c == 'I' ? "INF" : "NAN"); + } + /* Make a local copy and adjust rve to be in terms of s */ + if (pad && fmode) { + siz += *decpt; + } + if ((s = (char *)malloc(siz+1)) == NULL) { + zend_freedtoa(p); + return(NULL); + } + (void) strlcpy(s, p, siz); + rve = s + (rve - p); + zend_freedtoa(p); + } + + /* Add trailing zeros */ + if (pad) { + siz -= rve - s; + while (--siz) { + *rve++ = '0'; + } + *rve = '\0'; + } + + return(s); +} +/* }}} */ + +static inline char *php_ecvt(double value, int ndigit, int *decpt, int *sign) /* {{{ */ +{ + return(__cvt(value, ndigit, decpt, sign, 0, 1)); +} +/* }}} */ + +static inline char *php_fcvt(double value, int ndigit, int *decpt, int *sign) /* {{{ */ +{ + return(__cvt(value, ndigit, decpt, sign, 1, 1)); +} +/* }}} */ + +PHPAPI char *php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf) /* {{{ */ +{ + char *digits, *dst, *src; + int i, decpt, sign; + + digits = zend_dtoa(value, 2, ndigit, &decpt, &sign, NULL); + if (decpt == 9999) { + /* + * Infinity or NaN, convert to inf or nan with sign. + * We assume the buffer is at least ndigit long. + */ + snprintf(buf, ndigit + 1, "%s%s", (sign && *digits == 'I') ? "-" : "", *digits == 'I' ? "INF" : "NAN"); + zend_freedtoa(digits); + return (buf); + } + + dst = buf; + if (sign) { + *dst++ = '-'; + } + + for (i = 0; i < ndigit && digits[i] != '\0'; i++); + + if ((decpt >= 0 && decpt - i > 4) + || (decpt < 0 && decpt < -3)) { /* use E-style */ + /* exponential format (e.g. 1.2345e+13) */ + if (--decpt < 0) { + sign = 1; + decpt = -decpt; + } else { + sign = 0; + } + src = digits; + *dst++ = *src++; + *dst++ = dec_point; + if (*src == '\0') { + *dst++ = '0'; + } else { + do { + *dst++ = *src++; + } while (*src != '\0'); + } + *dst++ = exponent; + if (sign) { + *dst++ = '-'; + } else { + *dst++ = '+'; + } + if (decpt < 10) { + *dst++ = '0' + decpt; + *dst = '\0'; + } else { + /* XXX - optimize */ + for (sign = decpt, i = 0; (sign /= 10) != 0; i++) + continue; + dst[i + 1] = '\0'; + while (decpt != 0) { + dst[i--] = '0' + decpt % 10; + decpt /= 10; + } + } + } else if (decpt < 0) { + /* standard format 0. */ + *dst++ = '0'; /* zero before decimal point */ + *dst++ = dec_point; + do { + *dst++ = '0'; + } while (++decpt < 0); + src = digits; + while (*src != '\0') { + *dst++ = *src++; + } + *dst = '\0'; + } else { + /* standard format */ + for (i = 0, src = digits; i < decpt; i++) { + if (*src != '\0') { + *dst++ = *src++; + } else { + *dst++ = '0'; + } + } + if (*src != '\0') { + if (src == digits) { + *dst++ = '0'; /* zero before decimal point */ + } + *dst++ = dec_point; + for (i = decpt; digits[i] != '\0'; i++) { + *dst++ = digits[i]; + } + } + *dst = '\0'; + } + zend_freedtoa(digits); + return (buf); +} +/* }}} */ + +/* {{{ Apache license */ +/* ==================================================================== + * Copyright (c) 1995-1998 The Apache Group. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * 4. The names "Apache Server" and "Apache Group" must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 5. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Group and was originally based + * on public domain software written at the National Center for + * Supercomputing Applications, University of Illinois, Urbana-Champaign. + * For more information on the Apache Group and the Apache HTTP server + * project, please see . + * + * This code is based on, and used with the permission of, the + * SIO stdio-replacement strx_* functions by Panos Tsirigotis + * for xinetd. + */ +/* }}} */ + +#define FALSE 0 +#define TRUE 1 +#define NUL '\0' +#define INT_NULL ((int *)0) + +#define S_NULL "(null)" +#define S_NULL_LEN 6 + +#define FLOAT_DIGITS 6 +#define EXPONENT_LENGTH 10 + + +/* + * Convert num to its decimal format. + * Return value: + * - a pointer to a string containing the number (no sign) + * - len contains the length of the string + * - is_negative is set to TRUE or FALSE depending on the sign + * of the number (always set to FALSE if is_unsigned is TRUE) + * + * The caller provides a buffer for the string: that is the buf_end argument + * which is a pointer to the END of the buffer + 1 (i.e. if the buffer + * is declared as buf[ 100 ], buf_end should be &buf[ 100 ]) + */ +/* char * ap_php_conv_10() {{{ */ +char * ap_php_conv_10(register wide_int num, register bool_int is_unsigned, + register bool_int * is_negative, char *buf_end, register int *len) +{ + register char *p = buf_end; + register u_wide_int magnitude; + + if (is_unsigned) { + magnitude = (u_wide_int) num; + *is_negative = FALSE; + } else { + *is_negative = (num < 0); + + /* + * On a 2's complement machine, negating the most negative integer + * results in a number that cannot be represented as a signed integer. + * Here is what we do to obtain the number's magnitude: + * a. add 1 to the number + * b. negate it (becomes positive) + * c. convert it to unsigned + * d. add 1 + */ + if (*is_negative) { + wide_int t = num + 1; + magnitude = ((u_wide_int) - t) + 1; + } else { + magnitude = (u_wide_int) num; + } + } + + /* + * We use a do-while loop so that we write at least 1 digit + */ + do { + register u_wide_int new_magnitude = magnitude / 10; + + *--p = (char)(magnitude - new_magnitude * 10 + '0'); + magnitude = new_magnitude; + } + while (magnitude); + + *len = buf_end - p; + return (p); +} +/* }}} */ + +/* If you change this value then also change bug24640.phpt. + * Also NDIG must be reasonable smaller than NUM_BUF_SIZE. + */ +#define NDIG 320 + + +/* + * Convert a floating point number to a string formats 'f', 'e' or 'E'. + * The result is placed in buf, and len denotes the length of the string + * The sign is returned in the is_negative argument (and is not placed + * in buf). + */ +/* PHPAPI char * php_conv_fp() {{{ */ +PHPAPI char * php_conv_fp(register char format, register double num, + boolean_e add_dp, int precision, char dec_point, bool_int * is_negative, char *buf, int *len) +{ + register char *s = buf; + register char *p, *p_orig; + int decimal_point; + + if (precision >= NDIG - 1) { + precision = NDIG - 2; + } + + if (format == 'F') { + p_orig = p = php_fcvt(num, precision, &decimal_point, is_negative); + } else { /* either e or E format */ + p_orig = p = php_ecvt(num, precision + 1, &decimal_point, is_negative); + } + + /* + * Check for Infinity and NaN + */ + if (isalpha((int)*p)) { + *len = strlen(p); + memcpy(buf, p, *len + 1); + *is_negative = FALSE; + free(p_orig); + return (buf); + } + if (format == 'F') { + if (decimal_point <= 0) { + if (num != 0 || precision > 0) { + *s++ = '0'; + if (precision > 0) { + *s++ = dec_point; + while (decimal_point++ < 0) { + *s++ = '0'; + } + } else if (add_dp) { + *s++ = dec_point; + } + } + } else { + int addz = decimal_point >= NDIG ? decimal_point - NDIG + 1 : 0; + decimal_point -= addz; + while (decimal_point-- > 0) { + *s++ = *p++; + } + while (addz-- > 0) { + *s++ = '0'; + } + if (precision > 0 || add_dp) { + *s++ = dec_point; + } + } + } else { + *s++ = *p++; + if (precision > 0 || add_dp) { + *s++ = '.'; + } + } + + /* + * copy the rest of p, the NUL is NOT copied + */ + while (*p) { + *s++ = *p++; + } + + if (format != 'F') { + char temp[EXPONENT_LENGTH]; /* for exponent conversion */ + int t_len; + bool_int exponent_is_negative; + + *s++ = format; /* either e or E */ + decimal_point--; + if (decimal_point != 0) { + p = ap_php_conv_10((wide_int) decimal_point, FALSE, &exponent_is_negative, &temp[EXPONENT_LENGTH], &t_len); + *s++ = exponent_is_negative ? '-' : '+'; + + /* + * Make sure the exponent has at least 2 digits + */ + while (t_len--) { + *s++ = *p++; + } + } else { + *s++ = '+'; + *s++ = '0'; + } + } + *len = s - buf; + free(p_orig); + return (buf); +} +/* }}} */ + +/* + * Convert num to a base X number where X is a power of 2. nbits determines X. + * For example, if nbits is 3, we do base 8 conversion + * Return value: + * a pointer to a string containing the number + * + * The caller provides a buffer for the string: that is the buf_end argument + * which is a pointer to the END of the buffer + 1 (i.e. if the buffer + * is declared as buf[ 100 ], buf_end should be &buf[ 100 ]) + */ +char * ap_php_conv_p2(register u_wide_int num, register int nbits, char format, char *buf_end, register int *len) /* {{{ */ +{ + register int mask = (1 << nbits) - 1; + register char *p = buf_end; + static char low_digits[] = "0123456789abcdef"; + static char upper_digits[] = "0123456789ABCDEF"; + register char *digits = (format == 'X') ? upper_digits : low_digits; + + do { + *--p = digits[num & mask]; + num >>= nbits; + } + while (num); + + *len = buf_end - p; + return (p); +} +/* }}} */ + +/* + * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions + * + * XXX: this is a magic number; do not decrease it + */ +#define NUM_BUF_SIZE 512 + + +/* + * Descriptor for buffer area + */ +struct buf_area { + char *buf_end; + char *nextb; /* pointer to next byte to read/write */ +}; + +typedef struct buf_area buffy; + +/* + * The INS_CHAR macro inserts a character in the buffer and writes + * the buffer back to disk if necessary + * It uses the char pointers sp and bep: + * sp points to the next available character in the buffer + * bep points to the end-of-buffer+1 + * While using this macro, note that the nextb pointer is NOT updated. + * + * NOTE: Evaluation of the c argument should not have any side-effects + */ +#define INS_CHAR(c, sp, bep, cc) \ + { \ + if (sp < bep) \ + { \ + *sp++ = c; \ + } \ + cc++; \ + } + +#define NUM( c ) ( c - '0' ) + +#define STR_TO_DEC( str, num ) \ + num = NUM( *str++ ) ; \ + while ( isdigit((int)*str ) ) \ + { \ + num *= 10 ; \ + num += NUM( *str++ ) ; \ + } + +/* + * This macro does zero padding so that the precision + * requirement is satisfied. The padding is done by + * adding '0's to the left of the string that is going + * to be printed. + */ +#define FIX_PRECISION( adjust, precision, s, s_len ) \ + if ( adjust ) \ + while ( s_len < precision ) \ + { \ + *--s = '0' ; \ + s_len++ ; \ + } + +/* + * Macro that does padding. The padding is done by printing + * the character ch. + */ +#define PAD( width, len, ch ) do \ + { \ + INS_CHAR( ch, sp, bep, cc ) ; \ + width-- ; \ + } \ + while ( width > len ) + +/* + * Prefix the character ch to the string str + * Increase length + * Set the has_prefix flag + */ +#define PREFIX( str, length, ch ) *--str = ch ; length++ ; has_prefix = YES + + +/* + * Do format conversion placing the output in buffer + */ +static int format_converter(register buffy * odp, const char *fmt, va_list ap) /* {{{ */ +{ + register char *sp; + register char *bep; + register int cc = 0; + register int i; + + register char *s = NULL; + char *q; + int s_len; + + register int min_width = 0; + int precision = 0; + enum { + LEFT, RIGHT + } adjust; + char pad_char; + char prefix_char; + + double fp_num; + wide_int i_num = (wide_int) 0; + u_wide_int ui_num; + + char num_buf[NUM_BUF_SIZE]; + char char_buf[2]; /* for printing %% and % */ + +#ifdef HAVE_LOCALE_H + struct lconv *lconv = NULL; +#endif + + /* + * Flag variables + */ + length_modifier_e modifier; + boolean_e alternate_form; + boolean_e print_sign; + boolean_e print_blank; + boolean_e adjust_precision; + boolean_e adjust_width; + bool_int is_negative; + + sp = odp->nextb; + bep = odp->buf_end; + + while (*fmt) { + if (*fmt != '%') { + INS_CHAR(*fmt, sp, bep, cc); + } else { + /* + * Default variable settings + */ + adjust = RIGHT; + alternate_form = print_sign = print_blank = NO; + pad_char = ' '; + prefix_char = NUL; + + fmt++; + + /* + * Try to avoid checking for flags, width or precision + */ + if (isascii((int)*fmt) && !islower((int)*fmt)) { + /* + * Recognize flags: -, #, BLANK, + + */ + for (;; fmt++) { + if (*fmt == '-') + adjust = LEFT; + else if (*fmt == '+') + print_sign = YES; + else if (*fmt == '#') + alternate_form = YES; + else if (*fmt == ' ') + print_blank = YES; + else if (*fmt == '0') + pad_char = '0'; + else + break; + } + + /* + * Check if a width was specified + */ + if (isdigit((int)*fmt)) { + STR_TO_DEC(fmt, min_width); + adjust_width = YES; + } else if (*fmt == '*') { + min_width = va_arg(ap, int); + fmt++; + adjust_width = YES; + if (min_width < 0) { + adjust = LEFT; + min_width = -min_width; + } + } else + adjust_width = NO; + + /* + * Check if a precision was specified + * + * XXX: an unreasonable amount of precision may be specified + * resulting in overflow of num_buf. Currently we + * ignore this possibility. + */ + if (*fmt == '.') { + adjust_precision = YES; + fmt++; + if (isdigit((int)*fmt)) { + STR_TO_DEC(fmt, precision); + } else if (*fmt == '*') { + precision = va_arg(ap, int); + fmt++; + if (precision < 0) + precision = 0; + } else + precision = 0; + } else + adjust_precision = NO; + } else + adjust_precision = adjust_width = NO; + + /* + * Modifier check + */ + switch (*fmt) { + case 'L': + fmt++; + modifier = LM_LONG_DOUBLE; + break; + case 'I': + fmt++; +#if SIZEOF_LONG_LONG + if (*fmt == '6' && *(fmt+1) == '4') { + fmt += 2; + modifier = LM_LONG_LONG; + } else +#endif + if (*fmt == '3' && *(fmt+1) == '2') { + fmt += 2; + modifier = LM_LONG; + } else { +#ifdef _WIN64 + modifier = LM_LONG_LONG; +#else + modifier = LM_LONG; +#endif + } + break; + case 'l': + fmt++; +#if SIZEOF_LONG_LONG + if (*fmt == 'l') { + fmt++; + modifier = LM_LONG_LONG; + } else +#endif + modifier = LM_LONG; + break; + case 'z': + fmt++; + modifier = LM_SIZE_T; + break; + case 'j': + fmt++; +#if SIZEOF_INTMAX_T + modifier = LM_INTMAX_T; +#else + modifier = LM_SIZE_T; +#endif + break; + case 't': + fmt++; +#if SIZEOF_PTRDIFF_T + modifier = LM_PTRDIFF_T; +#else + modifier = LM_SIZE_T; +#endif + break; + case 'h': + fmt++; + if (*fmt == 'h') { + fmt++; + } + /* these are promoted to int, so no break */ + default: + modifier = LM_STD; + break; + } + + /* + * Argument extraction and printing. + * First we determine the argument type. + * Then, we convert the argument to a string. + * On exit from the switch, s points to the string that + * must be printed, s_len has the length of the string + * The precision requirements, if any, are reflected in s_len. + * + * NOTE: pad_char may be set to '0' because of the 0 flag. + * It is reset to ' ' by non-numeric formats + */ + switch (*fmt) { + case 'u': + switch(modifier) { + default: + i_num = (wide_int) va_arg(ap, unsigned int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + i_num = (wide_int) va_arg(ap, unsigned long int); + break; + case LM_SIZE_T: + i_num = (wide_int) va_arg(ap, size_t); + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + i_num = (wide_int) va_arg(ap, u_wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + i_num = (wide_int) va_arg(ap, uintmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + i_num = (wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + /* + * The rest also applies to other integer formats, so fall + * into that case. + */ + case 'd': + case 'i': + /* + * Get the arg if we haven't already. + */ + if ((*fmt) != 'u') { + switch(modifier) { + default: + i_num = (wide_int) va_arg(ap, int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + i_num = (wide_int) va_arg(ap, long int); + break; + case LM_SIZE_T: +#if SIZEOF_SSIZE_T + i_num = (wide_int) va_arg(ap, ssize_t); +#else + i_num = (wide_int) va_arg(ap, size_t); +#endif + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + i_num = (wide_int) va_arg(ap, wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + i_num = (wide_int) va_arg(ap, intmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + i_num = (wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + } + s = ap_php_conv_10(i_num, (*fmt) == 'u', &is_negative, + &num_buf[NUM_BUF_SIZE], &s_len); + FIX_PRECISION(adjust_precision, precision, s, s_len); + + if (*fmt != 'u') { + if (is_negative) { + prefix_char = '-'; + } else if (print_sign) { + prefix_char = '+'; + } else if (print_blank) { + prefix_char = ' '; + } + } + break; + + + case 'o': + switch(modifier) { + default: + ui_num = (u_wide_int) va_arg(ap, unsigned int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + ui_num = (u_wide_int) va_arg(ap, unsigned long int); + break; + case LM_SIZE_T: + ui_num = (u_wide_int) va_arg(ap, size_t); + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + ui_num = (u_wide_int) va_arg(ap, u_wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + ui_num = (u_wide_int) va_arg(ap, uintmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + ui_num = (u_wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + s = ap_php_conv_p2(ui_num, 3, *fmt, &num_buf[NUM_BUF_SIZE], &s_len); + FIX_PRECISION(adjust_precision, precision, s, s_len); + if (alternate_form && *s != '0') { + *--s = '0'; + s_len++; + } + break; + + + case 'x': + case 'X': + switch(modifier) { + default: + ui_num = (u_wide_int) va_arg(ap, unsigned int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + ui_num = (u_wide_int) va_arg(ap, unsigned long int); + break; + case LM_SIZE_T: + ui_num = (u_wide_int) va_arg(ap, size_t); + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + ui_num = (u_wide_int) va_arg(ap, u_wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + ui_num = (u_wide_int) va_arg(ap, uintmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + ui_num = (u_wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + s = ap_php_conv_p2(ui_num, 4, *fmt, &num_buf[NUM_BUF_SIZE], &s_len); + FIX_PRECISION(adjust_precision, precision, s, s_len); + if (alternate_form && i_num != 0) { + *--s = *fmt; /* 'x' or 'X' */ + *--s = '0'; + s_len += 2; + } + break; + + + case 's': + case 'v': + s = va_arg(ap, char *); + if (s != NULL) { + s_len = strlen(s); + if (adjust_precision && precision < s_len) { + s_len = precision; + } + } else { + s = S_NULL; + s_len = S_NULL_LEN; + } + pad_char = ' '; + break; + + + case 'f': + case 'F': + case 'e': + case 'E': + switch(modifier) { + case LM_LONG_DOUBLE: + fp_num = (double) va_arg(ap, long double); + break; + case LM_STD: + fp_num = va_arg(ap, double); + break; + default: + goto fmt_error; + } + + if (zend_isnan(fp_num)) { + s = "NAN"; + s_len = 3; + } else if (zend_isinf(fp_num)) { + s = "INF"; + s_len = 3; + } else { +#ifdef HAVE_LOCALE_H + if (!lconv) { + lconv = localeconv(); + } +#endif + s = php_conv_fp((*fmt == 'f')?'F':*fmt, fp_num, alternate_form, + (adjust_precision == NO) ? FLOAT_DIGITS : precision, + (*fmt == 'f')?LCONV_DECIMAL_POINT:'.', + &is_negative, &num_buf[1], &s_len); + if (is_negative) + prefix_char = '-'; + else if (print_sign) + prefix_char = '+'; + else if (print_blank) + prefix_char = ' '; + } + break; + + + case 'g': + case 'k': + case 'G': + case 'H': + switch(modifier) { + case LM_LONG_DOUBLE: + fp_num = (double) va_arg(ap, long double); + break; + case LM_STD: + fp_num = va_arg(ap, double); + break; + default: + goto fmt_error; + } + + if (zend_isnan(fp_num)) { + s = "NAN"; + s_len = 3; + break; + } else if (zend_isinf(fp_num)) { + if (fp_num > 0) { + s = "INF"; + s_len = 3; + } else { + s = "-INF"; + s_len = 4; + } + break; + } + + if (adjust_precision == NO) { + precision = FLOAT_DIGITS; + } else if (precision == 0) { + precision = 1; + } + /* + * * We use &num_buf[ 1 ], so that we have room for the sign + */ +#ifdef HAVE_LOCALE_H + if (!lconv) { + lconv = localeconv(); + } +#endif + s = php_gcvt(fp_num, precision, (*fmt=='H' || *fmt == 'k') ? '.' : LCONV_DECIMAL_POINT, (*fmt == 'G' || *fmt == 'H')?'E':'e', &num_buf[1]); + if (*s == '-') { + prefix_char = *s++; + } else if (print_sign) { + prefix_char = '+'; + } else if (print_blank) { + prefix_char = ' '; + } + + s_len = strlen(s); + + if (alternate_form && (q = strchr(s, '.')) == NULL) { + s[s_len++] = '.'; + } + break; + + + case 'c': + char_buf[0] = (char) (va_arg(ap, int)); + s = &char_buf[0]; + s_len = 1; + pad_char = ' '; + break; + + + case '%': + char_buf[0] = '%'; + s = &char_buf[0]; + s_len = 1; + pad_char = ' '; + break; + + + case 'n': + *(va_arg(ap, int *)) = cc; + goto skip_output; + + /* + * Always extract the argument as a "char *" pointer. We + * should be using "void *" but there are still machines + * that don't understand it. + * If the pointer size is equal to the size of an unsigned + * integer we convert the pointer to a hex number, otherwise + * we print "%p" to indicate that we don't handle "%p". + */ + case 'p': + if (sizeof(char *) <= sizeof(u_wide_int)) { + ui_num = (u_wide_int)((size_t) va_arg(ap, char *)); + s = ap_php_conv_p2(ui_num, 4, 'x', + &num_buf[NUM_BUF_SIZE], &s_len); + if (ui_num != 0) { + *--s = 'x'; + *--s = '0'; + s_len += 2; + } + } else { + s = "%p"; + s_len = 2; + } + pad_char = ' '; + break; + + + case NUL: + /* + * The last character of the format string was %. + * We ignore it. + */ + continue; + + +fmt_error: + php_error(E_ERROR, "Illegal length modifier specified '%c' in s[np]printf call", *fmt); + /* + * The default case is for unrecognized %'s. + * We print % to help the user identify what + * option is not understood. + * This is also useful in case the user wants to pass + * the output of format_converter to another function + * that understands some other % (like syslog). + * Note that we can't point s inside fmt because the + * unknown could be preceded by width etc. + */ + default: + char_buf[0] = '%'; + char_buf[1] = *fmt; + s = char_buf; + s_len = 2; + pad_char = ' '; + break; + } + + if (prefix_char != NUL) { + *--s = prefix_char; + s_len++; + } + if (adjust_width && adjust == RIGHT && min_width > s_len) { + if (pad_char == '0' && prefix_char != NUL) { + INS_CHAR(*s, sp, bep, cc) + s++; + s_len--; + min_width--; + } + PAD(min_width, s_len, pad_char); + } + /* + * Print the string s. + */ + for (i = s_len; i != 0; i--) { + INS_CHAR(*s, sp, bep, cc); + s++; + } + + if (adjust_width && adjust == LEFT && min_width > s_len) + PAD(min_width, s_len, pad_char); + } +skip_output: + fmt++; + } + odp->nextb = sp; + return (cc); +} +/* }}} */ + +/* + * This is the general purpose conversion function. + */ +static void strx_printv(int *ccp, char *buf, size_t len, const char *format, va_list ap) /* {{{ */ +{ + buffy od; + int cc; + + /* + * First initialize the descriptor + * Notice that if no length is given, we initialize buf_end to the + * highest possible address. + */ + if (len == 0) { + od.buf_end = (char *) ~0; + od.nextb = (char *) ~0; + } else { + od.buf_end = &buf[len-1]; + od.nextb = buf; + } + + /* + * Do the conversion + */ + cc = format_converter(&od, format, ap); + if (len != 0 && od.nextb <= od.buf_end) { + *(od.nextb) = '\0'; + } + if (ccp) { + *ccp = cc; + } +} +/* }}} */ + +PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{ */ +{ + int cc; + va_list ap; + + va_start(ap, format); + strx_printv(&cc, buf, len, format, ap); + va_end(ap); + if (cc >= len) { + cc = len -1; + buf[cc] = '\0'; + } + return cc; +} +/* }}} */ + +PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap) /* {{{ */ +{ + int cc; + + strx_printv(&cc, buf, len, format, ap); + if (cc >= len) { + cc = len -1; + buf[cc] = '\0'; + } + return cc; +} +/* }}} */ + +PHPAPI int ap_php_snprintf(char *buf, size_t len, const char *format,...) /* {{{ */ +{ + int cc; + va_list ap; + + va_start(ap, format); + strx_printv(&cc, buf, len, format, ap); + va_end(ap); + return (cc); +} +/* }}} */ + +PHPAPI int ap_php_vsnprintf(char *buf, size_t len, const char *format, va_list ap) /* {{{ */ +{ + int cc; + + strx_printv(&cc, buf, len, format, ap); + return (cc); +} +/* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/main/spprintf.c php-5.2.5-suhosin/main/spprintf.c --- php-5.2.5/main/spprintf.c 2007-10-01 17:23:15.000000000 +0200 +++ php-5.2.5-suhosin/main/spprintf.c 2007-11-12 12:38:56.000000000 +0100 @@ -673,7 +673,11 @@ case 'n': +#if SUHOSIN_PATCH + zend_suhosin_log(S_MISC, "'n' specifier within format string"); +#else *(va_arg(ap, int *)) = xbuf->len; +#endif goto skip_output; /* diff -Naur php-5.2.5/main/spprintf.c.orig php-5.2.5-suhosin/main/spprintf.c.orig --- php-5.2.5/main/spprintf.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/spprintf.c.orig 2007-10-01 17:23:15.000000000 +0200 @@ -0,0 +1,801 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2007 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Marcus Boerger | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +/* This is the spprintf implementation. + * It has emerged from apache snprintf. See original header: + */ + +/* ==================================================================== + * Copyright (c) 1995-1998 The Apache Group. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * 4. The names "Apache Server" and "Apache Group" must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 5. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Group and was originally based + * on public domain software written at the National Center for + * Supercomputing Applications, University of Illinois, Urbana-Champaign. + * For more information on the Apache Group and the Apache HTTP server + * project, please see . + * + * This code is based on, and used with the permission of, the + * SIO stdio-replacement strx_* functions by Panos Tsirigotis + * for xinetd. + */ +#include "php.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_INTTYPES_H +#include +#endif + +#ifdef HAVE_LOCALE_H +#include +#define LCONV_DECIMAL_POINT (*lconv->decimal_point) +#else +#define LCONV_DECIMAL_POINT '.' +#endif + +#include "snprintf.h" + +#define FALSE 0 +#define TRUE 1 +#define NUL '\0' +#define INT_NULL ((int *)0) + +#define S_NULL "(null)" +#define S_NULL_LEN 6 + +#define FLOAT_DIGITS 6 +#define EXPONENT_LENGTH 10 + +#include "ext/standard/php_smart_str.h" + +/* {{{ macros */ + +/* + * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions + * + * XXX: this is a magic number; do not decrease it + */ +#define NUM_BUF_SIZE 512 + +/* + * The INS_CHAR macro inserts a character in the buffer. + * + * NOTE: Evaluation of the ch argument should not have any side-effects + */ +#define INS_CHAR_NR(xbuf, ch) do { \ + smart_str_appendc(xbuf, ch); \ +} while (0) + +#define INS_STRING(xbuf, s, slen) do { \ + smart_str_appendl(xbuf, s, slen); \ +} while (0) + +#define INS_CHAR(xbuf, ch) \ + INS_CHAR_NR(xbuf, ch) + +/* + * Macro that does padding. The padding is done by printing + * the character ch. + */ +#define PAD(xbuf, count, ch) do { \ + if ((count) > 0) { \ + size_t newlen; \ + smart_str_alloc(xbuf, (count), 0); \ + memset(xbuf->c + xbuf->len, ch, (count)); \ + xbuf->len += (count); \ + } \ +} while (0) + +#define NUM(c) (c - '0') + +#define STR_TO_DEC(str, num) do { \ + num = NUM(*str++); \ + while (isdigit((int)*str)) { \ + num *= 10; \ + num += NUM(*str++); \ + if (num >= INT_MAX / 10) { \ + while (isdigit((int)*str++)); \ + break; \ + } \ + } \ +} while (0) + +/* + * This macro does zero padding so that the precision + * requirement is satisfied. The padding is done by + * adding '0's to the left of the string that is going + * to be printed. + */ +#define FIX_PRECISION(adjust, precision, s, s_len) do { \ + if (adjust) \ + while (s_len < precision) { \ + *--s = '0'; \ + s_len++; \ + } \ +} while (0) + +/* }}} */ + +/* + * Do format conversion placing the output in buffer + */ +static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list ap) /* {{{ */ +{ + register char *s = NULL; + char *q; + int s_len; + + register int min_width = 0; + int precision = 0; + enum { + LEFT, RIGHT + } adjust; + char pad_char; + char prefix_char; + + double fp_num; + wide_int i_num = (wide_int) 0; + u_wide_int ui_num; + + char num_buf[NUM_BUF_SIZE]; + char char_buf[2]; /* for printing %% and % */ + +#ifdef HAVE_LOCALE_H + struct lconv *lconv = NULL; +#endif + + /* + * Flag variables + */ + length_modifier_e modifier; + boolean_e alternate_form; + boolean_e print_sign; + boolean_e print_blank; + boolean_e adjust_precision; + boolean_e adjust_width; + bool_int is_negative; + + while (*fmt) { + if (*fmt != '%') { + INS_CHAR(xbuf, *fmt); + } else { + /* + * Default variable settings + */ + adjust = RIGHT; + alternate_form = print_sign = print_blank = NO; + pad_char = ' '; + prefix_char = NUL; + + fmt++; + + /* + * Try to avoid checking for flags, width or precision + */ + if (isascii((int)*fmt) && !islower((int)*fmt)) { + /* + * Recognize flags: -, #, BLANK, + + */ + for (;; fmt++) { + if (*fmt == '-') + adjust = LEFT; + else if (*fmt == '+') + print_sign = YES; + else if (*fmt == '#') + alternate_form = YES; + else if (*fmt == ' ') + print_blank = YES; + else if (*fmt == '0') + pad_char = '0'; + else + break; + } + + /* + * Check if a width was specified + */ + if (isdigit((int)*fmt)) { + STR_TO_DEC(fmt, min_width); + adjust_width = YES; + } else if (*fmt == '*') { + min_width = va_arg(ap, int); + fmt++; + adjust_width = YES; + if (min_width < 0) { + adjust = LEFT; + min_width = -min_width; + } + } else + adjust_width = NO; + + /* + * Check if a precision was specified + * + * XXX: an unreasonable amount of precision may be specified + * resulting in overflow of num_buf. Currently we + * ignore this possibility. + */ + if (*fmt == '.') { + adjust_precision = YES; + fmt++; + if (isdigit((int)*fmt)) { + STR_TO_DEC(fmt, precision); + } else if (*fmt == '*') { + precision = va_arg(ap, int); + fmt++; + if (precision < 0) + precision = 0; + } else + precision = 0; + } else + adjust_precision = NO; + } else + adjust_precision = adjust_width = NO; + + /* + * Modifier check + */ + switch (*fmt) { + case 'L': + fmt++; + modifier = LM_LONG_DOUBLE; + break; + case 'I': + fmt++; +#if SIZEOF_LONG_LONG + if (*fmt == '6' && *(fmt+1) == '4') { + fmt += 2; + modifier = LM_LONG_LONG; + } else +#endif + if (*fmt == '3' && *(fmt+1) == '2') { + fmt += 2; + modifier = LM_LONG; + } else { +#ifdef _WIN64 + modifier = LM_LONG_LONG; +#else + modifier = LM_LONG; +#endif + } + break; + case 'l': + fmt++; +#if SIZEOF_LONG_LONG + if (*fmt == 'l') { + fmt++; + modifier = LM_LONG_LONG; + } else +#endif + modifier = LM_LONG; + break; + case 'z': + fmt++; + modifier = LM_SIZE_T; + break; + case 'j': + fmt++; +#if SIZEOF_INTMAX_T + modifier = LM_INTMAX_T; +#else + modifier = LM_SIZE_T; +#endif + break; + case 't': + fmt++; +#if SIZEOF_PTRDIFF_T + modifier = LM_PTRDIFF_T; +#else + modifier = LM_SIZE_T; +#endif + break; + case 'h': + fmt++; + if (*fmt == 'h') { + fmt++; + } + /* these are promoted to int, so no break */ + default: + modifier = LM_STD; + break; + } + + /* + * Argument extraction and printing. + * First we determine the argument type. + * Then, we convert the argument to a string. + * On exit from the switch, s points to the string that + * must be printed, s_len has the length of the string + * The precision requirements, if any, are reflected in s_len. + * + * NOTE: pad_char may be set to '0' because of the 0 flag. + * It is reset to ' ' by non-numeric formats + */ + switch (*fmt) { + case 'u': + switch(modifier) { + default: + i_num = (wide_int) va_arg(ap, unsigned int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + i_num = (wide_int) va_arg(ap, unsigned long int); + break; + case LM_SIZE_T: + i_num = (wide_int) va_arg(ap, size_t); + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + i_num = (wide_int) va_arg(ap, u_wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + i_num = (wide_int) va_arg(ap, uintmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + i_num = (wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + /* + * The rest also applies to other integer formats, so fall + * into that case. + */ + case 'd': + case 'i': + /* + * Get the arg if we haven't already. + */ + if ((*fmt) != 'u') { + switch(modifier) { + default: + i_num = (wide_int) va_arg(ap, int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + i_num = (wide_int) va_arg(ap, long int); + break; + case LM_SIZE_T: +#if SIZEOF_SSIZE_T + i_num = (wide_int) va_arg(ap, ssize_t); +#else + i_num = (wide_int) va_arg(ap, size_t); +#endif + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + i_num = (wide_int) va_arg(ap, wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + i_num = (wide_int) va_arg(ap, intmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + i_num = (wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + } + s = ap_php_conv_10(i_num, (*fmt) == 'u', &is_negative, + &num_buf[NUM_BUF_SIZE], &s_len); + FIX_PRECISION(adjust_precision, precision, s, s_len); + + if (*fmt != 'u') { + if (is_negative) + prefix_char = '-'; + else if (print_sign) + prefix_char = '+'; + else if (print_blank) + prefix_char = ' '; + } + break; + + + case 'o': + switch(modifier) { + default: + ui_num = (u_wide_int) va_arg(ap, unsigned int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + ui_num = (u_wide_int) va_arg(ap, unsigned long int); + break; + case LM_SIZE_T: + ui_num = (u_wide_int) va_arg(ap, size_t); + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + ui_num = (u_wide_int) va_arg(ap, u_wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + ui_num = (u_wide_int) va_arg(ap, uintmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + ui_num = (u_wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + s = ap_php_conv_p2(ui_num, 3, *fmt, + &num_buf[NUM_BUF_SIZE], &s_len); + FIX_PRECISION(adjust_precision, precision, s, s_len); + if (alternate_form && *s != '0') { + *--s = '0'; + s_len++; + } + break; + + + case 'x': + case 'X': + switch(modifier) { + default: + ui_num = (u_wide_int) va_arg(ap, unsigned int); + break; + case LM_LONG_DOUBLE: + goto fmt_error; + case LM_LONG: + ui_num = (u_wide_int) va_arg(ap, unsigned long int); + break; + case LM_SIZE_T: + ui_num = (u_wide_int) va_arg(ap, size_t); + break; +#if SIZEOF_LONG_LONG + case LM_LONG_LONG: + ui_num = (u_wide_int) va_arg(ap, u_wide_int); + break; +#endif +#if SIZEOF_INTMAX_T + case LM_INTMAX_T: + ui_num = (u_wide_int) va_arg(ap, uintmax_t); + break; +#endif +#if SIZEOF_PTRDIFF_T + case LM_PTRDIFF_T: + ui_num = (u_wide_int) va_arg(ap, ptrdiff_t); + break; +#endif + } + s = ap_php_conv_p2(ui_num, 4, *fmt, + &num_buf[NUM_BUF_SIZE], &s_len); + FIX_PRECISION(adjust_precision, precision, s, s_len); + if (alternate_form && i_num != 0) { + *--s = *fmt; /* 'x' or 'X' */ + *--s = '0'; + s_len += 2; + } + break; + + + case 's': + case 'v': + s = va_arg(ap, char *); + if (s != NULL) { + s_len = strlen(s); + if (adjust_precision && precision < s_len) + s_len = precision; + } else { + s = S_NULL; + s_len = S_NULL_LEN; + } + pad_char = ' '; + break; + + + case 'f': + case 'F': + case 'e': + case 'E': + switch(modifier) { + case LM_LONG_DOUBLE: + fp_num = (double) va_arg(ap, long double); + break; + case LM_STD: + fp_num = va_arg(ap, double); + break; + default: + goto fmt_error; + } + + if (zend_isnan(fp_num)) { + s = "nan"; + s_len = 3; + } else if (zend_isinf(fp_num)) { + s = "inf"; + s_len = 3; + } else { +#ifdef HAVE_LOCALE_H + if (!lconv) { + lconv = localeconv(); + } +#endif + s = php_conv_fp((*fmt == 'f')?'F':*fmt, fp_num, alternate_form, + (adjust_precision == NO) ? FLOAT_DIGITS : precision, + (*fmt == 'f')?LCONV_DECIMAL_POINT:'.', + &is_negative, &num_buf[1], &s_len); + if (is_negative) + prefix_char = '-'; + else if (print_sign) + prefix_char = '+'; + else if (print_blank) + prefix_char = ' '; + } + break; + + + case 'g': + case 'k': + case 'G': + case 'H': + switch(modifier) { + case LM_LONG_DOUBLE: + fp_num = (double) va_arg(ap, long double); + break; + case LM_STD: + fp_num = va_arg(ap, double); + break; + default: + goto fmt_error; + } + + if (zend_isnan(fp_num)) { + s = "NAN"; + s_len = 3; + break; + } else if (zend_isinf(fp_num)) { + if (fp_num > 0) { + s = "INF"; + s_len = 3; + } else { + s = "-INF"; + s_len = 4; + } + break; + } + + if (adjust_precision == NO) + precision = FLOAT_DIGITS; + else if (precision == 0) + precision = 1; + /* + * * We use &num_buf[ 1 ], so that we have room for the sign + */ +#ifdef HAVE_LOCALE_H + if (!lconv) { + lconv = localeconv(); + } +#endif + s = php_gcvt(fp_num, precision, (*fmt=='H' || *fmt == 'k') ? '.' : LCONV_DECIMAL_POINT, (*fmt == 'G' || *fmt == 'H')?'E':'e', &num_buf[1]); + if (*s == '-') + prefix_char = *s++; + else if (print_sign) + prefix_char = '+'; + else if (print_blank) + prefix_char = ' '; + + s_len = strlen(s); + + if (alternate_form && (q = strchr(s, '.')) == NULL) + s[s_len++] = '.'; + break; + + + case 'c': + char_buf[0] = (char) (va_arg(ap, int)); + s = &char_buf[0]; + s_len = 1; + pad_char = ' '; + break; + + + case '%': + char_buf[0] = '%'; + s = &char_buf[0]; + s_len = 1; + pad_char = ' '; + break; + + + case 'n': + *(va_arg(ap, int *)) = xbuf->len; + goto skip_output; + + /* + * Always extract the argument as a "char *" pointer. We + * should be using "void *" but there are still machines + * that don't understand it. + * If the pointer size is equal to the size of an unsigned + * integer we convert the pointer to a hex number, otherwise + * we print "%p" to indicate that we don't handle "%p". + */ + case 'p': + if (sizeof(char *) <= sizeof(u_wide_int)) { + ui_num = (u_wide_int)((size_t) va_arg(ap, char *)); + s = ap_php_conv_p2(ui_num, 4, 'x', + &num_buf[NUM_BUF_SIZE], &s_len); + if (ui_num != 0) { + *--s = 'x'; + *--s = '0'; + s_len += 2; + } + } else { + s = "%p"; + s_len = 2; + } + pad_char = ' '; + break; + + + case NUL: + /* + * The last character of the format string was %. + * We ignore it. + */ + continue; + + +fmt_error: + php_error(E_ERROR, "Illegal length modifier specified '%c' in s[np]printf call", *fmt); + /* + * The default case is for unrecognized %'s. + * We print % to help the user identify what + * option is not understood. + * This is also useful in case the user wants to pass + * the output of format_converter to another function + * that understands some other % (like syslog). + * Note that we can't point s inside fmt because the + * unknown could be preceded by width etc. + */ + default: + char_buf[0] = '%'; + char_buf[1] = *fmt; + s = char_buf; + s_len = 2; + pad_char = ' '; + break; + } + + if (prefix_char != NUL) { + *--s = prefix_char; + s_len++; + } + if (adjust_width && adjust == RIGHT && min_width > s_len) { + if (pad_char == '0' && prefix_char != NUL) { + INS_CHAR(xbuf, *s); + s++; + s_len--; + min_width--; + } + PAD(xbuf, min_width - s_len, pad_char); + } + /* + * Print the string s. + */ + INS_STRING(xbuf, s, s_len); + + if (adjust_width && adjust == LEFT && min_width > s_len) + PAD(xbuf, min_width - s_len, pad_char); + } +skip_output: + fmt++; + } + return; +} +/* }}} */ + +/* + * This is the general purpose conversion function. + */ +PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) /* {{{ */ +{ + smart_str xbuf = {0}; + + xbuf_format_converter(&xbuf, format, ap); + + if (max_len && xbuf.len > max_len) { + xbuf.len = max_len; + } + smart_str_0(&xbuf); + + *pbuf = xbuf.c; + + return xbuf.len; +} +/* }}} */ + +PHPAPI int spprintf(char **pbuf, size_t max_len, const char *format, ...) /* {{{ */ +{ + int cc; + va_list ap; + + va_start(ap, format); + cc = vspprintf(pbuf, max_len, format, ap); + va_end(ap); + return (cc); +} +/* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/main/suhosin_globals.h php-5.2.5-suhosin/main/suhosin_globals.h --- php-5.2.5/main/suhosin_globals.h 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/suhosin_globals.h 2007-11-12 12:38:56.000000000 +0100 @@ -0,0 +1,61 @@ +/* + +----------------------------------------------------------------------+ + | Suhosin-Patch for PHP | + +----------------------------------------------------------------------+ + | Copyright (c) 2004-2006 Stefan Esser | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Stefan Esser | + +----------------------------------------------------------------------+ + */ + +#ifndef SUHOSIN_GLOBALS_H +#define SUHOSIN_GLOBALS_H + +typedef struct _suhosin_patch_globals suhosin_patch_globals_struct; + +#ifdef ZTS +# define SPG(v) TSRMG(suhosin_patch_globals_id, suhosin_patch_globals_struct *, v) +extern int suhosin_patch_globals_id; +#else +# define SPG(v) (suhosin_patch_globals.v) +extern struct _suhosin_patch_globals suhosin_patch_globals; +#endif + + +struct _suhosin_patch_globals { + /* logging */ + int log_syslog; + int log_syslog_facility; + int log_syslog_priority; + int log_sapi; + int log_script; + int log_phpscript; + char *log_scriptname; + char *log_phpscriptname; + zend_bool log_phpscript_is_safe; + zend_bool log_use_x_forwarded_for; + + /* memory manager canary protection */ + unsigned int canary_1; + unsigned int canary_2; + unsigned int canary_3; + unsigned int dummy; +}; + + +#endif /* SUHOSIN_GLOBALS_H */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ diff -Naur php-5.2.5/main/suhosin_logo.h php-5.2.5-suhosin/main/suhosin_logo.h --- php-5.2.5/main/suhosin_logo.h 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/suhosin_logo.h 2007-11-12 12:38:56.000000000 +0100 @@ -0,0 +1,178 @@ +static unsigned char suhosin_logo[] = + "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x48" + "\x00\x48\x00\x00\xff\xe1\x00\x16\x45\x78\x69\x66\x00\x00\x4d\x4d" + "\x00\x2a\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\xff\xdb\x00\x43" + "\x00\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" + "\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" + "\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" + "\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" + "\x01\xff\xc0\x00\x0b\x08\x00\x27\x00\x71\x01\x01\x22\x00\xff\xc4" + "\x00\x1e\x00\x00\x02\x02\x02\x03\x01\x01\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x09\x06\x08\x05\x07\x02\x03\x0a\x01\x04\xff\xc4" + "\x00\x32\x10\x00\x01\x04\x03\x00\x02\x00\x05\x01\x05\x09\x01\x00" + "\x00\x00\x00\x05\x02\x03\x04\x06\x01\x07\x08\x00\x09\x11\x12\x13" + "\x14\x21\x15\x0a\x16\x31\x56\x96\x17\x18\x19\x23\x32\x41\x58\x98" + "\xd4\xd6\xff\xda\x00\x08\x01\x01\x00\x00\x3f\x00\xf4\xc1\xe1\xe5" + "\x69\xe9\x3e\xb9\xd1\x7c\x8a\x2e\x9d\x66\xe8\x3b\x29\x4d\x7f\x46" + "\xba\x58\x55\x54\x8d\xb1\x5f\xaa\xd9\x8d\x51\x2b\xb6\x27\x5a\x69" + "\xd1\x43\xaf\x16\x1a\xf0\xb2\xb1\xe9\x6d\x9f\xc2\xa4\x36\x18\xb5" + "\x85\x10\x41\xbe\xfc\x09\xac\x49\x29\x11\xd4\x32\x97\xec\x08\x13" + "\xc1\x2d\x20\xc3\x59\xeb\x26\x05\xd8\x6b\x76\x31\x43\x8f\x57\xcf" + "\x84\x9f\x14\xa8\x53\x81\x0b\xc3\x64\x80\xa3\x02\x0a\x41\x75\xf8" + "\x44\x85\x93\x81\x22\x3c\xd8\x13\xe1\xbe\xf4\x59\x91\x1f\x6a\x44" + "\x77\x5c\x69\xc4\x2f\x39\x5f\x0f\x2a\x8d\xeb\xba\xf8\xc3\x56\x6c" + "\x3b\x36\xa7\xda\xbd\x4d\xa1\xb5\x4e\xc6\xa7\xa4\x3a\xec\x15\x2d" + "\xa5\xb3\xea\x5a\xdc\xac\x46\xac\x01\x60\xd8\x43\xc8\x8e\x8b\xb1" + "\x40\x4c\x95\x8b\x34\x41\x28\x52\x91\x28\x43\xd3\xa3\xb6\xa7\x55" + "\x15\xe7\x5a\x96\xcb\xf1\xda\xe5\x55\xee\xfe\x1e\xbd\xd9\x41\xd3" + "\x28\xfd\x97\xca\x57\x2b\x85\x9c\xa4\x30\x95\xaa\xa5\x57\xa2\x35" + "\x15\x86\xcb\x61\x34\x41\xe4\xc7\x80\x20\x18\x21\x17\x09\x85\x0b" + "\x14\x9d\x21\x68\x62\x1c\x08\x11\x64\x4b\x92\xf2\xd2\xd3\x2d\x2d" + "\x6a\xc2\x73\x6b\x3c\x3c\x8b\x9e\xbc\x52\xaa\xa4\xab\x81\x6c\xf6" + "\xfa\xbd\x70\xc5\xc6\x7b\xc2\xaa\x22\x4f\x58\x04\x87\x25\x6a\x27" + "\x1d\xa4\x3d\x20\x75\x72\x01\x09\x71\xe5\x1c\x9e\xc3\x2e\x36\xf3" + "\xd0\xc6\x35\x2a\x43\x4d\x2d\x0e\x2d\xb4\xa1\x49\xce\x65\x1e\x52" + "\x9e\xa1\xf6\x09\xcc\xdc\x63\x66\xa8\x01\xe9\x3b\x0d\xd7\x5a\x85" + "\xbb\xc5\x65\xc0\x7b\x2e\x46\xa9\xd9\x56\x1d\x4c\x92\x72\x26\x4e" + "\x86\xd5\x68\xae\xc4\xaa\x55\xce\xd7\x83\x59\xb3\x81\xee\xce\x74" + "\x39\x39\x31\x9f\x8a\x25\xe8\xa5\xa5\xe5\x81\xf2\x11\x23\xcb\xa1" + "\x1e\x43\x12\xe3\xb1\x2a\x2b\xcd\xc8\x8d\x25\x96\xa4\x47\x7d\x95" + "\xa5\xc6\x9f\x61\xe4\x25\xc6\x5e\x69\xc4\xe7\x29\x5b\x6e\xb6\xa4" + "\xad\x0b\x4e\x72\x95\x25\x58\x56\x33\x9c\x67\xce\xef\x0f\x17\xbf" + "\x4c\x7b\x2d\xe6\xfe\x76\x35\x27\x5a\x07\x97\x67\xe8\xae\x8d\x71" + "\x0f\xb2\x13\x99\xb9\xbc\x14\xad\xb3\xb7\xe6\x11\x6f\xe0\xda\x58" + "\xb1\x08\xac\xa6\x6c\x2d\x7f\x05\xb7\x56\xd2\xe6\xcf\xbb\x4d\x0c" + "\xe3\x50\xb2\xec\x91\xf0\x4a\xb8\xd6\x22\xb8\xa7\xf6\x67\xaf\xcf" + "\x63\x7e\xd7\xe7\x42\xd8\xbd\xc3\x71\xa1\xf2\x7e\x9b\xa8\x97\x83" + "\x6e\xd1\xdc\x4b\x06\x11\x2d\xae\x26\x61\x98\x72\x10\xf4\x42\x5d" + "\x20\x4a\xa3\x73\xd7\xf2\xcd\x3c\x48\x32\xe4\x03\x9f\x80\x37\x08" + "\x36\x11\xd0\xcb\x97\x6c\x08\xed\x6d\x33\x24\xa2\x1b\xb4\x77\xdf" + "\x61\x5d\x5f\xc1\x43\xc2\x82\xeb\x0f\x5d\x84\x08\x68\xaa\xa4\x01" + "\xe1\x19\xdf\xbc\x31\x65\xfe\xd1\xf5\x7d\x7a\xb2\x2a\x33\x50\x21" + "\x2a\x56\x9d\xb1\x81\xab\xdb\x35\x78\x30\x83\xd9\x89\x1d\x31\xac" + "\x96\x14\x07\x61\xbc\x20\x68\x42\x85\x33\x19\xac\xbe\xdb\x34\x56" + "\xf1\xd5\xfd\x29\xa9\x28\xdb\xcb\x4c\x5a\x23\xdc\xf5\x96\xc5\x10" + "\xa3\x35\x5b\x14\x68\xd3\x61\x62\x64\x76\x26\xcb\x17\x3e\x34\x98" + "\x04\xa3\xc4\x20\x38\x90\x92\xe3\xc8\x07\x2c\x36\x74\x66\x26\x0e" + "\x29\x02\x64\x29\x2d\x21\xe6\x16\x9c\x6b\xce\xa3\x89\xd9\x4f\xd3" + "\xc4\xbd\xc5\x87\x79\x9c\x65\xf6\x39\x45\x60\xe8\xce\x9e\xab\x6d" + "\x13\x15\x22\xe1\x5e\x4b\x38\x42\xc4\x1e\xd5\x76\xe0\xc5\xeb\x85" + "\x07\x2d\x0f\xb8\xb6\xa6\xd6\x6d\x71\x0d\xa2\x43\x4c\x25\xea\xfa" + "\xa1\xae\x4c\xe4\x7d\xbd\x76\xa9\xfb\x06\xc2\x83\x42\xeb\xad\xe7" + "\xe9\x5f\x68\x6f\xba\xfb\x2f\x07\xce\xb8\x13\xc1\x9b\xeb\xb0\x76" + "\x45\x57\x28\x7b\xea\xbe\x0f\xf4\x30\x7b\xa0\xed\xe4\x22\x93\x21" + "\xfc\xbc\xe0\xb9\x75\xc1\x4f\xfc\xef\xb6\xfa\xa1\xfc\x64\xa1\x4a" + "\x82\xc7\x33\xad\x75\xed\x82\xbd\x3d\xdb\xf7\xa8\xbe\x5e\xbb\x36" + "\x62\x04\x9a\x2e\xc5\xd9\x9e\x9c\x3a\x0b\x98\x0b\x57\xac\xf1\x24" + "\x62\x58\x83\x15\x5b\xa6\xf2\xda\x34\x70\x03\xce\x0f\x93\x1b\x12" + "\xc7\xce\x54\x87\x33\x15\xd6\x53\x25\x1f\x2a\x90\x87\x12\xe3\x78" + "\xef\x55\x77\x4d\x4a\xd8\x7e\xef\xd2\xfd\xd1\xaf\x3a\xaf\x55\xdb" + "\x6a\x2d\x3d\x42\xac\x51\x79\xee\x91\xab\xe1\x05\x2d\x3c\x80\xa2" + "\x43\xad\x22\x2e\xd5\x33\x13\xa4\x9e\x00\xe0\x04\x10\x84\xc8\xf2" + "\x19\x30\x92\x1f\xaa\xc3\x28\xc9\x76\x30\x3f\xe9\x10\x61\x5e\x79" + "\xd5\xf7\xdf\xd0\x54\xdb\xae\xb6\xae\xfa\xe8\xa3\x57\xe0\x6c\x2d" + "\xf7\xbd\x49\xd6\x6e\x76\x79\xcc\x54\x0c\x5f\xff\x00\xbb\x06\x98" + "\xa6\x9e\x89\x61\xb4\x6f\xc3\xe3\x6a\xc2\x4f\x59\x03\xc9\x80\x2c" + "\x59\x24\x44\x70\x38\xd5\x96\x6a\x9e\x8b\x81\x64\xe5\xbc\xa0\x3c" + "\x33\xaf\x17\x9d\xff\x00\x71\x1a\xd1\x3a\x80\x66\xb3\xd9\x31\x77" + "\x0d\x12\xbd\xae\x29\xb5\x6a\xd6\xcf\x8d\x68\x87\x75\xcd\xe8\x65" + "\x5a\xbe\x3c\x04\x7b\x34\xdb\x54\x19\xa4\x63\x9c\x2a\x5d\x23\xbe" + "\xf4\xb1\x1c\x4d\x90\xec\x92\x2f\x49\x71\xf7\x14\xf2\x97\x9f\x15" + "\x57\xed\x13\x21\x2a\xf5\x33\xd1\x2a\x52\x52\xac\xb7\x62\xd1\xcb" + "\x46\x73\x8c\x67\x28\x56\x77\x86\xbf\x6f\x2a\x4e\x73\xfe\x95\x65" + "\x0b\x5a\x3e\x38\xfc\xfc\xaa\x56\x3f\x86\x73\xe3\xb9\x4a\x52\x84" + "\xa5\x08\x4e\x12\x94\x27\x09\x4a\x53\x8c\x61\x29\x4a\x71\xf0\x4a" + "\x53\x8c\x7e\x31\x8c\x63\x18\xc6\x31\x8f\xc6\x31\xf8\xc7\x9f\x7c" + "\xd5\xbb\xae\x5e\xe2\x1f\xab\x6e\x24\x34\x00\x8a\x25\x83\x70\x40" + "\x1c\xcc\xda\x45\x7f\x66\x4e\x30\x2e\x94\x7e\x74\x49\xf0\xe4\x4e" + "\x06\x5c\xa8\x2f\x89\x21\x2e\x98\x0e\xd9\x21\xc2\x0b\x21\x0f\xc4" + "\x16\x6e\x48\xd9\xe4\xe3\x4a\x19\x1e\x64\x67\x54\xff\x00\x3a\x6d" + "\x4f\x62\xb5\x00\x4a\xaa\x51\xfd\x2d\xe8\x0e\x6c\xaf\xc6\x7d\x6d" + "\xc8\x88\xc7\x67\xea\x8a\x58\x02\x73\xe3\x65\x4d\xc9\x24\xc0\x3d" + "\x57\xa3\x2e\x53\x16\x99\x4f\xe5\xe7\x19\x97\x3e\x3b\xcf\xc9\x4b" + "\x99\x7f\x33\x25\xa5\xdf\xba\x77\x2b\xd3\x3e\xc2\x7b\x8b\x94\x07" + "\xe9\x52\x5b\x43\x87\x34\x14\x86\x37\xcf\x41\x6b\x8e\x6a\xa5\x22" + "\xab\xdb\x96\xa2\xcf\x46\xd8\x9b\x45\x93\xef\xd6\xdf\x3e\x99\x9c" + "\x7e\x29\x10\x6b\x6c\xa2\xb8\x43\x05\x09\x44\x70\x8c\xb8\xaa\x54" + "\x7c\x30\x36\x5e\x1c\x5e\x5b\x9f\x6c\x0d\x81\xee\xa0\x93\x8d\x67" + "\x55\xf3\x87\xaf\xaa\x6b\x58\xf9\xbe\xb2\x36\x07\x42\x6e\xbd\x96" + "\xe3\x9f\x1f\x8f\xc9\xf4\x9d\xae\x6a\x7d\x4c\x96\xbe\x5f\xc7\xcd" + "\xf3\xb2\xf7\xcd\xf0\xcf\xc3\xe4\xf8\xfe\x37\x4f\x1c\x4d\xf6\x40" + "\xf1\x6b\x7c\x4e\xe0\xa6\x71\xad\x56\xa7\x1c\x5c\x15\x6b\xfc\xf3" + "\x01\x5d\xac\xf1\x75\x9a\x72\x6b\xaa\x28\xc5\x88\x6d\xfb\x33\x85" + "\xe0\x4e\x61\xab\xeb\x31\x2c\x71\x08\x73\x11\x3b\xfc\xb5\xc0\x96" + "\xcc\x87\x24\x44\xb5\x9b\x9e\xb3\x71\xba\xe9\xed\xb1\x4e\xd7\x76" + "\x6c\xd2\xb6\x05\xb7\x5a\xde\xeb\x34\x5b\x96\x16\xfb\x59\xa9\x5c" + "\x4f\x55\xca\x8a\xac\x59\xb0\xe4\x54\x39\x25\xbc\x81\x37\x2a\x09" + "\x5f\x9e\x3b\x6b\x7d\x1f\x69\xf3\x34\x85\x39\x84\xa7\x28\x0b\xd3" + "\xfd\xfb\x4b\x7a\xea\xe7\xd2\x3c\xd3\xda\x15\x68\xbc\x73\xd3\x22" + "\x6f\xd7\x72\x5b\x2b\x66\xee\xa8\x0d\x54\xe8\x5b\xf9\x92\x96\x92" + "\x93\xea\x97\x4a\xc7\x43\x10\x46\x35\xc5\xc0\x60\x8a\xe4\xc1\xb5" + "\x36\xc6\xae\xed\xf7\x70\xa5\x86\x99\x3d\x91\xf8\xfd\x4e\x53\xeb" + "\xbb\xbd\x6d\xec\x8f\xd7\x89\x3d\x31\x7f\xd7\x78\xba\x50\xbb\x74" + "\x9d\xf6\xac\x4e\xb9\x03\x9c\x79\xd5\xe1\xbd\x17\x68\xd9\x13\x0b" + "\x45\x75\x88\x00\x1d\x1f\xae\x73\x6a\x1d\x5c\x6e\x44\x9f\xa6\xfa" + "\x4e\xd8\x25\x8b\xc0\xbc\xb2\x99\xe3\x17\x24\xb3\x23\xe2\x48\x8b" + "\xfa\x22\xe7\x7e\x8f\xe6\x3f\x5f\x55\x0d\x75\xd3\x51\x0b\xd7\xed" + "\xd3\x6f\x97\x3b\x85\x42\x80\x7e\x5f\xdc\x1b\xd6\xba\xee\xc4\x80" + "\xce\x06\xa9\x15\x8c\x97\x5f\x40\x69\xb2\x4d\xc5\xb2\x5c\x1e\x01" + "\x87\x7e\xe0\x36\x6d\x78\x80\x4e\x3c\x02\xec\x90\x1d\x11\x81\x74" + "\xa5\x8b\xa4\xa0\x56\x06\xd5\x79\x72\x85\x57\x3b\xb2\x2e\xae\x90" + "\x18\x8d\x91\xb2\x0e\x44\x19\xaa\xb4\xcc\x08\xed\x46\xfa\xd7\x2b" + "\x78\x58\x72\x5d\xbb\x5e\x49\xe7\xee\xf3\x8a\x9d\x22\xa4\x19\xc8" + "\xe7\x08\xc3\x90\x9b\x35\x9a\xa4\x25\x8c\x4b\x9b\xa7\xf8\xbf\x81" + "\xf5\xdf\x22\x66\xf1\x7e\x9f\x66\x3d\xbb\xfa\x73\x73\x4d\xfd\x67" + "\x7b\xf4\xce\xc3\x62\x2e\x6f\xbb\x0c\xa2\xdc\x69\xfc\x8a\x17\x0e" + "\x3a\x9e\x83\x46\xd7\xe3\x5e\x65\x86\xc0\x51\x00\xbb\x91\xe3\xe1" + "\xc1\x16\xc4\xe9\x65\x5c\x14\x3e\x44\x6a\x6b\xd1\x1e\xb0\x36\xdd" + "\x0b\x7d\x8a\xeb\xaf\x58\x5b\x64\x3f\x38\xed\x52\x76\xe8\x46\xf7" + "\x86\x84\xb3\x93\xb1\x0b\xe5\xfd\xfd\x0d\xe9\x6d\xe4\xf1\x1b\x1d" + "\x56\xb4\x34\xe4\x6a\xf5\xa4\x9c\x2c\xc9\x64\x94\xc1\xf5\x79\x6d" + "\x12\x96\xf3\x47\xc5\x48\xa8\xdb\xd8\x95\x64\x29\xcf\xf6\x88\xf1" + "\x95\x7a\x98\xe8\xbc\x27\x19\xce\x73\x61\xd1\xb8\xc6\x31\x8c\xe7" + "\x39\xce\x77\x9e\xbc\xc6\x31\x8c\x63\xf3\x9c\xe7\x39\xc6\x31\x8f" + "\xf7\xce\x7e\x1e\x3b\x7f\x0f\x0f\x0f\x13\x57\xb9\x0a\xe1\x0b\x64" + "\x5f\x58\x40\xc6\xc7\x7a\x4b\xf2\x3d\xbc\x71\xf4\xa7\xd2\xca\x14" + "\xe2\x98\x1a\x30\x1e\xe0\x26\x5a\x6a\xf0\x9c\x67\x38\x66\x00\xb8" + "\x72\xe6\xbe\xac\xfe\x12\xd3\x0b\x56\x73\x8c\x63\xc7\x2b\xe1\xe2" + "\xe8\xdd\x7b\xff\x00\xd8\xe5\x23\x6c\xce\xa8\x69\xcf\x5e\x3a\xef" + "\x77\xea\xe5\xab\x0e\x82\xdb\xd9\xed\x7a\x9e\xb8\x6d\x51\x32\xdb" + "\x79\xc3\x36\x9a\x2d\xa3\x50\x39\x65\x0a\x63\x0e\xe5\xd4\x39\x12" + "\xbf\x8b\x98\xa4\xa1\x2d\xad\xb3\xcf\x65\x6a\x43\x78\xb3\x3b\x07" + "\xd8\xd5\xea\xae\x76\xad\x6f\xf5\xff\x00\xca\x93\xab\x96\xb0\x64" + "\xeb\xd6\x4a\xd5\x87\xba\xec\x24\x60\x97\x06\x76\x03\xe3\x4c\x07" + "\x29\x11\x8e\x34\x25\x02\x64\x29\xf0\x25\x48\x85\x3a\x33\x8b\x7a" + "\x3c\x86\x1e\x75\xa5\x61\xc6\x97\x9f\x8d\x25\xf5\xc9\xcd\xde\xc9" + "\x7d\x77\xf2\xc8\x7e\x70\xaf\x73\x5f\x2d\xec\xa2\x51\x2d\x96\xfb" + "\x89\xad\x80\x57\xb2\x36\x1d\x7d\x83\x45\xac\xf3\xdb\xcc\x6c\x31" + "\x4f\xcf\x30\x58\xd0\x12\x28\x90\x50\x42\x86\xfb\x48\x16\x3c\xc5" + "\x9c\xf8\xe7\xcc\x29\x88\xb3\x4a\x4b\x4e\x6c\xbc\xdb\xc7\xbb\xe9" + "\xb6\xa0\x8b\x11\xa1\x7d\x73\xd7\xe9\xbf\x7e\xc2\x6c\x10\x8d\xee" + "\x9d\xef\x63\x3a\xe0\xf5\xbe\x8c\x3e\xa1\xc7\xc5\xd1\x00\x44\x1e" + "\xf3\x51\xf2\xe2\xb0\xe3\xb5\x13\x7f\x32\xf1\x8c\xa6\x22\xfe\x1f" + "\x49\x4d\xbb\xcf\x3a\x5d\xed\x4c\xd2\xfc\x85\xed\x23\xd6\xc7\x50" + "\xb6\x5b\x3a\x16\x83\xb8\x6f\xfd\x32\x3f\xaa\x36\x34\xbb\xf5\x96" + "\xa9\xab\xcf\x9f\x8f\xac\xc3\xca\xd5\x8b\xd8\x48\x9e\x79\xaa\x30" + "\x87\xca\x58\x4d\x59\x96\xb9\x4f\xc5\x1b\x1c\xd2\xda\x5b\xe6\x57" + "\x29\xa1\x28\x7a\x2b\x5b\xff\x00\x12\x2f\x5e\x3f\xf3\xbb\x8e\x7f" + "\xec\xc6\x98\xff\x00\xed\x3c\xa6\xdd\xa9\xdc\x7e\xa0\xf7\xd6\x99" + "\x31\xa2\xf7\xaf\x6b\xe9\x82\x74\x4b\x3d\x8f\x5e\x58\x0b\x33\xab" + "\xef\xc3\xaf\x84\x64\xb9\xae\xb6\x25\x5f\x62\x8f\x1c\xe3\xf4\x51" + "\xb7\x96\xe3\x0e\x30\x42\xa9\x18\x39\xbf\x9e\x2a\x1f\x74\x19\x02" + "\x2d\x43\x93\x06\x63\xb1\xa7\x47\x6a\xfa\x9b\x6c\xeb\xbd\xe9\xae" + "\x6a\x7b\x6f\x53\x5a\x60\x5d\xb5\xcd\xe8\x67\xeb\x35\x3b\x48\xc6" + "\xa6\xb3\x04\xc8\xdf\xb8\x7e\x26\x64\xb0\xc9\x18\xb0\xa7\x33\xf2" + "\x4a\x8b\x22\x3b\x8d\x4b\x89\x1d\xf6\x9d\x65\xc4\x38\xd2\x54\x9c" + "\xe3\xcd\x89\xe1\xe1\xe6\x3e\x70\x81\x45\x1d\x18\xf9\x31\x83\xc8" + "\xbe\x14\x82\x4b\x87\x7a\x74\x28\xd2\xdd\x12\x55\x30\xe6\x0e\x49" + "\x31\x8e\x48\x69\xc5\xc0\x20\x91\xe4\x48\x41\x4c\xd8\xb9\x6a\x4e" + "\x21\xce\x99\x1b\x0e\xfd\x09\x4f\xa1\x79\x0f\x0f\x0f\x0f\x0f\x0f" + "\x0f\x3f\x3c\xb8\x71\x27\xc7\x72\x24\xe8\xb1\xa6\xc5\x7b\x18\xc3" + "\xb1\xa5\xb0\xd4\x98\xee\xe3\x19\xc6\x71\x87\x19\x79\x2b\x6d\x78" + "\xc6\x71\x8c\xe3\x0a\x4e\x71\x8c\xe3\x19\xfe\x38\xf2\x3b\xfb\x8b" + "\x48\xfe\x4e\xaa\xff\x00\x4f\x08\xff\x00\xc7\xe1\xfb\x8b\x48\xfe" + "\x4e\xaa\xff\x00\x4f\x08\xff\x00\xc7\xe4\x95\x86\x18\x8a\xcb\x31" + "\xa3\x32\xd4\x78\xf1\xdb\x43\x2c\x47\x61\xb4\x32\xcb\x2c\xb4\x9c" + "\x21\xb6\x99\x69\xbc\x25\xb6\xdb\x6d\x18\xc2\x10\xda\x12\x94\xa1" + "\x38\xc2\x53\x8c\x63\x18\xc7\x9d\xbe\x7f\xff\xd9" + ; diff -Naur php-5.2.5/main/suhosin_patch.c php-5.2.5-suhosin/main/suhosin_patch.c --- php-5.2.5/main/suhosin_patch.c 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/suhosin_patch.c 2007-11-12 12:38:56.000000000 +0100 @@ -0,0 +1,380 @@ +/* + +----------------------------------------------------------------------+ + | Suhosin Patch for PHP | + +----------------------------------------------------------------------+ + | Copyright (c) 2004-2006 Stefan Esser | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Stefan Esser | + +----------------------------------------------------------------------+ + */ +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +#include "php.h" + +#include +#include + +#if HAVE_UNISTD_H +#include +#endif +#include "SAPI.h" +#include "php_globals.h" + +#if SUHOSIN_PATCH + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE) +#undef AF_UNIX +#endif + +#if defined(AF_UNIX) +#include +#endif + +#define SYSLOG_PATH "/dev/log" + +#ifdef PHP_WIN32 +static HANDLE log_source = 0; +#endif + +#include "snprintf.h" + +#include "suhosin_patch.h" + +#ifdef ZTS +#include "suhosin_globals.h" +int suhosin_patch_globals_id; +#else +struct _suhosin_patch_globals suhosin_patch_globals; +#endif + +static void php_security_log(int loglevel, char *fmt, ...); + +static void suhosin_patch_globals_ctor(suhosin_patch_globals_struct *suhosin_patch_globals TSRMLS_DC) +{ + memset(suhosin_patch_globals, 0, sizeof(*suhosin_patch_globals)); +} + +PHPAPI void suhosin_startup() +{ +#ifdef ZTS + ts_allocate_id(&suhosin_patch_globals_id, sizeof(suhosin_patch_globals_struct), (ts_allocate_ctor) suhosin_patch_globals_ctor, NULL); +#else + suhosin_patch_globals_ctor(&suhosin_patch_globals TSRMLS_CC); +#endif + zend_suhosin_log = php_security_log; +} + +/*PHPAPI void suhosin_clear_mm_canaries(TSRMLS_D) +{ + zend_alloc_clear_mm_canaries(AG(heap)); + SPG(canary_1) = zend_canary(); + SPG(canary_2) = zend_canary(); + SPG(canary_3) = zend_canary(); +}*/ + +static char *loglevel2string(int loglevel) +{ + switch (loglevel) { + case S_FILES: + return "FILES"; + case S_INCLUDE: + return "INCLUDE"; + case S_MEMORY: + return "MEMORY"; + case S_MISC: + return "MISC"; + case S_SESSION: + return "SESSION"; + case S_SQL: + return "SQL"; + case S_EXECUTOR: + return "EXECUTOR"; + case S_VARS: + return "VARS"; + default: + return "UNKNOWN"; + } +} + +static void php_security_log(int loglevel, char *fmt, ...) +{ + int s, r, i=0; +#if defined(AF_UNIX) + struct sockaddr_un saun; +#endif +#ifdef PHP_WIN32 + LPTSTR strs[2]; + unsigned short etype; + DWORD evid; +#endif + char buf[4096+64]; + char error[4096+100]; + char *ip_address; + char *fname; + char *alertstring; + int lineno; + va_list ap; + TSRMLS_FETCH(); + + /*SDEBUG("(suhosin_log) loglevel: %d log_syslog: %u - log_sapi: %u - log_script: %u", loglevel, SPG(log_syslog), SPG(log_sapi), SPG(log_script));*/ + + if (SPG(log_use_x_forwarded_for)) { + ip_address = sapi_getenv("HTTP_X_FORWARDED_FOR", 20 TSRMLS_CC); + if (ip_address == NULL) { + ip_address = "X-FORWARDED-FOR not set"; + } + } else { + ip_address = sapi_getenv("REMOTE_ADDR", 11 TSRMLS_CC); + if (ip_address == NULL) { + ip_address = "REMOTE_ADDR not set"; + } + } + + + va_start(ap, fmt); + ap_php_vsnprintf(error, sizeof(error), fmt, ap); + va_end(ap); + while (error[i]) { + if (error[i] < 32) error[i] = '.'; + i++; + } + +/* if (SPG(simulation)) { + alertstring = "ALERT-SIMULATION"; + } else { */ + alertstring = "ALERT"; +/* }*/ + + if (zend_is_executing(TSRMLS_C)) { + if (EG(current_execute_data)) { + lineno = EG(current_execute_data)->opline->lineno; + fname = EG(current_execute_data)->op_array->filename; + } else { + lineno = zend_get_executed_lineno(TSRMLS_C); + fname = zend_get_executed_filename(TSRMLS_C); + } + ap_php_snprintf(buf, sizeof(buf), "%s - %s (attacker '%s', file '%s', line %u)", alertstring, error, ip_address, fname, lineno); + } else { + fname = sapi_getenv("SCRIPT_FILENAME", 15 TSRMLS_CC); + if (fname==NULL) { + fname = "unknown"; + } + ap_php_snprintf(buf, sizeof(buf), "%s - %s (attacker '%s', file '%s')", alertstring, error, ip_address, fname); + } + + /* Syslog-Logging disabled? */ + if (((SPG(log_syslog)|S_INTERNAL) & loglevel)==0) { + goto log_sapi; + } + +#if defined(AF_UNIX) + ap_php_snprintf(error, sizeof(error), "<%u>suhosin[%u]: %s\n", (unsigned int)(SPG(log_syslog_facility)|SPG(log_syslog_priority)),getpid(),buf); + + s = socket(AF_UNIX, SOCK_DGRAM, 0); + if (s == -1) { + goto log_sapi; + } + + memset(&saun, 0, sizeof(saun)); + saun.sun_family = AF_UNIX; + strcpy(saun.sun_path, SYSLOG_PATH); + /*saun.sun_len = sizeof(saun);*/ + + r = connect(s, (struct sockaddr *)&saun, sizeof(saun)); + if (r) { + close(s); + s = socket(AF_UNIX, SOCK_STREAM, 0); + if (s == -1) { + goto log_sapi; + } + + memset(&saun, 0, sizeof(saun)); + saun.sun_family = AF_UNIX; + strcpy(saun.sun_path, SYSLOG_PATH); + /*saun.sun_len = sizeof(saun);*/ + + r = connect(s, (struct sockaddr *)&saun, sizeof(saun)); + if (r) { + close(s); + goto log_sapi; + } + } + send(s, error, strlen(error), 0); + + close(s); +#endif +#ifdef PHP_WIN32 + ap_php_snprintf(error, sizeof(error), "suhosin[%u]: %s", getpid(),buf); + + switch (SPG(log_syslog_priority)) { /* translate UNIX type into NT type */ + case 1: /*LOG_ALERT:*/ + etype = EVENTLOG_ERROR_TYPE; + break; + case 6: /*LOG_INFO:*/ + etype = EVENTLOG_INFORMATION_TYPE; + break; + default: + etype = EVENTLOG_WARNING_TYPE; + } + evid = loglevel; + strs[0] = error; + /* report the event */ + if (log_source == NULL) { + log_source = RegisterEventSource(NULL, "Suhosin-Patch-" SUHOSIN_PATCH_VERSION); + } + ReportEvent(log_source, etype, (unsigned short) SPG(log_syslog_priority), evid, NULL, 1, 0, strs, NULL); + +#endif +log_sapi: + /* SAPI Logging activated? */ + /*SDEBUG("(suhosin_log) log_syslog: %u - log_sapi: %u - log_script: %u - log_phpscript: %u", SPG(log_syslog), SPG(log_sapi), SPG(log_script), SPG(log_phpscript));*/ + if (((SPG(log_sapi)|S_INTERNAL) & loglevel)!=0) { + sapi_module.log_message(buf); + } + +/*log_script:*/ + /* script logging activaed? */ + if (((SPG(log_script) & loglevel)!=0) && SPG(log_scriptname)!=NULL) { + char cmd[8192], *cmdpos, *bufpos; + FILE *in; + int space; + + ap_php_snprintf(cmd, sizeof(cmd), "%s %s \'", SPG(log_scriptname), loglevel2string(loglevel)); + space = sizeof(cmd) - strlen(cmd); + cmdpos = cmd + strlen(cmd); + bufpos = buf; + if (space <= 1) return; + while (space > 2 && *bufpos) { + if (*bufpos == '\'') { + if (space<=5) break; + *cmdpos++ = '\''; + *cmdpos++ = '\\'; + *cmdpos++ = '\''; + *cmdpos++ = '\''; + bufpos++; + space-=4; + } else { + *cmdpos++ = *bufpos++; + space--; + } + } + *cmdpos++ = '\''; + *cmdpos = 0; + + if ((in=VCWD_POPEN(cmd, "r"))==NULL) { + php_security_log(S_INTERNAL, "Unable to execute logging shell script: %s", SPG(log_scriptname)); + return; + } + /* read and forget the result */ + while (1) { + int readbytes = fread(cmd, 1, sizeof(cmd), in); + if (readbytes<=0) { + break; + } + } + pclose(in); + } +/*log_phpscript:*/ + if ((SPG(log_phpscript) & loglevel)!=0 && EG(in_execution) && SPG(log_phpscriptname) && SPG(log_phpscriptname)[0]) { + zend_file_handle file_handle; + zend_op_array *new_op_array; + zval *result = NULL; + + /*long orig_execution_depth = SPG(execution_depth);*/ + zend_bool orig_safe_mode = PG(safe_mode); + char *orig_basedir = PG(open_basedir); + + char *phpscript = SPG(log_phpscriptname); +/*SDEBUG("scriptname %s", SPG(log_phpscriptname));`*/ +#ifdef ZEND_ENGINE_2 + if (zend_stream_open(phpscript, &file_handle TSRMLS_CC) == SUCCESS) { +#else + if (zend_open(phpscript, &file_handle) == SUCCESS && ZEND_IS_VALID_FILE_HANDLE(&file_handle)) { + file_handle.filename = phpscript; + file_handle.free_filename = 0; +#endif + if (!file_handle.opened_path) { + file_handle.opened_path = estrndup(phpscript, strlen(phpscript)); + } + new_op_array = zend_compile_file(&file_handle, ZEND_REQUIRE TSRMLS_CC); + zend_destroy_file_handle(&file_handle TSRMLS_CC); + if (new_op_array) { + HashTable *active_symbol_table = EG(active_symbol_table); + zval *zerror, *zerror_class; + + if (active_symbol_table == NULL) { + active_symbol_table = &EG(symbol_table); + } + EG(return_value_ptr_ptr) = &result; + EG(active_op_array) = new_op_array; + + MAKE_STD_ZVAL(zerror); + MAKE_STD_ZVAL(zerror_class); + ZVAL_STRING(zerror, buf, 1); + ZVAL_LONG(zerror_class, loglevel); + + zend_hash_update(active_symbol_table, "SUHOSIN_ERROR", sizeof("SUHOSIN_ERROR"), (void **)&zerror, sizeof(zval *), NULL); + zend_hash_update(active_symbol_table, "SUHOSIN_ERRORCLASS", sizeof("SUHOSIN_ERRORCLASS"), (void **)&zerror_class, sizeof(zval *), NULL); + + /*SPG(execution_depth) = 0;*/ + if (SPG(log_phpscript_is_safe)) { + PG(safe_mode) = 0; + PG(open_basedir) = NULL; + } + + zend_execute(new_op_array TSRMLS_CC); + + /*SPG(execution_depth) = orig_execution_depth;*/ + PG(safe_mode) = orig_safe_mode; + PG(open_basedir) = orig_basedir; + +#ifdef ZEND_ENGINE_2 + destroy_op_array(new_op_array TSRMLS_CC); +#else + destroy_op_array(new_op_array); +#endif + efree(new_op_array); +#ifdef ZEND_ENGINE_2 + if (!EG(exception)) +#endif + { + if (EG(return_value_ptr_ptr)) { + zval_ptr_dtor(EG(return_value_ptr_ptr)); + EG(return_value_ptr_ptr) = NULL; + } + } + } else { + php_security_log(S_INTERNAL, "Unable to execute logging PHP script: %s", SPG(log_phpscriptname)); + return; + } + } else { + php_security_log(S_INTERNAL, "Unable to execute logging PHP script: %s", SPG(log_phpscriptname)); + return; + } + } + +} + + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/main/suhosin_patch.h php-5.2.5-suhosin/main/suhosin_patch.h --- php-5.2.5/main/suhosin_patch.h 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/suhosin_patch.h 2007-11-12 12:38:56.000000000 +0100 @@ -0,0 +1,40 @@ +/* + +----------------------------------------------------------------------+ + | Suhosin Patch for PHP | + +----------------------------------------------------------------------+ + | Copyright (c) 2004-2006 Stefan Esser | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Stefan Esser | + +----------------------------------------------------------------------+ + */ + +#ifndef SUHOSIN_PATCH_H +#define SUHOSIN_PATCH_H + +#if SUHOSIN_PATCH + +#include "zend.h" + +PHPAPI void suhosin_startup(); +#define SUHOSIN_PATCH_VERSION "0.9.6.2" + +#define SUHOSIN_LOGO_GUID "SUHO8567F54-D428-14d2-A769-00DA302A5F18" + +#endif + +#endif /* SUHOSIN_PATCH_H */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ diff -Naur php-5.2.5/main/suhosin_patch.m4 php-5.2.5-suhosin/main/suhosin_patch.m4 --- php-5.2.5/main/suhosin_patch.m4 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/main/suhosin_patch.m4 2007-11-12 12:38:56.000000000 +0100 @@ -0,0 +1,8 @@ +dnl +dnl $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ +dnl +dnl This file contains Suhosin Patch for PHP specific autoconf functions. +dnl + +AC_DEFINE(SUHOSIN_PATCH, 1, [Suhosin Patch]) + diff -Naur php-5.2.5/sapi/apache/mod_php5.c php-5.2.5-suhosin/sapi/apache/mod_php5.c --- php-5.2.5/sapi/apache/mod_php5.c 2007-08-06 14:54:57.000000000 +0200 +++ php-5.2.5-suhosin/sapi/apache/mod_php5.c 2007-11-12 12:38:56.000000000 +0100 @@ -951,7 +951,11 @@ { TSRMLS_FETCH(); if (PG(expose_php)) { +#if SUHOSIN_PATCH + ap_add_version_component("PHP/" PHP_VERSION " with Suhosin-Patch"); +#else ap_add_version_component("PHP/" PHP_VERSION); +#endif } } #endif diff -Naur php-5.2.5/sapi/apache2filter/sapi_apache2.c php-5.2.5-suhosin/sapi/apache2filter/sapi_apache2.c --- php-5.2.5/sapi/apache2filter/sapi_apache2.c 2007-01-01 10:36:12.000000000 +0100 +++ php-5.2.5-suhosin/sapi/apache2filter/sapi_apache2.c 2007-11-12 12:38:56.000000000 +0100 @@ -562,7 +562,11 @@ { TSRMLS_FETCH(); if (PG(expose_php)) { +#if SUHOSIN_PATCH + ap_add_version_component(p, "PHP/" PHP_VERSION " with Suhosin-Patch"); +#else ap_add_version_component(p, "PHP/" PHP_VERSION); +#endif } } diff -Naur php-5.2.5/sapi/apache2handler/sapi_apache2.c php-5.2.5-suhosin/sapi/apache2handler/sapi_apache2.c --- php-5.2.5/sapi/apache2handler/sapi_apache2.c 2007-06-28 19:23:07.000000000 +0200 +++ php-5.2.5-suhosin/sapi/apache2handler/sapi_apache2.c 2007-11-12 12:38:56.000000000 +0100 @@ -372,7 +372,11 @@ { TSRMLS_FETCH(); if (PG(expose_php)) { +#if SUHOSIN_PATCH + ap_add_version_component(p, "PHP/" PHP_VERSION " with Suhosin-Patch"); +#else ap_add_version_component(p, "PHP/" PHP_VERSION); +#endif } } diff -Naur php-5.2.5/sapi/cgi/cgi_main.c php-5.2.5-suhosin/sapi/cgi/cgi_main.c --- php-5.2.5/sapi/cgi/cgi_main.c 2007-11-01 16:23:14.000000000 +0100 +++ php-5.2.5-suhosin/sapi/cgi/cgi_main.c 2007-11-12 12:41:57.000000000 +0100 @@ -1720,11 +1720,19 @@ SG(headers_sent) = 1; SG(request_info).no_headers = 1; } +#if SUHOSIN_PATCH +#if ZEND_DEBUG + php_printf("PHP %s with Suhosin-Patch %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2007 The PHP Group\n%s", PHP_VERSION, SUHOSIN_PATCH_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); +#else + php_printf("PHP %s with Suhosin-Patch %s (%s) (built: %s %s)\nCopyright (c) 1997-2007 The PHP Group\n%s", PHP_VERSION, SUHOSIN_PATCH_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); +#endif +#else #if ZEND_DEBUG php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2007 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #else php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2007 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif +#endif php_request_shutdown((void *) 0); exit_status = 0; goto out; diff -Naur php-5.2.5/sapi/cli/php_cli.c php-5.2.5-suhosin/sapi/cli/php_cli.c --- php-5.2.5/sapi/cli/php_cli.c 2007-08-09 01:51:24.000000000 +0200 +++ php-5.2.5-suhosin/sapi/cli/php_cli.c 2007-11-12 12:38:56.000000000 +0100 @@ -779,8 +779,14 @@ } request_started = 1; - php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2007 The PHP Group\n%s", - PHP_VERSION, sapi_module.name, __DATE__, __TIME__, +#if SUHOSIN_PATCH + php_printf("PHP %s with Suhosin-Patch %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2007 The PHP Group\n%s", + PHP_VERSION, SUHOSIN_PATCH_VERSION, +#else + php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2007 The PHP Group\n%s", + PHP_VERSION, +#endif + sapi_module.name, __DATE__, __TIME__, #if ZEND_DEBUG && defined(HAVE_GCOV) "(DEBUG GCOV)", #elif ZEND_DEBUG diff -Naur php-5.2.5/TSRM/TSRM.h php-5.2.5-suhosin/TSRM/TSRM.h --- php-5.2.5/TSRM/TSRM.h 2007-04-17 08:26:32.000000000 +0200 +++ php-5.2.5-suhosin/TSRM/TSRM.h 2007-11-12 12:38:56.000000000 +0100 @@ -38,6 +38,13 @@ typedef unsigned long tsrm_uintptr_t; #endif +#if SUHOSIN_PATCH +# if HAVE_REALPATH +# undef realpath +# define realpath php_realpath +# endif +#endif + /* Only compile multi-threading functions if we're in ZTS mode */ #ifdef ZTS @@ -93,6 +100,7 @@ #define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts + #ifdef __cplusplus extern "C" { #endif diff -Naur php-5.2.5/TSRM/tsrm_virtual_cwd.c php-5.2.5-suhosin/TSRM/tsrm_virtual_cwd.c --- php-5.2.5/TSRM/tsrm_virtual_cwd.c 2007-10-23 07:57:35.000000000 +0200 +++ php-5.2.5-suhosin/TSRM/tsrm_virtual_cwd.c 2007-11-12 12:38:56.000000000 +0100 @@ -273,6 +273,176 @@ } /* }}} */ +#if SUHOSIN_PATCH +CWD_API char *php_realpath(const char *path, char *resolved) +{ + struct stat sb; + char *p, *q, *s; + size_t left_len, resolved_len; + unsigned symlinks; + int serrno, slen; + int is_dir = 1; + char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; + + serrno = errno; + symlinks = 0; + if (path[0] == '/') { + resolved[0] = '/'; + resolved[1] = '\0'; + if (path[1] == '\0') + return (resolved); + resolved_len = 1; + left_len = strlcpy(left, path + 1, sizeof(left)); + } else { + if (getcwd(resolved, PATH_MAX) == NULL) { + strlcpy(resolved, ".", PATH_MAX); + return (NULL); + } + resolved_len = strlen(resolved); + left_len = strlcpy(left, path, sizeof(left)); + } + if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { + errno = ENAMETOOLONG; + return (NULL); + } + + /* + * Iterate over path components in `left'. + */ + while (left_len != 0) { + /* + * Extract the next path component and adjust `left' + * and its length. + */ + p = strchr(left, '/'); + s = p ? p : left + left_len; + if (s - left >= sizeof(next_token)) { + errno = ENAMETOOLONG; + return (NULL); + } + memcpy(next_token, left, s - left); + next_token[s - left] = '\0'; + left_len -= s - left; + if (p != NULL) + memmove(left, s + 1, left_len + 1); + if (resolved[resolved_len - 1] != '/') { + if (resolved_len + 1 >= PATH_MAX) { + errno = ENAMETOOLONG; + return (NULL); + } + resolved[resolved_len++] = '/'; + resolved[resolved_len] = '\0'; + } + if (next_token[0] == '\0') + continue; + else if (strcmp(next_token, ".") == 0) + continue; + else if (strcmp(next_token, "..") == 0) { + /* + * Strip the last path component except when we have + * single "/" + */ + if (!is_dir) { + errno = ENOENT; + return (NULL); + } + if (resolved_len > 1) { + resolved[resolved_len - 1] = '\0'; + q = strrchr(resolved, '/'); + *q = '\0'; + resolved_len = q - resolved; + } + continue; + } + + /* + * Append the next path component and lstat() it. If + * lstat() fails we still can return successfully if + * there are no more path components left. + */ + resolved_len = strlcat(resolved, next_token, PATH_MAX); + if (resolved_len >= PATH_MAX) { + errno = ENAMETOOLONG; + return (NULL); + } + if (lstat(resolved, &sb) != 0) { + if (errno == ENOENT) { + if (p == NULL) { + errno = serrno; + return (resolved); + } else if (strstr(left, "/.") == NULL && strstr(left, "./") == NULL) { + resolved_len = strlcat(resolved, "/", PATH_MAX); + resolved_len = strlcat(resolved, left, PATH_MAX); + if (resolved_len >= PATH_MAX) { + errno = ENAMETOOLONG; + return (NULL); + } + errno = serrno; + return (resolved); + } + } + return (NULL); + } + if (S_ISLNK(sb.st_mode)) { + if (symlinks++ > MAXSYMLINKS) { + errno = ELOOP; + return (NULL); + } + slen = readlink(resolved, symlink, sizeof(symlink) - 1); + if (slen < 0) + return (NULL); + symlink[slen] = '\0'; + if (symlink[0] == '/') { + resolved[1] = 0; + resolved_len = 1; + } else if (resolved_len > 1) { + /* Strip the last path component. */ + resolved[resolved_len - 1] = '\0'; + q = strrchr(resolved, '/'); + *q = '\0'; + resolved_len = q - resolved; + } + + /* + * If there are any path components left, then + * append them to symlink. The result is placed + * in `left'. + */ + if (p != NULL) { + if (symlink[slen - 1] != '/') { + if (slen + 1 >= sizeof(symlink)) { + errno = ENAMETOOLONG; + return (NULL); + } + symlink[slen] = '/'; + symlink[slen + 1] = 0; + } + left_len = strlcat(symlink, left, sizeof(left)); + if (left_len >= sizeof(left)) { + errno = ENAMETOOLONG; + return (NULL); + } + } + left_len = strlcpy(left, symlink, sizeof(left)); + } else { + if (S_ISDIR(sb.st_mode)) { + is_dir = 1; + } else { + is_dir = 0; + } + } + } + + /* + * Remove trailing slash except when the resolved pathname + * is a single "/". + */ + if (resolved_len > 1 && resolved[resolved_len - 1] == '/') + resolved[resolved_len - 1] = '\0'; + return (resolved); +} +#endif + CWD_API void virtual_cwd_startup(void) /* {{{ */ { char cwd[MAXPATHLEN]; diff -Naur php-5.2.5/TSRM/tsrm_virtual_cwd.h php-5.2.5-suhosin/TSRM/tsrm_virtual_cwd.h --- php-5.2.5/TSRM/tsrm_virtual_cwd.h 2007-01-22 10:31:46.000000000 +0100 +++ php-5.2.5-suhosin/TSRM/tsrm_virtual_cwd.h 2007-11-12 12:38:56.000000000 +0100 @@ -139,6 +139,22 @@ typedef int (*verify_path_func)(const cwd_state *); +#ifndef HAVE_STRLCPY +CWD_API size_t php_strlcpy(char *dst, const char *src, size_t siz); +#undef strlcpy +#define strlcpy php_strlcpy +#endif + +#ifndef HAVE_STRLCAT +CWD_API size_t php_strlcat(char *dst, const char *src, size_t siz); +#undef strlcat +#define strlcat php_strlcat +#endif + + +#if SUHOSIN_PATCH +CWD_API char *php_realpath(const char *path, char *resolved); +#endif CWD_API void virtual_cwd_startup(void); CWD_API void virtual_cwd_shutdown(void); CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC); diff -Naur php-5.2.5/win32/build/config.w32 php-5.2.5-suhosin/win32/build/config.w32 --- php-5.2.5/win32/build/config.w32 2007-04-18 11:38:59.000000000 +0200 +++ php-5.2.5-suhosin/win32/build/config.w32 2007-11-12 12:38:56.000000000 +0100 @@ -299,7 +299,7 @@ zend_sprintf.c zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c \ zend_stream.c zend_iterators.c zend_interfaces.c zend_objects.c \ zend_object_handlers.c zend_objects_API.c \ - zend_default_classes.c zend_execute.c zend_strtod.c"); + zend_default_classes.c zend_execute.c zend_strtod.c zend_canary.c"); ADD_SOURCES("main", "main.c snprintf.c spprintf.c safe_mode.c fopen_wrappers.c \ php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ @@ -344,6 +344,8 @@ AC_DEFINE('HAVE_USLEEP', 1); AC_DEFINE('HAVE_STRCOLL', 1); +AC_DEFINE('SUHOSIN_PATCH', 1); + /* For snapshot builders, where can we find the additional * files that make up the snapshot template? */ ARG_WITH("snapshot-template", "Path to snapshot builder template dir", "no"); diff -Naur php-5.2.5/Zend/Makefile.am php-5.2.5-suhosin/Zend/Makefile.am --- php-5.2.5/Zend/Makefile.am 2006-12-05 09:07:57.000000000 +0100 +++ php-5.2.5-suhosin/Zend/Makefile.am 2007-11-12 12:38:56.000000000 +0100 @@ -17,7 +17,7 @@ zend_objects_API.c zend_ts_hash.c zend_stream.c \ zend_default_classes.c \ zend_iterators.c zend_interfaces.c zend_exceptions.c \ - zend_strtod.c zend_multibyte.c + zend_strtod.c zend_multibyte.c zend_canary.c libZend_la_LDFLAGS = libZend_la_LIBADD = @ZEND_EXTRA_LIBS@ diff -Naur php-5.2.5/Zend/zend_alloc.c php-5.2.5-suhosin/Zend/zend_alloc.c --- php-5.2.5/Zend/zend_alloc.c 2007-10-25 09:30:29.000000000 +0200 +++ php-5.2.5-suhosin/Zend/zend_alloc.c 2007-11-12 12:38:56.000000000 +0100 @@ -311,13 +311,26 @@ #define MEM_BLOCK_GUARD 0x2A8FCC84 #define MEM_BLOCK_LEAK 0x6C5E8F2D +#if SUHOSIN_PATCH +# define CANARY_SIZE sizeof(size_t) +#else +# define CANARY_SIZE 0 +#endif + /* mm block type */ typedef struct _zend_mm_block_info { #if ZEND_MM_COOKIES size_t _cookie; #endif - size_t _size; - size_t _prev; +#if SUHOSIN_PATCH + size_t canary_1; +#endif + size_t _size; + size_t _prev; +#if SUHOSIN_PATCH + size_t size; + size_t canary_2; +#endif } zend_mm_block_info; #if ZEND_DEBUG @@ -423,6 +436,9 @@ int miss; } cache_stat[ZEND_MM_NUM_BUCKETS+1]; #endif +#if SUHOSIN_PATCH + size_t canary_1,canary_2,canary_3; +#endif }; #define ZEND_MM_SMALL_FREE_BUCKET(heap, index) \ @@ -512,15 +528,15 @@ #define ZEND_MM_ALIGNED_SIZE(size) ((size + ZEND_MM_ALIGNMENT - 1) & ZEND_MM_ALIGNMENT_MASK) #define ZEND_MM_ALIGNED_HEADER_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_block)) #define ZEND_MM_ALIGNED_FREE_HEADER_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_small_free_block)) -#define ZEND_MM_MIN_ALLOC_BLOCK_SIZE ZEND_MM_ALIGNED_SIZE(ZEND_MM_ALIGNED_HEADER_SIZE + END_MAGIC_SIZE) +#define ZEND_MM_MIN_ALLOC_BLOCK_SIZE ZEND_MM_ALIGNED_SIZE(ZEND_MM_ALIGNED_HEADER_SIZE + END_MAGIC_SIZE + CANARY_SIZE) #define ZEND_MM_ALIGNED_MIN_HEADER_SIZE (ZEND_MM_MIN_ALLOC_BLOCK_SIZE>ZEND_MM_ALIGNED_FREE_HEADER_SIZE?ZEND_MM_MIN_ALLOC_BLOCK_SIZE:ZEND_MM_ALIGNED_FREE_HEADER_SIZE) #define ZEND_MM_ALIGNED_SEGMENT_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_segment)) -#define ZEND_MM_MIN_SIZE ((ZEND_MM_ALIGNED_MIN_HEADER_SIZE>(ZEND_MM_ALIGNED_HEADER_SIZE+END_MAGIC_SIZE))?(ZEND_MM_ALIGNED_MIN_HEADER_SIZE-(ZEND_MM_ALIGNED_HEADER_SIZE+END_MAGIC_SIZE)):0) +#define ZEND_MM_MIN_SIZE ((ZEND_MM_ALIGNED_MIN_HEADER_SIZE>(ZEND_MM_ALIGNED_HEADER_SIZE+END_MAGIC_SIZE+CANARY_SIZE))?(ZEND_MM_ALIGNED_MIN_HEADER_SIZE-(ZEND_MM_ALIGNED_HEADER_SIZE+END_MAGIC_SIZE+CANARY_SIZE)):0) #define ZEND_MM_MAX_SMALL_SIZE ((ZEND_MM_NUM_BUCKETS<>ZEND_MM_ALIGNMENT_LOG2)-(ZEND_MM_ALIGNED_MIN_HEADER_SIZE>>ZEND_MM_ALIGNMENT_LOG2)) @@ -582,6 +598,48 @@ #endif +#if SUHOSIN_PATCH + +# define SUHOSIN_MM_CHECK_CANARIES(block, MFUNCTION) do { \ + size_t *p = SUHOSIN_MM_END_CANARY_PTR(block), check; \ + if (((block)->info.canary_1 != heap->canary_1) || ((block)->info.canary_2 != heap->canary_2)) { \ + canary_mismatch: \ + zend_suhosin_log(S_MEMORY, "canary mismatch on " MFUNCTION " - heap overflow detected"); \ + exit(1); \ + } \ + memcpy(&check, p, CANARY_SIZE); \ + if (check != heap->canary_3) { \ + zend_suhosin_log(S_MEMORY, "canary mismatch on " MFUNCTION " - heap overflow detected"); \ + exit(1); \ + goto canary_mismatch; \ + } \ + } while (0) + +# define SUHOSIN_MM_SET_CANARIES(block) do { \ + (block)->info.canary_1 = heap->canary_1; \ + (block)->info.canary_2 = heap->canary_2; \ + } while (0) + +# define SUHOSIN_MM_END_CANARY_PTR(block) \ + (size_t*)(((char*)(ZEND_MM_DATA_OF(block))) + ((zend_mm_block*)(block))->info.size + END_MAGIC_SIZE) + +# define SUHOSIN_MM_SET_END_CANARY(block) do { \ + size_t *p = SUHOSIN_MM_END_CANARY_PTR(block); \ + memcpy(p, &heap->canary_3, CANARY_SIZE); \ + } while (0) + +#else + +# define SUHOSIN_MM_CHECK_CANARIES(block) + +# define SUHOSIN_MM_SET_CANARIES(block) + +# define SUHOSIN_MM_END_CANARY_PTR(block) + +# define SUHOSIN_MM_SET_END_CANARY(block) + +#endif + #if ZEND_MM_HEAP_PROTECTION @@ -780,6 +838,12 @@ if (EXPECTED(prev == mm_block)) { zend_mm_free_block **rp, **cp; +#if SUHOSIN_PATCH + if (next != mm_block) { + zend_suhosin_log(S_MEMORY, "heap corrupt on efree() - heap corruption detected"); + exit(1); + } +#endif #if ZEND_MM_SAFE_UNLINKING if (UNEXPECTED(next != mm_block)) { zend_mm_panic("zend_mm_heap corrupted"); @@ -818,6 +882,12 @@ } } else { +#if SUHOSIN_PATCH + if (prev->next_free_block != mm_block || next->prev_free_block != mm_block) { + zend_suhosin_log(S_MEMORY, "linked list corrupt on efree() - heap corruption detected"); + exit(1); + } +#endif #if ZEND_MM_SAFE_UNLINKING if (UNEXPECTED(prev->next_free_block != mm_block) || UNEXPECTED(next->prev_free_block != mm_block)) { zend_mm_panic("zend_mm_heap corrupted"); @@ -865,6 +935,11 @@ heap->large_free_buckets[i] = NULL; } heap->rest_buckets[0] = heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(heap); +#if SUHOSIN_PATCH + heap->canary_1 = zend_canary(); + heap->canary_2 = zend_canary(); + heap->canary_3 = zend_canary(); +#endif } static void zend_mm_del_segment(zend_mm_heap *heap, zend_mm_segment *segment) @@ -1755,6 +1830,11 @@ best_fit = heap->cache[index]; heap->cache[index] = best_fit->prev_free_block; heap->cached -= true_size; +#if SUHOSIN_PATCH + SUHOSIN_MM_SET_CANARIES(best_fit); + ((zend_mm_block*)best_fit)->info.size = size; + SUHOSIN_MM_SET_END_CANARY(best_fit); +#endif ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED); ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0); return ZEND_MM_DATA_OF(best_fit); @@ -1889,6 +1969,12 @@ ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 1); +#if SUHOSIN_PATCH + SUHOSIN_MM_SET_CANARIES(best_fit); + ((zend_mm_block*)best_fit)->info.size = size; + SUHOSIN_MM_SET_END_CANARY(best_fit); +#endif + heap->size += true_size; if (heap->peak < heap->size) { heap->peak = heap->size; @@ -1912,6 +1998,9 @@ mm_block = ZEND_MM_HEADER_OF(p); size = ZEND_MM_BLOCK_SIZE(mm_block); +#if SUHOSIN_PATCH + SUHOSIN_MM_CHECK_CANARIES(mm_block, "efree()"); +#endif ZEND_MM_CHECK_PROTECTION(mm_block); #if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION @@ -1974,6 +2063,9 @@ mm_block = ZEND_MM_HEADER_OF(p); true_size = ZEND_MM_TRUE_SIZE(size); orig_size = ZEND_MM_BLOCK_SIZE(mm_block); +#if SUHOSIN_PATCH + SUHOSIN_MM_CHECK_CANARIES(mm_block, "erealloc()"); +#endif ZEND_MM_CHECK_PROTECTION(mm_block); if (UNEXPECTED(true_size < size)) { @@ -2005,6 +2097,11 @@ HANDLE_UNBLOCK_INTERRUPTIONS(); } ZEND_MM_SET_DEBUG_INFO(mm_block, size, 0, 0); +#if SUHOSIN_PATCH + SUHOSIN_MM_SET_CANARIES(mm_block); + ((zend_mm_block*)mm_block)->info.size = size; + SUHOSIN_MM_SET_END_CANARY(mm_block); +#endif return p; } @@ -2024,13 +2121,18 @@ heap->cache[index] = best_fit->prev_free_block; ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED); ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0); +#if SUHOSIN_PATCH + SUHOSIN_MM_SET_CANARIES(best_fit); + ((zend_mm_block*)best_fit)->info.size = size; + SUHOSIN_MM_SET_END_CANARY(best_fit); +#endif ptr = ZEND_MM_DATA_OF(best_fit); #if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION memcpy(ptr, p, mm_block->debug.size); #else - memcpy(ptr, p, orig_size - ZEND_MM_ALIGNED_HEADER_SIZE); + memcpy(ptr, p, orig_size - ZEND_MM_ALIGNED_HEADER_SIZE - CANARY_SIZE); #endif heap->cached -= true_size - orig_size; @@ -2088,6 +2190,11 @@ if (heap->peak < heap->size) { heap->peak = heap->size; } +#if SUHOSIN_PATCH + SUHOSIN_MM_SET_CANARIES(mm_block); + ((zend_mm_block*)mm_block)->info.size = size; + SUHOSIN_MM_SET_END_CANARY(mm_block); +#endif HANDLE_UNBLOCK_INTERRUPTIONS(); return p; } else if (ZEND_MM_IS_FIRST_BLOCK(mm_block) && @@ -2191,6 +2298,11 @@ } HANDLE_UNBLOCK_INTERRUPTIONS(); +#if SUHOSIN_PATCH + SUHOSIN_MM_SET_CANARIES(mm_block); + ((zend_mm_block*)mm_block)->info.size = size; + SUHOSIN_MM_SET_END_CANARY(mm_block); +#endif return ZEND_MM_DATA_OF(mm_block); } @@ -2198,7 +2310,7 @@ #if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION memcpy(ptr, p, mm_block->debug.size); #else - memcpy(ptr, p, orig_size - ZEND_MM_ALIGNED_HEADER_SIZE); + memcpy(ptr, p, orig_size - ZEND_MM_ALIGNED_HEADER_SIZE - CANARY_SIZE); #endif _zend_mm_free_int(heap, p ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); return ptr; @@ -2441,6 +2553,17 @@ zend_mm_shutdown(AG(mm_heap), full_shutdown, silent); } +#if SUHOSIN_PATCH +ZEND_API void suhosin_clear_mm_canaries(TSRMLS_D) +{ +/* NOT HERE + + AG(mm_heap)->canary_1 = zend_canary(); + AG(mm_heap)->canary_2 = zend_canary(); + AG(mm_heap)->canary_3 = zend_canary(); */ +} +#endif + static void alloc_globals_ctor(zend_alloc_globals *alloc_globals TSRMLS_DC) { char *tmp; diff -Naur php-5.2.5/Zend/zend_alloc.c.orig php-5.2.5-suhosin/Zend/zend_alloc.c.orig --- php-5.2.5/Zend/zend_alloc.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/Zend/zend_alloc.c.orig 2007-10-25 09:30:29.000000000 +0200 @@ -0,0 +1,2522 @@ +/* + +----------------------------------------------------------------------+ + | Zend Engine | + +----------------------------------------------------------------------+ + | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.00 of the Zend license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.zend.com/license/2_00.txt. | + | If you did not receive a copy of the Zend license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@zend.com so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Andi Gutmans | + | Zeev Suraski | + | Dmitry Stogov | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +#include "zend.h" +#include "zend_alloc.h" +#include "zend_globals.h" +#include "zend_operators.h" + +#ifdef HAVE_SIGNAL_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef ZEND_WIN32 +# define _WIN32_WINNT 0x0400 +# include +# include +#endif + +#ifndef ZEND_MM_HEAP_PROTECTION +# define ZEND_MM_HEAP_PROTECTION ZEND_DEBUG +#endif + +#ifndef ZEND_MM_SAFE_UNLINKING +# define ZEND_MM_SAFE_UNLINKING 1 +#endif + +#ifndef ZEND_MM_COOKIES +# define ZEND_MM_COOKIES ZEND_DEBUG +#endif + +#ifdef _WIN64 +# define PTR_FMT "0x%0.16I64x" +/* +#elif sizeof(long) == 8 +# define PTR_FMT "0x%0.16lx" +*/ +#else +# define PTR_FMT "0x%0.8lx" +#endif + +#if ZEND_DEBUG +void zend_debug_alloc_output(char *format, ...) +{ + char output_buf[256]; + va_list args; + + va_start(args, format); + vsprintf(output_buf, format, args); + va_end(args); + +#ifdef ZEND_WIN32 + OutputDebugString(output_buf); +#else + fprintf(stderr, "%s", output_buf); +#endif +} +#endif + +#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) +# define EXPECTED(condition) __builtin_expect(condition, 1) +# define UNEXPECTED(condition) __builtin_expect(condition, 0) +static void zend_mm_panic(const char *message) __attribute__ ((noreturn)); +#else +# define EXPECTED(condition) (condition) +# define UNEXPECTED(condition) (condition) +#endif + +static void zend_mm_panic(const char *message) +{ + fprintf(stderr, "%s\n", message); +#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID) + kill(getpid(), SIGSEGV); +#endif + exit(1); +} + +/*******************/ +/* Storage Manager */ +/*******************/ + +#ifdef ZEND_WIN32 +# define HAVE_MEM_WIN32 /* use VirtualAlloc() to allocate memory */ +#endif +#define HAVE_MEM_MALLOC /* use malloc() to allocate segments */ + +#include +#include +#if HAVE_LIMITS_H +#include +#endif +#include +#include + +#if defined(HAVE_MEM_MMAP_ANON) || defined(HAVE_MEM_MMAP_ZERO) +# ifdef HAVE_MREMAP +# define _GNU_SOURCE +# define __USE_GNU +# endif +# include +# ifndef MAP_ANON +# ifdef MAP_ANONYMOUS +# define MAP_ANON MAP_ANONYMOUS +# endif +# endif +# ifndef MREMAP_MAYMOVE +# define MREMAP_MAYMOVE 0 +# endif +# ifndef MAP_FAILED +# define MAP_FAILED ((void*)-1) +# endif +#endif + +static zend_mm_storage* zend_mm_mem_dummy_init(void *params) +{ + return malloc(sizeof(zend_mm_storage)); +} + +static void zend_mm_mem_dummy_dtor(zend_mm_storage *storage) +{ + free(storage); +} + +#if defined(HAVE_MEM_MMAP_ANON) || defined(HAVE_MEM_MMAP_ZERO) + +static zend_mm_segment* zend_mm_mem_mmap_realloc(zend_mm_storage *storage, zend_mm_segment* segment, size_t size) +{ + zend_mm_segment *ret; +#ifdef HAVE_MREMAP + ret = (zend_mm_segment*)mremap(segment, segment->size, size, MREMAP_MAYMOVE); + if (ret == MAP_FAILED) { +#endif + ret = storage->handlers->_alloc(storage, size); + if (ret) { + memcpy(ret, segment, size > segment->size ? segment->size : size); + storage->handlers->_free(storage, segment); + } +#ifdef HAVE_MREMAP + } +#endif + return ret; +} + +static void zend_mm_mem_mmap_free(zend_mm_storage *storage, zend_mm_segment* segment) +{ + munmap(segment, segment->size); +} + +#endif + +#ifdef HAVE_MEM_MMAP_ANON + +static zend_mm_segment* zend_mm_mem_mmap_anon_alloc(zend_mm_storage *storage, size_t size) +{ + zend_mm_segment *ret = (zend_mm_segment*)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); + if (ret == MAP_FAILED) { + ret = NULL; + } + return ret; +} + +# define ZEND_MM_MEM_MMAP_ANON_DSC {"mmap_anon", zend_mm_mem_dummy_init, zend_mm_mem_dummy_dtor, zend_mm_mem_mmap_anon_alloc, zend_mm_mem_mmap_realloc, zend_mm_mem_mmap_free} + +#endif + +#ifdef HAVE_MEM_MMAP_ZERO + +static int zend_mm_dev_zero_fd = -1; + +static zend_mm_storage* zend_mm_mem_mmap_zero_init(void *params) +{ + if (zend_mm_dev_zero_fd != -1) { + zend_mm_dev_zero_fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); + } + if (zend_mm_dev_zero_fd >= 0) { + return malloc(sizeof(zend_mm_storage)); + } else { + return NULL; + } +} + +static void zend_mm_mem_mmap_zero_dtor(zend_mm_storage *storage) +{ + close(zend_mm_dev_zero_fd); + free(storage); +} + +static zend_mm_segment* zend_mm_mem_mmap_zero_alloc(zend_mm_storage *storage, size_t size) +{ + zend_mm_segment *ret = (zend_mm_segment*)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, zend_mm_dev_zero_fd, 0); + if (ret == MAP_FAILED) { + ret = NULL; + } + return ret; +} + +# define ZEND_MM_MEM_MMAP_ZERO_DSC {"mmap_zero", zend_mm_mem_mmap_zero_init, zend_mm_mem_mmap_zero_dtor, zend_mm_mem_mmap_zero_alloc, zend_mm_mem_mmap_realloc, zend_mm_mem_mmap_free} + +#endif + +#ifdef HAVE_MEM_WIN32 + +static zend_mm_storage* zend_mm_mem_win32_init(void *params) +{ + HANDLE heap = HeapCreate(HEAP_NO_SERIALIZE, 0, 0); + zend_mm_storage* storage; + + if (heap == NULL) { + return NULL; + } + storage = (zend_mm_storage*)malloc(sizeof(zend_mm_storage)); + storage->data = (void*) heap; + return storage; +} + +static void zend_mm_mem_win32_dtor(zend_mm_storage *storage) +{ + HeapDestroy((HANDLE)storage->data); + free(storage); +} + +static zend_mm_segment* zend_mm_mem_win32_alloc(zend_mm_storage *storage, size_t size) +{ + return (zend_mm_segment*) HeapAlloc((HANDLE)storage->data, HEAP_NO_SERIALIZE, size); +} + +static void zend_mm_mem_win32_free(zend_mm_storage *storage, zend_mm_segment* segment) +{ + HeapFree((HANDLE)storage->data, HEAP_NO_SERIALIZE, segment); +} + +static zend_mm_segment* zend_mm_mem_win32_realloc(zend_mm_storage *storage, zend_mm_segment* segment, size_t size) +{ + return (zend_mm_segment*) HeapReAlloc((HANDLE)storage->data, HEAP_NO_SERIALIZE, segment, size); +} + +# define ZEND_MM_MEM_WIN32_DSC {"win32", zend_mm_mem_win32_init, zend_mm_mem_win32_dtor, zend_mm_mem_win32_alloc, zend_mm_mem_win32_realloc, zend_mm_mem_win32_free} + +#endif + +#ifdef HAVE_MEM_MALLOC + +static zend_mm_segment* zend_mm_mem_malloc_alloc(zend_mm_storage *storage, size_t size) +{ + return (zend_mm_segment*)malloc(size); +} + +static zend_mm_segment* zend_mm_mem_malloc_realloc(zend_mm_storage *storage, zend_mm_segment *ptr, size_t size) +{ + return (zend_mm_segment*)realloc(ptr, size); +} + +static void zend_mm_mem_malloc_free(zend_mm_storage *storage, zend_mm_segment *ptr) +{ + free(ptr); +} + +# define ZEND_MM_MEM_MALLOC_DSC {"malloc", zend_mm_mem_dummy_init, zend_mm_mem_dummy_dtor, zend_mm_mem_malloc_alloc, zend_mm_mem_malloc_realloc, zend_mm_mem_malloc_free} + +#endif + +static const zend_mm_mem_handlers mem_handlers[] = { +#ifdef HAVE_MEM_WIN32 + ZEND_MM_MEM_WIN32_DSC, +#endif +#ifdef HAVE_MEM_MALLOC + ZEND_MM_MEM_MALLOC_DSC, +#endif +#ifdef HAVE_MEM_MMAP_ANON + ZEND_MM_MEM_MMAP_ANON_DSC, +#endif +#ifdef HAVE_MEM_MMAP_ZERO + ZEND_MM_MEM_MMAP_ZERO_DSC, +#endif + {NULL, NULL, NULL, NULL, NULL, NULL} +}; + +# define ZEND_MM_STORAGE_DTOR() heap->storage->handlers->dtor(heap->storage) +# define ZEND_MM_STORAGE_ALLOC(size) heap->storage->handlers->_alloc(heap->storage, size) +# define ZEND_MM_STORAGE_REALLOC(ptr, size) heap->storage->handlers->_realloc(heap->storage, ptr, size) +# define ZEND_MM_STORAGE_FREE(ptr) heap->storage->handlers->_free(heap->storage, ptr) + +/****************/ +/* Heap Manager */ +/****************/ + +#define MEM_BLOCK_VALID 0x7312F8DC +#define MEM_BLOCK_FREED 0x99954317 +#define MEM_BLOCK_CACHED 0xFB8277DC +#define MEM_BLOCK_GUARD 0x2A8FCC84 +#define MEM_BLOCK_LEAK 0x6C5E8F2D + +/* mm block type */ +typedef struct _zend_mm_block_info { +#if ZEND_MM_COOKIES + size_t _cookie; +#endif + size_t _size; + size_t _prev; +} zend_mm_block_info; + +#if ZEND_DEBUG + +typedef struct _zend_mm_debug_info { + char *filename; + uint lineno; + char *orig_filename; + uint orig_lineno; + size_t size; +#if ZEND_MM_HEAP_PROTECTION + unsigned int start_magic; +#endif +} zend_mm_debug_info; + +#elif ZEND_MM_HEAP_PROTECTION + +typedef struct _zend_mm_debug_info { + size_t size; + unsigned int start_magic; +} zend_mm_debug_info; + +#endif + +typedef struct _zend_mm_block { + zend_mm_block_info info; +#if ZEND_DEBUG + unsigned int magic; +# ifdef ZTS + THREAD_T thread_id; +# endif + zend_mm_debug_info debug; +#elif ZEND_MM_HEAP_PROTECTION + zend_mm_debug_info debug; +#endif +} zend_mm_block; + +typedef struct _zend_mm_small_free_block { + zend_mm_block_info info; +#if ZEND_DEBUG + unsigned int magic; +# ifdef ZTS + THREAD_T thread_id; +# endif +#endif + struct _zend_mm_free_block *prev_free_block; + struct _zend_mm_free_block *next_free_block; +} zend_mm_small_free_block; + +typedef struct _zend_mm_free_block { + zend_mm_block_info info; +#if ZEND_DEBUG + unsigned int magic; +# ifdef ZTS + THREAD_T thread_id; +# endif +#endif + struct _zend_mm_free_block *prev_free_block; + struct _zend_mm_free_block *next_free_block; + + struct _zend_mm_free_block **parent; + struct _zend_mm_free_block *child[2]; +} zend_mm_free_block; + +#define ZEND_MM_NUM_BUCKETS (sizeof(size_t) << 3) + +#define ZEND_MM_CACHE 1 +#define ZEND_MM_CACHE_SIZE (ZEND_MM_NUM_BUCKETS * 2 * 1024) + +#ifndef ZEND_MM_CACHE_STAT +# define ZEND_MM_CACHE_STAT 0 +#endif + +struct _zend_mm_heap { + int use_zend_alloc; + size_t free_bitmap; + size_t large_free_bitmap; + size_t block_size; + size_t compact_size; + zend_mm_segment *segments_list; + zend_mm_storage *storage; + size_t real_size; + size_t real_peak; + size_t limit; + size_t size; + size_t peak; + size_t reserve_size; + void *reserve; + int overflow; + int internal; +#if ZEND_MM_CACHE + unsigned int cached; + zend_mm_free_block *cache[ZEND_MM_NUM_BUCKETS]; +#endif + zend_mm_free_block *free_buckets[ZEND_MM_NUM_BUCKETS*2]; + zend_mm_free_block *large_free_buckets[ZEND_MM_NUM_BUCKETS]; + zend_mm_free_block *rest_buckets[2]; +#if ZEND_MM_CACHE_STAT + struct { + int count; + int max_count; + int hit; + int miss; + } cache_stat[ZEND_MM_NUM_BUCKETS+1]; +#endif +}; + +#define ZEND_MM_SMALL_FREE_BUCKET(heap, index) \ + (zend_mm_free_block*) ((char*)&heap->free_buckets[index * 2] + \ + sizeof(zend_mm_free_block*) * 2 - \ + sizeof(zend_mm_small_free_block)) + +#define ZEND_MM_REST_BUCKET(heap) \ + (zend_mm_free_block*)((char*)&heap->rest_buckets[0] + \ + sizeof(zend_mm_free_block*) * 2 - \ + sizeof(zend_mm_small_free_block)) + +#if ZEND_MM_COOKIES + +static unsigned int _zend_mm_cookie = 0; + +# define ZEND_MM_COOKIE(block) \ + (((size_t)(block)) ^ _zend_mm_cookie) +# define ZEND_MM_SET_COOKIE(block) \ + (block)->info._cookie = ZEND_MM_COOKIE(block) +# define ZEND_MM_CHECK_COOKIE(block) \ + if (UNEXPECTED((block)->info._cookie != ZEND_MM_COOKIE(block))) { \ + zend_mm_panic("zend_mm_heap corrupted"); \ + } +#else +# define ZEND_MM_SET_COOKIE(block) +# define ZEND_MM_CHECK_COOKIE(block) +#endif + +/* Default memory segment size */ +#define ZEND_MM_SEG_SIZE (256 * 1024) + +/* Reserved space for error reporting in case of memory overflow */ +#define ZEND_MM_RESERVE_SIZE (8*1024) + +#ifdef _WIN64 +# define ZEND_MM_LONG_CONST(x) (x##i64) +#else +# define ZEND_MM_LONG_CONST(x) (x##L) +#endif + +#define ZEND_MM_TYPE_MASK ZEND_MM_LONG_CONST(0x3) + +#define ZEND_MM_FREE_BLOCK ZEND_MM_LONG_CONST(0x0) +#define ZEND_MM_USED_BLOCK ZEND_MM_LONG_CONST(0x1) +#define ZEND_MM_GUARD_BLOCK ZEND_MM_LONG_CONST(0x3) + +#define ZEND_MM_BLOCK(b, type, size) do { \ + size_t _size = (size); \ + (b)->info._size = (type) | _size; \ + ZEND_MM_BLOCK_AT(b, _size)->info._prev = (type) | _size; \ + ZEND_MM_SET_COOKIE(b); \ + } while (0); +#define ZEND_MM_LAST_BLOCK(b) do { \ + (b)->info._size = ZEND_MM_GUARD_BLOCK | ZEND_MM_ALIGNED_HEADER_SIZE; \ + ZEND_MM_SET_MAGIC(b, MEM_BLOCK_GUARD); \ + } while (0); +#define ZEND_MM_BLOCK_SIZE(b) ((b)->info._size & ~ZEND_MM_TYPE_MASK) +#define ZEND_MM_IS_FREE_BLOCK(b) (!((b)->info._size & ZEND_MM_USED_BLOCK)) +#define ZEND_MM_IS_USED_BLOCK(b) ((b)->info._size & ZEND_MM_USED_BLOCK) +#define ZEND_MM_IS_GUARD_BLOCK(b) (((b)->info._size & ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK) + +#define ZEND_MM_NEXT_BLOCK(b) ZEND_MM_BLOCK_AT(b, ZEND_MM_BLOCK_SIZE(b)) +#define ZEND_MM_PREV_BLOCK(b) ZEND_MM_BLOCK_AT(b, -(int)((b)->info._prev & ~ZEND_MM_TYPE_MASK)) + +#define ZEND_MM_PREV_BLOCK_IS_FREE(b) (!((b)->info._prev & ZEND_MM_USED_BLOCK)) + +#define ZEND_MM_MARK_FIRST_BLOCK(b) ((b)->info._prev = ZEND_MM_GUARD_BLOCK) +#define ZEND_MM_IS_FIRST_BLOCK(b) ((b)->info._prev == ZEND_MM_GUARD_BLOCK) + +/* optimized access */ +#define ZEND_MM_FREE_BLOCK_SIZE(b) (b)->info._size + +#ifndef ZEND_MM_ALIGNMENT +# define ZEND_MM_ALIGNMENT 8 +# define ZEND_MM_ALIGNMENT_LOG2 3 +#elif ZEND_MM_ALIGNMENT < 4 +# undef ZEND_MM_ALIGNMENT +# undef ZEND_MM_ALIGNMENT_LOG2 +# define ZEND_MM_ALIGNMENT 4 +# define ZEND_MM_ALIGNMENT_LOG2 2 +#endif + +#define ZEND_MM_ALIGNMENT_MASK ~(ZEND_MM_ALIGNMENT-1) + +/* Aligned header size */ +#define ZEND_MM_ALIGNED_SIZE(size) ((size + ZEND_MM_ALIGNMENT - 1) & ZEND_MM_ALIGNMENT_MASK) +#define ZEND_MM_ALIGNED_HEADER_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_block)) +#define ZEND_MM_ALIGNED_FREE_HEADER_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_small_free_block)) +#define ZEND_MM_MIN_ALLOC_BLOCK_SIZE ZEND_MM_ALIGNED_SIZE(ZEND_MM_ALIGNED_HEADER_SIZE + END_MAGIC_SIZE) +#define ZEND_MM_ALIGNED_MIN_HEADER_SIZE (ZEND_MM_MIN_ALLOC_BLOCK_SIZE>ZEND_MM_ALIGNED_FREE_HEADER_SIZE?ZEND_MM_MIN_ALLOC_BLOCK_SIZE:ZEND_MM_ALIGNED_FREE_HEADER_SIZE) +#define ZEND_MM_ALIGNED_SEGMENT_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_segment)) + +#define ZEND_MM_MIN_SIZE ((ZEND_MM_ALIGNED_MIN_HEADER_SIZE>(ZEND_MM_ALIGNED_HEADER_SIZE+END_MAGIC_SIZE))?(ZEND_MM_ALIGNED_MIN_HEADER_SIZE-(ZEND_MM_ALIGNED_HEADER_SIZE+END_MAGIC_SIZE)):0) + +#define ZEND_MM_MAX_SMALL_SIZE ((ZEND_MM_NUM_BUCKETS<>ZEND_MM_ALIGNMENT_LOG2)-(ZEND_MM_ALIGNED_MIN_HEADER_SIZE>>ZEND_MM_ALIGNMENT_LOG2)) + +#define ZEND_MM_SMALL_SIZE(true_size) (true_size < ZEND_MM_MAX_SMALL_SIZE) + +/* Memory calculations */ +#define ZEND_MM_BLOCK_AT(blk, offset) ((zend_mm_block *) (((char *) (blk))+(offset))) +#define ZEND_MM_DATA_OF(p) ((void *) (((char *) (p))+ZEND_MM_ALIGNED_HEADER_SIZE)) +#define ZEND_MM_HEADER_OF(blk) ZEND_MM_BLOCK_AT(blk, -(int)ZEND_MM_ALIGNED_HEADER_SIZE) + +/* Debug output */ +#if ZEND_DEBUG + +# ifdef ZTS +# define ZEND_MM_SET_THREAD_ID(block) \ + ((zend_mm_block*)(block))->thread_id = tsrm_thread_id() +# define ZEND_MM_BAD_THREAD_ID(block) ((block)->thread_id != tsrm_thread_id()) +# else +# define ZEND_MM_SET_THREAD_ID(block) +# define ZEND_MM_BAD_THREAD_ID(block) 0 +# endif + +# define ZEND_MM_VALID_PTR(block) \ + zend_mm_check_ptr(heap, block, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC) + +# define ZEND_MM_SET_MAGIC(block, val) do { \ + (block)->magic = (val); \ + } while (0) + +# define ZEND_MM_CHECK_MAGIC(block, val) do { \ + if ((block)->magic != (val)) { \ + zend_mm_panic("zend_mm_heap corrupted"); \ + } \ + } while (0) + +# define ZEND_MM_SET_DEBUG_INFO(block, __size, set_valid, set_thread) do { \ + ((zend_mm_block*)(block))->debug.filename = __zend_filename; \ + ((zend_mm_block*)(block))->debug.lineno = __zend_lineno; \ + ((zend_mm_block*)(block))->debug.orig_filename = __zend_orig_filename; \ + ((zend_mm_block*)(block))->debug.orig_lineno = __zend_orig_lineno; \ + ZEND_MM_SET_BLOCK_SIZE(block, __size); \ + if (set_valid) { \ + ZEND_MM_SET_MAGIC(block, MEM_BLOCK_VALID); \ + } \ + if (set_thread) { \ + ZEND_MM_SET_THREAD_ID(block); \ + } \ + } while (0) + +#else + +# define ZEND_MM_VALID_PTR(ptr) EXPECTED(ptr != NULL) + +# define ZEND_MM_SET_MAGIC(block, val) + +# define ZEND_MM_CHECK_MAGIC(block, val) + +# define ZEND_MM_SET_DEBUG_INFO(block, __size, set_valid, set_thread) ZEND_MM_SET_BLOCK_SIZE(block, __size) + +#endif + + +#if ZEND_MM_HEAP_PROTECTION + +# define ZEND_MM_CHECK_PROTECTION(block) \ + do { \ + if ((block)->debug.start_magic != _mem_block_start_magic || \ + memcmp(ZEND_MM_END_MAGIC_PTR(block), &_mem_block_end_magic, END_MAGIC_SIZE) != 0) { \ + zend_mm_panic("zend_mm_heap corrupted"); \ + } \ + } while (0) + +# define ZEND_MM_END_MAGIC_PTR(block) \ + (((char*)(ZEND_MM_DATA_OF(block))) + ((zend_mm_block*)(block))->debug.size) + +# define END_MAGIC_SIZE sizeof(unsigned int) + +# define ZEND_MM_SET_BLOCK_SIZE(block, __size) do { \ + char *p; \ + ((zend_mm_block*)(block))->debug.size = (__size); \ + p = ZEND_MM_END_MAGIC_PTR(block); \ + ((zend_mm_block*)(block))->debug.start_magic = _mem_block_start_magic; \ + memcpy(p, &_mem_block_end_magic, END_MAGIC_SIZE); \ + } while (0) + +static unsigned int _mem_block_start_magic = 0; +static unsigned int _mem_block_end_magic = 0; + +#else + +# if ZEND_DEBUG +# define ZEND_MM_SET_BLOCK_SIZE(block, _size) \ + ((zend_mm_block*)(block))->debug.size = (_size) +# else +# define ZEND_MM_SET_BLOCK_SIZE(block, _size) +# endif + +# define ZEND_MM_CHECK_PROTECTION(block) + +# define END_MAGIC_SIZE 0 + +#endif + +#if ZEND_MM_SAFE_UNLINKING +# define ZEND_MM_CHECK_BLOCK_LINKAGE(block) \ + if (UNEXPECTED((block)->info._size != ZEND_MM_BLOCK_AT(block, ZEND_MM_FREE_BLOCK_SIZE(block))->info._prev) || \ + UNEXPECTED(!UNEXPECTED(ZEND_MM_IS_FIRST_BLOCK(block)) && \ + UNEXPECTED(ZEND_MM_PREV_BLOCK(block)->info._size != (block)->info._prev))) { \ + zend_mm_panic("zend_mm_heap corrupted"); \ + } +#define ZEND_MM_CHECK_TREE(block) \ + if (UNEXPECTED(*((block)->parent) != (block))) { \ + zend_mm_panic("zend_mm_heap corrupted"); \ + } +#else +# define ZEND_MM_CHECK_BLOCK_LINKAGE(block) +# define ZEND_MM_CHECK_TREE(block) +#endif + +#define ZEND_MM_LARGE_BUCKET_INDEX(S) zend_mm_high_bit(S) + +static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; +static void _zend_mm_free_int(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); +static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); + +static inline unsigned int zend_mm_high_bit(size_t _size) +{ +#if defined(__GNUC__) && defined(i386) + unsigned int n; + + __asm__("bsrl %1,%0\n\t" : "=r" (n) : "rm" (_size)); + return n; +#elif defined(_MSC_VER) && defined(_M_IX86) + __asm { + bsr eax, _size + } +#else + unsigned int n = 0; + while (_size != 0) { + _size = _size >> 1; + n++; + } + return n-1; +#endif +} + +static inline unsigned int zend_mm_low_bit(size_t _size) +{ +#if defined(__GNUC__) && defined(i386) + unsigned int n; + + __asm__("bsfl %1,%0\n\t" : "=r" (n) : "rm" (_size)); + return n; +#elif defined(_MSC_VER) && defined(_M_IX86) + __asm { + bsf eax, _size + } +#else + static const int offset[16] = {4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0}; + unsigned int n; + unsigned int index = 0; + + do { + n = offset[_size & 15]; + _size >>= 4; + index += n; + } while (n == 4); + return index; +#endif +} + +static inline void zend_mm_add_to_rest_list(zend_mm_heap *heap, zend_mm_free_block *mm_block) +{ + zend_mm_free_block *prev, *next; + + ZEND_MM_SET_MAGIC(mm_block, MEM_BLOCK_FREED); + + if (!ZEND_MM_SMALL_SIZE(ZEND_MM_FREE_BLOCK_SIZE(mm_block))) { + mm_block->parent = NULL; + } + + prev = heap->rest_buckets[0]; + next = prev->next_free_block; + mm_block->prev_free_block = prev; + mm_block->next_free_block = next; + prev->next_free_block = next->prev_free_block = mm_block; +} + +static inline void zend_mm_add_to_free_list(zend_mm_heap *heap, zend_mm_free_block *mm_block) +{ + size_t size; + size_t index; + + ZEND_MM_SET_MAGIC(mm_block, MEM_BLOCK_FREED); + + size = ZEND_MM_FREE_BLOCK_SIZE(mm_block); + if (EXPECTED(!ZEND_MM_SMALL_SIZE(size))) { + zend_mm_free_block **p; + + index = ZEND_MM_LARGE_BUCKET_INDEX(size); + p = &heap->large_free_buckets[index]; + mm_block->child[0] = mm_block->child[1] = NULL; + if (!*p) { + *p = mm_block; + mm_block->parent = p; + mm_block->prev_free_block = mm_block->next_free_block = mm_block; + heap->large_free_bitmap |= (ZEND_MM_LONG_CONST(1) << index); + } else { + size_t m; + + for (m = size << (ZEND_MM_NUM_BUCKETS - index); ; m <<= 1) { + zend_mm_free_block *prev = *p; + + if (ZEND_MM_FREE_BLOCK_SIZE(prev) != size) { + p = &prev->child[(m >> (ZEND_MM_NUM_BUCKETS-1)) & 1]; + if (!*p) { + *p = mm_block; + mm_block->parent = p; + mm_block->prev_free_block = mm_block->next_free_block = mm_block; + break; + } + } else { + zend_mm_free_block *next = prev->next_free_block; + + prev->next_free_block = next->prev_free_block = mm_block; + mm_block->next_free_block = next; + mm_block->prev_free_block = prev; + mm_block->parent = NULL; + break; + } + } + } + } else { + zend_mm_free_block *prev, *next; + + index = ZEND_MM_BUCKET_INDEX(size); + + prev = ZEND_MM_SMALL_FREE_BUCKET(heap, index); + if (prev->prev_free_block == prev) { + heap->free_bitmap |= (ZEND_MM_LONG_CONST(1) << index); + } + next = prev->next_free_block; + + mm_block->prev_free_block = prev; + mm_block->next_free_block = next; + prev->next_free_block = next->prev_free_block = mm_block; + } +} + +static inline void zend_mm_remove_from_free_list(zend_mm_heap *heap, zend_mm_free_block *mm_block) +{ + zend_mm_free_block *prev = mm_block->prev_free_block; + zend_mm_free_block *next = mm_block->next_free_block; + + ZEND_MM_CHECK_MAGIC(mm_block, MEM_BLOCK_FREED); + + if (EXPECTED(prev == mm_block)) { + zend_mm_free_block **rp, **cp; + +#if ZEND_MM_SAFE_UNLINKING + if (UNEXPECTED(next != mm_block)) { + zend_mm_panic("zend_mm_heap corrupted"); + } +#endif + + rp = &mm_block->child[mm_block->child[1] != NULL]; + prev = *rp; + if (EXPECTED(prev == NULL)) { + size_t index = ZEND_MM_LARGE_BUCKET_INDEX(ZEND_MM_FREE_BLOCK_SIZE(mm_block)); + + ZEND_MM_CHECK_TREE(mm_block); + *mm_block->parent = NULL; + if (mm_block->parent == &heap->large_free_buckets[index]) { + heap->large_free_bitmap &= ~(ZEND_MM_LONG_CONST(1) << index); + } + } else { + while (*(cp = &(prev->child[prev->child[1] != NULL])) != NULL) { + prev = *cp; + rp = cp; + } + *rp = NULL; + +subst_block: + ZEND_MM_CHECK_TREE(mm_block); + *mm_block->parent = prev; + prev->parent = mm_block->parent; + if ((prev->child[0] = mm_block->child[0])) { + ZEND_MM_CHECK_TREE(prev->child[0]); + prev->child[0]->parent = &prev->child[0]; + } + if ((prev->child[1] = mm_block->child[1])) { + ZEND_MM_CHECK_TREE(prev->child[1]); + prev->child[1]->parent = &prev->child[1]; + } + } + } else { + +#if ZEND_MM_SAFE_UNLINKING + if (UNEXPECTED(prev->next_free_block != mm_block) || UNEXPECTED(next->prev_free_block != mm_block)) { + zend_mm_panic("zend_mm_heap corrupted"); + } +#endif + + prev->next_free_block = next; + next->prev_free_block = prev; + + if (EXPECTED(ZEND_MM_SMALL_SIZE(ZEND_MM_FREE_BLOCK_SIZE(mm_block)))) { + if (EXPECTED(prev == next)) { + size_t index = ZEND_MM_BUCKET_INDEX(ZEND_MM_FREE_BLOCK_SIZE(mm_block)); + + if (EXPECTED(heap->free_buckets[index*2] == heap->free_buckets[index*2+1])) { + heap->free_bitmap &= ~(ZEND_MM_LONG_CONST(1) << index); + } + } + } else if (UNEXPECTED(mm_block->parent != NULL)) { + goto subst_block; + } + } +} + +static inline void zend_mm_init(zend_mm_heap *heap) +{ + zend_mm_free_block* p; + int i; + + heap->free_bitmap = 0; + heap->large_free_bitmap = 0; +#if ZEND_MM_CACHE + heap->cached = 0; + memset(heap->cache, 0, sizeof(heap->cache)); +#endif +#if ZEND_MM_CACHE_STAT + for (i = 0; i < ZEND_MM_NUM_BUCKETS; i++) { + heap->cache_stat[i].count = 0; + } +#endif + p = ZEND_MM_SMALL_FREE_BUCKET(heap, 0); + for (i = 0; i < ZEND_MM_NUM_BUCKETS; i++) { + p->next_free_block = p; + p->prev_free_block = p; + p = (zend_mm_free_block*)((char*)p + sizeof(zend_mm_free_block*) * 2); + heap->large_free_buckets[i] = NULL; + } + heap->rest_buckets[0] = heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(heap); +} + +static void zend_mm_del_segment(zend_mm_heap *heap, zend_mm_segment *segment) +{ + zend_mm_segment **p = &heap->segments_list; + + while (*p != segment) { + p = &(*p)->next_segment; + } + *p = segment->next_segment; + heap->real_size -= segment->size; + ZEND_MM_STORAGE_FREE(segment); +} + +#if ZEND_MM_CACHE +static void zend_mm_free_cache(zend_mm_heap *heap) +{ + int i; + + for (i = 0; i < ZEND_MM_NUM_BUCKETS; i++) { + if (heap->cache[i]) { + zend_mm_free_block *mm_block = heap->cache[i]; + + while (mm_block) { + size_t size = ZEND_MM_BLOCK_SIZE(mm_block); + zend_mm_free_block *q = mm_block->prev_free_block; + zend_mm_block *next_block = ZEND_MM_NEXT_BLOCK(mm_block); + + heap->cached -= size; + + if (ZEND_MM_PREV_BLOCK_IS_FREE(mm_block)) { + mm_block = (zend_mm_free_block*)ZEND_MM_PREV_BLOCK(mm_block); + size += ZEND_MM_FREE_BLOCK_SIZE(mm_block); + zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) mm_block); + } + if (ZEND_MM_IS_FREE_BLOCK(next_block)) { + size += ZEND_MM_FREE_BLOCK_SIZE(next_block); + zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); + } + ZEND_MM_BLOCK(mm_block, ZEND_MM_FREE_BLOCK, size); + + if (ZEND_MM_IS_FIRST_BLOCK(mm_block) && + ZEND_MM_IS_GUARD_BLOCK(ZEND_MM_NEXT_BLOCK(mm_block))) { + zend_mm_del_segment(heap, (zend_mm_segment *) ((char *)mm_block - ZEND_MM_ALIGNED_SEGMENT_SIZE)); + } else { + zend_mm_add_to_free_list(heap, (zend_mm_free_block *) mm_block); + } + + mm_block = q; + } + heap->cache[i] = NULL; +#if ZEND_MM_CACHE_STAT + heap->cache_stat[i].count = 0; +#endif + } + } +} +#endif + +#if ZEND_MM_HEAP_PROTECTION || ZEND_MM_COOKIES +static void zend_mm_random(unsigned char *buf, size_t size) +{ + size_t i = 0; + unsigned char t; + +#ifdef ZEND_WIN32 + HCRYPTPROV hCryptProv; + + if (CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) { + do { + BOOL ret = CryptGenRandom(hCryptProv, size, buf); + CryptReleaseContext(hCryptProv, 0); + if (ret) { + while (i < size && buf[i] != 0) { + i++; + } + if (i == size) { + return; + } + } + } while (0); + } +#elif defined(HAVE_DEV_URANDOM) + int fd = open("/dev/urandom", 0); + + if (fd >= 0) { + if (read(fd, buf, size) == size) { + while (i < size && buf[i] != 0) { + i++; + } + if (i == size) { + close(fd); + return; + } + } + close(fd); + } +#endif + t = (unsigned char)getpid(); + while (i < size) { + do { + buf[i] = ((unsigned char)rand()) ^ t; + } while (buf[i] == 0); + t = buf[i++] << 1; + } +} +#endif + +/* Notes: + * - This function may alter the block_sizes values to match platform alignment + * - This function does *not* perform sanity checks on the arguments + */ +ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers, size_t block_size, size_t reserve_size, int internal, void *params) +{ + zend_mm_storage *storage; + zend_mm_heap *heap; + +#if 0 + int i; + + printf("ZEND_MM_ALIGNMENT=%d\n", ZEND_MM_ALIGNMENT); + printf("ZEND_MM_ALIGNMENT_LOG2=%d\n", ZEND_MM_ALIGNMENT_LOG2); + printf("ZEND_MM_MIN_SIZE=%d\n", ZEND_MM_MIN_SIZE); + printf("ZEND_MM_MAX_SMALL_SIZE=%d\n", ZEND_MM_MAX_SMALL_SIZE); + printf("ZEND_MM_ALIGNED_HEADER_SIZE=%d\n", ZEND_MM_ALIGNED_HEADER_SIZE); + printf("ZEND_MM_ALIGNED_FREE_HEADER_SIZE=%d\n", ZEND_MM_ALIGNED_FREE_HEADER_SIZE); + printf("ZEND_MM_MIN_ALLOC_BLOCK_SIZE=%d\n", ZEND_MM_MIN_ALLOC_BLOCK_SIZE); + printf("ZEND_MM_ALIGNED_MIN_HEADER_SIZE=%d\n", ZEND_MM_ALIGNED_MIN_HEADER_SIZE); + printf("ZEND_MM_ALIGNED_SEGMENT_SIZE=%d\n", ZEND_MM_ALIGNED_SEGMENT_SIZE); + for (i = 0; i < ZEND_MM_MAX_SMALL_SIZE; i++) { + printf("%3d%c: %3ld %d %2ld\n", i, (i == ZEND_MM_MIN_SIZE?'*':' '), (long)ZEND_MM_TRUE_SIZE(i), ZEND_MM_SMALL_SIZE(ZEND_MM_TRUE_SIZE(i)), (long)ZEND_MM_BUCKET_INDEX(ZEND_MM_TRUE_SIZE(i))); + } + exit(0); +#endif + +#if ZEND_MM_HEAP_PROTECTION + if (_mem_block_start_magic == 0) { + zend_mm_random((unsigned char*)&_mem_block_start_magic, sizeof(_mem_block_start_magic)); + } + if (_mem_block_end_magic == 0) { + zend_mm_random((unsigned char*)&_mem_block_end_magic, sizeof(_mem_block_end_magic)); + } +#endif +#if ZEND_MM_COOKIES + if (_zend_mm_cookie == 0) { + zend_mm_random((unsigned char*)&_zend_mm_cookie, sizeof(_zend_mm_cookie)); + } +#endif + + if (zend_mm_low_bit(block_size) != zend_mm_high_bit(block_size)) { + fprintf(stderr, "'block_size' must be a power of two\n"); + exit(255); + } + storage = handlers->init(params); + if (!storage) { + fprintf(stderr, "Cannot initialize zend_mm storage [%s]\n", handlers->name); + exit(255); + } + storage->handlers = handlers; + + heap = malloc(sizeof(struct _zend_mm_heap)); + + heap->storage = storage; + heap->block_size = block_size; + heap->compact_size = 0; + heap->segments_list = NULL; + zend_mm_init(heap); +# if ZEND_MM_CACHE_STAT + memset(heap->cache_stat, 0, sizeof(heap->cache_stat)); +# endif + + heap->use_zend_alloc = 1; + heap->real_size = 0; + heap->overflow = 0; + heap->real_peak = 0; + heap->limit = ZEND_MM_LONG_CONST(1)<<(ZEND_MM_NUM_BUCKETS-2); + heap->size = 0; + heap->peak = 0; + heap->internal = internal; + heap->reserve = NULL; + heap->reserve_size = reserve_size; + if (reserve_size > 0) { + heap->reserve = _zend_mm_alloc_int(heap, reserve_size ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC); + } + if (internal) { + int i; + zend_mm_free_block *p; + zend_mm_heap *mm_heap = _zend_mm_alloc_int(heap, sizeof(zend_mm_heap) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC); + + *mm_heap = *heap; + + p = ZEND_MM_SMALL_FREE_BUCKET(mm_heap, 0); + for (i = 0; i < ZEND_MM_NUM_BUCKETS; i++) { + p->prev_free_block->next_free_block = p; + p->next_free_block->prev_free_block = p; + p = (zend_mm_free_block*)((char*)p + sizeof(zend_mm_free_block*) * 2); + if (mm_heap->large_free_buckets[i]) { + mm_heap->large_free_buckets[i]->parent = &mm_heap->large_free_buckets[i]; + } + } + mm_heap->rest_buckets[0]->next_free_block = mm_heap->rest_buckets[1]->prev_free_block = ZEND_MM_REST_BUCKET(mm_heap); + + free(heap); + heap = mm_heap; + } + return heap; +} + +ZEND_API zend_mm_heap *zend_mm_startup(void) +{ + int i; + size_t seg_size; + char *mem_type = getenv("ZEND_MM_MEM_TYPE"); + char *tmp; + const zend_mm_mem_handlers *handlers; + zend_mm_heap *heap; + + if (mem_type == NULL) { + i = 0; + } else { + for (i = 0; mem_handlers[i].name; i++) { + if (strcmp(mem_handlers[i].name, mem_type) == 0) { + break; + } + } + if (!mem_handlers[i].name) { + fprintf(stderr, "Wrong or unsupported zend_mm storage type '%s'\n", mem_type); + fprintf(stderr, " supported types:\n"); + for (i = 0; mem_handlers[i].name; i++) { + fprintf(stderr, " '%s'\n", mem_handlers[i].name); + } + exit(255); + } + } + handlers = &mem_handlers[i]; + + tmp = getenv("ZEND_MM_SEG_SIZE"); + if (tmp) { + seg_size = zend_atoi(tmp, 0); + if (zend_mm_low_bit(seg_size) != zend_mm_high_bit(seg_size)) { + fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power ow two.\n"); + exit(255); + } + } else { + seg_size = ZEND_MM_SEG_SIZE; + } + + heap = zend_mm_startup_ex(handlers, seg_size, ZEND_MM_RESERVE_SIZE, 0, NULL); + if (heap) { + tmp = getenv("ZEND_MM_COMPACT"); + if (tmp) { + heap->compact_size = zend_atoi(tmp, 0); + } else { + heap->compact_size = 2 * 1024 * 1024; + } + } + return heap; +} + +#if ZEND_DEBUG +static long zend_mm_find_leaks(zend_mm_segment *segment, zend_mm_block *b) +{ + long leaks = 0; + zend_mm_block *p, *q; + + p = ZEND_MM_NEXT_BLOCK(b); + while (1) { + if (ZEND_MM_IS_GUARD_BLOCK(p)) { + ZEND_MM_CHECK_MAGIC(p, MEM_BLOCK_GUARD); + segment = segment->next_segment; + if (!segment) { + break; + } + p = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); + continue; + } + q = ZEND_MM_NEXT_BLOCK(p); + if (q <= p || + (char*)q > (char*)segment + segment->size || + p->info._size != q->info._prev) { + zend_mm_panic("zend_mm_heap corrupted"); + } + if (!ZEND_MM_IS_FREE_BLOCK(p)) { + if (p->magic == MEM_BLOCK_VALID) { + if (p->debug.filename==b->debug.filename && p->debug.lineno==b->debug.lineno) { + ZEND_MM_SET_MAGIC(p, MEM_BLOCK_LEAK); + leaks++; + } +#if ZEND_MM_CACHE + } else if (p->magic == MEM_BLOCK_CACHED) { + /* skip it */ +#endif + } else if (p->magic != MEM_BLOCK_LEAK) { + zend_mm_panic("zend_mm_heap corrupted"); + } + } + p = q; + } + return leaks; +} + +static void zend_mm_check_leaks(zend_mm_heap *heap) +{ + zend_mm_segment *segment = heap->segments_list; + zend_mm_block *p, *q; + zend_uint total = 0; + + if (!segment) { + return; + } + p = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); + while (1) { + q = ZEND_MM_NEXT_BLOCK(p); + if (q <= p || + (char*)q > (char*)segment + segment->size || + p->info._size != q->info._prev) { + zend_mm_panic("zend_mm_heap corrupted"); + } + if (!ZEND_MM_IS_FREE_BLOCK(p)) { + if (p->magic == MEM_BLOCK_VALID) { + long repeated; + zend_leak_info leak; + + ZEND_MM_SET_MAGIC(p, MEM_BLOCK_LEAK); + + leak.addr = ZEND_MM_DATA_OF(p); + leak.size = p->debug.size; + leak.filename = p->debug.filename; + leak.lineno = p->debug.lineno; + leak.orig_filename = p->debug.orig_filename; + leak.orig_lineno = p->debug.orig_lineno; + + zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL); + zend_message_dispatcher(ZMSG_MEMORY_LEAK_DETECTED, &leak); + repeated = zend_mm_find_leaks(segment, p); + total += 1 + repeated; + if (repeated) { + zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated); + } +#if ZEND_MM_CACHE + } else if (p->magic == MEM_BLOCK_CACHED) { + /* skip it */ +#endif + } else if (p->magic != MEM_BLOCK_LEAK) { + zend_mm_panic("zend_mm_heap corrupted"); + } + } + if (ZEND_MM_IS_GUARD_BLOCK(q)) { + segment = segment->next_segment; + if (!segment) { + break; + } + q = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); + } + p = q; + } + if (total) { + zend_message_dispatcher(ZMSG_MEMORY_LEAKS_GRAND_TOTAL, &total); + } +} + +static int zend_mm_check_ptr(zend_mm_heap *heap, void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + zend_mm_block *p; + int no_cache_notice = 0; + int had_problems = 0; + int valid_beginning = 1; + + if (silent==2) { + silent = 1; + no_cache_notice = 1; + } else if (silent==3) { + silent = 0; + no_cache_notice = 1; + } + if (!silent) { + zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL); + zend_debug_alloc_output("---------------------------------------\n"); + zend_debug_alloc_output("%s(%d) : Block "PTR_FMT" status:\n" ZEND_FILE_LINE_RELAY_CC, ptr); + if (__zend_orig_filename) { + zend_debug_alloc_output("%s(%d) : Actual location (location was relayed)\n" ZEND_FILE_LINE_ORIG_RELAY_CC); + } + if (!ptr) { + zend_debug_alloc_output("NULL\n"); + zend_debug_alloc_output("---------------------------------------\n"); + return 0; + } + } + + if (!ptr) { + if (silent) { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + } + + p = ZEND_MM_HEADER_OF(ptr); + +#ifdef ZTS + if (ZEND_MM_BAD_THREAD_ID(p)) { + if (!silent) { + zend_debug_alloc_output("Invalid pointer: ((thread_id=0x%0.8X) != (expected=0x%0.8X))\n", (long)p->thread_id, (long)tsrm_thread_id()); + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + } +#endif + + if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev) { + if (!silent) { + zend_debug_alloc_output("Invalid pointer: ((size="PTR_FMT") != (next.prev="PTR_FMT"))\n", p->info._size, ZEND_MM_NEXT_BLOCK(p)->info._prev); + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + } + if (p->info._prev != ZEND_MM_GUARD_BLOCK && + ZEND_MM_PREV_BLOCK(p)->info._size != p->info._prev) { + if (!silent) { + zend_debug_alloc_output("Invalid pointer: ((prev="PTR_FMT") != (prev.size="PTR_FMT"))\n", p->info._prev, ZEND_MM_PREV_BLOCK(p)->info._size); + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + } + + if (had_problems) { + zend_debug_alloc_output("---------------------------------------\n"); + return 0; + } + + if (!silent) { + zend_debug_alloc_output("%10s\t","Beginning: "); + } + + if (!ZEND_MM_IS_USED_BLOCK(p)) { + if (!silent) { + if (p->magic != MEM_BLOCK_FREED) { + zend_debug_alloc_output("Freed (magic=0x%0.8X, expected=0x%0.8X)\n", p->magic, MEM_BLOCK_FREED); + } else { + zend_debug_alloc_output("Freed\n"); + } + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + } else if (ZEND_MM_IS_GUARD_BLOCK(p)) { + if (!silent) { + if (p->magic != MEM_BLOCK_FREED) { + zend_debug_alloc_output("Guard (magic=0x%0.8X, expected=0x%0.8X)\n", p->magic, MEM_BLOCK_FREED); + } else { + zend_debug_alloc_output("Guard\n"); + } + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + } else { + switch (p->magic) { + case MEM_BLOCK_VALID: + case MEM_BLOCK_LEAK: + if (!silent) { + zend_debug_alloc_output("OK (allocated on %s:%d, %d bytes)\n", p->debug.filename, p->debug.lineno, (int)p->debug.size); + } + break; /* ok */ + case MEM_BLOCK_CACHED: + if (!no_cache_notice) { + if (!silent) { + zend_debug_alloc_output("Cached\n"); + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + } + case MEM_BLOCK_FREED: + if (!silent) { + zend_debug_alloc_output("Freed (invalid)\n"); + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + break; + case MEM_BLOCK_GUARD: + if (!silent) { + zend_debug_alloc_output("Guard (invalid)\n"); + had_problems = 1; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + break; + default: + if (!silent) { + zend_debug_alloc_output("Unknown (magic=0x%0.8X, expected=0x%0.8X)\n", p->magic, MEM_BLOCK_VALID); + had_problems = 1; + valid_beginning = 0; + } else { + return zend_mm_check_ptr(heap, ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + break; + } + } + +#if ZEND_MM_HEAP_PROTECTION + if (!valid_beginning) { + if (!silent) { + zend_debug_alloc_output("%10s\t", "Start:"); + zend_debug_alloc_output("Unknown\n"); + zend_debug_alloc_output("%10s\t", "End:"); + zend_debug_alloc_output("Unknown\n"); + } + } else { + char *end_magic = ZEND_MM_END_MAGIC_PTR(p); + + if (p->debug.start_magic == _mem_block_start_magic) { + if (!silent) { + zend_debug_alloc_output("%10s\t", "Start:"); + zend_debug_alloc_output("OK\n"); + } + } else { + char *overflow_ptr, *magic_ptr=(char *) &_mem_block_start_magic; + int overflows=0; + int i; + + if (silent) { + return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + had_problems = 1; + overflow_ptr = (char *) &p->debug.start_magic; + i = END_MAGIC_SIZE; + while (--i >= 0) { + if (overflow_ptr[i]!=magic_ptr[i]) { + overflows++; + } + } + zend_debug_alloc_output("%10s\t", "Start:"); + zend_debug_alloc_output("Overflown (magic=0x%0.8X instead of 0x%0.8X)\n", p->debug.start_magic, _mem_block_start_magic); + zend_debug_alloc_output("%10s\t",""); + if (overflows >= END_MAGIC_SIZE) { + zend_debug_alloc_output("At least %d bytes overflown\n", END_MAGIC_SIZE); + } else { + zend_debug_alloc_output("%d byte(s) overflown\n", overflows); + } + } + if (memcmp(end_magic, &_mem_block_end_magic, END_MAGIC_SIZE)==0) { + if (!silent) { + zend_debug_alloc_output("%10s\t", "End:"); + zend_debug_alloc_output("OK\n"); + } + } else { + char *overflow_ptr, *magic_ptr=(char *) &_mem_block_end_magic; + int overflows=0; + int i; + + if (silent) { + return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + had_problems = 1; + overflow_ptr = (char *) end_magic; + + for (i=0; i < END_MAGIC_SIZE; i++) { + if (overflow_ptr[i]!=magic_ptr[i]) { + overflows++; + } + } + + zend_debug_alloc_output("%10s\t", "End:"); + zend_debug_alloc_output("Overflown (magic=0x%0.8X instead of 0x%0.8X)\n", *end_magic, _mem_block_end_magic); + zend_debug_alloc_output("%10s\t",""); + if (overflows >= END_MAGIC_SIZE) { + zend_debug_alloc_output("At least %d bytes overflown\n", END_MAGIC_SIZE); + } else { + zend_debug_alloc_output("%d byte(s) overflown\n", overflows); + } + } + } +#endif + + if (!silent) { + zend_debug_alloc_output("---------------------------------------\n"); + } + return ((!had_problems) ? 1 : 0); +} + +static int zend_mm_check_heap(zend_mm_heap *heap, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + zend_mm_segment *segment = heap->segments_list; + zend_mm_block *p, *q; + int errors = 0; + + if (!segment) { + return 0; + } + p = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); + while (1) { + q = ZEND_MM_NEXT_BLOCK(p); + if (q <= p || + (char*)q > (char*)segment + segment->size || + p->info._size != q->info._prev) { + zend_mm_panic("zend_mm_heap corrupted"); + } + if (!ZEND_MM_IS_FREE_BLOCK(p)) { + if (p->magic == MEM_BLOCK_VALID || p->magic == MEM_BLOCK_LEAK) { + if (!zend_mm_check_ptr(heap, ZEND_MM_DATA_OF(p), (silent?2:3) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) { + errors++; + } +#if ZEND_MM_CACHE + } else if (p->magic == MEM_BLOCK_CACHED) { + /* skip it */ +#endif + } else if (p->magic != MEM_BLOCK_LEAK) { + zend_mm_panic("zend_mm_heap corrupted"); + } + } + if (ZEND_MM_IS_GUARD_BLOCK(q)) { + segment = segment->next_segment; + if (!segment) { + return errors; + } + q = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); + } + p = q; + } +} +#endif + +ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent) +{ + zend_mm_storage *storage; + zend_mm_segment *segment; + zend_mm_segment *prev; + int internal; + + if (heap->reserve) { +#if ZEND_DEBUG + if (!silent) { + _zend_mm_free_int(heap, heap->reserve ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC); + } +#endif + heap->reserve = NULL; + } + +#if ZEND_MM_CACHE_STAT + if (full_shutdown) { + FILE *f; + + f = fopen("zend_mm.log", "w"); + if (f) { + int i,j; + size_t size, true_size, min_size, max_size; + int hit = 0, miss = 0; + + fprintf(f, "\nidx min_size max_size true_size max_len hits misses\n"); + size = 0; + while (1) { + true_size = ZEND_MM_TRUE_SIZE(size); + if (ZEND_MM_SMALL_SIZE(true_size)) { + min_size = size; + i = ZEND_MM_BUCKET_INDEX(true_size); + size++; + while (1) { + true_size = ZEND_MM_TRUE_SIZE(size); + if (ZEND_MM_SMALL_SIZE(true_size)) { + j = ZEND_MM_BUCKET_INDEX(true_size); + if (j > i) { + max_size = size-1; + break; + } + } else { + max_size = size-1; + break; + } + size++; + } + hit += heap->cache_stat[i].hit; + miss += heap->cache_stat[i].miss; + fprintf(f, "%2d %8d %8d %9d %8d %8d %8d\n", i, (int)min_size, (int)max_size, ZEND_MM_TRUE_SIZE(max_size), heap->cache_stat[i].max_count, heap->cache_stat[i].hit, heap->cache_stat[i].miss); + } else { + break; + } + } + fprintf(f, " %8d %8d\n", hit, miss); + fprintf(f, " %8d %8d\n", heap->cache_stat[ZEND_MM_NUM_BUCKETS].hit, heap->cache_stat[ZEND_MM_NUM_BUCKETS].miss); + fclose(f); + } + } +#endif + +#if ZEND_DEBUG + if (!silent) { + zend_mm_check_leaks(heap); + } +#endif + + internal = heap->internal; + storage = heap->storage; + segment = heap->segments_list; + while (segment) { + prev = segment; + segment = segment->next_segment; + ZEND_MM_STORAGE_FREE(prev); + } + if (full_shutdown) { + storage->handlers->dtor(storage); + if (!internal) { + free(heap); + } + } else { +#ifdef HAVE_MEM_WIN32 + /* FIX for bug #41713 */ + /* TODO: add new "compact" handler */ + if (heap->compact_size && + heap->real_peak > heap->compact_size && + storage->handlers->dtor == zend_mm_mem_win32_dtor && + storage->handlers->init == zend_mm_mem_win32_init) { + HeapDestroy((HANDLE)storage->data); + storage->data = (void*)HeapCreate(HEAP_NO_SERIALIZE, 0, 0); + } +#endif + heap->segments_list = NULL; + zend_mm_init(heap); + heap->real_size = 0; + heap->real_peak = 0; + heap->size = 0; + heap->peak = 0; + if (heap->reserve_size) { + heap->reserve = _zend_mm_alloc_int(heap, heap->reserve_size ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC); + } + heap->overflow = 0; + } +} + +static void zend_mm_safe_error(zend_mm_heap *heap, + const char *format, + size_t limit, +#if ZEND_DEBUG + const char *filename, + uint lineno, +#endif + size_t size) +{ + if (heap->reserve) { + _zend_mm_free_int(heap, heap->reserve ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC); + heap->reserve = NULL; + } + if (heap->overflow == 0) { + char *error_filename; + uint error_lineno; + TSRMLS_FETCH(); + if (zend_is_compiling(TSRMLS_C)) { + error_filename = zend_get_compiled_filename(TSRMLS_C); + error_lineno = zend_get_compiled_lineno(TSRMLS_C); + } else if (EG(in_execution)) { + error_filename = EG(active_op_array)?EG(active_op_array)->filename:NULL; + error_lineno = EG(opline_ptr)?(*EG(opline_ptr))->lineno:0; + } else { + error_filename = NULL; + error_lineno = 0; + } + if (!error_filename) { + error_filename = "Unknown"; + } + heap->overflow = 1; + zend_try { + zend_error_noreturn(E_ERROR, + format, + limit, +#if ZEND_DEBUG + filename, + lineno, +#endif + size); + } zend_catch { + if (heap->overflow == 2) { + fprintf(stderr, "\nFatal error: "); + fprintf(stderr, + format, + limit, +#if ZEND_DEBUG + filename, + lineno, +#endif + size); + fprintf(stderr, " in %s on line %d\n", error_filename, error_lineno); + } + } zend_end_try(); + } else { + heap->overflow = 2; + } + zend_bailout(); +} + +static zend_mm_free_block *zend_mm_search_large_block(zend_mm_heap *heap, size_t true_size) +{ + zend_mm_free_block *best_fit; + size_t index = ZEND_MM_LARGE_BUCKET_INDEX(true_size); + size_t bitmap = heap->large_free_bitmap >> index; + zend_mm_free_block *p; + + if (bitmap == 0) { + return NULL; + } + + if (UNEXPECTED((bitmap & 1) != 0)) { + /* Search for best "large" free block */ + zend_mm_free_block *rst = NULL; + size_t m; + size_t best_size = -1; + + best_fit = NULL; + p = heap->large_free_buckets[index]; + for (m = true_size << (ZEND_MM_NUM_BUCKETS - index); ; m <<= 1) { + if (UNEXPECTED(ZEND_MM_FREE_BLOCK_SIZE(p) == true_size)) { + return p->next_free_block; + } else if (ZEND_MM_FREE_BLOCK_SIZE(p) >= true_size && + ZEND_MM_FREE_BLOCK_SIZE(p) < best_size) { + best_size = ZEND_MM_FREE_BLOCK_SIZE(p); + best_fit = p; + } + if ((m & (ZEND_MM_LONG_CONST(1) << (ZEND_MM_NUM_BUCKETS-1))) == 0) { + if (p->child[1]) { + rst = p->child[1]; + } + if (p->child[0]) { + p = p->child[0]; + } else { + break; + } + } else if (p->child[1]) { + p = p->child[1]; + } else { + break; + } + } + + for (p = rst; p; p = p->child[p->child[0] != NULL]) { + if (UNEXPECTED(ZEND_MM_FREE_BLOCK_SIZE(p) == true_size)) { + return p->next_free_block; + } else if (ZEND_MM_FREE_BLOCK_SIZE(p) > true_size && + ZEND_MM_FREE_BLOCK_SIZE(p) < best_size) { + best_size = ZEND_MM_FREE_BLOCK_SIZE(p); + best_fit = p; + } + } + + if (best_fit) { + return best_fit->next_free_block; + } + bitmap = bitmap >> 1; + if (!bitmap) { + return NULL; + } + index++; + } + + /* Search for smallest "large" free block */ + best_fit = p = heap->large_free_buckets[index + zend_mm_low_bit(bitmap)]; + while ((p = p->child[p->child[0] != NULL])) { + if (ZEND_MM_FREE_BLOCK_SIZE(p) < ZEND_MM_FREE_BLOCK_SIZE(best_fit)) { + best_fit = p; + } + } + return best_fit->next_free_block; +} + +static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + zend_mm_free_block *best_fit; + size_t true_size = ZEND_MM_TRUE_SIZE(size); + size_t block_size; + size_t remaining_size; + size_t segment_size; + zend_mm_segment *segment; + + if (EXPECTED(ZEND_MM_SMALL_SIZE(true_size))) { + size_t index = ZEND_MM_BUCKET_INDEX(true_size); + size_t bitmap; + + if (UNEXPECTED(true_size < size)) { + goto out_of_memory; + } +#if ZEND_MM_CACHE + if (EXPECTED(heap->cache[index] != NULL)) { + /* Get block from cache */ +#if ZEND_MM_CACHE_STAT + heap->cache_stat[index].count--; + heap->cache_stat[index].hit++; +#endif + best_fit = heap->cache[index]; + heap->cache[index] = best_fit->prev_free_block; + heap->cached -= true_size; + ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED); + ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0); + return ZEND_MM_DATA_OF(best_fit); + } +#if ZEND_MM_CACHE_STAT + heap->cache_stat[index].miss++; +#endif +#endif + + bitmap = heap->free_bitmap >> index; + if (bitmap) { + /* Found some "small" free block that can be used */ + index += zend_mm_low_bit(bitmap); + best_fit = heap->free_buckets[index*2]; +#if ZEND_MM_CACHE_STAT + heap->cache_stat[ZEND_MM_NUM_BUCKETS].hit++; +#endif + goto zend_mm_finished_searching_for_block; + } + } + +#if ZEND_MM_CACHE_STAT + heap->cache_stat[ZEND_MM_NUM_BUCKETS].miss++; +#endif + + best_fit = zend_mm_search_large_block(heap, true_size); + + if (!best_fit && heap->real_size >= heap->limit - heap->block_size) { + zend_mm_free_block *p = heap->rest_buckets[0]; + size_t best_size = -1; + + while (p != ZEND_MM_REST_BUCKET(heap)) { + if (UNEXPECTED(ZEND_MM_FREE_BLOCK_SIZE(p) == true_size)) { + best_fit = p; + goto zend_mm_finished_searching_for_block; + } else if (ZEND_MM_FREE_BLOCK_SIZE(p) > true_size && + ZEND_MM_FREE_BLOCK_SIZE(p) < best_size) { + best_size = ZEND_MM_FREE_BLOCK_SIZE(p); + best_fit = p; + } + p = p->prev_free_block; + } + } + + if (!best_fit) { + if (true_size > heap->block_size - (ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE)) { + /* Make sure we add a memory block which is big enough, + segment must have header "size" and trailer "guard" block */ + segment_size = true_size + ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE; + segment_size = (segment_size + (heap->block_size-1)) & ~(heap->block_size-1); + } else { + segment_size = heap->block_size; + } + + HANDLE_BLOCK_INTERRUPTIONS(); + + if (segment_size < true_size || + heap->real_size + segment_size > heap->limit) { + /* Memory limit overflow */ +#if ZEND_MM_CACHE + zend_mm_free_cache(heap); +#endif + HANDLE_UNBLOCK_INTERRUPTIONS(); +#if ZEND_DEBUG + zend_mm_safe_error(heap, "Allowed memory size of %ld bytes exhausted at %s:%d (tried to allocate %lu bytes)", heap->limit, __zend_filename, __zend_lineno, size); +#else + zend_mm_safe_error(heap, "Allowed memory size of %ld bytes exhausted (tried to allocate %lu bytes)", heap->limit, size); +#endif + } + + segment = (zend_mm_segment *) ZEND_MM_STORAGE_ALLOC(segment_size); + + if (!segment) { + /* Storage manager cannot allocate memory */ +#if ZEND_MM_CACHE + zend_mm_free_cache(heap); +#endif + HANDLE_UNBLOCK_INTERRUPTIONS(); +out_of_memory: +#if ZEND_DEBUG + zend_mm_safe_error(heap, "Out of memory (allocated %ld) at %s:%d (tried to allocate %lu bytes)", heap->real_size, __zend_filename, __zend_lineno, size); +#else + zend_mm_safe_error(heap, "Out of memory (allocated %ld) (tried to allocate %lu bytes)", heap->real_size, size); +#endif + return NULL; + } + + heap->real_size += segment_size; + if (heap->real_size > heap->real_peak) { + heap->real_peak = heap->real_size; + } + + segment->size = segment_size; + segment->next_segment = heap->segments_list; + heap->segments_list = segment; + + best_fit = (zend_mm_free_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); + ZEND_MM_MARK_FIRST_BLOCK(best_fit); + + block_size = segment_size - ZEND_MM_ALIGNED_SEGMENT_SIZE - ZEND_MM_ALIGNED_HEADER_SIZE; + + ZEND_MM_LAST_BLOCK(ZEND_MM_BLOCK_AT(best_fit, block_size)); + + } else { +zend_mm_finished_searching_for_block: + /* remove from free list */ + HANDLE_BLOCK_INTERRUPTIONS(); + ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_FREED); + ZEND_MM_CHECK_COOKIE(best_fit); + ZEND_MM_CHECK_BLOCK_LINKAGE(best_fit); + zend_mm_remove_from_free_list(heap, best_fit); + + block_size = ZEND_MM_FREE_BLOCK_SIZE(best_fit); + } + + remaining_size = block_size - true_size; + + if (remaining_size < ZEND_MM_ALIGNED_MIN_HEADER_SIZE) { + true_size = block_size; + ZEND_MM_BLOCK(best_fit, ZEND_MM_USED_BLOCK, true_size); + } else { + zend_mm_free_block *new_free_block; + + /* prepare new free block */ + ZEND_MM_BLOCK(best_fit, ZEND_MM_USED_BLOCK, true_size); + new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(best_fit, true_size); + ZEND_MM_BLOCK(new_free_block, ZEND_MM_FREE_BLOCK, remaining_size); + + /* add the new free block to the free list */ + zend_mm_add_to_free_list(heap, new_free_block); + } + + ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 1); + + heap->size += true_size; + if (heap->peak < heap->size) { + heap->peak = heap->size; + } + + HANDLE_UNBLOCK_INTERRUPTIONS(); + + return ZEND_MM_DATA_OF(best_fit); +} + + +static void _zend_mm_free_int(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + zend_mm_block *mm_block; + zend_mm_block *next_block; + size_t size; + + if (!ZEND_MM_VALID_PTR(p)) { + return; + } + + mm_block = ZEND_MM_HEADER_OF(p); + size = ZEND_MM_BLOCK_SIZE(mm_block); + ZEND_MM_CHECK_PROTECTION(mm_block); + +#if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION + memset(ZEND_MM_DATA_OF(mm_block), 0x5a, mm_block->debug.size); +#endif + +#if ZEND_MM_CACHE + if (EXPECTED(ZEND_MM_SMALL_SIZE(size)) && EXPECTED(heap->cached < ZEND_MM_CACHE_SIZE)) { + size_t index = ZEND_MM_BUCKET_INDEX(size); + zend_mm_free_block **cache = &heap->cache[index]; + + ((zend_mm_free_block*)mm_block)->prev_free_block = *cache; + *cache = (zend_mm_free_block*)mm_block; + heap->cached += size; + ZEND_MM_SET_MAGIC(mm_block, MEM_BLOCK_CACHED); +#if ZEND_MM_CACHE_STAT + if (++heap->cache_stat[index].count > heap->cache_stat[index].max_count) { + heap->cache_stat[index].max_count = heap->cache_stat[index].count; + } +#endif + return; + } +#endif + + HANDLE_BLOCK_INTERRUPTIONS(); + + heap->size -= size; + + next_block = ZEND_MM_BLOCK_AT(mm_block, size); + if (ZEND_MM_IS_FREE_BLOCK(next_block)) { + zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); + size += ZEND_MM_FREE_BLOCK_SIZE(next_block); + } + if (ZEND_MM_PREV_BLOCK_IS_FREE(mm_block)) { + mm_block = ZEND_MM_PREV_BLOCK(mm_block); + zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) mm_block); + size += ZEND_MM_FREE_BLOCK_SIZE(mm_block); + } + if (ZEND_MM_IS_FIRST_BLOCK(mm_block) && + ZEND_MM_IS_GUARD_BLOCK(ZEND_MM_BLOCK_AT(mm_block, size))) { + zend_mm_del_segment(heap, (zend_mm_segment *) ((char *)mm_block - ZEND_MM_ALIGNED_SEGMENT_SIZE)); + } else { + ZEND_MM_BLOCK(mm_block, ZEND_MM_FREE_BLOCK, size); + zend_mm_add_to_free_list(heap, (zend_mm_free_block *) mm_block); + } + HANDLE_UNBLOCK_INTERRUPTIONS(); +} + +static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + zend_mm_block *mm_block = ZEND_MM_HEADER_OF(p); + zend_mm_block *next_block; + size_t true_size; + size_t orig_size; + void *ptr; + + if (UNEXPECTED(!p) || !ZEND_MM_VALID_PTR(p)) { + return _zend_mm_alloc_int(heap, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + } + mm_block = ZEND_MM_HEADER_OF(p); + true_size = ZEND_MM_TRUE_SIZE(size); + orig_size = ZEND_MM_BLOCK_SIZE(mm_block); + ZEND_MM_CHECK_PROTECTION(mm_block); + + if (UNEXPECTED(true_size < size)) { + goto out_of_memory; + } + + if (true_size <= orig_size) { + size_t remaining_size = orig_size - true_size; + + if (remaining_size >= ZEND_MM_ALIGNED_MIN_HEADER_SIZE) { + zend_mm_free_block *new_free_block; + + HANDLE_BLOCK_INTERRUPTIONS(); + next_block = ZEND_MM_BLOCK_AT(mm_block, orig_size); + if (ZEND_MM_IS_FREE_BLOCK(next_block)) { + remaining_size += ZEND_MM_FREE_BLOCK_SIZE(next_block); + zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); + } + + /* prepare new free block */ + ZEND_MM_BLOCK(mm_block, ZEND_MM_USED_BLOCK, true_size); + new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(mm_block, true_size); + + ZEND_MM_BLOCK(new_free_block, ZEND_MM_FREE_BLOCK, remaining_size); + + /* add the new free block to the free list */ + zend_mm_add_to_free_list(heap, new_free_block); + heap->size += (true_size - orig_size); + HANDLE_UNBLOCK_INTERRUPTIONS(); + } + ZEND_MM_SET_DEBUG_INFO(mm_block, size, 0, 0); + return p; + } + +#if ZEND_MM_CACHE + if (ZEND_MM_SMALL_SIZE(true_size)) { + size_t index = ZEND_MM_BUCKET_INDEX(true_size); + + if (heap->cache[index] != NULL) { + zend_mm_free_block *best_fit; + zend_mm_free_block **cache; + +#if ZEND_MM_CACHE_STAT + heap->cache_stat[index].count--; + heap->cache_stat[index].hit++; +#endif + best_fit = heap->cache[index]; + heap->cache[index] = best_fit->prev_free_block; + ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED); + ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0); + + ptr = ZEND_MM_DATA_OF(best_fit); + +#if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION + memcpy(ptr, p, mm_block->debug.size); +#else + memcpy(ptr, p, orig_size - ZEND_MM_ALIGNED_HEADER_SIZE); +#endif + + heap->cached -= true_size - orig_size; + + index = ZEND_MM_BUCKET_INDEX(orig_size); + cache = &heap->cache[index]; + + ((zend_mm_free_block*)mm_block)->prev_free_block = *cache; + *cache = (zend_mm_free_block*)mm_block; + ZEND_MM_SET_MAGIC(mm_block, MEM_BLOCK_CACHED); +#if ZEND_MM_CACHE_STAT + if (++heap->cache_stat[index].count > heap->cache_stat[index].max_count) { + heap->cache_stat[index].max_count = heap->cache_stat[index].count; + } +#endif + + return ptr; + } + } +#endif + + next_block = ZEND_MM_BLOCK_AT(mm_block, orig_size); + + if (ZEND_MM_IS_FREE_BLOCK(next_block)) { + ZEND_MM_CHECK_COOKIE(next_block); + ZEND_MM_CHECK_BLOCK_LINKAGE(next_block); + if (orig_size + ZEND_MM_FREE_BLOCK_SIZE(next_block) >= true_size) { + size_t block_size = orig_size + ZEND_MM_FREE_BLOCK_SIZE(next_block); + size_t remaining_size = block_size - true_size; + + HANDLE_BLOCK_INTERRUPTIONS(); + zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); + + if (remaining_size < ZEND_MM_ALIGNED_MIN_HEADER_SIZE) { + true_size = block_size; + ZEND_MM_BLOCK(mm_block, ZEND_MM_USED_BLOCK, true_size); + } else { + zend_mm_free_block *new_free_block; + + /* prepare new free block */ + ZEND_MM_BLOCK(mm_block, ZEND_MM_USED_BLOCK, true_size); + new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(mm_block, true_size); + ZEND_MM_BLOCK(new_free_block, ZEND_MM_FREE_BLOCK, remaining_size); + + /* add the new free block to the free list */ + if (ZEND_MM_IS_FIRST_BLOCK(mm_block) && + ZEND_MM_IS_GUARD_BLOCK(ZEND_MM_BLOCK_AT(new_free_block, remaining_size))) { + zend_mm_add_to_rest_list(heap, new_free_block); + } else { + zend_mm_add_to_free_list(heap, new_free_block); + } + } + ZEND_MM_SET_DEBUG_INFO(mm_block, size, 0, 0); + heap->size = heap->size + true_size - orig_size; + if (heap->peak < heap->size) { + heap->peak = heap->size; + } + HANDLE_UNBLOCK_INTERRUPTIONS(); + return p; + } else if (ZEND_MM_IS_FIRST_BLOCK(mm_block) && + ZEND_MM_IS_GUARD_BLOCK(ZEND_MM_BLOCK_AT(next_block, ZEND_MM_FREE_BLOCK_SIZE(next_block)))) { + HANDLE_BLOCK_INTERRUPTIONS(); + zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); + goto realloc_segment; + } + } else if (ZEND_MM_IS_FIRST_BLOCK(mm_block) && ZEND_MM_IS_GUARD_BLOCK(next_block)) { + zend_mm_segment *segment; + zend_mm_segment *segment_copy; + size_t segment_size; + size_t block_size; + size_t remaining_size; + + HANDLE_BLOCK_INTERRUPTIONS(); +realloc_segment: + /* segment size, size of block and size of guard block */ + if (true_size > heap->block_size - (ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE)) { + segment_size = true_size+ZEND_MM_ALIGNED_SEGMENT_SIZE+ZEND_MM_ALIGNED_HEADER_SIZE; + segment_size = (segment_size + (heap->block_size-1)) & ~(heap->block_size-1); + } else { + segment_size = heap->block_size; + } + + segment_copy = (zend_mm_segment *) ((char *)mm_block - ZEND_MM_ALIGNED_SEGMENT_SIZE); + if (segment_size < true_size || + heap->real_size + segment_size - segment_copy->size > heap->limit) { + if (ZEND_MM_IS_FREE_BLOCK(next_block)) { + zend_mm_add_to_free_list(heap, (zend_mm_free_block *) next_block); + } +#if ZEND_MM_CACHE + zend_mm_free_cache(heap); +#endif + HANDLE_UNBLOCK_INTERRUPTIONS(); +#if ZEND_DEBUG + zend_mm_safe_error(heap, "Allowed memory size of %ld bytes exhausted at %s:%d (tried to allocate %ld bytes)", heap->limit, __zend_filename, __zend_lineno, size); +#else + zend_mm_safe_error(heap, "Allowed memory size of %ld bytes exhausted (tried to allocate %ld bytes)", heap->limit, size); +#endif + return NULL; + } + + segment = ZEND_MM_STORAGE_REALLOC(segment_copy, segment_size); + if (!segment) { +#if ZEND_MM_CACHE + zend_mm_free_cache(heap); +#endif + HANDLE_UNBLOCK_INTERRUPTIONS(); +out_of_memory: +#if ZEND_DEBUG + zend_mm_safe_error(heap, "Out of memory (allocated %ld) at %s:%d (tried to allocate %ld bytes)", heap->real_size, __zend_filename, __zend_lineno, size); +#else + zend_mm_safe_error(heap, "Out of memory (allocated %ld) (tried to allocate %ld bytes)", heap->real_size, size); +#endif + return NULL; + } + heap->real_size += segment_size - segment->size; + if (heap->real_size > heap->real_peak) { + heap->real_peak = heap->real_size; + } + + segment->size = segment_size; + + if (segment != segment_copy) { + zend_mm_segment **seg = &heap->segments_list; + while (*seg != segment_copy) { + seg = &(*seg)->next_segment; + } + *seg = segment; + mm_block = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); + ZEND_MM_MARK_FIRST_BLOCK(mm_block); + } + + block_size = segment_size - ZEND_MM_ALIGNED_SEGMENT_SIZE - ZEND_MM_ALIGNED_HEADER_SIZE; + remaining_size = block_size - true_size; + + /* setup guard block */ + ZEND_MM_LAST_BLOCK(ZEND_MM_BLOCK_AT(mm_block, block_size)); + + if (remaining_size < ZEND_MM_ALIGNED_MIN_HEADER_SIZE) { + true_size = block_size; + ZEND_MM_BLOCK(mm_block, ZEND_MM_USED_BLOCK, true_size); + } else { + zend_mm_free_block *new_free_block; + + /* prepare new free block */ + ZEND_MM_BLOCK(mm_block, ZEND_MM_USED_BLOCK, true_size); + new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(mm_block, true_size); + ZEND_MM_BLOCK(new_free_block, ZEND_MM_FREE_BLOCK, remaining_size); + + /* add the new free block to the free list */ + zend_mm_add_to_rest_list(heap, new_free_block); + } + + ZEND_MM_SET_DEBUG_INFO(mm_block, size, 1, 1); + + heap->size = heap->size + true_size - orig_size; + if (heap->peak < heap->size) { + heap->peak = heap->size; + } + + HANDLE_UNBLOCK_INTERRUPTIONS(); + return ZEND_MM_DATA_OF(mm_block); + } + + ptr = _zend_mm_alloc_int(heap, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +#if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION + memcpy(ptr, p, mm_block->debug.size); +#else + memcpy(ptr, p, orig_size - ZEND_MM_ALIGNED_HEADER_SIZE); +#endif + _zend_mm_free_int(heap, p ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + return ptr; +} + +ZEND_API void *_zend_mm_alloc(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + return _zend_mm_alloc_int(heap, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + +ZEND_API void _zend_mm_free(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + _zend_mm_free_int(heap, p ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + +ZEND_API void *_zend_mm_realloc(zend_mm_heap *heap, void *ptr, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + return _zend_mm_realloc_int(heap, ptr, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + +ZEND_API size_t _zend_mm_block_size(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + zend_mm_block *mm_block; + + if (!ZEND_MM_VALID_PTR(p)) { + return 0; + } + mm_block = ZEND_MM_HEADER_OF(p); + ZEND_MM_CHECK_PROTECTION(mm_block); +#if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION + return mm_block->debug.size; +#else + return ZEND_MM_BLOCK_SIZE(mm_block); +#endif +} + +/**********************/ +/* Allocation Manager */ +/**********************/ + +typedef struct _zend_alloc_globals { + zend_mm_heap *mm_heap; +} zend_alloc_globals; + +#ifdef ZTS +static int alloc_globals_id; +# define AG(v) TSRMG(alloc_globals_id, zend_alloc_globals *, v) +#else +# define AG(v) (alloc_globals.v) +static zend_alloc_globals alloc_globals; +#endif + +ZEND_API int is_zend_mm(TSRMLS_D) +{ + return AG(mm_heap)->use_zend_alloc; +} + +ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + TSRMLS_FETCH(); + + if (UNEXPECTED(!AG(mm_heap)->use_zend_alloc)) { + return malloc(size); + } + return _zend_mm_alloc_int(AG(mm_heap), size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + +ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + TSRMLS_FETCH(); + + if (UNEXPECTED(!AG(mm_heap)->use_zend_alloc)) { + free(ptr); + return; + } + _zend_mm_free_int(AG(mm_heap), ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + +ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + TSRMLS_FETCH(); + + if (UNEXPECTED(!AG(mm_heap)->use_zend_alloc)) { + return realloc(ptr, size); + } + return _zend_mm_realloc_int(AG(mm_heap), ptr, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + +ZEND_API size_t _zend_mem_block_size(void *ptr TSRMLS_DC ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + if (UNEXPECTED(!AG(mm_heap)->use_zend_alloc)) { + return 0; + } + return _zend_mm_block_size(AG(mm_heap), ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + +#if defined(__GNUC__) && defined(i386) + +static inline size_t safe_address(size_t nmemb, size_t size, size_t offset) +{ + size_t res = nmemb; + unsigned long overflow ; + + __asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1" + : "=a"(res), "=d" (overflow) + : "%0"(res), + "rm"(size), + "rm"(offset)); + + if (UNEXPECTED(overflow)) { + zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset); + return 0; + } + return res; +} + +#else + +static inline size_t safe_address(size_t nmemb, size_t size, size_t offset) +{ + size_t res = nmemb * size + offset; + double _d = (double)nmemb * (double)size + (double)offset; + double _delta = (double)res - _d; + + if (UNEXPECTED((_d + _delta ) != _d)) { + zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset); + return 0; + } + return res; +} +#endif + + +ZEND_API void *_safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + return emalloc_rel(safe_address(nmemb, size, offset)); +} + +ZEND_API void *_safe_malloc(size_t nmemb, size_t size, size_t offset) +{ + return pemalloc(safe_address(nmemb, size, offset), 1); +} + +ZEND_API void *_safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + return erealloc_rel(ptr, safe_address(nmemb, size, offset)); +} + +ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset) +{ + return perealloc(ptr, safe_address(nmemb, size, offset), 1); +} + + +ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + void *p; + + p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + if (UNEXPECTED(p == NULL)) { + return p; + } + memset(p, 0, size * nmemb); + return p; +} + +ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + int length; + char *p; + + length = strlen(s)+1; + p = (char *) _emalloc(length ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + if (UNEXPECTED(p == NULL)) { + return p; + } + memcpy(p, s, length); + return p; +} + +ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + char *p; + + p = (char *) _emalloc(length+1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + if (UNEXPECTED(p == NULL)) { + return p; + } + memcpy(p, s, length); + p[length] = 0; + return p; +} + + +ZEND_API char *zend_strndup(const char *s, uint length) +{ + char *p; + + p = (char *) malloc(length+1); + if (UNEXPECTED(p == NULL)) { + return p; + } + if (length) { + memcpy(p, s, length); + } + p[length] = 0; + return p; +} + + +ZEND_API int zend_set_memory_limit(size_t memory_limit) +{ + TSRMLS_FETCH(); + + AG(mm_heap)->limit = (memory_limit >= AG(mm_heap)->block_size) ? memory_limit : AG(mm_heap)->block_size; + + return SUCCESS; +} + +ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC) +{ + if (real_usage) { + return AG(mm_heap)->real_size; + } else { + return AG(mm_heap)->size; + } +} + +ZEND_API size_t zend_memory_peak_usage(int real_usage TSRMLS_DC) +{ + if (real_usage) { + return AG(mm_heap)->real_peak; + } else { + return AG(mm_heap)->peak; + } +} + +ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC) +{ + zend_mm_shutdown(AG(mm_heap), full_shutdown, silent); +} + +static void alloc_globals_ctor(zend_alloc_globals *alloc_globals TSRMLS_DC) +{ + char *tmp; + alloc_globals->mm_heap = zend_mm_startup(); + + tmp = getenv("USE_ZEND_ALLOC"); + if (tmp) { + alloc_globals->mm_heap->use_zend_alloc = zend_atoi(tmp, 0); + } +} + +#ifdef ZTS +static void alloc_globals_dtor(zend_alloc_globals *alloc_globals TSRMLS_DC) +{ + shutdown_memory_manager(1, 1 TSRMLS_CC); +} +#endif + +ZEND_API void start_memory_manager(TSRMLS_D) +{ +#ifdef ZTS + ts_allocate_id(&alloc_globals_id, sizeof(zend_alloc_globals), (ts_allocate_ctor) alloc_globals_ctor, (ts_allocate_dtor) alloc_globals_dtor); +#else + alloc_globals_ctor(&alloc_globals); +#endif +} + +ZEND_API zend_mm_heap *zend_mm_set_heap(zend_mm_heap *new_heap TSRMLS_DC) +{ + zend_mm_heap *old_heap; + + old_heap = AG(mm_heap); + AG(mm_heap) = new_heap; + return old_heap; +} + +ZEND_API zend_mm_storage *zend_mm_get_storage(zend_mm_heap *heap) +{ + return heap->storage; +} + +#if ZEND_DEBUG +ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + TSRMLS_FETCH(); + + if (!AG(mm_heap)->use_zend_alloc) { + return 1; + } + return zend_mm_check_ptr(AG(mm_heap), ptr, silent ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); +} + + +ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +{ + int errors; + TSRMLS_FETCH(); + + if (!AG(mm_heap)->use_zend_alloc) { + return; + } + + zend_debug_alloc_output("------------------------------------------------\n"); + zend_debug_alloc_output("Full Memory Check at %s:%d\n" ZEND_FILE_LINE_RELAY_CC); + + errors = zend_mm_check_heap(AG(mm_heap), silent ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + + zend_debug_alloc_output("End of full memory check %s:%d (%d errors)\n" ZEND_FILE_LINE_RELAY_CC, errors); + zend_debug_alloc_output("------------------------------------------------\n"); +} +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + */ diff -Naur php-5.2.5/Zend/zend_alloc.h php-5.2.5-suhosin/Zend/zend_alloc.h --- php-5.2.5/Zend/zend_alloc.h 2007-03-20 07:46:48.000000000 +0100 +++ php-5.2.5-suhosin/Zend/zend_alloc.h 2007-11-12 12:38:56.000000000 +0100 @@ -128,6 +128,9 @@ ZEND_API void start_memory_manager(TSRMLS_D); ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC); +#if SUHOSIN_PATCH +ZEND_API void suhosin_clear_mm_canaries(TSRMLS_D); +#endif ZEND_API int is_zend_mm(TSRMLS_D); #if ZEND_DEBUG diff -Naur php-5.2.5/Zend/zend.c php-5.2.5-suhosin/Zend/zend.c --- php-5.2.5/Zend/zend.c 2007-07-21 02:35:14.000000000 +0200 +++ php-5.2.5-suhosin/Zend/zend.c 2007-11-12 12:38:56.000000000 +0100 @@ -57,7 +57,9 @@ ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap); ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC); - +#if SUHOSIN_PATCH +ZEND_API void (*zend_suhosin_log)(int loglevel, char *fmt, ...); +#endif void (*zend_on_timeout)(int seconds TSRMLS_DC); static void (*zend_message_dispatcher_p)(long message, void *data); @@ -74,9 +76,88 @@ return SUCCESS; } +#if SUHOSIN_PATCH +static ZEND_INI_MH(OnUpdateSuhosin_log_syslog) +{ + if (!new_value) { + SPG(log_syslog) = S_ALL & ~S_SQL | S_MEMORY; + } else { + SPG(log_syslog) = atoi(new_value) | S_MEMORY; + } + return SUCCESS; +} +static ZEND_INI_MH(OnUpdateSuhosin_log_syslog_facility) +{ + if (!new_value) { + SPG(log_syslog_facility) = LOG_USER; + } else { + SPG(log_syslog_facility) = atoi(new_value); + } + return SUCCESS; +} +static ZEND_INI_MH(OnUpdateSuhosin_log_syslog_priority) +{ + if (!new_value) { + SPG(log_syslog_priority) = LOG_ALERT; + } else { + SPG(log_syslog_priority) = atoi(new_value); + } + return SUCCESS; +} +static ZEND_INI_MH(OnUpdateSuhosin_log_sapi) +{ + if (!new_value) { + SPG(log_sapi) = S_ALL & ~S_SQL; + } else { + SPG(log_sapi) = atoi(new_value); + } + return SUCCESS; +} +static ZEND_INI_MH(OnUpdateSuhosin_log_script) +{ + if (!new_value) { + SPG(log_script) = S_ALL & ~S_MEMORY; + } else { + SPG(log_script) = atoi(new_value) & (~S_MEMORY) & (~S_INTERNAL); + } + return SUCCESS; +} +static ZEND_INI_MH(OnUpdateSuhosin_log_scriptname) +{ + if (SPG(log_scriptname)) { + pefree(SPG(log_scriptname),1); + } + SPG(log_scriptname) = NULL; + if (new_value) { + SPG(log_scriptname) = pestrdup(new_value,1); + } + return SUCCESS; +} +static ZEND_INI_MH(OnUpdateSuhosin_log_phpscript) +{ + if (!new_value) { + SPG(log_phpscript) = S_ALL & ~S_MEMORY; + } else { + SPG(log_phpscript) = atoi(new_value) & (~S_MEMORY) & (~S_INTERNAL); + } + return SUCCESS; +} +#endif ZEND_INI_BEGIN() ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting) +#if SUHOSIN_PATCH + ZEND_INI_ENTRY("suhosin.log.syslog", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateSuhosin_log_syslog) + ZEND_INI_ENTRY("suhosin.log.syslog.facility", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateSuhosin_log_syslog_facility) + ZEND_INI_ENTRY("suhosin.log.syslog.priority", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateSuhosin_log_syslog_priority) + ZEND_INI_ENTRY("suhosin.log.sapi", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateSuhosin_log_sapi) + ZEND_INI_ENTRY("suhosin.log.script", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateSuhosin_log_script) + ZEND_INI_ENTRY("suhosin.log.script.name", NULL, ZEND_INI_SYSTEM, OnUpdateSuhosin_log_scriptname) + STD_ZEND_INI_BOOLEAN("suhosin.log.use-x-forwarded-for", "0", ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateBool, log_use_x_forwarded_for, suhosin_patch_globals_struct, suhosin_patch_globals) + ZEND_INI_ENTRY("suhosin.log.phpscript", "0", ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateSuhosin_log_phpscript) + STD_ZEND_INI_ENTRY("suhosin.log.phpscript.name", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateString, log_phpscriptname, suhosin_patch_globals_struct, suhosin_patch_globals) + STD_ZEND_INI_BOOLEAN("suhosin.log.phpscript.is_safe", "0", ZEND_INI_SYSTEM, OnUpdateBool, log_phpscript_is_safe, suhosin_patch_globals_struct, suhosin_patch_globals) +#endif STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode", "0", ZEND_INI_ALL, OnUpdateBool, ze1_compatibility_mode, zend_executor_globals, executor_globals) #ifdef ZEND_MULTIBYTE STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals) diff -Naur php-5.2.5/Zend/zend_canary.c php-5.2.5-suhosin/Zend/zend_canary.c --- php-5.2.5/Zend/zend_canary.c 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/Zend/zend_canary.c 2007-11-12 12:38:56.000000000 +0100 @@ -0,0 +1,64 @@ +/* + +----------------------------------------------------------------------+ + | Suhosin-Patch for PHP | + +----------------------------------------------------------------------+ + | Copyright (c) 2004-2006 Stefan Esser | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Stefan Esser | + +----------------------------------------------------------------------+ + */ +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +#include "zend.h" + +#include +#include + + +#if SUHOSIN_PATCH + +static size_t last_canary = 0x73625123; + +/* will be replaced later with more compatible method */ +ZEND_API size_t zend_canary() +{ + time_t t; + size_t canary; + int fd; + +#ifndef PHP_WIN32 + fd = open("/dev/urandom", 0); + if (fd != -1) { + int r = read(fd, &canary, sizeof(canary)); + close(fd); + if (r == sizeof(canary)) { + return (canary); + } + } +#endif + /* not good but we never want to do this */ + time(&t); + canary = *(unsigned int *)&t + getpid() << 16 + last_canary; + last_canary ^= (canary << 5) | (canary >> (32-5)); + return (canary); +} + +#endif + + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff -Naur php-5.2.5/Zend/zend_compile.c php-5.2.5-suhosin/Zend/zend_compile.c --- php-5.2.5/Zend/zend_compile.c 2007-09-20 16:11:31.000000000 +0200 +++ php-5.2.5-suhosin/Zend/zend_compile.c 2007-11-12 12:38:56.000000000 +0100 @@ -54,7 +54,6 @@ property_info->name = zend_strndup(property_info->name, property_info->name_length); } - static void zend_destroy_property_info(zend_property_info *property_info) { efree(property_info->name); @@ -68,6 +67,10 @@ { free(property_info->name); } +#if SUHOSIN_PATCH +void *suhosin_zend_destroy_property_info_internal = zend_destroy_property_info_internal; +void *suhosin_zend_destroy_property_info = zend_destroy_property_info; +#endif static void build_runtime_defined_function_key(zval *result, char *name, int name_length TSRMLS_DC) { diff -Naur php-5.2.5/Zend/zend_compile.h php-5.2.5-suhosin/Zend/zend_compile.h --- php-5.2.5/Zend/zend_compile.h 2007-05-18 15:12:04.000000000 +0200 +++ php-5.2.5-suhosin/Zend/zend_compile.h 2007-11-12 12:38:56.000000000 +0100 @@ -564,6 +564,11 @@ int zendlex(znode *zendlval TSRMLS_DC); +#if SUHOSIN_PATCH +extern void *suhosin_zend_destroy_property_info_internal; +extern void *suhosin_zend_destroy_property_info; +#endif + /* BEGIN: OPCODES */ #include "zend_vm_opcodes.h" @@ -686,6 +691,7 @@ #define ZEND_RETURNS_FUNCTION 1<<0 + END_EXTERN_C() #define ZEND_CLONE_FUNC_NAME "__clone" diff -Naur php-5.2.5/Zend/zend_constants.c php-5.2.5-suhosin/Zend/zend_constants.c --- php-5.2.5/Zend/zend_constants.c 2007-07-27 18:29:11.000000000 +0200 +++ php-5.2.5-suhosin/Zend/zend_constants.c 2007-11-12 12:38:56.000000000 +0100 @@ -110,6 +110,75 @@ REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS); +#if SUHOSIN_PATCH + REGISTER_MAIN_LONG_CONSTANT("S_MEMORY", S_MEMORY, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_VARS", S_VARS, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_FILES", S_FILES, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_INCLUDE", S_INCLUDE, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_SQL", S_SQL, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_EXECUTOR", S_EXECUTOR, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_MAIL", S_MAIL, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_SESSION", S_SESSION, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_MISC", S_MISC, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_INTERNAL", S_INTERNAL, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("S_ALL", S_ALL, CONST_PERSISTENT | CONST_CS); + + /* error levels */ + REGISTER_MAIN_LONG_CONSTANT("LOG_EMERG", LOG_EMERG, CONST_CS | CONST_PERSISTENT); /* system unusable */ + REGISTER_MAIN_LONG_CONSTANT("LOG_ALERT", LOG_ALERT, CONST_CS | CONST_PERSISTENT); /* immediate action required */ + REGISTER_MAIN_LONG_CONSTANT("LOG_CRIT", LOG_CRIT, CONST_CS | CONST_PERSISTENT); /* critical conditions */ + REGISTER_MAIN_LONG_CONSTANT("LOG_ERR", LOG_ERR, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_WARNING", LOG_WARNING, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_NOTICE", LOG_NOTICE, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_INFO", LOG_INFO, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_DEBUG", LOG_DEBUG, CONST_CS | CONST_PERSISTENT); + /* facility: type of program logging the message */ + REGISTER_MAIN_LONG_CONSTANT("LOG_KERN", LOG_KERN, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_USER", LOG_USER, CONST_CS | CONST_PERSISTENT); /* generic user level */ + REGISTER_MAIN_LONG_CONSTANT("LOG_MAIL", LOG_MAIL, CONST_CS | CONST_PERSISTENT); /* log to email */ + REGISTER_MAIN_LONG_CONSTANT("LOG_DAEMON", LOG_DAEMON, CONST_CS | CONST_PERSISTENT); /* other system daemons */ + REGISTER_MAIN_LONG_CONSTANT("LOG_AUTH", LOG_AUTH, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_SYSLOG", LOG_SYSLOG, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LPR", LOG_LPR, CONST_CS | CONST_PERSISTENT); +#ifdef LOG_NEWS + /* No LOG_NEWS on HP-UX */ + REGISTER_MAIN_LONG_CONSTANT("LOG_NEWS", LOG_NEWS, CONST_CS | CONST_PERSISTENT); /* usenet new */ +#endif +#ifdef LOG_UUCP + /* No LOG_UUCP on HP-UX */ + REGISTER_MAIN_LONG_CONSTANT("LOG_UUCP", LOG_UUCP, CONST_CS | CONST_PERSISTENT); +#endif +#ifdef LOG_CRON + /* apparently some systems don't have this one */ + REGISTER_MAIN_LONG_CONSTANT("LOG_CRON", LOG_CRON, CONST_CS | CONST_PERSISTENT); +#endif +#ifdef LOG_AUTHPRIV + /* AIX doesn't have LOG_AUTHPRIV */ + REGISTER_MAIN_LONG_CONSTANT("LOG_AUTHPRIV", LOG_AUTHPRIV, CONST_CS | CONST_PERSISTENT); +#endif +#if !defined(PHP_WIN32) && !defined(NETWARE) + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL0", LOG_LOCAL0, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL1", LOG_LOCAL1, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL2", LOG_LOCAL2, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL3", LOG_LOCAL3, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL4", LOG_LOCAL4, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL5", LOG_LOCAL5, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL6", LOG_LOCAL6, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_LOCAL7", LOG_LOCAL7, CONST_CS | CONST_PERSISTENT); +#endif + /* options */ + REGISTER_MAIN_LONG_CONSTANT("LOG_PID", LOG_PID, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_CONS", LOG_CONS, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_ODELAY", LOG_ODELAY, CONST_CS | CONST_PERSISTENT); + REGISTER_MAIN_LONG_CONSTANT("LOG_NDELAY", LOG_NDELAY, CONST_CS | CONST_PERSISTENT); +#ifdef LOG_NOWAIT + REGISTER_MAIN_LONG_CONSTANT("LOG_NOWAIT", LOG_NOWAIT, CONST_CS | CONST_PERSISTENT); +#endif +#ifdef LOG_PERROR + /* AIX doesn't have LOG_PERROR */ + REGISTER_MAIN_LONG_CONSTANT("LOG_PERROR", LOG_PERROR, CONST_CS | CONST_PERSISTENT); /*log to stderr*/ +#endif +#endif /* true/false constants */ { diff -Naur php-5.2.5/Zend/Zend.dsp php-5.2.5-suhosin/Zend/Zend.dsp --- php-5.2.5/Zend/Zend.dsp 2006-12-05 09:07:57.000000000 +0100 +++ php-5.2.5-suhosin/Zend/Zend.dsp 2007-11-12 12:38:56.000000000 +0100 @@ -239,6 +239,10 @@ # End Source File # Begin Source File +SOURCE=.\zend_canary.c +# End Source File +# Begin Source File + SOURCE=.\zend_ts_hash.c # End Source File # Begin Source File diff -Naur php-5.2.5/Zend/zend_errors.h php-5.2.5-suhosin/Zend/zend_errors.h --- php-5.2.5/Zend/zend_errors.h 2007-01-01 10:35:46.000000000 +0100 +++ php-5.2.5-suhosin/Zend/zend_errors.h 2007-11-12 12:38:56.000000000 +0100 @@ -39,6 +39,20 @@ #define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR) #define E_CORE (E_CORE_ERROR | E_CORE_WARNING) +#if SUHOSIN_PATCH +#define S_MEMORY (1<<0L) +#define S_MISC (1<<1L) +#define S_VARS (1<<2L) +#define S_FILES (1<<3L) +#define S_INCLUDE (1<<4L) +#define S_SQL (1<<5L) +#define S_EXECUTOR (1<<6L) +#define S_MAIL (1<<7L) +#define S_SESSION (1<<8L) +#define S_INTERNAL (1<<29L) +#define S_ALL (S_MEMORY | S_VARS | S_INCLUDE | S_FILES | S_MAIL | S_SESSION | S_MISC | S_SQL | S_EXECUTOR) +#endif + #endif /* ZEND_ERRORS_H */ /* diff -Naur php-5.2.5/Zend/zend.h php-5.2.5-suhosin/Zend/zend.h --- php-5.2.5/Zend/zend.h 2007-07-23 18:17:10.000000000 +0200 +++ php-5.2.5-suhosin/Zend/zend.h 2007-11-12 12:38:56.000000000 +0100 @@ -520,6 +520,9 @@ extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC); extern int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap); extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC); +#if SUHOSIN_PATCH +extern ZEND_API void (*zend_suhosin_log)(int loglevel, char *fmt, ...); +#endif ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); @@ -651,6 +654,13 @@ #include "zend_operators.h" #include "zend_variables.h" +#if SUHOSIN_PATCH +#include "suhosin_globals.h" +#include "php_syslog.h" + +ZEND_API size_t zend_canary(); +#endif + #endif /* ZEND_H */ /* diff -Naur php-5.2.5/Zend/zend_hash.c php-5.2.5-suhosin/Zend/zend_hash.c --- php-5.2.5/Zend/zend_hash.c 2007-07-24 20:28:39.000000000 +0200 +++ php-5.2.5-suhosin/Zend/zend_hash.c 2007-11-12 12:38:56.000000000 +0100 @@ -20,6 +20,7 @@ /* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ #include "zend.h" +#include "zend_compile.h" #define CONNECT_TO_BUCKET_DLLIST(element, list_head) \ (element)->pNext = (list_head); \ @@ -132,7 +133,189 @@ (p)->pDataPtr=NULL; \ } +#if SUHOSIN_PATCH +#ifdef ZTS +MUTEX_T zend_hash_dprot_mx_reader; +MUTEX_T zend_hash_dprot_mx_writer; +unsigned int zend_hash_dprot_reader; +#endif +unsigned int zend_hash_dprot_counter; +unsigned int zend_hash_dprot_curmax; +dtor_func_t *zend_hash_dprot_table = NULL; + +static void zend_hash_dprot_begin_read() +{ +#ifdef ZTS + tsrm_mutex_lock(zend_hash_dprot_mx_reader); + if ((++(zend_hash_dprot_reader)) == 1) { + tsrm_mutex_lock(zend_hash_dprot_mx_writer); + } + tsrm_mutex_unlock(zend_hash_dprot_mx_reader); +#endif +} + +static void zend_hash_dprot_end_read() +{ +#ifdef ZTS + tsrm_mutex_lock(zend_hash_dprot_mx_reader); + if ((--(zend_hash_dprot_reader)) == 0) { + tsrm_mutex_unlock(zend_hash_dprot_mx_writer); + } + tsrm_mutex_unlock(zend_hash_dprot_mx_reader); +#endif +} + +static void zend_hash_dprot_begin_write() +{ +#ifdef ZTS + tsrm_mutex_lock(zend_hash_dprot_mx_writer); +#endif +} + +static void zend_hash_dprot_end_write() +{ +#ifdef ZTS + tsrm_mutex_unlock(zend_hash_dprot_mx_writer); +#endif +} + +/*ZEND_API void zend_hash_dprot_dtor() +{ +#ifdef ZTS + tsrm_mutex_free(zend_hash_dprot_mx_reader); + tsrm_mutex_free(zend_hash_dprot_mx_writer); +#endif + free(zend_hash_dprot_table); +}*/ + +static void zend_hash_add_destructor(dtor_func_t pDestructor) +{ + int left, right, mid; + zend_bool found = 0; + unsigned long value; + + if (pDestructor == NULL || pDestructor == ZVAL_PTR_DTOR || pDestructor == ZVAL_INTERNAL_PTR_DTOR + || pDestructor == ZEND_FUNCTION_DTOR || pDestructor == ZEND_CLASS_DTOR) { + return; + } + + if (zend_hash_dprot_table == NULL) { +#ifdef ZTS + zend_hash_dprot_mx_reader = tsrm_mutex_alloc(); + zend_hash_dprot_mx_writer = tsrm_mutex_alloc(); + zend_hash_dprot_reader = 0; +#endif + zend_hash_dprot_counter = 0; + zend_hash_dprot_curmax = 256; + zend_hash_dprot_table = (dtor_func_t *) malloc(256 * sizeof(dtor_func_t)); + } + + zend_hash_dprot_begin_write(); + + if (zend_hash_dprot_counter == 0) { + zend_hash_dprot_counter++; + zend_hash_dprot_table[0] = pDestructor; + } else { + value = (unsigned long) pDestructor; + left = 0; + right = zend_hash_dprot_counter-1; + mid = 0; + + while (left < right) { + mid = (right - left) >> 1; + mid += left; + if ((unsigned long)zend_hash_dprot_table[mid] == value) { + found = 1; + break; + } + if (value < (unsigned long)zend_hash_dprot_table[mid]) { + right = mid-1; + } else { + left = mid+1; + } + } + if ((unsigned long)zend_hash_dprot_table[left] == value) { + found = 1; + } + + if (!found) { + + if (zend_hash_dprot_counter >= zend_hash_dprot_curmax) { + zend_hash_dprot_curmax += 256; + zend_hash_dprot_table = (dtor_func_t *) realloc(zend_hash_dprot_table, zend_hash_dprot_curmax * sizeof(dtor_func_t)); + } + + if ((unsigned long)zend_hash_dprot_table[left] < value) { + memmove(zend_hash_dprot_table+left+2, zend_hash_dprot_table+left+1, (zend_hash_dprot_counter-left-1)*sizeof(dtor_func_t)); + zend_hash_dprot_table[left+1] = pDestructor; + } else { + memmove(zend_hash_dprot_table+left+1, zend_hash_dprot_table+left, (zend_hash_dprot_counter-left)*sizeof(dtor_func_t)); + zend_hash_dprot_table[left] = pDestructor; + } + + zend_hash_dprot_counter++; + } + } + + zend_hash_dprot_end_write(); +} + +static void zend_hash_check_destructor(dtor_func_t pDestructor) +{ + unsigned long value; + + if (pDestructor == NULL || pDestructor == ZVAL_PTR_DTOR || pDestructor == ZVAL_INTERNAL_PTR_DTOR +#ifdef ZEND_ENGINE_2 + || pDestructor == suhosin_zend_destroy_property_info_internal || pDestructor == suhosin_zend_destroy_property_info +#endif + || pDestructor == ZEND_FUNCTION_DTOR || pDestructor == ZEND_CLASS_DTOR) { + return; + } + + zend_hash_dprot_begin_read(); + + if (zend_hash_dprot_counter > 0) { + int left, right, mid; + zend_bool found = 0; + + value = (unsigned long) pDestructor; + left = 0; + right = zend_hash_dprot_counter-1; + + while (left < right) { + mid = (right - left) >> 1; + mid += left; + if ((unsigned long)zend_hash_dprot_table[mid] == value) { + found = 1; + break; + } + if (value < (unsigned long)zend_hash_dprot_table[mid]) { + right = mid-1; + } else { + left = mid+1; + } + } + if ((unsigned long)zend_hash_dprot_table[left] == value) { + found = 1; + } + + if (!found) { + zend_hash_dprot_end_read(); + + zend_suhosin_log(S_MEMORY, "possible memory corruption detected - unknown Hashtable destructor"); + exit(1); + return; + } + + } + + zend_hash_dprot_end_read(); +} +#else +#define zend_hash_add_destructor(pDestructor) do {} while(0) +#define zend_hash_check_destructor(pDestructor) do {} while(0) +#endif ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC) { @@ -153,6 +336,7 @@ ht->nTableMask = ht->nTableSize - 1; ht->pDestructor = pDestructor; + zend_hash_add_destructor(pDestructor); ht->arBuckets = NULL; ht->pListHead = NULL; ht->pListTail = NULL; @@ -230,6 +414,8 @@ return FAILURE; } #endif + + zend_hash_check_destructor(ht->pDestructor); if (ht->pDestructor) { ht->pDestructor(p->pData); } @@ -295,6 +481,7 @@ return FAILURE; } #endif + zend_hash_check_destructor(ht->pDestructor); if (ht->pDestructor) { ht->pDestructor(p->pData); } @@ -370,6 +557,7 @@ return FAILURE; } #endif + zend_hash_check_destructor(ht->pDestructor); if (ht->pDestructor) { ht->pDestructor(p->pData); } @@ -493,6 +681,7 @@ if (ht->pInternalPointer == p) { ht->pInternalPointer = p->pListNext; } + zend_hash_check_destructor(ht->pDestructor); if (ht->pDestructor) { ht->pDestructor(p->pData); } @@ -518,6 +707,8 @@ SET_INCONSISTENT(HT_IS_DESTROYING); + zend_hash_check_destructor(ht->pDestructor); + p = ht->pListHead; while (p != NULL) { q = p; @@ -544,6 +735,8 @@ SET_INCONSISTENT(HT_CLEANING); + zend_hash_check_destructor(ht->pDestructor); + p = ht->pListHead; while (p != NULL) { q = p; @@ -607,6 +800,7 @@ ht->nNumOfElements--; HANDLE_UNBLOCK_INTERRUPTIONS(); + zend_hash_check_destructor(ht->pDestructor); if (ht->pDestructor) { ht->pDestructor(p->pData); } diff -Naur php-5.2.5/Zend/zend_hash.c.orig php-5.2.5-suhosin/Zend/zend_hash.c.orig --- php-5.2.5/Zend/zend_hash.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ php-5.2.5-suhosin/Zend/zend_hash.c.orig 2007-07-24 20:28:39.000000000 +0200 @@ -0,0 +1,1482 @@ +/* + +----------------------------------------------------------------------+ + | Zend Engine | + +----------------------------------------------------------------------+ + | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.00 of the Zend license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.zend.com/license/2_00.txt. | + | If you did not receive a copy of the Zend license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@zend.com so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Andi Gutmans | + | Zeev Suraski | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php5-5.2.5-suhosin-0.9.6.2.patch,v 1.1 2007-11-12 11:42:30 niro Exp $ */ + +#include "zend.h" + +#define CONNECT_TO_BUCKET_DLLIST(element, list_head) \ + (element)->pNext = (list_head); \ + (element)->pLast = NULL; \ + if ((element)->pNext) { \ + (element)->pNext->pLast = (element); \ + } + +#define CONNECT_TO_GLOBAL_DLLIST(element, ht) \ + (element)->pListLast = (ht)->pListTail; \ + (ht)->pListTail = (element); \ + (element)->pListNext = NULL; \ + if ((element)->pListLast != NULL) { \ + (element)->pListLast->pListNext = (element); \ + } \ + if (!(ht)->pListHead) { \ + (ht)->pListHead = (element); \ + } \ + if ((ht)->pInternalPointer == NULL) { \ + (ht)->pInternalPointer = (element); \ + } + +#if ZEND_DEBUG +#define HT_OK 0 +#define HT_IS_DESTROYING 1 +#define HT_DESTROYED 2 +#define HT_CLEANING 3 + +static void _zend_is_inconsistent(HashTable *ht, char *file, int line) +{ + if (ht->inconsistent==HT_OK) { + return; + } + switch (ht->inconsistent) { + case HT_IS_DESTROYING: + zend_output_debug_string(1, "%s(%d) : ht=%p is being destroyed", file, line, ht); + break; + case HT_DESTROYED: + zend_output_debug_string(1, "%s(%d) : ht=%p is already destroyed", file, line, ht); + break; + case HT_CLEANING: + zend_output_debug_string(1, "%s(%d) : ht=%p is being cleaned", file, line, ht); + break; + } + zend_bailout(); +} +#define IS_CONSISTENT(a) _zend_is_inconsistent(a, __FILE__, __LINE__); +#define SET_INCONSISTENT(n) ht->inconsistent = n; +#else +#define IS_CONSISTENT(a) +#define SET_INCONSISTENT(n) +#endif + +#define HASH_PROTECT_RECURSION(ht) \ + if ((ht)->bApplyProtection) { \ + if ((ht)->nApplyCount++ >= 3) { \ + zend_error(E_ERROR, "Nesting level too deep - recursive dependency?"); \ + } \ + } + + +#define HASH_UNPROTECT_RECURSION(ht) \ + if ((ht)->bApplyProtection) { \ + (ht)->nApplyCount--; \ + } + + +#define ZEND_HASH_IF_FULL_DO_RESIZE(ht) \ + if ((ht)->nNumOfElements > (ht)->nTableSize) { \ + zend_hash_do_resize(ht); \ + } + +static int zend_hash_do_resize(HashTable *ht); + +ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength) +{ + return zend_inline_hash_func(arKey, nKeyLength); +} + + +#define UPDATE_DATA(ht, p, pData, nDataSize) \ + if (nDataSize == sizeof(void*)) { \ + if ((p)->pData != &(p)->pDataPtr) { \ + pefree_rel((p)->pData, (ht)->persistent); \ + } \ + memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \ + (p)->pData = &(p)->pDataPtr; \ + } else { \ + if ((p)->pData == &(p)->pDataPtr) { \ + (p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent); \ + (p)->pDataPtr=NULL; \ + } else { \ + (p)->pData = (void *) perealloc_rel((p)->pData, nDataSize, (ht)->persistent); \ + /* (p)->pDataPtr is already NULL so no need to initialize it */ \ + } \ + memcpy((p)->pData, pData, nDataSize); \ + } + +#define INIT_DATA(ht, p, pData, nDataSize); \ + if (nDataSize == sizeof(void*)) { \ + memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \ + (p)->pData = &(p)->pDataPtr; \ + } else { \ + (p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent);\ + if (!(p)->pData) { \ + pefree_rel(p, (ht)->persistent); \ + return FAILURE; \ + } \ + memcpy((p)->pData, pData, nDataSize); \ + (p)->pDataPtr=NULL; \ + } + + + +ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC) +{ + uint i = 3; + Bucket **tmp; + + SET_INCONSISTENT(HT_OK); + + if (nSize >= 0x80000000) { + /* prevent overflow */ + ht->nTableSize = 0x80000000; + } else { + while ((1U << i) < nSize) { + i++; + } + ht->nTableSize = 1 << i; + } + + ht->nTableMask = ht->nTableSize - 1; + ht->pDestructor = pDestructor; + ht->arBuckets = NULL; + ht->pListHead = NULL; + ht->pListTail = NULL; + ht->nNumOfElements = 0; + ht->nNextFreeElement = 0; + ht->pInternalPointer = NULL; + ht->persistent = persistent; + ht->nApplyCount = 0; + ht->bApplyProtection = 1; + + /* Uses ecalloc() so that Bucket* == NULL */ + if (persistent) { + tmp = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *)); + if (!tmp) { + return FAILURE; + } + ht->arBuckets = tmp; + } else { + tmp = (Bucket **) ecalloc_rel(ht->nTableSize, sizeof(Bucket *)); + if (tmp) { + ht->arBuckets = tmp; + } + } + + return SUCCESS; +} + + +ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC) +{ + int retval = _zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_CC); + + ht->bApplyProtection = bApplyProtection; + return retval; +} + + +ZEND_API void zend_hash_set_apply_protection(HashTable *ht, zend_bool bApplyProtection) +{ + ht->bApplyProtection = bApplyProtection; +} + + + +ZEND_API int _zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) +{ + ulong h; + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + if (nKeyLength <= 0) { +#if ZEND_DEBUG + ZEND_PUTS("zend_hash_update: Can't put in empty key\n"); +#endif + return FAILURE; + } + + h = zend_inline_hash_func(arKey, nKeyLength); + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == nKeyLength)) { + if (!memcmp(p->arKey, arKey, nKeyLength)) { + if (flag & HASH_ADD) { + return FAILURE; + } + HANDLE_BLOCK_INTERRUPTIONS(); +#if ZEND_DEBUG + if (p->pData == pData) { + ZEND_PUTS("Fatal error in zend_hash_update: p->pData == pData\n"); + HANDLE_UNBLOCK_INTERRUPTIONS(); + return FAILURE; + } +#endif + if (ht->pDestructor) { + ht->pDestructor(p->pData); + } + UPDATE_DATA(ht, p, pData, nDataSize); + if (pDest) { + *pDest = p->pData; + } + HANDLE_UNBLOCK_INTERRUPTIONS(); + return SUCCESS; + } + } + p = p->pNext; + } + + p = (Bucket *) pemalloc(sizeof(Bucket) - 1 + nKeyLength, ht->persistent); + if (!p) { + return FAILURE; + } + memcpy(p->arKey, arKey, nKeyLength); + p->nKeyLength = nKeyLength; + INIT_DATA(ht, p, pData, nDataSize); + p->h = h; + CONNECT_TO_BUCKET_DLLIST(p, ht->arBuckets[nIndex]); + if (pDest) { + *pDest = p->pData; + } + + HANDLE_BLOCK_INTERRUPTIONS(); + CONNECT_TO_GLOBAL_DLLIST(p, ht); + ht->arBuckets[nIndex] = p; + HANDLE_UNBLOCK_INTERRUPTIONS(); + + ht->nNumOfElements++; + ZEND_HASH_IF_FULL_DO_RESIZE(ht); /* If the Hash table is full, resize it */ + return SUCCESS; +} + +ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) +{ + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + if (nKeyLength == 0) { + return zend_hash_index_update(ht, h, pData, nDataSize, pDest); + } + + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == nKeyLength)) { + if (!memcmp(p->arKey, arKey, nKeyLength)) { + if (flag & HASH_ADD) { + return FAILURE; + } + HANDLE_BLOCK_INTERRUPTIONS(); +#if ZEND_DEBUG + if (p->pData == pData) { + ZEND_PUTS("Fatal error in zend_hash_update: p->pData == pData\n"); + HANDLE_UNBLOCK_INTERRUPTIONS(); + return FAILURE; + } +#endif + if (ht->pDestructor) { + ht->pDestructor(p->pData); + } + UPDATE_DATA(ht, p, pData, nDataSize); + if (pDest) { + *pDest = p->pData; + } + HANDLE_UNBLOCK_INTERRUPTIONS(); + return SUCCESS; + } + } + p = p->pNext; + } + + p = (Bucket *) pemalloc(sizeof(Bucket) - 1 + nKeyLength, ht->persistent); + if (!p) { + return FAILURE; + } + + memcpy(p->arKey, arKey, nKeyLength); + p->nKeyLength = nKeyLength; + INIT_DATA(ht, p, pData, nDataSize); + p->h = h; + + CONNECT_TO_BUCKET_DLLIST(p, ht->arBuckets[nIndex]); + + if (pDest) { + *pDest = p->pData; + } + + HANDLE_BLOCK_INTERRUPTIONS(); + ht->arBuckets[nIndex] = p; + CONNECT_TO_GLOBAL_DLLIST(p, ht); + HANDLE_UNBLOCK_INTERRUPTIONS(); + + ht->nNumOfElements++; + ZEND_HASH_IF_FULL_DO_RESIZE(ht); /* If the Hash table is full, resize it */ + return SUCCESS; +} + + +ZEND_API int zend_hash_add_empty_element(HashTable *ht, char *arKey, uint nKeyLength) +{ + void *dummy = (void *) 1; + + return zend_hash_add(ht, arKey, nKeyLength, &dummy, sizeof(void *), NULL); +} + + +ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) +{ + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + if (flag & HASH_NEXT_INSERT) { + h = ht->nNextFreeElement; + } + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->nKeyLength == 0) && (p->h == h)) { + if (flag & HASH_NEXT_INSERT || flag & HASH_ADD) { + return FAILURE; + } + HANDLE_BLOCK_INTERRUPTIONS(); +#if ZEND_DEBUG + if (p->pData == pData) { + ZEND_PUTS("Fatal error in zend_hash_index_update: p->pData == pData\n"); + HANDLE_UNBLOCK_INTERRUPTIONS(); + return FAILURE; + } +#endif + if (ht->pDestructor) { + ht->pDestructor(p->pData); + } + UPDATE_DATA(ht, p, pData, nDataSize); + HANDLE_UNBLOCK_INTERRUPTIONS(); + if ((long)h >= (long)ht->nNextFreeElement) { + ht->nNextFreeElement = h + 1; + } + if (pDest) { + *pDest = p->pData; + } + return SUCCESS; + } + p = p->pNext; + } + p = (Bucket *) pemalloc_rel(sizeof(Bucket) - 1, ht->persistent); + if (!p) { + return FAILURE; + } + p->nKeyLength = 0; /* Numeric indices are marked by making the nKeyLength == 0 */ + p->h = h; + INIT_DATA(ht, p, pData, nDataSize); + if (pDest) { + *pDest = p->pData; + } + + CONNECT_TO_BUCKET_DLLIST(p, ht->arBuckets[nIndex]); + + HANDLE_BLOCK_INTERRUPTIONS(); + ht->arBuckets[nIndex] = p; + CONNECT_TO_GLOBAL_DLLIST(p, ht); + HANDLE_UNBLOCK_INTERRUPTIONS(); + + if ((long)h >= (long)ht->nNextFreeElement) { + ht->nNextFreeElement = h + 1; + } + ht->nNumOfElements++; + ZEND_HASH_IF_FULL_DO_RESIZE(ht); + return SUCCESS; +} + + +static int zend_hash_do_resize(HashTable *ht) +{ + Bucket **t; + + IS_CONSISTENT(ht); + + if ((ht->nTableSize << 1) > 0) { /* Let's double the table size */ + t = (Bucket **) perealloc_recoverable(ht->arBuckets, (ht->nTableSize << 1) * sizeof(Bucket *), ht->persistent); + if (t) { + HANDLE_BLOCK_INTERRUPTIONS(); + ht->arBuckets = t; + ht->nTableSize = (ht->nTableSize << 1); + ht->nTableMask = ht->nTableSize - 1; + zend_hash_rehash(ht); + HANDLE_UNBLOCK_INTERRUPTIONS(); + return SUCCESS; + } + return FAILURE; + } + return SUCCESS; +} + +ZEND_API int zend_hash_rehash(HashTable *ht) +{ + Bucket *p; + uint nIndex; + + IS_CONSISTENT(ht); + + memset(ht->arBuckets, 0, ht->nTableSize * sizeof(Bucket *)); + p = ht->pListHead; + while (p != NULL) { + nIndex = p->h & ht->nTableMask; + CONNECT_TO_BUCKET_DLLIST(p, ht->arBuckets[nIndex]); + ht->arBuckets[nIndex] = p; + p = p->pListNext; + } + return SUCCESS; +} + +ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag) +{ + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + if (flag == HASH_DEL_KEY) { + h = zend_inline_hash_func(arKey, nKeyLength); + } + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) + && (p->nKeyLength == nKeyLength) + && ((p->nKeyLength == 0) /* Numeric index (short circuits the memcmp() check) */ + || !memcmp(p->arKey, arKey, nKeyLength))) { /* String index */ + HANDLE_BLOCK_INTERRUPTIONS(); + if (p == ht->arBuckets[nIndex]) { + ht->arBuckets[nIndex] = p->pNext; + } else { + p->pLast->pNext = p->pNext; + } + if (p->pNext) { + p->pNext->pLast = p->pLast; + } + if (p->pListLast != NULL) { + p->pListLast->pListNext = p->pListNext; + } else { + /* Deleting the head of the list */ + ht->pListHead = p->pListNext; + } + if (p->pListNext != NULL) { + p->pListNext->pListLast = p->pListLast; + } else { + ht->pListTail = p->pListLast; + } + if (ht->pInternalPointer == p) { + ht->pInternalPointer = p->pListNext; + } + if (ht->pDestructor) { + ht->pDestructor(p->pData); + } + if (p->pData != &p->pDataPtr) { + pefree(p->pData, ht->persistent); + } + pefree(p, ht->persistent); + HANDLE_UNBLOCK_INTERRUPTIONS(); + ht->nNumOfElements--; + return SUCCESS; + } + p = p->pNext; + } + return FAILURE; +} + + +ZEND_API void zend_hash_destroy(HashTable *ht) +{ + Bucket *p, *q; + + IS_CONSISTENT(ht); + + SET_INCONSISTENT(HT_IS_DESTROYING); + + p = ht->pListHead; + while (p != NULL) { + q = p; + p = p->pListNext; + if (ht->pDestructor) { + ht->pDestructor(q->pData); + } + if (q->pData != &q->pDataPtr) { + pefree(q->pData, ht->persistent); + } + pefree(q, ht->persistent); + } + pefree(ht->arBuckets, ht->persistent); + + SET_INCONSISTENT(HT_DESTROYED); +} + + +ZEND_API void zend_hash_clean(HashTable *ht) +{ + Bucket *p, *q; + + IS_CONSISTENT(ht); + + SET_INCONSISTENT(HT_CLEANING); + + p = ht->pListHead; + while (p != NULL) { + q = p; + p = p->pListNext; + if (ht->pDestructor) { + ht->pDestructor(q->pData); + } + if (q->pData != &q->pDataPtr) { + pefree(q->pData, ht->persistent); + } + pefree(q, ht->persistent); + } + memset(ht->arBuckets, 0, ht->nTableSize*sizeof(Bucket *)); + ht->pListHead = NULL; + ht->pListTail = NULL; + ht->nNumOfElements = 0; + ht->nNextFreeElement = 0; + ht->pInternalPointer = NULL; + + SET_INCONSISTENT(HT_OK); +} + +/* This function is used by the various apply() functions. + * It deletes the passed bucket, and returns the address of the + * next bucket. The hash *may* be altered during that time, the + * returned value will still be valid. + */ +static Bucket *zend_hash_apply_deleter(HashTable *ht, Bucket *p) +{ + Bucket *retval; + + HANDLE_BLOCK_INTERRUPTIONS(); + if (p->pLast) { + p->pLast->pNext = p->pNext; + } else { + uint nIndex; + + nIndex = p->h & ht->nTableMask; + ht->arBuckets[nIndex] = p->pNext; + } + if (p->pNext) { + p->pNext->pLast = p->pLast; + } else { + /* Nothing to do as this list doesn't have a tail */ + } + + if (p->pListLast != NULL) { + p->pListLast->pListNext = p->pListNext; + } else { + /* Deleting the head of the list */ + ht->pListHead = p->pListNext; + } + if (p->pListNext != NULL) { + p->pListNext->pListLast = p->pListLast; + } else { + ht->pListTail = p->pListLast; + } + if (ht->pInternalPointer == p) { + ht->pInternalPointer = p->pListNext; + } + ht->nNumOfElements--; + HANDLE_UNBLOCK_INTERRUPTIONS(); + + if (ht->pDestructor) { + ht->pDestructor(p->pData); + } + if (p->pData != &p->pDataPtr) { + pefree(p->pData, ht->persistent); + } + retval = p->pListNext; + pefree(p, ht->persistent); + + return retval; +} + + +ZEND_API void zend_hash_graceful_destroy(HashTable *ht) +{ + Bucket *p; + + IS_CONSISTENT(ht); + + p = ht->pListHead; + while (p != NULL) { + p = zend_hash_apply_deleter(ht, p); + } + pefree(ht->arBuckets, ht->persistent); + + SET_INCONSISTENT(HT_DESTROYED); +} + +ZEND_API void zend_hash_graceful_reverse_destroy(HashTable *ht) +{ + Bucket *p; + + IS_CONSISTENT(ht); + + p = ht->pListTail; + while (p != NULL) { + zend_hash_apply_deleter(ht, p); + p = ht->pListTail; + } + + pefree(ht->arBuckets, ht->persistent); + + SET_INCONSISTENT(HT_DESTROYED); +} + +/* This is used to recurse elements and selectively delete certain entries + * from a hashtable. apply_func() receives the data and decides if the entry + * should be deleted or recursion should be stopped. The following three + * return codes are possible: + * ZEND_HASH_APPLY_KEEP - continue + * ZEND_HASH_APPLY_STOP - stop iteration + * ZEND_HASH_APPLY_REMOVE - delete the element, combineable with the former + */ + +ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC) +{ + Bucket *p; + + IS_CONSISTENT(ht); + + HASH_PROTECT_RECURSION(ht); + p = ht->pListHead; + while (p != NULL) { + int result = apply_func(p->pData TSRMLS_CC); + + if (result & ZEND_HASH_APPLY_REMOVE) { + p = zend_hash_apply_deleter(ht, p); + } else { + p = p->pListNext; + } + if (result & ZEND_HASH_APPLY_STOP) { + break; + } + } + HASH_UNPROTECT_RECURSION(ht); +} + + +ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *argument TSRMLS_DC) +{ + Bucket *p; + + IS_CONSISTENT(ht); + + HASH_PROTECT_RECURSION(ht); + p = ht->pListHead; + while (p != NULL) { + int result = apply_func(p->pData, argument TSRMLS_CC); + + if (result & ZEND_HASH_APPLY_REMOVE) { + p = zend_hash_apply_deleter(ht, p); + } else { + p = p->pListNext; + } + if (result & ZEND_HASH_APPLY_STOP) { + break; + } + } + HASH_UNPROTECT_RECURSION(ht); +} + + +ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int num_args, ...) +{ + Bucket *p; + va_list args; + zend_hash_key hash_key; + + IS_CONSISTENT(ht); + + HASH_PROTECT_RECURSION(ht); + + p = ht->pListHead; + while (p != NULL) { + int result; + va_start(args, num_args); + hash_key.arKey = p->arKey; + hash_key.nKeyLength = p->nKeyLength; + hash_key.h = p->h; + result = apply_func(p->pData, num_args, args, &hash_key); + + if (result & ZEND_HASH_APPLY_REMOVE) { + p = zend_hash_apply_deleter(ht, p); + } else { + p = p->pListNext; + } + if (result & ZEND_HASH_APPLY_STOP) { + break; + } + va_end(args); + } + + HASH_UNPROTECT_RECURSION(ht); +} + + +ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC) +{ + Bucket *p, *q; + + IS_CONSISTENT(ht); + + HASH_PROTECT_RECURSION(ht); + p = ht->pListTail; + while (p != NULL) { + int result = apply_func(p->pData TSRMLS_CC); + + q = p; + p = p->pListLast; + if (result & ZEND_HASH_APPLY_REMOVE) { + zend_hash_apply_deleter(ht, q); + } + if (result & ZEND_HASH_APPLY_STOP) { + break; + } + } + HASH_UNPROTECT_RECURSION(ht); +} + + +ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size) +{ + Bucket *p; + void *new_entry; + zend_bool setTargetPointer; + + IS_CONSISTENT(source); + IS_CONSISTENT(target); + + setTargetPointer = !target->pInternalPointer; + p = source->pListHead; + while (p) { + if (setTargetPointer && source->pInternalPointer == p) { + target->pInternalPointer = NULL; + } + if (p->nKeyLength) { + zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &new_entry); + } else { + zend_hash_index_update(target, p->h, p->pData, size, &new_entry); + } + if (pCopyConstructor) { + pCopyConstructor(new_entry); + } + p = p->pListNext; + } + if (!target->pInternalPointer) { + target->pInternalPointer = target->pListHead; + } +} + + +ZEND_API void _zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite ZEND_FILE_LINE_DC) +{ + Bucket *p; + void *t; + int mode = (overwrite?HASH_UPDATE:HASH_ADD); + + IS_CONSISTENT(source); + IS_CONSISTENT(target); + + p = source->pListHead; + while (p) { + if (p->nKeyLength>0) { + if (_zend_hash_quick_add_or_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &t, mode ZEND_FILE_LINE_RELAY_CC)==SUCCESS && pCopyConstructor) { + pCopyConstructor(t); + } + } else { + if ((mode==HASH_UPDATE || !zend_hash_index_exists(target, p->h)) && zend_hash_index_update(target, p->h, p->pData, size, &t)==SUCCESS && pCopyConstructor) { + pCopyConstructor(t); + } + } + p = p->pListNext; + } + target->pInternalPointer = target->pListHead; +} + + +static zend_bool zend_hash_replace_checker_wrapper(HashTable *target, void *source_data, Bucket *p, void *pParam, merge_checker_func_t merge_checker_func) +{ + zend_hash_key hash_key; + + hash_key.arKey = p->arKey; + hash_key.nKeyLength = p->nKeyLength; + hash_key.h = p->h; + return merge_checker_func(target, source_data, &hash_key, pParam); +} + + +ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam) +{ + Bucket *p; + void *t; + + IS_CONSISTENT(source); + IS_CONSISTENT(target); + + p = source->pListHead; + while (p) { + if (zend_hash_replace_checker_wrapper(target, p->pData, p, pParam, pMergeSource)) { + if (zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &t)==SUCCESS && pCopyConstructor) { + pCopyConstructor(t); + } + } + p = p->pListNext; + } + target->pInternalPointer = target->pListHead; +} + + +ZEND_API ulong zend_get_hash_value(char *arKey, uint nKeyLength) +{ + return zend_inline_hash_func(arKey, nKeyLength); +} + + +/* Returns SUCCESS if found and FAILURE if not. The pointer to the + * data is returned in pData. The reason is that there's no reason + * someone using the hash table might not want to have NULL data + */ +ZEND_API int zend_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) +{ + ulong h; + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + h = zend_inline_hash_func(arKey, nKeyLength); + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == nKeyLength)) { + if (!memcmp(p->arKey, arKey, nKeyLength)) { + *pData = p->pData; + return SUCCESS; + } + } + p = p->pNext; + } + return FAILURE; +} + + +ZEND_API int zend_hash_quick_find(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData) +{ + uint nIndex; + Bucket *p; + + if (nKeyLength==0) { + return zend_hash_index_find(ht, h, pData); + } + + IS_CONSISTENT(ht); + + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == nKeyLength)) { + if (!memcmp(p->arKey, arKey, nKeyLength)) { + *pData = p->pData; + return SUCCESS; + } + } + p = p->pNext; + } + return FAILURE; +} + + +ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) +{ + ulong h; + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + h = zend_inline_hash_func(arKey, nKeyLength); + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == nKeyLength)) { + if (!memcmp(p->arKey, arKey, nKeyLength)) { + return 1; + } + } + p = p->pNext; + } + return 0; +} + + +ZEND_API int zend_hash_quick_exists(HashTable *ht, char *arKey, uint nKeyLength, ulong h) +{ + uint nIndex; + Bucket *p; + + if (nKeyLength==0) { + return zend_hash_index_exists(ht, h); + } + + IS_CONSISTENT(ht); + + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == nKeyLength)) { + if (!memcmp(p->arKey, arKey, nKeyLength)) { + return 1; + } + } + p = p->pNext; + } + return 0; + +} + + +ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData) +{ + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == 0)) { + *pData = p->pData; + return SUCCESS; + } + p = p->pNext; + } + return FAILURE; +} + + +ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h) +{ + uint nIndex; + Bucket *p; + + IS_CONSISTENT(ht); + + nIndex = h & ht->nTableMask; + + p = ht->arBuckets[nIndex]; + while (p != NULL) { + if ((p->h == h) && (p->nKeyLength == 0)) { + return 1; + } + p = p->pNext; + } + return 0; +} + + +ZEND_API int zend_hash_num_elements(HashTable *ht) +{ + IS_CONSISTENT(ht); + + return ht->nNumOfElements; +} + + +ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr) +{ + ptr->pos = ht->pInternalPointer; + if (ht->pInternalPointer) { + ptr->h = ht->pInternalPointer->h; + return 1; + } else { + ptr->h = 0; + return 0; + } +} + +ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr) +{ + if (ptr->pos == NULL) { + ht->pInternalPointer = NULL; + } else if (ht->pInternalPointer != ptr->pos) { + Bucket *p; + + IS_CONSISTENT(ht); + p = ht->arBuckets[ptr->h & ht->nTableMask]; + while (p != NULL) { + if (p == ptr->pos) { + ht->pInternalPointer = p; + return 1; + } + p = p->pNext; + } + return 0; + } + return 1; +} + +ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos) +{ + IS_CONSISTENT(ht); + + if (pos) + *pos = ht->pListHead; + else + ht->pInternalPointer = ht->pListHead; +} + + +/* This function will be extremely optimized by remembering + * the end of the list + */ +ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos) +{ + IS_CONSISTENT(ht); + + if (pos) + *pos = ht->pListTail; + else + ht->pInternalPointer = ht->pListTail; +} + + +ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos) +{ + HashPosition *current = pos ? pos : &ht->pInternalPointer; + + IS_CONSISTENT(ht); + + if (*current) { + *current = (*current)->pListNext; + return SUCCESS; + } else + return FAILURE; +} + +ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos) +{ + HashPosition *current = pos ? pos : &ht->pInternalPointer; + + IS_CONSISTENT(ht); + + if (*current) { + *current = (*current)->pListLast; + return SUCCESS; + } else + return FAILURE; +} + + +/* This function should be made binary safe */ +ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos) +{ + Bucket *p; + + p = pos ? (*pos) : ht->pInternalPointer; + + IS_CONSISTENT(ht); + + if (p) { + if (p->nKeyLength) { + if (duplicate) { + *str_index = estrndup(p->arKey, p->nKeyLength - 1); + } else { + *str_index = p->arKey; + } + if (str_length) { + *str_length = p->nKeyLength; + } + return HASH_KEY_IS_STRING; + } else { + *num_index = p->h; + return HASH_KEY_IS_LONG; + } + } + return HASH_KEY_NON_EXISTANT; +} + + +ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos) +{ + Bucket *p; + + p = pos ? (*pos) : ht->pInternalPointer; + + IS_CONSISTENT(ht); + + if (p) { + if (p->nKeyLength) { + return HASH_KEY_IS_STRING; + } else { + return HASH_KEY_IS_LONG; + } + } + return HASH_KEY_NON_EXISTANT; +} + + +ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos) +{ + Bucket *p; + + p = pos ? (*pos) : ht->pInternalPointer; + + IS_CONSISTENT(ht); + + if (p) { + *pData = p->pData; + return SUCCESS; + } else { + return FAILURE; + } +} + +/* This function changes key of currevt element without changing elements' + * order. If element with target key already exists, it will be deleted first. + */ +ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, char *str_index, uint str_length, ulong num_index, HashPosition *pos) +{ + Bucket *p; + + p = pos ? (*pos) : ht->pInternalPointer; + + IS_CONSISTENT(ht); + + if (p) { + if (key_type == HASH_KEY_IS_LONG) { + str_length = 0; + if (!p->nKeyLength && p->h == num_index) { + return SUCCESS; + } + zend_hash_index_del(ht, num_index); + } else if (key_type == HASH_KEY_IS_STRING) { + if (p->nKeyLength == str_length && + memcmp(p->arKey, str_index, str_length) == 0) { + return SUCCESS; + } + zend_hash_del(ht, str_index, str_length); + } else { + return FAILURE; + } + + HANDLE_BLOCK_INTERRUPTIONS(); + + if (p->pNext) { + p->pNext->pLast = p->pLast; + } + if (p->pLast) { + p->pLast->pNext = p->pNext; + } else{ + ht->arBuckets[p->h & ht->nTableMask] = p->pNext; + } + + if (p->nKeyLength != str_length) { + Bucket *q = (Bucket *) pemalloc(sizeof(Bucket) - 1 + str_length, ht->persistent); + + q->nKeyLength = str_length; + if (p->pData == &p->pDataPtr) { + q->pData = &q->pDataPtr; + } else { + q->pData = p->pData; + } + q->pDataPtr = p->pDataPtr; + q->pListNext = p->pListNext; + q->pListLast = p->pListLast; + if (q->pListNext) { + p->pListNext->pListLast = q; + } else { + ht->pListTail = q; + } + if (q->pListLast) { + p->pListLast->pListNext = q; + } else { + ht->pListHead = q; + } + if (ht->pInternalPointer == p) { + ht->pInternalPointer = q; + } + if (pos) { + *pos = q; + } + pefree(p, ht->persistent); + p = q; + } + + if (key_type == HASH_KEY_IS_LONG) { + p->h = num_index; + } else { + memcpy(p->arKey, str_index, str_length); + p->h = zend_inline_hash_func(str_index, str_length); + } + + CONNECT_TO_BUCKET_DLLIST(p, ht->arBuckets[p->h & ht->nTableMask]); + ht->arBuckets[p->h & ht->nTableMask] = p; + HANDLE_UNBLOCK_INTERRUPTIONS(); + + return SUCCESS; + } else { + return FAILURE; + } +} + +ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, + compare_func_t compar, int renumber TSRMLS_DC) +{ + Bucket **arTmp; + Bucket *p; + int i, j; + + IS_CONSISTENT(ht); + + if (!(ht->nNumOfElements>1) && !(renumber && ht->nNumOfElements>0)) { /* Doesn't require sorting */ + return SUCCESS; + } + arTmp = (Bucket **) pemalloc(ht->nNumOfElements * sizeof(Bucket *), ht->persistent); + if (!arTmp) { + return FAILURE; + } + p = ht->pListHead; + i = 0; + while (p) { + arTmp[i] = p; + p = p->pListNext; + i++; + } + + (*sort_func)((void *) arTmp, i, sizeof(Bucket *), compar TSRMLS_CC); + + HANDLE_BLOCK_INTERRUPTIONS(); + ht->pListHead = arTmp[0]; + ht->pListTail = NULL; + ht->pInternalPointer = ht->pListHead; + + arTmp[0]->pListLast = NULL; + if (i > 1) { + arTmp[0]->pListNext = arTmp[1]; + for (j = 1; j < i-1; j++) { + arTmp[j]->pListLast = arTmp[j-1]; + arTmp[j]->pListNext = arTmp[j+1]; + } + arTmp[j]->pListLast = arTmp[j-1]; + arTmp[j]->pListNext = NULL; + } else { + arTmp[0]->pListNext = NULL; + } + ht->pListTail = arTmp[i-1]; + + pefree(arTmp, ht->persistent); + HANDLE_UNBLOCK_INTERRUPTIONS(); + + if (renumber) { + p = ht->pListHead; + i=0; + while (p != NULL) { + p->nKeyLength = 0; + p->h = i++; + p = p->pListNext; + } + ht->nNextFreeElement = i; + zend_hash_rehash(ht); + } + return SUCCESS; +} + + +ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC) +{ + Bucket *p1, *p2 = NULL; + int result; + void *pData2; + + IS_CONSISTENT(ht1); + IS_CONSISTENT(ht2); + + HASH_PROTECT_RECURSION(ht1); + HASH_PROTECT_RECURSION(ht2); + + result = ht1->nNumOfElements - ht2->nNumOfElements; + if (result!=0) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return result; + } + + p1 = ht1->pListHead; + if (ordered) { + p2 = ht2->pListHead; + } + + while (p1) { + if (ordered && !p2) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return 1; /* That's not supposed to happen */ + } + if (ordered) { + if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */ + result = p1->h - p2->h; + if (result!=0) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return result; + } + } else { /* string indices */ + result = p1->nKeyLength - p2->nKeyLength; + if (result!=0) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return result; + } + result = memcmp(p1->arKey, p2->arKey, p1->nKeyLength); + if (result!=0) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return result; + } + } + pData2 = p2->pData; + } else { + if (p1->nKeyLength==0) { /* numeric index */ + if (zend_hash_index_find(ht2, p1->h, &pData2)==FAILURE) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return 1; + } + } else { /* string index */ + if (zend_hash_find(ht2, p1->arKey, p1->nKeyLength, &pData2)==FAILURE) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return 1; + } + } + } + result = compar(p1->pData, pData2 TSRMLS_CC); + if (result!=0) { + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return result; + } + p1 = p1->pListNext; + if (ordered) { + p2 = p2->pListNext; + } + } + + HASH_UNPROTECT_RECURSION(ht1); + HASH_UNPROTECT_RECURSION(ht2); + return 0; +} + + +ZEND_API int zend_hash_minmax(HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC) +{ + Bucket *p, *res; + + IS_CONSISTENT(ht); + + if (ht->nNumOfElements == 0 ) { + *pData=NULL; + return FAILURE; + } + + res = p = ht->pListHead; + while ((p = p->pListNext)) { + if (flag) { + if (compar(&res, &p TSRMLS_CC) < 0) { /* max */ + res = p; + } + } else { + if (compar(&res, &p TSRMLS_CC) > 0) { /* min */ + res = p; + } + } + } + *pData = res->pData; + return SUCCESS; +} + +ZEND_API ulong zend_hash_next_free_element(HashTable *ht) +{ + IS_CONSISTENT(ht); + + return ht->nNextFreeElement; + +} + + +#if ZEND_DEBUG +void zend_hash_display_pListTail(HashTable *ht) +{ + Bucket *p; + + p = ht->pListTail; + while (p != NULL) { + zend_output_debug_string(0, "pListTail has key %s\n", p->arKey); + p = p->pListLast; + } +} + +void zend_hash_display(HashTable *ht) +{ + Bucket *p; + uint i; + + for (i = 0; i < ht->nTableSize; i++) { + p = ht->arBuckets[i]; + while (p != NULL) { + zend_output_debug_string(0, "%s <==> 0x%lX\n", p->arKey, p->h); + p = p->pNext; + } + } + + p = ht->pListTail; + while (p != NULL) { + zend_output_debug_string(0, "%s <==> 0x%lX\n", p->arKey, p->h); + p = p->pListLast; + } +} +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + */ diff -Naur php-5.2.5/Zend/zend_llist.c php-5.2.5-suhosin/Zend/zend_llist.c --- php-5.2.5/Zend/zend_llist.c 2007-02-16 09:33:28.000000000 +0100 +++ php-5.2.5-suhosin/Zend/zend_llist.c 2007-11-12 12:38:56.000000000 +0100 @@ -23,6 +23,184 @@ #include "zend_llist.h" #include "zend_qsort.h" +#if SUHOSIN_PATCH +#ifdef ZTS +MUTEX_T zend_llist_dprot_mx_reader; +MUTEX_T zend_llist_dprot_mx_writer; +unsigned int zend_llist_dprot_reader; +#endif +unsigned int zend_llist_dprot_counter; +unsigned int zend_llist_dprot_curmax; +llist_dtor_func_t *zend_llist_dprot_table = NULL; + +static void zend_llist_dprot_begin_read() +{ +#ifdef ZTS + tsrm_mutex_lock(zend_llist_dprot_mx_reader); + if ((++(zend_llist_dprot_reader)) == 1) { + tsrm_mutex_lock(zend_llist_dprot_mx_writer); + } + tsrm_mutex_unlock(zend_llist_dprot_mx_reader); +#endif +} + +static void zend_llist_dprot_end_read() +{ +#ifdef ZTS + tsrm_mutex_lock(zend_llist_dprot_mx_reader); + if ((--(zend_llist_dprot_reader)) == 0) { + tsrm_mutex_unlock(zend_llist_dprot_mx_writer); + } + tsrm_mutex_unlock(zend_llist_dprot_mx_reader); +#endif +} + +static void zend_llist_dprot_begin_write() +{ +#ifdef ZTS + tsrm_mutex_lock(zend_llist_dprot_mx_writer); +#endif +} + +static void zend_llist_dprot_end_write() +{ +#ifdef ZTS + tsrm_mutex_unlock(zend_llist_dprot_mx_writer); +#endif +} + +/*ZEND_API void zend_llist_dprot_dtor() +{ +#ifdef ZTS + tsrm_mutex_free(zend_llist_dprot_mx_reader); + tsrm_mutex_free(zend_llist_dprot_mx_writer); +#endif + free(zend_llist_dprot_table); +}*/ + +static void zend_llist_add_destructor(llist_dtor_func_t pDestructor) +{ + int left, right, mid; + zend_bool found = 0; + unsigned long value; + + if (pDestructor == NULL || pDestructor == ZVAL_PTR_DTOR) { + return; + } + + if (zend_llist_dprot_table == NULL) { +#ifdef ZTS + zend_llist_dprot_mx_reader = tsrm_mutex_alloc(); + zend_llist_dprot_mx_writer = tsrm_mutex_alloc(); + zend_llist_dprot_reader = 0; +#endif + zend_llist_dprot_counter = 0; + zend_llist_dprot_curmax = 256; + zend_llist_dprot_table = (llist_dtor_func_t *) malloc(256 * sizeof(llist_dtor_func_t)); + } + + zend_llist_dprot_begin_write(); + + if (zend_llist_dprot_counter == 0) { + zend_llist_dprot_counter++; + zend_llist_dprot_table[0] = pDestructor; + } else { + value = (unsigned long) pDestructor; + left = 0; + right = zend_llist_dprot_counter-1; + mid = 0; + + while (left < right) { + mid = (right - left) >> 1; + mid += left; + if ((unsigned long)zend_llist_dprot_table[mid] == value) { + found = 1; + break; + } + if (value < (unsigned long)zend_llist_dprot_table[mid]) { + right = mid-1; + } else { + left = mid+1; + } + } + if ((unsigned long)zend_llist_dprot_table[left] == value) { + found = 1; + } + + if (!found) { + + if (zend_llist_dprot_counter >= zend_llist_dprot_curmax) { + zend_llist_dprot_curmax += 256; + zend_llist_dprot_table = (llist_dtor_func_t *) realloc(zend_llist_dprot_table, zend_llist_dprot_curmax * sizeof(llist_dtor_func_t)); + } + + if ((unsigned long)zend_llist_dprot_table[left] < value) { + memmove(zend_llist_dprot_table+left+2, zend_llist_dprot_table+left+1, (zend_llist_dprot_counter-left-1)*sizeof(llist_dtor_func_t)); + zend_llist_dprot_table[left+1] = pDestructor; + } else { + memmove(zend_llist_dprot_table+left+1, zend_llist_dprot_table+left, (zend_llist_dprot_counter-left)*sizeof(llist_dtor_func_t)); + zend_llist_dprot_table[left] = pDestructor; + } + + zend_llist_dprot_counter++; + } + } + + zend_llist_dprot_end_write(); +} + +static void zend_llist_check_destructor(llist_dtor_func_t pDestructor) +{ + unsigned long value; + + if (pDestructor == NULL || pDestructor == ZVAL_PTR_DTOR) { + return; + } + + zend_llist_dprot_begin_read(); + + if (zend_llist_dprot_counter > 0) { + int left, right, mid; + zend_bool found = 0; + + value = (unsigned long) pDestructor; + left = 0; + right = zend_llist_dprot_counter-1; + + while (left < right) { + mid = (right - left) >> 1; + mid += left; + if ((unsigned long)zend_llist_dprot_table[mid] == value) { + found = 1; + break; + } + if (value < (unsigned long)zend_llist_dprot_table[mid]) { + right = mid-1; + } else { + left = mid+1; + } + } + if ((unsigned long)zend_llist_dprot_table[left] == value) { + found = 1; + } + + if (!found) { + zend_llist_dprot_end_read(); + + zend_suhosin_log(S_MEMORY, "possible memory corruption detected - unknown llist destructor"); + exit(1); + return; + } + + } + + zend_llist_dprot_end_read(); +} +#else +#define zend_llist_add_destructor(pDestructor) do {} while(0) +#define zend_llist_check_destructor(pDestructor) do {} while(0) +#endif + ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent) { l->head = NULL; @@ -30,6 +208,7 @@ l->count = 0; l->size = size; l->dtor = dtor; + zend_llist_add_destructor(dtor); l->persistent = persistent; } @@ -81,6 +260,7 @@ } else {\ (l)->tail = (current)->prev;\ }\ + zend_llist_check_destructor((l)->dtor); \ if ((l)->dtor) {\ (l)->dtor((current)->data);\ }\ @@ -108,6 +288,7 @@ { zend_llist_element *current=l->head, *next; + zend_llist_check_destructor(l->dtor); while (current) { next = current->next; if (l->dtor) { @@ -133,6 +314,7 @@ zend_llist_element *old_tail; void *data; + zend_llist_check_destructor(l->dtor); if ((old_tail = l->tail)) { if (old_tail->prev) { old_tail->prev->next = NULL; diff -Naur php-5.2.5/Zend/ZendTS.dsp php-5.2.5-suhosin/Zend/ZendTS.dsp --- php-5.2.5/Zend/ZendTS.dsp 2006-12-05 09:07:57.000000000 +0100 +++ php-5.2.5-suhosin/Zend/ZendTS.dsp 2007-11-12 12:38:56.000000000 +0100 @@ -273,6 +273,10 @@ # End Source File # Begin Source File +SOURCE=.\zend_canary.c +# End Source File +# Begin Source File + SOURCE=.\zend_ts_hash.c # End Source File # Begin Source File