[totem-pl-parser] build: Allow detecting the GMime API we are building against
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] build: Allow detecting the GMime API we are building against
- Date: Thu, 13 Apr 2017 10:30:24 +0000 (UTC)
commit 972138e113efa9971cba2bb9c13d5656af68226c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Apr 13 10:50:49 2017 +0100
build: Allow detecting the GMime API we are building against
Since we support GMime 2.6 and 3.0, and there are going to be API
differences between the two, we will need a way to check which version
of GMime we are building against from inside the code.
https://bugzilla.gnome.org/show_bug.cgi?id=781254
configure.ac | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 410051f..3ba841f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,15 +83,16 @@ AC_ARG_ENABLE(gmime-i-know-what-im-doing,
[enable_gmime=yes])
if test "x$enable_gmime" = "xyes" ; then
- PKG_CHECK_MODULES(GMIME,
- gmime-2.6,
- [have_gmime=yes GMIME=gmime-2.6],
- [have_gmime=no])
+ have_gmime3=no
+ PKG_CHECK_MODULES(GMIME,
+ gmime-2.6,
+ [have_gmime=yes GMIME=gmime-2.6],
+ [have_gmime=no])
if test "x$have_gmime" = "xno" ; then
PKG_CHECK_MODULES(GMIME,
gmime-3.0,
- [have_gmime=yes GMIME=gmime-3.0],
+ [have_gmime=yes have_gmime3=yes GMIME=gmime-3.0],
[have_gmime=no])
fi
@@ -99,6 +100,9 @@ if test "x$enable_gmime" = "xyes" ; then
AC_SUBST(GMIME, $GMIME)
AC_SUBST(USEGMIME, yes)
AC_DEFINE(HAVE_GMIME, 1, [GMime available in the system])
+ if test "x$have_gmime3" = xyes ; then
+ AC_DEFINE(HAVE_GMIME3, 1, [GMime 3.0 available in the system])
+ fi
pkg_modules="$pkg_modules $GMIME"
else
AC_MSG_ERROR([libgmime is required to compile totem-pl-parser.])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]