]> git.mxchange.org Git - simgear.git/commitdiff
Properly test for OpenThreads and bail out if it isn't found
authorehofman <ehofman>
Tue, 9 Feb 2010 09:26:04 +0000 (09:26 +0000)
committerTim Moore <timoore33@gmail.com>
Wed, 10 Feb 2010 13:55:57 +0000 (14:55 +0100)
configure.ac
simgear/props/Makefile.am

index 6ac0c87b481edc85c42c79495b248be3db9a6e1f..7bebd560b77bf7def9a4b53519b4a04eac290214 100644 (file)
@@ -475,18 +475,18 @@ LIBS="$saved_LIBS"
 case "${host}" in
 *-apple-darwin*)
     if test "x$with_osg_framework" != "x"; then
-        AC_CHECK_FRAMEWORK(osgViewer, [#include <osgViewer/Version>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osgGA, [#include <osgGA/Version>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osgText, [#include <osgText/Version>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osgFX, [#include <osgFX/AnisotropicLighting>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osgUtil, [#include <osgUtil/Version>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osgDB, [#include <osgDB/Version>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osgSim, [#include <osgSim/Version>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osgParticle, [#include <osgParticle/Version>], $with_osg_framework)
-        AC_CHECK_FRAMEWORK(osg, [#include <osg/Version>], $with_osg_framework)
-        osg_FRAMEWORKS="$FRAMEWORKS"
-        FRAMEWORKS=""
-        AC_SUBST(osg_FRAMEWORKS)
+#       AC_CHECK_FRAMEWORK(osgViewer, [#include <osgViewer/Version>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osgGA, [#include <osgGA/Version>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osgText, [#include <osgText/Version>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osgFX, [#include <osgFX/AnisotropicLighting>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osgUtil, [#include <osgUtil/Version>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osgDB, [#include <osgDB/Version>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osgSim, [#include <osgSim/Version>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osgParticle, [#include <osgParticle/Version>], $with_osg_framework)
+#       AC_CHECK_FRAMEWORK(osg, [#include <osg/Version>], $with_osg_framework)
+#       osg_FRAMEWORKS="$FRAMEWORKS"
+#       FRAMEWORKS=""
+#       AC_SUBST(osg_FRAMEWORKS)
         AC_CHECK_FRAMEWORK(OpenThreads, [#include <OpenThreads/Version>], $with_osg_framework)
         openthreads_FRAMEWORK="$FRAMEWORKS"
         FRAMEWORKS=""
@@ -499,15 +499,23 @@ case "${host}" in
         LDFLAGS="$LDFLAGS -L$with_osg"
     fi
     ;;
+*)
+    if test "x$enable_osgdebug" = "xyes"; then
+        AC_CHECK_LIB(OpenThreadsd,OpenThreadsGetVersion)
+    else
+        AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
+    fi
+    ;;
 esac
 AM_CONDITIONAL(HAVE_FRAMEWORK_OSG, test "x$ac_cv_framework_osg" != "x")
 
 AC_CHECK_HEADER(osg/Version)
-if test "x$ac_cv_header_osg_Version" != "xyes"; then
+if test "x$ac_cv_header_osg_Version" != "xyes" -o "x$ac_cv_lib_OpenThreads_OpenThreadsGetVersion" != "xyes"; then
   if test "x$ac_cv_framework_osg" != "xyes"; then
     echo
-    echo "You *must* have the OpenSceneGraph support library installed on your system"
-    echo "to build this version of SimGear!"
+    echo "Warning: The OpenThreads library was not found on this system."
+    echo "         Mybe you forgot to sepcify --with-osg?"
+    echo "Without the OpenSceneGraph library FlightGear will not work."
     echo
     echo "Please see README.OSG for more details."
     echo
index acf5201711ec4dfc6eda70fd44fa4af07335467d..658fe126763a57ae8eb9dce1856eaac5dcf6f9e0 100644 (file)
@@ -15,7 +15,7 @@ libsgprops_a_SOURCES = \
        props_io.cxx \
        AtomicChangeListener.cxx
 
-noinst_PROGRAMS = props_test
+check_PROGRAMS = props_test
 
 props_test_SOURCES = props_test.cxx
 props_test_LDADD = \