tony2001 Tue Feb 20 20:10:53 2007 UTC
Modified files:
/php-src acinclude.m4 configure.in
/php-src/sapi/cgi config9.m4
Log:
move PHP_TEST_WRITE_STDOUT to acinclude.m4 and use it in configure.in
its result is used in sapi/cli & sapi/embed, not just sapi/cgi
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.361&r2=1.362&diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.361 php-src/acinclude.m4:1.362
--- php-src/acinclude.m4:1.361 Wed Jan 31 21:29:53 2007
+++ php-src/acinclude.m4 Tue Feb 20 20:10:53 2007
@@ -1,5 +1,5 @@
dnl
-dnl $Id: acinclude.m4,v 1.361 2007/01/31 21:29:53 tony2001 Exp $
+dnl $Id: acinclude.m4,v 1.362 2007/02/20 20:10:53 tony2001 Exp $
dnl
dnl This file contains local autoconf functions.
dnl
@@ -2712,3 +2712,33 @@
AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
fi
])
+
+AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
+ AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
+ AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#define TEXT "This is the test message -- "
+
+main()
+{
+ int n;
+
+ n = write(1, TEXT, sizeof(TEXT)-1);
+ return (!(n == sizeof(TEXT)-1));
+}
+ ],[
+ ac_cv_write_stdout=yes
+ ],[
+ ac_cv_write_stdout=no
+ ],[
+ ac_cv_write_stdout=no
+ ])
+ ])
+ if test "$ac_cv_write_stdout" = "yes"; then
+ AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
+ fi
+])
+
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.622&r2=1.623&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.622 php-src/configure.in:1.623
--- php-src/configure.in:1.622 Fri Jan 26 11:13:50 2007
+++ php-src/configure.in Tue Feb 20 20:10:53 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.622 2007/01/26 11:13:50 tony2001 Exp $ -*- autoconf
-*-
+ ## $Id: configure.in,v 1.623 2007/02/20 20:10:53 tony2001 Exp $ -*- autoconf
-*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -286,6 +286,9 @@
dnl Check whether the system byte ordering is bigendian
PHP_C_BIGENDIAN
+dnl Check whether writing to stdout works
+PHP_TEST_WRITE_STDOUT
+
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
dnl and source packages. This should be harmless on other OSs.
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/config9.m4?r1=1.21&r2=1.22&diff_format=u
Index: php-src/sapi/cgi/config9.m4
diff -u php-src/sapi/cgi/config9.m4:1.21 php-src/sapi/cgi/config9.m4:1.22
--- php-src/sapi/cgi/config9.m4:1.21 Thu Feb 2 10:00:09 2006
+++ php-src/sapi/cgi/config9.m4 Tue Feb 20 20:10:53 2007
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config9.m4,v 1.21 2006/02/02 10:00:09 dmitry Exp $
+dnl $Id: config9.m4,v 1.22 2007/02/20 20:10:53 tony2001 Exp $
dnl
AC_ARG_ENABLE(cgi,
@@ -10,36 +10,6 @@
PHP_SAPI_CGI=yes
])
-AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
- AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
- AC_TRY_RUN([
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#define TEXT "This is the test message -- "
-
-main()
-{
- int n;
-
- n = write(1, TEXT, sizeof(TEXT)-1);
- return (!(n == sizeof(TEXT)-1));
-}
- ],[
- ac_cv_write_stdout=yes
- ],[
- ac_cv_write_stdout=no
- ],[
- ac_cv_write_stdout=no
- ])
- ])
- if test "$ac_cv_write_stdout" = "yes"; then
- AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
- fi
-])
-
-
if test "$PHP_SAPI" = "default"; then
AC_MSG_CHECKING(for CGI build)
if test "$PHP_SAPI_CGI" != "no"; then
@@ -82,8 +52,6 @@
esac
PHP_SUBST(SAPI_CGI_PATH)
- PHP_TEST_WRITE_STDOUT
-
INSTALL_IT="@echo \"Installing PHP CGI into:
\$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH)
\$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)"
PHP_SELECT_SAPI(cgi, program, fastcgi.c cgi_main.c getopt.c, ,
'$(SAPI_CGI_PATH)')
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php