]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add warning if we don't have json-c
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 2 Nov 2012 11:42:43 +0000 (11:42 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 2 Nov 2012 14:32:35 +0000 (14:32 +0000)
src/modules/rlm_rest/configure
src/modules/rlm_rest/configure.in

index b7cf1496e1d40ed1986b0a60cf66e5579e2db447..c01c23bc0d069a475e8f07ac72820a01c74b8c9e 100755 (executable)
@@ -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}"
 
 
 
index 0b9928b7003d04d37248540dee46d24134ea4d28..85dc0008722a58f3803e511f40039f27e1d65db8 100644 (file)
@@ -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)