summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-17 15:41:56 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-17 16:23:01 +0200
commit14af289ed9828850ceb341679e42aaa5db7912ee (patch)
tree9c1709425aba494d5b7f79c1f322ade61bbfc4be /configure.ac
parent1634c0420e5e8e609f5d52f5bf92eeafff5bfb6a (diff)
downloadguix-14af289ed9828850ceb341679e42aaa5db7912ee.tar.gz
build: Add --with-libgcrypt-libdir=DIR to support Debian's multi-arch layout.
* configure.ac: Remove 'LIBGCRYPT_PREFIX' and use 'LIBGCRYPT_LIBDIR'
  instead.  Add --with-libgcrypt-libdir=DIR option.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Pass
  '--with-libgcrypt-libdir'.
* config-daemon.ac: Honor $LIBGCRYPT_LIBDIR when computing
  LIBGCRYPT_LIBS.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 05e0370e6b..7b2a0e4dd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,19 +116,39 @@ AC_ARG_WITH([libgcrypt-prefix],
     yes|no)
       LIBGCRYPT="libgcrypt"
       LIBGCRYPT_PREFIX="no"
+      LIBGCRYPT_LIBDIR="no"
       ;;
     *)
       LIBGCRYPT="$withval/lib/libgcrypt"
       LIBGCRYPT_PREFIX="$withval"
+      LIBGCRYPT_LIBDIR="$withval/lib"
       ;;
    esac],
   [LIBGCRYPT="libgcrypt"])
 
+AC_ARG_WITH([libgcrypt-libdir],
+  [AS_HELP_STRING([--with-libgcrypt-libdir=DIR],
+     [search for GNU libgcrypt's shared library in DIR])],
+  [case "$withval" in
+    yes|no)
+      LIBGCRYPT="libgcrypt"
+      LIBGCRYPT_LIBDIR="no"
+      ;;
+    *)
+      LIBGCRYPT="$withval/libgcrypt"
+      LIBGCRYPT_LIBDIR="$withval"
+      ;;
+   esac],
+  [if test "x$LIBGCRYPT" = x; then
+      LIBGCRYPT="libgcrypt"
+   fi])
+
 dnl Library name suitable for `dynamic-link'.
 AC_MSG_CHECKING([for libgcrypt shared library name])
 AC_MSG_RESULT([$LIBGCRYPT])
 AC_SUBST([LIBGCRYPT])
 AC_SUBST([LIBGCRYPT_PREFIX])
+AC_SUBST([LIBGCRYPT_LIBDIR])
 
 GUIX_ASSERT_LIBGCRYPT_USABLE