test-defs.in 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. # -*- shell-script -*-
  2. # @configure_input@
  3. #
  4. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. # Defines and minimal setup for Automake testing environment.
  19. # IMPORTANT NOTES AND REQUIREMENTS
  20. # - Multiple inclusions of this file should be idempotent.
  21. # - This code has to be 'set -e' clean.
  22. # See whether the current test script is expected to use TAP or not.
  23. # Use a sensible default, while allowing the scripts to override this
  24. # check.
  25. if test -z "$am_test_protocol"; then
  26. case $argv0 in
  27. *.tap) am_test_protocol=tap;;
  28. *) am_test_protocol=none;;
  29. esac
  30. fi
  31. am_rel_srcdir='@srcdir@'
  32. am_top_srcdir='@abs_srcdir@'
  33. am_top_builddir='@abs_builddir@'
  34. # Where testsuite-related helper scripts, data files and shell libraries
  35. # are placed.
  36. am_testaux_srcdir=$am_top_srcdir/t/ax
  37. am_testaux_builddir=$am_top_builddir/t/ax
  38. # Support for the "installcheck" target.
  39. case ${am_running_installcheck:=no} in
  40. yes)
  41. am_amdir='@amdir@'
  42. am_automake_acdir='@automake_acdir@'
  43. am_bindir='@bindir@'
  44. am_datadir='@datadir@'
  45. am_docdir='@docdir@'
  46. am_pkgvdatadir='@pkgvdatadir@'
  47. am_scriptdir='@scriptdir@'
  48. am_system_acdir='@system_acdir@'
  49. ;;
  50. no)
  51. am_amdir=$am_top_srcdir/lib/am
  52. am_automake_acdir=$am_top_srcdir/m4
  53. am_bindir=$am_top_builddir/t/wrap
  54. am_datadir=$am_top_srcdir
  55. am_docdir=$am_top_srcdir/doc
  56. am_pkgvdatadir=$am_top_srcdir/lib
  57. am_scriptdir=$am_top_srcdir/lib
  58. am_system_acdir=$am_top_srcdir/m4/acdir
  59. ;;
  60. *)
  61. echo "$me: variable 'am_running_installcheck' has invalid"
  62. "value '$am_running_installcheck'" >&2
  63. exit 99
  64. ;;
  65. esac
  66. APIVERSION='@APIVERSION@'
  67. PATH_SEPARATOR='@PATH_SEPARATOR@'
  68. host_alias=${host_alias-'@host_alias@'}; export host_alias
  69. build_alias=${build_alias-'@build_alias@'}; export build_alias
  70. # Whether the testsuite is being run by faking the presence of a C
  71. # compiler that doesn't grasp the '-c' and '-o' flags together. By
  72. # default, of course, it isn't.
  73. : "${AM_TESTSUITE_SIMULATING_NO_CC_C_O:=no}"
  74. # A concurrency-safe "mkdir -p" implementation.
  75. MKDIR_P=${AM_TESTSUITE_MKDIR_P-'@MKDIR_P@'}
  76. # The shell we use to run our own test scripts, determined at configure
  77. # time. It is required in the self tests, and most importantly for the
  78. # automatic re-execution of test scripts.
  79. AM_TEST_RUNNER_SHELL=${AM_TEST_RUNNER_SHELL-'@AM_TEST_RUNNER_SHELL@'}
  80. # Make sure we override the user shell. And do not read the value of
  81. # $SHELL from the environment (think to the non-uncommon situation where
  82. # e.g., $SHELL=/bin/tcsh).
  83. SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL
  84. # User can override various tools used. Prefer overriding specific for
  85. # that automake testsuite, if they are available.
  86. AWK=${AM_TESTSUITE_AWK-${AWK-'@AWK@'}}
  87. PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}}
  88. MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}}
  89. YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}}
  90. LEX=${AM_TESTSUITE_LEX-${LEX-'@LEX@'}}
  91. AUTOCONF=${AM_TESTSUITE_AUTOCONF-${AUTOCONF-'@am_AUTOCONF@'}}
  92. AUTOM4TE=${AM_TESTSUITE_AUTOM4TE-${AUTOM4TE-'@am_AUTOM4TE@'}}
  93. AUTORECONF=${AM_TESTSUITE_AUTORECONF-${AUTORECONF-'@am_AUTORECONF@'}}
  94. AUTOHEADER=${AM_TESTSUITE_AUTOHEADER-${AUTOHEADER-'@am_AUTOHEADER@'}}
  95. AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
  96. # Tests which want complete control over aclocal or automake command-line
  97. # options should use $am_original_ACLOCAL or $am_original_AUTOMAKE. The
  98. # "test -z" tests take care not to re-initialize them if 'test-defs.sh'
  99. # is re-sourced, as we want that file to remain really idempotent.
  100. if test -z "$am_original_AUTOMAKE"; then
  101. am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
  102. fi
  103. if test -z "$am_original_ACLOCAL"; then
  104. am_original_ACLOCAL=${AM_TESTSUITE_ACLOCAL-${ACLOCAL-"aclocal-$APIVERSION"}}
  105. fi
  106. # Use -Werror by default. Tests for which this is inappropriate should
  107. # use -Wno-error.
  108. # Tests which want complete control over aclocal command-line options
  109. # should use $am_original_ACLOCAL instead.
  110. ACLOCAL="$am_original_ACLOCAL -Werror"
  111. # See how Automake should be run. We put --foreign as the default
  112. # strictness to avoid having to create lots and lots of files. A test
  113. # can override this by specifying a different strictness. Use -Wall
  114. # -Werror by default. Tests for which this is inappropriate (e.g. when
  115. # testing that a warning is enabled by a specific switch) should use
  116. # -Wnone or/and -Wno-error.
  117. # Tests who want complete control over automake command-line options
  118. # should use $am_original_AUTOMAKE instead.
  119. AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror -Wall"
  120. # POSIX no longer requires 'egrep' and 'fgrep',
  121. # but some hosts lack 'grep -E' and 'grep -F'.
  122. EGREP=${AM_TESTSUITE_EGREP-'@EGREP@'}
  123. FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
  124. # Compilers and their flags. These can point to non-GNU compilers (and
  125. # on non-Linux and non-BSD systems, they probably will).
  126. if test $AM_TESTSUITE_SIMULATING_NO_CC_C_O = no; then
  127. CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
  128. else
  129. CC=$am_testaux_builddir/cc-no-c-o
  130. fi
  131. CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
  132. F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
  133. FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
  134. CFLAGS=${AM_TESTSUITE_CFLAGS-${CFLAGS-'@CFLAGS@'}}
  135. CXXFLAGS=${AM_TESTSUITE_CXXFLAGS-${CXXFLAGS-'@CXXFLAGS@'}}
  136. FCFLAGS=${AM_TESTSUITE_FCFLAGS-${FCFLAGS-'@FCFLAGS@'}}
  137. FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
  138. CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
  139. # GNU compilers and their flags.
  140. if test $AM_TESTSUITE_SIMULATING_NO_CC_C_O = no; then
  141. GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
  142. else
  143. GNU_CC=$am_testaux_builddir/cc-no-c-o
  144. fi
  145. GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
  146. GNU_CXX=${AM_TESTSUITE_GNU_CXX-${GNU_CXX-'@GNU_CXX@'}}
  147. GNU_F77=${AM_TESTSUITE_GNU_F77-${GNU_F77-'@GNU_F77@'}}
  148. GNU_FC=${AM_TESTSUITE_GNU_FC-${GNU_FC-'@GNU_FC@'}}
  149. GNU_FFLAGS=${AM_TESTSUITE_GNU_FFLAGS-${GNU_FFLAGS-'@GNU_FFLAGS@'}}
  150. GNU_FCFLAGS=${AM_TESTSUITE_GNU_FCFLAGS-${GNU_FCFLAGS-'@GNU_FCFLAGS@'}}
  151. GNU_CXXFLAGS=${AM_TESTSUITE_GNU_CXXFLAGS-${GNU_CXXFLAGS-'@GNU_CXXFLAGS@'}}
  152. GNU_CFLAGS=${AM_TESTSUITE_GNU_CFLAGS-${GNU_CFLAGS-'@GNU_CFLAGS@'}}
  153. GNU_GCJ=${AM_TESTSUITE_GNU_GCJ-${GNU_GCJ-'@GNU_GCJ@'}}
  154. GNU_GCJFLAGS=${AM_TESTSUITE_GNU_GCJFLAGS-${GNU_GCJFLAGS-'@GNU_GCJFLAGS@'}}
  155. # No all versions of Tex support '--version', so we use a configure
  156. # check to decide if tex is available. This decision is embodied in
  157. # this variable.
  158. TEX=${AM_TESTSUITE_TEX-'@TEX@'}
  159. # The amount we should wait after modifying files depends on the platform.
  160. # For instance, Windows '95, '98 and ME have 2-second granularity
  161. # and can be up to 3 seconds in the future w.r.t. the system clock.
  162. # The creative quoting is to avoid spuriously triggering a failure in
  163. # the maintainer checks,
  164. sleep='sleep ''@MODIFICATION_DELAY@'
  165. # An old timestamp that can be given to a file, in "touch -t" format.
  166. # The time stamp should be portable to all file systems of interest.
  167. # Just for fun, choose the exact time of the announcement of the GNU project
  168. # in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
  169. old_timestamp=198309271735.59
  170. # Make our wrapper script (or installed scripts, if running under
  171. # "installcheck") accessible by default. And avoid to uselessly
  172. # extend $PATH multiple times if this file is sourced multiple times.
  173. case $PATH in
  174. $am_bindir$PATH_SEPARATOR*) ;;
  175. *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
  176. esac
  177. export PATH