--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 3FD686DE0317\r
+ for <notmuch@notmuchmail.org>; Fri, 13 May 2016 14:30:07 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.656\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.656 tagged_above=-999 required=5 tests=[AWL=-0.126,\r
+ HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01,\r
+ UPPERCASE_50_75=0.791] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id dQj-6Ix_SCqe for <notmuch@notmuchmail.org>;\r
+ Fri, 13 May 2016 14:29:58 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id B77D76DE02B2\r
+ for <notmuch@notmuchmail.org>; Fri, 13 May 2016 14:29:57 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 1E73B10008D; Sat, 14 May 2016 00:29:47 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Cc: tomi.ollila@iki.fi\r
+Subject: [PATCH] configure: combine common parts of CONFIGURE_C{,XX}FLAGS\r
+Date: Sat, 14 May 2016 00:29:45 +0300\r
+Message-Id: <1463174985-20654-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.8.2\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 13 May 2016 21:30:07 -0000\r
+\r
+By combining the common parts of CONFIGURE_CFLAGS and CONFIGURE_CXXFLAGS\r
+to a separate make variable and using that as part of their\r
+definitions makes setting of these easier, DRYer and less error prone\r
+(especially as we cannot check potential typing errors there).\r
+---\r
+\r
+This patch requires (at least patches 1-4) from David's "libconfig..."\r
+series ( id:1463135893-7471-1-git-send-email-david@tethera.net ).\r
+\r
+I made slight reordering of the now common flags. these 4 first lines\r
+in added lines basically shows that all flags in removed lines are there\r
+(and XAPIAN_CXXFLAGS is the only thing differing in CONFIGURE_CXXFLAGS).\r
+\r
+> + \$(GMIME_CFLAGS) \$(TALLOC_CFLAGS) \$(ZLIB_CFLAGS) \\\r
+> + -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \$(VALGRIND_CFLAGS) \\\r
+> + -DHAVE_GETLINE=\$(HAVE_GETLINE) \\\r
+> + -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\\r
+\r
+\r
+ configure | 47 ++++++++++++++++++-----------------------------\r
+ 1 file changed, 18 insertions(+), 29 deletions(-)\r
+\r
+diff --git a/configure b/configure\r
+index eb143b2..1cb71ff 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -1082,35 +1082,24 @@ WITH_BASH = ${WITH_BASH}\r
+ WITH_ZSH = ${WITH_ZSH}\r
+ \r
+ # Combined flags for compiling and linking against all of the above\r
+-CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\\r
+- -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\\r
+- \$(ZLIB_CFLAGS) \\\r
+- \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\\r
+- \$(VALGRIND_CFLAGS) \\\r
+- -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\\r
+- -DHAVE_STRSEP=\$(HAVE_STRSEP) \\\r
+- -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\\r
+- -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\\r
+- -DSTD_GETPWUID=\$(STD_GETPWUID) \\\r
+- -DSTD_ASCTIME=\$(STD_ASCTIME) \\\r
+- -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\\r
+- -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\\r
+- -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)\r
+-\r
+-CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\\r
+- -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\\r
+- \$(ZLIB_CFLAGS) \\\r
+- \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\\r
+- \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\\r
+- -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\\r
+- -DHAVE_STRSEP=\$(HAVE_STRSEP) \\\r
+- -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\\r
+- -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\\r
+- -DSTD_GETPWUID=\$(STD_GETPWUID) \\\r
+- -DSTD_ASCTIME=\$(STD_ASCTIME) \\\r
+- -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\\r
+- -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\\r
+- -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)\r
++COMMON_CONFIGURE_CFLAGS = \\\r
++ \$(GMIME_CFLAGS) \$(TALLOC_CFLAGS) \$(ZLIB_CFLAGS) \\\r
++ -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \$(VALGRIND_CFLAGS) \\\r
++ -DHAVE_GETLINE=\$(HAVE_GETLINE) \\\r
++ -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\\r
++ -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\\r
++ -DHAVE_STRSEP=\$(HAVE_STRSEP) \\\r
++ -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\\r
++ -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\\r
++ -DSTD_GETPWUID=\$(STD_GETPWUID) \\\r
++ -DSTD_ASCTIME=\$(STD_ASCTIME) \\\r
++ -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\\r
++ -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\\r
++ -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)\r
++\r
++CONFIGURE_CFLAGS = \$(COMMON_CONFIGURE_CFLAGS)\r
++\r
++CONFIGURE_CXXFLAGS = \$(COMMON_CONFIGURE_CFLAGS) \$(XAPIAN_CXXFLAGS)\r
+ \r
+ CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)\r
+ EOF\r
+-- \r
+2.8.2\r
+\r