home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / autoconf-2.10-src.tgz / tar.out / fsf / autoconf / autoheader.m4 < prev    next >
M4 Source File  |  1996-09-24  |  2KB  |  98 lines

  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.
  4. dnl
  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)
  8. dnl any later version.
  9. dnl
  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.
  14. dnl
  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., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. dnl
  19. dnl Written by Roland McGrath.
  20. dnl
  21. include(acgeneral.m4)dnl
  22. builtin(include, acspecific.m4)dnl
  23. builtin(include, acoldnames.m4)dnl
  24.  
  25. dnl These are alternate definitions of some macros, which produce
  26. dnl strings in the output marked with "@@@" so we can easily extract
  27. dnl the information we want.  The `#' at the end of the first line of
  28. dnl each definition seems to be necessary to prevent m4 from eating
  29. dnl the newline, which makes the @@@ not always be at the beginning of
  30. dnl a line.
  31.  
  32. define([AC_CHECK_FUNCS], [#
  33. @@@funcs="$funcs $1"@@@
  34. ifelse([$2], , , [
  35. # If it was found, we do:
  36. $2
  37. # If it was not found, we do:
  38. $3
  39. ])
  40. ])
  41.  
  42. define([AC_CHECK_HEADERS], [#
  43. @@@headers="$headers $1"@@@
  44. ifelse([$2], , , [
  45. # If it was found, we do:
  46. $2
  47. # If it was not found, we do:
  48. $3
  49. ])
  50. ])
  51.  
  52. define([AC_CHECK_HEADERS_DIRENT], [#
  53. @@@headers="$headers $1"@@@
  54. ])
  55.  
  56. define([AC_CHECK_LIB], [#
  57.   ifelse([$3], , [
  58. @@@libs="$libs $1"@@@
  59. ], [
  60. # If it was found, we do:
  61. $3
  62. # If it was not found, we do:
  63. $4
  64. ])
  65. ])
  66.  
  67. define([AC_HAVE_LIBRARY], [#
  68. changequote(<<, >>)dnl
  69. define(<<AC_LIB_NAME>>, dnl
  70. patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
  71. changequote([, ])dnl
  72.   ifelse([$2], , [
  73. @@@libs="$libs AC_LIB_NAME"@@@
  74. ], [
  75. # If it was found, we do:
  76. $2
  77. # If it was not found, we do:
  78. $3
  79. ])
  80. ])
  81.  
  82. define([AC_CHECK_SIZEOF], [#
  83. @@@types="$types,$1"@@@
  84. ])
  85.  
  86. define([AC_CONFIG_HEADER], [#
  87. define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
  88. @@@config_h=AC_CONFIG_H@@@
  89. ])
  90.  
  91. define([AC_DEFINE], [#
  92. @@@syms="$syms $1"@@@
  93. ])
  94.  
  95. define([AC_DEFINE_UNQUOTED], [#
  96. @@@syms="$syms $1"@@@
  97. ])
  98.