This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: remove configure run test
- To: java-patches at gcc dot gnu dot org
- Subject: Patch: remove configure run test
- From: Anthony Green <green at redhat dot com>
- Date: Wed, 30 May 2001 08:03:39 -0700
- Reply-to: green at cygnus dot com
Ok for branch and trunk?
2001-05-30 Anthony Green <green@redhat.com>
* configure: Rebuild.
* configure.in: Use AC_COMPILE_CHECK_SIZEOF instead of
AC_CHECK_SIZEOF.
* aclocal.m4 (AC_COMPILE_CHECK_SIZEOF): Define.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.73.2.9
diff -u -p -r1.73.2.9 configure.in
--- configure.in 2001/05/23 17:11:05 1.73.2.9
+++ configure.in 2001/05/30 15:01:08
@@ -623,8 +635,7 @@ LT_AC_PROG_GCJ
CPPFLAGS=$GCJ_SAVE_CPPFLAGS
-dnl FIXME: cross compilation
-AC_CHECK_SIZEOF(void *)
+AC_COMPILE_CHECK_SIZEOF(void *)
ZLIBS=
ZDEPS=
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/libjava/aclocal.m4,v
retrieving revision 1.14
diff -u -p -r1.14 aclocal.m4
--- aclocal.m4 2000/09/14 08:01:12 1.14
+++ aclocal.m4 2001/05/30 15:01:08
@@ -10,6 +10,33 @@ dnl but WITHOUT ANY WARRANTY, to the ext
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $1)
+AC_CACHE_VAL(AC_CV_NAME,
+[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
+ AC_TRY_COMPILE([#include "confdefs.h"
+#include <sys/types.h>
+$2
+], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
+ if test x$AC_CV_NAME != x ; then break; fi
+done
+])
+if test x$AC_CV_NAME = x ; then
+ AC_MSG_ERROR([cannot determine a size for $1])
+fi
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+
AC_DEFUN(LIBGCJ_CONFIGURE,
[
dnl Default to --enable-multilib