Commit 4430ab43 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

winemp3.acm: Support mp3 decoding on Mac OS/X Leopard systems.

parent c177e938
......@@ -5687,6 +5687,9 @@ done
for ac_header in \
AL/al.h \
AudioToolbox/AudioConverter.h \
AudioToolbox/AudioFile.h \
AudioToolbox/AudioFileStream.h \
AudioUnit/AudioUnit.h \
Carbon/Carbon.h \
CoreAudio/CoreAudio.h \
......@@ -6448,6 +6451,24 @@ fi
then
COREAUDIO="-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI"
ac_save_LIBS="$LIBS"
if test "$ac_cv_header_AudioToolbox_AudioFile_h" = "yes"
then
LIBS="$LIBS $COREAUDIO"
for ac_func in AudioFileStreamOpen
do :
ac_fn_c_check_func "$LINENO" "AudioFileStreamOpen" "ac_cv_func_AudioFileStreamOpen"
if test "x$ac_cv_func_AudioFileStreamOpen" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_AUDIOFILESTREAMOPEN 1
_ACEOF
fi
done
LIBS="$ac_save_LIBS"
fi
test "x$ac_cv_func_AudioFileStreamOpen" = xyes || as_fn_append wine_notices "|AudioToolbox version too old, mp3 codec won't be supported."
fi
if test "$ac_cv_header_OpenAL_al_h" = "yes"
then
......@@ -11287,7 +11308,7 @@ if test "x$ac_cv_lib_mpg123_mpg123_feed" = x""yes; then :
fi
fi
if test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes; then :
if test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes; then :
case "x$with_mpg123" in
x) as_fn_append wine_notices "|libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported." ;;
xno) ;;
......@@ -11295,7 +11316,7 @@ if test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes; then :
This is an error since --with-mpg123 was requested." "$LINENO" 5 ;;
esac
fi
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no}
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes -o "x$ac_cv_func_AudioFileStreamOpen" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no}
if test "$ac_cv_header_AL_al_h" = "yes"
then
......
......@@ -308,6 +308,9 @@ AC_SYS_LARGEFILE()
AC_CHECK_HEADERS(\
AL/al.h \
AudioToolbox/AudioConverter.h \
AudioToolbox/AudioFile.h \
AudioToolbox/AudioFileStream.h \
AudioUnit/AudioUnit.h \
Carbon/Carbon.h \
CoreAudio/CoreAudio.h \
......@@ -643,6 +646,14 @@ case $host_os in
then
dnl CoreServices needed by AudioUnit
AC_SUBST(COREAUDIO,"-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI")
ac_save_LIBS="$LIBS"
if test "$ac_cv_header_AudioToolbox_AudioFile_h" = "yes"
then
LIBS="$LIBS $COREAUDIO"
AC_CHECK_FUNCS(AudioFileStreamOpen)
LIBS="$ac_save_LIBS"
fi
test "x$ac_cv_func_AudioFileStreamOpen" = xyes || WINE_NOTICE([AudioToolbox version too old, mp3 codec won't be supported.])
fi
if test "$ac_cv_header_OpenAL_al_h" = "yes"
then
......@@ -1452,9 +1463,9 @@ if test "$ac_cv_header_mpg123_h" = "yes"
then
AC_CHECK_LIB(mpg123,mpg123_feed,[AC_SUBST(LIBMPG123,"-lmpg123")])
fi
WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes],
WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes],
[libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported.])
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no}
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes -o "x$ac_cv_func_AudioFileStreamOpen" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no}
dnl **** Check for OpenAL 1.1 ****
if test "$ac_cv_header_AL_al_h" = "yes"
......
......@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winemp3.acm
IMPORTS = winmm user32 kernel32
EXTRALIBS = @LIBMPG123@
EXTRALIBS = @LIBMPG123@ @COREAUDIO@
C_SRCS = \
mpegl3.c
......
......@@ -32,6 +32,19 @@
/* Define to 1 if you have the <asm/types.h> header file. */
#undef HAVE_ASM_TYPES_H
/* Define to 1 if you have the `AudioFileStreamOpen' function. */
#undef HAVE_AUDIOFILESTREAMOPEN
/* Define to 1 if you have the <AudioToolbox/AudioConverter.h> header file. */
#undef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H
/* Define to 1 if you have the <AudioToolbox/AudioFileStream.h> header file.
*/
#undef HAVE_AUDIOTOOLBOX_AUDIOFILESTREAM_H
/* Define to 1 if you have the <AudioToolbox/AudioFile.h> header file. */
#undef HAVE_AUDIOTOOLBOX_AUDIOFILE_H
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
#undef HAVE_AUDIOUNIT_AUDIOUNIT_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment