Blame autoheader.m4

Packit 1ca270
dnl Driver and redefinitions of some Autoconf macros for autoheader.
Packit 1ca270
dnl This file is part of Autoconf.
Packit 1ca270
dnl Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Packit 1ca270
dnl
Packit 1ca270
dnl This program is free software; you can redistribute it and/or modify
Packit 1ca270
dnl it under the terms of the GNU General Public License as published by
Packit 1ca270
dnl the Free Software Foundation; either version 2, or (at your option)
Packit 1ca270
dnl any later version.
Packit 1ca270
dnl
Packit 1ca270
dnl This program is distributed in the hope that it will be useful,
Packit 1ca270
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1ca270
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 1ca270
dnl GNU General Public License for more details.
Packit 1ca270
dnl
Packit 1ca270
dnl You should have received a copy of the GNU General Public License
Packit 1ca270
dnl along with this program; if not, write to the Free Software
Packit 1ca270
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Packit 1ca270
dnl 02111-1307, USA.
Packit 1ca270
dnl
Packit 1ca270
dnl Written by Roland McGrath.
Packit 1ca270
dnl
Packit 1ca270
include(acgeneral.m4)dnl
Packit 1ca270
builtin(include, acspecific.m4)dnl
Packit 1ca270
builtin(include, acoldnames.m4)dnl
Packit 1ca270
Packit 1ca270
dnl These are alternate definitions of some macros, which produce
Packit 1ca270
dnl strings in the output marked with "@@@" so we can easily extract
Packit 1ca270
dnl the information we want.  The `#' at the end of the first line of
Packit 1ca270
dnl each definition seems to be necessary to prevent m4 from eating
Packit 1ca270
dnl the newline, which makes the @@@ not always be at the beginning of
Packit 1ca270
dnl a line.
Packit 1ca270
Packit 1ca270
define([AC_CHECK_FUNCS], [#
Packit 1ca270
@@@funcs="$funcs $1"@@@
Packit 1ca270
ifelse([$2], , , [
Packit 1ca270
# If it was found, we do:
Packit 1ca270
$2
Packit 1ca270
# If it was not found, we do:
Packit 1ca270
$3
Packit 1ca270
])
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
define([AC_CHECK_HEADERS], [#
Packit 1ca270
@@@headers="$headers $1"@@@
Packit 1ca270
ifelse([$2], , , [
Packit 1ca270
# If it was found, we do:
Packit 1ca270
$2
Packit 1ca270
# If it was not found, we do:
Packit 1ca270
$3
Packit 1ca270
])
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
define([AC_CHECK_HEADERS_DIRENT], [#
Packit 1ca270
@@@headers="$headers $1"@@@
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
define([AC_CHECK_LIB], [#
Packit 1ca270
  ifelse([$3], , [
Packit 1ca270
@@@libs="$libs $1"@@@
Packit 1ca270
], [
Packit 1ca270
# If it was found, we do:
Packit 1ca270
$3
Packit 1ca270
# If it was not found, we do:
Packit 1ca270
$4
Packit 1ca270
])
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
define([AC_HAVE_LIBRARY], [#
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
define(<<AC_LIB_NAME>>, dnl
Packit 1ca270
patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  ifelse([$2], , [
Packit 1ca270
@@@libs="$libs AC_LIB_NAME"@@@
Packit 1ca270
], [
Packit 1ca270
# If it was found, we do:
Packit 1ca270
$2
Packit 1ca270
# If it was not found, we do:
Packit 1ca270
$3
Packit 1ca270
])
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
define([AC_CHECK_SIZEOF], [#
Packit 1ca270
@@@types="$types,$1"@@@
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
define([AC_CONFIG_HEADER], [#
Packit 1ca270
define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
Packit 1ca270
@@@config_h=AC_CONFIG_H@@@
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
define([AC_DEFINE], [#
Packit 1ca270
ifelse([$3],,[#
Packit 1ca270
@@@syms="$syms $1"@@@
Packit 1ca270
], [#
Packit 1ca270
@@@verbatim="$verbatim
Packit 1ca270
/* $3 */
Packit 1ca270
#undef $1
Packit 1ca270
"@@@
Packit 1ca270
])])
Packit 1ca270
Packit 1ca270
define([AC_DEFINE_UNQUOTED], [#
Packit 1ca270
ifelse([$3],,[#
Packit 1ca270
@@@syms="$syms $1"@@@
Packit 1ca270
], [#
Packit 1ca270
@@@verbatim="$verbatim
Packit 1ca270
/* $3 */
Packit 1ca270
#undef $1
Packit 1ca270
"@@@
Packit 1ca270
])])