]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
configure.ac: Make ACL_CHECK_ADD_COMPILE_FLAGS append instead of prepend
authorFrank Lichtenheld <frank@lichtenheld.com>
Tue, 23 Sep 2025 12:20:00 +0000 (14:20 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 23 Sep 2025 12:46:05 +0000 (14:46 +0200)
The prepend behavior is surprising. If there is a difference
in behavior at least make it easy to understand what happens
why.

Change-Id: I1ce408d4473874d88a348308503527ef7eb8c1ff
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1204
Message-Id: <20250923122006.12212-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/59237450/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
configure.ac

index 38b14a1ea83b8b54a39a6387f30df6dba4c43e82..0fc21ee524f54a7752aff14f919b5354923f5555 100644 (file)
@@ -1388,9 +1388,9 @@ fi
 # required for gcc, but some compilers such as clang need it.
 AC_DEFUN([ACL_CHECK_ADD_COMPILE_FLAGS], [
     old_cflags="$CFLAGS"
-    CFLAGS="$1 -Werror $CFLAGS"
+    CFLAGS="-Werror $CFLAGS $1"
     AC_MSG_CHECKING([whether the compiler accepts $1])
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes])]; CFLAGS="$1 $old_cflags",
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes])]; CFLAGS="$old_cflags $1",
         [AC_MSG_RESULT([no]); CFLAGS="$old_cflags"])]
 )