aclocal.m4 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. dnl aclocal.m4 generated automatically by aclocal 1.3
  2. dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  3. dnl This Makefile.in is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. dnl This program is distributed in the hope that it will be useful,
  7. dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. dnl PARTICULAR PURPOSE.
  10. dnl cloned from autoconf 2.13 acspecific.m4
  11. AC_DEFUN(AC_C_LONG_LONG,
  12. [AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
  13. [if test "$GCC" = yes; then
  14. ac_cv_c_long_long=yes
  15. else
  16. AC_TRY_RUN([int main() {
  17. long long foo = 0;
  18. exit(sizeof(long long) < sizeof(long)); }],
  19. ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
  20. fi])
  21. if test $ac_cv_c_long_long = yes; then
  22. AC_DEFINE(HAVE_LONG_LONG)
  23. fi
  24. ])
  25. dnl from autoconf 2.13 acgeneral.m4, with patch:
  26. dnl Date: Fri, 15 Jan 1999 05:52:41 -0800
  27. dnl Message-ID: <199901151352.FAA18237@shade.twinsun.com>
  28. dnl From: eggert@twinsun.com (Paul Eggert)
  29. dnl Subject: autoconf 2.13 AC_CHECK_TYPE doesn't allow shell vars
  30. dnl Newsgroups: gnu.utils.bug
  31. dnl AC_CHECK_TYPE2(TYPE, DEFAULT)
  32. AC_DEFUN(AC_CHECK_TYPE2,
  33. [AC_REQUIRE([AC_HEADER_STDC])dnl
  34. AC_MSG_CHECKING(for $1)
  35. AC_CACHE_VAL(ac_cv_type_$1,
  36. [AC_EGREP_CPP(dnl
  37. changequote(<<,>>)dnl
  38. <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
  39. changequote([,]), [#include <sys/types.h>
  40. #if STDC_HEADERS
  41. #include <stdlib.h>
  42. #include <stddef.h>
  43. #endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl
  44. if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
  45. AC_MSG_RESULT(yes)
  46. else
  47. AC_MSG_RESULT(no)
  48. AC_DEFINE_UNQUOTED($1, $2)
  49. fi
  50. ])
  51. dnl from autoconf 2.13 acgeneral.m4, with additional third argument
  52. dnl AC_CHECK_SIZEOF_INCLUDES(TYPE [, CROSS-SIZE, [INCLUDES]])
  53. AC_DEFUN(AC_CHECK_SIZEOF_INCLUDES,
  54. [changequote(<<, >>)dnl
  55. dnl The name to #define.
  56. define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
  57. dnl The cache variable name.
  58. define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
  59. changequote([, ])dnl
  60. AC_MSG_CHECKING(size of $1)
  61. AC_CACHE_VAL(AC_CV_NAME,
  62. [AC_TRY_RUN([$3
  63. #include <stdio.h>
  64. main()
  65. {
  66. FILE *f=fopen("conftestval", "w");
  67. if (!f) exit(1);
  68. fprintf(f, "%d\n", sizeof($1));
  69. exit(0);
  70. }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
  71. AC_MSG_RESULT($AC_CV_NAME)
  72. AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
  73. undefine([AC_TYPE_NAME])dnl
  74. undefine([AC_CV_NAME])dnl
  75. ])
  76. dnl AC_CHECK_SIZEOF_STDC_HEADERS(TYPE [, CROSS_SIZE])
  77. AC_DEFUN(AC_CHECK_SIZEOF_STDC_HEADERS,
  78. [AC_CHECK_SIZEOF_INCLUDES($1, $2,
  79. [#include <sys/types.h>
  80. #ifdef STDC_HEADERS
  81. #include <stdlib.h>
  82. #endif
  83. ])
  84. ])
  85. # Do all the work for Automake. This macro actually does too much --
  86. # some checks are only needed if your package does certain things.
  87. # But this isn't really a big deal.
  88. # serial 1
  89. dnl Usage:
  90. dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  91. AC_DEFUN(AM_INIT_AUTOMAKE,
  92. [AC_REQUIRE([AM_PROG_INSTALL])
  93. PACKAGE=[$1]
  94. AC_SUBST(PACKAGE)
  95. VERSION=[$2]
  96. AC_SUBST(VERSION)
  97. dnl test to see if srcdir already configured
  98. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  99. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  100. fi
  101. ifelse([$3],,
  102. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  103. AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
  104. AC_REQUIRE([AM_SANITY_CHECK])
  105. AC_REQUIRE([AC_ARG_PROGRAM])
  106. dnl FIXME This is truly gross.
  107. missing_dir=`cd $ac_aux_dir && pwd`
  108. AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
  109. AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
  110. AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
  111. AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
  112. AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
  113. AC_REQUIRE([AC_PROG_MAKE_SET])])
  114. # serial 1
  115. AC_DEFUN(AM_PROG_INSTALL,
  116. [AC_REQUIRE([AC_PROG_INSTALL])
  117. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  118. AC_SUBST(INSTALL_SCRIPT)dnl
  119. ])
  120. #
  121. # Check to make sure that the build environment is sane.
  122. #
  123. AC_DEFUN(AM_SANITY_CHECK,
  124. [AC_MSG_CHECKING([whether build environment is sane])
  125. # Just in case
  126. sleep 1
  127. echo timestamp > conftestfile
  128. # Do `set' in a subshell so we don't clobber the current shell's
  129. # arguments. Must try -L first in case configure is actually a
  130. # symlink; some systems play weird games with the mod time of symlinks
  131. # (eg FreeBSD returns the mod time of the symlink's containing
  132. # directory).
  133. if (
  134. set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  135. if test "[$]*" = "X"; then
  136. # -L didn't work.
  137. set X `ls -t $srcdir/configure conftestfile`
  138. fi
  139. if test "[$]*" != "X $srcdir/configure conftestfile" \
  140. && test "[$]*" != "X conftestfile $srcdir/configure"; then
  141. # If neither matched, then we have a broken ls. This can happen
  142. # if, for instance, CONFIG_SHELL is bash and it inherits a
  143. # broken ls alias from the environment. This has actually
  144. # happened. Such a system could not be considered "sane".
  145. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  146. alias in your environment])
  147. fi
  148. test "[$]2" = conftestfile
  149. )
  150. then
  151. # Ok.
  152. :
  153. else
  154. AC_MSG_ERROR([newly created file is older than distributed files!
  155. Check your system clock])
  156. fi
  157. rm -f conftest*
  158. AC_MSG_RESULT(yes)])
  159. dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  160. dnl The program must properly implement --version.
  161. AC_DEFUN(AM_MISSING_PROG,
  162. [AC_MSG_CHECKING(for working $2)
  163. # Run test in a subshell; some versions of sh will print an error if
  164. # an executable is not found, even if stderr is redirected.
  165. # Redirect stdin to placate older versions of autoconf. Sigh.
  166. if ($2 --version) < /dev/null > /dev/null 2>&1; then
  167. $1=$2
  168. AC_MSG_RESULT(found)
  169. else
  170. $1="$3/missing $2"
  171. AC_MSG_RESULT(missing)
  172. fi
  173. AC_SUBST($1)])
  174. # Like AC_CONFIG_HEADER, but automatically create stamp file.
  175. AC_DEFUN(AM_CONFIG_HEADER,
  176. [AC_PREREQ([2.12])
  177. AC_CONFIG_HEADER([$1])
  178. dnl When config.status generates a header, we must update the stamp-h file.
  179. dnl This file resides in the same directory as the config header
  180. dnl that is generated. We must strip everything past the first ":",
  181. dnl and everything past the last "/".
  182. AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
  183. ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
  184. <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
  185. <<am_indx=1
  186. for am_file in <<$1>>; do
  187. case " <<$>>CONFIG_HEADERS " in
  188. *" <<$>>am_file "*<<)>>
  189. echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
  190. ;;
  191. esac
  192. am_indx=`expr "<<$>>am_indx" + 1`
  193. done<<>>dnl>>)
  194. changequote([,]))])