Skip to content

Commit 1ca3230

Browse files
authored
Autotools: Update php.m4 CPP macros help texts (#15188)
- COMPILE_DL_<extension> - COOKIE_SEEKER_USES_OFF64_T - HAVE_BROKEN_GETCWD - HAVE_LIBEXPAT - HAVE_PREAD - HAVE_PWRITE - MISSING_ASCTIME_R_DECL - MISSING_CTIME_R_DECL - MISSING_GMTIME_R_DECL - MISSING_LOCALTIME_R_DECL - MISSING_STRTOK_R_DECL - PHP_PREAD_64 - PHP_PWRITE_64 - SIZEOF_<type> - HAVE_<type>
1 parent 0f2f7c6 commit 1ca3230

File tree

1 file changed

+30
-18
lines changed

1 file changed

+30
-18
lines changed

build/php.m4

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,8 @@ dnl ---------------------------------------------- Shared module
946946
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
947947
PHP_ADD_SOURCES_X($ext_dir,$2,$ac_extra -DZEND_COMPILE_DL_EXT=1,shared_objects_$1,yes)
948948
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
949-
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
949+
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), [1],
950+
[Define to 1 if the PHP extension '$1' is built as a dynamic module.])
950951
fi
951952
fi
952953
@@ -1060,8 +1061,10 @@ dnl
10601061
AC_DEFUN([PHP_CHECK_SIZEOF], [
10611062
AC_MSG_CHECKING([size of $1])
10621063
_PHP_CHECK_SIZEOF($1, $2, $3, [
1063-
AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
1064-
AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
1064+
AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1,
1065+
[The size of '$1', as computed by sizeof.])
1066+
AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), [1],
1067+
[Define to 1 if the system has the type '$1'.])
10651068
])
10661069
AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
10671070
])
@@ -1197,9 +1200,11 @@ AC_DEFUN([PHP_PWRITE_TEST],[
11971200
])
11981201
11991202
if test "$ac_cv_pwrite" != "no"; then
1200-
AC_DEFINE(HAVE_PWRITE, 1, [ ])
1203+
AC_DEFINE([HAVE_PWRITE], [1],
1204+
[Define to 1 if you have the 'pwrite' function.])
12011205
if test "$ac_cv_pwrite" = "64"; then
1202-
AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
1206+
AC_DEFINE([PHP_PWRITE_64], [1],
1207+
[Define to 1 if 'pwrite' declaration with 'off64_t' is missing.])
12031208
fi
12041209
fi
12051210
])
@@ -1219,9 +1224,11 @@ AC_DEFUN([PHP_PREAD_TEST],[
12191224
])
12201225
12211226
if test "$ac_cv_pread" != "no"; then
1222-
AC_DEFINE(HAVE_PREAD, 1, [ ])
1227+
AC_DEFINE([HAVE_PREAD], [1],
1228+
[Define to 1 if you have the 'pread' function.])
12231229
if test "$ac_cv_pread" = "64"; then
1224-
AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
1230+
AC_DEFINE([PHP_PREAD_64], [1],
1231+
[Define to 1 if 'pread' declaration with 'off64_t' is missing.])
12251232
fi
12261233
fi
12271234
])
@@ -1231,19 +1238,24 @@ dnl PHP_MISSING_TIME_R_DECL
12311238
dnl
12321239
AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
12331240
AC_CHECK_DECL([localtime_r],,
1234-
[AC_DEFINE([MISSING_LOCALTIME_R_DECL], [1], [Whether localtime_r is declared])],
1241+
[AC_DEFINE([MISSING_LOCALTIME_R_DECL], [1],
1242+
[Define to 1 if 'localtime_r' declaration is missing.])],
12351243
[#include <time.h>])
12361244
AC_CHECK_DECL([gmtime_r],,
1237-
[AC_DEFINE([MISSING_GMTIME_R_DECL], [1], [Whether gmtime_r is declared])],
1245+
[AC_DEFINE([MISSING_GMTIME_R_DECL], [1],
1246+
[Define to 1 if 'gmtime_r' declaration is missing.])],
12381247
[#include <time.h>])
12391248
AC_CHECK_DECL([asctime_r],,
1240-
[AC_DEFINE([MISSING_ASCTIME_R_DECL], [1], [Whether asctime_r is declared])],
1249+
[AC_DEFINE([MISSING_ASCTIME_R_DECL], [1],
1250+
[Define to 1 if 'asctime_r' declaration is missing.])],
12411251
[#include <time.h>])
12421252
AC_CHECK_DECL([ctime_r],,
1243-
[AC_DEFINE([MISSING_CTIME_R_DECL], [1], [Whether ctime_r is declared])],
1253+
[AC_DEFINE([MISSING_CTIME_R_DECL], [1],
1254+
[Define to 1 if 'ctime_r' declaration is missing.])],
12441255
[#include <time.h>])
12451256
AC_CHECK_DECL([strtok_r],,
1246-
[AC_DEFINE([MISSING_STRTOK_R_DECL], [1], [Whether strtok_r is declared])],
1257+
[AC_DEFINE([MISSING_STRTOK_R_DECL], [1],
1258+
[Define to 1 if 'strtok_r' declaration is missing.])],
12471259
[#include <string.h>])
12481260
])
12491261

@@ -1275,7 +1287,8 @@ AC_DEFUN([PHP_BROKEN_GETCWD],[
12751287
os=`uname -sr 2>/dev/null`
12761288
case $os in
12771289
SunOS*[)]
1278-
AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
1290+
AC_DEFINE([HAVE_BROKEN_GETCWD], [1],
1291+
[Define to 1 if system has a broken 'getcwd'.])
12791292
AC_MSG_RESULT([yes]);;
12801293
*[)]
12811294
AC_MSG_RESULT([no]);;
@@ -1367,7 +1380,7 @@ int main(void) {
13671380
)])
13681381
AS_VAR_IF([php_cv_type_cookie_off64_t], [yes],
13691382
[AC_DEFINE([COOKIE_SEEKER_USES_OFF64_T], [1],
1370-
[Whether fopencookie seeker uses off64_t.])])
1383+
[Define to 1 if fopencookie seeker uses off64_t.])])
13711384
])
13721385
])
13731386

@@ -1912,11 +1925,10 @@ dnl Common setup macro for expat.
19121925
dnl
19131926
AC_DEFUN([PHP_SETUP_EXPAT], [
19141927
PKG_CHECK_MODULES([EXPAT], [expat])
1915-
19161928
PHP_EVAL_INCLINE([$EXPAT_CFLAGS])
19171929
PHP_EVAL_LIBLINE([$EXPAT_LIBS], [$1])
1918-
1919-
AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
1930+
AC_DEFINE([HAVE_LIBEXPAT], [1],
1931+
[Define to 1 if the system has the Expat XML parser library.])
19201932
])
19211933

19221934
dnl
@@ -2436,7 +2448,7 @@ AC_CACHE_CHECK([for $1], [php_var],
24362448
])
24372449
AS_VAR_IF([php_var], [yes],
24382450
[AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_]m4_bpatsubst([$1], [^_*], [])), [1],
2439-
[Define to 1 if compiler supports '$1'.])])
2451+
[Define to 1 if the compiler supports '$1'.])])
24402452
AS_VAR_POPDEF([php_var])
24412453
])
24422454

0 commit comments

Comments
 (0)