File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ AM_INIT_AUTOMAKE([1.11.2 foreign subdir-objects])
29
29
# Make the compilation flags quiet unless V=1 is used.
30
30
m4_ifdef ( [ AM_SILENT_RULES ] , [ AM_SILENT_RULES ([ yes] )] )
31
31
32
+ if test "${CFLAGS+set}" = "set"; then
33
+ CFLAGS_overridden=yes
34
+ else
35
+ CFLAGS_overridden=no
36
+ fi
32
37
AC_PROG_CC
33
38
AM_PROG_AS
34
39
AM_PROG_AR
241
246
if test x"$enable_coverage" = x"yes"; then
242
247
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOVERAGE=1"
243
248
SECP_CFLAGS="-O0 --coverage $SECP_CFLAGS"
249
+ # If coverage is enabled, and the user has not overridden CFLAGS,
250
+ # override Autoconf's value "-g -O2" with "-g". Otherwise we'd end up
251
+ # with "-O0 --coverage -g -O2".
252
+ if test "$CFLAGS_overridden" = "no"; then
253
+ CFLAGS="-g"
254
+ fi
244
255
LDFLAGS="--coverage $LDFLAGS"
245
256
else
246
257
# Most likely the CFLAGS already contain -O2 because that is autoconf's default.
You can’t perform that action at this time.
0 commit comments