AC_PREREQ(2.52)
dnl Initialize the automake stuff
-AM_INIT_AUTOMAKE(SimGear, 0.0.19pre1)
+AM_INIT_AUTOMAKE(SimGear, 0.0.19pre2)
dnl Specify KAI C++ compiler and flags.
dnl Borrowed with slight modification from blitz distribution.
echo "includedir changed to" $includedir "libdir is" $libdir
fi
-# Determine version of automake ... important because of
-# incompatibilities between versions
-AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\-p[[0-9]]$//' | sed -e 's/\.//'`
-AM_CONDITIONAL(ANCIENT_AUTOMAKE, test $AUTO_MAKE_VERSION -lt 14)
-AM_CONDITIONAL(OLD_AUTOMAKE, test $AUTO_MAKE_VERSION -lt 15)
-
# set logging default value
# with_logging=yes
AC_ARG_WITH(logging, [ --with-logging Include logging output (default)])
if test "x$HOSTTYPE" != "xmacintosh" -a "x$is_mingw" != "xyes"; then
dnl extra library and include directories
- EXTRA_DIRS="/usr/local /usr/local/plib /usr/X11R6"
+ EXTRA_DIRS="/usr/local /usr/X11R6"
if test -d /opt/X11R6 ; then
EXTRA_DIRS="$EXTRA_DIRS /opt/X11R6"
echo Win32 specific hacks...
AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
- dnl force a failed check since we will be building under windoze
- AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes")
-
dnl just define these to true and hope for the best
ac_cv_lib_glut_glutGetModifiers="yes"
ac_cv_lib_glut_glutGameModeString="yes"
AM_CONDITIONAL(HAVE_XWINDOWS, test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" )
+# The following are C++ items that need to be tested for with the c++
+# compiler
+
+AC_LANG_PUSH(C++)
+
dnl Check for "plib" without which we cannot go on
-AC_CHECK_HEADER(plib/pu.h)
-if test "x$ac_cv_header_plib_pu_h" != "xyes"; then
+AC_CHECK_HEADER(plib/ul.h)
+if test "x$ac_cv_header_plib_ul_h" != "xyes"; then
echo
echo "You *must* have the plib library installed on your system to build"
- echo "the FGFS simulator!"
+ echo "SimGear!"
echo
echo "Please see README.plib for more details."
echo
exit
fi
-AC_CHECK_HEADER(plib/ssgaLensFlare.h)
-if test "x$ac_cv_header_plib_ssgaLensFlare_h" = "xyes"; then
- AC_DEFINE([FG_CHEESY_LENS_FLARE], 1, [Define for cheesy lens flare effect])
-fi
+AC_MSG_CHECKING([for plib 1.6.0 or newer])
+AC_TRY_RUN([
+#include <plib/ul.h>
+
+#define MIN_PLIB_VERSION 160
+
+int main() {
+ int major, minor, micro;
+
+ if ( PLIB_VERSION < MIN_PLIB_VERSION ) {
+ return -1;
+ }
+
+ return 0;
+}
+
+],
+ AC_MSG_RESULT(yes),
+ [AC_MSG_RESULT(wrong version);
+ AC_MSG_ERROR([Install plib 1.6.0 or later first...])],
+ AC_MSG_RESULT(yes)
+)
dnl Check for system installed metakit
AC_CHECK_HEADER(mk4.h)
exit
fi
+AC_LANG_POP
dnl Specify if we want logging (testing build) or not (release build)
AC_CHECK_FUNCS( ftime gettimeofday timegm memcpy bcopy mktime strstr rand \
random drand48 setitimer getitimer signal GetLocalTime rint getrusage )
-AM_CONFIG_HEADER([simgear/simgear_config.h])
+AM_CONFIG_HEADER(simgear/simgear_config.h)
AC_CONFIG_FILES([ \
Makefile \