diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-10-06 22:09:40 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-10-06 23:51:04 +0200 |
| commit | dd01fecd23a4ded46b99a51dc08ac5d964dbcd53 (patch) | |
| tree | 7935564290df6b3a828d1e8a7f4eecb7c58392f8 /m4 | |
| parent | 04d1ab3bf5394ae229161669e9717d76d483e7aa (diff) | |
build: Automatically determine libgcrypt's file name.
* m4/guix.m4 (GUIX_LIBGCRYPT_LIBDIR): New macro.
* configure.ac: Use it when no --with-libgcrypt-* option was passed.
* README: Do not recommend --with-libgcrypt-prefix.
Co-authored-by: 宋文武 <iyzsong@gmail.com>
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/guix.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/guix.m4 b/m4/guix.m4 index 21133837700..d464a478ca7 100644 --- a/m4/guix.m4 +++ b/m4/guix.m4 | |||
| @@ -270,3 +270,18 @@ AC_DEFUN([GUIX_CHECK_LIBC_MOUNT], [ | |||
| 270 | guix_cv_libc_has_mount="no" | 270 | guix_cv_libc_has_mount="no" |
| 271 | fi]) | 271 | fi]) |
| 272 | ]) | 272 | ]) |
| 273 | |||
| 274 | dnl GUIX_LIBGCRYPT_LIBDIR VAR | ||
| 275 | dnl | ||
| 276 | dnl Attempt to determine libgcrypt's LIBDIR; store the result in VAR. | ||
| 277 | AC_DEFUN([GUIX_LIBGCRYPT_LIBDIR], [ | ||
| 278 | AC_PATH_PROG([LIBGCRYPT_CONFIG], [libgcrypt-config]) | ||
| 279 | AC_CACHE_CHECK([libgcrypt's library directory], | ||
| 280 | [guix_cv_libgcrypt_libdir], | ||
| 281 | [if test "x$LIBGCRYPT_CONFIG" != "x"; then | ||
| 282 | guix_cv_libgcrypt_libdir=`$LIBGCRYPT_CONFIG --libs | sed -e "s/.*-L\([[^ ]]\+\)[[[:blank:]]]\+-lgcrypt.*/\1/g"` | ||
| 283 | else | ||
| 284 | guix_cv_libgcrypt_libdir="" | ||
| 285 | fi]) | ||
| 286 | $1="$guix_cv_libgcrypt_libdir" | ||
| 287 | ]) | ||
