diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 11:07:18 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 11:07:18 +0000 |
commit | bd7029a99b0c2974265c6665638ef14a052f42ab (patch) | |
tree | f5661ba73366d81ef6e91f889ea7fec5ebe07b6b /gl/m4/strerror.m4 | |
parent | f99612320d6eda67644c07be04bb21aa4d7789db (diff) | |
download | monitoring-plugins-bd7029a99b0c2974265c6665638ef14a052f42ab.tar.gz |
Sync to latest Gnulib
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1925 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4/strerror.m4')
-rw-r--r-- | gl/m4/strerror.m4 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4 new file mode 100644 index 00000000..eb7d45aa --- /dev/null +++ b/gl/m4/strerror.m4 | |||
@@ -0,0 +1,47 @@ | |||
1 | # strerror.m4 serial 7 | ||
2 | dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | AC_DEFUN([gl_FUNC_STRERROR], | ||
8 | [ | ||
9 | AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE]) | ||
10 | if test $gl_cv_func_working_strerror = no; then | ||
11 | AC_LIBOBJ([strerror]) | ||
12 | AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR], | ||
13 | [Define this to 1 if strerror is broken.]) | ||
14 | fi | ||
15 | ]) | ||
16 | |||
17 | # Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ). | ||
18 | AC_DEFUN([gl_FUNC_STRERROR_SEPARATE], | ||
19 | [ | ||
20 | AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) | ||
21 | AC_CACHE_CHECK([for working strerror function], | ||
22 | [gl_cv_func_working_strerror], | ||
23 | [AC_RUN_IFELSE( | ||
24 | [AC_LANG_PROGRAM( | ||
25 | [#include <string.h> | ||
26 | ], | ||
27 | [return !*strerror (-2);])], | ||
28 | [gl_cv_func_working_strerror=yes], | ||
29 | [gl_cv_func_working_strerror=no], | ||
30 | [dnl Assume crossbuild works if it compiles. | ||
31 | AC_COMPILE_IFELSE( | ||
32 | [AC_LANG_PROGRAM( | ||
33 | [#include <string.h> | ||
34 | ], | ||
35 | [return !*strerror (-2);])], | ||
36 | [gl_cv_func_working_strerror=yes], | ||
37 | [gl_cv_func_working_strerror=no])])]) | ||
38 | if test $gl_cv_func_working_strerror = no ; then | ||
39 | REPLACE_STRERROR=1 | ||
40 | gl_PREREQ_STRERROR | ||
41 | fi | ||
42 | ]) | ||
43 | |||
44 | # Prerequisites of lib/strerror.c. | ||
45 | AC_DEFUN([gl_PREREQ_STRERROR], [ | ||
46 | AC_CHECK_DECLS([strerror]) | ||
47 | ]) | ||