GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
1
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
Handbook
Browse code
- Fixed message for XSLT variable check.
master
1 parent
f4648f8
commit
a9438dee421441260bdd390b8c02faed63bf3fc2
nstanger
authored
on 30 Nov 2010
Patch
Showing
1 changed file
configuration/configure.ac
Ignore Space
Show notes
View
configuration/configure.ac
dnl dnl $Id$ dnl dnl Autoconf script for database paper handbooks. It creates a ./configure dnl that sets up the local configuration of tools, so that it's easy to get dnl up and going again quickly should some package suddenly decide to rearange dnl itself and install things in different locations. It also makes things dnl completely independent of whatever package manager we happen to be using. dnl dnl All tools used in the handbook makefiles should be included here, so as dnl to abstract things as much as possible. This includes even "obvious" things dnl like cp, mv, etc., and also any required environment variables. dnl AC_PREREQ([2.68]) AC_INIT([INFO Database Handbook], [1.0]) dnl dnl Files to be generated. Currently this is only make include file containing dnl the list of tools used. We could use autoconf to just insert these directly dnl into each of the files in ../make-includes and ../makefile-templates, as dnl appropriate, but it seems to make more sense to define them all in one dnl place. This will make it easier to reuse them in other (especially dnl non-handbook) contexts. dnl AC_CONFIG_FILES([../make-includes/local_configuration.make]) dnl dnl Check required environment variables. Note that we don't error out if any dnl aren't defined, as the makefiles will warn about this anyway. It's really dnl just more for completeness than anything that they're included here. dnl AC_MSG_NOTICE([checking handbook environment]) AC_ARG_VAR(TEACHING_SHARED, [the root level of the shared teaching directory (e.g., /path/to/Teaching/Shared)]) AC_ARG_VAR(ALL_PAPERS_ROOT, [the root level of the current teaching directory hierarchy (e.g., /path/to/Teaching/2005)]) AC_ARG_VAR(HANDBOOK_INSTALL_ROOT, [the root level of the directory hierarchy on the web server (e.g., \\INFO-NTS-12\DBCourses$)]) AC_ARG_VAR(XSLT, [default XSLT processor (in order of preference: "saxon-b", "saxon", "xalan-j", "xalan-c")]) AC_CHECK_ENVVAR([TEACHING_SHARED]) AC_CHECK_ENVVAR([ALL_PAPERS_ROOT]) AC_CHECK_ENVVAR([HANDBOOK_INSTALL_ROOT]) dnl This one is required for configuration, so handle separately. AC_MSG_CHECKING([variable XSLT]) if test -z $XSLT; then AC_MSG_RESULT([no]) AC_MSG_ERROR([required environment variable XSLT not defined]) else AC_MSG_RESULT([$XSLT]) # Figure out the appropriate name of the executable based on $XSLT. case $XSLT in "xalan-c") xslt_processor="Xalan";; "xalan-j") xslt_processor="xalan";; *) xslt_processor=$XSLT;; esac fi dnl dnl Check required tools. dnl AC_MSG_NOTICE([checking for required tools]) dnl dnl File system. dnl AC_PROG_MKDIR_P AC_PATH_PROG(MV, mv) AC_PATH_PROG(CP, cp) AC_PATH_PROG(RM, rm) AC_PATH_PROG(TOUCH, touch) dnl dnl Searching. dnl AC_PROG_GREP dnl We need GNU find as we use some of its specific command-line switches. AC_CACHE_CHECK([for GNU find], [ac_cv_path_FIND], [AC_PATH_PROGS_FEATURE_CHECK([FIND], [gnufind gfind find], [if ( sh -c "$ac_path_FIND --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ); then ac_cv_path_FIND=$ac_path_FIND ac_path_FIND_found=: fi ], [AC_MSG_ERROR([could not find GNU find (irony)])])]) AC_SUBST([FIND], [$ac_cv_path_FIND]) dnl dnl Tests. dnl AC_PATH_PROG(TEST, test) AC_PATH_PROG(TRUE, true) AC_PATH_PROG(FALSE, false) dnl dnl Output. dnl AC_PATH_PROG(ECHO, echo) AC_PATH_PROG(CAT, cat) AC_PATH_PROG(ANNOUNCE, announce) dnl dnl Miscellaneous utilities. dnl AC_PROG_SED AC_PATH_PROG(CUT, cut) AC_PROG_PERL_VERSION(5.6.0) AC_PATH_PROG(DATE, date) AC_PATH_PROG(EXPR, expr) AC_PROG_JAVA AC_CHECK_CLASS([org.apache.xml.resolver.apps.resolver]) dnl We make heavy use of features specific to GNU make. AC_CACHE_CHECK([for GNU make], [ac_cv_path_MAKE], [AC_PATH_PROGS_FEATURE_CHECK([MAKE], [gnumake gmake make], [if ( sh -c "$ac_path_MAKE --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ); then ac_cv_path_MAKE=$ac_path_MAKE ac_path_MAKE_found=: fi ], [AC_MSG_ERROR([could not find GNU make])])]) AC_SUBST([MAKE], [$ac_cv_path_MAKE]) dnl dnl LaTeX and friends. dnl AC_PROG_LATEX AC_PROG_PDFLATEX AC_PROG_XELATEX AC_PROG_DVIPS dnl dnl XML manipulation. dnl AC_PATH_PROG(XMLLINT, xmllint) dnl Use a different variable for the XSLT processor path to keep it distinct dnl from the XSLT environment variable, which serves a slightly different dnl purpose. However, we use the value derived from $XSLT above to seed the dnl executable name. AC_PATH_PROG(XSLTPROC, [$xslt_processor]) dnl dnl Image manipulation and conversion (includes PDF & PS). dnl AC_PATH_PROG(CONVERT, convert) AC_PATH_PROG(COMPOSITE, composite) AC_PATH_PROG(PDFNUP, pdfnup) AC_PATH_PROG(PDFCROP, pdfcrop) AC_PATH_PROG(PS2EPS, ps2eps) AC_PATH_PROG(PS2PDF, ps2pdf) AC_PATH_PROG(SHIFTBBOX, shiftbbox) AC_PATH_PROG(EPSTOPDF, epstopdf) AC_PATH_PROG(INKSCAPE, inkscape) AC_PATH_PROG(GS, gs) dnl dnl Plotting tools. dnl AC_PATH_PROG(PLOTICUS, ploticus) AC_PATH_PROG(R, R) AC_OUTPUT
dnl dnl $Id$ dnl dnl Autoconf script for database paper handbooks. It creates a ./configure dnl that sets up the local configuration of tools, so that it's easy to get dnl up and going again quickly should some package suddenly decide to rearange dnl itself and install things in different locations. It also makes things dnl completely independent of whatever package manager we happen to be using. dnl dnl All tools used in the handbook makefiles should be included here, so as dnl to abstract things as much as possible. This includes even "obvious" things dnl like cp, mv, etc., and also any required environment variables. dnl AC_PREREQ([2.68]) AC_INIT([INFO Database Handbook], [1.0]) dnl dnl Files to be generated. Currently this is only make include file containing dnl the list of tools used. We could use autoconf to just insert these directly dnl into each of the files in ../make-includes and ../makefile-templates, as dnl appropriate, but it seems to make more sense to define them all in one dnl place. This will make it easier to reuse them in other (especially dnl non-handbook) contexts. dnl AC_CONFIG_FILES([../make-includes/local_configuration.make]) dnl dnl Check required environment variables. Note that we don't error out if any dnl aren't defined, as the makefiles will warn about this anyway. It's really dnl just more for completeness than anything that they're included here. dnl AC_MSG_NOTICE([checking handbook environment]) AC_ARG_VAR(TEACHING_SHARED, [the root level of the shared teaching directory (e.g., /path/to/Teaching/Shared)]) AC_ARG_VAR(ALL_PAPERS_ROOT, [the root level of the current teaching directory hierarchy (e.g., /path/to/Teaching/2005)]) AC_ARG_VAR(HANDBOOK_INSTALL_ROOT, [the root level of the directory hierarchy on the web server (e.g., \\INFO-NTS-12\DBCourses$)]) AC_ARG_VAR(XSLT, [default XSLT processor (in order of preference: "saxon-b", "saxon", "xalan-j", "xalan-c")]) AC_CHECK_ENVVAR([TEACHING_SHARED]) AC_CHECK_ENVVAR([ALL_PAPERS_ROOT]) AC_CHECK_ENVVAR([HANDBOOK_INSTALL_ROOT]) dnl This one is required for configuration, so handle separately. AC_MSG_CHECKING([XSLT]) if test -z $XSLT; then AC_MSG_RESULT([no]) AC_MSG_ERROR([required environment variable XSLT not defined]) else AC_MSG_RESULT([$XSLT]) # Figure out the appropriate name of the executable based on $XSLT. case $XSLT in "xalan-c") xslt_processor="Xalan";; "xalan-j") xslt_processor="xalan";; *) xslt_processor=$XSLT;; esac fi dnl dnl Check required tools. dnl AC_MSG_NOTICE([checking for required tools]) dnl dnl File system. dnl AC_PROG_MKDIR_P AC_PATH_PROG(MV, mv) AC_PATH_PROG(CP, cp) AC_PATH_PROG(RM, rm) AC_PATH_PROG(TOUCH, touch) dnl dnl Searching. dnl AC_PROG_GREP dnl We need GNU find as we use some of its specific command-line switches. AC_CACHE_CHECK([for GNU find], [ac_cv_path_FIND], [AC_PATH_PROGS_FEATURE_CHECK([FIND], [gnufind gfind find], [if ( sh -c "$ac_path_FIND --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ); then ac_cv_path_FIND=$ac_path_FIND ac_path_FIND_found=: fi ], [AC_MSG_ERROR([could not find GNU find (irony)])])]) AC_SUBST([FIND], [$ac_cv_path_FIND]) dnl dnl Tests. dnl AC_PATH_PROG(TEST, test) AC_PATH_PROG(TRUE, true) AC_PATH_PROG(FALSE, false) dnl dnl Output. dnl AC_PATH_PROG(ECHO, echo) AC_PATH_PROG(CAT, cat) AC_PATH_PROG(ANNOUNCE, announce) dnl dnl Miscellaneous utilities. dnl AC_PROG_SED AC_PATH_PROG(CUT, cut) AC_PROG_PERL_VERSION(5.6.0) AC_PATH_PROG(DATE, date) AC_PATH_PROG(EXPR, expr) AC_PROG_JAVA AC_CHECK_CLASS([org.apache.xml.resolver.apps.resolver]) dnl We make heavy use of features specific to GNU make. AC_CACHE_CHECK([for GNU make], [ac_cv_path_MAKE], [AC_PATH_PROGS_FEATURE_CHECK([MAKE], [gnumake gmake make], [if ( sh -c "$ac_path_MAKE --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ); then ac_cv_path_MAKE=$ac_path_MAKE ac_path_MAKE_found=: fi ], [AC_MSG_ERROR([could not find GNU make])])]) AC_SUBST([MAKE], [$ac_cv_path_MAKE]) dnl dnl LaTeX and friends. dnl AC_PROG_LATEX AC_PROG_PDFLATEX AC_PROG_XELATEX AC_PROG_DVIPS dnl dnl XML manipulation. dnl AC_PATH_PROG(XMLLINT, xmllint) dnl Use a different variable for the XSLT processor path to keep it distinct dnl from the XSLT environment variable, which serves a slightly different dnl purpose. However, we use the value derived from $XSLT above to seed the dnl executable name. AC_PATH_PROG(XSLTPROC, [$xslt_processor]) dnl dnl Image manipulation and conversion (includes PDF & PS). dnl AC_PATH_PROG(CONVERT, convert) AC_PATH_PROG(COMPOSITE, composite) AC_PATH_PROG(PDFNUP, pdfnup) AC_PATH_PROG(PDFCROP, pdfcrop) AC_PATH_PROG(PS2EPS, ps2eps) AC_PATH_PROG(PS2PDF, ps2pdf) AC_PATH_PROG(SHIFTBBOX, shiftbbox) AC_PATH_PROG(EPSTOPDF, epstopdf) AC_PATH_PROG(INKSCAPE, inkscape) AC_PATH_PROG(GS, gs) dnl dnl Plotting tools. dnl AC_PATH_PROG(PLOTICUS, ploticus) AC_PATH_PROG(R, R) AC_OUTPUT
Show line notes below