diff Makefile @ 27:73081cc299f5

Fix support for libayatana-appindicator Fix the library name and use the correct headers.
author Guido Berhoerster <guido+pui@berhoerster.name>
date Wed, 24 Jul 2019 16:25:24 +0200
parents 3e8551a41944
children 74644b419e86
line wrap: on
line diff
--- a/Makefile	Wed Jul 24 15:13:07 2019 +0200
+++ b/Makefile	Wed Jul 24 16:25:24 2019 +0200
@@ -73,9 +73,11 @@
 INDICATOR_LIB := $(or \
 		    $(shell pkg-config --exists appindicator3-0.1 && \
 		        printf '%s\\\n' appindicator3-0.1), \
-		    $(shell pkg-config --exists ayatana-indicator3-0.1 && \
-		        printf '%s\\\n' ayatana-indicator3-0.1), \
+		    $(shell pkg-config --exists ayatana-appindicator3-0.1 && \
+		        printf '%s\\\n' ayatana-appindicator3-0.1), \
 		    appindicator3-0.1)
+INDICATOR_FLAG := $(if $(findstring ayatana,$(INDICATOR_LIB)), \
+		    -DHAVE_AYATANA_APPINDICATOR,)
 
 define generate-manpage-rule =
 %.$1: %.$(addsuffix .xml,$1) docbook-update-source-data.xsl
@@ -156,7 +158,8 @@
 			-DPACKAGE_LOCALE_DIR="\"$(localedir)\"" \
 			-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
 			-DSETTINGS_SCHEMA_ID=\"$(APPLICATION_ID)\" \
-			-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE
+			-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
+			$(INDICATOR_FLAG)
 $(PACKAGE): XCFLAGS =	$(shell pkg-config --cflags gtk+-3.0 \
 			    $(INDICATOR_LIB) packagekit-glib2 \
 			    polkit-gobject-1 upower-glib)