#!/bin/sh
CWD=`pwd`
cd /tmp
tar xyvf $CWD/lesstif-0.92.32.tar.bz2
cd lesstif-0.92.32
CFLAGS=-O2 ./configure --enable-shared \
            --enable-static \
            --enable-build-12 \
            --enable-build-20 \
            --enable-build-Xlt \
            --enable-build-Xbae \
            --enable-xbae-24bit \
            --enable-xbae-row-heights \
            --disable-debug \
            --enable-production \
            --prefix=/usr/X11R6 \
            i386-slackware-linux
# Not yet:
#            --enable-build-21
make
rm -rf /etc/X11/mwm /usr/X11R6/lib/X11/mwm
# I know this is destructive, but that's the way the cookie crumbles:
rm -f /usr/X11R6/lib/X11/config/host.def
make install
( cd /usr/doc ; rm -rf lesstif-0.92.32 ; ln -sf /usr/X11R6/LessTif lesstif-0.92.32 )
# The config file handles adding this in:
( cd /usr/X11R6/lib/X11/config ; mv host.def host.def-lesstif )
( cd /usr/X11R6/lib/X11 ; cp -a mwm /etc/X11 ; rm -rf mwm ; ln -sf ../../../../etc/X11/mwm . )
# Look out for this one, too:
rm -rf /install
mkdir /install
cat $CWD/doinst.sh > /install/doinst.sh
