#! /bin/sh
# Remove the files created by this script before running it.
#rm -f config.cache config.status config.log
rm -f makefile src/Makefile include/autoconf.h

if test ! -f configure
then
	autoconf
fi

OUT=td-conf.out
cat >>$OUT <<EOF/
** `date`
** node: `uname -a`
** from: `pwd`
** user: `id`
** conf: $*
EOF/
OPTS="$*"

CC="${CC-cc}"

# set --with-domain-name and
#     --with-nntp-default-server to your local needs

CFLAGS="$CFLAGS" \
CC="$CC" \
./configure --verbose \
	--enable-nntp-only \
	--enable-prototypes \
	--disable-echo \
	--disable-mime-strict-charset \
	--with-domain-name=/etc/NNTP_INEWS_DOMAIN \
	--with-coffee \
        $OPTS $* 2>&1 |tee -a $OUT
