autoconf
[Top][All Lists]
Advanced

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

functions in different libraries on different OSes.


From: Ollie Cook
Subject: functions in different libraries on different OSes.
Date: Wed, 9 Oct 2002 21:03:17 +0100
User-agent: Mutt/1.3.28i

Hi,

I am new to autoconf/automake so my questions may appear naive - apologies if
that is the case.

I have written some software which I have released, but it is not very portable
(currently does not compile under Solaris).

One of the reasons for this is that it uses the socket() function. Under
FreeBSD this is in libc, and requires the following header files to be
included:

     #include <sys/types.h>
     #include <sys/socket.h>

The same is also true of GNU/Linux.

However, under Solaris (SunOS 5.6) you must compile againt -lxnet and include
only

     #include <sys/socket.h>

There may be other methods of getting socket() on other OSes, for all I know.

What is the correct way to diagnose how to get socket(), or any other function,
on a given OS, and to build the software appropriately, using autoconf?

Any pointers would be greatly appreciated.

Yours,

Ollie

-- 
Oliver Cook    Systems Administrator, ClaraNET
address@hidden               020 7903 3065




reply via email to

[Prev in Thread] Current Thread [Next in Thread]