[Xfce4-commits] <terminal:master> Always install the Gnome-default-apps xml file.

Nick Schermer noreply at xfce.org
Sun Dec 6 20:54:01 CET 2009


Updating branch refs/heads/master
         to cc0bac6af377ef59a0fbc96321187e7b05880b37 (commit)
       from 36602dee475921c3e46e6b3c646cebb2a0f710d5 (commit)

commit cc0bac6af377ef59a0fbc96321187e7b05880b37
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Dec 6 20:51:36 2009 +0100

    Always install the Gnome-default-apps xml file.
    
    This can be configured with the --with-gnome-default-appsdir
    configure option. If no path is supplied by the user, it tries
    the gnome-control-center pkg-config variables if not found
    $(datadir)/gnome-control-center/default-apps is used.

 Makefile.am     |    8 +++++---
 configure.in.in |   24 ++++++++++++++++--------
 2 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index aea74c0..86cc5dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,11 +36,13 @@ desktop_in_files = Terminal.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
+if HAVE_GNOME_DEFAULT_APPSDIR
+xmldir = $(GNOME_DEFAULT_APPSDIR)
+else
+xmldir = $(datadir)/gnome-control-center/default-apps
+endif
 xml_in_files = Terminal-default-apps.xml.in
-if DEFAULT_APPS_DEFINITION
-xmldir = $(DEFAULTAPPS_DIR)
 xml_DATA = $(xml_in_files:.xml.in=.xml)
-endif
 @INTLTOOL_XML_RULE@
 
 man_MANS = Terminal.1
diff --git a/configure.in.in b/configure.in.in
index f3930b5..84252a4 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -129,16 +129,24 @@ AM_CONDITIONAL([ENABLE_XML2PO], [test x"$enable_xml2po" = x"yes"])
 dnl ****************************************
 dnl *** Register in Gnome Control Center ***
 dnl ****************************************
-AC_MSG_CHECKING([Whether to install GNOME control-center default application definition])
-if $PKG_CONFIG --variable=keysdir gnome-default-applications >/dev/null ; then
-     AC_MSG_RESULT([yes])
-     DEFAULTAPPS_DIR="`$PKG_CONFIG --variable=defappsdir gnome-default-applications`"
-     AC_SUBST(DEFAULTAPPS_DIR)
+AC_ARG_WITH([gnome-default-appsdir],
+            [AC_HELP_STRING([--with-gnome-default-appsdir=PATH],
+                            [Specify where to install the Gnome default applications file (default=autodetect)])],
+            [gnome_default_appsdir="$withval"])
+AC_MSG_CHECKING([for Gnome default applications dir])
+if test x"$gnome_default_appsdir" = x""; then
+  GNOME_DEFAULT_APPSDIR="`$PKG_CONFIG --variable=defappsdir gnome-default-applications`"
+  if test -n "$GNOME_DEFAULT_APPSDIR"; then
+    AC_MSG_RESULT([Using path supplied by gnome-control-center])
+  else
+    AC_MSG_RESULT([Using prefix of terminal])
+  fi
 else
-     AC_MSG_RESULT([no])
-     DEFAULTAPPS_DIR="/usr/share/test"
+  GNOME_DEFAULT_APPSDIR="$gnome_default_appsdir"
+  AC_MSG_RESULT([Using path supplied by user])
 fi
-AM_CONDITIONAL([DEFAULT_APPS_DEFINITION],[test -n "$DEFAULTAPPS_DIR"])
+AM_CONDITIONAL([HAVE_GNOME_DEFAULT_APPSDIR], [test -n "$GNOME_DEFAULT_APPSDIR"])
+AC_SUBST([GNOME_DEFAULT_APPSDIR])
 
 dnl ***********************************
 dnl *** Check for debugging support ***



More information about the Xfce4-commits mailing list