]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rlm_couchbase: we can't build on couchbase v3
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Thu, 30 Jan 2025 19:30:50 +0000 (19:30 +0000)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Thu, 30 Jan 2025 23:46:29 +0000 (23:46 +0000)
doc/ChangeLog
src/modules/rlm_couchbase/configure
src/modules/rlm_couchbase/configure.ac

index e45e142397021531e544aaa6b317829a0ed1d18f..1b01c3720d34746d671eca10533ca02832c530f3 100644 (file)
@@ -58,6 +58,7 @@ FreeRADIUS 3.2.7 Sat 24 Aug 2024 12:00:00 UTC urgency=low
        * Correct calculation of EAP length in pre-proxy.  Fixes #5486.
        * Don't segfault when using detail listeners. Fixes #5485
        * radlast is no longer installed if "last" is not present.
+       * Add check for Couchbase v2, rlm_couchbase won't build on v3.
 
 FreeRADIUS 3.2.6 Sat 24 Aug 2024 12:00:00 UTC urgency=low
        Configuration changes
index 46774776539057331657edc331b941bd82996973..c6b9e887c1a4ad60cf3220c95b593eca1decc102 100755 (executable)
@@ -3798,6 +3798,39 @@ fail="$fail couchbase.h"
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcb_t in couchbase.h" >&5
+$as_echo_n "checking for lcb_t in couchbase.h... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <libcouchbase/couchbase.h>
+int
+main ()
+{
+
+               lcb_t *instance;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fail="$fail lcb_t(couchbase-2.x)"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
 smart_try_dir="$libcouchbase_lib_dir"
 
 
index 453b92a8e56fcf45e9dd5636d563a785af3ec6f8..414b888ff4a7babcbbaeedaf87dc8a0f9b71d3a0 100644 (file)
@@ -180,6 +180,22 @@ if test "x$ac_cv_header_libcouchbase_couchbase_h" != "xyes"; then
        FR_MODULE_FAIL([couchbase.h])
 fi
 
+dnl # lcb_t is in couchbase v2, so if the system is v3 we can't build
+
+AC_MSG_CHECKING([for lcb_t in couchbase.h])
+AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([#include <libcouchbase/couchbase.h>], [[
+               lcb_t *instance;
+       ]])],
+       [
+               AC_MSG_RESULT(yes)
+       ],
+       [
+               AC_MSG_RESULT(no)
+               FR_MODULE_FAIL([lcb_t(couchbase-2.x)])
+       ])
+
+
 dnl ############################################################
 dnl # Check for libcouchbase libraries
 dnl ############################################################