1 # This file is part of Autoconf. -*- Autoconf -*-
2 # Interface with autoheader.
4 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
5 # 2002 Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 # As a special exception, the Free Software Foundation gives unlimited
23 # permission to copy, distribute and modify the configure scripts that
24 # are the output of Autoconf. You need not follow the terms of the GNU
25 # General Public License when using or distributing such scripts, even
26 # though portions of the text of Autoconf appear in them. The GNU
27 # General Public License (GPL) does govern all other use of the material
28 # that constitutes the Autoconf program.
30 # Certain portions of the Autoconf source text are designed to be copied
31 # (in certain cases, depending on the input) into the output of
32 # Autoconf. We call these the "data" portions. The rest of the Autoconf
33 # source text consists of comments plus executable code that decides which
34 # of the data portions to output in any given case. We call these
35 # comments and executable code the "non-data" portions. Autoconf never
36 # copies any of the non-data portions into its output.
38 # This special exception to the GPL applies to versions of Autoconf
39 # released by the Free Software Foundation. When you make and
40 # distribute a modified version of Autoconf, you may extend this special
41 # exception to the GPL to apply to your modified version as well, *unless*
42 # your modified version has the potential to copy into its output some
43 # of the text that was the non-data portion of the version that you started
44 # with. (In other words, unless your change moves or copies text from
45 # the non-data portions to the data portions.) If your modification has
46 # such potential, you must delete any notice of this special exception
47 # to the GPL from your modified version.
49 # Written by David MacKenzie, with help from
50 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
51 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
54 # AH_OUTPUT(KEY, TEXT)
55 # --------------------
56 # Pass TEXT to autoheader.
57 # This macro is `read' only via `autoconf --trace', it outputs nothing.
58 m4_define([AH_OUTPUT], [])
61 # AH_VERBATIM(KEY, TEMPLATE)
62 # --------------------------
63 # If KEY is direct (i.e., no indirection such as in KEY=$my_func which
64 # may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
65 # TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
66 # output as is, with no formatting.
68 # Quote for Perl '' strings, which are those used by Autoheader.
69 m4_define([AH_VERBATIM],
71 [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\\'']))])
75 # AH_TEMPLATE(KEY, DESCRIPTION)
76 # -----------------------------
77 # Issue an autoheader template for KEY, i.e., a comment composed of
78 # DESCRIPTION (properly wrapped), and then #undef KEY.
79 m4_define([AH_TEMPLATE],
81 m4_text_wrap([$2 */], [ ], [/* ])[
87 # Output TEXT at the top of `config.h.in'.
89 [m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
90 AH_VERBATIM([0000]_AH_COUNTER, [$1])])
95 # Output TEXT at the bottom of `config.h.in'.
96 m4_define([AH_BOTTOM],
97 [m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
98 AH_VERBATIM([zzzz]_AH_COUNTER, [$1])])
101 m4_define([_AH_COUNTER], [0])