summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 46b0e78)
raw | patch | inline | side by side (parent: 46b0e78)
author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | |
Wed, 12 Mar 2003 17:11:20 +0000 (17:11 +0000) | ||
committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | |
Wed, 12 Mar 2003 17:11:20 +0000 (17:11 +0000) |
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
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@410 f882894a-f735-0410-b71e-b25c423dba1c
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
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@410 f882894a-f735-0410-b71e-b25c423dba1c
autogen.sh | [new file with mode: 0755] | patch | blob |
configure.in | patch | blob | history | |
plugins/utils.c | patch | blob | history | |
plugins/utils.h.in | patch | blob | history |
diff --git a/autogen.sh b/autogen.sh
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# autogen.sh glue for CMU Cyrus IMAP
+# $Id$
+#
+# 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
diff --git a/configure.in b/configure.in
index 48e450676afb4ba91d412e23dffaa544130ac730..529b7bbc3e54bd9151b77743bec1c6d1c6d10b42 100644 (file)
--- a/configure.in
+++ b/configure.in
[sets path to openssl installation]),
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
dnl the version from the lwres library distributed with BIND.
fi
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
AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no)
[sets syntax for ICMPv6 ping]),
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
if test -n "$ac_cv_ping6_command"
AC_DEFINE(PING6_PACKETS_FIRST,1,
[Define if packet count must precede host])
fi
+fi
AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"${VERSION}",[package version])
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])
diff --git a/plugins/utils.c b/plugins/utils.c
index 0d250677c218ced9d6936826d455220d890d1722..9ac5596e419ec3936cd98e79bd12f30e8352220a 100644 (file)
--- a/plugins/utils.c
+++ b/plugins/utils.c
int is_addr (char *);
int resolve_host_or_addr (char *, int);
int is_inet_addr (char *);
+#ifdef USE_IPV6
int is_inet6_addr (char *);
+#endif
int is_hostname (char *);
int is_integer (char *);
int
is_addr (char *address)
{
+#ifdef USE_IPV6
if (is_inet_addr (address) || is_inet6_addr (address))
+#else
+ if (is_inet_addr (address))
+#endif
return (TRUE);
return (FALSE);
return resolve_host_or_addr (address, AF_INET);
}
+#ifdef USE_IPV6
int
is_inet6_addr (char *address)
{
return resolve_host_or_addr (address, AF_INET6);
}
+#endif
/* from RFC-1035
*
int
is_hostname (char *s1)
{
+#ifdef USE_IPV6
return resolve_host_or_addr (s1, AF_UNSPEC);
+#else
+ return resolve_host_or_addr (s1, AF_INET);
+#endif
}
int
diff --git a/plugins/utils.h.in b/plugins/utils.h.in
index 0d947f42d1671dd4445acc3cb9efb1bfd2bc8b6f..89ada6f0559810058cd86b189fd1d5fede1b8da0 100644 (file)
--- a/plugins/utils.h.in
+++ b/plugins/utils.h.in
int is_host (char *);
int is_addr (char *);
int is_inet_addr (char *);
+#ifdef USE_IPV6
int is_inet6_addr (char *);
+#endif
int is_hostname (char *);
int is_integer (char *);