Paolo Bonzini <bonzini <at> gnu.org> writes: > > 2008-10-27 Paolo Bonzini <bonzini <at> gnu.org> > > * lib/autoconf/types.m4 (_AC_TYPE_INT_BODY, _AC_TYPE_UNSIGNED_INT_BODY): > New. > (_AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT): Define and use a shell function.
Let's fix this up for another round of review, as well. > +m4_define([_AC_TYPE_INT_BODY], > +[ AS_LINENO_PUSH([$[]1]) > + AC_CACHE_CHECK([for int$[]2_t], [$[]3], > + [AS_VAR_SET([$[]3], [no]) > + for ac_type in 'int$[]2_t' 'int' 'long int' \ Should that be "int$[]2_t", rather than '', since we want shell expansion of $2 to take place in creating $ac_type? > +# _AC_TYPE_INT(NBITS) > +# ------------------- > +AC_DEFUN([_AC_TYPE_INT], A comment describing this m4 macro would be nice. (And several other macros touched by this patch). > +[AC_REQUIRE_SHELL_FN([ac_func_c_find_intX_t], > + [AS_FUNCTION_DESCRIBE([ac_func_c_find_intX_t], [LINENO BITS], > + [Finds a signed integer type with width BITS, setting a cache variable > + accordingly.])], > + [$0_BODY])]dnl Is this really C specific? Can C++ or Objective C use it? In other words, do we want _c_ in the macro name? > + AC_CACHE_CHECK([for uint$[]2_t], $[]3, > + [AS_VAR_SET([$[]3], [no]) > + for ac_type in 'uint$[]2_t' 'unsigned int' 'unsigned long int' \ Same question on '' vs. "". > m4_bmatch([$1], [^\(8\|32\|64\)$], Unrelated to the patch, but what happened to 16? -- Eric Blake
