From: Mark Cave-Ayland Date: Mon, 14 Jul 2008 10:05:14 +0000 (+0000) Subject: Apply some autoconf / Makefile changes from Olivier Courtin. XSLBASE should not be... X-Git-Tag: 1.4.0b1~853 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fab84ec072a1bdc0c408f492ea75ee055fffe098;p=postgis 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. git-svn-id: http://svn.osgeo.org/postgis/trunk@2844 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/configure.ac b/configure.ac index 363b264c9..66a29ac59 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,10 @@ dnl 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 @@ if test "x$XSLBASE" = "x"; then 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 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 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 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 diff --git a/doc/Makefile.in b/doc/Makefile.in index 5a636b357..4ab81bc2b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -28,12 +28,14 @@ PGSQL_DOCDIR=@PGSQL_DOCDIR@ 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 @@ -78,7 +80,7 @@ uninstall: 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 @@ requirements_not_met: @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