diff -ruN OpenAL.orig/Sound/OpenAL/ALC/Capture.hs OpenAL/Sound/OpenAL/ALC/Capture.hs --- OpenAL.orig/Sound/OpenAL/ALC/Capture.hs 2006-03-18 08:30:15.515625000 +0900 +++ OpenAL/Sound/OpenAL/ALC/Capture.hs 2006-03-17 22:59:50.000000000 +0900 @@ -12,7 +12,9 @@ -- Specification and Reference (version 1.1). -- -------------------------------------------------------------------------------- - +#ifdef darwin_HOST_OS +module Sound.OpenAL.ALC.Capture where +#else module Sound.OpenAL.ALC.Capture ( NumSamples, captureOpenDevice, captureStart, captureNumSamples, captureSamples, captureStop, captureCloseDevice, @@ -134,3 +136,5 @@ if enumExtPresent then peekALCStrings =<< getStringRaw Nothing CaptureDeviceSpecifier else fmap (\s -> [s]) $ get captureDefaultDeviceSpecifier + +#endif diff -ruN OpenAL.orig/aclocal.m4 OpenAL/aclocal.m4 --- OpenAL.orig/aclocal.m4 2006-03-18 08:30:15.578125000 +0900 +++ OpenAL/aclocal.m4 2006-03-18 07:26:55.812500000 +0900 @@ -169,6 +169,28 @@ ])# FP_ARG_OPENAL +# FP_CHECK_OPENAL +# ------------- +AC_DEFUN([FP_CHECK_OPENAL], +[AC_REQUIRE([AC_CANONICAL_TARGET]) +AL_CFLAGS= +case $target_os in +darwin*) + AL_LIBS= + AL_FRAMEWORKS=OpenAL + ;; +*) + AC_SEARCH_LIBS([alGenSources], [openal openal32], [AL_LIBS="$ac_cv_search_alGenSources"]) + test x"$AL_LIBS" = x"none required" && AL_LIBS= + AC_SUBST([AL_LIBS]) + AL_FRAMEWORKS= + ;; +esac +AC_SUBST([AL_CFLAGS]) +AC_SUBST([AL_FRAMEWORKS]) +])# FP_CHECK_OPENAL + + # FP_HEADER_AL # ------------ # Check for an AL header, setting the variable fp_found_al_header to no/yes, diff -ruN OpenAL.orig/configure.ac OpenAL/configure.ac --- OpenAL.orig/configure.ac 2006-03-18 08:30:15.593750000 +0900 +++ OpenAL/configure.ac 2006-03-17 12:46:54.781250000 +0900 @@ -8,37 +8,27 @@ # contains all kinds of stuff which is needed for using this package. AC_CONFIG_HEADERS([include/HsOpenALConfig.h include/HsOpenAL.h]) -# Shall we build this package at all? -FP_ARG_OPENAL # We set this to "yes" later when we have found OpenAL libs and headers. AL_BUILD_PACKAGE=no -if test x"$enable_openal" = xyes; then - AC_SUBST([AL_BUILD_PACKAGE]) -# The following test for the OpenAL library is a bit of a hack, but gives nice -# feedback even for the case when no additional library is needed. (Mac OS X?) -AL_LIBS=no -AC_SEARCH_LIBS([alGenSources], [openal openal32], [AL_LIBS="$ac_cv_search_alGenSources"]) -test x"$AL_LIBS" = x"none required" && AL_LIBS= -AC_SUBST([AL_LIBS]) +# Shall we build this package at all? +FP_ARG_OPENAL + +if test x"$enable_openal" = xyes; then + +# Check for ALUT include paths and libraries +FP_CHECK_OPENAL if test "$AL_LIBS" = no; then AC_MSG_WARN([no OpenAL library found, so this package will not be built]) else -# Ugly... -AL_FRAMEWORKS= -case $host_os in -darwin*) - AL_FRAMEWORKS=OpenAL - ;; -esac -AC_SUBST([AL_FRAMEWORKS]) - +# check for ALUT include files FP_HEADER_AL FP_HEADER_ALC -if test -z "$AL_FRAMEWORKS" && test x"$fp_found_al_header$fp_found_alc_header" != xyesyes; then + +if text x "$fp_found_al_header" = xno || test x"$fp_found_alc_header" = xno; then AC_MSG_WARN([no OpenAL headers found, so this package will not be built]) else