summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.in21
-rw-r--r--external/README4
-rw-r--r--external/tap-1.01-altinity.tar.gzbin0 -> 431388 bytes
-rw-r--r--lib/tests/Makefile.am16
-rwxr-xr-xtools/setup3
-rwxr-xr-xtools/tinderbox_build4
7 files changed, 38 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am
index 416ef62..98b0dcc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,7 @@ EXTRA_DIST = config.rpath \
8 NPTest.pm contrib pkg nagios-plugins.spec \ 8 NPTest.pm contrib pkg nagios-plugins.spec \
9 config_test/Makefile config_test/run_tests config_test/child_test.c \ 9 config_test/Makefile config_test/run_tests config_test/child_test.c \
10 perlmods tools/build_perl_modules \ 10 perlmods tools/build_perl_modules \
11 tools/tinderbox_build 11 tools/tinderbox_build @TAP_DIR@
12 12
13ACLOCAL_AMFLAGS = -I gl/m4 -I m4 13ACLOCAL_AMFLAGS = -I gl/m4 -I m4
14 14
@@ -22,7 +22,10 @@ dist-hook:
22install-root: 22install-root:
23 cd plugins-root && $(MAKE) $@ 23 cd plugins-root && $(MAKE) $@
24 24
25test test-debug: 25tap:
26 cd @TAP_DIR@ && $(MAKE)
27
28test test-debug: tap
26 cd lib && $(MAKE) $@ 29 cd lib && $(MAKE) $@
27 if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi 30 if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
28 cd plugins && $(MAKE) $@ 31 cd plugins && $(MAKE) $@
diff --git a/configure.in b/configure.in
index 612d686..afde837 100644
--- a/configure.in
+++ b/configure.in
@@ -154,12 +154,6 @@ AC_CHECK_HEADERS(math.h)
154AC_CHECK_LIB(m,floor,MATHLIBS="-lm") 154AC_CHECK_LIB(m,floor,MATHLIBS="-lm")
155AC_SUBST(MATHLIBS) 155AC_SUBST(MATHLIBS)
156 156
157dnl Check for libtap, to run perl-like tests
158AC_CHECK_LIB(tap, plan_tests,
159 EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64"
160 AC_SUBST(EXTRA_TEST)
161 )
162
163dnl INI Parsing 157dnl INI Parsing
164AC_ARG_ENABLE(extra-opts, 158AC_ARG_ENABLE(extra-opts,
165 AC_HELP_STRING([--enable-extra-opts], 159 AC_HELP_STRING([--enable-extra-opts],
@@ -1595,6 +1589,21 @@ if test "$ac_cv_uname_s" = 'SunOS' -a \( "x$ac_cv_prog_ac_ct_AR" = "x" -o "$ac_c
1595 AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?) 1589 AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?)
1596fi 1590fi
1597 1591
1592AC_ARG_ENABLE(libtap,
1593 AC_HELP_STRING([--enable-libtap],
1594 [Enables configuring of libtap in external/tap/. Run "make tap" to compile (default: no)]),
1595 [enable_libtap=$enableval],
1596 [enable_libtap=no])
1597dnl Have to define TAP_DIR so that Makefile can pull it as an extra dist
1598TAP_DIR=external/tap-1.01
1599AC_SUBST(TAP_DIR)
1600if test "$enable_libtap" = yes; then
1601 dnl Have to have AC_CONFIG_SUBDIRS as a literal
1602 AC_CONFIG_SUBDIRS([external/tap-1.01])
1603 EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64"
1604 AC_SUBST(EXTRA_TEST)
1605fi
1606
1598AC_OUTPUT( 1607AC_OUTPUT(
1599 Makefile 1608 Makefile
1600 lib/Makefile 1609 lib/Makefile
diff --git a/external/README b/external/README
new file mode 100644
index 0000000..62a868b
--- /dev/null
+++ b/external/README
@@ -0,0 +1,4 @@
1Changes to tap-1.01.tar.gz from http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap:
2
3Added vasprintf from gnulib (see http://jc.ngo.org.uk/trac-bin/trac.cgi/ticket/32)
4Added -UHAVE_LIBPTHREAD (see http://nagiosplugins.org/faq/libtap)
diff --git a/external/tap-1.01-altinity.tar.gz b/external/tap-1.01-altinity.tar.gz
new file mode 100644
index 0000000..1130ab3
--- /dev/null
+++ b/external/tap-1.01-altinity.tar.gz
Binary files differ
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 25e2bed..45c1152 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -15,39 +15,41 @@ EXTRA_DIST = $(np_test_scripts) $(np_test_files)
15 15
16LIBS = @LIBINTL@ 16LIBS = @LIBINTL@
17 17
18TAP_LIB_DIR = $(top_srcdir)/@TAP_DIR@/src
19
18test_utils_SOURCES = test_utils.c 20test_utils_SOURCES = test_utils.c
19test_utils_CFLAGS = -g -I.. 21test_utils_CFLAGS = -g -I..
20test_utils_LDFLAGS = -L/usr/local/lib -ltap 22test_utils_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
21test_utils_LDADD = ../utils_base.o 23test_utils_LDADD = ../utils_base.o
22 24
23test_disk_SOURCES = test_disk.c 25test_disk_SOURCES = test_disk.c
24test_disk_CFLAGS = -g -I.. 26test_disk_CFLAGS = -g -I..
25test_disk_LDFLAGS = -L/usr/local/lib -ltap 27test_disk_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
26test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a 28test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a
27 29
28test_tcp_SOURCES = test_tcp.c 30test_tcp_SOURCES = test_tcp.c
29test_tcp_CFLAGS = -g -I.. 31test_tcp_CFLAGS = -g -I..
30test_tcp_LDFLAGS = -L/usr/local/lib -ltap 32test_tcp_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
31test_tcp_LDADD = ../utils_tcp.o 33test_tcp_LDADD = ../utils_tcp.o
32 34
33test_cmd_SOURCES = test_cmd.c 35test_cmd_SOURCES = test_cmd.c
34test_cmd_CFLAGS = -g -I.. 36test_cmd_CFLAGS = -g -I..
35test_cmd_LDFLAGS = -L/usr/local/lib -ltap 37test_cmd_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
36test_cmd_LDADD = ../utils_cmd.o ../utils_base.o 38test_cmd_LDADD = ../utils_cmd.o ../utils_base.o
37 39
38test_base64_SOURCES = test_base64.c 40test_base64_SOURCES = test_base64.c
39test_base64_CFLAGS = -g -I.. 41test_base64_CFLAGS = -g -I..
40test_base64_LDFLAGS = -L/usr/local/lib -ltap 42test_base64_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
41test_base64_LDADD = $(top_srcdir)/gl/base64.o 43test_base64_LDADD = $(top_srcdir)/gl/base64.o
42 44
43test_ini_SOURCES = test_ini.c 45test_ini_SOURCES = test_ini.c
44test_ini_CFLAGS = -g -I.. 46test_ini_CFLAGS = -g -I..
45test_ini_LDFLAGS = -L/usr/local/lib -ltap 47test_ini_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
46test_ini_LDADD = ../utils_base.o ../parse_ini.o 48test_ini_LDADD = ../utils_base.o ../parse_ini.o
47 49
48test_opts_SOURCES = test_opts.c 50test_opts_SOURCES = test_opts.c
49test_opts_CFLAGS = -g -I.. 51test_opts_CFLAGS = -g -I..
50test_opts_LDFLAGS = -L/usr/local/lib -ltap 52test_opts_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
51test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o 53test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o
52 54
53test: ${noinst_PROGRAMS} 55test: ${noinst_PROGRAMS}
diff --git a/tools/setup b/tools/setup
index 7fdb980..a8d9825 100755
--- a/tools/setup
+++ b/tools/setup
@@ -49,3 +49,6 @@ fi
49if [ $docbook = 1 ] ; then 49if [ $docbook = 1 ] ; then
50 cd doc && make 50 cd doc && make
51fi 51fi
52
53# Untar libtap
54cd external && tar --gzip -xf tap-1.01-altinity.tar.gz
diff --git a/tools/tinderbox_build b/tools/tinderbox_build
index 70fb07a..e8a3e2e 100755
--- a/tools/tinderbox_build
+++ b/tools/tinderbox_build
@@ -242,8 +242,8 @@ sub SetupPath {
242 242
243sub configure { 243sub configure {
244 # Configure 244 # Configure
245 print LOG "./configure $ConfigureArgs\n"; 245 print LOG "./configure --enable-libtap $ConfigureArgs\n";
246 open (CONFIGURE, "./configure $ConfigureArgs 2>&1 |") || die "../configure: $!\n"; 246 open (CONFIGURE, "./configure --enable-libtap $ConfigureArgs 2>&1 |") || die "../configure: $!\n";
247 while (<CONFIGURE>) { 247 while (<CONFIGURE>) {
248 print $_; 248 print $_;
249 print LOG $_; 249 print LOG $_;