]> granicus.if.org Git - postgis/commitdiff
Apply some autoconf / Makefile changes from Olivier Courtin. XSLBASE should not be...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Mon, 14 Jul 2008 10:05:14 +0000 (10:05 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Mon, 14 Jul 2008 10:05:14 +0000 (10:05 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2844 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
doc/Makefile.in

index 363b264c99fc3c19aa888571be76f4327d6d5d1b..66a29ac59a2544bba3c9dedc1c7734ef59b3f194 100644 (file)
@@ -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
index 5a636b357e33391893e57446b31afed681585a46..4ab81bc2b0d7bc4cfcd6bb7ec4c053bf31b85760 100644 (file)
@@ -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