Skip to content

Commit

Permalink
dovecot.m4: Preserve original CFLAGS/LDFLAGS
Browse files Browse the repository at this point in the history
Correct flags are detected during configure, so avoid
overwriting them here by accident.
  • Loading branch information
cmouse committed Nov 29, 2018
1 parent 08b8e76 commit a57aa78
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions m4/dovecot.m4
Expand Up @@ -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"], [
Expand Down

0 comments on commit a57aa78

Please sign in to comment.