Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added config.h, added --enable-debug flag, various other changes to t…
…he build system
  • Loading branch information
fingolfin committed Oct 3, 2001
1 parent 23a0cad commit f3dd2b7
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 29 deletions.
4 changes: 4 additions & 0 deletions SDL_sound_internal.h
Expand Up @@ -33,6 +33,10 @@
#error Do not include this header from your applications.
#endif

#if HAVE_CONFIG_H
# include <config.h>
#endif

#include "SDL.h"

#if (defined DEBUG_CHATTER)
Expand Down
11 changes: 11 additions & 0 deletions acconfig.h
@@ -0,0 +1,11 @@

#undef DEBUG
#undef NDEBUG
#undef SOUND_SUPPORTS_AIFF
#undef SOUND_SUPPORTS_MOD
#undef SOUND_SUPPORTS_MP3
#undef SOUND_SUPPORTS_OGG
#undef SOUND_SUPPORTS_RAW
#undef SOUND_SUPPORTS_SHN
#undef SOUND_SUPPORTS_VOC
#undef SOUND_SUPPORTS_WAV
5 changes: 1 addition & 4 deletions bootstrap
Expand Up @@ -2,10 +2,7 @@

aclocal
libtoolize --automake --copy --force

# rcg09252001 (I ain't got a --force option...?)
#automake --foreign --add-missing --copy --force

autoheader
automake --foreign --add-missing --copy
autoconf

Expand Down
20 changes: 20 additions & 0 deletions configure.in
Expand Up @@ -43,6 +43,7 @@ AC_CANONICAL_HOST
AC_CANONICAL_TARGET

dnl Setup for automake
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(SDL_sound, $VERSION)


Expand All @@ -56,6 +57,25 @@ AC_PROG_LN_S
AC_PROG_LIBTOOL


dnl ---------------------------------------------------------------------
dnl Debug mode?
dnl ---------------------------------------------------------------------

AC_ARG_ENABLE(debug,
[ --enable-debug enable debug mode [default=no]],
, enable_smpeg=no)
if test x$enable_debug = xyes; then
if test x$ac_cv_prog_cc_g = xyes; then
CFLAGS="-g -O0"
else
CFLAGS="-O0"
fi
AC_DEFINE(DEBUG)
else
AC_DEFINE(NDEBUG)
fi


dnl ---------------------------------------------------------------------
dnl Checks for libraries.
dnl ---------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions decoders/aiff.c
Expand Up @@ -43,6 +43,9 @@

#ifdef SOUND_SUPPORTS_AIFF

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -52,9 +55,6 @@
#include "SDL_endian.h"
#include "SDL_sound.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

static int AIFF_init(void);
static void AIFF_quit(void);
static int AIFF_open(Sound_Sample *sample, const char *ext);
Expand Down
5 changes: 3 additions & 2 deletions decoders/mod.c
Expand Up @@ -30,15 +30,16 @@

#ifdef SOUND_SUPPORTS_MOD

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "SDL_sound.h"
#include "mikmod.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

static int MOD_init(void);
static void MOD_quit(void);
Expand Down
6 changes: 3 additions & 3 deletions decoders/mp3.c
Expand Up @@ -31,6 +31,9 @@

#ifdef SOUND_SUPPORTS_MP3

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -40,9 +43,6 @@
#include "SDL_sound.h"
#include "extra_rwops.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"


static int MP3_init(void);
static void MP3_quit(void);
Expand Down
6 changes: 3 additions & 3 deletions decoders/ogg.c
Expand Up @@ -34,18 +34,18 @@

#ifdef SOUND_SUPPORTS_OGG

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "vorbis/codec.h"
#include "vorbis/vorbisfile.h"

#include "SDL_sound.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

static int OGG_init(void);
static void OGG_quit(void);
Expand Down
6 changes: 3 additions & 3 deletions decoders/raw.c
Expand Up @@ -40,15 +40,15 @@

#ifdef SOUND_SUPPORTS_RAW

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "SDL_sound.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"


static int RAW_init(void);
static void RAW_quit(void);
Expand Down
5 changes: 3 additions & 2 deletions decoders/shn.c
Expand Up @@ -43,14 +43,15 @@

#if (defined SOUND_SUPPORTS_SHN)

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "SDL_sound.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

static int SHN_init(void);
static void SHN_quit(void);
Expand Down
6 changes: 3 additions & 3 deletions decoders/skeleton.c
Expand Up @@ -31,15 +31,15 @@

#ifdef SOUND_SUPPORTS_FMT

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "SDL_sound.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"


static int FMT_init(void);
static void FMT_quit(void);
Expand Down
6 changes: 3 additions & 3 deletions decoders/voc.c
Expand Up @@ -39,15 +39,15 @@

#if (defined SOUND_SUPPORTS_VOC)

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "SDL_sound.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

static int VOC_init(void);
static void VOC_quit(void);
static int VOC_open(Sound_Sample *sample, const char *ext);
Expand Down
6 changes: 3 additions & 3 deletions decoders/wav.c
Expand Up @@ -30,15 +30,15 @@

#ifdef SOUND_SUPPORTS_WAV

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "SDL_sound.h"

#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

static int WAV_init(void);
static void WAV_quit(void);
static int WAV_open(Sound_Sample *sample, const char *ext);
Expand Down

0 comments on commit f3dd2b7

Please sign in to comment.