From 75fb74860da7decd94432a4d211795310308a4a8 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 12 May 2019 18:43:03 +0200 Subject: [PATCH] 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 --- TSRM/threads.m4 | 25 +- TSRM/tsrm.m4 | 29 +- Zend/Zend.m4 | 46 +-- build/php.m4 | 519 ++++++++++++++++++---------------- configure.ac | 222 +++++++-------- ext/bcmath/config.m4 | 2 - ext/bz2/config.m4 | 2 - ext/calendar/config.m4 | 2 - ext/ctype/config.m4 | 2 - ext/curl/config.m4 | 2 - ext/date/config0.m4 | 2 - ext/dba/config.m4 | 30 +- ext/dom/config.m4 | 2 - ext/enchant/config.m4 | 2 - ext/exif/config.m4 | 2 - ext/ffi/config.m4 | 2 - ext/fileinfo/config.m4 | 2 - ext/filter/config.m4 | 2 - ext/ftp/config.m4 | 2 - ext/gd/config.m4 | 3 - ext/gettext/config.m4 | 2 - ext/hash/config.m4 | 2 - ext/iconv/config.m4 | 2 - ext/imap/config.m4 | 2 - ext/intl/config.m4 | 2 - ext/json/config.m4 | 2 - ext/ldap/config.m4 | 18 +- ext/libxml/config0.m4 | 2 - ext/mbstring/config.m4 | 2 - ext/mysqli/config.m4 | 2 - ext/mysqlnd/config9.m4 | 2 - ext/oci8/config.m4 | 75 ++--- ext/odbc/config.m4 | 17 +- ext/opcache/config.m4 | 2 - ext/openssl/config0.m4 | 2 - ext/pcntl/config.m4 | 2 - ext/pcre/config0.m4 | 7 +- ext/pdo/config.m4 | 2 - ext/pdo_dblib/config.m4 | 2 - ext/pdo_mysql/config.m4 | 6 +- ext/pdo_oci/config.m4 | 11 +- ext/pdo_odbc/config.m4 | 6 +- ext/pdo_pgsql/config.m4 | 2 - ext/pdo_sqlite/config.m4 | 14 +- ext/pgsql/config.m4 | 2 - ext/phar/config.m4 | 2 - ext/posix/config.m4 | 2 - ext/pspell/config.m4 | 2 - ext/readline/config.m4 | 5 +- ext/recode/config.m4 | 2 - ext/recode/config9.m4 | 2 - ext/reflection/config.m4 | 2 - ext/session/config.m4 | 2 - ext/shmop/config.m4 | 2 - ext/simplexml/config.m4 | 2 - ext/skeleton/config.m4.in | 8 +- ext/snmp/config.m4 | 2 - ext/soap/config.m4 | 2 - ext/sockets/config.m4 | 2 - ext/sodium/config.m4 | 2 - ext/spl/config.m4 | 8 +- ext/sqlite3/config0.m4 | 2 - ext/standard/config.m4 | 11 +- ext/sysvmsg/config.m4 | 2 - ext/sysvsem/config.m4 | 2 - ext/sysvshm/config.m4 | 2 - ext/tidy/config.m4 | 9 +- ext/tokenizer/config.m4 | 2 - ext/xml/config.m4 | 2 - ext/xmlreader/config.m4 | 2 - ext/xmlrpc/config.m4 | 8 +- ext/xmlwriter/config.m4 | 2 - ext/xsl/config.m4 | 2 - ext/zip/config.m4 | 2 - ext/zlib/config0.m4 | 2 - sapi/apache2handler/config.m4 | 13 +- sapi/cgi/config9.m4 | 12 +- sapi/cli/config.m4 | 10 +- sapi/embed/config.m4 | 2 - sapi/fpm/config.m4 | 16 +- sapi/litespeed/config.m4 | 2 - sapi/phpdbg/config.m4 | 2 - scripts/phpize.m4 | 25 +- 83 files changed, 568 insertions(+), 699 deletions(-) diff --git a/TSRM/threads.m4 b/TSRM/threads.m4 index 55864c8982..dde7f17257 100644 --- a/TSRM/threads.m4 +++ b/TSRM/threads.m4 @@ -28,7 +28,7 @@ dnl OF THE POSSIBILITY OF SUCH DAMAGE. dnl dnl PTHREADS_FLAGS dnl -dnl Set some magic defines to achieve POSIX threads conformance +dnl Set some magic defines to achieve POSIX threads conformance. dnl AC_DEFUN([PTHREADS_FLAGS],[ if test -z "$host_alias" && test -n "$host"; then @@ -52,18 +52,17 @@ AC_DEFUN([PTHREADS_FLAGS],[ PTHREAD_FLAGS=-D_REENTRANT;; *sco*) PTHREAD_FLAGS=-D_REENTRANT;; -dnl Solves sigwait() problem, creates problems with u_long etc. -dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";; esac if test -n "$PTHREAD_FLAGS"; then CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS" fi -])dnl +]) + dnl dnl PTHREADS_CHECK_COMPILE dnl -dnl Check whether the current setup can use POSIX threads calls +dnl Check whether the current setup can use POSIX threads calls. dnl AC_DEFUN([PTHREADS_CHECK_COMPILE], [ AC_LINK_IFELSE([ AC_LANG_SOURCE([ @@ -85,11 +84,12 @@ int main() { ], [ pthreads_checked=no ] -) ] )dnl +) ] ) + dnl -dnl PTHREADS_CHECK() +dnl PTHREADS_CHECK dnl -dnl Try to find a way to enable POSIX threads +dnl Try to find a way to enable POSIX threads. dnl dnl Magic flags dnl -kthread gcc (FreeBSD) @@ -102,7 +102,6 @@ dnl -qthreaded AIX cc V5 dnl -threads gcc (HP-UX) dnl AC_DEFUN([PTHREADS_CHECK],[ - save_CFLAGS=$CFLAGS save_LIBS=$LIBS PTHREADS_ASSIGN_VARS @@ -151,8 +150,12 @@ if test "$pthreads_working" = "yes"; then else threads_result="POSIX-Threads not found" fi -])dnl +]) + dnl +dnl PTHREADS_ASSIGN_VARS +dnl +dnl Adds pthreads linker and compiler flags. dnl AC_DEFUN([PTHREADS_ASSIGN_VARS],[ if test -n "$ac_cv_pthreads_lib"; then @@ -162,4 +165,4 @@ fi if test -n "$ac_cv_pthreads_cflags"; then CFLAGS="$CFLAGS $ac_cv_pthreads_cflags" fi -])dnl +]) diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4 index a075001b5a..f269abf8a6 100644 --- a/TSRM/tsrm.m4 +++ b/TSRM/tsrm.m4 @@ -1,13 +1,19 @@ -AC_DEFUN([TSRM_BASIC_CHECKS],[ +dnl This file contains TSRM specific autoconf macros. +dnl +dnl TSRM_BASIC_CHECKS +dnl +AC_DEFUN([TSRM_BASIC_CHECKS],[ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_CHECK_FUNCS(sigprocmask) ]) +dnl +dnl TSRM_CHECK_PTH +dnl AC_DEFUN([TSRM_CHECK_PTH],[ - AC_MSG_CHECKING(for GNU Pth) PTH_PREFIX="`$1 --prefix`" if test -z "$PTH_PREFIX"; then @@ -20,9 +26,11 @@ LIBS="$LIBS `$1 --libs`" AC_DEFINE(GNUPTH, 1, [Whether you use GNU Pth]) AC_MSG_RESULT(yes - installed in $PTH_PREFIX) - ]) +dnl +dnl TSRM_CHECK_ST +dnl AC_DEFUN([TSRM_CHECK_ST],[ if test -r "$1/include/st.h"; then CPPFLAGS="$CPPFLAGS -I$1/include" @@ -40,8 +48,10 @@ AC_DEFUN([TSRM_CHECK_ST],[ AC_DEFINE(TSRM_ST, 1, [ ]) ]) +dnl +dnl TSRM_CHECK_PTHREADS +dnl AC_DEFUN([TSRM_CHECK_PTHREADS],[ - PTHREADS_CHECK if test "$pthreads_working" != "yes"; then @@ -54,11 +64,13 @@ AC_MSG_CHECKING(for POSIX threads) AC_MSG_RESULT(yes) ]) +dnl +dnl TSRM_THREADS_CHECKS +dnl +dnl For the thread implementations, we always use --with-* to maintain +dnl consistency. +dnl AC_DEFUN([TSRM_THREADS_CHECKS],[ - -dnl For the thread implementations, we always use --with-* -dnl to maintain consistency - AC_ARG_WITH([tsrm-pth], [AS_HELP_STRING([[--with-tsrm-pth[=pth-config]]], [Use GNU Pth])], @@ -86,5 +98,4 @@ elif test "$TSRM_ST" != "no"; then elif test "$TSRM_PTHREADS" != "no"; then TSRM_CHECK_PTHREADS fi - ]) diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index ebebb355cb..0c6014bc64 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -1,9 +1,11 @@ +dnl This file contains Zend specific autoconf macros. + dnl -dnl This file contains Zend specific autoconf functions. +dnl ZEND_CHECK_FLOAT_PRECISION dnl - dnl x87 floating point internal precision control checks dnl See: http://wiki.php.net/rfc/rounding +dnl AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ AC_MSG_CHECKING([for usable _FPU_SETCW]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @@ -116,6 +118,11 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ fi ]) +dnl +dnl LIBZEND_BASIC_CHECKS +dnl +dnl Basic checks specific for the Zend engine library. +dnl AC_DEFUN([LIBZEND_BASIC_CHECKS],[ AC_REQUIRE([AC_PROG_CC]) @@ -130,10 +137,12 @@ unix.h \ cpuid.h \ dlfcn.h) -AC_DEFUN([LIBZEND_DLSYM_CHECK],[ +dnl +dnl LIBZEND_DLSYM_CHECK dnl dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name. dnl +AC_DEFUN([LIBZEND_DLSYM_CHECK],[ AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names]) _LT_AC_TRY_DLOPEN_SELF([ AC_MSG_RESULT(no) @@ -152,7 +161,7 @@ AC_CHECK_DECLS([isfinite, isnan, isinf], [], [], [[#include ]]) ZEND_CHECK_FLOAT_PRECISION -dnl test whether double cast to long preserves least significant bits +dnl Test whether double cast to long preserves least significant bits. AC_MSG_CHECKING(whether double cast to long preserves least significant bits) AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -186,6 +195,9 @@ int main() ]) +dnl +dnl LIBZEND_OTHER_CHECKS +dnl AC_DEFUN([LIBZEND_OTHER_CHECKS],[ AC_ARG_ENABLE([maintainer-zts], @@ -247,8 +259,8 @@ else AC_MSG_RESULT(no) fi -dnl test and set the alignment define for ZEND_MM -dnl this also does the logarithmic test for ZEND_MM. +dnl Test and set the alignment define for ZEND_MM. This also does the +dnl logarithmic test for ZEND_MM. AC_MSG_CHECKING(for MM alignment and log values) AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -289,7 +301,7 @@ int main() AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ]) AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ]) ], [], [ - dnl cross-compile needs something here + dnl Cross compilation needs something here. LIBZEND_MM_ALIGN=8 ]) @@ -392,9 +404,7 @@ else fi AC_MSG_RESULT($ZEND_GCC_GLOBAL_REGS) -dnl -dnl Check if atof() accepts NAN -dnl +dnl Check if atof() accepts NAN. AC_CACHE_CHECK(whether atof() accepts NAN, ac_cv_atof_accept_nan,[ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -423,9 +433,7 @@ if test "$ac_cv_atof_accept_nan" = "yes"; then AC_DEFINE([HAVE_ATOF_ACCEPTS_NAN], 1, [whether atof() accepts NAN]) fi -dnl -dnl Check if atof() accepts INF -dnl +dnl Check if atof() accepts INF. AC_CACHE_CHECK(whether atof() accepts INF, ac_cv_atof_accept_inf,[ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -457,9 +465,7 @@ if test "$ac_cv_atof_accept_inf" = "yes"; then AC_DEFINE([HAVE_ATOF_ACCEPTS_INF], 1, [whether atof() accepts INF]) fi -dnl -dnl Check if HUGE_VAL == INF -dnl +dnl Check if HUGE_VAL == INF. AC_CACHE_CHECK(whether HUGE_VAL == INF, ac_cv_huge_val_inf,[ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -492,9 +498,7 @@ if test "$ac_cv_huge_val_inf" = "yes"; then AC_DEFINE([HAVE_HUGE_VAL_INF], 1, [whether HUGE_VAL == INF]) fi -dnl -dnl Check if HUGE_VAL + -HUGEVAL == NAN -dnl +dnl Check if HUGE_VAL + -HUGEVAL == NAN. AC_CACHE_CHECK(whether HUGE_VAL + -HUGEVAL == NAN, ac_cv_huge_val_nan,[ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -529,9 +533,7 @@ if test "$ac_cv_huge_val_nan" = "yes"; then AC_DEFINE([HAVE_HUGE_VAL_NAN], 1, [whether HUGE_VAL + -HUGEVAL == NAN]) fi -dnl -dnl Check whether __cpuid_count is available -dnl +dnl Check whether __cpuid_count is available. AC_CACHE_CHECK(whether __cpuid_count is available, ac_cv_cpuid_count_available, [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include 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< @@ -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 #include ]], @@ -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 #include ]], [[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 @@ -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 @@ -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 @@ -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_ -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- +dnl Checks for programs: PHP_PROG_. +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_ -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_ or php_with_ + dnl All the rest must be set using the PHP_ARG_* macros. PHP_ARG_* macros + dnl set php_enable_ or php_with_. *[)] - # 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<>Makefile.objects< \$[]@ @@ -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]) diff --git a/configure.ac b/configure.ac index 13fc7f129e..f4a01e1e49 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ -dnl ## Process this file with autoconf to produce a configure script. +dnl Process this file with autoconf to produce a configure script. dnl Include external macro definitions before the AC_INIT to also remove dnl comments starting with # and empty newlines from the included files. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- m4_include([build/ax_check_compile_flag.m4]) m4_include([build/ax_func_which_gethostbyname_r.m4]) m4_include([build/ax_gcc_func_attribute.m4]) @@ -12,7 +12,7 @@ m4_include([build/php.m4]) m4_include([build/pkg.m4]) dnl Basic autoconf initialization, generation of config.nice. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) AC_INIT([PHP],[7.4.0-dev],[https://bugs.php.net],[php],[https://www.php.net]) @@ -117,20 +117,20 @@ PHP_EXTRA_VERSION=[$]4 PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` -dnl Allow version values to be used in Makefile +dnl Allow version values to be used in Makefile. PHP_SUBST(PHP_MAJOR_VERSION) PHP_SUBST(PHP_MINOR_VERSION) PHP_SUBST(PHP_RELEASE_VERSION) PHP_SUBST(PHP_EXTRA_VERSION) -dnl Define where extension directories are located in the configure context +dnl Define where extension directories are located in the configure context. AC_DEFUN([PHP_EXT_BUILDDIR],[$config_m4_dir])dnl AC_DEFUN([PHP_EXT_DIR],[$config_m4_dir])dnl AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/$config_m4_dir])dnl AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl dnl Setting up the PHP version based on the information above. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- echo "/* automatically generated by configure */" > php_version.h.new echo "/* edit configure.ac to change version number */" >> php_version.h.new @@ -149,7 +149,7 @@ else fi dnl Settings we want to make before the checks. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- php_shtool=$srcdir/build/shtool T_MD=`$php_shtool echo -n -e %B` @@ -166,16 +166,15 @@ abs_builddir=`pwd` php_abs_top_srcdir=$abs_srcdir php_abs_top_builddir=$abs_builddir -dnl Because ``make install'' is often performed by the superuser, -dnl we create the libs subdirectory as the user who configures PHP. -dnl Otherwise, the current user will not be able to delete libs -dnl or the contents of libs. +dnl Because `make install` is often performed by the superuser, we create the +dnl libs subdirectory as the user who configures PHP. Otherwise, the current +dnl user will not be able to delete libs or the contents of libs. $php_shtool mkdir -p libs rm -f libs/* dnl Checks for programs. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- PKG_PROG_PKG_CONFIG AC_PROG_CC([cc gcc]) @@ -185,7 +184,7 @@ AC_PROG_CPP AC_USE_SYSTEM_EXTENSIONS AC_PROG_LN_S -dnl Support systems with system libraries in e.g. /usr/lib64 +dnl Support systems with system libraries in e.g. /usr/lib64. PHP_ARG_WITH([libdir], [for system library directory], [AS_HELP_STRING([--with-libdir=NAME], @@ -200,10 +199,10 @@ PHP_ARG_ENABLE([rpath], [yes], [no]) -dnl check for -R, etc. switch +dnl Check for -R, etc. switch. PHP_RUNPATH_SWITCH -dnl Checks for some support/generator progs +dnl Checks for some support/generator progs. PHP_PROG_AWK PHP_PROG_BISON([3.0.0]) PHP_PROG_RE2C([0.13.4]) @@ -241,7 +240,7 @@ fi PHP_SUBST(RE2C_FLAGS) dnl Platform-specific compile settings. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- dnl See bug #28605 case $host_cpu in @@ -297,8 +296,8 @@ case $host_alias in ;; esac -# Disable PIC mode by default where it is known to be safe to do so, -# to avoid the performance hit from the lost register +dnl Disable PIC mode by default where it is known to be safe to do so, to avoid +dnl the performance hit from the lost register. AC_MSG_CHECKING([whether to force non-PIC code in shared modules]) case $host_alias in i?86-*-linux*|i?86-*-freebsd*) @@ -314,16 +313,14 @@ case $host_alias in ;; esac - dnl Include Zend and TSRM configurations. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- sinclude(Zend/Zend.m4) sinclude(TSRM/threads.m4) sinclude(TSRM/tsrm.m4) -dnl . -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- PTHREADS_CHECK PHP_HELP_SEPARATOR([SAPI modules:]) @@ -331,11 +328,10 @@ PHP_SHLIB_SUFFIX_NAMES PHP_BUILD_PROGRAM PHP_SAPI=none - dnl SAPI configuration. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- -dnl paths to the targets are relative to the build directory +dnl Paths to the targets are relative to the build directory. SAPI_SHARED=libs/libphp[]$PHP_MAJOR_VERSION[.]$SHLIB_DL_SUFFIX_NAME SAPI_STATIC=libs/libphp[]$PHP_MAJOR_VERSION[.a] SAPI_LIBTOOL=libphp[]$PHP_MAJOR_VERSION[.la] @@ -344,11 +340,11 @@ PHP_CONFIGURE_PART(Configuring SAPI modules) esyscmd(./build/config-stubs sapi) -dnl Show which main SAPI was selected +dnl Show which main SAPI was selected. AC_MSG_CHECKING([for chosen SAPI module]) AC_MSG_RESULT([$PHP_SAPI]) -dnl Show which binaries were selected +dnl Show which binaries were selected. AC_MSG_CHECKING([for executable SAPI binaries]) if test "$PHP_BINARIES"; then AC_MSG_RESULT([$PHP_BINARIES]) @@ -356,50 +352,48 @@ else AC_MSG_RESULT([none]) fi -dnl Exit early +dnl Exit early. if test -z "$PHP_INSTALLED_SAPIS"; then AC_MSG_ERROR([Nothing to build.]) fi -dnl force ZTS +dnl Force ZTS. if test "$enable_maintainer_zts" = "yes"; then PTHREADS_ASSIGN_VARS PTHREADS_FLAGS fi dnl Starting system checks. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- PHP_CONFIGURE_PART(Running system checks) -dnl Find sendmail binary +dnl Find sendmail binary. PHP_PROG_SENDMAIL -dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset +dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset. PHP_EBCDIC -dnl Check whether the system byte ordering is bigendian +dnl Check whether the system byte ordering is bigendian. PHP_C_BIGENDIAN -dnl Check whether writing to stdout works +dnl Check whether writing to stdout works. PHP_TEST_WRITE_STDOUT -dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary -dnl and source packages. This should be harmless on other OSs. +dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary and +dnl source packages. This should be harmless on other OSs. if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then CPPFLAGS="$CPPFLAGS -I/usr/pkg/include" LDFLAGS="$LDFLAGS -L/usr/pkg/lib" fi test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib) - dnl First, library checks. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- -dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try -dnl to avoid -lnsl checks, if we already have the functions which -dnl are usually in libnsl -dnl Also, uClibc will bark at linking with glibc's libnsl. +dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try to avoid -lnsl +dnl checks, if we already have the functions which are usually in libnsl. Also, +dnl uClibc will bark at linking with glibc's libnsl. PHP_CHECK_FUNC(socket, socket) PHP_CHECK_FUNC(socketpair, socket) @@ -414,14 +408,13 @@ if test "$ac_cv_func_dlopen" = "yes"; then fi AC_CHECK_LIB(m, sin) -dnl Check for inet_aton -dnl in -lc, -lbind and -lresolv +dnl Check for inet_aton in -lc, -lbind and -lresolv. PHP_CHECK_FUNC(inet_aton, resolv, bind) dnl Then headers. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- -dnl QNX requires unix.h to allow functions in libunix to work properly +dnl QNX requires unix.h to allow functions in libunix to work properly. AC_CHECK_HEADERS([ \ inttypes.h \ stdint.h \ @@ -500,7 +493,7 @@ if test "$GCC" = "yes"; then fi dnl Checks for typedefs, structures, and compiler characteristics. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- AC_STRUCT_TIMEZONE @@ -509,12 +502,12 @@ PHP_MISSING_FCLOSE_DECL PHP_STRUCT_FLOCK PHP_SOCKLEN_T -dnl These are defined elsewhere than stdio.h +dnl These are defined elsewhere than stdio.h. PHP_CHECK_SIZEOF(intmax_t, 0) PHP_CHECK_SIZEOF(ssize_t, 8) PHP_CHECK_SIZEOF(ptrdiff_t, 8) -dnl Check stdint types (must be after header check) +dnl Check stdint types (must be after header check). PHP_CHECK_STDINT_TYPES dnl Check __builtin_expect @@ -542,17 +535,17 @@ PHP_CHECK_BUILTIN_CPU_INIT dnl Check __builtin_cpu_supports PHP_CHECK_BUILTIN_CPU_SUPPORTS -dnl Check instructions +dnl Check instructions. PHP_CHECK_CPU_SUPPORTS([ssse3]) PHP_CHECK_CPU_SUPPORTS([sse4.2]) PHP_CHECK_CPU_SUPPORTS([avx]) PHP_CHECK_CPU_SUPPORTS([avx2]) -dnl Check for structure members +dnl Check for structure members. AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include ]) AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev]) -dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exist -dnl The WARNING_LEVEL required because cc in QNX hates -w option without an argument +dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exist. The +dnl WARNING_LEVEL required because cc in QNX hates -w option without an argument if test "`uname -s 2>/dev/null`" != "QNX"; then AC_STRUCT_ST_BLOCKS else @@ -560,15 +553,15 @@ else WARNING_LEVEL=0 fi -dnl Checks for types +dnl Checks for types. AC_TYPE_SIZE_T AC_TYPE_UID_T -dnl Checks for sockaddr_storage and sockaddr.sa_len +dnl Checks for sockaddr_storage and sockaddr.sa_len. PHP_SOCKADDR_CHECKS dnl Checks for GCC function attributes on all systems except ones without glibc -dnl Fix for these systems is already included in GCC 7, but not on GCC 6 +dnl Fix for these systems is already included in GCC 7, but not on GCC 6. dnl dnl At least some versions of FreeBSD seem to have buggy ifunc support, see dnl bug #77284. Conservatively don't use ifuncs on FreeBSD. @@ -577,7 +570,7 @@ AS_CASE([$host_alias], [*-*-*android*|*-*-*uclibc*|*-*-*musl*|*freebsd*], [true] AX_GCC_FUNC_ATTRIBUTE([target]) ]) -dnl Check for IPv6 support +dnl Check for IPv6 support. AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include @@ -585,7 +578,7 @@ AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support, [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])]) dnl Checks for library functions. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- AC_CHECK_FUNCS( alphasort \ @@ -667,11 +660,11 @@ nanosleep \ AX_FUNC_WHICH_GETHOSTBYNAME_R -dnl Some systems (like OpenSolaris) do not have nanosleep in libc +dnl Some systems (like OpenSolaris) do not have nanosleep in libc. PHP_CHECK_FUNC_LIB(nanosleep, rt) -dnl Check for getaddrinfo, should be a better way, but... -dnl Also check for working getaddrinfo +dnl Check for getaddrinfo, should be a better way, but... Also check for working +dnl getaddrinfo. AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);]])],[AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -716,7 +709,7 @@ if test "$ac_cv_func_getaddrinfo" = yes; then AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function]) fi -dnl Check for the __sync_fetch_and_add builtin +dnl Check for the __sync_fetch_and_add builtin. AC_CACHE_CHECK([for __sync_fetch_and_add], ac_cv_func_sync_fetch_and_add, [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[int x;__sync_fetch_and_add(&x,1);]])],[ac_cv_func_sync_fetch_and_add=yes],[ac_cv_func_sync_fetch_and_add=no])]) if test "$ac_cv_func_sync_fetch_and_add" = yes; then @@ -733,7 +726,7 @@ if test "x$php_crypt_r" = "x1"; then PHP_CRYPT_R_STYLE fi -dnl Check for asm goto support +dnl Check for asm goto support. AC_CACHE_CHECK([for asm goto], ac_cv__asm_goto, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(void) { @@ -751,7 +744,7 @@ if test "$ac_cv__asm_goto" = yes; then AC_DEFINE(HAVE_ASM_GOTO,1,[Define if asm goto support]) fi -dnl Check for variable length array support +dnl Check for variable length array support. AC_CACHE_CHECK([whether compiler supports VLA], ac_cv__compiler_c99_vla, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -765,7 +758,7 @@ if test "$ac_cv__compiler_c99_vla" = yes; then AC_DEFINE(HAVE_COMPILER_C99_VLA, 1, [Compiler supports VLA]) fi -dnl Check valgrind support +dnl Check valgrind support. PHP_ARG_WITH([valgrind], [whether to enable valgrind support], [AS_HELP_STRING([--with-valgrind=DIR], @@ -800,7 +793,7 @@ if test "$PHP_VALGRIND" != "no"; then fi dnl General settings. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- PHP_CONFIGURE_PART(General settings) PHP_HELP_SEPARATOR([General settings:]) @@ -818,7 +811,7 @@ if test "$PHP_GCOV" = "yes"; then AC_MSG_ERROR([GCC is required for --enable-gcov]) fi - dnl Check if ccache is being used + dnl Check if ccache is being used. case `$php_shtool path $CC` in *ccache*[)] gcc_ccache=yes;; *[)] gcc_ccache=no;; @@ -828,11 +821,11 @@ if test "$PHP_GCOV" = "yes"; then AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.]) fi - dnl min: 1.5 (i.e. 105, major * 100 + minor for easier comparison) + dnl Min: 1.5 (i.e. 105, major * 100 + minor for easier comparison). ltp_version_min="105" - dnl non-working versions, e.g. "1.8 1.18"; - dnl remove "none" when introducing the first incompatible LTP version and - dnl separate any following additions by spaces + dnl Non-working versions, e.g. "1.8 1.18"; + dnl Remove "none" when introducing the first incompatible LTP version and + dnl separate any following additions by spaces. ltp_version_exclude="1.8" AC_CHECK_PROG(LTP, lcov, lcov) @@ -879,13 +872,13 @@ if test "$PHP_GCOV" = "yes"; then AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov]) PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/build/Makefile.gcov, $abs_srcdir) - dnl Remove all optimization flags from CFLAGS + dnl Remove all optimization flags from CFLAGS. changequote({,}) CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` changequote([,]) - dnl Add the special gcc flags + dnl Add the special gcc flags. CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage" CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage" fi @@ -904,7 +897,7 @@ if test "$PHP_DEBUG" = "yes"; then CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` changequote([,]) - dnl add -O0 only if GCC or ICC is used + dnl Add -O0 only if GCC or ICC is used. if test "$GCC" = "yes" || test "$ICC" = "yes"; then CFLAGS="$CFLAGS -O0" CXXFLAGS="$CXXFLAGS -g -O0" @@ -1052,10 +1045,7 @@ if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then AC_DEFINE(HAVE_IPV6, 1, [Whether to enable IPv6 support]) fi -dnl ## -dnl ## DTRACE CHECKS -dnl ## Note: this has to be done after SAPI configuration! -dnl ## +dnl DTRACE checks. Note: this has to be done after SAPI configuration. PHP_ARG_ENABLE([dtrace], [whether to enable DTrace support], [AS_HELP_STRING([--enable-dtrace], @@ -1100,7 +1090,7 @@ PHP_ARG_ENABLE([werror],, [no]) dnl Extension configuration. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- PHP_HELP_SEPARATOR([Extensions: @@ -1116,20 +1106,17 @@ PHP_HELP_SEPARATOR([Extensions: PHP_CONFIGURE_PART(Configuring extensions) -dnl -dnl Check if all enabled by default extensions should be disabled -dnl - +dnl Check if all enabled by default extensions should be disabled. AC_ARG_ENABLE([all], [AS_HELP_STRING([--disable-all], [Disable all extensions which are enabled by default])], [PHP_ENABLE_ALL=$enableval]) -# reading config stubs +dnl Reading config stubs. esyscmd(./build/config-stubs ext) -dnl Extensions post-config -dnl ------------------------------------------------------------------------- +dnl Extensions post-config. +dnl ---------------------------------------------------------------------------- enable_shared=yes enable_static=yes @@ -1157,8 +1144,8 @@ esac EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" -dnl this has to be here to prevent the openssl crypt() from -dnl overriding the system provided crypt(). +dnl This has to be here to prevent the openssl crypt() from overriding the +dnl system provided crypt(). if test "$ac_cv_lib_crypt_crypt" = "yes"; then EXTRA_LIBS="-lcrypt $EXTRA_LIBS -lcrypt" fi @@ -1166,17 +1153,17 @@ fi unset LIBS LDFLAGS dnl PEAR -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- PHP_HELP_SEPARATOR([PEAR:]) PHP_CONFIGURE_PART(Configuring PEAR) -# compatibility +dnl Compatibility if test -z "$with_pear" && test "$enable_pear" = "no"; then with_pear=no fi -# If CLI is disabled -> disable PEAR +dnl If CLI is disabled disable PEAR. if test "$PHP_CLI" = "no"; then with_pear=no fi @@ -1190,9 +1177,7 @@ PHP_ARG_WITH([pear], if test "$PHP_PEAR" != "no"; then - dnl - dnl PEAR dependencies - dnl + dnl PEAR dependencies. if test "$PHP_XML" = "no"; then pear_error_msg="$pear_error_msg PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --without-pear)" @@ -1217,9 +1202,8 @@ if test "$PHP_PEAR" != "no"; then PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear) fi - dnl Configuring Zend and TSRM. -dnl ------------------------------------------------------------------------- +dnl ---------------------------------------------------------------------------- PHP_HELP_SEPARATOR([Zend:]) PHP_CONFIGURE_PART(Configuring Zend) @@ -1287,8 +1271,7 @@ exec_prefix=`eval echo $exec_prefix` libdir=`eval echo $libdir` datadir=`eval eval echo $datadir` -dnl Build extension directory path - +dnl Build extension directory path. ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO //'` if test -z "$EXTENSION_DIR"; then @@ -1327,7 +1310,7 @@ case $PHP_LAYOUT in ;; esac -dnl Expand all directory names for use in macros/constants +dnl Expand all directory names for use in macros/constants. EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR` EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR` EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir` @@ -1372,7 +1355,8 @@ fi EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" -# SOURCE_DATE_EPOCH for reproducible builds https://reproducible-builds.org/specs/source-date-epoch/ +dnl SOURCE_DATE_EPOCH for reproducible builds +dnl https://reproducible-builds.org/specs/source-date-epoch/ PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d 2>/dev/null` if test $? -ne 0 ; then PHP_BUILD_DATE=`date -u +%Y-%m-%d` @@ -1465,8 +1449,8 @@ if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then CPPFLAGS="$CPPFLAGS $ac_cv_pthreads_cflags" fi -dnl This will go away, if we have a facility to run per-extension code -dnl after the thread_safety decision was done +dnl This will go away, if we have a facility to run per-extension code after the +dnl thread_safety decision was done. if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then CPPFLAGS="$CPPFLAGS -DTHREAD=1" fi @@ -1480,7 +1464,7 @@ ZEND_EXT_TYPE="zend_extension" PHP_SUBST(ZEND_EXT_TYPE) dnl -dnl Libtool creation +dnl Libtool creation. dnl PHP_HELP_SEPARATOR([Libtool:]) @@ -1500,8 +1484,9 @@ dnl Silence warning: `ar: 'u' modifier ignored since 'D' is the default` dnl See https://github.com/php/php-src/pull/3017 AC_SUBST(AR_FLAGS, [cr]) -dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX). -dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler. +dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by +dnl PHP_REQUIRE_CXX). Otherwise AC_PROG_LIBTOOL fails if there is no working C++ +dnl compiler. AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [ undefine([AC_PROG_CXX]) AC_DEFUN([AC_PROG_CXX], []) @@ -1579,8 +1564,8 @@ PHP_ADD_SOURCES(Zend, \ zend_default_classes.c zend_inheritance.c zend_smart_str.c zend_cpuinfo.c, \ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) -dnl Selectively disable optimization due to high RAM usage during -dnl compiling the executor. +dnl Selectively disable optimization due to high RAM usage during compiling the +dnl executor. if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then flag=-O0 else @@ -1609,14 +1594,10 @@ scripts/phpize scripts/man1/phpize.1 \ scripts/php-config scripts/man1/php-config.1 \ $PHP_OUTPUT_FILES" -dnl -dnl Check for unknown configure options -dnl +dnl Check for unknown configure options. PHP_CHECK_CONFIGURE_OPTIONS -dnl -dnl Generate build files -dnl +dnl Generate build files. AC_CONFIG_FILES([$ALL_OUTPUT_FILES]) AC_CONFIG_COMMANDS([default],[],[ @@ -1624,10 +1605,8 @@ if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL REDO_ALL=yes fi -################################################################ -# Create configuration headers -# - +dnl Create configuration headers. +dnl ---------------------------------------------------------------------------- test -d Zend || $php_shtool mkdir Zend cat >Zend/zend_config.h <Zend/zend_config.h </dev/null sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$extensions > main/internal_functions.c echo "creating main/internal_functions_cli.c" @@ -1690,7 +1666,7 @@ X fi fi - # Warn about Apache if oci8 extension is enabled on linux. + dnl Warn about Apache if oci8 extension is enabled on Linux. if test "$PHP_OCI8" != "no"; then if test "$PHP_SIGCHILD" != "yes"; then if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then @@ -1722,7 +1698,7 @@ Thank you for using PHP. X - # Output unknown configure options + dnl Output unknown configure options. if test "$PHP_UNKNOWN_CONFIGURE_OPTIONS"; then echo "Notice: Following unknown configure options were used: $PHP_UNKNOWN_CONFIGURE_OPTIONS diff --git a/ext/bcmath/config.m4 b/ext/bcmath/config.m4 index e6a99a7239..2877a7d4ad 100644 --- a/ext/bcmath/config.m4 +++ b/ext/bcmath/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension bcmath - PHP_ARG_ENABLE([bcmath], [whether to enable bc style precision math functions], [AS_HELP_STRING([--enable-bcmath], diff --git a/ext/bz2/config.m4 b/ext/bz2/config.m4 index 65e8fcce23..56d81a60d7 100644 --- a/ext/bz2/config.m4 +++ b/ext/bz2/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension bz2 - PHP_ARG_WITH([bz2], [for BZip2 support], [AS_HELP_STRING([[--with-bz2[=DIR]]], diff --git a/ext/calendar/config.m4 b/ext/calendar/config.m4 index 7c179760df..bb3cfe4a62 100644 --- a/ext/calendar/config.m4 +++ b/ext/calendar/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension calendar - PHP_ARG_ENABLE([calendar], [whether to enable calendar conversion support], [AS_HELP_STRING([--enable-calendar], diff --git a/ext/ctype/config.m4 b/ext/ctype/config.m4 index 726648bfc0..7646525a70 100644 --- a/ext/ctype/config.m4 +++ b/ext/ctype/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension ctype - PHP_ARG_ENABLE([ctype], [whether to enable ctype functions], [AS_HELP_STRING([--disable-ctype], diff --git a/ext/curl/config.m4 b/ext/curl/config.m4 index 88447bd78a..cd02577907 100644 --- a/ext/curl/config.m4 +++ b/ext/curl/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension curl - PHP_ARG_WITH([curl], [for cURL support], [AS_HELP_STRING([--with-curl], diff --git a/ext/date/config0.m4 b/ext/date/config0.m4 index 6c9d614181..ebd86acc2e 100644 --- a/ext/date/config0.m4 +++ b/ext/date/config0.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for date extension - dnl Check for headers needed by timelib AC_CHECK_HEADERS([ \ strings.h \ diff --git a/ext/dba/config.m4 b/ext/dba/config.m4 index 825cb2dc04..dcf01d0d13 100644 --- a/ext/dba/config.m4 +++ b/ext/dba/config.m4 @@ -1,7 +1,4 @@ -dnl config.m4 for extension dba - dnl Suppose we need FlatFile if no support or only CDB is used. - AC_DEFUN([PHP_DBA_STD_BEGIN],[ unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT ]) @@ -136,7 +133,7 @@ dnl dnl Library checks dnl -# QDBM +dnl QDBM if test "$PHP_QDBM" != "no"; then PHP_DBA_STD_BEGIN for i in $PHP_QDBM /usr/local /usr; do @@ -166,7 +163,7 @@ if test "$PHP_QDBM" != "no"; then fi PHP_DBA_STD_RESULT(qdbm) -# GDBM +dnl GDBM if test "$PHP_GDBM" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_QDBM" = "1"; then @@ -194,7 +191,7 @@ if test "$PHP_GDBM" != "no"; then fi PHP_DBA_STD_RESULT(gdbm) -# NDBM +dnl NDBM if test "$PHP_NDBM" != "no"; then PHP_DBA_STD_BEGIN for i in $PHP_NDBM /usr/local /usr; do @@ -368,7 +365,7 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[ PHP_DBA_STD_ATTACH ]) -# DB4 +dnl DB4 if test "$PHP_DB4" != "no"; then PHP_DBA_STD_BEGIN dbdp4="/usr/local/BerkeleyDB.4." @@ -432,7 +429,7 @@ if test "$PHP_DB4" != "no"; then fi PHP_DBA_STD_RESULT(db4,Berkeley DB4) -# DB3 +dnl DB3 if test "$PHP_DB3" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_DB4" = "1"; then @@ -465,7 +462,7 @@ if test "$PHP_DB3" != "no"; then fi PHP_DBA_STD_RESULT(db3,Berkeley DB3) -# DB2 +dnl DB2 if test "$PHP_DB2" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_DB3" = "1" || test "$HAVE_DB4" = "1"; then @@ -498,7 +495,7 @@ if test "$PHP_DB2" != "no"; then fi PHP_DBA_STD_RESULT(db2, Berkeley DB2) -# DB1 +dnl DB1 if test "$PHP_DB1" != "no"; then PHP_DBA_STD_BEGIN AC_MSG_CHECKING([for DB1 in library]) @@ -565,7 +562,7 @@ if test "$PHP_DB1" != "no"; then fi PHP_DBA_STD_RESULT(db1, DB1) -# DBM +dnl DBM if test "$PHP_DBM" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_QDBM" = "1"; then @@ -610,9 +607,8 @@ if test "$PHP_DBM" != "no"; then fi PHP_DBA_STD_RESULT(dbm) -dnl -dnl Bundled modules that should be enabled by default if any other option is enabled -dnl +dnl Bundled modules that should be enabled by default if any other option is +dnl enabled if test "$PHP_DBA" != "no" || test "$HAVE_DBA" = "1" || test "$with_cdb" = "yes" || test "$enable_inifile" = "yes" || test "$enable_flatfile" = "yes"; then php_dba_enable=yes else @@ -637,7 +633,7 @@ PHP_ARG_ENABLE([flatfile],, [$php_dba_enable], [no]) -# CDB +dnl CDB if test "$PHP_CDB" = "yes"; then AC_DEFINE(DBA_CDB_BUILTIN, 1, [ ]) AC_DEFINE(DBA_CDB_MAKE, 1, [ ]) @@ -673,7 +669,7 @@ elif test "$PHP_CDB" != "no"; then fi PHP_DBA_STD_RESULT(cdb) -# INIFILE +dnl INIFILE if test "$PHP_INIFILE" != "no"; then AC_DEFINE(DBA_INIFILE, 1, [ ]) ini_sources="libinifile/inifile.c" @@ -681,7 +677,7 @@ if test "$PHP_INIFILE" != "no"; then fi PHP_DBA_STD_RESULT(inifile, [INI File]) -# FLATFILE +dnl FLATFILE if test "$PHP_FLATFILE" != "no"; then AC_DEFINE(DBA_FLATFILE, 1, [ ]) flat_sources="libflatfile/flatfile.c" diff --git a/ext/dom/config.m4 b/ext/dom/config.m4 index c7ebb20f81..1a7f81ef8d 100644 --- a/ext/dom/config.m4 +++ b/ext/dom/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension dom - PHP_ARG_ENABLE([dom], [whether to enable DOM support], [AS_HELP_STRING([--disable-dom], diff --git a/ext/enchant/config.m4 b/ext/enchant/config.m4 index d635281acb..44fee08738 100644 --- a/ext/enchant/config.m4 +++ b/ext/enchant/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension enchant - PHP_ARG_WITH([enchant], [for ENCHANT support], [AS_HELP_STRING([[--with-enchant[=DIR]]], diff --git a/ext/exif/config.m4 b/ext/exif/config.m4 index 4943a69713..a2e3250a9d 100644 --- a/ext/exif/config.m4 +++ b/ext/exif/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension exif - PHP_ARG_ENABLE([exif], [whether to enable EXIF (metadata from images) support], [AS_HELP_STRING([--enable-exif], diff --git a/ext/ffi/config.m4 b/ext/ffi/config.m4 index d8e2c6902a..b0872a302a 100644 --- a/ext/ffi/config.m4 +++ b/ext/ffi/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension FFI - PHP_ARG_WITH([ffi], [for FFI support], [AS_HELP_STRING([--with-ffi], diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4 index d3e8a19587..5ecf684d2b 100644 --- a/ext/fileinfo/config.m4 +++ b/ext/fileinfo/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension fileinfo - PHP_ARG_ENABLE([fileinfo], [for fileinfo support], [AS_HELP_STRING([--disable-fileinfo], diff --git a/ext/filter/config.m4 b/ext/filter/config.m4 index 06ca873f6f..0108a17fb7 100644 --- a/ext/filter/config.m4 +++ b/ext/filter/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for input filtering extension - PHP_ARG_ENABLE([filter], [whether to enable input filter support], [AS_HELP_STRING([--disable-filter], diff --git a/ext/ftp/config.m4 b/ext/ftp/config.m4 index a9b9371741..3d81242a69 100644 --- a/ext/ftp/config.m4 +++ b/ext/ftp/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension ftp - PHP_ARG_ENABLE([ftp], [whether to enable FTP support], [AS_HELP_STRING([--enable-ftp], diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index c1b96fa812..a13313c8e8 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -1,9 +1,6 @@ -dnl config.m4 for extension gd - dnl dnl Configure options dnl - PHP_ARG_ENABLE([gd], [for GD support], [AS_HELP_STRING([--enable-gd], diff --git a/ext/gettext/config.m4 b/ext/gettext/config.m4 index 5f9ee32fa7..536785f0bc 100644 --- a/ext/gettext/config.m4 +++ b/ext/gettext/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension gettext - PHP_ARG_WITH([gettext], [for GNU gettext support], [AS_HELP_STRING([[--with-gettext[=DIR]]], diff --git a/ext/hash/config.m4 b/ext/hash/config.m4 index 0158237390..91c5241b00 100644 --- a/ext/hash/config.m4 +++ b/ext/hash/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension hash - PHP_ARG_WITH([mhash], [for mhash support], [AS_HELP_STRING([[--with-mhash[=DIR]]], diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 6cc509eb80..460f3be5b1 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension iconv - PHP_ARG_WITH([iconv], [for iconv support], [AS_HELP_STRING([[--without-iconv[=DIR]]], diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index 102c917aee..74dbc2d931 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension imap - AC_DEFUN([IMAP_INC_CHK],[if test -r "$i$1/c-client.h"; then AC_DEFINE(HAVE_IMAP2000, 1, [ ]) IMAP_DIR=$i diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 index 668aa3f3d2..7285f75e06 100644 --- a/ext/intl/config.m4 +++ b/ext/intl/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension intl - PHP_ARG_ENABLE([intl], [whether to enable internationalization support], [AS_HELP_STRING([--enable-intl], diff --git a/ext/json/config.m4 b/ext/json/config.m4 index b3546046eb..01328d57cc 100644 --- a/ext/json/config.m4 +++ b/ext/json/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension json - PHP_ARG_ENABLE([json], [whether to enable JavaScript Object Serialization support], [AS_HELP_STRING([--disable-json], diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4 index 7653bf9344..1812cb0e0b 100644 --- a/ext/ldap/config.m4 +++ b/ext/ldap/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension ldap - AC_DEFUN([PHP_LDAP_CHECKS], [ if test -f $1/include/ldap.h; then LDAP_DIR=$1 @@ -15,7 +13,8 @@ AC_DEFUN([PHP_LDAP_CHECKS], [ LDAP_LIBDIR=$1/$PHP_LIBDIR else - dnl Find Oracle Instant Client RPM header location corresponding to the given lib path e.g. for --with-ldap=/usr/lib/oracle/12.1/client64/lib + dnl Find Oracle Instant Client RPM header location corresponding to the + dnl given lib path e.g. for --with-ldap=/usr/lib/oracle/12.1/client64/lib AC_CHECK_SIZEOF([long]) AC_MSG_CHECKING([if we're at 64-bit platform]) AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ @@ -114,9 +113,8 @@ if test "$PHP_LDAP" != "no"; then AC_MSG_ERROR(Cannot find ldap.h) fi - dnl The Linux version of the SDK need -lpthread - dnl I have tested Solaris, and it doesn't, but others may. Add - dnl these here if necessary. -RL + dnl The Linux version of the SDK needs -lpthread. Solaris tested, and it + dnl doesn't, but others may. Add these here if necessary. -RL dnl Is this really necessary? -Troels Arvin if test `uname` = "Linux"; then @@ -212,20 +210,16 @@ if test "$PHP_LDAP" != "no"; then AC_DEFINE(HAVE_3ARG_SETREBINDPROC,1,[Whether 3 arg set_rebind_proc()]) fi - dnl Solaris 2.8 claims to be 2004 API, but doesn't have - dnl ldap_parse_reference() nor ldap_start_tls_s() + dnl Solaris 2.8 claims to be 2004 API, but doesn't have ldap_parse_reference() + dnl nor ldap_start_tls_s() AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find ldap_parse_extended_result ldap_extended_operation ldap_extended_operation_s ldap_passwd ldap_whoami_s ldap_refresh_s]) - dnl dnl SASL check - dnl if test "$PHP_LDAP_SASL" != "no"; then PHP_LDAP_SASL_CHECKS([$PHP_LDAP_SASL]) fi - dnl dnl Sanity check - dnl AC_CHECK_FUNC(ldap_bind_s, [], [ AC_MSG_ERROR([LDAP build check failed. Please check config.log for more information.]) ]) diff --git a/ext/libxml/config0.m4 b/ext/libxml/config0.m4 index 98d5134f36..044a58fa62 100644 --- a/ext/libxml/config0.m4 +++ b/ext/libxml/config0.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension libxml - PHP_ARG_WITH([libxml], [whether to build with LIBXML support], [AS_HELP_STRING([--without-libxml], diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index 893f75b4cb..e050286fbb 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension mbstring - AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [ PHP_MBSTRING_SOURCES="$PHP_MBSTRING_SOURCES $1" ]) diff --git a/ext/mysqli/config.m4 b/ext/mysqli/config.m4 index 31f635305a..c78eb2bedc 100644 --- a/ext/mysqli/config.m4 +++ b/ext/mysqli/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension mysqli - dnl ext/pdo_mysql/config.m4 also depends on this macro. AC_DEFUN([PHP_MYSQL_SOCKET_SEARCH], [ for i in \ diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index e0e2da602d..806580798e 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for mysqlnd driver - PHP_ARG_ENABLE([mysqlnd], [whether to enable mysqlnd], [AS_HELP_STRING([--enable-mysqlnd], diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4 index d534f09107..89da625e27 100644 --- a/ext/oci8/config.m4 +++ b/ext/oci8/config.m4 @@ -23,7 +23,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[ elif test -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then OCI8_LIB_DIR=$PHP_OCI8_OH_LIBDIR else - dnl This isn't an ORACLE_HOME. Try heuristic examination of the dir to help the user + dnl This isn't an ORACLE_HOME. Try heuristic examination of the dir to help + dnl the user. if test -f "$OCI8_DIR/libociei.$SHLIB_SUFFIX_NAME"; then AC_MSG_ERROR([Expected an ORACLE_HOME top level directory but ${OCI8_DIR} appears to be an Instant Client directory. Try --with-oci8=instantclient,${OCI8_DIR}]) else @@ -36,7 +37,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_MSG_CHECKING([Oracle Instant Client library version compatibility]) OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME - OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc + dnl Oracle 10g, 11g etc + OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | $PHP_OCI8_TAIL1` if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then if test ! -f "$OCI8_LCS_BASE"; then @@ -52,15 +54,18 @@ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_DEFUN([AC_OCI8_ORACLE_VERSION],[ AC_MSG_CHECKING([Oracle library version compatibility]) OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME - OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc + dnl Oracle 10g, 11g etc + OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` if test -s "$OCI8_DIR/orainst/unix.rgs"; then OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4` test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3 elif test -f "$OCI8_LCS"; then - dnl Oracle 10g, 11g etc. The x.2 version libraries are named x.1 for drop in compatibility + dnl Oracle 10g, 11g etc. The x.2 version libraries are named x.1 for drop in + dnl compatibility OCI8_ORACLE_VERSION=`echo $OCI8_LCS | $PHP_OCI8_SED -e 's/.*\.\(.*\)\.1$/\1.1/'` elif test -f $OCI8_LCS_BASE.9.0; then - dnl There is no case for Oracle 9.2. Oracle 9.2 libraries have a 9.0 suffix for drop-in compatibility with Oracle 9.0 + dnl There is no case for Oracle 9.2. Oracle 9.2 libraries have a 9.0 suffix + dnl for drop-in compatibility with Oracle 9.0 OCI8_ORACLE_VERSION=9.0 elif test -f $OCI8_LCS_BASE.8.0; then OCI8_ORACLE_VERSION=8.1 @@ -80,12 +85,11 @@ AC_DEFUN([AC_OCI8_ORACLE_VERSION],[ dnl dnl OCI8_INIT_DTRACE(providerdesc, header-file, sources) -dnl This mimics PHP_INIT_DTRACE from PHP 5.4's acinclude.m4. It is -dnl necessarily different from PHP_INIT_DTRACE which doesn't currently -dnl support DTrace for extensions. Creating OCI8_INIT_DTRACE -dnl independently instead of using a refactored PHP_INIT_DTRACE allows -dnl OCI8 to be DTraced on versions of PHP where core PHP DTrace support -dnl isn't available. +dnl This mimics PHP_INIT_DTRACE from build/php.m4. It is necessarily different +dnl from PHP_INIT_DTRACE which doesn't currently support DTrace for extensions. +dnl Creating OCI8_INIT_DTRACE independently instead of using a refactored +dnl PHP_INIT_DTRACE allows OCI8 to be DTraced on versions of PHP where core PHP +dnl DTrace support isn't available. dnl AC_DEFUN([OCI8_INIT_DTRACE],[ ac_srcdir=[]PHP_EXT_SRCDIR([oci8])/ @@ -112,9 +116,9 @@ dnl DTrace objects dtrace_oci8_objs="[$]dtrace_oci8_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`" done; -dnl Generate Makefile.objects entry -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 entry. 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<>Makefile.objects< \$[]@ @@ -164,7 +169,6 @@ EOF esac ]) - dnl --with-oci8=shared,instantclient,/path/to/client/dir/lib dnl or dnl --with-oci8=shared,/path/to/oracle/home @@ -178,12 +182,12 @@ PHP_ARG_WITH([oci8], if test "$PHP_OCI8" != "no"; then if test -z "$PHP_OCI8"; then - dnl --with-oci8=$ORACLE_HOME where ORACLE_HOME isn't set (or is mistyped) will match this case + dnl --with-oci8=$ORACLE_HOME where ORACLE_HOME isn't set (or is mistyped) + dnl will match this case. AC_MSG_ERROR([Empty parameter value passed to --with-oci8]) fi - dnl Check PHP version is compatible with this extension - + dnl Check PHP version is compatible with this extension. AC_MSG_CHECKING([PHP version]) tmp_version=$PHP_VERSION @@ -212,9 +216,9 @@ if test "$PHP_OCI8" != "no"; then AC_MSG_RESULT([$php_version, ok]) fi - dnl Check whether --enable-dtrace was set. - dnl To use DTrace with a PECL install, extract the OCI8 archive, phpize it, and set - dnl PHP_DTRACE=yes before running configure + dnl Check whether --enable-dtrace was set. To use DTrace with a PECL install, + dnl extract the OCI8 archive, phpize it, and set PHP_DTRACE=yes before running + dnl configure. AC_MSG_CHECKING([OCI8 DTrace support]) oci8_do_dtrace="`echo $PHP_OCI8 | cut -d, -f3`" if test "$PHP_DTRACE" = "yes" -o "$oci8_do_dtrace" = "dtrace" ; then @@ -231,14 +235,15 @@ if test "$PHP_OCI8" != "no"; then ]) PHP_SUBST(OCI8_DTRACE_OBJS) AC_DEFINE(HAVE_OCI8_DTRACE,1,[Defined to 1 if PHP OCI8 DTrace support was enabled during configuration]) - dnl Developer warning: hard coded extension is OK for the known supported environments + dnl Developer warning: hard coded extension is OK for the known supported + dnl environments. shared_objects_oci8="$shared_objects_oci8 PHP_EXT_BUILDDIR(oci8)/oci8_dtrace.d.lo" fi else AC_MSG_RESULT([no]) fi - dnl Set some port specific directory components for use later + dnl Set some port specific directory components for use later. AC_CHECK_SIZEOF([long]) AC_MSG_CHECKING([if we're at 64-bit platform]) AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ @@ -251,15 +256,15 @@ if test "$PHP_OCI8" != "no"; then PHP_OCI8_IC_LIBDIR_SUFFIX=64 ]) - dnl Determine if the user wants to use Oracle Instant Client libraries + dnl Determine if the user wants to use Oracle Instant Client libraries. PHP_OCI8_INSTANT_CLIENT="no" - dnl PECL Bug 14268 (Allow "pecl install oci8" command to "autodetect" - dnl an Instant Client RPM install). This also has a benefit for non - dnl "pecl install" builds: if the user does --with-oci8 or - dnl --with-oci8=shared but the ORACLE_HOME environment variable is not - dnl actually set, the install tries to locate the Instant Client RPM + dnl PECL Bug 14268 (Allow "pecl install oci8" command to "autodetect" an + dnl Instant Client RPM install). This also has a benefit for non + dnl "pecl install" builds: if the user does --with-oci8 or --with-oci8=shared + dnl but the ORACLE_HOME environment variable is not actually set, the install + dnl tries to locate the Instant Client RPM. if test "$PHP_OCI8" = "yes" && test -z "$ORACLE_HOME"; then AC_MSG_WARN([OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead]) PHP_OCI8=instantclient @@ -355,11 +360,11 @@ if test "$PHP_OCI8" != "no"; then AC_MSG_CHECKING([Oracle Instant Client directory]) if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then - dnl Find the directory if user specified "instantclient" but did not - dnl give a dir. Generally the Instant Client can be anywhere so the - dnl user must pass in the library directory. But on Linux we default - dnl to the most recent version in /usr/lib which is where the Oracle - dnl Instant Client RPM gets installed. + dnl Find the directory if user specified "instantclient" but did not give + dnl a dir. Generally the Instant Client can be anywhere so the user must + dnl pass in the library directory. But on Linux we default to the most + dnl recent version in /usr/lib which is where the Oracle Instant Client + dnl RPM gets installed. PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | $PHP_OCI8_TAIL1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'` if test -z "$PHP_OCI8_INSTANT_CLIENT"; then AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR]) diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index a96d8c0345..792aaef5bb 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension odbc - AC_DEFUN([PHP_ODBC_CHECK_HEADER],[ if ! test -f "$ODBC_INCDIR/$1"; then AC_MSG_ERROR([ODBC header file '$ODBC_INCDIR/$1' not found!]) @@ -48,14 +46,10 @@ AC_DEFUN([PHP_ODBC_FIND_SOLID_LIBS],[ ac_solid_prefix=scl fi -# -# Check for the library files, and setup the ODBC_LIBS path... -# +dnl Check for the library files, and setup the ODBC_LIBS path. if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then - # - # we have an error and should bail out, as we can't find the libs! - # + dnl we have an error and should bail out, as we can't find the libs! echo "" echo "*********************************************************************" echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" @@ -393,10 +387,10 @@ PHP_ARG_WITH([dbmaker],, AC_MSG_CHECKING(for DBMaker support) if test "$PHP_DBMAKER" != "no"; then if test "$PHP_DBMAKER" = "yes"; then - # find dbmaker's home directory + dnl Find dbmaker's home directory DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'` - # check DBMaker version (from 5.0 to 2.0) + dnl check DBMaker version (from 5.0 to 2.0) DBMAKER_VERSION=5.0 while test ! -d $DBMAKER_HOME/$DBMAKER_VERSION -a "$DBMAKER_VERSION" != "2.9"; do @@ -445,10 +439,7 @@ else AC_DEFINE(ODBCVER, 0x0300, [ The highest supported ODBC version ]) fi - -dnl dnl Extension setup -dnl if test -n "$ODBC_TYPE"; then if test "$ODBC_TYPE" != "dbmaker"; then PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 149e7c6dee..4d8f3a5888 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension opcache - PHP_ARG_ENABLE([opcache], [whether to enable Zend OPcache support], [AS_HELP_STRING([--disable-opcache], diff --git a/ext/openssl/config0.m4 b/ext/openssl/config0.m4 index b77bd5508b..9df2469363 100644 --- a/ext/openssl/config0.m4 +++ b/ext/openssl/config0.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension openssl - PHP_ARG_WITH([openssl], [for OpenSSL support], [AS_HELP_STRING([--with-openssl], diff --git a/ext/pcntl/config.m4 b/ext/pcntl/config.m4 index c9672de0fb..bf7f3064b4 100644 --- a/ext/pcntl/config.m4 +++ b/ext/pcntl/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pcntl - PHP_ARG_ENABLE([pcntl], [whether to enable pcntl support], [AS_HELP_STRING([--enable-pcntl], diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index c15f785a4e..a6601fc3f1 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -1,8 +1,5 @@ -dnl config.m4 for extension pcre - -dnl By default we'll compile and link against the bundled PCRE library -dnl if DIR is supplied, we'll use that for linking - +dnl By default we'll compile and link against the bundled PCRE library. If +dnl --with-external-pcre is supplied, we'll use that for linking. PHP_ARG_WITH([external-pcre],, [AS_HELP_STRING([--with-external-pcre], [Use external library for PCRE support])], diff --git a/ext/pdo/config.m4 b/ext/pdo/config.m4 index ad02f36e3a..b8e6f4e129 100644 --- a/ext/pdo/config.m4 +++ b/ext/pdo/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pdo - PHP_ARG_ENABLE([pdo], [whether to enable PDO support], [AS_HELP_STRING([--disable-pdo], diff --git a/ext/pdo_dblib/config.m4 b/ext/pdo_dblib/config.m4 index 7f6bd50e32..33d80ac28c 100644 --- a/ext/pdo_dblib/config.m4 +++ b/ext/pdo_dblib/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pdo_dblib - PHP_ARG_WITH([pdo-dblib], [for PDO_DBLIB support via FreeTDS], [AS_HELP_STRING([[--with-pdo-dblib[=DIR]]], diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4 index d638f03a28..0bb87c9c25 100644 --- a/ext/pdo_mysql/config.m4 +++ b/ext/pdo_mysql/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pdo_mysql - PHP_ARG_WITH([pdo-mysql], [for MySQL support for PDO], [AS_HELP_STRING([[--with-pdo-mysql[=DIR]]], @@ -16,8 +14,8 @@ if test -z "$PHP_ZLIB_DIR"; then fi if test "$PHP_PDO_MYSQL" != "no"; then - dnl This depends on ext/mysqli/config.m4 providing the - dnl PHP_MYSQL_SOCKET_SEARCH macro and --with-mysql-sock configure option. + dnl This depends on ext/mysqli/config.m4 providing the PHP_MYSQL_SOCKET_SEARCH + dnl macro and --with-mysql-sock configure option. AC_MSG_CHECKING([for MySQL UNIX socket location]) if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then MYSQL_SOCK=$PHP_MYSQL_SOCK diff --git a/ext/pdo_oci/config.m4 b/ext/pdo_oci/config.m4 index c692483394..744a26c788 100644 --- a/ext/pdo_oci/config.m4 +++ b/ext/pdo_oci/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pdo_oci - if test -z "$SED"; then PHP_PDO_OCI_SED="sed"; else @@ -16,12 +14,15 @@ fi AC_DEFUN([AC_PDO_OCI_VERSION],[ AC_MSG_CHECKING([Oracle version]) PDO_OCI_LCS_BASE=$PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME - PDO_OCI_LCS=`ls $PDO_OCI_LCS_BASE.*.1 2> /dev/null | $PHP_PDO_OCI_TAIL1` # Oracle 10g, 11g, 12c etc + dnl Oracle 10g, 11g, 12c etc + PDO_OCI_LCS=`ls $PDO_OCI_LCS_BASE.*.1 2> /dev/null | $PHP_PDO_OCI_TAIL1` if test -f "$PDO_OCI_LCS"; then - dnl Oracle 10g, 11g 12c etc. The x.2 version libraries are named x.1 for drop in compatibility + dnl Oracle 10g, 11g 12c etc. The x.2 version libraries are named x.1 for + dnl drop in compatibility PDO_OCI_VERSION=`echo $PDO_OCI_LCS | $PHP_PDO_OCI_SED -e 's/.*\.\(.*\)\.1$/\1.1/'` elif test -f $PDO_OCI_LCS_BASE.9.0; then - dnl There is no case for Oracle 9.2. Oracle 9.2 libraries have a 9.0 suffix for drop-in compatibility with Oracle 9.0 + dnl There is no case for Oracle 9.2. Oracle 9.2 libraries have a 9.0 suffix + dnl for drop-in compatibility with Oracle 9.0 PDO_OCI_VERSION=9.0 else AC_MSG_ERROR(Oracle libclntsh.$SHLIB_SUFFIX_NAME client library not found or its version is lower than 9) diff --git a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4 index 7c1c469525..9e54591c48 100644 --- a/ext/pdo_odbc/config.m4 +++ b/ext/pdo_odbc/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pdo_odbc - define([PDO_ODBC_HELP_TEXT],[[ The include and lib dirs are looked for under 'dir'. The 'flavour' can be one of: ibm-db2, iODBC, unixODBC, generic. If ',dir' part is omitted, default for @@ -141,8 +139,8 @@ if test "$PHP_PDO_ODBC" != "no"; then dnl Check first for an ODBC 1.0 function to assert that the libraries work PHP_CHECK_LIBRARY($pdo_odbc_def_lib, SQLBindCol, [ - dnl And now check for an ODBC 3.0 function to assert that they're - dnl *good* libraries. + dnl And now check for an ODBC 3.0 function to assert that they're *good* + dnl libraries. PHP_CHECK_LIBRARY($pdo_odbc_def_lib, SQLAllocHandle, [], [ AC_MSG_ERROR([ diff --git a/ext/pdo_pgsql/config.m4 b/ext/pdo_pgsql/config.m4 index a2ab91306a..44a95880a6 100644 --- a/ext/pdo_pgsql/config.m4 +++ b/ext/pdo_pgsql/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pdo_pgsql - PHP_ARG_WITH([pdo-pgsql], [for PostgreSQL support for PDO], [AS_HELP_STRING([[--with-pdo-pgsql[=DIR]]], diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index c426eaf137..ad955947cf 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pdo_sqlite - PHP_ARG_WITH([pdo-sqlite], [for sqlite 3 support for PDO], [AS_HELP_STRING([[--without-pdo-sqlite[=DIR]]], @@ -32,11 +30,15 @@ if test "$PHP_PDO_SQLITE" != "no"; then php_pdo_sqlite_sources_core="pdo_sqlite.c sqlite_driver.c sqlite_statement.c" - SEARCH_PATH="$PHP_PDO_SQLITE /usr/local /usr" # you might want to change this - SEARCH_FOR="/include/sqlite3.h" # you most likely want to change this - if test -r $PHP_PDO_SQLITE/$SEARCH_FOR; then # path given as parameter + dnl you might want to change this + SEARCH_PATH="$PHP_PDO_SQLITE /usr/local /usr" + dnl you most likely want to change this + SEARCH_FOR="/include/sqlite3.h" + if test -r $PHP_PDO_SQLITE/$SEARCH_FOR; then + dnl path given as parameter PDO_SQLITE_DIR=$PHP_PDO_SQLITE - else # search default path list + else + dnl search default path list AC_MSG_CHECKING([for sqlite3 files in default path]) for i in $SEARCH_PATH ; do if test -r $i/$SEARCH_FOR; then diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4 index e1103f4f89..a5afd02923 100644 --- a/ext/pgsql/config.m4 +++ b/ext/pgsql/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pgsql - PHP_ARG_WITH([pgsql], [for PostgreSQL support], [AS_HELP_STRING([[--with-pgsql[=DIR]]], diff --git a/ext/phar/config.m4 b/ext/phar/config.m4 index eb23bbf794..23e7f58c62 100644 --- a/ext/phar/config.m4 +++ b/ext/phar/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension phar - PHP_ARG_ENABLE([phar], [for phar archive support], [AS_HELP_STRING([--disable-phar], diff --git a/ext/posix/config.m4 b/ext/posix/config.m4 index ea67485597..9beea518be 100644 --- a/ext/posix/config.m4 +++ b/ext/posix/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension posix - PHP_ARG_ENABLE([posix], [whether to enable POSIX-like functions], [AS_HELP_STRING([--disable-posix], diff --git a/ext/pspell/config.m4 b/ext/pspell/config.m4 index 59ec3a9e7f..a0212165f6 100644 --- a/ext/pspell/config.m4 +++ b/ext/pspell/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension pspell - PHP_ARG_WITH([pspell], [for PSPELL support], [AS_HELP_STRING([[--with-pspell[=DIR]]], diff --git a/ext/readline/config.m4 b/ext/readline/config.m4 index 7001a15372..ed205764f2 100644 --- a/ext/readline/config.m4 +++ b/ext/readline/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension readline - PHP_ARG_WITH([libedit], [for libedit readline replacement], [AS_HELP_STRING([--with-libedit], @@ -11,7 +9,8 @@ if test "$PHP_LIBEDIT" = "no"; then [AS_HELP_STRING([[--with-readline[=DIR]]], [Include readline support (CLI/CGI only)])]) else - dnl "register" the --with-readline option to preven invalid "unknown configure option" warning + dnl "register" the --with-readline option to prevent invalid "unknown + dnl configure option" warning php_with_readline=no fi diff --git a/ext/recode/config.m4 b/ext/recode/config.m4 index 537da2ead2..853b24caaa 100644 --- a/ext/recode/config.m4 +++ b/ext/recode/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension recode - PHP_ARG_WITH([recode], [for recode support], [AS_HELP_STRING([[--with-recode[=DIR]]], diff --git a/ext/recode/config9.m4 b/ext/recode/config9.m4 index 5f85655598..28d852d8b0 100644 --- a/ext/recode/config9.m4 +++ b/ext/recode/config9.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension recode - dnl Check for extensions with which Recode can not work if test "$PHP_RECODE" != "no"; then test "$PHP_IMAP" != "no" && recode_conflict="$recode_conflict imap" diff --git a/ext/reflection/config.m4 b/ext/reflection/config.m4 index 96535b7a07..2f295de915 100644 --- a/ext/reflection/config.m4 +++ b/ext/reflection/config.m4 @@ -1,3 +1 @@ -dnl config.m4 for extension reflection - PHP_NEW_EXTENSION(reflection, php_reflection.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) diff --git a/ext/session/config.m4 b/ext/session/config.m4 index dfb0372529..198c94c739 100644 --- a/ext/session/config.m4 +++ b/ext/session/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension session - PHP_ARG_ENABLE([session], [whether to enable PHP sessions], [AS_HELP_STRING([--disable-session], diff --git a/ext/shmop/config.m4 b/ext/shmop/config.m4 index 35c58b906e..c5b1f84142 100644 --- a/ext/shmop/config.m4 +++ b/ext/shmop/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension shmop - PHP_ARG_ENABLE([shmop], [whether to enable shmop support], [AS_HELP_STRING([--enable-shmop], diff --git a/ext/simplexml/config.m4 b/ext/simplexml/config.m4 index e591cb90dc..1acd1898c1 100644 --- a/ext/simplexml/config.m4 +++ b/ext/simplexml/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension simplexml - PHP_ARG_ENABLE([simplexml], [whether to enable SimpleXML support], [AS_HELP_STRING([--disable-simplexml], diff --git a/ext/skeleton/config.m4.in b/ext/skeleton/config.m4.in index 663040a368..268a48ba2f 100644 --- a/ext/skeleton/config.m4.in +++ b/ext/skeleton/config.m4.in @@ -33,7 +33,7 @@ if test "$PHP_%EXTNAMECAPS%" != "no"; then dnl PKG_CHECK_MODULES([LIBFOO], [foo = 1.2.3]) dnl Remove this code block if the library supports pkg-config. - dnl # --with-%EXTNAME% -> check with-path + dnl --with-%EXTNAME% -> check with-path dnl SEARCH_PATH="/usr/local /usr" # you might want to change this dnl SEARCH_FOR="/include/%EXTNAME%.h" # you most likely want to change this dnl if test -r $PHP_%EXTNAMECAPS%/$SEARCH_FOR; then # path given as parameter @@ -54,11 +54,11 @@ if test "$PHP_%EXTNAMECAPS%" != "no"; then dnl fi dnl Remove this code block if the library supports pkg-config. - dnl # --with-%EXTNAME% -> add include path + dnl --with-%EXTNAME% -> add include path dnl PHP_ADD_INCLUDE($%EXTNAMECAPS%_DIR/include) dnl Remove this code block if the library supports pkg-config. - dnl # --with-%EXTNAME% -> check for lib and symbol presence + dnl --with-%EXTNAME% -> check for lib and symbol presence dnl LIBNAME=%EXTNAMECAPS% # you may want to change this dnl LIBSYMBOL=%EXTNAMECAPS% # you most likely want to change this @@ -87,7 +87,7 @@ if test "$PHP_%EXTNAMECAPS%" != "no"; then dnl dnl PHP_SUBST(%EXTNAMECAPS%_SHARED_LIBADD) - dnl # In case of no dependencies + dnl In case of no dependencies AC_DEFINE(HAVE_%EXTNAMECAPS%, 1, [ Have %EXTNAME% support ]) PHP_NEW_EXTENSION(%EXTNAME%, %EXTNAME%.c, $ext_shared) diff --git a/ext/snmp/config.m4 b/ext/snmp/config.m4 index 4715259689..893edc79db 100644 --- a/ext/snmp/config.m4 +++ b/ext/snmp/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension snmp - PHP_ARG_WITH([snmp], [for SNMP support], [AS_HELP_STRING([[--with-snmp[=DIR]]], diff --git a/ext/soap/config.m4 b/ext/soap/config.m4 index 833af7b7ac..8e5fdd4ebc 100644 --- a/ext/soap/config.m4 +++ b/ext/soap/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension soap - PHP_ARG_ENABLE([soap], [whether to enable SOAP support], [AS_HELP_STRING([--enable-soap], diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4 index f5642fc2c8..405b68d288 100644 --- a/ext/sockets/config.m4 +++ b/ext/sockets/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension sockets - PHP_ARG_ENABLE([sockets], [whether to enable sockets support], [AS_HELP_STRING([--enable-sockets], diff --git a/ext/sodium/config.m4 b/ext/sodium/config.m4 index b95529c201..24d6580da8 100644 --- a/ext/sodium/config.m4 +++ b/ext/sodium/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension sodium - PHP_ARG_WITH([sodium], [for sodium support], [AS_HELP_STRING([--with-sodium], diff --git a/ext/spl/config.m4 b/ext/spl/config.m4 index 08ecbdf5f6..8e0d31f3e2 100644 --- a/ext/spl/config.m4 +++ b/ext/spl/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension SPL - - PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) - PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h]) - PHP_ADD_EXTENSION_DEP(spl, pcre, true) +PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) +PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h]) +PHP_ADD_EXTENSION_DEP(spl, pcre, true) diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4 index d6aaf13095..57f8884bfb 100644 --- a/ext/sqlite3/config0.m4 +++ b/ext/sqlite3/config0.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension sqlite3 - PHP_ARG_WITH([sqlite3], [whether to enable the SQLite3 extension], [AS_HELP_STRING([[--without-sqlite3[=DIR]]], diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index a017cf4282..891fca2ffa 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -284,14 +284,14 @@ fi dnl dnl Check for available functions dnl -dnl log2 could be used to improve the log function, however it requires C99. The check for log2 should be turned on, -dnl as soon as we support C99. +dnl log2 could be used to improve the log function, however it requires C99. The +dnl check for log2 should be turned on, as soon as we support C99. AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass mempcpy strpncpy) AC_FUNC_FNMATCH dnl -dnl Check if there is a support means of creating a new process -dnl and defining which handles it receives +dnl Check if there is a support means of creating a new process and defining +dnl which handles it receives dnl AC_CHECK_FUNCS(fork CreateProcess, [ php_can_support_proc_open=yes @@ -335,7 +335,8 @@ fi dnl dnl Detect library functions needed by php dns_xxx functions -dnl ext/standard/php_dns.h will collect these in a single define: HAVE_FULL_DNS_FUNCS +dnl ext/standard/php_dns.h will collect these in a single define +dnl HAVE_FULL_DNS_FUNCS dnl PHP_CHECK_FUNC(res_nsearch, resolv, bind, socket) PHP_CHECK_FUNC(res_ndestroy, resolv, bind, socket) diff --git a/ext/sysvmsg/config.m4 b/ext/sysvmsg/config.m4 index 3731fe9940..7ad70186fa 100644 --- a/ext/sysvmsg/config.m4 +++ b/ext/sysvmsg/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension sysvmsg - PHP_ARG_ENABLE([sysvmsg], [whether to enable System V IPC support], [AS_HELP_STRING([--enable-sysvmsg], diff --git a/ext/sysvsem/config.m4 b/ext/sysvsem/config.m4 index a091cb2a7f..5cbc06ce9c 100644 --- a/ext/sysvsem/config.m4 +++ b/ext/sysvsem/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension sysvsem - PHP_ARG_ENABLE([sysvsem], [whether to enable System V semaphore support], [AS_HELP_STRING([--enable-sysvsem], diff --git a/ext/sysvshm/config.m4 b/ext/sysvshm/config.m4 index 7426c6bab6..bd6e40cca9 100644 --- a/ext/sysvshm/config.m4 +++ b/ext/sysvshm/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension sysvshm - PHP_ARG_ENABLE([sysvshm], [whether to enable System V shared memory support], [AS_HELP_STRING([--enable-sysvshm], diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4 index 31103c5c8b..dab58787d4 100644 --- a/ext/tidy/config.m4 +++ b/ext/tidy/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension tidy - PHP_ARG_WITH([tidy], [for TIDY support], [AS_HELP_STRING([[--with-tidy[=DIR]]], @@ -32,10 +30,9 @@ if test "$PHP_TIDY" != "no"; then if test -z "$TIDY_DIR"; then AC_MSG_ERROR(Cannot find libtidy) else - dnl Check for tidybuffio.h (as opposed to simply buffio.h) - dnl which indicates that we are building against tidy-html5 - dnl and not the legacy htmltidy. The two are compatible, - dnl except for with regard to this header file. + dnl Check for tidybuffio.h (as opposed to simply buffio.h) which indicates + dnl that we are building against tidy-html5 and not the legacy htmltidy. The + dnl two are compatible, except for with regard to this header file. if test -f "$TIDY_INCDIR/tidybuffio.h"; then AC_DEFINE(HAVE_TIDYBUFFIO_H,1,[defined if tidybuffio.h exists]) fi diff --git a/ext/tokenizer/config.m4 b/ext/tokenizer/config.m4 index f0781af08e..e607fe50fc 100644 --- a/ext/tokenizer/config.m4 +++ b/ext/tokenizer/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension tokenizer - PHP_ARG_ENABLE([tokenizer], [whether to enable tokenizer support], [AS_HELP_STRING([--disable-tokenizer], diff --git a/ext/xml/config.m4 b/ext/xml/config.m4 index ce18d37f8e..24cf7fe2a3 100644 --- a/ext/xml/config.m4 +++ b/ext/xml/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension xml - PHP_ARG_ENABLE([xml], [whether to enable XML support], [AS_HELP_STRING([--disable-xml], diff --git a/ext/xmlreader/config.m4 b/ext/xmlreader/config.m4 index 616bd9bb84..8777d93ba9 100644 --- a/ext/xmlreader/config.m4 +++ b/ext/xmlreader/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension xmlreader - PHP_ARG_ENABLE([xmlreader], [whether to enable XMLReader support], [AS_HELP_STRING([--disable-xmlreader], diff --git a/ext/xmlrpc/config.m4 b/ext/xmlrpc/config.m4 index 5263557f3d..3ea2d6bd06 100644 --- a/ext/xmlrpc/config.m4 +++ b/ext/xmlrpc/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension xmlrpc - PHP_ARG_WITH([xmlrpc], [for XMLRPC-EPI support], [AS_HELP_STRING([[--with-xmlrpc[=DIR]]], @@ -91,9 +89,9 @@ elif test "$PHP_XMLRPC" != "no"; then if test -r $PHP_XMLRPC/include/xmlrpc.h; then XMLRPC_DIR=$PHP_XMLRPC/include elif test -r $PHP_XMLRPC/include/xmlrpc-epi/xmlrpc.h; then -dnl some xmlrpc-epi header files have generic file names like -dnl queue.h or base64.h. Distributions have to create dir -dnl for xmlrpc-epi because of this. + dnl Some xmlrpc-epi header files have generic file names like queue.h or + dnl base64.h. Distributions have to create dir for xmlrpc-epi because of + dnl this. XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi else AC_MSG_CHECKING(for XMLRPC-EPI in default path) diff --git a/ext/xmlwriter/config.m4 b/ext/xmlwriter/config.m4 index 54204f1280..a3bce3c652 100644 --- a/ext/xmlwriter/config.m4 +++ b/ext/xmlwriter/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension xmlwriter - PHP_ARG_ENABLE([xmlwriter], [whether to enable XMLWriter support], [AS_HELP_STRING([--disable-xmlwriter], diff --git a/ext/xsl/config.m4 b/ext/xsl/config.m4 index 5109d62895..26f6e10e6e 100644 --- a/ext/xsl/config.m4 +++ b/ext/xsl/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension xsl - PHP_ARG_WITH([xsl], [for XSL support], [AS_HELP_STRING([[--with-xsl[=DIR]]], diff --git a/ext/zip/config.m4 b/ext/zip/config.m4 index 4f6360243a..0889d3693d 100644 --- a/ext/zip/config.m4 +++ b/ext/zip/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension zip - PHP_ARG_WITH([zip], [for zip archive read/write support], [AS_HELP_STRING([--with-zip], diff --git a/ext/zlib/config0.m4 b/ext/zlib/config0.m4 index 4619e0eda2..0d60700565 100644 --- a/ext/zlib/config0.m4 +++ b/ext/zlib/config0.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for extension zlib - PHP_ARG_WITH([zlib], [for ZLIB support], [AS_HELP_STRING([--with-zlib], diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 index d1d92db21f..8f757894c8 100644 --- a/sapi/apache2handler/config.m4 +++ b/sapi/apache2handler/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for sapi apache2handler - PHP_ARG_WITH([apxs2],, [AS_HELP_STRING([[--with-apxs2[=FILE]]], [Build shared Apache 2.0 Handler module. FILE is the optional pathname to @@ -42,7 +40,7 @@ if test "$PHP_APXS2" != "no"; then APU_BINDIR=`$APXS -q APU_BINDIR` APR_BINDIR=`$APXS -q APR_BINDIR` - # Pick up ap[ru]-N-config if using httpd >=2.1 + dnl Pick up ap[ru]-N-config if using httpd >=2.1 APR_CONFIG=`$APXS -q APR_CONFIG 2>/dev/null || echo $APR_BINDIR/apr-config` APU_CONFIG=`$APXS -q APU_CONFIG 2>/dev/null || @@ -59,7 +57,7 @@ if test "$PHP_APXS2" != "no"; then APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" - # Test that we're trying to configure with apache 2.x + dnl Test that we're trying to configure with apache 2.x PHP_AP_EXTRACT_VERSION($APXS_HTTPD) if test "$APACHE_VERSION" -le 2000000; then AC_MSG_ERROR([You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropriate switch --with-apxs (without the 2)]) @@ -88,10 +86,9 @@ if test "$PHP_APXS2" != "no"; then INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL" ;; *darwin*) - dnl When using bundles on Darwin, we must resolve all symbols. However, - dnl the linker does not recursively look at the bundle loader and - dnl pull in its dependencies. Therefore, we must pull in the APR - dnl and APR-util libraries. + dnl When using bundles on Darwin, we must resolve all symbols. However, the + dnl linker does not recursively look at the bundle loader and pull in its + dnl dependencies. Therefore, we must pull in the APR and APR-util libraries. if test -x "$APR_CONFIG"; then MH_BUNDLE_FLAGS="`$APR_CONFIG --ldflags --link-ld --libs`" fi diff --git a/sapi/cgi/config9.m4 b/sapi/cgi/config9.m4 index f000b5eb88..a26f417933 100644 --- a/sapi/cgi/config9.m4 +++ b/sapi/cgi/config9.m4 @@ -1,14 +1,10 @@ -dnl config.m4 for sapi cgi - PHP_ARG_ENABLE([cgi],, [AS_HELP_STRING([--disable-cgi], [Disable building CGI version of PHP])], [yes], [no]) -dnl -dnl CGI setup -dnl +dnl CGI setup. AC_MSG_CHECKING(for CGI build) if test "$PHP_CGI" != "no"; then AC_MSG_RESULT(yes) @@ -40,7 +36,7 @@ if test "$PHP_CGI" != "no"; then PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) - dnl Set filename + dnl Set filename. case $host_alias in *cygwin* ) SAPI_CGI_PATH=sapi/cgi/php-cgi.exe @@ -50,7 +46,7 @@ if test "$PHP_CGI" != "no"; then ;; esac - dnl Select SAPI + dnl Select SAPI. PHP_SELECT_SAPI(cgi, program, cgi_main.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1, '$(SAPI_CGI_PATH)') case $host_alias in @@ -69,7 +65,7 @@ if test "$PHP_CGI" != "no"; then ;; esac - dnl Expose to Makefile + dnl Expose to Makefile. PHP_SUBST(SAPI_CGI_PATH) PHP_SUBST(BUILD_CGI) diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 index 0d2558eb83..917d45fad1 100644 --- a/sapi/cli/config.m4 +++ b/sapi/cli/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for sapi cli - PHP_ARG_ENABLE([cli],, [AS_HELP_STRING([--disable-cli], [Disable building CLI version of PHP (this forces --without-pear)])], @@ -26,10 +24,10 @@ AC_MSG_CHECKING(for CLI build) if test "$PHP_CLI" != "no"; then PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cli/Makefile.frag) - dnl Set filename + dnl Set filename. SAPI_CLI_PATH=sapi/cli/php - dnl Select SAPI + dnl Select SAPI. PHP_SELECT_SAPI(cli, program, php_cli.c php_http_parser.c php_cli_server.c ps_title.c php_cli_process_title.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1, '$(SAPI_CLI_PATH)') case $host_alias in @@ -48,11 +46,11 @@ if test "$PHP_CLI" != "no"; then ;; esac - dnl Set executable for tests + dnl Set executable for tests. PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)" PHP_SUBST(PHP_EXECUTABLE) - dnl Expose to Makefile + dnl Expose to Makefile. PHP_SUBST(SAPI_CLI_PATH) PHP_SUBST(BUILD_CLI) diff --git a/sapi/embed/config.m4 b/sapi/embed/config.m4 index 8fa55880fe..069f4dcd0c 100644 --- a/sapi/embed/config.m4 +++ b/sapi/embed/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for sapi embed - PHP_ARG_ENABLE([embed],, [AS_HELP_STRING([[--enable-embed[=TYPE]]], [EXPERIMENTAL: Enable building of embedded SAPI library TYPE is either diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 5a1b4fa829..67ffc10522 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -1,12 +1,10 @@ -dnl config.m4 for sapi fpm - PHP_ARG_ENABLE([fpm],, [AS_HELP_STRING([--enable-fpm], [Enable building of the fpm SAPI executable])], [no], [no]) -dnl configure checks {{{ +dnl Configure checks. AC_DEFUN([AC_FPM_STDLIBS], [ AC_CHECK_FUNCS(clearenv setproctitle setproctitle_fast) @@ -341,7 +339,6 @@ AC_DEFUN([AC_FPM_LQ], fi fi ]) -dnl }}} AC_DEFUN([AC_FPM_SYSCONF], [ @@ -354,7 +351,6 @@ AC_DEFUN([AC_FPM_SYSCONF], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_TIMES], [ @@ -367,7 +363,6 @@ AC_DEFUN([AC_FPM_TIMES], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_KQUEUE], [ @@ -390,7 +385,6 @@ AC_DEFUN([AC_FPM_KQUEUE], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_PORT], [ @@ -412,7 +406,6 @@ AC_DEFUN([AC_FPM_PORT], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_DEVPOLL], [ @@ -436,7 +429,6 @@ AC_DEFUN([AC_FPM_DEVPOLL], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_EPOLL], [ @@ -471,7 +463,6 @@ AC_DEFUN([AC_FPM_EPOLL], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_POLL], [ @@ -496,7 +487,6 @@ AC_DEFUN([AC_FPM_POLL], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_SELECT], [ @@ -526,7 +516,6 @@ AC_DEFUN([AC_FPM_SELECT], AC_MSG_RESULT([no]) ]) ]) -dnl }}} AC_DEFUN([AC_FPM_APPARMOR], [ @@ -544,7 +533,6 @@ AC_DEFUN([AC_FPM_APPARMOR], ]) ]) - AC_MSG_CHECKING(for FPM build) if test "$PHP_FPM" != "no"; then AC_MSG_RESULT($PHP_FPM) @@ -609,7 +597,7 @@ if test "$PHP_FPM" != "no"; then if test "$PHP_FPM_ACL" != "no" ; then AC_CHECK_HEADERS([sys/acl.h]) - dnl *BSD has acl_* built into libc + dnl *BSD has acl_* built into libc. AC_CHECK_FUNC(acl_free, [ AC_DEFINE(HAVE_FPM_ACL, 1, [ POSIX Access Control List ]) ],[ diff --git a/sapi/litespeed/config.m4 b/sapi/litespeed/config.m4 index 3e9175ae2d..c32420638d 100644 --- a/sapi/litespeed/config.m4 +++ b/sapi/litespeed/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for sapi litespeed - AC_MSG_CHECKING(for LiteSpeed support) PHP_ARG_WITH([litespeed],, diff --git a/sapi/phpdbg/config.m4 b/sapi/phpdbg/config.m4 index bbb541e861..d4bceed4f7 100644 --- a/sapi/phpdbg/config.m4 +++ b/sapi/phpdbg/config.m4 @@ -1,5 +1,3 @@ -dnl config.m4 for sapi phpdbg - PHP_ARG_ENABLE([phpdbg], [for phpdbg support], [AS_HELP_STRING([--enable-phpdbg], diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 index bcd66df6f3..880309bce7 100644 --- a/scripts/phpize.m4 +++ b/scripts/phpize.m4 @@ -17,7 +17,6 @@ AC_PRESERVE_HELP_ORDER PHP_CONFIG_NICE(config.nice) -dnl AC_DEFUN([PHP_EXT_BUILDDIR],[.])dnl AC_DEFUN([PHP_EXT_DIR],[""])dnl AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir])dnl @@ -26,7 +25,6 @@ AC_DEFUN([PHP_ALWAYS_SHARED],[ ext_shared=yes test "[$]$1" = "no" && $1=yes ])dnl -dnl test -z "$CFLAGS" && auto_cflags=1 @@ -38,7 +36,7 @@ AC_PROG_CC([cc gcc]) PHP_DETECT_ICC PHP_DETECT_SUNCC -dnl Support systems with system libraries in e.g. /usr/lib64 +dnl Support systems with system libraries in e.g. /usr/lib64. PHP_ARG_WITH([libdir], [for system library directory], [AS_HELP_STRING([--with-libdir=NAME], @@ -49,14 +47,14 @@ PHP_ARG_WITH([libdir], PHP_RUNPATH_SWITCH PHP_SHLIB_SUFFIX_NAMES -dnl Find php-config script +dnl Find php-config script. PHP_ARG_WITH([php-config],, [AS_HELP_STRING([--with-php-config=PATH], [Path to php-config [php-config]])], [php-config], [no]) -dnl For BC +dnl For BC. PHP_CONFIG=$PHP_PHP_CONFIG prefix=`$PHP_CONFIG --prefix 2>/dev/null` phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null` @@ -80,7 +78,7 @@ AC_MSG_RESULT([$EXTENSION_DIR]) AC_MSG_CHECKING([for PHP installed headers prefix]) AC_MSG_RESULT([$phpincludedir]) -dnl Checks for PHP_DEBUG / ZEND_DEBUG / ZTS +dnl Checks for PHP_DEBUG / ZEND_DEBUG / ZTS. AC_MSG_CHECKING([if debug is enabled]) old_CPPFLAGS=$CPPFLAGS CPPFLAGS="-I$phpincludedir" @@ -113,11 +111,11 @@ php_zts_is_enabled CPPFLAGS=$old_CPPFLAGS AC_MSG_RESULT([$PHP_THREAD_SAFETY]) -dnl Support for building and testing Zend extensions +dnl Support for building and testing Zend extensions. ZEND_EXT_TYPE="zend_extension" PHP_SUBST(ZEND_EXT_TYPE) -dnl Discard optimization flags when debugging is enabled +dnl Discard optimization flags when debugging is enabled. if test "$PHP_DEBUG" = "yes"; then PHP_DEBUG=1 ZEND_DEBUG=yes @@ -125,7 +123,7 @@ if test "$PHP_DEBUG" = "yes"; then CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` changequote([,]) - dnl add -O0 only if GCC or ICC is used + dnl Add -O0 only if GCC or ICC is used. if test "$GCC" = "yes" || test "$ICC" = "yes"; then CFLAGS="$CFLAGS -O0" CXXFLAGS="$CXXFLAGS -g -O0" @@ -144,10 +142,10 @@ else ZEND_DEBUG=no fi -dnl Always shared +dnl Always shared. PHP_BUILD_SHARED -dnl Required programs +dnl Required programs. PHP_PROG_AWK sinclude(config.m4) @@ -155,8 +153,9 @@ sinclude(config.m4) enable_static=no enable_shared=yes -dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX). -dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler. +dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by +dnl PHP_REQUIRE_CXX). Otherwise AC_PROG_LIBTOOL fails if there is no working C++ +dnl compiler. AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [ undefine([AC_PROG_CXX]) AC_DEFUN([AC_PROG_CXX], []) -- 2.40.0