From 6eeee715e1cf4734481c36e876696bf172d562cd Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 8 Jan 2014 18:21:49 +0100 Subject: Fix distcheck so it works without root privilege --- Makefile.am | 2 +- configure.ac | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index c9e0935..01df24c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,4 +11,4 @@ pkgconfig_DATA = caja-python.pc EXTRA_DIST = caja-python.pc.in -DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --with-cajadir='$${libdir}/caja/extensions-2.0-distcheck' diff --git a/configure.ac b/configure.ac index 1ca4590..84b70c3 100644 --- a/configure.ac +++ b/configure.ac @@ -17,14 +17,14 @@ dnl Check for pkgconfig first AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -dnl Check for gtk-doc -GTK_DOC_CHECK(1.9) - -dnl Give error and exit if we dont have pkgconfig +dnl Give error and exit if we don't have pkgconfig if test "x$HAVE_PKGCONFIG" = "xno"; then AC_MSG_ERROR([you need to have pkgconfig installed !]) fi +dnl Check for gtk-doc +GTK_DOC_CHECK(1.9) + dnl ************************************************** dnl * Check for Python dnl ************************************************** @@ -67,9 +67,16 @@ AC_DEFINE_UNQUOTED(CAJA_LIBDIR, "$CAJA_LIBDIR", [Caja libdir]) dnl --------------------------------- dnl Get caja extensions directory dnl --------------------------------- -CAJA_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libcaja-extension` -AC_SUBST(CAJA_EXTENSION_DIR) -AC_DEFINE_UNQUOTED(CAJA_EXTENSION_DIR, "$CAJA_EXTENSION_DIR", [Caja extensions directory]) +AC_ARG_WITH(cajadir, + AS_HELP_STRING([--with-cajadir=DIR],[Installation path for Caja extension @<:@auto@:>@]), + [ac_with_cajadir=$withval], + [ac_with_cajadir=""]) +if test "${ac_with_cajadir}" = ""; then + ac_with_cajadir=`$PKG_CONFIG --variable=extensiondir libcaja-extension` +fi + +AC_MSG_NOTICE([installing caja plugin in ${ac_with_cajadir}]) +AC_SUBST([CAJA_EXTENSION_DIR], [${ac_with_cajadir}]) dnl --------------------------------- dnl Check for gtk-doc dependencies -- cgit v1.2.1