-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
262 lines (224 loc) · 7.83 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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
130
131
132
133
134
135
136
137
138
139
140
141
142
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
AC_PREREQ(2.59)
AC_INIT(alsa-plugins, 1.1.5)
AM_INIT_AUTOMAKE
AC_PREFIX_DEFAULT(/usr)
AM_MAINTAINER_MODE([enable])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_PROG_INSTALL
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_HEADER_STDC
CC_NOUNDEFINED
PKG_CHECK_MODULES(ALSA, alsa >= 1.0.11)
AC_CHECK_LIB(asound, snd_pcm_ioplug_create,,
AC_ERROR([*** libasound has no external plugin SDK]), -ldl)
AC_ARG_ENABLE([oss],
AS_HELP_STRING([--disable-oss], [Disable building of OSS plugin]))
AS_IF([test "x$enable_oss" != "xno"],
[AM_CONDITIONAL(HAVE_OSS, true)],
[AM_CONDITIONAL(HAVE_OSS, false)])
AC_ARG_ENABLE([mix],
AS_HELP_STRING([--disable-mix], [Disable building of upmix and vdownmix plugins]))
AS_IF([test "x$enable_mix" != "xno"],
[AM_CONDITIONAL(HAVE_MIX, true)],
[AM_CONDITIONAL(HAVE_MIX, false)])
AC_ARG_ENABLE([usbstream],
AS_HELP_STRING([--disable-usbstream], [Disable building of usb_stream plugin]))
AS_IF([test "x$enable_usbstream" != "xno"],
[AM_CONDITIONAL(HAVE_USBSTREAM, true)],
[AM_CONDITIONAL(HAVE_USBSTREAM, false)])
AC_ARG_ENABLE([arcamav],
AS_HELP_STRING([--disable-arcamav], [Disable building of Arcam AV control plugin]))
AS_IF([test "x$enable_arcamav" != "xno"],
[AM_CONDITIONAL(HAVE_ARCAMAV, true)],
[AM_CONDITIONAL(HAVE_ARCAMAV, false)])
AC_ARG_ENABLE([jack],
AS_HELP_STRING([--disable-jack], [Disable building of JACK plugin]))
if test "x$enable_jack" != "xno"; then
PKG_CHECK_MODULES(JACK, jack >= 0.98, [HAVE_JACK=yes], [HAVE_JACK=no])
fi
AM_CONDITIONAL(HAVE_JACK, test x$HAVE_JACK = xyes)
AC_ARG_ENABLE([pulseaudio],
AS_HELP_STRING([--disable-pulseaudio], [Disable building of pulseaudio plugin]))
if test "x$enable_pulseaudio" != "xno"; then
PKG_CHECK_MODULES(pulseaudio, [libpulse >= 0.9.11], [HAVE_PULSE=yes], [HAVE_PULSE=no])
fi
AM_CONDITIONAL(HAVE_PULSE, test x$HAVE_PULSE = xyes)
AC_ARG_ENABLE([samplerate],
AS_HELP_STRING([--disable-samplerate], [Disable building of samplerate plugin]))
if test "x$enable_samplerate" != "xno"; then
PKG_CHECK_MODULES(samplerate, [samplerate], [HAVE_SAMPLERATE=yes], [HAVE_SAMPLERATE=no])
fi
AM_CONDITIONAL(HAVE_SAMPLERATE, test x$HAVE_SAMPLERATE = xyes)
AC_ARG_ENABLE([maemo-plugin],
AS_HELP_STRING([--enable-maemo-plugin],
[Build Maemo DSP plugin]),
[HAVE_MAEMO_PLUGIN="$enableval"], [HAVE_MAEMO_PLUGIN="no"])
AM_CONDITIONAL(HAVE_MAEMO_PLUGIN, test x$HAVE_MAEMO_PLUGIN = xyes)
AC_ARG_ENABLE([maemo-resource-manager],
AS_HELP_STRING([--enable-maemo-resource-manager],
[Use Maemo resource manager]),
[use_maemo_rm="$enableval"], [use_maemo_rm="no"])
if test "$use_maemo_rm" = "yes"; then
PKG_CHECK_MODULES(DBUS, [dbus-1], [HAVE_DBUS=yes], [HAVE_DBUS=no])
if test "$HAVE_DBUS" = "yes"; then
AC_DEFINE(USE_RESOURCE_MANAGER, 1,"Use dbus server as a resouce manager")
else
AC_ERROR([You must have D-Bus installed if you want to enable the Maemo resource manager])
fi
fi
AC_ARG_ENABLE([avcodec],
AS_HELP_STRING([--disable-avcodec], [Don't build plugins depending on avcodec (a52)]))
if test "x$enable_avcodec" != "xno"; then
PKG_CHECK_MODULES(AVCODEC, [libavcodec libavutil], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no])
fi
if test "x$HAVE_AVCODEC" = "xno"; then
AC_ARG_WITH([avcodec-includedir],
AS_HELP_STRING([--with-avcodec-includedir=dir],
[AVcodec include directory]),
[AVCODEC_CFLAGS="-I$withval"], [AVCODEC_CFLAGS=""])
AC_ARG_WITH([avcodec-libdir],
AS_HELP_STRING([--with-avcodec-libdir=dir],
[AVcodec library directory]),
[AVCODEC_LIBS="-L$withval"], [AVCODEC_LIBS=""])
CFLAGS_saved="$CFLAGS"
LDFLAGS_saved="$LDFLAGS"
CFLAGS="$CFLAGS $AVCODEC_CFLAGS"
LDFLAGS="$LDFLAGS $AVCODEC_LIBS"
AVCODEC_LIBS="$AVCODEC_LIBS -lavcodec"
AC_CHECK_LIB([avcodec], [avcodec_open], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no])
CFLAGS="$CFLAGS_saved"
LDFLAGS="$LDFLAGS_saved"
fi
if test $HAVE_AVCODEC = yes; then
AVCODEC_HEADER=""
CFLAGS_saved="$CFLAGS"
CFLAGS="$CFLAGS $AVCODEC_CFLAGS"
AC_CHECK_HEADER([ffmpeg/avcodec.h], [AVCODEC_HEADER='<ffmpeg/avcodec.h>'])
if test -z "$AVCODEC_HEADER"; then
AC_CHECK_HEADER([libavcodec/avcodec.h], [AVCODEC_HEADER='<libavcodec/avcodec.h>'])
fi
if test -z "$AVCODEC_HEADER"; then
HAVE_AVCODEC=no
fi
CFLAGS="$CFLAGS_saved"
fi
AM_CONDITIONAL(HAVE_AVCODEC, test x$HAVE_AVCODEC = xyes)
AC_SUBST(AVCODEC_CFLAGS)
AC_SUBST(AVCODEC_LIBS)
AC_SUBST(AVCODEC_HEADER)
AC_ARG_ENABLE([speexdsp],
AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin]))
if test "x$enable_speexdsp" != "xno"; then
PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2rc2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
fi
AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes")
AC_ARG_WITH([speex],
AS_HELP_STRING([--with-speex={builtin|lib|no}],
[build speex resampler (built-in code, link with external lib, or no build)]),
[PPH=$withval], [PPH="lib"])
USE_LIBSPEEX=""
if test "$PPH" = "lib"; then
if test "$HAVE_SPEEXDSP" = "yes"; then
AC_CHECK_LIB([speexdsp], [speex_resampler_init],
[USE_LIBSPEEX="yes"], [USE_LIBSPEEX=""])
fi
if test "$USE_LIBSPEEX" = "yes"; then
AC_DEFINE(USE_LIBSPEEX, 1, "Link with libspeex for resampler")
else
echo "No libspeex with resampler unit; use built-in code"
PPH="builtin"
fi
fi
AM_CONDITIONAL(HAVE_PPH, test "$PPH" = "builtin" -o "$PPH" = "lib")
AM_CONDITIONAL(USE_LIBSPEEX, test "$PPH" = "lib")
if test "$PPH" = "lib"; then
AC_CHECK_HEADERS([speex/speexdsp_types.h])
fi
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
dnl ALSA plugin directory
AC_ARG_WITH(plugindir,
AS_HELP_STRING([--with-plugindir=dir],
[path where ALSA plugin files are stored]),
plugindir="$withval", plugindir="")
if test -z "$plugindir"; then
eval dir="$libdir"
case "$dir" in
/*) ;;
*) dir="$dir"
esac
plugindir="$dir/alsa-lib"
fi
AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "$plugindir", [directory containing ALSA add-on modules])
ALSA_PLUGIN_DIR="$plugindir"
AC_SUBST(ALSA_PLUGIN_DIR)
dnl ALSA data directory
AC_ARG_WITH(alsadatadir,
AS_HELP_STRING([--with-alsadatadir=dir],
[path where ALSA data files are stored]),
alsadatadir="$withval", alsadatadir="")
if test -z "$alsadatadir"; then
eval dir="$datadir"
case "$dir" in
/*) ;;
*) dir="$dir"
esac
alsadatadir="$dir/alsa"
fi
AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA data files])
ALSA_DATA_DIR="$alsadatadir"
AC_SUBST(ALSA_DATA_DIR)
SAVE_PLUGINS_VERSION
AC_OUTPUT([
Makefile
oss/Makefile
pph/Makefile
jack/Makefile
pulse/Makefile
mix/Makefile
rate/Makefile
a52/Makefile
rate-lavc/Makefile
maemo/Makefile
doc/Makefile
usb_stream/Makefile
speex/Makefile
arcam-av/Makefile
])
dnl Show the build conditions
echo
echo "Plugin directory: $ALSA_PLUGIN_DIR"
echo "ALSA_CFLAGS: $ALSA_CFLAGS"
echo "ALSA_LIBS: $ALSA_LIBS"
echo "JACK plugin: $HAVE_JACK"
if test "$HAVE_JACK" = "yes"; then
echo " JACK_CFLAGS: $JACK_CFLAGS"
echo " JACK_LIBS: $JACK_LIBS"
fi
echo "Pulseaudio plugin: $HAVE_PULSE"
if test "$HAVE_PULSE" = "yes"; then
echo " pulseaudio_CFLAGS: $pulseaudio_CFLAGS"
echo " pulseaudio_LIBS: $pulseaudio_LIBS"
fi
echo "Samplerate plugin: $HAVE_SAMPLERATE"
if test "$HAVE_SAMPLERATE" = "yes"; then
echo " samplerate_CFLAGS: $samplerate_CFLAGS"
echo " samplerate_LIBS: $samplerate_LIBS"
fi
echo "Maemo plugin: $HAVE_MAEMO_PLUGIN"
echo " Using Osso resource manager: $use_maemo_rm"
echo "A52, lavc plugins: $HAVE_AVCODEC"
if test "$HAVE_AVCODEC" = "yes"; then
echo " AVCODEC_CFLAGS: $AVCODEC_CFLAGS"
echo " AVCODEC_LIBS: $AVCODEC_LIBS"
echo " AVCODEC_HEADER: $AVCODEC_HEADER"
fi
echo "Speex rate plugin: $PPH"
echo "Speex preprocess plugin: $HAVE_SPEEXDSP"
if test "$HAVE_SPEEX" = "yes"; then
echo " speexdsp_CFLAGS: $speexdsp_CFLAGS"
echo " speexdsp_LIBS: $speexdsp_LIBS"
fi