diff options
author | James Laird <jlaird@hdfgroup.org> | 2007-01-23 17:29:45 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2007-01-23 17:29:45 (GMT) |
commit | 59eccdaf699634dfb16419200549268623ac4e9b (patch) | |
tree | af72080ab1b7c00749713e9382b5fc8aa868b18c /configure.in | |
parent | f83826852bc9d1ef530c4d292279396fce77d626 (diff) | |
download | hdf5-59eccdaf699634dfb16419200549268623ac4e9b.zip hdf5-59eccdaf699634dfb16419200549268623ac4e9b.tar.gz hdf5-59eccdaf699634dfb16419200549268623ac4e9b.tar.bz2 |
[svn-r13181] Added a configure check to prevent a failure on Cygwin.
It seems that while Cygwin supports the time command, it has trouble with
the syntax
srcdir="../../hdf5/test" time ./testhdf5
and complains.
The solution is to test the above case in configure and not to use the time
command if it fails; Cygwin is fine with
srcdir="../../hdf5/test" ./testhdf5
Tested on Cygwin and kagiso. This feature shouldn't be a major compatibility
problem since every platform but Cygwin is already fine with the current
syntax.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 66c0a72..8dc69e2 100644 --- a/configure.in +++ b/configure.in @@ -522,6 +522,26 @@ if test "X${TR_TEST}" != "XTEST"; then fi +dnl ---------------------------------------------------------------------- +dnl Check that time can be used with srcdir. This is okay on most systems, +dnl but seems to cause problems on Cygwin. +dnl The solution on Cygwin is not to record execution time for tests. +AC_MSG_CHECKING([if srcdir= and time commands work together]) + +AC_SUBST([TIME]) +TIME=time +dnl TIME_TEST=`foo="bar" ${TIME} echo 'baz' | grep ^baz` +${TIME} echo 'baz' >& temp.out +TIME_TEST=`grep ^baz temp.out` +rm temp.out +if test "X${TIME_TEST}" = "Xbaz"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + TIME= +fi + + dnl The following variables are used to distinguish between building a dnl serial and parallel library. dnl |