]> git.mxchange.org Git - flightgear.git/blobdiff - configure.ac
Patch from Julian Foad to fix wrapping behaviour for property-adjust
[flightgear.git] / configure.ac
index 58a41557d98f19ce0617f80842bcc2f29e44d5b9..083aab14420048caa4532bd271d8903d21d84332 100644 (file)
@@ -21,19 +21,32 @@ AC_PROG_RANLIB
 AC_PROG_INSTALL
 AC_PROG_LN_S
 
+# specify the simgear location
+AC_ARG_WITH(simgear, [  --with-simgear=PREFIX   Specify the prefix path to simgear])
+
+if test "x$with_simgear" != "x" ; then
+    echo "SimGear prefix path is $with_simgear"
+    EXTRA_DIRS="${EXTRA_DIRS} $with_simgear"
+fi
+
 dnl set the $host variable based on local machine/os
 AC_CANONICAL_HOST
 
-dnl Used on the Irix platform
-AR="ar"
-ARFLAGS="cru"
 case "${host}" in
 *-*-irix*)
     if test "$CXX" = "CC"; then
         AR="CC -ar"
         ARFLAGS="-o"
+        CXXFLAGS="$CXXFLAGS -I$with_simgear/include/simgear/compatibility"
+    else
+        AR="ar"
+        ARFLAGS="cru"
     fi
     ;;
+*)
+    AR="ar"
+    ARFLAGS="cru"
+    ;;
 esac
 AC_SUBST(AR)
 AC_SUBST(ARFLAGS)
@@ -94,14 +107,6 @@ if test "x$with_metakit" != "x" ; then
     EXTRA_DIRS="${EXTRA_DIRS} $with_metakit"
 fi
 
-# specify the simgear location
-AC_ARG_WITH(simgear, [  --with-simgear=PREFIX   Specify the prefix path to simgear])
-
-if test "x$with_simgear" != "x" ; then
-    echo "SimGear prefix path is $with_simgear"
-    EXTRA_DIRS="${EXTRA_DIRS} $with_simgear"
-fi
-
 dnl Used by JSBSim to conditionally compile in fgfs interface code
 AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
 
@@ -159,6 +164,10 @@ case "${host}" in
 
 esac
 AC_SUBST(audio_LIBS)
+
+dnl ENABLE_AUDIO_SUPPORT could be depricated at any time in favor of
+dnl just assuming we have audio support on all platform.  We can
+dnl depend on plib to hide the details.
 AC_DEFINE([ENABLE_AUDIO_SUPPORT], 1, [Define for audio support])
 
 dnl X11 might be installed on Mac OS X or cygwin/mingwin, we don't want
@@ -180,11 +189,6 @@ null_LIBS="$LIBS"
 
 AC_CHECK_LIB(m, cos)
 
-dnl MINGW requires libwsock32
-if test  "x$is_mingw" = "xyes" ; then
-    LIBS="$LIBS -lws2_32"
-fi
-
 base_LIBS="$LIBS"
 
 dnl Thread related checks
@@ -220,7 +224,8 @@ case "${host}" in
     dnl add -lwsock32 for mingwin
     case "${host}" in
     *-*-mingw32*)
-        LIBS="$LIBS -lws2_32"
+        echo "********** BUILDING FOR MINGW32 *************"
+        base_LIBS="$base_LIBS -lws2_32"
         ;;
     esac
 
@@ -276,7 +281,11 @@ case "${host}" in
        AC_CHECK_LIB(MesaGLU, gluLookAt)
     fi
 
-    LIBS="$LIBS -lglut"
+    AC_CHECK_LIB(glut, glutGetModifiers)
+    if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno" ; then
+        dnl if no "real" glut, check for freeglut
+        AC_CHECK_LIB(freeglut, glutGetModifiers)
+    fi
     ;;
 
 esac