summaryrefslogtreecommitdiff
path: root/m4/longlong.m4
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-10-14 01:16:33 +0100
committerColin Watson <cjwatson@debian.org>2007-10-14 01:16:33 +0100
commitcf377798b382ab94edab32ab7a5d8678aae7730e (patch)
treed4fe53730d4cb989aa2c30012efe82a4f4417839 /m4/longlong.m4
parent7444686a9de5d9458607464a5b62d080091dfb15 (diff)
Add most files generated by autogen.sh to revision control, as it
makes it easier to keep track of what the Autotools are doing. autom4te.cache and po/Makevars.template are explicitly still ignored; the former is junk and the latter is only necessary in the gettext-tools package. * ABOUT-NLS, aclocal.m4, config.h.in, configure, intl/ChangeLog, intl/Makefile.in, intl/VERSION, intl/bindtextdom.c, intl/config.charset, intl/dcgettext.c, intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c, intl/dngettext.c, intl/eval-plural.h, intl/explodename.c, intl/export.h, intl/finddomain.c, intl/gettext.c, intl/gettextP.h, intl/gmo.h, intl/hash-string.c, intl/hash-string.h, intl/intl-compat.c, intl/intl-exports.c, intl/l10nflist.c, intl/langprefs.c, intl/libgnuintl.h.in, intl/loadinfo.h, intl/loadmsgcat.c, intl/localcharset.c, intl/localcharset.h, intl/locale.alias, intl/localealias.c, intl/localename.c, intl/lock.c, intl/lock.h, intl/log.c, intl/ngettext.c, intl/os2compat.c, intl/os2compat.h, intl/osdep.c, intl/plural-exp.c, intl/plural-exp.h, intl/plural.c, intl/plural.y, intl/printf-args.c, intl/printf-args.h, intl/printf-parse.c, intl/printf-parse.h, intl/printf.c, intl/ref-add.sin, intl/ref-del.sin, intl/relocatable.c, intl/relocatable.h, intl/textdomain.c, intl/vasnprintf.c, intl/vasnprintf.h, intl/vasnwprintf.h, intl/version.c, intl/wprintf-parse.h, intl/xsize.h, m4/codeset.m4, m4/gettext.m4, m4/glibc2.m4, m4/glibc21.m4, m4/iconv.m4, m4/intdiv0.m4, m4/intl.m4, m4/intldir.m4, m4/intmax.m4, m4/inttypes-pri.m4, m4/inttypes_h.m4, m4/lcmessage.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4, m4/lock.m4, m4/longdouble.m4, m4/longlong.m4, m4/nls.m4, m4/po.m4, m4/printf-posix.m4, m4/progtest.m4, m4/size_max.m4, m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/visibility.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4, po/Makefile.in.in, po/Rules-quot, po/boldquot.sed, po/en@boldquot.header, po/en@quot.header, po/insert-header.sin, po/quot.sed, po/remove-potcdate.sin, tools/config.rpath, tools/depcomp, tools/missing, tools/ylwrap: New files. * .bzrignore: Update.
Diffstat (limited to 'm4/longlong.m4')
-rw-r--r--m4/longlong.m448
1 files changed, 48 insertions, 0 deletions
diff --git a/m4/longlong.m4 b/m4/longlong.m4
new file mode 100644
index 00000000..3716c09f
--- /dev/null
+++ b/m4/longlong.m4
@@ -0,0 +1,48 @@
+# longlong.m4 serial 8
+dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.60, but can be removed once we
+# assume 2.61 everywhere.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ typedef int a[((-9223372036854775807LL < 0
+ && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ int i = 63;]],
+ [[long long int llmax = 9223372036854775807ll;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll));]])],
+ [ac_cv_type_long_long_int=yes],
+ [ac_cv_type_long_long_int=no])])
+ if test $ac_cv_type_long_long_int = yes; then
+ AC_DEFINE([HAVE_LONG_LONG_INT], 1,
+ [Define to 1 if the system has the type `long long int'.])
+ fi
+])
+
+# This macro is obsolescent and should go away soon.
+AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+[
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ ac_cv_type_long_long=$ac_cv_type_long_long_int
+ if test $ac_cv_type_long_long = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1,
+ [Define if you have the 'long long' type.])
+ fi
+])