From 0da8ba2e8cad92d480c9f501044dbaf469db51ec Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 9 May 2024 22:02:01 -0400 Subject: [PATCH] configure: fix check for valid compiler flags with Clang By default Clang reports unknown compiler flags as warnings thus the valid compiler flags check fails to work properly. Clang needs to have -Werror passed. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 51bbd5d..53bb60b 100644 --- a/configure.ac +++ b/configure.ac @@ -156,12 +156,12 @@ if test -n "${MAINTAINER_MODE_FALSE}"; then fi all_desired_work=false -AS_COMPILER_FLAG([$DESIRED_FLAGS], [all_desired_work=true]) +AS_COMPILER_FLAG([-Werror $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"]) + AS_COMPILER_FLAG([-Werror $flag], [CFLAGS="$CFLAGS $flag"]) done fi