1dnl Driver and redefinitions of some Autoconf macros for autoheader. 2dnl This file is part of Autoconf. 3dnl Copyright (C) 1994, 1995 Free Software Foundation, Inc. 4dnl 5dnl This program is free software; you can redistribute it and/or modify 6dnl it under the terms of the GNU General Public License as published by 7dnl the Free Software Foundation; either version 2, or (at your option) 8dnl any later version. 9dnl 10dnl This program is distributed in the hope that it will be useful, 11dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13dnl GNU General Public License for more details. 14dnl 15dnl You should have received a copy of the GNU General Public License 16dnl along with this program; if not, write to the Free Software 17dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 18dnl 02111-1307, USA. 19dnl 20dnl Written by Roland McGrath. 21dnl 22include(acgeneral.m4)dnl 23builtin(include, acspecific.m4)dnl 24builtin(include, acoldnames.m4)dnl 25 26dnl These are alternate definitions of some macros, which produce 27dnl strings in the output marked with "@@@" so we can easily extract 28dnl the information we want. The `#' at the end of the first line of 29dnl each definition seems to be necessary to prevent m4 from eating 30dnl the newline, which makes the @@@ not always be at the beginning of 31dnl a line. 32 33define([AC_CHECK_FUNCS], [# 34@@@funcs="$funcs $1"@@@ 35ifelse([$2], , , [ 36# If it was found, we do: 37$2 38# If it was not found, we do: 39$3 40]) 41]) 42 43define([AC_CHECK_HEADERS], [# 44@@@headers="$headers $1"@@@ 45ifelse([$2], , , [ 46# If it was found, we do: 47$2 48# If it was not found, we do: 49$3 50]) 51]) 52 53define([AC_CHECK_HEADERS_DIRENT], [# 54@@@headers="$headers $1"@@@ 55]) 56 57define([AC_CHECK_LIB], [# 58 ifelse([$3], , [ 59@@@libs="$libs $1"@@@ 60], [ 61# If it was found, we do: 62$3 63# If it was not found, we do: 64$4 65]) 66]) 67 68define([AC_HAVE_LIBRARY], [# 69changequote(<<, >>)dnl 70define(<<AC_LIB_NAME>>, dnl 71patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl 72changequote([, ])dnl 73 ifelse([$2], , [ 74@@@libs="$libs AC_LIB_NAME"@@@ 75], [ 76# If it was found, we do: 77$2 78# If it was not found, we do: 79$3 80]) 81]) 82 83define([AC_CHECK_SIZEOF], [# 84@@@types="$types,$1"@@@ 85]) 86 87define([AC_CONFIG_HEADER], [# 88define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl 89@@@config_h=AC_CONFIG_H@@@ 90]) 91 92define([AC_DEFINE], [# 93ifelse([$3],,[# 94@@@syms="$syms $1"@@@ 95], [# 96@@@verbatim="$verbatim 97/* $3 */ 98#undef $1 99"@@@ 100])]) 101 102define([AC_DEFINE_UNQUOTED], [# 103ifelse([$3],,[# 104@@@syms="$syms $1"@@@ 105], [# 106@@@verbatim="$verbatim 107/* $3 */ 108#undef $1 109"@@@ 110])]) 111