summaryrefslogtreecommitdiff
path: root/libjava/classpath/m4
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 23:20:01 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 23:20:01 +0000
commit3b3101d8b5ae4f08a16c0b7111da6cad41bbd282 (patch)
treea5eb7cf42a51869cc8aa1fad7ad6a90cca47fdd8 /libjava/classpath/m4
parent7e55c49d7d91ef9f09e93c1100119b1ab3652446 (diff)
downloadgcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.tar.gz
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated. * Makefile.in: Likewise. * scripts/makemake.tcl: Use glob -nocomplain. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/m4')
-rw-r--r--libjava/classpath/m4/acattribute.m425
-rw-r--r--libjava/classpath/m4/acinclude.m453
2 files changed, 39 insertions, 39 deletions
diff --git a/libjava/classpath/m4/acattribute.m4 b/libjava/classpath/m4/acattribute.m4
new file mode 100644
index 00000000000..7b490d4b7cb
--- /dev/null
+++ b/libjava/classpath/m4/acattribute.m4
@@ -0,0 +1,25 @@
+dnl modified AC_C_INLINE from autoconf/c.m4
+
+AN_IDENTIFIER([attribute], [AC_C_ATTRIBUTE])
+AC_DEFUN([AC_C_ATTRIBUTE],
+[AC_CACHE_CHECK([for __attribute__], ac_cv_c_attribute,
+[
+AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[void foo(void) __attribute__ ((__noreturn__));]
+)],
+[ac_cv_c_attribute=yes],
+[ac_cv_c_attribute=no]
+)
+])
+AH_VERBATIM([attribute],
+[/* Define to `__attribute__' to nothing if it's not supported. */
+#undef __attribute__])
+case $ac_cv_c_attribute in
+ yes) ;;
+ no)
+ cat >>confdefs.h <<_ACEOF
+#define __attribute__(x) /* nothing */
+_ACEOF
+ ;;
+esac
+])# AC_C_ATTRIBUTE
diff --git a/libjava/classpath/m4/acinclude.m4 b/libjava/classpath/m4/acinclude.m4
index e05a2f8e7b5..e41321f89f3 100644
--- a/libjava/classpath/m4/acinclude.m4
+++ b/libjava/classpath/m4/acinclude.m4
@@ -63,48 +63,23 @@ AC_DEFUN([CLASSPATH_CHECK_GCJ],
else
AC_PATH_PROG(GCJ, "gcj")
fi
-
+ dnl Test the given GCJ, but use it as C (!) compiler to check version
if test "x$GCJ" != x; then
- ## GCC version 2 puts out version messages that looked like:
- ## 2.95
-
- ## GCC version 3 puts out version messages like:
- ## gcj (GCC) 3.3.3
- ## Copyright (C) 2003 Free Software Foundation, Inc.
- ## This is free software; see the source for copying conditions. There is NO
- ## warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- AC_MSG_CHECKING(gcj version)
- ## Take the output from gcj --version and extract just the version number
- ## into GCJ_VERSION.
- ## (we need to do this to be compatible with both GCC 2 and GCC 3 version
- ## numbers)
- ##
- ## First, we get rid of everything before the first number on that line.
- ## Assume that the first number on that line is the start of the
- ## version.
- ##
- ## Second, while we're at it, go ahead and get rid of the first character
- ## that is not part of a version number (i.e., is neither a digit nor
- ## a dot).
- ##
- ## Third, quit, so that we won't process the second and subsequent lines.
- GCJ_VERSION=`$GCJ --version | sed -e 's/^@<:@^0-9@:>@*//' -e 's/@<:@^.0-9@:>@@<:@^.0-9@:>@*//' -e 'q'`
- GCJ_VERSION_MAJOR=`echo "$GCJ_VERSION" | cut -d '.' -f 1`
- GCJ_VERSION_MINOR=`echo "$GCJ_VERSION" | cut -d '.' -f 2`
-
- if expr "$GCJ_VERSION_MAJOR" \< 3 > /dev/null; then
- GCJ=""
- fi
- if expr "$GCJ_VERSION_MAJOR" = 3 > /dev/null; then
- if expr "$GCJ_VERSION_MINOR" \< 3; then
- GCJ=""
- fi
- fi
- if test "x$GCJ" != x; then
- AC_MSG_RESULT($GCJ_VERSION)
+ AC_MSG_CHECKING([gcj version 4.0])
+ AC_LANG_PUSH([C])
+ AC_LANG_CONFTEST(
+ [[#if __GNUC__ <= 3
+ #error GCJ 4.0.0 or higher is required
+ #endif
+ ]])
+ $GCJ -E conftest.c > /dev/null
+ gcj_4_result=$?
+ if test "x$gcj_4_result" = "x0"; then
+ AC_MSG_RESULT([4.0 or higher found])
else
- AC_MSG_WARN($GCJ_VERSION: gcj 3.3 or higher required)
+ AC_MSG_WARN([4.0 or higher required])
fi
+ AC_LANG_POP
fi
])