Blame SOURCES/libmad-0.15.1b-multiarch.patch

039c1a
diff -up libmad-0.15.1b/Makefile.am.orig libmad-0.15.1b/Makefile.am
039c1a
--- libmad-0.15.1b/Makefile.am.orig	2009-01-25 14:35:56.000000000 +0200
039c1a
+++ libmad-0.15.1b/Makefile.am	2009-01-25 18:35:07.000000000 +0200
039c1a
@@ -110,15 +110,28 @@ mad.h: config.status config.h Makefile.a
039c1a
 	echo "# ifdef __cplusplus";  \
039c1a
 	echo 'extern "C" {';  \
039c1a
 	echo "# endif"; echo;  \
039c1a
-	if [ ".$(FPM)" != "." ]; then  \
039c1a
-		echo ".$(FPM)" | sed -e 's|^\.-D|# define |'; echo;  \
039c1a
-	fi;  \
039c1a
+	echo "# ifdef __i386__"; \
039c1a
+	echo "# define FPM_INTEL"; \
039c1a
+	echo "# define SIZEOF_LONG 4"; \
039c1a
+	echo "# endif"; \
039c1a
+	echo "#ifdef __x86_64__";\
039c1a
+	echo "# define FPM_64BIT"; \
039c1a
+	echo "# define SIZEOF_LONG 8"; \
039c1a
+	echo "# endif"; \
039c1a
+	echo "#ifdef __powerpc__"; \
039c1a
+	echo "#define FPM_PPC"; \
039c1a
+	echo "#define SIZEOF_LONG 4"; \
039c1a
+	echo "#endif"; \
039c1a
+	echo "#ifdef __powerpc64__"; \
039c1a
+	echo "#define FPM_PPC"; \
039c1a
+	echo "#define SIZEOF_LONG 8"; \
039c1a
+	echo "#endif"; echo; \
039c1a
 	sed -ne 's/^# *define  *\(HAVE_.*_ASM\).*/# define \1/p'  \
039c1a
 		config.h; echo;  \
039c1a
 	sed -ne 's/^# *define  *OPT_\(SPEED\|ACCURACY\).*/# define OPT_\1/p'  \
039c1a
 		config.h; echo;  \
039c1a
-	sed -ne 's/^# *define  *\(SIZEOF_.*\)/# define \1/p'  \
039c1a
-		config.h; echo;  \
039c1a
+	echo "# define SIZEOF_INT 4"; \
039c1a
+	echo "# define SIZEOF_LONG_LONG 8"; echo; \
039c1a
 	for header in $(exported_headers); do  \
039c1a
 		echo;  \
039c1a
 		sed -n -f $(srcdir)/mad.h.sed $(srcdir)/$$header;  \