From 1727f2c6ae07ef5aee7675f2091ff7770826f6b5 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 28 Jun 2021 18:28:09 +0200 Subject: [PATCH] Disable modules by default when building static libraries Might help: https://github.com/libvips/libvips/issues/2317 --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2ad6b8bf..42672880 100644 --- a/configure.ac +++ b/configure.ac @@ -423,8 +423,15 @@ PKG_CHECK_MODULES(HAVE_CHECKED_MUL, glib-2.0 >= 2.48, AC_MSG_CHECKING([whether to build dynamic modules]) +# Disable modules by default when building static libraries +AS_IF([test x"$enable_static" = x"yes"], + [enable_modules_default=no], + [enable_modules_default=yes]) + AC_ARG_ENABLE([modules], - AS_HELP_STRING([--disable-modules], [disable dynamic modules (default: enabled)])) + AS_HELP_STRING([--disable-modules], [disable dynamic modules (default: test)]), + [enable_modules="$enableval"], + [enable_modules="$enable_modules_default"]) gmodule_supported_bool=false gmodule_supported_flag=no