|
|
dnl --------------------------------------------------------------------- | dnl --------------------------------------------------------------------- |
| |
AC_CHECKING(for PHP/MapScript module options) | AC_CHECKING(for PHP/MapScript module options) |
AC_ARG_WITH(php, |
AC_ARG_WITH(php4, |
[ --with-php=DIR Specify directory where PHP4's include files are |
[ --with-php4=DIR Specify directory where PHP4's include files are |
installed (or a pointer to the full source tree) | installed (or a pointer to the full source tree) |
Required in order to compile the PHP/MapScript | Required in order to compile the PHP/MapScript |
module.],,) | module.],,) |
| |
AC_ARG_WITH(php-regex-dir, |
AC_ARG_WITH(php4-regex-dir, |
[ --with-php-regex-dir=DIR (deprecated in version 4.6+) |
[ --with-php4-regex-dir=DIR (deprecated in version 4.6+) |
Specify directory where the PHP4 bundled REGEX | Specify directory where the PHP4 bundled REGEX |
object files (regex/*.o) are available. Required in | object files (regex/*.o) are available. Required in |
order to compile the PHP/MapScript module with PHP | order to compile the PHP/MapScript module with PHP |
configured as a DSO.],,) | configured as a DSO.],,) |
|
AC_ARG_WITH(php5, |
|
[ --with-php5=DIR Specify directory where PHP5's include files are |
|
installed (or a pointer to the full source tree) |
|
Required in order to compile the PHP/MapScript |
|
module.],,) |
|
|
|
AC_ARG_WITH(php5-regex-dir, |
|
[ --with-php5-regex-dir=DIR (deprecated in version 4.6+) |
|
Specify directory where the PHP5 bundled REGEX |
|
object files (regex/*.o) are available. Required in |
|
order to compile the PHP/MapScript module with PHP |
|
configured as a DSO.],,) |
| |
AC_ARG_ENABLE(internal-ld-detect, | AC_ARG_ENABLE(internal-ld-detect, |
[ --enable-perlv-ld-detect (applies to --with-php only) | [ --enable-perlv-ld-detect (applies to --with-php only) |
|
|
link php_mapscript.so. Try this only if the default | link php_mapscript.so. Try this only if the default |
internal macro didn't work.],,) | internal macro didn't work.],,) |
| |
if test -n "$with_php" -a -d "$with_php" ; then |
|
AC_EXPAND_PATH($with_php, PHP_SRC_DIR) |
dnl --------------------------------------------------------------------- |
|
dnl No php version specific |
|
dnl --------------------------------------------------------------------- |
|
if test -n "$with_php5" -o -n "$with_php4" ; then |
dnl | dnl |
dnl Checks for shared library linking. | dnl Checks for shared library linking. |
dnl | dnl |
|
|
dnl | dnl |
| |
if test "$enable_perlv_ld_detect" = "yes" ; then | if test "$enable_perlv_ld_detect" = "yes" ; then |
AC_MSG_RESULT(Using perl -V macro to figure ld command to link php_mapscript.so) |
AC_MSG_RESULT(Using perl -V macro to figure ld command to link php5_mapscript.so) |
| |
AC_MSG_CHECKING([whether 'perl -V' works]) | AC_MSG_CHECKING([whether 'perl -V' works]) |
if (perl -V > /dev/null 2>&1) ; then | if (perl -V > /dev/null 2>&1) ; then |
|
|
PHP_LD="$LD_SHARED" | PHP_LD="$LD_SHARED" |
fi | fi |
| |
|
fi |
|
|
|
|
|
dnl --------------------------------------------------------------------- |
|
dnl php version specific |
|
dnl --------------------------------------------------------------------- |
|
if test -n "$with_php5" -a -d "$with_php5" ; then |
|
AC_EXPAND_PATH($with_php5, PHP5_SRC_DIR) |
|
|
|
dnl |
|
dnl Look for php_config.h. |
|
dnl We'll need the config file to find info about the PHP configuration |
|
dnl |
|
AC_MSG_CHECKING([for location of PHP5's config.h or php_config.h]) |
|
dnl Starting with PHP 5, it's php-5.x.x/main/php_config.h |
|
test -f "$PHP5_SRC_DIR/main/php_config.h" && PHP5_CONFIG_H="$PHP5_SRC_DIR/main/php_config.h" |
|
|
|
dnl If php was installed, then the headers are under $prefix/include/php/* |
|
test -f "$PHP5_SRC_DIR/include/php/main/php_config.h" && PHP5_SRC_DIR="$PHP5_SRC_DIR/include/php/" && PHP5_CONFIG_H="$PHP5_SRC_DIR/main/php_config.h" |
|
|
|
if test -n "$PHP5_CONFIG_H" ; then |
|
AC_MSG_RESULT([found]) |
|
else |
|
AC_MSG_ERROR([ |
|
!!! Could not find php_config.h in $PHP5_SRC_DIR. !!! |
|
!!! Has PHP5 been configured yet? !!!]) |
|
fi |
|
|
|
AC_MSG_CHECKING([whether we have PHP4 or PHP5]) |
|
if test -n "`grep 'ZEND_API' $PHP5_CONFIG_H`" ; then |
|
PHP5_VERSION_FLAG="-DPHP4" |
|
else |
|
PHP5_VERSION_FLAG="-DPHP3" |
|
AC_MSG_ERROR([ |
|
!!! PHP MapScript now requires PHP 4.1.2 or more recent. !!!]) |
|
fi |
|
AC_MSG_RESULT([$PHP5_VERSION_FLAG]) |
|
|
|
dnl |
|
dnl Check if PHP5 was compiled with the bundled regex, and if so then |
|
dnl use the same version to compile MapServer. |
|
dnl |
|
AC_MSG_CHECKING([whether we should use PHP5's regex]) |
|
if test -n "`grep 'define REGEX 1' $PHP5_CONFIG_H`" ; then |
|
AC_MSG_RESULT(yes) |
|
|
|
if test -n "$with_php5_regex_dir" -a -d "$with_php5_regex_dir" ; then |
|
dnl |
|
dnl try to locate regex source under the --with-regex-dir=value |
|
dnl |
|
AC_EXPAND_PATH($with_php5_regex_dir, WITH_PHP5_REGEX_DIR) |
|
|
|
test -f $WITH_PHP5_REGEX_DIR/regcomp.o && PHP5_REGEX_DIR="$WITH_PHP5_REGEX_DIR" |
|
test -z "$PHP5_REGEX_DIR" -a -f $WITH_PHP5_REGEX_DIR/regex/regcomp.c && PHP5_REGEX_DIR="$WITH_PHP5_REGEX_DIR/regex" |
|
else |
|
dnl |
|
dnl try to locate regex source under the PHP4 directory |
|
dnl |
|
test -f $PHP5_SRC_DIR/regex/regcomp.o && PHP5_REGEX_DIR="$PHP5_SRC_DIR/regex" |
|
fi |
|
|
|
if test -n "$PHP5_REGEX_DIR" ; then |
|
dnl |
|
dnl found it! |
|
dnl |
|
USE_PHP5_REGEX="-DUSE_PHP_REGEX" |
|
PHP5_REGEX_INC="-I$PHP5_REGEX_DIR/.." |
|
PHP5_REGEX_OBJ="$PHP5_REGEX_DIR/regcomp.o $PHP5_REGEX_DIR/regerror.o \ |
|
$PHP5_REGEX_DIR/regexec.o $PHP5_REGEX_DIR/regfree.o" |
|
ALL_INC="$PHP5_REGEX_INC $ALL_INC" |
|
|
|
AC_MSG_RESULT([ * using PHP5 regex source from $PHP5_REGEX_DIR]) |
|
else |
|
dnl We'll check for regex_extra.h - that might let use build |
|
dnl without the source using libphp_common.so |
|
test -f "$PHP5_SRC_DIR/regex/regex_extra.h" && PHP5_NO_SOURCE="1" |
|
if test -n "$PHP5_NO_SOURCE" ; then |
|
dnl Found regex_extra.h |
|
USE_PHP5_REGEX="-DUSE_PHP5_REGEX" |
|
PHP5_REGEX_OBJ=php_regex.o |
|
AC_SUBST(PHP5_REGEX_INC,$PHP5_REGEX_INC) |
|
AC_SUBST(PHP5_REGEX_OBJ,$PHP5_REGEX_OBJ) |
|
AC_MSG_RESULT([ found regex_extra.h - trying to build without PHP5 source]) |
|
else |
|
AC_MSG_ERROR([ |
|
!!! You PHP5 was compiled with PHP5's bundled regex library. !!! |
|
!!! In this case MapServer and PHP MapScript must also be compiled !!! |
|
!!! using the same copy of regex. !!! |
|
!!! There are two possible ways to get rid of this error: !!! |
|
!!! 1- Download/extract and build the PHP5 source on your system (no need !!! |
|
!!! to 'make install') and use the --with-php5-regex-dir=DIR configure !!! |
|
!!! option to specifiy the location of the PHP5 source tree where the !!! |
|
!!! regex/*.o files are located. This is the only way to build !!! |
|
!!! PHP MapScript in an environment where PHP5 is configured as an !!! |
|
!!! Apache DSO. !!! |
|
!!! 2- Try to re-configure and re-compile PHP4 using --with-regex=system !!! |
|
!!! and then re-configure and re-compile MapServer. !!! |
|
!!! Note that PHP5's --with-regex=system works only when PHP5 is !!! |
|
!!! is configured as a CGI (that is without the --with-apxs and !!! |
|
!!! --with-httpd options). So if you configured your PHP4 using !!! |
|
!!! --with-regex=system and still get this error then make sure you !!! |
|
!!! configured PHP5 as a CGI. !!!]) |
|
fi |
|
fi |
|
|
|
else |
|
AC_MSG_RESULT(no) |
|
fi |
|
|
|
PHP5MS_MAKEFILE=mapscript/php5/Makefile |
|
MAKE_PHP5MS=php5_mapscript |
|
MAKE_PHP5MS_CLEAN=php5_mapscript_clean |
|
|
|
AC_SUBST(PHP5_VERSION_FLAG, $PHP5_VERSION_FLAG) |
|
AC_SUBST(PHP5_SRC_DIR, $PHP5_SRC_DIR) |
|
AC_SUBST(PHP_CC, $PHP_CC) |
|
AC_SUBST(PHP_LD, $PHP_LD) |
|
AC_SUBST(PHP5_REGEX_INC, $PHP5_REGEX_INC) |
|
AC_SUBST(PHP5_REGEX_OBJ, $PHP5_REGEX_OBJ) |
|
AC_SUBST(USE_PHP5_REGEX, $USE_PHP5_REGEX) |
|
|
|
AC_MSG_RESULT([ * PHP5/MapScript module configured.]) |
|
elif test -n "$with_php5" -a "$with_php5" != "no" ; then |
|
AC_MSG_ERROR([Missing or invalid PHP5 source directory in --with-php5=DIR.]) |
|
else |
|
AC_MSG_RESULT([ * PHP5/MapScript module not configured.]) |
|
fi |
|
AC_SUBST(MAKE_PHP5MS, $MAKE_PHP5MS) |
|
AC_SUBST(MAKE_PHP5MS_CLEAN, $MAKE_PHP5MS_CLEAN) |
|
|
|
|
|
if test -n "$with_php4" -a -d "$with_php4" ; then |
|
AC_EXPAND_PATH($with_php4, PHP_SRC_DIR) |
|
|
dnl | dnl |
dnl Look for PHP3's config.h or PHP4's php_config.h. | dnl Look for PHP3's config.h or PHP4's php_config.h. |
dnl We'll need the config file to find info about the PHP configuration | dnl We'll need the config file to find info about the PHP configuration |
|
|
| |
dnl | dnl |
dnl Check which PHP version we're using. | dnl Check which PHP version we're using. |
dnl Default is PHP3, and if ZEND_API is set then we assume that we have PHP4. |
dnl Default is PHP3, and if ZEND_API is set then we assume that we have PHP. |
dnl | dnl |
AC_MSG_CHECKING([whether we have PHP3 or PHP4]) |
AC_MSG_CHECKING([whether we have PHP3 or PHP]) |
if test -n "`grep 'ZEND_API' $PHP_CONFIG_H`" ; then | if test -n "`grep 'ZEND_API' $PHP_CONFIG_H`" ; then |
PHP_VERSION_FLAG="-DPHP4" | PHP_VERSION_FLAG="-DPHP4" |
else | else |
PHP_VERSION_FLAG="-DPHP3" | PHP_VERSION_FLAG="-DPHP3" |
AC_MSG_ERROR([ | AC_MSG_ERROR([ |
!!! PHP MapScript now requires PHP 4.1.2 or more recent. !!! |
!!! PHP MapScript now requires PHP 4.1.2 or more recent. !!!]) |
!!! Support for PHP3 has been dropped after MapServer version 3.5. !!!]) |
|
fi | fi |
AC_MSG_RESULT([$PHP_VERSION_FLAG]) | AC_MSG_RESULT([$PHP_VERSION_FLAG]) |
| |
|
|
dnl Check if PHP was compiled with the bundled regex, and if so then | dnl Check if PHP was compiled with the bundled regex, and if so then |
dnl use the same version to compile MapServer. | dnl use the same version to compile MapServer. |
dnl | dnl |
AC_MSG_CHECKING([whether we should use PHP's regex]) |
AC_MSG_CHECKING([whether we should use PHP4's regex]) |
if test -n "`grep 'define REGEX 1' $PHP_CONFIG_H`" ; then | if test -n "`grep 'define REGEX 1' $PHP_CONFIG_H`" ; then |
AC_MSG_RESULT(yes) | AC_MSG_RESULT(yes) |
| |
if test -n "$with_php_regex_dir" -a -d "$with_php_regex_dir" ; then |
if test -n "$with_php4_regex_dir" -a -d "$with_php4_regex_dir" ; then |
dnl | dnl |
dnl try to locate regex source under the --with-regex-dir=value | dnl try to locate regex source under the --with-regex-dir=value |
dnl | dnl |
AC_EXPAND_PATH($with_php_regex_dir, WITH_PHP_REGEX_DIR) |
AC_EXPAND_PATH($with_php4_regex_dir, WITH_PHP_REGEX_DIR) |
| |
test -f $WITH_PHP_REGEX_DIR/regcomp.o && PHP_REGEX_DIR="$WITH_PHP_REGEX_DIR" | test -f $WITH_PHP_REGEX_DIR/regcomp.o && PHP_REGEX_DIR="$WITH_PHP_REGEX_DIR" |
test -z "$PHP_REGEX_DIR" -a -f $WITH_PHP_REGEX_DIR/regex/regcomp.c && PHP_REGEX_DIR="$WITH_PHP_REGEX_DIR/regex" | test -z "$PHP_REGEX_DIR" -a -f $WITH_PHP_REGEX_DIR/regex/regcomp.c && PHP_REGEX_DIR="$WITH_PHP_REGEX_DIR/regex" |
else | else |
dnl | dnl |
dnl try to locate regex source under the PHP directory |
dnl try to locate regex source under the PHP4 directory |
dnl | dnl |
test -f $PHP_SRC_DIR/regex/regcomp.o && PHP_REGEX_DIR="$PHP_SRC_DIR/regex" | test -f $PHP_SRC_DIR/regex/regcomp.o && PHP_REGEX_DIR="$PHP_SRC_DIR/regex" |
fi | fi |
|
|
!!! regex/*.o files are located. This is the only way to build !!! | !!! regex/*.o files are located. This is the only way to build !!! |
!!! PHP MapScript in an environment where PHP is configured as an !!! | !!! PHP MapScript in an environment where PHP is configured as an !!! |
!!! Apache DSO. !!! | !!! Apache DSO. !!! |
!!! 2- Try to re-configure and re-compile PHP4 using --with-regex=system !!! |
!!! 2- Try to re-configure and re-compile PHP using --with-regex=system !!! |
!!! and then re-configure and re-compile MapServer. !!! | !!! and then re-configure and re-compile MapServer. !!! |
!!! Note that PHP's --with-regex=system works only when PHP is !!! | !!! Note that PHP's --with-regex=system works only when PHP is !!! |
!!! is configured as a CGI (that is without the --with-apxs and !!! | !!! is configured as a CGI (that is without the --with-apxs and !!! |
|
|
AC_SUBST(PHP_REGEX_OBJ, $PHP_REGEX_OBJ) | AC_SUBST(PHP_REGEX_OBJ, $PHP_REGEX_OBJ) |
AC_SUBST(USE_PHP_REGEX, $USE_PHP_REGEX) | AC_SUBST(USE_PHP_REGEX, $USE_PHP_REGEX) |
| |
AC_MSG_RESULT([ PHP/MapScript module configured.]) |
AC_MSG_RESULT([ * PHP/MapScript module configured.]) |
elif test -n "$with_php" -a "$with_php" != "no" ; then | elif test -n "$with_php" -a "$with_php" != "no" ; then |
AC_MSG_ERROR([Missing or invalid PHP source directory in --with-php=DIR.]) | AC_MSG_ERROR([Missing or invalid PHP source directory in --with-php=DIR.]) |
else | else |
AC_MSG_RESULT([ PHP/MapScript module not configured.]) |
AC_MSG_RESULT([ * PHP/MapScript module not configured.]) |
fi | fi |
| |
|
|
AC_SUBST(MAKE_PHPMS, $MAKE_PHPMS) | AC_SUBST(MAKE_PHPMS, $MAKE_PHPMS) |
AC_SUBST(MAKE_PHPMS_CLEAN, $MAKE_PHPMS_CLEAN) | AC_SUBST(MAKE_PHPMS_CLEAN, $MAKE_PHPMS_CLEAN) |
| |
|
|
dnl --------------------------------------------------------------------- | dnl --------------------------------------------------------------------- |
dnl 'apxs' option for PHP built as an Apache module (libphp3.so) | dnl 'apxs' option for PHP built as an Apache module (libphp3.so) |
dnl --with-apxs[=FILE] should be the exact same value that was passed | dnl --with-apxs[=FILE] should be the exact same value that was passed |
|
|
if test -n "$with_apxs" -a "$with_apxs" != "no" ; then | if test -n "$with_apxs" -a "$with_apxs" != "no" ; then |
| |
AC_MSG_ERROR([ | AC_MSG_ERROR([ |
!!! The current version of PHP MapScript requires PHP4 configured as !!! |
!!! The current version of PHP MapScript requires PHP configured as !!! |
!!! a CGI and cannot be used with PHP4 configured as an Apache module,!!! |
!!! a CGI and cannot be used with PHP configured as an Apache module,!!! |
!!! so you cannot use the --with-apxs option. !!! | !!! so you cannot use the --with-apxs option. !!! |
!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!]) | !!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!]) |
| |
|
|
if test -n "$with_apache" -a "$with_apache" != "no" ; then | if test -n "$with_apache" -a "$with_apache" != "no" ; then |
| |
AC_MSG_ERROR([ | AC_MSG_ERROR([ |
!!! The current version of PHP MapScript requires PHP4 configured as !!! |
!!! The current version of PHP MapScript requires PHP configured as !!! |
!!! a CGI and cannot be used with PHP4 configured as an Apache module,!!! |
!!! a CGI and cannot be used with PHP configured as an Apache module,!!! |
!!! so you cannot use the --with-apache option. !!! | !!! so you cannot use the --with-apache option. !!! |
!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!]) | !!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!]) |
| |
|
|
AC_SUBST(ALL_STATIC_LIB, $ALL_STATIC_LIB) | AC_SUBST(ALL_STATIC_LIB, $ALL_STATIC_LIB) |
AC_SUBST(RPATHS, [$RPATHS]) | AC_SUBST(RPATHS, [$RPATHS]) |
| |
AC_OUTPUT(Makefile $PHPMS_MAKEFILE mapscript/java/Makefile) |
AC_OUTPUT(Makefile $PHP5MS_MAKEFILE $PHPMS_MAKEFILE mapscript/java/Makefile) |
| |
|
|
# | # |
PHP_REGEX_OBJ=@PHP_REGEX_OBJ@ | PHP_REGEX_OBJ=@PHP_REGEX_OBJ@ |
PHP_REGEX_INC=@PHP_REGEX_INC@ | PHP_REGEX_INC=@PHP_REGEX_INC@ |
|
PHP5_REGEX_OBJ=@PHP5_REGEX_OBJ@ |
|
PHP5_REGEX_INC=@PHP5_REGEX_INC@ |
| |
# | # |
# Multithreading support. | # Multithreading support. |
|
|
$(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) $(EPPL) $(PROJ) \ | $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) $(EPPL) $(PROJ) \ |
$(OWS) $(MING) $(ORACLESPATIAL) $(TIFF) $(JPEG) $(GD) $(PDF) $(SDE) \ | $(OWS) $(MING) $(ORACLESPATIAL) $(TIFF) $(JPEG) $(GD) $(PDF) $(SDE) \ |
$(SDERASTER) $(OGR) $(GDAL) $(GEOS) $(ICONV) $(FASTCGI) $(PHP_REGEX) \ | $(SDERASTER) $(OGR) $(GDAL) $(GEOS) $(ICONV) $(FASTCGI) $(PHP_REGEX) \ |
$(REGEX_INC) $(POSTGIS) $(MYGIS) $(MPATROL) $(THREAD) $(ZLIB) \ |
$(PHP5_REGEX) $(REGEX_INC) $(POSTGIS) $(MYGIS) $(MPATROL) $(THREAD) $(ZLIB) \ |
$(GD_INC) $(PDF_INC) $(PROJ_INC) $(TIFF_INC) $(JPEG_INC) $(EGIS_INC) \ | $(GD_INC) $(PDF_INC) $(PROJ_INC) $(TIFF_INC) $(JPEG_INC) $(EGIS_INC) \ |
$(SDE_INC) $(MPATROL_INC) $(GDAL_INC) $(POSTGIS_INC) $(MYGIS_INC) \ | $(SDE_INC) $(MPATROL_INC) $(GDAL_INC) $(POSTGIS_INC) $(MYGIS_INC) \ |
$(CURL_INC) $(MING_INC) $(ORACLESPATIAL_INC) $(GEOS_INC) $(ICONV_INC) \ | $(CURL_INC) $(MING_INC) $(ORACLESPATIAL_INC) $(GEOS_INC) $(ICONV_INC) \ |
|
|
.cpp.o: | .cpp.o: |
$(CXX) -c $(CXXFLAGS) $< -o $@ | $(CXX) -c $(CXXFLAGS) $< -o $@ |
| |
all: $(MAKE_GD) libmap.a $(EXTRA_DEFAULT) $(EXE_LIST) @MAKE_PHPMS@ |
all: $(MAKE_GD) libmap.a $(EXTRA_DEFAULT) $(EXE_LIST) @MAKE_PHPMS@ @MAKE_PHP5MS@ |
|
|
|
php5_mapscript:: $(LIBMAP_STATIC) |
|
cd mapscript/php5; $(MAKE); cd ../.. |
| |
php3_mapscript:: $(LIBMAP_STATIC) | php3_mapscript:: $(LIBMAP_STATIC) |
cd mapscript/php3; $(MAKE); cd ../.. | cd mapscript/php3; $(MAKE); cd ../.. |
|
|
| |
CC = @PHP_CC@ | CC = @PHP_CC@ |
LD = @PHP_LD@ | LD = @PHP_LD@ |
CFLAGS = @CFLAGS@ @USE_PHP_REGEX@ -DCOMPILE_DL=1 @PHP_VERSION_FLAG@ |
CFLAGS = @CFLAGS@ @USE_PHP5_REGEX@ -DCOMPILE_DL=1 @PHP5_VERSION_FLAG@ |
RUNPATHS= @RPATHS@ | RUNPATHS= @RPATHS@ |
| |
# | # |
# Set PHP_SRC_DIR to point to the root of the PHP source tree |
# Set PHP5_SRC_DIR to point to the root of the PHP5 source tree |
# | # |
PHP_SRC_DIR = @PHP_SRC_DIR@ |
PHP5_SRC_DIR = @PHP5_SRC_DIR@ |
| |
PHP_INC = -I$(PHP_SRC_DIR) -I$(PHP_SRC_DIR)/dl -I$(PHP_SRC_DIR)/main \ |
PHP5_INC = -I$(PHP5_SRC_DIR) -I$(PHP5_SRC_DIR)/dl -I$(PHP5_SRC_DIR)/main \ |
-I$(PHP_SRC_DIR)/Zend -I$(PHP_SRC_DIR)/include \ |
-I$(PHP5_SRC_DIR)/Zend -I$(PHP5_SRC_DIR)/include \ |
-I$(PHP_SRC_DIR)/TSRM @APACHE_INC@ |
-I$(PHP5_SRC_DIR)/TSRM @APACHE_INC@ |
| |
# | # |
# IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS: |
# IMPORTANT NOTE ABOUT REGEX FOR PHP5_MAPSCRIPT USERS: |
# | # |
# In order to compile the PHP_MAPSCRIPT module, we have to make MapServer |
# In order to compile the PHP5_MAPSCRIPT module, we have to make MapServer |
# uses the same version of the REGEX library that PHP was compiled with: |
# uses the same version of the REGEX library that PHP5 was compiled with: |
# | # |
PHP_REGEX_OBJ=@PHP_REGEX_OBJ@ |
PHP5_REGEX_OBJ=@PHP5_REGEX_OBJ@ |
PHP_REGEX_INC=@PHP_REGEX_INC@ |
PHP5_REGEX_INC=@PHP5_REGEX_INC@ |
| |
| |
# | # |
|
|
# The rest of the file should not have to be edited... | # The rest of the file should not have to be edited... |
# | # |
| |
CFLAGS112 = $(CFLAGS) $(MS_DEFINE) $(MS_INC) $(PHP_INC) $(PHP_REGEX_INC) |
CFLAGS112 = $(CFLAGS) $(MS_DEFINE) $(MS_INC) $(PHP5_INC) $(PHP5_REGEX_INC) |
| |
all: php_mapscript.so | all: php_mapscript.so |
| |
PHPMS_OBJS = php_mapscript_util.o php_mapscript.o mapscript_i.o $(PHP_REGEX_OBJ) |
PHP5MS_OBJS = php_mapscript_util.o php_mapscript.o mapscript_i.o $(PHP5_REGEX_OBJ) |
| |
PHPPROJ_OBJS = php_mapscript_util.o php_proj.o $(PHP_REGEX_OBJ) |
PHP5PROJ_OBJS = php_mapscript_util.o php_proj.o $(PHP5_REGEX_OBJ) |
| |
| |
php_mapscript.so: $(PHPMS_OBJS) ../../libmap.a |
php_mapscript.so: $(PHP5MS_OBJS) ../../libmap.a |
$(LD) -o $@ $(PHPMS_OBJS) $(MS_LIBS) |
$(LD) -o $@ $(PHP5MS_OBJS) $(MS_LIBS) |
| |
php_proj.so: $(PHPPROJ_OBJS) |
php_proj.so: $(PHP5PROJ_OBJS) |
$(LD) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS) |
$(LD) -o $@ $(PHP5PROJ_OBJS) $(MS_LIBS) |
| |
%.o: %.c php_mapscript_util.h php_mapscript.h | %.o: %.c php_mapscript_util.h php_mapscript.h |
$(CC) $(CFLAGS112) -c -o $@ $< | $(CC) $(CFLAGS112) -c -o $@ $< |
|
|
retVal = 0; | retVal = 0; |
| |
| |
#ifdef PHP4 |
#ifdef PHP3 |
php_header(TSRMLS_C); | php_header(TSRMLS_C); |
#else | #else |
php_header(); | php_header(); |