diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-30 12:06:12 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-30 12:06:12 +0200 |
commit | 437fd408ff77c21b5aeceb5a1f9f706b451e730c (patch) | |
tree | 64b00902f1b617e4da7a1a9a32234f3c9a5f423b | |
parent | eac614fc2dfcdfcdb1c92a30ec23c3fbd3984b01 (diff) |
build-sys: support newer gee version
"Libgee version numbers are a little confusing. In libgee 0.5 and 0.6,
the package name was gee-1.0, identified by a file gee-1.0.pc. In
libgee 0.7, the package name changed to gee-0.8 (since the library
changed incompatibly)."
Since systemadm seems to work fine with newer libgee (found in Fedora 17),
let's check for both versions, starting with the newer one.
Between 1.0 and 0.8 there seems to have been 0.7, but since I don't
have one at hand, I'm not adding a check for it. If necessary,
configure.ac can be extended to check for that version too.
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index c3169013..212b3989 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,6 +41,7 @@ systemadm_SOURCES = \ systemadm_CFLAGS = \ $(AM_CFLAGS) \ $(GTK_CFLAGS) \ + $(GEE_CFLAGS) \ -Wno-unused-variable \ -Wno-unused-function \ -Wno-shadow \ @@ -49,11 +50,12 @@ systemadm_CFLAGS = \ systemadm_VALAFLAGS = \ --pkg=posix \ --pkg=gtk+-2.0 \ - --pkg=gee-1.0 \ + --pkg=$(GEE_PACKAGE) \ -g systemadm_LDADD = \ - $(GTK_LIBS) + $(GTK_LIBS) \ + $(GEE_LIBS) desktopdir = $(datadir)/applications desktop_DATA = \ diff --git a/configure.ac b/configure.ac index 20c3bbe8..b6b83106 100644 --- a/configure.ac +++ b/configure.ac @@ -95,10 +95,21 @@ PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ]) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) -PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 gee-1.0]) +PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 ]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) +PKG_CHECK_MODULES(GEE, [ gee-0.8 ],, + [AC_MSG_WARN([gee-0.8 not found, falling back to older version])]) +AS_IF([test -n "$GEE_LIBS"], + [AC_DEFINE([GEE_PACKAGE], [gee-0.8], [Use gee-0.8])], + [PKG_CHECK_MODULES(GEE, [ gee-1.0 ]) + AC_DEFINE([GEE_PACKAGE], [gee-1.0], [Use gee-1.0 (old)])] +) +AC_SUBST(GEE_CFLAGS) +AC_SUBST(GEE_LIBS) +AC_SUBST(GEE_PACKAGE) + PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ]) AC_SUBST(LIBNOTIFY_CFLAGS) AC_SUBST(LIBNOTIFY_LIBS) |