1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
dnl Process this file with autoconf to produce a configure script.
dnl Are we in the right directory? Check for the existence of xplanet.cc.
AC_INIT(xplanet.cc)
AC_CONFIG_AUX_DIR(./autoconf)
AC_PATH_PROG(CP, cp, cp)
AC_PATH_PROG(GZIP, gzip, gzip)
AC_PROG_INSTALL
AC_PATH_PROG(RM, rm, rm)
AC_PATH_PROG(STRIP, strip, strip)
AC_PATH_PROG(TAR, tar, tar)
AC_PATH_PROG(WISH, wish, wish)
version="0.43"
AC_SUBST(version)
dnl Checks for compilers.
AC_PROG_CC
AC_PROG_CXX
dnl Locate X include files and libraries
AC_PATH_XTRA
dnl Check for strptime function
AC_CONFIG_HEADER(checkfuncs.h)
AC_CHECK_FUNC(strptime, AC_DEFINE(HAVE_STRPTIME))
AC_CHECK_HEADERS(string.h strings.h)
dnl Check for getopt_long
dnl AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
if test "x$GXX" = "xyes"; then
OTHER_CXXFLAGS="-Wall -O3"
fi
AC_SUBST(OTHER_CXXFLAGS)
AC_ARG_WITH(auxdir, [ --with-auxdir=DIR subdirectory under PREFIX containing map and marker
files [share/xplanet]], auxdir="$withval", auxdir="share/xplanet")
AC_SUBST(auxdir)
AC_ARG_WITH(map-extension, [ --with-map-extension=EXTENSION
use EXTENSION as default map extension [ppm]], mapext="$withval", mapext="ppm")
AC_SUBST(mapext)
AC_ARG_WITH(markerfile, [ --with-markerfile=FILE use (planet-name)-FILE as default marker file
[-markers.txt]], markerfile="$withval", markerfile="-markers.txt")
AC_SUBST(markerfile)
# Macros to check for OpenGL/Mesa are adapted from xscreensaver-3.14
AM_FIND_GL
# Macros to check for Imlib from James Baughman
AM_PATH_IMLIB(1.8.0, , [
echo "ERROR: xplanet needs a system with Imlib 1.8.2 or higher"
echo "You can obtain it from:"
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
echo "ftp://www.rasterman.com/pub/enlightenment/"
echo "ftp://ftp.labs.redhat.com/pub/imlib/"
AC_MSG_ERROR([Fatal Error: no Imlib detected.])])
AC_OUTPUT(Makefile auxfiles.h tkxplanet)
echo "
xplanet $version is now hopefully configured!
"
|