#!/bin/rc
CC=cc
CFLAGS='-D_POSIX_SOURCE -D_BSD_EXTENSION'
opts = ( --build i386-lucent-plan9 )
opts = ( $opts --bindir /$objtype/bin )
opts = ( $opts --datadir /lib )
opts = ( $opts --exec-prefix /$objtype/bin )
opts = ( $opts --includedir /sys/include/ape )
opts = ( $opts --prefix /lib )
opts = ( $opts --sbindir /$objtype/bin )
opts = ( $opts --sharedstatedir /lib )
opts = ( $opts --disable-nls )
opts = ( $opts --disable-dso )
# fix config.sub if present
csub=`{du -a | grep config.sub | awk '{print $2}'}
if (~ $#csub 1) {
sed 's/\-gnu\* \| \-bsd/\-plan9\* \| &/' $csub > csub.$pid
mv csub.$pid $csub
}
# fix configure
lsdi=`{grep 'ls \-di' configure}
if (! ~ $#lsdi 0) {
sed 's/ls \-di/ls/' < configure > conf.$pid
mv conf.$pid configure
}
echo ape/psh configure $* $opts
|