mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Don't override a pre-set CFLAGS
Debian has optimization/debug requirements, so allow dpkg-buildpackage to set CFLAGS and have it be respected.
This commit is contained in:
parent
81d927c702
commit
02068f7092
1 changed files with 12 additions and 2 deletions
|
@ -6,6 +6,14 @@ else
|
|||
cvs_def_disabled="!= xno"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for CFLAGS pre-set)
|
||||
leave_cflags_alone=no
|
||||
if test "x$CFLAGS" != "x"; then
|
||||
leave_cflags_alone=yes
|
||||
BUILD_TYPE="$BUILD_TYPE Custom"
|
||||
fi
|
||||
AC_MSG_RESULT([$leave_cflags_alone])
|
||||
|
||||
if test "x$GCC" = xyes; then
|
||||
set $CC
|
||||
shift
|
||||
|
@ -27,8 +35,9 @@ AC_ARG_ENABLE(debug,
|
|||
[ --disable-debug compile without debugging],
|
||||
debug=$enable_debug
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(for debugging)
|
||||
if test "x$debug" != xno; then
|
||||
if test "x$debug" != xno -a "x$leave_cflags_alone" != xyes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
BUILD_TYPE="$BUILD_TYPE Debug"
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
@ -41,8 +50,9 @@ AC_ARG_ENABLE(optimize,
|
|||
optimize=$enable_optimize,
|
||||
optimize=yes
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(for optimization)
|
||||
if test "x$optimize" = xyes; then
|
||||
if test "x$optimize" = xyes -a "x$leave_cflags_alone" != "xyes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
BUILD_TYPE="$BUILD_TYPE Optimize"
|
||||
if test "x$GCC" = xyes; then
|
||||
|
|
Loading…
Reference in a new issue