Re: More on shared objects problem

Todd Vierling <tv@pobox.com>

From: Todd Vierling <tv@pobox.com>
To: current-users@netbsd.org
Date: 1999-07-27T18:00:28Z
Lists: pgsql-hackers
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)