Code

Merge remote-tracking branch 'github/pr/2276'
authorFlorian Forster <octo@collectd.org>
Wed, 19 Jul 2017 05:54:49 +0000 (07:54 +0200)
committerFlorian Forster <octo@collectd.org>
Wed, 19 Jul 2017 05:54:49 +0000 (07:54 +0200)
1  2 
Makefile.am
README
configure.ac
contrib/systemd.collectd.service
src/collectd.conf.in
src/collectd.conf.pod

diff --cc Makefile.am
Simple merge
diff --cc README
Simple merge
diff --cc configure.ac
index 35b139c45ba21326cd0b2c9473d683f710a55f2e,f918de44d34d75984d322cb16114c297288a793b..62bea50e6c125d5a60d87d032641747a6123788e
@@@ -4359,76 -4306,107 +4359,119 @@@ AC_SUBST([BUILD_WITH_LIBPQ_LIBS]
  # }}}
  
  # --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 {{{
  with_libprotobuf_cppflags=""
  with_libprotobuf_ldflags=""
Simple merge
Simple merge
Simple merge