diff -ur ../mapserver-4.2.5/Makefile.in ./Makefile.in --- ../mapserver-4.2.5/Makefile.in Fri Jul 23 08:45:12 2004 +++ ./Makefile.in Thu Oct 21 19:46:33 2004 @@ -125,6 +125,7 @@ # In order to compile the PHP_MAPSCRIPT module, we have to make MapServer # uses the same version of the REGEX library that PHP was compiled with: # +PHP_REGEX=@USE_PHP_REGEX@ REGEX_OBJ=@PHP_REGEX_OBJ@ REGEX_INC=@PHP_REGEX_INC@ @@ -152,7 +153,7 @@ CFLAGS= @CFLAGS@ @DEBUG_FLAGS@ \ $(IGNORE_MISSING_DATA) $(STRINGS) $(EPPL) $(PROJ) $(OWS) $(MING) \ $(ORACLESPATIAL) $(TIFF) $(JPEG) $(GD) $(PDF) $(SDE) $(OGR) $(GDAL) \ - $(POSTGIS) $(MYGIS) $(MPATROL) $(THREAD) $(GD_INC) $(PDF_INC) \ + $(POSTGIS) $(MYGIS) $(MPATROL) $(THREAD) $(PHP_REGEX) $(GD_INC) $(PDF_INC) \ $(PROJ_INC) $(TIFF_INC) $(JPEG_INC) $(EGIS_INC) $(SDE_INC) \ $(REGEX_INC) $(MPATROL_INC) $(GDAL_INC) $(POSTGIS_INC) $(MYGIS_INC) \ $(CURL_INC) $(MING_INC) $(ORACLESPATIAL_INC) diff -ur ../mapserver-4.2.5/configure.in ./configure.in --- ../mapserver-4.2.5/configure.in Tue Sep 21 21:11:44 2004 +++ ./configure.in Thu Oct 21 19:39:36 2004 @@ -1622,22 +1622,23 @@ dnl This is a temporary error message until we figure the problem with dnl PHP4's regex dnl - if test "$PHP_VERSION_FLAG" = "-DPHP4" ; then - AC_MSG_ERROR([ -!!! The current version of PHP MapScript has some problems with !!! -!!! PHP4's bundled regex. Until we figure the solution to the !!! -!!! problem, the workaround is to compile PHP4 with the system regex !!! -!!! Please re-configure and re-compile PHP4 using --with-regex=system !!! -!!! and then re-configure and re-compile MapServer. !!! -!!! Note that PHP's --with-regex=system works only when PHP is !!! -!!! is configured as a CGI (that is without the --with-apxs and !!! -!!! --with-httpd options). So if you configured your PHP using !!! -!!! --with-regex=system and still get this error then make sure you !!! -!!! configured PHP as a CGI. !!!]) - fi +dnl if test "$PHP_VERSION_FLAG" = "-DPHP4" ; then +dnl AC_MSG_ERROR([ +dnl !!! The current version of PHP MapScript has some problems with !!! +dnl !!! PHP4's bundled regex. Until we figure the solution to the !!! +dnl !!! problem, the workaround is to compile PHP4 with the system regex !!! +dnl !!! Please re-configure and re-compile PHP4 using --with-regex=system !!! +dnl !!! and then re-configure and re-compile MapServer. !!! +dnl !!! Note that PHP's --with-regex=system works only when PHP is !!! +dnl !!! is configured as a CGI (that is without the --with-apxs and !!! +dnl !!! --with-httpd options). So if you configured your PHP using !!! +dnl !!! --with-regex=system and still get this error then make sure you !!! +dnl !!! configured PHP as a CGI. !!!]) +dnl fi + USE_PHP_REGEX="-DUSE_PHP_REGEX" PHP_REGEX_DIR="$PHP_SRC_DIR/regex" - PHP_REGEX_INC="-I$PHP_REGEX_DIR" + PHP_REGEX_INC="-I$PHP_SRC_DIR" PHP_REGEX_OBJ="$PHP_REGEX_DIR/regcomp.o $PHP_REGEX_DIR/regerror.o \ $PHP_REGEX_DIR/regexec.o $PHP_REGEX_DIR/regfree.o" ALL_INC="$PHP_REGEX_INC $ALL_INC" @@ -1644,6 +1645,8 @@ else AC_MSG_RESULT(no) fi + + AC_SUBST(USE_PHP_REGEX, $USE_PHP_REGEX) PHPMS_MAKEFILE=mapscript/php3/Makefile MAKE_PHPMS=php3_mapscript diff -ur ../mapserver-4.2.5/map.h ./map.h --- ../mapserver-4.2.5/map.h Tue Oct 19 18:40:14 2004 +++ ./map.h Thu Oct 21 19:49:45 2004 @@ -51,7 +51,15 @@ #endif #include /* regular expression support */ + +/* The regex lib from the system and the regex lib from PHP needs to + * be separated here. We separate here via its directory location. + */ +#ifdef USE_PHP_REGEX +#include +#else #include +#endif #ifdef USE_MING #include "ming.h" diff -ur ../mapserver-4.2.5/mapscript/php3/Makefile.in ./mapscript/php3/Makefile.in --- ../mapserver-4.2.5/mapscript/php3/Makefile.in Tue Jul 1 06:55:02 2003 +++ ./mapscript/php3/Makefile.in Thu Oct 21 20:15:29 2004 @@ -35,7 +35,7 @@ CC = @PHP_CC@ LD = @PHP_LD@ -CFLAGS = @CFLAGS@ -DCOMPILE_DL=1 @PHP_VERSION_FLAG@ +CFLAGS = @CFLAGS@ @USE_PHP_REGEX@ -DCOMPILE_DL=1 @PHP_VERSION_FLAG@ $(MS_DEFINE) $(MS_INC) $(PHP_INC) RUNPATHS= @RPATHS@ # @@ -65,8 +65,6 @@ # The rest of the file should not have to be edited... # -CFLAGS112 = $(CFLAGS) $(MS_DEFINE) $(MS_INC) $(PHP_INC) - all: php_mapscript.so PHPMS_OBJS = php_mapscript_util.o php_mapscript.o mapscript_i.o @@ -81,7 +79,7 @@ $(LD) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS) %.o: %.c php_mapscript_util.h php_mapscript.h - $(CC) $(CFLAGS112) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< clean: