dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)
-AC_INIT(alsa-lib, 1.2.15.3)
+AC_PREREQ([2.72])
+AC_INIT([alsa-lib],[1.2.15.3])
AC_CONFIG_SRCDIR([src/control/control.c])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
AC_PROG_LN_S
AC_DISABLE_STATIC
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+_LT_SET_OPTION([LT_INIT],[dlopen])
+LT_INIT
CC_NOUNDEFINED
dnl Checks for header files.
-AC_HEADER_STDC
+AC_CHECK_INCLUDES_DEFAULT
+AC_PROG_EGREP
+
AC_CONFIG_HEADERS(include/config.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+
AC_CHECK_ATTRIBUTE_SYMVER
dnl Checks for library functions.
-AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS([uselocale])
AC_CHECK_FUNCS([eaccess])
AC_CHECK_DECLS([closefrom])
dnl Check for scandir64
AC_MSG_CHECKING(for LFS calls)
-AC_TRY_LINK([#include <dirent.h>],
- [struct dirent64 a; ],
- [have_lfs=yes],
- [have_lfs=no])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <dirent.h>]], [[struct dirent64 a; ]])],[have_lfs=yes],[have_lfs=no])
if test "$have_lfs" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_LFS], 1, [Have LFS])
AC_MSG_RESULT($resmgr)
if test "$resmgr" = "yes"; then
AC_CHECK_LIB(resmgr, rsm_open_device,,
- AC_ERROR([Cannot find libresmgr]))
+ AC_MSG_ERROR(Cannot find libresmgr))
AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
fi
if test "$build_rawmidi" != "yes"; then
if test "$build_seq" = "yes"; then
- AC_ERROR([Cannot enable sequencer without rawmidi])
+ AC_MSG_ERROR(Cannot enable sequencer without rawmidi)
fi
fi
AC_MSG_CHECKING([whether GCC supports builtin atomic intrinsics])
if test -z "$gcc_have_atomics"; then
gcc_have_atomics=no
- AC_TRY_LINK([],
- [int i;
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;
__atomic_load_n(&i, __ATOMIC_SEQ_CST);
__atomic_add_fetch(&i, 0, __ATOMIC_SEQ_CST);
- ],
- [gcc_have_atomics=yes],
- [gcc_have_atomics=no])
+ ]])],[gcc_have_atomics=yes],[gcc_have_atomics=no])
fi
AC_MSG_RESULT($gcc_have_atomics)
dnl check mmx register for pcm_dmix_i386
-AC_TRY_LINK([],
- [__asm__ volatile ("" : : : "mm0");],
- [AC_DEFINE([HAVE_MMX], "1", [MMX technology is enabled])],
- [])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[__asm__ volatile ("" : : : "mm0");]])],[AC_DEFINE([HAVE_MMX], "1", [MMX technology is enabled])],[])
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"
AC_MSG_RESULT([$max_cards])
if test "$max_cards" -lt 1; then
- AC_ERROR([Invalid max cards $max_cards])
+ AC_MSG_ERROR(Invalid max cards $max_cards)
elif test "$max_cards" -gt 256; then
- AC_ERROR([Invalid max cards $max_cards])
+ AC_MSG_ERROR(Invalid max cards $max_cards)
fi
AC_DEFINE_UNQUOTED(SND_MAX_CARDS, $max_cards, [Max number of cards])
test/Makefile test/lsb/Makefile \
utils/Makefile utils/alsa-lib.spec utils/alsa.pc utils/alsa-topology.pc)
-AC_OUTPUT()
+AC_OUTPUT
dnl Create asoundlib.h dynamically according to configure options
echo "Creating asoundlib.h..."