summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-09-05 13:51:27 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-09-05 13:51:27 +0000
commit5a2df643a79bd52978ad80e1b1fed932717b4de3 (patch)
treefb74908723cef8a81c7c68ebcdbecc6e501a0feb
parent33d71eb40604ae5f1b83fb5baa0e5ebbb15c5e06 (diff)
downloadxine-lib-5a2df643a79bd52978ad80e1b1fed932717b4de3.tar.gz
xine-lib-5a2df643a79bd52978ad80e1b1fed932717b4de3.tar.bz2
allow more exact checks on alsa version numbers
(now my 0.9.0rc7 is accepted again :) ) CVS patchset: 5345 CVS date: 2003/09/05 13:51:27
-rw-r--r--configure.ac2
-rw-r--r--m4/alsa.m426
2 files changed, 22 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 08d47868a..1be97cde5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -754,7 +754,7 @@ AM_CONDITIONAL(HAVE_OSS, test x"$have_ossaudio" = "xyes")
dnl ---------------------------------------------
dnl Alsa support
dnl ---------------------------------------------
-AM_PATH_ALSA(0.9.1,
+AM_PATH_ALSA(0.9.0rc4,
[ AC_DEFINE(HAVE_ALSA,1,[Define this if you have Alsa (libasound) installed])
if test x"$have_alsa09" = "xyes"; then
AC_DEFINE(HAVE_ALSA09,1,[Define this if you have alsa 0.9.x and more installed])
diff --git a/m4/alsa.m4 b/m4/alsa.m4
index b18c1c041..efa734856 100644
--- a/m4/alsa.m4
+++ b/m4/alsa.m4
@@ -102,15 +102,27 @@ dnl
#include <$asoundlib_h>
int main() {
- int major, minor, micro;
+ int major, minor, micro, extra;
char *tmp_version;
system("touch conf.alsatest");
tmp_version = strdup("$min_alsa_version");
- if(sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_alsa_version");
- exit(1);
+ if(sscanf(tmp_version, "%d.%d.%dpre%d", &major, &minor, &micro, &extra) != 4) {
+ if(sscanf(tmp_version, "%d.%d.%dalpha%d", &major, &minor, &micro, &extra) != 4) {
+ if(sscanf(tmp_version, "%d.%d.%dbeta%d", &major, &minor, &micro, &extra) != 4) {
+ if(sscanf(tmp_version, "%d.%d.%drc%d", &major, &minor, &micro, &extra) != 4) {
+ if(sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_alsa_version");
+ exit(1);
+ } else /* final */
+ extra = 1000000;
+ } else /* rc */
+ extra += 100000;
+ } else /* beta */
+ extra += 20000;
+ } else /* alpha */
+ extra += 10000;
}
#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
@@ -122,10 +134,14 @@ int main() {
#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
#endif
+ #if !defined(SND_LIB_EXTRAVER) && defined(SOUNDLIB_VERSION_EXTRAVER)
+ #define SND_LIB_EXTRAVER SOUNDLIB_VERSION_EXTRAVER
+ #endif
if((SND_LIB_MAJOR > major) ||
((SND_LIB_MAJOR == major) && (SND_LIB_MINOR > minor)) ||
- ((SND_LIB_MAJOR == major) && (SND_LIB_MINOR == minor) && (SND_LIB_SUBMINOR >= micro))) {
+ ((SND_LIB_MAJOR == major) && (SND_LIB_MINOR == minor) && (SND_LIB_SUBMINOR > micro)) ||
+ ((SND_LIB_MAJOR == major) && (SND_LIB_MINOR == minor) && (SND_LIB_SUBMINOR == micro) && (SND_LIB_EXTRAVER >= extra))) {
return 0;
}
else {