X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=b32af6e25d8b5c548ea30e052911432a0e29ec37;hb=ff8c240420410198739a86f89feeff8d5c6184b3;hp=95caefff584c728fdbc7268988c9203e0c1e2d8a;hpb=063e81d76677a3b52c5d8a1fbfbdf2bf87a75cee;p=collectd.git diff --git a/configure.ac b/configure.ac index 95caefff..b32af6e2 100644 --- a/configure.ac +++ b/configure.ac @@ -2304,6 +2304,8 @@ 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 {{{ @@ -5234,6 +5236,59 @@ PKG_CHECK_MODULES([LIBSIGROK], [libsigrok < 0.4], ) # }}} +# --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.])], @@ -6506,6 +6561,7 @@ fi 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 @@ -6840,6 +6896,7 @@ AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer stati 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]) @@ -7096,6 +7153,7 @@ AC_MSG_RESULT([ librouteros . . . . . $with_librouteros]) 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]) @@ -7261,6 +7319,7 @@ AC_MSG_RESULT([ vserver . . . . . . . $enable_vserver]) 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])