Blame configure.ac

Packit 4a16fb
dnl Process this file with autoconf to produce a configure script.
Packit 4a16fb
AC_PREREQ(2.59)
Packit Service f36a15
AC_INIT(alsa-lib, 1.2.3.2)
Packit 4a16fb
Packit 4a16fb
AC_CONFIG_SRCDIR([src/control/control.c])
Packit 4a16fb
AC_CONFIG_MACRO_DIR([m4])
Packit 4a16fb
Packit 4a16fb
dnl *************************************************
Packit 4a16fb
dnl current:revision:age
Packit 4a16fb
dnl change (without API) = c:r+1:a
Packit 4a16fb
dnl change API = c+1:0:a
Packit 4a16fb
dnl add API = c+1:0:a+1
Packit 4a16fb
dnl remove API = c+1:0:0
Packit 4a16fb
dnl *************************************************
Packit 4a16fb
AC_CANONICAL_HOST
Packit 4a16fb
AM_INIT_AUTOMAKE
Packit 4a16fb
eval LIBTOOL_VERSION_INFO="2:0:0"
Packit 4a16fb
dnl *************************************************
Packit 4a16fb
AM_CONDITIONAL([INSTALL_M4], [test -n "${ACLOCAL}"])
Packit 4a16fb
Packit 4a16fb
AM_MAINTAINER_MODE([enable])
Packit 4a16fb
Packit 4a16fb
# Test for new silent rules and enable only if they are available
Packit 4a16fb
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Packit 4a16fb
Packit 4a16fb
AC_PREFIX_DEFAULT(/usr)
Packit 4a16fb
Packit 4a16fb
dnl Checks for programs.
Packit 4a16fb
Packit 4a16fb
AC_PROG_CC
Packit 4a16fb
AC_PROG_CPP
Packit 4a16fb
AC_USE_SYSTEM_EXTENSIONS
Packit 4a16fb
AC_PROG_INSTALL
Packit 4a16fb
AC_PROG_LN_S 
Packit 4a16fb
AC_DISABLE_STATIC
Packit 4a16fb
AC_LIBTOOL_DLOPEN
Packit 4a16fb
AM_PROG_LIBTOOL
Packit 4a16fb
Packit 4a16fb
CC_NOUNDEFINED
Packit 4a16fb
Packit 4a16fb
dnl Checks for header files.
Packit 4a16fb
AC_HEADER_STDC
Packit 4a16fb
AC_CONFIG_HEADERS(include/config.h)
Packit 4a16fb
Packit 4a16fb
dnl Checks for typedefs, structures, and compiler characteristics.
Packit 4a16fb
AC_C_CONST
Packit 4a16fb
AC_C_INLINE
Packit 4a16fb
AC_HEADER_TIME
Packit 4a16fb
Packit 4a16fb
dnl Checks for library functions.
Packit 4a16fb
AC_PROG_GCC_TRADITIONAL
Packit 4a16fb
AC_CHECK_FUNCS([uselocale])
Packit 4a16fb
Packit 4a16fb
SAVE_LIBRARY_VERSION
Packit 4a16fb
AC_SUBST(LIBTOOL_VERSION_INFO)
Packit 4a16fb
Packit 4a16fb
test "x$prefix" = xNONE && prefix=$ac_default_prefix
Packit 4a16fb
Packit 4a16fb
dnl Do not build static and shared libraries together
Packit 4a16fb
if test "$enable_static" = "$enable_shared" -a "$enable_static" = "yes"; then
Packit 4a16fb
cat <
Packit 4a16fb
  Please, do not try to compile static and shared libraries together.
Packit 4a16fb
  See INSTALL file for more details (do not use --enable-shared=yes with
Packit 4a16fb
  --enable-static=yes).
Packit 4a16fb
EOF
Packit 4a16fb
  exit 1
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl ALSA configuration directory
Packit 4a16fb
AC_ARG_WITH(configdir,
Packit 4a16fb
    AS_HELP_STRING([--with-configdir=dir],
Packit 4a16fb
	[path where ALSA config files are stored]),
Packit 4a16fb
    confdir="$withval", confdir="")
Packit 4a16fb
if test -z "$confdir"; then
Packit 4a16fb
    eval dir="$datadir"
Packit 4a16fb
    case "$dir" in
