From 33ca07a482593bccc206404d11edf87150b4cf6b Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Thu, 10 Apr 2003 23:15:46 +0000 Subject: [PATCH] * configure.in: Get the build platform name. Define MODIFICATION_DELAY as the time to wait after modifying a file, to cope with timestamp granularity issues, depending on the platform. * tests/defs.in: Define `sleep' using MODIFICATION_DELAY. --- ChangeLog | 8 ++++++++ configure | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++- configure.in | 13 +++++++++++++ tests/defs.in | 9 ++++----- 4 files changed, 78 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b2de731..d1bad81c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-04-08 Richard Dawe + + * configure.in: Get the build platform name. Define + MODIFICATION_DELAY as the time to wait after modifying a file, + to cope with timestamp granularity issues, depending + on the platform. + * tests/defs.in: Define `sleep' using MODIFICATION_DELAY. + 2003-04-08 Eric Siegerman (tiny change) * automake.texi (Public macros): Clarify that the new diff --git a/configure b/configure index 92b3fbd1..8f3381f8 100755 --- a/configure +++ b/configure @@ -273,7 +273,7 @@ PACKAGE_STRING='GNU Automake 1.7a' PACKAGE_BUGREPORT='bug-automake@gnu.org' ac_unique_file="automake.in" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot APIVERSION pkgvdatadir PERL TEX LN EGREP FGREP LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot APIVERSION pkgvdatadir PERL TEX LN MODIFICATION_DELAY EGREP FGREP LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -779,6 +779,9 @@ Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] _ACEOF fi @@ -1230,6 +1233,39 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; # this way we can run Autoconf tests from configure without being # bothered by `missing'. @@ -1760,6 +1796,17 @@ test "x$am_cv_prog_ln" = xln && result=yes echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 +# The amount we should wait after modifying files depends on the platform. +# On Windows '95, '98 and ME, files modifications have 2-seconds +# granularity and can be up to 3 seconds in the future w.r.t. the +# system clock. When it is important to ensure one file is older +# than another we wait at least 5 seconds between creations. +case $build in + *-pc-msdosdjgpp) MODIFICATION_DELAY=5;; + *) MODIFICATION_DELAY=2;; +esac + + # Test for things needed by the test suite. echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 @@ -2437,6 +2484,10 @@ s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t @@ -2461,6 +2512,7 @@ s,@pkgvdatadir@,$pkgvdatadir,;t t s,@PERL@,$PERL,;t t s,@TEX@,$TEX,;t t s,@LN@,$LN,;t t +s,@MODIFICATION_DELAY@,$MODIFICATION_DELAY,;t t s,@EGREP@,$EGREP,;t t s,@FGREP@,$FGREP,;t t s,@LIBOBJS@,$LIBOBJS,;t t diff --git a/configure.in b/configure.in index ce8b8544..96a386d7 100644 --- a/configure.in +++ b/configure.in @@ -24,6 +24,8 @@ AC_INIT([GNU Automake], [1.7a], [bug-automake@gnu.org]) AC_CONFIG_SRCDIR(automake.in) AC_CONFIG_AUX_DIR(lib) +AC_CANONICAL_BUILD + # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; # this way we can run Autoconf tests from configure without being # bothered by `missing'. @@ -89,6 +91,17 @@ result=no test "x$am_cv_prog_ln" = xln && result=yes AC_MSG_RESULT([$result]) +# The amount we should wait after modifying files depends on the platform. +# On Windows '95, '98 and ME, files modifications have 2-seconds +# granularity and can be up to 3 seconds in the future w.r.t. the +# system clock. When it is important to ensure one file is older +# than another we wait at least 5 seconds between creations. +case $build in + *-pc-msdosdjgpp) MODIFICATION_DELAY=5;; + *) MODIFICATION_DELAY=2;; +esac +AC_SUBST([MODIFICATION_DELAY]) + # Test for things needed by the test suite. AC_PROG_EGREP AC_PROG_FGREP diff --git a/tests/defs.in b/tests/defs.in index b82f4eb9..83b40168 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -269,11 +269,10 @@ export AUTOMAKE ACLOCAL EGREP='@EGREP@' FGREP='@FGREP@' -# On Windows '95, '98 and ME, files modifications have 2-seconds -# granularity and can be up to 3 seconds in the future w.r.t. the -# system clock. When it is important to ensure one file is older -# than another we wait at least 5 seconds between creations. -sleep='sleep 5' +# The amount we should wait after modifying files depends on the platform. +# For instance, Windows '95, '98 and ME have 2-second granularity +# and can be up to 3 seconds in the future w.r.t. the system clock. +sleep='sleep @MODIFICATION_DELAY@' # The tests call `make -e' but we do not want $srcdir from the evironment # to override the definition from the Makefile. -- 2.43.5