From 947cb661f6188abf5d1128c30b61090f58d5d3fd Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sun, 20 Aug 2017 14:16:09 +0100 Subject: [PATCH] cppflags.m4: Don't trample CFLAGS and CPPFLAGS. They were always being restored, but not necessarily saved first. There might still be some odd behaviour in this area. I'm seeing -D... preprocessor symbols disappear on subsequent runs causing compilation problems, e.g. strcasecmp(3) not prototyped. --- m4/cppflags.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m4/cppflags.m4 b/m4/cppflags.m4 index 1e2401c1..8e7bc14c 100644 --- a/m4/cppflags.m4 +++ b/m4/cppflags.m4 @@ -43,9 +43,10 @@ AC_DEFUN([NMH_ADDL_CPPFLAGS], [AC_LANG_PROGRAM([#include ], [return strdup("x") == 0])], [AM_CPPFLAGS="${nmh_cv_addl_cppflags}"; break;])]) - done]) + done CFLAGS="$nmh_saved_cflags" CPPFLAGS="$nmh_saved_cppflags" + ]) dnl autoconf doesn't currently provide a macro to disable AC_LANG_WERROR, dnl so do it this way: -- 2.56.0