aclocal.m4 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. dnl aclocal.m4 generated automatically by aclocal 1.4-p5
  2. dnl Copyright (C) 1994, 1995-8, 1999, 2001 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. # Do all the work for Automake. This macro actually does too much --
  11. # some checks are only needed if your package does certain things.
  12. # But this isn't really a big deal.
  13. # serial 1
  14. dnl Usage:
  15. dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  16. AC_DEFUN([AM_INIT_AUTOMAKE],
  17. [AC_REQUIRE([AC_PROG_INSTALL])
  18. PACKAGE=[$1]
  19. AC_SUBST(PACKAGE)
  20. VERSION=[$2]
  21. AC_SUBST(VERSION)
  22. dnl test to see if srcdir already configured
  23. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  24. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  25. fi
  26. ifelse([$3],,
  27. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  28. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
  29. AC_REQUIRE([AM_SANITY_CHECK])
  30. AC_REQUIRE([AC_ARG_PROGRAM])
  31. dnl FIXME This is truly gross.
  32. missing_dir=`cd $ac_aux_dir && pwd`
  33. AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
  34. AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
  35. AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
  36. AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
  37. AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
  38. AC_REQUIRE([AC_PROG_MAKE_SET])])
  39. #
  40. # Check to make sure that the build environment is sane.
  41. #
  42. AC_DEFUN([AM_SANITY_CHECK],
  43. [AC_MSG_CHECKING([whether build environment is sane])
  44. # Just in case
  45. sleep 1
  46. echo timestamp > conftestfile
  47. # Do `set' in a subshell so we don't clobber the current shell's
  48. # arguments. Must try -L first in case configure is actually a
  49. # symlink; some systems play weird games with the mod time of symlinks
  50. # (eg FreeBSD returns the mod time of the symlink's containing
  51. # directory).
  52. if (
  53. set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  54. if test "[$]*" = "X"; then
  55. # -L didn't work.
  56. set X `ls -t $srcdir/configure conftestfile`
  57. fi
  58. if test "[$]*" != "X $srcdir/configure conftestfile" \
  59. && test "[$]*" != "X conftestfile $srcdir/configure"; then
  60. # If neither matched, then we have a broken ls. This can happen
  61. # if, for instance, CONFIG_SHELL is bash and it inherits a
  62. # broken ls alias from the environment. This has actually
  63. # happened. Such a system could not be considered "sane".
  64. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  65. alias in your environment])
  66. fi
  67. test "[$]2" = conftestfile
  68. )
  69. then
  70. # Ok.
  71. :
  72. else
  73. AC_MSG_ERROR([newly created file is older than distributed files!
  74. Check your system clock])
  75. fi
  76. rm -f conftest*
  77. AC_MSG_RESULT(yes)])
  78. dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  79. dnl The program must properly implement --version.
  80. AC_DEFUN([AM_MISSING_PROG],
  81. [AC_MSG_CHECKING(for working $2)
  82. # Run test in a subshell; some versions of sh will print an error if
  83. # an executable is not found, even if stderr is redirected.
  84. # Redirect stdin to placate older versions of autoconf. Sigh.
  85. if ($2 --version) < /dev/null > /dev/null 2>&1; then
  86. $1=$2
  87. AC_MSG_RESULT(found)
  88. else
  89. $1="$3/missing $2"
  90. AC_MSG_RESULT(missing)
  91. fi
  92. AC_SUBST($1)])
  93. # Like AC_CONFIG_HEADER, but automatically create stamp file.
  94. AC_DEFUN([AM_CONFIG_HEADER],
  95. [AC_PREREQ([2.12])
  96. AC_CONFIG_HEADER([$1])
  97. dnl When config.status generates a header, we must update the stamp-h file.
  98. dnl This file resides in the same directory as the config header
  99. dnl that is generated. We must strip everything past the first ":",
  100. dnl and everything past the last "/".
  101. AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
  102. ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
  103. <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
  104. <<am_indx=1
  105. for am_file in <<$1>>; do
  106. case " <<$>>CONFIG_HEADERS " in
  107. *" <<$>>am_file "*<<)>>
  108. echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
  109. ;;
  110. esac
  111. am_indx=`expr "<<$>>am_indx" + 1`
  112. done<<>>dnl>>)
  113. changequote([,]))])