Packit 4a16fb
    /*) ;;
Packit 4a16fb
    *) dir="$prefix/share"
Packit 4a16fb
    esac
Packit 4a16fb
    confdir="$dir/alsa"
Packit 4a16fb
fi
Packit 4a16fb
ALSA_CONFIG_DIR="$confdir"
Packit 4a16fb
AC_DEFINE_UNQUOTED(ALSA_CONFIG_DIR, "$confdir", [directory containing ALSA configuration database])
Packit 4a16fb
AC_SUBST(ALSA_CONFIG_DIR)
Packit 4a16fb
Packit 4a16fb
dnl ALSA plugin directory
Packit 4a16fb
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
Packit 4a16fb
Packit 4a16fb
AC_ARG_WITH(plugindir,
Packit 4a16fb
    AS_HELP_STRING([--with-plugindir=dir],
Packit 4a16fb
	[path where ALSA plugin files are stored]),
Packit 4a16fb
    plugindir="$withval", plugindir="")
Packit 4a16fb
if test -z "$plugindir"; then
Packit 4a16fb
    eval dir="$libdir"
Packit 4a16fb
    case "$dir" in
Packit 4a16fb
    /*) ;;
Packit 4a16fb
    *) dir="$dir"
Packit 4a16fb
    esac
Packit 4a16fb
    plugindir="$dir/$PACKAGE"
Packit 4a16fb
fi
Packit 4a16fb
AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "$plugindir", [directory containing ALSA add-on modules])
Packit 4a16fb
ALSA_PLUGIN_DIR="$plugindir"
Packit 4a16fb
AC_SUBST(ALSA_PLUGIN_DIR)
Packit 4a16fb
Packit 4a16fb
AC_ARG_WITH(pkgconfdir,
Packit 4a16fb
    AS_HELP_STRING([--with-pkgconfdir=dir],
Packit 4a16fb
	[path where pkgconfig files are stored]),
Packit 4a16fb
    pkgconfdir="$withval", pkgconfdir="")
Packit 4a16fb
if test -z "$pkgconfdir"; then
Packit 4a16fb
    eval dir="$libdir"
Packit 4a16fb
    case "$dir" in
Packit 4a16fb
    /*) ;;
Packit 4a16fb
    *) dir="$dir"
Packit 4a16fb
    esac
Packit 4a16fb
    pkgconfdir="$dir/pkgconfig"
Packit 4a16fb
fi
Packit 4a16fb
AC_DEFINE_UNQUOTED(ALSA_PKGCONF_DIR, "$pkgconfdir", [directory containing pkgconfig files])
Packit 4a16fb
ALSA_PKGCONF_DIR="$pkgconfdir"
Packit 4a16fb
AC_SUBST(ALSA_PKGCONF_DIR)
Packit 4a16fb
Packit 4a16fb
dnl Check for versioned symbols
Packit 4a16fb
AC_MSG_CHECKING(for versioned symbols)
Packit 4a16fb
AC_ARG_WITH(versioned,
Packit 4a16fb
  AS_HELP_STRING([--with-versioned],
Packit 4a16fb
    [shared library will be compiled with versioned symbols (default = yes)]),
Packit 4a16fb
  versioned="$withval", versioned="yes")
Packit 4a16fb
if test "$versioned" = "yes"; then
Packit 4a16fb
  # it seems that GNU ld versions since 2.10 are not broken
Packit 4a16fb
  xres=`grep '^VERSION=' ${srcdir}/ltmain.sh | cut -d = -f 2 | cut -d \" -f 2`
Packit 4a16fb
  major=`echo $xres | cut -d . -f 1`
Packit 4a16fb
  minor=`echo $xres | cut -d . -f 2`
Packit 4a16fb
  pass=0
Packit 4a16fb
  if test $major -eq 1 && test $minor -gt 3; then
Packit 4a16fb
    pass=1
Packit 4a16fb
  else
Packit 4a16fb
    if test $major -gt 1; then
Packit 4a16fb
      pass=1
Packit 4a16fb
    fi
Packit 4a16fb
  fi
Packit 4a16fb
  if test $pass -eq 1; then
Packit 4a16fb
    AC_DEFINE(VERSIONED_SYMBOLS,,[compiled with versioned symbols])
Packit 4a16fb
    AC_MSG_RESULT(yes)
Packit 4a16fb
  else
Packit 4a16fb
    AC_MSG_RESULT(broken libtool - use libtool v1.4+; no versions)
Packit 4a16fb
  fi
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
AM_CONDITIONAL([VERSIONED_SYMBOLS], [test x$versioned = xyes])
Packit 4a16fb
Packit 4a16fb
dnl Check for symbolic-functions
Packit 4a16fb
AC_MSG_CHECKING(for symbolic-functions)
Packit 4a16fb
AC_ARG_ENABLE(symbolic-functions,
Packit 4a16fb
  AS_HELP_STRING([--enable-symbolic-functions],
Packit 4a16fb
    [use -Bsymbolic-functions option if available (optmization for size and speed)]),
Packit 4a16fb
  symfuncs="$enableval", symfuncs="no")
Packit 4a16fb
if test "$symfuncs" = "yes"; then
Packit 4a16fb
  if ld --help | grep -q -- '-Bsymbolic-functions'; then
Packit 4a16fb
    AC_MSG_RESULT(yes)
Packit 4a16fb
  else
Packit 4a16fb
    AC_MSG_RESULT(not supported by ld)
Packit 4a16fb
    symfuncs="no"
Packit 4a16fb
  fi
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
AM_CONDITIONAL([SYMBOLIC_FUNCTIONS], [test x"$symfuncs" = xyes])
Packit 4a16fb
Packit 4a16fb
dnl See if toolchain has a custom prefix for symbols ...
Packit 4a16fb
AC_MSG_CHECKING(for custom symbol prefixes)
Packit 4a16fb
SYMBOL_PREFIX=` \
Packit 4a16fb
	echo "PREFIX=__USER_LABEL_PREFIX__" \
Packit 4a16fb
		| ${CPP-${CC-gcc} -E} - 2>&1 \
Packit 4a16fb
		| ${EGREP-grep} "^PREFIX=" \
Packit 4a16fb
		| ${SED-sed} "s:^PREFIX=::"`
Packit 4a16fb
AC_DEFINE_UNQUOTED([__SYMBOL_PREFIX], "$SYMBOL_PREFIX", [Toolchain Symbol Prefix])
Packit 4a16fb
AC_SUBST(SYMBOL_PREFIX)
Packit 4a16fb
AC_MSG_RESULT($SYMBOL_PREFIX)
Packit 4a16fb
Packit 4a16fb
dnl Check for debug...
Packit 4a16fb
AC_MSG_CHECKING(for debug)
Packit 4a16fb
AC_ARG_WITH(debug,
Packit 4a16fb
  AS_HELP_STRING([--with-debug],
Packit 4a16fb
    [library will be compiled with asserts (default = yes)]),
Packit 4a16fb
  debug="$withval", debug="yes")
Packit 4a16fb
if test "$debug" = "yes"; then
Packit 4a16fb
  AC_MSG_RESULT(yes)
Packit 4a16fb
else
Packit 4a16fb
  AC_DEFINE(NDEBUG,,[No assert debug])
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
if test "$debug" = "yes"; then
Packit 4a16fb
  AC_MSG_CHECKING(for debug assert)
Packit 4a16fb
  AC_ARG_ENABLE(debug-assert,
Packit 4a16fb
    AS_HELP_STRING([--enable-debug],
Packit 4a16fb
      [enable assert call at the default error message handler]),
Packit 4a16fb
    debug_assert="$enableval", debug_assert="no")
Packit 4a16fb
  if test "$debug_assert" = "yes"; then
Packit 4a16fb
    AC_MSG_RESULT(yes)
Packit 4a16fb
    AC_DEFINE(ALSA_DEBUG_ASSERT,,[Enable assert at error message handler])
Packit 4a16fb
  else
Packit 4a16fb
    AC_MSG_RESULT(no)
Packit 4a16fb
  fi
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Temporary directory
Packit 4a16fb
AC_MSG_CHECKING(for tmpdir)
Packit 4a16fb
AC_ARG_WITH(tmpdir,
Packit 4a16fb
  AS_HELP_STRING([--with-tmpdir=directory],
Packit 4a16fb
    [directory to put tmp socket files (/tmp)]),
Packit 4a16fb
  tmpdir="$withval", tmpdir="/tmp")
Packit 4a16fb
AC_MSG_RESULT($tmpdir)
Packit 4a16fb
AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [directory to put tmp socket files])
Packit 4a16fb
Packit 4a16fb
dnl Check for softfloat...
Packit 4a16fb
AC_MSG_CHECKING(for softfloat)
Packit 4a16fb
AC_ARG_WITH(softfloat,
Packit 4a16fb
  AS_HELP_STRING([--with-softfloat],
Packit 4a16fb
    [do you have floating point unit on this machine? (optional)]),
Packit 4a16fb
  [case "$withval" in
Packit 4a16fb
	y|yes) softfloat=yes ;;
Packit 4a16fb
	*) softfloat=no ;;
Packit 4a16fb
   esac],)
Packit 4a16fb
if test "$softfloat" = "yes" ; then
Packit 4a16fb
  AC_DEFINE(HAVE_SOFT_FLOAT, "1", [Avoid calculation in float])
Packit 4a16fb
  AC_MSG_RESULT(yes)
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
ALSA_DEPLIBS=""
Packit 4a16fb
if test "$softfloat" != "yes"; then
Packit 4a16fb
  ALSA_DEPLIBS="-lm"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Check for libdl
Packit 4a16fb
AC_MSG_CHECKING(for libdl)
Packit 4a16fb
AC_ARG_WITH(libdl,
Packit 4a16fb
  AS_HELP_STRING([--with-libdl], [Use libdl for plugins (default = yes)]),
Packit 4a16fb
  [ have_libdl="$withval" ], [ have_libdl="yes" ])
Packit 4a16fb
HAVE_LIBDL=
Packit 4a16fb
if test "$have_libdl" = "yes"; then
Packit 4a16fb
  AC_CHECK_LIB([dl], [dlsym], [HAVE_LIBDL="yes"])
Packit 4a16fb
  if test "$HAVE_LIBDL" = "yes" ; then
Packit 4a16fb
    ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
Packit 4a16fb
    AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
Packit 4a16fb
  fi
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
AM_CONDITIONAL([BUILD_MODULES], [test "$HAVE_LIBDL" = "yes"])
Packit 4a16fb
Packit 4a16fb
dnl Check for pthread
Packit 4a16fb
AC_MSG_CHECKING(for pthread)
Packit 4a16fb
AC_ARG_WITH(pthread,
Packit 4a16fb
  AS_HELP_STRING([--with-pthread], [Use pthread (default = yes)]),
Packit 4a16fb
  [ have_pthread="$withval" ], [ have_pthread="yes" ])
Packit 4a16fb
if test "$have_pthread" = "yes"; then
Packit 4a16fb
  AC_CHECK_LIB([pthread], [pthread_join], [HAVE_LIBPTHREAD="yes"])
Packit 4a16fb
  if test "$HAVE_LIBPTHREAD" = "yes"; then
Packit 4a16fb
    ALSA_DEPLIBS="$ALSA_DEPLIBS -lpthread"
Packit 4a16fb
    AC_DEFINE([HAVE_LIBPTHREAD], 1, [Have libpthread])
Packit 4a16fb
  fi
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Check for pthread
Packit 4a16fb
if test "$HAVE_LIBPTHREAD" = "yes"; then
Packit 4a16fb
  AC_CHECK_DECL(PTHREAD_MUTEX_RECURSIVE,
Packit 4a16fb
    AC_DEFINE(HAVE_PTHREAD_MUTEX_RECURSIVE, [],
Packit 4a16fb
      [Define if your pthreads implementation have PTHREAD_MUTEX_RECURSIVE]),
Packit 4a16fb
    ,
Packit 4a16fb
    [#include <pthread.h>])
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Check for __thread
Packit 4a16fb
AC_MSG_CHECKING([for __thread])
Packit 4a16fb
AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))
Packit 4a16fb
#error gcc has this bug: http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html
Packit 4a16fb
#endif], [static __thread int p = 0])],
Packit 4a16fb
[AC_DEFINE(HAVE___THREAD, 1,
Packit 4a16fb
Define to 1 if compiler supports __thread)
Packit 4a16fb
AC_MSG_RESULT([yes])],
Packit 4a16fb
[AC_MSG_RESULT([no])])
Packit 4a16fb
Packit 4a16fb
dnl Check for librt
Packit 4a16fb
AC_MSG_CHECKING(for librt)
Packit 4a16fb
AC_ARG_WITH(librt,
Packit 4a16fb
  AS_HELP_STRING([--with-librt], [Use librt for monotonic clock (default = yes)]),
Packit 4a16fb
  [ have_librt="$withval" ], [ have_librt="yes" ])
Packit 4a16fb
if test "$have_librt" = "yes"; then
Packit 4a16fb
  AC_CHECK_LIB([rt], [clock_gettime], [HAVE_LIBRT="yes"])
Packit 4a16fb
  if test "$HAVE_LIBRT" = "yes" ; then
Packit 4a16fb
    ALSA_DEPLIBS="$ALSA_DEPLIBS -lrt"
Packit 4a16fb
    AC_DEFINE([HAVE_LIBRT], 1, [Have librt])
Packit 4a16fb
    AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Have clock gettime])
Packit 4a16fb
  fi
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
AC_SUBST(ALSA_DEPLIBS)
Packit 4a16fb
Packit 4a16fb
dnl Check for use of wordexp...
Packit 4a16fb
AC_MSG_CHECKING(for use of wordexp)
Packit 4a16fb
AC_ARG_WITH(wordexp,
Packit 4a16fb
  AS_HELP_STRING([--with-wordexp],
Packit 4a16fb
    [Use wordexp when expanding configs (default = no)]),
Packit 4a16fb
  [case "$withval" in
Packit 4a16fb
	y|yes) wordexp=yes ;;
Packit 4a16fb
	*) wordexp=no ;;
Packit 4a16fb
   esac],)
Packit 4a16fb
if test "$wordexp" = "yes" ; then
Packit 4a16fb
  AC_DEFINE(HAVE_WORDEXP, "1", [Enable use of wordexp])
Packit 4a16fb
  AC_MSG_RESULT(yes)
Packit 4a16fb
  AC_CHECK_HEADER([wordexp.h],[], [AC_MSG_ERROR([Couldn't find wordexp.h])])
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Check for headers
Packit 4a16fb
AC_CHECK_HEADERS([endian.h sys/endian.h sys/shm.h])
Packit 4a16fb
Packit 4a16fb
dnl Check for resmgr support...
Packit 4a16fb
AC_MSG_CHECKING(for resmgr support)
Packit 4a16fb
AC_ARG_ENABLE(resmgr,
Packit 4a16fb
  AS_HELP_STRING([--enable-resmgr], [support resmgr (optional)]),
Packit 4a16fb
  resmgr="$enableval", resmgr="no")
Packit 4a16fb
AC_MSG_RESULT($resmgr)
Packit 4a16fb
if test "$resmgr" = "yes"; then
Packit 4a16fb
  AC_CHECK_LIB(resmgr, rsm_open_device,,
Packit 4a16fb
    AC_ERROR([Cannot find libresmgr]))
Packit 4a16fb
  AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Check for aload* support...
Packit 4a16fb
AC_MSG_CHECKING(for aload* support)
Packit 4a16fb
AC_ARG_ENABLE(aload,
Packit 4a16fb
  AS_HELP_STRING([--disable-aload], [disable reading /dev/aload*]),
Packit 4a16fb
  aload="$enableval", aload="yes")
Packit 4a16fb
AC_MSG_RESULT($aload)
Packit 4a16fb
if test "$aload" = "yes"; then
Packit 4a16fb
  AC_DEFINE(SUPPORT_ALOAD, "1", [Support /dev/aload* access for auto-loading])
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Check for non-standard /dev directory
Packit 4a16fb
AC_MSG_CHECKING([for ALSA device file directory])
Packit 4a16fb
AC_ARG_WITH(alsa-devdir,
Packit 4a16fb
  AS_HELP_STRING([--with-alsa-devdir=dir],
Packit 4a16fb
    [directory with ALSA device files (default /dev/snd)]),
Packit 4a16fb
  [alsa_dev_dir="$withval"],
Packit 4a16fb
  [alsa_dev_dir="/dev/snd"])
Packit 4a16fb
dnl make sure it has a trailing slash
Packit 4a16fb
if echo "$alsa_dev_dir" | grep -v '/$' > /dev/null; then
Packit 4a16fb
  alsa_dev_dir="$alsa_dev_dir/"
Packit 4a16fb
fi
Packit 4a16fb
AC_DEFINE_UNQUOTED(ALSA_DEVICE_DIRECTORY, "$alsa_dev_dir", [Directory with ALSA device files])
Packit 4a16fb
AC_MSG_RESULT([$alsa_dev_dir])
Packit 4a16fb
Packit 4a16fb
AC_MSG_CHECKING([for aload* device file directory])
Packit 4a16fb
AC_ARG_WITH(aload-devdir,
Packit 4a16fb
  AS_HELP_STRING([--with-aload-devdir=dir],
Packit 4a16fb
    [directory with aload* device files (default /dev)]),
Packit 4a16fb
  [aload_dev_dir="$withval"],
Packit 4a16fb
  [aload_dev_dir="/dev"])
Packit 4a16fb
if echo "$aload_dev_dir" | grep -v '/$' > /dev/null; then
Packit 4a16fb
  aload_dev_dir="$aload_dev_dir/"
Packit 4a16fb
fi
Packit 4a16fb
AC_DEFINE_UNQUOTED(ALOAD_DEVICE_DIRECTORY, "$aload_dev_dir", [Directory with aload* device files])
Packit 4a16fb
AC_MSG_RESULT([$aload_dev_dir])
Packit 4a16fb
Packit 4a16fb
dnl Build conditions
Packit 4a16fb
AC_ARG_ENABLE(mixer,
Packit 4a16fb
  AS_HELP_STRING([--disable-mixer], [disable the mixer component]),
Packit 4a16fb
  [build_mixer="$enableval"], [build_mixer="yes"])
Packit 4a16fb
AC_ARG_ENABLE(pcm,
Packit 4a16fb
  AS_HELP_STRING([--disable-pcm], [disable the PCM component]),
Packit 4a16fb
  [build_pcm="$enableval"], [build_pcm="yes"])
Packit 4a16fb
AC_ARG_ENABLE(rawmidi,
Packit 4a16fb
  AS_HELP_STRING([--disable-rawmidi], [disable the raw MIDI component]),
Packit 4a16fb
  [build_rawmidi="$enableval"], [build_rawmidi="yes"])
Packit 4a16fb
AC_ARG_ENABLE(hwdep,
Packit 4a16fb
  AS_HELP_STRING([--disable-hwdep], [disable the hwdep component]),
Packit 4a16fb
  [build_hwdep="$enableval"], [build_hwdep="yes"])
Packit 4a16fb
AC_ARG_ENABLE(seq,
Packit 4a16fb
  AS_HELP_STRING([--disable-seq], [disable the sequencer component]),
Packit 4a16fb
  [build_seq="$enableval"], [build_seq="yes"])
Packit 4a16fb
AC_ARG_ENABLE(ucm,
Packit 4a16fb
  AS_HELP_STRING([--disable-ucm], [disable the use-case-manager component]),
Packit 4a16fb
  [build_ucm="$enableval"], [build_ucm="yes"])
Packit 4a16fb
AC_ARG_ENABLE(topology,
Packit 4a16fb
  AS_HELP_STRING([--disable-topology], [disable the DSP topology component]),
Packit 4a16fb
  [build_topology="$enableval"], [build_topology="yes"])
Packit 4a16fb
AC_ARG_ENABLE(alisp,
Packit 4a16fb
  AS_HELP_STRING([--enable-alisp], [enable the alisp component]),
Packit 4a16fb
  [build_alisp="$enableval"], [build_alisp="no"])
Packit 4a16fb
test "$softfloat" = "yes" && build_alisp="no"
Packit 4a16fb
AC_ARG_ENABLE(old-symbols,
Packit 4a16fb
  AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
Packit 4a16fb
  [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
Packit 4a16fb
AM_CONDITIONAL([KEEP_OLD_SYMBOLS], [test x$keep_old_symbols = xyes])
Packit 4a16fb
Packit 4a16fb
AC_ARG_ENABLE(mixer-modules,
Packit 4a16fb
  AS_HELP_STRING([--enable-mixer-modules], [enable the additional mixer modules (experimental)]),
Packit 4a16fb
  [build_mixer_modules="$enableval"], [build_mixer_modules="no"])
Packit 4a16fb
Packit 4a16fb
AC_ARG_ENABLE(mixer-pymods,
Packit 4a16fb
  AS_HELP_STRING([--enable-mixer-pymods], [enable the mixer python modules (experimental)]),
Packit 4a16fb
  [build_mixer_pymodules="$enableval"], [build_mixer_pymodules="no"])
Packit 4a16fb
Packit 4a16fb
AC_ARG_ENABLE(python,
Packit 4a16fb
  AS_HELP_STRING([--disable-python], [disable the python components]),
Packit 4a16fb
  [build_python="$enableval"], [build_python="yes"])
Packit 4a16fb
Packit 4a16fb
AC_ARG_ENABLE(python2,
Packit 4a16fb
  AS_HELP_STRING([--enable-python2], [prefer python2]),
Packit 4a16fb
  [build_python2="$enableval"], [build_python2="no"])
Packit 4a16fb
PYTHON_LIBS=""
Packit 4a16fb
PYTHON_INCLUDES=""
Packit 4a16fb
if test "$build_python" = "yes" -a "$build_mixer_pymodules" = "yes"; then
Packit 4a16fb
  pythonlibs0=
Packit 4a16fb
  pythoninc0=
Packit 4a16fb
  if test "$build_python2" != "yes"; then
Packit Service f36a15
    pythonlibs0=$(python3-config --libs --embed 2> /dev/null)
Packit Service f36a15
    if test -z "$pythonlibs0"; then
Packit Service f36a15
      pythonlibs0=$(python3-config --libs)
Packit Service f36a15
    fi
Packit 4a16fb
    pythoninc0=$(python3-config --includes)
Packit 4a16fb
  fi
Packit 4a16fb
  if test -z "$pythonlibs0"; then
Packit 4a16fb
    pythonlibs0=$(python-config --libs)
Packit 4a16fb
    pythoninc0=$(python-config --includes)
Packit 4a16fb
  fi
Packit 4a16fb
  AC_ARG_WITH(pythonlibs,
Packit 4a16fb
    AS_HELP_STRING([--with-pythonlibs=ldflags],
Packit 4a16fb
      [specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
Packit 4a16fb
    pythonlibs="$withval", pythonlibs=$pythonlibs0)
Packit 4a16fb
  AC_ARG_WITH(pythonincludes,
Packit 4a16fb
    AS_HELP_STRING([--with-pythonincludes=Cflags],
Packit 4a16fb
      [specify python C header files (-I/usr/include/python)]),
Packit 4a16fb
    pythonincludes="$withval", pythonincludes=$pythoninc0)
Packit 4a16fb
  if test -z "$pythonlibs"; then
Packit 4a16fb
    echo "Unable to determine python libraries! Probably python-config is not"
Packit 4a16fb
    echo "available on this system. Please, use --with-pythonlibs and"
Packit 4a16fb
    echo "--with-pythonincludes options. Python components are disabled in this build."
Packit 4a16fb
    build_python="no"
Packit 4a16fb
  else
Packit 4a16fb
    PYTHON_LIBS="$pythonlibs"
Packit 4a16fb
    PYTHON_INCLUDES="$pythonincludes"
Packit 4a16fb
  fi
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_python" != "yes"; then
Packit 4a16fb
  build_mixer_pymodules=
Packit 4a16fb
fi
Packit 4a16fb
AC_SUBST(PYTHON_LIBS)
Packit 4a16fb
AC_SUBST(PYTHON_INCLUDES)
Packit 4a16fb
Packit 4a16fb
AM_CONDITIONAL([BUILD_MIXER], [test x$build_mixer = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM], [test x$build_pcm = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_RAWMIDI], [test x$build_rawmidi = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_HWDEP], [test x$build_hwdep = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_SEQ], [test x$build_seq = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_TOPOLOGY], [test x$build_topology = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_ALISP], [test x$build_alisp = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_MIXER_MODULES], [test x$build_mixer_modules = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_MIXER_PYMODULES], [test x$build_mixer_pymodules = xyes])
Packit 4a16fb
Packit 4a16fb
if test "$build_mixer" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_pcm" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM], "1", [Build PCM component])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_rawmidi" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_RAWMIDI], "1", [Build raw MIDI component])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_hwdep" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_HWDEP], "1", [Build hwdep component])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_seq" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_ucm" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_UCM], "1", [Build UCM component])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_topology" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_TOPOLOGY], "1", [Build DSP Topology component])
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl PCM Plugins
Packit 4a16fb
Packit 4a16fb
if test "$build_pcm" = "yes"; then
Packit 4a16fb
AC_ARG_WITH(pcm-plugins,
Packit 4a16fb
  AS_HELP_STRING([--with-pcm-plugins=<list>],
Packit 4a16fb
    [build PCM plugins (default = all)]),
Packit 4a16fb
  [pcm_plugins="$withval"], [pcm_plugins="all"])
Packit 4a16fb
else
Packit 4a16fb
pcm_plugins=""
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl check atomics for pcm_meter
Packit 4a16fb
Packit 4a16fb
AC_MSG_CHECKING([whether GCC supports builtin atomic intrinsics])
Packit 4a16fb
if test -z "$gcc_have_atomics"; then
Packit 4a16fb
  gcc_have_atomics=no
Packit 4a16fb
  AC_TRY_LINK([],
Packit 4a16fb
    [int i;
Packit 4a16fb
     __atomic_load_n(&i, __ATOMIC_SEQ_CST);
Packit 4a16fb
     __atomic_add_fetch(&i, 0, __ATOMIC_SEQ_CST);
Packit 4a16fb
    ],
Packit 4a16fb
    [gcc_have_atomics=yes],
Packit 4a16fb
    [gcc_have_atomics=no])
Packit 4a16fb
fi
Packit 4a16fb
AC_MSG_RESULT($gcc_have_atomics)
Packit 4a16fb
Packit Service f36a15
dnl check mmx register for pcm_dmix_i386
Packit Service f36a15
Packit Service f36a15
AC_TRY_LINK([],
Packit Service f36a15
    [__asm__ volatile ("" : : : "mm0");],
Packit Service f36a15
    [AC_DEFINE([HAVE_MMX], "1", [MMX technology is enabled])],
Packit Service f36a15
    [])
Packit Service f36a15
Packit 4a16fb
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"
Packit 4a16fb
Packit 4a16fb
build_pcm_plugin="no"
Packit 4a16fb
for t in $PCM_PLUGIN_LIST; do
Packit 4a16fb
  eval build_pcm_$t="no"
Packit 4a16fb
done
Packit 4a16fb
Packit 4a16fb
pcm_plugins=`echo $pcm_plugins | sed 's/,/ /g'`
Packit 4a16fb
for p in $pcm_plugins; do
Packit 4a16fb
  for t in $PCM_PLUGIN_LIST; do
Packit 4a16fb
    if test "$p" = "$t" -o "$p" = "all"; then
Packit 4a16fb
      eval build_pcm_$t="yes"
Packit 4a16fb
      build_pcm_plugin="yes"
Packit 4a16fb
    fi
Packit 4a16fb
  done
Packit 4a16fb
done
Packit 4a16fb
Packit 4a16fb
dnl special dependencies
Packit 4a16fb
if test "$build_pcm_plug" = "yes"; then
Packit 4a16fb
  build_pcm_linear="yes"
Packit 4a16fb
  build_pcm_copy="yes"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
if test "$build_pcm_ioplug" = "yes"; then
Packit 4a16fb
  build_pcm_extplug="yes"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
if test "$HAVE_LIBDL" != "yes"; then
Packit 4a16fb
  build_pcm_meter="no"
Packit 4a16fb
  build_pcm_ladspa="no"
Packit 4a16fb
  build_pcm_pcm_ioplug="no"
Packit 4a16fb
  build_pcm_pcm_extplug="no"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
if test "$HAVE_LIBPTHREAD" != "yes"; then
Packit 4a16fb
  build_pcm_share="no"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
if test "$softfloat" = "yes"; then
Packit 4a16fb
  build_pcm_lfloat="no"
Packit 4a16fb
  build_pcm_ladspa="no"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
if test "$gcc_have_atomics" != "yes"; then
Packit 4a16fb
  build_pcm_meter="no"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
if test "$ac_cv_header_sys_shm_h" != "yes"; then
Packit 4a16fb
  build_pcm_dmix="no"
Packit 4a16fb
  build_pcm_dshare="no"
Packit 4a16fb
  build_pcm_dsnoop="no"
Packit 4a16fb
  build_pcm_shm="no"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN], [test x$build_pcm_plugin = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_COPY], [test x$build_pcm_copy = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_LINEAR], [test x$build_pcm_linear = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_ROUTE], [test x$build_pcm_route = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_MULAW], [test x$build_pcm_mulaw = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_ALAW], [test x$build_pcm_alaw = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_ADPCM], [test x$build_pcm_adpcm = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_RATE], [test x$build_pcm_rate = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_PLUG], [test x$build_pcm_plug = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_MULTI], [test x$build_pcm_multi = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_SHM], [test x$build_pcm_shm = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_FILE], [test x$build_pcm_file = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_NULL], [test x$build_pcm_null = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_EMPTY], [test x$build_pcm_empty = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_SHARE], [test x$build_pcm_share = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_METER], [test x$build_pcm_meter = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_HOOKS], [test x$build_pcm_hooks = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_LFLOAT], [test x$build_pcm_lfloat = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_LADSPA], [test x$build_pcm_ladspa = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_DMIX], [test x$build_pcm_dmix = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_DSHARE], [test x$build_pcm_dshare = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_DSNOOP], [test x$build_pcm_dsnoop = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_ASYM], [test x$build_pcm_asym = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_IEC958], [test x$build_pcm_iec958 = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_SOFTVOL], [test x$build_pcm_softvol = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTPLUG], [test x$build_pcm_extplug = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_IOPLUG], [test x$build_pcm_ioplug = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_PCM_PLUGIN_MMAP_EMUL], [test x$build_pcm_mmap_emul = xyes])
Packit 4a16fb
Packit 4a16fb
dnl Defines for plug plugin
Packit 4a16fb
if test "$build_pcm_rate" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM_PLUGIN_RATE], "1", [Build PCM rate plugin])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_pcm_route" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM_PLUGIN_ROUTE], "1", [Build PCM route plugin])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_pcm_lfloat" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM_PLUGIN_LFLOAT], "1", [Build PCM lfloat plugin])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_pcm_adpcm" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM_PLUGIN_ADPCM], "1", [Build PCM adpcm plugin])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_pcm_mulaw" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM_PLUGIN_MULAW], "1", [Build PCM mulaw plugin])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_pcm_alaw" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM_PLUGIN_ALAW], "1", [Build PCM alaw plugin])
Packit 4a16fb
fi
Packit 4a16fb
if test "$build_pcm_mmap_emul" = "yes"; then
Packit 4a16fb
  AC_DEFINE([BUILD_PCM_PLUGIN_MMAP_EMUL], "1", [Build PCM mmap-emul plugin])
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
Packit 4a16fb
dnl Create PCM plugin symbol list for static library
Packit 4a16fb
rm -f "$srcdir"/src/pcm/pcm_symbols_list.c
Packit 4a16fb
touch "$srcdir"/src/pcm/pcm_symbols_list.c
Packit 4a16fb
for t in $PCM_PLUGIN_LIST; do
Packit 4a16fb
  if eval test \$build_pcm_$t = yes; then
Packit 4a16fb
    echo \&_snd_module_pcm_$t, >> "$srcdir"/src/pcm/pcm_symbols_list.c
Packit 4a16fb
  fi
Packit 4a16fb
done
Packit 4a16fb
Packit 4a16fb
dnl Control Plugins
Packit 4a16fb
Packit 4a16fb
AC_ARG_WITH(ctl-plugins,
Packit 4a16fb
  AS_HELP_STRING([--with-ctl-plugins=<list>],
Packit 4a16fb
    [build control plugins (default = all)]),
Packit 4a16fb
  [ctl_plugins="$withval"], [ctl_plugins="all"])
Packit 4a16fb
Packit 4a16fb
CTL_PLUGIN_LIST="shm ext"
Packit 4a16fb
Packit 4a16fb
build_ctl_plugin="no"
Packit 4a16fb
for t in $CTL_PLUGIN_LIST; do
Packit 4a16fb
  eval build_ctl_$t="no"
Packit 4a16fb
done
Packit 4a16fb
Packit 4a16fb
ctl_plugins=`echo $ctl_plugins | sed 's/,/ /g'`
Packit 4a16fb
for p in $ctl_plugins; do
Packit 4a16fb
  for t in $CTL_PLUGIN_LIST; do
Packit 4a16fb
    if test "$p" = "$t" -o "$p" = "all"; then
Packit 4a16fb
      eval build_ctl_$t="yes"
Packit 4a16fb
      build_ctl_plugin="yes"
Packit 4a16fb
    fi
Packit 4a16fb
  done
Packit 4a16fb
done
Packit 4a16fb
Packit 4a16fb
if test "$ac_cv_header_sys_shm_h" != "yes"; then
Packit 4a16fb
  build_ctl_shm="no"
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
AM_CONDITIONAL([BUILD_CTL_PLUGIN], [test x$build_ctl_plugin = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_CTL_PLUGIN_SHM], [test x$build_ctl_shm = xyes])
Packit 4a16fb
AM_CONDITIONAL([BUILD_CTL_PLUGIN_EXT], [test x$build_ctl_ext = xyes])
Packit 4a16fb
Packit 4a16fb
dnl Create ctl plugin symbol list for static library
Packit 4a16fb
rm -f "$srcdir"/src/control/ctl_symbols_list.c
Packit 4a16fb
touch "$srcdir"/src/control/ctl_symbols_list.c
Packit 4a16fb
for t in $CTL_PLUGIN_LIST; do
Packit 4a16fb
  if eval test \$build_ctl_$t = yes; then
Packit 4a16fb
    echo \&_snd_module_control_$t, >> "$srcdir"/src/control/ctl_symbols_list.c
Packit 4a16fb
  fi
Packit 4a16fb
done
Packit 4a16fb
Packit 4a16fb
dnl Max number of cards
Packit 4a16fb
AC_MSG_CHECKING(for max number of cards)
Packit 4a16fb
AC_ARG_WITH(max-cards,
Packit 4a16fb
  AS_HELP_STRING([--with-max-cards], [Specify the max number of cards (default = 32)]),
Packit 4a16fb
  [ max_cards="$withval" ], [ max_cards="32" ])
Packit 4a16fb
AC_MSG_RESULT([$max_cards])
Packit 4a16fb
Packit 4a16fb
if test "$max_cards" -lt 1; then
Packit 4a16fb
   AC_ERROR([Invalid max cards $max_cards])
Packit 4a16fb
elif test "$max_cards" -gt 256; then
Packit 4a16fb
   AC_ERROR([Invalid max cards $max_cards])
Packit 4a16fb
fi
Packit 4a16fb
AC_DEFINE_UNQUOTED(SND_MAX_CARDS, $max_cards, [Max number of cards])
Packit 4a16fb
Packit 4a16fb
dnl Check for thread-safe API functions
Packit 4a16fb
if test "$HAVE_LIBPTHREAD" = "yes"; then
Packit 4a16fb
AC_MSG_CHECKING(for thread-safe API functions)
Packit 4a16fb
AC_ARG_ENABLE(thread-safety,
Packit 4a16fb
  AS_HELP_STRING([--disable-thread-safety],
Packit 4a16fb
    [disable thread-safe API functions]),
Packit 4a16fb
  threadsafe="$enableval", threadsafe="yes")
Packit 4a16fb
if test "$threadsafe" = "yes"; then
Packit 4a16fb
  AC_MSG_RESULT(yes)
Packit 4a16fb
  AC_DEFINE([THREAD_SAFE_API], "1", [Disable thread-safe API functions])
Packit 4a16fb
else
Packit 4a16fb
  AC_MSG_RESULT(no)
Packit 4a16fb
fi
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
dnl Make a symlink for inclusion of alsa/xxx.h
Packit 4a16fb
if test ! -L "$srcdir"/include/alsa ; then
Packit 4a16fb
  echo "Making a symlink include/alsa"
Packit 4a16fb
  rm -f "$srcdir"/include/alsa
Packit 4a16fb
  ln -sf . "$srcdir"/include/alsa
Packit 4a16fb
fi
Packit 4a16fb
Packit 4a16fb
AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
Packit Service f36a15
	  include/Makefile include/sound/Makefile include/sound/uapi/Makefile \
Packit Service f36a15
	  src/Versions src/Makefile \
Packit 4a16fb
          src/control/Makefile src/mixer/Makefile \
Packit 4a16fb
	  src/pcm/Makefile src/pcm/scopes/Makefile \
Packit 4a16fb
	  src/rawmidi/Makefile src/timer/Makefile \
Packit 4a16fb
          src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
Packit 4a16fb
          src/alisp/Makefile src/topology/Makefile \
Packit 4a16fb
	  src/conf/Makefile \
Packit 4a16fb
	  src/conf/cards/Makefile \
Packit 4a16fb
	  src/conf/pcm/Makefile \
Packit 4a16fb
	  modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
Packit 4a16fb
	  alsalisp/Makefile aserver/Makefile \
Packit 4a16fb
	  test/Makefile test/lsb/Makefile \
Packit 4a16fb
	  utils/Makefile utils/alsa-lib.spec utils/alsa.pc utils/alsa-topology.pc)
Packit 4a16fb
Packit 4a16fb
dnl Create asoundlib.h dynamically according to configure options
Packit 4a16fb
echo "Creating asoundlib.h..."
Packit 4a16fb
cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
Packit 4a16fb
test "$ac_cv_header_endian_h" = "yes" && echo "#include <endian.h>" >> include/asoundlib.h
Packit 4a16fb
if test "$ac_cv_header_sys_endian_h" = "yes"; then
Packit 4a16fb
cat >> include/asoundlib.h <
Packit 4a16fb
#include <sys/endian.h>
Packit 4a16fb
#ifndef __BYTE_ORDER
Packit 4a16fb
#define __BYTE_ORDER BYTE_ORDER
Packit 4a16fb
#endif
Packit 4a16fb
#ifndef __LITTLE_ENDIAN
Packit 4a16fb
#define __LITTLE_ENDIAN LITTLE_ENDIAN
Packit 4a16fb
#endif
Packit 4a16fb
#ifndef __BIG_ENDIAN
Packit 4a16fb
#define __BIG_ENDIAN BIG_ENDIAN
Packit 4a16fb
#endif
Packit 4a16fb
EOF
Packit 4a16fb
fi
Packit 4a16fb
cat >> include/asoundlib.h <
Packit 4a16fb
Packit 4a16fb
#ifndef __GNUC__
Packit 4a16fb
#define __inline__ inline
Packit 4a16fb
#endif
Packit 4a16fb
Packit 4a16fb
#include <alsa/asoundef.h>
Packit 4a16fb
#include <alsa/version.h>
Packit 4a16fb
#include <alsa/global.h>
Packit 4a16fb
#include <alsa/input.h>
Packit 4a16fb
#include <alsa/output.h>
Packit 4a16fb
#include <alsa/error.h>
Packit 4a16fb
#include <alsa/conf.h>
Packit 4a16fb
EOF
Packit 4a16fb
test "$build_pcm" = "yes" && echo "#include <alsa/pcm.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_rawmidi" = "yes" && echo "#include <alsa/rawmidi.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_pcm" = "yes" && echo "#include <alsa/timer.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_hwdep" = "yes" && echo "#include <alsa/hwdep.h>" >> include/asoundlib.h
Packit 4a16fb
echo "#include <alsa/control.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_mixer" = "yes" && echo "#include <alsa/mixer.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_seq" = "yes" && echo "#include <alsa/seq_event.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_seq" = "yes" && echo "#include <alsa/seq.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_seq" = "yes" && echo "#include <alsa/seqmid.h>" >> include/asoundlib.h
Packit 4a16fb
test "$build_seq" = "yes" && echo "#include <alsa/seq_midi_event.h>" >> include/asoundlib.h
Packit 4a16fb
cat "$srcdir"/include/asoundlib-tail.h >> include/asoundlib.h