Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions sapi/cli/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ PHP_ARG_ENABLE([cli],
[yes],
[no])

AC_CHECK_FUNCS([setproctitle])
if test "$PHP_CLI" != "no"; then
AC_CHECK_FUNCS([setproctitle])

AC_CHECK_HEADERS([sys/pstat.h])
AC_CHECK_HEADERS([sys/pstat.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";])],
[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.])])
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";
])],
[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])

dnl Set filename.
Expand Down