diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2025-01-14 18:27:13 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2025-01-14 18:27:13 (GMT) |
commit | effdeaccbd2a5f65d41d3b906de420c2fc532e10 (patch) | |
tree | e1c3571f5a3cb1043461b9ed08dd2f4469d2b796 /configure.ac | |
parent | bc0b710bd64e87e927665f43440d51d243fdc589 (diff) |
Switch the dependency to json-glib as optional.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 23e4e9b..2ff719a 100644 --- a/configure.ac +++ b/configure.ac @@ -593,6 +593,16 @@ AC_SUBST(LIBHS_LIBS) #--- Checks for json-glib-1.0 +AM_CONDITIONAL([BUILD_JSONGLIB_SUPPORT], [test "x$enable_jsonglib_support" = "xyes"]) + +if test "x$BUILD_JSONGLIB_SUPPORT_TRUE" = "x"; then + # json-glib support is available and enabled + CPPFLAGS="$CPPFLAGS -DINCLUDE_JSONGLIB_SUPPORT" +fi + +curl + + PKG_CHECK_MODULES(LIBJSONGLIB,json-glib-1.0 >= 1.6.6,[libjsonglib_found=yes],[libjsonglib_found=no]) if test "$libjsonglib_found" = "yes"; then @@ -601,8 +611,14 @@ else libjsonglib_version='-' fi -AC_SUBST(LIBJSONGLIB_CFLAGS) -AC_SUBST(LIBJSONGLIB_LIBS) +if test "x$enable_json_glib_support" = "xyes"; then + + AC_SUBST(LIBJSONGLIB_CFLAGS) + AC_SUBST(LIBJSONGLIB_LIBS) + + true # empty if/then body not allowed + +fi #--- Checks for Python |