AC_PROG_CC_C99([],
[AC_MSG_ERROR([No compiler found that supports C99])]
)
+
+AX_COMPILER_VENDOR
+
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_EGREP
AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_PROG_CC_C_O
-AM_CONDITIONAL([COMPILER_IS_GCC], [test "x$GCC" = "xyes"])
AC_PROG_LEX
AC_PROG_YACC
AC_MSG_ERROR([bison is missing and you do not have ${srcdir}/src/liboconfig/parser.c. Please install bison])
fi
-AS_IF([test "x$lt_cv_dlopen" = "xno"],
- [AC_MSG_ERROR([Your system does not support dlopen])]
-)
+if test "x$lt_cv_dlopen" = "xno"; then
+ AC_MSG_ERROR([Your system does not support dlopen])
+fi
AC_SUBST([DLOPEN_LIBS], [$lt_cv_dlopen_libs])
AC_DEFINE([KERNEL_SOLARIS], [1], [True if program is to be compiled for a Solaris kernel])
ac_system="Solaris"
;;
+ *mingw32*)
+ AC_DEFINE([KERNEL_WIN32], [1], [True if program is to be compiled for a Windows kernel])
+ ac_system="Windows"
+ ;;
*)
ac_system="unknown"
;;
AM_CONDITIONAL([BUILD_LINUX], [test "x$ac_system" = "xLinux"])
AM_CONDITIONAL([BUILD_OPENBSD], [test "x$ac_system" = "xOpenBSD"])
AM_CONDITIONAL([BUILD_SOLARIS], [test "x$ac_system" = "xSolaris"])
-
-if test "x$ac_system" = "xLinux"; then
- AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
- if test "x$KERNEL_DIR" = "x"; then
- KERNEL_DIR="/lib/modules/`uname -r`/source"
- fi
- KERNEL_CFLAGS="-I$KERNEL_DIR/include"
- AC_SUBST([KERNEL_CFLAGS])
-fi
+AM_CONDITIONAL([BUILD_WIN32], [test "x$ac_system" = "xWindows"])
if test "x$ac_system" = "xSolaris"; then
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], [1], [Define to enforce POSIX thread semantics under Solaris.])
pthread_np.h \
pwd.h \
regex.h \
+ sys/endian.h \
sys/fs_types.h \
sys/fstyp.h \
sys/ioctl.h \
AC_CHECK_HEADERS([sys/dkstat.h])
if test "x$ac_system" = "xDarwin"; then
AC_CHECK_HEADERS(
- [[ \
+ [ \
mach/mach_init.h \
mach/host_priv.h \
mach/mach_error.h \
IOKit/ps/IOPSKeys.h \
IOKit/IOBSD.h \
IOKit/storage/IOBlockStorageDriver.h
- ]]
+ ]
)
# For the battery plugin
#endif
]]
)
-
+
AC_CHECK_HEADERS([linux/inet_diag.h], [], [],
[[
#if HAVE_SYS_TYPES_H
#endif
]]
)
-
+
AC_CHECK_HEADERS([linux/netdevice.h], [], [],
[[
#if HAVE_SYS_TYPES_H
#endif
]]
)
-
+
# For ethstat module
AC_CHECK_HEADERS([linux/sockios.h],
[have_linux_sockios_h="yes"],
#endif
]]
)
-
+
AC_CHECK_HEADERS([linux/ethtool.h],
[have_linux_ethtool_h="yes"],
[have_linux_ethtool_h="no"],
)
# For ipvs module
- AC_CHECK_HEADERS([linux/ip_vs.h], [have_linux_ip_vs_h="yes"], [have_linux_ip_vs="no"])
- AC_CHECK_HEADERS([net/ip_vs.h], [have_net_ip_vs_h="yes"], [have_net_ip_vs_h="no"])
- AC_CHECK_HEADERS([ip_vs.h], [have_ip_vs_h="yes"], [have_ip_vs_h="no"])
-
- ip_vs_h_needs_kernel_cflags="no"
-
- if test "x$have_linux_ip_vs_h$have_net_ip_vs_h$have_ip_vs_h" = "xnonono" && test -d "$KERNEL_DIR"; then
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $KERNEL_CFLAGS"
-
- AC_MSG_NOTICE([Did not find ip_vs.h. Trying again using headers from $KERNEL_DIR.])
-
- AC_CHECK_HEADERS([linux/ip_vs.h], [have_linux_ip_vs_h="yes"])
- AC_CHECK_HEADERS([net/ip_vs.h], [have_net_ip_vs_h="yes"])
- AC_CHECK_HEADERS([ip_vs.h], [have_ip_vs_h="yes"])
-
- if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"; then
- ip_vs_h_needs_kernel_cflags="yes"
- fi
-
- CFLAGS="$SAVE_CFLAGS"
- fi
+ AC_CHECK_HEADERS_ONCE([linux/ip_vs.h])
# For the email plugin
AC_CHECK_HEADERS([linux/un.h], [], [],
]]
)
# For the turbostat plugin
- AC_CHECK_HEADERS([asm/msr-index.h],
- [have_asm_msrindex_h="yes"],
- [have_asm_msrindex_h="no"]
- )
-
- if test "x$have_asm_msrindex_h" = "xyes"; then
- AC_CACHE_CHECK([whether asm/msr-index.h has MSR_PKG_C10_RESIDENCY],
- [c_cv_have_usable_asm_msrindex_h],
- [
- AC_COMPILE_IFELSE(
- [
- AC_LANG_PROGRAM(
- [[#include<asm/msr-index.h>]],
- [[
- int y = MSR_PKG_C10_RESIDENCY;
- return(y);
- ]]
- )
- ],
- [c_cv_have_usable_asm_msrindex_h="yes"],
- [c_cv_have_usable_asm_msrindex_h="no"],
- )
- ]
- )
- fi
-
AC_CHECK_HEADERS([cpuid.h],
[have_cpuid_h="yes"],
[have_cpuid_h="no (cpuid.h not found)"]
)
-
+
AC_CHECK_HEADERS([sys/capability.h],
[have_capability="yes"],
[have_capability="no (<sys/capability.h> not found)"]
AC_DEFINE([HAVE_CAPABILITY], [1], [Define to 1 if you have cap_get_proc() (-lcap).])
fi
+ # For pcie_errors plugin
+ AC_CHECK_HEADERS([linux/pci_regs.h],
+ [have_pci_regs_h="yes"],
+ [have_pci_regs_h="no (linux/pci_regs.h not found)"]
+ )
+
else
have_linux_raid_md_u_h="no"
have_linux_wireless_h="no"
fi
-AM_CONDITIONAL([IP_VS_H_NEEDS_KERNEL_CFLAGS], [test "x$ip_vs_h_needs_kernel_cflags" = "xyes"])
AM_CONDITIONAL([BUILD_WITH_CAPABILITY], [test "x$have_capability" = "xyes"])
# For the swap module
getaddrinfo \
getgrnam_r \
getnameinfo \
+ getpwnam \
getpwnam_r \
gettimeofday \
if_indextoname \
AC_FUNC_STRERROR_R
SAVE_CFLAGS="$CFLAGS"
-# Emulate behavior of src/Makefile.am
-if test "x$GCC" = "xyes"; then
- CFLAGS="$CFLAGS -Wall -Werror"
+CFLAGS="-Wall -Werror"
+SAVE_LDFLAGS="$LDFLAGS"
+LDFLAGS=""
+if test "x$ac_system" = "xWindows"; then
+ # This is exported from build.sh
+ LDFLAGS="$LDFLAGS -L${GNULIB_DIR}"
fi
AC_CACHE_CHECK([for strtok_r],
fi
CFLAGS="$SAVE_CFLAGS"
+LDFLAGS="$SAVE_LDFLAGS"
if test "x$c_cv_have_strtok_r_reentrant" = "xyes"; then
CFLAGS="$CFLAGS -D_REENTRANT=1"
fi
[
AC_CHECK_LIB([socket], [socket],
[socket_needs_socket="yes"],
- [AC_MSG_ERROR([cannot find socket() in libsocket])]
+ [
+ AC_CHECK_LIB([gnu], [rpl_socket],
+ [socket_needs_gnulib="yes"],
+ [AC_MSG_ERROR([cannot find socket() in libsocket])]
+ )
+ ]
)
]
)
AM_CONDITIONAL([BUILD_WITH_LIBSOCKET], [test "x$socket_needs_socket" = "xyes"])
+AM_CONDITIONAL([BUILD_WITH_GNULIB], [test "x$socket_needs_gnulib" = "xyes"])
clock_gettime_needs_posix4="no"
AC_CHECK_FUNCS([clock_gettime],
&& (c[2] == 0xc0) && (c[3] == 0xc7)
&& (c[4] == 0x43) && (c[5] == 0x2b)
&& (c[6] == 0x1f) && (c[7] == 0x5b))
- return (0);
- return (1);
+ return 0;
+ return 1;
]]
)
],
uint64_t i1;
uint8_t c[8];
double d;
-
+
d = 8.642135e130;
memcpy ((void *) &i0, (void *) &d, 8);
-
+
i1 = endianflip (i0);
memcpy ((void *) c, (void *) &i1, 8);
-
+
if ((c[0] == 0x2f) && (c[1] == 0x25)
&& (c[2] == 0xc0) && (c[3] == 0xc7)
&& (c[4] == 0x43) && (c[5] == 0x2b)
&& (c[6] == 0x1f) && (c[7] == 0x5b))
- return (0);
- return (1);
+ return 0;
+ return 1;
]]
)
],
uint64_t i1;
uint8_t c[8];
double d;
-
+
d = 8.642135e130;
memcpy ((void *) &i0, (void *) &d, 8);
-
+
i1 = intswap (i0);
memcpy ((void *) c, (void *) &i1, 8);
-
+
if ((c[0] == 0x2f) && (c[1] == 0x25)
&& (c[2] == 0xc0) && (c[3] == 0xc7)
&& (c[4] == 0x43) && (c[5] == 0x2b)
&& (c[6] == 0x1f) && (c[7] == 0x5b))
- return (0);
- return (1);
+ return 0;
+ return 1;
]]
)
],
struct mntent *me;
fh = setmntent ("/etc/mtab", "r");
me = getmntent (fh);
- return(me->mnt_passno);
+ return me->mnt_passno;
]]
)
],
int status;
fh = fopen ("/etc/mnttab", "r");
status = getmntent (fh, &mt);
- return(status);
+ return status;
]]
)
],
# libi2c-dev
if test "x$ac_system" = "xLinux"; then
+ with_libi2c_libs=""
+ AC_CHECK_HEADERS([i2c/smbus.h],
+ [with_libi2c_libs="-li2c"]
+ )
AC_CHECK_DECL([i2c_smbus_read_i2c_block_data],
[with_libi2c="yes"],
[with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"],
[[
#include <stdlib.h>
#include <linux/i2c-dev.h>
+ #if HAVE_I2C_SMBUS_H
+ # include <i2c/smbus.h>
+ #endif
]]
)
+ BUILD_WITH_LIBI2C_LIBS="$with_libi2c_libs"
+ AC_SUBST([BUILD_WITH_LIBI2C_LIBS])
else
with_libi2c="no (Linux only)"
fi
AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
+
+AM_CONDITIONAL([BUILD_WITH_LIBCURL], [test "x$with_libcurl" = "xyes"])
# }}}
# --with-libdbi {{{
AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
# }}}
+# --with-libdpdk {{{
+AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk])
+AC_ARG_VAR([LIBDPDK_CFLAGS], [Compiler flags for libdpdk])
+AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk])
+AC_ARG_VAR([LIBDPDK_LIBS], [Libraries to link for libdpdk])
+
+AC_ARG_WITH([libdpdk],
+ [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])],
+ [with_libdpdk="$withval"],
+ [with_libdpdk="yes"]
+)
+
+if test "x$with_libdpdk" != "xno"; then
+ PKG_CHECK_MODULES([DPDK], [libdpdk], [],
+ [AC_MSG_NOTICE([no DPDK pkg-config, using defaults])])
+ if test "x$LIBDPDK_CPPFLAGS" = "x"; then
+ LIBDPDK_CPPFLAGS="-I/usr/include/dpdk"
+ fi
+ if test "x$LIBDPDK_CFLAGS" = "x"; then
+ LIBDPDK_CFLAGS="$DPDK_CFLAGS"
+ LIBDPDK_CPPFLAGS="$LIBDPDK_CPPFLAGS $DPDK_CFLAGS"
+ fi
+ if test "x$LIBDPDK_LIBS" = "x"; then
+ if test "x$DPDK_LIBS" != "x"; then
+ LIBDPDK_LIBS="$DPDK_LIBS"
+ else
+ LIBDPDK_LIBS="-ldpdk"
+ fi
+ fi
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$LIBDPDK_CFLAGS $CFLAGS"
+ AC_CHECK_HEADERS([rte_config.h],
+ [
+ with_libdpdk="yes"
+ AC_PREPROC_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+ #include <rte_version.h>
+ #if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0)
+ #error "required DPDK >= 16.07"
+ #endif
+ ]]
+ )
+ ],
+ [dpdk_keepalive="yes"],
+ [dpdk_keepalive="no (DPDK version < 16.07)"]
+ )
+ ],
+ [with_libdpdk="no (rte_config.h not found)"]
+ )
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ CFLAGS="$SAVE_CFLAGS"
+fi
+
+if test "x$with_libdpdk" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS"
+ AC_CHECK_LIB([dpdk], [rte_eal_init],
+ [with_libdpdk="yes"],
+ [with_libdpdk="no (symbol 'rte_eal_init' not found)"]
+ )
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
+# }}}
+
# --with-libesmtp {{{
AC_ARG_WITH([libesmtp],
[AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
with_libgrpcpp_cppflags="-I$withval/include"
with_libgrpcpp_ldflags="-L$withval/lib"
+ with_libgrpcpp_bin="$withval/bin"
with_libgrpcpp="yes"
fi
if test "x$withval" = "xno"; then
# }}}
AC_ARG_VAR([GRPC_CPP_PLUGIN], [path to the grpc_cpp_plugin binary])
-AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin])
+if test "x$with_libgrpcpp_bin" = "x"; then
+ AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin])
+else
+ AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin], [], "$with_libgrpcpp_bin:$PATH")
+fi
AM_CONDITIONAL([HAVE_GRPC_CPP], [test "x$GRPC_CPP_PLUGIN" != "x"])
# --with-libiptc {{{
AC_SUBST([BUILD_WITH_LIBIPTC_LDFLAGS])
# }}}
-# --with-libdpdk {{{
-AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk])
-AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk])
-
-AC_ARG_WITH([libdpdk], [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])])
-
-if test "x$with_libdpdk" != "xno"; then
- if test "x$LIBDPDK_CPPFLAGS" = "x"; then
- LIBDPDK_CPPFLAGS="-I/usr/include/dpdk"
- fi
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
- AC_CHECK_HEADERS([rte_config.h],
- [
- with_libdpdk="yes"
- AC_COMPILE_IFELSE(
- [
- AC_LANG_PROGRAM(
- [[
- #include <rte_version.h>
- #if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0)
- #error "required DPDK >= 16.07"
- #endif
- ]],
- [[
- return 0;
- ]]
- )
- ],
- [dpdk_keepalive="yes"],
- [dpdk_keepalive="no (DPDK version < 16.07)"]
- )
- ],
- [with_libdpdk="no (rte_config.h not found)"]
- )
- CPPFLAGS="$SAVE_CPPFLAGS"
-fi
-
-if test "x$with_libdpdk" = "xyes"; then
- SAVE_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS"
- AC_CHECK_LIB([dpdk], [rte_eal_init],
- [with_libdpdk="yes"],
- [with_libdpdk="no (symbol 'rte_eal_init' not found)"]
- )
- LDFLAGS="$SAVE_LDFLAGS"
-fi
-
-# }}}
-
# --with-java {{{
with_java_home="$JAVA_HOME"
if test "x$with_java_home" = "x"; then
[with_java="yes"]
)
+AX_COMPARE_VERSION([$am__api_version],[lt],[1.12],
+ [JAVA_TIMESTAMP_FILE="classdist_noinst.stamp"],
+ [JAVA_TIMESTAMP_FILE="classnoinst.stamp"])
if test "x$with_java" = "xyes"; then
if test -d "$with_java_home"; then
AC_MSG_CHECKING([for jni.h])
AC_SUBST([JAVA_CFLAGS])
AC_SUBST([JAVA_LDFLAGS])
AC_SUBST([JAVA_LIBS])
+AC_SUBST([JAVA_TIMESTAMP_FILE])
AM_CONDITIONAL([BUILD_WITH_JAVA], [test "x$with_java" = "xyes"])
# }}}
PKG_CHECK_MODULES([LUA], [lua5.3],
[with_liblua="yes"],
[
- PKG_CHECK_MODULES([LUA], [lua-5.2],
+ PKG_CHECK_MODULES([LUA], [lua53],
[with_liblua="yes"],
[
- PKG_CHECK_MODULES([LUA], [lua5.2],
+ PKG_CHECK_MODULES([LUA], [lua-5.2],
[with_liblua="yes"],
[
- PKG_CHECK_MODULES([LUA], [lua-5.1],
+ PKG_CHECK_MODULES([LUA], [lua5.2],
[with_liblua="yes"],
[
- PKG_CHECK_MODULES([LUA], [lua5.1],
+ PKG_CHECK_MODULES([LUA], [lua52],
[with_liblua="yes"],
- [with_liblua="no (pkg-config cannot find liblua)"]
+ [
+ PKG_CHECK_MODULES([LUA], [lua-5.1],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua5.1],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua51],
+ [with_liblua="yes"],
+ [with_liblua="no (pkg-config cannot find liblua)"]
+ )
+ ]
+ )
+ ]
+ )
+ ]
)
]
)
]],
[[
int retval = TCA_STATS2;
- return (retval);
+ return retval;
]]
)
],
]],
[[
int retval = TCA_STATS;
- return (retval);
+ return retval;
]]
)
],
[[#include <linux/if_link.h>]]
)
+ AC_CHECK_MEMBERS([struct rtnl_link_stats.rx_nohandler],
+ [],
+ [],
+ [[#include <linux/if_link.h>]]
+ )
+
+ AC_CHECK_MEMBERS([struct rtnl_link_stats64.rx_nohandler],
+ [],
+ [],
+ [[#include <linux/if_link.h>]]
+ )
+
AC_CHECK_LIB([mnl], [mnl_nlmsg_get_payload],
[with_libmnl="yes"],
[with_libmnl="no (symbol 'mnl_nlmsg_get_payload' not found)"],
fi
AC_SUBST([BUILD_WITH_LIBMNL_CFLAGS])
AC_SUBST([BUILD_WITH_LIBMNL_LIBS])
+AM_CONDITIONAL([HAVE_LIBMNL], [test "x$with_libmnl" = "xyes"])
# }}}
# --with-libnetapp {{{
# }}}
# --with-libnetsnmp {{{
-AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
-[
- if test "x$withval" = "xno"
- then
- with_libnetsnmp="no"
- else if test "x$withval" = "xyes"
- then
- with_libnetsnmp="yes"
- else
- with_libnetsnmp_cppflags="-I$withval/include"
- with_libnetsnmp_ldflags="-I$withval/lib"
- with_libnetsnmp="yes"
- fi; fi
-],
-[with_libnetsnmp="yes"])
-if test "x$with_libnetsnmp" = "xyes"
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags"
+AC_ARG_WITH([libnetsnmp],
+ [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to libnetsnmp.])],
+ [
+ if test "x$withval" = "xno"; then
+ with_libnetsnmp="no"
+ else if test "x$withval" = "xyes"; then
+ with_libnetsnmp="yes"
+ else
+ with_libnetsnmp_cppflags="-I$withval/include"
+ with_libnetsnmp_ldflags="-I$withval/lib"
+ with_libnetsnmp="yes"
+ fi; fi
+ ],
+ [with_libnetsnmp="yes"]
+)
- AC_CHECK_HEADERS([net-snmp/net-snmp-config.h],
- [with_libnetsnmp="yes"],
- [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"]
- )
+if test "x$with_libnetsnmp" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags"
- CPPFLAGS="$SAVE_CPPFLAGS"
+ AC_CHECK_HEADERS([net-snmp/net-snmp-config.h],
+ [with_libnetsnmp="yes"],
+ [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"]
+ )
+
+ AC_CHECK_HEADERS([net-snmp/net-snmp-includes.h],
+ [with_libnetsnmp="yes"],
+ [with_libnetsnmp="no (net-snmp/net-snmp-includes.h not found)"],
+ [[
+ #if HAVE_NET_SNMP_NET_SNMP_CONFIG_H
+ # include <net-snmp/net-snmp-config.h>
+ #endif
+ ]]
+ )
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
-if test "x$with_libnetsnmp" = "xyes"
-then
- SAVE_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
- AC_CHECK_LIB(netsnmp, init_snmp,
- [with_libnetsnmp="yes"],
- [with_libnetsnmp="no (libnetsnmp not found)"],
- [$with_snmp_libs])
+if test "x$with_libnetsnmp" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
- LDFLAGS="$SAVE_LDFLAGS"
+ AC_CHECK_LIB([netsnmp], [init_snmp],
+ [with_libnetsnmp="yes"],
+ [with_libnetsnmp="no (libnetsnmp not found)"]
+ )
+
+ LDFLAGS="$SAVE_LDFLAGS"
fi
-if test "x$with_libnetsnmp" = "xyes"
-then
- BUILD_WITH_LIBNETSNMP_CPPFLAGS="$with_libnetsnmp_cppflags"
- BUILD_WITH_LIBNETSNMP_LDFLAGS="$with_libnetsnmp_ldflags"
- BUILD_WITH_LIBNETSNMP_LIBS="-lnetsnmp"
+
+if test "x$with_libnetsnmp" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
+
+ AC_CHECK_LIB([netsnmp], [netsnmp_get_version],
+ [with_libnetsnmp="yes"],
+ [with_libnetsnmp="no (couldn't get libnetsnmp version)"]
+ )
+
+ LDFLAGS="$SAVE_LDFLAGS"
fi
-AC_SUBST(BUILD_WITH_LIBNETSNMP_CPPFLAGS)
-AC_SUBST(BUILD_WITH_LIBNETSNMP_LDFLAGS)
-AC_SUBST(BUILD_WITH_LIBNETSNMP_LIBS)
+
+if test "x$with_libnetsnmp" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags -Wall -Werror"
+ LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
+ LIBS="$LIBS -lnetsnmp"
+
+ AC_CACHE_CHECK([whether netsnmp library has old API],
+ [c_cv_have_netsnmp_old_api],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+ #include <net-snmp/net-snmp-config.h>
+ #include <net-snmp/net-snmp-includes.h>
+ ]],
+ [[
+ netsnmp_variable_list *key = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);;
+ int val;
+ u_char type = ASN_INTEGER;
+ snmp_set_var_value(key, &val, sizeof(val));
+ snmp_set_var_typed_value(key, type, &val, sizeof(val));
+ return 0;
+ ]]
+ )
+ ],
+ [c_cv_have_netsnmp_old_api="no"],
+ [c_cv_have_netsnmp_old_api="yes"]
+ )
+ ]
+ )
+
+ if test "x$c_cv_have_netsnmp_old_api" = "xyes"; then
+ AC_DEFINE([HAVE_NETSNMP_OLD_API], [1],
+ ["Define 1 if you have old netsnmp API]")
+ fi
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
+fi
+
+if test "x$with_libnetsnmp" = "xyes"; then
+ BUILD_WITH_LIBNETSNMP_CPPFLAGS="$with_libnetsnmp_cppflags"
+ BUILD_WITH_LIBNETSNMP_LDFLAGS="$with_libnetsnmp_ldflags"
+ BUILD_WITH_LIBNETSNMP_LIBS="-lnetsnmp"
+fi
+
+AC_SUBST([BUILD_WITH_LIBNETSNMP_CPPFLAGS])
+AC_SUBST([BUILD_WITH_LIBNETSNMP_LDFLAGS])
+AC_SUBST([BUILD_WITH_LIBNETSNMP_LIBS])
+# }}}
+
+# --with-libnetsnmpagent {{{
+AC_ARG_WITH([libnetsnmpagent],
+ [AS_HELP_STRING([--with-libnetsnmpagent@<:@=PREFIX@:>@], [Path to libnetsnmpagent.])],
+ [
+ if test "x$withval" = "xno"; then
+ with_libnetsnmpagent="no"
+ else if test "x$withval" = "xyes"; then
+ with_libnetsnmpagent="yes"
+ else
+ with_libnetsnmpagent_cppflags="-I$withval/include"
+ with_libnetsnmpagent_ldflags="-I$withval/lib"
+ with_libnetsnmpagent="yes"
+ fi; fi
+ ],
+ [with_libnetsnmpagent="yes"]
+)
+
+if test "x$with_libnetsnmpagent" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libnetsnmpagent_cppflags"
+
+ AC_CHECK_HEADERS([net-snmp/agent/net-snmp-agent-includes.h],
+ [],
+ [with_libnetsnmpagent="no (net-snmp/agent/net-snmp-agent-includes.h not found)"],
+ [[
+ #if HAVE_NET_SNMP_NET_SNMP_CONFIG_H
+ # include <net-snmp/net-snmp-config.h>
+ #endif
+ #if HAVE_NET_SNMP_NET_SNMP_INCLUDES_H
+ # include <net-snmp/net-snmp-includes.h>
+ #endif
+ ]]
+ )
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+
+if test "x$with_libnetsnmpagent" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $with_libnetsnmpagent_ldflags"
+
+ # older versions of libnetsnmpagent fail to link
+ # against the helpers library, so do that explicitly
+ AC_CHECK_LIB([netsnmphelpers], [netsnmp_init_helpers],
+ [libnetsnmphelpers="-lnetsnmphelpers"],
+ [libnetsnmphelpers=""]
+ )
+
+ AC_CHECK_LIB([netsnmpagent], [init_agent],
+ [with_libnetsnmpagent="yes"],
+ [with_libnetsnmpagent="no (libnetsnmpagent not found)"],
+ [$libnetsnmphelpers]
+ )
+
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
+if test "x$with_libnetsnmpagent" = "xyes"; then
+ BUILD_WITH_LIBNETSNMPAGENT_LIBS="-lnetsnmpagent $libnetsnmphelpers"
+fi
+
+AC_SUBST([BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS])
+AC_SUBST([BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS])
+AC_SUBST([BUILD_WITH_LIBNETSNMPAGENT_LIBS])
# }}}
# --with-liboping {{{
[[#include <pcap.h>]],
[[
int val = PCAP_ERROR_IFACE_NOT_UP;
- return(val);
+ return val;
]]
)
],
# }}}
# --with-libpqos {{{
-with_libpqos_cppflags=""
-with_libpqos_ldflags=""
-AC_ARG_WITH(libpqos, [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],
-[
- if test "x$withval" != "xno" && test "x$withval" != "xyes"
- then
- with_libpqos_cppflags="-I$withval/include"
- with_libpqos_ldflags="-L$withval/lib"
- with_libpqos="yes"
- else
- with_libpqos="$withval"
- fi
-],
-[
- with_libpqos="yes"
-])
-if test "x$with_libpqos" = "xyes"
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
+AC_ARG_WITH([libpqos],
+ [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],
+ [
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
+ with_libpqos_cppflags="-I$withval/include"
+ with_libpqos_ldflags="-L$withval/lib"
+ with_libpqos="yes"
+ else
+ with_libpqos="$withval"
+ fi
+ ],
+ [with_libpqos="yes"]
+)
- AC_CHECK_HEADERS(pqos.h, [with_libpqos="yes"], [with_libpqos="no (pqos.h not found)"])
+if test "x$with_libpqos" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
- CPPFLAGS="$SAVE_CPPFLAGS"
+ AC_CHECK_HEADERS([pqos.h],
+ [with_libpqos="yes"],
+ [with_libpqos="no (pqos.h not found)"]
+ )
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
-if test "x$with_libpqos" = "xyes"
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
- LDFLAGS="$LDFLAGS $with_libpqos_ldflags"
- AC_CHECK_LIB(pqos, pqos_init, [with_libpqos="yes"], [with_libpqos="no (Can't find libpqos)"])
+if test "x$with_libpqos" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $with_libpqos_ldflags"
- CPPFLAGS="$SAVE_CPPFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ AC_CHECK_LIB([pqos], [pqos_init],
+ [with_libpqos="yes"],
+ [with_libpqos="no (Can't find libpqos)"]
+ )
+
+ LDFLAGS="$SAVE_LDFLAGS"
fi
-if test "x$with_libpqos" = "xyes"
-then
+
+if test "x$with_libpqos" = "xyes"; then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
- AC_RUN_IFELSE([AC_LANG_PROGRAM(
- [[#include <pqos.h>]],
- [[return !(PQOS_VERSION >= 106)]])],
- [with_libpqos="yes"], [with_libpqos="no (pqos library version 1.06 or higher is required)"])
+ AC_PREPROC_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+ #include <pqos.h>
+ #if PQOS_VERSION < 106
+ #error "required PQOS version >= 1.06"
+ #endif
+ ]]
+ )
+ ],
+ [with_libpqos="yes"],
+ [with_libpqos="no (pqos library version 1.06 or higher is required)"]
+ )
+
CPPFLAGS="$SAVE_CPPFLAGS"
fi
-if test "x$with_libpqos" = "xyes"
-then
- BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags"
- BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags"
- BUILD_WITH_LIBPQOS_LIBS="-lpqos"
- AC_SUBST(BUILD_WITH_LIBPQOS_CPPFLAGS)
- AC_SUBST(BUILD_WITH_LIBPQOS_LDFLAGS)
- AC_SUBST(BUILD_WITH_LIBPQOS_LIBS)
+
+if test "x$with_libpqos" = "xyes"; then
+ BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags"
+ BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags"
+ BUILD_WITH_LIBPQOS_LIBS="-lpqos"
fi
+
+AC_SUBST([BUILD_WITH_LIBPQOS_CPPFLAGS])
+AC_SUBST([BUILD_WITH_LIBPQOS_LDFLAGS])
+AC_SUBST([BUILD_WITH_LIBPQOS_LIBS])
+# }}}
+
+# --with-libjevents {{{
+with_libjevents_cppflags=""
+with_libjevents_ldflags=""
+AC_ARG_WITH([libjevents],
+ [AS_HELP_STRING([--with-libjevents@<:@=PREFIX@:>@], [Path to libjevents.])],
+ [
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
+ with_libjevents_cppflags="-I$withval/include"
+ with_libjevents_ldflags="-L$withval/lib"
+ with_libjevents="yes"
+ else
+ with_libjevents="$withval"
+ fi
+ ],
+ [with_libjevents="yes"]
+)
+
+if test "x$with_libjevents" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libjevents_cppflags"
+
+ AC_CHECK_HEADERS([jevents.h], [with_libjevents="yes"], [with_libjevents="no (jevents.h not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+if test "x$with_libjevents" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $with_libjevents_ldflags"
+
+ AC_CHECK_LIB([jevents], [json_events], [with_libjevents="yes"], [with_libjevents="no (Can't find libjevents)"])
+
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+if test "x$with_libjevents" = "xyes"; then
+ BUILD_WITH_LIBJEVENTS_CPPFLAGS="$with_libjevents_cppflags"
+ BUILD_WITH_LIBJEVENTS_LDFLAGS="$with_libjevents_ldflags"
+ BUILD_WITH_LIBJEVENTS_LIBS="-ljevents"
+fi
+AC_SUBST([BUILD_WITH_LIBJEVENTS_CPPFLAGS])
+AC_SUBST([BUILD_WITH_LIBJEVENTS_LDFLAGS])
+AC_SUBST([BUILD_WITH_LIBJEVENTS_LIBS])
# }}}
# --with-libprotobuf {{{
fi
# }}} --with-libpython
+# --with-libqpid_proton {{{
+AC_ARG_WITH([libqpid_proton],
+ [AS_HELP_STRING([--with-libqpid_proton@<:@=PREFIX@:>@], [Path to libqpid_proton.])],
+ [
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
+ with_libqpid_proton_cppflags="-I$withval/include"
+ with_libqpid_proton_ldflags="-L$withval/lib"
+ with_libqpid_proton="yes"
+ else
+ with_libqpid_proton="$withval"
+ fi
+ ],
+ [with_libqpid_proton="yes"]
+)
+
+if test "x$with_libqpid_proton" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libqpid_proton_cppflags"
+
+ AC_CHECK_HEADERS([proton/proactor.h],
+ [with_libqpid_proton="yes"],
+ [with_libqpid_proton="no (proton/proactor.h not found)"]
+ )
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+
+if test "x$with_libqpid_proton" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $with_libqpid_proton_ldflags"
+
+ AC_CHECK_LIB([qpid-proton], [pn_connection],
+ [with_libqpid_proton="yes"],
+ [with_libqpid_proton="no (Symbol 'pn_connection' not found)"])
+
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
+if test "x$with_libqpid_proton" = "xyes"; then
+ BUILD_WITH_LIBQPIDPROTON_CPPFLAGS="$with_libqpid_proton_cppflags"
+ BUILD_WITH_LIBQPIDPROTON_LDFLAGS="$with_libqpid_proton_ldflags"
+ BUILD_WITH_LIBQPIDPROTON_LIBS="-lqpid-proton"
+fi
+
+AC_SUBST(BUILD_WITH_LIBQPIDPROTON_CPPFLAGS)
+AC_SUBST(BUILD_WITH_LIBQPIDPROTON_LDFLAGS)
+AC_SUBST(BUILD_WITH_LIBQPIDPROTON_LIBS)
+
+# }}}
+
# --with-librabbitmq {{{
AC_ARG_WITH([librabbitmq],
[AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])],
)
# }}}
+# --with-libssl {{{
+with_libssl_cflags=""
+with_libssl_ldflags=""
+AC_ARG_WITH(libssl, [AS_HELP_STRING([--with-libssl@<:@=PREFIX@:>@], [Path to libssl.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ with_libssl_cppflags="-I$withval/include"
+ with_libssl_ldflags="-L$withval/lib"
+ with_libssl="yes"
+ else
+ with_libssl="$withval"
+ fi
+],
+[
+ with_libssl="yes"
+])
+if test "x$with_libssl" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libssl_cppflags"
+
+ AC_CHECK_HEADERS(openssl/sha.h openssl/blowfish.h openssl/rand.h,
+ [with_libssl="yes"],
+ [with_libssl="no (ssl header not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+if test "x$with_libssl" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libssl_cppflags"
+ LDFLAGS="$LDFLAGS $with_libssl_ldflags"
+
+ AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [with_libssl="yes"], [with_libssl="no (Symbol 'SSL_library_init' not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+if test "x$with_libssl" = "xyes"
+then
+ BUILD_WITH_LIBSSL_CFLAGS="$with_libssl_cflags"
+ BUILD_WITH_LIBSSL_LDFLAGS="$with_libssl_ldflags"
+ BUILD_WITH_LIBSSL_LIBS="-lssl -lcrypto"
+ AC_SUBST(BUILD_WITH_LIBSSL_CFLAGS)
+ AC_SUBST(BUILD_WITH_LIBSSL_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBSSL_LIBS)
+ AC_DEFINE(HAVE_LIBSSL, 1, [Define if libssl is present and usable.])
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBSSL, test "x$with_libssl" = "xyes")
+# }}}
+
# --with-libstatgrab {{{
AC_ARG_WITH([libstatgrab],
[AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
[AC_DEFINE([HAVE_UPSCLI_INIT], [1], [Define when upscli_init() (since version 2-7) is available.])]
)
+ AC_CHECK_LIB([upsclient], [upscli_tryconnect],
+ [AC_DEFINE([HAVE_UPSCLI_TRYCONNECT], [1], [Define when upscli_tryconnect() (since version 2.6.2) is available.])]
+ )
+
LDFLAGS="$SAVE_LDFLAGS"
fi
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
- AC_CHECK_HEADERS([vapi/vsc.h],
- [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
- [
- AC_CHECK_HEADERS([vsc.h],
- [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support]) ],
- [
- AC_CHECK_HEADERS([varnishapi.h],
- [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
- [with_libvarnish="no (found none of the varnish header files)"]
- )
- ]
- )
- ]
- )
+ $PKG_CONFIG --atleast-version=5.2 'varnishapi' 2>/dev/null
+ if test $? -eq 0; then
+ AC_DEFINE([HAVE_VARNISH_V5], [1], [Varnish 5 API support])
+ else
+ AC_CHECK_HEADERS([vapi/vsc.h],
+ [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
+ [
+ AC_CHECK_HEADERS([vsc.h],
+ [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support]) ],
+ [
+ AC_CHECK_HEADERS([varnishapi.h],
+ [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
+ [with_libvarnish="no (found none of the varnish header files)"]
+ )
+ ]
+ )
+ ]
+ )
+ fi
CPPFLAGS="$SAVE_CPPFLAGS"
fi
AC_SUBST([BUILD_WITH_LIBVARNISH_LIBS])
# }}}
-# pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
-$PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
-if test $? -eq 0; then
- with_libxml2="yes"
-else
- with_libxml2="no (pkg-config doesn't know libxml-2.0)"
-fi
-
-$PKG_CONFIG --exists libvirt 2>/dev/null
-if test $? = 0; then
- with_libvirt="yes"
-else
- with_libvirt="no (pkg-config doesn't know libvirt)"
-fi
-
-if test "x$with_libxml2" = "xyes"; then
- with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
- if test $? -ne 0; then
- with_libxml2="no"
- fi
-
- with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
- if test $? -ne 0; then
- with_libxml2="no"
- fi
-fi
+# --with-libxml2 {{{
+AC_ARG_WITH(libxml2,
+ [AS_HELP_STRING([--with-libxml2@<:@=PREFIX@:>@], [Path to libxml2.])],
+ [
+ if test "x$withval" = "xno"; then
+ with_libxml2="no"
+ else if test "x$withval" = "xyes"; then
+ $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
+ if test $? -eq 0; then
+ with_libxml2="yes"
+ with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
+ with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
+ else
+ with_libxml2="no (pkg-config doesn't know libxml-2.0)"
+ fi
+ else
+ with_libxml2="yes"
+ with_libxml2_cflags="-I$withval/include"
+ with_libxml2_ldflags="-L$withval/lib"
+ fi; fi
+ ],
+ dnl if no argument --with-libxml2 was passed, find the library locations
+ dnl with pkg-config just like above, when --with-libxml2=yes.
+ [
+ with_libxml2="yes"
+ $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
+ if test $? -eq 0; then
+ with_libxml2="yes"
+ with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
+ with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
+ else
+ with_libxml2="no (pkg-config doesn't know libxml-2.0)"
+ fi
+ ]
+)
if test "x$with_libxml2" = "xyes"; then
SAVE_CPPFLAGS="$CPPFLAGS"
AC_SUBST([BUILD_WITH_LIBXML2_CFLAGS])
AC_SUBST([BUILD_WITH_LIBXML2_LIBS])
+# }}}
+
+# pkg-config --exists libvirt {{{
+$PKG_CONFIG --exists libvirt 2>/dev/null
+if test $? = 0; then
+ with_libvirt="yes"
+else
+ with_libvirt="no (pkg-config doesn't know libvirt)"
+fi
if test "x$with_libvirt" = "xyes"; then
with_libvirt_cflags="`$PKG_CONFIG --cflags libvirt`"
plugin_gps="no"
plugin_grpc="no"
plugin_hugepages="no"
+plugin_intel_pmu="no"
plugin_intel_rdt="no"
plugin_interface="no"
plugin_ipc="no"
plugin_numa="no"
plugin_ovs_events="no"
plugin_ovs_stats="no"
+plugin_pcie_errors="no"
plugin_perl="no"
plugin_pinba="no"
plugin_processes="no"
plugin_serial="no"
plugin_smart="no"
plugin_swap="no"
+plugin_synproxy="no"
plugin_tape="no"
plugin_tcpconns="no"
plugin_ted="no"
plugin_protocols="yes"
plugin_serial="yes"
plugin_swap="yes"
+ plugin_synproxy="yes"
plugin_tcpconns="yes"
plugin_thermal="yes"
plugin_uptime="yes"
plugin_wireless="yes"
plugin_zfs_arc="yes"
- if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"; then
+ if test "x$ac_cv_header_linux_ip_vs_h" = "xyes"; then
plugin_ipvs="yes"
fi
- if test "x$c_cv_have_usable_asm_msrindex_h" = "xyes" && test "x$have_cpuid_h" = "xyes"; then
+ if test "x$have_cpuid_h" = "xyes"; then
plugin_turbostat="yes"
fi
-
+
if test "x$c_cv_have_clock_boottime_monotonic" = "xyes"; then
plugin_cpusleep="yes"
fi
plugin_ovs_events="yes"
plugin_ovs_stats="yes"
fi
+
+ if test "x$have_pci_regs_h" = "xyes"; then
+ plugin_pcie_errors="yes"
+ fi
fi
if test "x$ac_system" = "xOpenBSD"; then
if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"; then
plugin_curl_json="yes"
+ plugin_write_gcm="yes"
fi
if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"; then
plugin_gps="yes"
fi
-if test "x$with_libgrpcpp" = "xyes" && test "x$with_libprotobuf" = "xyes" && test "x$have_protoc3" = "xyes" && test "x$GRPC_CPP_PLUGIN" != "x"; then
- plugin_grpc="yes"
+plugin_grpc="yes"
+if test "x$GRPC_CPP_PLUGIN" = "x"; then
+ plugin_grpc="no (grpc_cpp_plugin not found)"
+fi
+if test "x$have_protoc3" != "xyes"; then
+ plugin_grpc="no (protoc3 not found)"
+fi
+if test "x$with_libprotobuf" != "xyes"; then
+ plugin_grpc="no (libprotobuf not found)"
+fi
+if test "x$with_libgrpcpp" != "xyes"; then
+ plugin_grpc="no (libgrpc++ not found)"
fi
if test "x$have_getifaddrs" = "xyes"; then
plugin_xencpu="yes"
fi
-if test "x$with_libdpdk" = "xyes"
-then
+if test "x$with_libdpdk" = "xyes"; then
plugin_dpdkevents="$dpdk_keepalive"
plugin_dpdkstat="yes"
fi
AC_PLUGIN([aggregation], [yes], [Aggregation plugin])
AC_PLUGIN([amqp], [$with_librabbitmq], [AMQP output plugin])
+AC_PLUGIN([amqp1], [$with_libqpid_proton], [AMQP 1.0 output plugin])
AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple hardware sensors])
AC_PLUGIN([grpc], [$plugin_grpc], [gRPC plugin])
AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
AC_PLUGIN([hugepages], [$plugin_hugepages], [Hugepages statistics])
+AC_PLUGIN([intel_pmu], [$with_libjevents], [Intel performance monitor plugin])
AC_PLUGIN([intel_rdt], [$with_libpqos], [Intel RDT monitor plugin])
AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
AC_PLUGIN([ipc], [$plugin_ipc], [IPC statistics])
AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
AC_PLUGIN([ovs_events], [$plugin_ovs_events], [OVS events plugin])
AC_PLUGIN([ovs_stats], [$plugin_ovs_stats], [OVS statistics plugin])
+AC_PLUGIN([pcie_errors], [$plugin_pcie_errors], [PCIe errors plugin])
AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
AC_PLUGIN([pf], [$have_net_pfvar_h], [BSD packet filter (PF) statistics])
# FIXME: Check for libevent, too.
AC_PLUGIN([sigrok], [$with_libsigrok], [sigrok acquisition sources])
AC_PLUGIN([smart], [$plugin_smart], [SMART statistics])
AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
+AC_PLUGIN([snmp_agent], [$with_libnetsnmpagent], [SNMP agent plugin])
AC_PLUGIN([statsd], [yes], [StatsD plugin])
AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
+AC_PLUGIN([synproxy], [$plugin_synproxy], [Synproxy stats plugin])
AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
AC_PLUGIN([table], [yes], [Parsing of tabular data])
AC_PLUGIN([tail], [yes], [Parsing of logfiles])
AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin])
AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
+AC_PLUGIN([write_gcm], [$plugin_write_gcm], [Google cloud monitoring output plugin])
AC_PLUGIN([write_kafka], [$with_librdkafka], [Kafka output plugin])
AC_PLUGIN([write_log], [yes], [Log output plugin])
AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin])
AC_SUBST([LOAD_PLUGIN_LOGFILE])
AC_SUBST([LOAD_PLUGIN_LOG_LOGSTASH])
-if test "x$enable_debug" = "xyes"
-then
+if test "x$enable_debug" = "xyes"; then
DEFAULT_LOG_LEVEL="debug"
else
DEFAULT_LOG_LEVEL="info"
AC_SUBST([LOAD_PLUGIN_NETWORK])
AC_SUBST([LOAD_PLUGIN_CSV])
-dnl ip_vs.h
-if test "x$ac_system" = "xLinux" && test "x$have_linux_ip_vs_h" = "xno" && "x$have_net_ip_vs_h" = "xno" && "x$have_ip_vs_h" = "xno"; then
- enable_ipvs="$enable_ipvs (ip_vs.h not found)"
-fi
-
-if test "x$ip_vs_h_needs_kernel_cflags" = "xyes"; then
- enable_ipvs="$enable_ipvs (needs $KERNEL_CFLAGS)"
-fi
-
dnl Perl bindings
PERL_BINDINGS_OPTIONS="PREFIX=${prefix}"
AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
[
- if test "x$withval" != "xno" && test "x$withval" != "xyes"
- then
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
PERL_BINDINGS_OPTIONS="$withval"
with_perl_bindings="yes"
else
fi
],
[
- if test "x$PERL" != "x"
- then
+ if test "x$PERL" != "x"; then
with_perl_bindings="yes"
else
with_perl_bindings="no (no perl interpreter found)"
fi
])
-if test "x$with_perl_bindings" = "xyes"
-then
- AC_MSG_CHECKING([for the ExtUtils::MakeMaker module])
- if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- with_perl_bindings="no (ExtUtils::MakeMaker not found)"
- fi
+if test "x$with_perl_bindings" = "xyes"; then
+ AC_MSG_CHECKING([for the ExtUtils::MakeMaker module])
+ if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ with_perl_bindings="no (ExtUtils::MakeMaker not found)"
+ fi
fi
-if test "x$with_perl_bindings" = "xyes"
-then
+if test "x$with_perl_bindings" = "xyes"; then
PERL_BINDINGS="perl"
else
PERL_BINDINGS=""
AC_MSG_RESULT([Configuration:])
AC_MSG_RESULT([ Build:])
AC_MSG_RESULT([ Platform . . . . . . $ac_system])
+AC_MSG_RESULT([ Compiler vendor . . . $ax_cv_c_compiler_vendor])
AC_MSG_RESULT([ CC . . . . . . . . . $CC])
AC_MSG_RESULT([ CFLAGS . . . . . . . $AM_CFLAGS $CFLAGS])
AC_MSG_RESULT([ CXXFLAGS . . . . . . $AM_CXXFLAGS $CXXFLAGS])
AC_MSG_RESULT([ libi2c-dev . . . . . $with_libi2c])
AC_MSG_RESULT([ libiokit . . . . . . $with_libiokit])
AC_MSG_RESULT([ libiptc . . . . . . . $with_libiptc])
+AC_MSG_RESULT([ libjevents . . . . . $with_libjevents])
AC_MSG_RESULT([ libjvm . . . . . . . $with_java])
AC_MSG_RESULT([ libkstat . . . . . . $with_kstat])
AC_MSG_RESULT([ libkvm . . . . . . . $with_libkvm])
AC_MSG_RESULT([ libmysql . . . . . . $with_libmysql])
AC_MSG_RESULT([ libnetapp . . . . . . $with_libnetapp])
AC_MSG_RESULT([ libnetsnmp . . . . . $with_libnetsnmp])
+AC_MSG_RESULT([ libnetsnmpagent . . . $with_libnetsnmpagent])
AC_MSG_RESULT([ libnotify . . . . . . $with_libnotify])
AC_MSG_RESULT([ libopenipmi . . . . . $with_libopenipmipthread])
AC_MSG_RESULT([ liboping . . . . . . $with_liboping])
AC_MSG_RESULT([ libprotobuf . . . . . $with_libprotobuf])
AC_MSG_RESULT([ libprotobuf-c . . . . $with_libprotobuf_c])
AC_MSG_RESULT([ libpython . . . . . . $with_libpython])
+AC_MSG_RESULT([ libqpid-proton . . . $with_libqpid_proton])
AC_MSG_RESULT([ librabbitmq . . . . . $with_librabbitmq])
AC_MSG_RESULT([ libriemann-client . . $with_libriemann_client])
AC_MSG_RESULT([ librdkafka . . . . . $with_librdkafka])
AC_MSG_RESULT([ librrd . . . . . . . $with_librrd])
AC_MSG_RESULT([ libsensors . . . . . $with_libsensors])
AC_MSG_RESULT([ libsigrok . . . . . $with_libsigrok])
+AC_MSG_RESULT([ libssl . . . . . . . $with_libssl])
AC_MSG_RESULT([ libstatgrab . . . . . $with_libstatgrab])
AC_MSG_RESULT([ libtokyotyrant . . . $with_libtokyotyrant])
AC_MSG_RESULT([ libudev . . . . . . . $with_libudev])
AC_MSG_RESULT([ Modules:])
AC_MSG_RESULT([ aggregation . . . . . $enable_aggregation])
AC_MSG_RESULT([ amqp . . . . . . . $enable_amqp])
+AC_MSG_RESULT([ amqp1 . . . . . . . $enable_amqp1])
AC_MSG_RESULT([ apache . . . . . . . $enable_apache])
AC_MSG_RESULT([ apcups . . . . . . . $enable_apcups])
AC_MSG_RESULT([ apple_sensors . . . . $enable_apple_sensors])
AC_MSG_RESULT([ grpc . . . . . . . . $enable_grpc])
AC_MSG_RESULT([ hddtemp . . . . . . . $enable_hddtemp])
AC_MSG_RESULT([ hugepages . . . . . . $enable_hugepages])
+AC_MSG_RESULT([ intel_pmu . . . . . . $enable_intel_pmu])
AC_MSG_RESULT([ intel_rdt . . . . . . $enable_intel_rdt])
AC_MSG_RESULT([ interface . . . . . . $enable_interface])
AC_MSG_RESULT([ ipc . . . . . . . . . $enable_ipc])
AC_MSG_RESULT([ oracle . . . . . . . $enable_oracle])
AC_MSG_RESULT([ ovs_events . . . . . $enable_ovs_events])
AC_MSG_RESULT([ ovs_stats . . . . . . $enable_ovs_stats])
+AC_MSG_RESULT([ pcie_errors . . . . . $enable_pcie_errors])
AC_MSG_RESULT([ perl . . . . . . . . $enable_perl])
AC_MSG_RESULT([ pf . . . . . . . . . $enable_pf])
AC_MSG_RESULT([ pinba . . . . . . . . $enable_pinba])
AC_MSG_RESULT([ sigrok . . . . . . . $enable_sigrok])
AC_MSG_RESULT([ smart . . . . . . . . $enable_smart])
AC_MSG_RESULT([ snmp . . . . . . . . $enable_snmp])
+AC_MSG_RESULT([ snmp_agent . . . . . $enable_snmp_agent])
AC_MSG_RESULT([ statsd . . . . . . . $enable_statsd])
AC_MSG_RESULT([ swap . . . . . . . . $enable_swap])
+AC_MSG_RESULT([ synproxy . . . . . . $enable_synproxy])
AC_MSG_RESULT([ syslog . . . . . . . $enable_syslog])
AC_MSG_RESULT([ table . . . . . . . . $enable_table])
AC_MSG_RESULT([ tail_csv . . . . . . $enable_tail_csv])
AC_MSG_RESULT([ wireless . . . . . . $enable_wireless])
AC_MSG_RESULT([ write_graphite . . . $enable_write_graphite])
AC_MSG_RESULT([ write_http . . . . . $enable_write_http])
+AC_MSG_RESULT([ write_gcm . . . . . . $enable_write_gcm])
AC_MSG_RESULT([ write_kafka . . . . . $enable_write_kafka])
AC_MSG_RESULT([ write_log . . . . . . $enable_write_log])
AC_MSG_RESULT([ write_mongodb . . . . $enable_write_mongodb])
fi
# vim: set fdm=marker sw=2 sts=2 ts=2 et :
+