mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 13:03:03 +01:00
Search for OpenAL framework on OSX
if pkg-config does not find OpenAL on OSX, do a manual search for the OpenAL framework. references #140
This commit is contained in:
parent
a0ef4d752f
commit
9240295724
35
configure.ac
35
configure.ac
@ -37,7 +37,7 @@ if test -n "$DEPSEARCH"; then
|
|||||||
CFLAGS="$CFLAGS -I$DEPSEARCH/include"
|
CFLAGS="$CFLAGS -I$DEPSEARCH/include"
|
||||||
CPPFLAGS="$CPPFLAGS -I$DEPSEARCH/include"
|
CPPFLAGS="$CPPFLAGS -I$DEPSEARCH/include"
|
||||||
LDFLAGS="$LDFLAGS -L$DEPSEARCH/lib"
|
LDFLAGS="$LDFLAGS -L$DEPSEARCH/lib"
|
||||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$DEPSEARCH/lib/pkgconfig
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$DEPSEARCH/lib/pkgconfig:/usr/local/lib/pkgconfig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH(libtoxcore-headers,
|
AC_ARG_WITH(libtoxcore-headers,
|
||||||
@ -77,11 +77,15 @@ AC_ARG_WITH(libsodium-libs,
|
|||||||
)
|
)
|
||||||
|
|
||||||
WIN32=no
|
WIN32=no
|
||||||
|
MACH=no
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
case $host_os in
|
case $host_os in
|
||||||
*mingw*)
|
*mingw*)
|
||||||
WIN32="yes"
|
WIN32="yes"
|
||||||
;;
|
;;
|
||||||
|
darwin*)
|
||||||
|
MACH=yes
|
||||||
|
;;
|
||||||
*freebsd*)
|
*freebsd*)
|
||||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||||
@ -422,9 +426,31 @@ AC_ARG_ENABLE([av],
|
|||||||
|
|
||||||
if test "x$BUILD_AV" = "xyes"; then
|
if test "x$BUILD_AV" = "xyes"; then
|
||||||
PKG_CHECK_MODULES([OPENAL], [openal],
|
PKG_CHECK_MODULES([OPENAL], [openal],
|
||||||
|
[],
|
||||||
[
|
[
|
||||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
|
if test "x$MACH" = "xyes"; then
|
||||||
|
CFLAGS="$CFLAGS -framework OpenAL"
|
||||||
|
AC_CHECK_HEADER([OpenAL/al.h],
|
||||||
|
[
|
||||||
|
OPENAL_CFLAGS="-framework OpenAL"
|
||||||
|
OPENAL_LIBS="-framework OpenAL"
|
||||||
|
AC_SUBST(OPENAL_CFLAGS)
|
||||||
|
AC_SUBST(OPENAL_LIBS)
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_NOTICE([No openal framework; disabling A/V support])
|
||||||
|
BUILD_AV="no"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
CFLAGS="$CFLAGS_SAVE"
|
||||||
|
else
|
||||||
|
AC_MSG_NOTICE([No openal library; disabling A/V support])
|
||||||
|
BUILD_AV="no"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$BUILD_AV" = "xyes"; then
|
||||||
PKG_CHECK_MODULES([LIBTOXAV], [libtoxav],
|
PKG_CHECK_MODULES([LIBTOXAV], [libtoxav],
|
||||||
[
|
[
|
||||||
AC_CHECK_HEADER([tox/toxav.h],
|
AC_CHECK_HEADER([tox/toxav.h],
|
||||||
@ -442,11 +468,6 @@ if test "x$BUILD_AV" = "xyes"; then
|
|||||||
AC_MSG_NOTICE([No A/V library; disabling A/V support])
|
AC_MSG_NOTICE([No A/V library; disabling A/V support])
|
||||||
BUILD_AV="no"
|
BUILD_AV="no"
|
||||||
])
|
])
|
||||||
],
|
|
||||||
[
|
|
||||||
AC_MSG_NOTICE([No openal library; disabling A/V support])
|
|
||||||
BUILD_AV="no"
|
|
||||||
])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes")
|
AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes")
|
||||||
|
Loading…
Reference in New Issue
Block a user