[Patches] [ python-Patches-629426 ] autoconf-2.5X mods for configure.in

noreply@sourceforge.net noreply@sourceforge.net
Mon, 28 Oct 2002 16:37:45 -0800


Patches item #629426, was opened at 2002-10-27 09:36
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=629426&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Art Haas (ahaas)
Assigned to: Nobody/Anonymous (nobody)
Summary: autoconf-2.5X mods for configure.in

Initial Comment:
Hi.

Here's another patch for configure.in that replaces a
few more obsolete macros ...

AC_CONFIG_HEADER ==> AC_CONFIG_HEADERS
AC_ERROR ==> AC_MSG_ERROR

There are a couple of uses of AC_MSG_RESULT that had
unecessary escaped quotes, so I removed them. These
were pointed out when running "autoconf --warnings=all".

This patch also adds the AC_HELP_STRING macro in most
of the AC_ARG_* macros. This macro is designed to
format the output the configure script presents when
invoked "configure --help". In adding this macro I've
added a few more explicit quotes in some of the
AC_ARG_* macros also. The AC_HELP_STRING macro itself
though is not quoted (unlike nearly every other macro
in autoconf-2.5X) as this is specified by the autoconf
docs.

A couple of places in the patch have "@<:@" and "@:>@".
These are autoconf quadrigraphs that expand to "[' and
"]" in the configure script. I used them so the
"--help" output would retain the square brackets in
places it does currently.

----------------------------------------------------------------------

>Comment By: Art Haas (ahaas)
Date: 2002-10-28 18:37

Message:
Logged In: YES 
user_id=629911

Here's an updated version of the patch. I've dropped the
AC_CONFIG_HEADER bit, and adjusted the quotes in the
AC_HELP_STRING macros.

----------------------------------------------------------------------

Comment By: Art Haas (ahaas)
Date: 2002-10-28 18:35

Message:
Logged In: YES 
user_id=629911

Here's the second version of the patch. I think the quoting
is more in line with what you want, and I've not included
the AC_CONFIG_HEADERS change.

----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-10-28 10:49

Message:
Logged In: YES 
user_id=21627

As for AC_CONFIG_HEADER: I'd prefer it to stay that way
until the macro really is deprecated. AC_CONFIG_HEADERS
sounds wrong.

Re quotes: Please do revise the patch in this respect. Too
much punctuation is unpythonic, regardless of how the
autoconf manual examples are formulated.

Re changequote: Ok, you can have the quadrigraphs; please
add a comment before each uses to indicate what they are.
Using <> is worse, since [] signals optionality in an
established way.



----------------------------------------------------------------------

Comment By: Art Haas (ahaas)
Date: 2002-10-28 09:46

Message:
Logged In: YES 
user_id=629911

My wording was poor with regards to AC_CONFIG_HEADER. The
macro itself is defined in the autoconf library file
status.m4 as ...

# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
# --------------------------------------
# FIXME: Make it obsolete?
AC_DEFUN([AC_CONFIG_HEADER],
[AC_CONFIG_HEADERS([$1])])

... so it is just a wrapper around AC_CONFIG_HEADERS. Plus,
AC_CONFIG_HEADERS is the documented macro to use.

As for the quoting, I've been following the examples listed
in the autoconf docs, and in there the arguments are quoted.
Having the explicit quotes does add a little bit to the file
(sizewise), but I don't think their presence hurts.

Using quadrigraphs in the configure templates seems to be
the right way to produce "[" and "]" characters in the
output. Using the changequote m4 macro is really, really,
really discouraged in the autoconf docs, given that there is
a section called "Changequote is evil". How about, instead
of the output help string looking like ...

--with-foo     use some value foo [default=yes]

... the characters "<" and ">" are used ....

---with-foo    use some value foo <default=yes>

The quadrigraphs can then be replaced with angle brackets.

----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-10-27 13:33

Message:
Logged In: YES 
user_id=21627

I'm with you for most of these changes. However:

- where does it say that AC_CONFIG_HEADER is obsolete? We
only have one header.

- Please avoid unnecessary quoting. I.e. don't write
            AC_HELP_STRING([--without-gcc],
                           [never use gcc]),
    but write
           AC_HELP(--without-gcc, never use gcc)

    (Quoting spaced strings is perhaps acceptable; quoting
individual words is not)

- Those quadrigraphs look terrible. Try using changequote
instead (e.g. to <<,>>)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=629426&group_id=5470