diff options
author | David Timber <mieabby@gmail.com> | 2020-10-20 07:28:50 +1030 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-10-20 07:28:50 +1030 |
commit | 4c882d7216bb12d5821a108b9f11544a075c7024 (patch) | |
tree | 84fba1d9decbab537a2ddb1931ef89f219438274 /configure.ac | |
parent | 5dbfcb1f66b681fbb6cdec8836efe2c2d84f957e (diff) |
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()
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 33 insertions, 0 deletions
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 <mbedtls/config.h> + #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])]) |