changeset 1681:db4dd18d75ea

Use 3-arg form of AC_DEFINE.
author Jim Meyering <jim@meyering.net>
date Sat, 30 Jan 1999 13:50:58 +0000
parents cd2dc333c6d4
children 39500af7214b
files m4/uintmax_t.m4
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/m4/uintmax_t.m4
+++ b/m4/uintmax_t.m4
@@ -1,7 +1,9 @@
-#serial 1
+#serial 2
 
 dnl From Paul Eggert.
 
+AC_PREREQ(2.13)
+
 # Define uintmax_t to `unsigned long' or `unsigned long long'
 # if <inttypes.h> does not exist.
 
@@ -14,10 +16,11 @@
       [unsigned long long i = (unsigned long long) -1;],
       ac_cv_type_unsigned_long_long=yes,
       ac_cv_type_unsigned_long_long=no)])
-    if test $ac_cv_type_unsigned_long_long = yes; then
-      AC_DEFINE(uintmax_t, unsigned long long)
-    else
-      AC_DEFINE(uintmax_t, unsigned long)
-    fi
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+    AC_DEFINE(uintmax_t, $ac_type,
+	      [  Define to \`unsigned long' or \`unsigned long long'
+   if <inttypes.h> doesn't define.])
   fi
 ])