2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
1999-12-03 21:13:48 +08:00
|
|
|
dnl $Id$
|
2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
1999-12-03 21:13:48 +08:00
|
|
|
|
2001-12-01 03:00:13 +08:00
|
|
|
PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
|
2000-05-02 05:36:52 +08:00
|
|
|
[ --disable-posix Disable POSIX-like functions], yes)
|
1999-12-03 21:24:30 +08:00
|
|
|
|
|
|
|
if test "$PHP_POSIX" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions])
|
2002-03-13 00:44:00 +08:00
|
|
|
PHP_NEW_EXTENSION(posix, posix.c, $ext_shared)
|
2000-07-27 05:25:01 +08:00
|
|
|
|
2005-06-07 06:04:14 +08:00
|
|
|
AC_CHECK_HEADERS(sys/mkdev.h)
|
|
|
|
|
2007-01-06 05:31:56 +08:00
|
|
|
AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for working ttyname_r() implementation])
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
char buf[64];
|
|
|
|
|
|
|
|
return ttyname_r(0, buf, 64) ? 1 : 0;
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE(HAVE_TTYNAME_R, 1, [Whether you have a working ttyname_r])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no, posix_ttyname() will be thread-unsafe])
|
2007-03-01 19:23:54 +08:00
|
|
|
], [
|
|
|
|
AC_MSG_RESULT([no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe])
|
2007-01-06 05:31:56 +08:00
|
|
|
])
|
2008-09-21 06:12:43 +08:00
|
|
|
|
|
|
|
AC_CACHE_CHECK([for utsname.domainname], ac_cv_have_utsname_domainname, [
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
#include <sys/utsname.h>
|
|
|
|
],[
|
|
|
|
return sizeof(((struct utsname *)0)->domainname);
|
|
|
|
],[
|
|
|
|
ac_cv_have_utsname_domainname=yes
|
|
|
|
],[
|
|
|
|
ac_cv_have_utsname_domainname=no
|
|
|
|
])
|
|
|
|
])
|
2009-01-22 03:22:39 +08:00
|
|
|
if test "$ac_cv_have_utsname_domainname" = yes; then
|
2013-06-11 05:20:18 +08:00
|
|
|
AC_DEFINE(HAVE_UTSNAME_DOMAINNAME, 1, [Whether struct utsname has domainname])
|
2008-09-21 06:12:43 +08:00
|
|
|
fi
|
1999-12-03 21:24:30 +08:00
|
|
|
fi
|