From: Paul Eggert Date: Wed, 5 Jul 2000 18:41:17 +0000 (+0000) Subject: (AC_MBSTATE_T_OBJECT): Test for mbstate_t only if the test X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=12d0cc62bb2f9068794bbf8b1c210490bd07479a;p=chaz%2Ftar (AC_MBSTATE_T_OBJECT): Test for mbstate_t only if the test for an object-type mbstate_t fails. --- diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4 index 6936133..ac47f11 100644 --- a/m4/mbstate_t.m4 +++ b/m4/mbstate_t.m4 @@ -1,4 +1,4 @@ -# serial 5 +# serial 6 # From Paul Eggert. @@ -14,21 +14,7 @@ AC_DEFUN(AC_MBSTATE_T_OBJECT, [ AC_CHECK_HEADERS(stdlib.h) - AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t, - [AC_TRY_COMPILE([ -#if HAVE_STDLIB_H -# include -#endif -#include ], - [mbstate_t *x; return sizeof x;], - ac_cv_type_mbstate_t=yes, - ac_cv_type_mbstate_t=no)]) - if test $ac_cv_type_mbstate_t != yes; then - AC_DEFINE(mbstate_t, int, - [Define to int if does not define.]) - fi - - AC_CACHE_CHECK([for mbstate_t object type], ac_cv_type_mbstate_t_object, + AC_CACHE_CHECK([for mbstate_t object], ac_cv_type_mbstate_t_object, [AC_TRY_COMPILE([ #if HAVE_STDLIB_H # include @@ -40,4 +26,18 @@ AC_DEFUN(AC_MBSTATE_T_OBJECT, if test $ac_cv_type_mbstate_t_object = yes; then AC_DEFINE(HAVE_MBSTATE_T_OBJECT, 1, [Define if mbstate_t is an object type.]) + else + AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t, + [AC_TRY_COMPILE([ +#if HAVE_STDLIB_H +# include +#endif +#include ], + [mbstate_t *x; return sizeof x;], + ac_cv_type_mbstate_t=yes, + ac_cv_type_mbstate_t=no)]) + if test $ac_cv_type_mbstate_t != yes; then + AC_DEFINE(mbstate_t, int, + [Define to int if does not define.]) + fi fi])