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 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_HEADERS=$withval, QF_HEADERS=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_HEADERS" = xauto; then qf_dir=`cd ${srcdir}/../..; pwd` if test -r ${qf_dir}/include/QF/qtypes.h; then QF_HEADERS="-I ${qf_dir}/include" else QF_HEADERS='' fi else QF_HEADERS="-I ${QF_HEADERS}" fi AC_MSG_RESULT($QF_HEADERS) AC_MSG_CHECKING(for QF libs location) 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" else QF_LIBS='' fi else QF_LIBS="-L ${QF_LIBS}" fi AC_MSG_RESULT($QF_LIBS) AC_OUTPUT( include/Makefile source/Makefile Makefile qfcc.lsm )