--- gmp.SlackBuild	2006-05-08 15:50:54.000000000 -0400
+++ gmp.SlackBuild.s390x	2006-08-06 19:37:09.000000000 -0400
@@ -14,7 +14,7 @@
   SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
 elif [ "$ARCH" = "i486" ]; then
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
-elif [ "$ARCH" = "s390" ]; then
+elif [ "$ARCH" = "s390x" ]; then
   SLKCFLAGS="-O2"
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2"
@@ -24,7 +24,10 @@
 rm -rf gmp-$VERSION
 tar xjvf $CWD/gmp-$VERSION.tar.bz2
 cd gmp-$VERSION
-chown -R root:root .
+cat $CWD/x86-fat.diff | patch -p0 --backup --suffix=.orig
+cat $CWD/gmp-s390x.patch | patch -p1 --backup --suffix=.orig
+autoconf
+chown -R root.root .
 find . -perm 664 -exec chmod 644 {} \;
 find . -perm 600 -exec chmod 644 {} \;
 find . -perm 444 -exec chmod 644 {} \;
@@ -38,6 +41,8 @@
 CFLAGS="$SLKCFLAGS" \
 ./configure \
   --prefix=/usr \
+  --libdir=/usr/lib64 \
+  --infodir=/usr/info \
   --with-gnu-ld \
   --enable-cxx \
   --enable-mpbsd \
