From 85bd23a89282c96487e64872ac955e271e445d0b Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 27 Jun 2016 14:25:18 +0200 Subject: [PATCH 12/19] BUILD: Fall back to non-strict http parser, if strict is not available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some platforms (like Debian), don't ship http-parser-strict at all, but only the non-strict variant. Fall back to the non-strict library if the strict variant is not found. Reviewed-by: Lukáš Slebodník --- src/external/libhttp_parser.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/external/libhttp_parser.m4 b/src/external/libhttp_parser.m4 index 34c41e8b10c786d56d3ceea88765da7dda1477e6..a02cd8270341e0b923988ee37d3aa1b48c5ac7eb 100644 --- a/src/external/libhttp_parser.m4 +++ b/src/external/libhttp_parser.m4 @@ -9,7 +9,12 @@ AS_IF([test x"$found_http_parser" != xyes], [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])], + [AC_CHECK_LIB([http_parser], + [http_parser_init], + [HTTP_PARSER_LIBS="-L$sss_extra_libdir -lhttp_parser"], + [AC_MSG_ERROR([libhttp_parser missing http_parser_init])], + [-L$sss_extra_libdir -lhttp_parser]) + ], [-L$sss_extra_libdir -lhttp_parser_strict])], [AC_MSG_ERROR([http_parser header files are not installed])])] ) -- 2.4.11