On Mon, Dec 18, 2017 at 05:23:28PM +0200, Timo Sirainen wrote:
> https://dovecot.org/releases/2.3/rc/dovecot-2.3.0.rc1.tar.gz
> https://dovecot.org/releases/2.3/rc/dovecot-2.3.0.rc1.tar.gz.sig 

Please do not feed libraries into LDFLAGS.  It is wrong and breaks with
--as-needed:

[...]
checking for libsodium... yes
checking for crypto_pwhash_str_verify... no
configure: error: Can't build with libsodium: not found

Please see the attached patch for a possible solution.

Thank you
-- 
Eray
--- a/m4/want_sodium.m4	2017-12-18 18:04:05.000000000 +0300
+++ b/m4/want_sodium.m4	2017-12-19 11:37:39.671411423 +0300
@@ -1,13 +1,13 @@
 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
         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])

Reply via email to