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.37.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(cocoa_framework, [ --with-cocoa-framework Use the Cocoa rather than Carbon]])
89 if test "x$with_cocoa_framework" != "x" ; then
91 AC_MSG_NOTICE([Using Cocoa framework])
94 AC_MSG_NOTICE([Using Carbon framework])
97 AC_ARG_WITH(osg_framework, [ --with-osg-framework=PREFIX Specify the prefix path to osg frameworks [default=standard framework paths]])
98 if test "x$with_osg_framework" != "x" ; then
99 echo "osg prefix is $with_osg_framework"
100 export DYLD_FRAMEWORK_PATH="$DYLD_FRAMEWORK_PATH:$with_osg_framework"
103 AC_ARG_WITH(plib_framework, [ --with-plib-framework=PREFIX Specify the prefix path to PLIB framework [default=standard framework paths]])
104 if test "x$with_plib_framework" != "x" ; then
105 echo "plib prefix is $with_plib_framework"
106 export DYLD_FRAMEWORK_PATH="$DYLD_FRAMEWORK_PATH:$with_plib_framework"
109 AC_ARG_WITH(openal_framework, [ --with-openal-framework=PREFIX Speicfy the prefix path to OpenAL.framework ])
110 if test "x$with_openal_framework" != "x"; then
111 echo "OpenAL framework prefix is $with_openal_framework"
117 dnl Determine an extra directories to add to include/lib search paths
119 *-apple-darwin* | *-*-mingw32*)
120 echo no EXTRA_DIRS for $host
124 if test -d /usr/local ; then
125 EXTRA_DIRS="${EXTRA_DIRS} /usr/local"
130 if test -d /usr/X11R6 ; then
131 EXTRA_DIR1="/usr/X11R6"
133 if test -d /opt/X11R6 ; then
134 EXTRA_DIR2="/opt/X11R6"
136 EXTRA_DIRS="${EXTRA_DIRS} $EXTRA_DIR1 $EXTRA_DIR2 /usr/local"
140 wi_EXTRA_DIRS(no, ${EXTRA_DIRS})
145 if test "$CXX" = "CC"; then
148 CXXFLAGS="$CXXFLAGS -c99 -I$with_simgear/include/simgear/compatibility"
149 CFLAGS="$CFLAGS -c99"
163 dnl set logging; default value of with_logging=yes
164 AC_ARG_WITH(logging, [ --with-logging Include logging output (default)])
165 if test "x$with_logging" = "xno" ; then
166 AC_DEFINE([FG_NDEBUG], 1, [Define for no logging output])
169 AC_ARG_ENABLE(sp_fdms, [ --enable-sp-fdms Include special purpose Flight Models], [enable_sp_fdms="$enableval"] )
170 if test "x$enable_sp_fdms" != "xno"; then
171 AC_DEFINE([ENABLE_SP_FDM], 1, [Define to include special purpose FDMs])
173 AC_DEFINE([ENABLE_SP_FDM], 0, [Define to include special purpose FDMs])
175 AM_CONDITIONAL(ENABLE_SP_FDM, test "x$enable_sp_fdms" != "xno")
178 dnl EXPERIMENTAL generic event driven input device
180 AC_ARG_WITH(eventinput, [ --with-eventinput Include event driven input (EXPERIMENTAL) [default=no]], [], [with_eventinput=no])
181 if test "x$with_eventinput" = "xyes"; then
182 AC_DEFINE([WITH_EVENTINPUT], 1, [Define to enable generic event driven input device])
184 dnl OS specific sources for event driven input
185 dnl Linux and Mac OS X are supported at this moment
187 eventinput_EXTRA_OBJS="FGMacOSXEventInput.o"
188 eventinput_INCUDES=""
193 dnl FIXME: include paths for dbus are hard-coded at this moment.
194 dnl FIXME: these must be found in configure
196 eventinput_EXTRA_OBJS="FGLinuxEventInput.o"
197 eventinput_INCLUDES="-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/lib/dbus-1.0/include"
198 eventinput_LIBS="-ldbus-1 -lhal"
201 echo "Event driven input is not supported on ${host}."
204 AC_SUBST(eventinput_EXTRA_OBJS)
205 AC_SUBST(eventinput_INCLUDES)
206 AC_SUBST(eventinput_LIBS)
208 AM_CONDITIONAL(WITH_EVENTINPUT, test "x$with_eventinput" = "xyes")
210 dnl Thread related checks
212 AC_ARG_WITH(threads, [ --with-threads Include tile loading threads [default=yes]], [], [with_threads=yes])
213 if test "x$with_threads" = "xyes"; then
214 AC_DEFINE([ENABLE_THREADS], 1, [Define to enable threaded tile paging])
215 CXXFLAGS="$CXXFLAGS -D_REENTRANT"
216 CFLAGS="$CFLAGS -D_REENTRANT"
218 AC_CHECK_HEADER(pthread.h)
219 AM_CONDITIONAL(WITH_THREADS, test "x$with_threads" = "xyes")
221 dnl Used by JSBSim to conditionally compile in fgfs interface code
222 AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
224 # Check for MS Windows environment
225 AC_CHECK_HEADER(windows.h)
227 dnl Using AM_CONDITIONAL is a step out of the protected little
228 dnl automake fold so it is potentially dangerous. But, we are
229 dnl beginning to run into cases where the standard checks are not
230 dnl enough. AM_CONDITIONALS are then referenced to conditionally
231 dnl build a Makefile.in from a Makefile.am which lets us define custom
232 dnl includes, compile alternative source files, etc.
234 dnl Check for external variables daylight and timezone.
236 if test "$have_daylight" = yes; then
237 AC_DEFINE([HAVE_DAYLIGHT], 1, [Define if system has daylight variable])
241 if test "$have_timezone" = yes; then
242 AC_DEFINE([HAVE_TIMEZONE], 1, [Define if system has timezone variable])
246 dnl add joystick support libraries
247 dnl search for FreeBSD library
248 AC_SEARCH_LIBS(hid_init, usbhid)
249 joystick_LIBS="$LIBS"
253 dnl ENABLE_AUDIO_SUPPORT could be depricated at any time in favor of
254 dnl just assuming we have audio support on all platform. We can
255 dnl depend on plib to hide the details.
256 AC_DEFINE([ENABLE_AUDIO_SUPPORT], 1, [Define for audio support])
258 dnl X11 might be installed on Mac OS X or cygwin/mingwin, we don't want
259 dnl to use it if it is.
261 *-apple-darwin* | *-*-cygwin* | *-*-mingw32*)
262 echo no fancy X11 check
271 dnl Checks for libraries.
273 dnl Thread related checks
274 AC_SEARCH_LIBS(pthread_create, [pthread c_r])
275 if test "x$ac_cv_header_pthread_h" = "xyes"; then
276 if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
277 CXXFLAGS="-pthread $CXXFLAGS"
278 CFLAGS="-pthread $CFLAGS"
285 dnl search for network related libraries
286 AC_SEARCH_LIBS(inet_addr, xnet)
287 AC_SEARCH_LIBS(socket, socket)
288 AC_SEARCH_LIBS(main, nsl)
293 dnl check for some default libraries
294 AC_SEARCH_LIBS(sqrt, [am ffm fm fastm m])
295 AC_SEARCH_LIBS(ceil, m)
296 AC_SEARCH_LIBS(dlclose, dl)
297 AC_SEARCH_LIBS(clock_gettime, rt)
301 dnl Check for SDL or glut if enabled.
302 AC_ARG_ENABLE(osgviewer, [ --enable-osgviewer Configure to use osgViewer(default)], [enable_osgviewer="$enableval"])
303 AC_ARG_ENABLE(sdl, [ --enable-sdl Configure to use SDL], [enable_sdl="$enableval"])
304 AC_ARG_ENABLE(glut, [ --enable-glut Configure to use GLUT], [enable_glut="$enableval"])
305 AM_CONDITIONAL(USE_SDL, test "x$enable_sdl" = "xyes")
306 AM_CONDITIONAL(USE_GLUT, test "x$enable_glut" = "xyes")
307 if test "x$enable_sdl" != "xyes" -a "x$enable_glut" != "xyes" -a "x$enable_osgviewer" != "xno"; then
308 enable_osgviewer="yes"
310 if test \( "x$enable_osgviewer" = "xyes" \
311 -a \( "x$enable_sdl" = "xyes" -o "x$enable_glut" = "xyes" \) \) \
312 -o \( "x$enable_sdl" = "xyes" -a "x$enable_glut" = "xyes" \); then
313 echo " Only one of --enable-osgviewer, --enable-sdl, or --enable -glut may"
317 AC_DEFINE([PU_USE_NONE], 1, [Define to use application's pu callbacks])
319 AC_ARG_ENABLE(osgdebug, [ --enable-osgdebug Use OSG debug libraries], [enable_osgdebug="$enableval"])
321 dnl check for OpenGL related libraries
323 *-*-cygwin* | *-*-mingw32*)
324 dnl CygWin under Windoze.
326 echo Win32 specific hacks...
327 AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
328 AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
330 if test "x$enable_sdl" = "xyes"; then
331 AC_SEARCH_LIBS(SDL_Init, SDL)
333 LIBS="$LIBS -lglut32"
336 LIBS="$LIBS -lglu32 -lopengl32 -luser32 -lgdi32"
337 joystick_LIBS="$joystick_LIBS -lwinmm"
339 dnl add -lwsock32 for mingwin
342 echo "********** BUILDING FOR MINGW32 *************"
343 network_LIBS="$network_LIBS -lws2_32"
347 echo "Will link apps with $LIBS"
354 LIBS="$LIBS -framework GLUT -framework OpenGL -framework AGL -framework $macAPI -lobjc"
355 joystick_LIBS="$joystick_LIBS -framework IOKit -framework CoreFoundation"
359 dnl X-Windows based machines
361 dnl Skip X11 library tests if requested.
362 if test "x$no_x" != "xyes"; then
363 AC_SEARCH_LIBS(XCreateWindow, X11)
364 AC_SEARCH_LIBS(XShmCreateImage, Xext)
365 AC_SEARCH_LIBS(XGetExtensionVersion, Xi)
366 AC_SEARCH_LIBS(IceOpenConnection, ICE)
367 AC_SEARCH_LIBS(SmcOpenConnection, SM)
368 AC_SEARCH_LIBS(XtMalloc, Xt)
369 AC_SEARCH_LIBS(XmuLookupStandardColormap, Xmu)
372 AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
373 if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
374 dnl if GLcore found, then also check for GL
375 AC_SEARCH_LIBS(glXCreateContext, GL)
378 dnl if using mesa, check for xmesa.h
379 if test "x$ac_cv_search_glNewList" = "x-lMesaGL"; then
380 AC_CHECK_HEADER(GL/fxmesa.h)
381 if test "x$ac_cv_header_GL_fxmesa_h" = "xyes"; then
382 AC_DEFINE([XMESA], 1, [Define for fxmesa])
383 AC_DEFINE([FX], 1, [Define for fxmesa])
387 AC_SEARCH_LIBS(gluLookAt, [ GLU MesaGLU ])
388 AC_SEARCH_LIBS(glutGetModifiers, [ glut freeglut ])
389 if test "x$enable_sdl" = "xyes"; then
390 AC_SEARCH_LIBS(SDL_Init, SDL)
397 LIBS="$base_LIBS $joystick_LIBS"
399 dnl check for OpenAL libraries
403 *-*-cygwin* | *-*-mingw32*)
404 dnl CygWin under Windoze.
405 INCLUDES="$INCLUDES -I/usr/local/include/"
406 LIBS="$LIBS -L/usr/local/lib"
407 AC_SEARCH_LIBS(alGenBuffers, [ openal32 openal ] )
408 AC_SEARCH_LIBS(alutInit, [ openal32 ALut alut ] )
409 LIBS="$LIBS -lwinmm -ldsound -ldxguid -lole32"
411 OPENAL_OK="$ac_cv_search_alGenBuffers"
412 ALUT_OK="$ac_cv_search_alutInit"
418 # Mac OS X has OpenAL.framework with ALUT by default
419 # so we can use it without checking it.
420 # Note: SimGear needs to check the existance of alut.h since it includes the header.
421 LIBS="$LIBS -framework IOKit -framework OpenAL"
426 dnl Check for OpenAL.framework when --with-openal-framework is specified
427 if test "x$with_openal_framework" != "x"; then
428 AC_CHECK_FRAMEWORK(OpenAL, [#include <OpenAL/alut.h>], $with_openal_framework)
434 dnl default unix style machines
437 LIBS="$LIBS $thread_LIBS"
438 AC_SEARCH_LIBS(alGenBuffers, openal)
439 AC_SEARCH_LIBS(alutInit, [ alut openal ] )
440 OPENAL_OK="$ac_cv_search_alGenBuffers"
441 ALUT_OK="$ac_cv_search_alutInit"
448 if test "$OPENAL_OK" == "no"; then
450 echo "You *must* have the openal library installed on your system to build"
453 echo "Please see README.OpenAL for more details."
455 echo "configure aborted."
459 if test "$ALUT_OK" == "no"; then
461 echo "You *must* have the alut library installed on your system to build"
464 echo "Please see README.OpenAL for more details."
466 echo "configure aborted."
474 AC_SUBST(openal_LIBS)
475 AC_SUBST(opengl_LIBS)
476 AC_SUBST(thread_LIBS)
477 AC_SUBST(network_LIBS)
478 AC_SUBST(joystick_LIBS)
480 # The following are C++ items that need to be tested for with the c++
485 dnl Check for the presence of SimGear
486 if test "x$with_simgear" != "x"; then
487 AC_CHECK_HEADER($with_simgear/include/simgear/version.h, [ac_cv_header_simgear_version_h=yes], [ac_cv_header_simgear_version_h=no])
489 AC_CHECK_HEADER(simgear/version.h)
491 if test "x$ac_cv_header_simgear_version_h" != "xyes"; then
493 echo "You *must* have the SimGear support library installed on your system"
494 echo "to build the FGFS simulator!"
496 echo "Please see README.SimGear for more details."
498 echo "configure aborted."
502 AC_MSG_CHECKING([for SimGear 1.9.0 or newer])
506 #include <simgear/version.h>
508 #define STRINGIFY(X) XSTRINGIFY(X)
509 #define XSTRINGIFY(X) #X
516 int major, minor, micro;
518 /* printf("%d.%d.%d or greater, ", MIN_MAJOR, MIN_MINOR, MIN_MICRO); */
519 printf("[found %s] ... ", STRINGIFY(SIMGEAR_VERSION));
521 sscanf( STRINGIFY(SIMGEAR_VERSION), "%d.%d.%d", &major, &minor, µ );
523 if ( (major < MIN_MAJOR) ||
524 (major == MIN_MAJOR && minor < MIN_MINOR) ||
525 (major == MIN_MAJOR && minor == MIN_MINOR && micro < MIN_MICRO) ) {
534 [AC_MSG_RESULT(wrong version);
535 AC_MSG_ERROR([Install latest SimGear first...])],
541 dnl Check if SimGear was built with Norman's JPEG factory support
542 if test "x$with_simgear" != "x"; then
543 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])
545 AC_CHECK_HEADER(simgear/screen/jpgfactory.hxx)
547 if test "x$ac_cv_header_simgear_screen_jpgfactory_hxx" = "xyes"; then
548 AC_CHECK_LIB(jpeg, jpeg_start_compress)
549 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" != "xyes" ; then
551 echo "The JPEG factory code was built and installed with SimGear."
552 echo "However it appears the libjpeg is no longer installed."
553 echo "You need to install libjpeg or remove jpgfactory support from"
556 echo "libjpeg is available at :"
557 echo " ftp://ftp.uu.net in the directory graphics/jpeg"
560 AC_DEFINE([FG_JPEG_SERVER], 1,
561 [Define to build with jpeg screen shot server])
563 AM_CONDITIONAL(ENABLE_JPEG_SERVER, test "x$ac_cv_header_simgear_screen_jpgfactory_hxx" = "xyes")
565 # Check for "plib" without which we cannot go on
568 if test "x$with_plib_framework" != "x"; then
569 AC_CHECK_FRAMEWORK(PLIB, [#include <plib/ul.h>], $with_plib_framework, no)
570 plib_FRAMEWORK="$FRAMEWORKS"
571 AC_SUBST(plib_FRAMEWORK)
576 AM_CONDITIONAL(HAVE_FRAMEWORK_PLIB, test "x$ac_cv_framework_PLIB" != "x")
578 AC_CHECK_HEADER(plib/ul.h)
579 if test "x$ac_cv_header_plib_ul_h" != "xyes"; then
581 echo "You *must* have the plib library installed on your system to build"
582 echo "the FGFS simulator!"
584 echo "Please see README.plib for more details."
586 echo "configure aborted."
590 echo "$DYLD_FRAMEWORK_PATH"
591 AC_MSG_CHECKING([for plib 1.8.5 or newer])
595 #define MIN_PLIB_VERSION 185
598 if ( PLIB_VERSION < MIN_PLIB_VERSION ) {
607 [AC_MSG_RESULT(wrong version);
608 AC_MSG_ERROR([Install plib 1.8.5 or later first...])],
612 dnl If we get here then plib is available, so force use of plib
614 AC_DEFINE([ENABLE_PLIB_JOYSTICK], 1, [Define to enable plib joystick support])
616 # Find the OSG libraries. Note special handling for OS X frameworks
619 if test "x$with_osg_framework" = "x"; then
620 if test "x$enable_osgdebug" = "xyes"; then
621 # debug version of osg libs
622 AC_CHECK_LIB(OpenThreadsd,OpenThreadsGetVersion)
623 openthreads_LIBS="$LIBS"
625 AC_CHECK_LIB(osgd,osgGetVersion)
626 AC_CHECK_LIB(osgUtild,osgUtilGetVersion)
627 AC_CHECK_LIB(osgDBd,osgDBGetVersion)
628 AC_CHECK_LIB(osgTextd,osgTextGetVersion)
629 AC_CHECK_LIB(osgGAd,osgGAGetVersion)
630 AC_CHECK_LIB(osgViewerd,osgViewerGetVersion)
631 AC_CHECK_LIB(osgSimd,osgSimGetVersion)
632 AC_CHECK_LIB(osgParticled,osgParticleGetVersion)
633 OSG_LIBS="$LIBS -losgFXd $openthreads_LIBS"
636 # release version of osg libs
637 AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
638 openthreads_LIBS="$LIBS"
640 AC_CHECK_LIB(osg,osgGetVersion)
641 AC_CHECK_LIB(osgUtil,osgUtilGetVersion)
642 AC_CHECK_LIB(osgDB,osgDBGetVersion)
643 AC_CHECK_LIB(osgText,osgTextGetVersion)
644 AC_CHECK_LIB(osgGA,osgGAGetVersion)
645 AC_CHECK_LIB(osgViewer,osgViewerGetVersion)
646 AC_CHECK_LIB(osgSim,osgSimGetVersion)
647 AC_CHECK_LIB(osgParticle,osgParticleGetVersion)
648 OSG_LIBS="$LIBS -losgFX $openthreads_LIBS"
652 AC_SUBST(openthreads_LIBS)
655 # Checking osg frameworks.
656 AC_CHECK_FRAMEWORK(osgViewer, [#include <osgViewer/Version>], $with_osg_framework)
657 AC_CHECK_FRAMEWORK(osgGA, [#include <osgGA/Version>], $with_osg_framework)
658 AC_CHECK_FRAMEWORK(osgText, [#include <osgText/Version>], $with_osg_framework)
659 AC_CHECK_FRAMEWORK(osgFX, [#include <osgFX/AnisotropicLighting>], $with_osg_framework)
660 AC_CHECK_FRAMEWORK(osgUtil, [#include <osgUtil/Version>], $with_osg_framework)
661 AC_CHECK_FRAMEWORK(osgDB, [#include <osgDB/Version>], $with_osg_framework)
662 AC_CHECK_FRAMEWORK(osgSim, [#include <osgSim/Version>], $with_osg_framework)
663 AC_CHECK_FRAMEWORK(osgParticle, [#include <osgParticle/Version>], $with_osg_framework)
664 AC_CHECK_FRAMEWORK(osg, [#include <osg/Version>], $with_osg_framework)
665 osg_FRAMEWORKS="$FRAMEWORKS"
667 AC_CHECK_FRAMEWORK(OpenThreads, [#include <OpenThreads/Version>], $with_osg_framework)
668 openthreads_FRAMEWORK="$FRAMEWORKS"
669 AC_SUBST(osg_FRAMEWORKS)
670 AC_SUBST(openthreads_FRAMEWORK)
674 if test "x$enable_osgdebug" = "xyes"; then
675 AC_CHECK_LIB(OpenThreadsd,OpenThreadsGetVersion)
676 AC_CHECK_LIB(osgd,osgGetVersion)
677 AC_CHECK_LIB(osgUtild,osgUtilGetVersion)
678 AC_CHECK_LIB(osgDBd,osgDBGetVersion)
679 AC_CHECK_LIB(osgTextd,osgTextGetVersion)
680 AC_CHECK_LIB(osgGAd,osgGAGetVersion)
681 AC_CHECK_LIB(osgViewerd,osgViewerGetVersion)
682 AC_CHECK_LIB(osgSimd,osgSimGetVersion)
683 AC_CHECK_LIB(osgParticled,osgParticleGetVersion)
684 LIBS="$LIBS -losgFXd"
686 AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
687 AC_CHECK_LIB(osg,osgGetVersion)
688 AC_CHECK_LIB(osgUtil,osgUtilGetVersion)
689 AC_CHECK_LIB(osgDB,osgDBGetVersion)
690 AC_CHECK_LIB(osgText,osgTextGetVersion)
691 AC_CHECK_LIB(osgGA,osgGAGetVersion)
692 AC_CHECK_LIB(osgViewer,osgViewerGetVersion)
693 AC_CHECK_LIB(osgSim,osgSimGetVersion)
694 AC_CHECK_LIB(osgParticle,osgParticleGetVersion)
699 AM_CONDITIONAL(HAVE_FRAMEWORK_OSG, test "x$ac_cv_framework_osg" != "x")
701 AC_CHECK_HEADER(osg/Version)
702 if test "x$ac_cv_header_osg_Version" != "xyes"; then
704 echo "You *must* have the OpenSceneGraph support library installed on your system"
705 echo "to build the FGFS simulator!"
707 echo "Please see README.OSG for more details."
709 echo "configure aborted."
714 AC_MSG_CHECKING([checking for osg::CullSettings::CLEAR_MASK])
716 [AC_LANG_PROGRAM([[#include <osg/CullSettings>]],
717 [[osg::CullSettings::VariablesMask mask = osg::CullSettings::CLEAR_MASK;]])],
718 [AC_DEFINE([HAVE_CULLSETTINGS_CLEAR_MASK],1,[define if OSG has CullSettings::CLEAR_MASK])
719 AC_MSG_RESULT([yes])],
720 [AC_MSG_RESULT([no])])
723 dnl Check for system installed zlib
724 AC_CHECK_HEADER(zlib.h)
725 if test "x$ac_cv_header_zlib_h" != "xyes"; then
727 echo "zlib library not found."
729 echo "If your OS does not provide an installable package for zlib"
730 echo "you will have to compile and install it first yourself. A copy"
731 echo "of zlib-1.1.4.tar.gz is included with SimGear. You will"
732 echo "have to untar this source code, and follow it's included instructions"
733 echo "to compile and install on your system."
735 echo "configure aborted."
739 dnl Check for Subversion library support
741 save_CPPFLAGS=$CPPFLAGS
743 CPPFLAGS="-I/usr/include/subversion-1 `apr-1-config --includes`"
744 AC_CHECK_LIB(svn_client-1, svn_client_checkout3)
745 AC_CHECK_HEADERS([svn_client.h glut.h])
746 if test "x$ac_cv_header_svn_client_h" != "xyes"; then
747 echo "TerraSync will shell out for command line subversion"
751 echo "TerraSync will use integrated subversion library"
752 AC_SEARCH_LIBS(svn_client_checkout, svn_client-1)
754 svn_CPPFLAGS=$CPPFLAGS
756 AC_SUBST(svn_CPPFLAGS)
759 CPPFLAGS=$save_CPPFLAGS
761 AC_MSG_CHECKING([for feenableexcept])
762 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
763 #include <fenv.h>]], [[feenableexcept(FE_DIVBYZERO)]])],
764 [AC_DEFINE([HAVE_FEENABLEEXCEPT], 1, [define if system has fenableexcept])],
765 AC_MSG_RESULT([yes]),
768 dnl Checks for header files.
771 fcntl.h getopt.h malloc.h memory.h stdlib.h sys/param.h sys/stat.h \
772 sys/time.h sys/timeb.h unistd.h windows.h values.h )
774 dnl Checks for typedefs, structures, and compiler characteristics.
780 dnl Checks for library functions.
782 LIBS="$base_LIBS $network_LIBS $opengl_LIBS"
786 ftime gettimeofday timegm memcpy bcopy mktime strstr rand mkfifo \
787 random drand48 setitimer getitimer signal GetLocalTime rint getrusage \
791 AM_CONFIG_HEADER(src/Include/config.h)
803 scripts/debug/Makefile \
804 scripts/perl/Makefile \
805 scripts/perl/examples/Makefile \
806 scripts/python/Makefile \
808 src/Include/Makefile \
809 src/Include/version.h \
810 src/Include/config.h-msvc6 \
811 src/Include/config.h-msvc71 \
812 src/Include/config.h-msvc8 \
813 src/Aircraft/Makefile \
814 src/Airports/Makefile \
816 src/ATCDCL/Makefile \
817 src/Autopilot/Makefile \
818 src/Cockpit/Makefile \
819 src/Cockpit/built_in/Makefile \
820 src/Environment/Makefile \
821 src/FDM/ExternalNet/Makefile \
822 src/FDM/ExternalPipe/Makefile \
823 src/FDM/JSBSim/Makefile \
824 src/FDM/JSBSim/initialization/Makefile \
825 src/FDM/JSBSim/input_output/Makefile \
826 src/FDM/JSBSim/math/Makefile \
827 src/FDM/JSBSim/models/Makefile \
828 src/FDM/JSBSim/models/flight_control/Makefile \
829 src/FDM/JSBSim/models/atmosphere/Makefile \
830 src/FDM/JSBSim/models/propulsion/Makefile \
831 src/FDM/LaRCsim/Makefile \
832 src/FDM/SP/Makefile \
833 src/FDM/UIUCModel/Makefile \
834 src/FDM/YASim/Makefile \
838 src/Instrumentation/Makefile \
839 src/Instrumentation/KLN89/Makefile \
840 src/Instrumentation/HUD/Makefile \
843 src/Main/runfgfs.bat \
845 src/AIModel/Makefile \
846 src/MultiPlayer/Makefile \
847 src/Navaids/Makefile \
848 src/Network/Makefile \
849 src/Scenery/Makefile \
850 src/Scripting/Makefile \
852 src/Systems/Makefile \
854 src/Traffic/Makefile \
857 utils/GPSsmooth/Makefile \
858 utils/fgadmin/Makefile
859 utils/fgadmin/src/Makefile \
860 utils/js_server/Makefile \
861 utils/Modeller/Makefile \
862 utils/propmerge/Makefile \
863 utils/TerraSync/Makefile \
864 utils/xmlgrep/Makefile \
865 utils/fgviewer/Makefile
869 AC_OUTPUT_COMMANDS([chmod 755 src/Main/runfgfs])
872 echo "Configure Summary"
873 echo "================="
875 echo "Prefix: $prefix"
877 if test "x$with_logging" != "x"; then
878 echo "Debug messages: $with_logging"
880 echo "Debug messages: yes"
883 echo -n "Automake version: "
884 automake --version | head -n 1
886 if test "x$with_multiplayer" != "xno"; then
887 echo "Building with multiplayer support"
890 if test "x$with_threads" = "xyes"; then
896 if test "x$with_eventinput" = "xyes"; then
897 echo "event input: yes"
899 echo "event input: no"
902 if test "x$enable_sp_fdms" != "xno"; then
903 echo "Include special purpose flight models: yes"
905 echo "Include special purpose flight models: no"