summary refs log tree commit diff
path: root/m4/guix.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/guix.m4')
-rw-r--r--m4/guix.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/guix.m4 b/m4/guix.m4
index 2113383770..d464a478ca 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -270,3 +270,18 @@ AC_DEFUN([GUIX_CHECK_LIBC_MOUNT], [
        guix_cv_libc_has_mount="no"
      fi])
 ])
+
+dnl GUIX_LIBGCRYPT_LIBDIR VAR
+dnl
+dnl Attempt to determine libgcrypt's LIBDIR; store the result in VAR.
+AC_DEFUN([GUIX_LIBGCRYPT_LIBDIR], [
+  AC_PATH_PROG([LIBGCRYPT_CONFIG], [libgcrypt-config])
+  AC_CACHE_CHECK([libgcrypt's library directory],
+    [guix_cv_libgcrypt_libdir],
+    [if test "x$LIBGCRYPT_CONFIG" != "x"; then
+       guix_cv_libgcrypt_libdir=`$LIBGCRYPT_CONFIG --libs | sed -e "s/.*-L\([[^ ]]\+\)[[[:blank:]]]\+-lgcrypt.*/\1/g"`
+     else
+       guix_cv_libgcrypt_libdir=""
+     fi])
+  $1="$guix_cv_libgcrypt_libdir"
+])