From 6250f675db9fdd6f2aef7be43207cd0ac0b6baeb Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 23 Oct 2011 17:56:28 +0100 Subject: [PATCH] Fixes for headless mode. --- simgear/math/SGGeod.cxx | 4 ++++ simgear/math/project.cxx | 9 +++++++++ simgear/math/project.hxx | 7 +++++++ simgear/misc/PathOptions.cxx | 8 ++++++++ simgear/misc/PathOptions.hxx | 3 +++ simgear/misc/interpolator.cxx | 4 ++++ simgear/props/propertyObject_test.cxx | 3 +++ simgear/props/props_test.cxx | 4 ++++ simgear/structure/Singleton.hxx | 5 +++++ simgear/structure/event_mgr.cxx | 4 ++++ simgear/structure/subsystem_mgr.cxx | 4 ++++ simgear/timing/timezone.cxx | 4 ++++ 12 files changed, 59 insertions(+) diff --git a/simgear/math/SGGeod.cxx b/simgear/math/SGGeod.cxx index 15468707..20fa1938 100644 --- a/simgear/math/SGGeod.cxx +++ b/simgear/math/SGGeod.cxx @@ -15,6 +15,10 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // +#ifdef HAVE_CONFIG_H +# include +#endif + #include "SGMath.hxx" #ifndef NO_OPENSCENEGRAPH_INTERFACE diff --git a/simgear/math/project.cxx b/simgear/math/project.cxx index f1c2b143..c6a4ef73 100644 --- a/simgear/math/project.cxx +++ b/simgear/math/project.cxx @@ -15,8 +15,14 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // +#ifdef HAVE_CONFIG_H +# include +#endif + #include "project.hxx" +#ifndef NO_OPENSCENEGRAPH_INTERFACE + #include #include @@ -41,3 +47,6 @@ GLint project(GLdouble objX, GLdouble objY, GLdouble objZ, } } + +#endif // of NO_OPENSCENEGRAPH_INTERFACE + diff --git a/simgear/math/project.hxx b/simgear/math/project.hxx index 40353a2d..07a97d79 100644 --- a/simgear/math/project.hxx +++ b/simgear/math/project.hxx @@ -16,6 +16,9 @@ // #ifndef SIMGEAR_PROJECT_HXX #define SIMGEAR_PROJECT_HXX 1 + +#ifndef NO_OPENSCENEGRAPH_INTERFACE + #include namespace simgear @@ -26,4 +29,8 @@ extern GLint project(GLdouble objX, GLdouble objY, GLdouble objZ, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); } + +#endif // of NO_OPENSCENEGRAPH_INTERFACE + #endif + diff --git a/simgear/misc/PathOptions.cxx b/simgear/misc/PathOptions.cxx index 32c719d6..b81600d8 100644 --- a/simgear/misc/PathOptions.cxx +++ b/simgear/misc/PathOptions.cxx @@ -17,6 +17,12 @@ // // $Id$ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifndef NO_OPENSCENEGRAPH_INTERFACE + #include #include "PathOptions.hxx" @@ -31,3 +37,5 @@ osgDB::ReaderWriter::Options* simgear::makeOptionsFromPath(const SGPath& path) options->setDatabasePath(path.str()); return options; } + +#endif // of NO_OPENSCENEGRAPH_INTERFACE diff --git a/simgear/misc/PathOptions.hxx b/simgear/misc/PathOptions.hxx index 9b14d6e8..8d4186a7 100644 --- a/simgear/misc/PathOptions.hxx +++ b/simgear/misc/PathOptions.hxx @@ -20,6 +20,7 @@ #ifndef PATHOPTIONSHXX #define PATHOPTIONSHXX 1 +#ifndef NO_OPENSCENEGRAPH_INTERFACE #include #include @@ -28,3 +29,5 @@ namespace simgear osgDB::ReaderWriter::Options* makeOptionsFromPath(const SGPath&); } #endif + +#endif diff --git a/simgear/misc/interpolator.cxx b/simgear/misc/interpolator.cxx index 2e902cae..04a898cc 100644 --- a/simgear/misc/interpolator.cxx +++ b/simgear/misc/interpolator.cxx @@ -16,6 +16,10 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#ifdef HAVE_CONFIG_H +# include +#endif + #include "interpolator.hxx" #include diff --git a/simgear/props/propertyObject_test.cxx b/simgear/props/propertyObject_test.cxx index 5bb4ae58..b07bb483 100644 --- a/simgear/props/propertyObject_test.cxx +++ b/simgear/props/propertyObject_test.cxx @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +# include +#endif #include diff --git a/simgear/props/props_test.cxx b/simgear/props/props_test.cxx index cd54ec50..f8299263 100644 --- a/simgear/props/props_test.cxx +++ b/simgear/props/props_test.cxx @@ -3,6 +3,10 @@ // Test harness. //////////////////////////////////////////////////////////////////////// +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include diff --git a/simgear/structure/Singleton.hxx b/simgear/structure/Singleton.hxx index 0c3a5946..cc98c497 100644 --- a/simgear/structure/Singleton.hxx +++ b/simgear/structure/Singleton.hxx @@ -3,8 +3,10 @@ #include +#ifndef NO_OPENSCENEGRAPH_INTERFACE #include #include +#endif namespace simgear { @@ -27,6 +29,7 @@ public: } }; +#ifndef NO_OPENSCENEGRAPH_INTERFACE template class SingletonRefPtr { @@ -54,5 +57,7 @@ public: return SingletonRefPtr::instance(); } }; +#endif // of NO_OPENSCENEGRAPH_INTERFACE + } #endif diff --git a/simgear/structure/event_mgr.cxx b/simgear/structure/event_mgr.cxx index 11b34b7a..f448a649 100644 --- a/simgear/structure/event_mgr.cxx +++ b/simgear/structure/event_mgr.cxx @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "event_mgr.hxx" #include diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index 39598abe..a59d6ef0 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -18,6 +18,10 @@ // // $Id$ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include diff --git a/simgear/timing/timezone.cxx b/simgear/timing/timezone.cxx index 7f09e6c6..11884918 100644 --- a/simgear/timing/timezone.cxx +++ b/simgear/timing/timezone.cxx @@ -26,6 +26,10 @@ * ************************************************************************/ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include