cvs: php4 / acinclude.m4 /ext/zlib config.m4

From: Date: Tue, 21 Nov 2000 08:38:20 +0000
Subject: cvs: php4 / acinclude.m4 /ext/zlib config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2717@lists.php.net to get a copy of this message
hholzgra Tue Nov 21 00:38:20 2000 EDT Modified files: /php4 acinclude.m4 /php4/ext/zlib config.m4 Log: make HAVE_FOPENCOOKIE available for other extensions besides zlib Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.113 php4/acinclude.m4:1.114 --- php4/acinclude.m4:1.113 Thu Nov 2 10:24:43 2000 +++ php4/acinclude.m4 Tue Nov 21 00:38:19 2000 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.113 2000/11/02 18:24:43 stas Exp $ +dnl $Id: acinclude.m4,v 1.114 2000/11/21 08:38:19 hholzgra Exp $ dnl dnl This file contains local autoconf functions. @@ -883,3 +883,42 @@ fi ]) +AC_DEFUN(PHP_FOPENCOOKIE,[ + AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ]) + + if test "$have_glibc_fopencookie" = "yes" ; then + dnl this comes in two flavors: + dnl newer glibcs (since 2.1.2 ? ) + dnl have a type called cookie_io_functions_t + AC_TRY_COMPILE([ #define _GNU_SOURCE + #include <stdio.h> + ], + [ cookie_io_functions_t cookie; ], + [ have_cookie_io_functions_t=yes ], + [ ] ) + + if test "$have_cookie_io_functions_t" = "yes" ; then + cookie_io_functions_t=cookie_io_functions_t + have_fopen_cookie=yes + else + dnl older glibc versions (up to 2.1.2 ?) + dnl call it _IO_cookie_io_functions_t + AC_TRY_COMPILE([ #define _GNU_SOURCE + #include <stdio.h> + ], + [ _IO_cookie_io_functions_t cookie; ], + [ have_IO_cookie_io_functions_t=yes ], + [] ) + if test "$have_cookie_io_functions_t" = "yes" ; then + cookie_io_functions_t=_IO_cookie_io_functions_t + have_fopen_cookie=yes + fi + fi + + if test "$have_fopen_cookie" = "yes" ; then + AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ]) + AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ]) + fi + + fi +]) Index: php4/ext/zlib/config.m4 diff -u php4/ext/zlib/config.m4:1.9 php4/ext/zlib/config.m4:1.10 --- php4/ext/zlib/config.m4:1.9 Mon Nov 20 13:36:38 2000 +++ php4/ext/zlib/config.m4 Tue Nov 21 00:38:20 2000 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.9 2000/11/20 21:36:38 hholzgra Exp $ +dnl $Id: config.m4,v 1.10 2000/11/21 08:38:20 hholzgra Exp $ @@ -42,43 +42,5 @@ AC_ADD_INCLUDE($ZLIB_INCDIR) - dnl check for fopencookie() from glibc - AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ]) - - if test "$have_glibc_fopencookie" = "yes" ; then - dnl this comes in two flavors: - dnl newer glibcs (since 2.1.2 ? ) - dnl have a type called cookie_io_functions_t - AC_TRY_COMPILE([ #define _GNU_SOURCE - #include <stdio.h> - ], - [ cookie_io_functions_t cookie; ], - [ have_cookie_io_functions_t=yes ], - [ ] ) - - if test "$have_cookie_io_functions_t" = "yes" ; then - cookie_io_functions_t=cookie_io_functions_t - have_fopen_cookie=yes - else - dnl older glibc versions (up to 2.1.2 ?) - dnl call it _IO_cookie_io_functions_t - AC_TRY_COMPILE([ #define _GNU_SOURCE - #include <stdio.h> - ], - [ _IO_cookie_io_functions_t cookie; ], - [ have_IO_cookie_io_functions_t=yes ], - [] ) - if test "$have_cookie_io_functions_t" = "yes" ; then - cookie_io_functions_t=_IO_cookie_io_functions_t - have_fopen_cookie=yes - fi - fi - - if test "$have_fopen_cookie" = "yes" ; then - AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ]) - AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ]) - fi - - fi - + PHP_FOPENCOOKIE fi

« previous php.cvs (#2717) next »