+ ALUT_OK="no"
+
+ if test "x$with_openal_lib" != "x"; then
+ echo "libopenal is not supported on Mac OS platform."
+ openal_LIBS=""
+ fi
+ OPENAL_OK="yes"
+ # Looking for alut.h, if found assume that it is a part of
+ # the OpenAL package.
+ AC_CHECK_HEADERS([OpenAL/alut.h],[ALUT_OK="yes"])
+
+
+ dnl Thank you Christian Bauer from SheepSaver
+ 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
+ AC_DEFUN([AC_CHECK_FRAMEWORK], [
+ AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
+ AC_CACHE_CHECK([whether compiler supports framework $1],
+ ac_Framework, [
+ saved_LIBS="$LIBS"
+ FRAMEWORKS="$FRAMEWORKS -framework $1"
+ if test "$3" = ""; then
+ FRAMEWORKS="$FRAMEWORKS $ADD2LD"
+ elif test "`echo $FRAMEWORKS | grep -- -F$3`" = ""; then
+ FRAMEWORKS="$FRAMEWORKS -F$3"
+ CXXFLAGS="$CXXFLAGS -F$3"
+ CCFLAGS="$CCFLAGS -F$3"
+ dnl This is needed for AC_TRY_LINK when a framework path is specified
+ export DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}:$3"
+ fi
+ AC_TRY_LINK(
+ [$2], [],
+ [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
+ )
+ ])
+ AS_IF([test AS_VAR_GET(ac_Framework) = yes],
+ [AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])]
+ )
+ AS_VAR_POPDEF([ac_Framework])dnl
+ ])
+
+ dnl Check for OpenAL.framework when --with-openal-framework is specified
+ dnl Of cource OpenAL.framework needs to have alut.h
+ if test "x$with_openal_framework" != "x"; then
+ AC_CHECK_FRAMEWORK(OpenAL, [#include <OpenAL/alut.h>], $with_openal_framework)
+ fi
+