1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Autotools: Sync CS in PHP_EVAL_LIBLINE (#15737)

- AS_* macros used
- arguments quoted
- redundant quotation of variable-variable simplified from [$]$2 to $$2
  (see Autoconf documentation)
This commit is contained in:
Peter Kokot
2024-09-04 23:27:20 +02:00
committed by GitHub
parent 6cd0e50845
commit 035b0c50bc

View File

@@ -375,25 +375,23 @@ AC_DEFUN([PHP_EVAL_LIBLINE],
[m4_warn([syntax], [Missing 2nd argument when skipping extension check])],
[_php_ext_shared_saved=$ext_shared; ext_shared=yes])])
for ac_i in $1; do
case $ac_i in
-pthread[)]
if test "$ext_shared" = "yes"; then
$2="[$]$2 -pthread"
else
PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
PHP_RUN_ONCE(EXTRA_LDFLAGS_PROGRAM, [$ac_i],
AS_CASE([$ac_i],
[-pthread], [
AS_VAR_IF([ext_shared], [yes], [$2="$$2 -pthread"], [
PHP_RUN_ONCE([EXTRA_LDFLAGS], [$ac_i],
[EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
PHP_RUN_ONCE([EXTRA_LDFLAGS_PROGRAM], [$ac_i],
[EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"])
fi
;;
-l*[)]
ac_ii=$(echo $ac_i|cut -c 3-)
PHP_ADD_LIBRARY($ac_ii,1,$2)
;;
-L*[)]
ac_ii=$(echo $ac_i|cut -c 3-)
PHP_ADD_LIBPATH($ac_ii,$2)
;;
esac
])
],
[-l*], [
ac_ii=$(echo $ac_i|cut -c 3-)
PHP_ADD_LIBRARY([$ac_ii], [yes], [$2])
],
[-L*], [
ac_ii=$(echo $ac_i|cut -c 3-)
PHP_ADD_LIBPATH([$ac_ii], [$2])
])
done
m4_ifnblank([$3], [m4_ifnblank([$2], [ext_shared=$_php_ext_shared_saved])])[]dnl
])