Skip to content

Commit 602a4ac

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Fix bug GH-15514 (Configure error: genif.sh: syntax error) Autotools: Refactor main/internal_functions commands This wraps generation of main/internal_functions* files into a separate AC_CONFIG_COMMANDS and uses a SHELL variable instead of sh command. Autoconf sets the SHELL variable to a suitable current shell the configure is running in. Instead of putting the commands into the 2nd argument the 3rd initialization argument is used like before because it is easier to read and work with variables (AWK, EXT_STATIC and EXT_CLI_STATIC), which would need to be assigned again for the 2nd argument. This simplifies the configure usage on Solaris 10 C shell and KornShell without issuing errors when executing genif.sh script.
2 parents c69d29e + d5b5e61 commit 602a4ac

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

configure.ac

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,6 +1796,18 @@ AC_CONFIG_FILES([
17961796

17971797
AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([main/php_config.h.in])])
17981798

1799+
AC_CONFIG_COMMANDS([main/internal_functions.c], [], [
1800+
AWK="$AWK" $SHELL $srcdir/build/genif.sh \
1801+
$srcdir/main/internal_functions.c.in \
1802+
"$EXT_STATIC" > main/internal_functions.c
1803+
])
1804+
1805+
AC_CONFIG_COMMANDS([main/internal_functions_cli.c], [], [
1806+
AWK="$AWK" $SHELL $srcdir/build/genif.sh \
1807+
$srcdir/main/internal_functions.c.in \
1808+
"$EXT_CLI_STATIC" > main/internal_functions_cli.c
1809+
])
1810+
17991811
AC_CONFIG_COMMANDS([default],[
18001812
cat <<X
18011813
@@ -1817,11 +1829,5 @@ dnl ----------------------------------------------------------------------------
18171829
cat >Zend/zend_config.h <<FEO
18181830
#include <../main/php_config.h>
18191831
FEO
1820-
1821-
echo "creating main/internal_functions.c"
1822-
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > main/internal_functions.c
1823-
1824-
echo "creating main/internal_functions_cli.c"
1825-
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c
18261832
])
18271833
AC_OUTPUT

0 commit comments

Comments
 (0)