diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-01-20 15:53:07 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-01-20 15:53:07 +0000 |
commit | 65b770085aff7b6bba421ae81a0589fe49694f01 (patch) | |
tree | d9a4644a8c5cf67a3dd691b70c7c8fe54752c006 /m4 | |
parent | 50b24ab6ffd231be0c601f92ca3985eff2feeb8a (diff) | |
download | mailutils-65b770085aff7b6bba421ae81a0589fe49694f01.tar.gz mailutils-65b770085aff7b6bba421ae81a0589fe49694f01.tar.bz2 |
Updated by gnulib-sync
Diffstat (limited to 'm4')
-rw-r--r-- | m4/argp.m4 | 36 | ||||
-rw-r--r-- | m4/regex.m4 | 27 | ||||
-rw-r--r-- | m4/stdint.m4 | 4 |
3 files changed, 61 insertions, 6 deletions
diff --git a/m4/argp.m4 b/m4/argp.m4 index 8ecc4ee15..6a5d6b246 100644 --- a/m4/argp.m4 +++ b/m4/argp.m4 @@ -9,8 +9,40 @@ AC_DEFUN([gl_ARGP], AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_GETOPT_SUBSTITUTE]) - AC_CHECK_DECLS([program_invocation_name, program_invocation_short_name],,, - [#include <errno.h>]) + + AC_CHECK_DECL([program_invocation_name], + [AC_DEFINE(HAVE_DECL_PROGRAM_INVOCATION_NAME, 1, + [Define if program_invocation_name is declared])], + [AC_DEFINE(GNULIB_PROGRAM_INVOCATION_NAME, 1, + [Define to 1 to add extern declaration of program_invocation_name to argp-namefrob.h])], + [#include <errno.h>]) + AC_CHECK_DECL([program_invocation_short_name], + [AC_DEFINE(HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME, 1, + [Define if program_invocation_short_name is declared])], + [AC_DEFINE(GNULIB_PROGRAM_INVOCATION_SHORT_NAME, 1, + [Define to 1 to add extern declaration of program_invocation_short_name to argp-namefrob.h])], + [#include <errno.h>]) + + # Check if program_invocation_name and program_invocation_short_name + # are defined elsewhere. It is improbable that only one of them will + # be defined and other not, I prefer to stay on the safe side and to + # test each one separately. + AC_MSG_CHECKING(whether program_invocation_name is defined) + AC_TRY_COMPILE([#include <argp.h>], + [ program_invocation_name = "test"; ], + [ AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME,1, + [Define if program_invocation_name is defined]) + AC_MSG_RESULT(yes)], + [ AC_MSG_RESULT(no)] ) + + AC_MSG_CHECKING(whether program_invocation_short_name is defined) + AC_TRY_COMPILE([#include <argp.h>], + [ program_invocation_short_name = "test"; ], + [ AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME,1, + [Define if program_invocation_short_name is defined]) + AC_MSG_RESULT(yes)], + [ AC_MSG_RESULT(no)] ) + AC_CHECK_DECLS_ONCE( [clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked diff --git a/m4/regex.m4 b/m4/regex.m4 index 11829de81..f296ae8a7 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -#serial 30 +#serial 31 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free # Software Foundation, Inc. @@ -15,8 +15,29 @@ AC_PREREQ([2.50]) AC_DEFUN([gl_REGEX], [ AC_REQUIRE([AC_SYS_LARGEFILE]) dnl for a sufficently-wide off_t - AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, - [Define if you want regoff_t to be at least as wide POSIX requires.]) + + AC_CACHE_CHECK([whether off_t can be used in a switch statement], + [gl_cv_type_off_t_switch], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT], + [[off_t o = -1; + switch (o) + { + case -2: + return 1; + case -1: + return 2; + default: + return 0; + } + ]])], + [gl_cv_type_off_t_switch=yes], + [gl_cv_type_off_t_switch=no])]) + if test $gl_cv_type_off_t_switch = yes; then + AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, + [Define if you want regoff_t to be at least as wide POSIX requires.]) + fi MU_LIBSOURCES( [regcomp.c, regex.c, regex.h, diff --git a/m4/stdint.m4 b/m4/stdint.m4 index 4875752de..d4a6994c4 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 4 +# stdint.m4 serial 5 dnl Copyright (C) 2001-2002, 2004-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, @@ -12,6 +12,8 @@ AC_DEFUN([gl_STDINT_H], AC_REQUIRE([gt_HEADER_INTTYPES_H]) dnl Check for <sys/inttypes.h>. AC_CHECK_HEADERS([sys/inttypes.h]) +dnl Check for <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). +AC_CHECK_HEADERS([sys/bitypes.h]) AC_MSG_CHECKING([for stdint.h]) AC_CACHE_VAL(gl_cv_header_stdint_h, [ |