+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")