* ./configure.ac.in: if CoreAudio is too old, disable the coreaudio_resampler
authorSam Hocevar <sam@videolan.org>
Tue, 8 Apr 2003 08:59:25 +0000 (08:59 +0000)
committerSam Hocevar <sam@videolan.org>
Tue, 8 Apr 2003 08:59:25 +0000 (08:59 +0000)
    module for the moment.

configure.ac.in

index 28fc2e6..2d02750 100644 (file)
@@ -2276,10 +2276,14 @@ if test "x${enable_coreaudio}" != "xno" &&
 then
   AC_CHECK_HEADERS(CoreAudio/CoreAudio.h, 
     [ BUILTINS="${BUILTINS} coreaudio"
-      PLUGINS="${PLUGINS} coreaudio_resampler"
       LDFLAGS_coreaudio="${LDFLAGS_coreaudio} -framework CoreAudio"
-      LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox" ], 
-    [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
+      AC_MSG_CHECKING(for kAudioConverterPrimeMethod in AudioToolbox/AudioConverter.h)
+      AC_EGREP_HEADER(kAudioConverterPrimeMethod,AudioToolbox/AudioConverter.h,[
+        AC_MSG_RESULT(yes)
+        PLUGINS="${PLUGINS} coreaudio_resampler"
+        LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox"
+      ],[ AC_MSG_RESULT(no) ])
+    ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
 fi
 
 dnl