Skip to content

Latest commit

 

History

History
205 lines (188 loc) · 6.2 KB

configure.in

File metadata and controls

205 lines (188 loc) · 6.2 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
May 21, 2002
May 21, 2002
16
17
18
MICRO_VERSION=5
INTERFACE_AGE=3
BINARY_AGE=5
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
40
41
42
dnl Detect the canonical host and target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
Jun 10, 2001
Jun 10, 2001
43
44
45
dnl Setup for automake
AM_INIT_AUTOMAKE(SDL_mixer, $VERSION)
Oct 21, 1999
Oct 21, 1999
46
47
48
49
dnl Check for tools
AC_PROG_MAKE_SET
AC_PROG_CC
Dec 26, 1999
Dec 26, 1999
50
AC_LIBTOOL_WIN32_DLL
Oct 21, 1999
Oct 21, 1999
51
52
53
AM_PROG_LIBTOOL
AC_PROG_INSTALL
Oct 25, 1999
Oct 25, 1999
54
55
56
57
58
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
59
60
61
*-*-beos*)
ac_default_prefix=/boot/develop/tools/gnupro
;;
Aug 10, 2000
Aug 10, 2000
62
63
*-*-cygwin* | *-*-mingw32*)
if test "$build" != "$target"; then # cross-compiling
Aug 20, 2001
Aug 20, 2001
64
# Default cross-compile location
Aug 10, 2000
Aug 10, 2000
65
ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
Aug 20, 2001
Aug 20, 2001
66
67
68
69
70
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
71
72
fi
;;
Sep 7, 2001
Sep 7, 2001
73
74
75
*-*-darwin*)
AC_DEFINE(MACOSX)
;;
Oct 25, 1999
Oct 25, 1999
76
77
esac
Nov 23, 1999
Nov 23, 1999
78
dnl Check for SDL
Apr 13, 2002
Apr 13, 2002
79
SDL_VERSION=1.2.4
Nov 23, 1999
Nov 23, 1999
80
81
82
83
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
Oct 21, 1999
Oct 21, 1999
84
85
86
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
May 8, 2000
May 8, 2000
87
88
89
90
dnl Flag for using SDL_RWops
dnl Matt Campbell (matt@campbellhome.dhs.org)
CFLAGS="$CFLAGS -DUSE_RWOPS"
Oct 21, 1999
Oct 21, 1999
91
dnl Check command-line options
Jun 10, 2001
Jun 10, 2001
92
Oct 21, 1999
Oct 21, 1999
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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
AC_ARG_ENABLE(music-mod,
[ --enable-music-mod enable MOD music via mikmod [default=yes]],
, enable_music_mod=yes)
if test x$enable_music_mod = xyes; then
CFLAGS="$CFLAGS -DMOD_MUSIC -I\$(top_srcdir)/mikmod"
Oct 21, 1999
Oct 21, 1999
110
111
112
113
114
115
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
116
117
118
119
120
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
121
CFLAGS="$CFLAGS -DUSE_TIMIDITY_MIDI -I\$(top_srcdir)/timidity"
Sep 5, 2001
Sep 5, 2001
122
123
MUSIC_SUBDIRS="$MUSIC_SUBDIRS timidity"
fi
Aug 19, 2001
Aug 19, 2001
124
125
126
127
128
129
130
131
132
133
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
LIBS="$LIBS -lwinmm"
;;
Sep 5, 2001
Sep 5, 2001
134
135
*-*-darwin*)
use_music_native_midi=yes
Sep 7, 2001
Sep 7, 2001
136
LIBS="$LIBS -framework QuickTime"
Sep 5, 2001
Sep 5, 2001
137
;;
Aug 19, 2001
Aug 19, 2001
138
139
140
141
142
143
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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
159
fi
Jul 3, 2000
Jul 3, 2000
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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"
Dec 18, 2001
Dec 18, 2001
175
LIBS="$LIBS -lvorbisfile -lvorbis -logg"
Jul 3, 2000
Jul 3, 2000
176
177
fi
fi
Oct 21, 1999
Oct 21, 1999
178
179
180
181
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
182
183
SMPEG_VERSION=0.4.3
AM_PATH_SMPEG($SMPEG_VERSION, have_smpeg=yes, have_smpeg=no)
Oct 21, 1999
Oct 21, 1999
184
if test x$have_smpeg = xyes; then
Apr 23, 2001
Apr 23, 2001
185
CFLAGS="$CFLAGS -DMP3_MUSIC $SMPEG_CFLAGS"
Apr 5, 2001
Apr 5, 2001
186
LIBS="$LIBS $SMPEG_LIBS"
Oct 21, 1999
Oct 21, 1999
187
188
189
fi
fi
Oct 21, 1999
Oct 21, 1999
190
191
192
dnl Add Makefile conditionals
AC_SUBST(MUSIC_SUBDIRS)
AM_CONDITIONAL(USE_MIKMOD, test x$enable_music_mod = xyes)
Sep 5, 2001
Sep 5, 2001
193
AM_CONDITIONAL(USE_TIMIDITY, test x$enable_music_timidity_midi = xyes)
Feb 13, 2002
Feb 13, 2002
194
195
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
196
Oct 21, 1999
Oct 21, 1999
197
198
199
200
201
# Finally create all the generated files
AC_OUTPUT([
Makefile
mikmod/Makefile
timidity/Makefile
Aug 19, 2001
Aug 19, 2001
202
native_midi/Makefile
Feb 13, 2002
Feb 13, 2002
203
native_midi_gpl/Makefile
Jan 20, 2000
Jan 20, 2000
204
SDL_mixer.spec
Oct 21, 1999
Oct 21, 1999
205
])