2 dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
3 dnl if the cache file is inconsistent with the current host,
4 dnl target and build system types, execute CMD or print a default
6 AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
7 AC_REQUIRE([AC_CANONICAL_SYSTEM])
8 AC_MSG_CHECKING([config.cache system type])
9 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
10 test x"$ac_cv_host_system_type" != x"$host"; } ||
11 { test x"${ac_cv_build_system_type+set}" = x"set" &&
12 test x"$ac_cv_build_system_type" != x"$build"; } ||
13 { test x"${ac_cv_target_system_type+set}" = x"set" &&
14 test x"$ac_cv_target_system_type" != x"$target"; }; then
15 AC_MSG_RESULT([different])
17 [AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
21 ac_cv_host_system_type="$host"
22 ac_cv_build_system_type="$build"
23 ac_cv_target_system_type="$target"