Skip to content

Commit 540b9f5

Browse files
authored
Autotools: Wrap long texts with m4_text_wrap (#15368)
The m4_text_wrap macro wraps the text into a single space separated string which is wrapped to not exceed the line lenght of 79 characters by default.
1 parent d052d61 commit 540b9f5

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

build/php.m4

+9-3
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,10 @@ AC_DEFUN([PHP_PROG_BISON], [
16971697
case $php_bison_check in
16981698
""|invalid[)]
16991699
if test ! -f "$abs_srcdir/Zend/zend_language_parser.h" || test ! -f "$abs_srcdir/Zend/zend_language_parser.c"; then
1700-
AC_MSG_ERROR([bison $php_bison_required_version or newer is required to generate PHP parsers (excluded versions: $php_bison_excluded_versions).])
1700+
AC_MSG_ERROR(m4_text_wrap([
1701+
bison $php_bison_required_version or newer is required to generate PHP
1702+
parsers (excluded versions: $php_bison_excluded_versions).
1703+
]))
17011704
fi
17021705
17031706
YACC="exit 0;"
@@ -1757,7 +1760,10 @@ AC_DEFUN([PHP_PROG_RE2C],[
17571760
case $php_re2c_check in
17581761
""|invalid[)]
17591762
if test ! -f "$abs_srcdir/Zend/zend_language_scanner.c"; then
1760-
AC_MSG_ERROR([re2c $php_re2c_required_version or newer is required to generate PHP lexers.])
1763+
AC_MSG_ERROR(m4_text_wrap([
1764+
re2c $php_re2c_required_version or newer is required to generate PHP
1765+
lexers.
1766+
]))
17611767
fi
17621768
17631769
RE2C="exit 0;"
@@ -2019,7 +2025,7 @@ dnl PostgreSQL minimum version sanity check.
20192025
[AC_MSG_FAILURE([PostgreSQL check failed: libpq 10.0 or later is required.])],
20202026
[$PGSQL_LIBS])
20212027
$2],
2022-
[m4_default([$3], [AC_MSG_FAILURE(m4_normalize([
2028+
[m4_default([$3], [AC_MSG_FAILURE(m4_text_wrap([
20232029
Cannot find libpq-fe.h or pq library (libpq). Please specify the correct
20242030
PostgreSQL installation path with environment variables PGSQL_CFLAGS and
20252031
PGSQL_LIBS or provide the PostgreSQL installation directory.

configure.ac

+7-4
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,10 @@ if test "$PHP_GCOV" = "yes"; then
769769
esac
770770

771771
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
772-
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
772+
AC_MSG_ERROR(m4_text_wrap([
773+
ccache must be disabled when --enable-gcov option is used. You can disable
774+
ccache by setting environment variable CCACHE_DISABLE=1.
775+
]))
773776
fi
774777

775778
AC_DEFINE([HAVE_GCOV], [1], [Define to 1 if GCOV code coverage is enabled.])
@@ -843,7 +846,7 @@ AS_VAR_IF([ZEND_ZTS], [yes], [PHP_THREAD_SAFETY=yes], [PHP_THREAD_SAFETY=no])
843846

844847
AS_VAR_IF([PHP_THREAD_SAFETY], [yes], [
845848
AS_VAR_IF([pthreads_working], [yes], [],
846-
[AC_MSG_FAILURE(m4_normalize([
849+
[AC_MSG_FAILURE(m4_text_wrap([
847850
Unable to verify system support for POSIX Threads, which are required for
848851
PHP thread safety (ZTS) build.
849852
]))])
@@ -1140,7 +1143,7 @@ AS_VAR_IF([PHP_PEAR], [no],, [
11401143
AC_MSG_WARN([The --with-pear option is deprecated])
11411144
11421145
dnl PEAR dependencies.
1143-
AS_VAR_IF([PHP_XML], [no], [AC_MSG_ERROR(m4_normalize([
1146+
AS_VAR_IF([PHP_XML], [no], [AC_MSG_ERROR(m4_text_wrap([
11441147
PEAR requires XML to be enabled. Add '--enable-xml' to the configure line,
11451148
or disable PEAR (--without-pear).
11461149
]))])
@@ -1494,7 +1497,7 @@ AS_VAR_IF([PHP_MEMORY_SANITIZER], [yes],
14941497
])
14951498

14961499
AS_VAR_IF([PHP_ADDRESS_SANITIZER], [yes],
1497-
[AS_VAR_IF([PHP_VALGRIND], [no],, [AC_MSG_ERROR(m4_normalize([
1500+
[AS_VAR_IF([PHP_VALGRIND], [no],, [AC_MSG_ERROR(m4_text_wrap([
14981501
Valgrind and address sanitizer are not compatible. Either disable Valgrind
14991502
(remove --with-valgrind) or disable address sanitizer (remove
15001503
--enable-address-sanitizer).

ext/opcache/config.m4

+4-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,10 @@ int main(void) {
346346
PHP_ADD_EXTENSION_DEP(opcache, pcre)
347347

348348
if test "$php_cv_shm_ipc" != "yes" && test "$php_cv_shm_mmap_posix" != "yes" && test "$php_cv_shm_mmap_anon" != "yes"; then
349-
AC_MSG_FAILURE([No supported shared memory caching support was found when configuring opcache.])
349+
AC_MSG_FAILURE(m4_text_wrap([
350+
No supported shared memory caching support was found when configuring
351+
opcache.
352+
]))
350353
fi
351354

352355
AS_VAR_IF([PHP_OPCACHE_JIT], [yes], [

ext/sysvmsg/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PHP_ARG_ENABLE([sysvmsg],
55

66
if test "$PHP_SYSVMSG" != "no"; then
77
AC_CHECK_HEADER([sys/msg.h],,
8-
[AC_MSG_FAILURE(m4_normalize([
8+
[AC_MSG_FAILURE(m4_text_wrap([
99
Cannot enable System V IPC support. Required <sys/msg.h> header file not
1010
found.
1111
]))])

sapi/apache2handler/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if test "$PHP_APXS2" != "no"; then
3434

3535
APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
3636
APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
37-
AS_IF([test ! -x "$APXS_HTTPD"], [AC_MSG_ERROR(m4_normalize([
37+
AS_IF([test ! -x "$APXS_HTTPD"], [AC_MSG_ERROR(m4_text_wrap([
3838
$APXS_HTTPD executable not found. Please, install Apache HTTP Server
3939
command-line utility.
4040
]))])

sapi/fuzzer/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ AC_DEFUN([PHP_FUZZER_TARGET], [
1919
])
2020

2121
if test "$PHP_FUZZER" != "no"; then
22-
AS_VAR_IF([enable_zts], [yes], [AC_MSG_ERROR(m4_normalize([
22+
AS_VAR_IF([enable_zts], [yes], [AC_MSG_ERROR(m4_text_wrap([
2323
Thread safety (--enable-zts) is not supported when building fuzzing module
2424
(--enable-fuzzer). Please build fuzzer without ZTS.
2525
]))])

0 commit comments

Comments
 (0)