1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(src/control/control.c)
5 AC_CONFIG_MACRO_DIR([m4])
7 dnl *************************************************
8 dnl current:revision:age
9 dnl change (without API) = c:r+1:a
10 dnl change API = c+1:0:a
11 dnl add API = c+1:0:a+1
12 dnl remove API = c+1:0:0
13 dnl *************************************************
15 AM_INIT_AUTOMAKE(alsa-lib, 1.0.25)
16 eval LIBTOOL_VERSION_INFO="2:0:0"
17 dnl *************************************************
18 AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}")
20 # Test for new silent rules and enable only if they are available
21 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
23 AC_PREFIX_DEFAULT(/usr)
25 dnl Checks for programs.
27 dnl try to gues cross-compiler if not set
28 if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
30 AC_MSG_CHECKING(for cross-compiler)
32 which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
33 which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
34 && CC=${host_cpu}-${host-os}-gcc
35 which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
36 && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
41 CFLAGS="$CFLAGS -D_GNU_SOURCE"
54 dnl Checks for header files.
56 AM_CONFIG_HEADER(include/config.h)
58 dnl Checks for typedefs, structures, and compiler characteristics.
63 dnl Checks for library functions.
64 AC_PROG_GCC_TRADITIONAL
65 AC_CHECK_FUNC([hsearch_r], [HAVE_HSEARCH_R=yes])
66 AM_CONDITIONAL(ALSA_HSEARCH_R, [test "x$HAVE_HSEARCH_R" != xyes])
67 AC_CHECK_FUNCS([uselocale])
70 AC_SUBST(LIBTOOL_VERSION_INFO)
72 test "x$prefix" = xNONE && prefix=$ac_default_prefix
74 dnl Do not build static and shared libraries together
75 if test "$enable_static" = "$enable_shared" -a "$enable_static" = "yes"; then
77 Please, do not try to compile static and shared libraries together.
78 See INSTALL file for more details (do not use --enable-shared=yes with
84 dnl ALSA configuration directory
85 AC_ARG_WITH(configdir,
86 AS_HELP_STRING([--with-configdir=dir],
87 [path where ALSA config files are stored]),
88 confdir="$withval", confdir="")
89 if test -z "$confdir"; then
93 *) dir="$prefix/share"
97 ALSA_CONFIG_DIR="$confdir"
98 AC_DEFINE_UNQUOTED(ALSA_CONFIG_DIR, "$confdir", [directory containing ALSA configuration database])
99 AC_SUBST(ALSA_CONFIG_DIR)
101 dnl ALSA plugin directory
102 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
104 AC_ARG_WITH(plugindir,
105 AS_HELP_STRING([--with-plugindir=dir],
106 [path where ALSA plugin files are stored]),
107 plugindir="$withval", plugindir="")
108 if test -z "$plugindir"; then
114 plugindir="$dir/$PACKAGE"
116 AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "$plugindir", [directory containing ALSA add-on modules])
117 ALSA_PLUGIN_DIR="$plugindir"
118 AC_SUBST(ALSA_PLUGIN_DIR)
120 AC_ARG_WITH(pkgconfdir,
121 AS_HELP_STRING([--with-pkgconfdir=dir],
122 [path where pkgconfig files are stored]),
123 pkgconfdir="$withval", pkgconfdir="")
124 if test -z "$pkgconfdir"; then
130 pkgconfdir="$dir/pkgconfig"
132 AC_DEFINE_UNQUOTED(ALSA_PKGCONF_DIR, "$pkgconfdir", [directory containing pkgconfig files])
133 ALSA_PKGCONF_DIR="$pkgconfdir"
134 AC_SUBST(ALSA_PKGCONF_DIR)
136 dnl Check for versioned symbols
137 AC_MSG_CHECKING(for versioned symbols)
138 AC_ARG_WITH(versioned,
139 AS_HELP_STRING([--with-versioned],
140 [shared library will be compiled with versioned symbols (default = yes)]),
141 versioned="$withval", versioned="yes")
142 if test "$versioned" = "yes"; then
143 # it seems that GNU ld versions since 2.10 are not broken
144 xres=`grep '^VERSION=' ${srcdir}/ltmain.sh | cut -d = -f 2 | cut -d \" -f 2`
145 major=`echo $xres | cut -d . -f 1`
146 minor=`echo $xres | cut -d . -f 2`
148 if test $major -eq 1 && test $minor -gt 3; then
151 if test $major -gt 1; then
155 if test $pass -eq 1; then
156 AC_DEFINE(VERSIONED_SYMBOLS,,[compiled with versioned symbols])
159 AC_MSG_RESULT(broken libtool - use libtool v1.4+; no versions)
164 AM_CONDITIONAL(VERSIONED_SYMBOLS, test x$versioned = xyes)
166 dnl Check for symbolic-functions
167 AC_MSG_CHECKING(for symbolic-functions)
168 AC_ARG_ENABLE(symbolic-functions,
169 AS_HELP_STRING([--enable-symbolic-functions],
170 [use -Bsymbolic-functions option if available (optmization for size and speed)]),
171 symfuncs="$enableval", symfuncs="no")
172 if test "$symfuncs" = "yes"; then
173 if ld --help | grep -q -- '-Bsymbolic-functions'; then
176 AC_MSG_RESULT(not supported by ld)
182 AM_CONDITIONAL(SYMBOLIC_FUNCTIONS, test x"$symfuncs" = xyes)
184 dnl See if toolchain has a custom prefix for symbols ...
185 AC_MSG_CHECKING(for custom symbol prefixes)
187 echo "PREFIX=__USER_LABEL_PREFIX__" \
188 | ${CPP-${CC-gcc} -E} - 2>&1 \
189 | ${EGREP-grep} "^PREFIX=" \
190 | ${SED-sed} "s:^PREFIX=::"`
191 AC_DEFINE_UNQUOTED([__SYMBOL_PREFIX], "$SYMBOL_PREFIX", [Toolchain Symbol Prefix])
192 AC_SUBST(SYMBOL_PREFIX)
193 AC_MSG_RESULT($SYMBOL_PREFIX)
195 dnl Check for debug...
196 AC_MSG_CHECKING(for debug)
198 AS_HELP_STRING([--with-debug],
199 [library will be compiled with asserts (default = yes)]),
200 debug="$withval", debug="yes")
201 if test "$debug" = "yes"; then
204 AC_DEFINE(NDEBUG,,[No assert debug])
208 if test "$debug" = "yes"; then
209 AC_MSG_CHECKING(for debug assert)
210 AC_ARG_ENABLE(debug-assert,
211 AS_HELP_STRING([--enable-debug],
212 [enable assert call at the default error message handler]),
213 debug_assert="$enableval", debug_assert="no")
214 if test "$debug_assert" = "yes"; then
216 AC_DEFINE(ALSA_DEBUG_ASSERT,,[Enable assert at error message handler])
222 dnl Temporary directory
223 AC_MSG_CHECKING(for tmpdir)
225 AS_HELP_STRING([--with-tmpdir=directory],
226 [directory to put tmp socket files (/tmp)]),
227 tmpdir="$withval", tmpdir="/tmp")
228 AC_MSG_RESULT($tmpdir)
229 AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [directory to put tmp socket files])
231 dnl Check for softfloat...
232 AC_MSG_CHECKING(for softfloat)
233 AC_ARG_WITH(softfloat,
234 AS_HELP_STRING([--with-softfloat],
235 [do you have floating point unit on this machine? (optional)]),
237 y|yes) softfloat=yes ;;
240 if test "$softfloat" = "yes" ; then
241 AC_DEFINE(HAVE_SOFT_FLOAT, "1", [Avoid calculation in float])
248 if test "$softfloat" != "yes"; then
253 AC_MSG_CHECKING(for libdl)
255 AS_HELP_STRING([--with-libdl], [Use libdl for plugins (default = yes)]),
256 [ have_libdl="$withval" ], [ have_libdl="yes" ])
257 if test "$have_libdl" = "yes"; then
258 AC_CHECK_LIB([dl], [dlsym], [HAVE_LIBDL="yes"])
259 if test "$HAVE_LIBDL" = "yes" ; then
260 ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
261 AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
266 AM_CONDITIONAL(BUILD_MODULES, test "$HAVE_LIBDL"="yes")
268 dnl Check for pthread
269 AC_MSG_CHECKING(for pthread)
271 AS_HELP_STRING([--with-pthread], [Use pthread (default = yes)]),
272 [ have_pthread="$withval" ], [ have_pthread="yes" ])
273 if test "$have_pthread" = "yes"; then
274 AC_CHECK_LIB([pthread], [pthread_join], [HAVE_LIBPTHREAD="yes"])
275 if test "$HAVE_LIBPTHREAD" = "yes"; then
276 ALSA_DEPLIBS="$ALSA_DEPLIBS -lpthread"
277 AC_DEFINE([HAVE_LIBPTHREAD], 1, [Have libpthread])
284 AC_MSG_CHECKING(for librt)
286 AS_HELP_STRING([--with-librt], [Use librt for monotonic clock (default = yes)]),
287 [ have_librt="$withval" ], [ have_librt="yes" ])
288 if test "$have_librt" = "yes"; then
289 AC_CHECK_LIB([rt], [clock_gettime], [HAVE_LIBRT="yes"])
290 if test "$HAVE_LIBRT" = "yes" ; then
291 ALSA_DEPLIBS="$ALSA_DEPLIBS -lrt"
292 AC_DEFINE([HAVE_LIBRT], 1, [Have librt])
293 AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Have clock gettime])
299 AC_SUBST(ALSA_DEPLIBS)
301 dnl Check for architecture
302 AC_MSG_CHECKING(for architecture)
315 CPPFLAGS="$CPPFLAGS -D__ppc__"
319 CPPFLAGS="$CPPFLAGS -D__ia64__"
323 CPPFLAGS="$CPPFLAGS -D__mips__"
327 CPPFLAGS="$CPPFLAGS -D__arm__"
330 AC_MSG_RESULT($host_cpu)
331 echo "No atomic operations supported.."
335 dnl Check for wordexp.h
336 AC_CHECK_HEADERS([wordexp.h])
338 dnl Check for resmgr support...
339 AC_MSG_CHECKING(for resmgr support)
340 AC_ARG_ENABLE(resmgr,
341 AS_HELP_STRING([--enable-resmgr], [support resmgr (optional)]),
342 resmgr="$enableval", resmgr="no")
343 AC_MSG_RESULT($resmgr)
344 if test "$resmgr" = "yes"; then
345 AC_CHECK_LIB(resmgr, rsm_open_device,,
346 AC_ERROR([Cannot find libresmgr]))
347 AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
350 dnl Check for aload* support...
351 AC_MSG_CHECKING(for aload* support)
353 AS_HELP_STRING([--disable-aload], [disable reading /dev/aload*]),
354 aload="$enableval", aload="yes")
355 AC_MSG_RESULT($aload)
356 if test "$aload" = "yes"; then
357 AC_DEFINE(SUPPORT_ALOAD, "1", [Support /dev/aload* access for auto-loading])
360 dnl Check for non-standard /dev directory
361 AC_MSG_CHECKING([for ALSA device file directory])
362 AC_ARG_WITH(alsa-devdir,
363 AS_HELP_STRING([--with-alsa-devdir=dir],
364 [directory with ALSA device files (default /dev/snd)]),
365 [alsa_dev_dir="$withval"],
366 [alsa_dev_dir="/dev/snd"])
367 dnl make sure it has a trailing slash
368 if echo "$alsa_dev_dir" | grep -v '/$' > /dev/null; then
369 alsa_dev_dir="$alsa_dev_dir/"
371 AC_DEFINE_UNQUOTED(ALSA_DEVICE_DIRECTORY, "$alsa_dev_dir", [Directory with ALSA device files])
372 AC_MSG_RESULT([$alsa_dev_dir])
374 AC_MSG_CHECKING([for aload* device file directory])
375 AC_ARG_WITH(aload-devdir,
376 AS_HELP_STRING([--with-aload-devdir=dir],
377 [directory with aload* device files (default /dev)]),
378 [aload_dev_dir="$withval"],
379 [aload_dev_dir="/dev"])
380 if echo "$aload_dev_dir" | grep -v '/$' > /dev/null; then
381 aload_dev_dir="$aload_dev_dir/"
383 AC_DEFINE_UNQUOTED(ALOAD_DEVICE_DIRECTORY, "$aload_dev_dir", [Directory with aload* device files])
384 AC_MSG_RESULT([$aload_dev_dir])
388 AS_HELP_STRING([--disable-mixer], [disable the mixer component]),
389 [build_mixer="$enableval"], [build_mixer="yes"])
391 AS_HELP_STRING([--disable-pcm], [disable the PCM component]),
392 [build_pcm="$enableval"], [build_pcm="yes"])
393 AC_ARG_ENABLE(rawmidi,
394 AS_HELP_STRING([--disable-rawmidi], [disable the raw MIDI component]),
395 [build_rawmidi="$enableval"], [build_rawmidi="yes"])
397 AS_HELP_STRING([--disable-hwdep], [disable the hwdep component]),
398 [build_hwdep="$enableval"], [build_hwdep="yes"])
400 AS_HELP_STRING([--disable-seq], [disable the sequencer component]),
401 [build_seq="$enableval"], [build_seq="yes"])
403 AS_HELP_STRING([--disable-ucm], [disable the use-case-manager component]),
404 [build_ucm="$enableval"], [build_ucm="yes"])
406 AS_HELP_STRING([--disable-alisp], [disable the alisp component]),
407 [build_alisp="$enableval"], [build_alisp="yes"])
408 test "$softfloat" = "yes" && build_alisp="no"
409 AC_ARG_ENABLE(old-symbols,
410 AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
411 [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
412 AM_CONDITIONAL(KEEP_OLD_SYMBOLS, test x$keep_old_symbols = xyes)
414 AC_ARG_ENABLE(python,
415 AS_HELP_STRING([--disable-python], [disable the python components]),
416 [build_python="$enableval"], [build_python="yes"])
419 if test "$build_python" = "yes"; then
420 AC_ARG_WITH(pythonlibs,
421 AS_HELP_STRING([--with-pythonlibs=ldflags],
422 [specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
423 pythonlibs="$withval", pythonlibs=`python-config --libs`)
424 AC_ARG_WITH(pythonincludes,
425 AS_HELP_STRING([--with-pythonincludes=Cflags],
426 [specify python C header files (-I/usr/include/python)]),
427 pythonincludes="$withval", pythonincludes=`python-config --includes`)
428 if test -z "$pythonlibs"; then
429 echo "Unable to determine python libraries! Probably python-config is not"
430 echo "available on this system. Please, use --with-pythonlibs and"
431 echo "--with-pythonincludes options. Python components are disabled in this build."
434 PYTHON_LIBS="$pythonlibs"
435 PYTHON_INCLUDES="$pythonincludes"
438 AC_SUBST(PYTHON_LIBS)
439 AC_SUBST(PYTHON_INCLUDES)
441 AM_CONDITIONAL(BUILD_MIXER, test x$build_mixer = xyes)
442 AM_CONDITIONAL(BUILD_PCM, test x$build_pcm = xyes)
443 AM_CONDITIONAL(BUILD_RAWMIDI, test x$build_rawmidi = xyes)
444 AM_CONDITIONAL(BUILD_HWDEP, test x$build_hwdep = xyes)
445 AM_CONDITIONAL(BUILD_SEQ, test x$build_seq = xyes)
446 AM_CONDITIONAL(BUILD_UCM, test x$build_ucm = xyes)
447 AM_CONDITIONAL(BUILD_ALISP, test x$build_alisp = xyes)
448 AM_CONDITIONAL(BUILD_PYTHON, test x$build_python = xyes)
450 if test "$build_mixer" = "yes"; then
451 AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
453 if test "$build_pcm" = "yes"; then
454 AC_DEFINE([BUILD_PCM], "1", [Build PCM component])
456 if test "$build_rawmidi" = "yes"; then
457 AC_DEFINE([BUILD_RAWMIDI], "1", [Build raw MIDI component])
459 if test "$build_hwdep" = "yes"; then
460 AC_DEFINE([BUILD_HWDEP], "1", [Build hwdep component])
462 if test "$build_seq" = "yes"; then
463 AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component])
465 if test "$build_ucm" = "yes"; then
466 AC_DEFINE([BUILD_UCM], "1", [Build UCM component])
471 if test "$build_pcm" = "yes"; then
472 AC_ARG_WITH(pcm-plugins,
473 AS_HELP_STRING([--with-pcm-plugins=<list>],
474 [build PCM plugins (default = all)]),
475 [pcm_plugins="$withval"], [pcm_plugins="all"])
480 PCM_PLUGIN_LIST="copy linear route mulaw alaw adpcm rate plug multi shm file null empty share meter hooks lfloat ladspa dmix dshare dsnoop asym iec958 softvol extplug ioplug mmap_emul"
482 build_pcm_plugin="no"
483 for t in $PCM_PLUGIN_LIST; do
484 eval build_pcm_$t="no"
487 pcm_plugins=`echo $pcm_plugins | sed 's/,/ /g'`
488 for p in $pcm_plugins; do
489 for t in $PCM_PLUGIN_LIST; do
490 if test "$p" = "$t" -o "$p" = "all"; then
491 eval build_pcm_$t="yes"
492 build_pcm_plugin="yes"
497 dnl special dependencies
498 if test "$build_pcm_plug" = "yes"; then
499 build_pcm_linear="yes"
503 if test "$build_pcm_ioplug" = "yes"; then
504 build_pcm_extplug="yes"
507 if test "$HAVE_LIBDL" != "yes"; then
509 build_pcm_ladspa="no"
510 build_pcm_pcm_ioplug="no"
511 build_pcm_pcm_extplug="no"
514 if test "$HAVE_LIBPTHREAD" != "yes"; then
518 if test "$softfloat" = "yes"; then
519 build_pcm_lfloat="no"
520 build_pcm_ladspa="no"
523 AM_CONDITIONAL(BUILD_PCM_PLUGIN, test x$build_pcm_plugin = xyes)
524 AM_CONDITIONAL(BUILD_PCM_PLUGIN_COPY, test x$build_pcm_copy = xyes)
525 AM_CONDITIONAL(BUILD_PCM_PLUGIN_LINEAR, test x$build_pcm_linear = xyes)
526 AM_CONDITIONAL(BUILD_PCM_PLUGIN_ROUTE, test x$build_pcm_route = xyes)
527 AM_CONDITIONAL(BUILD_PCM_PLUGIN_MULAW, test x$build_pcm_mulaw = xyes)
528 AM_CONDITIONAL(BUILD_PCM_PLUGIN_ALAW, test x$build_pcm_alaw = xyes)
529 AM_CONDITIONAL(BUILD_PCM_PLUGIN_ADPCM, test x$build_pcm_adpcm = xyes)
530 AM_CONDITIONAL(BUILD_PCM_PLUGIN_RATE, test x$build_pcm_rate = xyes)
531 AM_CONDITIONAL(BUILD_PCM_PLUGIN_PLUG, test x$build_pcm_plug = xyes)
532 AM_CONDITIONAL(BUILD_PCM_PLUGIN_MULTI, test x$build_pcm_multi = xyes)
533 AM_CONDITIONAL(BUILD_PCM_PLUGIN_SHM, test x$build_pcm_shm = xyes)
534 AM_CONDITIONAL(BUILD_PCM_PLUGIN_FILE, test x$build_pcm_file = xyes)
535 AM_CONDITIONAL(BUILD_PCM_PLUGIN_NULL, test x$build_pcm_null = xyes)
536 AM_CONDITIONAL(BUILD_PCM_PLUGIN_EMPTY, test x$build_pcm_empty = xyes)
537 AM_CONDITIONAL(BUILD_PCM_PLUGIN_SHARE, test x$build_pcm_share = xyes)
538 AM_CONDITIONAL(BUILD_PCM_PLUGIN_METER, test x$build_pcm_meter = xyes)
539 AM_CONDITIONAL(BUILD_PCM_PLUGIN_HOOKS, test x$build_pcm_hooks = xyes)
540 AM_CONDITIONAL(BUILD_PCM_PLUGIN_LFLOAT, test x$build_pcm_lfloat = xyes)
541 AM_CONDITIONAL(BUILD_PCM_PLUGIN_LADSPA, test x$build_pcm_ladspa = xyes)
542 AM_CONDITIONAL(BUILD_PCM_PLUGIN_DMIX, test x$build_pcm_dmix = xyes)
543 AM_CONDITIONAL(BUILD_PCM_PLUGIN_DSHARE, test x$build_pcm_dshare = xyes)
544 AM_CONDITIONAL(BUILD_PCM_PLUGIN_DSNOOP, test x$build_pcm_dsnoop = xyes)
545 AM_CONDITIONAL(BUILD_PCM_PLUGIN_ASYM, test x$build_pcm_asym = xyes)
546 AM_CONDITIONAL(BUILD_PCM_PLUGIN_IEC958, test x$build_pcm_iec958 = xyes)
547 AM_CONDITIONAL(BUILD_PCM_PLUGIN_SOFTVOL, test x$build_pcm_softvol = xyes)
548 AM_CONDITIONAL(BUILD_PCM_PLUGIN_EXTPLUG, test x$build_pcm_extplug = xyes)
549 AM_CONDITIONAL(BUILD_PCM_PLUGIN_IOPLUG, test x$build_pcm_ioplug = xyes)
550 AM_CONDITIONAL(BUILD_PCM_PLUGIN_MMAP_EMUL, test x$build_pcm_mmap_emul = xyes)
552 dnl Defines for plug plugin
553 if test "$build_pcm_rate" = "yes"; then
554 AC_DEFINE([BUILD_PCM_PLUGIN_RATE], "1", [Build PCM rate plugin])
556 if test "$build_pcm_route" = "yes"; then
557 AC_DEFINE([BUILD_PCM_PLUGIN_ROUTE], "1", [Build PCM route plugin])
559 if test "$build_pcm_lfloat" = "yes"; then
560 AC_DEFINE([BUILD_PCM_PLUGIN_LFLOAT], "1", [Build PCM lfloat plugin])
562 if test "$build_pcm_adpcm" = "yes"; then
563 AC_DEFINE([BUILD_PCM_PLUGIN_ADPCM], "1", [Build PCM adpcm plugin])
565 if test "$build_pcm_mulaw" = "yes"; then
566 AC_DEFINE([BUILD_PCM_PLUGIN_MULAW], "1", [Build PCM mulaw plugin])
568 if test "$build_pcm_alaw" = "yes"; then
569 AC_DEFINE([BUILD_PCM_PLUGIN_ALAW], "1", [Build PCM alaw plugin])
571 if test "$build_pcm_mmap_emul" = "yes"; then
572 AC_DEFINE([BUILD_PCM_PLUGIN_MMAP_EMUL], "1", [Build PCM mmap-emul plugin])
576 dnl Create PCM plugin symbol list for static library
577 rm -f "$srcdir"/src/pcm/pcm_symbols_list.c
578 touch "$srcdir"/src/pcm/pcm_symbols_list.c
579 for t in $PCM_PLUGIN_LIST; do
580 if eval test \$build_pcm_$t = yes; then
581 echo \&_snd_module_pcm_$t, >> "$srcdir"/src/pcm/pcm_symbols_list.c
587 AC_ARG_WITH(ctl-plugins,
588 AS_HELP_STRING([--with-ctl-plugins=<list>],
589 [build control plugins (default = all)]),
590 [ctl_plugins="$withval"], [ctl_plugins="all"])
592 CTL_PLUGIN_LIST="shm ext"
594 build_ctl_plugin="no"
595 for t in $CTL_PLUGIN_LIST; do
596 eval build_ctl_$t="no"
599 ctl_plugins=`echo $ctl_plugins | sed 's/,/ /g'`
600 for p in $ctl_plugins; do
601 for t in $CTL_PLUGIN_LIST; do
602 if test "$p" = "$t" -o "$p" = "all"; then
603 eval build_ctl_$t="yes"
604 build_ctl_plugin="yes"
609 AM_CONDITIONAL(BUILD_CTL_PLUGIN, test x$build_ctl_plugin = xyes)
610 AM_CONDITIONAL(BUILD_CTL_PLUGIN_SHM, test x$build_ctl_shm = xyes)
611 AM_CONDITIONAL(BUILD_CTL_PLUGIN_EXT, test x$build_ctl_ext = xyes)
613 dnl Create ctl plugin symbol list for static library
614 rm -f "$srcdir"/src/control/ctl_symbols_list.c
615 touch "$srcdir"/src/control/ctl_symbols_list.c
616 for t in $CTL_PLUGIN_LIST; do
617 if eval test \$build_ctl_$t = yes; then
618 echo \&_snd_module_control_$t, >> "$srcdir"/src/control/ctl_symbols_list.c
622 dnl Make a symlink for inclusion of alsa/xxx.h
623 if test ! -L "$srcdir"/include/alsa ; then
624 echo "Making a symlink include/alsa"
625 rm -f "$srcdir"/include/alsa
626 ln -sf . "$srcdir"/include/alsa
629 AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
630 include/Makefile include/sound/Makefile src/Versions src/Makefile \
631 src/control/Makefile src/mixer/Makefile \
632 src/pcm/Makefile src/pcm/scopes/Makefile \
633 src/rawmidi/Makefile src/timer/Makefile \
634 src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
635 src/compat/Makefile src/alisp/Makefile \
636 src/conf/Makefile src/conf/alsa.conf.d/Makefile \
637 src/conf/cards/Makefile \
638 src/conf/pcm/Makefile \
639 modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
640 alsalisp/Makefile aserver/Makefile \
641 test/Makefile test/lsb/Makefile \
642 utils/Makefile utils/alsa-lib.spec utils/alsa.pc)
644 dnl Create asoundlib.h dynamically according to configure options
645 echo "Creating asoundlib.h..."
646 cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
647 test "$build_pcm" = "yes" && echo "#include <alsa/pcm.h>" >> include/asoundlib.h
648 test "$build_rawmidi" = "yes" && echo "#include <alsa/rawmidi.h>" >> include/asoundlib.h
649 test "$build_pcm" = "yes" && echo "#include <alsa/timer.h>" >> include/asoundlib.h
650 test "$build_hwdep" = "yes" && echo "#include <alsa/hwdep.h>" >> include/asoundlib.h
651 echo "#include <alsa/control.h>" >> include/asoundlib.h
652 test "$build_mixer" = "yes" && echo "#include <alsa/mixer.h>" >> include/asoundlib.h
653 test "$build_seq" = "yes" && echo "#include <alsa/seq_event.h>" >> include/asoundlib.h
654 test "$build_seq" = "yes" && echo "#include <alsa/seq.h>" >> include/asoundlib.h
655 test "$build_seq" = "yes" && echo "#include <alsa/seqmid.h>" >> include/asoundlib.h
656 test "$build_seq" = "yes" && echo "#include <alsa/seq_midi_event.h>" >> include/asoundlib.h
657 cat "$srcdir"/include/asoundlib-tail.h >> include/asoundlib.h