Skip to content

Commit f7779c2

Browse files
committed
configure: update to autoconf v2.72
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent 29aa1a2 commit f7779c2

1 file changed

Lines changed: 18 additions & 25 deletions

File tree

configure.ac

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
AC_PREREQ(2.59)
3-
AC_INIT(alsa-lib, 1.2.15.3)
2+
AC_PREREQ([2.72])
3+
AC_INIT([alsa-lib],[1.2.15.3])
44

55
AC_CONFIG_SRCDIR([src/control/control.c])
66
AC_CONFIG_MACRO_DIR([m4])
@@ -33,23 +33,25 @@ AC_USE_SYSTEM_EXTENSIONS
3333
AC_PROG_INSTALL
3434
AC_PROG_LN_S
3535
AC_DISABLE_STATIC
36-
AC_LIBTOOL_DLOPEN
37-
AM_PROG_LIBTOOL
36+
_LT_SET_OPTION([LT_INIT],[dlopen])
37+
LT_INIT
3838

3939
CC_NOUNDEFINED
4040

4141
dnl Checks for header files.
42-
AC_HEADER_STDC
42+
AC_CHECK_INCLUDES_DEFAULT
43+
AC_PROG_EGREP
44+
4345
AC_CONFIG_HEADERS(include/config.h)
4446

4547
dnl Checks for typedefs, structures, and compiler characteristics.
4648
AC_C_CONST
4749
AC_C_INLINE
48-
AC_HEADER_TIME
50+
AC_CHECK_HEADERS_ONCE([sys/time.h])
51+
4952
AC_CHECK_ATTRIBUTE_SYMVER
5053

5154
dnl Checks for library functions.
52-
AC_PROG_GCC_TRADITIONAL
5355
AC_CHECK_FUNCS([uselocale])
5456
AC_CHECK_FUNCS([eaccess])
5557
AC_CHECK_DECLS([closefrom])
@@ -251,10 +253,7 @@ fi
251253

252254
dnl Check for scandir64
253255
AC_MSG_CHECKING(for LFS calls)
254-
AC_TRY_LINK([#include <dirent.h>],
255-
[struct dirent64 a; ],
256-
[have_lfs=yes],
257-
[have_lfs=no])
256+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <dirent.h>]], [[struct dirent64 a; ]])],[have_lfs=yes],[have_lfs=no])
258257
if test "$have_lfs" = "yes"; then
259258
AC_MSG_RESULT(yes)
260259
AC_DEFINE([HAVE_LFS], 1, [Have LFS])
@@ -358,7 +357,7 @@ AC_ARG_ENABLE(resmgr,
358357
AC_MSG_RESULT($resmgr)
359358
if test "$resmgr" = "yes"; then
360359
AC_CHECK_LIB(resmgr, rsm_open_device,,
361-
AC_ERROR([Cannot find libresmgr]))
360+
AC_MSG_ERROR(Cannot find libresmgr))
362361
AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
363362
fi
364363

@@ -482,7 +481,7 @@ AC_SUBST(PYTHON_INCLUDES)
482481

483482
if test "$build_rawmidi" != "yes"; then
484483
if test "$build_seq" = "yes"; then
485-
AC_ERROR([Cannot enable sequencer without rawmidi])
484+
AC_MSG_ERROR(Cannot enable sequencer without rawmidi)
486485
fi
487486
fi
488487

@@ -534,22 +533,16 @@ dnl check atomics for pcm_meter
534533
AC_MSG_CHECKING([whether GCC supports builtin atomic intrinsics])
535534
if test -z "$gcc_have_atomics"; then
536535
gcc_have_atomics=no
537-
AC_TRY_LINK([],
538-
[int i;
536+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;
539537
__atomic_load_n(&i, __ATOMIC_SEQ_CST);
540538
__atomic_add_fetch(&i, 0, __ATOMIC_SEQ_CST);
541-
],
542-
[gcc_have_atomics=yes],
543-
[gcc_have_atomics=no])
539+
]])],[gcc_have_atomics=yes],[gcc_have_atomics=no])
544540
fi
545541
AC_MSG_RESULT($gcc_have_atomics)
546542

547543
dnl check mmx register for pcm_dmix_i386
548544

549-
AC_TRY_LINK([],
550-
[__asm__ volatile ("" : : : "mm0");],
551-
[AC_DEFINE([HAVE_MMX], "1", [MMX technology is enabled])],
552-
[])
545+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[__asm__ volatile ("" : : : "mm0");]])],[AC_DEFINE([HAVE_MMX], "1", [MMX technology is enabled])],[])
553546

554547
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"
555548

@@ -734,9 +727,9 @@ AC_ARG_WITH(max-cards,
734727
AC_MSG_RESULT([$max_cards])
735728

736729
if test "$max_cards" -lt 1; then
737-
AC_ERROR([Invalid max cards $max_cards])
730+
AC_MSG_ERROR(Invalid max cards $max_cards)
738731
elif test "$max_cards" -gt 256; then
739-
AC_ERROR([Invalid max cards $max_cards])
732+
AC_MSG_ERROR(Invalid max cards $max_cards)
740733
fi
741734
AC_DEFINE_UNQUOTED(SND_MAX_CARDS, $max_cards, [Max number of cards])
742735

@@ -779,7 +772,7 @@ AC_CONFIG_FILES(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
779772
test/Makefile test/lsb/Makefile \
780773
utils/Makefile utils/alsa-lib.spec utils/alsa.pc utils/alsa-topology.pc)
781774

782-
AC_OUTPUT()
775+
AC_OUTPUT
783776

784777
dnl Create asoundlib.h dynamically according to configure options
785778
echo "Creating asoundlib.h..."

0 commit comments

Comments
 (0)