From 4c882d7216bb12d5821a108b9f11544a075c7024 Mon Sep 17 00:00:00 2001 From: David Timber Date: Tue, 20 Oct 2020 07:28:50 +1030 Subject: Impl hostinfod and extras ... * Use EOVERFLOW instead of E2BIG * Add prne_iobuf_zero() * Fix format check logic error in prne_htbt_ser_msg_head() * Add prne_dup_str() * Add prne_timespec_ms() --- configure.ac | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b64550f..789656b 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,17 @@ esac], [static=false]) AM_CONDITIONAL(STATIC_RT, test x"$static" = x"true") +AC_ARG_ENABLE(hostinfod, +AS_HELP_STRING([--enable-hostinfod], + [build statically linked executables. Default: no]), +[case "${enableval}" in + yes) hostinfod=true ;; + no) hostinfod=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-hostinfod]) ;; +esac], +[hostinfod=false]) +AM_CONDITIONAL(BUILD_HOSTINFOD, test x"$hostinfod" = x"true") + AC_ARG_VAR( [PRNE_VERBOSE], @@ -77,6 +88,28 @@ AC_CHECK_LIB( [pth_init], [], [AC_MSG_ERROR([pthsem not found])]) +AS_IF([test x"$hostinfod" = x"true"], [ + AC_CHECK_LIB([yaml], + [yaml_parser_initialize], + [], + [AC_MSG_ERROR([yaml not found])]) + AC_CHECK_LIB([mariadb], + [mysql_init], + [], + [AC_MSG_ERROR([mariadb not found])]) + + AC_MSG_CHECKING([mbedtls threading support]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #if !defined(MBEDTLS_THREADING_C) + #error "mbedtls must be compiled with threading support" + #endif + ]])], + [ AC_MSG_RESULT([yes]) ], + [ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([mbedtls not compiled with threading support])]) +]) AC_CHECK_PROG(TOOL_XXD, [xxd], [yes]) AS_IF([test x"$TOOL_XXD" != x"yes"], [AC_MSG_ERROR([xxd not found])]) -- cgit