# $Id: configure.in 9734 2006-02-24 15:14:54Z joostvb $
# $URL: https://infix.uvt.nl/its-id/trunk/sources/authello/templates/configure.in $

# Copyright (C) 2005, 2006 Tilburg University http://www.uvt.nl/
#
# This file is part of authello.  Authello is free software; you can redistribute
# it and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.  You should have received a copy of
# the GNU General Public License along with this file (see COPYING).

AC_INIT()
AM_INIT_AUTOMAKE(authello, 0.91)

AC_PATH_PROGS(BASH, bash sh)
AC_PATH_PROGS(PERL, perl)

#
# locate pod2man, complain if not found.
# It is needed later on to extract pod from the base authello perl script
# similar test could be made for perl and basch of course
AC_PATH_PROGS(POD2MAN, pod2man)

if test -z "$POD2MAN"
then
        AC_MSG_ERROR(cannot find pod2man in your PATH.)
fi

AC_PROG_INSTALL
#
# added by the developer, to have his own variable in addition to the standard set
#
AC_ARG_WITH(testlibdir,
      [  --with-testlibdir=DIR   where perl modules are search FIRST (primarily for testing purposes)] ,
      [  if test -n "$withval"
         then
          TESTLIBDIR="$withval"
         fi]
           )

AC_SUBST(TESTLIBDIR)

# AC_DEFINE_DIR is defined in acinclude.m4
AC_DEFINE_DIR(LOCALSTATEDIR, [localstatedir])

# demonstrate the possibility to place our config files in SYSCONFDIR
AC_DEFINE_DIR(SYSCONFDIR, [sysconfdir/$PACKAGE])
AC_DEFINE_DIR(BINDIR, [bindir])
AC_DEFINE_DIR(DATADIR, [datadir])

# note:  all scripts must be listed in src/Makefile.am in the BIN_SCRIPTS as well
# actII and bootstrap are additional scripts:
AC_OUTPUT([
  Makefile
  src/Makefile
  src/authello
  src/actII
])
