diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2008-11-28 05:01:53 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2008-11-29 04:38:54 -0500 |
commit | 2bbf2e6967daa0a9f86874aac409fde245a3bc85 (patch) | |
tree | 7fc7a9e96f3bc0e1b6749cbd999c93a292e0d12b /lib/tests/Makefile.am | |
parent | 538b97cea63d68efbd9c9c67d9c41278cfd1ebad (diff) | |
download | monitoring-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.am | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am index 25e2bed3..596d00fd 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 | ||
16 | LIBS = @LIBINTL@ | 16 | LIBS = @LIBINTL@ |
17 | 17 | ||
18 | if USE_LIBTAP_LOCAL | ||
19 | tap_cflags = -I$(top_srcdir)/tap | ||
20 | tap_ldflags = -L$(top_srcdir)/tap | ||
21 | tap_ldadd = $(top_srcdir)/gl/libgnu.a | ||
22 | else | ||
23 | ## Shouldn't we detect that?? | ||
24 | tap_ldflags = -L/usr/local/lib | ||
25 | endif | ||
26 | |||
18 | test_utils_SOURCES = test_utils.c | 27 | test_utils_SOURCES = test_utils.c |
19 | test_utils_CFLAGS = -g -I.. | 28 | test_utils_CFLAGS = -g -I.. $(tap_cflags) |
20 | test_utils_LDFLAGS = -L/usr/local/lib -ltap | 29 | test_utils_LDFLAGS = $(tap_ldflags) -ltap |
21 | test_utils_LDADD = ../utils_base.o | 30 | test_utils_LDADD = ../utils_base.o $(tap_ldadd) |
22 | 31 | ||
23 | test_disk_SOURCES = test_disk.c | 32 | test_disk_SOURCES = test_disk.c |
24 | test_disk_CFLAGS = -g -I.. | 33 | test_disk_CFLAGS = -g -I.. $(tap_cflags) |
25 | test_disk_LDFLAGS = -L/usr/local/lib -ltap | 34 | test_disk_LDFLAGS = $(tap_ldflags) -ltap |
26 | test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a | 35 | test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a |
27 | 36 | ||
28 | test_tcp_SOURCES = test_tcp.c | 37 | test_tcp_SOURCES = test_tcp.c |
29 | test_tcp_CFLAGS = -g -I.. | 38 | test_tcp_CFLAGS = -g -I.. $(tap_cflags) |
30 | test_tcp_LDFLAGS = -L/usr/local/lib -ltap | 39 | test_tcp_LDFLAGS = $(tap_ldflags) -ltap |
31 | test_tcp_LDADD = ../utils_tcp.o | 40 | test_tcp_LDADD = ../utils_tcp.o $(tap_ldadd) |
32 | 41 | ||
33 | test_cmd_SOURCES = test_cmd.c | 42 | test_cmd_SOURCES = test_cmd.c |
34 | test_cmd_CFLAGS = -g -I.. | 43 | test_cmd_CFLAGS = -g -I.. $(tap_cflags) |
35 | test_cmd_LDFLAGS = -L/usr/local/lib -ltap | 44 | test_cmd_LDFLAGS = $(tap_ldflags) -ltap |
36 | test_cmd_LDADD = ../utils_cmd.o ../utils_base.o | 45 | test_cmd_LDADD = ../utils_cmd.o ../utils_base.o $(tap_ldadd) |
37 | 46 | ||
38 | test_base64_SOURCES = test_base64.c | 47 | test_base64_SOURCES = test_base64.c |
39 | test_base64_CFLAGS = -g -I.. | 48 | test_base64_CFLAGS = -g -I.. $(tap_cflags) |
40 | test_base64_LDFLAGS = -L/usr/local/lib -ltap | 49 | test_base64_LDFLAGS = $(tap_ldflags) -ltap |
41 | test_base64_LDADD = $(top_srcdir)/gl/base64.o | 50 | test_base64_LDADD = $(top_srcdir)/gl/base64.o $(tap_ldadd) |
42 | 51 | ||
43 | test_ini_SOURCES = test_ini.c | 52 | test_ini_SOURCES = test_ini.c |
44 | test_ini_CFLAGS = -g -I.. | 53 | test_ini_CFLAGS = -g -I.. $(tap_cflags) |
45 | test_ini_LDFLAGS = -L/usr/local/lib -ltap | 54 | test_ini_LDFLAGS = $(tap_ldflags) -ltap |
46 | test_ini_LDADD = ../utils_base.o ../parse_ini.o | 55 | test_ini_LDADD = ../utils_base.o ../parse_ini.o $(tap_ldadd) |
47 | 56 | ||
48 | test_opts_SOURCES = test_opts.c | 57 | test_opts_SOURCES = test_opts.c |
49 | test_opts_CFLAGS = -g -I.. | 58 | test_opts_CFLAGS = -g -I.. $(tap_cflags) |
50 | test_opts_LDFLAGS = -L/usr/local/lib -ltap | 59 | test_opts_LDFLAGS = $(tap_ldflags) -ltap |
51 | test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o | 60 | test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o $(tap_ldadd) |
52 | 61 | ||
53 | test: ${noinst_PROGRAMS} | 62 | test: ${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) |