# Copyright ©2005 Hugo Mills # # This software is distributed under the terms of the GNU GPL v3 # For more information on the GPL, see the file COPYING or # visit http://www.gnu.org/ # # This software is distributed without warranty dnl Process this file with autoconf to produce a configure script. AC_INIT(magellan.cc) AC_CANONICAL_SYSTEM AC_CONFIG_HEADERS([config.h]) PACKAGE=magellan VERSION=0.4.0-rc1 AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$VERSION", Package version) dnl Checks for programs. #AC_PREREQ AC_PROG_AWK AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S # Tools for building a distribution tarball AC_CHECK_PROG(TAR, [tar], "tar", "") if test -z $TAR then AC_MSG_ERROR([tar is not installed]) fi AC_CHECK_PROGS(COMPRESS, [gzip bzip2 compress], "") if test -z $COMPRESS then AC_MSG_ERROR([No compression tool found]) else case $COMPRESS in gzip) COMPRESS_EXT=".gz" ;; bzip2) COMPRESS_EXT=".bz2" ;; compress) COMPRESS_EXT=".Z" ;; esac fi AC_SUBST(COMPRESS_EXT) AC_LANG_CPLUSPLUS AC_C_INLINE AC_LANG([C++]) dnl Checks for libraries. dnl Should check for whether this move is sensible (or needed) CXXFLAGS="${CXXFLAGS} -D_GNU_SOURCE -D_REENTRANT" dnl AC_CHECK_LIB([netpbm], [pm_allocarray], [LIBS="${LIBS} -lnetpbm]") dnl Check for paintlib PAINTLIB_LIBS="" PAINTLIB_FLAGS="" AC_CHECK_LIB([paintlib], [paintlib_version], [ PAINTLIB_LIBS="$(paintlib-config --libs)" PAINTLIB_FLAGS="$(paintlib-config --cflags)" AC_DEFINE([HAVE_PAINTLIB], [1], [Define this to use paintlib]) ]) AC_SUBST(PAINTLIB_LIBS) AC_SUBST(PAINTLIB_FLAGS) dnl Check for libjpeg LIBJPEG_LIBS="" LIBJPEG_FLAGS="" AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], [ LIBJPEG_LIBS="-ljpeg" LIBJPEG_FLAGS="" AC_DEFINE([HAVE_LIBJPEG], [1], [Define this to use libjpeg]) ]) AC_SUBST(LIBJPEG_LIBS) AC_SUBST(LIBJPEG_FLAGS) dnl Check for Boost thread/concurrent library AX_BOOST_BASE AX_BOOST_THREAD AC_SUBST(BOOST_CPPFLAGS) dnl CXXFLAGS="${CXXFLAGS} ${BOOST_CPPFLAGS}" dnl X AC_PATH_XTRA CXXFLAGS="${CXXFLAGS} ${X_CFLAGS}" LIBS="${LIBS} ${X_LIBS} -lX11" if [ "$X_DISPLAY_MISSING" = "" ]; then LIBS="${LIBS} -lX11" fi dnl Checks for header files. AC_HEADER_STDC AC_HEADER_STDBOOL dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Build options AC_ARG_WITH(maptools, [ --with-maptools Build the map-processing tools], [MAPTOOLS=maptools], [MAPTOOLS=]) AC_SUBST(MAPTOOLS) dnl Checks for library functions. AC_CHECK_FUNCS([sqrt]) AC_OUTPUT(stamp-h \ Makefile \ plugins/Makefile.mk \ plugins/content_outline/Makefile.mk \ maptools/Makefile.mk )