From: Ryan Bloom Date: Thu, 2 Nov 2000 18:51:08 +0000 (+0000) Subject: Create a feature macro that determines if Autoconf was used to configure X-Git-Tag: APACHE_2_0_ALPHA_8~194 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d95eb05d772b3ac4baf6a0a595016a5c6dd1d7cb;p=apache Create a feature macro that determines if Autoconf was used to configure the server. The ap_ugly_hack variable is only valid if Autoconf was used for the configuration. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86802 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/configure.in b/configure.in index 716bdf4f76..3e662fbdb0 100644 --- a/configure.in +++ b/configure.in @@ -184,6 +184,9 @@ fi APACHE_SUBST(AP_LIB_DIRS) APACHE_SUBST(AP_LIBS) +AC_DEFINE(AP_USING_AUTOCONF, 1, + [Using autoconf to configure Apache]) + dnl check for endianness if test "$cross_compiling" = "no"; then AC_C_BIGENDIAN @@ -256,4 +259,3 @@ AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs support/apachectl,,[ APACHE_GEN_MAKEFILES ]) - diff --git a/include/http_main.h b/include/http_main.h index a70a91b9f7..16eaa2482e 100644 --- a/include/http_main.h +++ b/include/http_main.h @@ -89,7 +89,7 @@ extern AP_DECLARE_DATA apr_array_header_t *ap_server_post_read_config; * effect the server based on command line options */ extern AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines; -#ifndef WIN32 /* A -feature- (?) macro is needed here */ +#ifdef AP_USING_AUTOCONF extern void *ap_ugly_hack; #endif diff --git a/server/main.c b/server/main.c index 24324efcb5..1bd55076a1 100644 --- a/server/main.c +++ b/server/main.c @@ -294,7 +294,7 @@ int main(int argc, char *argv[]) apr_initialize(); -#ifndef WIN32 /* A -feature- (?) macro is needed here */ +#ifdef AP_USING_AUTOCONF /* This ugly little hack pulls any function referenced in exports.c into * the web server. exports.c is generated by buildconf, and it * has all of the apr functions specified by httpd.exp.