From eab1b7ac49dbead52eb471ad8370bdf39d09bb39 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 16 Feb 2012 19:54:07 +0100 Subject: Add --enable-localinstall to make `make distcheck` work (lifted from indicator-messages) --- Makefile.am | 1 + configure.ac | 28 ++++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2c4f34b..f90feae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,4 @@ SUBDIRS = src data test po +DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall diff --git a/configure.ac b/configure.ac index 3e4b909..7c1c44c 100644 --- a/configure.ac +++ b/configure.ac @@ -40,15 +40,35 @@ AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([could not find cups.h])) SERVICE_CFLAGS+=`$CUPS_CONFIG --cflags` SERVICE_LIBS+=`$CUPS_CONFIG --libs` -INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4` -INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4` -DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` +with_localinstall="no" +AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], + [install all files locally (for distcheck)]), + with_localinstall=$enableval, + with_localinstall=no) +if test "x$with_localinstall" = "xyes"; then + INDICATORDIR="${libdir}/indicators/2/" + INDICATORICONSDIR="${datadir}/libindicate/icons/" +else + INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4` + INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4` +fi AC_SUBST(INDICATORDIR) -AC_SUBST(INDICATORICONDIR) +AC_SUBST(INDICATORICONSDIR) + +########################### +# DBus Service Info +########################### + +if test "x$with_localinstall" = "xyes"; then + DBUSSERVICEDIR="${datadir}/dbus-1/services/" +else + DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` +fi AC_SUBST(DBUSSERVICEDIR) + AC_SUBST(AM_CFLAGS, "-Wall") AC_OUTPUT -- cgit v1.2.3