r23343 - gnucash/trunk - Add --with-xdg-data-dirs to specify default search path for XDG data directories.
Mike Alexander
mta at code.gnucash.org
Sun Oct 27 17:57:42 EDT 2013
Author: mta
Date: 2013-10-27 17:57:42 -0400 (Sun, 27 Oct 2013)
New Revision: 23343
Trac: http://svn.gnucash.org/trac/changeset/23343
Modified:
gnucash/trunk/configure.ac
gnucash/trunk/src/bin/Makefile.am
Log:
Add --with-xdg-data-dirs to specify default search path for XDG data directories.
Modified: gnucash/trunk/configure.ac
===================================================================
--- gnucash/trunk/configure.ac 2013-10-27 21:57:32 UTC (rev 23342)
+++ gnucash/trunk/configure.ac 2013-10-27 21:57:42 UTC (rev 23343)
@@ -750,6 +750,13 @@
AM_CONDITIONAL([WITH_AQBANKING], [test x${want_aqbanking} = xyes])
AC_SUBST_FILE([MIGRATABLE_PREFS_AQBANKING])
+AC_ARG_WITH(xdg-data-dirs,
+ [AS_HELP_STRING([--with-xdg-data-dirs],
+ [search path for system XDG data directories [default /usr/local/share/;/usr/share/]])],
+ [GNC_SYSTEM_XDG_DATA_DIRS=$withval],
+ [GNC_SYSTEM_XDG_DATA_DIRS="/usr/local/share;/usr/share"])
+AC_SUBST(GNC_SYSTEM_XDG_DATA_DIRS)
+
AC_ARG_WITH(qt3-wizard-package,
[AS_HELP_STRING([--with-qt3-wizard-package=name],[name of package containing qt3-wizard (aqbanking)])],
[QT3_WIZARD_PACKAGE=$withval], [QT3_WIZARD_PACKAGE=aqbanking])
Modified: gnucash/trunk/src/bin/Makefile.am
===================================================================
--- gnucash/trunk/src/bin/Makefile.am 2013-10-27 21:57:32 UTC (rev 23342)
+++ gnucash/trunk/src/bin/Makefile.am 2013-10-27 21:57:42 UTC (rev 23343)
@@ -75,18 +75,16 @@
if CUSTOM_GNC_DBD_DIR
echo 'GNC_DBD_DIR=@GNC_DBD_DIR@' >> $@.tmp
endif
- # Set XDG_DATA_DIRS if necessary. This is done in such a way that the value at
- # run time overrides the value at compile time which overrides the default value
- # The compile time value is added because GnuCash on X11 builds on MacPorts, which
- # uses /opt/local/share as default instead of the Free Desktop defined standard paths
- # /usr/local/share and /usr/share
+ # Set XDG_DATA_DIRS if necessary. The three components of the search path are the
+ # directory used by GnuCash, whatever was specified in the environment at run time, and
+ # the default value specified via configure.
if [ "a$(datadir)" != "a/usr/share" ] && [ "a$(datadir)" != "a/usr/local/share" ]; \
then \
echo >> $@.tmp; \
echo "# GnuCash was not installed in the default location" >> $@.tmp; \
echo "# XDG_DATA_DIRS will be set so that our documentation" >> $@.tmp; \
echo "# and gsettings schemas are found." >> $@.tmp; \
- echo "XDG_DATA_DIRS=$(datadir);{XDG_DATA_DIRS};$(XDG_DATA_DIRS);/usr/local/share/;/usr/share/" >> $@.tmp; \
+ echo "XDG_DATA_DIRS=$(datadir);{XDG_DATA_DIRS};${GNC_SYSTEM_XDG_DATA_DIRS}" >> $@.tmp; \
fi
mv $@.tmp $@
More information about the gnucash-changes
mailing list