mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-17 20:15:46 +00:00
build-sys: Allow user to pass CFLAGS
Allow the user to pass in the CFLAGS. Previously they were overwritten with -O2 -g, which are the default CFLAGS if none are passed. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
139925229d
commit
d9ea4ea3c3
16
configure.ac
16
configure.ac
@ -38,15 +38,7 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [create a debug build]),
|
||||
[DEBUG="no",
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
# If the user has not set CFLAGS, do something appropriate
|
||||
test_CFLAGS=${CFLAGS+set}
|
||||
if test "$test_CFLAGS" != set; then
|
||||
if test "$DEBUG" = "yes"; then
|
||||
CFLAGS="-O0 -g -DDEBUG"
|
||||
else
|
||||
CFLAGS="-g -O2"
|
||||
fi
|
||||
elif test "$DEBUG" = "yes"; then
|
||||
if test "$DEBUG" = "yes"; then
|
||||
CFLAGS="$CFLAGS -O0 -g -DDEBUG"
|
||||
fi
|
||||
|
||||
@ -212,10 +204,8 @@ if test "x$enable_hardening" != "xno"; then
|
||||
AC_SUBST([HARDENING_LDFLAGS])
|
||||
fi
|
||||
|
||||
if test "$test_CFLAGS" != set; then
|
||||
CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Werror -Wreturn-type -Wsign-compare -Wno-self-assign"
|
||||
LDFLAGS="$LDFLAGS $COVERAGE_LDFLAGS"
|
||||
fi
|
||||
CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Werror -Wreturn-type -Wsign-compare -Wno-self-assign"
|
||||
LDFLAGS="$LDFLAGS $COVERAGE_LDFLAGS"
|
||||
|
||||
AC_CONFIG_FILES(Makefile \
|
||||
dist/libtpms.spec \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user