gabriel rosenkoetter on Mon, 13 May 2002 16:02:19 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Mac OS/X, Darwin and Opensource software...


On Mon, May 13, 2002 at 03:26:35PM -0400, Kyle R . Burton wrote:
> I've got a user who is trying to build some software I wrote on a Mac system
> with Darwin (Gnu compatibility software?).  One of the problems we've
> run into involves a difference in how the compiler sees the return value of
> memcpy().  On my Linux system _and_ on the Mac system it's documented to
> return a void*.  Though when the user built the software in question, the
> compiler errored on code that assigned the output of memcpy() to a pointer
> variable.

So cast it.

(Without a more specific description of the problem, I can't give a
more specific answer than that.)

> Another issue that we're currently working through is that apparently some
> of the standard include files (libintl.h in this case) are not located
> in any standard directory I've ever seen (I think it's in /sw/include).

So use -I/sw/include. You'll probably also want -L/sw/lib for the C
compiler and -l<libname>,-R/sw/lib for the linker. (Unless you're
going to use LD_LIBRARY_PATH. But don't.)

> Does anyone have experience building software written to use the GNU autoconf
> tools on a Mac?  Or have expertiese with autoconf?  I'd like to ultimately
> have the configure script for the software take these differecnes into account
> so that it will build on OS/X systems.

Default autoconf setup takes --with-{c,cpp,ld}flags arguments. Isn't
that enough?

Hardcoding some weird-ass vendor's paths into your configure script
isn't such a great idea, especially since they tend to move them
around.

If you're going to do this, though, you might consider also
accounting for /opt on SysV-style systems, /usr/pkg on NetBSD (and
BSD/OS? and OpenBSD?) systems, /usr/port on FreeBSD systems(?)...
there's yet another path that Tru 64 uses, but I don't have access
to any Tru 64 systems at the moment to check.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpJDkTOx6xQl.pgp
Description: PGP signature