build-sys: fix m4 quotation to make upstream autotools to work
authorSami Kerola <kerolasa@iki.fi>
Wed, 19 Jun 2013 20:15:19 +0000 (21:15 +0100)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 1 Dec 2014 23:42:41 +0000 (18:42 -0500)
Macro arguments for AC_ARG_WITH, such as AC_CHECK_PROGS, need to be
quoted.  Unless they are the latest version of autoconf will expand
macros slightly wrong way making the configure to fail at line where
there are only two ticks.

$ ./regen.sh
[...]
$ automake -a -f
[...]
automake: error: no 'Makefile.am' found for any configure output
$ ./configure
[...]
checking pkg-config is at least version 0.9.0... yes
./configure: line 13348: syntax error near unexpected token `newline'
./configure: line 13348: `    '''

Notice that the 'automake' run is needed in order to avoid later
configure error, which would look something like.

configure: error: cannot find install-sh, install.sh, or shtool in build-tools "."/build-tools

Change-Id: I39476270f351d2f5b332c5c945d6ac67fe16dd82
Reviewed-on: http://gerrit.openafs.org/9995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

acinclude.m4

index ab84b04..ebe0f05 100644 (file)
@@ -253,7 +253,7 @@ AC_ARG_WITH([xslt-processor],
        AS_HELP_STRING([--with-xslt-processor=ARG],
        [which XSLT processor to use (possible choices are: libxslt, saxon, xalan-j, xsltproc)]),
                [XSLTPROC="$withval"],
-       AC_CHECK_PROGS([XSLTPROC], [libxslt saxon xalan-j xsltproc], [echo]))
+       [AC_CHECK_PROGS([XSLTPROC], [libxslt saxon xalan-j xsltproc], [echo])])
 
 AC_ARG_WITH([html-xsl], 
         AS_HELP_STRING([--with-html-xsl],
@@ -265,16 +265,16 @@ AC_ARG_WITH([docbook2pdf],
        AS_HELP_STRING([--with-docbook2pdf=ARG],
        [which Docbook to PDF utility to use (possible choices are: fop, dblatex, docbook2pdf)]),
                [DOCBOOK2PDF="$withval"],
-       AC_CHECK_PROGS([DOCBOOK2PDF], [fop dblatex docbook2pdf], [echo]))
+       [AC_CHECK_PROGS([DOCBOOK2PDF], [fop dblatex docbook2pdf], [echo])])
 
 AC_ARG_WITH([docbook-stylesheets],
        AS_HELP_STRING([--with-docbook-stylesheets=ARG],
        [location of DocBook stylesheets (default is to search a set of likely paths)]),
                [DOCBOOK_STYLESHEETS="$withval"],
-       OPENAFS_SEARCH_DIRLIST([DOCBOOK_STYLESHEETS], [/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/xml/docbook/xsl-stylesheets /usr/share/sgml/docbook/docbook-xsl-stylesheets /usr/share/sgml/docbook/xsl-stylesheets /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl /opt/local/share/xsl/docbook-xsl], [$HTML_XSL])
+       [OPENAFS_SEARCH_DIRLIST([DOCBOOK_STYLESHEETS], [/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/xml/docbook/xsl-stylesheets /usr/share/sgml/docbook/docbook-xsl-stylesheets /usr/share/sgml/docbook/xsl-stylesheets /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl /opt/local/share/xsl/docbook-xsl], [$HTML_XSL])
        if test "x$DOCBOOK_STYLESHEETS" = "x"; then
                AC_WARN([Docbook stylesheets not found; some documentation can't be built])
-       fi)
+       fi])
 
 AC_ARG_WITH([dot],
        AS_HELP_STRING([--with-dot@<:@=PATH@:>@],