Re: [PATCH] configure: use cc/c++ when GCC not installed

Subject: Re: [PATCH] configure: use cc/c++ when GCC not installed

Date: Thu, 22 May 2014 01:21:09 +0300

To: David Bremner, Fraser Tweedale, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Wed, May 21 2014, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>>
>> hash is builtin in modern shells, and is command in some systems
>> which(1) is builtin in zsh (only?). Solaris 10 which(1) exits 0
>> even the command is not found.
>>
>> Tomi
>
> I thought "command -v" was the posix way of testing for a binary?


Ok, I wrote quite a few lines why hash instead of command -v,
just to finally notice this:

$ dash -c 'hash zapdsb || echo foo'
dash: 1: hash: zapdsb : not found
foo

which is ok... but:

$ ksh -c 'hash zapdsb || echo foo'
$ mksh -c 'hash zapdsb || echo foo'

Wat! hash in these shells do not exit nonzero -- so good with my which(1)
rant >;/

So I change my preference totally -- `command -v` instead of `hash` -- we
have to fix the current uses of `hash` too...


> d


Tomi

Thread: