2000-02-09 19:51:45 +00:00
|
|
|
dnl Process this file with aclocal ; automake -a ; autoconf to produce a
|
|
|
|
dnl working configure script.
|
|
|
|
|
2002-08-27 21:52:50 +00:00
|
|
|
AC_INIT
|
|
|
|
AC_CONFIG_SRCDIR([src/Lib/DEM/dem.cxx])
|
|
|
|
|
2002-08-28 14:13:51 +00:00
|
|
|
# Require at least automake 2.52
|
2007-11-08 21:14:02 +00:00
|
|
|
AC_PREREQ(2.59)
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
dnl Initialize the automake stuff
|
2007-11-22 16:44:12 +00:00
|
|
|
AM_INIT_AUTOMAKE(TerraGear, 0.9.8-wcsp)
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
2003-01-07 22:46:51 +00:00
|
|
|
# specify the simgear location
|
|
|
|
AC_ARG_WITH(simgear, [ --with-simgear=PREFIX Specify the prefix path to simgear])
|
|
|
|
|
|
|
|
if test "x$with_simgear" != "x" ; then
|
|
|
|
echo "SimGear prefix path is $with_simgear"
|
|
|
|
EXTRA_DIRS="${EXTRA_DIRS} $with_simgear"
|
|
|
|
fi
|
|
|
|
|
2009-03-20 14:10:26 +00:00
|
|
|
# specify the plib location
|
|
|
|
AC_ARG_WITH(plib, [ --with-plib=PREFIX Specify the prefix path to plib])
|
|
|
|
|
|
|
|
if test "x$with_plib" != "x" ; then
|
|
|
|
echo "plib prefix is $with_plib"
|
|
|
|
EXTRA_DIRS="${EXTRA_DIRS} $with_plib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# specify the osg location
|
|
|
|
AC_ARG_WITH(osg, [ --with-osg=PREFIX Specify the prefix path to osg])
|
|
|
|
|
|
|
|
if test "x$with_osg" != "x" ; then
|
|
|
|
echo "osg prefix is $with_osg"
|
|
|
|
EXTRA_DIRS="${EXTRA_DIRS} $with_osg"
|
|
|
|
fi
|
|
|
|
|
2003-01-07 22:46:51 +00:00
|
|
|
dnl set the $host variable based on local machine/os
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
case "${host}" in
|
|
|
|
*-*-irix*)
|
2003-08-24 19:38:58 +00:00
|
|
|
AC_DEFINE([_SOCKLEN_T], 1, [Prevent a nasty bug in IRIX 6.5.17])
|
2001-07-31 20:14:54 +00:00
|
|
|
if test "$CXX" = "CC"; then
|
|
|
|
AR="CC -ar"
|
2003-01-07 22:46:51 +00:00
|
|
|
ARFLAGS="-o"
|
|
|
|
CXXFLAGS="$CXXFLAGS -I$with_simgear/include/simgear/compatibility"
|
|
|
|
else
|
|
|
|
AR="ar"
|
|
|
|
ARFLAGS="cru"
|
2001-07-31 20:14:54 +00:00
|
|
|
fi
|
2003-01-07 22:46:51 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AR="ar"
|
|
|
|
ARFLAGS="cru"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(AR)
|
|
|
|
AC_SUBST(ARFLAGS)
|
2001-07-31 20:14:54 +00:00
|
|
|
|
2000-02-09 19:51:45 +00:00
|
|
|
dnl Specify if we want logging (testing build) or not (release build)
|
|
|
|
# set logging default value
|
|
|
|
# with_logging=yes
|
|
|
|
AC_ARG_WITH(logging, [ --with-logging Include logging output (default)])
|
|
|
|
if test "x$with_logging" = "xno" ; then
|
2002-08-27 21:52:50 +00:00
|
|
|
AC_DEFINE([FG_NDEBUG], 1, [Define for no logging output])
|
2000-02-09 19:51:45 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
dnl Let the Win32 user specify if they want to build with the SGI
|
|
|
|
dnl opengl.dll as opposed to the more standard openg32.dll
|
|
|
|
AC_ARG_WITH(sgi-opengl, [ --with-sgi-opengl Build against SGI's opengl.dll glu.dll and glut.dll])
|
|
|
|
|
2007-11-09 11:54:15 +00:00
|
|
|
# specify gdal support
|
|
|
|
AC_DEFINE([HAVE_OGR],[],[Use OGR])
|
|
|
|
|
|
|
|
AC_ARG_WITH(gdal,
|
2007-11-09 15:32:44 +00:00
|
|
|
AC_HELP_STRING([--with-gdal[=path/gdal-config]],
|
|
|
|
[enable GDAL/OGR support (gdal-config with path,
|
|
|
|
e.g. '--with-gdal=/usr/local/bin/gdal-config',
|
|
|
|
default: enabled if gdal-config is in PATH)]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(ogrdecode,
|
|
|
|
AC_HELP_STRING([--disable-ogrdecode],
|
|
|
|
[enable ogrdecode tool (default depending on OGR availability)]))
|
|
|
|
|
2007-12-20 17:59:21 +00:00
|
|
|
AC_ARG_ENABLE(poly2ogr,
|
|
|
|
AC_HELP_STRING([--disable-poly2ogr],
|
|
|
|
[enable poly2ogr tool (default depending on OGR availability)]))
|
|
|
|
|
2007-11-09 15:32:44 +00:00
|
|
|
if test "$with_gdal" != "no" ; then
|
|
|
|
if test "`basename xx/$with_gdal`" = "gdal-config" ; then
|
|
|
|
# gdal-config was specified
|
|
|
|
GDAL_CONFIG="$with_gdal"
|
|
|
|
with_gdal="yes"
|
|
|
|
else
|
|
|
|
# gdal-config was not specified, but GDAL/OGR wasn't disabled
|
|
|
|
AC_PATH_PROG(GDAL_CONFIG, gdal-config, no)
|
|
|
|
if test "$GDAL_CONFIG" = "no" ; then
|
|
|
|
with_gdal="no"
|
|
|
|
fi
|
2007-11-09 11:54:15 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
GDAL_LIBS=
|
|
|
|
GDAL_CFLAGS=
|
|
|
|
USE_GDAL=
|
|
|
|
USE_OGR=
|
2007-11-09 15:32:44 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([for GDAL...])
|
|
|
|
if test -x "$GDAL_CONFIG"; then
|
|
|
|
AC_MSG_RESULT(yes)
|
2007-11-09 11:54:15 +00:00
|
|
|
GDAL_LIBS=`"$GDAL_CONFIG" --libs`
|
|
|
|
GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
|
|
|
|
GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
|
2007-11-09 15:32:44 +00:00
|
|
|
have_gdal=yes
|
|
|
|
AC_MSG_CHECKING([for OGR...])
|
2007-11-09 11:54:15 +00:00
|
|
|
if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
|
2007-11-09 15:32:44 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
have_ogr=yes
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2007-11-09 11:54:15 +00:00
|
|
|
fi
|
2007-11-09 15:32:44 +00:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2007-11-09 11:54:15 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
|
|
|
|
|
|
|
|
AC_SUBST(GDAL_LIBS)
|
|
|
|
AC_SUBST(GDAL_CFLAGS)
|
|
|
|
fi
|
2000-02-09 19:51:45 +00:00
|
|
|
|
2007-11-09 16:10:44 +00:00
|
|
|
if test x$have_ogr != xyes -a x$enable_ogrdecode = xyes; then
|
|
|
|
AC_MSG_ERROR([ogrdecode was forcefully enabled but OGR was not found.
|
|
|
|
Please make sure that you have GDAL installed with OGR enabled
|
|
|
|
and gdal-config in your PATH resp. the path to gdal-config provided
|
|
|
|
using --with-gdal.])
|
|
|
|
fi
|
|
|
|
|
2007-12-20 17:59:21 +00:00
|
|
|
if test x$have_ogr != xyes -a x$enable_poly2ogr = xyes; then
|
|
|
|
AC_MSG_ERROR([poly2ogr was forcefully enabled but OGR was not found.
|
|
|
|
Please make sure that you have GDAL installed with OGR enabled
|
|
|
|
and gdal-config in your PATH resp. the path to gdal-config provided
|
|
|
|
using --with-gdal.])
|
|
|
|
fi
|
|
|
|
|
2007-11-09 15:32:44 +00:00
|
|
|
AM_CONDITIONAL(WANT_OGRDECODE, test x$have_ogr = xyes -a x$enable_ogrdecode != xno)
|
2007-12-20 17:59:21 +00:00
|
|
|
AM_CONDITIONAL(WANT_POLY2OGR, test x$have_ogr = xyes -a x$enable_poly2ogr != xno)
|
2007-11-09 15:32:44 +00:00
|
|
|
|
2000-02-09 19:51:45 +00:00
|
|
|
dnl Check for MS Windows environment
|
|
|
|
AC_CHECK_HEADER(windows.h)
|
|
|
|
|
|
|
|
dnl extra library and include directories
|
2009-03-20 14:10:26 +00:00
|
|
|
# EXTRA_DIRS="/usr/local/plib /usr/X11R6"
|
|
|
|
EXTRA_DIRS="$EXTRA_DIRS /usr/X11R6"
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
if test -d /opt/X11R6 ; then
|
|
|
|
EXTRA_DIRS="$EXTRA_DIRS /opt/X11R6"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$ac_cv_header_windows_h" = "xyes" ; then
|
|
|
|
EXTRA_DIRS="${EXTRA_DIRS} `pwd`/Win32"
|
|
|
|
fi
|
|
|
|
wi_EXTRA_DIRS(no, ${EXTRA_DIRS})
|
|
|
|
|
|
|
|
dnl Using AM_CONDITIONAL is a step out of the protected little
|
|
|
|
dnl automake fold so it is potentially dangerous. But, we are
|
|
|
|
dnl beginning to run into cases where the standard checks are not
|
|
|
|
dnl enough. AM_CONDITIONALS are then referenced to conditionally
|
|
|
|
dnl build a Makefile.in from a Makefile.am which lets us define custom
|
|
|
|
dnl includes, compile alternative source files, etc.
|
|
|
|
|
|
|
|
dnl Check for X11 (fancy)
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
null_LIBS="$LIBS"
|
2003-08-29 18:32:28 +00:00
|
|
|
LIBS=""
|
|
|
|
|
|
|
|
dnl search for network related libraries
|
|
|
|
AC_SEARCH_LIBS(inet_addr, xnet)
|
|
|
|
AC_SEARCH_LIBS(socket, socket)
|
|
|
|
AC_SEARCH_LIBS(main, nsl)
|
2000-02-09 19:51:45 +00:00
|
|
|
|
2003-08-29 18:32:28 +00:00
|
|
|
network_LIBS="$LIBS"
|
|
|
|
LIBS=""
|
2000-02-09 19:51:45 +00:00
|
|
|
|
2003-08-29 18:32:28 +00:00
|
|
|
dnl check for some default libraries
|
|
|
|
AC_SEARCH_LIBS(cos, m)
|
2009-06-05 16:27:10 +00:00
|
|
|
AC_SEARCH_LIBS(clock_gettime, rt)
|
2000-02-09 19:51:45 +00:00
|
|
|
|
2003-08-29 18:32:28 +00:00
|
|
|
base_LIBS="$LIBS"
|
|
|
|
|
|
|
|
AC_SEARCH_LIBS(XCreateWindow, X11)
|
|
|
|
AC_SEARCH_LIBS(XShmCreateImage, Xext)
|
|
|
|
AC_SEARCH_LIBS(XGetExtensionVersion, Xi)
|
|
|
|
AC_SEARCH_LIBS(IceOpenConnection, ICE)
|
|
|
|
AC_SEARCH_LIBS(SmcOpenConnection, SM)
|
|
|
|
AC_SEARCH_LIBS(XtMalloc, Xt)
|
|
|
|
AC_SEARCH_LIBS(XmuLookupStandardColormap, Xmu)
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
dnl check for OpenGL related libraries
|
|
|
|
|
|
|
|
if test "x$ac_cv_header_windows_h" != "xyes" ; then
|
|
|
|
dnl Reasonable stuff for non-windoze variants ... :-)
|
|
|
|
|
2003-08-29 18:32:28 +00:00
|
|
|
AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
|
|
|
|
if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
|
|
|
|
dnl if GLcore found, then also check for GL
|
|
|
|
AC_SEARCH_LIBS(glXCreateContext, GL)
|
2000-02-09 19:51:45 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl if using mesa, check for xmesa.h
|
|
|
|
if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then
|
|
|
|
AC_CHECK_HEADER(GL/xmesa.h)
|
|
|
|
if test "x$ac_cv_header_GL_xmesa_h" = "xyes"; then
|
2002-08-27 21:52:50 +00:00
|
|
|
AC_DEFINE([XMESA], 1, [Define for Mesa FX mode])
|
|
|
|
AC_DEFINE([FX], 1, [Define for Mesa FX mode])
|
2000-02-09 19:51:45 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2003-08-29 18:32:28 +00:00
|
|
|
AC_SEARCH_LIBS(gluLookAt, [ GLU MesaGLU ])
|
|
|
|
AC_SEARCH_LIBS(glutGetModifiers, [ glut freeglut ])
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
dnl Win32 is a little wierd because it has to try to handle the various
|
|
|
|
dnl winbloze-isms. We'll just do this manually for now.
|
|
|
|
|
|
|
|
echo Win32 specific hacks...
|
2002-08-27 21:52:50 +00:00
|
|
|
AC_DEFINE([WIN32], 1, [Define if building on a Win32 platform])
|
2003-08-25 19:12:20 +00:00
|
|
|
AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
dnl just define these to true and hope for the best
|
|
|
|
ac_cv_lib_glut_glutGetModifiers="yes"
|
|
|
|
ac_cv_lib_glut_glutGameModeString="yes"
|
|
|
|
|
|
|
|
if test "x$with_sgi_opengl" = "xyes" ; then
|
|
|
|
echo "Building with glut.dll, glu.dll, and opengl.dll"
|
|
|
|
WIN32_GLUT=glut
|
|
|
|
WIN32_GLU=glu
|
|
|
|
WIN32_OPENGL=opengl
|
|
|
|
else
|
|
|
|
echo "Building with glut32.dll, glu32.dll, and opengl32.dll"
|
|
|
|
WIN32_GLUT=glut32
|
|
|
|
WIN32_GLU=glu32
|
|
|
|
WIN32_OPENGL=opengl32
|
|
|
|
fi
|
|
|
|
|
|
|
|
LIBS="$LIBS -l${WIN32_GLUT} -l${WIN32_GLU} -l${WIN32_OPENGL}"
|
|
|
|
LIBS="$LIBS -luser32 -lgdi32"
|
|
|
|
echo "Will link apps with $LIBS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
|
|
|
|
echo
|
|
|
|
echo "Unable to find the necessary OpenGL or GLUT libraries."
|
|
|
|
echo "See config.log for automated test details and results ..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$ac_cv_lib_glut_glutGameModeString" = "xno"; then
|
|
|
|
echo
|
|
|
|
echo "Your version of glut doesn't support game mode."
|
|
|
|
echo "You need to fetch and install the latest version of glut from:"
|
|
|
|
echo
|
|
|
|
echo " http://reality.sgi.com/opengl/glut3/glut3.html"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2009-02-23 22:33:16 +00:00
|
|
|
AC_CHECK_LIB(tiff, TIFFOpen,,,)
|
|
|
|
AM_CONDITIONAL(HAVE_LIBTIFF, test x$ac_cv_lib_tiff_TIFFOpen = xyes)
|
|
|
|
|
2005-12-22 15:36:39 +00:00
|
|
|
AC_LANG_PUSH(C++)
|
2004-07-30 20:02:20 +00:00
|
|
|
# needed for plib 1.8.x or later
|
2003-08-29 18:32:28 +00:00
|
|
|
AC_CHECK_LIB(plibul, ulInit,,,)
|
|
|
|
|
2000-02-09 19:51:45 +00:00
|
|
|
opengl_LIBS="$LIBS"
|
|
|
|
LIBS="$base_LIBS"
|
|
|
|
|
|
|
|
AC_SUBST(base_LIBS)
|
|
|
|
AC_SUBST(opengl_LIBS)
|
2003-08-29 18:32:28 +00:00
|
|
|
AC_SUBST(network_LIBS)
|
|
|
|
AC_SUBST(support_LIBS)
|
2001-01-22 16:00:15 +00:00
|
|
|
|
2000-02-09 19:51:45 +00:00
|
|
|
AM_CONDITIONAL(HAVE_XWINDOWS, test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" )
|
|
|
|
|
|
|
|
dnl Check for "plib" without which we cannot go on
|
2005-12-22 15:36:39 +00:00
|
|
|
AC_CHECK_HEADER(plib/sg.h)
|
|
|
|
if test "x$ac_cv_header_plib_sg_h" != "xyes"; then
|
2000-02-09 19:51:45 +00:00
|
|
|
echo
|
|
|
|
echo "You *must* have the plib library installed on your system to build"
|
2003-03-09 18:10:32 +00:00
|
|
|
echo "TerraGear!"
|
2000-02-09 19:51:45 +00:00
|
|
|
echo
|
|
|
|
echo "Please see README.plib for more details."
|
|
|
|
echo
|
|
|
|
echo "configure aborted."
|
|
|
|
exit
|
|
|
|
fi
|
2003-03-09 18:10:32 +00:00
|
|
|
|
2005-09-09 15:05:15 +00:00
|
|
|
dnl Check for "libnewmat" without which we cannot build airport surfaces
|
|
|
|
AC_CHECK_HEADER(newmat/newmat.h)
|
|
|
|
AM_CONDITIONAL(HAVE_NEWMAT, test "x$ac_cv_header_newmat_newmat_h" = "xyes" )
|
2002-10-08 15:28:53 +00:00
|
|
|
AC_LANG_POP
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
dnl Check if Generic Polygon Clipping library is installed
|
|
|
|
dnl (from http://www.cs.man.ac.uk/aig/staff/alan/software/)
|
|
|
|
AC_CHECK_HEADERS( gpc.h )
|
|
|
|
if test "x$ac_cv_header_gpc_h" != "xyes"; then
|
|
|
|
echo
|
|
|
|
echo "You need to have the GPC library installed on your system to"
|
|
|
|
echo "build some of the scenery generation tools, otherwise you won't"
|
|
|
|
echo "be able to create scenery."
|
|
|
|
echo
|
|
|
|
echo "Please see README.gpc for more details."
|
|
|
|
echo
|
2000-04-06 18:00:14 +00:00
|
|
|
echo "configure aborted."
|
|
|
|
exit
|
2000-02-09 19:51:45 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS( \
|
|
|
|
fcntl.h getopt.h malloc.h memory.h stdlib.h sys/param.h sys/stat.h \
|
|
|
|
sys/time.h sys/timeb.h unistd.h windows.h winbase.h values.h )
|
|
|
|
|
2000-04-06 18:44:37 +00:00
|
|
|
# Check for system installed zlib
|
|
|
|
AC_CHECK_HEADER(zlib.h)
|
2002-08-27 21:52:50 +00:00
|
|
|
if test "x$ac_cv_header_zlib_h" != "xyes"; then
|
|
|
|
echo "no zlib found, please install before continuing."
|
|
|
|
exit
|
2000-04-06 18:44:37 +00:00
|
|
|
fi
|
|
|
|
|
2000-09-20 21:43:27 +00:00
|
|
|
# Check for the presence of SimGear
|
|
|
|
AC_CHECK_HEADER(simgear/version.h)
|
|
|
|
if test "x$ac_cv_header_simgear_version_h" != "xyes"; then
|
|
|
|
echo
|
|
|
|
echo "You *must* have the SimGear support library installed on your system"
|
2003-03-09 18:10:32 +00:00
|
|
|
echo "to build TerraGear!"
|
2000-09-20 21:43:27 +00:00
|
|
|
echo
|
|
|
|
echo "Please see README.SimGear for more details."
|
|
|
|
echo
|
|
|
|
echo "configure aborted."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for proper simgear version)
|
|
|
|
|
2007-11-08 21:14:02 +00:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2002-11-11 15:20:18 +00:00
|
|
|
#include <stdio.h>
|
2000-09-20 21:43:27 +00:00
|
|
|
#include <simgear/version.h>
|
|
|
|
|
|
|
|
#if !defined(SIMGEAR_VERSION)
|
|
|
|
#error simgear version too old, please upgrade.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define STRINGIFY(X) XSTRINGIFY(X)
|
|
|
|
#define XSTRINGIFY(X) #X
|
|
|
|
|
|
|
|
#define MIN_MAJOR 0
|
2003-02-25 17:58:40 +00:00
|
|
|
#define MIN_MINOR 3
|
2005-01-11 21:11:27 +00:00
|
|
|
#define MIN_MICRO 8
|
2000-09-20 21:43:27 +00:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
int major, minor, micro;
|
|
|
|
|
|
|
|
printf("%d.%d.%d or greater... ", MIN_MAJOR, MIN_MINOR, MIN_MICRO);
|
|
|
|
|
|
|
|
sscanf( STRINGIFY(SIMGEAR_VERSION), "%d.%d.%d", &major, &minor, µ );
|
|
|
|
|
|
|
|
if ( major < MIN_MAJOR ) {
|
|
|
|
return -1;
|
|
|
|
} else if ( major == MIN_MAJOR && minor < MIN_MINOR ) {
|
|
|
|
return -1;
|
|
|
|
} else if ( major == MIN_MAJOR && minor == MIN_MINOR && micro < MIN_MICRO ){
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-11-08 21:14:02 +00:00
|
|
|
]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(wrong version);
|
|
|
|
AC_MSG_ERROR([Install latest simgear first...])],[AC_MSG_RESULT(yes)
|
|
|
|
])
|
2000-09-20 21:43:27 +00:00
|
|
|
|
2000-02-09 19:51:45 +00:00
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
2003-01-07 22:46:51 +00:00
|
|
|
dnl check for socklen_t (in Unix98)
|
|
|
|
AC_MSG_CHECKING(for socklen_t)
|
2007-11-08 21:14:02 +00:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
2003-01-07 22:46:51 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
int accept (int, struct sockaddr *, socklen_t *);
|
2007-11-08 21:14:02 +00:00
|
|
|
]], [[]])],[
|
2003-01-07 22:46:51 +00:00
|
|
|
AC_MSG_RESULT(yes)],[
|
2007-11-08 21:14:02 +00:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
2003-01-07 22:46:51 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
int accept (int, struct sockaddr *, size_t *);
|
2007-11-08 21:14:02 +00:00
|
|
|
]], [[]])],[
|
2003-01-07 22:46:51 +00:00
|
|
|
AC_MSG_RESULT(size_t)
|
2007-11-08 21:14:02 +00:00
|
|
|
AC_DEFINE([socklen_t], size_t, [Define for socklen_t])],[
|
2003-01-07 22:46:51 +00:00
|
|
|
AC_MSG_RESULT(int)
|
|
|
|
AC_DEFINE([socklen_t], int, [Define for socklen_t])])])
|
|
|
|
|
2000-02-09 19:51:45 +00:00
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS( ftime gettimeofday timegm memcpy bcopy mktime strstr rand \
|
|
|
|
random setitimer getitimer signal GetLocalTime rint getrusage )
|
|
|
|
|
2000-02-14 17:38:44 +00:00
|
|
|
AM_CONFIG_HEADER(src/Include/config.h)
|
2000-02-09 19:51:45 +00:00
|
|
|
|
2002-08-27 21:52:50 +00:00
|
|
|
AC_CONFIG_FILES([ \
|
2000-02-09 19:51:45 +00:00
|
|
|
VERSION \
|
|
|
|
Makefile \
|
2000-02-14 17:38:44 +00:00
|
|
|
src/Makefile \
|
2000-04-06 18:25:52 +00:00
|
|
|
src/Include/Makefile \
|
2001-04-25 18:55:19 +00:00
|
|
|
src/Airports/Makefile \
|
|
|
|
src/Airports/GenAirports/Makefile \
|
2003-09-04 02:54:09 +00:00
|
|
|
src/Airports/Utils/Makefile \
|
2001-04-25 18:55:19 +00:00
|
|
|
src/BuildTiles/Makefile \
|
|
|
|
src/BuildTiles/Clipper/Makefile \
|
|
|
|
src/BuildTiles/GenOutput/Makefile \
|
|
|
|
src/BuildTiles/Match/Makefile \
|
|
|
|
src/BuildTiles/Triangulate/Makefile \
|
|
|
|
src/BuildTiles/Main/Makefile \
|
|
|
|
src/BuildTiles/Osgb36/Makefile \
|
|
|
|
src/BuildTiles/Parallel/Makefile \
|
2000-02-14 17:38:44 +00:00
|
|
|
src/Lib/Makefile \
|
|
|
|
src/Lib/Array/Makefile \
|
|
|
|
src/Lib/DEM/Makefile \
|
2000-11-22 22:19:44 +00:00
|
|
|
src/Lib/e00/Makefile \
|
2000-05-31 01:34:44 +00:00
|
|
|
src/Lib/Geometry/Makefile \
|
2003-02-26 19:57:26 +00:00
|
|
|
src/Lib/HGT/Makefile \
|
2000-11-02 21:21:49 +00:00
|
|
|
src/Lib/landcover/Makefile \
|
2000-05-08 17:04:23 +00:00
|
|
|
src/Lib/Optimize/Makefile \
|
2001-01-04 20:33:47 +00:00
|
|
|
src/Lib/Output/Makefile \
|
2000-02-14 17:38:44 +00:00
|
|
|
src/Lib/Polygon/Makefile \
|
|
|
|
src/Lib/poly2tri/Makefile \
|
|
|
|
src/Lib/shapelib/Makefile \
|
2000-05-31 01:34:44 +00:00
|
|
|
src/Lib/TriangleJRS/Makefile \
|
2001-09-18 21:30:12 +00:00
|
|
|
src/Lib/vpf/Makefile \
|
2000-02-14 17:38:44 +00:00
|
|
|
src/Prep/Makefile \
|
|
|
|
src/Prep/DemChop/Makefile \
|
|
|
|
src/Prep/DemInfo/Makefile \
|
|
|
|
src/Prep/DemRaw2ascii/Makefile \
|
2000-11-22 22:19:44 +00:00
|
|
|
src/Prep/E00Lines/Makefile \
|
2000-02-14 17:38:44 +00:00
|
|
|
src/Prep/GSHHS/Makefile \
|
|
|
|
src/Prep/MergerClipper/Makefile \
|
2001-05-03 02:00:50 +00:00
|
|
|
src/Prep/Photo/Makefile \
|
2007-11-09 12:16:47 +00:00
|
|
|
src/Prep/OGRDecode/Makefile \
|
2000-02-14 17:38:44 +00:00
|
|
|
src/Prep/ShapeFile/Makefile \
|
2001-09-18 21:30:12 +00:00
|
|
|
src/Prep/TGVPF/Makefile \
|
2003-08-16 01:48:38 +00:00
|
|
|
src/Prep/Terra/Makefile \
|
|
|
|
src/Prep/TerraFit/Makefile \
|
2004-04-14 18:16:25 +00:00
|
|
|
src/Prep/Tower/Makefile \
|
2002-07-23 14:33:53 +00:00
|
|
|
src/Prep/UserDef/Makefile \
|
2000-02-14 17:38:44 +00:00
|
|
|
src/Utils/Makefile \
|
2001-09-18 21:30:12 +00:00
|
|
|
src/Utils/cdrom/Makefile \
|
|
|
|
src/Utils/download-map/Makefile \
|
2007-12-20 17:59:21 +00:00
|
|
|
src/Utils/poly2ogr/Makefile \
|
2002-08-27 21:52:50 +00:00
|
|
|
])
|
|
|
|
AC_OUTPUT
|
2000-02-09 19:51:45 +00:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "Configure Summary"
|
|
|
|
echo "================="
|
|
|
|
|
|
|
|
echo "Prefix: $prefix"
|
|
|
|
|
|
|
|
if test "x$with_logging" != "x"; then
|
|
|
|
echo "Debug messages: $with_logging"
|
|
|
|
else
|
|
|
|
echo "Debug messages: yes"
|
|
|
|
fi
|
|
|
|
|
2005-09-09 15:05:15 +00:00
|
|
|
if test "x$ac_cv_header_newmat_newmat_h" != "xyes"; then
|
2003-08-24 17:27:25 +00:00
|
|
|
echo
|
2005-09-09 15:05:15 +00:00
|
|
|
echo "You must have the newmat library installed on your system to build"
|
|
|
|
echo "the GenAirport utility. This program will not be built."
|
2003-08-24 17:27:25 +00:00
|
|
|
echo
|
2005-09-09 15:05:15 +00:00
|
|
|
echo "Please see README.newmat for more details."
|
2003-08-24 17:27:25 +00:00
|
|
|
echo
|
|
|
|
fi
|
2007-11-09 15:32:44 +00:00
|
|
|
|
|
|
|
dnl :mode=text:indentSize=2:
|