1
0
Fork 0

Update Mac configure script for new ALUT scheme; support --with-alut-framework.

This commit is contained in:
James Turner 2010-05-06 11:46:32 +01:00
parent 11a371b313
commit ad13e4f3b4

View file

@ -58,7 +58,7 @@ case "${host}" in
dnl Thank you Christian Bauer from SheepSaver dnl Thank you Christian Bauer from SheepSaver
dnl Modified by Tatsuhiro Nishioka for accepting a given framework path dnl Modified by Tatsuhiro Nishioka for accepting a given framework path
dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES, $3=FRAMEWORK_PATH) ; $3 is optional dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES, $3=FRAMEWORK_PATH, $4=ACTION_IF_FOUND) ;
AC_DEFUN([AC_CHECK_FRAMEWORK], [ AC_DEFUN([AC_CHECK_FRAMEWORK], [
AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
AC_CACHE_CHECK([whether compiler supports framework $1], AC_CACHE_CHECK([whether compiler supports framework $1],
@ -71,6 +71,7 @@ case "${host}" in
FRAMEWORKS="$FRAMEWORKS -F$3" FRAMEWORKS="$FRAMEWORKS -F$3"
CXXFLAGS="$CXXFLAGS -F$3" CXXFLAGS="$CXXFLAGS -F$3"
CCFLAGS="$CCFLAGS -F$3" CCFLAGS="$CCFLAGS -F$3"
CPPFLAGS="$CPPFLAGS -F$3"
dnl This is needed for AC_TRY_LINK when a framework path is specified dnl This is needed for AC_TRY_LINK when a framework path is specified
export DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}:$3" export DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}:$3"
fi fi
@ -82,6 +83,7 @@ case "${host}" in
AS_IF([test AS_VAR_GET(ac_Framework) = yes], AS_IF([test AS_VAR_GET(ac_Framework) = yes],
[AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])] [AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])]
) )
AS_IF([test AS_VAR_GET(ac_Framework) = yes], $4)
AS_VAR_POPDEF([ac_Framework])dnl AS_VAR_POPDEF([ac_Framework])dnl
]) ])
@ -107,9 +109,9 @@ case "${host}" in
export DYLD_FRAMEWORK_PATH="$DYLD_FRAMEWORK_PATH:$with_plib_framework" export DYLD_FRAMEWORK_PATH="$DYLD_FRAMEWORK_PATH:$with_plib_framework"
fi fi
AC_ARG_WITH(openal_framework, [ --with-openal-framework=PREFIX Speicfy the prefix path to OpenAL.framework ]) AC_ARG_WITH(alut_framework, [ --with-alut-framework=PREFIX Specify the prefix path to ALUT.framework ])
if test "x$with_openal_framework" != "x"; then if test "x$with_alut_framework" != "x"; then
echo "OpenAL framework prefix is $with_openal_framework" echo "ALUT framework prefix is $with_alut_framework"
fi fi
;; ;;
@ -428,19 +430,16 @@ case "${host}" in
*-apple-darwin*) *-apple-darwin*)
dnl Mac OS X dnl Mac OS X
# Mac OS X has OpenAL.framework with ALUT by default # Mac OS X has OpenAL.framework, but no ALUT, by default, so we
# so we can use it without checking it. # require use of a non-Apple ALUT.framework which we provide
# Note: SimGear needs to check the existance of alut.h since it includes the header.
LIBS="$LIBS -framework IOKit -framework OpenAL" LIBS="$LIBS -framework IOKit -framework OpenAL"
openal_LIBS="$LIBS" openal_LIBS="$LIBS"
OPENAL_OK="yes"
ALUT_OK="yes"
dnl Check for OpenAL.framework when --with-openal-framework is specified AC_CHECK_FRAMEWORK(OpenAL, [#include <OpenAL/al.h>], "", [OPENAL_OK="yes"])
if test "x$with_openal_framework" != "x"; then AC_CHECK_FRAMEWORK(ALUT, [#include <ALUT/alut.h>], $with_alut_framework, [
AC_CHECK_FRAMEWORK(OpenAL, [#include <OpenAL/alut.h>], $with_openal_framework) ALUT_OK="yes"
fi LIBS = "$LIBS -framework ALUT"
])
;; ;;
*) *)