Skip to content

Commit d0fd9fe

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Add AS_HELP_STRING to *nix build configure options
2 parents a2343d1 + 9df6a1e commit d0fd9fe

File tree

83 files changed

+923
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+923
-482
lines changed

README.SELF-CONTAINED-EXTENSIONS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ CREATING THE M4 CONFIGURATION FILE
7979
macro calls.
8080

8181
------------------------------------------------------------------------------
82-
PHP_ARG_ENABLE(foobar,whether to enable foobar,
83-
[ --enable-foobar Enable foobar])
82+
PHP_ARG_ENABLE([foobar],
83+
[whether to enable foobar],
84+
[AS_HELP_STRING([--enable-foobar],
85+
[Enable foobar])])
8486

8587
if test "$PHP_FOOBAR" != "no"; then
8688
PHP_NEW_EXTENSION(foobar, foo.c bar.c, $ext_shared)

TSRM/tsrm.m4

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,23 @@ AC_DEFUN([TSRM_THREADS_CHECKS],[
6868
dnl For the thread implementations, we always use --with-*
6969
dnl to maintain consistency
7070
71-
AC_ARG_WITH(tsrm-pth,
72-
[ --with-tsrm-pth[=pth-config]
73-
Use GNU Pth],[
74-
TSRM_PTH=$withval
75-
],[
76-
TSRM_PTH=no
77-
])
78-
79-
AC_ARG_WITH(tsrm-st,
80-
[ --with-tsrm-st Use SGI's State Threads],[
81-
TSRM_ST=$withval
82-
],[
83-
TSRM_ST=no
84-
])
85-
86-
AC_ARG_WITH(tsrm-pthreads,
87-
[ --with-tsrm-pthreads Use POSIX threads (default)],[
88-
TSRM_PTHREADS=$withval
89-
],[
90-
TSRM_PTHREADS=yes
91-
])
71+
AC_ARG_WITH([tsrm-pth],
72+
[AS_HELP_STRING([[--with-tsrm-pth[=pth-config]]],
73+
[Use GNU Pth])],
74+
[TSRM_PTH=$withval],
75+
[TSRM_PTH=no])
76+
77+
AC_ARG_WITH([tsrm-st],
78+
[AS_HELP_STRING([--with-tsrm-st],
79+
[Use SGI's State Threads])],
80+
[TSRM_ST=$withval],
81+
[TSRM_ST=no])
82+
83+
AC_ARG_WITH([tsrm-pthreads],
84+
[AS_HELP_STRING([--with-tsrm-pthreads],
85+
[Use POSIX threads (default)])],
86+
[TSRM_PTHREADS=$withval],
87+
[TSRM_PTHREADS=yes])
9288
9389
test "$TSRM_PTH" = "yes" && TSRM_PTH=pth-config
9490

Zend/Zend.m4

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,17 @@ int main()
8383

8484
AC_DEFUN([LIBZEND_OTHER_CHECKS],[
8585
86-
AC_ARG_ENABLE(maintainer-zts,
87-
[ --enable-maintainer-zts Enable thread safety - for code maintainers only!!],[
88-
ZEND_MAINTAINER_ZTS=$enableval
89-
],[
90-
ZEND_MAINTAINER_ZTS=no
91-
])
92-
93-
AC_ARG_ENABLE(inline-optimization,
94-
[ --disable-inline-optimization
95-
If building zend_execute.lo fails, try this switch],[
96-
ZEND_INLINE_OPTIMIZATION=$enableval
97-
],[
98-
ZEND_INLINE_OPTIMIZATION=yes
99-
])
86+
AC_ARG_ENABLE([maintainer-zts],
87+
[AS_HELP_STRING([--enable-maintainer-zts],
88+
[Enable thread safety - for code maintainers only!!])],
89+
[ZEND_MAINTAINER_ZTS=$enableval],
90+
[ZEND_MAINTAINER_ZTS=no])
91+
92+
AC_ARG_ENABLE([inline-optimization],
93+
[AS_HELP_STRING([--disable-inline-optimization],
94+
[If building zend_execute.lo fails, try this switch])],
95+
[ZEND_INLINE_OPTIMIZATION=$enableval],
96+
[ZEND_INLINE_OPTIMIZATION=yes])
10097
10198
AC_MSG_CHECKING(whether to enable thread-safety)
10299
AC_MSG_RESULT($ZEND_MAINTAINER_ZTS)
@@ -197,13 +194,11 @@ AC_MSG_RESULT(done)
197194
198195
AC_CHECK_FUNCS(mremap)
199196
200-
201-
AC_ARG_ENABLE(zend-signals,
202-
[ --disable-zend-signals whether to enable zend signal handling],[
203-
ZEND_SIGNALS=$enableval
204-
],[
205-
ZEND_SIGNALS=yes
206-
])
197+
AC_ARG_ENABLE([zend-signals],
198+
[AS_HELP_STRING([--disable-zend-signals],
199+
[whether to enable zend signal handling])],
200+
[ZEND_SIGNALS=$enableval],
201+
[ZEND_SIGNALS=yes])
207202
208203
AC_CHECK_FUNC(sigaction, [
209204
AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available])
@@ -236,13 +231,12 @@ else
236231
AC_MSG_RESULT(no)
237232
fi
238233

239-
AC_ARG_ENABLE(gcc-global-regs,
240-
[ --disable-gcc-global-regs
241-
whether to enable GCC global register variables],[
242-
ZEND_GCC_GLOBAL_REGS=$enableval
243-
],[
244-
ZEND_GCC_GLOBAL_REGS=yes
245-
])
234+
AC_ARG_ENABLE([gcc-global-regs],
235+
[AS_HELP_STRING([--disable-gcc-global-regs],
236+
[whether to enable GCC global register variables])],
237+
[ZEND_GCC_GLOBAL_REGS=$enableval],
238+
[ZEND_GCC_GLOBAL_REGS=yes])
239+
246240
AC_MSG_CHECKING(for global register variables support)
247241
if test "$ZEND_GCC_GLOBAL_REGS" != "no"; then
248242
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[

configure.ac

Lines changed: 106 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,19 @@ AC_USE_SYSTEM_EXTENSIONS
179179
AC_PROG_LN_S
180180

181181
dnl Support systems with system libraries in e.g. /usr/lib64
182-
PHP_ARG_WITH(libdir, for system library directory,
183-
[ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib],lib,no)
184-
185-
PHP_ARG_ENABLE(rpath, whether to enable runpaths,
186-
[ --disable-rpath Disable passing additional runtime library
187-
search paths], yes, no)
182+
PHP_ARG_WITH([libdir],
183+
[for system library directory],
184+
[AS_HELP_STRING([--with-libdir=NAME],
185+
[Look for libraries in .../NAME rather than .../lib])],
186+
[lib],
187+
[no])
188+
189+
PHP_ARG_ENABLE([rpath],
190+
[whether to enable runpaths],
191+
[AS_HELP_STRING([--disable-rpath],
192+
[Disable passing additional runtime library search paths])],
193+
[yes],
194+
[no])
188195

189196
dnl check for -R, etc. switch
190197
PHP_RUNPATH_SWITCH
@@ -203,8 +210,12 @@ case $php_cv_bison_version in
203210
;;
204211
esac
205212

206-
PHP_ARG_ENABLE(re2c-cgoto, whether to enable computed goto gcc extension with re2c,
207-
[ --enable-re2c-cgoto Enable -g flag to re2c to use computed goto gcc extension], no, no)
213+
PHP_ARG_ENABLE([re2c-cgoto],
214+
[whether to enable computed goto gcc extension with re2c],
215+
[AS_HELP_STRING([--enable-re2c-cgoto],
216+
[Enable -g flag to re2c to use computed goto gcc extension])],
217+
[no],
218+
[no])
208219

209220
if test "$PHP_RE2C_CGOTO" = "no"; then
210221
RE2C_FLAGS=""
@@ -763,8 +774,12 @@ if test "$ac_cv__compiler_c99_vla" = yes; then
763774
fi
764775

765776
dnl Check valgrind support
766-
PHP_ARG_WITH(valgrind, [whether to enable valgrind support],
767-
[ --with-valgrind=DIR Enable valgrind support], yes, no)
777+
PHP_ARG_WITH([valgrind],
778+
[whether to enable valgrind support],
779+
[AS_HELP_STRING([--with-valgrind=DIR],
780+
[Enable valgrind support])],
781+
[yes],
782+
[no])
768783

769784
if test "$PHP_VALGRIND" != "no"; then
770785

@@ -798,8 +813,12 @@ PHP_CONFIGURE_PART(General settings)
798813

799814
PHP_HELP_SEPARATOR([General settings:])
800815

801-
PHP_ARG_ENABLE(gcov, whether to include gcov symbols,
802-
[ --enable-gcov Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!], no, no)
816+
PHP_ARG_ENABLE([gcov],
817+
[whether to include gcov symbols],
818+
[AS_HELP_STRING([--enable-gcov],
819+
[Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!])],
820+
[no],
821+
[no])
803822

804823
if test "$PHP_GCOV" = "yes"; then
805824

@@ -879,8 +898,12 @@ if test "$PHP_GCOV" = "yes"; then
879898
CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
880899
fi
881900

882-
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
883-
[ --enable-debug Compile with debugging symbols], no, no)
901+
PHP_ARG_ENABLE([debug],
902+
[whether to include debugging symbols],
903+
[AS_HELP_STRING([--enable-debug],
904+
[Compile with debugging symbols])],
905+
[no],
906+
[no])
884907

885908
if test "$PHP_DEBUG" = "yes"; then
886909
PHP_DEBUG=1
@@ -908,9 +931,12 @@ else
908931
ZEND_DEBUG=no
909932
fi
910933

911-
PHP_ARG_WITH(layout, layout of installed files,
912-
[ --with-layout=TYPE Set how installed files will be laid out. Type can
913-
be either PHP or GNU @<:@PHP@:>@], PHP, no)
934+
PHP_ARG_WITH([layout],
935+
[layout of installed files],
936+
[AS_HELP_STRING([--with-layout=TYPE],
937+
[Set how installed files will be laid out. Type can be either PHP or GNU [PHP]])],
938+
[PHP],
939+
[no])
914940

915941
case $PHP_LAYOUT in
916942
GNU)
@@ -921,9 +947,12 @@ case $PHP_LAYOUT in
921947
;;
922948
esac
923949

924-
PHP_ARG_WITH(config-file-path, path to configuration file,
925-
[ --with-config-file-path=PATH
926-
Set the path in which to look for php.ini @<:@PREFIX/lib@:>@], DEFAULT, no)
950+
PHP_ARG_WITH([config-file-path],
951+
[path to configuration file],
952+
[AS_HELP_STRING([--with-config-file-path=PATH],
953+
[Set the path in which to look for php.ini [PREFIX/lib]])],
954+
[DEFAULT],
955+
[no])
927956

928957
if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
929958
case $PHP_LAYOUT in
@@ -937,27 +966,38 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
937966
fi
938967

939968
AC_MSG_CHECKING([where to scan for configuration files])
940-
PHP_ARG_WITH(config-file-scan-dir,,
941-
[ --with-config-file-scan-dir=PATH
942-
Set the path where to scan for configuration files], DEFAULT, no)
969+
PHP_ARG_WITH([config-file-scan-dir],,
970+
[AS_HELP_STRING([--with-config-file-scan-dir=PATH],
971+
[Set the path where to scan for configuration files])],
972+
[DEFAULT],
973+
[no])
974+
943975
if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
944976
PHP_CONFIG_FILE_SCAN_DIR=
945977
fi
946978
AC_MSG_RESULT([$PHP_CONFIG_FILE_SCAN_DIR])
947979

948980
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
949981

950-
PHP_ARG_ENABLE(sigchild, whether to enable PHP's own SIGCHLD handler,
951-
[ --enable-sigchild Enable PHP's own SIGCHLD handler], no, no)
982+
PHP_ARG_ENABLE([sigchild],
983+
[whether to enable PHP's own SIGCHLD handler],
984+
[AS_HELP_STRING([--enable-sigchild],
985+
[Enable PHP's own SIGCHLD handler])],
986+
[no],
987+
[no])
952988

953989
if test "$PHP_SIGCHILD" = "yes"; then
954990
AC_DEFINE(PHP_SIGCHILD, 1, [ ])
955991
else
956992
AC_DEFINE(PHP_SIGCHILD, 0, [ ])
957993
fi
958994

959-
PHP_ARG_ENABLE(libgcc, whether to explicitly link against libgcc,
960-
[ --enable-libgcc Enable explicitly linking against libgcc], no, no)
995+
PHP_ARG_ENABLE([libgcc],
996+
[whether to explicitly link against libgcc],
997+
[AS_HELP_STRING([--enable-libgcc],
998+
[Enable explicitly linking against libgcc])],
999+
[no],
1000+
[no])
9611001

9621002
if test "$PHP_LIBGCC" = "yes"; then
9631003
PHP_LIBGCC_LIBPATH(gcc)
@@ -968,17 +1008,25 @@ if test "$PHP_LIBGCC" = "yes"; then
9681008
PHP_ADD_LIBRARY(gcc, yes)
9691009
fi
9701010

971-
PHP_ARG_ENABLE(short-tags, whether to enable short tags by default,
972-
[ --disable-short-tags Disable the short-form <? start tag by default], yes, no)
1011+
PHP_ARG_ENABLE([short-tags],
1012+
[whether to enable short tags by default],
1013+
[AS_HELP_STRING([--disable-short-tags],
1014+
[Disable the short-form <? start tag by default])],
1015+
[yes],
1016+
[no])
9731017

9741018
if test "$PHP_SHORT_TAGS" = "yes"; then
9751019
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "1", [ ])
9761020
else
9771021
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "0", [ ])
9781022
fi
9791023

980-
PHP_ARG_ENABLE(dmalloc, whether to enable dmalloc,
981-
[ --enable-dmalloc Enable dmalloc], no, no)
1024+
PHP_ARG_ENABLE([dmalloc],
1025+
[whether to enable dmalloc],
1026+
[AS_HELP_STRING([--enable-dmalloc],
1027+
[Enable dmalloc])],
1028+
[no],
1029+
[no])
9821030

9831031
if test "$PHP_DMALLOC" = "yes"; then
9841032
AC_CHECK_LIB(dmalloc, dmalloc_error, [
@@ -990,8 +1038,12 @@ if test "$PHP_DMALLOC" = "yes"; then
9901038
])
9911039
fi
9921040

993-
PHP_ARG_ENABLE(ipv6, whether to enable IPv6 support,
994-
[ --disable-ipv6 Disable IPv6 support], yes, no)
1041+
PHP_ARG_ENABLE([ipv6],
1042+
[whether to enable IPv6 support],
1043+
[AS_HELP_STRING([--disable-ipv6],
1044+
[Disable IPv6 support])],
1045+
[yes],
1046+
[no])
9951047

9961048
if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
9971049
AC_DEFINE(HAVE_IPV6, 1, [Whether to enable IPv6 support])
@@ -1001,8 +1053,12 @@ dnl ##
10011053
dnl ## DTRACE CHECKS
10021054
dnl ## Note: this has to be done after SAPI configuration!
10031055
dnl ##
1004-
PHP_ARG_ENABLE(dtrace, whether to enable DTrace support,
1005-
[ --enable-dtrace Enable DTrace support], no, no)
1056+
PHP_ARG_ENABLE([dtrace],
1057+
[whether to enable DTrace support],
1058+
[AS_HELP_STRING([--enable-dtrace],
1059+
[Enable DTrace support])],
1060+
[no],
1061+
[no])
10061062

10071063
if test "$PHP_DTRACE" = "yes"; then
10081064
AC_CHECK_HEADERS([sys/sdt.h], [
@@ -1017,8 +1073,11 @@ if test "$PHP_DTRACE" = "yes"; then
10171073
fi
10181074

10191075
AC_MSG_CHECKING([how big to make fd sets])
1020-
PHP_ARG_ENABLE(fd-setsize,,
1021-
[ --enable-fd-setsize Set size of descriptor sets], no, no)
1076+
PHP_ARG_ENABLE([fd-setsize],,
1077+
[AS_HELP_STRING([--enable-fd-setsize],
1078+
[Set size of descriptor sets])],
1079+
[no],
1080+
[no])
10221081

10231082
if test "$PHP_FD_SETSIZE" != "no"; then
10241083
if test "0$PHP_FD_SETSIZE" -gt 0 2>/dev/null; then
@@ -1052,11 +1111,10 @@ dnl
10521111
dnl Check if all enabled by default extensions should be disabled
10531112
dnl
10541113

1055-
AC_ARG_ENABLE(all,
1056-
[ --disable-all Disable all extensions which are enabled by default
1057-
], [
1058-
PHP_ENABLE_ALL=$enableval
1059-
])
1114+
AC_ARG_ENABLE([all],
1115+
[AS_HELP_STRING([--disable-all],
1116+
[Disable all extensions which are enabled by default])],
1117+
[PHP_ENABLE_ALL=$enableval])
10601118

10611119
# reading config stubs
10621120
esyscmd(./build/config-stubs ext)
@@ -1114,8 +1172,12 @@ if test "$PHP_CLI" = "no"; then
11141172
with_pear=no
11151173
fi
11161174

1117-
PHP_ARG_WITH(pear, [whether to install PEAR],
1118-
[ --with-pear=DIR Install PEAR in DIR @<:@PREFIX/lib/php@:>@], no, yes)
1175+
PHP_ARG_WITH([pear],
1176+
[whether to install PEAR],
1177+
[AS_HELP_STRING([[--with-pear[=DIR]]],
1178+
[Install PEAR in DIR [PREFIX/lib/php]])],
1179+
[no],
1180+
[yes])
11191181

11201182
if test "$PHP_PEAR" != "no"; then
11211183

0 commit comments

Comments
 (0)