summaryrefslogtreecommitdiff
path: root/build/php.m4
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-05-12 18:43:03 +0200
committerPeter Kokot <peterkokot@gmail.com>2019-05-12 18:43:03 +0200
commit75fb74860da7decd94432a4d211795310308a4a8 (patch)
treea4a7a4755150cf43bca6c4f7d075ce67e1c4ade2 /build/php.m4
parente96c776bd5d03d3042e9b1c91d395ebf81741540 (diff)
downloadphp-git-75fb74860da7decd94432a4d211795310308a4a8.tar.gz
Normalize comments in *nix build system m4 files
Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
Diffstat (limited to 'build/php.m4')
-rw-r--r--build/php.m4519
1 files changed, 280 insertions, 239 deletions
diff --git a/build/php.m4 b/build/php.m4
index dbc8c88006..da0db4bd1c 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1,10 +1,8 @@
-dnl
-dnl This file contains local autoconf functions.
-dnl
+dnl This file contains local autoconf macros.
-dnl -------------------------------------------------------------------------
-dnl Output stylize macros for configure (help/runtime)
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Output stylize macros for configure (help/runtime).
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_HELP_SEPARATOR(title)
@@ -20,28 +18,28 @@ $1
dnl
dnl PHP_CONFIGURE_PART(title)
dnl
-dnl Adds separator title configure output (idea borrowed from mm)
+dnl Adds separator title configure output (idea borrowed from mm).
dnl
AC_DEFUN([PHP_CONFIGURE_PART],[
AC_MSG_RESULT()
AC_MSG_RESULT([${T_MD}$1${T_ME}])
])
-dnl -------------------------------------------------------------------------
-dnl Build system helper macros
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Build system helper macros.
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_DEF_HAVE(what)
dnl
-dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
+dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'.
dnl
AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
dnl
dnl PHP_RUN_ONCE(namespace, variable, code)
dnl
-dnl execute code, if variable is not set in namespace
+dnl Execute code, if variable is not set in namespace.
dnl
AC_DEFUN([PHP_RUN_ONCE],[
changequote({,})
@@ -57,7 +55,7 @@ AC_DEFUN([PHP_RUN_ONCE],[
dnl
dnl PHP_EXPAND_PATH(path, variable)
dnl
-dnl expands path to an absolute path and assigns it to variable
+dnl Expands path to an absolute path and assigns it to variable.
dnl
AC_DEFUN([PHP_EXPAND_PATH],[
if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
@@ -74,7 +72,7 @@ AC_DEFUN([PHP_EXPAND_PATH],[
dnl
dnl PHP_DEFINE(WHAT [, value[, directory]])
dnl
-dnl Creates builddir/include/what.h and in there #define WHAT value
+dnl Creates builddir/include/what.h and in there #define WHAT value.
dnl
AC_DEFUN([PHP_DEFINE],[
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
@@ -93,8 +91,8 @@ AC_DEFUN([PHP_SUBST],[
dnl
dnl PHP_SUBST_OLD(varname)
dnl
-dnl Same as PHP_SUBST() but also substitutes all @VARNAME@
-dnl instances in every file passed to AC_OUTPUT
+dnl Same as PHP_SUBST() but also substitutes all @VARNAME@ instances in every
+dnl file passed to AC_OUTPUT.
dnl
AC_DEFUN([PHP_SUBST_OLD],[
PHP_SUBST($1)
@@ -104,17 +102,16 @@ AC_DEFUN([PHP_SUBST_OLD],[
dnl
dnl PHP_OUTPUT(file)
dnl
-dnl Adds "file" to the list of files generated by AC_OUTPUT
-dnl This macro can be used several times.
+dnl Adds "file" to the list of files generated by AC_OUTPUT. This macro can be
+dnl used several times.
dnl
AC_DEFUN([PHP_OUTPUT],[
PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
])
-
-dnl -------------------------------------------------------------------------
-dnl Build system base macros
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Build system base macros.
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_CANONICAL_HOST_TARGET
@@ -134,12 +131,14 @@ AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
dnl
dnl PHP_INIT_BUILD_SYSTEM
dnl
+dnl Creates build directories and Makefile placeholders.
+dnl
AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
test -d include || $php_shtool mkdir include
> Makefile.objects
> Makefile.fragments
-dnl We need to play tricks here to avoid matching the grep line itself
+dnl 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
])
@@ -166,10 +165,9 @@ EOF
dnl
dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])
dnl
-dnl Processes a file called Makefile.frag in the source directory
-dnl of the most recently added extension. $(srcdir) and $(builddir)
-dnl are substituted with the proper paths. Can be used to supply
-dnl custom rules and/or additional targets.
+dnl Processes a file called Makefile.frag in the source directory of the most
+dnl recently added extension. $(srcdir) and $(builddir) are substituted with the
+dnl proper paths. Can be used to supply custom rules and/or additional targets.
dnl
AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
@@ -181,23 +179,25 @@ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
dnl
dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
dnl
-dnl Adds sources which are located relative to source-path to the
-dnl array of type type. Sources are processed with optional
-dnl special-flags which are passed to the compiler. Sources
-dnl can be either written in C or C++ (filenames shall end in .c
-dnl or .cpp, respectively).
+dnl Adds sources which are located relative to source-path to the array of type
+dnl type. Sources are processed with optional special-flags which are passed to
+dnl the compiler. Sources can be either written in C or C++ (filenames shall end
+dnl in .c or .cpp, respectively).
dnl
-dnl Note: If source-path begins with a "/", the "/" is removed and
-dnl the path is interpreted relative to the top build-directory.
+dnl Note: If source-path begins with a "/", the "/" is removed and the path is
+dnl interpreted relative to the top build-directory.
+dnl
+dnl Which array to append to?
dnl
-dnl which array to append to?
AC_DEFUN([PHP_ADD_SOURCES],[
PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))
])
dnl
dnl _PHP_ASSIGN_BUILD_VARS(type)
-dnl internal, don't use
+dnl
+dnl Internal, don't use.
+dnl
AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[
ifelse($1,shared,[
b_c_pre=$shared_c_pre
@@ -220,14 +220,12 @@ ifelse($1,shared,[
dnl
dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
dnl
-dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
-dnl name of the array target-var directly, as well as whether
-dnl shared objects will be built from the sources.
-dnl
-dnl Should not be used directly.
+dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the name of the
+dnl array target-var directly, as well as whether shared objects will be built
+dnl from the sources. Should not be used directly.
dnl
AC_DEFUN([PHP_ADD_SOURCES_X],[
-dnl relative to source- or build-directory?
+dnl Relative to source- or build-directory?
dnl ac_srcdir/ac_bdir include trailing slash
case $1 in
""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
@@ -238,20 +236,20 @@ dnl ac_srcdir/ac_bdir include trailing slash
dnl how to build .. shared or static?
ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
-dnl iterate over the sources
+dnl Iterate over the sources.
old_IFS=[$]IFS
for ac_src in $2; do
-dnl remove the suffix
+dnl Remove the suffix.
IFS=.
set $ac_src
ac_obj=[$]1
IFS=$old_IFS
-dnl append to the array which has been dynamically chosen at m4 time
+dnl 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
+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" ;;
@@ -259,7 +257,7 @@ dnl choose the right compiler/flags/etc. for the source-file
*.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" ;;
esac
-dnl create a rule for the object/source combo
+dnl Create a rule for the object/source combo.
cat >>Makefile.objects<<EOF
$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
$ac_comp
@@ -267,14 +265,14 @@ EOF
done
])
-dnl -------------------------------------------------------------------------
-dnl Compiler characteristics checks
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Compiler characteristics checks.
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_RUNPATH_SWITCH
dnl
-dnl Checks for -R, etc. switch
+dnl Checks for -R, etc. switch.
dnl
AC_DEFUN([PHP_RUNPATH_SWITCH],[
AC_MSG_CHECKING([if compiler supports -R])
@@ -297,7 +295,7 @@ else
if test $php_cv_cc_rpath = "yes"; then
ld_runpath_switch=-Wl,-rpath,
else
- dnl something innocuous
+ dnl Something innocuous.
ld_runpath_switch=-L
fi
fi
@@ -333,7 +331,7 @@ AC_DEFUN([PHP_CHECK_GCC_ARG],[
dnl
dnl PHP_LIBGCC_LIBPATH(gcc)
dnl
-dnl Stores the location of libgcc in libgcc_libpath
+dnl Stores the location of libgcc in libgcc_libpath.
dnl
AC_DEFUN([PHP_LIBGCC_LIBPATH],[
changequote({,})
@@ -341,14 +339,14 @@ AC_DEFUN([PHP_LIBGCC_LIBPATH],[
changequote([,])
])
-dnl -------------------------------------------------------------------------
-dnl Macros to modify LIBS, INCLUDES, etc. variables
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Macros to modify LIBS, INCLUDES, etc. variables.
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_REMOVE_USR_LIB(NAME)
dnl
-dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME
+dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME.
dnl
AC_DEFUN([PHP_REMOVE_USR_LIB],[
unset ac_new_flags
@@ -364,9 +362,8 @@ AC_DEFUN([PHP_REMOVE_USR_LIB],[
dnl
dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
dnl
-dnl Use this macro, if you need to add libraries and or library search
-dnl paths to the PHP build system which are only given in compiler
-dnl notation.
+dnl Use this macro, if you need to add libraries and or library search paths to
+dnl the PHP build system which are only given in compiler notation.
dnl
AC_DEFUN([PHP_EVAL_LIBLINE],[
for ac_i in $1; do
@@ -393,8 +390,8 @@ AC_DEFUN([PHP_EVAL_LIBLINE],[
dnl
dnl PHP_EVAL_INCLINE(headerline)
dnl
-dnl Use this macro, if you need to add header search paths to the PHP
-dnl build system which are only given in compiler notation.
+dnl Use this macro, if you need to add header search paths to the PHP build
+dnl system which are only given in compiler notation.
dnl
AC_DEFUN([PHP_EVAL_INCLINE],[
for ac_i in $1; do
@@ -407,19 +404,23 @@ AC_DEFUN([PHP_EVAL_INCLINE],[
done
])
-dnl internal, don't use
+dnl
+dnl _PHP_ADD_LIBPATH_GLOBAL(variable)
+dnl
+dnl Internal, don't use.
+dnl
AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
PHP_RUN_ONCE(LIBPATH, $1, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
LDFLAGS="$LDFLAGS -L$1"
PHP_RPATHS="$PHP_RPATHS $1"
])
-])dnl
-dnl
+])
+
dnl
dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
dnl
-dnl Adds a path to linkpath/runpath (LDFLAGS)
+dnl Adds a path to linkpath/runpath (LDFLAGS).
dnl
AC_DEFUN([PHP_ADD_LIBPATH],[
if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
@@ -440,18 +441,18 @@ AC_DEFUN([PHP_ADD_LIBPATH],[
dnl
dnl PHP_UTILIZE_RPATHS()
dnl
-dnl builds RPATHS/LDFLAGS from PHP_RPATHS
+dnl Builds RPATHS/LDFLAGS from PHP_RPATHS.
dnl
AC_DEFUN([PHP_UTILIZE_RPATHS],[
OLD_RPATHS=$PHP_RPATHS
unset PHP_RPATHS
for i in $OLD_RPATHS; do
-dnl Can be passed to native cc/libtool
+ dnl Can be passed to native cc/libtool
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
-dnl Libtool-specific
+ dnl Libtool-specific
PHP_RPATHS="$PHP_RPATHS -R $i"
-dnl cc-specific
+ dnl cc-specific
NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
done
@@ -464,8 +465,7 @@ dnl cc-specific
dnl
dnl PHP_ADD_INCLUDE(path [,before])
dnl
-dnl add an include path.
-dnl if before is 1, add in the beginning of INCLUDES.
+dnl Add an include path. If before is 1, add in the beginning of INCLUDES.
dnl
AC_DEFUN([PHP_ADD_INCLUDE],[
if test "$1" != "/usr/include"; then
@@ -480,12 +480,20 @@ AC_DEFUN([PHP_ADD_INCLUDE],[
fi
])
-dnl internal, don't use
+dnl
+dnl _PHP_X_ADD_LIBRARY
+dnl
+dnl Internal, don't use.
+dnl
AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
-])dnl
+])
+
+dnl
+dnl _PHP_ADD_LIBRARY_SKELETON
+dnl
+dnl Internal, don't use.
dnl
-dnl internal, don't use
AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
case $1 in
c|c_r|pthread*[)] ;;
@@ -499,12 +507,12 @@ AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
fi
]) ;;
esac
-])dnl
-dnl
+])
+
dnl
dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
dnl
-dnl add a library to the link line
+dnl Add a library to the link line.
dnl
AC_DEFUN([PHP_ADD_LIBRARY],[
_PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
@@ -513,7 +521,7 @@ AC_DEFUN([PHP_ADD_LIBRARY],[
dnl
dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
dnl
-dnl add a library to the link line (deferred, not used during configure)
+dnl Add a library to the link line (deferred, not used during configure).
dnl
AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
_PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
@@ -522,9 +530,9 @@ AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
dnl
dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
dnl
-dnl add a library to the link line and path to linkpath/runpath.
-dnl if shared-libadd is not empty and $ext_shared is yes,
-dnl shared-libadd will be assigned the library information
+dnl Add a library to the link line and path to linkpath/runpath. If
+dnl shared-libadd is not empty and $ext_shared is yes, shared-libadd will be
+dnl assigned the library information.
dnl
AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
ifelse($3,,[
@@ -547,10 +555,9 @@ ifelse($3,,[
dnl
dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
dnl
-dnl add a library to the link line (deferred)
-dnl and path to linkpath/runpath (not deferred)
-dnl if shared-libadd is not empty and $ext_shared is yes,
-dnl shared-libadd will be assigned the library information
+dnl Add a library to the link line (deferred) and path to linkpath/runpath (not
+dnl deferred). If shared-libadd is not empty and $ext_shared is yes,
+dnl shared-libadd will be assigned the library information.
dnl
AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
ifelse($3,,[
@@ -573,9 +580,8 @@ ifelse($3,,[
dnl
dnl PHP_ADD_FRAMEWORK(framework [,before])
dnl
-dnl add a (Darwin / Mac OS X) framework to the link
-dnl line. if before is 1, the framework is added
-dnl to the beginning of the line.
+dnl Add a (Darwin / Mac OS X) framework to the link line. If before is 1, the
+dnl framework is added to the beginning of the line.
dnl
AC_DEFUN([PHP_ADD_FRAMEWORK], [
PHP_RUN_ONCE(FRAMEWORKS, $1, [
@@ -590,13 +596,11 @@ AC_DEFUN([PHP_ADD_FRAMEWORK], [
dnl
dnl PHP_ADD_FRAMEWORKPATH(path [,before])
dnl
-dnl add a (Darwin / Mac OS X) framework path to the link
-dnl and include lines. default paths include (but are
-dnl not limited to) /Local/Library/Frameworks and
-dnl /System/Library/Frameworks, so these don't need
-dnl to be specifically added. if before is 1, the
-dnl framework path is added to the beginning of the
-dnl relevant lines.
+dnl 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 and
+dnl /System/Library/Frameworks, so these don't need to be specifically added. If
+dnl before is 1, the framework path is added to the beginning of the relevant
+dnl lines.
dnl
AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
PHP_EXPAND_PATH($1, ai_p)
@@ -612,8 +616,8 @@ AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
dnl
dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
dnl
-dnl Adds a (Darwin / Mac OS X) framework path and the
-dnl framework itself to the link and include lines.
+dnl Adds a (Darwin / Mac OS X) framework path and the framework itself to the
+dnl link and include lines.
dnl
AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
PHP_ADD_FRAMEWORKPATH($2)
@@ -623,7 +627,7 @@ AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
dnl
dnl PHP_SET_LIBTOOL_VARIABLE(var)
dnl
-dnl Set libtool variable
+dnl Set libtool variable.
dnl
AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
if test -z "$LIBTOOL"; then
@@ -633,12 +637,15 @@ AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
fi
])
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl
dnl PHP_ARG_ANALYZE_EX
-dnl internal
+dnl
+dnl Internal.
+dnl
AC_DEFUN([PHP_ARG_ANALYZE_EX],[
ext_output="yes, shared"
ext_shared=yes
@@ -662,8 +669,11 @@ esac
PHP_ALWAYS_SHARED([$1])
])
+dnl
dnl PHP_ARG_ANALYZE
-dnl internal
+dnl
+dnl Internal.
+dnl
AC_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])])
@@ -671,19 +681,22 @@ ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
dnl
dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
+dnl
dnl 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,
-dnl and will overwrite any previous variable of that name.
-dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
-dnl the PHP_ARG_ANALYZE_EX.
+dnl default-val defaults to no. This will also set the variable ext_shared, and
+dnl will overwrite any previous variable of that name. If extension-or-not is
+dnl yes (default), then do the ENABLE_ALL check and run the PHP_ARG_ANALYZE_EX.
dnl
AC_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)])
])
+dnl
dnl PHP_REAL_ARG_WITH
-dnl internal
+dnl
+dnl Internal.
+dnl
AC_DEFUN([PHP_REAL_ARG_WITH],[
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
AC_ARG_WITH($1,[$3],$5=[$]withval,
@@ -696,19 +709,22 @@ PHP_ARG_ANALYZE($5,[$2],$6)
dnl
dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
+dnl
dnl 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,
-dnl and will overwrite any previous variable of that name.
-dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
-dnl the PHP_ARG_ANALYZE_EX.
+dnl default-val defaults to no. This will also set the variable ext_shared, and
+dnl will overwrite any previous variable of that name. If extension-or-not is
+dnl yes (default), then do the ENABLE_ALL check and run the PHP_ARG_ANALYZE_EX.
dnl
AC_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)])
])
+dnl
dnl PHP_REAL_ARG_ENABLE
-dnl internal
+dnl
+dnl Internal.
+dnl
AC_DEFUN([PHP_REAL_ARG_ENABLE],[
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
@@ -719,9 +735,9 @@ AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
PHP_ARG_ANALYZE($5,[$2],$6)
])
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl Build macros
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_BUILD_THREAD_SAFE
@@ -809,8 +825,8 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[
dnl
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
dnl
-dnl Basically sets up the link-stage for building module-name
-dnl from object_var in build-dir.
+dnl Basically sets up the link-stage for building module-name from object_var in
+dnl build-dir.
dnl
AC_DEFUN([PHP_SHARED_MODULE],[
install_modules="install-modules"
@@ -841,9 +857,8 @@ EOF
dnl
dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
dnl
-dnl Selects the SAPI name and type (static, shared, bundle, program)
-dnl and optionally also the source-files for the SAPI-specific
-dnl objects.
+dnl Selects the SAPI name and type (static, shared, bundle, program) and
+dnl optionally also the source-files for the SAPI-specific objects.
dnl
AC_DEFUN([PHP_SELECT_SAPI],[
if test "$2" = "program"; then
@@ -882,6 +897,9 @@ AC_DEFUN([PHP_SELECT_SAPI],[
])
])
+dnl
+dnl PHP_ADD_BUILD_DIR
+dnl
AC_DEFUN([PHP_ADD_BUILD_DIR],[
ifelse($2,,[
BUILD_DIR="$BUILD_DIR $1"
@@ -890,6 +908,9 @@ AC_DEFUN([PHP_ADD_BUILD_DIR],[
])
])
+dnl
+dnl PHP_GEN_BUILD_DIRS
+dnl
AC_DEFUN([PHP_GEN_BUILD_DIRS],[
$php_shtool mkdir -p $BUILD_DIR
])
@@ -900,13 +921,13 @@ dnl
dnl Includes an extension in the build.
dnl
dnl "extname" is the name of the extension.
-dnl "sources" is a list of files relative to the subdir which are used
-dnl to build the extension.
-dnl "shared" can be set to "shared" or "yes" to build the extension as
-dnl a dynamically loadable library. Optional parameter "sapi_class" can
-dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
-dnl "extra-cflags" are passed to the compiler, with
-dnl @ext_srcdir@ and @ext_builddir@ being substituted.
+dnl "sources" is a list of files relative to the subdir which are used to build
+dnl the extension.
+dnl "shared" can be set to "shared" or "yes" to build the extension as a
+dnl dynamically loadable library. Optional parameter "sapi_class" can be set to
+dnl "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@ being
+dnl 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],[
@@ -950,7 +971,7 @@ dnl ---------------------------------------------- CLI static module
fi
PHP_ADD_BUILD_DIR($ext_builddir)
-dnl Set for phpize builds only
+dnl Set for phpize builds only.
dnl ---------------------------
if test "$ext_builddir" = "."; then
PHP_PECL_EXTENSION=$1
@@ -961,9 +982,8 @@ dnl ---------------------------
dnl
dnl PHP_WITH_SHARED
dnl
-dnl Checks whether $withval is "shared" or starts with "shared,XXX"
-dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
-dnl from $withval.
+dnl Checks whether $withval is "shared" or starts with "shared,XXX" and sets
+dnl $shared to "yes" or "no", and removes "shared,?" stuff from $withval.
dnl
AC_DEFUN([PHP_WITH_SHARED],[
PHP_ARG_ANALYZE_EX(withval)
@@ -977,11 +997,10 @@ dnl
dnl This macro is scanned by genif.sh when it builds the internal functions
dnl list, so that modules can be init'd in the correct order
dnl $1 = name of extension, $2 = extension upon which it depends
-dnl $3 = optional: if true, it's ok for $2 to have not been configured
-dnl default is false and should halt the build.
-dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
-dnl The extension on which it depends must also have been configured.
-dnl See ADD_EXTENSION_DEP in win32 build
+dnl $3 = optional: if true, it's ok for $2 to have not been configured default
+dnl is false and should halt the build. To be effective, this macro must be
+dnl invoked *after* PHP_NEW_EXTENSION. The extension on which it depends must
+dnl also have been configured. See ADD_EXTENSION_DEP in win32 build.
dnl
AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
@@ -1001,17 +1020,18 @@ You've configured extension $1, which depends on extension $2,
but you've either not enabled $2, or have disabled it.
])
fi
- dnl Some systems require that we link $2 to $1 when building
+ dnl Some systems require that we link $2 to $1 when building.
])
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl Checks for structures, typedefs, broken functions, etc.
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
-dnl Internal helper macros
dnl
dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
dnl
+dnl Internal helper macro.
+dnl
AC_DEFUN([_PHP_CHECK_SIZEOF], [
php_cache_value=php_cv_sizeof_[]$1
AC_CACHE_VAL(php_cv_sizeof_[]$1, [
@@ -1090,8 +1110,8 @@ fi
dnl
dnl PHP_TIME_R_TYPE
dnl
-dnl Check type of reentrant time-related functions
-dnl Type can be: irix, hpux or POSIX
+dnl Check type of reentrant time-related functions. Type can be: irix, hpux or
+dnl POSIX.
dnl
AC_DEFUN([PHP_TIME_R_TYPE],[
AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
@@ -1143,7 +1163,9 @@ main() {
dnl
dnl PHP_DOES_PWRITE_WORK
-dnl internal
+dnl
+dnl Internal.
+dnl
AC_DEFUN([PHP_DOES_PWRITE_WORK],[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h>
@@ -1171,8 +1193,11 @@ $1
])
])
+dnl
dnl PHP_DOES_PREAD_WORK
-dnl internal
+dnl
+dnl Internal.
+dnl
AC_DEFUN([PHP_DOES_PREAD_WORK],[
echo test > conftest_in
AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -1337,7 +1362,7 @@ dnl
dnl PHP_SOCKADDR_CHECKS
dnl
AC_DEFUN([PHP_SOCKADDR_CHECKS], [
- dnl Check for struct sockaddr_storage exists
+ 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>]],
@@ -1347,7 +1372,7 @@ AC_DEFUN([PHP_SOCKADDR_CHECKS], [
if test "$ac_cv_sockaddr_storage" = "yes"; then
AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
fi
- dnl Check if field sa_len exists in struct sockaddr
+ dnl 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;]])],
@@ -1383,7 +1408,7 @@ dnl
dnl PHP_BROKEN_GETCWD
dnl
dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
-dnl component of the path has execute but not read permissions
+dnl component of the path has execute but not read permissions.
dnl
AC_DEFUN([PHP_BROKEN_GETCWD],[
AC_MSG_CHECKING([for broken getcwd])
@@ -1440,9 +1465,8 @@ AC_DEFUN([PHP_FOPENCOOKIE], [
AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
if test "$have_glibc_fopencookie" = "yes"; then
-dnl this comes in two flavors:
-dnl newer glibcs (since 2.1.2 ? )
-dnl have a type called cookie_io_functions_t
+dnl This comes in two flavors: newer glibcs (since 2.1.2?) have a type called
+dnl cookie_io_functions_t.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <stdio.h>
@@ -1452,7 +1476,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
cookie_io_functions_t=cookie_io_functions_t
have_fopen_cookie=yes
-dnl even newer glibcs have a different seeker definition...
+dnl Even newer glibcs have a different seeker definition.
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define _GNU_SOURCE
#include <stdio.h>
@@ -1491,8 +1515,7 @@ main() {
else
-dnl older glibc versions (up to 2.1.2 ?)
-dnl call it _IO_cookie_io_functions_t
+dnl 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>
@@ -1513,14 +1536,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
fi
])
-dnl -------------------------------------------------------------------------
-dnl Library/function existence and build sanity checks
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Library/function existence and build sanity checks.
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
dnl
-dnl Wrapper for AC_CHECK_LIB
+dnl Wrapper for AC_CHECK_LIB.
dnl
AC_DEFUN([PHP_CHECK_LIBRARY], [
save_old_LDFLAGS=$LDFLAGS
@@ -1544,14 +1567,14 @@ AC_DEFUN([PHP_CHECK_LIBRARY], [
dnl
dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
dnl
-dnl El cheapo wrapper for AC_CHECK_LIB
+dnl El cheapo wrapper for AC_CHECK_LIB.
dnl
AC_DEFUN([PHP_CHECK_FRAMEWORK], [
save_old_LDFLAGS=$LDFLAGS
LDFLAGS="-framework $1 $LDFLAGS"
- dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
- dnl rewriting AC_CHECK_LIB is overkill and this only affects
- dnl the "checking.." output anyway.
+ dnl Supplying "c" to AC_CHECK_LIB is technically cheating, but rewriting
+ dnl AC_CHECK_LIB is overkill and this only affects the "checking.." output
+ dnl anyway.
AC_CHECK_LIB(c,[$2],[
LDFLAGS=$save_old_LDFLAGS
$3
@@ -1564,18 +1587,21 @@ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
dnl
dnl PHP_CHECK_FUNC_LIB(func, libs)
dnl
-dnl This macro checks whether 'func' or '__func' exists
-dnl in the specified library.
-dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
-dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
-dnl
+dnl This macro checks whether 'func' or '__func' exists in the specified
+dnl library. Defines HAVE_func and HAVE_library if found and adds the library to
+dnl LIBS. This should be called in the ACTION-IF-NOT-FOUND part of
+dnl PHP_CHECK_FUNC.
dnl
dnl autoconf undefines the builtin "shift" :-(
-dnl If possible, we use the builtin shift anyway, otherwise we use
-dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
+dnl If possible, we use the builtin shift anyway, otherwise we use the ubercool
+dnl definition that has been tested so far with FreeBSD/GNU m4.
+dnl
ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
])
+
+dnl
+dnl PHP_CHECK_FUNC_LIB
dnl
AC_DEFUN([PHP_CHECK_FUNC_LIB],[
ifelse($2,,:,[
@@ -1607,9 +1633,9 @@ AC_DEFUN([PHP_CHECK_FUNC_LIB],[
dnl
dnl PHP_CHECK_FUNC(func, ...)
dnl
-dnl This macro checks whether 'func' or '__func' exists
-dnl in the default libraries and as a fall back in the specified library.
-dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
+dnl This macro checks whether 'func' or '__func' exists in the default libraries
+dnl and as a fall back in the specified library. Defines HAVE_func and
+dnl HAVE_library if found and adds the library to LIBS.
dnl
AC_DEFUN([PHP_CHECK_FUNC],[
unset ac_cv_func_$1
@@ -1655,18 +1681,18 @@ AC_DEFUN([PHP_TEST_BUILD], [
])
])
-dnl -------------------------------------------------------------------------
-dnl Platform characteristics checks
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Platform characteristics checks.
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_SHLIB_SUFFIX_NAMES
dnl
-dnl Determines link library suffix SHLIB_SUFFIX_NAME
-dnl which can be: .so, .sl or .dylib
+dnl Determines link library suffix SHLIB_SUFFIX_NAME which can be: .so, .sl or
+dnl .dylib
dnl
-dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
-dnl suffix can be: .so or .sl
+dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME suffix can be: .so or
+dnl .sl
dnl
AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
@@ -1689,7 +1715,7 @@ AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
dnl
dnl PHP_C_BIGENDIAN
dnl
-dnl Replacement macro for AC_C_BIGENDIAN
+dnl Replacement macro for AC_C_BIGENDIAN.
dnl
AC_DEFUN([PHP_C_BIGENDIAN],
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
@@ -1714,14 +1740,14 @@ int main(void)
fi
])
-dnl -------------------------------------------------------------------------
-dnl Checks for programs: PHP_PROG_<program>
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
+dnl Checks for programs: PHP_PROG_<program>.
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_PROG_SENDMAIL
dnl
-dnl Search for the sendmail binary
+dnl Search for the sendmail binary.
dnl
AC_DEFUN([PHP_PROG_SENDMAIL], [
PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
@@ -1732,7 +1758,7 @@ AC_DEFUN([PHP_PROG_SENDMAIL], [
dnl
dnl PHP_PROG_AWK
dnl
-dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
+dnl Some vendors force mawk before gawk; mawk is broken so we don't like that.
dnl
AC_DEFUN([PHP_PROG_AWK], [
AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
@@ -1882,14 +1908,14 @@ AC_DEFUN([PHP_PROG_RE2C],[
PHP_SUBST(RE2C)
])
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl Common setup macros: PHP_SETUP_<what>
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_SETUP_ICU([shared-add])
dnl
-dnl Common setup macro for ICU
+dnl Common setup macro for ICU.
dnl
AC_DEFUN([PHP_SETUP_ICU],[
PKG_CHECK_MODULES([ICU], [icu-uc >= 50.1 icu-io icu-i18n])
@@ -1908,12 +1934,12 @@ AC_DEFUN([PHP_SETUP_ICU],[
dnl
dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
dnl
-dnl Common setup macro for openssl
+dnl Common setup macro for openssl.
dnl
AC_DEFUN([PHP_SETUP_OPENSSL],[
found_openssl=no
- dnl Empty variable means 'no'
+ dnl Empty variable means 'no'.
test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
@@ -1932,13 +1958,13 @@ ifelse([$3],[],,[else $3])
dnl
dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
dnl
-dnl Common setup macro for iconv
+dnl Common setup macro for iconv.
dnl
AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=no
unset ICONV_DIR
- # Create the directories for a VPATH build:
+ dnl Create the directories for a VPATH build.
$php_shtool mkdir -p ext/iconv
echo > ext/iconv/php_have_bsd_iconv.h
@@ -1951,13 +1977,9 @@ AC_DEFUN([PHP_SETUP_ICONV], [
echo > ext/iconv/php_php_iconv_h_path.h
echo > ext/iconv/php_iconv_supports_errno.h
- dnl
- dnl Check libc first if no path is provided in --with-iconv
- dnl
-
+ dnl Check libc first if no path is provided in --with-iconv.
if test "$PHP_ICONV" = "yes"; then
- dnl Reset LIBS temporarily as it may have already been included
- dnl -liconv in.
+ dnl Reset LIBS temporarily as it may have already been included -liconv in.
LIBS_save="$LIBS"
LIBS=
AC_CHECK_FUNC(iconv, [
@@ -1972,9 +1994,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
LIBS="$LIBS_save"
fi
- dnl
- dnl Check external libs for iconv funcs
- dnl
+ dnl Check external libs for iconv funcs.
if test "$found_iconv" = "no"; then
for i in $PHP_ICONV /usr/local /usr; do
@@ -2031,7 +2051,7 @@ ifelse([$3],[],,[else $3])
dnl
dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
dnl
-dnl Common setup macro for libxml
+dnl Common setup macro for libxml.
dnl
AC_DEFUN([PHP_SETUP_LIBXML], [
PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.7.6])
@@ -2044,14 +2064,14 @@ AC_DEFUN([PHP_SETUP_LIBXML], [
$2
])
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl Misc. macros
-dnl -------------------------------------------------------------------------
+dnl ----------------------------------------------------------------------------
dnl
dnl PHP_INSTALL_HEADERS(path [, file ...])
dnl
-dnl PHP header files to be installed
+dnl PHP header files to be installed.
dnl
AC_DEFUN([PHP_INSTALL_HEADERS],[
ifelse([$2],[],[
@@ -2074,8 +2094,7 @@ AC_DEFUN([PHP_INSTALL_HEADERS],[
dnl
dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
dnl
-dnl This macro is used to get a comparable
-dnl version for apache1/2.
+dnl This macro is used to get a comparable version for apache1/2.
dnl
AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
ac_output=`$1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
@@ -2122,7 +2141,8 @@ X
dnl
dnl PHP_CONFIG_NICE(filename)
dnl
-dnl Generates the config.nice file
+dnl This macro creates script file with given filename which includes the last
+dnl configure command run by user. This file is named 'config.nice' in PHP.
dnl
AC_DEFUN([PHP_CONFIG_NICE],[
AC_REQUIRE([AC_PROG_EGREP])
@@ -2201,22 +2221,22 @@ AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
;;
esac
case $arg_name in
- # Allow --disable-all / --enable-all
+ dnl Allow --disable-all / --enable-all
enable-all[)];;
- # Allow certain libtool options
+ dnl 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
+ dnl Allow certain TSRM options
with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads [)];;
- # Allow certain Zend options
+ dnl 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_<arg_name> or php_with_<arg_name>
+ dnl All the rest must be set using the PHP_ARG_* macros. PHP_ARG_* macros
+ dnl set php_enable_<arg_name> or php_with_<arg_name>.
*[)]
- # Options that exist before PHP 6
+ dnl Options that exist before PHP 6
if test "$PHP_MAJOR_VERSION" -lt "6"; then
case $arg_name in
enable-zend-multibyte[)] continue;;
@@ -2256,7 +2276,9 @@ ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
dnl
dnl PHP_DETECT_ICC
-dnl Detect Intel C++ Compiler and unset $GCC if ICC found
+dnl
+dnl Detect Intel C++ Compiler and unset $GCC if ICC found.
+dnl
AC_DEFUN([PHP_DETECT_ICC],
[
ICC="no"
@@ -2270,9 +2292,12 @@ AC_DEFUN([PHP_DETECT_ICC],
)
])
+dnl
dnl PHP_DETECT_SUNCC
-dnl Detect if the systems default compiler is suncc.
-dnl We also set some useful CFLAGS if the user didn't set any
+dnl
+dnl Detect if the systems default compiler is suncc. We also set some useful
+dnl CFLAGS if the user didn't set any.
+dnl
AC_DEFUN([PHP_DETECT_SUNCC],[
SUNCC="no"
AC_MSG_CHECKING([for suncc])
@@ -2289,8 +2314,9 @@ AC_DEFUN([PHP_DETECT_SUNCC],[
dnl
dnl PHP_CRYPT_R_STYLE
-dnl detect the style of crypt_r() is any is available
-dnl see APR_CHECK_CRYPT_R_STYLE() for original version
+dnl
+dnl Detect the style of crypt_r() is any is available see
+dnl APR_CHECK_CRYPT_R_STYLE() for original version.
dnl
AC_DEFUN([PHP_CRYPT_R_STYLE],
[
@@ -2376,14 +2402,14 @@ dnl
dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])
dnl
AC_DEFUN([PHP_INIT_DTRACE],[
-dnl Set paths properly when called from extension
+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/";;
esac
-dnl providerdesc
+dnl providerdesc.
ac_provsrc=$1
old_IFS=[$]IFS
IFS=.
@@ -2391,10 +2417,10 @@ dnl providerdesc
ac_provobj=[$]1
IFS=$old_IFS
-dnl header-file
+dnl header-file.
ac_hdrobj=$2
-dnl Add providerdesc.o or .lo into global objects when needed
+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.o"
@@ -2408,7 +2434,7 @@ dnl Add providerdesc.o or .lo into global objects when needed
;;
esac
-dnl DTrace objects
+dnl DTrace objects.
old_IFS=[$]IFS
for ac_src in $3; do
IFS=.
@@ -2430,9 +2456,9 @@ dnl DTrace objects
;;
esac
-dnl Generate Makefile.objects entries
-dnl The empty $ac_provsrc command stops an implicit circular dependency
-dnl in GNU Make which causes the .d file to be overwritten (Bug 61268)
+dnl Generate Makefile.objects entries. The empty $ac_provsrc command stops an
+dnl implicit circular dependency in GNU Make which causes the .d file to be
+dnl overwritten (Bug 61268).
cat>>Makefile.objects<<EOF
$abs_srcdir/$ac_provsrc:;
@@ -2453,7 +2479,7 @@ EOF
for ac_lo in $PHP_DTRACE_OBJS; do
dtrace_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)
+ 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" > \$[]@
@@ -2501,7 +2527,9 @@ AC_DEFUN([PHP_CHECK_STDINT_TYPES], [
])
])
+dnl
dnl PHP_CHECK_BUILTIN_EXPECT
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_EXPECT], [
AC_MSG_CHECKING([for __builtin_expect])
@@ -2516,10 +2544,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_EXPECT], [
])
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_EXPECT], [$have_builtin_expect], [Whether the compiler supports __builtin_expect])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_CLZ
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_CLZ], [
AC_MSG_CHECKING([for __builtin_clz])
@@ -2534,10 +2563,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CLZ], [
])
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CLZ], [$have_builtin_clz], [Whether the compiler supports __builtin_clz])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_CTZL
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_CTZL], [
AC_MSG_CHECKING([for __builtin_ctzl])
@@ -2552,10 +2582,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CTZL], [
])
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZL], [$have_builtin_ctzl], [Whether the compiler supports __builtin_ctzl])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_CTZLL
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_CTZLL], [
AC_MSG_CHECKING([for __builtin_ctzll])
@@ -2570,10 +2601,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CTZLL], [
])
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZLL], [$have_builtin_ctzll], [Whether the compiler supports __builtin_ctzll])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_SMULL_OVERFLOW
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_SMULL_OVERFLOW], [
AC_MSG_CHECKING([for __builtin_smull_overflow])
@@ -2590,10 +2622,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SMULL_OVERFLOW], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SMULL_OVERFLOW],
[$have_builtin_smull_overflow], [Whether the compiler supports __builtin_smull_overflow])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_SMULLL_OVERFLOW
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_SMULLL_OVERFLOW], [
AC_MSG_CHECKING([for __builtin_smulll_overflow])
@@ -2610,10 +2643,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SMULLL_OVERFLOW], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SMULLL_OVERFLOW],
[$have_builtin_smulll_overflow], [Whether the compiler supports __builtin_smulll_overflow])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_SADDL_OVERFLOW
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_SADDL_OVERFLOW], [
AC_MSG_CHECKING([for __builtin_saddl_overflow])
@@ -2630,10 +2664,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SADDL_OVERFLOW], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SADDL_OVERFLOW],
[$have_builtin_saddl_overflow], [Whether the compiler supports __builtin_saddl_overflow])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_SADDLL_OVERFLOW
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_SADDLL_OVERFLOW], [
AC_MSG_CHECKING([for __builtin_saddll_overflow])
@@ -2650,10 +2685,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SADDLL_OVERFLOW], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SADDLL_OVERFLOW],
[$have_builtin_saddll_overflow], [Whether the compiler supports __builtin_saddll_overflow])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_SSUBL_OVERFLOW
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_SSUBL_OVERFLOW], [
AC_MSG_CHECKING([for __builtin_ssubl_overflow])
@@ -2670,10 +2706,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SSUBL_OVERFLOW], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SSUBL_OVERFLOW],
[$have_builtin_ssubl_overflow], [Whether the compiler supports __builtin_ssubl_overflow])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW], [
AC_MSG_CHECKING([for __builtin_ssubll_overflow])
@@ -2690,10 +2727,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SSUBLL_OVERFLOW],
[$have_builtin_ssubll_overflow], [Whether the compiler supports __builtin_ssubll_overflow])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_CPU_INIT
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_CPU_INIT], [
AC_MSG_CHECKING([for __builtin_cpu_init])
@@ -2709,10 +2747,11 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CPU_INIT], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CPU_INIT],
[$have_builtin_cpu_init], [Whether the compiler supports __builtin_cpu_init])
-
])
+dnl
dnl PHP_CHECK_BUILTIN_CPU_SUPPORTS
+dnl
AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [
AC_MSG_CHECKING([for __builtin_cpu_supports])
@@ -2730,7 +2769,9 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [
[$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports])
])
+dnl
dnl PHP_CHECK_CPU_SUPPORTS
+dnl
AC_DEFUN([PHP_CHECK_CPU_SUPPORTS], [
AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_INIT])
AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_SUPPORTS])