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"
|
cvs_def_disabled="!= xno"
|
||||||
fi
|
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
|
if test "x$GCC" = xyes; then
|
||||||
set $CC
|
set $CC
|
||||||
shift
|
shift
|
||||||
|
@ -27,8 +35,9 @@ AC_ARG_ENABLE(debug,
|
||||||
[ --disable-debug compile without debugging],
|
[ --disable-debug compile without debugging],
|
||||||
debug=$enable_debug
|
debug=$enable_debug
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING(for debugging)
|
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)
|
AC_MSG_RESULT(yes)
|
||||||
BUILD_TYPE="$BUILD_TYPE Debug"
|
BUILD_TYPE="$BUILD_TYPE Debug"
|
||||||
CFLAGS="$CFLAGS -g"
|
CFLAGS="$CFLAGS -g"
|
||||||
|
@ -41,8 +50,9 @@ AC_ARG_ENABLE(optimize,
|
||||||
optimize=$enable_optimize,
|
optimize=$enable_optimize,
|
||||||
optimize=yes
|
optimize=yes
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING(for optimization)
|
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)
|
AC_MSG_RESULT(yes)
|
||||||
BUILD_TYPE="$BUILD_TYPE Optimize"
|
BUILD_TYPE="$BUILD_TYPE Optimize"
|
||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
|
|
Loading…
Reference in a new issue