comparison src/audio/SDL_audio.c @ 1341:d02b552e5304

Configure dynamically generates SDL_config.h I'm still wrestling with autoheader, but this should work for now... Fixed lots of build problems with C library support disabled
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 12:11:33 +0000
parents 3692456e7b0f
children c71e05b4dc2e
comparison
equal deleted inserted replaced
1340:58b114ef50e7 1341:d02b552e5304
304 to use ESD, but don't start it if it's not already running. 304 to use ESD, but don't start it if it's not already running.
305 This probably isn't the place to do this, but... Shh! :) 305 This probably isn't the place to do this, but... Shh! :)
306 */ 306 */
307 for ( i=0; bootstrap[i]; ++i ) { 307 for ( i=0; bootstrap[i]; ++i ) {
308 if ( SDL_strcmp(bootstrap[i]->name, "esd") == 0 ) { 308 if ( SDL_strcmp(bootstrap[i]->name, "esd") == 0 ) {
309 #ifdef HAVE_PUTENV
309 const char *esd_no_spawn; 310 const char *esd_no_spawn;
310 311
311 /* Don't start ESD if it's not running */ 312 /* Don't start ESD if it's not running */
312 esd_no_spawn = SDL_getenv("ESD_NO_SPAWN"); 313 esd_no_spawn = getenv("ESD_NO_SPAWN");
313 if ( esd_no_spawn == NULL ) { 314 if ( esd_no_spawn == NULL ) {
314 putenv("ESD_NO_SPAWN=1"); 315 putenv("ESD_NO_SPAWN=1");
315 } 316 }
317 #endif
316 if ( bootstrap[i]->available() ) { 318 if ( bootstrap[i]->available() ) {
317 audio = bootstrap[i]->create(0); 319 audio = bootstrap[i]->create(0);
318 break; 320 break;
319 } 321 }
320 #ifdef linux /* No unsetenv() on most platforms */ 322 #ifdef HAVE_UNSETENV
321 if ( esd_no_spawn == NULL ) { 323 if ( esd_no_spawn == NULL ) {
322 unsetenv("ESD_NO_SPAWN"); 324 unsetenv("ESD_NO_SPAWN");
323 } 325 }
324 #endif 326 #endif
325 } 327 }