mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
get --disable-optimize and --disable-debug working again
LT_INIT messes with CFLAGS, so do a save/restore around the invocation
This commit is contained in:
parent
e236c1dd4e
commit
abf3972c84
2 changed files with 24 additions and 17 deletions
|
@ -6,6 +6,23 @@ else
|
||||||
cvs_def_disabled="!= xno"
|
cvs_def_disabled="!= xno"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$GCC" = xyes; then
|
||||||
|
set $CC
|
||||||
|
shift
|
||||||
|
args="$*"
|
||||||
|
AC_MSG_CHECKING(for gcc version)
|
||||||
|
CCVER="gcc `$CC --version | grep '[[0-9]]\.[[0-9]]' | sed -e 's/.*(GCC)//' -e 's/[[^0-9]]*\([[0-9.]]*\).*/\1/'`"
|
||||||
|
set $CCVER
|
||||||
|
save_IFS="$IFS"
|
||||||
|
IFS="."
|
||||||
|
set $2
|
||||||
|
CC_MAJ=$1
|
||||||
|
CC_MIN=$2
|
||||||
|
CC_SUB=$3
|
||||||
|
IFS="$save_IFS"
|
||||||
|
AC_MSG_RESULT($CCVER)
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
[ --disable-debug compile without debugging],
|
[ --disable-debug compile without debugging],
|
||||||
debug=$enable_debug
|
debug=$enable_debug
|
||||||
|
@ -29,20 +46,6 @@ if test "x$optimize" = 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
|
||||||
set $CC
|
|
||||||
shift
|
|
||||||
args="$*"
|
|
||||||
AC_MSG_CHECKING(for gcc version)
|
|
||||||
CCVER="gcc `$CC --version | grep '[[0-9]]\.[[0-9]]' | sed -e 's/.*(GCC)//' -e 's/[[^0-9]]*\([[0-9.]]*\).*/\1/'`"
|
|
||||||
set $CCVER
|
|
||||||
save_IFS="$IFS"
|
|
||||||
IFS="."
|
|
||||||
set $2
|
|
||||||
CC_MAJ=$1
|
|
||||||
CC_MIN=$2
|
|
||||||
CC_SUB=$3
|
|
||||||
IFS="$save_IFS"
|
|
||||||
AC_MSG_RESULT($CCVER)
|
|
||||||
saved_cflags="$CFLAGS"
|
saved_cflags="$CFLAGS"
|
||||||
CFLAGS=""
|
CFLAGS=""
|
||||||
QF_CC_OPTION(-frename-registers)
|
QF_CC_OPTION(-frename-registers)
|
||||||
|
|
10
configure.ac
10
configure.ac
|
@ -4,7 +4,14 @@ AC_PREREQ(2.67)
|
||||||
dnl This is the only place where the package name and version appear
|
dnl This is the only place where the package name and version appear
|
||||||
AC_INIT([QuakeForge], [git-master])
|
AC_INIT([QuakeForge], [git-master])
|
||||||
AM_INIT_AUTOMAKE([foreign])
|
AM_INIT_AUTOMAKE([foreign])
|
||||||
|
|
||||||
|
dnl LT_INIT messes with CFLAGS (evil bastard)
|
||||||
|
if test "x${CFLAGS-unset}" = xunset; then
|
||||||
|
CFLAGS=""
|
||||||
|
fi
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
LT_INIT([win32-dll])
|
LT_INIT([win32-dll])
|
||||||
|
CFLAGS="$saved_CFLAGS"
|
||||||
|
|
||||||
AC_REVISION([$Revision$]) dnl
|
AC_REVISION([$Revision$]) dnl
|
||||||
|
|
||||||
|
@ -17,9 +24,6 @@ m4_include(config.d/versions.m4)
|
||||||
|
|
||||||
AC_LANG_C
|
AC_LANG_C
|
||||||
|
|
||||||
if test "x${CFLAGS-unset}" = xunset; then
|
|
||||||
CFLAGS=""
|
|
||||||
fi
|
|
||||||
if test "$x{AR-unset}" = xunset; then
|
if test "$x{AR-unset}" = xunset; then
|
||||||
AR="ar"
|
AR="ar"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue