Subject: Re: More on shared objects problem
To: None <current-users@netbsd.org>
From: Todd Vierling <tv@pobox.com>
List: current-users
Date: 07/27/1999 14:00:28
On Tue, 27 Jul 1999, D'Arcy J.M. Cain wrote:

(Note that pgsql-hackers is not in my To: header, as I'm not on the list and
cannot post.)

: So how do we determine that a system is elf?  I don't see it in uname.  Do
: we just run file(1) on the kernel and see if the string "ELF" shows up?

On NetBSD, the following will do it.  This may even be platform independednt
if "grep -q" is replaced by "grep >/dev/null 2>&1".

if echo __ELF__ | ${CC} -E - | grep -q __ELF__; then
  ... a.out action ...
else
  ... ELF action ...
fi

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