AC_CHECK_LIB(pthread, pthread_exit)
AC_CHECK_LIB(socket, socket)
+dnl check for glut location
+AC_CHECK_HEADER(GL/glut.h)
+if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
+ AC_DEFINE([GLUT_H], "GL/glut.h", [Define as glut.h include location])
+else
+ AC_CHECK_HEADER(GLUT/glut.h)
+ if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
+ AC_DEFINE([GLUT_H], "GLUT/glut.h", [Define as glut.h include location])
+ else
+ echo "Neither GL/glut.h nor GLUT/glut.h found. Cannot continue"
+ exit
+ fi
+fi
+
dnl check for OpenGL related libraries
case "${host}" in
*-*-cygwin* | *-*-mingw32*)
esac
-dnl check for glut location
-AC_CHECK_HEADER(GL/glut.h)
-if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
- AC_DEFINE([GLUT_H], "GL/glut.h", [Define as glut.h include location])
-else
- AC_CHECK_HEADER(GLUT/glut.h)
- if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
- AC_DEFINE([GLUT_H], "GLUT/glut.h", [Define as glut.h include location])
- else
- echo "Neither GL/glut.h nor GLUT/glut.h found. Cannot continue"
- exit
- fi
-fi
-
opengl_LIBS="$LIBS"
LIBS="$base_LIBS"
static void
setFreeze (bool f)
{
- frozen = f;
- // Stop sound on a pause
- if (f)
- globals->get_soundmgr()->pause();
- else
- globals->get_soundmgr()->resume();
+ frozen = f;
+
+ // Stop sound on a pause
+ FGSoundMgr *s = globals->get_soundmgr();
+ if ( s != NULL ) {
+ if ( f ) {
+ s->pause();
+ } else {
+ s->resume();
+ }
+ }
}
// Constructor
FGGlobals::FGGlobals() :
- subsystem_mgr(new FGSubsystemMgr),
- sim_time_sec(0.0),
+ subsystem_mgr( new FGSubsystemMgr ),
+ sim_time_sec( 0.0 ),
+ fg_root( "" ),
+ fg_scenery( "" ),
#if defined(FX) && defined(XMESA)
fullscreen( true ),
#endif
warp( 0 ),
warp_delta( 0 ),
- props(new SGPropertyNode),
- initial_state(0),
- locale(NULL),
- commands(new SGCommandMgr),
- io(new FGIO)
+ time_params( NULL ),
+ ephem( NULL ),
+ mag( NULL ),
+ autopilot( NULL ),
+ route( NULL ),
+ soundmgr( NULL ),
+ environment_mgr( NULL ),
+ ATC_mgr( NULL ),
+ ATC_display( NULL ),
+ AI_mgr( NULL ),
+ controls( NULL ),
+ steam( NULL ),
+ viewmgr( NULL ),
+ props( new SGPropertyNode ),
+ initial_state( NULL ),
+ locale( NULL ),
+ commands( new SGCommandMgr ),
+ model_loader( NULL ),
+ texture_loader( NULL ),
+ acmodel( NULL ),
+ model_mgr( NULL ),
+ channel_options_list( NULL ),
+ scenery( NULL ),
+ tile_mgr( NULL ),
+ io( new FGIO )
{
}