From e49ad341bd898b31bdb03ae7f032f476297418a1 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Thu, 8 Jun 2000 06:14:58 +0000 Subject: [PATCH] Wipe out acconfig.h.in and rewrite some checks to use PHP_ARG_ENABLE. --- acconfig.h.in | 126 +----------------------------------- acinclude.m4 | 26 ++++---- configure.in | 147 +++++++++++++++++------------------------- sapi/apache/config.m4 | 32 ++++----- sapi/cgi/config.m4 | 44 +++++-------- sapi/isapi/config.m4 | 2 +- 6 files changed, 106 insertions(+), 271 deletions(-) diff --git a/acconfig.h.in b/acconfig.h.in index 978c72807c9b4..f87979c2fdb02 100644 --- a/acconfig.h.in +++ b/acconfig.h.in @@ -1,125 +1 @@ -/* This is the default configuration file to read -*- C -*- */ - -/* these are defined by automake */ -#undef PACKAGE -#undef VERSION - -#undef HAVE_LIBDL - -#undef HAVE_STRUCT_FLOCK -#undef HAVE_TM_GMTOFF - -#define CONFIGURATION_FILE_PATH "php.ini" -#define USE_CONFIG_FILE 1 - -#undef HAVE_DMALLOC - -/* Some global constants defined by conigure */ -#undef PHP_BUILD_DATE -#undef PHP_OS -#undef PHP_UNAME - -/* define uint by configure if it is missed (QNX and BSD derived) */ -#undef uint - -/* define ulong by configure if it is missed (most probably is) */ -#undef ulong - -/* type check for in_addr_t */ -#undef in_addr_t - -/* Define if you have dirent.h but opendir() resides in libc rather than in libdir */ -/* This will cause HAVE_DIRENT_H defined twice sometimes, but it should be problem */ -#undef HAVE_DIRENT_H - -/* Define if you have the resolv library (-lresolv). */ -#undef HAVE_LIBRESOLV - -/* Define if you have the pam library (-lpam). */ -#define HAVE_LIBPAM 0 - -/* Define if you have the bind library (-lbind). */ -#define HAVE_LIBBIND 0 - -/* Define if you have Netscape LDAP instead of umich ldap or openldap*/ -#define HAVE_NSLDAP 0 - -/* Define if you want safe mode enabled by default. */ -#define PHP_SAFE_MODE 0 - -/* Set to the path to the dir containing safe mode executables */ -#define PHP_SAFE_MODE_EXEC_DIR /usr/local/php/bin - -/* Define if PHP to setup it's own SIGCHLD handler */ -#define PHP_SIGCHILD 0 - -/* Define if you want POST/GET/Cookie track variables by default */ -#define PHP_TRACK_VARS 0 - -/* Undefine if you want stricter XML/SGML compliance by default */ -/* (this disables "" by default) */ -#define DEFAULT_SHORT_OPEN_TAG 1 - -/* Undefine if you do not want PHP by default to escape "'" */ -/* in GET/POST/Cookie data */ -#define MAGIC_QUOTES 1 - -/* Define both of these if you want the bundled REGEX library */ -#define REGEX 0 -#define HSREGEX 0 - -/* Define if you have and want to use libnsl */ -#undef HAVE_LIBNSL - -/* Define if you have and want to use libsocket */ -#undef HAVE_LIBSOCKET - -/* Define if you have the sendmail program available */ -#define HAVE_SENDMAIL 0 - -/* Define if you are compiling PHP as an Apache module with mod_charset patch applied (aka Russian Apache)*/ -#define USE_TRANSFER_TABLES 0 - -/* Define if you are compiling PHP as an fhttpd module */ -#define FHTTPD 0 - -/* Define if your Apache creates an ap_config.h header file (only 1.3b6 and later) */ -#define HAVE_AP_CONFIG_H 0 - -/* Define if your Apache has src/include/compat.h */ -#define HAVE_OLD_COMPAT_H 0 - -/* Define if your Apache has src/include/ap_compat.h */ -#define HAVE_AP_COMPAT_H 0 - -/* Define if you want to enable PHP RPC (experimental) */ -#define PHP_RPC 0 - -/* Define if you want to prevent the CGI from working unless REDIRECT_STATUS is defined in the environment */ -#define FORCE_CGI_REDIRECT 0 - -/* Define if you want to prevent the CGI from using path_info and path_translated */ -#define DISCARD_PATH 0 - -/* Define if you want include() and other functions to be able to open - * http and ftp URLs as files. - */ -#define PHP_URL_FOPEN 0 - -/* Define if you have broken header files like SunOS 4 */ -#define MISSING_FCLOSE_DECL 0 - -/* Define to compile PHP/Zend thread safe */ -#undef ZTS - -/* Define when compiling with Zeus support */ -#undef WITH_ZEUS - -/* Define if struct sockaddr contains the field sa_len */ -#undef HAVE_SOCKADDR_SA_LEN - -#undef BROKEN_SPRINTF - -#if BROKEN_SPRINTF -#define sprintf php_sprintf -#endif +/* Leave this file alone */ diff --git a/acinclude.m4 b/acinclude.m4 index ee636315a41dd..2be95613f1bca 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -236,7 +236,7 @@ exit(1); ]) ]) if test "$ac_cv_time_r_type" = "hpux"; then - AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-SUX 10.x]) + AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) fi ]) @@ -279,7 +279,7 @@ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) if test "$ac_cv_struct_tm_gmtoff" = yes; then - AC_DEFINE(HAVE_TM_GMTOFF) + AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm]) fi ]) @@ -293,7 +293,7 @@ AC_DEFUN(PHP_CONFIGURE_PART,[ AC_DEFUN(PHP_PROG_SENDMAIL,[ AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib) if test -n "$PROG_SENDMAIL"; then - AC_DEFINE(HAVE_SENDMAIL) + AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) fi ]) @@ -339,7 +339,7 @@ AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock, ]) ) if test "$ac_cv_struct_flock" = "yes" ; then - AC_DEFINE(HAVE_STRUCT_FLOCK, 1) + AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock]) fi ]) @@ -590,11 +590,11 @@ AC_DEFUN(PHP_REGEX,[ if test "$REGEX_TYPE" = "php"; then REGEX_LIB=regex/libregex.la REGEX_DIR=regex - AC_DEFINE(HSREGEX) - AC_DEFINE(REGEX,1) + AC_DEFINE(HSREGEX,1,[ ]) + AC_DEFINE(REGEX,1,[ ]) PHP_FAST_OUTPUT(regex/Makefile) elif test "$REGEX_TYPE" = "system"; then - AC_DEFINE(REGEX,0) + AC_DEFINE(REGEX,0,[ ]) fi AC_MSG_CHECKING(which regex library to use) @@ -611,10 +611,10 @@ dnl AC_DEFUN(AC_MISSING_FCLOSE_DECL,[ AC_MSG_CHECKING([for fclose declaration]) AC_TRY_COMPILE([#include ],[int (*func)() = fclose],[ - AC_DEFINE(MISSING_FCLOSE_DECL,0) + AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ]) AC_MSG_RESULT(ok) ],[ - AC_DEFINE(MISSING_FCLOSE_DECL,1) + AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ]) AC_MSG_RESULT(missing) ]) ]) @@ -633,9 +633,9 @@ AC_DEFUN(AC_BROKEN_SPRINTF,[ ]) ]) if test "$ac_cv_broken_sprintf" = "yes"; then - AC_DEFINE(BROKEN_SPRINTF, 1) + AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [ ]) else - AC_DEFINE(BROKEN_SPRINTF, 0) + AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [ ]) fi ]) @@ -780,7 +780,7 @@ AC_DEFUN(AC_SOCKADDR_SA_LEN,[ #include ], [struct sockaddr s; s.sa_len;], [ac_cv_sockaddr_sa_len=yes - AC_DEFINE(HAVE_SOCKADDR_SA_LEN)], + AC_DEFINE(HAVE_SOCKADDR_SA_LEN,1,[ ])], [ac_cv_sockaddr_sa_len=no]) ]) ]) @@ -827,7 +827,7 @@ int main(void) { ac_cv_ebcdic="no" ])]) if test "$ac_cv_ebcdic" = "yes"; then - AC_DEFINE(CHARSET_EBCDIC,, [Define if system uses EBCDIC]) + AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC]) fi ]) diff --git a/configure.in b/configure.in index d535ebe7dadcc..641cb94cd5be1 100644 --- a/configure.in +++ b/configure.in @@ -193,7 +193,7 @@ INCLUDES="$INCLUDES -I\$(top_builddir)/Zend -I\$(top_srcdir)" AC_CHECK_LIB(socket, socket, [ AC_ADD_LIBRARY(socket) - AC_DEFINE(HAVE_LIBSOCKET) ], [ + AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [ AC_CHECK_LIB(socket, htonl, [ AC_ADD_LIBRARY(socket) ])]) @@ -211,10 +211,10 @@ if test "$php_no_nsl_checks" != "yes"; then AC_CHECK_LIB(nsl, gethostname, [ AC_ADD_LIBRARY(nsl) - AC_DEFINE(HAVE_LIBNSL) ],[ + AC_DEFINE(HAVE_LIBNSL,1,[ ]) ],[ AC_CHECK_LIB(nsl, gethostbyaddr, [ AC_ADD_LIBRARY(nsl) - AC_DEFINE(HAVE_LIBNSL) ], []) + AC_DEFINE(HAVE_LIBNSL,1,[ ]) ], []) ]) fi @@ -231,7 +231,7 @@ AC_CHECK_LIB(m, sin) AC_CHECK_LIB(bind, inet_aton, [ AC_ADD_LIBRARY(bind) - AC_DEFINE(HAVE_LIBBIND) ], []) + AC_DEFINE(HAVE_LIBBIND,1,[Whether you have bind]) ], []) AC_CHECK_LIB(resolv, inet_aton) @@ -242,10 +242,10 @@ AC_CHECK_LIB(socket, res_search, [ AC_CHECK_LIB(resolv, dn_skipname) AC_CHECK_LIB(resolv, __dn_skipname) LIBS="$LIBS -lsocket" - AC_DEFINE(HAVE_LIBSOCKET) ], [ + AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [ AC_CHECK_LIB(resolv, res_search, [ LIBS="$LIBS -lresolv" - AC_DEFINE(HAVE_LIBRESOLV) + AC_DEFINE(HAVE_LIBRESOLV,1,[ ]) ], [ AC_CHECK_LIB(resolv, dn_skipname) AC_CHECK_LIB(resolv, __dn_skipname) @@ -401,7 +401,7 @@ changequote([,]), [#include dnl AC_MSG_RESULT($ac_cv_type_in_addr_t) if test $ac_cv_type_in_addr_t = no; then - AC_DEFINE(in_addr_t, u_int) + AC_DEFINE(in_addr_t, u_int, [ ]) fi divert(4) @@ -421,11 +421,11 @@ if test "$PHP_CONFIG_FILE_PATH" = "yes"; then fi if test "$PHP_CONFIG_FILE_PATH" != "no"; then - AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$PHP_CONFIG_FILE_PATH") - AC_DEFINE(USE_CONFIG_FILE, 1) + AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$PHP_CONFIG_FILE_PATH",[ ]) + AC_DEFINE(USE_CONFIG_FILE, 1, [ ]) else - AC_DEFINE(CONFIGURATION_FILE_PATH, 0) - AC_DEFINE(USE_CONFIG_FILE, 0) + AC_DEFINE(CONFIGURATION_FILE_PATH, 0, [ ]) + AC_DEFINE(USE_CONFIG_FILE, 0, [ ]) fi PHP_ARG_ENABLE(debug, whether to include debugging symbols, @@ -446,9 +446,9 @@ PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default, [ --enable-safe-mode Enable safe mode by default.]) if test "$PHP_SAFE_MODE" = "yes"; then - AC_DEFINE(PHP_SAFE_MODE, 1) + AC_DEFINE(PHP_SAFE_MODE,1,[ ]) else - AC_DEFINE(PHP_SAFE_MODE, 0) + AC_DEFINE(PHP_SAFE_MODE,0,[ ]) fi AC_MSG_CHECKING(for safe mode exec dir) @@ -458,18 +458,18 @@ AC_ARG_WITH(exec-dir, [ if test "$withval" != "no"; then if test "$withval" = "yes"; then - AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin") + 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_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_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_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ]) AC_MSG_RESULT(/usr/local/php/bin) ]) @@ -477,27 +477,27 @@ PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler, [ --enable-sigchild Enable PHP's own SIGCHLD handler.],no) if test "$PHP_SIGCHILD" = "yes"; then - AC_DEFINE(PHP_SIGCHILD, 1) + AC_DEFINE(PHP_SIGCHILD, 1, [ ]) else - AC_DEFINE(PHP_SIGCHILD, 0) + AC_DEFINE(PHP_SIGCHILD, 0, [ ]) fi PHP_ARG_ENABLE(track-vars,whether to enable track_vars variables by default, [ --enable-track-vars Enable GET/POST/Cookie track variables by default.],yes) if test "$PHP_TRACK_VARS" = "yes"; then - AC_DEFINE(PHP_TRACK_VARS, 1) + AC_DEFINE(PHP_TRACK_VARS, 1, [ ]) else - AC_DEFINE(PHP_TRACK_VARS, 0) + AC_DEFINE(PHP_TRACK_VARS, 0, [ ]) fi PHP_ARG_ENABLE(magic-quotes,whether to enable magic quotes by default, [ --enable-magic-quotes Enable magic quotes by default.]) if test "$PHP_MAGIC_QUOTES" = "yes"; then - AC_DEFINE(MAGIC_QUOTES, 1) + AC_DEFINE(MAGIC_QUOTES, 1, [ ]) else - AC_DEFINE(MAGIC_QUOTES, 0) + AC_DEFINE(MAGIC_QUOTES, 0, [ ]) fi PHP_ARG_ENABLE(rpath, whether to enable runpaths, @@ -516,78 +516,51 @@ if test "$PHP_LIBGCC" = "yes"; then AC_ADD_LIBRARY(gcc, yes) fi -AC_MSG_CHECKING(whether to enable short tags by default) -AC_ARG_ENABLE(short-tags, -[ --disable-short-tags Disable the short-form