annotate m4/extensions.m4 @ 272:d5392bb5da3c 2.5

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