1m4_divert(-1)
2# This file is part of Mailfromd.
3# Copyright (C) 2006-2021 Sergey Poznyakoff
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3, or (at your option)
8# any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18m4_changequote([<,>])
19m4_changecom(/*,*/)
20
21m4_define([<__MODNO__>],0)
22
23m4_define([<MF_BEGIN_OUTPUT>],[<m4_dnl
24m4_divert(0)m4_dnl
25/* -*- buffer-read-only: t -*- vi: set ro:
26   THIS FILE IS GENERATED AUTOMATICALLY.  PLEASE DO NOT EDIT.
27*/
28>])
29
30m4_define([<MF_DEFINES>],[<
31#define BUILTIN_IDX_prog 0
32m4_undivert(1)
33>])
34
35m4_define([<MF_BUILTIN_DECLS>],[<
36m4_undivert(2)
37>])
38
39m4_define([<MF_BUILTIN_MODULES>],[<
40static struct builtin_module builtin_module[] = {
41	{ "prog", NULL, 0 },
42m4_undivert(3)
43	{ NULL, NULL }
44};
45#define BUILTIN_IDX_MAX (sizeof(builtin_module)/sizeof(builtin_module[0])-1)
46>])
47
48m4_define([<MF_BUILTIN_MODULE>],
49[<m4_pushdef([<MF_MODULE_NAME>],
50m4_ifelse([<$1>],,[<m4_dnl
51m4_patsubst(m4___file__,\(.*/\)?\(.*\)\.bi,\2)>],[<$1>]))
52m4_pushdef([<MF_MODULE_IDX>],[<[<BUILTIN_IDX_>]MF_MODULE_NAME()>])
53m4_define([<__MODNO__>],m4_incr(__MODNO__))
54m4_divert(1)m4_dnl
55#define MF_MODULE_IDX (__MODNO__)
56m4_divert(2)m4_dnl
57extern void MF_MODULE_NAME[<>]_init_builtin(void);
58m4_divert(3)m4_dnl
59	{ "MF_MODULE_NAME", MF_MODULE_NAME[<>]_init_builtin, 0 },
60m4_divert(-1)>])
61