On Nov 28 2005, Tom Lane wrote:

Larry Rosenman <ler@lerctr.org> writes:
> -lnsl is needed on SVR4 derivatives, like Solaris and UnixWare. it is > the network services library.

> You'll needed it for ANY socket based code on these platforms.

Is there any specific function symbol we can test for in that library?
If it exports something like socket() or connect() on SVR4, we can make
configure probe for that instead of blindly including the library.

libsocket requires libnsl:

$ dump -Lv /usr/lib/libsocket.so|more


               ****  DYNAMIC SECTION INFORMATION ****
[INDEX]   Tag         Value

[1]       NEEDED      /usr/lib/libnsl.so.1
[2]       INIT        0xba30
[3]       SONAME      /usr/lib/libsocket.so.2
[4]       HASH        0xa0
[5]       STRTAB      0x22bc
[6]       SYMTAB      0x95c
[7]       STRSZ       0x1229
[8]       SYMENT      0x10
[9]       PLTGOT      0xec2c
[10]      PLTSZ       0x4b8
[11]      PLTREL      0x11
[12]      JMPREL      0x36d0
[13]      REL         0x34e8
[14]      RELSZ       0x1e8

So, Is there a configure check for stuff like that?

Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 3535 Gaspar Drive, Dallas, TX 75220-3611

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to