+1998-10-02 Ben Elliston <bje@cygnus.com>
+
+ * acgeneral.m4 (AC_VALIDATE_CACHED_SYSTEM_TUPLE): New macro. This
+ macro can be used to ensure that a configure script will not run
+ on a second system without removing the cache and re-running
+ configure. Contributed by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
1998-09-29 Ben Elliston <bje@cygnus.com>
* acgeneral.m4 (AC_SEARCH_LIBS): New macro. Searches a series of
])
+dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
+dnl if the cache file is inconsistent with the current host,
+dnl target and build system types, execute CMD or print a default
+dnl error message.
+AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
+ AC_REQUIRE([AC_CANONICAL_SYSTEM])
+ AC_MSG_CHECKING([cached system tuple])
+ if { test x"${ac_cv_host_system_type+set}" = x"set" &&
+ test x"$ac_cv_host_system_type" != x"$host"; } ||
+ { test x"${ac_cv_build_system_type+set}" = x"set" &&
+ test x"$ac_cv_build_system_type" != x"$build"; } ||
+ { test x"${ac_cv_target_system_type+set}" = x"set" &&
+ test x"$ac_cv_target_system_type" != x"$target"; }; then
+ AC_MSG_RESULT([different])
+ ifelse($#, 1, [$1],
+ [AC_MSG_ERROR([remove config.cache and re-run configure])])
+ else
+ AC_MSG_RESULT(ok)
+ fi
+ ac_cv_host_system_type="$host"
+ ac_cv_build_system_type="$build"
+ ac_cv_target_system_type="$target"
+])
+
+
dnl ### Caching test results
])
+dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
+dnl if the cache file is inconsistent with the current host,
+dnl target and build system types, execute CMD or print a default
+dnl error message.
+AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
+ AC_REQUIRE([AC_CANONICAL_SYSTEM])
+ AC_MSG_CHECKING([cached system tuple])
+ if { test x"${ac_cv_host_system_type+set}" = x"set" &&
+ test x"$ac_cv_host_system_type" != x"$host"; } ||
+ { test x"${ac_cv_build_system_type+set}" = x"set" &&
+ test x"$ac_cv_build_system_type" != x"$build"; } ||
+ { test x"${ac_cv_target_system_type+set}" = x"set" &&
+ test x"$ac_cv_target_system_type" != x"$target"; }; then
+ AC_MSG_RESULT([different])
+ ifelse($#, 1, [$1],
+ [AC_MSG_ERROR([remove config.cache and re-run configure])])
+ else
+ AC_MSG_RESULT(ok)
+ fi
+ ac_cv_host_system_type="$host"
+ ac_cv_build_system_type="$build"
+ ac_cv_target_system_type="$target"
+])
+
+
dnl ### Caching test results