[evolution-data-server/murrayc-with-glib-gdbus-codegen: 1/3] configure.ac: Only link to gdbus-codegen if gio does not have it.



commit f543383cae37cbd6e1f1eeb3f729db0b94064ce9
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Jun 17 14:07:24 2011 +0200

    configure.ac: Only link to gdbus-codegen if gio does not have it.
    
    Newer versions of glib (2.29.3) have gdbus-codegen in gio,
    and gdbus-codegen can't be built standalone if that version of
    glib is installed. Therefore check if the standalone gdbus-codegen
    is necessary. This is best for the future anyway.

 configure.ac |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d101a6a..46bb13c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1230,13 +1230,16 @@ PKG_CHECK_MODULES(E_MAIL_FACTORY, glib-2.0 gtk+-2.0)
 AC_SUBST(E_MAIL_FACTORY_CFLAGS)
 AC_SUBST(E_MAIL_FACTORY_LIBS)
 
-PKG_CHECK_MODULES(GDBUS_CODEGEN, gdbus-codegen )
-
 AC_SUBST(GDBUS_CODEGEN_CFLAGS)
 AC_SUBST(GDBUS_CODEGEN_LIBS)
 
-GDBUS_CODEGEN_STATIC=" `$PKG_CONFIG --variable=libdir gdbus-codegen`/libgdbus-codegen.a "
-AC_SUBST(GDBUS_CODEGEN_STATIC)
+# Link to the standalone gdbus-codegen if the gio (in glib) is not new enough to have it.
+PKG_CHECK_MODULES([GIO_WITH_GDBUS_CODEGEN], [gio-2.0 >= 2.29.3],
+  [],
+  [PKG_CHECK_MODULES([GDBUS_CODEGEN], [gdbus-codegen])
+  GDBUS_CODEGEN_STATIC=" `$PKG_CONFIG --variable=libdir gdbus-codegen`/libgdbus-codegen.a "
+  AC_SUBST(GDBUS_CODEGEN_STATIC)]
+)
 
 PKG_CHECK_MODULES(FFI, libffi)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]