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.9~1043 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a57aa78b709e9774712aeec09fc2e0b146ea29de;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 a115bed0d9..9b03ecda16 100644 --- a/m4/dovecot.m4 +++ b/m4/dovecot.m4 @@ -368,9 +368,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"], [