Skip to content

Latest commit

 

History

History
243 lines (224 loc) · 7.43 KB

configure.in

File metadata and controls

243 lines (224 loc) · 7.43 KB
 
Oct 21, 1999
Oct 21, 1999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
dnl Process this file with autoconf to produce a configure script.
AC_INIT(README)
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.
MAJOR_VERSION=1
Apr 4, 2001
Apr 4, 2001
15
MINOR_VERSION=2
Dec 21, 2004
Dec 21, 2004
16
17
18
MICRO_VERSION=7
INTERFACE_AGE=5
BINARY_AGE=7
Oct 21, 1999
Oct 21, 1999
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
LT_REVISION=$INTERFACE_AGE
LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
Aug 10, 2000
Aug 10, 2000
39
dnl Detect the canonical host and target build environment
Feb 4, 2003
Feb 4, 2003
40
AC_CANONICAL_SYSTEM
Aug 10, 2000
Aug 10, 2000
41
Jun 10, 2001
Jun 10, 2001
42
43
44
dnl Setup for automake
AM_INIT_AUTOMAKE(SDL_mixer, $VERSION)
Oct 21, 1999
Oct 21, 1999
45
46
47
48
dnl Check for tools
AC_PROG_MAKE_SET
AC_PROG_CC
Dec 26, 1999
Dec 26, 1999
49
AC_LIBTOOL_WIN32_DLL
Oct 21, 1999
Oct 21, 1999
50
51
52
AM_PROG_LIBTOOL
AC_PROG_INSTALL
Oct 25, 1999
Oct 25, 1999
53
54
55
56
57
dnl The alpha architecture needs special flags for binary portability
case "$target" in
alpha*-*-linux*)
CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
;;
Apr 5, 2001
Apr 5, 2001
58
59
60
*-*-beos*)
ac_default_prefix=/boot/develop/tools/gnupro
;;
Aug 10, 2000
Aug 10, 2000
61
62
*-*-cygwin* | *-*-mingw32*)
if test "$build" != "$target"; then # cross-compiling
Aug 20, 2001
Aug 20, 2001
63
# Default cross-compile location
Aug 10, 2000
Aug 10, 2000
64
ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
Aug 20, 2001
Aug 20, 2001
65
66
67
68
69
else
# Look for the location of the tools and install there
if [ "$BUILD_PREFIX" != "" ]; then
ac_default_prefix=$BUILD_PREFIX
fi
Aug 10, 2000
Aug 10, 2000
70
71
fi
;;
Sep 7, 2001
Sep 7, 2001
72
73
74
*-*-darwin*)
AC_DEFINE(MACOSX)
;;
Feb 4, 2003
Feb 4, 2003
75
76
77
m68k-atari-mint*)
CFLAGS="$CFLAGS -Dunix"
;;
Oct 25, 1999
Oct 25, 1999
78
79
esac
Nov 23, 1999
Nov 23, 1999
80
dnl Check for SDL
Apr 13, 2002
Apr 13, 2002
81
SDL_VERSION=1.2.4
Nov 23, 1999
Nov 23, 1999
82
83
84
85
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
Oct 21, 1999
Oct 21, 1999
86
87
88
CFLAGS="$CFLAGS $SDL_CFLAGS"
dnl Check command-line options
Jun 10, 2001
Jun 10, 2001
89
Oct 21, 1999
Oct 21, 1999
90
91
92
93
94
95
96
97
98
99
100
101
AC_ARG_ENABLE(music-cmd,
[ --enable-music-cmd support an external music player [default=yes]],
, enable_music_cmd=yes)
if test x$enable_music_cmd = xyes; then
CFLAGS="$CFLAGS -DCMD_MUSIC"
fi
AC_ARG_ENABLE(music-wave,
[ --enable-music-wave enable streaming WAVE music [default=yes]],
, enable_music_wave=yes)
if test x$enable_music_wave = xyes; then
CFLAGS="$CFLAGS -DWAV_MUSIC"
fi
Dec 27, 2004
Dec 27, 2004
102
no_libmikmod=yes
Nov 13, 2004
Nov 13, 2004
103
104
105
106
107
libmikmod_maj=3
libmikmod_min=1
libmikmod_rev=10
libmikmod_ver="$libmikmod_maj.$libmikmod_min.$libmikmod_rev"
AC_ARG_ENABLE(music-libmikmod,
Dec 27, 2004
Dec 27, 2004
108
109
[ --enable-music-libmikmod enable MOD music via external libmikmod [default=no]],
, enable_music_libmikmod=no)
Nov 13, 2004
Nov 13, 2004
110
111
if test x$enable_music_libmikmod = xyes; then
AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no, [$PATH])
Dec 27, 2004
Dec 27, 2004
112
113
if test "$LIBMIKMOD_CONFIG" != "no" ; then
no_libmikmod=no
Nov 13, 2004
Nov 13, 2004
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
CFLAGS_SAVED="$CFLAGS"
LIBS_SAVED="$LIBS"
CFLAGS="$CFLAGS -DLIBMIKMOD_MUSIC `$LIBMIKMOD_CONFIG --cflags`"
LIBS="$LIBS `$LIBMIKMOD_CONFIG --libs`"
AC_MSG_CHECKING([for libmikmod - version >= $libmikmod_ver])
AC_TRY_RUN([
#include "mikmod.h"
#include "stdio.h"
int main(int argc, char **argv)
{
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;
}
Dec 27, 2004
Dec 27, 2004
134
],,CFLAGS="$CFLAGS_SAVED";LIBS="$LIBS_SAVED",
Nov 13, 2004
Nov 13, 2004
135
136
137
138
[echo $ac_n "cross compiling; assumed OK... $ac_c"])
fi
fi
Oct 21, 1999
Oct 21, 1999
139
140
AC_ARG_ENABLE(music-mod,
[ --enable-music-mod enable MOD music via mikmod [default=yes]],
Nov 13, 2004
Nov 13, 2004
141
, enable_music_mod=$no_libmikmod)
Oct 21, 1999
Oct 21, 1999
142
143
if test x$enable_music_mod = xyes; then
CFLAGS="$CFLAGS -DMOD_MUSIC -I\$(top_srcdir)/mikmod"
Oct 21, 1999
Oct 21, 1999
144
145
146
147
148
149
MUSIC_SUBDIRS="$MUSIC_SUBDIRS mikmod"
fi
AC_ARG_ENABLE(music-midi,
[ --enable-music-midi enable MIDI music via timidity [default=yes]],
, enable_music_midi=yes)
if test x$enable_music_midi = xyes; then
Sep 5, 2001
Sep 5, 2001
150
151
152
153
154
CFLAGS="$CFLAGS -DMID_MUSIC"
AC_ARG_ENABLE(music-timidity-midi,
[ --enable-music-timidity-midi enable timidity MIDI output [default=yes]],
, enable_music_timidity_midi=yes)
if test x$enable_music_timidity_midi = xyes; then
Sep 5, 2001
Sep 5, 2001
155
CFLAGS="$CFLAGS -DUSE_TIMIDITY_MIDI -I\$(top_srcdir)/timidity"
Sep 5, 2001
Sep 5, 2001
156
157
MUSIC_SUBDIRS="$MUSIC_SUBDIRS timidity"
fi
Aug 19, 2001
Aug 19, 2001
158
159
160
161
162
163
164
165
AC_ARG_ENABLE(music-native-midi,
[ --enable-music-native-midi enable native MIDI music output [default=yes]],
, enable_music_native_midi=yes)
if test x$enable_music_native_midi = xyes; then
use_music_native_midi=no
case "$target" in
*-*-cygwin* | *-*-mingw32*)
use_music_native_midi=yes
Jan 26, 2003
Jan 26, 2003
166
SYSTEM_LIBS="$SYSTEM_LIBS -lwinmm"
Aug 19, 2001
Aug 19, 2001
167
;;
Sep 5, 2001
Sep 5, 2001
168
169
*-*-darwin*)
use_music_native_midi=yes
Jan 26, 2003
Jan 26, 2003
170
SYSTEM_LIBS="$SYSTEM_LIBS -framework QuickTime"
Sep 5, 2001
Sep 5, 2001
171
;;
Aug 19, 2001
Aug 19, 2001
172
173
174
175
176
177
esac
if test x$use_music_native_midi = xyes; then
CFLAGS="$CFLAGS -DUSE_NATIVE_MIDI -I\$(top_srcdir)/native_midi"
MUSIC_SUBDIRS="$MUSIC_SUBDIRS native_midi"
fi
fi
Feb 13, 2002
Feb 13, 2002
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
AC_ARG_ENABLE(music-native-midi-gpl,
[ --enable-music-native-midi-gpl enable native MIDI on UNIX using GPL code [default=no]],
, enable_music_native_midi_gpl=no)
if test x$enable_music_native_midi_gpl = xyes; then
use_music_native_midi_gpl=no
case "$target" in
*-*-linux* | *-*-freebsd*)
use_music_native_midi_gpl=yes
;;
esac
if test x$use_music_native_midi_gpl = xyes; then
CFLAGS="$CFLAGS -DUSE_NATIVE_MIDI -I\$(top_srcdir)/native_midi"
MUSIC_SUBDIRS="$MUSIC_SUBDIRS native_midi_gpl"
fi
fi
Oct 21, 1999
Oct 21, 1999
193
fi
Jul 3, 2000
Jul 3, 2000
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
AC_ARG_ENABLE(music-ogg,
[ --enable-music-ogg enable Ogg Vorbis music [default=yes]],
, enable_music_ogg=yes)
if test x$enable_music_ogg = xyes; then
AC_MSG_CHECKING(for Ogg Vorbis headers and libraries)
have_vorbis=no
AC_TRY_COMPILE([
#include <vorbis/vorbisfile.h>
],[
],[
have_vorbis=yes
])
AC_MSG_RESULT($have_vorbis)
if test x$have_vorbis = xyes; then
CFLAGS="$CFLAGS -DOGG_MUSIC"
Jan 26, 2003
Jan 26, 2003
209
SYSTEM_LIBS="$SYSTEM_LIBS -lvorbisfile -lvorbis -logg"
Jul 3, 2000
Jul 3, 2000
210
211
fi
fi
Oct 21, 1999
Oct 21, 1999
212
213
214
215
AC_ARG_ENABLE(music-mp3,
[ --enable-music-mp3 enable MP3 music via smpeg [default=yes]],
, enable_music_mp3=yes)
if test x$enable_music_mp3 = xyes; then
Apr 5, 2001
Apr 5, 2001
216
217
SMPEG_VERSION=0.4.3
AM_PATH_SMPEG($SMPEG_VERSION, have_smpeg=yes, have_smpeg=no)
Oct 21, 1999
Oct 21, 1999
218
if test x$have_smpeg = xyes; then
Apr 23, 2001
Apr 23, 2001
219
CFLAGS="$CFLAGS -DMP3_MUSIC $SMPEG_CFLAGS"
Jan 26, 2003
Jan 26, 2003
220
SYSTEM_LIBS="$SYSTEM_LIBS $SMPEG_LIBS"
Oct 21, 1999
Oct 21, 1999
221
222
223
fi
fi
Oct 21, 1999
Oct 21, 1999
224
225
226
dnl Add Makefile conditionals
AC_SUBST(MUSIC_SUBDIRS)
AM_CONDITIONAL(USE_MIKMOD, test x$enable_music_mod = xyes)
Sep 5, 2001
Sep 5, 2001
227
AM_CONDITIONAL(USE_TIMIDITY, test x$enable_music_timidity_midi = xyes)
Feb 13, 2002
Feb 13, 2002
228
229
AM_CONDITIONAL(USE_NATIVE_MIDI, test x$use_music_native_midi = xyes || test x$use_music_native_midi_gpl = xyes)
AM_CONDITIONAL(USE_NATIVE_MIDI_GPL, test x$use_music_native_midi_gpl = xyes)
Oct 21, 1999
Oct 21, 1999
230
Jan 26, 2003
Jan 26, 2003
231
232
233
dnl Expand the libraries needed for static and dynamic linking
AC_SUBST(SYSTEM_LIBS)
Oct 21, 1999
Oct 21, 1999
234
235
236
237
238
# Finally create all the generated files
AC_OUTPUT([
Makefile
mikmod/Makefile
timidity/Makefile
Aug 19, 2001
Aug 19, 2001
239
native_midi/Makefile
Feb 13, 2002
Feb 13, 2002
240
native_midi_gpl/Makefile
Jan 20, 2000
Jan 20, 2000
241
SDL_mixer.spec
Aug 30, 2003
Aug 30, 2003
242
SDL_mixer.qpg
Oct 21, 1999
Oct 21, 1999
243
])