]> Dogcows Code - chaz/tar/commitdiff
(AC_MBSTATE_T_OBJECT): Test for mbstate_t only if the test
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 5 Jul 2000 18:41:17 +0000 (18:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 5 Jul 2000 18:41:17 +0000 (18:41 +0000)
for an object-type mbstate_t fails.

m4/mbstate_t.m4

index 693613324792195bf7692edf1dbd7760ad5bf415..ac47f11b2504931b91db8c65ddd0184e3b4128d9 100644 (file)
@@ -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 <stdlib.h>
-#endif
-#include <wchar.h>],
-      [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 <wchar.h> 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 <stdlib.h>
@@ -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 <stdlib.h>
+#endif
+#include <wchar.h>],
+       [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 <wchar.h> does not define.])
+     fi
    fi])
This page took 0.023261 seconds and 4 git commands to generate.