This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Solaris and socket library
- From: jling at cmmt dot ubc dot ca
- To: Russ Allbery <rra at stanford dot edu>
- Cc: automake at gnu dot org
- Date: Fri, 16 Jan 2004 21:45:28 -0800
- Subject: Re: Solaris and socket library
- Reply-to: jling at bioinformatics dot ubc dot ca
Thank you for sharing your configuration. I will definitely look more
closely at these macros.
John Ling
----- Original Message -----
From: Russ Allbery <rra@stanford.edu>
Date: Friday, January 16, 2004 6:55 pm
Subject: Re: Solaris and socket library
> John Ling <jling@bioinformatics.ubc.ca> writes:
>
> > Now the solution was to add a -lsocket to the linking options. But,
> > should this not be something that autoconf or automake suite of
> tools> detect and automatically handle for me? Do I need to
> manually add this
> > only when I run on Solaris?
>
> I use this:
>
> dnl The rat's nest of networking libraries. The common cases are
> not to
> dnl need any extra libraries, or to need -lsocket -lnsl. We need
> to avoid
> dnl linking with libnsl unless we need it, though, since on some
> OSes where
> dnl it isn't necessary it will totally break networking. Unisys also
> dnl includes gethostbyname in libsocket but needs libnsl for socket().
> AC_SEARCH_LIBS([gethostbyname], [nsl])
> AC_SEARCH_LIBS([socket], [socket], ,
> [AC_CHECK_LIB([nsl], [socket], LIBS="$LIBS -lsocket -lnsl", , -
> lsocket)])
> in configure.ac.
>
> --
> Russ Allbery (rra@stanford.edu) <"
> target="l">http://www.eyrie.org/~eagle/>
>
>