From: Uwe Hermann Date: Fri, 28 Dec 2012 16:30:56 +0000 (+0100) Subject: configure.ac: Fix CFLAGS settings. X-Git-Tag: sigrok-cli-0.4.0~65 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=12ea952e9a86f5184bf4e52b6a80fbf7072d50f4;p=sigrok-cli.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 ea04095..a0c93ef 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,8 @@ AH_TOP([#ifndef SIGROK_CLI_CONFIG_H #define SIGROK_CLI_CONFIG_H /* To stop multiple inclusions. */]) AH_BOTTOM([#endif /* SIGROK_CLI_CONFIG_H */]) -CFLAGS="-g -Wall -Wextra" +# Enable more compiler warnings via -Wall and -Wextra. +CFLAGS="$CFLAGS -Wall -Wextra" # Checks for programs. AC_PROG_CC