aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am.enum45
-rw-r--r--configure.ac24
-rw-r--r--src/Makefile.am15
-rw-r--r--tests/Makefile.am4
4 files changed, 17 insertions, 71 deletions
diff --git a/Makefile.am.enum b/Makefile.am.enum
deleted file mode 100644
index 0503de0..0000000
--- a/Makefile.am.enum
+++ /dev/null
@@ -1,45 +0,0 @@
-# Rules for generating enumeration types using glib-mkenums
-#
-# Define:
-# glib_enum_h = header template file
-# glib_enum_c = source template file
-# glib_enum_headers = list of headers to parse
-#
-# before including Makefile.am.enums. You will also need to have
-# the following targets already defined:
-#
-# CLEANFILES
-# DISTCLEANFILES
-# BUILT_SOURCES
-# EXTRA_DIST
-#
-# Author: Emmanuele Bassi <ebassi@linux.intel.com>
-
-enum_tmpl_h=$(glib_enum_h:.h=.h.in)
-enum_tmpl_c=$(glib_enum_c:.c=.c.in)
-
-CLEANFILES += stamp-enum-types
-DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
-BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
-EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c)
-
-stamp-enum-types: $(glib_enum_headers)
- $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_h)`
- $(QUIET_GEN)$(GLIB_MKENUMS) \
- --template $(srcdir)/$(enum_tmpl_h) \
- $(glib_enum_headers) > xgen-eh \
- && (cmp -s xgen-eh $(builddir)/$(glib_enum_h) || cp -f xgen-eh $(builddir)/$(glib_enum_h)) \
- && rm -f xgen-eh \
- && echo timestamp > $(@F)
-
-$(glib_enum_h): stamp-enum-types
- @true
-
-$(glib_enum_c): $(glib_enum_h)
- $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_c)`
- $(QUIET_GEN)$(GLIB_MKENUMS) \
- --template $(srcdir)/$(enum_tmpl_c) \
- $(glib_enum_headers) > xgen-ec \
- && cp -f xgen-ec $(builddir)/$(glib_enum_c) \
- && rm -f xgen-ec
-
diff --git a/configure.ac b/configure.ac
index c7be913..12d87dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,8 @@ DBUSMENUGTK_REQUIRED_VERSION=0.3.91
JSON_GLIB_REQUIRED_VERSION=0.7.6
DBUS_GLIB_REQUIRED_VERSION=0.82
+LIBAPPINDICATOR_REQUIRED_VERSION=0.2.9
+
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--with-gtk],
[Which version of gtk to use @<:@default=3@:>@])],
@@ -49,8 +51,9 @@ AS_IF([test "x$with_gtk" = x3],
json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
- AC_SUBST(INDICATOR_CFLAGS)
- AC_SUBST(INDICATOR_LIBS)
+
+ PKG_CHECK_MODULES(APPINDICATOR, appindicator3-0.1 >= $LIBAPPINDICATOR_REQUIRED_VERSION)
+
AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available])
],
[test "x$with_gtk" = x2],
@@ -60,24 +63,19 @@ AS_IF([test "x$with_gtk" = x3],
json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
- AC_SUBST(INDICATOR_CFLAGS)
- AC_SUBST(INDICATOR_LIBS)
+
+ PKG_CHECK_MODULES(APPINDICATOR, appindicator3-0.1 >= $LIBAPPINDICATOR_REQUIRED_VERSION)
],
[AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
)
AM_CONDITIONAL(USE_GTK3, [test "x$with_gtk" = x3])
-LIBAPPINDICATOR_REQUIRED_VERSION=0.2.9
-
-PKG_CHECK_MODULES(TEST, appindicator-0.1 >= $LIBAPPINDICATOR_REQUIRED_VERSION)
-
-AC_SUBST(TEST_CFLAGS)
-AC_SUBST(TEST_LIBS)
+AC_SUBST(INDICATOR_CFLAGS)
+AC_SUBST(INDICATOR_LIBS)
-APP_INDICATOR_INCLUDE_BASE=`$PKG_CONFIG --variable=includedir appindicator-0.1`
-APP_INDICATOR_INCLUDE="$APP_INDICATOR_INCLUDE_BASE/libappindicator-0.1/"
+AC_SUBST(APPINDICATOR_CFLAGS)
+AC_SUBST(APPINDICATOR_LIBS)
-AC_SUBST(APP_INDICATOR_INCLUDE)
###########################
# Check to see if we're local
diff --git a/src/Makefile.am b/src/Makefile.am
index 18e2baf..9b11fd1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,7 +9,6 @@ DISTCLEANFILES =
BUILT_SOURCES =
EXTRA_DIST =
-include $(top_srcdir)/Makefile.am.enum
include $(top_srcdir)/Makefile.am.marshal
##################################
@@ -29,7 +28,7 @@ libapplication_la_CFLAGS = $(INDICATOR_CFLAGS) \
-Wl,--as-needed \
-Werror \
-DG_LOG_DOMAIN=\"Indicator-Application\"
-libapplication_la_LIBADD = $(INDICATOR_LIBS)
+libapplication_la_LIBADD = $(INDICATOR_LIBS)
libapplication_la_LDFLAGS = -module -avoid-version
##################################
@@ -51,30 +50,24 @@ indicator_application_service_SOURCES = \
application-service-watcher.h \
application-service-watcher.c \
gen-application-service.xml.c \
- app-indicator-enum-types.c \
dbus-shared.h \
generate-id.h \
generate-id.c
indicator_application_service_CFLAGS = \
$(INDICATOR_CFLAGS) \
- -I$(APP_INDICATOR_INCLUDE) \
+ $(APPINDICATOR_CFLAGS) \
-DDATADIR="\"$(pkgdatadir)\"" \
-Wall -Werror \
-DG_LOG_DOMAIN=\"indicator-application-service\"
indicator_application_service_LDADD = \
- $(INDICATOR_LIBS)
+ $(INDICATOR_LIBS) \
+ $(APPINDICATOR_LIBS)
glib_marshal_list = application-service-marshal.list
glib_marshal_prefix = _application_service_marshal
-glib_enum_h = app-indicator-enum-types.h
-glib_enum_c = app-indicator-enum-types.c
-glib_enum_headers = $(wildcard $(APP_INDICATOR_INCLUDE)/libappindicator/*.h)
-
-DISTCLEANFILES += app-indicator-enum-types.c
-
##################################
# DBus Specs
##################################
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a885dff..c8bc3eb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,14 +19,14 @@ test_approver_SOURCES = \
test_approver_CFLAGS = \
$(INDICATOR_CFLAGS) \
- $(TEST_CFLAGS) \
+ $(APPINDICATOR_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src \
-I$(top_builddir)/src
test_approver_LDADD = \
$(INDICATOR_LIBS) \
- $(TEST_LIBS)
+ $(APPINDICATOR_LIBS)
test-approver-tester: test-approver Makefile.am
@echo "#!/bin/bash" > $@