Subject: Re: GNU config.guess and netbsd{aout,elf,}
To: Andrew Cagney <ac131313@cygnus.com>
From: Todd Vierling <tv@pobox.com>
List: tech-toolchain
Date: 11/23/1999 11:44:29
On Mon, 22 Nov 1999, Andrew Cagney wrote:

: PS: Can someone suggest a reliable a.out vs ELF test that config.guess
: can use to differentiate between an ELF and a.out build environment? 
: (FreeBSD tested for /usr/bin/objformat).

This is used by my patches to libtool which have been integrated into the
libtool source base:

    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null
        ...a.out (or other non-ELF format) system...
    else
        ...ELF system...
    fi

I suggest using the "if ..." statement above verbatim; there are issues
about host portability (such as lack of "grep -q") which are already
addressed by this precise syntax.

-- 
-- Todd Vierling (tv@pobox.com)