
AC_INIT(./config)

dnl AC_PREFIX_DEFAULT(`pwd`)

AC_CONFIG_AUX_DIR(./config)

dnl AC_CANONICAL_SYSTEM

CONFIGSHELL=${CONFIG_SHELL:-/bin/sh}
AC_SUBST(CONFIGSHELL)

AC_CHECK_PROGS(SHL, ksh bash sh)
AC_SUBST(SHL)

AC_PROG_AWK

hpfdir=HpfFrontEnd-1.56
adlibdir=Adlib-2.00
AC_SUBST(hpfdir)
AC_SUBST(adlibdir)

COMPILERHOME=`pwd`
HPFHOME=`pwd`/$hpfdir
ADLIBHOME=`pwd`/$adlibdir
AC_SUBST(COMPILERHOME)
AC_SUBST(HPFHOME)
AC_SUBST(ADLIBHOME)

AC_CONFIG_SUBDIRS($hpfdir $adlibdir)

AC_OUTPUT(
Makefile 
scripts/Makefile 
examples/Makefile
examples/comprehensive/Makefile
examples/basic/Makefile
examples/outofcore/Makefile
scripts/hpfc:scripts/hpfc.in
scripts/tests:scripts/tests.in,
chmod +x scripts/hpfc
chmod +x scripts/tests
)

echo
echo
echo '*#  '
echo '*# Please register your copy of HPFC with us by sending email'
echo '*# to zheng.gb@svr.bimp.pku.edu.cn with the message'
echo "*# 'subscribe hpfc-users'"
echo '*# This will enable us to notify you of new releases of HPFC'
echo '*# as well as bug fixes.'
echo '*#  '
echo "*# If compilation is successful, you can copy 'scripts/hpfc'" 
echo '*# to your convenient directory.'
echo "*# and use 'hpfc' to compile a HPF program just like 'f77'."
echo '*#'
echo '*# Configure done. Now type make'

