Skip to content

Latest commit

 

History

History
245 lines (205 loc) · 6.45 KB

configure.in

File metadata and controls

245 lines (205 loc) · 6.45 KB
 
Sep 25, 2001
Sep 25, 2001
1
# Process this file with autoconf to produce a configure script.
Sep 25, 2001
Sep 25, 2001
2
AC_INIT(SDL_sound.c)
Sep 25, 2001
Sep 25, 2001
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
dnl ---------------------------------------------------------------------
dnl System/version info
dnl ---------------------------------------------------------------------
# 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=0
MINOR_VERSION=1
Jan 2, 2002
Jan 2, 2002
18
MICRO_VERSION=4
Sep 25, 2001
Sep 25, 2001
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
INTERFACE_AGE=0
BINARY_AGE=0
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)
dnl Detect the canonical host and target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl Setup for automake
Oct 3, 2001
Oct 3, 2001
46
AM_CONFIG_HEADER(config.h)
Sep 25, 2001
Sep 25, 2001
47
48
49
50
51
52
53
54
55
56
57
58
59
AM_INIT_AUTOMAKE(SDL_sound, $VERSION)
dnl ---------------------------------------------------------------------
dnl Compilers and other tools
dnl ---------------------------------------------------------------------
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
Oct 3, 2001
Oct 3, 2001
60
61
62
63
64
65
dnl ---------------------------------------------------------------------
dnl Debug mode?
dnl ---------------------------------------------------------------------
AC_ARG_ENABLE(debug,
[ --enable-debug enable debug mode [default=no]],
Nov 9, 2001
Nov 9, 2001
66
, enable_debug=no)
Oct 3, 2001
Oct 3, 2001
67
68
69
70
71
72
if test x$enable_debug = xyes; then
if test x$ac_cv_prog_cc_g = xyes; then
CFLAGS="-g -O0"
else
CFLAGS="-O0"
fi
Oct 3, 2001
Oct 3, 2001
73
CFLAGS="$CFLAGS -Werror"
Oct 3, 2001
Oct 3, 2001
74
AC_DEFINE(DEBUG)
Oct 3, 2001
Oct 3, 2001
75
AC_DEFINE(DEBUG_CHATTER)
Oct 3, 2001
Oct 3, 2001
76
77
78
79
80
else
AC_DEFINE(NDEBUG)
fi
Sep 25, 2001
Sep 25, 2001
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
dnl ---------------------------------------------------------------------
dnl Checks for libraries.
dnl ---------------------------------------------------------------------
dnl Check for SDL
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl Check for voc decoder inclusion...
AC_ARG_ENABLE(voc,
[ --enable-voc enable VOC decoding [default=yes]],
, enable_voc=yes)
if test x$enable_voc = xyes; then
AC_DEFINE(SOUND_SUPPORTS_VOC)
fi
dnl Check for wav decoder inclusion...
AC_ARG_ENABLE(wav,
[ --enable-wav enable WAV decoding [default=yes]],
, enable_wav=yes)
if test x$enable_wav = xyes; then
AC_DEFINE(SOUND_SUPPORTS_WAV)
fi
dnl Check for raw decoder inclusion...
AC_ARG_ENABLE(raw,
[ --enable-raw enable raw audio "decoding" [default=yes]],
, enable_raw=yes)
if test x$enable_raw = xyes; then
AC_DEFINE(SOUND_SUPPORTS_RAW)
fi
dnl Check for aiff decoder inclusion...
AC_ARG_ENABLE(aiff,
[ --enable-aiff enable AIFF decoding [default=yes]],
, enable_aiff=yes)
if test x$enable_aiff = xyes; then
AC_DEFINE(SOUND_SUPPORTS_AIFF)
fi
Sep 25, 2001
Sep 25, 2001
130
131
dnl Check for shn decoder inclusion...
AC_ARG_ENABLE(shn,
Oct 3, 2001
Oct 3, 2001
132
133
[ --enable-shn enable SHN decoding [default=yes]],
, enable_shn=yes)
Sep 25, 2001
Sep 25, 2001
134
135
136
137
if test x$enable_shn = xyes; then
AC_DEFINE(SOUND_SUPPORTS_SHN)
fi
Oct 3, 2001
Oct 3, 2001
138
139
dnl Check for the MIDI pipe decoder...
AC_ARG_ENABLE(midi,
Jan 4, 2002
Jan 4, 2002
140
141
[ --enable-midi enable software MIDI music [default=yes]],
, enable_midi=yes)
Oct 3, 2001
Oct 3, 2001
142
143
144
145
if test x$enable_midi = xyes; then
AC_DEFINE(SOUND_SUPPORTS_MIDI)
fi
Nov 9, 2001
Nov 9, 2001
146
147
148
149
150
dnl Check for libFLAC
AC_ARG_ENABLE(flac,
[ --enable-flac enable FLAC decoding via libFLAC [default=yes]],
, enable_flac=yes)
if test x$enable_flac = xyes; then
Nov 19, 2001
Nov 19, 2001
151
AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes)
Nov 9, 2001
Nov 9, 2001
152
153
154
155
156
157
158
AC_CHECK_LIB(FLAC, FLAC__stream_decoder_new, have_flac_lib=yes)
if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then
LIBS="$LIBS -lFLAC"
AC_DEFINE(SOUND_SUPPORTS_FLAC)
fi
fi
Oct 3, 2001
Oct 3, 2001
159
160
161
162
163
164
165
166
167
168
169
170
171
dnl Check for SMPEG
AC_ARG_ENABLE(smpeg,
[ --enable-smpeg enable MP3 music via smpeg [default=yes]],
, enable_smpeg=yes)
if test x$enable_smpeg = xyes; then
SMPEG_VERSION=0.4.3
AM_PATH_SMPEG($SMPEG_VERSION, , no_smpeg=yes)
if test "x$no_smpeg" = "x" ; then
CFLAGS="$CFLAGS $SMPEG_CFLAGS"
LIBS="$LIBS $SMPEG_LIBS"
AC_DEFINE(SOUND_SUPPORTS_MP3)
fi
fi
Sep 25, 2001
Sep 25, 2001
172
Sep 25, 2001
Sep 25, 2001
173
174
175
176
177
178
179
180
181
182
dnl Check for libmikmod
AC_ARG_ENABLE(mikmod,
[ --enable-mikmod enable MOD decoding via mikmod [default=yes]],
, enable_mikmod=yes)
if test x$enable_mikmod = xyes; then
AM_PATH_LIBMIKMOD
if test "x$no_libmikmod" = "x" ; then
CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS"
LIBS="$LIBS $LIBMIKMOD_LIBS"
LDADD="$LDADD $LIBMIKMOD_LDADD"
Jan 10, 2002
Jan 10, 2002
183
184
185
186
187
188
189
190
191
192
193
194
195
196
AC_DEFINE(SOUND_SUPPORTS_MIKMOD)
fi
fi
dnl Check for libmodplug
AC_ARG_ENABLE(modplug,
[ --enable-modplug enable MOD decoding via modplug [default=yes]],
, enable_modplug=yes)
if test x$enable_modplug = xyes; then
AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes)
AC_CHECK_LIB(modplug, ModPlug_Load, have_modplug_lib=yes)
if test x$have_modplug_hdr = xyes -a x$have_modplug_lib = xyes; then
LIBS="$LIBS -lmodplug"
AC_DEFINE(SOUND_SUPPORTS_MODPLUG)
Sep 25, 2001
Sep 25, 2001
197
198
199
200
201
fi
fi
dnl Check for vorbis
AC_ARG_ENABLE(vorbis,
Nov 9, 2001
Nov 9, 2001
202
[ --enable-vorbis enable OGG decoding via vorbis [default=yes]],
Sep 25, 2001
Sep 25, 2001
203
204
205
206
207
208
209
210
211
212
, enable_vorbis=yes)
if test x$enable_vorbis = xyes; then
AM_PATH_VORBIS
if test "x$no_vorbis" = "x" ; then
CFLAGS="$CFLAGS $VORBIS_CFLAGS"
LIBS="$LIBS $VORBIS_LIBS $VORBISFILE_LIBS $VORBISENC_LIBS"
AC_DEFINE(SOUND_SUPPORTS_OGG)
fi
fi
Dec 27, 2001
Dec 27, 2001
213
214
215
216
217
218
219
220
dnl Check for efence (!!! FIXME : This doesn't work.)
dnl AC_ARG_ENABLE(efence,
dnl [ --enable-efence enable ElectricFence usage [default=no]],
dnl , enable_efence=no)
dnl if test x$enable_efence = xyes; then
dnl LIBS="$LIBS /usr/lib/libefence.a"
dnl fi
Sep 25, 2001
Sep 25, 2001
221
222
223
224
225
226
227
228
229
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
Sep 25, 2001
Sep 25, 2001
230
231
232
233
# This is only in the bleeding edge autoconf distro...
#AC_FUNC_MALLOC
Sep 25, 2001
Sep 25, 2001
234
235
236
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([memset strrchr])
Jan 4, 2002
Jan 4, 2002
237
238
dnl Add Makefile conditionals
AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes)
Sep 25, 2001
Sep 25, 2001
239
240
241
242
AC_OUTPUT([
Makefile
decoders/Makefile
Jan 4, 2002
Jan 4, 2002
243
decoders/timidity/Makefile
Sep 25, 2001
Sep 25, 2001
244
245
test/Makefile
])