dnl This file contains local autoconf macros.dnl ----------------------------------------------------------------------------dnl Output stylize macros for configure (help/runtime).dnl ----------------------------------------------------------------------------dnldnl PHP_HELP_SEPARATOR(title)dnldnl Adds separator title into the configure --help display.dnlAC_DEFUN([PHP_HELP_SEPARATOR],[AC_ARG_ENABLE([],[1ドル],[])])dnldnl PHP_CONFIGURE_PART(title)dnldnl Adds separator title configure output (idea borrowed from mm).dnlAC_DEFUN([PHP_CONFIGURE_PART],[AC_MSG_RESULT()AC_MSG_RESULT([${T_MD}1ドル${T_ME}])])dnl ----------------------------------------------------------------------------dnl Build system helper macros.dnl ----------------------------------------------------------------------------dnldnl PHP_DEF_HAVE(what)dnldnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'.dnlAC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit(1,ドルa-z_.-,A-Z___), 1, [ ])])dnldnl PHP_RUN_ONCE(namespace, variable, code)dnldnl Execute code, if variable is not set in namespace.dnlAC_DEFUN([PHP_RUN_ONCE],[changequote({,})unique=`echo 2ドル|$SED 's/[^a-zA-Z0-9]/_/g'`changequote([,])cmd="echo $ac_n \"\$1ドル$unique$ac_c\""if test -n "$unique" && test "`eval $cmd`" = "" ; theneval "1ドル$unique=set"3ドルfi])dnldnl PHP_EXPAND_PATH(path, variable)dnldnl Expands path to an absolute path and assigns it to variable.dnlAC_DEFUN([PHP_EXPAND_PATH],[if test -z "1ドル" || echo "1ドル" | grep '^/' >/dev/null ; then2ドル=1ドルelsechangequote({,})ep_dir=`echo 1ドル|$SED 's%/*[^/][^/]*/*$%%'`changequote([,])ep_realdir=`(cd "$ep_dir" && pwd)`2ドル="$ep_realdir"/`basename "1ドル"`fi])dnldnl PHP_DEFINE(WHAT [, value[, directory]])dnldnl Creates builddir/include/what.h and in there #define WHAT value.dnlAC_DEFUN([PHP_DEFINE],[[echo "#define ]1ドル[]ifelse([2ドル],,[ 1],[ 2ドル])[" > ]ifelse([3ドル],,[include],[3ドル])[/php_]translit(1,ドルA-Z,a-z)[.h]])dnldnl PHP_SUBST(varname)dnldnl Adds variable with it's value into Makefile, e.g.:dnl CC = gccdnlAC_DEFUN([PHP_SUBST],[PHP_VAR_SUBST="$PHP_VAR_SUBST 1ドル"])dnldnl PHP_SUBST_OLD(varname)dnldnl Same as PHP_SUBST() but also substitutes all @VARNAME@ instances in everydnl file passed to AC_OUTPUT.dnlAC_DEFUN([PHP_SUBST_OLD],[PHP_SUBST(1ドル)AC_SUBST(1ドル)])dnldnl PHP_OUTPUT(file)dnldnl Adds "file" to the list of files generated by AC_OUTPUT. This macro can bednl used several times.dnlAC_DEFUN([PHP_OUTPUT],[PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES 1ドル"])dnl ----------------------------------------------------------------------------dnl Build system base macros.dnl ----------------------------------------------------------------------------dnldnl PHP_CANONICAL_HOST_TARGETdnlAC_DEFUN([PHP_CANONICAL_HOST_TARGET],[AC_REQUIRE([AC_CANONICAL_HOST])dnlAC_REQUIRE([AC_CANONICAL_TARGET])dnldnl Make sure we do not continue if host_alias is empty.if test -z "$host_alias" && test -n "$host"; thenhost_alias=$hostfiif test -z "$host_alias"; thenAC_MSG_ERROR([host_alias is not set!])fi])dnldnl PHP_INIT_BUILD_SYSTEMdnldnl Creates build directories and Makefile placeholders.dnlAC_DEFUN([PHP_INIT_BUILD_SYSTEM],[AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnltest -d include || $php_shtool mkdir include> Makefile.objects> Makefile.fragmentsdnl We need to play tricks here to avoid matching the grep line itself.pattern=define$EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null])dnldnl PHP_GEN_GLOBAL_MAKEFILEdnldnl Generates the global makefile.dnlAC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[cat >Makefile <<EOFsrcdir = $abs_srcdirbuilddir = $abs_builddirtop_srcdir = $abs_srcdirtop_builddir = $abs_builddirEOFfor i in $PHP_VAR_SUBST; doeval echo "$i = \$$i" >> Makefiledonecat $abs_srcdir/build/Makefile.global Makefile.fragments Makefile.objects >> Makefile])dnldnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])dnldnl Processes a file called Makefile.frag in the source directory of the mostdnl recently added extension. $(srcdir) and $(builddir) are substituted with thednl proper paths. Can be used to supply custom rules and/or additional targets.dnlAC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[ifelse(1,,ドルsrc=$ext_srcdir/Makefile.frag,src=1ドル)ifelse(2,,ドルac_srcdir=$ext_srcdir,ac_srcdir=2ドル)ifelse(3,,ドルac_builddir=$ext_builddir,ac_builddir=3ドル)test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments])dnldnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])dnldnl Adds sources which are located relative to source-path to the array of typednl type. Sources are processed with optional special-flags which are passed todnl the compiler. Sources can be either written in C or C++ (filenames shall enddnl in .c or .cpp, respectively).dnldnl Note: If source-path begins with a "/", the "/" is removed and the path isdnl interpreted relative to the top build-directory.dnldnl Which array to append to?dnlAC_DEFUN([PHP_ADD_SOURCES],[PHP_ADD_SOURCES_X(1,ドル 2,ドル 3,ドル ifelse(4,ドルsapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))])dnldnl _PHP_ASSIGN_BUILD_VARS(type)dnldnl Internal, don't use.dnlAC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[ifelse(1,ドルshared,[b_c_pre=$shared_c_preb_cxx_pre=$shared_cxx_preb_c_meta=$shared_c_metab_cxx_meta=$shared_cxx_metab_c_post=$shared_c_postb_cxx_post=$shared_cxx_post],[b_c_pre=$php_c_preb_cxx_pre=$php_cxx_preb_c_meta=$php_c_metab_cxx_meta=$php_cxx_metab_c_post=$php_c_postb_cxx_post=$php_cxx_post])dnlb_lo=[$]1ドル_lo])dnldnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])dnldnl Additional to PHP_ADD_SOURCES (see above), this lets you set the name of thednl array target-var directly, as well as whether shared objects will be builtdnl from the sources. Should not be used directly.dnlAC_DEFUN([PHP_ADD_SOURCES_X],[dnl Relative to source- or build-directory?dnl ac_srcdir/ac_bdir include trailing slashcase 1ドル in""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;/*[)] ac_srcdir=`echo "1ドル"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;*[)] ac_srcdir="$abs_srcdir/1ドル/"; ac_bdir="1ドル/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;esacdnl how to build .. shared or static?ifelse(5,ドルyes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))dnl Iterate over the sources.old_IFS=[$]IFSfor ac_src in 2ドル; dodnl Remove the suffix.IFS=.set $ac_srcac_obj=[$]1IFS=$old_IFSdnl Append to the array which has been dynamically chosen at m4 time.4ドル="[$]4ドル [$]ac_bdir[$]ac_obj.lo"dnl Choose the right compiler/flags/etc. for the source-file.case $ac_src in*.c[)] ac_comp="$b_c_pre 3ドル $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo 6ドル$b_c_post" ;;*.s[)] ac_comp="$b_c_pre 3ドル $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo 6ドル$b_c_post" ;;*.S[)] ac_comp="$b_c_pre 3ドル $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo 6ドル$b_c_post" ;;*.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre 3ドル $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo 6ドル$b_cxx_post" ;;esacdnl Create a rule for the object/source combo.cat >>Makefile.objects<<EOF$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src$ac_compEOFdone])dnl ----------------------------------------------------------------------------dnl Compiler characteristics checks.dnl ----------------------------------------------------------------------------dnldnl PHP_RUNPATH_SWITCHdnldnl Checks for -R, etc. switch.dnlAC_DEFUN([PHP_RUNPATH_SWITCH],[AC_MSG_CHECKING([if compiler supports -R])AC_CACHE_VAL(php_cv_cc_dashr,[SAVE_LIBS=$LIBSLIBS="-R /usr/$PHP_LIBDIR $LIBS"AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no])LIBS=$SAVE_LIBS])AC_MSG_RESULT([$php_cv_cc_dashr])if test $php_cv_cc_dashr = "yes"; thenld_runpath_switch=-RelseAC_MSG_CHECKING([if compiler supports -Wl,-rpath,])AC_CACHE_VAL(php_cv_cc_rpath,[SAVE_LIBS=$LIBSLIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no])LIBS=$SAVE_LIBS])AC_MSG_RESULT([$php_cv_cc_rpath])if test $php_cv_cc_rpath = "yes"; thenld_runpath_switch=-Wl,-rpath,elsednl Something innocuous.ld_runpath_switch=-Lfifiif test "$PHP_RPATH" = "no"; thenld_runpath_switch=fi])dnldnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)dnlAC_DEFUN([PHP_CHECK_GCC_ARG],[gcc_arg_name=[ac_cv_gcc_arg]translit(1,ドルA-Z-,a-z_)AC_CACHE_CHECK([whether $CC supports 1ドル], [ac_cv_gcc_arg]translit(1,ドルA-Z-,a-z_), [echo 'void somefunc() { };' > conftest.ccmd='$CC 1ドル -c conftest.c'if eval $cmd 2>&1 | $EGREP -e 1ドル >/dev/null ; thenac_result=noelseac_result=yesfieval $gcc_arg_name=$ac_resultrm -f conftest.*])if eval test "\$$gcc_arg_name" = "yes"; then2ドルelse:3ドルfi])dnldnl PHP_LIBGCC_LIBPATH(gcc)dnldnl Stores the location of libgcc in libgcc_libpath.dnlAC_DEFUN([PHP_LIBGCC_LIBPATH],[changequote({,})libgcc_libpath=`1ドル --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`changequote([,])])dnl ----------------------------------------------------------------------------dnl Macros to modify LIBS, INCLUDES, etc. variables.dnl ----------------------------------------------------------------------------dnldnl PHP_REMOVE_USR_LIB(NAME)dnldnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME.dnlAC_DEFUN([PHP_REMOVE_USR_LIB],[unset ac_new_flagsfor i in [$]1ドル; docase [$]i in-L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;*[)] ac_new_flags="[$]ac_new_flags [$]i" ;;esacdone1ドル=[$]ac_new_flags])dnldnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)dnldnl Use this macro, if you need to add libraries and or library search paths todnl the PHP build system which are only given in compiler notation.dnlAC_DEFUN([PHP_EVAL_LIBLINE],[for ac_i in 1ドル; docase $ac_i in-pthread[)]if test "$ext_shared" = "yes"; then2ドル="[$]2ドル -pthread"elsePHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])PHP_RUN_ONCE(EXTRA_LDFLAGS_PROGRAM, [$ac_i],[EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"])fi;;-l*[)]ac_ii=`echo $ac_i|cut -c 3-`PHP_ADD_LIBRARY($ac_ii,1,2ドル);;-L*[)]ac_ii=`echo $ac_i|cut -c 3-`PHP_ADD_LIBPATH($ac_ii,2ドル);;esacdone])dnldnl PHP_EVAL_INCLINE(headerline)dnldnl Use this macro, if you need to add header search paths to the PHP builddnl system which are only given in compiler notation.dnlAC_DEFUN([PHP_EVAL_INCLINE],[for ac_i in 1ドル; docase $ac_i in-I*[)]ac_ii=`echo $ac_i|cut -c 3-`PHP_ADD_INCLUDE($ac_ii);;esacdone])dnldnl _PHP_ADD_LIBPATH_GLOBAL(variable)dnldnl Internal, don't use.dnlAC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[PHP_RUN_ONCE(LIBPATH, 1,ドル [test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch1ドル"LDFLAGS="$LDFLAGS -L1ドル"PHP_RPATHS="$PHP_RPATHS 1ドル"])])dnldnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])dnldnl Adds a path to linkpath/runpath (LDFLAGS).dnlAC_DEFUN([PHP_ADD_LIBPATH],[if test "1ドル" != "/usr/$PHP_LIBDIR" && test "1ドル" != "/usr/lib"; thenPHP_EXPAND_PATH(1,ドル ai_p)ifelse([2ドル],,[_PHP_ADD_LIBPATH_GLOBAL([$ai_p])],[if test "$ext_shared" = "yes"; then2ドル="-L$ai_p [$]2ドル"test -n "$ld_runpath_switch" && 2ドル="$ld_runpath_switch$ai_p [$]2ドル"else_PHP_ADD_LIBPATH_GLOBAL([$ai_p])fi])fi])dnldnl PHP_UTILIZE_RPATHS()dnldnl Builds RPATHS/LDFLAGS from PHP_RPATHS.dnlAC_DEFUN([PHP_UTILIZE_RPATHS],[OLD_RPATHS=$PHP_RPATHSunset PHP_RPATHSfor i in $OLD_RPATHS; dodnl Can be passed to native cc/libtoolPHP_LDFLAGS="$PHP_LDFLAGS -L$i"dnl Libtool-specificPHP_RPATHS="$PHP_RPATHS -R $i"dnl cc-specificNATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"doneif test "$PHP_RPATH" = "no"; thenunset PHP_RPATHSunset NATIVE_RPATHSfi])dnldnl PHP_ADD_INCLUDE(path [,before])dnldnl Add an include path. If before is 1, add in the beginning of INCLUDES.dnlAC_DEFUN([PHP_ADD_INCLUDE],[if test "1ドル" != "/usr/include"; thenPHP_EXPAND_PATH(1,ドル ai_p)PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [if test "2ドル"; thenINCLUDES="-I$ai_p $INCLUDES"elseINCLUDES="$INCLUDES -I$ai_p"fi])fi])dnldnl _PHP_X_ADD_LIBRARYdnldnl Internal, don't use.dnlAC_DEFUN([_PHP_X_ADD_LIBRARY],[dnlifelse([2ドル],,3ドル="-l1ドル [$]3ドル", 3ドル="[$]3ドル -l1ドル") dnl])dnldnl _PHP_ADD_LIBRARY_SKELETONdnldnl Internal, don't use.dnlAC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[case 1ドル inc|c_r|pthread*[)] ;;*[)] ifelse(3,,ドル[_PHP_X_ADD_LIBRARY(1,ドル2,ドル5ドル)],[if test "$ext_shared" = "yes"; then_PHP_X_ADD_LIBRARY(1,ドル2,ドル3ドル)else4ドル(1,ドル2ドル)fi]) ;;esac])dnldnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])dnldnl Add a library to the link line.dnlAC_DEFUN([PHP_ADD_LIBRARY],[_PHP_ADD_LIBRARY_SKELETON([1ドル],[2ドル],[3ドル],[PHP_ADD_LIBRARY],[LIBS])])dnldnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])dnldnl Add a library to the link line (deferred, not used during configure).dnlAC_DEFUN([PHP_ADD_LIBRARY_DEFER],[_PHP_ADD_LIBRARY_SKELETON([1ドル],[2ドル],[3ドル],[PHP_ADD_LIBRARY_DEFER],[DLIBS])])dnldnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])dnldnl Add a library to the link line and path to linkpath/runpath. Ifdnl shared-libadd is not empty and $ext_shared is yes, shared-libadd will bednl assigned the library information.dnlAC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[ifelse(3,,ドル[if test -n "2ドル"; thenPHP_ADD_LIBPATH(2ドル)fiPHP_ADD_LIBRARY(1ドル)],[if test "$ext_shared" = "yes"; then3ドル="-l1ドル [$]3ドル"if test -n "2ドル"; thenPHP_ADD_LIBPATH(2,ドル3ドル)fielsePHP_ADD_LIBRARY_WITH_PATH(1,ドル2ドル)fi])])dnldnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])dnldnl Add a library to the link line (deferred) and path to linkpath/runpath (notdnl deferred). If shared-libadd is not empty and $ext_shared is yes,dnl shared-libadd will be assigned the library information.dnlAC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[ifelse(3,,ドル[if test -n "2ドル"; thenPHP_ADD_LIBPATH(2ドル)fiPHP_ADD_LIBRARY_DEFER(1ドル)],[if test "$ext_shared" = "yes"; then3ドル="-l1ドル [$]3ドル"if test -n "2ドル"; thenPHP_ADD_LIBPATH(2,ドル3ドル)fielsePHP_ADD_LIBRARY_DEFER_WITH_PATH(1,ドル2ドル)fi])])dnldnl PHP_ADD_FRAMEWORK(framework [,before])dnldnl Add a (Darwin / Mac OS X) framework to the link line. If before is 1, thednl framework is added to the beginning of the line.dnlAC_DEFUN([PHP_ADD_FRAMEWORK], [PHP_RUN_ONCE(FRAMEWORKS, 1,ドル [if test "2ドル"; thenPHP_FRAMEWORKS="-framework 1ドル $PHP_FRAMEWORKS"elsePHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework 1ドル"fi])])dnldnl PHP_ADD_FRAMEWORKPATH(path [,before])dnldnl Add a (Darwin / Mac OS X) framework path to the link and include lines.dnl Default paths include (but are not limited to) /Local/Library/Frameworks anddnl /System/Library/Frameworks, so these don't need to be specifically added. Ifdnl before is 1, the framework path is added to the beginning of the relevantdnl lines.dnlAC_DEFUN([PHP_ADD_FRAMEWORKPATH], [PHP_EXPAND_PATH(1,ドル ai_p)PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [if test "2ドル"; thenPHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"elsePHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"fi])])dnldnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)dnldnl Adds a (Darwin / Mac OS X) framework path and the framework itself to thednl link and include lines.dnlAC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [PHP_ADD_FRAMEWORKPATH(2ドル)PHP_ADD_FRAMEWORK(1ドル)])dnldnl PHP_SET_LIBTOOL_VARIABLE(var)dnldnl Set libtool variable.dnlAC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[if test -z "$LIBTOOL"; thenLIBTOOL='$(SHELL) $(top_builddir)/libtool 1ドル'elseLIBTOOL="$LIBTOOL 1ドル"fi])dnl ----------------------------------------------------------------------------dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLEdnl ----------------------------------------------------------------------------dnldnl PHP_ARG_ANALYZE_EXdnldnl Internal.dnlAC_DEFUN([PHP_ARG_ANALYZE_EX],[ext_output="yes, shared"ext_shared=yescase [$]1ドル inshared,*[)]1ドル=`echo "[$]1ドル"|$SED 's/^shared,//'`;;shared[)]1ドル=yes;;no[)]ext_output=noext_shared=no;;*[)]ext_output=yesext_shared=no;;esacPHP_ALWAYS_SHARED([1ドル])])dnldnl PHP_ARG_ANALYZEdnldnl Internal.dnlAC_DEFUN([PHP_ARG_ANALYZE],[ifelse([3ドル],yes,[PHP_ARG_ANALYZE_EX([1ドル])],[ext_output=ifelse([$]1,,ドルno,[$]1ドル)])ifelse([2ドル],,,[AC_MSG_RESULT([$ext_output])])])dnldnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])dnldnl Sets PHP_ARG_NAME either to the user value or to the default value.dnl default-val defaults to no. This will also set the variable ext_shared, anddnl will overwrite any previous variable of that name. If extension-or-not isdnl yes (default), then do the ENABLE_ALL check and run the PHP_ARG_ANALYZE_EX.dnlAC_DEFUN([PHP_ARG_WITH],[php_with_[]translit(1,ドルA-Z0-9-,a-z0-9_)=ifelse(4,,ドルno,4ドル)PHP_REAL_ARG_WITH([1ドル],[2ドル],[3ドル],[4ドル],PHP_[]translit(1,ドルa-z0-9-,A-Z0-9_),[ifelse(5,,ドルyes,5ドル)])])dnldnl PHP_REAL_ARG_WITHdnldnl Internal.dnlAC_DEFUN([PHP_REAL_ARG_WITH],[ifelse([2ドル],,,[AC_MSG_CHECKING([2ドル])])AC_ARG_WITH(1,ドル[3ドル],5ドル=[$]withval,[5ドル=ifelse(4,,ドルno,4ドル)ifelse(6,ドルyes,[test "$PHP_ENABLE_ALL" && 5ドル=$PHP_ENABLE_ALL])])PHP_ARG_ANALYZE(5,ドル[2ドル],6ドル)])dnldnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])dnldnl Sets PHP_ARG_NAME either to the user value or to the default value.dnl default-val defaults to no. This will also set the variable ext_shared, anddnl will overwrite any previous variable of that name. If extension-or-not isdnl yes (default), then do the ENABLE_ALL check and run the PHP_ARG_ANALYZE_EX.dnlAC_DEFUN([PHP_ARG_ENABLE],[php_enable_[]translit(1,ドルA-Z0-9-,a-z0-9_)=ifelse(4,,ドルno,4ドル)PHP_REAL_ARG_ENABLE([1ドル],[2ドル],[3ドル],[4ドル],PHP_[]translit(1,ドルa-z0-9-,A-Z0-9_),[ifelse(5,,ドルyes,5ドル)])])dnldnl PHP_REAL_ARG_ENABLEdnldnl Internal.dnlAC_DEFUN([PHP_REAL_ARG_ENABLE],[ifelse([2ドル],,,[AC_MSG_CHECKING([2ドル])])AC_ARG_ENABLE(1,ドル[3ドル],5ドル=[$]enableval,[5ドル=ifelse(4,,ドルno,4ドル)ifelse(6,ドルyes,[test "$PHP_ENABLE_ALL" && 5ドル=$PHP_ENABLE_ALL])])PHP_ARG_ANALYZE(5,ドル[2ドル],6ドル)])dnl ----------------------------------------------------------------------------dnl Build macrosdnl ----------------------------------------------------------------------------dnldnl PHP_BUILD_THREAD_SAFEdnlAC_DEFUN([PHP_BUILD_THREAD_SAFE],[enable_zts=yesif test "$pthreads_working" != "yes"; thenAC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])fi])dnldnl PHP_REQUIRE_CXXdnlAC_DEFUN([PHP_REQUIRE_CXX],[if test -z "$php_cxx_done"; thenAC_PROG_CXXAC_PROG_CXXCPPPHP_ADD_LIBRARY(stdc++)php_cxx_done=yesfi])dnldnl PHP_BUILD_SHAREDdnlAC_DEFUN([PHP_BUILD_SHARED],[PHP_BUILD_PROGRAMOVERALL_TARGET=libphp.laphp_sapi_module=sharedphp_c_pre=$shared_c_prephp_c_meta=$shared_c_metaphp_c_post=$shared_c_postphp_cxx_pre=$shared_cxx_prephp_cxx_meta=$shared_cxx_metaphp_cxx_post=$shared_cxx_postphp_lo=$shared_lo])dnldnl PHP_BUILD_STATICdnlAC_DEFUN([PHP_BUILD_STATIC],[PHP_BUILD_PROGRAMOVERALL_TARGET=libphp.laphp_sapi_module=static])dnldnl PHP_BUILD_BUNDLEdnlAC_DEFUN([PHP_BUILD_BUNDLE],[PHP_BUILD_PROGRAMOVERALL_TARGET=libs/libphp.bundlephp_sapi_module=static])dnldnl PHP_BUILD_PROGRAMdnlAC_DEFUN([PHP_BUILD_PROGRAM],[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=locase $with_pic inyes) pic_setting='-prefer-pic';;no) pic_setting='-prefer-non-pic';;esacshared_c_pre='$(LIBTOOL) --mode=compile $(CC)'shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_settingshared_c_post=shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_settingshared_cxx_post=shared_lo=lo])dnldnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)dnldnl Basically sets up the link-stage for building module-name from object_var indnl build-dir.dnlAC_DEFUN([PHP_SHARED_MODULE],[install_modules="install-modules"suffix=lacase $host_alias in*aix*[)]additional_flags="-Wl,-G";;esacif test "x5ドル" = "xyes"; thenPHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/1ドル.$suffix"elsePHP_MODULES="$PHP_MODULES \$(phplibdir)/1ドル.$suffix"fiPHP_SUBST(2ドル)cat >>Makefile.objects<<EOF\$(phplibdir)/1ドル.$suffix: 3ドル/1ドル.$suffix\$(LIBTOOL) --mode=install cp 3ドル/1ドル.$suffix \$(phplibdir)3ドル/1ドル.$suffix: \$(2ドル) \$(translit(1,ドルa-z_-,A-Z__)_SHARED_DEPENDENCIES)\$(LIBTOOL) --mode=link --tag=disable-static ifelse(4,,ドル[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(2ドル) \$(translit(1,ドルa-z_-,A-Z__)_SHARED_LIBADD)EOF])dnldnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])dnldnl Selects the SAPI name and type (static, shared, bundle, program) anddnl optionally also the source-files for the SAPI-specific objects.dnlAC_DEFUN([PHP_SELECT_SAPI],[if test "2ドル" = "program"; thenPHP_BINARIES="$PHP_BINARIES 1ドル"elif test "$PHP_SAPI" != "none"; thenAC_MSG_ERROR([+--------------------------------------------------------------------+| *** ATTENTION *** || || You've configured multiple SAPIs to be build. You can build only || one SAPI module plus CGI, CLI and FPM binaries at the same time. |+--------------------------------------------------------------------+])elsePHP_SAPI=1ドルfiPHP_ADD_BUILD_DIR([sapi/1ドル])PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS 1ドル"ifelse(2,ドルprogram,[PHP_BUILD_PROGRAMinstall_binaries="install-binaries"install_binary_targets="$install_binary_targets install-1ドル"PHP_SUBST(PHP_[]translit(1,ドルa-z0-9-,A-Z0-9_)[]_OBJS)ifelse(3,,,ドル[PHP_ADD_SOURCES_X([sapi/1ドル],[3ドル],[4ドル],PHP_[]translit(1,ドルa-z0-9-,A-Z0-9_)[]_OBJS)])],[case "2ドル" instatic[)] PHP_BUILD_STATIC;;shared[)] PHP_BUILD_SHARED;;bundle[)] PHP_BUILD_BUNDLE;;esacinstall_sapi="install-sapi"ifelse(3,,,ドル[PHP_ADD_SOURCES([sapi/1ドル],[3ドル],[4ドル],[sapi])])])])dnldnl PHP_ADD_BUILD_DIRdnlAC_DEFUN([PHP_ADD_BUILD_DIR],[ifelse(2,,ドル[BUILD_DIR="$BUILD_DIR 1ドル"], [$php_shtool mkdir -p 1ドル])])dnldnl PHP_GEN_BUILD_DIRSdnlAC_DEFUN([PHP_GEN_BUILD_DIRS],[$php_shtool mkdir -p $BUILD_DIR])dnldnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])dnldnl Includes an extension in the build.dnldnl "extname" is the name of the extension.dnl "sources" is a list of files relative to the subdir which are used to builddnl the extension.dnl "shared" can be set to "shared" or "yes" to build the extension as adnl dynamically loadable library. Optional parameter "sapi_class" can be set todnl "cli" to mark extension build only with CLI or CGI sapi's. "extra-cflags"dnl are passed to the compiler, with @ext_srcdir@ and @ext_builddir@ beingdnl substituted.dnl "cxx" can be used to indicate that a C++ shared module is desired.dnl "zend_ext" indicates a zend extension.AC_DEFUN([PHP_NEW_EXTENSION],[ext_builddir=[]PHP_EXT_BUILDDIR(1ドル)ext_srcdir=[]PHP_EXT_SRCDIR(1ドル)ext_dir=[]PHP_EXT_DIR(1ドル)ifelse(5,,ドルac_extra=,[ac_extra=`echo "5ドル"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])if test "3ドル" != "shared" && test "3ドル" != "yes" && test "4ドル" != "cli"; thendnl ---------------------------------------------- Static module[PHP_]translit(1,ドルa-z_-,A-Z__)[_SHARED]=noPHP_ADD_SOURCES($ext_dir,2,ドル$ac_extra,)EXT_STATIC="$EXT_STATIC 1ドル;$ext_dir"if test "3ドル" != "nocli"; thenEXT_CLI_STATIC="$EXT_CLI_STATIC 1ドル;$ext_dir"fielseif test "3ドル" = "shared" || test "3ドル" = "yes"; thendnl ---------------------------------------------- Shared module[PHP_]translit(1,ドルa-z_-,A-Z__)[_SHARED]=yesPHP_ADD_SOURCES_X($ext_dir,2,ドル$ac_extra,shared_objects_1,ドルyes)PHP_SHARED_MODULE(1,ドルshared_objects_1,ドル $ext_builddir, 6,ドル 7ドル)AC_DEFINE_UNQUOTED([COMPILE_DL_]translit(1,ドルa-z_-,A-Z__), 1, Whether to build 1ドル as dynamic module)fifiif test "3ドル" != "shared" && test "3ドル" != "yes" && test "4ドル" = "cli"; thendnl ---------------------------------------------- CLI static module[PHP_]translit(1,ドルa-z_-,A-Z__)[_SHARED]=nocase "$PHP_SAPI" incgi|embed|phpdbg[)]PHP_ADD_SOURCES($ext_dir,2,ドル$ac_extra,)EXT_STATIC="$EXT_STATIC 1ドル;$ext_dir";;*[)]PHP_ADD_SOURCES($ext_dir,2,ドル$ac_extra,cli);;esacEXT_CLI_STATIC="$EXT_CLI_STATIC 1ドル;$ext_dir"fiPHP_ADD_BUILD_DIR($ext_builddir)dnl Set for phpize builds only.dnl ---------------------------if test "$ext_builddir" = "."; thenPHP_PECL_EXTENSION=1ドルPHP_SUBST(PHP_PECL_EXTENSION)fi])dnldnl PHP_WITH_SHAREDdnldnl Checks whether $withval is "shared" or starts with "shared,XXX" and setsdnl $shared to "yes" or "no", and removes "shared,?" stuff from $withval.dnlAC_DEFUN([PHP_WITH_SHARED],[PHP_ARG_ANALYZE_EX(withval)shared=$ext_sharedunset ext_shared ext_output])dnldnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])dnldnl This macro is scanned by genif.sh when it builds the internal functionsdnl list, so that modules can be init'd in the correct orderdnl 1ドル = name of extension, 2ドル = extension upon which it dependsdnl 3ドル = optional: if true, it's ok for 2ドル to have not been configured defaultdnl is false and should halt the build. To be effective, this macro must bednl invoked *after* PHP_NEW_EXTENSION. The extension on which it depends mustdnl also have been configured. See ADD_EXTENSION_DEP in win32 build.dnlAC_DEFUN([PHP_ADD_EXTENSION_DEP], [am_i_shared=$[PHP_]translit(1,ドルa-z_-,A-Z__)[_SHARED]is_it_shared=$[PHP_]translit(2,ドルa-z_-,A-Z__)[_SHARED]is_it_enabled=$[PHP_]translit(2,ドルa-z_-,A-Z__)if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; thenAC_MSG_ERROR([You've configured extension 1ドル to build statically, but itdepends on extension 2,ドル which you've configured to build shared.You either need to build 1ドル shared or build 2ドル statically for thebuild to be successful.])fiif test "x$is_it_enabled" = "xno" && test "x3ドル" != "xtrue"; thenAC_MSG_ERROR([You've configured extension 1,ドル which depends on extension 2,ドルbut you've either not enabled 2,ドル or have disabled it.])fidnl Some systems require that we link 2ドル to 1ドル when building.])dnl ----------------------------------------------------------------------------dnl Checks for structures, typedefs, broken functions, etc.dnl ----------------------------------------------------------------------------dnldnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])dnldnl Internal helper macro.dnlAC_DEFUN([_PHP_CHECK_SIZEOF], [php_cache_value=php_cv_sizeof_[]1ドルAC_CACHE_VAL(php_cv_sizeof_[]1,ドル [old_LIBS=$LIBSLIBS=old_LDFLAGS=$LDFLAGSLDFLAGS=AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>#include <stdlib.h>#include <stddef.h>#ifdef HAVE_INTTYPES_H#include <inttypes.h>#endif#ifdef HAVE_UNISTD_H#include <unistd.h>#endif3ドルint main(){FILE *fp = fopen("conftestval", "w");if (!fp) return(1);fprintf(fp, "%d\n", sizeof(1ドル));return(0);}]])], [eval $php_cache_value=`cat conftestval`], [eval $php_cache_value=0], [ifelse([2ドル],,[eval $php_cache_value=0], [eval $php_cache_value=2ドル])])LDFLAGS=$old_LDFLAGSLIBS=$old_LIBS])if eval test "\$$php_cache_value" != "0"; thenifelse([4ドル],[],:,[4ドル])ifelse([5ドル],[],,[else 5ドル])fi])dnldnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)dnlAC_DEFUN([PHP_CHECK_SIZEOF], [AC_MSG_CHECKING([size of 1ドル])_PHP_CHECK_SIZEOF(1,ドル 2,ドル 3,ドル [AC_DEFINE_UNQUOTED([SIZEOF_]translit(1,ドルa-z,A-Z_), [$]php_cv_sizeof_[]1,ドル [Size of 1ドル])AC_DEFINE_UNQUOTED([HAVE_]translit(1,ドルa-z,A-Z_), 1, [Whether 1ドル is available])])AC_MSG_RESULT([[$][php_cv_sizeof_]translit(1,ドル ,_)])])dnldnl PHP_CHECK_IN_ADDR_TdnlAC_DEFUN([PHP_CHECK_IN_ADDR_T], [dnl AIX keeps in_addr_t in /usr/include/netinet/in.hAC_MSG_CHECKING([for in_addr_t])AC_CACHE_VAL(ac_cv_type_in_addr_t,[AC_EGREP_CPP(dnlchangequote(<<,>>)dnl<<in_addr_t[^a-zA-Z_0-9]>>dnlchangequote([,]), [#include <sys/types.h>#include <stdlib.h>#include <stddef.h>#ifdef HAVE_NETINET_IN_H#include <netinet/in.h>#endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnlAC_MSG_RESULT([$ac_cv_type_in_addr_t])if test $ac_cv_type_in_addr_t = no; thenAC_DEFINE(in_addr_t, u_int, [ ])fi])dnldnl PHP_TIME_R_TYPEdnldnl Check type of reentrant time-related functions. Type can be: irix, hpux ordnl POSIX.dnlAC_DEFUN([PHP_TIME_R_TYPE],[AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>int 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);}]])],[ac_cv_time_r_type=hpux],[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>int 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);}]])],[ac_cv_time_r_type=irix],[ac_cv_time_r_type=POSIX],[ac_cv_time_r_type=POSIX])],[ac_cv_time_r_type=POSIX])])case $ac_cv_time_r_type inhpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;esac])dnldnl PHP_DOES_PWRITE_WORKdnldnl Internal.dnlAC_DEFUN([PHP_DOES_PWRITE_WORK],[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <errno.h>#include <stdlib.h>1ドルint 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);}]])],[ac_cv_pwrite=yes],[ac_cv_pwrite=no],[ac_cv_pwrite=no])])dnldnl PHP_DOES_PREAD_WORKdnldnl Internal.dnlAC_DEFUN([PHP_DOES_PREAD_WORK],[echo test > conftest_inAC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <errno.h>#include <stdlib.h>1ドルint 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);}]])],[ac_cv_pread=yes],[ac_cv_pread=no],[ac_cv_pread=no])rm -f conftest_in])dnldnl PHP_PWRITE_TESTdnlAC_DEFUN([PHP_PWRITE_TEST],[AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[PHP_DOES_PWRITE_WORKif test "$ac_cv_pwrite" = "no"; thenPHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])if test "$ac_cv_pwrite" = "yes"; thenac_cv_pwrite=64fifi])if test "$ac_cv_pwrite" != "no"; thenAC_DEFINE(HAVE_PWRITE, 1, [ ])if test "$ac_cv_pwrite" = "64"; thenAC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])fifi])dnldnl PHP_PREAD_TESTdnlAC_DEFUN([PHP_PREAD_TEST],[AC_CACHE_CHECK(whether pread works,ac_cv_pread,[PHP_DOES_PREAD_WORKif test "$ac_cv_pread" = "no"; thenPHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])if test "$ac_cv_pread" = "yes"; thenac_cv_pread=64fifi])if test "$ac_cv_pread" != "no"; thenAC_DEFINE(HAVE_PREAD, 1, [ ])if test "$ac_cv_pread" = "64"; thenAC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])fifi])dnldnl PHP_MISSING_TIME_R_DECLdnlAC_DEFUN([PHP_MISSING_TIME_R_DECL],[AC_MSG_CHECKING([for missing declarations of reentrant functions])AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm *(*func)() = localtime_r]])],[:],[AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])])AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm *(*func)() = gmtime_r]])],[:],[AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])])AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[char *(*func)() = asctime_r]])],[:],[AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])])AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[char *(*func)() = ctime_r]])],[:],[AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])])AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[char *(*func)() = strtok_r]])],[:],[AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])])AC_MSG_RESULT([done])])dnldnl PHP_STRUCT_FLOCKdnlAC_DEFUN([PHP_STRUCT_FLOCK],[AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>#include <fcntl.h>]], [[struct flock x;]])],[ac_cv_struct_flock=yes],[ac_cv_struct_flock=no]))if test "$ac_cv_struct_flock" = "yes" ; thenAC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])fi])dnldnl PHP_MISSING_FCLOSE_DECLdnldnl See if we have broken header files like SunOS has.dnlAC_DEFUN([PHP_MISSING_FCLOSE_DECL],[AC_MSG_CHECKING([for fclose declaration])AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[int (*func)() = fclose]])],[AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])AC_MSG_RESULT([ok])],[AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])AC_MSG_RESULT([missing])])])dnldnl PHP_SOCKADDR_CHECKSdnlAC_DEFUN([PHP_SOCKADDR_CHECKS], [dnl Check for struct sockaddr_storage exists.AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>#include <sys/socket.h>]],[[struct sockaddr_storage s; s]])],[ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])])if test "$ac_cv_sockaddr_storage" = "yes"; thenAC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])fidnl Check if field sa_len exists in struct sockaddr.AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>#include <sys/socket.h>]], [[static struct sockaddr sa; int n = (int) sa.sa_len; return n;]])],[ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])])if test "$ac_cv_sockaddr_sa_len" = "yes"; thenAC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])fi])dnldnl PHP_EBCDICdnlAC_DEFUN([PHP_EBCDIC], [AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(void) {return (unsigned char)'A' != (unsigned char)0xC1;}]])],[ac_cv_ebcdic=yes],[ac_cv_ebcdic=no],[ac_cv_ebcdic=no])])if test "$ac_cv_ebcdic" = "yes"; thenAC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])fi])dnldnl PHP_BROKEN_GETCWDdnldnl Some systems, notably Solaris, cause getcwd() or realpath to fail if adnl component of the path has execute but not read permissions.dnlAC_DEFUN([PHP_BROKEN_GETCWD],[AC_MSG_CHECKING([for broken getcwd])os=`uname -sr 2>/dev/null`case $os inSunOS*[)]AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])AC_MSG_RESULT([yes]);;*[)]AC_MSG_RESULT([no]);;esac])dnldnl PHP_BROKEN_GCC_STRLEN_OPTdnldnl Early releases of GCC 8 shipped with a strlen() optimization bug, so theydnl didn't properly handle the `char val[1]` struct hack. See bug #76510.dnlAC_DEFUN([PHP_BROKEN_GCC_STRLEN_OPT], [AC_CACHE_CHECK([for broken gcc optimize-strlen],ac_cv_have_broken_gcc_strlen_opt,[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>#include <string.h>#include <stdio.h>struct s{int i;char c[1];};int main(){struct s *s = malloc(sizeof(struct s) + 3);s->i = 3;strcpy(s->c, "foo");return strlen(s->c+1) == 2;}]])],[ac_cv_have_broken_gcc_strlen_opt=yes],[ac_cv_have_broken_gcc_strlen_opt=no],[ac_cv_have_broken_gcc_strlen_opt=no])])if test "$ac_cv_have_broken_gcc_strlen_opt" = "yes"; thenCFLAGS="$CFLAGS -fno-optimize-strlen"fi])dnldnl PHP_FOPENCOOKIEdnlAC_DEFUN([PHP_FOPENCOOKIE], [AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])if test "$have_glibc_fopencookie" = "yes"; thendnl This comes in two flavors: newer glibcs (since 2.1.2?) have a type calleddnl cookie_io_functions_t.AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE#include <stdio.h>]], [[cookie_io_functions_t cookie;]])],[have_cookie_io_functions_t=yes],[])if test "$have_cookie_io_functions_t" = "yes"; thencookie_io_functions_t=cookie_io_functions_thave_fopen_cookie=yesdnl Even newer glibcs have a different seeker definition.AC_RUN_IFELSE([AC_LANG_SOURCE([[#define _GNU_SOURCE#include <stdio.h>#include <stdlib.h>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};int 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);}]])], [cookie_io_functions_use_off64_t=yes], [cookie_io_functions_use_off64_t=no], [cookie_io_functions_use_off64_t=no])elsednl Older glibc versions (up to 2.1.2?) call it _IO_cookie_io_functions_t.AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE#include <stdio.h>]], [[_IO_cookie_io_functions_t cookie;]])], [have_IO_cookie_io_functions_t=yes], [])if test "$have_cookie_io_functions_t" = "yes" ; thencookie_io_functions_t=_IO_cookie_io_functions_thave_fopen_cookie=yesfifiif test "$have_fopen_cookie" = "yes" ; thenAC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])if test "$cookie_io_functions_use_off64_t" = "yes" ; thenAC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])fififi])dnl ----------------------------------------------------------------------------dnl Library/function existence and build sanity checks.dnl ----------------------------------------------------------------------------dnldnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])dnldnl Wrapper for AC_CHECK_LIB.dnlAC_DEFUN([PHP_CHECK_LIBRARY], [save_old_LDFLAGS=$LDFLAGSac_stuff="5ドル"save_ext_shared=$ext_sharedext_shared=yesPHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)AC_CHECK_LIB([1ドル],[2ドル],[LDFLAGS=$save_old_LDFLAGSext_shared=$save_ext_shared3ドル],[LDFLAGS=$save_old_LDFLAGSext_shared=$save_ext_sharedunset ac_cv_lib_1ドル[]_2ドル4ドル])dnl])dnldnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])dnldnl El cheapo wrapper for AC_CHECK_LIB.dnlAC_DEFUN([PHP_CHECK_FRAMEWORK], [save_old_LDFLAGS=$LDFLAGSLDFLAGS="-framework 1ドル $LDFLAGS"dnl Supplying "c" to AC_CHECK_LIB is technically cheating, but rewritingdnl AC_CHECK_LIB is overkill and this only affects the "checking.." outputdnl anyway.AC_CHECK_LIB(c,[2ドル],[LDFLAGS=$save_old_LDFLAGS3ドル],[LDFLAGS=$save_old_LDFLAGS4ドル])])dnldnl PHP_CHECK_FUNC_LIB(func, libs)dnldnl This macro checks whether 'func' or '__func' exists in the specifieddnl library. Defines HAVE_func and HAVE_library if found and adds the library todnl LIBS. This should be called in the ACTION-IF-NOT-FOUND part ofdnl PHP_CHECK_FUNC.dnldnl autoconf undefines the builtin "shift" :-(dnl If possible, we use the builtin shift anyway, otherwise we use the ubercooldnl definition that has been tested so far with FreeBSD/GNU m4.dnlifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])])dnldnl PHP_CHECK_FUNC_LIBdnlAC_DEFUN([PHP_CHECK_FUNC_LIB],[ifelse(2,,ドル:,[unset ac_cv_lib_2ドル[]_1ドルunset ac_cv_lib_2ドル[]___1ドルunset foundAC_CHECK_LIB(2,ドル 1,ドル [found=yes], [AC_CHECK_LIB(2,ドル __1,ドル [found=yes], [found=no])])if test "$found" = "yes"; thenac_libs=$LIBSLIBS="$LIBS -l2ドル"AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return (0); }]])],[found=yes],[found=no],[found=no])LIBS=$ac_libsfiif test "$found" = "yes"; thenPHP_ADD_LIBRARY(2ドル)PHP_DEF_HAVE(1ドル)PHP_DEF_HAVE(lib2ドル)ac_cv_func_1ドル=yeselsePHP_CHECK_FUNC_LIB(1,ドルphpshift(phpshift($@)))fi])])dnldnl PHP_CHECK_FUNC(func, ...)dnldnl This macro checks whether 'func' or '__func' exists in the default librariesdnl and as a fall back in the specified library. Defines HAVE_func anddnl HAVE_library if found and adds the library to LIBS.dnlAC_DEFUN([PHP_CHECK_FUNC],[unset ac_cv_func_1ドルunset ac_cv_func___1ドルunset foundAC_CHECK_FUNC(1,ドル [found=yes],[ AC_CHECK_FUNC(__1,ドル[found=yes],[found=no]) ])case $found inyes[)]PHP_DEF_HAVE(1ドル)ac_cv_func_1ドル=yes;;ifelse($#,1,,[*[)] PHP_CHECK_FUNC_LIB($@) ;;])esac])dnldnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])dnldnl This macro checks whether build works and given function exists.dnlAC_DEFUN([PHP_TEST_BUILD], [old_LIBS=$LIBSLIBS="4ドル $LIBS"AC_RUN_IFELSE([AC_LANG_SOURCE([[5ドルchar 1ドル();int main() {1ドル();return 0;}]])],[LIBS=$old_LIBS2ドル],[LIBS=$old_LIBS3ドル],[LIBS=$old_LIBS])])dnl ----------------------------------------------------------------------------dnl Platform characteristics checks.dnl ----------------------------------------------------------------------------dnldnl PHP_SHLIB_SUFFIX_NAMESdnldnl Determines link library suffix SHLIB_SUFFIX_NAME which can be: .so, .sl ordnl .dylibdnldnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME suffix can be: .so ordnl .sldnlAC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnlPHP_SUBST_OLD(SHLIB_SUFFIX_NAME)PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)SHLIB_SUFFIX_NAME=soSHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAMEcase $host_alias in*hpux*[)]SHLIB_SUFFIX_NAME=slSHLIB_DL_SUFFIX_NAME=sl;;*darwin*[)]SHLIB_SUFFIX_NAME=dylibSHLIB_DL_SUFFIX_NAME=so;;esac])dnldnl PHP_C_BIGENDIANdnldnl Replacement macro for AC_C_BIGENDIAN.dnlAC_DEFUN([PHP_C_BIGENDIAN],[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,[ac_cv_c_bigendian_php=unknownAC_RUN_IFELSE([AC_LANG_SOURCE([[int main(void){short one = 1;char *cp = (char *)&one;if (*cp == 0) {return(0);} else {return(1);}}]])], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])])if test $ac_cv_c_bigendian_php = yes; thenAC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])fi])dnl ----------------------------------------------------------------------------dnl Checks for programs: PHP_PROG_<program>.dnl ----------------------------------------------------------------------------dnldnl PHP_PROG_SENDMAILdnldnl Search for the sendmail binary.dnlAC_DEFUN([PHP_PROG_SENDMAIL], [PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/libAC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)PHP_SUBST(PROG_SENDMAIL)])dnldnl PHP_PROG_AWKdnldnl Some vendors force mawk before gawk; mawk is broken so we don't like that.dnlAC_DEFUN([PHP_PROG_AWK], [AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)case "$AWK" in*mawk)AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk]);;*gawk);;bork)AC_MSG_ERROR([Could not find awk; Install GNU awk]);;*)AC_MSG_CHECKING([if $AWK is broken])if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; thenAC_MSG_RESULT([yes])AC_MSG_ERROR([You should install GNU awk])elseAC_MSG_RESULT([no])fi;;esacPHP_SUBST(AWK)])dnldnl PHP_PROG_BISON([MIN-VERSION], [EXCLUDED-VERSION...])dnldnl Search for bison and optionally check if version is at least the minimumdnl required version MIN-VERSION and doesn't match any of the blank separateddnl list of excluded versions EXCLUDED-VERSION (for example "3.0 3.2").dnlAC_DEFUN([PHP_PROG_BISON], [AC_CHECK_PROG(YACC, bison, bison)ifelse(1,,ドルphp_bison_required_version='',php_bison_required_version="1ドル")ifelse(2,,ドルphp_bison_excluded_versions='none',php_bison_excluded_versions="2ドル")if test -n "$YACC"; thenAC_MSG_CHECKING([for bison version])php_bison_version=$($YACC --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | tr -d a-z)ac_IFS=$IFS; IFS="."set $php_bison_versionIFS=$ac_IFSphp_bison_num=`expr [$]{1:-0} \* 10000 + [$]{2:-0} \* 100 + [$]{3:-0}`php_bison_branch="[$]1.[$]2"php_bison_check=okif test -z "$php_bison_required_version" && test -z "$php_bison_num"; thenphp_bison_check=invalidelif test -n "$php_bison_required_version"; thenac_IFS=$IFS; IFS="."set $php_bison_required_versionIFS=$ac_IFSphp_bison_required_num=`expr [$]{1:-0} \* 10000 + [$]{2:-0} \* 100 + [$]{3:-0}`php_bison_required_version="$php_bison_required_version or later"if test -z "$php_bison_num" || test "$php_bison_num" -lt "$php_bison_required_num"; thenphp_bison_check=invalidfififor php_bison_check_version in $php_bison_excluded_versions; doif test "$php_bison_version" = "$php_bison_check_version" || test "$php_bison_branch" = "$php_bison_check_version"; thenphp_bison_check=invalidbreakfidoneif test "$php_bison_check" != "invalid"; thenAC_MSG_RESULT([$php_bison_version (ok)])elseAC_MSG_RESULT([$php_bison_version])fificase $php_bison_check in""|invalid[)]if test ! -f "$abs_srcdir/Zend/zend_language_parser.h" || test ! -f "$abs_srcdir/Zend/zend_language_parser.c"; thenAC_MSG_ERROR([bison $php_bison_required_version is required to generate PHP parsers (excluded versions: $php_bison_excluded_versions).])fiYACC="exit 0;";;esacPHP_SUBST(YACC)])dnldnl PHP_PROG_RE2C([MIN-VERSION])dnldnl Search for the re2c and optionally check if version is at least the minimumdnl required version MIN-VERSION.dnlAC_DEFUN([PHP_PROG_RE2C],[AC_CHECK_PROG(RE2C, re2c, re2c)ifelse(1,,ドルphp_re2c_required_version='',php_re2c_required_version="1ドル")if test -n "$RE2C"; thenAC_MSG_CHECKING([for re2c version])php_re2c_version=$($RE2C --version | cut -d ' ' -f 2 2>/dev/null)ac_IFS=$IFS; IFS="."set $php_re2c_versionIFS=$ac_IFSphp_re2c_num=`expr [$]{1:-0} \* 10000 + [$]{2:-0} \* 100 + [$]{3:-0}`php_re2c_check=okif test -z "$php_re2c_required_version" && test -z "$php_re2c_num"; thenphp_re2c_check=invalidelif test -n "$php_re2c_required_version"; thenac_IFS=$IFS; IFS="."set $php_re2c_required_versionIFS=$ac_IFSphp_re2c_required_num=`expr [$]{1:-0} \* 10000 + [$]{2:-0} \* 100 + [$]{3:-0}`php_re2c_required_version="$php_re2c_required_version or later"if test -z "$php_re2c_num" || test "$php_re2c_num" -lt "$php_re2c_required_num"; thenphp_re2c_check=invalidfifiif test "$php_re2c_check" != "invalid"; thenAC_MSG_RESULT([$php_re2c_version (ok)])elseAC_MSG_RESULT([$php_re2c_version])fificase $php_re2c_check in""|invalid[)]if test ! -f "$abs_srcdir/Zend/zend_language_scanner.c"; thenAC_MSG_ERROR([re2c $php_re2c_required_version is required to generate PHP lexers.])fiRE2C="exit 0;";;esacPHP_SUBST(RE2C)])dnl ----------------------------------------------------------------------------dnl Common setup macros: PHP_SETUP_<what>dnl ----------------------------------------------------------------------------dnldnl PHP_SETUP_ICU([shared-add])dnldnl Common setup macro for ICU.dnlAC_DEFUN([PHP_SETUP_ICU],[PKG_CHECK_MODULES([ICU], [icu-uc >= 50.1 icu-io icu-i18n])PHP_EVAL_INCLINE($ICU_CFLAGS)PHP_EVAL_LIBLINE($ICU_LIBS, 1ドル)ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"if test "$PKG_CONFIG icu-io --atleast-version=60"; thenICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"fi])dnldnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])dnldnl Common setup macro for openssl.dnlAC_DEFUN([PHP_SETUP_OPENSSL],[found_openssl=nodnl Empty variable means 'no'.test -z "$PHP_OPENSSL" && PHP_OPENSSL=notest -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=noif test "$PHP_OPENSSL" != "no"; thenPKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1], [found_openssl=yes])fiif test "$found_openssl" = "yes"; thenPHP_EVAL_LIBLINE($OPENSSL_LIBS, 1ドル)PHP_EVAL_INCLINE($OPENSSL_CFLAGS)ifelse([2ドル],[],:,[2ドル])ifelse([3ドル],[],,[else 3ドル])fi])dnldnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])dnldnl Common setup macro for iconv.dnlAC_DEFUN([PHP_SETUP_ICONV], [found_iconv=nounset ICONV_DIRdnl Create the directories for a VPATH build.$php_shtool mkdir -p ext/iconvecho > ext/iconv/php_have_bsd_iconv.hecho > ext/iconv/php_have_ibm_iconv.hecho > ext/iconv/php_have_glibc_iconv.hecho > ext/iconv/php_have_libiconv.hecho > ext/iconv/php_have_iconv.hecho > ext/iconv/php_php_iconv_impl.hecho > ext/iconv/php_iconv_aliased_libiconv.hecho > ext/iconv/php_php_iconv_h_path.hecho > ext/iconv/php_iconv_supports_errno.hdnl Check libc first if no path is provided in --with-iconv.if test "$PHP_ICONV" = "yes"; thendnl Reset LIBS temporarily as it may have already been included -liconv in.LIBS_save="$LIBS"LIBS=AC_CHECK_FUNC(iconv, [found_iconv=yes],[AC_CHECK_FUNC(libiconv,[PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])AC_DEFINE(HAVE_LIBICONV, 1, [ ])found_iconv=yes])])LIBS="$LIBS_save"fidnl Check external libs for iconv funcs.if test "$found_iconv" = "no"; thenfor i in $PHP_ICONV /usr/local /usr; doif test -r $i/include/giconv.h; thenAC_DEFINE(HAVE_GICONV_H, 1, [ ])ICONV_DIR=$iiconv_lib_name=giconvbreakelif test -r $i/include/iconv.h; thenICONV_DIR=$iiconv_lib_name=iconvbreakfidoneif test -z "$ICONV_DIR"; thenAC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])fiif test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME ||test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.tbdthenPHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [found_iconv=yesPHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])AC_DEFINE(HAVE_LIBICONV,1,[ ])PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])], [PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [found_iconv=yes], [], [-L$ICONV_DIR/$PHP_LIBDIR])], [-L$ICONV_DIR/$PHP_LIBDIR])fifiif test "$found_iconv" = "yes"; thenPHP_DEFINE(HAVE_ICONV,1,[ext/iconv])AC_DEFINE(HAVE_ICONV,1,[ ])if test -n "$ICONV_DIR"; thenPHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, 1ドル)PHP_ADD_INCLUDE($ICONV_DIR/include)fi2ドルifelse([3ドル],[],,[else 3ドル])fi])dnldnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])dnldnl Common setup macro for libxml.dnlAC_DEFUN([PHP_SETUP_LIBXML], [PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.7.6])PHP_EVAL_INCLINE($LIBXML_CFLAGS)PHP_EVAL_LIBLINE($LIBXML_LIBS, 1ドル)AC_DEFINE(HAVE_LIBXML, 1, [ ])2ドル])dnldnl PHP_SETUP_EXPAT([shared-add])dnldnl Common setup macro for expat.dnlAC_DEFUN([PHP_SETUP_EXPAT], [PKG_CHECK_MODULES([EXPAT], [expat])PHP_EVAL_INCLINE($EXPAT_CFLAGS)PHP_EVAL_LIBLINE($EXPAT_LIBS, 1ドル)AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])])dnl ----------------------------------------------------------------------------dnl Misc. macrosdnl ----------------------------------------------------------------------------dnldnl PHP_INSTALL_HEADERS(path [, file ...])dnldnl PHP header files to be installed.dnlAC_DEFUN([PHP_INSTALL_HEADERS],[ifelse([2ドル],[],[for header_file in 1ドル; doPHP_RUN_ONCE(INSTALLHEADERS, $header_file, [INSTALL_HEADERS="$INSTALL_HEADERS $header_file"])done], [header_path=1ドルfor header_file in 2ドル; dohp_hf="$header_path/$header_file"PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"])done])])dnldnl PHP_AP_EXTRACT_VERSION(/path/httpd)dnldnl This macro is used to get a comparable version for Apache.dnlAC_DEFUN([PHP_AP_EXTRACT_VERSION],[ac_output=`1ドル -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`ac_IFS=$IFSIFS="- /."set $ac_outputIFS=$ac_IFSAPACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`])dnldnl PHP_CONFIG_NICE(filename)dnldnl This macro creates script file with given filename which includes the lastdnl configure command run by user. This file is named 'config.nice' in PHP.dnlAC_DEFUN([PHP_CONFIG_NICE],[AC_REQUIRE([AC_PROG_EGREP])AC_REQUIRE([AC_PROG_SED])PHP_SUBST_OLD(EGREP)PHP_SUBST_OLD(SED)test -f 1ドル && mv 1ドル 1ドル.oldrm -f 1ドル.oldcat >1ドル<<EOF#! /bin/sh## Created by configureEOFclean_configure_args=$ac_configure_argsfor var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; doeval val=\$$varif test -n "$val"; thenecho "$var='$val' \\" >> 1ドルif test `expr "X$ac_configure_args" : ".*${var}.*"` != 0; thenclean_configure_args=$(echo $clean_configure_args | sed -e "s#'$var=$val'##")fifidoneecho "'[$]0' \\" >> 1ドルif test `expr " [$]0" : " '.*"` = 0; thenCONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"elseCONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"fiCONFIGURE_ARGS="$clean_configure_args"while test "X$CONFIGURE_ARGS" != "X";doif CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\('[[^']]*'\)"`thenCONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *'[[^']]*' \(.*\)"`elif CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\([[^ ]]*\)"`thenCONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *[[^ ]]* \(.*\)"`CURRENT_ARG="'$CURRENT_ARG'"elsebreakfi$as_echo "$CURRENT_ARG \\" >>1ドルCONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CURRENT_ARG"doneecho '"[$]@"' >> 1ドルchmod +x 1ドルCONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"PHP_SUBST_OLD(CONFIGURE_COMMAND)PHP_SUBST_OLD(CONFIGURE_OPTIONS)])dnldnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])dnlAC_DEFUN([PHP_CHECK_PDO_INCLUDES],[AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; thenpdo_cv_inc_path=$abs_srcdir/extelif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; thenpdo_cv_inc_path=$abs_srcdir/extelif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; thenpdo_cv_inc_path=$phpincludedir/extfi])if test -n "$pdo_cv_inc_path"; thenifelse([1ドル],[],:,[1ドル])elseifelse([2ドル],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[2ドル])fi])dnldnl PHP_DETECT_ICCdnldnl Detect Intel C++ Compiler and unset $GCC if ICC found.dnlAC_DEFUN([PHP_DETECT_ICC],[ICC="no"AC_MSG_CHECKING([for icc])AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],ICC="no"AC_MSG_RESULT([no]),ICC="yes"GCC="no"AC_MSG_RESULT([yes]))])dnldnl PHP_DETECT_SUNCCdnldnl Detect if the systems default compiler is suncc. We also set some usefuldnl CFLAGS if the user didn't set any.dnlAC_DEFUN([PHP_DETECT_SUNCC],[SUNCC="no"AC_MSG_CHECKING([for suncc])AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],SUNCC="no"AC_MSG_RESULT([no]),SUNCC="yes"GCC="no"test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"GCC=""AC_MSG_RESULT([yes]))])dnldnl PHP_CRYPT_R_STYLEdnldnl Detect the style of crypt_r() is any is available seednl APR_CHECK_CRYPT_R_STYLE() for original version.dnlAC_DEFUN([PHP_CRYPT_R_STYLE],[AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[php_cv_crypt_r_style=noneAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT 1#include <crypt.h>]], [[CRYPTD buffer;crypt_r("passwd", "hash", &buffer);]])],[php_cv_crypt_r_style=cryptd],[])if test "$php_cv_crypt_r_style" = "none"; thenAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT 1#include <crypt.h>]],[[struct crypt_data buffer;crypt_r("passwd", "hash", &buffer);]])],[php_cv_crypt_r_style=struct_crypt_data],[])fiif test "$php_cv_crypt_r_style" = "none"; thenAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT 1#define _GNU_SOURCE#include <crypt.h>]],[[struct crypt_data buffer;crypt_r("passwd", "hash", &buffer);]])],[php_cv_crypt_r_style=struct_crypt_data_gnu_source],[])fi])if test "$php_cv_crypt_r_style" = "cryptd"; thenAC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])fiif test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; thenAC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])fiif test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; thenAC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])fiif test "$php_cv_crypt_r_style" = "none"; thenAC_MSG_ERROR([Unable to detect data struct used by crypt_r])fi])dnldnl PHP_TEST_WRITE_STDOUTdnlAC_DEFUN([PHP_TEST_WRITE_STDOUT],[AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_UNISTD_H#include <unistd.h>#endif#define TEXT "This is the test message -- "int main(){int n;n = write(1, TEXT, sizeof(TEXT)-1);return (!(n == sizeof(TEXT)-1));}]])],[ac_cv_write_stdout=yes],[ac_cv_write_stdout=no],[ac_cv_write_stdout=no])])if test "$ac_cv_write_stdout" = "yes"; thenAC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])fi])dnldnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])dnlAC_DEFUN([PHP_INIT_DTRACE],[dnl Set paths properly when called from extension.case "4ドル" in""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir;;/*[)] ac_srcdir=`echo "4ドル"|cut -c 2-`"/"; ac_bdir=$ac_srcdir;;*[)] ac_srcdir="$abs_srcdir/1ドル/"; ac_bdir="4ドル/";;esacdnl providerdesc.ac_provsrc=1ドルold_IFS=[$]IFSIFS=.set $ac_provsrcac_provobj=[$]1IFS=$old_IFSdnl header-file.ac_hdrobj=2ドルdnl Add providerdesc.o or .lo into global objects when needed.case $host_alias in*freebsd*)PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"PHP_LDFLAGS="$PHP_LDFLAGS -lelf";;*solaris*)PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo";;*linux*)PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo";;esacdnl DTrace objects.old_IFS=[$]IFSfor ac_src in 3ドル; doIFS=.set $ac_srcac_obj=[$]1IFS=$old_IFSPHP_DTRACE_OBJS="[$]PHP_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo"done;case [$]php_sapi_module inshared[)]for ac_lo in $PHP_DTRACE_OBJS; dodtrace_objs="[$]dtrace_objs `echo $ac_lo | $SED -e 's,\.lo,ドル.o,' -e 's#\(.*\)\/#1円\/.libs\/#'`"done;;;*[)]dtrace_objs='$(PHP_DTRACE_OBJS:.lo=.o)';;esacdnl Generate Makefile.objects entries. The empty $ac_provsrc command stops andnl implicit circular dependency in GNU Make which causes the .d file to bednl overwritten (Bug 61268).cat>>Makefile.objects<<EOF$abs_srcdir/$ac_provsrc:;$ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrcCFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@\$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobjEOFcase $host_alias in*solaris*|*linux*|*freebsd*)dtrace_prov_name="`echo $ac_provsrc | $SED -e 's#\(.*\)\/##'`.o"dtrace_lib_dir="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/[^/]*#1円#'`/.libs"dtrace_d_obj="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/\([^/]*\)#1円/.libs/2円#'`.o"dtrace_nolib_objs='$(PHP_DTRACE_OBJS:.lo=.o)'for ac_lo in $PHP_DTRACE_OBJS; dodtrace_lib_objs="[$]dtrace_lib_objs `echo $ac_lo | $SED -e 's,\.lo,ドル.o,' -e 's#\(.*\)\/#1円\/.libs\/#'`"done;dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692)cat>>Makefile.objects<<EOF$ac_bdir[$]ac_provsrc.lo: \$(PHP_DTRACE_OBJS)echo "[#] Generated by Makefile for libtool" > \$[]@@test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dirif CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]else [\\]echo "pic_object='none'" >> \$[]@ [;\\]fiif CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]else [\\]echo "non_pic_object='none'" >> \$[]@ [;\\]fiEOF;;*)cat>>Makefile.objects<<EOF$ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objsEOF;;esac])dnldnl PHP_CHECK_STDINT_TYPESdnlAC_DEFUN([PHP_CHECK_STDINT_TYPES], [AC_CHECK_SIZEOF([short])AC_CHECK_SIZEOF([int])AC_CHECK_SIZEOF([long])AC_CHECK_SIZEOF([long long])AC_CHECK_SIZEOF([size_t])AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [#if HAVE_STDINT_H# include <stdint.h>#endif#if HAVE_SYS_TYPES_H# include <sys/types.h>#endif])])dnldnl PHP_CHECK_BUILTIN_EXPECTdnlAC_DEFUN([PHP_CHECK_BUILTIN_EXPECT], [AC_MSG_CHECKING([for __builtin_expect])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[return __builtin_expect(1,1) ? 1 : 0;]])], [have_builtin_expect=1AC_MSG_RESULT([yes])], [have_builtin_expect=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_EXPECT], [$have_builtin_expect], [Whether the compiler supports __builtin_expect])])dnldnl PHP_CHECK_BUILTIN_CLZdnlAC_DEFUN([PHP_CHECK_BUILTIN_CLZ], [AC_MSG_CHECKING([for __builtin_clz])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[return __builtin_clz(1) ? 1 : 0;]])], [have_builtin_clz=1AC_MSG_RESULT([yes])], [have_builtin_clz=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CLZ], [$have_builtin_clz], [Whether the compiler supports __builtin_clz])])dnldnl PHP_CHECK_BUILTIN_CTZLdnlAC_DEFUN([PHP_CHECK_BUILTIN_CTZL], [AC_MSG_CHECKING([for __builtin_ctzl])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[return __builtin_ctzl(2L) ? 1 : 0;]])], [have_builtin_ctzl=1AC_MSG_RESULT([yes])], [have_builtin_ctzl=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZL], [$have_builtin_ctzl], [Whether the compiler supports __builtin_ctzl])])dnldnl PHP_CHECK_BUILTIN_CTZLLdnlAC_DEFUN([PHP_CHECK_BUILTIN_CTZLL], [AC_MSG_CHECKING([for __builtin_ctzll])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[return __builtin_ctzll(2LL) ? 1 : 0;]])], [have_builtin_ctzll=1AC_MSG_RESULT([yes])], [have_builtin_ctzll=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZLL], [$have_builtin_ctzll], [Whether the compiler supports __builtin_ctzll])])dnldnl PHP_CHECK_BUILTIN_SMULL_OVERFLOWdnlAC_DEFUN([PHP_CHECK_BUILTIN_SMULL_OVERFLOW], [AC_MSG_CHECKING([for __builtin_smull_overflow])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[long tmpvar;return __builtin_smull_overflow(3, 7, &tmpvar);]])], [have_builtin_smull_overflow=1AC_MSG_RESULT([yes])], [have_builtin_smull_overflow=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SMULL_OVERFLOW],[$have_builtin_smull_overflow], [Whether the compiler supports __builtin_smull_overflow])])dnldnl PHP_CHECK_BUILTIN_SMULLL_OVERFLOWdnlAC_DEFUN([PHP_CHECK_BUILTIN_SMULLL_OVERFLOW], [AC_MSG_CHECKING([for __builtin_smulll_overflow])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[long long tmpvar;return __builtin_smulll_overflow(3, 7, &tmpvar);]])], [have_builtin_smulll_overflow=1AC_MSG_RESULT([yes])], [have_builtin_smulll_overflow=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SMULLL_OVERFLOW],[$have_builtin_smulll_overflow], [Whether the compiler supports __builtin_smulll_overflow])])dnldnl PHP_CHECK_BUILTIN_SADDL_OVERFLOWdnlAC_DEFUN([PHP_CHECK_BUILTIN_SADDL_OVERFLOW], [AC_MSG_CHECKING([for __builtin_saddl_overflow])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[long tmpvar;return __builtin_saddl_overflow(3, 7, &tmpvar);]])], [have_builtin_saddl_overflow=1AC_MSG_RESULT([yes])], [have_builtin_saddl_overflow=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SADDL_OVERFLOW],[$have_builtin_saddl_overflow], [Whether the compiler supports __builtin_saddl_overflow])])dnldnl PHP_CHECK_BUILTIN_SADDLL_OVERFLOWdnlAC_DEFUN([PHP_CHECK_BUILTIN_SADDLL_OVERFLOW], [AC_MSG_CHECKING([for __builtin_saddll_overflow])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[long long tmpvar;return __builtin_saddll_overflow(3, 7, &tmpvar);]])], [have_builtin_saddll_overflow=1AC_MSG_RESULT([yes])], [have_builtin_saddll_overflow=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SADDLL_OVERFLOW],[$have_builtin_saddll_overflow], [Whether the compiler supports __builtin_saddll_overflow])])dnldnl PHP_CHECK_BUILTIN_SSUBL_OVERFLOWdnlAC_DEFUN([PHP_CHECK_BUILTIN_SSUBL_OVERFLOW], [AC_MSG_CHECKING([for __builtin_ssubl_overflow])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[long tmpvar;return __builtin_ssubl_overflow(3, 7, &tmpvar);]])], [have_builtin_ssubl_overflow=1AC_MSG_RESULT([yes])], [have_builtin_ssubl_overflow=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SSUBL_OVERFLOW],[$have_builtin_ssubl_overflow], [Whether the compiler supports __builtin_ssubl_overflow])])dnldnl PHP_CHECK_BUILTIN_SSUBLL_OVERFLOWdnlAC_DEFUN([PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW], [AC_MSG_CHECKING([for __builtin_ssubll_overflow])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[long long tmpvar;return __builtin_ssubll_overflow(3, 7, &tmpvar);]])], [have_builtin_ssubll_overflow=1AC_MSG_RESULT([yes])], [have_builtin_ssubll_overflow=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SSUBLL_OVERFLOW],[$have_builtin_ssubll_overflow], [Whether the compiler supports __builtin_ssubll_overflow])])dnldnl PHP_CHECK_BUILTIN_CPU_INITdnlAC_DEFUN([PHP_CHECK_BUILTIN_CPU_INIT], [AC_MSG_CHECKING([for __builtin_cpu_init])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[return __builtin_cpu_init()? 1 : 0;]])], [have_builtin_cpu_init=1AC_MSG_RESULT([yes])], [have_builtin_cpu_init=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CPU_INIT],[$have_builtin_cpu_init], [Whether the compiler supports __builtin_cpu_init])])dnldnl PHP_CHECK_BUILTIN_CPU_SUPPORTSdnlAC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [AC_MSG_CHECKING([for __builtin_cpu_supports])AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[return __builtin_cpu_supports("sse")? 1 : 0;]])], [have_builtin_cpu_supports=1AC_MSG_RESULT([yes])], [have_builtin_cpu_supports=0AC_MSG_RESULT([no])])AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CPU_SUPPORTS],[$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports])])dnldnl PHP_CHECK_CPU_SUPPORTSdnlAC_DEFUN([PHP_CHECK_CPU_SUPPORTS], [AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_INIT])AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_SUPPORTS])have_ext_instructions=0if test $have_builtin_cpu_supports = 1; thenAC_MSG_CHECKING([for 1ドル instructions supports])AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() {return __builtin_cpu_supports("1ドル")? 0 : 1;}]])], [have_ext_instructions=1AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([no])])fiAC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_1ドル_INSTRUCTIONS]),[$have_ext_instructions], [Whether the compiler supports 1ドル instructions])])dnldnl PHP_PATCH_CONFIG_HEADERS([FILE])dnldnl PACKAGE_* symbols are automatically defined by Autoconf. When includingdnl configuration header, warnings about redefined symbols are emitted for suchdnl symbols if they are defined by multiple libraries. This disables alldnl PACKAGE_* symbols in the generated configuration header template FILE. Fordnl example, main/php_config.h.in for PHP or config.h.in for PHP extensions.dnlAC_DEFUN([PHP_PATCH_CONFIG_HEADERS], [AC_MSG_NOTICE([patching 1ドル])$SED -e 's/^#undef PACKAGE_[^ ]*/\/\* & \*\//g' < $srcdir/1ドル \> $srcdir/1ドル.tmp && mv $srcdir/1ドル.tmp $srcdir/1ドル])
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。