AC_INIT(Makefile.in)
AC_COPYRIGHT([Copyright (c) 2011 Perforce (http://www.perforce.com/)])
FOP=fop
XSLTPROC=xsltproc
XMLLINT=xmllint
AC_ARG_WITH(fop, [ --with-fop Where to find Apache FOP],
[
if test "x$withval" != "xno"; then
FOP="$withval"
fi
]
)
AC_PATH_PROG(FOP, $FOP)
AC_ARG_WITH(xsltproc, [ --with-xsltproc Where to find xsltproc],
[
if test "x$withval" != "xno"; then
XSLTPROC="$withval"
fi
]
)
AC_PATH_PROG(XSLTPROC, $XSLTPROC)
AC_ARG_WITH(xmllint, [ --with-xmllint Where to find xmllint],
[
if test "x$withval" != "xno"; then
XMLLINT="$withval"
fi
]
)
AC_PATH_PROG(XMLLINT, $XMLLINT)
ECSRC=../trunk
AC_ARG_WITH(ecsrc, [ --with-ecsrc Where to find the ecelerity source],
[
if test "x$withval" != "xno"; then
ECSRC="$withval"
fi
]
)
VERSION=Unknown
AC_ARG_WITH(version, [ --with-version Release version],
[
if test "x$withval" != "xno"; then
VERSION="$withval"
fi
]
)
AC_SUBST(FOP)
AC_SUBST(XSLTPROC)
AC_SUBST(XMLLINT)
AC_SUBST(ECSRC)
AC_SUBST(VERSION)
HERE=`pwd`
AC_SUBST(HERE)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
cat > config.nice <<EOT
#!/bin/sh
./configure \
--with-ecsrc='$ECSRC' \
--with-release='$VERSION' \
--with-xsltproc='$XSLTPROC' \
--with-xmllint='$XMLLINT' \
--with-fop='$FOP'
EOT
chmod +x config.nice