AC_PROG_INSTALL
AC_PROG_LN_S
+# 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
+
dnl set the $host variable based on local machine/os
AC_CANONICAL_HOST
-dnl Used on the Irix platform
-AR="ar"
-ARFLAGS="cru"
case "${host}" in
*-*-irix*)
if test "$CXX" = "CC"; then
AR="CC -ar"
ARFLAGS="-o"
+ CXXFLAGS="$CXXFLAGS -I$with_simgear/include/simgear/compatibility"
+ else
+ AR="ar"
+ ARFLAGS="cru"
fi
;;
+*)
+ AR="ar"
+ ARFLAGS="cru"
+ ;;
esac
AC_SUBST(AR)
AC_SUBST(ARFLAGS)
# Specify if we want to use WeatherCM instead of FGEnvironment.
# default to with_weathercm=no
-AC_ARG_WITH(new-environment, [ --with-weathercm Use WeatherCM instead of FGEnvironment])
+AC_ARG_WITH(weathercm, [ --with-weathercm Use WeatherCM instead of FGEnvironment])
if test "x$with_weathercm" = "xyes" ; then
echo "Building with WeatherCM"
AC_DEFINE([FG_WEATHERCM], 1,
fi
AM_CONDITIONAL(ENABLE_WEATHERCM, test "x$with_weathercm" = "xyes")
+dnl Specify if we want the old menubar; default to the new one
+AC_ARG_WITH(old-menubar, [ --with-old-menubar Use the old menu bar])
+if test "x$with_old_menubar" = "xyes" ; then
+ echo "Building with old menubar"
+ AC_DEFINE([FG_OLD_MENUBAR], 1,
+ [Define to build with old menubar])
+else
+ echo "Building with new menubar"
+fi
+AM_CONDITIONAL(ENABLE_WEATHERCM, test "x$with_weathercm" = "xyes")
+
dnl Thread related checks
AC_ARG_WITH(threads, [ --with-threads Include tile loading threads [default=no]])
if test "x$with_threads" = "xyes"; then
EXTRA_DIRS="${EXTRA_DIRS} $with_metakit"
fi
-# 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
-
dnl Used by JSBSim to conditionally compile in fgfs interface code
AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
dnl build a Makefile.in from a Makefile.am which lets us define custom
dnl includes, compile alternative source files, etc.
-# Check for external variables daylight and timezone.
+dnl Check for external variables daylight and timezone.
AC_EXT_DAYLIGHT
if test "$have_daylight" = yes; then
AC_DEFINE([HAVE_DAYLIGHT], 1, [Define if system has daylight variable])
AC_DEFINE([HAVE_TIMEZONE], 1, [Define if system has timezone variable])
fi
-# Check for audio support
+dnl add correct audio libs and configure for audio support
audio_LIBS="-lplibsl -lplibsm"
case "${host}" in
*-*-cygwin* | *-*-mingw32*)
esac
AC_SUBST(audio_LIBS)
+dnl ENABLE_AUDIO_SUPPORT could be depricated at any time in favor of
+dnl just assuming we have audio support on all platform. We can
+dnl depend on plib to hide the details.
+AC_DEFINE([ENABLE_AUDIO_SUPPORT], 1, [Define for audio support])
+
dnl X11 might be installed on Mac OS X or cygwin/mingwin, we don't want
dnl to use it if it is.
case "${host}" in
AC_CHECK_LIB(m, cos)
-dnl MINGW requires libwsock32
-if test "x$is_mingw" = "xyes" ; then
- LIBS="$LIBS -lws2_32"
-fi
-
base_LIBS="$LIBS"
dnl Thread related checks
dnl add -lwsock32 for mingwin
case "${host}" in
*-*-mingw32*)
- LIBS="$LIBS -lws2_32"
+ echo "********** BUILDING FOR MINGW32 *************"
+ base_LIBS="$base_LIBS -lws2_32"
;;
esac
AC_CHECK_LIB(MesaGLU, gluLookAt)
fi
- LIBS="$LIBS -lglut"
+ AC_CHECK_LIB(glut, glutGetModifiers)
+ if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno" ; then
+ dnl if no "real" glut, check for freeglut
+ AC_CHECK_LIB(freeglut, glutGetModifiers)
+ fi
;;
esac
dnl If we get here then plib is available, so force use of plib
dnl joystick lib
AC_DEFINE([ENABLE_PLIB_JOYSTICK], 1, [Define to enable plib joystick support])
-AC_DEFINE([FG_PLIB_JOYSTICK_GETNAME], 1,
- [Define to enable plib joystick name support])
+
+
+dnl Checking for PSL in plib
+dnl version of plib, so check for it.
+AC_MSG_CHECKING([for plib PSL scripting support])
+AC_COMPILE_IFELSE([
+#include <plib/psl.h>
+
+int main() {
+ // not for running...
+ pslProgram program((pslExtension *)0);
+ program.compile("int main () {}", "");
+ return 0;
+}
+],
+ [AC_MSG_RESULT(yes);
+ have_plib_psl=yes],
+ AC_MSG_RESULT(no)
+)
+AM_CONDITIONAL(HAVE_PLIB_PSL, test "x$have_plib_psl" = "xyes")
dnl Check for MetaKit
AC_CHECK_HEADER(mk4.h)
src/NetworkOLK/Makefile \
src/Objects/Makefile \
src/Scenery/Makefile \
+ src/Scripting/Makefile \
src/Sound/Makefile \
src/Systems/Makefile \
src/Time/Makefile \
echo "Prefix: $prefix"
+if test "x$have_plib_psl" = "xyes"; then
+ echo "Plib PSL scripting: yes"
+else
+ echo "Plib PSL scripting: $fg_psl_string_compile"
+ echo " You will not be able to run scripts written in PSL"
+ echo " and some advanced GUI and input features may not"
+ echo " work. Download and install the latest CVS version"
+ echo " of plib if you would like to enable PSL support."
+fi
+
if test "x$with_logging" != "x"; then
echo "Debug messages: $with_logging"
else
echo -n "Automake version: "
automake --version | head -1
-echo "New plib joystick name support: $plib_js_has_getname"
-
if test "x$with_weathercm" != "x"; then
echo "WeatherCM instead of FGEnvironment: $with_weathercm"
else
echo "Using FGEnvironment"
fi
+if test "x$with_old_menubar" != "x"; then
+ echo "Using old menubar"
+else
+ echo "Defaulting to new XML-configurable menubar"
+fi
+
if test "x$with_threads" = "xyes"; then
echo "threads: yes"
else