-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUILD: Use pkg-config to check for OpenAL Soft
macOS is still using Apple's OpenAL framework.
- Loading branch information
Showing
3 changed files
with
9 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ Copyright: 2017 Sven Hesse <[email protected]> | |
License: CC0-1.0 | ||
|
||
Files: m4/ax_check_al.m4 | ||
Copyright: 2013 Sven Hesse <[email protected]> | ||
Copyright: 2013, 2018 Sven Hesse <[email protected]> | ||
2013 Matthew Hoops <[email protected]> | ||
License: CC0-1.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>, Matthew Hoops <[email protected]> | ||
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) | ||
]) |