From: Uwe Hermann Date: Fri, 28 Dec 2012 10:22:16 +0000 (+0100) Subject: configure.ac: Fix CFLAGS settings. X-Git-Tag: dsupstream~403 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bdd7618cd1f0645e3446814a9438965863d859f6;p=libsigrok.git configure.ac: Fix CFLAGS settings. Don't override/overwrite CFLAGS in configure.ac, but rather amend it with (currently) "-Wall -Wextra -fvisibility=hidden". This properly allows users/packagers to do things like: ./configure (this will default to using "-g -O2" additionally) CFLAGS="-g -O2" ./configure (same as above) CFLAGS="" ./configure (no additional flags) CFLAGS="-g -O0" ./configure (disable optimization, e.g. for valgrind use) etc. etc. --- diff --git a/configure.ac b/configure.ac index 40da7be8..89f88886 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,7 @@ AH_BOTTOM([#endif /* SR_CONFIG_H */]) # Enable more compiler warnings via -Wall and -Wextra. Add -fvisibility=hidden # and enforce use of SR_API to explicitly mark all public API functions. -CFLAGS="-g -Wall -Wextra -fvisibility=hidden" +CFLAGS="$CFLAGS -Wall -Wextra -fvisibility=hidden" # Checks for programs. AC_PROG_CXX