--- slang.SlackBuild	2006-08-17 02:01:08.000000000 -0400
+++ slang.SlackBuild.s390x	2006-09-16 23:20:29.000000000 -0400
@@ -13,7 +13,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"
@@ -31,6 +31,7 @@
 CFLAGS="$SLKCFLAGS" \
   ./configure \
   --prefix=/usr \
+  --libdir=/usr/lib64 \
   --includedir=/usr/include \
   --disable-static \
   $ARCH-slackware-linux
@@ -38,11 +39,11 @@
 make -j4 || exit 1
 make install DESTDIR=$PKG
 make -j4 elf || exit 1
-make install-elf DESTDIR=$PKG
+make install-elf LDFLAGS=-L$TMP/slang-$VERSION/src/elf"$ARCH"objs/ DESTDIR=$PKG
 
-chmod 755 $PKG/usr/lib/libslang.so.$VERSION
+chmod 755 $PKG/usr/lib64/libslang.so.$VERSION
 # --disable-static doesn't always work, but this is guaranteed:
-rm -f $PKG/usr/lib/*.a
+rm -f $PKG/usr/lib64/*.a
 
 ( cd $PKG
   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
