build: Fix builds without --with-libgcrypt-prefix nor --with-libgcrypt-libdir.

Reported by Manolis Ragkousis <manolis837@gmail.com>.
Fixes a regression introduced in 14af289.

Before this commit, ./configure would leave LIBGCRYPT_PREFIX and
LIBGCRYPT_LIBDIR undefined, leading to LIBGCRYPT_LIBS="-L -lgcrypt" and
thus to a link failure.

* configure.ac: Make sure $LIBGCRYPT_PREFIX and $LIBGCRYPT_LIBDIR are
  never empty.
This commit is contained in:
Ludovic Courtès 2014-05-22 10:38:41 +02:00
parent 641f9a2a1f
commit a3977466db

View File

@ -124,7 +124,9 @@ AC_ARG_WITH([libgcrypt-prefix],
LIBGCRYPT_LIBDIR="$withval/lib"
;;
esac],
[LIBGCRYPT="libgcrypt"])
[LIBGCRYPT="libgcrypt"
LIBGCRYPT_PREFIX="no"
LIBGCRYPT_LIBDIR="no"])
AC_ARG_WITH([libgcrypt-libdir],
[AS_HELP_STRING([--with-libgcrypt-libdir=DIR],
@ -141,6 +143,9 @@ AC_ARG_WITH([libgcrypt-libdir],
esac],
[if test "x$LIBGCRYPT" = x; then
LIBGCRYPT="libgcrypt"
fi
if test "x$LIBGCRYPT_LIBDIR" = x; then
LIBGCRYPT_LIBDIR="no"
fi])
dnl Library name suitable for `dynamic-link'.