Skip to content

Commit

Permalink
Add --with-xdg-data-dirs to specify default search path for XDG data …
Browse files Browse the repository at this point in the history
…directories.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23343 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
mtalexander committed Oct 27, 2013
1 parent 0c5c0c7 commit 45f18a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 7 additions & 0 deletions configure.ac
Expand Up @@ -750,6 +750,13 @@ fi
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])
Expand Down
10 changes: 4 additions & 6 deletions src/bin/Makefile.am
Expand Up @@ -75,18 +75,16 @@ environment: environment.in ${top_builddir}/config.status Makefile
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 $@

Expand Down

0 comments on commit 45f18a7

Please sign in to comment.