From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXI6L-0004G5-7B for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:42:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXI6G-0004FN-H4 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:42:48 -0500 Received: from [199.232.76.173] (port=41045 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXI6G-0004FK-CS for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:42:44 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:54030) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXI6F-0007gB-R5 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:42:44 -0500 Message-ID: <4B55EF10.7080502@mail.berlios.de> Date: Tue, 19 Jan 2010 18:42:40 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] Stop using "which" in ./configure References: <20100117124528.GA24106@bee.dooz.org> <4B531406.2070904@mail.berlios.de> <20100119101119.GA11358@bee.dooz.org> <20100119114750.GB11613@bee.dooz.org> In-Reply-To: <20100119114750.GB11613@bee.dooz.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Lo=EFc_Minier?= Cc: qemu-devel@nongnu.org Loïc Minier schrieb: > On Tue, Jan 19, 2010, Loïc Minier wrote: > >> Following the thread on the sdl-config patch, please find attached a >> patch to add a couple of portable shell functions which allow testing >> whehter a command/builtin is available and to find the full pathname of >> an executable in the PATH. This also replaces all uses of "which" in >> ./configure. (This should be applied on top of the sdl-config patch.) >> > > Please find attached a new version of the patch with a simpler version > of path_of() which uses IFS instead of the ${foo#bar} and ${foo%%bar} > constructs. It also removes the special casing of an empty PATH. I did not test the whole patch, but I think this would be better: + type "$local_command" >/dev/null 2>&1 (type sends error messages to stderr, we don't want to see them)