# Liquid War is a multiplayer wargame # Copyright (C) 1998-2007 Christian Mauduit # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Liquid War homepage : http://www.ufoot.org/liquidwar/v5 # Contact author : ufoot@ufoot.org dnl Process this file with autoconf to produce a configure script. AC_INIT() AC_PROG_CC AC_CANONICAL_HOST AC_CANONICAL_TARGET dnl Now we check if we need to use ou own snprintf function AC_CHECK_FUNC(snprintf,[SNPRINTF=yes],[SNPRINTF=no]) AC_SUBST(SNPRINTF) dnl Checking for allegro-config, the very-needed Allegro file AC_CHECK_PROG(ALLEGRO_CONFIG,allegro-config,yes,no) if test $ALLEGRO_CONFIG != "yes"; then AC_MSG_ERROR(Unable to find allegro-config - this tool is normally installed by Allegro and must be placed in a directory which is in your PATH. Allegro is a game programming library required by Liquid War. It is available on http://www.talula.demon.co.uk/allegro/. You need to install the complete Allegro developpement package to build Liquid War.) fi; dnl Various checks for Allegro echo -n "checking for Allegro... " ALCFLAGS=`allegro-config --cflags 2>/dev/null` ALLIBS=`allegro-config --libs 2>/dev/null` ALVERSION=`allegro-config --version 2>/dev/null` ALDVERSION=`echo ALVERSION | awk 'BEGIN { FS = "."; } { printf "%d",($1 * 1000 + $2) * 1000 + $3;}'` AC_SUBST(ALCFLAGS) AC_SUBST(ALLIBS) dnl dnl main check dnl if test -z "$ALVERSION" ; then AC_MSG_ERROR(Allegro does not seem to be correctly installed - please reinstall it and keep in mind that you need the complete Allegro developpement package.) fi dnl dnl version check dnl if test $ALDVERSION -gt 4002000 ; then AC_MSG_ERROR(An old version of Allegro ($ALVERSION) has been detected - please upgrade to 4.2.0 or better.) else echo "found $ALVERSION". fi dnl disabled this. assume allegro-config doesn't lie and all files are dnl available #AC_CHECK_HEADER(allegro.h,,[AC_MSG_ERROR(Missing some include file. Please reinstall Allegro.)]) dnl disabled this. assume allegro-config doesn't lie and all files are dnl available #AC_CHECK_LIB(alleg,main,,[AC_MSG_ERROR(Compilation probe failed. Please check your Allegro installation.)]) dnl very often, dat (the datafile compiler) is not installed, dnl and we _really_ need it... AC_CHECK_PROG(ALLEGRO_DAT,dat,yes,no) if test $ALLEGRO_DAT != "yes"; then AC_MSG_ERROR(Couldn't find the allegro datafile compiler - please install the complete Allegro package with all its developper tools. The end-user package is not enough to compile Liquid War.) fi; dnl Uncomment this if you want to shock your users #cat <