[postgis-commits] svn - r2844 - in trunk: . doc

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Mon Jul 14 03:05:14 PDT 2008


Author: mcayland
Date: 2008-07-14 03:05:14 -0700 (Mon, 14 Jul 2008)
New Revision: 2844

Modified:
   trunk/configure.ac
   trunk/doc/Makefile.in
Log:
Apply some autoconf / Makefile changes from Olivier Courtin. XSLBASE should not be checked for validity unless it has been explicitly specified using the --with-xsldir option, and we also add some friendlier messages in the documentation Makefile in case the DocBook stylesheets and/or xsltproc cannot be found. Additionally, the configure --help output has been tidied up using the AS_HELP_STRING macro.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2008-07-13 23:49:54 UTC (rev 2843)
+++ trunk/configure.ac	2008-07-14 10:05:14 UTC (rev 2844)
@@ -70,7 +70,10 @@
 dnl Allow the user to specify the location of the html/docbook.xsl stylesheet
 dnl
 
-AC_ARG_WITH([xsldir], [Specify the path to the directory containing the docbook.xsl stylesheet], [XSLBASE="$withval"], [XSLBASE=""])
+AC_ARG_WITH([xsldir], 
+	[AS_HELP_STRING([--with-xsldir=PATH], [specify the directory containing the docbook.xsl stylesheet])], 
+	[XSLBASE="$withval"], [XSLBASE=""])
+
 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
@@ -85,16 +88,15 @@
 			break
 		fi
 	done
-fi
 
+	dnl For XSLBASE, make sure the directory exists and that it contains html/docbook.xsl 
+	if test ! -d "$XSLBASE"; then
+		AC_MSG_ERROR([the docbook stylesheet directory specified using --with-xsldir does not exist])
+	fi 
 
-dnl For XSLBASE, make sure the directory exists and that it contains html/docbook.xsl 
-if test ! -d "$XSLBASE"; then
-	AC_MSG_ERROR([the docbook stylesheet directory specified using --with-xsldir does not exist])
-fi 
-
-if test ! -f "$XSLBASE/html/docbook.xsl"; then
-	AC_MSG_ERROR([the docbook stylesheet directory specified using --with-xsldir does not contain the html/docbook.xsl file])
+	if test ! -f "$XSLBASE/html/docbook.xsl"; then
+		AC_MSG_ERROR([the docbook stylesheet directory specified using --with-xsldir does not contain the html/docbook.xsl file])
+	fi
 fi
 
 AC_SUBST([XSLBASE])
@@ -147,7 +149,10 @@
 dnl Detect the version of PostgreSQL installed on the system
 dnl
 
-AC_ARG_WITH([pgconfig], [Specify the path to an alternative pg_config], [PGCONFIG="$withval"], [PGCONFIG=""])
+AC_ARG_WITH([pgconfig], 
+	[AS_HELP_STRING([--with-pgconfig=FILE], [specify an alternative pg_config file])], 
+	[PGCONFIG="$withval"], [PGCONFIG=""])
+
 if test "x$PGCONFIG" = "x"; then
 	dnl PGCONFIG was not specified, so search within the current path
 	AC_PATH_PROG([PGCONFIG], [pg_config])
@@ -227,7 +232,10 @@
 dnl Detect the version of GEOS installed on the system
 dnl
 
-AC_ARG_WITH([geosconfig], [Specify the path to an alternative geos-config], [GEOSCONFIG="$withval"], [GEOSCONFIG=""])
+AC_ARG_WITH([geosconfig], 
+	[AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], 
+	[GEOSCONFIG="$withval"], [GEOSCONFIG=""])
+
 if test "x$GEOSCONFIG" = "x"; then
 	dnl GEOSCONFIG was not specified, so search within the current path
 	AC_PATH_PROG([GEOSCONFIG], [geos-config])
@@ -294,7 +302,10 @@
 dnl Detect the version of PROJ.4 installed
 dnl
 
-AC_ARG_WITH([projdir], [Specify the directory to an alternative PROJ installation], [PROJDIR="$withval"], [PROJDIR=""])
+AC_ARG_WITH([projdir], 
+	[AS_HELP_STRING([--with-projdir=PATH], [specify the PROJ.4 installation directory])], 
+	[PROJDIR="$withval"], [PROJDIR=""])
+
 if test ! "x$PROJDIR" = "x"; then
 	dnl Make sure that the directory exists 
 	if test "x$PROJDIR" = "xyes"; then

Modified: trunk/doc/Makefile.in
===================================================================
--- trunk/doc/Makefile.in	2008-07-13 23:49:54 UTC (rev 2843)
+++ trunk/doc/Makefile.in	2008-07-14 10:05:14 UTC (rev 2844)
@@ -28,12 +28,14 @@
 PGSQL_MANDIR=@PGSQL_MANDIR@
 
 
-# If XSLTPROC was not found during configure, we cannot
+# If XSLTPROC or XSLBASE were not found during configure, we cannot
 # build the documentation
-ifdef XSLTPROC
+ifndef XSLTPROC
+all: requirements_not_met_xsltproc
+else ifndef XSLBASE
+all: requirements_not_met_xslbase 
+else
 all: html/postgis.html
-else
-all: requirements_not_met
 endif
 
 postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis.xml performance_tips.xml reference.xml reporting.xml release_notes.xml ../Version.config
@@ -78,7 +80,7 @@
 	rm -f $(PGSQL_MANDIR)/man1/shp2pgsql.1
 	rm -f $(PGSQL_MANDIR)/man1/pgsql2shp.1
 
-requirements_not_met:
+requirements_not_met_xsltproc:
 	@echo
 	@echo "configure was unable to find 'xsltproc' which is required to build the documentation."
 	@echo "To build the documentation, install xsltproc and then re-run configure. Alternatively "
@@ -87,5 +89,14 @@
 	@echo "  http://postgis.refractions.net/docs"
 	@echo
 
+requirements_not_met_xslbase:
+	@echo
+	@echo "configure was unable to find the Docbook XSL stylesheet directory which is required to build the documentation."
+	@echo "To build the documentation, install the Docbook XSL stylesheets and/or re-run configure with the --with-xsldir option. Alternatively "
+	@echo "refer to online manual:"
+	@echo
+	@echo "  http://postgis.refractions.net/docs"
+	@echo
+
 .PHONY: html
  



More information about the postgis-commits mailing list