[postgis-commits] svn - r2846 - trunk
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Mon Jul 14 04:40:47 PDT 2008
Author: mcayland
Date: 2008-07-14 04:40:41 -0700 (Mon, 14 Jul 2008)
New Revision: 2846
Modified:
trunk/configure.ac
Log:
Modify autoconf stylesheet logic (again) to correctly distinguish between the case where a valid docbook stylesheet is found automatically and where it is explicitly specified using the --with-xsldir option.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-07-14 10:41:05 UTC (rev 2845)
+++ trunk/configure.ac 2008-07-14 11:40:41 UTC (rev 2846)
@@ -74,6 +74,7 @@
[AS_HELP_STRING([--with-xsldir=PATH], [specify the directory containing the docbook.xsl stylesheet])],
[XSLBASE="$withval"], [XSLBASE=""])
+XSLBASE_AUTO=""
if test "x$XSLBASE" = "x"; then
dnl If the user did not specify a directory for the docbook stylesheet, choose the first directory
dnl that matches from the following list
@@ -84,12 +85,17 @@
"
for p in ${SEARCHPATH}; do
if test -r "${p}"/html/docbook.xsl; then
- XSLBASE="${p}"
+ XSLBASE_AUTO="${p}"
break
fi
done
- dnl For XSLBASE, make sure the directory exists and that it contains html/docbook.xsl
+ dnl Check to see if the automatically searched paths above located a valid Docbook stylesheet
+ if test "x$XSLBASE_AUTO" = "x"; then
+ AC_MSG_WARN([could not locate Docbook stylesheets required to build the documentation])
+ fi
+else
+ dnl The user specified an alternate directory so make sure everything looks sensible
if test ! -d "$XSLBASE"; then
AC_MSG_ERROR([the docbook stylesheet directory specified using --with-xsldir does not exist])
fi
@@ -99,6 +105,18 @@
fi
fi
+dnl
+dnl If XSLBASE has been set then at this point we know it must be valid and so we can just use it. If XSLBASE_AUTO has been set, and XSLBASE
+dnl is empty then a valid stylesheet was found in XSLBASE_AUTO so we should use that. Otherwise just continue silently with a blank XSLBASE
+dnl variable which will trigger the error message in the documentation Makefile
+dnl
+
+if test "x$XSLBASE" = "x"; then
+ if test ! "x$XSLBASE_AUTO" = "x"; then
+ XSLBASE="$XSLBASE_AUTO"
+ fi
+fi
+
AC_SUBST([XSLBASE])
More information about the postgis-commits
mailing list