From: Aki Tuomi Date: Sat, 24 Nov 2018 18:35:53 +0000 (+0200) Subject: dovecot.m4: Preserve original CFLAGS/LDFLAGS X-Git-Tag: 2.3.5~313 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d2c5be30e991f14a3150361d0cdad8f087926a2;p=thirdparty%2Fdovecot%2Fcore.git dovecot.m4: Preserve original CFLAGS/LDFLAGS Correct flags are detected during configure, so avoid overwriting them here by accident. --- diff --git a/m4/dovecot.m4 b/m4/dovecot.m4 index a70d6532bc..aa43e2ccd2 100644 --- a/m4/dovecot.m4 +++ b/m4/dovecot.m4 @@ -356,9 +356,20 @@ AC_DEFUN([DC_DOVECOT],[ cd $old DISTCHECK_CONFIGURE_FLAGS="--with-dovecot=$abs_dovecotdir --without-dovecot-install-dirs" + dnl Make sure dovecot-config doesn't accidentically override flags + ORIG_CFLAGS="$CFLAGS" + ORIG_LDFLAGS="$LDFLAGS" + ORIG_BINARY_CFLAGS="$BINARY_CFLAGS" + ORIG_BINARY_LDFLAGS="$BINARY_LDFLAGS" + eval `grep -i '^dovecot_[[a-z_]]*=' "$dovecotdir"/dovecot-config` eval `grep '^LIBDOVECOT[[A-Z0-9_]]*=' "$dovecotdir"/dovecot-config` + CFLAGS="$ORIG_CFLAGS" + LDFLAGS="$ORIG_LDFLAGS" + BINARY_CFLAGS="$ORIG_BINARY_CFLAGS" + BINARY_LDFLAGS="$ORIG_BINARY_LDFLAGS" + dovecot_installed_moduledir="$dovecot_moduledir" AS_IF([test "$use_install_dirs" = "no"], [