mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-23 14:09:51 +08:00
Sun Oct 4 21:57:20 1998 Tom Tromey <tromey@cygnus.com>
* autoconf.texi (Defining Symbols): Documented third argument to AC_DEFINE. * autoheader.m4 (AC_DEFINE_UNQUOTED): Generate `verbatim' assignment if third argument given. (AC_DEFINE): Likewise. * acgeneral.m4 (AC_DEFINE): Handle case where $# is 3. (AC_DEFINE_UNQUOTED): Likewise. * autoheader.sh: Echo $verbatim if not empty.
This commit is contained in:
parent
a05ecea5a5
commit
013957a4ce
11
ChangeLog
11
ChangeLog
@ -7,6 +7,17 @@
|
||||
|
||||
* acgeneral.m4 (AC_TRY_LINK_FUNC): Fix macro ordering.
|
||||
|
||||
Sun Oct 4 21:57:20 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* autoconf.texi (Defining Symbols): Documented third argument to
|
||||
AC_DEFINE.
|
||||
* autoheader.m4 (AC_DEFINE_UNQUOTED): Generate `verbatim'
|
||||
assignment if third argument given.
|
||||
(AC_DEFINE): Likewise.
|
||||
* acgeneral.m4 (AC_DEFINE): Handle case where $# is 3.
|
||||
(AC_DEFINE_UNQUOTED): Likewise.
|
||||
* autoheader.sh: Echo $verbatim if not empty.
|
||||
|
||||
1998-10-03 Ben Elliston <bje@cygnus.com>
|
||||
|
||||
* acconfig.h (FC_NO_MINUS_C_MINUS_O): Add to complete the Fortran
|
||||
|
@ -1,7 +1,7 @@
|
||||
dnl Parameterized macros.
|
||||
dnl Requires GNU m4.
|
||||
dnl This file is part of Autoconf.
|
||||
dnl Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
@ -1152,14 +1152,14 @@ dnl Set VARIABLE to VALUE, verbatim, or 1.
|
||||
dnl AC_DEFINE(VARIABLE [, VALUE])
|
||||
define(AC_DEFINE,
|
||||
[cat >> confdefs.h <<\EOF
|
||||
[#define] $1 ifelse($#, 2, [$2], 1)
|
||||
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
|
||||
EOF
|
||||
])
|
||||
|
||||
dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
|
||||
define(AC_DEFINE_UNQUOTED,
|
||||
[cat >> confdefs.h <<EOF
|
||||
[#define] $1 ifelse($#, 2, [$2], 1)
|
||||
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
|
||||
EOF
|
||||
])
|
||||
|
||||
|
@ -27,7 +27,7 @@ This file documents the GNU Autoconf package for creating scripts to
|
||||
configure source code packages using templates and an @code{m4} macro
|
||||
package.
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@ -3358,7 +3358,7 @@ correct values into @code{#define} statements in a template file.
|
||||
@xref{Configuration Headers}, for more information about this kind of
|
||||
output.
|
||||
|
||||
@defmac AC_DEFINE (@var{variable} @r{[}, @var{value}@r{]})
|
||||
@defmac AC_DEFINE (@var{variable} @r{[}, @var{value} @r{[}, @var{description}@r{]}@r{]})
|
||||
@maindex DEFINE
|
||||
Define C preprocessor variable @var{variable}. If @var{value} is given,
|
||||
set @var{variable} to that value (verbatim), otherwise set it to 1.
|
||||
@ -3367,16 +3367,19 @@ using @code{AC_CONFIG_HEADER} it should not contain any @samp{#}
|
||||
characters, as @code{make} tends to eat them. To use a shell variable
|
||||
(which you need to do in order to define a value containing the
|
||||
@code{m4} quote characters @samp{[} or @samp{]}), use
|
||||
@code{AC_DEFINE_UNQUOTED} instead. The following example defines the C
|
||||
preprocessor variable @code{EQUATION} to be the string constant
|
||||
@samp{"$a > $b"}:
|
||||
@code{AC_DEFINE_UNQUOTED} instead. @var{description} is only useful if
|
||||
you are using @code{AC_CONFIG_HEADER}. In this case, @var{description}
|
||||
is put into the generated @file{config.h.in} as the comment before the
|
||||
macro define; the macro need not be mentioned in @file{acconfig.h}. The
|
||||
following example defines the C preprocessor variable @code{EQUATION} to
|
||||
be the string constant @samp{"$a > $b"}:
|
||||
|
||||
@example
|
||||
AC_DEFINE(EQUATION, "$a > $b")
|
||||
@end example
|
||||
@end defmac
|
||||
|
||||
@defmac AC_DEFINE_UNQUOTED (@var{variable} @r{[}, @var{value}@r{]})
|
||||
@defmac AC_DEFINE_UNQUOTED (@var{variable} @r{[}, @var{value} @r{[}, @var{description}@r{]}@r{]})
|
||||
@maindex DEFINE_UNQUOTED
|
||||
Like @code{AC_DEFINE}, but three shell expansions are
|
||||
performed---once---on @var{variable} and @var{value}: variable expansion
|
||||
|
@ -1,6 +1,6 @@
|
||||
#! @SHELL@
|
||||
# autoheader -- create `config.h.in' from `configure.in'
|
||||
# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1996, 1998 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -241,6 +241,10 @@ if test -n "$libs"; then
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$verbatim"; then
|
||||
echo "$verbatim"
|
||||
fi
|
||||
|
||||
# Handle the case where @BOTTOM@ is the first line of acconfig.h.
|
||||
test -r $localdir/acconfig.h &&
|
||||
grep @BOTTOM@ $localdir/acconfig.h >/dev/null &&
|
||||
|
@ -90,9 +90,21 @@ define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
|
||||
])
|
||||
|
||||
define([AC_DEFINE], [#
|
||||
ifelse([$3],,[#
|
||||
@@@syms="$syms $1"@@@
|
||||
])
|
||||
], [#
|
||||
@@@verbatim="$verbatim
|
||||
/* $3 */
|
||||
#undef $1
|
||||
"@@@
|
||||
])])
|
||||
|
||||
define([AC_DEFINE_UNQUOTED], [#
|
||||
ifelse([$3],,[#
|
||||
@@@syms="$syms $1"@@@
|
||||
])
|
||||
], [#
|
||||
@@@verbatim="$verbatim
|
||||
/* $3 */
|
||||
#undef $1
|
||||
"@@@
|
||||
])])
|
||||
|
@ -1,6 +1,6 @@
|
||||
#! @SHELL@
|
||||
# autoheader -- create `config.h.in' from `configure.in'
|
||||
# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1996, 1998 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -241,6 +241,10 @@ if test -n "$libs"; then
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$verbatim"; then
|
||||
echo "$verbatim"
|
||||
fi
|
||||
|
||||
# Handle the case where @BOTTOM@ is the first line of acconfig.h.
|
||||
test -r $localdir/acconfig.h &&
|
||||
grep @BOTTOM@ $localdir/acconfig.h >/dev/null &&
|
||||
|
@ -1,6 +1,6 @@
|
||||
#! @SHELL@
|
||||
# autoheader -- create `config.h.in' from `configure.in'
|
||||
# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1996, 1998 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -241,6 +241,10 @@ if test -n "$libs"; then
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$verbatim"; then
|
||||
echo "$verbatim"
|
||||
fi
|
||||
|
||||
# Handle the case where @BOTTOM@ is the first line of acconfig.h.
|
||||
test -r $localdir/acconfig.h &&
|
||||
grep @BOTTOM@ $localdir/acconfig.h >/dev/null &&
|
||||
|
@ -27,7 +27,7 @@ This file documents the GNU Autoconf package for creating scripts to
|
||||
configure source code packages using templates and an @code{m4} macro
|
||||
package.
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@ -3358,7 +3358,7 @@ correct values into @code{#define} statements in a template file.
|
||||
@xref{Configuration Headers}, for more information about this kind of
|
||||
output.
|
||||
|
||||
@defmac AC_DEFINE (@var{variable} @r{[}, @var{value}@r{]})
|
||||
@defmac AC_DEFINE (@var{variable} @r{[}, @var{value} @r{[}, @var{description}@r{]}@r{]})
|
||||
@maindex DEFINE
|
||||
Define C preprocessor variable @var{variable}. If @var{value} is given,
|
||||
set @var{variable} to that value (verbatim), otherwise set it to 1.
|
||||
@ -3367,16 +3367,19 @@ using @code{AC_CONFIG_HEADER} it should not contain any @samp{#}
|
||||
characters, as @code{make} tends to eat them. To use a shell variable
|
||||
(which you need to do in order to define a value containing the
|
||||
@code{m4} quote characters @samp{[} or @samp{]}), use
|
||||
@code{AC_DEFINE_UNQUOTED} instead. The following example defines the C
|
||||
preprocessor variable @code{EQUATION} to be the string constant
|
||||
@samp{"$a > $b"}:
|
||||
@code{AC_DEFINE_UNQUOTED} instead. @var{description} is only useful if
|
||||
you are using @code{AC_CONFIG_HEADER}. In this case, @var{description}
|
||||
is put into the generated @file{config.h.in} as the comment before the
|
||||
macro define; the macro need not be mentioned in @file{acconfig.h}. The
|
||||
following example defines the C preprocessor variable @code{EQUATION} to
|
||||
be the string constant @samp{"$a > $b"}:
|
||||
|
||||
@example
|
||||
AC_DEFINE(EQUATION, "$a > $b")
|
||||
@end example
|
||||
@end defmac
|
||||
|
||||
@defmac AC_DEFINE_UNQUOTED (@var{variable} @r{[}, @var{value}@r{]})
|
||||
@defmac AC_DEFINE_UNQUOTED (@var{variable} @r{[}, @var{value} @r{[}, @var{description}@r{]}@r{]})
|
||||
@maindex DEFINE_UNQUOTED
|
||||
Like @code{AC_DEFINE}, but three shell expansions are
|
||||
performed---once---on @var{variable} and @var{value}: variable expansion
|
||||
|
@ -1,7 +1,7 @@
|
||||
dnl Parameterized macros.
|
||||
dnl Requires GNU m4.
|
||||
dnl This file is part of Autoconf.
|
||||
dnl Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
@ -1152,14 +1152,14 @@ dnl Set VARIABLE to VALUE, verbatim, or 1.
|
||||
dnl AC_DEFINE(VARIABLE [, VALUE])
|
||||
define(AC_DEFINE,
|
||||
[cat >> confdefs.h <<\EOF
|
||||
[#define] $1 ifelse($#, 2, [$2], 1)
|
||||
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
|
||||
EOF
|
||||
])
|
||||
|
||||
dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
|
||||
define(AC_DEFINE_UNQUOTED,
|
||||
[cat >> confdefs.h <<EOF
|
||||
[#define] $1 ifelse($#, 2, [$2], 1)
|
||||
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
|
||||
EOF
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user