Blob Blame History Raw
--- xfe-1.43/configure.ac.syssn	2018-07-20 15:30:14.394878201 +0900
+++ xfe-1.43/configure.ac	2018-07-20 15:40:55.015553061 +0900
@@ -180,9 +180,13 @@ AC_ARG_ENABLE(sn,[  --disable-sn
 AC_MSG_RESULT([$enable_sn])
 AC_SUBST(STARTUPNOTIFY,false)
 if test "x$enable_sn" != "xno"; then
-	CXXFLAGS="${CXXFLAGS} -DSTARTUP_NOTIFICATION"
-	AC_SUBST(STARTUPNOTIFY,true)
-	enable_sn=yes
+	AC_CHECK_PROGS(pkg_config,pkg-config,)
+	if test -n "$pkg_config"; then
+		PKG_CHECK_MODULES(LIBSN, libstartup-notification-1.0)
+		CXXFLAGS="${CXXFLAGS} -DSTARTUP_NOTIFICATION -DSN_API_NOT_YET_FROZEN"
+		AC_SUBST(STARTUPNOTIFY,true)
+		enable_sn=yes
+	fi
 
 	# Check for xcb libs
 	PKG_CHECK_MODULES([xcb], [xcb >= 1.6],,
--- xfe-1.43/src/Makefile.am.syssn	2018-05-15 21:37:00.000000000 +0900
+++ xfe-1.43/src/Makefile.am	2018-07-20 15:30:14.395878213 +0900
@@ -39,18 +39,7 @@ xfe_SOURCES = ../st/st.c \
 			  XFileExplorer.cpp \
               main.cpp
 
-if STARTUPNOTIFY
-xfe_SOURCES += ../libsn/sn-common.c  \
-              ../libsn/sn-launchee.c \
-              ../libsn/sn-launcher.c \
-              ../libsn/sn-list.c \
-              ../libsn/sn-monitor.c \
-              ../libsn/sn-util.c \
-              ../libsn/sn-xmessages.c \
-              ../libsn/sn-xutils.c
-endif
-
-xfe_LDADD = @LIBINTL@ -lutil
+xfe_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
 
 
 xfp_SOURCES = ../st/st.c \
@@ -74,18 +63,7 @@ xfp_SOURCES = ../st/st.c \
  			  DirHistBox.cpp \
               XFilePackage.cpp
 
-if STARTUPNOTIFY
-xfp_SOURCES += ../libsn/sn-common.c  \
-              ../libsn/sn-launchee.c \
-              ../libsn/sn-launcher.c \
-              ../libsn/sn-list.c \
-              ../libsn/sn-monitor.c \
-              ../libsn/sn-util.c \
-              ../libsn/sn-xmessages.c \
-              ../libsn/sn-xutils.c
-endif
-
-xfp_LDADD = @LIBINTL@ -lutil
+xfp_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
 	  
 
 xfw_SOURCES = ../st/st.c \
@@ -111,18 +89,7 @@ xfw_SOURCES = ../st/st.c \
 			  FontDialog.cpp \
               XFileWrite.cpp
 
-if STARTUPNOTIFY
-xfw_SOURCES += ../libsn/sn-common.c  \
-              ../libsn/sn-launchee.c \
-              ../libsn/sn-launcher.c \
-              ../libsn/sn-list.c \
-              ../libsn/sn-monitor.c \
-              ../libsn/sn-util.c \
-              ../libsn/sn-xmessages.c \
-              ../libsn/sn-xutils.c
-endif
-
-xfw_LDADD = @LIBINTL@ -lutil
+xfw_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
 
 				
 xfi_SOURCES = ../st/st.c \
@@ -146,23 +113,12 @@ xfi_SOURCES = ../st/st.c \
  			  PathLinker.cpp \
               XFileImage.cpp
 
-if STARTUPNOTIFY
-xfi_SOURCES += ../libsn/sn-common.c  \
-              ../libsn/sn-launchee.c \
-              ../libsn/sn-launcher.c \
-              ../libsn/sn-list.c \
-              ../libsn/sn-monitor.c \
-              ../libsn/sn-util.c \
-              ../libsn/sn-xmessages.c \
-              ../libsn/sn-xutils.c
-endif
-
-xfi_LDADD = @LIBINTL@ -lutil
+xfi_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
 
 
 localedir = $(datadir)/locale
 
-AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(top_srcdir)/intl
+AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(top_srcdir)/intl @LIBSN_CFLAGS@
 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
 
 EXTRA_DIST =  ../libsn/sn-common.h	\