-e 's/#undef HAVE_LOCALE_H$$/#define HAVE_LOCALE_H 1/' \
-e 's/#undef HAVE_LONG_DOUBLE$$/#define HAVE_LONG_DOUBLE 1/' \
-e 's/#undef HAVE_LONG_LONG$$/#define HAVE_LONG_LONG 1/' \
- -e 's/#undef HAVE_MALLOC_H$$/#define HAVE_MALLOC_H 1/' \
-e 's/#undef HAVE_MEMMOVE$$/#define HAVE_MEMMOVE 1/' \
-e 's/#undef HAVE_MEMORY_H$$/#define HAVE_MEMORY_H 1/' \
-e 's/#undef HAVE_MMAP$$/#define HAVE_MMAP 1/' \
-e 's/#undef HAVE_MUNMAP$$/#define HAVE_MUNMAP 1/' \
- -e 's/#undef HAVE_NL_TYPES_H$$/#define HAVE_NL_TYPES_H 1/' \
-e 's/#undef HAVE_POSIX_PRINTF$$/#define HAVE_POSIX_PRINTF 1/' \
-e 's/#undef HAVE_PTRDIFF_T$$/#define HAVE_PTRDIFF_T 1/' \
-e 's/#undef HAVE_PUTENV$$/#define HAVE_PUTENV 1/' \
+2005-08-28 Bruno Haible <bruno@clisp.org>
+
+ * gettext.m4 (AM_INTL_SUBDIR): Remove AC_HEADER_STDC, AC_TYPE_OFF_T
+ tests. Remove tests for locale.h, nl_types.h, malloc.h.
+ (gt_INTL_SUBDIR_CORE): Add test for __builtin_expect.
+
2005-08-28 Bruno Haible <bruno@clisp.org>
* gettext.m4 (gt_INTL_SUBDIR_CORE): New macro, extracted from
-# gettext.m4 serial 42 (gettext-0.15)
+# gettext.m4 serial 43 (gettext-0.15)
dnl Copyright (C) 1995-2005 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 Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2005.
dnl Macro to add for using GNU gettext.
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([gl_VISIBILITY])dnl
AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([bh_C_SIGNED])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
[AC_DEFINE([ptrdiff_t], [long],
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
])
- AC_CHECK_HEADERS([locale.h nl_types.h malloc.h stddef.h stdlib.h string.h])
+ AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
dnl Use the _snprintf function only if it is declared (because on NetBSD it
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
AC_REQUIRE([gt_INTTYPES_PRI])dnl
AC_REQUIRE([gl_LOCK])dnl
+
+ AC_TRY_COMPILE(
+ [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
+ [],
+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+ [Define to 1 if the compiler understands __builtin_expect.])])
+
AC_CHECK_HEADERS([argz.h limits.h unistd.h sys/param.h])
AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
stpcpy strcasecmp strdup strtoul tsearch __argz_count __argz_stringify \