Andrew Eikum : configure: Require openal-soft at build-time for xaudio2.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 31 06:41:58 CDT 2015


Module: wine
Branch: master
Commit: 7f72a5f4ed0f09c58bac2364c74d2ce7b4c3b967
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7f72a5f4ed0f09c58bac2364c74d2ce7b4c3b967

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Fri Aug 28 08:22:18 2015 -0500

configure: Require openal-soft at build-time for xaudio2.

---

 configure    | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 configure.ac | 17 +++++++++++++++--
 2 files changed, 65 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index afa7bb4..6a5bf0f 100755
--- a/configure
+++ b/configure
@@ -773,6 +773,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1558,6 +1559,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1810,6 +1812,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1947,7 +1958,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -2100,6 +2111,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -13604,14 +13616,48 @@ fi
 fi
 if test "x$ac_cv_lib_openal" != xyes; then :
   case "x$with_openal" in
-  x)   as_fn_append wine_notices "|libopenal ${notice_platform}development files not found (or too old), OpenAL and XAudio2 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) ;;
-  *)   as_fn_error $? "libopenal ${notice_platform}development files not found (or too old), OpenAL and XAudio2 won't be supported
+  *)   as_fn_error $? "libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported
 This is an error since --with-openal was requested." "$LINENO" 5 ;;
 esac
 fi
 test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no}
-test "x$ac_cv_lib_openal" = xyes || enable_xaudio2_7=${enable_xaudio2_7:-no}
+
+if test "x$ac_cv_lib_openal" = xyes
+then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openal-soft" >&5
+$as_echo_n "checking for openal-soft... " >&6; }
+if ${ac_cv_have_openalsoft+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <AL/alext.h>
+LPALCRENDERSAMPLESSOFT x;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_have_openalsoft=yes
+else
+  ac_cv_have_openalsoft=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_openalsoft" >&5
+$as_echo "$ac_cv_have_openalsoft" >&6; }
+fi
+if test "x$ac_cv_have_openalsoft" != xyes
+then
+    as_fn_append wine_notices "|openal-soft ${notice_platform}development files not found (or too old), XAudio2 won't be supported"
+    enable_xaudio2_7=${enable_xaudio2_7:-no}
+fi
 
 if test "$ac_cv_header_kstat_h" = "yes"
 then
diff --git a/configure.ac b/configure.ac
index b592615..aec53f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1738,9 +1738,22 @@ then
                       AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,)
 fi
 WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes],
-                 [libopenal ${notice_platform}development files not found (or too old), OpenAL and XAudio2 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" = xyes || enable_openal32=${enable_openal32:-no}
-test "x$ac_cv_lib_openal" = xyes || enable_xaudio2_7=${enable_xaudio2_7:-no}
+
+dnl **** Check for openal-soft ****
+if test "x$ac_cv_lib_openal" = xyes
+then
+    AC_CACHE_CHECK([for openal-soft], ac_cv_have_openalsoft,
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+            [[#include <AL/alext.h>
+LPALCRENDERSAMPLESSOFT x;]])],[ac_cv_have_openalsoft=yes],[ac_cv_have_openalsoft=no]))
+fi
+if test "x$ac_cv_have_openalsoft" != xyes
+then
+    WINE_NOTICE([openal-soft ${notice_platform}development files not found (or too old), XAudio2 won't be supported])
+    enable_xaudio2_7=${enable_xaudio2_7:-no}
+fi
 
 dnl **** Check for libkstat ****
 if test "$ac_cv_header_kstat_h" = "yes"




More information about the wine-cvs mailing list