summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2968a16)
raw | patch | inline | side by side (parent: 2968a16)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 26 Jun 2008 22:00:08 +0000 (22:00 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 26 Jun 2008 22:00:08 +0000 (22:00 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2013 f882894a-f735-0410-b71e-b25c423dba1c
Makefile.am | patch | blob | history | |
configure.in | patch | blob | history | |
external/README | [new file with mode: 0644] | patch | blob |
external/tap-1.01-altinity.tar.gz | [new file with mode: 0644] | patch | blob |
lib/tests/Makefile.am | patch | blob | history | |
tools/setup | patch | blob | history | |
tools/tinderbox_build | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index 416ef62bc8f2d784d162e1d7bc75a0523003d007..98b0dcc456d6b018756da5182c70c2bc3d8f8d8c 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
NPTest.pm contrib pkg nagios-plugins.spec \
config_test/Makefile config_test/run_tests config_test/child_test.c \
perlmods tools/build_perl_modules \
- tools/tinderbox_build
+ tools/tinderbox_build @TAP_DIR@
ACLOCAL_AMFLAGS = -I gl/m4 -I m4
install-root:
cd plugins-root && $(MAKE) $@
-test test-debug:
+tap:
+ cd @TAP_DIR@ && $(MAKE)
+
+test test-debug: tap
cd lib && $(MAKE) $@
if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
cd plugins && $(MAKE) $@
diff --git a/configure.in b/configure.in
index 612d686936c8446a363bef12570755436d31e299..afde8374028730e9dc76172bbfae12eddc42b43c 100644 (file)
--- a/configure.in
+++ b/configure.in
AC_CHECK_LIB(m,floor,MATHLIBS="-lm")
AC_SUBST(MATHLIBS)
-dnl Check for libtap, to run perl-like tests
-AC_CHECK_LIB(tap, plan_tests,
- EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64"
- AC_SUBST(EXTRA_TEST)
- )
-
dnl INI Parsing
AC_ARG_ENABLE(extra-opts,
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
AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?)
fi
+AC_ARG_ENABLE(libtap,
+ AC_HELP_STRING([--enable-libtap],
+ [Enables configuring of libtap in external/tap/. Run "make tap" to compile (default: no)]),
+ [enable_libtap=$enableval],
+ [enable_libtap=no])
+dnl Have to define TAP_DIR so that Makefile can pull it as an extra dist
+TAP_DIR=external/tap-1.01
+AC_SUBST(TAP_DIR)
+if test "$enable_libtap" = yes; then
+ dnl Have to have AC_CONFIG_SUBDIRS as a literal
+ AC_CONFIG_SUBDIRS([external/tap-1.01])
+ EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64"
+ AC_SUBST(EXTRA_TEST)
+fi
+
AC_OUTPUT(
Makefile
lib/Makefile
diff --git a/external/README b/external/README
--- /dev/null
+++ b/external/README
@@ -0,0 +1,4 @@
+Changes to tap-1.01.tar.gz from http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap:
+
+Added vasprintf from gnulib (see http://jc.ngo.org.uk/trac-bin/trac.cgi/ticket/32)
+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 (file)
index 0000000..1130ab3
Binary files /dev/null and b/external/tap-1.01-altinity.tar.gz differ
index 0000000..1130ab3
Binary files /dev/null and b/external/tap-1.01-altinity.tar.gz differ
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 25e2bed3becc7e6850500b84afc6dde7453edb5b..45c115278f6f6156c10fa981f6b4dbaa9acc53c3 100644 (file)
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
LIBS = @LIBINTL@
+TAP_LIB_DIR = $(top_srcdir)/@TAP_DIR@/src
+
test_utils_SOURCES = test_utils.c
test_utils_CFLAGS = -g -I..
-test_utils_LDFLAGS = -L/usr/local/lib -ltap
+test_utils_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
test_utils_LDADD = ../utils_base.o
test_disk_SOURCES = test_disk.c
test_disk_CFLAGS = -g -I..
-test_disk_LDFLAGS = -L/usr/local/lib -ltap
+test_disk_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a
test_tcp_SOURCES = test_tcp.c
test_tcp_CFLAGS = -g -I..
-test_tcp_LDFLAGS = -L/usr/local/lib -ltap
+test_tcp_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
test_tcp_LDADD = ../utils_tcp.o
test_cmd_SOURCES = test_cmd.c
test_cmd_CFLAGS = -g -I..
-test_cmd_LDFLAGS = -L/usr/local/lib -ltap
+test_cmd_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
test_cmd_LDADD = ../utils_cmd.o ../utils_base.o
test_base64_SOURCES = test_base64.c
test_base64_CFLAGS = -g -I..
-test_base64_LDFLAGS = -L/usr/local/lib -ltap
+test_base64_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
test_base64_LDADD = $(top_srcdir)/gl/base64.o
test_ini_SOURCES = test_ini.c
test_ini_CFLAGS = -g -I..
-test_ini_LDFLAGS = -L/usr/local/lib -ltap
+test_ini_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
test_ini_LDADD = ../utils_base.o ../parse_ini.o
test_opts_SOURCES = test_opts.c
test_opts_CFLAGS = -g -I..
-test_opts_LDFLAGS = -L/usr/local/lib -ltap
+test_opts_LDFLAGS = -L$(TAP_LIB_DIR) -ltap
test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o
test: ${noinst_PROGRAMS}
diff --git a/tools/setup b/tools/setup
index 7fdb980da6ba05d10c8680c275f89bd9d8fec4d7..a8d9825298b1cbca9c5dd5c783a85bf0ea3b47b0 100755 (executable)
--- a/tools/setup
+++ b/tools/setup
if [ $docbook = 1 ] ; then
cd doc && make
fi
+
+# Untar libtap
+cd external && tar --gzip -xf tap-1.01-altinity.tar.gz
diff --git a/tools/tinderbox_build b/tools/tinderbox_build
index 70fb07a36d249708c84a22722085c11efd975561..e8a3e2e09e8fad0cd9b4b8d5e84eec82d3897bf1 100755 (executable)
--- a/tools/tinderbox_build
+++ b/tools/tinderbox_build
sub configure {
# Configure
- print LOG "./configure $ConfigureArgs\n";
- open (CONFIGURE, "./configure $ConfigureArgs 2>&1 |") || die "../configure: $!\n";
+ print LOG "./configure --enable-libtap $ConfigureArgs\n";
+ open (CONFIGURE, "./configure --enable-libtap $ConfigureArgs 2>&1 |") || die "../configure: $!\n";
while (<CONFIGURE>) {
print $_;
print LOG $_;