mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
make gcc 2.95 friendly (OpenBSD seems to still use it)
This commit is contained in:
parent
7ead5a91f8
commit
ce3accd4f1
2 changed files with 26 additions and 17 deletions
18
acinclude.m4
18
acinclude.m4
|
@ -1155,3 +1155,21 @@ else
|
|||
done
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(QF_CC_OPTION, [
|
||||
AC_MSG_CHECKING(whether $1 works)
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
qf_opt_ok=no
|
||||
AC_TRY_COMPILE(
|
||||
[],
|
||||
[],
|
||||
qf_opt_ok=yes
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test "x$qf_opt_ok" = xyes; then
|
||||
CFLAGS="$CFLAGS $1"
|
||||
fi
|
||||
])
|
||||
|
|
25
configure.ac
25
configure.ac
|
@ -1312,7 +1312,12 @@ if test "x$optimize" = xyes; then
|
|||
CC_SUB=$3
|
||||
IFS=" "
|
||||
AC_MSG_RESULT($CCVER)
|
||||
heavy="-O2 -frename-registers -finline-limit=32000 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
|
||||
saved_cflags="$CFLAGS"
|
||||
CFLAGS=""
|
||||
QF_CC_OPTION(-frename-registers)
|
||||
QF_CC_OPTION(-finline-limit=32000 -Winline)
|
||||
heavy="-O2 $CFLAGS -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
|
||||
CFLAGS="$saved_cflags"
|
||||
light="-O2"
|
||||
AC_ARG_ENABLE(strict-aliasing,
|
||||
[ --enable-strict-aliasing enable the -fstrict-aliasing ooption of gcc])
|
||||
|
@ -1423,21 +1428,7 @@ if test "x$GCC" = xyes; then
|
|||
)
|
||||
fi
|
||||
if test "x$check_pipe" = xyes; then
|
||||
AC_MSG_CHECKING(whether -pipe works)
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -pipe"
|
||||
pipe_ok=no
|
||||
AC_TRY_COMPILE(
|
||||
[],
|
||||
[],
|
||||
pipe_ok=yes
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test "x$pipe_ok" = xyes; then
|
||||
CFLAGS="$CFLAGS -pipe"
|
||||
fi
|
||||
QF_CC_OPTION(-pipe)
|
||||
fi
|
||||
|
||||
dnl QuakeForge uses lots of BCPL-style (//) comments, which can cause problems
|
||||
|
@ -1472,7 +1463,7 @@ AC_ARG_ENABLE(Werror,
|
|||
dnl We want warnings, lots of warnings...
|
||||
if test "x$GCC" = "xyes"; then
|
||||
if test "x$enable_Werror" $cvs_def_enabled; then
|
||||
CFLAGS="$CFLAGS -Wall -Werror -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline"
|
||||
CFLAGS="$CFLAGS -Wall -Werror -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
|
||||
else
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue