mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Autotools: Refactor PS_STRINGS check in cli (#14763)
- over-quoted arguments reduced - AS_VAR_IF used - php_cv_var_PS_STRINGS cache variable name used instead of cli_cv_* - Macro help text synced according to empty definition
This commit is contained in:
parent
fa5e29f7d0
commit
a071d1c9cf
@ -9,17 +9,16 @@ AC_CHECK_FUNCS([setproctitle])
|
||||
|
||||
AC_CHECK_HEADERS([sys/pstat.h])
|
||||
|
||||
AC_CACHE_CHECK([for PS_STRINGS], [cli_cv_var_PS_STRINGS],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <machine/vmparam.h>
|
||||
AC_CACHE_CHECK([for PS_STRINGS], [php_cv_var_PS_STRINGS],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <machine/vmparam.h>
|
||||
#include <sys/exec.h>
|
||||
]],
|
||||
[[PS_STRINGS->ps_nargvstr = 1;
|
||||
PS_STRINGS->ps_argvstr = "foo";]])],
|
||||
[cli_cv_var_PS_STRINGS=yes],
|
||||
[cli_cv_var_PS_STRINGS=no])])
|
||||
if test "$cli_cv_var_PS_STRINGS" = yes ; then
|
||||
AC_DEFINE([HAVE_PS_STRINGS], [], [Define to 1 if the PS_STRINGS thing exists.])
|
||||
fi
|
||||
],
|
||||
[PS_STRINGS->ps_nargvstr = 1;
|
||||
PS_STRINGS->ps_argvstr = "foo";])],
|
||||
[php_cv_var_PS_STRINGS=yes],
|
||||
[php_cv_var_PS_STRINGS=no])])
|
||||
AS_VAR_IF([php_cv_var_PS_STRINGS], [yes],
|
||||
[AC_DEFINE([HAVE_PS_STRINGS], [], [Define if the PS_STRINGS exists.])])
|
||||
|
||||
if test "$PHP_CLI" != "no"; then
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cli/Makefile.frag)
|
||||
|
Loading…
Reference in New Issue
Block a user