#! /bin/sh

# local options:  ac_help is the help message that describes them
# and LOCAL_AC_OPTIONS is the script that interprets them.  LOCAL_AC_OPTIONS
# is a script that's processed with eval, so you need to be very careful to
# make certain that what you quote is what you want to quote.

ac_help='--with-user-dir		Where user web pages are found (htdocs)
--with-pages		What sort of pages to theme (.html:.htm)'

# load in the configuration file
#
TARGET=theme
. ./configure.inc

# and away we go
#
AC_INIT theme

test "$_set_execdir" || AC_EXECDIR=${AC_PREFIX}/www/cgi-bin

AC_PROG_CC

rm -f $$
trap 1 2 3 9 15

AC_CHECK_HEADERS magic.h || AC_FAIL "Theme requires libmagic(3)"

if AC_CHECK_HEADERS sys/types.h sys/mman.h; then
    AC_CHECK_FUNCS mmap
    AC_CHECK_FUNCS munmap
fi

MF_PATH_INCLUDE RANLIB ranlib true || AC_CONFIG RANLIB ':'

AC_DEFINE USER_DIR \"${WITH_USER_DIR:-htdocs}\"

AC_SUB VERSION `test -f VERSION && cat VERSION`
AC_DEFINE STD_PATH "\"${AC_PATH}\""

test $WITH_PAGES || WITH_PAGES=".html:.htm";

AC_DEFINE PAGES \"$WITH_PAGES\"

AC_OUTPUT Makefile
