Le dim 02/01/2005 à 20:24, Vincent Béron a écrit :
> Le sam 01/01/2005 à 09:20, Andreas Mohr a écrit :
> [snip]
> > Problem is that we might want to have Wine never break during compile.
> > At least for semi-modern software versions it should compile successfully,
> > no matter how much functionality we have to disable to achieve that.
> 
> Right.
> 
> > 
> > Configure check, anyone?
> 
> To disable Alsa if alsa 0.9x headers are detected?
> 
> I don't have either 0.9.x or 1.0 here, so I'd prefer somebody who has at
> least one of them to change configure.ac.

Found a computer with 1.0, but haven't found one with 0.9, so it's not
actually tested with 0.9, but I think it does.

Changelog:
Only use Alsa if 1.0 is detected.

Vincent
Index: wine/configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.332
diff -u -r1.332 configure.ac
--- wine/configure.ac	7 Jan 2005 15:33:02 -0000	1.332
+++ wine/configure.ac	9 Jan 2005 00:10:56 -0000
@@ -681,9 +681,13 @@
 AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h, break)
 if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
 then
-    AC_CHECK_LIB(asound,snd_pcm_open,
-    	AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA including devel headers])
-	ALSALIBS="-lasound")
+    AC_TRY_COMPILE([#ifdef HAVE_ALSA_ASOUNDLIB_H
+#include <alsa/asoundlib.h>
+#elif defined(HAVE_SYS_ASOUNDLIB_H)
+#include <sys/asoundlib.h>
+#endif],[int ret = snd_pcm_open(NULL, NULL, SND_PCM_STREAM_PLAYBACK, 0);],
+        [AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA including devel headers])
+         ALSALIBS="-lasound"])
 fi
 
 dnl **** Check for libaudioio (which can be used to get solaris audio support) ****

Reply via email to