]> sigrok.org Git - libsigrokdecode.git/commitdiff
configure.ac: Fix CFLAGS settings.
authorUwe Hermann <redacted>
Fri, 28 Dec 2012 16:03:20 +0000 (17:03 +0100)
committerUwe Hermann <redacted>
Fri, 28 Dec 2012 16:03:20 +0000 (17:03 +0100)
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.

configure.ac

index a5335a5479be44ec45091a855f7a710b7168a034..ceb9ed9e9c42201c9404ca9e63e9abc3236edf7b 100644 (file)
@@ -42,7 +42,7 @@ AH_TOP([#ifndef SRD_CONFIG_H
 #define SRD_CONFIG_H    /* To stop multiple inclusions. */])
 AH_BOTTOM([#endif /* 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
 
 # Checks for programs.
 AC_PROG_CXX