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 --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401345
This commit is contained in:
parent
dd8d77d906
commit
78516b5663
24 changed files with 513 additions and 117 deletions
|
@ -306,18 +306,20 @@ int SDL_AudioInit(const char *driver_name)
|
|||
*/
|
||||
for ( i=0; bootstrap[i]; ++i ) {
|
||||
if ( SDL_strcmp(bootstrap[i]->name, "esd") == 0 ) {
|
||||
#ifdef HAVE_PUTENV
|
||||
const char *esd_no_spawn;
|
||||
|
||||
/* Don't start ESD if it's not running */
|
||||
esd_no_spawn = SDL_getenv("ESD_NO_SPAWN");
|
||||
esd_no_spawn = getenv("ESD_NO_SPAWN");
|
||||
if ( esd_no_spawn == NULL ) {
|
||||
putenv("ESD_NO_SPAWN=1");
|
||||
}
|
||||
#endif
|
||||
if ( bootstrap[i]->available() ) {
|
||||
audio = bootstrap[i]->create(0);
|
||||
break;
|
||||
}
|
||||
#ifdef linux /* No unsetenv() on most platforms */
|
||||
#ifdef HAVE_UNSETENV
|
||||
if ( esd_no_spawn == NULL ) {
|
||||
unsetenv("ESD_NO_SPAWN");
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
/* Allow access to a raw mixing buffer (for AmigaOS) */
|
||||
|
||||
#include "SDL_stdlib.h"
|
||||
#include "SDL_string.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_audiomem.h"
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
/* Output raw audio data to a file. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h> /* For strerror() */
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -130,7 +131,7 @@ static SDL_AudioDevice *DISKAUD_CreateDevice(int devindex)
|
|||
SDL_memset(this->hidden, 0, (sizeof *this->hidden));
|
||||
|
||||
envr = SDL_getenv(DISKENVR_WRITEDELAY);
|
||||
this->hidden->write_delay = (envr) ? atoi(envr) : DISKDEFAULT_WRITEDELAY;
|
||||
this->hidden->write_delay = (envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;
|
||||
|
||||
/* Set the function pointers */
|
||||
this->OpenAudio = DISKAUD_OpenAudio;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
/* Allow access to a raw mixing buffer */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h> /* For strerror() */
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
|
||||
/* Allow access to a raw mixing buffer */
|
||||
|
||||
#include <stdio.h> /* For perror() ... should we really do this? */
|
||||
#include <stdio.h> /* For perror() */
|
||||
#include <string.h> /* For strerror() */
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include <mme_api.h>
|
||||
|
||||
#include "SDL_stdlib.h"
|
||||
#include "SDL_string.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_timer.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue