--- /dev/null
+diff -durN -x '*~' allegro-4.1.12.orig/aclocal.m4 allegro-4.1.12/aclocal.m4
+--- allegro-4.1.12.orig/aclocal.m4 2003-11-09 18:43:06.000000000 +0000
++++ allegro-4.1.12/aclocal.m4 2004-12-29 12:33:41.454794712 +0000
+@@ -362,6 +362,13 @@
+ if test -n "$allegro_enable_alsadigi"; then
+ AC_CACHE_CHECK(for supported ALSA version for digital sound,
+ allegro_cv_support_alsadigi,
++ AC_TRY_COMPILE([#include <alsa/asoundlib.h>
++ #if SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0
++ #else
++ #error
++ #endif],,
++ [allegro_cv_support_alsadigi=yes
++ allegro_cv_alsa_version=9],
+ AC_TRY_COMPILE([#include <sys/asoundlib.h>
+ #if SND_LIB_MAJOR == 0 && SND_LIB_MINOR == 9
+ #else
+@@ -376,7 +383,7 @@
+ #endif],,
+ [allegro_cv_support_alsadigi=yes
+ allegro_cv_alsa_version=5],
+- allegro_cv_support_alsadigi=no)))
++ allegro_cv_support_alsadigi=no))))
+ if test "X$allegro_cv_support_alsadigi" = "Xyes" &&
+ test -z "$allegro_support_modules"; then
+ LIBS="-lasound $LIBS"
+@@ -399,6 +406,13 @@
+ if test -n "$allegro_enable_alsamidi"; then
+ AC_CACHE_CHECK(for supported ALSA version for MIDI,
+ allegro_cv_support_alsamidi,
++ AC_TRY_COMPILE([#include <alsa/asoundlib.h>
++ #if SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0
++ #else
++ #error
++ #endif],,
++ [allegro_cv_support_alsamidi=yes
++ allegro_cv_alsa_version=9],
+ AC_TRY_COMPILE([#include <sys/asoundlib.h>
+ #if SND_LIB_MAJOR == 0 && SND_LIB_MINOR == 9
+ #else
+@@ -413,7 +427,7 @@
+ #endif],,
+ [allegro_cv_support_alsamidi=yes
+ allegro_cv_alsa_version=5],
+- allegro_cv_support_alsamidi=no)))
++ allegro_cv_support_alsamidi=no))))
+ if test "X$allegro_cv_support_alsamidi" = "Xyes" &&
+ test "X$allegro_cv_support_alsadigi" != "Xyes" &&
+ test -z "$allegro_support_modules"; then
+
Patch2: %{name}-opt.patch
Patch3: %{name}-ldflags.patch
Patch4: %{name}-frame-pointer.patch
+Patch5: %{name}-alsa-1_0.patch
URL: http://alleg.sourceforge.net/
BuildRequires: XFree86-devel
%{?with_alsa:BuildRequires: alsa-lib-devel}
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%build
%{__aclocal}