fix Hikaru's broken build (older gcc)

This commit is contained in:
Bill Currie 2007-03-24 11:11:42 +00:00 committed by Jeff Teunissen
parent 984d42df3b
commit 605d7bde6a
2 changed files with 13 additions and 4 deletions

View file

@ -1262,7 +1262,7 @@ else
fi
])
AC_DEFUN([QF_CC_OPTION], [
AC_DEFUN([QF_CC_OPTION_TEST], [
AC_MSG_CHECKING(whether $1 works)
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
@ -1276,6 +1276,14 @@ AC_TRY_COMPILE(
)
CFLAGS="$save_CFLAGS"
if test "x$qf_opt_ok" = xyes; then
CFLAGS="$CFLAGS $1"
true
$2
else
true
$3
fi
])
AC_DEFUN([QF_CC_OPTION], [
QF_CC_OPTION_TEST([$1], [CFLAGS="$CFLAGS $1"])
])

View file

@ -1628,6 +1628,7 @@ if test "x$check_pipe" = xyes; then
QF_CC_OPTION(-pipe)
fi
QF_CC_OPTION(-Wsign-compare)
QF_CC_OPTION_TEST([-fvisibility=hidden], [VISIBILITY=-fvisibility=hidden])
dnl QuakeForge uses lots of BCPL-style (//) comments, which can cause problems
dnl with many compilers that don't support the latest ISO standards. Well,
@ -2098,8 +2099,8 @@ if test "x$enable_shared" = xno; then
PREFER_PIC=
PREFER_NON_PIC=
else
PREFER_PIC="-prefer-pic -fvisibility=hidden"
PREFER_NON_PIC="-prefer-non-pic -fvisibility=hidden"
PREFER_PIC="-prefer-pic $(VISIBILITY)"
PREFER_NON_PIC="-prefer-non-pic $(VISIBILITY)"
fi
if test "x$enable_static" = xno; then
STATIC=