diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 776 |
1 files changed, 405 insertions, 371 deletions
diff --git a/configure.in b/configure.in index 5b44d9d7ac..c5f36238e4 100644 --- a/configure.in +++ b/configure.in @@ -1,13 +1,51 @@ -dnl $Id$ +dnl $Id$ -*- sh -*- dnl Process this file with autoconf to produce a configure script. -AC_INIT(main.c) +divert(0) +recurse=yes +for arg in $@; do + case $arg in + --no-recursion) recurse=no;; + *) ;; + esac +done + +if test "$recurse" = "yes"; then + (cwd=`pwd`;set -x;cd libzend;./configure --cache-file=$cwd/config.cache $@) +fi + +dnl ## Diversion 1 is the initial checking of OS features, programs, +dnl ## libraries and so on. + +dnl ## In diversion 2 we check for compile-time options to the PHP +dnl ## core and how to deal with different system dependencies. This +dnl ## includes what regex library is used and whether debugging or short +dnl ## tags are enabled, and the default behaviour of php3.ini options. +dnl ## This is also where an SAPI interface is selected (choosing between +dnl ## Apache module, CGI etc.) + +dnl ## In diversion 3 we check which extensions should be compiled. +dnl ## All of these are normally in the extension directories. -PHP_VERSION=`cut -d\" -f 2 $srcdir/php_version.h` +dnl ## Diversion 4 is the last one. Here we generate files and clean up. + +divert(1) + +AC_INIT(main.c) +dnl ## This is where the version number is changed from now on! +AM_INIT_AUTOMAKE(php, 4.0pa1) + +PHP_VERSION=$VERSION +echo "#define PHP_VERSION \"$PHP_VERSION\"" > php_version.h.new +if ! cmp php_version.h.new php_version.h >/dev/null; then + rm -f php_version.h && mv php_version.h.new php_version.h && \ + echo 'Updated php_version.h' +else + rm -f php_version.h.new +fi AC_SUBST(PHP_VERSION) -AC_CONFIG_HEADER(config.h) -AM_SANITY_CHECK +AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE dnl We want this one before the checks, so the checks can modify CFLAGS. @@ -16,16 +54,21 @@ test -z "$CFLAGS" && auto_cflags=1 dnl Checks for programs. AC_PROG_YACC if test "$YACC" != "bison -y"; then - AC_MSG_WARN(You will need bison if you'd want to regenerate the PHP 3.0 parsers.) + AC_MSG_WARN(You will need bison if you want to regenerate the PHP parsers.) else AC_MSG_CHECKING(bison version) - set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'` + set `$YACC --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'` if test "$1" = "1" -a "$2" -lt "25"; then - AC_MSG_WARN(You will need bison 1.25 if you'd want to regenerate the PHP 3.0 parsers (found $1.$2).) + AC_MSG_WARN(You will need bison 1.25 if you want to regenerate the PHP parsers (found $1.$2).) fi AC_MSG_RESULT($1.$2 (ok)) fi + +dnl ## there has to be a better way... +dnl## OLDLIBS=$LIBS; LIBS="" AC_PROG_CC +dnl## LIBS=$OLDLIBS + AC_PROG_RANLIB AC_PROG_CC_C_O AC_PATH_PROG(PERL_PATH, perl) @@ -98,6 +141,9 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then LDFLAGS="$LDFLAGS -L/usr/pkg/lib" fi +INCLUDES="" +AC_SUBST(INCLUDES) + AC_PREFERRED_DB_LIB AC_CHECK_LIB(nsl, gethostname, [ @@ -164,7 +210,7 @@ if test "$DBM_LIB" = "-lgdbm"; then AC_CHECK_HEADER(/usr/local/include/gdbm.h, [ GDBM_INCLUDE="-I/usr/local/include" ],[ AC_MSG_RESULT("Try /opt/local/include/gdbm.h"); AC_CHECK_HEADER(/opt/local/include/gdbm.h, [ GDBM_INCLUDE="-I/opt/local/include" ],[ - dnl if in /usr/pkg/include, don't add anything. See above. + dnl if in /usr/pkg/include, do not add anything. See above. AC_MSG_RESULT("Try /usr/pkg/include/gdbm.h"); AC_CHECK_HEADER(/usr/pkg/include/gdbm.h, [ GDBM_INCLUDE="" ],[ AC_MSG_RESULT("Giving up - You need to install gdbm.h somewhere"); @@ -173,7 +219,8 @@ if test "$DBM_LIB" = "-lgdbm"; then ]) ]) ]) - AC_SUBST(GDBM_INCLUDE) + INCLUDES="$INCLUDES $GDBM_INCLUDES" +dnl## AC_SUBST(GDBM_INCLUDE) fi dnl Checks for typedefs, structures, and compiler characteristics. @@ -205,7 +252,9 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(memcpy memmove strdup strerror strcasecmp strstr flock lockf putenv tempnam usleep setlocale gettimeofday setvbuf srand48 lrand48 srandom random link symlink regcomp getlogin cuserid vsnprintf snprintf gcvt utime crypt rint unsetenv strftime setsockopt tzset) AC_FUNC_UTIME_NULL AC_FUNC_ALLOCA +dnl## OLDLIBS=$LIBS; LIBS="" AC_BROKEN_SPRINTF +dnl## LIBS=$OLDLIBS AC_REPLACE_FUNCS(getopt) dnl AIX keeps in_addr_t in /usr/include/netinet/in.h @@ -230,6 +279,8 @@ fi AC_CRYPT_CAP +divert(2) + AC_MSG_CHECKING(whether to use bundled regex library) AC_ARG_WITH(system-regex, [ --with-system-regex Do not use the bundled regex library], @@ -328,7 +379,8 @@ AC_ARG_WITH(shared-apache, AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $withval/src/include) fi fi - AC_SUBST(APACHE_INCLUDE) + INCLUDES="$INCLUDES $APACHE_INCLUDE" +dnl## AC_SUBST(APACHE_INCLUDE) AC_SUBST(APACHE_TARGET) AC_SUBST(INSTALL_IT) AC_SUBST(BINNAME) @@ -473,7 +525,8 @@ AC_ARG_WITH(apache, BINNAME=php INSTALL_IT="cp $BINNAME \$(bindir)" ]) -AC_SUBST(APACHE_INCLUDE) +INCLUDES="$INCLUDES $APACHE_INCLUDE" +dnl## AC_SUBST(APACHE_INCLUDE) AC_SUBST(APACHE_TARGET) AC_SUBST(INSTALL_IT) AC_SUBST(BINNAME) @@ -520,13 +573,280 @@ AC_ARG_WITH(fhttpd, ],[ AC_MSG_RESULT(no) ]) -AC_SUBST(FHTTPD_INCLUDE) +INCLUDES="$INCLUDES $FHTTPD_INCLUDE" +dnl## AC_SUBST(FHTTPD_INCLUDE) AC_SUBST(FHTTPD_LIB) AC_SUBST(FHTTPD_TARGET) + +AC_MSG_CHECKING(whether to use a configuration file) +AC_ARG_WITH(config-file-path, +[ --with-config-file-path=PATH Sets the path in which to look for php3.ini + defaults to /usr/local/lib], +[ + if test "$withval" = "yes"; then + AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib") + AC_DEFINE(USE_CONFIG_FILE, 1) + AC_MSG_RESULT(yes) + else + if test "$withval" != "no"; then + AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$withval") + AC_DEFINE(USE_CONFIG_FILE, 1) + AC_MSG_RESULT(yes) + else + AC_DEFINE(CONFIGURATION_FILE_PATH, 0) + AC_DEFINE(USE_CONFIG_FILE, 0) + AC_MSG_RESULT(no) + fi + fi +],[ + AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib") + AC_DEFINE(USE_CONFIG_FILE, 1) + AC_MSG_RESULT(yes) +]) + + +AC_MSG_CHECKING(whether to include debugging symbols) +AC_ARG_ENABLE(debug, +[ --enable-debug Compile with debugging symbols], +[ + if test "$enableval" = "yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(DEBUG,1) + PHP_DEBUG=1 + DEBUG_CFLAGS="-g" + test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall" + test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \ + DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations" + else + AC_MSG_RESULT(no) + AC_DEFINE(DEBUG,0) + PHP_DEBUG=0 + DEBUG_CFLAGS="" + fi +],[ + AC_MSG_RESULT(no) + AC_DEFINE(DEBUG,0) + PHP_DEBUG=0 + DEBUG_CFLAGS="" +]) +AC_SUBST(DEBUG_CFLAGS) +AC_SUBST(PHP_DEBUG) + + +AC_MSG_CHECKING(whether to enable safe mode by default) +AC_ARG_ENABLE(safe-mode, +[ --enable-safe-mode Enable safe mode by default.], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(PHP_SAFE_MODE, 1) + AC_MSG_RESULT(yes) + else + AC_DEFINE(PHP_SAFE_MODE, 0) + AC_MSG_RESULT(no) + fi +],[ + AC_DEFINE(PHP_SAFE_MODE, 0) + AC_MSG_RESULT(no) +]) + + +AC_MSG_CHECKING(for safe mode exec dir) +AC_ARG_WITH(exec-dir, +[ --with-exec-dir[=DIR] Only allow executables in DIR when in safe mode + defaults to /usr/local/php/bin], +[ + if test "$withval" != "no"; then + if test "$withval" = "yes"; then + AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin") + AC_MSG_RESULT(/usr/local/php/bin) + else + AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval") + AC_MSG_RESULT($withval) + fi + else + AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin") + AC_MSG_RESULT(/usr/local/php/bin) + fi +],[ + AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin") + AC_MSG_RESULT(/usr/local/php/bin) +]) + + +AC_MSG_CHECKING(whether to enable track_vars variables by default) +AC_ARG_ENABLE(track-vars, +[ --enable-track-vars Enable GET/POST/Cookie track variables by default.], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(PHP_TRACK_VARS, 1) + AC_MSG_RESULT(yes) + else + AC_DEFINE(PHP_TRACK_VARS, 0) + AC_MSG_RESULT(no) + fi +],[ + AC_DEFINE(PHP_TRACK_VARS, 0) + AC_MSG_RESULT(no) +]) + + +AC_MSG_CHECKING(whether to enable magic quotes by default) +AC_ARG_ENABLE(magic-quotes, +[ --enable-magic-quotes Enable magic quotes by default.], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(MAGIC_QUOTES, 1) + AC_MSG_RESULT(yes) + else + AC_DEFINE(MAGIC_QUOTES, 0) + AC_MSG_RESULT(no) + fi +],[ + AC_DEFINE(MAGIC_QUOTES, 0) + AC_MSG_RESULT(no) +]) + + +dnl AC_MSG_CHECKING(whether to enable PHP RPC support) +dnl AC_ARG_ENABLE(php-rpc, +dnl [ --enable-php-rpc Compile with PHP RPC support.], +dnl [ +dnl if test "$enableval" = "yes"; then +dnl AC_DEFINE(PHP_RPC, 1) +dnl AC_MSG_RESULT(yes) +dnl else +dnl AC_DEFINE(PHP_RPC, 0) +dnl AC_MSG_RESULT(no) +dnl fi +dnl ],[ +dnl AC_DEFINE(PHP_RPC, 0) +dnl AC_MSG_RESULT(no) +dnl ]) + +AC_MSG_CHECKING(whether to enable bc style precision math functions) +AC_ARG_ENABLE(bcmath, +[ --disable-bcmath Compile without bc style precision math functions. ], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(WITH_BCMATH, 1) + AC_MSG_RESULT(yes) + BCMATH_SRC="functions/bcmath.c functions/number.c" + else + AC_DEFINE(WITH_BCMATH, 0) + AC_MSG_RESULT(no) + BCMATH_SRC="" + fi +],[ + AC_DEFINE(WITH_BCMATH, 1) + AC_MSG_RESULT(yes) + BCMATH_SRC="functions/bcmath.c functions/number.c" +]) +AC_SUBST(BCMATH_SRC) + +if test "$BINNAME" = "php"; then +AC_MSG_CHECKING(whether to force Apache CGI redirect) +AC_ARG_ENABLE(force-cgi-redirect, +[ --enable-force-cgi-redirect Enable the security check for internal server + redirects. You should use this if you are + running the CGI version with Apache. ], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(FORCE_CGI_REDIRECT, 1) + AC_MSG_RESULT(yes) + REDIRECT=1 + else + AC_DEFINE(FORCE_CGI_REDIRECT, 0) + AC_MSG_RESULT(no) + REDIRECT=0 + fi +],[ + AC_DEFINE(FORCE_CGI_REDIRECT, 0) + AC_MSG_RESULT(no) + REDIRECT=0 +]) + +AC_MSG_CHECKING(whether to discard path_info + path_translated) +AC_ARG_ENABLE(discard_path, +[ --enable-discard-path If this is enabled, the PHP CGI binary + can safely be placed outside of the + web tree and people will not be able + to circumvent .htaccess security. ], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(DISCARD_PATH, 1) + AC_MSG_RESULT(yes) + DISCARD_PATH=1 + else + AC_DEFINE(DISCARD_PATH, 0) + AC_MSG_RESULT(no) + DISCARD_PATH=0 + fi +],[ + AC_DEFINE(DISCARD_PATH, 0) + AC_MSG_RESULT(no) + DISCARD_PATH=0 +]) +fi + +AC_MSG_CHECKING(whether to enable a memory limit) +AC_ARG_ENABLE(memory-limit, +[ --enable-memory-limit Compile with memory limit support. ], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(MEMORY_LIMIT, 1) + AC_MSG_RESULT(yes) + else + AC_DEFINE(MEMORY_LIMIT, 0) + AC_MSG_RESULT(no) + fi +],[ + AC_DEFINE(MEMORY_LIMIT, 0) + AC_MSG_RESULT(no) +]) + +AC_MSG_CHECKING(whether to enable short tags by default) +AC_ARG_ENABLE(short-tags, +[ --disable-short-tags Disable the short-form <? start tag by default.], +[ + if test "$enableval" = "no"; then + AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 0) + AC_MSG_RESULT(no) + else + AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1) + AC_MSG_RESULT(yes) + fi +],[ + AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1) + AC_MSG_RESULT(yes) +]) + +AC_MSG_CHECKING(whether to enable the URL-aware fopen wrapper) +AC_ARG_ENABLE(url-fopen-wrapper, +[ --disable-url-fopen-wrapper Disable the URL-aware fopen wrapper that allows + accessing files via http or ftp.], +[ + if test "$enableval" = "yes"; then + AC_DEFINE(PHP3_URL_FOPEN, 1) + AC_MSG_RESULT(yes) + else + AC_DEFINE(PHP3_URL_FOPEN, 0) + AC_MSG_RESULT(no) + fi +],[ + AC_DEFINE(PHP3_URL_FOPEN, 1) + AC_MSG_RESULT(yes) +]) + + +divert(3) + +# reading config stubs +esyscmd(./scripts/config-stubs) + AC_MSG_CHECKING(for IMAP support) AC_ARG_WITH(imap, -[ --with-imap[=DIR] Include IMAP support (DIR is IMAP's include dir and c-client.a dir).], +[ --with-imap[=DIR] Include IMAP support (DIR is the IMAP include dir and c-client.a dir).], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then @@ -546,73 +866,21 @@ AC_ARG_WITH(imap, if test ! -f $IMAP_DIR/lib/c-client.a; then AC_MSG_ERROR(could not find c-client.a in $IMAP_DIR/lib !) fi - IMAP_INCLUDE="-I$IMAP_DIR/include/" - IMAP_LIBS="$IMAP_DIR/lib/c-client.a" - AC_SUBST(IMAP_INCLUDE) - AC_SUBST(IMAP_LIBS) - AC_DEFINE(HAVE_IMAP) - AC_MSG_RESULT(yes) - else - AC_MSG_ERROR(could not find imap library!) - fi + IMAP_INCLUDE="-I$IMAP_DIR/include/" + IMAP_LIBS="$IMAP_DIR/lib/c-client.a" + +dnl## AC_SUBST(IMAP_INCLUDE) + INCLUDES="$INCLUDES $IMAP_INCLUDE" + AC_SUBST(IMAP_LIBS) + LIBS="$LIBS $IMAP_LIBS" + AC_DEFINE(HAVE_IMAP) + AC_MSG_RESULT(yes) + else + AC_MSG_ERROR(could not find imap library!) + fi ],[ AC_MSG_RESULT(no) ]) - -AC_MSG_CHECKING(whether to include GD support) -AC_ARG_WITH(gd, -[ --without-gd Disable GD support. - --with-gd[=DIR] Include GD support (DIR is GD's install dir).], -[ - case "$withval" in - no) - AC_MSG_RESULT(no) ;; - yes) - GD_LIBS="-lgd" - AC_DEFINE(HAVE_LIBGD) - AC_MSG_RESULT(yes) - AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ]) - ac_cv_lib_gd_gdImageLine=yes - ;; - *) -dnl A whole whack of possible places where this might be - test -f $withval/include/gd1.3/gd.h && GD_INCLUDE="-I$withval/include/gd1.3" - test -f $withval/include/gd/gd.h && GD_INCLUDE="-I$withval/include/gd" - test -f $withval/include/gd.h && GD_INCLUDE="-I$withval/include" - test -f $withval/gd1.3/gd.h && GD_INCLUDE="-I$withval/gd1.3" - test -f $withval/gd/gd.h && GD_INCLUDE="-I$withval/gd" - test -f $withval/gd.h && GD_INCLUDE="-I$withval" - - test -f $withval/lib/libgd.a && GD_LIB="$withval/lib" - test -f $withval/lib/gd/libgd.a && GD_LIB="$withval/lib/gd" - test -f $withval/lib/gd1.3/libgd.a && GD_LIB="$withval/lib/gd1.3" - test -f $withval/libgd.a && GD_LIB="$withval" - test -f $withval/gd/libgd.a && GD_LIB="$withval/gd" - test -f $withval/gd1.3/libgd.a && GD_LIB="$withval/gd1.3" - - if test -n "$GD_INCLUDE" && test -n "$GD_LIB" ; then - GD_LIBS="-L$GD_LIB -lgd" - AC_DEFINE(HAVE_LIBGD) - AC_MSG_RESULT(yes) - AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ]) - ac_cv_lib_gd_gdImageLine=yes - else - AC_MSG_RESULT(no) - fi ;; - esac -],[ - AC_CHECK_LIB(gd, gdImageLine) - AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ]) -]) -AC_SUBST(GD_LIBS) -if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then - GD_INCLUDE="-I/usr/pkg/include/gd" -fi -AC_SUBST(GD_INCLUDE) -if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then - AC_CHECK_LIB(ttf, TT_Open_Face) -fi - AC_MSG_CHECKING(for Oracle support) @@ -761,7 +1029,8 @@ AC_SUBST(ORACLE_SHLIBS) AC_SUBST(ORACLE_STLIBS) AC_SUBST(ORACLE_LIBS) AC_SUBST(ORACLE_LFLAGS) -AC_SUBST(ORACLE_INCLUDE) +dnl## AC_SUBST(ORACLE_INCLUDE) +INCLUDES="$INCLUDES $ORACLE_INCLUDE" AC_SUBST(ORACLE_HOME) AC_SUBST(ORACLE_VERSION) @@ -793,7 +1062,8 @@ AC_ARG_WITH(iodbc, ]) AC_SUBST(IODBC_LIBS) AC_SUBST(IODBC_LFLAGS) -AC_SUBST(IODBC_INCLUDE) +dnl## AC_SUBST(IODBC_INCLUDE) +INCLUDES="$INCLUDES $IODBC_INCLUDE" AC_MSG_CHECKING(for OpenLink ODBC support) @@ -824,7 +1094,8 @@ AC_ARG_WITH(openlink, ]) AC_SUBST(OPENLINK_LIBS) AC_SUBST(OPENLINK_LFLAGS) -AC_SUBST(OPENLINK_INCLUDE) +dnl## AC_SUBST(OPENLINK_INCLUDE) +INCLUDES="$INCLUDES $OPENLINK_INCLUDE" AC_MSG_CHECKING(for Adabas support) @@ -853,7 +1124,8 @@ AC_ARG_WITH(adabas, ]) AC_SUBST(ADA_LIBS) AC_SUBST(ADA_LFLAGS) -AC_SUBST(ADA_INCLUDE) +dnl## AC_SUBST(ADA_INCLUDE) +INCLUDES="$INCLUDES $ADA_INCLUDE" AC_MSG_CHECKING(for Sybase support) @@ -886,7 +1158,8 @@ AC_ARG_WITH(sybase, ]) AC_SUBST(SYBASE_LIBS) AC_SUBST(SYBASE_LFLAGS) -AC_SUBST(SYBASE_INCLUDE) +dnl## AC_SUBST(SYBASE_INCLUDE) +INCLUDES="$INCLUDES $SYBASE_INCLUDE" AC_MSG_CHECKING(for Sybase-CT support) AC_ARG_WITH(sybase-ct, @@ -923,7 +1196,8 @@ AC_ARG_WITH(sybase-ct, ]) AC_SUBST(SYBASE_CT_LIBS) AC_SUBST(SYBASE_CT_LFLAGS) -AC_SUBST(SYBASE_CT_INCLUDE) +dnl## AC_SUBST(SYBASE_CT_INCLUDE) +INCLUDES="$INCLUDES $SYBASE_CT_INCLUDE" AC_MSG_CHECKING(for MySQL support) @@ -973,7 +1247,8 @@ dnl Why are we defining HAVE_MYSQL here?? ]) AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_LFLAGS) -AC_SUBST(MYSQL_INCLUDE) +dnl## AC_SUBST(MYSQL_INCLUDE) +INCLUDES="$INCLUDES $MYSQL_INCLUDE" AC_MSG_CHECKING(for mSQL support) @@ -1004,7 +1279,8 @@ AC_ARG_WITH(msql, ]) AC_SUBST(MSQL_LIBS) AC_SUBST(MSQL_LFLAGS) -AC_SUBST(MSQL_INCLUDE) +dnl## AC_SUBST(MSQL_INCLUDE) +INCLUDES="$INCLUDES $MSQL_INCLUDE" AC_MSG_CHECKING(for PostgresSQL support) AC_ARG_WITH(pgsql, @@ -1041,7 +1317,8 @@ AC_ARG_WITH(pgsql, ]) AC_SUBST(PGSQL_LIBS) AC_SUBST(PGSQL_LFLAGS) -AC_SUBST(PGSQL_INCLUDE) +dnl## AC_SUBST(PGSQL_INCLUDE) +INCLUDES="$INCLUDES $PGSQL_INCLUDE" AC_MSG_CHECKING(for Solid support) @@ -1072,8 +1349,9 @@ AC_ARG_WITH(solid, if test "$SOLID_LIBDIR" != ""; then AC_FIND_SOLID_LIBS($SOLID_LIBDIR) fi -AC_SUBST(SOLID_INCLUDE) +dnl## AC_SUBST(SOLID_INCLUDE) AC_SUBST(SOLID_LIBS) +INCLUDES="$INCLUDES $SOLID_INCLUDE" AC_MSG_CHECKING(for Empress support) @@ -1104,8 +1382,9 @@ AC_ARG_WITH(empress, if test "$EMPRESS_LIBDIR" != ""; then AC_FIND_EMPRESS_LIBS($EMPRESS_LIBDIR) fi -AC_SUBST(EMPRESS_INCLUDE) AC_SUBST(EMPRESS_LIBS) +dnl## AC_SUBST(EMPRESS_INCLUDE) +INCLUDES="$INCLUDES $EMPRESS_INCLUDE" AC_MSG_CHECKING(for LDAP support) @@ -1136,7 +1415,9 @@ AC_ARG_WITH(ldap, ]) AC_SUBST(LDAP_LIBS) AC_SUBST(LDAP_LFLAGS) -AC_SUBST(LDAP_INCLUDE) +dnl## AC_SUBST(LDAP_INCLUDE) +INCLUDES="$INCLUDES $LDAP_INCLUDE" + AC_MSG_CHECKING(for SNMP support) AC_ARG_WITH(snmp, @@ -1168,7 +1449,9 @@ AC_ARG_WITH(snmp, ]) AC_SUBST(SNMP_LIBS) AC_SUBST(SNMP_LFLAGS) -AC_SUBST(SNMP_INCLUDE) +dnl## AC_SUBST(SNMP_INCLUDE) +INCLUDES="$INCLUDES $SNMP_INCLUDE" + AC_MSG_CHECKING(for Velocis support) AC_ARG_WITH(velocis, @@ -1208,7 +1491,9 @@ AC_ARG_WITH(velocis, ]) AC_SUBST(VELOCIS_LIBS) AC_SUBST(VELOCIS_LFLAGS) -AC_SUBST(VELOCIS_INCLUDE) +dnl## AC_SUBST(VELOCIS_INCLUDE) +INCLUDES="$INCLUDES $VELOCIS_INCLUDE" + AC_MSG_CHECKING(for Informix support) AC_ARG_WITH(informix, @@ -1244,7 +1529,7 @@ WARNING: You specified Informix base install directory that is different dnl -lm twice otherwise? IFX_LIBS=`echo $IFX_LIBS | sed -e 's/Libraries to be used://g' -e 's/esql: error -55923: No source or object file\.//g'` dnl Seems to get rid of newlines. - dnl According to Perl's DBD-Informix, might contain these strings. + dnl According to Perls DBD-Informix, might contain these strings. else dnl Allow override to use static and/or threaded libs IFX_LIBS="$IFX_LIBS" @@ -1277,8 +1562,10 @@ WARNING: You specified Informix base install directory that is different ]) AC_SUBST(IFX_LIBS) AC_SUBST(IFX_LFLAGS) -AC_SUBST(IFX_INCLUDE) AC_SUBST(INFORMIXDIR) +dnl## AC_SUBST(IFX_INCLUDE) +INCLUDES="$INCLUDES $IFX_INCLUDE" + AC_MSG_CHECKING(for InterBase support) AC_ARG_WITH(interbase, @@ -1306,9 +1593,11 @@ AC_ARG_WITH(interbase, ],[ AC_MSG_RESULT(no) ]) -AC_SUBST(IBASE_INCLUDE) AC_SUBST(IBASE_LIBS) AC_SUBST(IBASE_LFLAGS) +dnl## AC_SUBST(IBASE_INCLUDE) +INCLUDES="$INCLUDES $IBASE_INCLUDE" + AC_MSG_CHECKING(for a custom ODBC support) AC_ARG_WITH(custom-odbc, @@ -1346,7 +1635,8 @@ AC_ARG_WITH(custom-odbc, ]) AC_SUBST(CODBC_LIBS) AC_SUBST(CODBC_LFLAGS) -AC_SUBST(CODBC_INCLUDE) +dnl## AC_SUBST(CODBC_INCLUDE) +INCLUDES="$INCLUDES $CODBC_INCLUDE" AC_MSG_CHECKING(for Hyperwave support) @@ -1413,7 +1703,8 @@ AC_ARG_WITH(zlib, AC_MSG_RESULT(no) ]) AC_SUBST(ZLIB_LIBS) -AC_SUBST(ZLIB_INCLUDE) +dnl## AC_SUBST(ZLIB_INCLUDE) +INCLUDES="$INCLUDES $ZLIB_INCLUDE" AC_MSG_CHECKING(whether to include pdflib support) @@ -1446,7 +1737,8 @@ AC_ARG_WITH(pdflib, AC_MSG_RESULT(no) ]) AC_SUBST(PDFLIB_LIBS) -AC_SUBST(PDFLIB_INCLUDE) +dnl## AC_SUBST(PDFLIB_INCLUDE) +INCLUDES="$INCLUDES $PDFLIB_INCLUDE" AC_MSG_CHECKING(whether to include fdftk support) @@ -1479,7 +1771,8 @@ AC_ARG_WITH(fdftk, AC_MSG_RESULT(no) ]) AC_SUBST(FDFLIB_LIBS) -AC_SUBST(FDFLIB_INCLUDE) +dnl## AC_SUBST(FDFLIB_INCLUDE) +INCLUDES="$INCLUDES $FDFLIB_INCLUDE" AC_MSG_CHECKING(whether to include the bundled dbase library) @@ -1532,7 +1825,7 @@ AC_ARG_WITH(mod-dav, AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MOD_DAV, 1) MOD_DAV_CFLAGS="-DHAVE_MOD_DAV -I$withval" - APACHE_INCLUDE="$APACHE_INCLUDE -I$withval" + INCLUDES="$INCLUDES -I$withval" else AC_MSG_RESULT(no) AC_DEFINE(HAVE_MOD_DAV, 0) @@ -1544,6 +1837,7 @@ AC_ARG_WITH(mod-dav, ]) AC_SUBST(MOD_DAV_CFLAGS) + AC_MSG_CHECKING(whether to enable unified ODBC support) AC_ARG_ENABLE(unified-odbc, [ --disable-unified-odbc Disable unified ODBC support. Only applicable if @@ -1581,270 +1875,6 @@ AC_ARG_ENABLE(unified-odbc, ]) - - - - - -AC_MSG_CHECKING(whether to use a configuration file) -AC_ARG_WITH(config-file-path, -[ --with-config-file-path=PATH Sets the path in which to look for php3.ini - defaults to /usr/local/lib], -[ - if test "$withval" = "yes"; then - AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib") - AC_DEFINE(USE_CONFIG_FILE, 1) - AC_MSG_RESULT(yes) - else - if test "$withval" != "no"; then - AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$withval") - AC_DEFINE(USE_CONFIG_FILE, 1) - AC_MSG_RESULT(yes) - else - AC_DEFINE(CONFIGURATION_FILE_PATH, 0) - AC_DEFINE(USE_CONFIG_FILE, 0) - AC_MSG_RESULT(no) - fi - fi -],[ - AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib") - AC_DEFINE(USE_CONFIG_FILE, 1) - AC_MSG_RESULT(yes) -]) - - -AC_MSG_CHECKING(whether to include debugging symbols) -AC_ARG_ENABLE(debug, -[ --enable-debug Compile with debugging symbols], -[ - if test "$enableval" = "yes"; then - AC_MSG_RESULT(yes) - AC_DEFINE(DEBUG,1) - PHP_DEBUG=1 - DEBUG_CFLAGS="-g" - test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall" - test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \ - DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations" - else - AC_MSG_RESULT(no) - AC_DEFINE(DEBUG,0) - PHP_DEBUG=0 - DEBUG_CFLAGS="" - fi -],[ - AC_MSG_RESULT(no) - AC_DEFINE(DEBUG,0) - PHP_DEBUG=0 - DEBUG_CFLAGS="" -]) -AC_SUBST(DEBUG_CFLAGS) -AC_SUBST(PHP_DEBUG) - - -AC_MSG_CHECKING(whether to enable safe mode by default) -AC_ARG_ENABLE(safe-mode, -[ --enable-safe-mode Enable safe mode by default.], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(PHP_SAFE_MODE, 1) - AC_MSG_RESULT(yes) - else - AC_DEFINE(PHP_SAFE_MODE, 0) - AC_MSG_RESULT(no) - fi -],[ - AC_DEFINE(PHP_SAFE_MODE, 0) - AC_MSG_RESULT(no) -]) - - -AC_MSG_CHECKING(for safe mode exec dir) -AC_ARG_WITH(exec-dir, -[ --with-exec-dir[=DIR] Only allow executables in DIR when in safe mode - defaults to /usr/local/php/bin], -[ - if test "$withval" != "no"; then - if test "$withval" = "yes"; then - AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin") - AC_MSG_RESULT(/usr/local/php/bin) - else - AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval") - AC_MSG_RESULT($withval) - fi - else - AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin") - AC_MSG_RESULT(/usr/local/php/bin) - fi -],[ - AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin") - AC_MSG_RESULT(/usr/local/php/bin) -]) - - -AC_MSG_CHECKING(whether to enable track_vars variables by default) -AC_ARG_ENABLE(track-vars, -[ --enable-track-vars Enable GET/POST/Cookie track variables by default.], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(PHP_TRACK_VARS, 1) - AC_MSG_RESULT(yes) - else - AC_DEFINE(PHP_TRACK_VARS, 0) - AC_MSG_RESULT(no) - fi -],[ - AC_DEFINE(PHP_TRACK_VARS, 0) - AC_MSG_RESULT(no) -]) - - -AC_MSG_CHECKING(whether to enable magic quotes by default) -AC_ARG_ENABLE(magic-quotes, -[ --enable-magic-quotes Enable magic quotes by default.], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(MAGIC_QUOTES, 1) - AC_MSG_RESULT(yes) - else - AC_DEFINE(MAGIC_QUOTES, 0) - AC_MSG_RESULT(no) - fi -],[ - AC_DEFINE(MAGIC_QUOTES, 0) - AC_MSG_RESULT(no) -]) - - -dnl AC_MSG_CHECKING(whether to enable PHP RPC support) -dnl AC_ARG_ENABLE(php-rpc, -dnl [ --enable-php-rpc Compile with PHP RPC support.], -dnl [ -dnl if test "$enableval" = "yes"; then -dnl AC_DEFINE(PHP_RPC, 1) -dnl AC_MSG_RESULT(yes) -dnl else -dnl AC_DEFINE(PHP_RPC, 0) -dnl AC_MSG_RESULT(no) -dnl fi -dnl ],[ -dnl AC_DEFINE(PHP_RPC, 0) -dnl AC_MSG_RESULT(no) -dnl ]) - -AC_MSG_CHECKING(whether to enable bc style precision math functions) -AC_ARG_ENABLE(bcmath, -[ --disable-bcmath Compile without bc style precision math functions. ], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(WITH_BCMATH, 1) - AC_MSG_RESULT(yes) - BCMATH_SRC="functions/bcmath.c functions/number.c" - else - AC_DEFINE(WITH_BCMATH, 0) - AC_MSG_RESULT(no) - BCMATH_SRC="" - fi -],[ - AC_DEFINE(WITH_BCMATH, 1) - AC_MSG_RESULT(yes) - BCMATH_SRC="functions/bcmath.c functions/number.c" -]) -AC_SUBST(BCMATH_SRC) - -if test "$BINNAME" = "php"; then -AC_MSG_CHECKING(whether to force Apache CGI redirect) -AC_ARG_ENABLE(force-cgi-redirect, -[ --enable-force-cgi-redirect Enable the security check for internal server - redirects. You should use this if you are - running the CGI version with Apache. ], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(FORCE_CGI_REDIRECT, 1) - AC_MSG_RESULT(yes) - REDIRECT=1 - else - AC_DEFINE(FORCE_CGI_REDIRECT, 0) - AC_MSG_RESULT(no) - REDIRECT=0 - fi -],[ - AC_DEFINE(FORCE_CGI_REDIRECT, 0) - AC_MSG_RESULT(no) - REDIRECT=0 -]) - -AC_MSG_CHECKING(whether to discard path_info + path_translated) -AC_ARG_ENABLE(discard_path, -[ --enable-discard-path If this is enabled, the PHP CGI binary - can safely be placed outside of the - web tree and people will not be able - to circumvent .htaccess security. ], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(DISCARD_PATH, 1) - AC_MSG_RESULT(yes) - DISCARD_PATH=1 - else - AC_DEFINE(DISCARD_PATH, 0) - AC_MSG_RESULT(no) - DISCARD_PATH=0 - fi -],[ - AC_DEFINE(DISCARD_PATH, 0) - AC_MSG_RESULT(no) - DISCARD_PATH=0 -]) -fi - -AC_MSG_CHECKING(whether to enable a memory limit) -AC_ARG_ENABLE(memory-limit, -[ --enable-memory-limit Compile with memory limit support. ], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(MEMORY_LIMIT, 1) - AC_MSG_RESULT(yes) - else - AC_DEFINE(MEMORY_LIMIT, 0) - AC_MSG_RESULT(no) - fi -],[ - AC_DEFINE(MEMORY_LIMIT, 0) - AC_MSG_RESULT(no) -]) - -AC_MSG_CHECKING(whether to enable short tags by default) -AC_ARG_ENABLE(short-tags, -[ --disable-short-tags Disable the short-form <? start tag by default.], -[ - if test "$enableval" = "no"; then - AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 0) - AC_MSG_RESULT(no) - else - AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1) - AC_MSG_RESULT(yes) - fi -],[ - AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1) - AC_MSG_RESULT(yes) -]) - -AC_MSG_CHECKING(whether to enable the URL-aware fopen wrapper) -AC_ARG_ENABLE(url-fopen-wrapper, -[ --disable-url-fopen-wrapper Disable the URL-aware fopen wrapper that allows - accessing files via http or ftp.], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(PHP3_URL_FOPEN, 1) - AC_MSG_RESULT(yes) - else - AC_DEFINE(PHP3_URL_FOPEN, 0) - AC_MSG_RESULT(no) - fi -],[ - AC_DEFINE(PHP3_URL_FOPEN, 1) - AC_MSG_RESULT(yes) -]) - AC_MSG_CHECKING(whether to enable System V semaphore support) AC_ARG_ENABLE(sysvsem, [ --enable-sysvsem Enable System V semaphore support.], @@ -1896,6 +1926,8 @@ AC_ARG_ENABLE(sysvshm, ]) +divert(4) + dnl If we're using gcc and the user hasn't specified CFLAGS, add -O2. test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2" @@ -1907,11 +1939,9 @@ fi dnl *** Commented out - generates slow code and consumes a lot of dnl *** resources during compilation - we need to figure out how dnl *** to supply it only when absolutely necessary -dnl If we're using gcc add -fpic to make dl() work on some platforms +dnl If we are using gcc add -fpic to make dl() work on some platforms dnl test -n "$GCC" && CFLAGS="$CFLAGS -fpic" -LIBS="${LIBS} -lzend" - AC_SUBST(CFLAGS) AC_SUBST(PROG_SENDMAIL) AC_SUBST(CFLAGS_SHLIB) @@ -1931,10 +1961,11 @@ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME") PHP_OS=`uname` AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS") -AC_OUTPUT(Makefile build-defs.h stamp-h libphp3.module -dnl doc/Makefile doc/version.ent doc/checkdoc extra/gd/bdf2gdfont - regex/Makefile dbase/Makefile, [ -dnl chmod +x doc/checkdoc extra/gd/bdf2gdfont +AC_OUTPUT(Makefile build-defs.h libphp3.module + scripts/mkextlib ext/Makefile + regex/Makefile dbase/Makefile + ext/gd/Makefile ext/standard/Makefile, [ +chmod +x scripts/mkextlib ], [ dnl Warn about CGI version with no extra security options. @@ -1954,6 +1985,9 @@ if test "$INFORMIX_WARNING" != ""; then echo "$INFORMIX_WARNING" fi ]) + +divert + # Local Variables: # tab-width: 4 # End: |