1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(alsamixer/alsamixer.c)
4 AC_PREFIX_DEFAULT(/usr)
5 AM_INIT_AUTOMAKE(alsa-utils, 1.0.4)
7 dnl Checks for programs.
9 dnl try to gues cross-compiler if not set
10 if test "x$target" != "x$host" -a -z "`echo $CC | grep -e '-gcc'`";
12 AC_MSG_CHECKING(for cross-compiler)
14 which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
15 which ${target_cpu}-${target_os}-gcc >/dev/null 2>&1 \
16 && CC=${target_cpu}-${target-os}-gcc
17 which ${target_cpu}-${target_vendor}-${target_os}-gcc >/dev/null 2>&1 \
18 && CC=${target_cpu}-${target_vendor}-${target_os}-gcc
29 AC_ARG_ENABLE(alsamixer,
30 [ --disable-alsamixer Disable alsamixer compilation],
31 [case "${enableval}" in
32 yes) alsamixer=true ;;
33 no) alsamixer=false ;;
34 *) AC_MSG_ERROR(bad value ${enableval} for --enable-alsamixer) ;;
35 esac],[alsamixer=true])
36 AM_CONDITIONAL(ALSAMIXER, test x$alsamixer = xtrue)
38 dnl Checks for header files.
40 if test x$alsamixer = xtrue; then
42 [ --with-curses libname Specify the curses library to use (default=auto)],
45 if test "$curseslib" = "ncursesw"; then
46 AC_CHECK_LIB(ncursesw, initscr,
47 [ CURSESINC='<ncurses.h>'; CURSESLIB='-lncursesw'; curseslib="ncursesw"])
49 if test "$curseslib" = "ncurses" -o "$curseslib" = "auto"; then
50 AC_CHECK_LIB(ncurses, initscr,
51 [ CURSESINC='<ncurses.h>'; CURSESLIB='-lncurses'; curseslib="ncurses"])
53 if test "$curseslib" = "curses" -o "$curseslib" = "auto"; then
54 AC_CHECK_LIB(curses, initscr,
55 [ CURSESINC='<curses.h>'; CURSESLIB='-lcurses'; curseslib="curses"])
57 if test -z "$CURSESINC"; then
58 AC_MSG_ERROR(this packages requires a curses library)
65 AC_ARG_WITH(testsound,
66 [ --with-testsound=file give the path of test sound file for alsaconf],
68 TESTSOUND="/usr/share/sounds/alsa/test.wav")
71 AM_CONFIG_HEADER(include/aconfig.h)
73 dnl Checks for typedefs, structures, and compiler characteristics.
78 dnl Checks for library functions.
79 AC_PROG_GCC_TRADITIONAL
83 AC_OUTPUT(Makefile alsactl/Makefile alsamixer/Makefile amidi/Makefile amixer/Makefile \
84 alsaconf/alsaconf alsaconf/Makefile \
85 aplay/Makefile include/Makefile iecset/Makefile utils/Makefile \
86 utils/alsa-utils.spec seq/Makefile seq/aconnect/Makefile \
87 seq/aplaymidi/Makefile seq/aseqnet/Makefile \
88 speaker-test/Makefile)