#! /usr/bin/bash
CONFIG_SHELL=/usr/bin/bash
SHELL=/usr/bin/bash
PATH=/usr/gnu/bin:/usr/bin:/bin:$PATH
export CONFIG_SHELL SHELL PATH

[ $# -eq 1 ] || {
  echo "Usage: OSR5BUILD /path/to/source"
  echo "  Must be invoked from desired build directory"
  exit 1
}

CC='cc -belf -Kalloca -DFD_SETSIZE=11000 -L/usr/gnu/include -L/usr/gnu/lib' CFLAGS='-O3' \
   $1/lynx/configure \
   --build=i586-pc-sco3.2v5.0 \
   --host=i586-pc-sco3.2v5.0 \
   --prefix=/usr \
   --sysconfdir=/etc \
   --libdir=/usr/lib/lynx \
   --infodir=/usr/gnu/info \
   --srcdir=$1/lynx \
   --disable-nls \
   --without-included-gettext \
   --with-ssl \
   --with-screen=curses \
   --enable-color-style \
   --enable-default-colors \
   --enable-justify-elts \
   --enable-locale-charset \
   --enable-nested-tables \
   --enable-gzip-help \
   --with-bzlib \
   --with-zlib
