From: Uwe Hermann Date: Fri, 28 Dec 2012 16:03:20 +0000 (+0100) Subject: configure.ac: Fix CFLAGS settings. X-Git-Tag: libsigrokdecode-0.1.1~16 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6ff4cd08a0e6d29dd7587173defb8bf17c0d9b62;p=libsigrokdecode.git configure.ac: Fix CFLAGS settings. Don't override/overwrite CFLAGS in configure.ac, but rather amend it with (currently) "-Wall -Wextra". 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 a5335a5..ceb9ed9 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AH_TOP([#ifndef SRD_CONFIG_H #define SRD_CONFIG_H /* To stop multiple inclusions. */]) AH_BOTTOM([#endif /* SRD_CONFIG_H */]) -CFLAGS="-g -Wall -Wextra" +CFLAGS="$CFLAGS -Wall -Wextra" # Checks for programs. AC_PROG_CXX