comparison configure.in @ 497:0b244f36049e

Trimmed a bunch of junk out of the build system, and now it works on Mac OS X again.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 06 Dec 2005 11:44:29 +0000
parents 67d785044411
children 7558f9d03d6f
comparison
equal deleted inserted replaced
496:67d785044411 497:0b244f36049e
69 CFLAGS="-g -O0" 69 CFLAGS="-g -O0"
70 else 70 else
71 CFLAGS="-O0" 71 CFLAGS="-O0"
72 fi 72 fi
73 CFLAGS="$CFLAGS -Werror" 73 CFLAGS="$CFLAGS -Werror"
74 AC_DEFINE(DEBUG) 74 AC_DEFINE(DEBUG, 1, [Define for debug builds.])
75 AC_DEFINE(DEBUG_CHATTER) 75 AC_DEFINE(DEBUG_CHATTER, 1, [Define for debug build chattering.])
76 else 76 else
77 AC_DEFINE(NDEBUG) 77 AC_DEFINE(NDEBUG, 1, [Define to disable debugging.])
78 fi 78 fi
79 79
80 80
81 dnl --------------------------------------------------------------------- 81 dnl ---------------------------------------------------------------------
82 dnl Checks for libraries. 82 dnl Checks for libraries.
89 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 89 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
90 ) 90 )
91 CFLAGS="$CFLAGS $SDL_CFLAGS" 91 CFLAGS="$CFLAGS $SDL_CFLAGS"
92 LIBS="$LIBS $SDL_LIBS" 92 LIBS="$LIBS $SDL_LIBS"
93 93
94
94 dnl Check for voc decoder inclusion... 95 dnl Check for voc decoder inclusion...
95 AC_ARG_ENABLE(voc, 96 AC_ARG_ENABLE(voc,
96 [ --enable-voc enable VOC decoding [default=yes]], 97 [ --enable-voc enable VOC decoding [default=yes]],
97 , enable_voc=yes) 98 , enable_voc=yes)
98 if test x$enable_voc = xyes; then 99 if test x$enable_voc = xyes; then
99 AC_DEFINE(SOUND_SUPPORTS_VOC) 100 AC_DEFINE(SOUND_SUPPORTS_VOC, 1, [Define if VOC support is desired.])
100 fi 101 fi
101 102
102 103
103 dnl Check for wav decoder inclusion... 104 dnl Check for wav decoder inclusion...
104 AC_ARG_ENABLE(wav, 105 AC_ARG_ENABLE(wav,
105 [ --enable-wav enable WAV decoding [default=yes]], 106 [ --enable-wav enable WAV decoding [default=yes]],
106 , enable_wav=yes) 107 , enable_wav=yes)
107 if test x$enable_wav = xyes; then 108 if test x$enable_wav = xyes; then
108 AC_DEFINE(SOUND_SUPPORTS_WAV) 109 AC_DEFINE(SOUND_SUPPORTS_WAV, 1, [Define if WAV support is desired.])
109 fi 110 fi
110 111
111 112
112 dnl Check for raw decoder inclusion... 113 dnl Check for raw decoder inclusion...
113 AC_ARG_ENABLE(raw, 114 AC_ARG_ENABLE(raw,
114 [ --enable-raw enable raw audio "decoding" [default=yes]], 115 [ --enable-raw enable raw audio "decoding" [default=yes]],
115 , enable_raw=yes) 116 , enable_raw=yes)
116 if test x$enable_raw = xyes; then 117 if test x$enable_raw = xyes; then
117 AC_DEFINE(SOUND_SUPPORTS_RAW) 118 AC_DEFINE(SOUND_SUPPORTS_RAW, 1, [Define if RAW support is desired.])
118 fi 119 fi
119 120
120 121
121 dnl Check for aiff decoder inclusion... 122 dnl Check for aiff decoder inclusion...
122 AC_ARG_ENABLE(aiff, 123 AC_ARG_ENABLE(aiff,
123 [ --enable-aiff enable AIFF decoding [default=yes]], 124 [ --enable-aiff enable AIFF decoding [default=yes]],
124 , enable_aiff=yes) 125 , enable_aiff=yes)
125 if test x$enable_aiff = xyes; then 126 if test x$enable_aiff = xyes; then
126 AC_DEFINE(SOUND_SUPPORTS_AIFF) 127 AC_DEFINE(SOUND_SUPPORTS_AIFF, 1, [Define if AIFF support is desired.])
127 fi 128 fi
128 129
129 dnl Check for au decoder inclusion 130 dnl Check for au decoder inclusion
130 AC_ARG_ENABLE(au, 131 AC_ARG_ENABLE(au,
131 [ --enable-au enable AU decoding [default=yes]], 132 [ --enable-au enable AU decoding [default=yes]],
132 , enable_au=yes) 133 , enable_au=yes)
133 if test x$enable_au = xyes; then 134 if test x$enable_au = xyes; then
134 AC_DEFINE(SOUND_SUPPORTS_AU) 135 AC_DEFINE(SOUND_SUPPORTS_AU, 1, [Define if AU support is desired.])
135 fi 136 fi
136 137
137 dnl Check for shn decoder inclusion... 138 dnl Check for shn decoder inclusion...
138 AC_ARG_ENABLE(shn, 139 AC_ARG_ENABLE(shn,
139 [ --enable-shn enable SHN decoding [default=yes]], 140 [ --enable-shn enable SHN decoding [default=yes]],
140 , enable_shn=yes) 141 , enable_shn=yes)
141 if test x$enable_shn = xyes; then 142 if test x$enable_shn = xyes; then
142 AC_DEFINE(SOUND_SUPPORTS_SHN) 143 AC_DEFINE(SOUND_SUPPORTS_SHN, 1, [Define if SHN support is desired.])
143 fi 144 fi
144 145
145 dnl Check for the MIDI decoder... 146 dnl Check for the MIDI decoder...
146 AC_ARG_ENABLE(midi, 147 AC_ARG_ENABLE(midi,
147 [ --enable-midi enable software MIDI music [default=yes]], 148 [ --enable-midi enable software MIDI music [default=yes]],
148 , enable_midi=yes) 149 , enable_midi=yes)
149 if test x$enable_midi = xyes; then 150 if test x$enable_midi = xyes; then
150 AC_DEFINE(SOUND_SUPPORTS_MIDI) 151 AC_DEFINE(SOUND_SUPPORTS_MIDI, 1, [Define if MIDI support is desired.])
151 fi 152 fi
152 153
153 154
154 dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the 155 dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the
155 dnl FLAC developers tend to break their API with every release, so we're 156 dnl FLAC developers tend to break their API with every release, so we're
166 if test x$enable_flac = xyes; then 167 if test x$enable_flac = xyes; then
167 AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes) 168 AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes)
168 AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes) 169 AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes)
169 if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then 170 if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then
170 LIBS="$LIBS -lFLAC" 171 LIBS="$LIBS -lFLAC"
171 AC_DEFINE(SOUND_SUPPORTS_FLAC) 172 AC_DEFINE(SOUND_SUPPORTS_FLAC, 1, [Define if FLAC support is desired.])
172 fi 173 fi
173 fi 174 fi
174 175
175 dnl Check for SMPEG 176 dnl Check for SMPEG
176 AC_ARG_ENABLE(smpeg, 177 AC_ARG_ENABLE(smpeg,
177 [ --enable-smpeg enable MP3 decoding via smpeg [default=yes]], 178 [ --enable-smpeg enable MP3 decoding via smpeg [default=yes]],
178 , enable_smpeg=yes) 179 , enable_smpeg=yes)
179 if test x$enable_smpeg = xyes; then 180 if test x$enable_smpeg = xyes; then
180 SMPEG_VERSION=0.4.3 181 AC_CHECK_HEADER(smpeg.h, have_smpeg_hdr=yes)
181 AM_PATH_SMPEG($SMPEG_VERSION, , no_smpeg=yes) 182 AC_CHECK_LIB(smpeg, SMPEG_new, have_smpeg_lib=yes)
182 if test "x$no_smpeg" = "x" ; then 183 if test x$have_smpeg_hdr = xyes -a x$have_smpeg_lib = xyes; then
183 CFLAGS="$CFLAGS $SMPEG_CFLAGS" 184 LIBS="$LIBS -lsmpeg"
184 LIBS="$LIBS $SMPEG_LIBS" 185 AC_DEFINE(SOUND_SUPPORTS_SMPEG, 1, [Define if SMPEG support is desired.])
185 AC_DEFINE(SOUND_SUPPORTS_SMPEG)
186 fi 186 fi
187 fi 187 fi
188 188
189 dnl Check for the MIDI decoder... 189 dnl Check for the MIDI decoder...
190 AC_ARG_ENABLE(mpglib, 190 AC_ARG_ENABLE(mpglib,
191 [ --enable-mpglib enable MP3 decoding internally [default=yes]], 191 [ --enable-mpglib enable MP3 decoding internally [default=yes]],
192 , enable_mpglib=yes) 192 , enable_mpglib=yes)
193 if test x$enable_mpglib = xyes; then 193 if test x$enable_mpglib = xyes; then
194 AC_DEFINE(SOUND_SUPPORTS_MPGLIB) 194 AC_DEFINE(SOUND_SUPPORTS_MPGLIB, 1, [Define if MPGLIB support is desired.])
195 fi 195 fi
196 196
197 197
198 dnl Check for libmikmod 198 dnl Check for libmikmod
199 AC_ARG_ENABLE(mikmod, 199 AC_ARG_ENABLE(mikmod,
200 [ --enable-mikmod enable MOD decoding via mikmod [default=yes]], 200 [ --enable-mikmod enable MOD decoding via mikmod [default=yes]],
201 , enable_mikmod=yes) 201 , enable_mikmod=yes)
202 if test x$enable_mikmod = xyes; then 202 if test x$enable_mikmod = xyes; then
203 AM_PATH_LIBMIKMOD 203 AC_CHECK_HEADER(mikmod.h, have_mikmod_hdr=yes)
204 if test "x$no_libmikmod" = "x" ; then 204 AC_CHECK_LIB(mikmod, MikMod_RegisterDriver, have_mikmod_lib=yes)
205 CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS" 205 if test x$have_mikmod_hdr = xyes -a x$have_mikmod_lib = xyes; then
206 LIBS="$LIBS $LIBMIKMOD_LIBS" 206 LIBS="$LIBS -lmikmod"
207 LDADD="$LDADD $LIBMIKMOD_LDADD" 207 AC_DEFINE(SOUND_SUPPORTS_MIKMOD, 1, [Define if MIKMOD support is desired.])
208 AC_DEFINE(SOUND_SUPPORTS_MIKMOD)
209 fi 208 fi
210 fi 209 fi
211 210
212 dnl Check for libmodplug 211 dnl Check for libmodplug
213 AC_ARG_ENABLE(modplug, 212 AC_ARG_ENABLE(modplug,
218 AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes) 217 AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes)
219 if test x$have_modplug_hdr = xno; then 218 if test x$have_modplug_hdr = xno; then
220 AC_CHECK_HEADER(libmodplug/modplug.h, have_modplug_hdr=yes) 219 AC_CHECK_HEADER(libmodplug/modplug.h, have_modplug_hdr=yes)
221 if test x$have_modplug_hdr = xyes; then 220 if test x$have_modplug_hdr = xyes; then
222 have_modplug_hdr=yes 221 have_modplug_hdr=yes
223 AC_DEFINE(SOUND_MODPLUG_IN_OWN_PATH) 222 AC_DEFINE(SOUND_MODPLUG_IN_OWN_PATH, 1, [Define if modplug header is in own directory.])
224 fi 223 fi
225 fi 224 fi
226 225
227 AC_CHECK_LIB(modplug, ModPlug_Load, have_modplug_lib=yes) 226 AC_CHECK_LIB(modplug, ModPlug_Load, have_modplug_lib=yes)
228 if test x$have_modplug_hdr = xyes -a x$have_modplug_lib = xyes; then 227 if test x$have_modplug_hdr = xyes -a x$have_modplug_lib = xyes; then
229 LIBS="$LIBS -lmodplug" 228 LIBS="$LIBS -lmodplug"
230 AC_DEFINE(SOUND_SUPPORTS_MODPLUG) 229 AC_DEFINE(SOUND_SUPPORTS_MODPLUG, 1, [Define if MODPLUG support is desired.])
231 fi 230 fi
232 fi 231 fi
233 232
234 dnl Check for ogg 233 dnl Check for ogg
235 AC_ARG_ENABLE(ogg, 234 AC_ARG_ENABLE(ogg,
236 [ --enable-ogg enable OGG decoding via libvorbis [default=yes]], 235 [ --enable-ogg enable OGG decoding via libvorbis [default=yes]],
237 , enable_ogg=yes) 236 , enable_ogg=yes)
238 if test x$enable_ogg = xyes; then 237 if test x$enable_ogg = xyes; then
239 AM_PATH_VORBIS 238 AC_CHECK_HEADER(ogg.h, have_ogg_hdr=yes)
240 if test "x$no_vorbis" = "x" ; then 239 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes)
241 CFLAGS="$CFLAGS $VORBIS_CFLAGS" 240 AC_CHECK_HEADER(vorbis/codec.h, have_vorbis_hdr=yes)
242 LIBS="$LIBS $VORBIS_LIBS $VORBISFILE_LIBS $VORBISENC_LIBS" 241 AC_CHECK_LIB(vorbis, vorbis_info_init, have_vorbis_lib=yes)
243 AC_DEFINE(SOUND_SUPPORTS_OGG) 242 AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes)
243 AC_CHECK_LIB(vorbisfile, ov_open_callbacks, have_vorbisfile_lib=yes)
244
245 have_vorbis=no
246 if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then
247 if test x$have_vorbis_hdr = xyes -a x$have_vorbis_lib = xyes; then
248 if test x$have_vorbisfile_hdr = xyes -a x$have_vorbisfile_lib = xyes; then
249 have_vorbis=yes
250 fi
251 fi
252 fi
253
254 if test x$have_vorbis = xyes; then
255 CFLAGS="$CFLAGS"
256 LIBS="$LIBS -logg -lvorbis -lvorbisfile"
257 AC_DEFINE(SOUND_SUPPORTS_OGG, 1, [Define if OGG support is desired.])
244 fi 258 fi
245 fi 259 fi
246 260
247 dnl Check for speex 261 dnl Check for speex
248 AC_ARG_ENABLE(speex, 262 AC_ARG_ENABLE(speex,
253 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) 267 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes)
254 AC_CHECK_HEADER(speex.h, have_speex_hdr=yes) 268 AC_CHECK_HEADER(speex.h, have_speex_hdr=yes)
255 AC_CHECK_LIB(speex, speex_bits_init, have_speex_lib=yes) 269 AC_CHECK_LIB(speex, speex_bits_init, have_speex_lib=yes)
256 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 270 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
257 LIBS="$LIBS -logg -lspeex" 271 LIBS="$LIBS -logg -lspeex"
258 AC_DEFINE(SOUND_SUPPORTS_SPEEX) 272 AC_DEFINE(SOUND_SUPPORTS_SPEEX, 1, [Define if SPEEX support is desired.])
259 fi 273 fi
260 fi 274 fi
261 275
262 276
263 dnl Check for PhysicsFS http://icculus.org/physfs/ 277 dnl Check for PhysicsFS http://icculus.org/physfs/