diff options
author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-15 01:25:35 (GMT) |
---|---|---|
committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-15 01:25:35 (GMT) |
commit | 11b35b92e3195d230bef359f6a0679ae4414716b (patch) | |
tree | f4911e5804c1f3037dcf63bbbf0b823c5ac19e5f /plugins/Makefile.am | |
parent | 6cf5fc3c74c0bdfef6c4cc1b627578378ad3a407 (diff) | |
download | monitoring-plugins-11b35b92e3195d230bef359f6a0679ae4414716b.tar.gz |
Spent the day working on backwards compatability using getaddrinfo()
Moved getaddrinfo.? and gethostbyname.? from lib/ to plugins/ due to
problems with compiling into the libnagiosplug.a as it required linking
against socket libraries which are unneeded except for network based
plugins.
This code should hopefully happily work for all systems and has been tested
prior to commit on Debian GNU/Linux, SPARC Solaris 7 and SPARC Solaris 9.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@424 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/Makefile.am')
-rw-r--r-- | plugins/Makefile.am | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 2524e1a..a884b45 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am | |||
@@ -14,14 +14,15 @@ EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ | |||
14 | check_swap check_fping check_ldap check_game check_dig \ | 14 | check_swap check_fping check_ldap check_game check_dig \ |
15 | check_nagios check_by_ssh check_dns check_nt | 15 | check_nagios check_by_ssh check_dns check_nt |
16 | 16 | ||
17 | check_tcp_programs = check_ftp check_imap check_nntp check_pop | 17 | check_tcp_programs = check_ftp check_imap check_nntp check_pop check_udp2 |
18 | 18 | ||
19 | EXTRA_DIST = t utils.c netutils.c popen.c utils.h netutils.h popen.h common.h | 19 | EXTRA_DIST = t utils.c netutils.c popen.c utils.h netutils.h popen.h common.h \ |
20 | getaddrinfo.c getaddrinfo.h gethostbyname.c gethostbyname.h | ||
20 | 21 | ||
21 | PLUGINHDRS = common.h config.h | 22 | PLUGINHDRS = common.h config.h |
22 | 23 | ||
23 | BASEOBJS = utils.o ../lib/libnagiosplug.a | 24 | BASEOBJS = utils.o ../lib/libnagiosplug.a |
24 | NETOBJS = netutils.o $(BASEOBJS) | 25 | NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) |
25 | NETLIBS = $(NETOBJS) $(SOCKETLIBS) | 26 | NETLIBS = $(NETOBJS) $(SOCKETLIBS) |
26 | 27 | ||
27 | TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) | 28 | TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) |
@@ -36,27 +37,27 @@ AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@ | |||
36 | ############################################################################## | 37 | ############################################################################## |
37 | # the actual targets | 38 | # the actual targets |
38 | 39 | ||
39 | check_dig_LDADD = $(BASEOBJS) popen.o | 40 | check_dig_LDADD = $(NETLIBS) popen.o |
40 | check_disk_LDADD = $(BASEOBJS) popen.o | 41 | check_disk_LDADD = $(BASEOBJS) popen.o |
41 | check_dns_LDADD = $(BASEOBJS) popen.o | 42 | check_dns_LDADD = $(NETLIBS) popen.o |
42 | check_dummy_LDADD = $(BASEOBJS) | 43 | check_dummy_LDADD = $(BASEOBJS) |
43 | check_fping_LDADD = $(BASEOBJS) popen.o | 44 | check_fping_LDADD = $(NETLIBS) popen.o |
44 | check_game_LDADD = $(BASEOBJS) | 45 | check_game_LDADD = $(BASEOBJS) |
45 | check_http_LDADD = $(NETLIBS) $(SSLLIBS) | 46 | check_http_LDADD = $(NETLIBS) $(SSLLIBS) |
46 | check_hpjd_LDADD = $(BASEOBJS) popen.o | 47 | check_hpjd_LDADD = $(NETLIBS) popen.o |
47 | check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) | 48 | check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) |
48 | check_load_LDADD = $(BASEOBJS) popen.o | 49 | check_load_LDADD = $(BASEOBJS) popen.o |
49 | check_mrtg_LDADD = $(BASEOBJS) | 50 | check_mrtg_LDADD = $(BASEOBJS) |
50 | check_mrtgtraf_LDADD = $(BASEOBJS) | 51 | check_mrtgtraf_LDADD = $(BASEOBJS) |
51 | check_mysql_LDADD = $(BASEOBJS) $(MYSQLLIBS) | 52 | check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) |
52 | check_nagios_LDADD = $(BASEOBJS) popen.o | 53 | check_nagios_LDADD = $(BASEOBJS) popen.o |
53 | check_nt_LDADD = $(NETLIBS) | 54 | check_nt_LDADD = $(NETLIBS) |
54 | check_nwstat_LDADD = $(NETLIBS) | 55 | check_nwstat_LDADD = $(NETLIBS) |
55 | check_overcr_LDADD = $(NETLIBS) | 56 | check_overcr_LDADD = $(NETLIBS) |
56 | check_pgsql_LDADD = $(BASEOBJS) $(PGLIBS) | 57 | check_pgsql_LDADD = $(NETLIBS) $(PGLIBS) |
57 | check_ping_LDADD = $(BASEOBJS) popen.o | 58 | check_ping_LDADD = $(NETLIBS) popen.o |
58 | check_procs_LDADD = $(BASEOBJS) popen.o | 59 | check_procs_LDADD = $(BASEOBJS) popen.o |
59 | check_radius_LDADD = $(BASEOBJS) $(RADIUSLIBS) | 60 | check_radius_LDADD = $(NETLIBS) $(RADIUSLIBS) |
60 | check_real_LDADD = $(NETLIBS) | 61 | check_real_LDADD = $(NETLIBS) |
61 | check_snmp_LDADD = $(BASEOBJS) popen.o | 62 | check_snmp_LDADD = $(BASEOBJS) popen.o |
62 | check_smtp_LDADD = $(NETLIBS) | 63 | check_smtp_LDADD = $(NETLIBS) |
@@ -68,31 +69,31 @@ check_udp_LDADD = $(NETLIBS) | |||
68 | check_ups_LDADD = $(NETLIBS) | 69 | check_ups_LDADD = $(NETLIBS) |
69 | check_users_LDADD = $(BASEOBJS) popen.o | 70 | check_users_LDADD = $(BASEOBJS) popen.o |
70 | check_vsz_LDADD = $(BASEOBJS) popen.o | 71 | check_vsz_LDADD = $(BASEOBJS) popen.o |
71 | check_by_ssh_LDADD = $(BASEOBJS) popen.o | 72 | check_by_ssh_LDADD = $(NETLIBS) popen.o |
72 | negate_LDADD = $(BASEOBJS) popen.o | 73 | negate_LDADD = $(BASEOBJS) popen.o |
73 | urlize_LDADD = $(BASEOBJS) popen.o | 74 | urlize_LDADD = $(BASEOBJS) popen.o |
74 | 75 | ||
75 | check_dig_DEPENDENCIES = check_dig.c $(BASEOBJS) popen.o $(DEPLIBS) | 76 | check_dig_DEPENDENCIES = check_dig.c $(NETOBJS) popen.o $(DEPLIBS) |
76 | check_disk_DEPENDENCIES = check_disk.c $(BASEOBJS) popen.o $(DEPLIBS) | 77 | check_disk_DEPENDENCIES = check_disk.c $(BASEOBJS) popen.o $(DEPLIBS) |
77 | check_dns_DEPENDENCIES = check_dns.c $(BASEOBJS) popen.o $(DEPLIBS) | 78 | check_dns_DEPENDENCIES = check_dns.c $(NETOBJS) popen.o $(DEPLIBS) |
78 | check_dummy_DEPENDENCIES = check_dummy.c $(DEPLIBS) | 79 | check_dummy_DEPENDENCIES = check_dummy.c $(DEPLIBS) |
79 | check_fping_DEPENDENCIES = check_fping.c $(BASEOBJS) popen.o $(DEPLIBS) | 80 | check_fping_DEPENDENCIES = check_fping.c $(NETOBJS) popen.o $(DEPLIBS) |
80 | check_game_DEPENDENCIES = check_game.c $(DEPLIBS) | 81 | check_game_DEPENDENCIES = check_game.c $(DEPLIBS) |
81 | check_http_DEPENDENCIES = check_http.c $(NETOBJS) $(DEPLIBS) | 82 | check_http_DEPENDENCIES = check_http.c $(NETOBJS) $(DEPLIBS) |
82 | check_hpjd_DEPENDENCIES = check_hpjd.c $(BASEOBJS) popen.o $(DEPLIBS) | 83 | check_hpjd_DEPENDENCIES = check_hpjd.c $(NETOBJS) popen.o $(DEPLIBS) |
83 | check_ldap_DEPENDENCIES = check_ldap.c $(NETOBJS) $(DEPLIBS) | 84 | check_ldap_DEPENDENCIES = check_ldap.c $(NETOBJS) $(DEPLIBS) |
84 | check_load_DEPENDENCIES = check_load.c $(BASEOBJS) popen.o $(DEPLIBS) | 85 | check_load_DEPENDENCIES = check_load.c $(BASEOBJS) popen.o $(DEPLIBS) |
85 | check_mrtg_DEPENDENCIES = check_mrtg.c $(DEPLIBS) | 86 | check_mrtg_DEPENDENCIES = check_mrtg.c $(DEPLIBS) |
86 | check_mrtgtraf_DEPENDENCIES = check_mrtgtraf.c $(DEPLIBS) | 87 | check_mrtgtraf_DEPENDENCIES = check_mrtgtraf.c $(DEPLIBS) |
87 | check_mysql_DEPENDENCIES = check_mysql.c $(DEPLIBS) | 88 | check_mysql_DEPENDENCIES = check_mysql.c $(NETOBJS) $(DEPLIBS) |
88 | check_nagios_DEPENDENCIES = check_nagios.c $(BASEOBJS) popen.o $(DEPLIBS) | 89 | check_nagios_DEPENDENCIES = check_nagios.c $(BASEOBJS) popen.o $(DEPLIBS) |
89 | check_nt_DEPENDENCIES = check_nt.c $(NETOBJS) $(DEPLIBS) | 90 | check_nt_DEPENDENCIES = check_nt.c $(NETOBJS) $(DEPLIBS) |
90 | check_nwstat_DEPENDENCIES = check_nwstat.c $(NETOBJS) $(DEPLIBS) | 91 | check_nwstat_DEPENDENCIES = check_nwstat.c $(NETOBJS) $(DEPLIBS) |
91 | check_overcr_DEPENDENCIES = check_overcr.c $(NETOBJS) $(DEPLIBS) | 92 | check_overcr_DEPENDENCIES = check_overcr.c $(NETOBJS) $(DEPLIBS) |
92 | check_pgsql_DEPENDENCIES = check_pgsql.c $(DEPLIBS) | 93 | check_pgsql_DEPENDENCIES = check_pgsql.c $(NETOBJS) $(DEPLIBS) |
93 | check_ping_DEPENDENCIES = check_ping.c $(BASEOBJS) popen.o $(DEPLIBS) | 94 | check_ping_DEPENDENCIES = check_ping.c $(NETOBJS) popen.o $(DEPLIBS) |
94 | check_procs_DEPENDENCIES = check_procs.c $(BASEOBJS) popen.o $(DEPLIBS) | 95 | check_procs_DEPENDENCIES = check_procs.c $(BASEOBJS) popen.o $(DEPLIBS) |
95 | check_radius_DEPENDENCIES = check_radius.c $(DEPLIBS) | 96 | check_radius_DEPENDENCIES = check_radius.c $(NETOBJS) $(DEPLIBS) |
96 | check_real_DEPENDENCIES = check_real.c $(NETOBJS) $(DEPLIBS) | 97 | check_real_DEPENDENCIES = check_real.c $(NETOBJS) $(DEPLIBS) |
97 | check_snmp_DEPENDENCIES = check_snmp.c $(BASEOBJS) popen.o $(DEPLIBS) | 98 | check_snmp_DEPENDENCIES = check_snmp.c $(BASEOBJS) popen.o $(DEPLIBS) |
98 | check_smtp_DEPENDENCIES = check_smtp.c $(NETOBJS) $(DEPLIBS) | 99 | check_smtp_DEPENDENCIES = check_smtp.c $(NETOBJS) $(DEPLIBS) |
@@ -104,7 +105,7 @@ check_udp_DEPENDENCIES = check_udp.c $(NETOBJS) $(DEPLIBS) | |||
104 | check_ups_DEPENDENCIES = check_ups.c $(NETOBJS) $(DEPLIBS) | 105 | check_ups_DEPENDENCIES = check_ups.c $(NETOBJS) $(DEPLIBS) |
105 | check_users_DEPENDENCIES = check_users.c $(BASEOBJS) popen.o $(DEPLIBS) | 106 | check_users_DEPENDENCIES = check_users.c $(BASEOBJS) popen.o $(DEPLIBS) |
106 | check_vsz_DEPENDENCIES = check_vsz.c $(BASEOBJS) popen.o $(DEPLIBS) | 107 | check_vsz_DEPENDENCIES = check_vsz.c $(BASEOBJS) popen.o $(DEPLIBS) |
107 | check_by_ssh_DEPENDENCIES = check_by_ssh.c $(BASEOBJS) popen.o $(DEPLIBS) | 108 | check_by_ssh_DEPENDENCIES = check_by_ssh.c $(NETOBJS) popen.o $(DEPLIBS) |
108 | negate_DEPENDENCIES = negate.c $(BASEOBJS) popen.o $(DEPLIBS) | 109 | negate_DEPENDENCIES = negate.c $(BASEOBJS) popen.o $(DEPLIBS) |
109 | urlize_DEPENDENCIES = urlize.c $(BASEOBJS) popen.o $(DEPLIBS) | 110 | urlize_DEPENDENCIES = urlize.c $(BASEOBJS) popen.o $(DEPLIBS) |
110 | 111 | ||
@@ -117,6 +118,10 @@ utils.o: utils.c utils.h $(PLUGINHDRS) | |||
117 | 118 | ||
118 | netutils.o: netutils.c netutils.h $(PLUGINHDRS) | 119 | netutils.o: netutils.c netutils.h $(PLUGINHDRS) |
119 | 120 | ||
121 | getaddrinfo.o: getaddrinfo.h $(PLUGINHDRS) | ||
122 | |||
123 | gethostbyname.o: gethostbyname.h $(PLUGINHDRS) | ||
124 | |||
120 | all-local: $(check_tcp_programs) | 125 | all-local: $(check_tcp_programs) |
121 | 126 | ||
122 | $(check_tcp_programs): check_tcp | 127 | $(check_tcp_programs): check_tcp |