From fd23b6486f449093bc848609cce49cdda690032f Mon Sep 17 00:00:00 2001 From: b1v1r Date: Wed, 21 Oct 2009 16:31:29 +0000 Subject: [PATCH] Added a --disable-errors to configure so that you can still build mlogc without httpd/apxs. --- apache2/configure | 37 ++++++++++++++++++++++++++++++++++--- apache2/configure.in | 31 ++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/apache2/configure b/apache2/configure index 34e7b006..b4375d77 100755 --- a/apache2/configure +++ b/apache2/configure @@ -739,6 +739,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_errors enable_verbose_output enable_strict_compile enable_debug_conf @@ -1383,6 +1384,7 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-errors Disable errors during configure. --enable-verbose-output Enable more verbose configure output. --enable-strict-compile Enable strict compilation (warnings are errors). --enable-debug-conf Enable debug during configuration. @@ -5029,6 +5031,23 @@ MSC_REGRESSION_DOCROOT_DIR="$MSC_REGRESSION_SERVERROOT_DIR/htdocs" ### Configure Options +# Ignore configure errors +# Check whether --enable-errors was given. +if test "${enable_errors+set}" = set; then + enableval=$enable_errors; + if test "$enableval" != "no"; then + report_errors=1 + else + report_errors=0 + fi + +else + + report_errors=1 + +fi + + # Verbose output # Check whether --enable-verbose-output was given. if test "${enable_verbose_output+set}" = set; then @@ -5051,7 +5070,7 @@ fi if test "${enable_strict_compile+set}" = set; then enableval=$enable_strict_compile; if test "$enableval" != "no"; then - strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Werror" + strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Wformat -Wformat-security -Werror -fstack-protector -D_FORTIFY_SOURCE=2" else strict_compile= fi @@ -5228,9 +5247,16 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | { $as_echo "$as_me:$LINENO: httpd is recent enough" >&5 $as_echo "$as_me: httpd is recent enough" >&6;} else - { { $as_echo "$as_me:$LINENO: error: apache is too old" >&5 + + if test "$report_errors" -eq 1; then + { { $as_echo "$as_me:$LINENO: error: apache is too old" >&5 $as_echo "$as_me: error: apache is too old" >&2;} { (exit mmn must be at least $HTTPD_WANTED_MMN); exit mmn must be at least $HTTPD_WANTED_MMN; }; } + else + { $as_echo "$as_me:$LINENO: apache is too old" >&5 +$as_echo "$as_me: apache is too old" >&mmn must be at least $HTTPD_WANTED_MMN;} + fi + fi rm -f conftest* @@ -5289,9 +5315,14 @@ $as_echo "$as_me: apxs LIBEXECDIR: $APXS_LIBEXECDIR" >&6;}; fi if test "$verbose_output" -eq 1; then { $as_echo "$as_me:$LINENO: apxs HTTPD: $APXS_HTTPD" >&5 $as_echo "$as_me: apxs HTTPD: $APXS_HTTPD" >&6;}; fi else - { { $as_echo "$as_me:$LINENO: error: couldn't find APXS" >&5 + if test "$report_errors" -eq 1; then + { { $as_echo "$as_me:$LINENO: error: couldn't find APXS" >&5 $as_echo "$as_me: error: couldn't find APXS" >&2;} { (exit 1); exit 1; }; } + else + { $as_echo "$as_me:$LINENO: couldn't find APXS" >&5 +$as_echo "$as_me: couldn't find APXS" >&6;} + fi fi # Include M4 macros diff --git a/apache2/configure.in b/apache2/configure.in index 37241fa7..90524681 100644 --- a/apache2/configure.in +++ b/apache2/configure.in @@ -63,6 +63,21 @@ AC_SUBST(MSC_REGRESSION_DOCROOT_DIR) ### Configure Options +# Ignore configure errors +AC_ARG_ENABLE(errors, + AS_HELP_STRING([--disable-errors], + [Disable errors during configure.]), +[ + if test "$enableval" != "no"; then + report_errors=1 + else + report_errors=0 + fi +], +[ + report_errors=1 +]) + # Verbose output AC_ARG_ENABLE(verbose-output, AS_HELP_STRING([--enable-verbose-output], @@ -84,7 +99,7 @@ AC_ARG_ENABLE(strict-compile, [Enable strict compilation (warnings are errors).]), [ if test "$enableval" != "no"; then - strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Werror" + strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Wformat -Wformat-security -Werror -fstack-protector -D_FORTIFY_SOURCE=2" else strict_compile= fi @@ -231,7 +246,13 @@ if test -n "$APXS" -a "$APXS" != "no" -a -x "$APXS" ; then VERSION_OK #endif], [AC_MSG_NOTICE(httpd is recent enough)], - [AC_MSG_ERROR(apache is too old, mmn must be at least $HTTPD_WANTED_MMN)]) + [ + if test "$report_errors" -eq 1; then + AC_MSG_ERROR(apache is too old, mmn must be at least $HTTPD_WANTED_MMN) + else + AC_MSG_NOTICE(apache is too old, mmn must be at least $HTTPD_WANTED_MMN) + fi + ]) fi APXS_INCLUDEDIR="`$APXS -q INCLUDEDIR`" if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apxs INCLUDEDIR: $APXS_INCLUDEDIR); fi @@ -274,7 +295,11 @@ VERSION_OK fi if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apxs HTTPD: $APXS_HTTPD); fi else - AC_MSG_ERROR(couldn't find APXS) + if test "$report_errors" -eq 1; then + AC_MSG_ERROR(couldn't find APXS) + else + AC_MSG_NOTICE(couldn't find APXS) + fi fi # Include M4 macros