From d627ab691987bc8c76be17917fd4dc2a608ba8ef Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 19 Feb 2015 16:52:55 +0100 Subject: [PATCH] configure: move CFLAGS/CPPFLAGS to LLDP_CFLAGS/LLDP_CPPFLAGS The goal is to avoid the user to override those flags when using `make CFLAGS=somethingelse`. This is to enable a user to use `make CFLAGS=-Werror` since this flag cannot be used with `./configure`. --- configure.ac | 6 +++++- src/Makefile.am | 3 ++- src/client/Makefile.am | 3 ++- src/daemon/Makefile.am | 5 +++-- src/lib/Makefile.am | 3 ++- tests/Makefile.am | 3 ++- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index fe0da6e6..1f9bdb76 100644 --- a/configure.ac +++ b/configure.ac @@ -276,6 +276,10 @@ lldp_ARG_ENABLE([oldies], [compatibility with Linux kernel older than 2.6.18], [ ####################### # Output results +AC_SUBST([LLDP_CFLAGS], [$CFLAGS]) +AC_SUBST([LLDP_CPPFLAGS], [$CPPFLAGS]) +CFLAGS= +CPPFLAGS AM_CONDITIONAL([HAVE_CHECK], [test x"$have_check" = x"yes"]) AM_CONDITIONAL([USE_SNMP], [test x"$with_snmp" = x"yes"]) AM_CONDITIONAL([USE_XML], [test x"$with_xml" = x"yes"]) @@ -297,7 +301,7 @@ cat <