diff options
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | configure.in | 21 | ||||
-rw-r--r-- | external/README | 4 | ||||
-rw-r--r-- | external/tap-1.01-altinity.tar.gz | bin | 0 -> 431388 bytes | |||
-rw-r--r-- | lib/tests/Makefile.am | 16 | ||||
-rwxr-xr-x | tools/setup | 3 | ||||
-rwxr-xr-x | tools/tinderbox_build | 4 |
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 | ||
13 | ACLOCAL_AMFLAGS = -I gl/m4 -I m4 | 13 | ACLOCAL_AMFLAGS = -I gl/m4 -I m4 |
14 | 14 | ||
@@ -22,7 +22,10 @@ dist-hook: | |||
22 | install-root: | 22 | install-root: |
23 | cd plugins-root && $(MAKE) $@ | 23 | cd plugins-root && $(MAKE) $@ |
24 | 24 | ||
25 | test test-debug: | 25 | tap: |
26 | cd @TAP_DIR@ && $(MAKE) | ||
27 | |||
28 | test 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) | |||
154 | AC_CHECK_LIB(m,floor,MATHLIBS="-lm") | 154 | AC_CHECK_LIB(m,floor,MATHLIBS="-lm") |
155 | AC_SUBST(MATHLIBS) | 155 | AC_SUBST(MATHLIBS) |
156 | 156 | ||
157 | dnl Check for libtap, to run perl-like tests | ||
158 | AC_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 | |||
163 | dnl INI Parsing | 157 | dnl INI Parsing |
164 | AC_ARG_ENABLE(extra-opts, | 158 | AC_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?) |
1596 | fi | 1590 | fi |
1597 | 1591 | ||
1592 | AC_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]) | ||
1597 | dnl Have to define TAP_DIR so that Makefile can pull it as an extra dist | ||
1598 | TAP_DIR=external/tap-1.01 | ||
1599 | AC_SUBST(TAP_DIR) | ||
1600 | if 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) | ||
1605 | fi | ||
1606 | |||
1598 | AC_OUTPUT( | 1607 | AC_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 @@ | |||
1 | Changes to tap-1.01.tar.gz from http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap: | ||
2 | |||
3 | Added vasprintf from gnulib (see http://jc.ngo.org.uk/trac-bin/trac.cgi/ticket/32) | ||
4 | Added -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 | ||
16 | LIBS = @LIBINTL@ | 16 | LIBS = @LIBINTL@ |
17 | 17 | ||
18 | TAP_LIB_DIR = $(top_srcdir)/@TAP_DIR@/src | ||
19 | |||
18 | test_utils_SOURCES = test_utils.c | 20 | test_utils_SOURCES = test_utils.c |
19 | test_utils_CFLAGS = -g -I.. | 21 | test_utils_CFLAGS = -g -I.. |
20 | test_utils_LDFLAGS = -L/usr/local/lib -ltap | 22 | test_utils_LDFLAGS = -L$(TAP_LIB_DIR) -ltap |
21 | test_utils_LDADD = ../utils_base.o | 23 | test_utils_LDADD = ../utils_base.o |
22 | 24 | ||
23 | test_disk_SOURCES = test_disk.c | 25 | test_disk_SOURCES = test_disk.c |
24 | test_disk_CFLAGS = -g -I.. | 26 | test_disk_CFLAGS = -g -I.. |
25 | test_disk_LDFLAGS = -L/usr/local/lib -ltap | 27 | test_disk_LDFLAGS = -L$(TAP_LIB_DIR) -ltap |
26 | test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a | 28 | test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a |
27 | 29 | ||
28 | test_tcp_SOURCES = test_tcp.c | 30 | test_tcp_SOURCES = test_tcp.c |
29 | test_tcp_CFLAGS = -g -I.. | 31 | test_tcp_CFLAGS = -g -I.. |
30 | test_tcp_LDFLAGS = -L/usr/local/lib -ltap | 32 | test_tcp_LDFLAGS = -L$(TAP_LIB_DIR) -ltap |
31 | test_tcp_LDADD = ../utils_tcp.o | 33 | test_tcp_LDADD = ../utils_tcp.o |
32 | 34 | ||
33 | test_cmd_SOURCES = test_cmd.c | 35 | test_cmd_SOURCES = test_cmd.c |
34 | test_cmd_CFLAGS = -g -I.. | 36 | test_cmd_CFLAGS = -g -I.. |
35 | test_cmd_LDFLAGS = -L/usr/local/lib -ltap | 37 | test_cmd_LDFLAGS = -L$(TAP_LIB_DIR) -ltap |
36 | test_cmd_LDADD = ../utils_cmd.o ../utils_base.o | 38 | test_cmd_LDADD = ../utils_cmd.o ../utils_base.o |
37 | 39 | ||
38 | test_base64_SOURCES = test_base64.c | 40 | test_base64_SOURCES = test_base64.c |
39 | test_base64_CFLAGS = -g -I.. | 41 | test_base64_CFLAGS = -g -I.. |
40 | test_base64_LDFLAGS = -L/usr/local/lib -ltap | 42 | test_base64_LDFLAGS = -L$(TAP_LIB_DIR) -ltap |
41 | test_base64_LDADD = $(top_srcdir)/gl/base64.o | 43 | test_base64_LDADD = $(top_srcdir)/gl/base64.o |
42 | 44 | ||
43 | test_ini_SOURCES = test_ini.c | 45 | test_ini_SOURCES = test_ini.c |
44 | test_ini_CFLAGS = -g -I.. | 46 | test_ini_CFLAGS = -g -I.. |
45 | test_ini_LDFLAGS = -L/usr/local/lib -ltap | 47 | test_ini_LDFLAGS = -L$(TAP_LIB_DIR) -ltap |
46 | test_ini_LDADD = ../utils_base.o ../parse_ini.o | 48 | test_ini_LDADD = ../utils_base.o ../parse_ini.o |
47 | 49 | ||
48 | test_opts_SOURCES = test_opts.c | 50 | test_opts_SOURCES = test_opts.c |
49 | test_opts_CFLAGS = -g -I.. | 51 | test_opts_CFLAGS = -g -I.. |
50 | test_opts_LDFLAGS = -L/usr/local/lib -ltap | 52 | test_opts_LDFLAGS = -L$(TAP_LIB_DIR) -ltap |
51 | test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o | 53 | test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o |
52 | 54 | ||
53 | test: ${noinst_PROGRAMS} | 55 | test: ${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 | |||
49 | if [ $docbook = 1 ] ; then | 49 | if [ $docbook = 1 ] ; then |
50 | cd doc && make | 50 | cd doc && make |
51 | fi | 51 | fi |
52 | |||
53 | # Untar libtap | ||
54 | cd 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 | ||
243 | sub configure { | 243 | sub 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 $_; |