+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdlib.h>
#include <simgear/compiler.h>
#include <osg/Matrixd>
#include <osg/Viewport>
#include <osg/Version>
-#include <osgViewer/StatsHandler>
+#include <osgViewer/ViewerEventHandlers>
#include <osgViewer/Viewer>
#include <osgGA/MatrixManipulator>
#include "globals.hxx"
#include "renderer.hxx"
-#if ((1 == OSG_VERSION_MAJOR) && (9 == OSG_VERSION_MINOR) && \
+#if ((2 <= OSG_VERSION_MAJOR) || \
+ (1 == OSG_VERSION_MAJOR) && (9 == OSG_VERSION_MINOR) && \
(8 <= OSG_VERSION_PATCH)) || \
((1 == OSG_VERSION_MAJOR) && (9 < OSG_VERSION_MINOR)) || \
(1 < OSG_VERSION_MAJOR)