|
|
|
@ -5,23 +5,36 @@ AC_PREREQ(2.59)
|
|
|
|
|
|
|
|
|
|
AC_INIT([fping],[3.16-rc2])
|
|
|
|
|
|
|
|
|
|
dnl make ipv4 and ipv6 options
|
|
|
|
|
dnl --disable-ipv4
|
|
|
|
|
AC_ARG_ENABLE([ipv4],
|
|
|
|
|
AS_HELP_STRING([--enable-ipv4], [(ignored for compatibility with previous versions)]))
|
|
|
|
|
AS_HELP_STRING([--disable-ipv4], [Disable support for pinging IPv4 hosts]))
|
|
|
|
|
AM_CONDITIONAL([IPV4], [test "x$enable_ipv4" != "xno"])
|
|
|
|
|
AM_COND_IF([IPV4], [AC_DEFINE([IPV4], [1], [IPv4 enabled])])
|
|
|
|
|
|
|
|
|
|
dnl --disable-ipv6
|
|
|
|
|
AC_ARG_ENABLE([ipv6],
|
|
|
|
|
AS_HELP_STRING([--enable-ipv6], [Build IPv6 capable fping6]),
|
|
|
|
|
[case "${enableval}" in
|
|
|
|
|
yes) ipv6=true ;;
|
|
|
|
|
no) ipv6=false ;;
|
|
|
|
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ipv6]) ;;
|
|
|
|
|
esac],[ipv6=true])
|
|
|
|
|
AM_CONDITIONAL([IPV6], [test x$ipv6 = xtrue])
|
|
|
|
|
AS_HELP_STRING([--disable-ipv6], [Disable support for pinging IPv6 hosts]))
|
|
|
|
|
AS_IF([test "x$enable_ipv6" != "xno"], [
|
|
|
|
|
dnl Test if IPv6 is supported
|
|
|
|
|
AC_CHECK_HEADERS([netinet/icmp6.h], [have_ipv6="yes"], [], [[
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
]])
|
|
|
|
|
])
|
|
|
|
|
dnl Can't disable both IPv4 and IPv6
|
|
|
|
|
AS_IF([test "x$enable_ipv4" = "xno" -a "x$enable_ipv6" = "xno"], [
|
|
|
|
|
AC_MSG_ERROR([Need to enable IPv4 or IPv6. Can't disable both!)])
|
|
|
|
|
])
|
|
|
|
|
dnl IPv6 required, but not supported?
|
|
|
|
|
AS_IF([test \( "x$enable_ipv6" = "xyes" -o "x$enable_ipv4" = "xno" \) -a "x$have_ipv6" != "xyes" ], [
|
|
|
|
|
AC_MSG_ERROR([IPv6 not supported on this platform (netinet/icmp6.h header not found)])
|
|
|
|
|
])
|
|
|
|
|
AM_CONDITIONAL([IPV6], [test "x$have_ipv6" = "xyes"])
|
|
|
|
|
AM_COND_IF([IPV6], [AC_DEFINE([IPV6], [1], [IPv6 enabled])])
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([timestamp],
|
|
|
|
|
AS_HELP_STRING([--disable-timestamp], [Disable kernel-based packet timestaping (SO_TIMESTAMP)]))
|
|
|
|
|
AS_IF([test "x$enable_timestamp" != "xno"], [
|
|
|
|
|
AC_CHECK_DECL([SO_TIMESTAMP], [AC_DEFINE(HAVE_SO_TIMESTAMP, [1], [set define])], [have_so_timestamp="no"], [#include <sys/types.h>
|
|
|
|
|
AC_CHECK_DECL([SO_TIMESTAMP], [AC_DEFINE(HAVE_SO_TIMESTAMP, [1], [SO_TIMESTAMP is defined])], [have_so_timestamp="no"], [#include <sys/types.h>
|
|
|
|
|
#include <sys/socket.h>])
|
|
|
|
|
])
|
|
|
|
|
dnl Test if --enable-timestamp is explicitely enabled and make an error if this platform doesn't support it
|
|
|
|
@ -70,7 +83,7 @@ AH_BOTTOM([
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
|
AC_CHECK_HEADERS(unistd.h sys/file.h stdlib.h sys/select.h)
|
|
|
|
|
AC_CHECK_HEADERS([unistd.h sys/file.h stdlib.h sys/select.h])
|
|
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
|
doc/Makefile
|
|
|
|
|