autoconf-patches
[Top][All Lists]
Advanced

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

Re: AC_DEFINE defaulting to 1


From: Paul Eggert
Subject: Re: AC_DEFINE defaulting to 1
Date: Wed, 11 Sep 2002 12:06:36 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: 11 Sep 2002 17:23:02 +0200
> 
> I think the doc should be fixed: I see no reason to prevent someone
> from just defining to nothing :(

I too have been confused by this in the past, so I installed the
following doc patch.

2002-09-11  Paul Eggert  <address@hidden>

        * doc/autoconf.texi (Defining Symbols): Explain that
        AC_DEFINE(var) defaults to 1, but AC_DEFINE(var,,description) does
        not; and the AC_DEFINE(var) case is obsolescent.

Index: autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.671
retrieving revision 1.672
diff -p -u -r1.671 -r1.672
--- autoconf.texi       11 Sep 2002 10:11:27 -0000      1.671
+++ autoconf.texi       11 Sep 2002 19:03:59 -0000      1.672
@@ -6087,8 +6087,7 @@ output.
 
 @defmac AC_DEFINE (@var{variable}, @ovar{value}, @ovar{description})
 @acindex DEFINE
-Define C preprocessor variable @var{variable}.  If @var{value} is given,
-set @var{variable} to that value (verbatim), otherwise set it to 1.
+Define the C preprocessor variable @var{variable} to @var{value} (verbatim).
 @var{value} should not contain literal newlines, and if you are not
 using @code{AC_CONFIG_HEADERS} it should not contain any @samp{#}
 characters, as @command{make} tends to eat them.  To use a shell variable
@@ -6103,6 +6102,12 @@ The following example defines the C prep
 @example
 AC_DEFINE(EQUATION, "$a > $b")
 @end example
+
+If neither @var{value} nor @var{description} are given, then
address@hidden defaults to 1 instead of to the empty string.  This is for
+backwards compatiblity with older versions of Autoconf, but this usage
+is obsolescent and may be withdrawn in future versions of Autoconf.
+
 @end defmac
 
 @defmac AC_DEFINE_UNQUOTED (@var{variable}, @ovar{value}, @ovar{description})




reply via email to

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