autoconf
[Top][All Lists]
Advanced

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

Re: Advice for building threading & socket support


From: Hal Snyder
Subject: Re: Advice for building threading & socket support
Date: Wed, 19 May 2004 11:57:45 -0500
User-agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (berkeley-unix)

Stony Yakovac <address@hidden> writes:

> I have run into a problem that I can solve, but I don't know how to
> get the GNU environment to help me solve it for both Linux and
> Solaris, but it seems like autoconf, configure, and automake ought
> to be able to offer something. I use threads and sockets in the
> code. On Linux, that just compiles and works. Matter of fact, it
> requires that there NOT be a -lsocket switch. On Solaris, it needs
> the -lsocket to link.


For -lsocket, I use the recommendation from 
http://mail.gnu.org/archive/html/autoconf/2002-10/msg00085.html
namely,

AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(socket, socket, ,
    [AC_CHECK_LIB(nsl, socket, LIBS="$LIBS -lsocket -lnsl", , -lsocket)])

For threads, it helps to use or at least look at ACX_PTHREAD from the
GNU Autoconf Macro Archive at
http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html


Now, in view of Steve Huston's reply, I'll be looking into the ACE kit
as well.




reply via email to

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