annotate configure.in @ 575:e587ba9d1c87 stable-1.0

Don't force quit in signal handler, since we might double-free things. Instead we set a flag and clean up normally. (transplanted from 7815c90ba55221f47a042339f872207904da0f5c)
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 24 Jan 2010 13:45:18 -0500
parents d02c00ce16d9
children
rev   line source
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
1 # Process this file with autoconf to produce a configure script.
66
54e10585e0cf Changed AC_INIT() to look for SDL_sound.c, not COPYING, since I'm keeping
Ryan C. Gordon <icculus@icculus.org>
parents: 65
diff changeset
2 AC_INIT(SDL_sound.c)
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
3
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
4 dnl ---------------------------------------------------------------------
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
5 dnl System/version info
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
6 dnl ---------------------------------------------------------------------
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
7
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
8 # Making releases:
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
9 # MICRO_VERSION += 1;
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
10 # INTERFACE_AGE += 1;
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
11 # BINARY_AGE += 1;
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
12 # if any functions have been added, set INTERFACE_AGE to 0.
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
13 # if backwards compatibility has been broken,
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
14 # set BINARY_AGE and INTERFACE_AGE to 0.
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
15
427
ba94ffe34a47 Upped version to 1.0.0.
Ryan C. Gordon <icculus@icculus.org>
parents: 422
diff changeset
16 MAJOR_VERSION=1
ba94ffe34a47 Upped version to 1.0.0.
Ryan C. Gordon <icculus@icculus.org>
parents: 422
diff changeset
17 MINOR_VERSION=0
548
cbb8f13ca516 Yet-another attempt to properly fix soname.
Ryan C. Gordon <icculus@icculus.org>
parents: 547
diff changeset
18 MICRO_VERSION=3
cbb8f13ca516 Yet-another attempt to properly fix soname.
Ryan C. Gordon <icculus@icculus.org>
parents: 547
diff changeset
19 INTERFACE_AGE=2
cbb8f13ca516 Yet-another attempt to properly fix soname.
Ryan C. Gordon <icculus@icculus.org>
parents: 547
diff changeset
20 BINARY_AGE=2
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
21 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
22
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
23 AC_SUBST(MAJOR_VERSION)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
24 AC_SUBST(MINOR_VERSION)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
25 AC_SUBST(MICRO_VERSION)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
26 AC_SUBST(INTERFACE_AGE)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
27 AC_SUBST(BINARY_AGE)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
28 AC_SUBST(VERSION)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
29
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
30 # libtool versioning
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
31 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
32 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
33 LT_REVISION=$INTERFACE_AGE
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
34 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
35
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
36 AC_SUBST(LT_RELEASE)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
37 AC_SUBST(LT_CURRENT)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
38 AC_SUBST(LT_REVISION)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
39 AC_SUBST(LT_AGE)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
40
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
41 dnl Detect the canonical host and target build environment
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
42 AC_CANONICAL_HOST
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
43 AC_CANONICAL_TARGET
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
44
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
45 dnl Setup for automake
100
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
46 AM_CONFIG_HEADER(config.h)
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
47 AM_INIT_AUTOMAKE(SDL_sound, $VERSION)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
48
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
49
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
50 dnl ---------------------------------------------------------------------
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
51 dnl Compilers and other tools
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
52 dnl ---------------------------------------------------------------------
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
53
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
54 AC_PROG_CC
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
55 AC_PROG_INSTALL
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
56 AC_PROG_LN_S
377
cbb15ecf423a WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents: 340
diff changeset
57 AM_PROG_LIBTOOL
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
58
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
59
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
60 dnl ---------------------------------------------------------------------
569
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
61 dnl Have GCC's -fvisibility option?
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
62 dnl ---------------------------------------------------------------------
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
63 AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
64 have_gcc_fvisibility=no
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
65 visibility_CFLAGS="-fvisibility=hidden"
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
66 save_CFLAGS="$CFLAGS"
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
67 CFLAGS="$save_CFLAGS $visibility_CFLAGS"
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
68 AC_TRY_COMPILE([
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
69 #if !defined(__GNUC__) || __GNUC__ < 4
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
70 #error SDL only uses visibility attributes in GCC 4 or newer
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
71 #endif
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
72 ],[
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
73 ],[
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
74 have_gcc_fvisibility=yes
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
75 ])
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
76 AC_MSG_RESULT($have_gcc_fvisibility)
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
77 CFLAGS="$save_CFLAGS"
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
78
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
79 if test x$have_gcc_fvisibility = xyes; then
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
80 CFLAGS="$CFLAGS $visibility_CFLAGS"
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
81 fi
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
82
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
83
d02c00ce16d9 Clean up symbol visibility in the stable-1.0 branch.
Ryan C. Gordon <icculus@icculus.org>
parents: 548
diff changeset
84 dnl ---------------------------------------------------------------------
100
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
85 dnl Debug mode?
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
86 dnl ---------------------------------------------------------------------
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
87
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
88 AC_ARG_ENABLE(debug,
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
89 [ --enable-debug enable debug mode [default=no]],
152
1a0cf9aeee2a Fix for SMPEG and debug settings.
Ryan C. Gordon <icculus@icculus.org>
parents: 132
diff changeset
90 , enable_debug=no)
100
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
91 if test x$enable_debug = xyes; then
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
92 if test x$ac_cv_prog_cc_g = xyes; then
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
93 CFLAGS="-g -O0"
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
94 else
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
95 CFLAGS="-O0"
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
96 fi
110
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
97 CFLAGS="$CFLAGS -Werror"
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
98 AC_DEFINE(DEBUG, 1, [Define for debug builds.])
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
99 AC_DEFINE(DEBUG_CHATTER, 1, [Define for debug build chattering.])
100
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
100 else
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
101 AC_DEFINE(NDEBUG, 1, [Define to disable debugging.])
100
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
102 fi
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
103
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
104
6d9fdec2f708 added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents: 85
diff changeset
105 dnl ---------------------------------------------------------------------
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
106 dnl Checks for libraries.
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
107 dnl ---------------------------------------------------------------------
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
108
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
109 dnl Check for SDL
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
110 SDL_VERSION=1.2.0
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
111 AM_PATH_SDL($SDL_VERSION,
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
112 :,
377
cbb15ecf423a WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents: 340
diff changeset
113 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
114 )
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
115 CFLAGS="$CFLAGS $SDL_CFLAGS"
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
116 LIBS="$LIBS $SDL_LIBS"
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
117
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
118
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
119 dnl Check for voc decoder inclusion...
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
120 AC_ARG_ENABLE(voc,
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
121 [ --enable-voc enable VOC decoding [default=yes]],
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
122 , enable_voc=yes)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
123 if test x$enable_voc = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
124 AC_DEFINE(SOUND_SUPPORTS_VOC, 1, [Define if VOC support is desired.])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
125 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
126
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
127
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
128 dnl Check for wav decoder inclusion...
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
129 AC_ARG_ENABLE(wav,
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
130 [ --enable-wav enable WAV decoding [default=yes]],
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
131 , enable_wav=yes)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
132 if test x$enable_wav = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
133 AC_DEFINE(SOUND_SUPPORTS_WAV, 1, [Define if WAV support is desired.])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
134 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
135
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
136
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
137 dnl Check for raw decoder inclusion...
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
138 AC_ARG_ENABLE(raw,
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
139 [ --enable-raw enable raw audio "decoding" [default=yes]],
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
140 , enable_raw=yes)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
141 if test x$enable_raw = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
142 AC_DEFINE(SOUND_SUPPORTS_RAW, 1, [Define if RAW support is desired.])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
143 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
144
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
145
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
146 dnl Check for aiff decoder inclusion...
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
147 AC_ARG_ENABLE(aiff,
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
148 [ --enable-aiff enable AIFF decoding [default=yes]],
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
149 , enable_aiff=yes)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
150 if test x$enable_aiff = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
151 AC_DEFINE(SOUND_SUPPORTS_AIFF, 1, [Define if AIFF support is desired.])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
152 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
153
216
07d0939d40e7 Support for .AU files added.
Ryan C. Gordon <icculus@icculus.org>
parents: 209
diff changeset
154 dnl Check for au decoder inclusion
07d0939d40e7 Support for .AU files added.
Ryan C. Gordon <icculus@icculus.org>
parents: 209
diff changeset
155 AC_ARG_ENABLE(au,
276
d7d55903124c Changed --enable-vorbis to --enable-ogg, made other format tweaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 262
diff changeset
156 [ --enable-au enable AU decoding [default=yes]],
216
07d0939d40e7 Support for .AU files added.
Ryan C. Gordon <icculus@icculus.org>
parents: 209
diff changeset
157 , enable_au=yes)
07d0939d40e7 Support for .AU files added.
Ryan C. Gordon <icculus@icculus.org>
parents: 209
diff changeset
158 if test x$enable_au = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
159 AC_DEFINE(SOUND_SUPPORTS_AU, 1, [Define if AU support is desired.])
216
07d0939d40e7 Support for .AU files added.
Ryan C. Gordon <icculus@icculus.org>
parents: 209
diff changeset
160 fi
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
161
85
b939258bd177 Added Shorten module.
Ryan C. Gordon <icculus@icculus.org>
parents: 74
diff changeset
162 dnl Check for shn decoder inclusion...
b939258bd177 Added Shorten module.
Ryan C. Gordon <icculus@icculus.org>
parents: 74
diff changeset
163 AC_ARG_ENABLE(shn,
105
de42ca5599ac Added DEBUG_CHATTER to the --enable-debug defines. (This will become a
Ryan C. Gordon <icculus@icculus.org>
parents: 100
diff changeset
164 [ --enable-shn enable SHN decoding [default=yes]],
de42ca5599ac Added DEBUG_CHATTER to the --enable-debug defines. (This will become a
Ryan C. Gordon <icculus@icculus.org>
parents: 100
diff changeset
165 , enable_shn=yes)
85
b939258bd177 Added Shorten module.
Ryan C. Gordon <icculus@icculus.org>
parents: 74
diff changeset
166 if test x$enable_shn = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
167 AC_DEFINE(SOUND_SUPPORTS_SHN, 1, [Define if SHN support is desired.])
85
b939258bd177 Added Shorten module.
Ryan C. Gordon <icculus@icculus.org>
parents: 74
diff changeset
168 fi
b939258bd177 Added Shorten module.
Ryan C. Gordon <icculus@icculus.org>
parents: 74
diff changeset
169
262
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
170 dnl Check for the MIDI decoder...
110
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
171 AC_ARG_ENABLE(midi,
201
56bc776f0563 Midi support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
172 [ --enable-midi enable software MIDI music [default=yes]],
56bc776f0563 Midi support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
173 , enable_midi=yes)
110
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
174 if test x$enable_midi = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
175 AC_DEFINE(SOUND_SUPPORTS_MIDI, 1, [Define if MIDI support is desired.])
110
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
176 fi
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
177
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
178 dnl Check for SMPEG
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
179 AC_ARG_ENABLE(smpeg,
262
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
180 [ --enable-smpeg enable MP3 decoding via smpeg [default=yes]],
110
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
181 , enable_smpeg=yes)
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
182 if test x$enable_smpeg = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
183 AC_CHECK_HEADER(smpeg.h, have_smpeg_hdr=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
184 AC_CHECK_LIB(smpeg, SMPEG_new, have_smpeg_lib=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
185 if test x$have_smpeg_hdr = xyes -a x$have_smpeg_lib = xyes; then
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
186 LIBS="$LIBS -lsmpeg"
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
187 AC_DEFINE(SOUND_SUPPORTS_SMPEG, 1, [Define if SMPEG support is desired.])
110
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
188 fi
5e5adbe0f215 Added Midi decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 105
diff changeset
189 fi
85
b939258bd177 Added Shorten module.
Ryan C. Gordon <icculus@icculus.org>
parents: 74
diff changeset
190
262
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
191 dnl Check for the MIDI decoder...
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
192 AC_ARG_ENABLE(mpglib,
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
193 [ --enable-mpglib enable MP3 decoding internally [default=yes]],
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
194 , enable_mpglib=yes)
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
195 if test x$enable_mpglib = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
196 AC_DEFINE(SOUND_SUPPORTS_MPGLIB, 1, [Define if MPGLIB support is desired.])
262
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
197 fi
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
198
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
199
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
200 dnl Check for libmikmod
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
201 AC_ARG_ENABLE(mikmod,
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
202 [ --enable-mikmod enable MOD decoding via mikmod [default=yes]],
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
203 , enable_mikmod=yes)
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
204 if test x$enable_mikmod = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
205 AC_CHECK_HEADER(mikmod.h, have_mikmod_hdr=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
206 AC_CHECK_LIB(mikmod, MikMod_RegisterDriver, have_mikmod_lib=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
207 if test x$have_mikmod_hdr = xyes -a x$have_mikmod_lib = xyes; then
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
208 LIBS="$LIBS -lmikmod"
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
209 AC_DEFINE(SOUND_SUPPORTS_MIKMOD, 1, [Define if MIKMOD support is desired.])
209
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
210 fi
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
211 fi
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
212
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
213 dnl Check for libmodplug
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
214 AC_ARG_ENABLE(modplug,
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
215 [ --enable-modplug enable MOD decoding via modplug [default=yes]],
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
216 , enable_modplug=yes)
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
217 if test x$enable_modplug = xyes; then
495
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
218 have_modplug_hdr=no
209
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
219 AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes)
495
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
220 if test x$have_modplug_hdr = xno; then
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
221 AC_CHECK_HEADER(libmodplug/modplug.h, have_modplug_hdr=yes)
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
222 if test x$have_modplug_hdr = xyes; then
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
223 have_modplug_hdr=yes
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
224 AC_DEFINE(SOUND_MODPLUG_IN_OWN_PATH, 1, [Define if modplug header is in own directory.])
495
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
225 fi
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
226 fi
d0d381a6f2bb Look for modplug headers in both include path and include path + "libmodplug".
Ryan C. Gordon <icculus@icculus.org>
parents: 465
diff changeset
227
209
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
228 AC_CHECK_LIB(modplug, ModPlug_Load, have_modplug_lib=yes)
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
229 if test x$have_modplug_hdr = xyes -a x$have_modplug_lib = xyes; then
e63b9393f6ce Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 201
diff changeset
230 LIBS="$LIBS -lmodplug"
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
231 AC_DEFINE(SOUND_SUPPORTS_MODPLUG, 1, [Define if MODPLUG support is desired.])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
232 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
233 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
234
515
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
235 AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes)
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
236 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes)
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
237 have_ogg=no
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
238 if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
239 have_ogg=yes
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
240 fi
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
241
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
242 dnl !!! FIXME: should be --enable-vorbis.
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
243 dnl Check for Ogg Vorbis
276
d7d55903124c Changed --enable-vorbis to --enable-ogg, made other format tweaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 262
diff changeset
244 AC_ARG_ENABLE(ogg,
d7d55903124c Changed --enable-vorbis to --enable-ogg, made other format tweaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 262
diff changeset
245 [ --enable-ogg enable OGG decoding via libvorbis [default=yes]],
d7d55903124c Changed --enable-vorbis to --enable-ogg, made other format tweaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 262
diff changeset
246 , enable_ogg=yes)
d7d55903124c Changed --enable-vorbis to --enable-ogg, made other format tweaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 262
diff changeset
247 if test x$enable_ogg = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
248 AC_CHECK_HEADER(vorbis/codec.h, have_vorbis_hdr=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
249 AC_CHECK_LIB(vorbis, vorbis_info_init, have_vorbis_lib=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
250 AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
251 AC_CHECK_LIB(vorbisfile, ov_open_callbacks, have_vorbisfile_lib=yes)
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
252 have_vorbis=no
515
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
253 if test x$have_ogg = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
254 if test x$have_vorbis_hdr = xyes -a x$have_vorbis_lib = xyes; then
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
255 if test x$have_vorbisfile_hdr = xyes -a x$have_vorbisfile_lib = xyes; then
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
256 have_vorbis=yes
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
257 fi
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
258 fi
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
259 fi
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
260
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
261 if test x$have_vorbis = xyes; then
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
262 CFLAGS="$CFLAGS"
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
263 LIBS="$LIBS -logg -lvorbis -lvorbisfile"
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
264 AC_DEFINE(SOUND_SUPPORTS_OGG, 1, [Define if OGG support is desired.])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
265 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
266 fi
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
267
515
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
268
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
269 dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
270 dnl FLAC developers tend to break their API with every release, so we're
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
271 dnl checking for the latest-and-greatest here so we don't have to support
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
272 dnl obsolete versions.
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
273 dnl Starting with FLAC 1.1.3:
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
274 dnl libFLAC supports Ogg FLAC (no more libOggFLAC) so we also need -logg
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
275 dnl the libFLAC .so version is also #defined in FLAC/export.h
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
276
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
277 dnl Hooray for shitty autoconf bugs!
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
278 x="C__stream_decoder_process_single"
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
279 flcsym="FLA$x"
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
280 dnl Check for libFLAC
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
281 AC_ARG_ENABLE(flac,
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
282 [ --enable-flac enable FLAC decoding via libFLAC [default=yes]],
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
283 , enable_flac=yes)
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
284 if test x$enable_flac = xyes; then
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
285 AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes)
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
286 AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes)
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
287 if test x$have_ogg = xyes; then
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
288 if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
289 LIBS="$LIBS -lFLAC -logg"
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
290 AC_DEFINE(SOUND_SUPPORTS_FLAC, 1, [Define if FLAC support is desired.])
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
291 fi
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
292 fi
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
293 fi
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
294
c5f184b4b2cd Updated to libFLAC 1.1.3 API.
Ryan C. Gordon <icculus@icculus.org>
parents: 500
diff changeset
295
450
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
296 dnl Check for speex
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
297 AC_ARG_ENABLE(speex,
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
298 [ --enable-speex enable SPX decoding via libspeex [default=yes]],
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
299 , enable_speex=yes)
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
300 if test x$enable_speex = xyes; then
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
301 AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes)
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
302 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes)
532
a8492d97dd5a Newer versions of Speex moved to a new include directory.
Ryan C. Gordon <icculus@icculus.org>
parents: 515
diff changeset
303 AC_CHECK_HEADER(speex/speex.h, have_speex_hdr=yes)
450
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
304 AC_CHECK_LIB(speex, speex_bits_init, have_speex_lib=yes)
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
305 if test "x$have_ogg_hdr" = "xyes" -a "x$have_ogg_lib" = "xyes" -a "x$have_speex_hdr" = "xyes" -a "x$have_speex_lib" = "xyes"; then
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
306 LIBS="$LIBS -logg -lspeex"
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
307 AC_DEFINE(SOUND_SUPPORTS_SPEEX, 1, [Define if SPEEX support is desired.])
450
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
308 fi
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
309 fi
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
310
6d328f00c20d Added Speex decoder.
Ryan C. Gordon <icculus@icculus.org>
parents: 427
diff changeset
311
288
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
312 dnl Check for PhysicsFS http://icculus.org/physfs/
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
313 AC_ARG_ENABLE(physfs,
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
314 [ --enable-physfs enable PhysicsFS in playsound [default=yes]],
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
315 , enable_physfs=yes)
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
316 if test x$enable_physfs = xyes; then
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
317 AC_CHECK_HEADER(physfs.h, have_physfs_hdr=yes)
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
318 AC_CHECK_LIB(physfs, PHYSFS_init, have_physfs_lib=yes)
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
319 if test x$have_physfs_hdr = xyes -a x$have_physfs_lib = xyes; then
340
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
320 enable_physfs="yes"
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
321 else
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
322 enable_physfs="no"
288
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
323 fi
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
324 fi
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
325
340
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
326 dnl Check for PhysicsFS http://icculus.org/physfs/
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
327 AC_ARG_ENABLE(altcvt,
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
328 [ --enable-altcvt enable EXPERIMENTAL audio converter [default=no]],
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
329 , enable_altcvt=no)
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
330 if test x$enable_altcvt = xyes; then
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 495
diff changeset
331 AC_DEFINE(SOUND_USE_ALTCVT, 1, [Define to use alternate audio converter.])
340
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
332 fi
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
333
288
259daddc2d6b PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents: 276
diff changeset
334
188
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
335 dnl Check for efence (!!! FIXME : This doesn't work.)
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
336 dnl AC_ARG_ENABLE(efence,
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
337 dnl [ --enable-efence enable ElectricFence usage [default=no]],
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
338 dnl , enable_efence=no)
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
339 dnl if test x$enable_efence = xyes; then
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
340 dnl LIBS="$LIBS /usr/lib/libefence.a"
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
341 dnl fi
8df5aff6ce12 Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents: 162
diff changeset
342
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
343 # Checks for header files.
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
344 AC_HEADER_STDC
377
cbb15ecf423a WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents: 340
diff changeset
345 AC_CHECK_HEADERS([stdlib.h string.h signal.h assert.h])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
346
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
347 # Checks for typedefs, structures, and compiler characteristics.
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
348 AC_C_CONST
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
349 AC_TYPE_SIZE_T
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
350
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
351 # Checks for library functions.
74
2777e65f6478 Commented out AC_FUNC_MALLOC for now.
Ryan C. Gordon <icculus@icculus.org>
parents: 66
diff changeset
352
2777e65f6478 Commented out AC_FUNC_MALLOC for now.
Ryan C. Gordon <icculus@icculus.org>
parents: 66
diff changeset
353 # This is only in the bleeding edge autoconf distro...
2777e65f6478 Commented out AC_FUNC_MALLOC for now.
Ryan C. Gordon <icculus@icculus.org>
parents: 66
diff changeset
354 #AC_FUNC_MALLOC
2777e65f6478 Commented out AC_FUNC_MALLOC for now.
Ryan C. Gordon <icculus@icculus.org>
parents: 66
diff changeset
355
377
cbb15ecf423a WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents: 340
diff changeset
356
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
357 AC_FUNC_MEMCMP
377
cbb15ecf423a WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents: 340
diff changeset
358 AC_CHECK_FUNCS([memset strrchr setbuf])
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
359
201
56bc776f0563 Midi support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
360 dnl Add Makefile conditionals
56bc776f0563 Midi support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
361 AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes)
262
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
362 AM_CONDITIONAL(USE_MPGLIB, test x$enable_mpglib = xyes)
340
5a72981b8cba Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents: 314
diff changeset
363 AM_CONDITIONAL(USE_PHYSICSFS, test x$enable_physfs = xyes)
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
364
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
365 AC_OUTPUT([
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
366 Makefile
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
367 decoders/Makefile
201
56bc776f0563 Midi support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
368 decoders/timidity/Makefile
262
6fe6de401b63 mpglib support.
Ryan C. Gordon <icculus@icculus.org>
parents: 252
diff changeset
369 decoders/mpglib/Makefile
229
fe5251b5624c Changed test dir to playsound, and make playsound part of standard build and
Ryan C. Gordon <icculus@icculus.org>
parents: 216
diff changeset
370 playsound/Makefile
65
cee26d04d0ca Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
371 ])