Skip to content

Commit 4993453

Browse files
authored
Autotools: Update configure.ac CPP macros help texts (#15189)
- __MUSL__ - DEFAULT_SHORT_OPEN_TAG - HAVE_BUILD_DEFS_H - HAVE_GCOV - HAVE_LIBDL - PHP_RTLD_NOW - PHP_SIGCHILD - ZEND_FIBER_UCONTEXT
1 parent 079f82a commit 4993453

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

configure.ac

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ AC_MSG_CHECKING([whether we are using musl libc])
247247
if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl
248248
then
249249
AC_MSG_RESULT([yes])
250-
AC_DEFINE([__MUSL__], [1], [Define when using musl libc])
250+
AC_DEFINE([__MUSL__], [1], [Define to 1 when using musl libc.])
251251
else
252252
AC_MSG_RESULT([no])
253253
fi
@@ -345,7 +345,8 @@ AC_CHECK_FUNCS([socketpair],,
345345
AC_SEARCH_LIBS([gethostbyaddr], [nsl network])
346346

347347
AC_SEARCH_LIBS([dlopen], [dl],
348-
[AC_DEFINE([HAVE_LIBDL], [1], [Define to 1 if the dl library is available.])])
348+
[AC_DEFINE([HAVE_LIBDL], [1],
349+
[Define to 1 if you have the 'dl' library (-ldl).])])
349350

350351
AC_SEARCH_LIBS([sin], [m])
351352

@@ -779,7 +780,7 @@ if test "$PHP_GCOV" = "yes"; then
779780
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
780781
fi
781782

782-
AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
783+
AC_DEFINE([HAVE_GCOV], [1], [Define to 1 if GCOV code coverage is enabled.])
783784
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/build/Makefile.gcov], [$abs_srcdir])
784785

785786
dnl Remove all optimization flags from CFLAGS.
@@ -871,9 +872,10 @@ PHP_ARG_ENABLE([rtld-now],
871872
[no],
872873
[no])
873874

874-
if test "$PHP_RTLD_NOW" = "yes"; then
875-
AC_DEFINE(PHP_USE_RTLD_NOW, 1, [ Use dlopen with RTLD_NOW instead of RTLD_LAZY ])
876-
fi
875+
AS_VAR_IF([PHP_RTLD_NOW], [yes],
876+
[AC_DEFINE([PHP_USE_RTLD_NOW], [1],
877+
[Define to 1 if 'dlopen()' uses the 'RTLD_NOW' mode flag instead of
878+
'RTLD_LAZY'.])])
877879

878880
PHP_ARG_WITH([layout],
879881
[layout of installed files],
@@ -928,11 +930,11 @@ PHP_ARG_ENABLE([sigchild],
928930
[no],
929931
[no])
930932

931-
if test "$PHP_SIGCHILD" = "yes"; then
932-
AC_DEFINE(PHP_SIGCHILD, 1, [ ])
933-
else
934-
AC_DEFINE(PHP_SIGCHILD, 0, [ ])
935-
fi
933+
AH_TEMPLATE([PHP_SIGCHILD],
934+
[Define to 1 if PHP uses its own SIGCHLD handler, and to 0 if not.])
935+
AS_VAR_IF([PHP_SIGCHILD], [yes],
936+
[AC_DEFINE([PHP_SIGCHILD], [1])],
937+
[AC_DEFINE([PHP_SIGCHILD], [0])])
936938

937939
PHP_ARG_ENABLE([libgcc],
938940
[whether to explicitly link against libgcc],
@@ -957,11 +959,12 @@ PHP_ARG_ENABLE([short-tags],
957959
[yes],
958960
[no])
959961

960-
if test "$PHP_SHORT_TAGS" = "yes"; then
961-
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "1", [ ])
962-
else
963-
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "0", [ ])
964-
fi
962+
AH_TEMPLATE([DEFAULT_SHORT_OPEN_TAG],
963+
[Define to string "1" if PHP short open tags '<?' are enabled by default, and
964+
to string "0" if they are not.])
965+
AS_VAR_IF([PHP_SHORT_TAGS], [yes],
966+
[AC_DEFINE([DEFAULT_SHORT_OPEN_TAG], ["1"])],
967+
[AC_DEFINE([DEFAULT_SHORT_OPEN_TAG], ["0"])])
965968

966969
PHP_ARG_ENABLE([dmalloc],
967970
[whether to enable dmalloc],
@@ -1307,7 +1310,8 @@ else
13071310
AC_DEFINE([_XOPEN_SOURCE], 1, [ ])
13081311
fi
13091312
AC_CHECK_HEADER([ucontext.h],
1310-
[AC_DEFINE([ZEND_FIBER_UCONTEXT], [1], [ ])],
1313+
[AC_DEFINE([ZEND_FIBER_UCONTEXT], [1],
1314+
[Define to 1 if Zend fiber uses ucontext instead of boost context.])],
13111315
[AC_MSG_ERROR([fibers not available on this platform])])
13121316
fi
13131317

@@ -1811,7 +1815,8 @@ PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/Zend/Makefile.frag],
18111815
[$abs_srcdir/Zend],
18121816
[Zend])
18131817

1814-
AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
1818+
AC_DEFINE([HAVE_BUILD_DEFS_H], [1],
1819+
[Define to 1 if PHP has the <main/build-defs.h> header file.])
18151820

18161821
PHP_ADD_BUILD_DIR(m4_normalize([
18171822
main

0 commit comments

Comments
 (0)