Mercurial > SDL_sound_CoreAudio
annotate configure.in @ 579:6927c489964c
Bug fix for CoreAudio seeking. Comments inline in code.
author | Eric Wing <ewing@anscamobile.com> |
---|---|
date | Mon, 08 Nov 2010 21:02:49 -0800 |
parents | cddbe182ae5e |
children |
rev | line source |
---|---|
65 | 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 | 3 |
4 dnl --------------------------------------------------------------------- | |
5 dnl System/version info | |
6 dnl --------------------------------------------------------------------- | |
7 | |
8 # Making releases: | |
9 # MICRO_VERSION += 1; | |
10 # INTERFACE_AGE += 1; | |
11 # BINARY_AGE += 1; | |
12 # if any functions have been added, set INTERFACE_AGE to 0. | |
13 # if backwards compatibility has been broken, | |
14 # set BINARY_AGE and INTERFACE_AGE to 0. | |
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 |
463
6e50a61059b8
Upped version to 1.0.1.
Ryan C. Gordon <icculus@icculus.org>
parents:
450
diff
changeset
|
18 MICRO_VERSION=1 |
65 | 19 INTERFACE_AGE=0 |
20 BINARY_AGE=0 | |
21 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION | |
22 | |
23 AC_SUBST(MAJOR_VERSION) | |
24 AC_SUBST(MINOR_VERSION) | |
25 AC_SUBST(MICRO_VERSION) | |
26 AC_SUBST(INTERFACE_AGE) | |
27 AC_SUBST(BINARY_AGE) | |
28 AC_SUBST(VERSION) | |
29 | |
30 # libtool versioning | |
31 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION | |
32 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE` | |
33 LT_REVISION=$INTERFACE_AGE | |
34 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE` | |
35 | |
36 AC_SUBST(LT_RELEASE) | |
37 AC_SUBST(LT_CURRENT) | |
38 AC_SUBST(LT_REVISION) | |
39 AC_SUBST(LT_AGE) | |
40 | |
41 dnl Detect the canonical host and target build environment | |
42 AC_CANONICAL_HOST | |
43 AC_CANONICAL_TARGET | |
44 | |
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 | 47 AM_INIT_AUTOMAKE(SDL_sound, $VERSION) |
48 | |
49 | |
50 dnl --------------------------------------------------------------------- | |
51 dnl Compilers and other tools | |
52 dnl --------------------------------------------------------------------- | |
53 | |
54 AC_PROG_CC | |
55 AC_PROG_INSTALL | |
56 AC_PROG_LN_S | |
562
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
57 AM_PROG_AS |
377
cbb15ecf423a
WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents:
340
diff
changeset
|
58 AM_PROG_LIBTOOL |
65 | 59 |
60 | |
61 dnl --------------------------------------------------------------------- | |
100
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
62 dnl Debug mode? |
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
63 dnl --------------------------------------------------------------------- |
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
64 |
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
65 AC_ARG_ENABLE(debug, |
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
66 [ --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
|
67 , enable_debug=no) |
100
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
68 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
|
69 if test x$ac_cv_prog_cc_g = xyes; then |
524
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
70 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS -g -O0" |
100
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
71 else |
524
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
72 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS -O0" |
100
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
73 fi |
524
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
74 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS -Werror" |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
75 AC_DEFINE(DEBUG, 1, [Define for debug builds.]) |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
76 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
|
77 else |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
78 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
|
79 fi |
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
85
diff
changeset
|
80 |
524
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
81 dnl --------------------------------------------------------------------- |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
82 dnl Have GCC's -fvisibility option? |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
83 dnl --------------------------------------------------------------------- |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
84 AC_MSG_CHECKING(for GCC -fvisibility=hidden option) |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
85 have_gcc_fvisibility=no |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
86 visibility_CFLAGS="-fvisibility=hidden" |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
87 save_CFLAGS="$CFLAGS" |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
88 CFLAGS="$save_CFLAGS $visibility_CFLAGS" |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
89 AC_TRY_COMPILE([ |
568
cddbe182ae5e
Cleaned up gcc4 visibility check.
Ryan C. Gordon <icculus@icculus.org>
parents:
562
diff
changeset
|
90 #if !defined(__GNUC__) || __GNUC__ < 4 |
cddbe182ae5e
Cleaned up gcc4 visibility check.
Ryan C. Gordon <icculus@icculus.org>
parents:
562
diff
changeset
|
91 #error SDL only uses visibility attributes in GCC 4 or newer |
cddbe182ae5e
Cleaned up gcc4 visibility check.
Ryan C. Gordon <icculus@icculus.org>
parents:
562
diff
changeset
|
92 #endif |
524
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
93 ],[ |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
94 ],[ |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
95 have_gcc_fvisibility=yes |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
96 ]) |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
97 AC_MSG_RESULT($have_gcc_fvisibility) |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
98 CFLAGS="$save_CFLAGS" |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
99 |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
100 if test x$have_gcc_fvisibility = xyes; then |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
101 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS $visibility_CFLAGS" |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
102 fi |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
103 |
100
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 | 106 dnl Checks for libraries. |
107 dnl --------------------------------------------------------------------- | |
108 | |
109 dnl Check for SDL | |
110 SDL_VERSION=1.2.0 | |
111 AM_PATH_SDL($SDL_VERSION, | |
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 | 114 ) |
524
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
115 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS $SDL_CFLAGS" |
65 | 116 LIBS="$LIBS $SDL_LIBS" |
117 | |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
118 |
65 | 119 dnl Check for voc decoder inclusion... |
120 AC_ARG_ENABLE(voc, | |
121 [ --enable-voc enable VOC decoding [default=yes]], | |
122 , enable_voc=yes) | |
123 if test x$enable_voc = xyes; then | |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
124 AC_DEFINE(SOUND_SUPPORTS_VOC, 1, [Define if VOC support is desired.]) |
65 | 125 fi |
126 | |
127 | |
128 dnl Check for wav decoder inclusion... | |
129 AC_ARG_ENABLE(wav, | |
130 [ --enable-wav enable WAV decoding [default=yes]], | |
131 , enable_wav=yes) | |
132 if test x$enable_wav = xyes; then | |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
133 AC_DEFINE(SOUND_SUPPORTS_WAV, 1, [Define if WAV support is desired.]) |
65 | 134 fi |
135 | |
136 | |
137 dnl Check for raw decoder inclusion... | |
138 AC_ARG_ENABLE(raw, | |
139 [ --enable-raw enable raw audio "decoding" [default=yes]], | |
140 , enable_raw=yes) | |
141 if test x$enable_raw = xyes; then | |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
142 AC_DEFINE(SOUND_SUPPORTS_RAW, 1, [Define if RAW support is desired.]) |
65 | 143 fi |
144 | |
145 | |
146 dnl Check for aiff decoder inclusion... | |
147 AC_ARG_ENABLE(aiff, | |
148 [ --enable-aiff enable AIFF decoding [default=yes]], | |
149 , enable_aiff=yes) | |
150 if test x$enable_aiff = xyes; then | |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
151 AC_DEFINE(SOUND_SUPPORTS_AIFF, 1, [Define if AIFF support is desired.]) |
65 | 152 fi |
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 |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
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 | 161 |
85 | 162 dnl Check for shn decoder inclusion... |
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 | 166 if test x$enable_shn = xyes; then |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
167 AC_DEFINE(SOUND_SUPPORTS_SHN, 1, [Define if SHN support is desired.]) |
85 | 168 fi |
169 | |
262 | 170 dnl Check for the MIDI decoder... |
110 | 171 AC_ARG_ENABLE(midi, |
201 | 172 [ --enable-midi enable software MIDI music [default=yes]], |
173 , enable_midi=yes) | |
110 | 174 if test x$enable_midi = xyes; then |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
175 AC_DEFINE(SOUND_SUPPORTS_MIDI, 1, [Define if MIDI support is desired.]) |
110 | 176 fi |
177 | |
562
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
178 dnl Check for the MP3 decoder... |
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
179 AC_ARG_ENABLE(mpg123, |
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
180 [ --enable-mpg123 enable MP3 decoding [default=yes]], |
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
181 , enable_mpg123=yes) |
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
182 if test x$enable_mpg123 = xyes; then |
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
183 AC_DEFINE(SOUND_SUPPORTS_MPG123, 1, [Define if MPG123 support is desired.]) |
110 | 184 fi |
85 | 185 |
65 | 186 dnl Check for libmikmod |
187 AC_ARG_ENABLE(mikmod, | |
188 [ --enable-mikmod enable MOD decoding via mikmod [default=yes]], | |
189 , enable_mikmod=yes) | |
190 if test x$enable_mikmod = xyes; then | |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
191 AC_CHECK_HEADER(mikmod.h, have_mikmod_hdr=yes) |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
192 AC_CHECK_LIB(mikmod, MikMod_RegisterDriver, have_mikmod_lib=yes) |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
193 if test x$have_mikmod_hdr = xyes -a x$have_mikmod_lib = xyes; then |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
194 LIBS="$LIBS -lmikmod" |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
195 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
|
196 fi |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
197 fi |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
198 |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
199 dnl Check for libmodplug |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
200 AC_ARG_ENABLE(modplug, |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
201 [ --enable-modplug enable MOD decoding via modplug [default=yes]], |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
202 , enable_modplug=yes) |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
203 if test x$enable_modplug = xyes; then |
496
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
204 have_modplug_hdr=no |
209
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
205 AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes) |
496
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
206 if test x$have_modplug_hdr = xno; then |
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
207 AC_CHECK_HEADER(libmodplug/modplug.h, have_modplug_hdr=yes) |
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
208 if test x$have_modplug_hdr = xyes; then |
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
209 have_modplug_hdr=yes |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
210 AC_DEFINE(SOUND_MODPLUG_IN_OWN_PATH, 1, [Define if modplug header is in own directory.]) |
496
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
211 fi |
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
212 fi |
67d785044411
Forward port from stable branch: fix modplug header detection.
Ryan C. Gordon <icculus@icculus.org>
parents:
483
diff
changeset
|
213 |
209
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
214 AC_CHECK_LIB(modplug, ModPlug_Load, have_modplug_lib=yes) |
e63b9393f6ce
Added ModPlug support.
Ryan C. Gordon <icculus@icculus.org>
parents:
201
diff
changeset
|
215 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
|
216 LIBS="$LIBS -lmodplug" |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
217 AC_DEFINE(SOUND_SUPPORTS_MODPLUG, 1, [Define if MODPLUG support is desired.]) |
65 | 218 fi |
219 fi | |
220 | |
516
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
221 AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes) |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
222 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
223 have_ogg=no |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
224 if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
225 have_ogg=yes |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
226 fi |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
227 |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
228 dnl !!! FIXME: should be --enable-vorbis. |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
229 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
|
230 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
|
231 [ --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
|
232 , enable_ogg=yes) |
d7d55903124c
Changed --enable-vorbis to --enable-ogg, made other format tweaks.
Ryan C. Gordon <icculus@icculus.org>
parents:
262
diff
changeset
|
233 if test x$enable_ogg = xyes; then |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
234 AC_CHECK_HEADER(vorbis/codec.h, have_vorbis_hdr=yes) |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
235 AC_CHECK_LIB(vorbis, vorbis_info_init, have_vorbis_lib=yes) |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
236 AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes) |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
237 AC_CHECK_LIB(vorbisfile, ov_open_callbacks, have_vorbisfile_lib=yes) |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
238 have_vorbis=no |
516
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
239 if test x$have_ogg = xyes; then |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
240 if test x$have_vorbis_hdr = xyes -a x$have_vorbis_lib = xyes; then |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
241 if test x$have_vorbisfile_hdr = xyes -a x$have_vorbisfile_lib = xyes; then |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
242 have_vorbis=yes |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
243 fi |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
244 fi |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
245 fi |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
246 |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
247 if test x$have_vorbis = xyes; then |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
248 LIBS="$LIBS -logg -lvorbis -lvorbisfile" |
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
249 AC_DEFINE(SOUND_SUPPORTS_OGG, 1, [Define if OGG support is desired.]) |
65 | 250 fi |
251 fi | |
252 | |
516
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
253 |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
254 dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
255 dnl FLAC developers tend to break their API with every release, so we're |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
256 dnl checking for the latest-and-greatest here so we don't have to support |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
257 dnl obsolete versions. |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
258 dnl Starting with FLAC 1.1.3: |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
259 dnl libFLAC supports Ogg FLAC (no more libOggFLAC) so we also need -logg |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
260 dnl the libFLAC .so version is also #defined in FLAC/export.h |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
261 |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
262 dnl Hooray for shitty autoconf bugs! |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
263 x="C__stream_decoder_process_single" |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
264 flcsym="FLA$x" |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
265 dnl Check for libFLAC |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
266 AC_ARG_ENABLE(flac, |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
267 [ --enable-flac enable FLAC decoding via libFLAC [default=yes]], |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
268 , enable_flac=yes) |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
269 if test x$enable_flac = xyes; then |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
270 AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes) |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
271 AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes) |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
272 if test x$have_ogg = xyes; then |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
273 if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
274 LIBS="$LIBS -lFLAC -logg" |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
275 AC_DEFINE(SOUND_SUPPORTS_FLAC, 1, [Define if FLAC support is desired.]) |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
276 fi |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
277 fi |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
278 fi |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
279 |
46d5f399cb35
Patch from stable-1.0 branch r528:529.
Ryan C. Gordon <icculus@icculus.org>
parents:
501
diff
changeset
|
280 |
450 | 281 dnl Check for speex |
282 AC_ARG_ENABLE(speex, | |
561
f2985e08589c
Fixed spacing on Speex --help text in configure script.
Ryan C. Gordon <icculus@icculus.org>
parents:
560
diff
changeset
|
283 [ --enable-speex enable SPX decoding via libspeex [default=yes]], |
450 | 284 , enable_speex=yes) |
285 if test x$enable_speex = xyes; then | |
286 AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes) | |
287 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) | |
534
a116d8f628a0
Merged r541:543 from branches/stable-1.0: Speex include directory fix.
Ryan C. Gordon <icculus@icculus.org>
parents:
524
diff
changeset
|
288 AC_CHECK_HEADER(speex/speex.h, have_speex_hdr=yes) |
450 | 289 AC_CHECK_LIB(speex, speex_bits_init, have_speex_lib=yes) |
290 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 | |
291 LIBS="$LIBS -logg -lspeex" | |
497
0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
Ryan C. Gordon <icculus@icculus.org>
parents:
496
diff
changeset
|
292 AC_DEFINE(SOUND_SUPPORTS_SPEEX, 1, [Define if SPEEX support is desired.]) |
450 | 293 fi |
294 fi | |
295 | |
296 | |
288
259daddc2d6b
PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
276
diff
changeset
|
297 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
|
298 AC_ARG_ENABLE(physfs, |
259daddc2d6b
PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
276
diff
changeset
|
299 [ --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
|
300 , enable_physfs=yes) |
259daddc2d6b
PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
276
diff
changeset
|
301 if test x$enable_physfs = xyes; then |
259daddc2d6b
PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
276
diff
changeset
|
302 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
|
303 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
|
304 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
|
305 enable_physfs="yes" |
5a72981b8cba
Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents:
314
diff
changeset
|
306 else |
5a72981b8cba
Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents:
314
diff
changeset
|
307 enable_physfs="no" |
288
259daddc2d6b
PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
276
diff
changeset
|
308 fi |
259daddc2d6b
PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
276
diff
changeset
|
309 fi |
259daddc2d6b
PhysicsFS support tied into build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
276
diff
changeset
|
310 |
188
8df5aff6ce12
Added (broken and commented out) ElectricFence support.
Ryan C. Gordon <icculus@icculus.org>
parents:
162
diff
changeset
|
311 |
65 | 312 # Checks for header files. |
313 AC_HEADER_STDC | |
377
cbb15ecf423a
WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents:
340
diff
changeset
|
314 AC_CHECK_HEADERS([stdlib.h string.h signal.h assert.h]) |
65 | 315 |
316 # Checks for typedefs, structures, and compiler characteristics. | |
317 AC_C_CONST | |
318 AC_TYPE_SIZE_T | |
319 | |
320 # Checks for library functions. | |
74
2777e65f6478
Commented out AC_FUNC_MALLOC for now.
Ryan C. Gordon <icculus@icculus.org>
parents:
66
diff
changeset
|
321 |
2777e65f6478
Commented out AC_FUNC_MALLOC for now.
Ryan C. Gordon <icculus@icculus.org>
parents:
66
diff
changeset
|
322 # 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
|
323 #AC_FUNC_MALLOC |
2777e65f6478
Commented out AC_FUNC_MALLOC for now.
Ryan C. Gordon <icculus@icculus.org>
parents:
66
diff
changeset
|
324 |
377
cbb15ecf423a
WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents:
340
diff
changeset
|
325 |
65 | 326 AC_FUNC_MEMCMP |
377
cbb15ecf423a
WinCE (PocketPC) patches from Tyler.
Ryan C. Gordon <icculus@icculus.org>
parents:
340
diff
changeset
|
327 AC_CHECK_FUNCS([memset strrchr setbuf]) |
65 | 328 |
524
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
329 CFLAGS="$SDLSOUNDCFLAGS $CFLAGS -D_REENTRANT -D_THREAD_SAFE" |
a0bb7a9c05b1
Added -fvisibility=hidden support.
Ryan C. Gordon <icculus@icculus.org>
parents:
516
diff
changeset
|
330 |
201 | 331 dnl Add Makefile conditionals |
332 AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes) | |
562
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
333 AM_CONDITIONAL(USE_LIBMPG123, test x$enable_mpg123 = xyes) |
340
5a72981b8cba
Added optional, experimental audio conversion routines by Frank Ranostaj.
Ryan C. Gordon <icculus@icculus.org>
parents:
314
diff
changeset
|
334 AM_CONDITIONAL(USE_PHYSICSFS, test x$enable_physfs = xyes) |
65 | 335 |
336 AC_OUTPUT([ | |
337 Makefile | |
338 decoders/Makefile | |
201 | 339 decoders/timidity/Makefile |
562
7e08477b0fc1
MP3 decoder upgrade work.
Ryan C. Gordon <icculus@icculus.org>
parents:
561
diff
changeset
|
340 decoders/libmpg123/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
|
341 playsound/Makefile |
65 | 342 ]) |