configure.ac: add variable host_is_darwin
Fixes the OpenAL detection which was broken because enable_osx was uesd which was set later.
This commit is contained in:
parent
12e9b7eafa
commit
4a99b1df4b
20
configure.ac
20
configure.ac
@ -65,6 +65,8 @@ dnl OS Specific Defaults
|
|||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
|
host_is_darwin=no
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
mingw32* | windows*)
|
mingw32* | windows*)
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
@ -76,6 +78,10 @@ mingw32* | windows*)
|
|||||||
LIBS="$LIBS -lws2_32"
|
LIBS="$LIBS -lws2_32"
|
||||||
HAVE_WINDOWS=1
|
HAVE_WINDOWS=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
darwin*)
|
||||||
|
host_is_darwin=yes
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL([HAVE_WINDOWS], [test x$HAVE_WINDOWS = x1])
|
AM_CONDITIONAL([HAVE_WINDOWS], [test x$HAVE_WINDOWS = x1])
|
||||||
|
|
||||||
@ -1270,7 +1276,7 @@ AC_SUBST(OPENAL_CFLAGS,"")
|
|||||||
AC_SUBST(OPENAL_LIBS,"")
|
AC_SUBST(OPENAL_LIBS,"")
|
||||||
|
|
||||||
if test x$enable_openal = xyes; then
|
if test x$enable_openal = xyes; then
|
||||||
if test x$enable_osx = xyes; then
|
if test x$host_is_darwin = xyes; then
|
||||||
AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], [], [enable_openal=no])
|
AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], [], [enable_openal=no])
|
||||||
if test x$enable_openal = xyes; then
|
if test x$enable_openal = xyes; then
|
||||||
OPENAL_LIBS="-framework OpenAL"
|
OPENAL_LIBS="-framework OpenAL"
|
||||||
@ -1298,13 +1304,11 @@ fi
|
|||||||
AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
|
AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
|
||||||
|
|
||||||
dnl ----------------------------------- OSX -----------------------------------
|
dnl ----------------------------------- OSX -----------------------------------
|
||||||
enable_osx=no
|
enable_osx=$host_is_darwin
|
||||||
case "$host_os" in
|
if test x$enable_osx = xyes; then
|
||||||
darwin*)
|
AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
|
||||||
AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
|
LIBS="$LIBS -framework AudioUnit -framework CoreAudio -framework CoreServices"
|
||||||
LIBS="$LIBS -framework AudioUnit -framework CoreAudio -framework CoreServices"
|
fi
|
||||||
enable_osx=yes ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
|
AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user