make update-copyright
[autoconf.git] / lib / autoconf / autoconf.m4
blob38e5fa9e9e3d9dce870e7e1f27ce57ce648103fb
1 # This file is part of Autoconf.                -*- Autoconf -*-
2 # Driver that loads the Autoconf macro files.
4 # Copyright (C) 1994, 1999-2002, 2006, 2008-2017, 2020-2022 Free
5 # Software Foundation, Inc.
7 # This file is part of Autoconf.  This program is free
8 # software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the
10 # Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # Under Section 7 of GPL version 3, you are granted additional
19 # permissions described in the Autoconf Configure Script Exception,
20 # version 3.0, as published by the Free Software Foundation.
22 # You should have received a copy of the GNU General Public License
23 # and a copy of the Autoconf Configure Script Exception along with
24 # this program; see the files COPYINGv3 and COPYING.EXCEPTION
25 # respectively.  If not, see <https://www.gnu.org/licenses/>.
27 # Written by David MacKenzie and many others.
29 # Do not sinclude acsite.m4 here, because it may not be installed
30 # yet when Autoconf is frozen.
31 # Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
33 # general includes some AU_DEFUN.
34 m4_include([autoconf/autoupdate.m4])
35 m4_include([autoconf/autoscan.m4])
36 m4_include([autoconf/general.m4])
37 m4_include([autoconf/status.m4])
38 m4_include([autoconf/autoheader.m4])
39 m4_include([autoconf/autotest.m4])
40 m4_include([autoconf/programs.m4])
41 m4_include([autoconf/lang.m4])
42 m4_include([autoconf/c.m4])
43 m4_include([autoconf/erlang.m4])
44 m4_include([autoconf/fortran.m4])
45 m4_include([autoconf/go.m4])
46 m4_include([autoconf/functions.m4])
47 m4_include([autoconf/headers.m4])
48 m4_include([autoconf/types.m4])
49 m4_include([autoconf/libs.m4])
50 m4_include([autoconf/specific.m4])
51 m4_include([autoconf/oldnames.m4])
53 # We discourage the use of the non prefixed macro names: M4sugar maps
54 # all the builtins into 'm4_'.  Autoconf has been converted to these
55 # names too.  But users may still depend upon these, so reestablish
56 # them.
58 # In order to copy pushdef stacks, m4_copy temporarily destroys the
59 # current pushdef stack.  But these builtins are so primitive that:
60 #   1. they should not have more than one pushdef definition
61 #   2. undefining the pushdef stack to copy breaks m4_copy
62 # Hence, we temporarily restore a simpler m4_copy.
64 m4_pushdef([m4_copy], [m4_define([$2], m4_defn([$1]))])
66 m4_copy_unm4([m4_builtin])
67 m4_copy_unm4([m4_changequote])
68 m4_copy_unm4([m4_decr])
69 m4_copy_unm4([m4_define])
70 m4_copy_unm4([m4_defn])
71 m4_copy_unm4([m4_divert])
72 m4_copy_unm4([m4_divnum])
73 m4_copy_unm4([m4_errprint])
74 m4_copy_unm4([m4_esyscmd])
75 m4_copy_unm4([m4_ifdef])
76 m4_copy([m4_if], [ifelse])
77 m4_copy_unm4([m4_incr])
78 m4_copy_unm4([m4_index])
79 m4_copy_unm4([m4_indir])
80 m4_copy_unm4([m4_len])
81 m4_copy([m4_bpatsubst], [patsubst])
82 m4_copy_unm4([m4_popdef])
83 m4_copy_unm4([m4_pushdef])
84 m4_copy([m4_bregexp], [regexp])
85 m4_copy_unm4([m4_sinclude])
86 m4_copy_unm4([m4_syscmd])
87 m4_copy_unm4([m4_sysval])
88 m4_copy_unm4([m4_traceoff])
89 m4_copy_unm4([m4_traceon])
90 m4_copy_unm4([m4_translit])
91 m4_copy_unm4([m4_undefine])
92 m4_copy_unm4([m4_undivert])
94 m4_popdef([m4_copy])
96 # Yet some people have started to use m4_patsubst and m4_regexp.
97 m4_define([m4_patsubst],
98 [m4_expand_once([m4_warn([syntax],
99                  [do not use m4_patsubst: use patsubst or m4_bpatsubst])])dnl
100 patsubst($@)])
102 m4_define([m4_regexp],
103 [m4_expand_once([m4_warn([syntax],
104                  [do not use m4_regexp: use regexp or m4_bregexp])])dnl
105 regexp($@)])