summaryrefslogtreecommitdiffstats
path: root/lib/tests/Makefile.am
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2008-11-28 10:01:53 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2008-11-29 09:38:54 (GMT)
commit2bbf2e6967daa0a9f86874aac409fde245a3bc85 (patch)
tree7fc7a9e96f3bc0e1b6749cbd999c93a292e0d12b /lib/tests/Makefile.am
parent538b97cea63d68efbd9c9c67d9c41278cfd1ebad (diff)
downloadmonitoring-plugins-2bbf2e6967daa0a9f86874aac409fde245a3bc85.tar.gz
Add Libtap as a bundled library (does not change any behaviour without --enable-libtap)
Detects system library as pre-1.4.13 and does not install the built-in library anymore Tested on: - Linux x86_64, with and without local libtap (System libtap installed) - Linux x86, with and without local libtap (System libtap NOT installed) - Solaris SPARC, with and without local libtap, with and without system libtap installed
Diffstat (limited to 'lib/tests/Makefile.am')
-rw-r--r--lib/tests/Makefile.am49
1 files changed, 29 insertions, 20 deletions
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 25e2bed..596d00f 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -15,40 +15,49 @@ EXTRA_DIST = $(np_test_scripts) $(np_test_files)
15 15
16LIBS = @LIBINTL@ 16LIBS = @LIBINTL@
17 17
18if USE_LIBTAP_LOCAL
19tap_cflags = -I$(top_srcdir)/tap
20tap_ldflags = -L$(top_srcdir)/tap
21tap_ldadd = $(top_srcdir)/gl/libgnu.a
22else
23## Shouldn't we detect that??
24tap_ldflags = -L/usr/local/lib
25endif
26
18test_utils_SOURCES = test_utils.c 27test_utils_SOURCES = test_utils.c
19test_utils_CFLAGS = -g -I.. 28test_utils_CFLAGS = -g -I.. $(tap_cflags)
20test_utils_LDFLAGS = -L/usr/local/lib -ltap 29test_utils_LDFLAGS = $(tap_ldflags) -ltap
21test_utils_LDADD = ../utils_base.o 30test_utils_LDADD = ../utils_base.o $(tap_ldadd)
22 31
23test_disk_SOURCES = test_disk.c 32test_disk_SOURCES = test_disk.c
24test_disk_CFLAGS = -g -I.. 33test_disk_CFLAGS = -g -I.. $(tap_cflags)
25test_disk_LDFLAGS = -L/usr/local/lib -ltap 34test_disk_LDFLAGS = $(tap_ldflags) -ltap
26test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a 35test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a
27 36
28test_tcp_SOURCES = test_tcp.c 37test_tcp_SOURCES = test_tcp.c
29test_tcp_CFLAGS = -g -I.. 38test_tcp_CFLAGS = -g -I.. $(tap_cflags)
30test_tcp_LDFLAGS = -L/usr/local/lib -ltap 39test_tcp_LDFLAGS = $(tap_ldflags) -ltap
31test_tcp_LDADD = ../utils_tcp.o 40test_tcp_LDADD = ../utils_tcp.o $(tap_ldadd)
32 41
33test_cmd_SOURCES = test_cmd.c 42test_cmd_SOURCES = test_cmd.c
34test_cmd_CFLAGS = -g -I.. 43test_cmd_CFLAGS = -g -I.. $(tap_cflags)
35test_cmd_LDFLAGS = -L/usr/local/lib -ltap 44test_cmd_LDFLAGS = $(tap_ldflags) -ltap
36test_cmd_LDADD = ../utils_cmd.o ../utils_base.o 45test_cmd_LDADD = ../utils_cmd.o ../utils_base.o $(tap_ldadd)
37 46
38test_base64_SOURCES = test_base64.c 47test_base64_SOURCES = test_base64.c
39test_base64_CFLAGS = -g -I.. 48test_base64_CFLAGS = -g -I.. $(tap_cflags)
40test_base64_LDFLAGS = -L/usr/local/lib -ltap 49test_base64_LDFLAGS = $(tap_ldflags) -ltap
41test_base64_LDADD = $(top_srcdir)/gl/base64.o 50test_base64_LDADD = $(top_srcdir)/gl/base64.o $(tap_ldadd)
42 51
43test_ini_SOURCES = test_ini.c 52test_ini_SOURCES = test_ini.c
44test_ini_CFLAGS = -g -I.. 53test_ini_CFLAGS = -g -I.. $(tap_cflags)
45test_ini_LDFLAGS = -L/usr/local/lib -ltap 54test_ini_LDFLAGS = $(tap_ldflags) -ltap
46test_ini_LDADD = ../utils_base.o ../parse_ini.o 55test_ini_LDADD = ../utils_base.o ../parse_ini.o $(tap_ldadd)
47 56
48test_opts_SOURCES = test_opts.c 57test_opts_SOURCES = test_opts.c
49test_opts_CFLAGS = -g -I.. 58test_opts_CFLAGS = -g -I.. $(tap_cflags)
50test_opts_LDFLAGS = -L/usr/local/lib -ltap 59test_opts_LDFLAGS = $(tap_ldflags) -ltap
51test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o 60test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o $(tap_ldadd)
52 61
53test: ${noinst_PROGRAMS} 62test: ${noinst_PROGRAMS}
54 perl -MTest::Harness -e '$$Test::Harness::switches=""; runtests(map {$$_ .= ".t"} @ARGV)' $(EXTRA_PROGRAMS) 63 perl -MTest::Harness -e '$$Test::Harness::switches=""; runtests(map {$$_ .= ".t"} @ARGV)' $(EXTRA_PROGRAMS)