summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-01-26 10:14:14 -0500
committerVictor Kareh <[email protected]>2026-01-26 14:38:39 -0500
commit197c3e93b91e0f0ee6ba34a7887feafd2fa1651e (patch)
treef21749c243435a26387ad2b7d76c1472a94ddc17
parent837036d73ed49a390cae6bbaac9a4f1e6d5b6de9 (diff)
downloadpluma-197c3e93b91e0f0ee6ba34a7887feafd2fa1651e.tar.bz2
pluma-197c3e93b91e0f0ee6ba34a7887feafd2fa1651e.tar.xz
configure: Only use girepository-2.0 if libpeas uses it too
Fixes header conflicts on systems where glib has girepository-2.0 but libpeas still uses the old gobject-introspection-1.0 headers. Fixes https://github.com/mate-desktop/pluma/issues/729
-rw-r--r--configure.ac14
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index b35b55e3..5f9a8486 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,9 +197,16 @@ if test "$found_introspection" = "yes"; then
AC_DEFINE([HAVE_INTROSPECTION], [1], [Define to enable GObject Introspection])
# Check for girepository-2.0 API (moved to glib in version 1.80+)
- PKG_CHECK_EXISTS([girepository-2.0],
- [AC_DEFINE([HAVE_GIREPOSITORY_2], [1], [Using girepository-2.0 API])],
- [])
+ # We can only use girepository-2.0 if libpeas also uses it, otherwise we get conflicts
+ PKG_CHECK_EXISTS([girepository-2.0], [
+ # Check if libpeas requires girepository-2.0
+ if pkg-config --print-requires libpeas-1.0 | grep -q "girepository-2.0"; then
+ AC_DEFINE([HAVE_GIREPOSITORY_2], [1], [Using girepository-2.0 API])
+ have_girepository_2=yes
+ else
+ have_girepository_2=no
+ fi
+ ], [have_girepository_2=no])
else
have_introspection=no
fi
@@ -308,6 +315,7 @@ Configure summary:
Spell Plugin enabled: $enable_enchant
Gvfs metadata enabled: $enable_gvfs_metadata
GObject Introspection: ${have_introspection}
+ GIRepository 2.0: ${have_girepository_2:-no}
Tests enabled: $enable_tests
"