Commit 0aab6f25 authored by Marco Barisione's avatar Marco Barisione

configure.ac: allow to overwrite where to install data files

parent 4a717c1b
......@@ -124,6 +124,22 @@ fi
AC_SUBST(LDFLAGS)
# -----------------------------------------------------------
# Allow to overwrite where to install icons and other data
# files
# -----------------------------------------------------------
AC_ARG_WITH([pkgdatadir],
AS_HELP_STRING([--with-pkgdatadir],
[set a different directory where to install the icon]),,
with_pkgdatadir=)
if test x"$with_pkgdatadir" != x"" ; then
real_pkgdatadir="${with_pkgdatadir}"
else
real_pkgdatadir="${datarootdir}/${PACKAGE_NAME}"
fi
AC_SUBST(real_pkgdatadir)
# -----------------------------------------------------------
# Pkg-Config dependency checks
# -----------------------------------------------------------
......@@ -327,6 +343,7 @@ Configure summary:
Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
Linker Flags................: ${LDFLAGS}
Prefix......................: ${prefix}
Data directory .............: ${real_pkgdatadir}
Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
Unreleased version checks...: ${enable_unreleased_checks}
......
......@@ -145,12 +145,12 @@ update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
for theme in $(private_icons_themes); do \
$(gtk_update_icon_cache) $(pkgdatadir)/icons/$$theme; \
$(gtk_update_icon_cache) $(real_pkgdatadir)/icons/$$theme; \
done; \
else \
echo "*** Icon cache not updated. After (un)install, run this:"; \
for theme in $(private_icons_themes); do \
echo "*** $(gtk_update_icon_cache) $(pkgdatadir)/icons/$$theme"; \
echo "*** $(gtk_update_icon_cache) $(real_pkgdatadir)/icons/$$theme"; \
done; \
fi
......@@ -160,8 +160,8 @@ install-icons:
CONTEXT=`echo $$icon | cut -d_ -f2`; \
SIZE=`echo $$icon | cut -d_ -f3`; \
ICONFILE=`echo $$icon | cut -d_ -f4`; \
mkdir -p $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
mkdir -p $(DESTDIR)$(real_pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(real_pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
done
uninstall-icons:
......@@ -170,7 +170,7 @@ uninstall-icons:
CONTEXT=`echo $$icon | cut -d_ -f2`; \
SIZE=`echo $$icon | cut -d_ -f3`; \
ICONFILE=`echo $$icon | cut -d_ -f4`; \
rm -f $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
rm -f $(DESTDIR)$(real_pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
done
install-data-local:
......
AM_CPPFLAGS = \
$(ERROR_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DPKGDATADIR=\""$(pkgdatadir)"\" \
-DPKGDATADIR=\""$(real_pkgdatadir)"\" \
-DG_LOG_DOMAIN=\"tp-account-widgets\" \
-DGCR_API_SUBJECT_TO_CHANGE \
$(TPAW_CFLAGS) \
......@@ -118,7 +118,7 @@ account_widgets_dtd_files = \
tpaw-irc-networks.dtd \
$(NULL)
ircnetworksdir = $(datadir)/telepathy-account-widgets
ircnetworksdir = $(real_pkgdatadir)
ircnetworks_DATA = \
irc-networks.xml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment