dnl Process this file with autoconf to produce a configure script.

dnl This file is just some unique file that configure will check
dnl for to make sure it's in the right directory.
AC_INIT(tiger)

test "x$prefix" != "xNONE" || prefix=/usr/local

AC_ARG_WITH(tigerhome, [  --with-tigerhome=LOCATION        Location of all Tiger files],
tigerhome=$withval, tigerhome="no")
if test "$tigerhome" = "no" ; then
        tigerhome=${prefix}/tiger
fi

AC_ARG_WITH(tigerconfig, [  --with-tigerconfig=LOCATION        Location of Tiger configuration files],
tigerconfig=$withval, tigerconfig="no")
if test "$tigerconfig" = "no" ; then
        tigerconfig=${sysconfdir}/tiger

fi

AC_ARG_WITH(tigerwork, [  --with-tigerwork=LOCATION        Location of all the temporary files created by Tiger],
tigerwork=$withval, tigerwork="no")
if test "$tigerwork" = "no" ; then
        tigerwork=${localstatedir}/tiger/run
fi

AC_ARG_WITH(tigerlog, [  --with-tigerlog=LOCATION        Location of all the logfiles created by Tiger],
tigerlog=$withval, tigerlog="no")
if test "$tigerlog" = "no" ; then
        tigerlog=${localstatedir}/tiger/log
fi

AC_ARG_WITH(tigerbin, [  --with-tigerbin=LOCATION        Location of the Tiger binaries],
tigerbin=$withval, tigerbin="no")
if test "$tigerbin" = "no" ; then
        tigerbin=${sbindir}
fi

dnl Full expansion for when it's needed (in manpage)
tigerworkdir=`eval echo $tigerwork`
tigerlogdir=`eval echo $tigerlog`
tigerconfigdir=`eval echo $tigerconfig`
tigerhomedir=`eval echo $tigerhome`
AC_SUBST(tigerhome)
AC_SUBST(tigerwork)
AC_SUBST(tigerlog)
AC_SUBST(tigerbin)
AC_SUBST(tigerconfig)
AC_SUBST(tigerworkdir)
AC_SUBST(tigerlogdir)
AC_SUBST(tigerconfigdir)
AC_SUBST(tigerhomedir)
AC_OUTPUT(Makefile
	man/tiger.8
	man/tigercron.8)
