#! /bin/ksh
[ $# -eq 1 ] || {
  echo "Usage: OSR6BUILD /path/to/apache"
}

if [ "$1" = "/" ] ; then
  OSDAPX=/usr/lib/apache/bin/apxs
else
  OSDAPX=$1/Apache/osdapxs
fi

CC=cc \
CFLAGS='-Kpthread -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Kpentium  -Kalloca -D__i386__' \
./configure \
  --prefix=/usr \
  --with-apxs=$OSDAPX \
  --host=i586-pc-sysv5 \
  --build=i586-pc-sysv5
