fi
AC_CHECK_PROG([HAVE_GIT], git, 1)
-if test "x$HAVE_GIT" != "x" ; then
+if test "x$HAVE_GIT" != "x" ; then
# git might be installed, but we might be building from a tarball
if git rev-parse ; then
AC_SUBST([REVISION], `git rev-parse HEAD`)
else
- AC_SUBST([REVISION], [none])
+ AC_SUBST([REVISION], [none])
fi
else
- AC_SUBST([REVISION], [none])
+ AC_SUBST([REVISION], [none])
fi
dnl Checks for programs.
dnl Thank you Christian Bauer from SheepSaver
dnl Modified by Tatsuhiro Nishioka for accepting a given framework path
- dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES, $3=FRAMEWORK_PATH, $4=ACTION_IF_FOUND) ;
+ dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES, $3=FRAMEWORK_PATH, $4=ACTION_IF_FOUND) ;
AC_DEFUN([AC_CHECK_FRAMEWORK], [
AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
AC_CACHE_CHECK([whether compiler supports framework $1],
fi
AM_CONDITIONAL(ENABLE_SP_FDM, test "x$enable_sp_fdms" != "xno")
-# Specify whether we want to compile ATCDCL.
-# default to with_atcdcl=yes
-AC_ARG_ENABLE(atcdcl, [ --enable-atcdcl Compile and link the deprecated atc/ai module], [], [enable_atcdcl="$enableval"] )
-if test "x$enable_atcdcl" = "xyes"; then
- AC_DEFINE([ENABLE_ATCDCL], 1, [Define to include old ATC/AI module])
-else
- AC_DEFINE([ENABLE_ATCDCL], 0, [Define to include old ATC/AI module])
-fi
-AM_CONDITIONAL(ENABLE_ATCDCL, test "x$enable_atcdcl" = "xyes")
-
dnl EXPERIMENTAL generic event driven input device
# defaults to no
AC_ARG_WITH(eventinput, [ --with-eventinput Include event driven input (EXPERIMENTAL) [default=no]], [], [with_eventinput=no])
fi
AC_CHECK_HEADER(pthread.h)
+dnl Configure HLA support
+AC_ARG_WITH(rti13, [ --with-rti13[[=PATH]] Enable the HLA/RTI 1.3 interface, set a path to the RTI13 RTI libraries (default=no)])
+if test "x$with_rti13" != "xno"; then
+ if test "x$with_rti13" != "xyes"; then
+ AC_SUBST(HLA_CPPFLAGS, "-I$with_rti13/include")
+ AC_SUBST(HLA_LDFLAGS, "-L$with_rti13/lib")
+ fi
+
+ dnl Configure HLA support
+ AC_MSG_CHECKING([for simgear HLA/RTI support])
+ AC_LANG_PUSH(C++)
+ AC_TRY_COMPILE([
+ #include <simgear/hla/HLA13Federate.hxx>
+ ],[
+ new simgear::HLA13Federate;
+ ], simgear_hla=yes, simgear_hla=no)
+ AC_MSG_RESULT($simgear_hla)
+ if test "x$simgear_hla" = "xyes" ; then
+ AC_MSG_CHECKING([for hla libraries])
+ saved_LIBS="$LIBS"
+ saved_LDFLAGS="$LDFLAGS"
+ for rti13libs in "-lRTI-NG -lFedTime" "-lRTI-NGd -lFedTimed" ; do
+ if test "x$hla_libs" = "x" ; then
+ LIBS="-lsghla13 -lsghla -lsgxml -lsgstructure -lsgmath -lsgdebug -lsgtiming $rti13libs -lrt $saved_LIBS"
+ LDFLAGS="$HLA_LDFLAGS $saved_LDFLAGS"
+ AC_TRY_LINK([
+ #include <simgear/hla/HLA13Federate.hxx>
+ ],[
+ new simgear::HLA13Federate;
+ ], [hla_libs="$rti13libs"; have_rti13=yes],)
+ fi
+ done
+ LIBS="$saved_LIBS"
+ LDFLAGS="$saved_LDFLAGS"
+ AC_MSG_RESULT($hla_libs)
+ fi
+ AC_LANG_POP()
+fi
+dnl Currently only the rti13 variant, but in the future also rti1516
+AM_CONDITIONAL(WITH_HLA, test "x$have_rti13" = "xyes")
+if test "x$have_rti13" = "xyes" ; then
+ AC_DEFINE([FG_HAVE_HLA], 1, [Define if HLA/RTI is available.])
+ AC_SUBST(HLA_LIBS, "-lsghla13 -lsghla $hla_libs")
+fi
+
+dnl EXPERIMENTAL fgpanel application
+# defaults to no
+AC_ARG_WITH(fgpanel, [ --with-fgpanel Include fgpanel application (EXPERIMENTAL) [default=no]], [], [with_fgpanel=no])
+if test "x$with_fgpanel" = "xyes"; then
+ AC_DEFINE([WITH_FGPANEL], 1, [Define to enable fgpanel application])
+fi
+AM_CONDITIONAL(WITH_FGPANEL, test "x$with_fgpanel" = "xyes")
+
dnl Used by JSBSim to conditionally compile in fgfs interface code
AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
# Check for MS Windows environment
AC_CHECK_HEADER(windows.h)
-dnl Using AM_CONDITIONAL is a step out of the protected little
+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
# Mac OS X has OpenAL.framework, but no ALUT, by default, so we
# require use of a non-Apple ALUT.framework which we provide
openal_LIBS="-framework IOKit -framework OpenAL"
-
+
AC_CHECK_FRAMEWORK(OpenAL, [#include <OpenAL/al.h>], "", [OPENAL_OK="yes"])
AC_CHECK_FRAMEWORK(ALUT, [#include <ALUT/alut.h>], $with_alut_framework, [
ALUT_OK="yes"
exit
fi
-AC_MSG_CHECKING([for SimGear 2.0.0 or newer])
+AC_MSG_CHECKING([for SimGear 2.2.0 or newer])
AC_TRY_RUN([
#include <stdio.h>
#define XSTRINGIFY(X) #X
#define MIN_MAJOR 2
-#define MIN_MINOR 0
+#define MIN_MINOR 2
#define MIN_MICRO 0
int main() {
fi
dnl Check for Subversion library support
+# libsvn support defaults to yes
save_LIBS=$LIBS
save_CPPFLAGS=$CPPFLAGS
-LIBS="`apr-1-config --link-ld`"
-CPPFLAGS="-I/usr/include/subversion-1 `apr-1-config --includes`"
-AC_CHECK_HEADERS([svn_client.h])
-if test "x$ac_cv_header_svn_client_h" != "xyes"; then
- echo "TerraSync will shell out for command line subversion"
+AC_ARG_WITH(libsvn, [ --without-libsvn Do not use libsvn for terrasync [default=no]], [], [with_libsvn=yes])
+if test "x$with_libsvn" = "xyes"; then
+ LIBS="`apr-1-config --link-ld`"
+ CPPFLAGS="-I/usr/include/subversion-1 `apr-1-config --includes --cppflags`"
+ AC_CHECK_HEADERS([svn_client.h])
+ if test "x$ac_cv_header_svn_client_h" = "xyes"; then
+ echo "TerraSync will use libsvn"
+ AC_SEARCH_LIBS(svn_client_checkout, svn_client-1)
+ AC_SEARCH_LIBS(svn_cmdline_init, svn_subr-1)
+ svn_LIBS=$LIBS
+ svn_CPPFLAGS=$CPPFLAGS
+ AC_SUBST(svn_LIBS)
+ AC_SUBST(svn_CPPFLAGS)
+ else
+ echo "Libsvn not found. TerraSync will use command line subversion"
+ svn_LIBS=""
+ svn_CPPFLAGS=""
+ fi
+else
+echo "Libsvn explicitly disabled. TerraSync will use command line subversion"
svn_LIBS=""
svn_CPPFLAGS=""
-else
- echo "TerraSync will use integrated subversion library"
- AC_SEARCH_LIBS(svn_client_checkout, svn_client-1)
- AC_SEARCH_LIBS(svn_cmdline_init, svn_subr-1)
- svn_LIBS=$LIBS
- svn_CPPFLAGS=$CPPFLAGS
- AC_SUBST(svn_LIBS)
- AC_SUBST(svn_CPPFLAGS)
fi
LIBS=$save_LIBS
CPPFLAGS=$save_CPPFLAGS
scripts/debug/Makefile \
scripts/perl/Makefile \
scripts/perl/examples/Makefile \
+ scripts/perl/traffic/Makefile \
scripts/python/Makefile \
src/Makefile \
src/Include/Makefile \
src/MultiPlayer/Makefile \
src/Navaids/Makefile \
src/Network/Makefile \
+ src/Network/HLA/Makefile \
src/Scenery/Makefile \
src/Scripting/Makefile \
src/Sound/Makefile \
utils/propmerge/Makefile \
utils/TerraSync/Makefile \
utils/xmlgrep/Makefile \
- utils/fgviewer/Makefile
+ utils/fgviewer/Makefile \
+ utils/fgpanel/Makefile
])
AC_OUTPUT
echo "Prefix: $prefix"
if test "x$with_logging" != "x"; then
- echo "Debug messages: $with_logging"
+ echo "Log messages: $with_logging"
else
- echo "Debug messages: yes"
+ echo "Log messages: yes"
fi
echo -n "Automake version: "
fi
if test "x$with_threads" = "xyes"; then
- echo "threads: yes"
+ echo "Threads: yes"
else
- echo "threads: no"
+ echo "Threads: no"
fi
if test "x$with_eventinput" = "xyes"; then
- echo "event input: yes"
+ echo "Event input: yes"
else
- echo "event input: no"
+ echo "Event input: no"
fi
-if test "x$enable_sp_fdms" != "xno"; then
- echo "Include special purpose flight models: yes"
+if test "x$with_fgpanel" = "xyes"; then
+ echo "fgpanel: yes"
else
- echo "Include special purpose flight models: no"
+ echo "fgpanel: no"
fi
-if test "x$enable_atcdcl" = "xyes"; then
- echo "Build depricated ATC/AI module: yes"
+if test "x$enable_sp_fdms" != "xno"; then
+ echo "Include special purpose flight models: yes"
else
- echo "Build depricated ATC/AI module: no"
+ echo "Include special purpose flight models: no"
fi
-