Skip to content

Commit e83da00

Browse files
committed
* 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.
1 parent a954ab6 commit e83da00

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

buildconf

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ esac
3636

3737
apr_src_dir="srclib/apr ../apr"
3838
apu_src_dir=""
39+
autoconf_args="-Wall"
3940

4041
# By default, touch the checked-in sources to suppress regeneration of
4142
# the ap_expr parser.
@@ -61,6 +62,10 @@ do
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+
8895
APR-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`
255262
fi
256263

257-
echo copying build files
264+
echo buildconf: copying build files
258265
if [ -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
295302
fi
296303

297-
echo rebuilding $config_h_in
304+
echo buildconf: rebuilding $config_h_in
298305
rm -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
302314
rm -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
306323
rm -rf autom4te*.cache
@@ -309,7 +326,7 @@ rm -rf autom4te*.cache
309326
rm -rf bsd_converted
310327

311328
if [ -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

Comments
 (0)