From 3e58164050ec051d9da884ce856ff7c77f1ae922 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 21 Feb 2016 14:54:02 +0100 Subject: [PATCH] build: keep user-specified CFLAGS When user provides a CFLAGS at configure-time, keep it. --- configure.ac | 3 --- redhat/lldpd.spec | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 81425147..e8d34508 100644 --- a/configure.ac +++ b/configure.ac @@ -171,9 +171,6 @@ AC_REPLACE_FUNCS([strlcpy # Optional functions AC_CHECK_FUNCS([setresuid setresgid]) -CFLAGS="$_save_CFLAGS" -LIBS="$_save_LIBS" - # Check for res_init. On OSX, res_init is a symbol in libsystem_info # and a macro in resolv.h. We need to ensure we test with resolv.h. m4_pushdef([AC_LANG_CALL(C)], [ diff --git a/redhat/lldpd.spec b/redhat/lldpd.spec index 5e1442a1..a3fdc7bc 100644 --- a/redhat/lldpd.spec +++ b/redhat/lldpd.spec @@ -191,8 +191,7 @@ to adjacent network devices. --sysconfdir=%{_sysconfdir} \ --libdir=%{_libdir} \ --docdir=%{_docdir}/lldpd \ - --enable-pie \ - CFLAGS="$RPM_OPT_FLAGS" + --enable-pie [ -f %{_includedir}/net-snmp/agent/struct.h ] || touch src/struct.h make %{?_smp_mflags} -- 2.39.5