Debugging and optimization are now two completely sepirate options.

This commit is contained in:
Zephaniah E. Hull 2000-09-28 06:10:37 +00:00
parent 6f37b6c074
commit 1a7f2af4ec

View file

@ -888,14 +888,32 @@ fi
AC_DEFINE_UNQUOTED(FS_USERPATH, "$userpath")
dnl CFLAGS for release and devel versions
CFLAGS=""
AC_ARG_ENABLE(debug,
[ --enable-debug compile without optimizations (for development)],
[ --enable-debug compile with debugging (for development)],
debug=$enable_debug
)
if test "x$debug" != xyes; then
BUILD_TYPE="Standard"
AC_MSG_CHECKING(for debugging)
if test "x$debug" = xyes; then
AC_MSG_RESULT(yes)
BUILD_TYPE="$BUILD_TYPE Debug"
CFLAGS="$CFLAGS -g"
else
AC_MSG_RESULT(no)
fi
AC_ARG_ENABLE(optimize,
[ --disable-optimize compile without optimizations (for development)],
optimize=$disable_optimize,
optimize=yes
)
AC_MSG_CHECKING(for optimization)
if test "x$optimize" = xyes; then
AC_MSG_RESULT(yes)
BUILD_TYPE="$BUILD_TYPE Optimize"
if test "x$GCC" = xyes; then
CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
CFLAGS="$CFLAGS -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
AC_MSG_CHECKING(for special compiler settings)
case "${host}" in
i386-*-*)
@ -924,7 +942,7 @@ if test "x$debug" != xyes; then
CFLAGS=-O2
fi
else
BUILD_TYPE="Debug"
AC_MSG_RESULT(no)
fi
dnl CFLAGS for release and devel versions
@ -947,7 +965,7 @@ if test "x$GCC" = xyes; then
AC_MSG_CHECKING(for -pipe vs -save-temps)
AC_ARG_ENABLE(save-temps,
[ --enable-save-temps save temporay files],
AC_MSG_RESULT(-save-temps); CFLAGS="$CFLAGS -save-temps",
AC_MSG_RESULT(-save-temps); CFLAGS="$CFLAGS -save-temps"; BUILD_TYPE="$BUILD_TYPE Save-temps",
AC_MSG_RESULT(-pipe); CFLAGS="$CFLAGS -pipe")
fi
@ -1103,7 +1121,7 @@ AC_OUTPUT(
AC_MSG_RESULT([
QuakeForge has been configured successfully.
Build type: $BUILD_TYPE
Build type:$BUILD_TYPE
Server support: $SV_TARGETS
Client support:$CL_TARGETS