]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/programs.m4 (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS):
authorStepan Kasal <kasal@ucw.cz>
Fri, 17 Mar 2006 20:37:26 +0000 (20:37 +0000)
committerStepan Kasal <kasal@ucw.cz>
Fri, 17 Mar 2006 20:37:26 +0000 (20:37 +0000)
  Factor out the warning to...
(_AC_TOOL_WARN): ... this new macro; use `cross_compiling'.
* tests/local.at (AT_CHECK_MACRO_CROSS): Avoid this warning.
* tests/semantics.at (AC_C_BIGENDIAN): Likewise.

lib/autoconf/programs.m4
tests/local.at
tests/semantics.at

index 90c7ef8204ccd6741b34801d303f8653fe7897b5..cfdf35dface02a4ff4155872040b92d5b2ae619d 100644 (file)
@@ -206,6 +206,17 @@ m4_ifvaln([$3], [test -n "$$1" || $1="$3"])dnl
 AU_DEFUN([AC_CHECK_TOOL_PREFIX])
 
 
+# _AC_TOOL_WARN
+# -------------
+AC_DEFUN([_AC_TOOL_WARN],
+[case $cross_compiling:$ac_tool_warned in
+yes:)
+AC_MSG_WARN([In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org.])
+ac_tool_warned=yes ;;
+esac])
+
 # AC_PATH_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
 # -----------------------------------------------------------------------
 # (Use different variables $1 and ac_pt_$1 so that cache vars don't conflict.)
@@ -219,11 +230,7 @@ if test -z "$ac_cv_path_$1"; then
   if test "x$ac_pt_$1" = x; then
     $1="$3"
   else
-    if test "$build" != "$host"; then
-      AC_MSG_WARN([In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org.])
-    fi
+    _AC_TOOL_WARN
     $1=$ac_pt_$1
   fi
 else
@@ -245,11 +252,7 @@ if test -z "$ac_cv_prog_$1"; then
   if test "x$ac_ct_$1" = x; then
     $1="$3"
   else
-    if test "$build" != "$host"; then
-      AC_MSG_WARN([In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org.])
-    fi
+    _AC_TOOL_WARN
     $1=$ac_ct_$1
   fi
 else
@@ -280,11 +283,7 @@ if test -z "$$1"; then
   if test "x$ac_ct_$1" = x; then
     $1="$3"
   else
-    if test "$build" != "$host"; then
-      AC_MSG_WARN([In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org.])
-    fi
+    _AC_TOOL_WARN
     $1=$ac_ct_$1
   fi
 fi
index 0a0701596fb94b9c46d74adf9db5c7f8aaca54b4..89f94495bc668f959efbb38aca3fadd80a9fe760 100644 (file)
@@ -434,8 +434,9 @@ m4_define([AT_CHECK_MACRO_CROSS],
 [AT_CHECK_MACRO($@)
 AT_CHECK_MACRO([$1 (cross compile)],
   [AT_KEYWORDS([cross])
-  # Exercise the code used when cross-compiling
+  # Exercise the code used when cross-compiling.
   cross_compiling=yes
+  ac_tool_warned=yes
   m4_default([$2], [$1])],
   [$3], [$4])
 ])
index 1aa382f6b938bc0a6de0420ad63b78c3095c2e48..312e6cdad97a8291173d36d465e969d477638ed9 100644 (file)
@@ -465,7 +465,9 @@ _AT_CHECK_AC_MACRO(
 
 rm -f config.hin  # So that next run of autoheader is quiet.
 _AT_CHECK_AC_MACRO(
-  [[cross_compiling=yes
+  [[# Force cross compiling.
+   cross_compiling=yes
+   ac_tool_warned=yes
    AC_C_BIGENDIAN([ac_endian=big],[ac_endian=little],[ac_endian=unknown])
    ac_prevendian=`cat at-endian`
    # Check that we have found the same result as in the previous run