From: Timo Sirainen Date: Fri, 22 Dec 2017 07:37:53 +0000 (+0200) Subject: m4: Fix detecting libsodium to use LIBS instead of LDFLAGS X-Git-Tag: 2.3.9~2622 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89074345d369ee8a1875e5d99ddd9701f8d66b67;p=thirdparty%2Fdovecot%2Fcore.git m4: Fix detecting libsodium to use LIBS instead of LDFLAGS Patch by Eray Aslan --- diff --git a/m4/want_sodium.m4 b/m4/want_sodium.m4 index ba58661bab..f82edeb55d 100644 --- a/m4/want_sodium.m4 +++ b/m4/want_sodium.m4 @@ -1,14 +1,14 @@ AC_DEFUN([DOVECOT_WANT_SODIUM], [ AS_IF([test "$want_sodium" != "no"], [ PKG_CHECK_MODULES(LIBSODIUM, libsodium, [ - OLD_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $LIBSODIUM_LIBS" + OLD_LIBS="$LIBS" + LIBS="$LIBS $LIBSODIUM_LIBS" AC_CHECK_FUNC([crypto_pwhash_str_verify], [ have_sodium=yes AUTH_LIBS="$AUTH_LIBS $LIBSODIUM_LIBS" AC_DEFINE(HAVE_LIBSODIUM, [1], [Define if you have libsodium]) ]) - LDFLAGS="$OLD_LDFLAGS" + LIBS="$OLD_LIBS" ], [have_sodium=no]) AS_IF([test "$want_sodium" = "yes" && test "$have_sodium" != "yes"] , [ AC_ERROR([Can't build with libsodium: not found])