configure: Change openal detection.

oldstable
Maarten Lankhorst 2009-12-09 11:52:09 +01:00 committed by Alexandre Julliard
parent 5a954d4032
commit d435499fbc
4 changed files with 56 additions and 25 deletions

60
configure vendored
View File

@ -610,6 +610,7 @@ LDPATH
BUILTINFLAG BUILTINFLAG
EXTRACFLAGS EXTRACFLAGS
LIBKSTAT LIBKSTAT
LIBOPENAL
LIBMPG123 LIBMPG123
PNGINCL PNGINCL
FONTCONFIGINCL FONTCONFIGINCL
@ -647,7 +648,7 @@ CROSSTARGET
CROSSTEST CROSSTEST
CROSSCC CROSSCC
CARBONLIB CARBONLIB
LIBOPENAL FRAMEWORK_OPENAL
COREAUDIO COREAUDIO
DISKARBITRATIONLIB DISKARBITRATIONLIB
LDEXECFLAGS LDEXECFLAGS
@ -6469,9 +6470,14 @@ done
fi fi
if test "$ac_cv_header_OpenAL_al_h" = "yes" if test "$ac_cv_header_OpenAL_al_h" = "yes"
then then
LIBOPENAL="-framework OpenAL" FRAMEWORK_OPENAL="-framework OpenAL"
ac_cv_lib_openal_alGetSource3i=yes
cat >>confdefs.h <<_ACEOF
#define HAVE_OPENAL 1
_ACEOF
ac_cv_lib_openal=yes
fi fi
if test "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes" if test "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes"
then then
@ -11379,14 +11385,14 @@ test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes -o "x$ac_cv_func_AudioFileStreamOpe
if test "$ac_cv_header_AL_al_h" = "yes" if test "$ac_cv_header_AL_al_h" = "yes"
then then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alGetSource3i in -lopenal" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lopenal" >&5
$as_echo_n "checking for alGetSource3i in -lopenal... " >&6; } $as_echo_n "checking for -lopenal... " >&6; }
if test "${ac_cv_lib_openal_alGetSource3i+set}" = set; then : if test "${ac_cv_lib_soname_openal+set}" = set; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_check_soname_save_LIBS=$LIBS
LIBS="-lopenal $LIBS" LIBS="-lopenal $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error. /* Override any GCC internal prototype to avoid an error.
@ -11405,23 +11411,39 @@ return alGetSource3i ();
} }
_ACEOF _ACEOF
if ac_fn_c_try_link "$LINENO"; then : if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_openal_alGetSource3i=yes case "$LIBEXT" in
else dll) ac_cv_lib_soname_openal=`$ac_cv_path_LDD conftest.exe | grep "openal" | sed -e "s/dll.*/dll/"';2,$d'` ;;
ac_cv_lib_openal_alGetSource3i=no dylib) ac_cv_lib_soname_openal=`otool -L conftest$ac_exeext | grep "libopenal\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libopenal\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_openal=`$ac_cv_path_LDD conftest$ac_exeext | grep "libopenal\\.$LIBEXT" | sed -e "s/^.*\(libopenal\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
esac
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS LIBS=$ac_check_soname_save_LIBS
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openal_alGetSource3i" >&5 if test "x$ac_cv_lib_soname_openal" = "x"; then :
$as_echo "$ac_cv_lib_openal_alGetSource3i" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
if test "x$ac_cv_lib_openal_alGetSource3i" = x""yes; then : $as_echo "not found" >&6; }
LIBOPENAL="-lopenal"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_openal" >&5
$as_echo "$ac_cv_lib_soname_openal" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBOPENAL "$ac_cv_lib_soname_openal"
_ACEOF
LIBOPENAL="-lopenal"
ac_cv_lib_openal=yes
cat >>confdefs.h <<_ACEOF
#define HAVE_OPENAL 1
_ACEOF
fi fi
fi fi
if test "x$ac_cv_lib_openal_alGetSource3i" != xyes; then : if test "x$ac_cv_lib_openal" != xyes; then :
case "x$with_openal" in case "x$with_openal" in
x) as_fn_append wine_notices "|libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported." ;; x) as_fn_append wine_notices "|libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported." ;;
xno) ;; xno) ;;
@ -11429,7 +11451,7 @@ if test "x$ac_cv_lib_openal_alGetSource3i" != xyes; then :
This is an error since --with-openal was requested." "$LINENO" 5 ;; This is an error since --with-openal was requested." "$LINENO" 5 ;;
esac esac
fi fi
test "x$ac_cv_lib_openal_alGetSource3i" = xyes || enable_openal32=${enable_openal32:-no} test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no}
if test "$ac_cv_header_kstat_h" = "yes" if test "$ac_cv_header_kstat_h" = "yes"
then then

View File

@ -662,8 +662,9 @@ case $host_os in
fi fi
if test "$ac_cv_header_OpenAL_al_h" = "yes" if test "$ac_cv_header_OpenAL_al_h" = "yes"
then then
AC_SUBST(LIBOPENAL,"-framework OpenAL") AC_SUBST(FRAMEWORK_OPENAL,"-framework OpenAL")
ac_cv_lib_openal_alGetSource3i=yes AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])
ac_cv_lib_openal=yes
fi fi
if test "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes" if test "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes"
then then
@ -1483,11 +1484,13 @@ test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes -o "x$ac_cv_func_AudioFileStreamOpe
dnl **** Check for OpenAL 1.1 **** dnl **** Check for OpenAL 1.1 ****
if test "$ac_cv_header_AL_al_h" = "yes" if test "$ac_cv_header_AL_al_h" = "yes"
then then
AC_CHECK_LIB(openal,alGetSource3i,[AC_SUBST(LIBOPENAL,"-lopenal")]) WINE_CHECK_SONAME(openal,alGetSource3i,[AC_SUBST(LIBOPENAL,"-lopenal")
ac_cv_lib_openal=yes
AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,)
fi fi
WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal_alGetSource3i" != xyes], WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes],
[libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported.]) [libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported.])
test "x$ac_cv_lib_openal_alGetSource3i" = xyes || enable_openal32=${enable_openal32:-no} test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no}
dnl **** Check for libkstat **** dnl **** Check for libkstat ****
if test "$ac_cv_header_kstat_h" = "yes" if test "$ac_cv_header_kstat_h" = "yes"

View File

@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = openal32.dll MODULE = openal32.dll
IMPORTS = kernel32 ntdll IMPORTS = kernel32 ntdll
EXTRALIBS = @LIBOPENAL@ EXTRALIBS = @LIBOPENAL@ @FRAMEWORK_OPENAL@
C_SRCS = \ C_SRCS = \
openal.c openal.c

View File

@ -574,6 +574,9 @@
/* Define if mkdir takes only one argument */ /* Define if mkdir takes only one argument */
#undef HAVE_ONE_ARG_MKDIR #undef HAVE_ONE_ARG_MKDIR
/* Define to 1 if OpenAL is available */
#undef HAVE_OPENAL
/* Define to 1 if you have the <OpenAL/al.h> header file. */ /* Define to 1 if you have the <OpenAL/al.h> header file. */
#undef HAVE_OPENAL_AL_H #undef HAVE_OPENAL_AL_H
@ -1210,6 +1213,9 @@
/* Define to the soname of the libodbc library. */ /* Define to the soname of the libodbc library. */
#undef SONAME_LIBODBC #undef SONAME_LIBODBC
/* Define to the soname of the libopenal library. */
#undef SONAME_LIBOPENAL
/* Define to the soname of the libpng library. */ /* Define to the soname of the libpng library. */
#undef SONAME_LIBPNG #undef SONAME_LIBPNG