dnl Process this file with autoconf to produce a configure script.
AC_INIT(tdf2html.pl.in)

dnl We use a path for perl so the #! line in autoscan will work.
AC_PATH_PROGS(PERL5, perl5 perl, no)
AC_SUBST(PERL5)dnl
if test "$PERL5" != no; then
	$PERL5 -e 'require 5'
	if test $? != 0 ; then
		PERL5=no
		AC_MSG_WARN(perl version 5 required)
		exit
	fi
fi

if test $prefix = "NONE"; then
	prefix=/usr/local
fi

AC_SUBST(LIBDIR)
if test -f ${HOME}/.tdssetup ; then
	LIBDIR=`sed -n '/^_LibDir	/s///p' ${HOME}/.tdssetup`
else
	LIBDIR=$prefix/share/tds/web_diary_dir/lib
fi

AC_OUTPUT(Makefile)
