From f0beb4e313970ffd075cd711ed6cfbac03ad5af6 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 8 Jan 2016 13:26:22 +0100 Subject: [PATCH 11/19] Secrets: m4 macros for jansson and http-parser Prepares autoconf for the new Secrets Provider dependencies Related: https://fedorahosted.org/sssd/ticket/2913 Signed-off-by: Christian Heimes Reviewed-by: Simo Sorce --- configure.ac | 5 +++++ src/external/libhttp_parser.m4 | 15 +++++++++++++++ src/external/libjansson.m4 | 15 +++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 src/external/libhttp_parser.m4 create mode 100644 src/external/libjansson.m4 diff --git a/configure.ac b/configure.ac index ef3d19bf377dc474c6e3b7eddd0931822ffa40be..8760a8561979664a02bc3c2b2b2994a73825f2c3 100644 --- a/configure.ac +++ b/configure.ac @@ -189,6 +189,11 @@ m4_include([src/external/libresolv.m4]) m4_include([src/external/intgcheck.m4]) m4_include([src/external/systemtap.m4]) +if test x$with_secrets = xyes; then + m4_include([src/external/libhttp_parser.m4]) + m4_include([src/external/libjansson.m4]) +fi + if test x$build_config_lib = xyes; then m4_include([src/external/libaugeas.m4]) fi diff --git a/src/external/libhttp_parser.m4 b/src/external/libhttp_parser.m4 new file mode 100644 index 0000000000000000000000000000000000000000..34c41e8b10c786d56d3ceea88765da7dda1477e6 --- /dev/null +++ b/src/external/libhttp_parser.m4 @@ -0,0 +1,15 @@ +AC_SUBST(HTTP_PARSER_LIBS) +AC_SUBST(HTTP_PARSER_CFLAGS) + +PKG_CHECK_MODULES([HTTP_PARSER], [http_parser], [found_http_parser=yes], [found_http_parser=no]) + +SSS_AC_EXPAND_LIB_DIR() +AS_IF([test x"$found_http_parser" != xyes], + [AC_CHECK_HEADERS([http_parser.h], + [AC_CHECK_LIB([http_parser_strict], + [http_parser_init], + [HTTP_PARSER_LIBS="-L$sss_extra_libdir -lhttp_parser_strict"], + [AC_MSG_ERROR([libhttp_parser_strict missing http_parser_init])], + [-L$sss_extra_libdir -lhttp_parser_strict])], + [AC_MSG_ERROR([http_parser header files are not installed])])] +) diff --git a/src/external/libjansson.m4 b/src/external/libjansson.m4 new file mode 100644 index 0000000000000000000000000000000000000000..200c501b34d90d825e3c399e6ed3a5aae8827916 --- /dev/null +++ b/src/external/libjansson.m4 @@ -0,0 +1,15 @@ +AC_SUBST(JANSSON_LIBS) +AC_SUBST(JANSSON_CFLAGS) + +PKG_CHECK_MODULES([JANSSON], [jansson], [found_jansson=yes], [found_jansson=no]) + +SSS_AC_EXPAND_LIB_DIR() +AS_IF([test x"$found_jansson" != xyes], + [AC_CHECK_HEADERS([jansson.h], + [AC_CHECK_LIB([jansson], + [jansson_loads], + [JANSSON_LIBS="-L$sss_extra_libdir -ljansson"], + [AC_MSG_ERROR([libjansson missing jansson_loads])], + [-L$sss_extra_libdir -ljanson])], + [AC_MSG_ERROR([jansson header files are not installed])])] +) -- 2.4.11