|
Packit |
e4b6da |
dnl Process this file with autoconf to produce configure.
|
|
Packit |
e4b6da |
# vim: noet sw=8
|
|
Packit |
e4b6da |
# $Id: configure.ac,v 1.21 2007/03/03 13:44:14 stevecheng Exp $
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
AC_INIT([docbook2X], 0.8.8, [stevecheng@users.sourceforge.net], docbook2X)
|
|
Packit |
e4b6da |
AC_CONFIG_SRCDIR(perl/docbook2X.pl)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
AM_INIT_AUTOMAKE(docbook2X, 0.8.8)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
XSLT_PROCESSOR="libxslt"
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
AC_ARG_WITH(html-xsl,
|
|
Packit |
e4b6da |
AC_HELP_STRING([--with-html-xsl],
|
|
Packit |
e4b6da |
[build HTML documentation using Norman Walsh's DocBook XSL stylesheets (default is no)]),
|
|
Packit |
e4b6da |
HTML_XSL="$withval",
|
|
Packit |
e4b6da |
HTML_XSL=no)
|
|
Packit |
e4b6da |
AC_ARG_WITH(xslt-processor,
|
|
Packit |
e4b6da |
AC_HELP_STRING([--with-xslt-processor=ARG],
|
|
Packit |
e4b6da |
[which XSLT processor to use (possible choices are: libxslt, saxon, xalan-j)]),
|
|
Packit |
e4b6da |
XSLT_PROCESSOR="$withval",
|
|
Packit |
e4b6da |
XSLT_PROCESSOR="libxslt")
|
|
Packit |
e4b6da |
AC_ARG_WITH(resolver-jars,
|
|
Packit |
e4b6da |
AC_HELP_STRING([--with-resolver-jars=ARG],
|
|
Packit |
e4b6da |
[specify Java class path for Apache XML Commons catalogs resolver]),
|
|
Packit |
e4b6da |
RESOLVER_JARS="$withval",
|
|
Packit |
e4b6da |
RESOLVER_JARS="")
|
|
Packit |
e4b6da |
AC_ARG_WITH(saxon-jars,
|
|
Packit |
e4b6da |
AC_HELP_STRING([--with-saxon-jars=ARG],
|
|
Packit |
e4b6da |
[specify Java class path for SAXON XSLT processor]),
|
|
Packit |
e4b6da |
SAXON_JARS="$withval",
|
|
Packit |
e4b6da |
SAXON_JARS="")
|
|
Packit |
e4b6da |
AC_ARG_WITH(xalan-jars,
|
|
Packit |
e4b6da |
AC_HELP_STRING([--with-xalan-jars=ARG],
|
|
Packit |
e4b6da |
[specify Java class path for Xalan XSLT processor]),
|
|
Packit |
e4b6da |
XALAN_JARS="$withval",
|
|
Packit |
e4b6da |
XALAN_JARS="")
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
AM_CONDITIONAL(HAVE_HTML_XSL, test "x$HTML_XSL" != "xno")
|
|
Packit |
e4b6da |
AC_SUBST(XSLT_PROCESSOR)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl Check for compiler, Perl...
|
|
Packit |
e4b6da |
AC_PROG_CC
|
|
Packit |
e4b6da |
AC_PROG_INSTALL
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
AC_PATH_PROG(PERL, perl)
|
|
Packit |
e4b6da |
if test -z "$PERL" ; then
|
|
Packit |
e4b6da |
AC_MSG_ERROR(You need Perl 5)
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl For db2x_manxml and db2x_texixml
|
|
Packit |
e4b6da |
AC_PATH_PROG(ICONV, iconv piconv)
|
|
Packit |
e4b6da |
if test -z "$ICONV" ; then
|
|
Packit |
e4b6da |
AC_MSG_ERROR(You need iconv)
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
dnl (piconv is an iconv implementation from Perl 5.8.0.
|
|
Packit |
e4b6da |
dnl I haven't heard of anyone using it regularly, but
|
|
Packit |
e4b6da |
dnl I added it here for the convenience of non-GNU
|
|
Packit |
e4b6da |
dnl platforms that may not already have a working
|
|
Packit |
e4b6da |
dnl iconv.)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl For sgml2xml-isoent
|
|
Packit |
e4b6da |
AC_PATH_PROG(SX, sgml2xml sx)
|
|
Packit |
e4b6da |
AC_PATH_PROG(OSX, osx)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl For db2x_texixml
|
|
Packit |
e4b6da |
AC_PATH_PROG(MAKEINFO, makeinfo)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl For testing man pages.
|
|
Packit |
e4b6da |
dnl We check for groff only; Unix nroff is useless for testing.
|
|
Packit |
e4b6da |
AC_PATH_PROG(GROFF, groff)
|
|
Packit |
e4b6da |
AM_CONDITIONAL(HAVE_GROFF, test -n "$GROFF")
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl For validating the docbook2X documentation XML sources
|
|
Packit |
e4b6da |
AC_PATH_PROG(XMLLINT, xmllint)
|
|
Packit |
e4b6da |
AM_CONDITIONAL(HAVE_XMLLINT, test -n "$XMLLINT")
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl Tidy is for tidying up the output from the HTML stylesheets.
|
|
Packit |
e4b6da |
AC_PATH_PROG(TIDY, tidy)
|
|
Packit |
e4b6da |
AM_CONDITIONAL(HAVE_TIDY, test -n "$TIDY")
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl The XSLT processors
|
|
Packit |
e4b6da |
AC_PATH_PROG(XSLTPROC, xsltproc)
|
|
Packit |
e4b6da |
AC_PATH_PROG(JAVA, java)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
if test -z "$RESOLVER_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/local/share/java/resolver.jar,
|
|
Packit |
e4b6da |
[ RESOLVER_JARS=/usr/local/share/java/resolver.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
if test -z "$RESOLVER_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/share/java/resolver.jar,
|
|
Packit |
e4b6da |
[ RESOLVER_JARS=/usr/share/java/resolver.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
if test -z "$RESOLVER_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/share/java/xml-commons-resolver-1.1.jar,
|
|
Packit |
e4b6da |
[ RESOLVER_JARS=/usr/share/java/xml-commons-resolver-1.1.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
AC_SUBST(RESOLVER_JARS)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
if test -z "$SAXON_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/local/share/java/saxon.jar,
|
|
Packit |
e4b6da |
[ SAXON_JARS=/usr/local/share/java/saxon.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
if test -z "$SAXON_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/share/java/saxon.jar,
|
|
Packit |
e4b6da |
[ SAXON_JARS=/usr/share/java/saxon.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
AC_SUBST(SAXON_JARS)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
if test -z "$XALAN_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/local/share/java/xalan.jar,
|
|
Packit |
e4b6da |
[ XALAN_JARS=/usr/local/share/java/xalan.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
if test -z "$XALAN_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/share/java/xalan.jar,
|
|
Packit |
e4b6da |
[ XALAN_JARS=/usr/share/java/xalan.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
if test -z "$XALAN_JARS" ; then
|
|
Packit |
e4b6da |
AC_CHECK_FILE(/usr/share/java/xalan2.jar,
|
|
Packit |
e4b6da |
[ XALAN_JARS=/usr/share/java/xalan2.jar ])
|
|
Packit |
e4b6da |
fi
|
|
Packit |
e4b6da |
AC_SUBST(XALAN_JARS)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl For utf8trans
|
|
Packit |
e4b6da |
AM_CONFIG_HEADER(utf8trans/config.h)
|
|
Packit |
e4b6da |
AC_CHECK_HEADERS(getopt.h)
|
|
Packit |
e4b6da |
AC_CHECK_FUNCS(getline, ,)
|
|
Packit |
e4b6da |
AC_CHECK_FUNCS(getopt_long,,)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl ----------------------------------------------------------------------
|
|
Packit |
e4b6da |
dnl
|
|
Packit |
e4b6da |
dnl Default paths enbedded in db2x_xsltproc binary:
|
|
Packit |
e4b6da |
dnl
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl This bit copied from libggi's configure:
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
|
Packit |
e4b6da |
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl Use static_* to substitute into files where values shouldn't
|
|
Packit |
e4b6da |
dnl dynamicly change. Makefiles need to be able to dynamicly change
|
|
Packit |
e4b6da |
dnl paths between build and install and shouldn't use these static_*.
|
|
Packit |
e4b6da |
dnl Files that will be installed must always show the final location where
|
|
Packit |
e4b6da |
dnl they will reside and should use these static_* values.
|
|
Packit |
e4b6da |
dnl Ensure that all static_* are fully expanded.
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
eval static_datadir="$datadir"
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
eval static_bindir="$bindir"
|
|
Packit |
e4b6da |
old_val=""
|
|
Packit |
e4b6da |
until test "$static_bindir" = "$old_val"; do
|
|
Packit |
e4b6da |
old_val="$static_bindir"
|
|
Packit |
e4b6da |
eval static_bindir="$static_bindir"
|
|
Packit |
e4b6da |
done
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl For perl/config.pl
|
|
Packit |
e4b6da |
INSTALLED_UTF8TRANS="$static_bindir/`echo utf8trans | sed -e "$program_transform_name"`"
|
|
Packit |
e4b6da |
INSTALLED_CHARMAP_ROFF="$static_datadir/docbook2X/charmaps/roff.charmap"
|
|
Packit |
e4b6da |
INSTALLED_CHARMAP_TEXI="$static_datadir/docbook2X/charmaps/texi.charmap"
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
INSTALLED_DB2X_MANXML="$static_bindir/`echo db2x_manxml | sed -e "$program_transform_name"`"
|
|
Packit |
e4b6da |
INSTALLED_DB2X_TEXIXML="$static_bindir/`echo db2x_texixml | sed -e "$program_transform_name"`"
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
INSTALLED_STYLESHEETS_CATALOG="$static_datadir/docbook2X/xslt/catalog.xml"
|
|
Packit |
e4b6da |
INSTALLED_DB2X_XSLTPROC="$static_bindir/`echo db2x_xsltproc | sed -e "$program_transform_name"`"
|
|
Packit |
e4b6da |
INSTALLED_SGML2XML_ISOENT="$static_bindir/`echo sgml2xml-isoent | sed -e "$program_transform_name"`"
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_UTF8TRANS)
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_CHARMAP_ROFF)
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_CHARMAP_TEXI)
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_DB2X_MANXML)
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_DB2X_TEXIXML)
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_STYLESHEETS_CATALOG)
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_DB2X_XSLTPROC)
|
|
Packit |
e4b6da |
AC_SUBST(INSTALLED_SGML2XML_ISOENT)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl Turn on compiler warnings (for utf8trans)
|
|
Packit |
e4b6da |
CFLAGS="${CFLAGS} -Wall"
|
|
Packit |
e4b6da |
AC_SUBST(CFLAGS)
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
dnl ----------------------------------------------------------------------
|
|
Packit |
e4b6da |
dnl
|
|
Packit |
e4b6da |
dnl Makefile output
|
|
Packit |
e4b6da |
dnl
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
AC_OUTPUT(
|
|
Packit |
e4b6da |
Makefile
|
|
Packit |
e4b6da |
charmaps/Makefile dtd/Makefile
|
|
Packit |
e4b6da |
xslt/Makefile
|
|
Packit |
e4b6da |
xslt/common/Makefile xslt/common/text/Makefile
|
|
Packit |
e4b6da |
xslt/man/Makefile xslt/texi/Makefile
|
|
Packit |
e4b6da |
xslt/documentation/Makefile xslt/backend/Makefile
|
|
Packit |
e4b6da |
perl/Makefile
|
|
Packit |
e4b6da |
perl/config.pl perl/sgml2xml-isoent
|
|
Packit |
e4b6da |
utf8trans/Makefile
|
|
Packit |
e4b6da |
doc/Makefile
|
|
Packit |
e4b6da |
test/Makefile test/refentry/Makefile test/complete-manuals/Makefile
|
|
Packit |
e4b6da |
test/utf8trans/Makefile test/sgml/Makefile
|
|
Packit |
e4b6da |
)
|
|
Packit |
e4b6da |
|