1 dnl Process this file with autogen.sh to produce a working configure
5 AC_CONFIG_SRCDIR([src/Aircraft/aircraft.cxx])
7 dnl Require at least automake 2.52
10 dnl Initialize the automake stuff
11 dnl set the $host variable based on local machine/os
13 AM_INIT_AUTOMAKE(FlightGear, 1.9.1)
15 dnl Checks for programs.
23 AX_BOOST_BASE([1.34.0])
25 if test "x$BOOST_CPPFLAGS" != "x-I/usr/include" ; then
26 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
29 # specify the simgear location
30 AC_ARG_WITH(simgear, [ --with-simgear=PREFIX Specify the prefix path to SimGear])
32 if test "x$with_simgear" != "x" ; then
33 echo "SimGear prefix path is $with_simgear"
34 EXTRA_DIRS="${EXTRA_DIRS} $with_simgear"
35 CXXFLAGS="$CXXFLAGS -I$with_simgear"
38 # specify the plib location
39 AC_ARG_WITH(plib, [ --with-plib=PREFIX Specify the prefix path to plib])
41 if test "x$with_plib" != "x" ; then
42 echo "plib prefix is $with_plib"
43 EXTRA_DIRS="${EXTRA_DIRS} $with_plib"
46 # specify the osg location
47 AC_ARG_WITH(osg, [ --with-osg=PREFIX Specify the prefix path to osg])
49 if test "x$with_osg" != "x" ; then
50 echo "osg prefix is $with_osg"
51 EXTRA_DIRS="${EXTRA_DIRS} $with_osg"
54 # specify framework related locations for Mac OS X
58 dnl Thank you Christian Bauer from SheepSaver
59 dnl Modified by Tatsuhiro Nishioka for accepting a given framework path
60 dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES, $3=FRAMEWORK_PATH) ; $3 is optional
61 AC_DEFUN([AC_CHECK_FRAMEWORK], [
62 AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
63 AC_CACHE_CHECK([whether compiler supports framework $1],
66 FRAMEWORKS="$FRAMEWORKS -framework $1"
67 if test "$3" = ""; then
68 FRAMEWORKS="$FRAMEWORKS $ADD2LD"
69 elif test "`echo $FRAMEWORKS | grep -- -F$3`" = ""; then
70 FRAMEWORKS="$FRAMEWORKS -F$3"
71 CXXFLAGS="$CXXFLAGS -F$3"
72 CCFLAGS="$CCFLAGS -F$3"
73 dnl This is needed for AC_TRY_LINK when a framework path is specified
74 export DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}:$3"
78 [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
81 AS_IF([test AS_VAR_GET(ac_Framework) = yes],
82 [AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])]
84 AS_VAR_POPDEF([ac_Framework])dnl
87 # Mac OS X specific configure options
88 AC_ARG_WITH(osg_framework, [ --with-osg-framework=PREFIX Specify the prefix path to osg frameworks [default=standard framework paths]])
90 if test "x$with_plib_framework" != "x" ; then
91 echo "plib prefix is $with_plib_framework"
94 AC_ARG_WITH(plib_framework, [ --with-plib-framework=PREFIX Specify the prefix path to PLIB framework [default=standard framework paths]])
95 if test "x$with_osg_framework" != "x" ; then
96 echo "osg prefix is $with_osg_framework"
101 dnl Determine an extra directories to add to include/lib search paths
103 *-apple-darwin* | *-*-mingw32*)
104 echo no EXTRA_DIRS for $host
108 if test -d /usr/local ; then
109 EXTRA_DIRS="${EXTRA_DIRS} /usr/local"
114 if test -d /usr/X11R6 ; then
115 EXTRA_DIR1="/usr/X11R6"
117 if test -d /opt/X11R6 ; then
118 EXTRA_DIR2="/opt/X11R6"
120 EXTRA_DIRS="${EXTRA_DIRS} $EXTRA_DIR1 $EXTRA_DIR2 /usr/local"
124 wi_EXTRA_DIRS(no, ${EXTRA_DIRS})
129 if test "$CXX" = "CC"; then
132 CXXFLAGS="$CXXFLAGS -c99 -I$with_simgear/include/simgear/compatibility"
133 CFLAGS="$CFLAGS -c99"
147 dnl set logging; default value of with_logging=yes
148 AC_ARG_WITH(logging, [ --with-logging Include logging output (default)])
149 if test "x$with_logging" = "xno" ; then
150 AC_DEFINE([FG_NDEBUG], 1, [Define for no logging output])
153 AC_ARG_ENABLE(sp_fdms, [ --enable-sp-fdms Include special purpose Flight Models], [enable_sp_fdms="$enableval"] )
154 if test "x$enable_sp_fdms" != "xno"; then
155 AC_DEFINE([ENABLE_SP_FDM], 1, [Define to include special purpose FDMs])
157 AC_DEFINE([ENABLE_SP_FDM], 0, [Define to include special purpose FDMs])
159 AM_CONDITIONAL(ENABLE_SP_FDM, test "x$enable_sp_fdms" != "xno")
162 dnl EXPERIMENTAL generic event driven input device
164 AC_ARG_WITH(eventinput, [ --with-eventinput Include event driven input (EXPERIMENTAL) [default=no]], [], [with_eventinput=no])
165 if test "x$with_eventinput" = "xyes"; then
166 AC_DEFINE([WITH_EVENTINPUT], 1, [Define to enable generic event driven input device])
168 dnl OS specific sources for event driven input
169 dnl Linux and Mac OS X are supported at this moment
171 eventinput_EXTRA_OBJS="FGMacOSXEventInput.o"
172 eventinput_INCUDES=""
177 dnl FIXME: include paths for dbus are hard-coded at this moment.
178 dnl FIXME: these must be found in configure
180 eventinput_EXTRA_OBJS="FGLinuxEventInput.o"
181 eventinput_INCLUDES="-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/lib/dbus-1.0/include"
182 eventinput_LIBS="-ldbus-1 -lhal"
185 echo "Event driven input is not supported on ${host}."
188 AC_SUBST(eventinput_EXTRA_OBJS)
189 AC_SUBST(eventinput_INCLUDES)
190 AC_SUBST(eventinput_LIBS)
192 AM_CONDITIONAL(WITH_EVENTINPUT, test "x$with_eventinput" = "xyes")
194 dnl Thread related checks
196 AC_ARG_WITH(threads, [ --with-threads Include tile loading threads [default=yes]], [], [with_threads=yes])
197 if test "x$with_threads" = "xyes"; then
198 AC_DEFINE([ENABLE_THREADS], 1, [Define to enable threaded tile paging])
199 CXXFLAGS="$CXXFLAGS -D_REENTRANT"
200 CFLAGS="$CFLAGS -D_REENTRANT"
202 AC_CHECK_HEADER(pthread.h)
203 AM_CONDITIONAL(WITH_THREADS, test "x$with_threads" = "xyes")
205 dnl Used by JSBSim to conditionally compile in fgfs interface code
206 AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
208 # Check for MS Windows environment
209 AC_CHECK_HEADER(windows.h)
211 dnl Using AM_CONDITIONAL is a step out of the protected little
212 dnl automake fold so it is potentially dangerous. But, we are
213 dnl beginning to run into cases where the standard checks are not
214 dnl enough. AM_CONDITIONALS are then referenced to conditionally
215 dnl build a Makefile.in from a Makefile.am which lets us define custom
216 dnl includes, compile alternative source files, etc.
218 dnl Check for external variables daylight and timezone.
220 if test "$have_daylight" = yes; then
221 AC_DEFINE([HAVE_DAYLIGHT], 1, [Define if system has daylight variable])
225 if test "$have_timezone" = yes; then
226 AC_DEFINE([HAVE_TIMEZONE], 1, [Define if system has timezone variable])
230 dnl add joystick support libraries
231 dnl search for FreeBSD library
232 AC_SEARCH_LIBS(hid_init, usbhid)
233 joystick_LIBS="$LIBS"
237 dnl ENABLE_AUDIO_SUPPORT could be depricated at any time in favor of
238 dnl just assuming we have audio support on all platform. We can
239 dnl depend on plib to hide the details.
240 AC_DEFINE([ENABLE_AUDIO_SUPPORT], 1, [Define for audio support])
242 dnl X11 might be installed on Mac OS X or cygwin/mingwin, we don't want
243 dnl to use it if it is.
245 *-apple-darwin* | *-*-cygwin* | *-*-mingw32*)
246 echo no fancy X11 check
255 dnl Checks for libraries.
257 dnl Thread related checks
258 AC_SEARCH_LIBS(pthread_create, [pthread c_r])
259 if test "x$ac_cv_header_pthread_h" = "xyes"; then
260 if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
261 CXXFLAGS="-pthread $CXXFLAGS"
262 CFLAGS="-pthread $CFLAGS"
269 dnl search for network related libraries
270 AC_SEARCH_LIBS(inet_addr, xnet)
271 AC_SEARCH_LIBS(socket, socket)
272 AC_SEARCH_LIBS(main, nsl)
277 dnl check for some default libraries
278 AC_SEARCH_LIBS(sqrt, [am ffm fm fastm m])
279 AC_SEARCH_LIBS(ceil, m)
280 AC_SEARCH_LIBS(dlclose, dl)
281 AC_SEARCH_LIBS(clock_gettime, rt)
285 dnl Check for SDL or glut if enabled.
286 AC_ARG_ENABLE(osgviewer, [ --enable-osgviewer Configure to use osgViewer(default)], [enable_osgviewer="$enableval"])
287 AC_ARG_ENABLE(sdl, [ --enable-sdl Configure to use SDL], [enable_sdl="$enableval"])
288 AC_ARG_ENABLE(glut, [ --enable-glut Configure to use GLUT], [enable_glut="$enableval"])
289 AM_CONDITIONAL(USE_SDL, test "x$enable_sdl" = "xyes")
290 AM_CONDITIONAL(USE_GLUT, test "x$enable_glut" = "xyes")
291 if test "x$enable_sdl" != "xyes" -a "x$enable_glut" != "xyes" -a "x$enable_osgviewer" != "xno"; then
292 enable_osgviewer="yes"
294 if test \( "x$enable_osgviewer" = "xyes" \
295 -a \( "x$enable_sdl" = "xyes" -o "x$enable_glut" = "xyes" \) \) \
296 -o \( "x$enable_sdl" = "xyes" -a "x$enable_glut" = "xyes" \); then
297 echo " Only one of --enable-osgviewer, --enable-sdl, or --enable -glut may"
301 AC_DEFINE([PU_USE_NONE], 1, [Define to use application's pu callbacks])
303 AC_ARG_ENABLE(osgdebug, [ --enable-osgdebug Use OSG debug libraries], [enable_osgdebug="$enableval"])
305 dnl check for OpenGL related libraries
307 *-*-cygwin* | *-*-mingw32*)
308 dnl CygWin under Windoze.
310 echo Win32 specific hacks...
311 AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
312 AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
314 if test "x$enable_sdl" = "xyes"; then
315 AC_SEARCH_LIBS(SDL_Init, SDL)
317 LIBS="$LIBS -lglut32"
320 LIBS="$LIBS -lglu32 -lopengl32 -luser32 -lgdi32"
321 joystick_LIBS="$joystick_LIBS -lwinmm"
323 dnl add -lwsock32 for mingwin
326 echo "********** BUILDING FOR MINGW32 *************"
327 network_LIBS="$network_LIBS -lws2_32"
331 echo "Will link apps with $LIBS"
338 LIBS="$LIBS -framework GLUT -framework OpenGL -framework AGL -framework Carbon -lobjc"
339 joystick_LIBS="$joystick_LIBS -framework IOKit -framework CoreFoundation"
343 dnl X-Windows based machines
345 dnl Skip X11 library tests if requested.
346 if test "x$no_x" != "xyes"; then
347 AC_SEARCH_LIBS(XCreateWindow, X11)
348 AC_SEARCH_LIBS(XShmCreateImage, Xext)
349 AC_SEARCH_LIBS(XGetExtensionVersion, Xi)
350 AC_SEARCH_LIBS(IceOpenConnection, ICE)
351 AC_SEARCH_LIBS(SmcOpenConnection, SM)
352 AC_SEARCH_LIBS(XtMalloc, Xt)
353 AC_SEARCH_LIBS(XmuLookupStandardColormap, Xmu)
356 AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
357 if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
358 dnl if GLcore found, then also check for GL
359 AC_SEARCH_LIBS(glXCreateContext, GL)
362 dnl if using mesa, check for xmesa.h
363 if test "x$ac_cv_search_glNewList" = "x-lMesaGL"; then
364 AC_CHECK_HEADER(GL/fxmesa.h)
365 if test "x$ac_cv_header_GL_fxmesa_h" = "xyes"; then
366 AC_DEFINE([XMESA], 1, [Define for fxmesa])
367 AC_DEFINE([FX], 1, [Define for fxmesa])
371 AC_SEARCH_LIBS(gluLookAt, [ GLU MesaGLU ])
372 AC_SEARCH_LIBS(glutGetModifiers, [ glut freeglut ])
373 if test "x$enable_sdl" = "xyes"; then
374 AC_SEARCH_LIBS(SDL_Init, SDL)
381 LIBS="$base_LIBS $joystick_LIBS"
383 dnl check for OpenAL libraries
387 *-*-cygwin* | *-*-mingw32*)
388 dnl CygWin under Windoze.
389 INCLUDES="$INCLUDES -I/usr/local/include/"
390 LIBS="$LIBS -L/usr/local/lib"
391 AC_SEARCH_LIBS(alGenBuffers, [ openal32 openal ] )
392 AC_SEARCH_LIBS(alutInit, [ openal32 ALut alut ] )
393 LIBS="$LIBS -lwinmm -ldsound -ldxguid -lole32"
395 OPENAL_OK="$ac_cv_search_alGenBuffers"
396 ALUT_OK="$ac_cv_search_alutInit"
402 LIBS="$LIBS -framework IOKit -framework OpenAL"
404 # not sure how to test if OpenAL exists on MacOS (does it come by default?)
410 dnl default unix style machines
413 LIBS="$LIBS $thread_LIBS"
414 AC_SEARCH_LIBS(alGenBuffers, openal)
415 AC_SEARCH_LIBS(alutInit, [ alut openal ] )
416 OPENAL_OK="$ac_cv_search_alGenBuffers"
417 ALUT_OK="$ac_cv_search_alutInit"
424 if test "$OPENAL_OK" == "no"; then
426 echo "You *must* have the openal library installed on your system to build"
429 echo "Please see README.OpenAL for more details."
431 echo "configure aborted."
435 if test "$ALUT_OK" == "no"; then
437 echo "You *must* have the alut library installed on your system to build"
440 echo "Please see README.OpenAL for more details."
442 echo "configure aborted."
450 AC_SUBST(openal_LIBS)
451 AC_SUBST(opengl_LIBS)
452 AC_SUBST(thread_LIBS)
453 AC_SUBST(network_LIBS)
454 AC_SUBST(joystick_LIBS)
456 # The following are C++ items that need to be tested for with the c++
461 dnl Check for the presence of SimGear
462 if test "x$with_simgear" != "x"; then
463 AC_CHECK_HEADER($with_simgear/include/simgear/version.h, [ac_cv_header_simgear_version_h=yes], [ac_cv_header_simgear_version_h=no])
465 AC_CHECK_HEADER(simgear/version.h)
467 if test "x$ac_cv_header_simgear_version_h" != "xyes"; then
469 echo "You *must* have the SimGear support library installed on your system"
470 echo "to build the FGFS simulator!"
472 echo "Please see README.SimGear for more details."
474 echo "configure aborted."
478 AC_MSG_CHECKING([for SimGear 1.9.0 or newer])
482 #include <simgear/version.h>
484 #define STRINGIFY(X) XSTRINGIFY(X)
485 #define XSTRINGIFY(X) #X
492 int major, minor, micro;
494 /* printf("%d.%d.%d or greater, ", MIN_MAJOR, MIN_MINOR, MIN_MICRO); */
495 printf("[found %s] ... ", STRINGIFY(SIMGEAR_VERSION));
497 sscanf( STRINGIFY(SIMGEAR_VERSION), "%d.%d.%d", &major, &minor, µ );
499 if ( (major < MIN_MAJOR) ||
500 (major == MIN_MAJOR && minor < MIN_MINOR) ||
501 (major == MIN_MAJOR && minor == MIN_MINOR && micro < MIN_MICRO) ) {
510 [AC_MSG_RESULT(wrong version);
511 AC_MSG_ERROR([Install latest SimGear first...])],
517 dnl Check if SimGear was built with Norman's JPEG factory support
518 if test "x$with_simgear" != "x"; then
519 AC_CHECK_HEADER($with_simgear/include/simgear/screen/jpgfactory.hxx,[ac_cv_header_simgear_screen_jpgfactory_hxx=yes],[ac_cv_header_simgear_screen_jpgfactory_hxx=no])
521 AC_CHECK_HEADER(simgear/screen/jpgfactory.hxx)
523 if test "x$ac_cv_header_simgear_screen_jpgfactory_hxx" = "xyes"; then
524 AC_CHECK_LIB(jpeg, jpeg_start_compress)
525 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" != "xyes" ; then
527 echo "The JPEG factory code was built and installed with SimGear."
528 echo "However it appears the libjpeg is no longer installed."
529 echo "You need to install libjpeg or remove jpgfactory support from"
532 echo "libjpeg is available at :"
533 echo " ftp://ftp.uu.net in the directory graphics/jpeg"
536 AC_DEFINE([FG_JPEG_SERVER], 1,
537 [Define to build with jpeg screen shot server])
539 AM_CONDITIONAL(ENABLE_JPEG_SERVER, test "x$ac_cv_header_simgear_screen_jpgfactory_hxx" = "xyes")
541 # Check for "plib" without which we cannot go on
544 if test "x$with_plib_framework" != "x"; then
545 AC_CHECK_FRAMEWORK(PLIB, [#include <plib/ul.h>], $with_plib_framework, no)
546 plib_FRAMEWORK="$FRAMEWORKS"
547 AC_SUBST(plib_FRAMEWORK)
552 AM_CONDITIONAL(HAVE_FRAMEWORK_PLIB, test "x$ac_cv_framework_PLIB" != "x")
554 AC_CHECK_HEADER(plib/ul.h)
555 if test "x$ac_cv_header_plib_ul_h" != "xyes"; then
557 echo "You *must* have the plib library installed on your system to build"
558 echo "the FGFS simulator!"
560 echo "Please see README.plib for more details."
562 echo "configure aborted."
566 echo "$DYLD_FRAMEWORK_PATH"
567 AC_MSG_CHECKING([for plib 1.8.5 or newer])
571 #define MIN_PLIB_VERSION 185
574 if ( PLIB_VERSION < MIN_PLIB_VERSION ) {
583 [AC_MSG_RESULT(wrong version);
584 AC_MSG_ERROR([Install plib 1.8.5 or later first...])],
588 dnl If we get here then plib is available, so force use of plib
590 AC_DEFINE([ENABLE_PLIB_JOYSTICK], 1, [Define to enable plib joystick support])
592 AC_CHECK_HEADER(osg/Version)
593 if test "x$ac_cv_header_osg_Version" != "xyes"; then
595 echo "You *must* have the OpenSceneGraph support library installed on your system"
596 echo "to build the FGFS simulator!"
598 echo "Please see README.OSG for more details."
600 echo "configure aborted."
604 # Find the OSG libraries. Note special handling for OS X frameworks
607 if test "x$with_osg_framework" = "x"; then
608 if test "x$enable_osgdebug" = "xyes"; then
609 # debug version of osg libs
610 AC_CHECK_LIB(OpenThreadsd,OpenThreadsGetVersion)
611 openthreads_LIBS="$LIBS"
613 AC_CHECK_LIB(osgd,osgGetVersion)
614 AC_CHECK_LIB(osgUtild,osgUtilGetVersion)
615 AC_CHECK_LIB(osgDBd,osgDBGetVersion)
616 AC_CHECK_LIB(osgTextd,osgTextGetVersion)
617 AC_CHECK_LIB(osgGAd,osgGAGetVersion)
618 AC_CHECK_LIB(osgViewerd,osgViewerGetVersion)
619 AC_CHECK_LIB(osgSimd,osgSimGetVersion)
620 AC_CHECK_LIB(osgParticled,osgParticleGetVersion)
621 OSG_LIBS="$LIBS -losgFXd $openthreads_LIBS"
624 # release version of osg libs
625 AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
626 openthreads_LIBS="$LIBS"
628 AC_CHECK_LIB(osg,osgGetVersion)
629 AC_CHECK_LIB(osgUtil,osgUtilGetVersion)
630 AC_CHECK_LIB(osgDB,osgDBGetVersion)
631 AC_CHECK_LIB(osgText,osgTextGetVersion)
632 AC_CHECK_LIB(osgGA,osgGAGetVersion)
633 AC_CHECK_LIB(osgViewer,osgViewerGetVersion)
634 AC_CHECK_LIB(osgSim,osgSimGetVersion)
635 AC_CHECK_LIB(osgParticle,osgParticleGetVersion)
636 OSG_LIBS="$LIBS -losgFX $openthreads_LIBS"
640 AC_SUBST(openthreads_LIBS)
643 # Checking osg frameworks.
644 AC_CHECK_FRAMEWORK(osgViewer, [#include <osgViewer/Version>], $with_osg_framework)
645 AC_CHECK_FRAMEWORK(osgGA, [#include <osgGA/Version>], $with_osg_framework)
646 AC_CHECK_FRAMEWORK(osgText, [#include <osgText/Version>], $with_osg_framework)
647 AC_CHECK_FRAMEWORK(osgFX, [#include <osgFX/AnisotropicLighting>], $with_osg_framework)
648 AC_CHECK_FRAMEWORK(osgUtil, [#include <osgUtil/Version>], $with_osg_framework)
649 AC_CHECK_FRAMEWORK(osgDB, [#include <osgDB/Version>], $with_osg_framework)
650 AC_CHECK_FRAMEWORK(osgSim, [#include <osgSim/Version>], $with_osg_framework)
651 AC_CHECK_FRAMEWORK(osgParticle, [#include <osgParticle/Version>], $with_osg_framework)
652 AC_CHECK_FRAMEWORK(osg, [#include <osg/Version>], $with_osg_framework)
653 osg_FRAMEWORKS="$FRAMEWORKS"
655 AC_CHECK_FRAMEWORK(OpenThreads, [#include <OpenThreads/Version>], $with_osg_framework)
656 openthreads_FRAMEWORK="$FRAMEWORKS"
657 AC_SUBST(osg_FRAMEWORKS)
658 AC_SUBST(openthreads_FRAMEWORK)
662 if test "x$enable_osgdebug" = "xyes"; then
663 AC_CHECK_LIB(OpenThreadsd,OpenThreadsGetVersion)
664 AC_CHECK_LIB(osgd,osgGetVersion)
665 AC_CHECK_LIB(osgUtild,osgUtilGetVersion)
666 AC_CHECK_LIB(osgDBd,osgDBGetVersion)
667 AC_CHECK_LIB(osgTextd,osgTextGetVersion)
668 AC_CHECK_LIB(osgGAd,osgGAGetVersion)
669 AC_CHECK_LIB(osgViewerd,osgViewerGetVersion)
670 AC_CHECK_LIB(osgSimd,osgSimGetVersion)
671 AC_CHECK_LIB(osgParticled,osgParticleGetVersion)
672 LIBS="$LIBS -losgFXd"
674 AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
675 AC_CHECK_LIB(osg,osgGetVersion)
676 AC_CHECK_LIB(osgUtil,osgUtilGetVersion)
677 AC_CHECK_LIB(osgDB,osgDBGetVersion)
678 AC_CHECK_LIB(osgText,osgTextGetVersion)
679 AC_CHECK_LIB(osgGA,osgGAGetVersion)
680 AC_CHECK_LIB(osgViewer,osgViewerGetVersion)
681 AC_CHECK_LIB(osgSim,osgSimGetVersion)
682 AC_CHECK_LIB(osgParticle,osgParticleGetVersion)
687 AM_CONDITIONAL(HAVE_FRAMEWORK_OSG, test "x$ac_cv_framework_osg" != "x")
691 dnl Check for system installed zlib
692 AC_CHECK_HEADER(zlib.h)
693 if test "x$ac_cv_header_zlib_h" != "xyes"; then
695 echo "zlib library not found."
697 echo "If your OS does not provide an installable package for zlib"
698 echo "you will have to compile and install it first yourself. A copy"
699 echo "of zlib-1.1.4.tar.gz is included with SimGear. You will"
700 echo "have to untar this source code, and follow it's included instructions"
701 echo "to compile and install on your system."
703 echo "configure aborted."
707 dnl Check for Subversion library support
709 save_CPPFLAGS=$CPPFLAGS
711 CPPFLAGS="-I/usr/include/subversion-1 `apr-1-config --includes`"
712 AC_CHECK_LIB(svn_client-1, svn_client_checkout3)
713 AC_CHECK_HEADERS([svn_client.h glut.h])
714 if test "x$ac_cv_header_svn_client_h" != "xyes"; then
715 echo "TerraSync will shell out for command line subversion"
719 echo "TerraSync will use integrated subversion library"
720 AC_SEARCH_LIBS(svn_client_checkout, svn_client-1)
722 svn_CPPFLAGS=$CPPFLAGS
724 AC_SUBST(svn_CPPFLAGS)
727 CPPFLAGS=$save_CPPFLAGS
729 AC_MSG_CHECKING([for feenableexcept])
730 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
731 #include <fenv.h>]], [[feenableexcept(FE_DIVBYZERO)]])],
732 [AC_DEFINE([HAVE_FEENABLEEXCEPT], 1, [define if system has fenableexcept])],
733 AC_MSG_RESULT([yes]),
736 dnl Checks for header files.
739 fcntl.h getopt.h malloc.h memory.h stdlib.h sys/param.h sys/stat.h \
740 sys/time.h sys/timeb.h unistd.h windows.h values.h )
742 dnl Checks for typedefs, structures, and compiler characteristics.
748 dnl Checks for library functions.
750 LIBS="$base_LIBS $network_LIBS $opengl_LIBS"
754 ftime gettimeofday timegm memcpy bcopy mktime strstr rand mkfifo \
755 random drand48 setitimer getitimer signal GetLocalTime rint getrusage \
759 AM_CONFIG_HEADER(src/Include/config.h)
771 scripts/debug/Makefile \
772 scripts/perl/Makefile \
773 scripts/perl/examples/Makefile \
774 scripts/python/Makefile \
776 src/Include/Makefile \
777 src/Include/version.h \
778 src/Include/config.h-msvc6 \
779 src/Include/config.h-msvc71 \
780 src/Include/config.h-msvc8 \
781 src/Aircraft/Makefile \
782 src/Airports/Makefile \
784 src/ATCDCL/Makefile \
785 src/Autopilot/Makefile \
786 src/Cockpit/Makefile \
787 src/Cockpit/built_in/Makefile \
788 src/Environment/Makefile \
789 src/FDM/ExternalNet/Makefile \
790 src/FDM/ExternalPipe/Makefile \
791 src/FDM/JSBSim/Makefile \
792 src/FDM/JSBSim/initialization/Makefile \
793 src/FDM/JSBSim/input_output/Makefile \
794 src/FDM/JSBSim/math/Makefile \
795 src/FDM/JSBSim/models/Makefile \
796 src/FDM/JSBSim/models/flight_control/Makefile \
797 src/FDM/JSBSim/models/atmosphere/Makefile \
798 src/FDM/JSBSim/models/propulsion/Makefile \
799 src/FDM/LaRCsim/Makefile \
800 src/FDM/SP/Makefile \
801 src/FDM/UIUCModel/Makefile \
802 src/FDM/YASim/Makefile \
806 src/Instrumentation/Makefile \
807 src/Instrumentation/KLN89/Makefile \
808 src/Instrumentation/HUD/Makefile \
811 src/Main/runfgfs.bat \
813 src/AIModel/Makefile \
814 src/MultiPlayer/Makefile \
815 src/Navaids/Makefile \
816 src/Network/Makefile \
817 src/Scenery/Makefile \
818 src/Scripting/Makefile \
820 src/Systems/Makefile \
822 src/Traffic/Makefile \
825 utils/GPSsmooth/Makefile \
826 utils/fgadmin/Makefile
827 utils/fgadmin/src/Makefile \
828 utils/js_server/Makefile \
829 utils/Modeller/Makefile \
830 utils/propmerge/Makefile \
831 utils/TerraSync/Makefile \
832 utils/xmlgrep/Makefile \
833 utils/fgviewer/Makefile
837 AC_OUTPUT_COMMANDS([chmod 755 src/Main/runfgfs])
840 echo "Configure Summary"
841 echo "================="
843 echo "Prefix: $prefix"
845 if test "x$with_logging" != "x"; then
846 echo "Debug messages: $with_logging"
848 echo "Debug messages: yes"
851 echo -n "Automake version: "
852 automake --version | head -n 1
854 if test "x$with_multiplayer" != "xno"; then
855 echo "Building with multiplayer support"
858 if test "x$with_threads" = "xyes"; then
864 if test "x$with_eventinput" = "xyes"; then
865 echo "event input: yes"
867 echo "event input: no"
870 if test "x$enable_sp_fdms" != "xno"; then
871 echo "Include special purpose flight models: yes"
873 echo "Include special purpose flight models: no"