mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
cb5c262ffc
remove includes of qdefs.h and compat.h pr_comp.h: merge pr_comp.h from quake and qfcc, removing the copy in qfcc cmdlib.[ch]: nuke the endian code. qendian.c: initialise the LittleLong etc pointers at compile time rather than run time com.c (both nq and qw): nuke the LittleLong etc init code everything else: fix up after the qtypes.h cleanup
101 lines
2 KiB
Text
101 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_WITH(qf-headers,
|
|
[ --with-qf-headers=DIR use the QuakeForge headers found in DRI],
|
|
QF_INCL=$withval, QF_INCL=auto)
|
|
AC_ARG_WITH(qf-libs,
|
|
[ --with-qf-libs=DIR use the QuakeForge libs found in DRI],
|
|
QF_LIBS=$withval, QF_LIBS=auto)
|
|
|
|
AC_MSG_CHECKING(for QF headers location)
|
|
if test "x$QF_INCL" = xauto; then
|
|
qf_dir=`cd ${srcdir}/../..; pwd`
|
|
if test -r ${qf_dir}/include/QF/qtypes.h; then
|
|
QF_INCL="-I${qf_dir}/include"
|
|
else
|
|
QF_INCL=''
|
|
fi
|
|
else
|
|
QF_INCL="-I${QF_INCL}"
|
|
fi
|
|
AC_MSG_RESULT($QF_INCL)
|
|
AC_SUBST(QF_INCL)
|
|
|
|
AC_MSG_CHECKING(for QF libs location)
|
|
QF_DEPS=""
|
|
if test "x$QF_LIBS" = xauto; then
|
|
qf_dir=`cd ${srcdir}/../..; pwd`
|
|
if test -r ${qf_dir}/libs/util/qfplist.c; then
|
|
QF_LIBS="-L ${qf_dir}/libs/util"
|
|
QF_DEPS="${qf_dir}/libs/libqfutil.a"
|
|
else
|
|
QF_LIBS=''
|
|
fi
|
|
else
|
|
QF_LIBS="-L ${QF_LIBS}"
|
|
fi
|
|
AC_MSG_RESULT($QF_LIBS)
|
|
QF_LIBS="${QF_LIBS} -lqfutil"
|
|
AC_SUBST(QF_LIBS)
|
|
AC_SUBST(QF_DEPS)
|
|
|
|
AC_OUTPUT(
|
|
include/Makefile
|
|
source/Makefile
|
|
Makefile
|
|
qfcc.lsm
|
|
)
|