configure.ac: check for all "desired" CFLAGS at once
in case they're all accepted, which would be the case with any halfways recent GCC, we save a lot of time over testing each flag sequentially.
This commit is contained in:
parent
f20681e0c6
commit
ab27e4c68b
@ -150,9 +150,15 @@ if test -n "${MAINTAINER_MODE_FALSE}"; then
|
|||||||
DESIRED_FLAGS="-Werror $DESIRED_FLAGS"
|
DESIRED_FLAGS="-Werror $DESIRED_FLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
all_desired_work=false
|
||||||
|
AS_COMPILER_FLAG([$DESIRED_FLAGS], [all_desired_work=true])
|
||||||
|
if $all_desired_work ; then
|
||||||
|
CFLAGS="$CFLAGS $DESIRED_FLAGS"
|
||||||
|
else
|
||||||
for flag in $DESIRED_FLAGS; do
|
for flag in $DESIRED_FLAGS; do
|
||||||
AS_COMPILER_FLAG([$flag], [CFLAGS="$CFLAGS $flag"])
|
AS_COMPILER_FLAG([$flag], [CFLAGS="$CFLAGS $flag"])
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Disable debugging if it's not specified
|
dnl Disable debugging if it's not specified
|
||||||
if test x"$debug_enabled" != x"yes" ; then
|
if test x"$debug_enabled" != x"yes" ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user