]> git.mxchange.org Git - flightgear.git/blobdiff - configure.in
...
[flightgear.git] / configure.in
index da5a73a60dca351650105b191ca66cef939dd033..304eb6c75dc4c8d714251ebd68877753198ec334 100644 (file)
@@ -5,12 +5,8 @@ dnl
 
 AC_INIT(Simulator/Aircraft/aircraft.c)
 
-dnl Let the Win32 user specify if they want to build with the SGI
-dnl opengl.dll as opposed to the more standard openg32.dll
-AC_ARG_WITH(sgiopengl, [  --with-sgiopengl        Build against opengl.dll glu.dll and glut.dll])
-
 dnl Initialize the automake stuff
-AM_INIT_AUTOMAKE(FlightGear, 0.52)
+AM_INIT_AUTOMAKE(FlightGear, 0.55)
 
 dnl Checks for programs.
 AC_PROG_MAKE_SET
@@ -32,6 +28,28 @@ dnl AC_ISC_POSIX
 dnl Check to see if this `configure' is being run in the `Cygwin32' environment
 dnl AM_CYGWIN32
 
+dnl specify if we are building with "checker"
+AC_ARG_WITH(efence, [  --with-efence           Specify if we are building with "electric-fence"])
+
+if test "x$with_efence" = "xyes" ; then
+    echo "Building with efence"
+    LIBS= "$LIBS -lefence"
+fi
+
+dnl specify the compiled flight model
+AC_ARG_WITH(flight-model, [  --with-flight-model=xxx Specify the flight model (navion, cherokee)])
+
+if test "x$with_flight_model" = "xcherokee" ; then
+    echo "Building with cherokee flight model"
+else 
+    echo "Building with navion flight model"
+fi
+AM_CONDITIONAL(ENABLE_CHEROKEE, test "x$with_flight_model" = "xcherokee")
+
+dnl Let the Win32 user specify if they want to build with the SGI
+dnl opengl.dll as opposed to the more standard openg32.dll
+AC_ARG_WITH(sgi-opengl, [  --with-sgi-opengl       Build against SGI's opengl.dll glu.dll and glut.dll])
+
 dnl Check for MS Windows environment
 AC_CHECK_HEADER(windows.h)
 
@@ -120,7 +138,11 @@ if test "x$ac_cv_header_windows_h" != "xyes" ; then
        AC_CHECK_LIB(MesaGLU, gluLookAt)
     fi
 
+    dnl check for glut
     AC_CHECK_LIB(glut, glutGetModifiers)
+
+    dnl test for glutGameModeString
+    AC_CHECK_LIB(glut, glutGameModeString)
 else
     dnl Win32 is a little wierd because it has to try to handle the various
     dnl winbloze-isms.  We'll just do this manually for now.
@@ -131,7 +153,7 @@ else
     dnl force a failed check since we will be building under windoze
     AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes")
 
-    if test "x$with_sgiopengl" = "xyes" ; then
+    if test "x$with_sgi_opengl" = "xyes" ; then
         echo "Building with glut.dll, glu.dll, and opengl.dll"
        WIN32_GLUT=glut
        WIN32_GLU=glu
@@ -170,6 +192,7 @@ else
     echo "    adding -luser32 -lgdi32"
     LIBS="$LIBS -luser32 -lgdi32"
     ac_cv_lib_glut_glutGetModifiers="yes"
+    ac_cv_lib_glut_glutGameModeString="yes"
 fi
 
 dnl Checks for header files.
@@ -188,11 +211,21 @@ dnl Checks for library functions.
 AC_TYPE_SIGNAL
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS( ftime gettimeofday mktime strstr rand random \
-       setitimer getitimer signal GetLocalTime rint )
+       setitimer getitimer signal GetLocalTime rint getrusage )
 
 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
     echo 
-    echo "Unable to find the necessary GL libraries."
+    echo "Unable to find the necessary OpenGL or GLUT libraries."
+    echo "See config.log for automated test details and results ..."
+    exit 1
+fi
+
+if test "x$ac_cv_lib_glut_glutGameModeString" = "xno"; then
+    echo
+    echo "Your version of glut doesn't support game mode."
+    echo "You need to fetch and install the latest version of glut from:"
+    echo
+    echo "    http://reality.sgi.com/opengl/glut3/glut3.html"
     exit 1
 fi
 
@@ -208,12 +241,15 @@ AC_OUTPUT( \
        Lib/Bucket/Makefile \
        Lib/Debug/Makefile \
        Lib/DEM/Makefile \
+       Lib/gpc/Makefile \
        Lib/Math/Makefile \
+       Lib/Misc/Makefile \
        Lib/PUI/Makefile \
        Lib/XGL/Makefile \
        Lib/zlib/Makefile \
        Simulator/Makefile \
        Simulator/Aircraft/Makefile \
+       Simulator/Airports/Makefile \
        Simulator/Astro/Makefile \
        Simulator/Autopilot/Makefile \
        Simulator/Cockpit/Makefile \
@@ -224,9 +260,10 @@ AC_OUTPUT( \
        Simulator/GUI/Makefile \
        Simulator/Joystick/Makefile \
        Simulator/Main/Makefile \
-       Simulator/Main/runfg \
-       Simulator/Main/runfg.bat \
+       Simulator/Main/runfgfs \
+       Simulator/Main/runfgfs.bat \
        Simulator/Makefile \
+       Simulator/Objects/Makefile \
        Simulator/Scenery/Makefile \
        Simulator/Time/Makefile \
        Simulator/Weather/Makefile \
@@ -238,9 +275,12 @@ AC_OUTPUT( \
        Tools/DemRaw2ascii/Makefile \
        Tools/FixNode/Makefile \
        Tools/FixObj/Makefile \
+       Tools/GenAirports/Makefile \
        Tools/SplitTris/Makefile \
        Tools/Stripe_w/Makefile \
        Tools/Tri2obj/Makefile \
        Tools/Triangle/Makefile \
        Tests/Makefile \
 )
+
+AC_OUTPUT_COMMANDS([chmod 755 Simulator/Main/runfgfs])