annotate m4/extensions.m4 @ 285:9010796c6253 2.3 2.3.1

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