diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
commit | fe856aa957978504137c1d425815d4ed8a22be40 (patch) | |
tree | a5bb46ce0e64b2056f75700eadbf27aba7c39418 /gl/m4/extensions.m4 | |
parent | 210f39bc84cfbb21cd72dc054e43f13815ee0616 (diff) | |
download | monitoring-plugins-fe856aa957978504137c1d425815d4ed8a22be40.tar.gz |
Sync with gnulib - lots of extraneous code removed in preference to GNU code
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4/extensions.m4')
-rw-r--r-- | gl/m4/extensions.m4 | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 new file mode 100644 index 00000000..143a9e54 --- /dev/null +++ b/gl/m4/extensions.m4 | |||
@@ -0,0 +1,58 @@ | |||
1 | # serial 4 -*- Autoconf -*- | ||
2 | # Enable extensions on systems that normally disable them. | ||
3 | |||
4 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | ||
5 | # This file is free software; the Free Software Foundation | ||
6 | # gives unlimited permission to copy and/or distribute it, | ||
7 | # with or without modifications, as long as this notice is preserved. | ||
8 | |||
9 | # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS | ||
10 | # Autoconf. Perhaps we can remove this once we can assume Autoconf | ||
11 | # 2.61 or later everywhere, but since CVS Autoconf mutates rapidly | ||
12 | # enough in this area it's likely we'll need to redefine | ||
13 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. | ||
14 | |||
15 | # AC_USE_SYSTEM_EXTENSIONS | ||
16 | # ------------------------ | ||
17 | # Enable extensions on systems that normally disable them, | ||
18 | # typically due to standards-conformance issues. | ||
19 | AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
20 | [ | ||
21 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
22 | AC_BEFORE([$0], [AC_RUN_IFELSE]) | ||
23 | |||
24 | AC_REQUIRE([AC_GNU_SOURCE]) | ||
25 | AC_REQUIRE([AC_AIX]) | ||
26 | AC_REQUIRE([AC_MINIX]) | ||
27 | |||
28 | AH_VERBATIM([__EXTENSIONS__], | ||
29 | [/* Enable extensions on Solaris. */ | ||
30 | #ifndef __EXTENSIONS__ | ||
31 | # undef __EXTENSIONS__ | ||
32 | #endif | ||
33 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
34 | # undef _POSIX_PTHREAD_SEMANTICS | ||
35 | #endif | ||
36 | #ifndef _TANDEM_SOURCE | ||
37 | # undef _TANDEM_SOURCE | ||
38 | #endif]) | ||
39 | AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], | ||
40 | [ac_cv_safe_to_define___extensions__], | ||
41 | [AC_COMPILE_IFELSE( | ||
42 | [AC_LANG_PROGRAM([ | ||
43 | # define __EXTENSIONS__ 1 | ||
44 | AC_INCLUDES_DEFAULT])], | ||
45 | [ac_cv_safe_to_define___extensions__=yes], | ||
46 | [ac_cv_safe_to_define___extensions__=no])]) | ||
47 | test $ac_cv_safe_to_define___extensions__ = yes && | ||
48 | AC_DEFINE([__EXTENSIONS__]) | ||
49 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
50 | AC_DEFINE([_TANDEM_SOURCE]) | ||
51 | ]) | ||
52 | |||
53 | # gl_USE_SYSTEM_EXTENSIONS | ||
54 | # ------------------------ | ||
55 | # Enable extensions on systems that normally disable them, | ||
56 | # typically due to standards-conformance issues. | ||
57 | AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], | ||
58 | [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])]) | ||