diff --git a/configure.ac b/configure.ac index 3f1fc613..0c2bcff1 100644 --- a/configure.ac +++ b/configure.ac @@ -191,7 +191,7 @@ dnl Graphic libraries AX_CHECK_QT5(5.7.1, , AC_MSG_ERROR([Qt5 (>= 5.7.1, modules Core, Gui, Widgets) is required and could not be found!])) dnl Sound libraries -AX_CHECK_AL( , AC_MSG_ERROR([OpenAL or OpenAL Soft (>= 1.12) is required and could not be found!])) +AX_CHECK_AL([1.12], , AC_MSG_ERROR([OpenAL Soft (>= 1.12) is required and could not be found!])) AX_CHECK_MAD(0, 15, 1, , AC_MSG_ERROR([libMAD (>= 0.15.1) is required and could not be found!])) AX_CHECK_OGG(, AC_MSG_ERROR([libOgg (>= 1.2.0) is required and could not be found!])) AX_CHECK_VORBIS(, AC_MSG_ERROR([libVorbisFile (>= 1.3.1) is required and could not be found!])) diff --git a/dists/debian/copyright b/dists/debian/copyright index 142311d8..1c0ae4a3 100644 --- a/dists/debian/copyright +++ b/dists/debian/copyright @@ -78,7 +78,7 @@ Copyright: 2017 Sven Hesse License: CC0-1.0 Files: m4/ax_check_al.m4 -Copyright: 2013 Sven Hesse +Copyright: 2013, 2018 Sven Hesse 2013 Matthew Hoops License: CC0-1.0 diff --git a/m4/ax_check_al.m4 b/m4/ax_check_al.m4 index 7607118d..a75ab9ae 100644 --- a/m4/ax_check_al.m4 +++ b/m4/ax_check_al.m4 @@ -1,18 +1,18 @@ -#serial 1000 -dnl @synopsis AX_CHECK_AL(action-if, action-if-not) +#serial 1001 +dnl @synopsis AX_CHECK_AL(version, action-if, action-if-not) dnl -dnl @summary check for OpenAL Soft. +dnl @summary check for OpenAL (Soft). dnl dnl Defines AL_LIBS, AL_CFLAGS. dnl dnl @category InstalledPackages dnl @author Sven Hesse , Matthew Hoops -dnl @version 2013-12-14 +dnl @version 2018-06-19 dnl @license Creative Commons CC0 1.0 Universal Public Domain Dedication AC_DEFUN([AX_CHECK_AL], [ - AC_ARG_VAR(AL_CFLAGS, [C compiler flags for OpenAL Soft]) - AC_ARG_VAR(AL_LIBS, [libraries to pass to the linker for OpenAL Soft]) + AC_ARG_VAR(AL_CFLAGS, [C compiler flags for OpenAL (Soft)]) + AC_ARG_VAR(AL_LIBS, [libraries to pass to the linker for OpenAL (Soft)]) case "$target" in *darwin*) @@ -24,39 +24,13 @@ AC_DEFUN([AX_CHECK_AL], [ if test -z "$AL_LIBS"; then AL_LIBS="-framework OpenAL" fi - - noal=0 ;; *) - if test -z "$AL_CFLAGS"; then - AL_CFLAGS="" - fi - if test -z "$AL_LIBS"; then - AL_LIBS="-lopenal" - fi - - save_CFLAGS="$CFLAGS" - save_CXXFLAGS="$CXXFLAGS" - save_LIBS="$LIBS" - CFLAGS="$CFLAGS $AL_CFLAGS" - CXXFLAGS="$CXXFLAGS $AL_CFLAGS" - LIBS="$LIBS $AL_LIBS" - - AC_CHECK_HEADER([AL/al.h], AC_CHECK_HEADER([AL/alc.h], noal=0, noal=1), noal=1) - - CFLAGS="$save_CFLAGS" - CXXFLAGS="$save_CXXFLAGS" - LIBS="$save_LIBS" + PKG_CHECK_MODULES([AL], [openal >= $1], [$2], [$3]) ;; esac; - if test "$noal" = "1"; then - ifelse([$2], , :, [$2]) - else - ifelse([$1], , :, [$1]) - fi - AC_SUBST(AL_CFLAGS) AC_SUBST(AL_LIBS) ])