1 dnl Process this file with autoget.sh to produce a working configure
7 AC_CONFIG_SRCDIR([src/fgadmin.fl])
9 dnl Require at least automake 2.52
12 dnl Initialize the automake stuff
13 AM_INIT_AUTOMAKE(fgadmin, 1.0.0)
15 dnl Checks for programs.
24 dnl set the $host variable based on local machine/os
29 if test "$CXX" = "CC"; then
32 CXXFLAGS="$CXXFLAGS -I$with_simgear/include/simgear/compatibility"
46 # Check for MS Windows environment
47 AC_CHECK_HEADER(windows.h)
49 dnl Checks for libraries.
51 AC_CHECK_LIB(fltk,main,LIBS="$LIBS `fltk-config --use-images --ldflags`"
52 LDFLAGS="$LDFLAGS `fltk-config --use-images --ldflags`"
53 CPPFLAGS="$CPPFLAGS `fltk-config --cxxflags`",
54 AC_MSG_ERROR(fltk library required get it at http://www.fltk.org))
56 # The following are C++ items that need to be tested for with the c++
61 # Check for "plib" without which we cannot go on
62 AC_CHECK_HEADER(plib/ul.h)
63 if test "x$ac_cv_header_plib_ul_h" != "xyes"; then
65 echo "You *must* have the plib library installed on your system to build"
66 echo "the FGFS simulator!"
68 echo "Please see README.plib for more details."
70 echo "configure aborted."
74 AC_MSG_CHECKING([for plib 1.6.0 or newer])
78 #define MIN_PLIB_VERSION 160
81 int major, minor, micro;
83 if ( PLIB_VERSION < MIN_PLIB_VERSION ) {
92 [AC_MSG_RESULT(wrong version);
93 AC_MSG_ERROR([Install plib 1.6.0 or later first...])],
97 dnl Check for the presence of SimGear
98 AC_CHECK_HEADER(simgear/version.h)
99 if test "x$ac_cv_header_simgear_version_h" != "xyes"; then
101 echo "You *must* have the SimGear support library installed on your system"
102 echo "to build the FGFS simulator!"
104 echo "Please see README.SimGear for more details."
106 echo "configure aborted."
110 AC_MSG_CHECKING([for simgear 0.3.4 or newer])
114 #include <simgear/version.h>
116 #define STRINGIFY(X) XSTRINGIFY(X)
117 #define XSTRINGIFY(X) #X
124 int major, minor, micro;
126 printf("%d.%d.%d or greater... ", MIN_MAJOR, MIN_MINOR, MIN_MICRO);
128 sscanf( STRINGIFY(SIMGEAR_VERSION), "%d.%d.%d", &major, &minor, µ );
130 if ( major < MIN_MAJOR ) {
132 } else if ( major == MIN_MAJOR && minor < MIN_MINOR ) {
134 } else if ( major == MIN_MAJOR && minor == MIN_MINOR && micro < MIN_MICRO ){
143 [AC_MSG_RESULT(wrong version);
144 AC_MSG_ERROR([Install latest simgear first...])],
150 dnl Check for system installed zlib
151 AC_CHECK_HEADER(zlib.h)
152 if test "x$ac_cv_header_zlib_h" != "xyes"; then
154 echo "zlib library not found."
156 echo "If your OS does not provide an installable package for zlib"
157 echo "you will have to compile and install it first yourself. A copy"
158 echo "of zlib-1.1.4.tar.gz is included with SimGear. You will"
159 echo "have to untar this source code, and follow it's included instructions"
160 echo "to compile and install on your system."
162 echo "configure aborted."
166 AC_DEFINE([HAVE_ZLIB], 1, [Define to enable gz compressed tar archives])
169 dnl Checks for header files.
171 AC_CHECK_HEADERS( errno.h fcntl.h sys/types.h sys/stat.h )
173 dnl Checks for typedefs, structures, and compiler characteristics.
179 AC_CHECK_FUNCS( [ rmdir unlink ] )
181 AM_CONFIG_HEADER(src/config.h)