diff options
author | Anthony Green <green@redhat.com> | 2002-02-07 03:24:12 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2002-02-07 03:24:12 +0000 |
commit | b5ee195f1e3f11a5979841bedbf932926ffe5322 (patch) | |
tree | 27d9ff28c3ab0424e26761a6636a9afcbf395114 /libjava/acinclude.m4 | |
parent | 383aa2ef4972a828f0be6f36ff7f3e1c742fb173 (diff) | |
download | gcc-b5ee195f1e3f11a5979841bedbf932926ffe5322.zip gcc-b5ee195f1e3f11a5979841bedbf932926ffe5322.tar.gz gcc-b5ee195f1e3f11a5979841bedbf932926ffe5322.tar.bz2 |
embedded updates
From-SVN: r49562
Diffstat (limited to 'libjava/acinclude.m4')
-rw-r--r-- | libjava/acinclude.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libjava/acinclude.m4 b/libjava/acinclude.m4 index 68f5255..6107507 100644 --- a/libjava/acinclude.m4 +++ b/libjava/acinclude.m4 @@ -1,3 +1,29 @@ +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 |