+LIBS="$base_LIBS"
+
+AC_SUBST(base_LIBS)
+AC_SUBST(openal_LIBS)
+AC_SUBST(opengl_LIBS)
+AC_SUBST(thread_LIBS)
+AC_SUBST(network_LIBS)
+
+dnl Check for MS Windows environment
+AC_CHECK_HEADER(windows.h)
+AM_CONDITIONAL(EXTGL_NEEDED, test "x$ac_cv_header_windows_h" = "xyes")
+
+# The following are C++ items that need to be tested for with the c++
+# compiler
+
+CXXCPP="g++ -E"
+AC_LANG_PUSH(C++)
+
+# OpenSceneGraph
+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(OpenThreads, [#include <OpenThreads/Version>], $with_osg_framework)
+ openthreads_FRAMEWORK="$FRAMEWORKS"
+ FRAMEWORKS=""
+ AC_SUBST(openthreads_FRAMEWORK)
+ else
+ dnl
+ dnl This is needed when osg dynamic libs are specified
+ dnl instead of OSG frameworks on Mac OS X
+ dnl
+ AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
+ fi
+ ;;
+*)
+ if test "x$enable_osgdebug" = "xyes"; then
+ AC_CHECK_LIB(OpenThreadsd,OpenThreadsGetVersion)
+ else
+ AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
+ fi
+ ;;
+esac