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:30:06 +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:07 +08:00
|
|
|
], [
|
|
|
|
AC_MSG_RESULT([no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe])
|
2007-01-06 05:30:06 +08:00
|
|
|
])
|
1999-12-03 21:24:30 +08:00
|
|
|
fi
|