comparison configure.in @ 65:cee26d04d0ca

Initial add.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 25 Sep 2001 01:10:20 +0000
parents
children 54e10585e0cf
comparison
equal deleted inserted replaced
64:40006625142a 65:cee26d04d0ca
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(COPYING)
3
4 dnl ---------------------------------------------------------------------
5 dnl System/version info
6 dnl ---------------------------------------------------------------------
7
8 # Making releases:
9 # MICRO_VERSION += 1;
10 # INTERFACE_AGE += 1;
11 # BINARY_AGE += 1;
12 # if any functions have been added, set INTERFACE_AGE to 0.
13 # if backwards compatibility has been broken,
14 # set BINARY_AGE and INTERFACE_AGE to 0.
15
16 MAJOR_VERSION=0
17 MINOR_VERSION=1
18 MICRO_VERSION=2
19 INTERFACE_AGE=0
20 BINARY_AGE=0
21 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
22
23 AC_SUBST(MAJOR_VERSION)
24 AC_SUBST(MINOR_VERSION)
25 AC_SUBST(MICRO_VERSION)
26 AC_SUBST(INTERFACE_AGE)
27 AC_SUBST(BINARY_AGE)
28 AC_SUBST(VERSION)
29
30 # libtool versioning
31 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
32 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
33 LT_REVISION=$INTERFACE_AGE
34 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
35
36 AC_SUBST(LT_RELEASE)
37 AC_SUBST(LT_CURRENT)
38 AC_SUBST(LT_REVISION)
39 AC_SUBST(LT_AGE)
40
41 dnl Detect the canonical host and target build environment
42 AC_CANONICAL_HOST
43 AC_CANONICAL_TARGET
44
45 dnl Setup for automake
46 AM_INIT_AUTOMAKE(SDL_sound, $VERSION)
47
48
49 dnl ---------------------------------------------------------------------
50 dnl Compilers and other tools
51 dnl ---------------------------------------------------------------------
52
53 AC_PROG_CC
54 AC_PROG_INSTALL
55 AC_PROG_LN_S
56 AC_PROG_LIBTOOL
57
58
59 dnl ---------------------------------------------------------------------
60 dnl Checks for libraries.
61 dnl ---------------------------------------------------------------------
62
63 dnl Check for SDL
64 SDL_VERSION=1.2.0
65 AM_PATH_SDL($SDL_VERSION,
66 :,
67 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
68 )
69 CFLAGS="$CFLAGS $SDL_CFLAGS"
70 LIBS="$LIBS $SDL_LIBS"
71
72 dnl Check for voc decoder inclusion...
73 AC_ARG_ENABLE(voc,
74 [ --enable-voc enable VOC decoding [default=yes]],
75 , enable_voc=yes)
76 if test x$enable_voc = xyes; then
77 AC_DEFINE(SOUND_SUPPORTS_VOC)
78 fi
79
80
81 dnl Check for wav decoder inclusion...
82 AC_ARG_ENABLE(wav,
83 [ --enable-wav enable WAV decoding [default=yes]],
84 , enable_wav=yes)
85 if test x$enable_wav = xyes; then
86 AC_DEFINE(SOUND_SUPPORTS_WAV)
87 fi
88
89
90 dnl Check for raw decoder inclusion...
91 AC_ARG_ENABLE(raw,
92 [ --enable-raw enable raw audio "decoding" [default=yes]],
93 , enable_raw=yes)
94 if test x$enable_raw = xyes; then
95 AC_DEFINE(SOUND_SUPPORTS_RAW)
96 fi
97
98
99 dnl Check for aiff decoder inclusion...
100 AC_ARG_ENABLE(aiff,
101 [ --enable-aiff enable AIFF decoding [default=yes]],
102 , enable_aiff=yes)
103 if test x$enable_aiff = xyes; then
104 AC_DEFINE(SOUND_SUPPORTS_AIFF)
105 fi
106
107
108 dnl Check for libmikmod
109 AC_ARG_ENABLE(mikmod,
110 [ --enable-mikmod enable MOD decoding via mikmod [default=yes]],
111 , enable_mikmod=yes)
112 if test x$enable_mikmod = xyes; then
113 AM_PATH_LIBMIKMOD
114 if test "x$no_libmikmod" = "x" ; then
115 CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS"
116 LIBS="$LIBS $LIBMIKMOD_LIBS"
117 LDADD="$LDADD $LIBMIKMOD_LDADD"
118 AC_DEFINE(SOUND_SUPPORTS_MOD)
119 fi
120 fi
121
122 dnl Check for vorbis
123 AC_ARG_ENABLE(vorbis,
124 [ --enable-vorbis enable OGG music via vorbis [default=yes]],
125 , enable_vorbis=yes)
126 if test x$enable_vorbis = xyes; then
127 AM_PATH_VORBIS
128 if test "x$no_vorbis" = "x" ; then
129 CFLAGS="$CFLAGS $VORBIS_CFLAGS"
130 LIBS="$LIBS $VORBIS_LIBS $VORBISFILE_LIBS $VORBISENC_LIBS"
131 AC_DEFINE(SOUND_SUPPORTS_OGG)
132 fi
133 fi
134
135 dnl Check for SMPEG
136 AC_ARG_ENABLE(smpeg,
137 [ --enable-smpeg enable MP3 music via smpeg [default=yes]],
138 , enable_smpeg=yes)
139 if test x$enable_smpeg = xyes; then
140 SMPEG_VERSION=0.4.3
141 AM_PATH_SMPEG($SMPEG_VERSION, , no_smpeg=yes)
142 if test "x$no_smpeg" = "x" ; then
143 CFLAGS="$CFLAGS $SMPEG_CFLAGS"
144 LIBS="$LIBS $SMPEG_LIBS"
145 AC_DEFINE(SOUND_SUPPORTS_MP3)
146 fi
147 fi
148
149
150
151 # Checks for header files.
152 AC_HEADER_STDC
153 AC_CHECK_HEADERS([stdlib.h string.h])
154
155 # Checks for typedefs, structures, and compiler characteristics.
156 AC_C_CONST
157 AC_TYPE_SIZE_T
158
159 # Checks for library functions.
160 AC_FUNC_MALLOC
161 AC_FUNC_MEMCMP
162 AC_CHECK_FUNCS([memset strrchr])
163
164
165 AC_OUTPUT([
166 Makefile
167 decoders/Makefile
168 test/Makefile
169 ])