[Nagiosplug-checkins] SF.net SVN: nagiosplug: [2013] nagiosplug/trunk

tonvoon at users.sourceforge.net tonvoon at users.sourceforge.net
Fri Jun 27 00:00:11 CEST 2008


Revision: 2013
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2013&view=rev
Author:   tonvoon
Date:     2008-06-26 15:00:08 -0700 (Thu, 26 Jun 2008)

Log Message:
-----------
Adding libtap into distribution to help run C based tests

Modified Paths:
--------------
    nagiosplug/trunk/Makefile.am
    nagiosplug/trunk/configure.in
    nagiosplug/trunk/lib/tests/Makefile.am
    nagiosplug/trunk/tools/setup
    nagiosplug/trunk/tools/tinderbox_build

Added Paths:
-----------
    nagiosplug/trunk/external/
    nagiosplug/trunk/external/README
    nagiosplug/trunk/external/tap-1.01-altinity.tar.gz

Modified: nagiosplug/trunk/Makefile.am
===================================================================
--- nagiosplug/trunk/Makefile.am	2008-06-17 14:19:17 UTC (rev 2012)
+++ nagiosplug/trunk/Makefile.am	2008-06-26 22:00:08 UTC (rev 2013)
@@ -8,7 +8,7 @@
 	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
 
@@ -22,7 +22,10 @@
 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) $@

Modified: nagiosplug/trunk/configure.in
===================================================================
--- nagiosplug/trunk/configure.in	2008-06-17 14:19:17 UTC (rev 2012)
+++ nagiosplug/trunk/configure.in	2008-06-26 22:00:08 UTC (rev 2013)
@@ -154,12 +154,6 @@
 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 @@
 	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 


Property changes on: nagiosplug/trunk/external
___________________________________________________________________
Name: svn:ignore
   + tap-1.01


Added: nagiosplug/trunk/external/README
===================================================================
--- nagiosplug/trunk/external/README	                        (rev 0)
+++ nagiosplug/trunk/external/README	2008-06-26 22:00:08 UTC (rev 2013)
@@ -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)

Added: nagiosplug/trunk/external/tap-1.01-altinity.tar.gz
===================================================================
(Binary files differ)


Property changes on: nagiosplug/trunk/external/tap-1.01-altinity.tar.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: nagiosplug/trunk/lib/tests/Makefile.am
===================================================================
--- nagiosplug/trunk/lib/tests/Makefile.am	2008-06-17 14:19:17 UTC (rev 2012)
+++ nagiosplug/trunk/lib/tests/Makefile.am	2008-06-26 22:00:08 UTC (rev 2013)
@@ -15,39 +15,41 @@
 
 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}

Modified: nagiosplug/trunk/tools/setup
===================================================================
--- nagiosplug/trunk/tools/setup	2008-06-17 14:19:17 UTC (rev 2012)
+++ nagiosplug/trunk/tools/setup	2008-06-26 22:00:08 UTC (rev 2013)
@@ -49,3 +49,6 @@
 if [ $docbook = 1 ] ; then
 	cd doc && make
 fi
+
+# Untar libtap
+cd external && tar --gzip -xf tap-1.01-altinity.tar.gz

Modified: nagiosplug/trunk/tools/tinderbox_build
===================================================================
--- nagiosplug/trunk/tools/tinderbox_build	2008-06-17 14:19:17 UTC (rev 2012)
+++ nagiosplug/trunk/tools/tinderbox_build	2008-06-26 22:00:08 UTC (rev 2013)
@@ -242,8 +242,8 @@
 
 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 $_;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list