diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2025-03-10 07:38:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2025-03-10 07:40:49 (GMT) |
commit | 04d5af777d42d02d0ec580373f7a50be1bfb3dac (patch) | |
tree | 84c7e5ccb783da27d4f64b4a3de29fc852551363 | |
parent | beb5e3753cb9c110dc77d1ffa542f884df784ad0 (diff) |
Add libzip as dependency.
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | src/core/logs.h | 9 |
2 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 300c970..5acf436 100644 --- a/configure.ac +++ b/configure.ac @@ -623,6 +623,20 @@ if test "x$enable_json_glib_support" = "xyes"; then fi +#--- Checks for libzip + +PKG_CHECK_MODULES(LIBZIP,libzip >= 1.7.3,[libzip_found=yes],[libzip_found=no]) + +if test "$libzip_found" = "yes"; then + libzip_version=`pkg-config libzip --modversion` +else + libzip_version='-' +fi + +AC_SUBST(LIBZIP_CFLAGS) +AC_SUBST(LIBZIP_LIBS) + + #--- Checks for Python if test "x$enable_debug" = "xyes"; then @@ -912,6 +926,7 @@ echo The YAML support library..................... : $libyaml_version echo The magic number recognition library......... : $libmagic_version echo The high-performance matching library........ : $libhs_version echo The JSON Parser for the GLib library......... : $libjsonglib_version +echo The library for handling ZIP archives........ : $libzip_version echo echo Available Python programming language........ : $python3_version diff --git a/src/core/logs.h b/src/core/logs.h index e8df8bd..3719c6b 100644 --- a/src/core/logs.h +++ b/src/core/logs.h @@ -162,6 +162,15 @@ void log_variadic_message(LogMessageType, const char *, ...); } \ while (0) +#define LOG_ERROR_ZIP(func, err) \ + do \ + { \ + const char *__msg; \ + __msg = zip_error_strerror(err); \ + log_variadic_message(LMT_EXT_ERROR, "[%s:%u] %s: %s", __FUNCTION__, __LINE__, func, __msg); \ + } \ + while (0) + #endif /* _CORE_LOGS_H */ |