AM_PROG_GCJ: use AC_CHECK_TOOLS for gcj, for cross compilation.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 7 Jun 2009 06:03:08 +0000 (08:03 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 7 Jun 2009 06:05:01 +0000 (08:05 +0200)
* m4/gcj.m4 (AM_PROG_GCJ): Use AC_CHECK_TOOLS, rather than
AC_CHECK_PROGS, when searching for `gcj'.
* NEWS: Update.
Report by Jack Kelly.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
m4/gcj.m4

index 547fc27..0b47a3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       AM_PROG_GCJ: use AC_CHECK_TOOLS for gcj, for cross compilation.
+       * m4/gcj.m4 (AM_PROG_GCJ): Use AC_CHECK_TOOLS, rather than
+       AC_CHECK_PROGS, when searching for `gcj'.
+       * NEWS: Update.
+       Report by Jack Kelly.
+
 2009-05-24  Jack Kelly  <endgame.dos@gmail.com>  (tiny change)
            Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
diff --git a/NEWS b/NEWS
index c3bb3ab..cd427fb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Bugs fixed in 1.11.0a:
   - The testsuite does not try to change the mode of `ltmain.sh' files from
     a Libtool installation (symlinked to test directories) any more.
 
+  - AM_PROG_GCJ uses AC_CHECK_TOOLS to look for `gcj' now, so that prefixed
+    tools are preferred in a cross-compile setup.
+
 \f
 New in 1.11:
 
index 5d1e00f..9e930e0 100644 (file)
--- a/m4/gcj.m4
+++ b/m4/gcj.m4
@@ -1,14 +1,14 @@
 # Check for Java compiler.                                  -*- Autoconf -*-
 # For now we only handle the GNU compiler.
 
-# Copyright (C) 1999, 2000, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([AM_PROG_GCJ],[
-AC_CHECK_PROGS(GCJ, gcj, gcj)
+AC_CHECK_TOOLS(GCJ, gcj, gcj)
 test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
 if test "x${GCJFLAGS-unset}" = xunset; then
    GCJFLAGS="-g -O2"