From: Arran Cudbard-Bell Date: Fri, 2 Nov 2012 11:42:43 +0000 (+0000) Subject: Add warning if we don't have json-c X-Git-Tag: release_3_0_0_beta1~1611 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad80438ff7c6aea70bc81b7909d6d86d62030abf;p=thirdparty%2Ffreeradius-server.git Add warning if we don't have json-c --- diff --git a/src/modules/rlm_rest/configure b/src/modules/rlm_rest/configure index b7cf1496e1d..c01c23bc0d0 100755 --- a/src/modules/rlm_rest/configure +++ b/src/modules/rlm_rest/configure @@ -3448,8 +3448,17 @@ _ACEOF unset _libcurl_with - if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then - fail="$fail libcurl" + if test x$libcurl_cv_lib_curl_usable != xyes; then + fail="$fail libcurl" + else + if test x$libcurl_protocol_HTTP != xyes; then + fail="$fail libcurl_protocol_http" + fi + + if test x$libcurl_protocol_HTTPS != xyes || test x$libcurl_feature_SSL != xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently building without HTTPS support. Requires: libcurl_protocol_https." >&5 +$as_echo "$as_me: WARNING: silently building without HTTPS support. Requires: libcurl_protocol_https." >&2;} + fi fi @@ -3725,6 +3734,11 @@ fi done + if test "$ac_cv_header_json_json_h" != "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently building without JSON support. Requires: json-c." >&5 +$as_echo "$as_me: WARNING: silently building without JSON support. Requires: json-c." >&2;} + fi + targetname=rlm_rest # keep this! Don't change! else targetname= # keep this! Don't change! @@ -3743,6 +3757,7 @@ $as_echo "$as_me: WARNING: FAILURE: rlm_rest requires: $fail." >&2;}; fi fi +rest_ldflags="${LIBCURL} ${rest_ldflags}" diff --git a/src/modules/rlm_rest/configure.in b/src/modules/rlm_rest/configure.in index 0b9928b7003..85dc0008722 100644 --- a/src/modules/rlm_rest/configure.in +++ b/src/modules/rlm_rest/configure.in @@ -16,11 +16,23 @@ if test x$with_[]modname != xno; then LIBCURL_CHECK_CONFIG - if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then - fail="$fail libcurl" + if test x$libcurl_cv_lib_curl_usable != xyes; then + fail="$fail libcurl" + else + if test x$libcurl_protocol_HTTP != xyes; then + fail="$fail libcurl_protocol_http" + fi + + if test x$libcurl_protocol_HTTPS != xyes || test x$libcurl_feature_SSL != xyes; then + AC_MSG_WARN([silently building without HTTPS support. Requires: libcurl_protocol_https.]) + fi fi AC_CHECK_HEADERS(json/json.h) + + if test "$ac_cv_header_json_json_h" != "yes"; then + AC_MSG_WARN([silently building without JSON support. Requires: json-c.]) + fi targetname=modname # keep this! Don't change! else @@ -39,6 +51,7 @@ if test x"$fail" != x""; then fi fi +rest_ldflags="${LIBCURL} ${rest_ldflags}" AC_SUBST(rest_cflags) AC_SUBST(rest_ldflags)