aclocal.m4 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. dnl aclocal.m4 generated automatically by aclocal 1.4
  2. dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  3. dnl This file 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([AC_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", [Name of package])
  103. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
  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. #
  115. # Check to make sure that the build environment is sane.
  116. #
  117. AC_DEFUN(AM_SANITY_CHECK,
  118. [AC_MSG_CHECKING([whether build environment is sane])
  119. # Just in case
  120. sleep 1
  121. echo timestamp > conftestfile
  122. # Do `set' in a subshell so we don't clobber the current shell's
  123. # arguments. Must try -L first in case configure is actually a
  124. # symlink; some systems play weird games with the mod time of symlinks
  125. # (eg FreeBSD returns the mod time of the symlink's containing
  126. # directory).
  127. if (
  128. set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  129. if test "[$]*" = "X"; then
  130. # -L didn't work.
  131. set X `ls -t $srcdir/configure conftestfile`
  132. fi
  133. if test "[$]*" != "X $srcdir/configure conftestfile" \
  134. && test "[$]*" != "X conftestfile $srcdir/configure"; then
  135. # If neither matched, then we have a broken ls. This can happen
  136. # if, for instance, CONFIG_SHELL is bash and it inherits a
  137. # broken ls alias from the environment. This has actually
  138. # happened. Such a system could not be considered "sane".
  139. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  140. alias in your environment])
  141. fi
  142. test "[$]2" = conftestfile
  143. )
  144. then
  145. # Ok.
  146. :
  147. else
  148. AC_MSG_ERROR([newly created file is older than distributed files!
  149. Check your system clock])
  150. fi
  151. rm -f conftest*
  152. AC_MSG_RESULT(yes)])
  153. dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  154. dnl The program must properly implement --version.
  155. AC_DEFUN(AM_MISSING_PROG,
  156. [AC_MSG_CHECKING(for working $2)
  157. # Run test in a subshell; some versions of sh will print an error if
  158. # an executable is not found, even if stderr is redirected.
  159. # Redirect stdin to placate older versions of autoconf. Sigh.
  160. if ($2 --version) < /dev/null > /dev/null 2>&1; then
  161. $1=$2
  162. AC_MSG_RESULT(found)
  163. else
  164. $1="$3/missing $2"
  165. AC_MSG_RESULT(missing)
  166. fi
  167. AC_SUBST($1)])
  168. # Like AC_CONFIG_HEADER, but automatically create stamp file.
  169. AC_DEFUN(AM_CONFIG_HEADER,
  170. [AC_PREREQ([2.12])
  171. AC_CONFIG_HEADER([$1])
  172. dnl When config.status generates a header, we must update the stamp-h file.
  173. dnl This file resides in the same directory as the config header
  174. dnl that is generated. We must strip everything past the first ":",
  175. dnl and everything past the last "/".
  176. AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
  177. ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
  178. <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
  179. <<am_indx=1
  180. for am_file in <<$1>>; do
  181. case " <<$>>CONFIG_HEADERS " in
  182. *" <<$>>am_file "*<<)>>
  183. echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
  184. ;;
  185. esac
  186. am_indx=`expr "<<$>>am_indx" + 1`
  187. done<<>>dnl>>)
  188. changequote([,]))])