~ubuntu-branches/ubuntu/trusty/nagios-plugins-contrib/trusty-proposed

« back to all changes in this revision

Viewing changes to check_hpasm/check_hpasm-4.6.3/acinclude.m4

  • Committer: Package Import Robot
  • Author(s): Bernd Zeimetz, Bernd Zeimetz, Jan Wagner, Evgeni Golov
  • Date: 2013-06-14 20:53:49 UTC
  • Revision ID: package-import@ubuntu.com-20130614205349-34xiy38pm1hzpjoi
Tags: 7.20130614
[ Bernd Zeimetz ]
* [036816ff] Merge pull request #15 from evgeni/master
  check_packages should find security updates on the official security mirror too
* [658a2e93] Add check_checksums nagios plugin.
* [9d5d2056] Updating check_raid.
* [e3ec1293] Updating check_ssl_cert to 1.14.6
* [779543ef] Updating check_hpasm to 4.6.3.2
* [0c838ee9] Updating check_multipath to 0.1.9
* [bec11251] Updating check_whois to 1.13
* [8e0a65d0] Refreshing patches.
* [c0b88cdb] Auto update of debian/copyright
* [59648a17] Fix src link for check_hpasm
* [8c242d0f] Support pre-Wheezy versions of coretutils in check_checksums.
* [7d3d2a06] Update release date in changelog (gah!).
* [768e463b] Merge pull request #16 from evgeni/master
  check_libs: ignore /var/lib/postgresql/ and /var/log/
* [2b9aace5] Bumping standards-Verison, no changes needed.

[ Jan Wagner ]
* [3bb873e4] disable epn for check_rbl

[ Evgeni Golov ]
* [2a7ab4b8] check_libs: ignore /var/spool/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl @synopsis ACX_WHICH_GETHOSTBYNAME_R
2
 
dnl
3
 
dnl Provides a test to determine the correct way to call gethostbyname_r
4
 
dnl
5
 
dnl defines HAVE_GETHOSTBYNAME_R to the number of arguments required
6
 
dnl
7
 
dnl e.g. 6 arguments (linux)
8
 
dnl e.g. 5 arguments (solaris)
9
 
dnl e.g. 3 arguments (osf/1)
10
 
dnl
11
 
dnl @version $Id: acinclude.m4,v 1.5 2004/02/18 14:56:34 kdebisschop Exp $
12
 
dnl @author Brian Stafford <brian@stafford.uklinux.net>
13
 
dnl
14
 
dnl based on version by Caolan McNamara <caolan@skynet.ie>
15
 
dnl based on David Arnold's autoconf suggestion in the threads faq
16
 
dnl
17
 
AC_DEFUN([ACX_WHICH_GETHOSTBYNAME_R],
18
 
[AC_CACHE_CHECK(number of arguments to gethostbyname_r,
19
 
                acx_which_gethostbyname_r, [
20
 
        AC_TRY_COMPILE([
21
 
#               include <netdb.h> 
22
 
        ],      [
23
 
 
24
 
        char *name;
25
 
        struct hostent *he;
26
 
        struct hostent_data data;
27
 
        (void) gethostbyname_r(name, he, &data);
28
 
 
29
 
                ],acx_which_gethostbyname_r=3, 
30
 
                        [
31
 
dnl                     acx_which_gethostbyname_r=0
32
 
  AC_TRY_COMPILE([
33
 
#   include <netdb.h>
34
 
  ], [
35
 
        char *name;
36
 
        struct hostent *he, *res;
37
 
        char *buffer = NULL;
38
 
        int buflen = 2048;
39
 
        int h_errnop;
40
 
        (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
41
 
  ],acx_which_gethostbyname_r=6,
42
 
  
43
 
  [
44
 
dnl  acx_which_gethostbyname_r=0
45
 
  AC_TRY_COMPILE([
46
 
#   include <netdb.h>
47
 
  ], [
48
 
                        char *name;
49
 
                        struct hostent *he;
50
 
                        char *buffer = NULL;
51
 
                        int buflen = 2048;
52
 
                        int h_errnop;
53
 
                        (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
54
 
  ],acx_which_gethostbyname_r=5,acx_which_gethostbyname_r=0)
55
 
 
56
 
  ]
57
 
  
58
 
  )
59
 
                        ]
60
 
                )
61
 
        ])
62
 
 
63
 
if test $acx_which_gethostbyname_r -gt 0 ; then
64
 
    AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME_R], $acx_which_gethostbyname_r,
65
 
                       [Number of parameters to gethostbyname_r or 0 if not available])
66
 
fi
67
 
 
68
 
])
69
 
 
70
 
dnl @synopsis ACX_HELP_STRING(OPTION,DESCRIPTION)
71
 
AC_DEFUN([ACX_HELP_STRING],
72
 
         [  $1 builtin([substr],[                       ],len($1))[$2]])
73
 
 
74
 
 
75
 
dnl @synopsis ACX_FEATURE(ENABLE_OR_WITH,NAME[,VALUE])
76
 
AC_DEFUN([ACX_FEATURE],
77
 
         [echo "builtin([substr],[                                  ],len(--$1-$2))--$1-$2: ifelse($3,,[$]translit($1-$2,-,_),$3)"])
78