diff --git a/CMakeLists.txt b/CMakeLists.txt index 7de1a0a9..2ba81a80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,6 +245,7 @@ check_include_file(sys/time.h HAVE_SYS_TIME_H) check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H) check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(windows.h HAVE_WINDOWS_H) +check_include_file(AL/alext.h HAVE_AL_EXT_H) if(HAVE_INTTYPES_H) # ShivaVG needs inttypes.h diff --git a/simgear/simgear_config_cmake.h.in b/simgear/simgear_config_cmake.h.in index 0cce4b31..c9804e7c 100644 --- a/simgear/simgear_config_cmake.h.in +++ b/simgear/simgear_config_cmake.h.in @@ -13,6 +13,8 @@ #cmakedefine HAVE_STD_ISNAN #cmakedefine HAVE_WINDOWS_H #cmakedefine HAVE_MKDTEMP +#cmakedefine HAVE_AL_EXT_H + #cmakedefine GCC_ATOMIC_BUILTINS_FOUND diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index 68147b0b..1dfbafa7 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -762,7 +762,7 @@ bool SGSoundMgr::load( const std::string &samplepath, if ( !is_working() ) return false; - ALenum format; + unsigned int format; ALsizei size; ALsizei freq; ALvoid *data; diff --git a/simgear/sound/soundmgr_openal_private.hxx b/simgear/sound/soundmgr_openal_private.hxx index 6bc3591f..d1b4f85a 100644 --- a/simgear/sound/soundmgr_openal_private.hxx +++ b/simgear/sound/soundmgr_openal_private.hxx @@ -29,6 +29,10 @@ #ifndef _SG_SOUNDMGR_OPENAL_PRIVATE_HXX #define _SG_SOUNDMGR_OPENAL_PRIVATE_HXX 1 +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include @@ -36,15 +40,15 @@ #if defined(__APPLE__) # include # include -# include #elif defined(OPENALSDK) # include # include -# include #else # include # include -# include +# ifdef HAVE_AL_EXT_H +# include +# endif #endif #include