mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-06 05:01:26 +00:00
1d9791553f
due to modularity problems in libQFutil
97 lines
2 KiB
Text
97 lines
2 KiB
Text
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ(2.13)
|
|
AC_INIT(source/qfcc.c)
|
|
AC_REVISION($Revision$) dnl
|
|
AM_CONFIG_HEADER(include/config.h)
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
dnl Every other copy of the package version number gets its value from here
|
|
AM_INIT_AUTOMAKE(qfcc, 0.1.0)
|
|
|
|
AC_SUBST(VERSION)
|
|
|
|
ISODATE=$(date +%Y-%m-%d)
|
|
AC_SUBST(ISODATE)
|
|
|
|
AC_LANG_C
|
|
|
|
dnl Checks for programs.
|
|
AC_PROG_INSTALL
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
|
|
set $CC
|
|
if test "$1" = gcc; then
|
|
shift
|
|
args="$*"
|
|
AC_MSG_CHECKING(for broken gcc)
|
|
if test $(gcc --version) = 2.96; then
|
|
AC_MSG_RESULT(yes. You poor sod, hope you have egcs)
|
|
CC="egcs $args"
|
|
set $CPP
|
|
shift
|
|
CPP="egcs $*"
|
|
else
|
|
AC_MSG_RESULT(no. good.)
|
|
fi
|
|
fi
|
|
|
|
dnl We want warnings, lots of warnings...
|
|
if test "x$GCC" = xyes; then
|
|
CFLAGS="$CFLAGS -Wall -Werror"
|
|
# CFLAGS="$CFLAGS -Wall -pedantic"
|
|
fi
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
dnl Checks for header files.
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(unistd.h)
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
dnl Checks for library functions.
|
|
|
|
|
|
AC_ARG_ENABLE(zlib,
|
|
[ --disable-zlib disable zlib support],
|
|
)
|
|
|
|
Z_LIBS=
|
|
if test "x$enable_zlib" != "xno"; then
|
|
dnl Check for working -lz
|
|
dnl Note - must have gztell *and* gzgets in -lz *and* zlib.h
|
|
AC_CHECK_LIB(z, gztell, HAVE_ZLIB=yes, HAVE_ZLIB=no, [$LIBS])
|
|
if test "x$HAVE_ZLIB" = "xyes"; then
|
|
AC_CHECK_LIB(z, gzgets, HAVE_ZLIB=yes, HAVE_ZLIB=no, [$LIBS])
|
|
if test "x$HAVE_ZLIB" = "xyes"; then
|
|
AC_CHECK_HEADER(zlib.h, HAVE_ZLIB=yes, HAVE_ZLIB=no)
|
|
if test "x$HAVE_ZLIB" = "xyes"; then
|
|
Z_LIBS="-lz"
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
AC_CHECK_HEADER(QF/qtypes.h, HAVE_QF=yes, HAVE_QF=no)
|
|
if test "$HAVE_QF" = yes; then
|
|
AC_CHECK_LIB(QFutil, Qopen,
|
|
HAVE_QF=yes, HAVE_QF=no,
|
|
[$Z_LIBS]
|
|
)
|
|
fi
|
|
if test "$HAVE_QF" != yes; then
|
|
echo '***'
|
|
echo '*** You seem to not have the QuakeForge libs & headers installed'
|
|
echo '***'
|
|
exit 1
|
|
fi
|
|
|
|
AC_OUTPUT(
|
|
include/Makefile
|
|
source/Makefile
|
|
Makefile
|
|
qfcc.lsm
|
|
)
|