3636
3737apr_src_dir=" srclib/apr ../apr"
3838apu_src_dir=" "
39+ autoconf_args=" -Wall"
3940
4041# By default, touch the checked-in sources to suppress regeneration of
4142# the ap_expr parser.
6162 --with-regen-expr)
6263 regen_expr=yes
6364 ;;
65+
66+ --with-errors)
67+ autoconf_args=" $autoconf_args -Werror"
68+ ;;
6469
6570 -h|--help)
6671 cat << EOF
@@ -85,6 +90,8 @@ Configuration:
8590 --with-regen-expr suppress the timestamp adjustment which prevents the
8691 rebuild of the ap_expr expression parser
8792
93+ --with-errors fail on autoconf generation warnings
94+
8895APR-Config Mode:
8996
9097 When passing an apr-config executable to --with-apr, buildconf will attempt to
@@ -254,7 +261,7 @@ if [ $apr_major_version -lt 2 ] ; then
254261 apu_src_dir=` cd $apu_src_dir && pwd`
255262fi
256263
257- echo copying build files
264+ echo buildconf: copying build files
258265if [ -n " ${apr_config} " ]; then
259266 # If we're using apr-config, we switch things up a little bit:
260267 # - use automake's config.* scripts instead of APR's
@@ -294,13 +301,23 @@ if [ -z "${apr_config}" ]; then
294301 fi
295302fi
296303
297- echo rebuilding $config_h_in
304+ echo buildconf: rebuilding $config_h_in
298305rm -f $config_h_in
299- ${AUTOHEADER:- autoheader} 2>&1 | grep -v " $cross_compile_warning "
306+ if ${AUTOHEADER:- autoheader} ${autoconf_args} ; then
307+ :
308+ else
309+ echo buildconf: ERROR: autoheader failed, bailing out.
310+ exit 1
311+ fi
300312
301- echo rebuilding configure
313+ echo buildconf: rebuilding configure
302314rm -f config.cache
303- ${AUTOCONF:- autoconf} 2>&1 | grep -v " $cross_compile_warning "
315+ if ${AUTOCONF:- autoconf} ${autoconf_args} ; then
316+ :
317+ else
318+ echo buildconf: ERROR: autoconf failed, bailing out.
319+ exit 2
320+ fi
304321
305322# Remove autoconf 2.5x cache directories
306323rm -rf autom4te* .cache
@@ -309,7 +326,7 @@ rm -rf autom4te*.cache
309326rm -rf bsd_converted
310327
311328if [ -f ` which cut` ]; then
312- echo rebuilding rpm spec file
329+ echo buildconf: rebuilding rpm spec file
313330 ( VMMN=` build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
314331 EPOCH=` build/get-version.sh epoch include/ap_release.h AP_SERVER`
315332 REVISION=` build/get-version.sh all include/ap_release.h AP_SERVER`
0 commit comments