diff options
| author | Joakim Verona | 2013-02-10 00:03:41 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-02-10 00:03:41 +0100 |
| commit | 33cc2cd4d53f845b7d1e681dbbe8166acdb652c3 (patch) | |
| tree | 551834731473d23116e08cb89facebbc8bad03db /m4 | |
| parent | 4df065db6acba3975884b435422773ab97f32a00 (diff) | |
| parent | eff1c1900f47ec5dfb6d435325b366362d09d2db (diff) | |
| download | emacs-33cc2cd4d53f845b7d1e681dbbe8166acdb652c3.tar.gz emacs-33cc2cd4d53f845b7d1e681dbbe8166acdb652c3.zip | |
auto upstream
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/extensions.m4 | 47 | ||||
| -rw-r--r-- | m4/stdlib_h.m4 | 6 |
2 files changed, 35 insertions, 18 deletions
diff --git a/m4/extensions.m4 b/m4/extensions.m4 index 617323b244c..07ba376c0e7 100644 --- a/m4/extensions.m4 +++ b/m4/extensions.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 12 -*- Autoconf -*- | 1 | # serial 13 -*- Autoconf -*- |
| 2 | # Enable extensions on systems that normally disable them. | 2 | # Enable extensions on systems that normally disable them. |
| 3 | 3 | ||
| 4 | # Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc. | 4 | # Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc. |
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS | 9 | # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS |
| 10 | # Autoconf. Perhaps we can remove this once we can assume Autoconf | 10 | # Autoconf. Perhaps we can remove this once we can assume Autoconf |
| 11 | # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly | 11 | # 2.70 or later everywhere, but since Autoconf mutates rapidly |
| 12 | # enough in this area it's likely we'll need to redefine | 12 | # enough in this area it's likely we'll need to redefine |
| 13 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. | 13 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. |
| 14 | 14 | ||
| @@ -30,6 +30,7 @@ | |||
| 30 | # ------------------------ | 30 | # ------------------------ |
| 31 | # Enable extensions on systems that normally disable them, | 31 | # Enable extensions on systems that normally disable them, |
| 32 | # typically due to standards-conformance issues. | 32 | # typically due to standards-conformance issues. |
| 33 | # | ||
| 33 | # Remember that #undef in AH_VERBATIM gets replaced with #define by | 34 | # Remember that #undef in AH_VERBATIM gets replaced with #define by |
| 34 | # AC_DEFINE. The goal here is to define all known feature-enabling | 35 | # AC_DEFINE. The goal here is to define all known feature-enabling |
| 35 | # macros, then, if reports of conflicts are made, disable macros that | 36 | # macros, then, if reports of conflicts are made, disable macros that |
| @@ -38,8 +39,6 @@ AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], | |||
| 38 | [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl | 39 | [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl |
| 39 | AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | 40 | AC_BEFORE([$0], [AC_RUN_IFELSE])dnl |
| 40 | 41 | ||
| 41 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 42 | |||
| 43 | AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) | 42 | AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) |
| 44 | if test "$MINIX" = yes; then | 43 | if test "$MINIX" = yes; then |
| 45 | AC_DEFINE([_POSIX_SOURCE], [1], | 44 | AC_DEFINE([_POSIX_SOURCE], [1], |
| @@ -50,24 +49,18 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | |||
| 50 | except with this defined.]) | 49 | except with this defined.]) |
| 51 | AC_DEFINE([_MINIX], [1], | 50 | AC_DEFINE([_MINIX], [1], |
| 52 | [Define to 1 if on MINIX.]) | 51 | [Define to 1 if on MINIX.]) |
| 52 | AC_DEFINE([_NETBSD_SOURCE], [1], | ||
| 53 | [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) | ||
| 53 | fi | 54 | fi |
| 54 | 55 | ||
| 55 | dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, | 56 | dnl Use a different key than __EXTENSIONS__, as that name broke existing |
| 56 | dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already | 57 | dnl configure.ac when using autoheader 2.62. |
| 57 | dnl provided. | 58 | AH_VERBATIM([USE_SYSTEM_EXTENSIONS], |
| 58 | case "$host_os" in | ||
| 59 | hpux*) | ||
| 60 | AC_DEFINE([_XOPEN_SOURCE], [500], | ||
| 61 | [Define to 500 only on HP-UX.]) | ||
| 62 | ;; | ||
| 63 | esac | ||
| 64 | |||
| 65 | AH_VERBATIM([__EXTENSIONS__], | ||
| 66 | [/* Enable extensions on AIX 3, Interix. */ | 59 | [/* Enable extensions on AIX 3, Interix. */ |
| 67 | #ifndef _ALL_SOURCE | 60 | #ifndef _ALL_SOURCE |
| 68 | # undef _ALL_SOURCE | 61 | # undef _ALL_SOURCE |
| 69 | #endif | 62 | #endif |
| 70 | /* Enable general extensions on Mac OS X. */ | 63 | /* Enable general extensions on OS X. */ |
| 71 | #ifndef _DARWIN_C_SOURCE | 64 | #ifndef _DARWIN_C_SOURCE |
| 72 | # undef _DARWIN_C_SOURCE | 65 | # undef _DARWIN_C_SOURCE |
| 73 | #endif | 66 | #endif |
| @@ -83,6 +76,12 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | |||
| 83 | #ifndef _TANDEM_SOURCE | 76 | #ifndef _TANDEM_SOURCE |
| 84 | # undef _TANDEM_SOURCE | 77 | # undef _TANDEM_SOURCE |
| 85 | #endif | 78 | #endif |
| 79 | /* Enable X/Open extensions if necessary. HP-UX 11.11 defines | ||
| 80 | mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of | ||
| 81 | whether compiling with -Ae or -D_HPUX_SOURCE=1. */ | ||
| 82 | #ifndef _XOPEN_SOURCE | ||
| 83 | # undef _XOPEN_SOURCE | ||
| 84 | #endif | ||
| 86 | /* Enable general extensions on Solaris. */ | 85 | /* Enable general extensions on Solaris. */ |
| 87 | #ifndef __EXTENSIONS__ | 86 | #ifndef __EXTENSIONS__ |
| 88 | # undef __EXTENSIONS__ | 87 | # undef __EXTENSIONS__ |
| @@ -103,6 +102,22 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | |||
| 103 | AC_DEFINE([_GNU_SOURCE]) | 102 | AC_DEFINE([_GNU_SOURCE]) |
| 104 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | 103 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) |
| 105 | AC_DEFINE([_TANDEM_SOURCE]) | 104 | AC_DEFINE([_TANDEM_SOURCE]) |
| 105 | AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], | ||
| 106 | [ac_cv_should_define__xopen_source], | ||
| 107 | [ac_cv_should_define__xopen_source=no | ||
| 108 | AC_COMPILE_IFELSE( | ||
| 109 | [AC_LANG_PROGRAM([[ | ||
| 110 | #include <wchar.h> | ||
| 111 | mbstate_t x;]])], | ||
| 112 | [], | ||
| 113 | [AC_COMPILE_IFELSE( | ||
| 114 | [AC_LANG_PROGRAM([[ | ||
| 115 | #define _XOPEN_SOURCE 500 | ||
| 116 | #include <wchar.h> | ||
| 117 | mbstate_t x;]])], | ||
| 118 | [ac_cv_should_define__xopen_source=yes])])]) | ||
| 119 | test $ac_cv_should_define__xopen_source = yes && | ||
| 120 | AC_DEFINE([_XOPEN_SOURCE], [500]) | ||
| 106 | ])# AC_USE_SYSTEM_EXTENSIONS | 121 | ])# AC_USE_SYSTEM_EXTENSIONS |
| 107 | 122 | ||
| 108 | # gl_USE_SYSTEM_EXTENSIONS | 123 | # gl_USE_SYSTEM_EXTENSIONS |
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 79103bc7eb5..2027ab3c1d0 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # stdlib_h.m4 serial 41 | 1 | # stdlib_h.m4 serial 42 |
| 2 | dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -22,7 +22,7 @@ AC_DEFUN([gl_STDLIB_H], | |||
| 22 | ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt | 22 | ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt |
| 23 | initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps | 23 | initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps |
| 24 | posix_openpt ptsname ptsname_r random random_r realpath rpmatch | 24 | posix_openpt ptsname ptsname_r random random_r realpath rpmatch |
| 25 | setenv setstate setstate_r srandom srandom_r | 25 | secure_getenv setenv setstate setstate_r srandom srandom_r |
| 26 | strtod strtoll strtoull unlockpt unsetenv]) | 26 | strtod strtoll strtoull unlockpt unsetenv]) |
| 27 | ]) | 27 | ]) |
| 28 | 28 | ||
| @@ -60,6 +60,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 60 | GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) | 60 | GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) |
| 61 | GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) | 61 | GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) |
| 62 | GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) | 62 | GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) |
| 63 | GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) | ||
| 63 | GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) | 64 | GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) |
| 64 | GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) | 65 | GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) |
| 65 | GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) | 66 | GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) |
| @@ -88,6 +89,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 88 | HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) | 89 | HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) |
| 89 | HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) | 90 | HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) |
| 90 | HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) | 91 | HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) |
| 92 | HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) | ||
| 91 | HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) | 93 | HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) |
| 92 | HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) | 94 | HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) |
| 93 | HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) | 95 | HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) |