diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-06 16:58:28 +0100 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-06 16:58:28 +0100 |
commit | ab27e4c68b8a5cf89e8534f3a5011083c558139a (patch) | |
tree | 9536f906b00f257444485068cb3d632c1877ce3c | |
parent | f20681e0c628fa1d5f222e69615e9d48529b61ec (diff) |
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.
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a0503a4..782ee06 100644 --- a/configure.ac +++ b/configure.ac @@ -150,9 +150,15 @@ if test -n "${MAINTAINER_MODE_FALSE}"; then DESIRED_FLAGS="-Werror $DESIRED_FLAGS" 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 AS_COMPILER_FLAG([$flag], [CFLAGS="$CFLAGS $flag"]) done +fi dnl Disable debugging if it's not specified if test x"$debug_enabled" != x"yes" ; then |