Skip to content

Commit db9a7aa

Browse files
authored
Autotools: Sync CS in configure.ac (php#15706)
This further replaces more raw shell usages with AS_* macros.
1 parent 45ebe47 commit db9a7aa

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

configure.ac

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ PHP_MAJOR_VERSION=[$]1
6565
PHP_MINOR_VERSION=[$]2
6666
PHP_RELEASE_VERSION=[$]3
6767
dnl Allow overriding PHP_EXTRA_VERSION through the homonymous env var
68-
AC_ARG_VAR([PHP_EXTRA_VERSION],[Extra PHP version label suffix, e.g. '-dev', 'rc1', '-acme'])dnl
69-
AS_IF([test -z "$PHP_EXTRA_VERSION"],[PHP_EXTRA_VERSION=[$]4])
68+
AC_ARG_VAR([PHP_EXTRA_VERSION],
69+
[Extra PHP version label suffix, e.g. '-dev', 'rc1', '-acme'])dnl
70+
AS_VAR_IF([PHP_EXTRA_VERSION],, [PHP_EXTRA_VERSION=[$]4])
7071
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
7172
PHP_VERSION_ID=$(expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION)
7273

@@ -764,7 +765,7 @@ PHP_ARG_ENABLE([gcov],
764765
[no],
765766
[no])
766767

767-
if test "$PHP_GCOV" = "yes"; then
768+
AS_VAR_IF([PHP_GCOV], [yes], [
768769
AS_VAR_IF([GCC], [yes],,
769770
[AC_MSG_ERROR([GNU C compatible compiler is required for --enable-gcov])])
770771
@@ -793,7 +794,7 @@ if test "$PHP_GCOV" = "yes"; then
793794
dnl Add the special gcc flags.
794795
CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
795796
CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
796-
fi
797+
])
797798

798799
PHP_ARG_ENABLE([debug],
799800
[whether to include debugging symbols],
@@ -1282,9 +1283,7 @@ if test "$fiber_asm" = 'yes'; then
12821283
[$fiber_asm_cflag])
12831284
AC_MSG_RESULT([$fiber_asm_file])
12841285
else
1285-
if test "$fiber_os" = 'mac'; then
1286-
AC_DEFINE([_XOPEN_SOURCE], 1, [ ])
1287-
fi
1286+
AS_VAR_IF([fiber_os], [mac], [AC_DEFINE([_XOPEN_SOURCE], [1], [ ])])
12881287
AC_CHECK_HEADER([ucontext.h],
12891288
[AC_DEFINE([ZEND_FIBER_UCONTEXT], [1],
12901289
[Define to 1 if Zend fiber uses ucontext instead of boost context.])],
@@ -1317,11 +1316,8 @@ AS_VAR_IF([program_prefix], [NONE], [program_prefix=])
13171316
AS_VAR_IF([program_suffix], [NONE], [program_suffix=])
13181317

13191318
orig_libdir=$libdir
1320-
case $libdir in
1321-
'${exec_prefix}/lib')
1322-
libdir=$libdir/php
1323-
;;
1324-
esac
1319+
AS_CASE([$libdir],
1320+
['${exec_prefix}/lib'], [libdir=$libdir/php])
13251321

13261322
AS_CASE([$(eval echo $datadir)],
13271323
['${prefix}/share'], [datadir=$datadir/php])

0 commit comments

Comments
 (0)