aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-11-11 09:59:36 -0600
committerTed Gould <ted@gould.cx>2010-11-11 09:59:36 -0600
commite6a847b01ec74c372069a4bfb2918017c58429e0 (patch)
tree9b5839fd9c6c0ef0af5e6d739d717cda144d8353
parent022e4bfbcb06a66552007abc8f9f329ce86c9995 (diff)
parent10d7e22266bf5591f1544d97db00ea631fbc57d5 (diff)
downloadlibayatana-indicator-e6a847b01ec74c372069a4bfb2918017c58429e0.tar.gz
libayatana-indicator-e6a847b01ec74c372069a4bfb2918017c58429e0.tar.bz2
libayatana-indicator-e6a847b01ec74c372069a4bfb2918017c58429e0.zip
Merging in the GTK3 basis for the build
-rw-r--r--.bzrignore13
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac40
-rw-r--r--libindicator/Makefile.am27
-rw-r--r--libindicator/indicator3.pc.in17
-rw-r--r--tests/Makefile.am18
-rw-r--r--tools/Makefile.am7
7 files changed, 106 insertions, 18 deletions
diff --git a/.bzrignore b/.bzrignore
index c3c6afd..6599569 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -156,3 +156,16 @@ tests/service-version-multiwatch-manager
tests/service-version-multiwatch-tester
tests/service-version-multiwatch-service
tests/service-version-multiwatch-manager-impolite
+libindicator/indicator-object-enum-types.c
+libindicator/indicator-object-enum-types.h
+libindicator/indicator3.pc
+libindicator/libindicator3.la
+libindicator/libindicator3_la-indicator-desktop-shortcuts.lo
+libindicator/libindicator3_la-indicator-image-helper.lo
+libindicator/libindicator3_la-indicator-object-enum-types.lo
+libindicator/libindicator3_la-indicator-object-marshal.lo
+libindicator/libindicator3_la-indicator-object.lo
+libindicator/libindicator3_la-indicator-service-manager.lo
+libindicator/libindicator3_la-indicator-service.lo
+libindicator/libindicator_la-indicator-object-enum-types.lo
+libindicator/s-enum-types-h
diff --git a/Makefile.am b/Makefile.am
index f290d63..c955c6a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,8 @@ SUBDIRS = \
tests \
tools
+DISTCHECK_CONFIGURE_FLAGS = --disable-deprecations
+
DISTCLEANFILES = \
libindicator-*.tar.gz
diff --git a/configure.ac b/configure.ac
index d9a6240..8b4a709 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,20 +24,46 @@ AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+AC_ARG_ENABLE([deprecations],
+ [AS_HELP_STRING([--enable-deprecations],
+ [allow deprecated API usage @<:@default=yes@:>@])],
+ [],
+ [enable_deprecations=yes])
+AS_IF([test "x$enable_deprecations" = xno],
+ [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGTK_DISABLE_SINGLE_INCLUDES"]
+)
+
##############################
# Dependencies
##############################
GTK_REQUIRED_VERSION=2.18
+GTK3_REQUIRED_VERSION=2.91
DBUS_REQUIRED_VERSION=0.76
GIO_UNIX_REQUIRED_VERSION=2.22
-PKG_CHECK_MODULES(LIBINDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
- gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
- dbus-glib-1 >= $DBUS_REQUIRED_VERSION)
-
-AC_SUBST(LIBINDICATOR_CFLAGS)
-AC_SUBST(LIBINDICATOR_LIBS)
+AC_ARG_WITH([gtk],
+ [AS_HELP_STRING([--with-gtk],
+ [Which version of gtk to use @<:@default=2@:>@])],
+ [],
+ [with_gtk=2])
+AS_IF([test "x$with_gtk" = x3],
+ [PKG_CHECK_MODULES(LIBINDICATOR, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
+ dbus-glib-1 >= $DBUS_REQUIRED_VERSION)
+ AC_SUBST(LIBINDICATOR_CFLAGS)
+ AC_SUBST(LIBINDICATOR_LIBS)
+ ],
+ [test "x$with_gtk" = x2],
+ [PKG_CHECK_MODULES(LIBINDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
+ dbus-glib-1 >= $DBUS_REQUIRED_VERSION)
+ AC_SUBST(LIBINDICATOR_CFLAGS)
+ AC_SUBST(LIBINDICATOR_LIBS)
+ ],
+ [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
+)
+AM_CONDITIONAL(USE_GTK3, [test "x$with_gtk" = x3])
##############################
# Custom Junk
@@ -106,6 +132,7 @@ AC_OUTPUT([
Makefile
libindicator/Makefile
libindicator/indicator.pc
+libindicator/indicator3.pc
tests/Makefile
tools/Makefile
])
@@ -119,6 +146,7 @@ AC_MSG_NOTICE([
Libindicator Configuration:
Prefix: $prefix
+ GTK+ Version: $with_gtk
Enable debugging: $enable_debug
])
diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am
index f942f0d..39cb2b7 100644
--- a/libindicator/Makefile.am
+++ b/libindicator/Makefile.am
@@ -1,12 +1,21 @@
+if USE_GTK3
+VER=3
+lib_LTLIBRARIES = libindicator3.la
+else
+VER=
+lib_LTLIBRARIES = libindicator.la
+endif
+
BUILT_SOURCES = indicator-object-enum-types.h indicator-object-enum-types.c
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST = \
+ indicator3.pc.in \
indicator.pc.in
include $(top_srcdir)/Makefile.am.marshal
-libindicatorincludedir=$(includedir)/libindicator-0.3/libindicator
+libindicatorincludedir=$(includedir)/libindicator$(VER)-0.3/libindicator
indicator_headers = \
indicator.h \
@@ -19,9 +28,6 @@ indicator_headers = \
libindicatorinclude_HEADERS = \
$(indicator_headers)
-lib_LTLIBRARIES = \
- libindicator.la
-
libindicator_la_SOURCES = \
$(indicator_headers) \
dbus-shared.h \
@@ -47,7 +53,18 @@ libindicator_la_LDFLAGS = \
-no-undefined \
-export-symbols-regex "^[^_].*"
-pkgconfig_DATA = indicator.pc
+# We duplicate these here because Automake won't let us use $(VER) on the left hand side.
+# Since we carefully use $(VER) in the right hand side above, we can assign the same values.
+# Only one version of the library is every compiled at the same time, so it is safe to reuse
+# the right hand sides like this.
+libindicator3includedir = $(libindicatorincludedir)
+libindicator3include_HEADERS = $(indicator_headers)
+libindicator3_la_SOURCES = $(libindicator_la_SOURCES)
+libindicator3_la_CFLAGS = $(libindicator_la_CFLAGS)
+libindicator3_la_LIBADD = $(libindicator_la_LIBADD)
+libindicator3_la_LDFLAGS = $(libindicator_la_LDFLAGS)
+
+pkgconfig_DATA = indicator$(VER).pc
pkgconfigdir = $(libdir)/pkgconfig
glib_marshal_list = indicator-object-marshal.list
diff --git a/libindicator/indicator3.pc.in b/libindicator/indicator3.pc.in
new file mode 100644
index 0000000..74b93c5
--- /dev/null
+++ b/libindicator/indicator3.pc.in
@@ -0,0 +1,17 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+bindir=@bindir@
+includedir=@includedir@
+
+indicatordir=${libdir}/indicators3/1/
+iconsdir=@datarootdir@/@PACKAGE@/icons/
+
+Cflags: -I${includedir}/libindicator3-0.3
+Requires: gtk+-3.0
+Libs: -lindicator3
+
+Name: libindicator3
+Description: libindicator3.
+Version: @VERSION@
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9d5e496..da33551 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,3 +1,9 @@
+if USE_GTK3
+INDICATOR_LIB = -lindicator3
+else
+INDICATOR_LIB = -lindicator
+endif
+
TESTS =
DISTCLEANFILES =
@@ -31,7 +37,7 @@ test_loader_CFLAGS = \
test_loader_LDADD = \
$(LIBINDICATOR_LIBS) \
-L$(top_builddir)/libindicator/.libs \
- -lindicator
+ $(INDICATOR_LIB)
#############################
# Test Desktop Shortcuts
@@ -51,7 +57,7 @@ test_desktop_shortcuts_CFLAGS = \
test_desktop_shortcuts_LDADD = \
$(LIBINDICATOR_LIBS) \
-L$(top_builddir)/libindicator/.libs \
- -lindicator
+ $(INDICATOR_LIB)
DS_XML_REPORT = desktop-shortcuts-check-results.xml
DS_HTML_REPORT = desktop-shortcuts-check-results.html
@@ -83,7 +89,7 @@ libdummy_indicator_blank_la_CFLAGS = \
libdummy_indicator_blank_la_LIBADD = \
$(LIBINDICATOR_LIBS) \
-L$(top_builddir)/libindicator/.libs \
- -lindicator
+ $(INDICATOR_LIB)
libdummy_indicator_blank_la_LDFLAGS = \
-module \
@@ -103,7 +109,7 @@ libdummy_indicator_null_la_CFLAGS = \
libdummy_indicator_null_la_LIBADD = \
$(LIBINDICATOR_LIBS) \
-L$(top_builddir)/libindicator/.libs \
- -lindicator
+ $(INDICATOR_LIB)
libdummy_indicator_null_la_LDFLAGS = \
-module \
@@ -123,7 +129,7 @@ libdummy_indicator_signaler_la_CFLAGS = \
libdummy_indicator_signaler_la_LIBADD = \
$(LIBINDICATOR_LIBS) \
-L$(top_builddir)/libindicator/.libs \
- -lindicator
+ $(INDICATOR_LIB)
libdummy_indicator_signaler_la_LDFLAGS = \
-module \
@@ -143,7 +149,7 @@ libdummy_indicator_simple_la_CFLAGS = \
libdummy_indicator_simple_la_LIBADD = \
$(LIBINDICATOR_LIBS) \
-L$(top_builddir)/libindicator/.libs \
- -lindicator
+ $(INDICATOR_LIB)
libdummy_indicator_simple_la_LDFLAGS = \
-module \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 168cea8..6c67491 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,3 +1,8 @@
+if USE_GTK3
+INDICATOR_LIB = -lindicator3
+else
+INDICATOR_LIB = -lindicator
+endif
libexec_PROGRAMS = \
indicator-loader
@@ -17,7 +22,7 @@ indicator_loader_CFLAGS = \
indicator_loader_LDADD = \
$(LIBINDICATOR_LIBS) \
-L$(top_builddir)/libindicator/.libs \
- -lindicator
+ $(INDICATOR_LIB)
xsessiondir = $(sysconfdir)/X11/Xsession.d