1 dnl Driver and redefinitions of some Autoconf macros for autoheader.
2 dnl This file is part of Autoconf.
3 dnl Copyright (C) 1994, 1995 Free Software Foundation, Inc.
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 2, or (at your option)
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software
17 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 dnl Written by Roland McGrath.
22 include(acgeneral.m4)dnl
23 builtin(include, acspecific.m4)dnl
24 builtin(include, acoldnames.m4)dnl
26 dnl These are alternate definitions of some macros, which produce
27 dnl strings in the output marked with "@@@" so we can easily extract
28 dnl the information we want. The `#' at the end of the first line of
29 dnl each definition seems to be necessary to prevent m4 from eating
30 dnl the newline, which makes the @@@ not always be at the beginning of
33 define([AC_CHECK_FUNCS], [#
34 @@@funcs="$funcs $1"@@@
36 # If it was found, we do:
38 # If it was not found, we do:
43 define([AC_CHECK_HEADERS], [#
44 @@@headers="$headers $1"@@@
46 # If it was found, we do:
48 # If it was not found, we do:
53 define([AC_CHECK_HEADERS_DIRENT], [#
54 @@@headers="$headers $1"@@@
57 define([AC_CHECK_LIB], [#
61 # If it was found, we do:
63 # If it was not found, we do:
68 define([AC_HAVE_LIBRARY], [#
69 changequote(<<, >>)dnl
70 define(<<AC_LIB_NAME>>, dnl
71 patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
74 @@@libs="$libs AC_LIB_NAME"@@@
76 # If it was found, we do:
78 # If it was not found, we do:
83 define([AC_CHECK_SIZEOF], [#
84 @@@types="$types,$1"@@@
87 define([AC_CONFIG_HEADER], [#
88 define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
89 @@@config_h=AC_CONFIG_H@@@
92 define([AC_DEFINE], [#
96 @@@verbatim="$verbatim
102 define([AC_DEFINE_UNQUOTED], [#
104 @@@syms="$syms $1"@@@
106 @@@verbatim="$verbatim