]> granicus.if.org Git - apache/commitdiff
Implement Jeff's idea for an autoconf-defined symbol to enable the special
authorGreg Stein <gstein@apache.org>
Sun, 13 May 2001 10:37:06 +0000 (10:37 +0000)
committerGreg Stein <gstein@apache.org>
Sun, 13 May 2001 10:37:06 +0000 (10:37 +0000)
command function prototype stuff. AP_DEBUG is always set in maintainer mode
and AP_DEBUG_HAVE_GCC is set when the compiler is GCC.

Submitted by: Jeff Trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89102 13f79535-47bb-0310-9956-ffa450edef68

configure.in
include/http_config.h

index 1b6b93892b8252a8fcb23198dceb4e4a914bf962..ff83aafe3e8af53562d81235d80f8673cd493057 100644 (file)
@@ -208,7 +208,11 @@ AC_ARG_WITH(port,[  --with-port=PORT        Port on which to listen (default is
        [PORT=80])
 
 AC_ARG_ENABLE(maintainer-mode,[  --enable-maintainer-mode  Turn on debugging and compile time warnings],
-  [if test "$ac_cv_prog_gcc" = "yes"; then APR_ADDTO(CPPFLAGS,-DAP_DEBUG) fi
+[
+  if test "$ac_cv_prog_gcc" = "yes"; then
+    APR_ADDTO(CPPFLAGS,-DAP_DEBUG_HAVE_GCC)
+  fi
+  APR_ADDTO(CPPFLAGS, -DAP_DEBUG)
 ])dnl
 
 APACHE_ENABLE_LAYOUT
index fc93ba9f3dedd95041f351d49437495790dbe295..7706ba51d7c987f7684c8b532299628d0c5953ad 100644 (file)
@@ -120,7 +120,7 @@ enum cmd_how {
 
 typedef struct cmd_parms_struct cmd_parms;
 
-#ifdef AP_DEBUG
+#ifdef AP_DEBUG_HAVE_GCC
 
 typedef union {
     const char *(*no_args) (cmd_parms *parms, void *mconfig);
@@ -162,7 +162,7 @@ typedef union {
 # define AP_INIT_FLAG(directive, func, mconfig, where, help) \
     { directive, { .flag=func }, mconfig, where, FLAG, help }
 
-#else
+#else /* AP_DEBUG_HAVE_GCC */
 
 typedef const char *(*cmd_func) ();
 
@@ -194,7 +194,7 @@ typedef const char *(*cmd_func) ();
 # define AP_INIT_FLAG(directive, func, mconfig, where, help) \
     { directive, func, mconfig, where, FLAG, help }
 
-#endif
+#endif /* AP_DEBUG_HAVE_GCC */
 
 typedef struct command_struct command_rec; 
 /**