ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/05/20/12:52:12

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Message-ID: <3CE929CF.3080809@ece.gatech.edu>
Date: Mon, 20 May 2002 12:52:31 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Akim Demaille <akim AT epita DOT fr>
CC: autoconf AT gnu DOT org, Corinna Vinschen <cygwin-apps AT cygwin DOT com>,
Robert Collins <robert DOT collins AT itdomain DOT com DOT au>,
Ralf Habacker <Ralf DOT Habacker AT freenet DOT de>
Subject: Re: autoconf generates buggy configure
References: <3CE8373C DOT 6040709 AT ece DOT gatech DOT edu> <mv47klzunr1 DOT fsf AT nostromo DOT lrde DOT epita DOT fr>

Akim Demaille wrote:

> |    1) text from inside an AC_HELP_STRING() macro was NOT placed in the
> |    help section.  Instead, it was just willy-nilly put into the script
> |    itself.  Since help text is not, in general, valid shell script,
> |    this caused errors.  Other AC_HELP_STRING()'s behaved as expected.
> This macro should never have existed, as it is quite not writable with
> the current GNU M4.  Just don't use [ ] in it.  That's its problem
> #1.  Yes, it is a bug, we do agree.  We just don't have the technology
> to write one good implementation of it.  So, please, don't use it when
> [ and ] are needed.  Use AC_ARG_ENABLE etc. with a literal as documentation.

Okay.  Here I thought I was doing it "right" -- since the docu 
recommends using AC_HELP_STRING()...

So, you're saying that BOTH the following are okay?

   include code for running as a remote client (default)),
<stuff if given>,
<stuff if not given>)

and (ignore bogus linewrap)

[  --enable-client         include code for running as a remote client 
<stuff if given>,
<stuff if not given>)

> |    2) case statements were completely hosed (no closing ')' on the
> |    match strings, a random 'fi' just dropped in between the match
> |    string and the execution clause, ...
> | 
> | 
> |    3) if statements not closed: 'fi' or 'else' ommitted...
> All these are typical of ``user-error or a buggy-configure.in'' :)

Glad to hear it.  I'd much rather the problem be with my usage than with 
configure itself.  (easier to fix...)

> Just make sure you strictly follow the quotation rules (see the
> documentation).  If you don't, then, because of the silly Bourne Shell
> syntax (I mean, I find the syntax itself silly, I'm not having an
> Autoconf bias here) which has unbalanced `)', M4 will think your
> case's `)' are macro invocation closers.
> | Again, this is true for ac-2.53, ac-2.53a, and ac-2.52. 
> Sure!  A broken configure.in is broken independently of the Autoconf
> version :)
> | --- cvs-1.11.2-orig/configure    2002-05-19 06:46:53.000000000 -0400
> | +++ cvs-1.11.2/configure    2002-05-19 06:16:46.000000000 -0400
> | @@ -848,6 +848,8 @@
> |     --disable-dependency-tracking Speeds up one-time builds
> |     --enable-dependency-tracking  Do not reject slow dependency extractors
> |     --enable-encryption     enable encryption support
> | +  --enable-client         include code for running as a remote client
> | +                          (default)
> Post your AC_ARG_ENABLE invocation for `client' please.

Okay, but it's identical to the AC_ARG_ENABLE invocation for server, 
which works...(the second argument to AC_HELP_STRING is wrapped by my 
mailer, but not in the orginal code).

                    [include code for running as a remote client 
     [case "${enableval}" in
       yes) client=yes;;
       no) client=no;;
       *) AC_MSG_ERROR([bad value ${enableval} for client option]) ;;
     [if test "x$ac_cv_search_connect" != "xno"; then
   if test x$client = xyes; then
       [Define if you want CVS to be able to be a remote repository

> | @@ -6037,6 +6039,7 @@
> |   #define HAVE_GETSPNAM 1
> |   _ACEOF
> | 
> | +fi
> Post your invocation which check for getspnam.  I bet you embed an
> AC_DEFINE which is not quoted.  Read the documentation, it is fairly
> explicit about this issue.

AC_SEARCH_LIBS(getspnam, sec gen,
   [Define if you have the getspnam function.])

> | @@ -6307,9 +6310,7 @@
> | 
> |   # So?  What about this header?
> |   case $ac_header_compiler:$ac_header_preproc in
> | -  yes:no
> | -fi
> | -
> | +  yes:no )
> Post your code, and see yourself that it includes a macro invocation
> which is not quoted.

The preceeding code sample is from the section of configure generated by:

AC_CHECK_FUNC(gethostname, :, AC_LIBOBJ([hostname])

> | @@ -9566,13 +9561,12 @@
> |   echo "$as_me: error: cannot find gdbm.h" >&2;}
> |      { (exit 1); exit 1; }; }
> |   fi
> | -
> | -,
> This comma is another side effect of the underquotation: it was meant
> to separate a macro's arguments, but before this comma, there is case
> stmt that fooled M4.

The preeceeding code sample is from the secion of configure generated by 
  the macro below (there's another bogus mailer induced linewrap, below):

                    [use gdbm for database access]),
     [ac_cv_use_gdbm=$withval], [ac_cv_use_gdbm=no])
   AC_CACHE_CHECK([whether to use gdbm],
                  [ac_cv_use_gdbm], [ac_cv_use_gdbm=no])
   if test x$ac_cv_use_gdbm = xyes; then
       [Define if you wish to use a gdbm database for modules and val-tags])
     LIBS="$LIBS -lgdbm"
   dnl Now check for libgdbm and gdbm.h
   if test x$ac_cv_use_gdbm = xyes; then
     AC_CHECK_LIB(gdbm, gdbm_open,
           [Define if you have the gdbm library and headers]),
         AC_MSG_ERROR([cannot find gdbm.h])),
       AC_MSG_ERROR([cannot find libgdbm]))

I'm overjoyed that the problem is me.  However, I don't understand what 
it is that I did wrong.  I tried to '['/']' quote everything I could, 
just to be safe (the autoconf manual says "When in doubt, quote"). Is 
there a good M4 programming manual that could instruct me on this?


- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019