--- /dev/null
+Return-Path: <tomi.ollila@iki.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 olra.theworths.org (Postfix) with ESMTP id 3988A431FB6\r
+ for <notmuch@notmuchmail.org>; Sat, 2 Jun 2012 04:02:54 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 7-Fe5cdPYt8B for <notmuch@notmuchmail.org>;\r
+ Sat, 2 Jun 2012 04:02:53 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 78743431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 2 Jun 2012 04:02:53 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 5AA8E10064E; Sat, 2 Jun 2012 14:02:57 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: bug in configure script\r
+In-Reply-To: <87pq9ivqvy.fsf@servo.finestructure.net>\r
+References: <87pq9ivqvy.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.13+29~g3c353b7 (http://notmuchmail.org) Emacs/23.1.1\r
+ (x86_64-redhat-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sat, 02 Jun 2012 14:02:57 +0300\r
+Message-ID: <m2txyux9ge.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 02 Jun 2012 11:02:54 -0000\r
+\r
+On Fri, Jun 01 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+\r
+> There's a bug in the configure script that is causing auto-reruns of\r
+> ./configure to not inherit original command line options if there was\r
+> more than one. For instance, if I run:\r
+>\r
+> ./configure --with-gmime-version=2.4 --prefix=/home/jrollins/opt/notmuch\r
+>\r
+> Then in Makefile.config I get:\r
+>\r
+> configure_options = --with-gmime-version=2.4--prefix=/home/jrollins/opt/notmuch\r
+>\r
+> This means that auto-reruns of configure will not get the proper\r
+> options.\r
+>\r
+> I tracked this down to an issue with IFS and /bin/sh. The first line of\r
+> ./configure is:\r
+>\r
+> readonly DEFAULT_IFS=$IFS\r
+>\r
+> DEFAULT_IFS is then used to reset IFS after it is modified within the\r
+> script. The problem is that /bin/sh is setting DEFAULT_IFS to be NULL\r
+> (i.e. ''), which leads to no separation between variables when "$@" is\r
+> expanded (which is itself problematic since I don't think "@" should use\r
+> the IFS when expanded). So this might be a bug in dash. I don't know.\r
+> In any event we need to fix this somehow. \r
+\r
+dash manual states that readonly name=value should work, but it seems\r
+to have some side effects.\r
+\r
+I tried some alternatives on command line:\r
+\r
+$ readonly FOO1=$IFS\r
+$ echo "$FOO1" | od -f x1\r
+0000000 0a\r
+0000001\r
+\r
+$ readonly FOO2="$IFS" \r
+$ echo "$FOO2" | od -f x1\r
+0000000 20 09 0a 0a\r
+0000004\r
+\r
+$ FOO3=$IFS\r
+$ readonly FOO3\r
+$ echo "$FOO4" | od -f x1\r
+0000000 20 09 0a 0a\r
+0000004\r
+\r
+I.e. in dash 'readonly name=$value' $value gets expanded like it was given \r
+in command line and not when just doing variable assignment.\r
+\r
+Easiest is just to drop the 'readonly'; too bad it caused problems :(\r
+(I have to go now -- but I'll make a patch later unless someone beats \r
+me by doing it sooner ;)\r
+\r
+Tomi\r
+\r
+\r
+> I see two obvious solutions:\r
+>\r
+> * use /bin/bash. This a one line diff that fixes the problem\r
+> immediately.\r
+>\r
+> * replace:\r
+>\r
+> IFS=$DEFAULT_IFS\r
+>\r
+> with:\r
+>\r
+> unset IFS\r
+>\r
+> Unsetting IFS also resets IFS to the default, without going through\r
+> this intermediate step.\r
+>\r
+> I'm ok with either solution, but I'll wait for some feedback since I\r
+> imagine someone will have an opinion.\r
+>\r
+> jamie.\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r