Attached are two patches that I've written to address a number of issues I've come across while testing PHP on Solaris.
The first patch (alloca.txt) eliminated a warning message due to the fact that that on Solaris and Tru64 alloca() is defined in a separate header, alloca.h, which is not included. The current check only attempts to include this header is the compiler in not GNUC, I came across the problem while using gcc 3.2, which is becoming quite common on Solaris. The second patch (flex.txt) is a flex check that ensures we are using the GNU flex 2.5.4 (released in 1997, so it is safe to assume any recent distro has it). If it is not found the configure script gives an advisory warning similar to the one we give for bison. Only an advisory is given, because unless PHP is compiled from CVS, flex is not needed. This check is needed, because for example, the stock lexer installer on Sun Os, does not support the -P flag needed by PHP and even though it passes existing configure checks, it fails when it comes to generating the .c files. Are there any objection to the integration of those 2 patches? Ilia
Index: zend.h =================================================================== RCS file: /repository/Zend/zend.h,v retrieving revision 1.163 diff -u -r1.163 zend.h --- zend.h 9 Oct 2002 06:19:10 -0000 1.163 +++ zend.h 9 Nov 2002 18:11:31 -0000 @@ -117,11 +117,13 @@ # define ZEND_EXTENSIONS_SUPPORT 0 #endif +#if HAVE_ALLOCA_H && !defined(_ALLOCA_H) +# include <alloca.h> +#endif + /* AIX requires this to be the first thing in the file. */ #ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include <alloca.h> -# else +# ifndef HAVE_ALLOCA_H # ifdef _AIX #pragma alloca # else
Index: configure.in =================================================================== RCS file: /repository/php4/configure.in,v retrieving revision 1.395 diff -u -r1.395 configure.in --- configure.in 4 Nov 2002 20:08:08 -0000 1.395 +++ configure.in 9 Nov 2002 18:12:46 -0000 @@ -158,6 +158,12 @@ LEX_CFLAGS="-DYY_USE_CONST" fi +AC_MSG_CHECKING([flex version]) +set `$LEX -V | grep 'version' | cut -d ' ' -f 3 | sed -e 's/\./ /g' | sed -e 's/[^0-9 +]//g'` +if test "${1}" != "2" -o "${2}" != "5" -o "${3}" -lt "4"; then + AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate +Zend/PHP lexical parsers.) +fi +AC_MSG_RESULT(${1}.${2}.${3} (ok)) dnl Platform-specific compile settings. dnl -------------------------------------------------------------------------
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php