Code

Setting up a flag for local install for distcheck
authorTed Gould <ted@gould.cx>
Thu, 31 Dec 2009 06:07:45 +0000 (00:07 -0600)
committerTed Gould <ted@gould.cx>
Thu, 31 Dec 2009 06:07:45 +0000 (00:07 -0600)
Makefile.am
configure.ac

index f07cf697990a270fe302944d432f2145fe9dc12e..fa9640a1d9cc5ca934649d439501099dd7688d5a 100644 (file)
@@ -16,6 +16,7 @@ Graphics_DATA = $(Graphics_in_files:.desktop.in=.desktop)
 ##     cp $(srcdir)/AUTHORS $(distdir)
 ##     cp $(srcdir)/NEWS $(distdir)
 
+DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
 
 man_MANS = inkscape.1 \
                inkview.1
index 4db84a1d3e7108f23037aae53b173bb3c185b023..6d673ca0d5c85cc26b75cb23f6630375dfa4e002 100644 (file)
@@ -619,6 +619,14 @@ AM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
 AC_SUBST(LIBWPG_LIBS)
 AC_SUBST(LIBWPG_CFLAGS)
 
+dnl ******************************
+dnl Support doing a local install
+dnl   (mostly for distcheck)
+dnl ******************************
+
+with_localinstall="no"
+AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install system files in the local path (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
+
 dnl ******************************
 dnl Check for dbus functionality
 dnl ******************************
@@ -626,6 +634,12 @@ dnl ******************************
 PKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
 if test "x$with_dbus" = "xyes"; then
        AC_DEFINE(WITH_DBUS,1,[Build in dbus])
+       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)
 fi
 AM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
 
@@ -1035,4 +1049,5 @@ Configuration:
         Enable Poppler-Cairo:     ${enable_poppler_cairo}
         ImageMagick Magick++:     ${magick_ok}
         Libwpg:                   ${with_libwpg}
+        Doing Local Install:      ${with_localinstall}
 "