[Nagiosplug-checkins] CVS: nagiosplug autogen.sh,NONE,1.1 configure.in,1.57,1.58

Jeremy T. Bouse undrgrid at users.sourceforge.net
Wed Mar 12 09:12:09 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug
In directory sc8-pr-cvs1:/tmp/cvs-serv3454

Modified Files:
	configure.in 
Added Files:
	autogen.sh 
Log Message:
Added autogen.sh script that rebuilds using autotools and runs configure
Modified configure.in to include some debug build option info at the end 
of the scripts execution. Can be removed by release time.
Modified configure.in to include a --with-ipv6 option
Default build is without IPv6 support now to enable you need to use the 
--with-ipv6 command line option to configure.
Modified plugins/utils.* to use USE_IPV6


--- NEW FILE ---
#!/bin/sh
#
# autogen.sh glue for CMU Cyrus IMAP
# $Id: autogen.sh,v 1.1 2003/03/12 17:11:18 undrgrid Exp $
#
# Requires: automake, autoconf, dpkg-dev
# set -e

MAKE=$(which gnumake)
if test ! -x "$MAKE" ; then MAKE=$(which gmake) ; fi
if test ! -x "$MAKE" ; then MAKE=$(which make) ; fi
HAVE_GNU_MAKE=$($MAKE --version|grep -c "Free Software Foundation")

if test "$HAVE_GNU_MAKE" != "1"; then 
	echo Could not find GNU make on this system, can not proceed with build.
	exit 1
else
	echo Found GNU Make at $MAKE ... good.
fi

# Refresh GNU autotools toolchain.
for i in config.guess config.sub missing install-sh mkinstalldirs ; do
	test -r /usr/share/automake/${i} && {
		rm -f ${i}
		cp /usr/share/automake/${i} .
	}
	chmod 755 ${i}
done

aclocal -I lib
autoheader
automake -c -a
autoconf

# For the Debian build
test -d debian && {
	# Kill executable list first
	rm -f debian/executable.files

	# Make sure our executable and removable lists won't be screwed up
	debclean && echo Cleaned buildtree just in case...

	# refresh list of executable scripts, to avoid possible breakage if
	# upstream tarball does not include the file or if it is mispackaged
	# for whatever reason.
	echo Generating list of executable files...
	rm -f debian/executable.files
	find -type f -perm +111 ! -name '.*' -fprint debian/executable.files

	# link these in Debian builds
	rm -f config.sub config.guess
	ln -s /usr/share/misc/config.sub .
	ln -s /usr/share/misc/config.guess .
}

./configure $*

exit 0

Index: configure.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -r1.57 -r1.58
*** configure.in	12 Mar 2003 06:38:24 -0000	1.57
--- configure.in	12 Mar 2003 17:11:19 -0000	1.58
***************
*** 301,304 ****
--- 301,327 ----
  	OPENSSL=$withval,)
  
+ AC_ARG_WITH([ipv6],
+               ACX_HELP_STRING([--with-ipv6],
+                              [enable IPv6 support (default=no)]),
+               ac_cv_sys_use_ipv6=$withval,
+               ac_cv_sys_use_ipv6=no)
+ 
+ dnl Check for AF_INET6 support
+ AC_CACHE_CHECK([for IPv6 support], ac_cv_sys_use_ipv6, [
+ 	AC_TRY_COMPILE([#include <netinet/in.h>],
+ 			[struct sockaddr_in6 sin6;
+ 			void *p;
+ 
+ 			sin6.sin6_family = AF_INET6;
+ 			sin6.sin6_port = 587;
+ 			p = &sin6.sin6_addr;],
+ 			[ac_cv_sys_use_ipv6=yes], 
+ 			[ac_cv_sys_use_ipv6=no])
+ 	])
+ 
+ if test x"$ac_cv_sys_use_ipv6" != xno ; then
+ 	AC_DEFINE(USE_IPV6,1,[Enable IPv6 support])
+ fi
+ 
  dnl #########################################################################
  dnl Check if Posix getaddrinfo() is available.  It is also possible to use
***************
*** 399,417 ****
      LIBOBJS="$LIBOBJS gethostbyname.o"
  
-     AC_CACHE_CHECK([for IPv6 support], acx_cv_sys_use_ipv6, [
-             AC_TRY_COMPILE([
- #               include <netinet/in.h>
-             ], [
-                 struct sockaddr_in6 sin6;
-                 void *p;
- 
-                 sin6.sin6_family = AF_INET6;
-                 sin6.sin6_port = 587;
-                 p = &sin6.sin6_addr;
-             ], [acx_cv_sys_use_ipv6=yes], [acx_cv_sys_use_ipv6=no])
-     ])
-     if test x"$acx_cv_sys_use_ipv6" != xno ; then
-             AC_DEFINE(USE_IPV6,1,[Enable IPv6 support])
-     fi
  fi
  
--- 422,425 ----
***************
*** 1048,1051 ****
--- 1056,1060 ----
  	ac_cv_ping6_command=$withval,)
  
+ if test x"$ac_cv_sys_use_ipv6" != xno ; then
  AC_MSG_CHECKING(for ICMPv6 ping syntax)
  ac_cv_ping6_packets_first=no
***************
*** 1197,1200 ****
--- 1206,1210 ----
  		[Define if packet count must precede host])
  fi
+ fi
  
  AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
***************
*** 1454,1455 ****
--- 1464,1476 ----
  
  AC_OUTPUT(Makefile subst lib/Makefile plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl,echo timestamp > plugins/stamp-h1;echo timestamp > plugins/stamp-h2;echo timestamp > plugins/stamp-h3;echo timestamp > plugins/stamp-h4;echo timestamp > plugins/stamp-h5;echo timestamp > plugins/stamp-h6;PATH=.:..:$PATH subst.sh command.cfg)
+ 
+ ACX_FEATURE([with],[cgiurl],[$cgiurl])
+ ACX_FEATURE([with],[nagios-user],[$nagios_usr])
+ ACX_FEATURE([with],[nagios-group],[$nagios_grp])
+ ACX_FEATURE([with],[trusted-path],[$trusted_path])
+ ACX_FEATURE([with],[df-command],[$ac_cv_df_command])
+ ACX_FEATURE([with],[ping-command],[$ac_cv_ping_command])
+ ACX_FEATURE([with],[ping6-command],[$ac_cv_ping6_command])
+ ACX_FEATURE([with],[lwres])
+ ACX_FEATURE([with],[ipv6],[$ac_cv_sys_use_ipv6])
+ ACX_FEATURE([enable],[emulate-getaddrinfo])





More information about the Commits mailing list