[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_DEFINE_UNQUOTED and autoheader

From: Ben Pfaff
Subject: AC_DEFINE_UNQUOTED and autoheader
Date: Thu, 25 May 2006 11:42:30 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Debian Bug #179086 (CC'd) states the following:

    I have code like

        ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
        -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`

    which, is intended to define certain preprocessor variables
    depending on the value it is given.  Under recent versions of
    autoconf, there is no acconfig.h so the information it would
    have provided is now provided by autoheader.

    According to the autoconf manual, AC_DEFINE_UNQUOTED is able
    to handle variables as its first argument.  Yet it appears it
    cannot.  Perhaps autoheader must extrapolate what possible
    values will be defined, and it just fails to do that here.
    Regardless, the result is that the value does not get
    defined, causing (in this case) an obscure bug.

I believe that this is a documentation bug.  The node titled
"autoheader Invocation" in the CVS autoconf manual states this:

    In order to do its job, @command{autoheader} needs you to document all
    of the symbols that you might use; i.e., there must be at least one
    @code{AC_DEFINE} or one @code{AC_DEFINE_UNQUOTED} call with a third
    argument for each symbol (@pxref{Defining Symbols}).  An additional
    constraint is that the first argument of @code{AC_DEFINE} must be a
    literal.  Note that all symbols defined by Autoconf's builtin tests are
    already documented properly; you only need to document those that you
    define yourself.

I believe that the second mention of @code{AC_DEFINE} should be
followed by "or @code{AC_DEFINED_UNQUOTED}".
"Then, I came to my senses, and slunk away, hoping no one overheard my
--Steve McAndrewSmith in the Monastery

reply via email to

[Prev in Thread] Current Thread [Next in Thread]