try three. this should work

This commit is contained in:
Bill Currie 2001-09-24 03:23:44 +00:00
parent 998855402c
commit 2447983464
1 changed files with 12 additions and 7 deletions

View File

@ -72,26 +72,31 @@ AC_TRY_COMPILE(
AC_ARG_WITH(qf, AC_ARG_WITH(qf,
[ --with-qf=DIR location of QF libs and headers (prefix)], [ --with-qf=DIR location of QF libs and headers (prefix)],
if test "x$withval" != xyes ; then if test "x$withval" != xyes ; then
LIBS="$LIBS -L${withval}/lib" LDFLAGS="$LDFLAGS -L${withval}/lib"
INCLUDES="$INCLUDES -I${withval}/include" CFLAGS="$CFLAGS -I${withval}/include"
fi fi
, ,
HAVE_QF=auto HAVE_QF=auto
) )
save_CFLAGS="$CFLAGS" AC_MSG_CHECKING(for QF/qtypes.h)
CFLAGS="$CFLAGS $INCLUDES" AC_TRY_COMPILE(
AC_CHECK_HEADER(QF/qtypes.h, :, HAVE_QF=no) [#include "QF/qtypes.h"],
[qboolean foo = false;
foo = true;],
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
HAVE_QF=no
)
if test "x$HAVE_QF" != xno; then if test "x$HAVE_QF" != xno; then
AC_CHECK_LIB(QFutil, Hash_NewTable, AC_CHECK_LIB(QFutil, Hash_NewTable,
:, HAVE_QF=no, :, HAVE_QF=no,
[] []
) )
fi fi
CFLAGS="$save_CFLAGS"
if test "x$HAVE_QF" != xno; then if test "x$HAVE_QF" != xno; then
AC_CHECK_LIB(QFgamecode, PR_Opcode, AC_CHECK_LIB(QFgamecode, PR_Opcode,
:, HAVE_QF=no, :, HAVE_QF=no,
[$LIBS -lQFutil] [-lQFutil]
) )
fi fi