annotate m4/extensions.m4 @ 267:bec6d2480f08 2.6

Added add'l generated files for release
author lost
date Tue, 22 Dec 2009 05:33:32 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
267
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
1 # serial 8 -*- Autoconf -*-
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
2 # Enable extensions on systems that normally disable them.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
3
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
4 # Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
5 # This file is free software; the Free Software Foundation
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
6 # gives unlimited permission to copy and/or distribute it,
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
7 # with or without modifications, as long as this notice is preserved.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
8
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
9 # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
10 # Autoconf. Perhaps we can remove this once we can assume Autoconf
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
11 # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
12 # enough in this area it's likely we'll need to redefine
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
13 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
14
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
15 # AC_USE_SYSTEM_EXTENSIONS
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
16 # ------------------------
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
17 # Enable extensions on systems that normally disable them,
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
18 # typically due to standards-conformance issues.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
19 # Remember that #undef in AH_VERBATIM gets replaced with #define by
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
20 # AC_DEFINE. The goal here is to define all known feature-enabling
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
21 # macros, then, if reports of conflicts are made, disable macros that
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
22 # cause problems on some platforms (such as __EXTENSIONS__).
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
23 AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
24 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
25 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
26
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
27 AC_REQUIRE([AC_CANONICAL_HOST])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
28
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
29 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
30 if test "$MINIX" = yes; then
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
31 AC_DEFINE([_POSIX_SOURCE], [1],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
32 [Define to 1 if you need to in order for `stat' and other
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
33 things to work.])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
34 AC_DEFINE([_POSIX_1_SOURCE], [2],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
35 [Define to 2 if the system does not provide POSIX.1 features
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
36 except with this defined.])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
37 AC_DEFINE([_MINIX], [1],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
38 [Define to 1 if on MINIX.])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
39 fi
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
40
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
41 dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
42 dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
43 dnl provided.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
44 case "$host_os" in
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
45 hpux*)
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
46 AC_DEFINE([_XOPEN_SOURCE], [500],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
47 [Define to 500 only on HP-UX.])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
48 ;;
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
49 esac
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
50
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
51 AH_VERBATIM([__EXTENSIONS__],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
52 [/* Enable extensions on AIX 3, Interix. */
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
53 #ifndef _ALL_SOURCE
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
54 # undef _ALL_SOURCE
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
55 #endif
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
56 /* Enable GNU extensions on systems that have them. */
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
57 #ifndef _GNU_SOURCE
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
58 # undef _GNU_SOURCE
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
59 #endif
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
60 /* Enable threading extensions on Solaris. */
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
61 #ifndef _POSIX_PTHREAD_SEMANTICS
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
62 # undef _POSIX_PTHREAD_SEMANTICS
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
63 #endif
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
64 /* Enable extensions on HP NonStop. */
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
65 #ifndef _TANDEM_SOURCE
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
66 # undef _TANDEM_SOURCE
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
67 #endif
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
68 /* Enable general extensions on Solaris. */
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
69 #ifndef __EXTENSIONS__
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
70 # undef __EXTENSIONS__
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
71 #endif
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
72 ])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
73 AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
74 [ac_cv_safe_to_define___extensions__],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
75 [AC_COMPILE_IFELSE(
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
76 [AC_LANG_PROGRAM([[
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
77 # define __EXTENSIONS__ 1
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
78 ]AC_INCLUDES_DEFAULT])],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
79 [ac_cv_safe_to_define___extensions__=yes],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
80 [ac_cv_safe_to_define___extensions__=no])])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
81 test $ac_cv_safe_to_define___extensions__ = yes &&
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
82 AC_DEFINE([__EXTENSIONS__])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
83 AC_DEFINE([_ALL_SOURCE])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
84 AC_DEFINE([_GNU_SOURCE])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
85 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
86 AC_DEFINE([_TANDEM_SOURCE])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
87 ])# AC_USE_SYSTEM_EXTENSIONS
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
88
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
89 # gl_USE_SYSTEM_EXTENSIONS
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
90 # ------------------------
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
91 # Enable extensions on systems that normally disable them,
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
92 # typically due to standards-conformance issues.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
93 AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
94 [
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
95 dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
96 dnl gnulib does not need it. But if it gets required by third-party macros
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
97 dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
98 dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
99 dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
100 dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
101 AC_REQUIRE([AC_GNU_SOURCE])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
102
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
103 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
bec6d2480f08 Added add'l generated files for release
lost
parents:
diff changeset
104 ])