bug-autoconf
[Top][All Lists]
Advanced

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

documentation bug (?)


From: Frederik Fouvry
Subject: documentation bug (?)
Date: Fri, 3 Sep 2004 18:00:12 +0200 (CEST)

Hi,

After some problems I was having with autoheader (it told me to
use AC_DEFINE([SVR4],[][Description])), I was told the following
by someone:

| you're supposed to use AC_DEFINE like so:
| AC_DEFINE([SVR4], [1], [define if your system uses SVR4 semantics])
| 
| if you just use AC_DEFINE(SVR4), then you will get such an error.

That works indeed, but the documentation gives at least three
times the "wrong" use (see quotation for two examples).  The same
goes for AC_DEFINE_UNQUOTED.

----------------------------------------------------------------------
 - Macro: AC_DEFINE (VARIABLE, VALUE, [DESCRIPTION])
 - Macro: AC_DEFINE (VARIABLE)

[...]

     constant `"$a > $b"':

          AC_DEFINE(EQUATION, "$a > $b")

     If neither VALUE nor DESCRIPTION are given, then VALUE defaults to
     1 instead of to the empty string.  This is for backwards
     compatibility with older versions of Autoconf, but this usage is
     obsolescent and may be withdrawn in future versions of Autoconf.

 - Macro: AC_DEFINE_UNQUOTED (VARIABLE, VALUE, [DESCRIPTION])
 - Macro: AC_DEFINE_UNQUOTED (VARIABLE)

[...]

     shell variable.  Examples:

          AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
          AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
          AC_DEFINE_UNQUOTED($ac_tr_hdr)

[...]

     AC_CHECK_HEADER(elf.h, [AC_DEFINE(SVR4) LIBS="$LIBS -lelf"])

or this:

     AC_CHECK_HEADER(elf.h,
      [AC_DEFINE(SVR4)
       LIBS="$LIBS -lelf"])

instead of this:

     AC_CHECK_HEADER(elf.h, [AC_DEFINE(SVR4); LIBS="$LIBS -lelf"])
----------------------------------------------------------------------

Apparently, the obsolescent use has been withdrawn already, but I
could not find any mention of this in ChangeLog and NEWS.

This seems a (documentation) bug to me.

My autoconf version: 2.59.

Thanks,

Frederik Fouvry




reply via email to

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