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
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])
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])
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])
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
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
-all: html/postgis.html
+ifndef XSLTPROC
+all: requirements_not_met_xsltproc
+else ifndef XSLBASE
+all: requirements_not_met_xslbase
else
-all: requirements_not_met
+all: html/postgis.html
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
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 "
@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