You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2026/08/28 13:33:29 UTC

svn commit: r1937566 - httpd/httpd/trunk

Author: jorton
Date: Fri Aug 28 13:33:29 2026
New Revision: 1937566

Log:
* buildconf: Run autoconf with -Wall -Wno-cross to suppress
  cross-compilation warnings by default, rather than grep.
  Support --with-errors argument to add -Werror and fail on
  autoconf/autoheader warnings.
  Fail if autoheader or autoconf fail.
  Add "buildconf: " prefix to output messages.

GitHub: PR #380

Modified:
   httpd/httpd/trunk/buildconf

Modified: httpd/httpd/trunk/buildconf
==============================================================================
--- httpd/httpd/trunk/buildconf	Fri Aug 28 13:33:19 2026	(r1937565)
+++ httpd/httpd/trunk/buildconf	Fri Aug 28 13:33:29 2026	(r1937566)
@@ -36,6 +36,7 @@ esac
 
 apr_src_dir="srclib/apr ../apr"
 apu_src_dir=""
+autoconf_args="-Wall"
 
 # By default, touch the checked-in sources to suppress regeneration of
 # the ap_expr parser.
@@ -61,6 +62,10 @@ do
     --with-regen-expr)
         regen_expr=yes
         ;;
+
+    --with-errors)
+        autoconf_args="$autoconf_args -Werror"
+        ;;
     
     -h|--help)
         cat <<EOF
@@ -85,6 +90,8 @@ Configuration:
   --with-regen-expr        suppress the timestamp adjustment which prevents the 
                            rebuild of the ap_expr expression parser
 
+  --with-errors            fail on autoconf generation warnings
+
 APR-Config Mode:
 
   When passing an apr-config executable to --with-apr, buildconf will attempt to
@@ -254,7 +261,7 @@ if [ $apr_major_version -lt 2 ] ; then
     apu_src_dir=`cd $apu_src_dir && pwd`
 fi
 
-echo copying build files
+echo buildconf: copying build files
 if [ -n "${apr_config}" ]; then
     # If we're using apr-config, we switch things up a little bit:
     # - use automake's config.* scripts instead of APR's
@@ -294,13 +301,23 @@ if [ -z "${apr_config}" ]; then
     fi
 fi
 
-echo rebuilding $config_h_in
+echo buildconf: rebuilding $config_h_in
 rm -f $config_h_in
-${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
+if ${AUTOHEADER:-autoheader} ${autoconf_args}; then
+    :
+else
+    echo buildconf: ERROR: autoheader failed, bailing out.
+    exit 1
+fi
 
-echo rebuilding configure
+echo buildconf: rebuilding configure
 rm -f config.cache
-${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
+if ${AUTOCONF:-autoconf} ${autoconf_args}; then
+    :
+else
+    echo buildconf: ERROR: autoconf failed, bailing out.
+    exit 2
+fi
 
 # Remove autoconf 2.5x cache directories
 rm -rf autom4te*.cache
@@ -309,7 +326,7 @@ rm -rf autom4te*.cache
 rm -rf bsd_converted
 
 if [ -f `which cut` ]; then
-  echo rebuilding rpm spec file
+  echo buildconf: rebuilding rpm spec file
   ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
     EPOCH=`build/get-version.sh epoch include/ap_release.h AP_SERVER`
     REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER`