Skip to content

Latest commit

 

History

History
784 lines (727 loc) · 28.9 KB

configure.in

File metadata and controls

784 lines (727 loc) · 28.9 KB
 
Oct 21, 1999
Oct 21, 1999
1
dnl Process this file with autoconf to produce a configure script.
May 27, 2013
May 27, 2013
2
AC_INIT(README.txt)
Nov 17, 2011
Nov 17, 2011
3
AC_CONFIG_AUX_DIR(build-scripts)
Oct 21, 1999
Oct 21, 1999
4
5
6
7
8
9
10
11
12
13
dnl Set various version strings - taken gratefully from the GTk sources
# Making releases:
# MICRO_VERSION += 1;
# INTERFACE_AGE += 1;
# BINARY_AGE += 1;
# if any functions have been added, set INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set BINARY_AGE and INTERFACE_AGE to 0.
Apr 30, 2006
Apr 30, 2006
14
#
Feb 27, 2013
Feb 27, 2013
15
16
MAJOR_VERSION=2
MINOR_VERSION=0
Oct 26, 2018
Oct 26, 2018
17
18
19
MICRO_VERSION=4
INTERFACE_AGE=2
BINARY_AGE=4
Oct 21, 1999
Oct 21, 1999
20
21
22
23
24
25
26
27
28
29
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(MICRO_VERSION)
AC_SUBST(INTERFACE_AGE)
AC_SUBST(BINARY_AGE)
AC_SUBST(VERSION)
# libtool versioning
Oct 4, 2009
Oct 4, 2009
30
31
LT_INIT([win32-dll])
Oct 21, 1999
Oct 21, 1999
32
33
34
35
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
LT_REVISION=$INTERFACE_AGE
LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
Oct 10, 2009
Oct 10, 2009
36
m4_pattern_allow([^LT_])
Oct 21, 1999
Oct 21, 1999
37
38
39
40
41
42
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
Mar 19, 2006
Mar 19, 2006
43
dnl Detect the canonical build and host environments
Apr 30, 2006
Apr 30, 2006
44
AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
Oct 10, 2009
Oct 10, 2009
45
dnl AC_CANONICAL_HOST
Aug 10, 2000
Aug 10, 2000
46
Oct 2, 2009
Oct 2, 2009
47
48
49
50
51
52
53
54
55
56
57
58
dnl Check for tools
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
if test -z "$host_alias"; then
hostaliaswindres=
else
hostaliaswindres="$host_alias-windres"
fi
AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
Apr 30, 2006
Apr 30, 2006
59
60
61
62
63
64
65
66
67
68
69
70
dnl Set up the compiler and linker flags
case "$host" in
*-*-cygwin*)
# We build SDL on cygwin without the UNIX emulation layer
BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
BASE_LDFLAGS="-mno-cygwin"
;;
*)
BASE_CFLAGS="-D_GNU_SOURCE=1"
BASE_LDFLAGS=""
;;
esac
Nov 19, 2019
Nov 19, 2019
71
BUILD_CFLAGS="$CFLAGS $CPPFLAGS -I$srcdir/include -I$srcdir/src -I$srcdir/src/codecs"
Apr 30, 2006
Apr 30, 2006
72
73
74
EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
BUILD_LDFLAGS="$LDFLAGS"
EXTRA_LDFLAGS="$BASE_LDFLAGS"
Jul 18, 2007
Jul 18, 2007
75
76
77
78
79
80
81
82
83
## These are common directories to find software packages
#for path in /usr/freeware /usr/pkg /usr/local; do
# if test -d $path/include; then
# EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
# fi
# if test -d $path/lib; then
# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
# fi
#done
Apr 30, 2006
Apr 30, 2006
84
85
86
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
Jun 10, 2001
Jun 10, 2001
87
Apr 30, 2006
Apr 30, 2006
88
89
dnl Check for compiler characteristics
AC_C_CONST
Oct 21, 1999
Oct 21, 1999
90
Oct 8, 2009
Oct 8, 2009
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
dnl See whether we can use gcc style dependency tracking
AC_ARG_ENABLE(dependency-tracking,
AC_HELP_STRING([--enable-dependency-tracking],
[Use gcc -MMD -MT dependency tracking [[default=yes]]]),
, enable_dependency_tracking=yes)
if test x$enable_dependency_tracking = xyes; then
have_gcc_mmd_mt=no
AC_MSG_CHECKING(for GCC -MMD -MT option)
AC_TRY_COMPILE([
#if !defined(__GNUC__) || __GNUC__ < 3
#error Dependency tracking requires GCC 3.0 or newer
#endif
],[
],[
have_gcc_mmd_mt=yes
])
AC_MSG_RESULT($have_gcc_mmd_mt)
if test x$have_gcc_mmd_mt = xyes; then
DEPENDENCY_TRACKING_OPTIONS="-MMD -MT \$@"
fi
fi
Oct 14, 2018
Oct 14, 2018
113
Mar 19, 2006
Mar 19, 2006
114
case "$host" in
Apr 14, 2010
Apr 14, 2010
115
116
117
*mingw32ce*)
#VERSION_SOURCES="$srcdir/version.rc"
EXE=".exe"
Aug 2, 2015
Aug 2, 2015
118
;;
Aug 10, 2000
Aug 10, 2000
119
*-*-cygwin* | *-*-mingw32*)
Oct 4, 2009
Oct 4, 2009
120
VERSION_SOURCES="$srcdir/version.rc"
Apr 30, 2006
Apr 30, 2006
121
EXE=".exe"
Jul 18, 2007
Jul 18, 2007
122
123
if test "$build" != "$host"; then # cross-compiling
# Default cross-compile location
Feb 2, 2014
Feb 2, 2014
124
ac_default_prefix=/usr/local/cross-tools/$host
Jul 18, 2007
Jul 18, 2007
125
126
127
128
129
130
else
# Look for the location of the tools and install there
if test "$BUILD_PREFIX" != ""; then
ac_default_prefix=$BUILD_PREFIX
fi
fi
Aug 10, 2000
Aug 10, 2000
131
;;
Apr 30, 2006
Apr 30, 2006
132
133
*)
EXE=""
Feb 4, 2003
Feb 4, 2003
134
;;
Oct 25, 1999
Oct 25, 1999
135
136
esac
Apr 30, 2006
Apr 30, 2006
137
# Standard C sources
Nov 19, 2019
Nov 19, 2019
138
SOURCES=`ls $srcdir/src/*.c $srcdir/src/codecs/*.c | fgrep -v playwave.c | fgrep -v playmus.c`
Apr 30, 2006
Apr 30, 2006
139
Oct 13, 2009
Oct 13, 2009
140
141
142
dnl set this to use on systems that use lib64 instead of lib
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
Jan 5, 2010
Jan 5, 2010
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
CheckVisibilityHidden()
{
AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
have_gcc_fvisibility=no
visibility_CFLAGS="-fvisibility=hidden"
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS $visibility_CFLAGS -Werror"
AC_TRY_COMPILE([
#if !defined(__GNUC__) || __GNUC__ < 4
#error SDL only uses visibility attributes in GCC 4 or newer
#endif
],[
],[
have_gcc_fvisibility=yes
])
AC_MSG_RESULT($have_gcc_fvisibility)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_fvisibility = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
fi
}
Oct 13, 2009
Oct 13, 2009
170
dnl Function to find a library in the compiler search path
Jul 18, 2007
Jul 18, 2007
171
172
find_lib()
{
Jul 21, 2007
Jul 21, 2007
173
174
gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
Oct 13, 2009
Oct 13, 2009
175
env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
Oct 2, 2009
Oct 2, 2009
176
177
178
if test "$cross_compiling" = yes; then
host_lib_path=""
else
Oct 13, 2009
Oct 13, 2009
179
host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
Oct 2, 2009
Oct 2, 2009
180
fi
Nov 29, 2014
Nov 29, 2014
181
for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
Jun 8, 2013
Jun 8, 2013
182
lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
Jul 18, 2007
Jul 18, 2007
183
184
185
186
187
188
189
if test x$lib != x; then
echo $lib
return
fi
done
}
Nov 23, 1999
Nov 23, 1999
190
dnl Check for SDL
Oct 21, 2017
Oct 21, 2017
191
SDL_VERSION=2.0.7
Jan 31, 2012
Jan 31, 2012
192
AM_PATH_SDL2($SDL_VERSION,
Nov 23, 1999
Nov 23, 1999
193
:,
Jul 18, 2007
Jul 18, 2007
194
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
Nov 23, 1999
Nov 23, 1999
195
)
Apr 30, 2006
Apr 30, 2006
196
197
EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SDL_LIBS"
Oct 21, 1999
Oct 21, 1999
198
Oct 26, 2009
Oct 26, 2009
199
200
201
dnl Check for math library
AC_CHECK_LIB(m, pow, [LIBM="-lm"])
Jun 9, 2013
Jun 9, 2013
202
203
204
AC_CHECK_HEADERS([signal.h], [EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_SIGNAL_H"])
AC_CHECK_FUNCS(setbuf, [EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_SETBUF"])
Oct 21, 1999
Oct 21, 1999
205
dnl Check command-line options
Jun 10, 2001
Jun 10, 2001
206
Jan 5, 2010
Jan 5, 2010
207
208
CheckVisibilityHidden
May 12, 2006
May 12, 2006
209
210
AC_ARG_ENABLE([music-cmd],
AC_HELP_STRING([--enable-music-cmd], [support an external music player [[default=yes]]]),
Nov 6, 2009
Nov 6, 2009
211
212
213
214
215
216
217
218
219
220
221
222
223
[], [enable_music_cmd=detect])
if test "x$enable_music_cmd" != xno; then
AC_CHECK_FUNCS([fork vfork])
if test "x$ac_cv_func_fork" = "xyes"; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_FORK"
elif test "x$ac_cv_func_vfork" = "xyes"; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_VFORK"
elif test "x$enable_music_cmd" = "xyes"; then
AC_MSG_ERROR([external music player not available on your platform])
else
enable_music_cmd=no
fi
if test "x$enable_music_cmd" != xno; then
Oct 17, 2017
Oct 17, 2017
224
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_CMD"
Nov 6, 2009
Nov 6, 2009
225
fi
Oct 21, 1999
Oct 21, 1999
226
fi
Oct 3, 2009
Oct 3, 2009
227
May 12, 2006
May 12, 2006
228
229
230
AC_ARG_ENABLE([music-wave],
AC_HELP_STRING([--enable-music-wave], [enable streaming WAVE music [[default=yes]]]),
[], [enable_music_wave=yes])
Oct 21, 1999
Oct 21, 1999
231
if test x$enable_music_wave = xyes; then
Oct 17, 2017
Oct 17, 2017
232
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_WAV"
Oct 21, 1999
Oct 21, 1999
233
fi
Oct 3, 2009
Oct 3, 2009
234
235
AC_ARG_ENABLE([music-mod],
Jun 9, 2013
Jun 9, 2013
236
AC_HELP_STRING([--enable-music-mod], [enable MOD music [[default=yes]]]),
Oct 3, 2009
Oct 3, 2009
237
[], [enable_music_mod=yes])
Jun 9, 2013
Jun 9, 2013
238
239
240
241
242
243
244
245
246
247
248
249
AC_ARG_ENABLE([music-mod-modplug],
AC_HELP_STRING([--enable-music-mod-modplug], [enable MOD music via modplug [[default=yes]]]),
[], [enable_music_mod_modplug=yes])
AC_ARG_ENABLE([music-mod-modplug-shared],
AC_HELP_STRING([--enable-music-mod-modplug-shared], [dynamically load modplug library [[default=yes]]]),
[], [enable_music_mod_modplug_shared=yes])
if test x$enable_music_mod = xyes -a x$enable_music_mod_modplug = xyes; then
PKG_CHECK_MODULES([MODPLUG], [libmodplug >= 0.8.8], [dnl
have_libmodplug_hdr=yes
have_libmodplug_lib=yes
], [dnl
Aug 17, 2014
Aug 17, 2014
250
AC_CHECK_HEADER([libmodplug/modplug.h], [have_libmodplug_hdr=yes])
Oct 14, 2018
Oct 14, 2018
251
AC_CHECK_LIB([modplug], [ModPlug_Load], [have_libmodplug_lib=yes;MODPLUG_LIBS="-lmodplug"])
Jun 9, 2013
Jun 9, 2013
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
])
if test x$have_libmodplug_hdr = xyes -a x$have_libmodplug_lib = xyes; then
have_libmodplug=yes
case "$host" in
*-*-darwin*)
modplug_lib=[`find_lib libmodplug.dylib`]
;;
*-*-cygwin* | *-*-mingw32*)
modplug_lib=[`find_lib "libmodplug*.dll"`]
;;
*)
modplug_lib=[`find_lib "libmodplug[0-9]*.so.*"`]
if test x$modplug_lib = x; then
modplug_lib=[`find_lib "libmodplug.so.*"`]
fi
;;
esac
Oct 17, 2017
Oct 17, 2017
270
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MOD_MODPLUG $MODPLUG_CFLAGS"
Jun 9, 2013
Jun 9, 2013
271
272
273
274
if test x$enable_music_mod_modplug_shared = xyes && test x$modplug_lib != x; then
echo "-- dynamic libmodplug -> $modplug_lib"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMODPLUG_DYNAMIC=\\\"$modplug_lib\\\""
else
Aug 2, 2015
Aug 2, 2015
275
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MODPLUG_LIBS"
Jun 9, 2013
Jun 9, 2013
276
277
278
279
280
281
282
283
284
285
286
287
288
fi
else
AC_MSG_WARN([*** Unable to find ModPlug library (http://modplug-xmms.sourceforge.net/)])
fi
fi
AC_ARG_ENABLE([music-mod-mikmod],
AC_HELP_STRING([--enable-music-mod-mikmod], [enable MOD music via mikmod [[default=no]]]),
[], [enable_music_mod_mikmod=no])
AC_ARG_ENABLE([music-mod-mikmod-shared],
AC_HELP_STRING([--enable-music-mod-mikmod-shared], [dynamically load mikmod library [[default=yes]]]),
[], [enable_music_mod_mikmod_shared=yes])
if test x$enable_music_mod = xyes -a x$enable_music_mod_mikmod = xyes; then
Oct 3, 2009
Oct 3, 2009
289
290
291
292
293
have_libmikmod=no
libmikmod_maj=3
libmikmod_min=1
libmikmod_rev=10
libmikmod_ver="$libmikmod_maj.$libmikmod_min.$libmikmod_rev"
Oct 14, 2018
Oct 14, 2018
294
295
CFLAGS_SAVED="$CFLAGS"
LIBS_SAVED="$LIBS"
Jul 18, 2007
Jul 18, 2007
296
297
AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no, [$PATH])
if test "$LIBMIKMOD_CONFIG" != "no" ; then
Oct 17, 2017
Oct 17, 2017
298
CFLAGS="$CFLAGS `$LIBMIKMOD_CONFIG --cflags`"
Jul 18, 2007
Jul 18, 2007
299
LIBS="$LIBS `$LIBMIKMOD_CONFIG --libs`"
Oct 3, 2009
Oct 3, 2009
300
have_libmikmod=yes
Jul 18, 2007
Jul 18, 2007
301
302
AC_MSG_CHECKING([for libmikmod - version >= $libmikmod_ver])
AC_TRY_RUN([
Nov 13, 2004
Nov 13, 2004
303
304
305
306
307
#include "mikmod.h"
#include "stdio.h"
int main(int argc, char **argv)
{
Oct 3, 2009
Oct 3, 2009
308
309
310
311
312
313
314
315
long maj=$libmikmod_maj,min=$libmikmod_min,rev=$libmikmod_rev,ver=MikMod_GetVersion();
/*printf("(%d.%d.%d) ",ver>>16,(ver>>8)&0xff,ver&0xff);*/
if(ver>=((maj<<16)|(min<<8)|(rev))) {
printf("yes\n");
return 0;
}
printf("no\n*** libmikmod is older than %d.%d.%d, not using.\n",maj,min,rev);
return 1;
Nov 13, 2004
Nov 13, 2004
316
}
Oct 14, 2018
Oct 14, 2018
317
], [], [have_libmikmod=no], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
Jul 18, 2007
Jul 18, 2007
318
fi
Nov 13, 2004
Nov 13, 2004
319
Oct 3, 2009
Oct 3, 2009
320
321
322
if test x$have_libmikmod = xyes; then
case "$host" in
*-*-darwin*)
Oct 18, 2009
Oct 18, 2009
323
mikmod_lib=[`find_lib libmikmod.dylib`]
Oct 3, 2009
Oct 3, 2009
324
325
;;
*-*-cygwin* | *-*-mingw32*)
Jan 9, 2012
Jan 9, 2012
326
mikmod_lib=[`find_lib "libmikmod*.dll"`]
Oct 3, 2009
Oct 3, 2009
327
328
;;
*)
Jun 9, 2013
Jun 9, 2013
329
mikmod_lib=[`find_lib "libmikmod[0-9]*.so.*"`]
Oct 3, 2009
Oct 3, 2009
330
if test x$mikmod_lib = x; then
Jun 8, 2013
Jun 8, 2013
331
mikmod_lib=[`find_lib "libmikmod.so.*"`]
Oct 3, 2009
Oct 3, 2009
332
333
334
fi
;;
esac
Oct 17, 2017
Oct 17, 2017
335
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MOD_MIKMOD `$LIBMIKMOD_CONFIG --cflags`"
Jun 9, 2013
Jun 9, 2013
336
if test x$enable_music_mod_mikmod_shared = xyes && test x$mikmod_lib != x; then
Oct 3, 2009
Oct 3, 2009
337
echo "-- dynamic libmikmod -> $mikmod_lib"
Oct 21, 2017
Oct 21, 2017
338
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMIKMOD_DYNAMIC=\\\"$mikmod_lib\\\""
Oct 3, 2009
Oct 3, 2009
339
340
341
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$LIBMIKMOD_CONFIG --libs`"
fi
Oct 3, 2009
Oct 3, 2009
342
else
Oct 3, 2009
Oct 3, 2009
343
AC_MSG_WARN([*** Unable to find MikMod library (http://mikmod.raphnet.net/)])
Oct 3, 2009
Oct 3, 2009
344
fi
Oct 14, 2018
Oct 14, 2018
345
346
LIBS="$LIBS_SAVED"
CFLAGS="$CFLAGS_SAVED"
Oct 21, 1999
Oct 21, 1999
347
fi
Oct 3, 2009
Oct 3, 2009
348
Jun 9, 2013
Jun 9, 2013
349
if test x$have_libmodplug != xyes -a x$have_libmikmod != xyes ; then
Aug 2, 2015
Aug 2, 2015
350
AC_MSG_WARN([MOD support disabled])
Nov 16, 2009
Nov 16, 2009
351
352
fi
May 12, 2006
May 12, 2006
353
AC_ARG_ENABLE([music-midi],
Jun 9, 2013
Jun 9, 2013
354
AC_HELP_STRING([--enable-music-midi], [enable MIDI music [[default=yes]]]),
May 12, 2006
May 12, 2006
355
[], [enable_music_midi=yes])
Oct 21, 1999
Oct 21, 1999
356
if test x$enable_music_midi = xyes; then
Oct 17, 2017
Oct 17, 2017
357
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MID"
Jun 9, 2013
Jun 9, 2013
358
359
360
361
AC_ARG_ENABLE([music-midi-timidity],
AC_HELP_STRING([--enable-music-midi-timidity], [enable timidity MIDI output [[default=yes]]]),
[], [enable_music_midi_timidity=yes])
if test x$enable_music_midi_timidity = xyes; then
Nov 19, 2019
Nov 19, 2019
362
363
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MID_TIMIDITY -I\$(srcdir)/src/codecs/timidity"
SOURCES="$SOURCES $srcdir/src/codecs/timidity/*.c"
Dec 17, 2019
Dec 17, 2019
364
365
366
367
368
369
timidity_cfg=no
AC_ARG_WITH([timidity-cfg],
AC_HELP_STRING([--with-timidity-cfg=FILE], [Specify full path to timidity.cfg]), timidity_cfg="$withval", [])
if test x$timidity_cfg != xyes -a x$timidity_cfg != xno; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTIMIDITY_CFG=\\\"$timidity_cfg\\\""
fi
Sep 5, 2001
Sep 5, 2001
370
fi
Jun 9, 2013
Jun 9, 2013
371
372
373
374
375
AC_ARG_ENABLE([music-midi-native],
AC_HELP_STRING([--enable-music-midi-native], [enable native MIDI music output [[default=yes]]]),
[], [enable_music_midi_native=yes])
if test x$enable_music_midi_native = xyes; then
use_music_midi_native=no
Mar 19, 2006
Mar 19, 2006
376
case "$host" in
Apr 14, 2010
Apr 14, 2010
377
*mingw32ce*)
Jun 9, 2013
Jun 9, 2013
378
use_music_midi_native=no
Apr 14, 2010
Apr 14, 2010
379
;;
Aug 19, 2001
Aug 19, 2001
380
*-*-cygwin* | *-*-mingw32*)
Jun 9, 2013
Jun 9, 2013
381
use_music_midi_native=yes
Apr 30, 2006
Apr 30, 2006
382
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lwinmm"
Aug 19, 2001
Aug 19, 2001
383
;;
Sep 5, 2001
Sep 5, 2001
384
*-*-darwin*)
Jun 9, 2013
Jun 9, 2013
385
use_music_midi_native=yes
Oct 19, 2009
Oct 19, 2009
386
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,CoreServices"
Sep 5, 2001
Sep 5, 2001
387
;;
Jan 18, 2011
Jan 18, 2011
388
*-*-haiku*)
Jun 9, 2013
Jun 9, 2013
389
use_music_midi_native=yes_cpp
Nov 19, 2019
Nov 19, 2019
390
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmidi"
Jan 18, 2011
Jan 18, 2011
391
;;
Aug 19, 2001
Aug 19, 2001
392
esac
Jun 9, 2013
Jun 9, 2013
393
if test x$use_music_midi_native = xyes; then
Nov 19, 2019
Nov 19, 2019
394
395
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MID_NATIVE -I\$(srcdir)/src/codecs/native_midi"
SOURCES="$SOURCES $srcdir/src/codecs/native_midi/*.c"
Jun 9, 2013
Jun 9, 2013
396
elif test x$use_music_midi_native = xyes_cpp; then
Nov 19, 2019
Nov 19, 2019
397
398
399
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MID_NATIVE -I\$(srcdir)/src/codecs/native_midi"
SOURCES="$SOURCES $srcdir/src/codecs/native_midi/*.c"
SOURCES_CXX="$SOURCES_CXX $srcdir/src/codecs/native_midi/*.cpp"
Aug 19, 2001
Aug 19, 2001
400
401
fi
fi
Jun 9, 2013
Jun 9, 2013
402
403
404
AC_ARG_ENABLE([music-midi-fluidsynth],
AC_HELP_STRING([--enable-music-midi-fluidsynth], [enable FluidSynth MIDI output [[default=yes]]]),
[], [enable_music_midi_fluidsynth=yes])
Jun 16, 2014
Jun 16, 2014
405
AC_ARG_ENABLE([music-midi-fluidsynth-shared],
Jun 9, 2013
Jun 9, 2013
406
407
408
AC_HELP_STRING([--enable-music-midi-fluidsynth-shared], [dynamically load FluidSynth library [[default=yes]]]),
[], [enable_music_midi_fluidsynth_shared=yes])
if test x$enable_music_midi_fluidsynth = xyes; then
Mar 20, 2011
Mar 20, 2011
409
410
411
AC_CHECK_HEADER([fluidsynth.h], [have_fluidsynth_hdr=yes])
AC_CHECK_LIB([fluidsynth], [fluid_player_add_mem], [have_fluidsynth_lib=yes])
if test x$have_fluidsynth_hdr = xyes -a x$have_fluidsynth_lib = xyes; then
Jun 9, 2013
Jun 9, 2013
412
have_fluidsynth=yes
Mar 20, 2011
Mar 20, 2011
413
414
415
416
417
418
419
420
case "$host" in
*-*-darwin*)
fluidsynth_lib=[`find_lib libfluidsynth.dylib`]
;;
*-*-cygwin* | *-*-mingw32*)
fluidsynth_lib=[`find_lib "fluidsynth*.dll"`]
;;
*)
Jun 8, 2013
Jun 8, 2013
421
fluidsynth_lib=[`find_lib "libfluidsynth[0-9]*.so.*"`]
Mar 20, 2011
Mar 20, 2011
422
if test x$fluidsynth_lib = x; then
Jun 8, 2013
Jun 8, 2013
423
fluidsynth_lib=[`find_lib "libfluidsynth.so.*"`]
Mar 20, 2011
Mar 20, 2011
424
425
426
fi
;;
esac
Oct 17, 2017
Oct 17, 2017
427
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MID_FLUIDSYNTH"
Jun 9, 2013
Jun 9, 2013
428
if test x$enable_music_midi_fluidsynth_shared = xyes && test x$fluidsynth_lib != x; then
Oct 18, 2017
Oct 18, 2017
429
echo "-- dynamic libfluidsynth -> $fluidsynth_lib"
Mar 20, 2011
Mar 20, 2011
430
431
432
433
434
435
436
437
438
EXTRA_CFLAGS="$EXTRA_CFLAGS -DFLUIDSYNTH_DYNAMIC=\\\"$fluidsynth_lib\\\""
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lfluidsynth"
fi
else
AC_MSG_WARN([*** Unable to find FluidSynth library (http://www.fluidsynth.org/)])
AC_MSG_WARN([FluidSynth support disabled])
fi
fi
Oct 21, 1999
Oct 21, 1999
439
fi
Oct 3, 2009
Oct 3, 2009
440
Jun 9, 2013
Jun 9, 2013
441
442
443
if test x$enable_music_midi_timidity != xyes -a \
x$use_music_midi_native != xyes -a x$use_music_midi_native != xyes_cpp -a \
x$have_fluidsynth != xyes; then
Aug 2, 2015
Aug 2, 2015
444
AC_MSG_WARN([MIDI support disabled])
Jun 9, 2013
Jun 9, 2013
445
446
fi
May 12, 2006
May 12, 2006
447
448
449
AC_ARG_ENABLE([music-ogg],
AC_HELP_STRING([--enable-music-ogg], [enable Ogg Vorbis music [[default=yes]]]),
[], [enable_music_ogg=yes])
Jul 18, 2007
Jul 18, 2007
450
AC_ARG_ENABLE(music-ogg-tremor,
Oct 3, 2009
Oct 3, 2009
451
AC_HELP_STRING([--enable-music-ogg-tremor], [enable OGG Vorbis music via libtremor [[default=no]]]),
Jul 18, 2007
Jul 18, 2007
452
453
[], enable_music_ogg_tremor=no)
AC_ARG_ENABLE([music-ogg-shared],
Jun 9, 2013
Jun 9, 2013
454
AC_HELP_STRING([--enable-music-ogg-shared], [dynamically load Ogg Vorbis library [[default=yes]]]),
Jul 18, 2007
Jul 18, 2007
455
456
[], [enable_music_ogg_shared=yes])
if test x$enable_music_ogg = xyes; then
Oct 14, 2018
Oct 14, 2018
457
LIBS_SAVED="$LIBS"
Jul 18, 2007
Jul 18, 2007
458
459
if test x$enable_music_ogg_tremor = xyes; then
AC_CHECK_HEADER([tremor/ivorbisfile.h], [have_tremor_hdr=yes])
Oct 14, 2018
Oct 14, 2018
460
AC_CHECK_LIB([vorbisidec], [ov_open_callbacks], [have_tremor_lib=yes], [], [-logg])
Jul 18, 2007
Jul 18, 2007
461
462
463
if test x$have_tremor_hdr = xyes -a x$have_tremor_lib = xyes; then
case "$host" in
*-*-darwin*)
Oct 18, 2009
Oct 18, 2009
464
ogg_lib=[`find_lib libvorbisidec.dylib`]
Jul 18, 2007
Jul 18, 2007
465
466
;;
*-*-cygwin* | *-*-mingw32*)
Jul 21, 2007
Jul 21, 2007
467
ogg_lib=[`find_lib "vorbisidec*.dll"`]
Jul 18, 2007
Jul 18, 2007
468
469
;;
*)
Jun 8, 2013
Jun 8, 2013
470
ogg_lib=[`find_lib "libvorbisidec[0-9]*.so.*"`]
Jul 18, 2007
Jul 18, 2007
471
if test x$ogg_lib = x; then
Jun 8, 2013
Jun 8, 2013
472
ogg_lib=[`find_lib "libvorbisidec.so.*"`]
Jul 18, 2007
Jul 18, 2007
473
474
475
fi
;;
esac
Oct 17, 2017
Oct 17, 2017
476
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_OGG -DOGG_USE_TREMOR"
Jul 18, 2007
Jul 18, 2007
477
478
479
480
if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
echo "-- dynamic libvorbisidec -> $ogg_lib"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
else
Jan 21, 2012
Jan 21, 2012
481
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis"
Jul 18, 2007
Jul 18, 2007
482
fi
Oct 3, 2009
Oct 3, 2009
483
484
485
else
AC_MSG_WARN([*** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)])
AC_MSG_WARN([Ogg Vorbis support disabled])
Jul 18, 2007
Jul 18, 2007
486
487
488
fi
else
AC_CHECK_HEADER([vorbis/vorbisfile.h], [have_ogg_hdr=yes])
Oct 14, 2018
Oct 14, 2018
489
AC_CHECK_LIB([vorbisfile], [ov_open_callbacks], [have_ogg_lib=yes], [], [-lvorbis -logg -lm])
Jul 18, 2007
Jul 18, 2007
490
491
492
if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then
case "$host" in
*-*-darwin*)
Oct 18, 2009
Oct 18, 2009
493
ogg_lib=[`find_lib libvorbisfile.dylib`]
Jul 18, 2007
Jul 18, 2007
494
495
;;
*-*-cygwin* | *-*-mingw32*)
Jul 21, 2007
Jul 21, 2007
496
ogg_lib=[`find_lib "libvorbisfile*.dll"`]
Jul 18, 2007
Jul 18, 2007
497
498
;;
*)
Jun 8, 2013
Jun 8, 2013
499
ogg_lib=[`find_lib "libvorbisfile[0-9]*.so.*"`]
Jul 18, 2007
Jul 18, 2007
500
if test x$ogg_lib = x; then
Jun 8, 2013
Jun 8, 2013
501
ogg_lib=[`find_lib "libvorbisfile.so.*"`]
Jul 18, 2007
Jul 18, 2007
502
503
504
fi
;;
esac
Oct 17, 2017
Oct 17, 2017
505
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_OGG"
Jul 18, 2007
Jul 18, 2007
506
507
508
509
if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
echo "-- dynamic libvorbisfile -> $ogg_lib"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
else
Feb 15, 2013
Feb 15, 2013
510
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis"
Jul 18, 2007
Jul 18, 2007
511
fi
Oct 3, 2009
Oct 3, 2009
512
513
514
else
AC_MSG_WARN([*** Unable to find Ogg Vorbis library (http://www.xiph.org/)])
AC_MSG_WARN([Ogg Vorbis support disabled])
May 12, 2006
May 12, 2006
515
fi
Jul 15, 2007
Jul 15, 2007
516
fi
Oct 14, 2018
Oct 14, 2018
517
LIBS="$LIBS_SAVED"
Jul 15, 2007
Jul 15, 2007
518
fi
Oct 3, 2009
Oct 3, 2009
519
Sep 26, 2009
Sep 26, 2009
520
libflac_ver=8
Feb 27, 2008
Feb 27, 2008
521
522
523
524
525
AC_ARG_ENABLE([music-flac],
AC_HELP_STRING([--enable-music-flac], [enable FLAC music [[default=yes]]]),
[], [enable_music_flac=yes])
AC_ARG_ENABLE([music-flac-shared],
AC_HELP_STRING([--enable-music-flac-shared],
Jun 9, 2013
Jun 9, 2013
526
[dynamically load FLAC library [[default=yes]]]),
Feb 27, 2008
Feb 27, 2008
527
528
[], [enable_music_flac_shared=yes])
if test x$enable_music_flac = xyes; then
Oct 13, 2009
Oct 13, 2009
529
530
531
532
533
AC_CHECK_HEADER([FLAC/export.h], [have_flac_export=yes])
if test x$have_flac_export = xyes; then
LIBS_SAVED="$LIBS"
LIBS="-lFLAC"
AC_MSG_CHECKING([for libflac so-name version >= $libflac_ver])
Feb 17, 2011
Feb 17, 2011
534
AC_TRY_COMPILE([
Sep 26, 2009
Sep 26, 2009
535
536
#include "FLAC/export.h"
#include "stdio.h"
Feb 17, 2011
Feb 17, 2011
537
],[
Sep 26, 2009
Sep 26, 2009
538
539
#if defined(FLAC_API_VERSION_CURRENT) && (FLAC_API_VERSION_CURRENT >= $libflac_ver)
#else
Feb 17, 2011
Feb 17, 2011
540
#error "old-flac"
Sep 26, 2009
Sep 26, 2009
541
542
#endif
], have_flac_ver=yes, have_flac_ver=no)
Oct 3, 2009
Oct 3, 2009
543
544
545
546
547
548
549
LIBS="$LIBS_SAVED"
AC_MSG_RESULT($have_flac_ver)
fi
if test x$have_flac_ver = xyes; then
AC_CHECK_HEADER([FLAC/stream_decoder.h], [have_flac_hdr=yes])
AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_new], [have_flac_lib=yes])
Nov 19, 2019
Nov 19, 2019
550
if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then
Oct 3, 2009
Oct 3, 2009
551
552
case "$host" in
*-*-darwin*)
Oct 18, 2009
Oct 18, 2009
553
flac_lib=[`find_lib libFLAC.dylib`]
Oct 3, 2009
Oct 3, 2009
554
555
;;
*-*-cygwin* | *-*-mingw32*)
Jun 8, 2013
Jun 8, 2013
556
flac_lib=[`find_lib "libFLAC-*.dll"`]
Oct 3, 2009
Oct 3, 2009
557
558
;;
*)
Jun 8, 2013
Jun 8, 2013
559
flac_lib=[`find_lib "libFLAC[0-9]*.so.*"`]
Oct 3, 2009
Oct 3, 2009
560
if test x$flac_lib = x; then
Jun 8, 2013
Jun 8, 2013
561
flac_lib=[`find_lib "libFLAC.so.*"`]
Oct 3, 2009
Oct 3, 2009
562
563
564
fi
;;
esac
Oct 17, 2017
Oct 17, 2017
565
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_FLAC"
Oct 3, 2009
Oct 3, 2009
566
567
568
569
570
571
572
573
574
575
576
if test x$enable_music_flac_shared = xyes && test x$flac_lib != x; then
echo "-- dynamic libFLAC -> $flac_lib"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DFLAC_DYNAMIC=\\\"$flac_lib\\\""
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lFLAC"
fi
fi
else
AC_MSG_WARN([*** Unable to find FLAC library (http://flac.sourceforge.net/)])
AC_MSG_WARN([FLAC support disabled])
fi
Feb 27, 2008
Feb 27, 2008
577
fi
Oct 3, 2009
Oct 3, 2009
578
Oct 21, 1999
Oct 21, 1999
579
AC_ARG_ENABLE(music-mp3,
Jun 9, 2013
Jun 9, 2013
580
AC_HELP_STRING([--enable-music-mp3], [enable MP3 music [[default=yes]]]),
Jun 1, 2013
Jun 1, 2013
581
[], enable_music_mp3=yes)
Jun 9, 2013
Jun 9, 2013
582
Jul 15, 2007
Jul 15, 2007
583
584
585
AC_ARG_ENABLE(music-mp3-mad-gpl,
AC_HELP_STRING([--enable-music-mp3-mad-gpl], [enable MP3 music via libmad GPL code [[default=no]]]),
[], [enable_music_mp3_mad_gpl=no])
Oct 21, 2017
Oct 21, 2017
586
587
588
AC_ARG_ENABLE(music-mp3-mad-gpl-dithering,
AC_HELP_STRING([--enable-music-mp3-mad-gpl-dithering], [enable MP3 music via libmad GPL code [[default=yes]]]),
[], [enable_music_mp3_mad_gpl_dithering=yes])
Jun 9, 2013
Jun 9, 2013
589
if test x$enable_music_mp3 = xyes -a x$enable_music_mp3_mad_gpl = xyes; then
Jul 15, 2007
Jul 15, 2007
590
591
592
593
594
595
596
597
598
599
AC_MSG_CHECKING(for libmad headers)
have_libmad=no
AC_TRY_COMPILE([
#include "mad.h"
],[
],[
have_libmad=yes
])
AC_MSG_RESULT($have_libmad)
if test x$have_libmad = xyes; then
Oct 17, 2017
Oct 17, 2017
600
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MP3_MAD"
Oct 14, 2018
Oct 14, 2018
601
if test x$enable_music_mp3_mad_gpl_dithering = xyes; then
Oct 21, 2017
Oct 21, 2017
602
AC_MSG_WARN([*** Using GPL libmad and MP3 dithering routines, this build of SDL_mixer is now under the GPL])
Oct 14, 2018
Oct 14, 2018
603
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MP3_MAD_GPL_DITHERING"
Oct 21, 2017
Oct 21, 2017
604
fi
Jul 15, 2007
Jul 15, 2007
605
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmad"
Oct 3, 2009
Oct 3, 2009
606
607
else
AC_MSG_WARN([*** Unable to find MAD library (http://www.underbit.com/products/mad/)])
Jul 15, 2007
Jul 15, 2007
608
609
fi
fi
Oct 21, 1999
Oct 21, 1999
610
Jul 20, 2017
Jul 20, 2017
611
AC_ARG_ENABLE(music-mp3-mpg123,
Oct 18, 2017
Oct 18, 2017
612
613
614
615
616
617
618
AC_HELP_STRING([--enable-music-mp3-mpg123], [enable MP3 music via libmpg123 [[default=yes]]]),
[], [enable_music_mp3_mpg123=yes])
AC_ARG_ENABLE([music-mp3-mpg123-shared],
AC_HELP_STRING([--enable-music-mp3-mpg123-shared], [dynamically load libmpg123 library [[default=yes]]]),
[], [enable_music_mp3_mpg123_shared=yes])
if test x$enable_music_mp3_mpg123 = xyes; then
AC_CHECK_HEADER([mpg123.h], [have_mpg123_hdr=yes])
Oct 22, 2017
Oct 22, 2017
619
AC_CHECK_LIB([mpg123], [mpg123_replace_reader_handle], [have_mpg123_lib=yes])
Oct 18, 2017
Oct 18, 2017
620
if test x$have_mpg123_hdr = xyes -a x$have_mpg123_lib = xyes; then
Oct 11, 2018
Oct 11, 2018
621
have_libmpg123=yes
Oct 18, 2017
Oct 18, 2017
622
623
624
625
626
627
628
629
case "$host" in
*-*-darwin*)
mpg123_lib=[`find_lib libmpg123.dylib`]
;;
*-*-cygwin* | *-*-mingw32*)
mpg123_lib=[`find_lib "libmpg123*.dll"`]
;;
*)
Oct 13, 2018
Oct 13, 2018
630
mpg123_lib=[`find_lib "libmpg123.so.*"`]
Oct 18, 2017
Oct 18, 2017
631
632
;;
esac
Oct 17, 2017
Oct 17, 2017
633
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MP3_MPG123"
Oct 18, 2017
Oct 18, 2017
634
635
636
637
638
639
if test x$enable_music_mp3_mpg123_shared = xyes && test x$mpg123_lib != x; then
echo "-- dynamic libmpg123 -> $mpg123_lib"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMPG123_DYNAMIC=\\\"$mpg123_lib\\\""
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmpg123"
fi
Jul 20, 2017
Jul 20, 2017
640
641
else
AC_MSG_WARN([*** Unable to find mpg123 library (https://www.mpg123.de)])
Oct 18, 2017
Oct 18, 2017
642
AC_MSG_WARN([mpg123 support disabled])
Jul 20, 2017
Jul 20, 2017
643
644
645
fi
fi
Oct 11, 2018
Oct 11, 2018
646
if test x$have_libmad = xyes -o x$have_libmpg123 = xyes; then
Oct 17, 2017
Oct 17, 2017
647
:
Jan 5, 2016
Jan 5, 2016
648
else
Oct 3, 2009
Oct 3, 2009
649
650
651
AC_MSG_WARN([MP3 support disabled])
fi
Jun 15, 2018
Jun 15, 2018
652
653
654
655
656
657
658
659
AC_ARG_ENABLE([music-opus],
AC_HELP_STRING([--enable-music-opus], [enable Opus music [[default=yes]]]),
[], [enable_music_opus=yes])
AC_ARG_ENABLE([music-opus-shared],
AC_HELP_STRING([--enable-music-opus-shared], [dynamically load opusfile library [[default=yes]]]),
[], [enable_music_opus_shared=yes])
if test x$enable_music_opus = xyes; then
Oct 14, 2018
Oct 14, 2018
660
LIBS_SAVED="$LIBS"
Jun 15, 2018
Jun 15, 2018
661
662
663
664
665
PKG_CHECK_MODULES([OPUSFILE], [opusfile >= 0.2], [dnl
have_opusfile_hdr=yes
have_opusfile_lib=yes
], [dnl
AC_CHECK_HEADER([opus/opusfile.h], [have_opusfile_hdr=yes])
Oct 14, 2018
Oct 14, 2018
666
AC_CHECK_LIB([opusfile], [op_open_callbacks], [have_opusfile_lib=yes;OPUSFILE_LIBS="-lopusfile -lopus"], [], [-lopus -logg -lm])
Jun 15, 2018
Jun 15, 2018
667
])
Oct 14, 2018
Oct 14, 2018
668
LIBS="$LIBS_SAVED"
Jun 15, 2018
Jun 15, 2018
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
if test x$have_opusfile_hdr = xyes -a x$have_opusfile_lib = xyes; then
have_opusfile=yes
case "$host" in
*-*-darwin*)
opusfile_lib=[`find_lib libopusfile.dylib`]
;;
*-*-cygwin* | *-*-mingw32*)
opusfile_lib=[`find_lib "libopusfile*.dll"`]
;;
*)
opusfile_lib=[`find_lib "libopusfile[0-9]*.so.*"`]
if test x$opusfile_lib = x; then
opusfile_lib=[`find_lib "libopusfile.so.*"`]
fi
;;
esac
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_OPUS $OPUSFILE_CFLAGS"
if test x$enable_music_opus_shared = xyes && test x$opusfile_lib != x; then
echo "-- dynamic opusfile -> $opusfile_lib"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DOPUS_DYNAMIC=\\\"$opusfile_lib\\\""
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $OPUSFILE_LIBS"
fi
else
AC_MSG_WARN([*** Unable to find opusfile library (http://opus-codec.org/)])
fi
fi
Feb 17, 2011
Feb 17, 2011
698
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBM"
Oct 4, 2009
Oct 4, 2009
699
700
701
702
703
704
OBJECTS=`echo $SOURCES`
DEPENDS=`echo $SOURCES`
OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
DEPENDS=`echo "$DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
$(objects)/\2.lo: \1/\2.c\\
Oct 8, 2009
Oct 8, 2009
705
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c \$< -o \$@,g'`
Oct 4, 2009
Oct 4, 2009
706
Jan 18, 2011
Jan 18, 2011
707
708
709
710
711
712
713
714
OBJECTS_CXX=`echo $SOURCES_CXX`
DEPENDS_CXX=`echo $SOURCES_CXX`
OBJECTS_CXX=`echo "$OBJECTS_CXX" | sed 's,[[^ ]]*/\([[^ ]]*\)\.cpp,$(objects)/\1.lo,g'`
DEPENDS_CXX=`echo "$DEPENDS_CXX" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.cpp,\\
$(objects)/\2.lo: \1/\2.cpp\\
\$(LIBTOOL) --mode=compile \$(CXX) \$(CFLAGS) \$(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c \$< -o \$@,g'`
OBJECTS="$OBJECTS $OBJECTS_CXX"
DEPENDS="$DEPENDS $DEPENDS_CXX"
Jan 21, 2011
Jan 21, 2011
715
DEPENDS=`echo "$DEPENDS" | sed 's,\\$,\\\\$,g'`
Jan 18, 2011
Jan 18, 2011
716
Oct 4, 2009
Oct 4, 2009
717
718
719
720
721
722
VERSION_OBJECTS=`echo $VERSION_SOURCES`
VERSION_DEPENDS=`echo $VERSION_SOURCES`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.rc,\\
$(objects)/\2.o: \1/\2.rc\\
\$(WINDRES) \$< \$@,g'`
Jan 21, 2011
Jan 21, 2011
723
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\\$,\\\\$,g'`
Oct 4, 2009
Oct 4, 2009
724
725
726
727
728
729
730
PLAYWAVE_SOURCES="$srcdir/playwave.c"
PLAYWAVE_OBJECTS=`echo $PLAYWAVE_SOURCES`
PLAYWAVE_DEPENDS=`echo $PLAYWAVE_SOURCES`
PLAYWAVE_OBJECTS=`echo "$PLAYWAVE_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
PLAYWAVE_DEPENDS=`echo "$PLAYWAVE_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
$(objects)/\2.lo: \1/\2.c\\
Oct 8, 2009
Oct 8, 2009
731
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c \$< -o \$@,g'`
Jan 21, 2011
Jan 21, 2011
732
PLAYWAVE_DEPENDS=`echo "$PLAYWAVE_DEPENDS" | sed 's,\\$,\\\\$,g'`
Oct 4, 2009
Oct 4, 2009
733
734
735
736
737
738
739
PLAYMUS_SOURCES="$srcdir/playmus.c"
PLAYMUS_OBJECTS=`echo $PLAYMUS_SOURCES`
PLAYMUS_DEPENDS=`echo $PLAYMUS_SOURCES`
PLAYMUS_OBJECTS=`echo "$PLAYMUS_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
PLAYMUS_DEPENDS=`echo "$PLAYMUS_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
$(objects)/\2.lo: \1/\2.c\\
Oct 8, 2009
Oct 8, 2009
740
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c \$< -o \$@,g'`
Jan 21, 2011
Jan 21, 2011
741
PLAYMUS_DEPENDS=`echo "$PLAYMUS_DEPENDS" | sed 's,\\$,\\\\$,g'`
Oct 21, 1999
Oct 21, 1999
742
Apr 30, 2006
Apr 30, 2006
743
744
745
dnl Expand the sources and objects needed to build the library
AC_SUBST(ac_aux_dir)
AC_SUBST(OBJECTS)
Oct 4, 2009
Oct 4, 2009
746
747
748
AC_SUBST(VERSION_OBJECTS)
AC_SUBST(PLAYWAVE_OBJECTS)
AC_SUBST(PLAYMUS_OBJECTS)
Apr 30, 2006
Apr 30, 2006
749
750
751
752
753
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(BUILD_LDFLAGS)
AC_SUBST(EXTRA_LDFLAGS)
AC_SUBST(EXE)
Jul 18, 2007
Jul 18, 2007
754
AC_SUBST(WINDRES)
Sep 19, 2009
Sep 19, 2009
755
AC_SUBST(SDL_VERSION)
Apr 30, 2006
Apr 30, 2006
756
757
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
Jan 26, 2003
Jan 26, 2003
758
Oct 21, 1999
Oct 21, 1999
759
AC_OUTPUT([
Jan 21, 2011
Jan 21, 2011
760
761
])
AC_CONFIG_FILES([
Jan 28, 2012
Jan 28, 2012
762
Makefile SDL2_mixer.spec SDL2_mixer.pc
Oct 21, 1999
Oct 21, 1999
763
])
Jan 21, 2011
Jan 21, 2011
764
765
766
767
768
769
770
771
772
773
774
775
776
AC_CONFIG_COMMANDS([default],
[cat >>Makefile <<__EOF__
# Build rules for objects
-include \$(OBJECTS:.lo=.d)
$DEPENDS
$VERSION_DEPENDS
-include \$(PLAYWAVE_OBJECTS:.lo=.d)
$PLAYWAVE_DEPENDS
-include \$(PLAYMUS_OBJECTS:.lo=.d)
$PLAYMUS_DEPENDS
Nov 19, 2019
Nov 19, 2019
777
__EOF__
Jan 21, 2011
Jan 21, 2011
778
779
780
781
782
783
784
], [
DEPENDS="$DEPENDS"
VERSION_DEPENDS="$VERSION_DEPENDS"
PLAYWAVE_DEPENDS="$PLAYWAVE_DEPENDS"
PLAYMUS_DEPENDS="$PLAYMUS_DEPENDS"
])
AC_OUTPUT