Lines 1802-1810
Link Here
|
1802 |
dnl PHP/MapScript module options |
1802 |
dnl PHP/MapScript module options |
1803 |
dnl --------------------------------------------------------------------- |
1803 |
dnl --------------------------------------------------------------------- |
1804 |
|
1804 |
|
1805 |
AC_CHECKING(for PHP/MapScript module options) |
1805 |
AC_CHECKING(for PHP4/MapScript module options) |
1806 |
AC_ARG_WITH(php, |
1806 |
AC_ARG_WITH(php4, |
1807 |
[ --with-php=DIR Specify directory where PHP4's include files are |
1807 |
[ --with-php4=DIR Specify directory where PHP4's include files are |
|
|
1808 |
installed (or a pointer to the full source tree) |
1809 |
Required in order to compile the PHP/MapScript |
1810 |
module.],,) |
1811 |
|
1812 |
AC_CHECKING(for PHP5/MapScript module options) |
1813 |
AC_ARG_WITH(php5, |
1814 |
[ --with-php5=DIR Specify directory where PHP5's include files are |
1808 |
installed (or a pointer to the full source tree) |
1815 |
installed (or a pointer to the full source tree) |
1809 |
Required in order to compile the PHP/MapScript |
1816 |
Required in order to compile the PHP/MapScript |
1810 |
module.],,) |
1817 |
module.],,) |
Lines 1815-1822
Link Here
|
1815 |
link php_mapscript.so. Try this only if the default |
1822 |
link php_mapscript.so. Try this only if the default |
1816 |
internal macro didn't work.],,) |
1823 |
internal macro didn't work.],,) |
1817 |
|
1824 |
|
1818 |
if test -n "$with_php" -a -d "$with_php" ; then |
1825 |
dnl -------------------------------------------------------------------------- |
1819 |
AC_EXPAND_PATH($with_php, PHP_SRC_DIR) |
1826 |
dnl No php version specific |
|
|
1827 |
dnl -------------------------------------------------------------------------- |
1828 |
if test -n "$with_php4" -o -n "$with_php5" ; then |
1820 |
dnl |
1829 |
dnl |
1821 |
dnl Checks for shared library linking. |
1830 |
dnl Checks for shared library linking. |
1822 |
dnl |
1831 |
dnl |
Lines 1825-1831
Link Here
|
1825 |
dnl (The perl-V macro was the default in 3.6 and before but this was |
1834 |
dnl (The perl-V macro was the default in 3.6 and before but this was |
1826 |
dnl changed in 3.7 to use the internal AC_LD_SHARED macro by default) |
1835 |
dnl changed in 3.7 to use the internal AC_LD_SHARED macro by default) |
1827 |
dnl |
1836 |
dnl |
1828 |
|
|
|
1829 |
if test "$enable_perlv_ld_detect" = "yes" ; then |
1837 |
if test "$enable_perlv_ld_detect" = "yes" ; then |
1830 |
AC_MSG_RESULT(Using perl -V macro to figure ld command to link php_mapscript.so) |
1838 |
AC_MSG_RESULT(Using perl -V macro to figure ld command to link php_mapscript.so) |
1831 |
|
1839 |
|
Lines 1847-1852
Link Here
|
1847 |
PHP_CC="$CC $C_PIC" |
1855 |
PHP_CC="$CC $C_PIC" |
1848 |
PHP_LD="$LD_SHARED" |
1856 |
PHP_LD="$LD_SHARED" |
1849 |
fi |
1857 |
fi |
|
|
1858 |
fi |
1859 |
|
1860 |
if test -n "$with_php4" -a -d "$with_php4" ; then |
1861 |
AC_EXPAND_PATH($with_php4,PHP_SRC_DIR) |
1850 |
|
1862 |
|
1851 |
dnl |
1863 |
dnl |
1852 |
dnl Look for PHP3's config.h or PHP4's php_config.h. |
1864 |
dnl Look for PHP3's config.h or PHP4's php_config.h. |
Lines 1936-1941
Link Here
|
1936 |
AC_SUBST(MAKE_PHPMS, $MAKE_PHPMS) |
1948 |
AC_SUBST(MAKE_PHPMS, $MAKE_PHPMS) |
1937 |
AC_SUBST(MAKE_PHPMS_CLEAN, $MAKE_PHPMS_CLEAN) |
1949 |
AC_SUBST(MAKE_PHPMS_CLEAN, $MAKE_PHPMS_CLEAN) |
1938 |
|
1950 |
|
|
|
1951 |
if test -n "$with_php5" -a -d "$with_php5" ; then |
1952 |
AC_EXPAND_PATH($with_php5, PHP5_SRC_DIR) |
1953 |
|
1954 |
dnl |
1955 |
dnl Look for PHP3's config.h or PHP4's php_config.h. |
1956 |
dnl We'll need the config file to find info about the PHP configuration |
1957 |
dnl |
1958 |
AC_MSG_CHECKING([for location of config.h or php_config.h]) |
1959 |
dnl In PHP3, it was called config.h |
1960 |
test -f "$PHP5_SRC_DIR/config.h" && PHP5_CONFIG_H="$PHP5_SRC_DIR/config.h" |
1961 |
|
1962 |
dnl In PHP 4.0.1 to 4.0.3, it was php-4.0.x/php_config.h |
1963 |
test -f "$PHP5_SRC_DIR/php_config.h" && PHP5_CONFIG_H="$PHP5_SRC_DIR/php_config.h" |
1964 |
|
1965 |
dnl Starting with PHP 4.0.4, it's php-4.0.x/main/php_config.h |
1966 |
test -f "$PHP5_SRC_DIR/main/php_config.h" && PHP5_CONFIG_H="$PHP5_SRC_DIR/main/php_config.h" |
1967 |
|
1968 |
dnl If php was installed, then the headers are under $prefix/include/php/* |
1969 |
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" |
1970 |
|
1971 |
if test -n "$PHP5_CONFIG_H" ; then |
1972 |
AC_MSG_RESULT([$PHP5_CONFIG_H]) |
1973 |
else |
1974 |
AC_MSG_ERROR([ |
1975 |
!!! Could not find config.h or php_config.h in $PHP5_SRC_DIR. !!! |
1976 |
!!! Has PHP5 been configured yet? !!!]) |
1977 |
fi |
1978 |
|
1979 |
dnl |
1980 |
dnl Check which PHP5 version we're using. |
1981 |
dnl |
1982 |
AC_MSG_CHECKING([whether we have PHP5]) |
1983 |
if test -n "`grep 'ZEND_API' $PHP5_CONFIG_H`" ; then |
1984 |
PHP5_VERSION_FLAG="-DPHP4" |
1985 |
else |
1986 |
AC_MSG_ERROR([ |
1987 |
!!! PHP MapScript now requires PHP 5.0.0 or more recent. !!! |
1988 |
!!! Support for PHP3 has been dropped after MapServer version 3.5. !!!]) |
1989 |
fi |
1990 |
AC_MSG_RESULT([$PHP5_VERSION_FLAG]) |
1991 |
|
1992 |
dnl |
1993 |
dnl Check if PHP was compiled with the bundled regex, and if so then |
1994 |
dnl use the same version to compile MapServer. |
1995 |
dnl |
1996 |
AC_MSG_CHECKING([whether we should use PHP5's regex]) |
1997 |
if test -n "`grep 'define REGEX 1' $PHP5_CONFIG_H`" ; then |
1998 |
AC_MSG_RESULT(yes) |
1999 |
|
2000 |
dnl We'll check for regex_extra.h - that might let use build |
2001 |
dnl without the source using libphp_common.so |
2002 |
test -f "$PHP5_SRC_DIR/regex/regex_extra.h" && PHP5_NO_SOURCE="1" |
2003 |
if test -n "$PHP5_NO_SOURCE" ; then |
2004 |
dnl Found regex_extra.h |
2005 |
USE_PHP5_REGEX="-DUSE_PHP_REGEX" |
2006 |
PHP5_REGEX_OBJ=php_regex.o |
2007 |
AC_MSG_RESULT([ found regex_extra.h - building PHP MapScript with PHP5's bundled regex ]) |
2008 |
else |
2009 |
AC_MSG_ERROR([ |
2010 |
!!! PHP5 uses its bundled regex library but regex/regex_extra.h cannot be !!! |
2011 |
!!! found. !!!]) |
2012 |
fi |
2013 |
|
2014 |
else |
2015 |
AC_MSG_RESULT(no) |
2016 |
fi |
2017 |
|
2018 |
PHP5MS_MAKEFILE=mapscript/php5/Makefile |
2019 |
MAKE_PHP5MS=php5_mapscript |
2020 |
MAKE_PHP5MS_CLEAN=php_mapscript_clean |
2021 |
|
2022 |
AC_SUBST(PHP5_VERSION_FLAG, $PHP5_VERSION_FLAG) |
2023 |
AC_SUBST(PHP5_SRC_DIR, $PHP5_SRC_DIR) |
2024 |
AC_SUBST(PHP5_REGEX_INC, $PHP5_REGEX_INC) |
2025 |
AC_SUBST(PHP5_REGEX_OBJ, $PHP5_REGEX_OBJ) |
2026 |
AC_SUBST(USE_PHP5_REGEX, $USE_PHP5_REGEX) |
2027 |
|
2028 |
AC_MSG_RESULT([ PHP5/MapScript module configured.]) |
2029 |
AC_MSG_RESULT([ $PHP5_VERSION_FLAG, $PHP5_SRC_DIR]) |
2030 |
elif test -n "$with_php5" -a "$with_php5" != "no" ; then |
2031 |
AC_MSG_ERROR([Missing or invalid PHP5 source directory in --with-php5=DIR.]) |
2032 |
else |
2033 |
AC_MSG_RESULT([ PHP5/MapScript module not configured.]) |
2034 |
fi |
2035 |
|
2036 |
AC_SUBST(MAKE_PHP5MS, $MAKE_PHP5MS) |
2037 |
AC_SUBST(MAKE_PHP5MS_CLEAN, $MAKE_PHP5MS_CLEAN) |
2038 |
|
1939 |
|
2039 |
|
1940 |
dnl --------------------------------------------------------------------- |
2040 |
dnl --------------------------------------------------------------------- |
1941 |
dnl 'apxs' option for PHP built as an Apache module (libphp3.so) |
2041 |
dnl 'apxs' option for PHP built as an Apache module (libphp3.so) |
Lines 2052-2056
Link Here
|
2052 |
AC_SUBST(ALL_STATIC_LIB, $ALL_STATIC_LIB) |
2152 |
AC_SUBST(ALL_STATIC_LIB, $ALL_STATIC_LIB) |
2053 |
AC_SUBST(RPATHS, [$RPATHS]) |
2153 |
AC_SUBST(RPATHS, [$RPATHS]) |
2054 |
|
2154 |
|
2055 |
AC_OUTPUT(Makefile $PHPMS_MAKEFILE mapscript/java/Makefile mapscript/csharp/Makefile) |
2155 |
AC_OUTPUT(Makefile $PHPMS_MAKEFILE $PHP5MS_MAKEFILE mapscript/java/Makefile mapscript/csharp/Makefile) |
2056 |
|
2156 |
|