diff --git a/configure.in b/configure.in index 54b5356c4..2c93bb0a6 100644 --- a/configure.in +++ b/configure.in @@ -355,6 +355,18 @@ AH_TEMPLATE(C_MODEM,[Define to 1 to enable internal modem support, requires SDL_ AH_TEMPLATE(C_IPX,[Define to 1 to enable IPX over Internet networking, requires SDL_net]) AC_CHECK_HEADER(SDL_net.h,have_sdl_net_h=yes,) +dnl enable disable sdl cdrom support +AC_ARG_ENABLE(cdrom, +AC_HELP_STRING([--enable-cdrom],[compile with SDL CD-ROM support (default yes)]), +[ case "${enableval}" in + yes) sdl_cdrom=true;; + no) sdl_cdrom=false;; +esac], +[sdl_cdrom=true]) +if test x$sdl_cdrom = xtrue ; then + AC_DEFINE(USE_SDL_CDROM,1,[Define to 1 to enable CDROM support]) +fi + if test x$host = xi386-pc-os2-emx ; then AC_MSG_CHECKING(for SDLNet_Init in SDL_net); LIBS_BACKUP=$LIBS; diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index b5cdd3326..c63c27cdb 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -1772,8 +1772,10 @@ int main(int argc, char* argv[]) { #if SDL_VERSION_ATLEAST(1, 2, 14) putenv(const_cast("SDL_DISABLE_LOCK_KEYS=1")); #endif - if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_CDROM - |SDL_INIT_NOPARACHUTE + if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE +#ifdef USE_SDL_CDROM + |SDL_CDROM +#endif ) < 0 ) E_Exit("Can't init SDL %s",SDL_GetError()); sdl.inited = true;