diff options
author | Olly Betts <olly@survex.com> | 2006-09-24 16:12:49 +0000 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2006-09-24 16:12:49 +0000 |
commit | 1e1b3ef4cf0de1553af3ee832e9a2eda3a12d3d9 (patch) | |
tree | 101997fe82f294354363701c5d799571fbdaf4bc /configure.in | |
parent | 3c935aa489dff32312e340482cc21d6690837f61 (diff) | |
download | swig-1e1b3ef4cf0de1553af3ee832e9a2eda3a12d3d9.tar.gz |
The test for -lnsl, -linet, and -lsocket was only being run on IRIX, rather
than run everywhere except IRIX. Rewritten to use AC_SEARCH_LIBS which
should avoid problems on IRIX and any other similar platform.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9343 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/configure.in b/configure.in index 3dc7139f2..f66b3b81b 100644 --- a/configure.in +++ b/configure.in @@ -324,20 +324,16 @@ fi AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX -# The following three (nsl,inet,socket) are needed on Sequent; -# the order of checking must be this. Most SVR4 platforms will -# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but -# broken. I see no elegant solution (probably CHECK_LIB should be -# fixed to only add the library if the given entry point is not -# satisfied without it). -case $host in -*-*-irix*) -AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4 -AC_CHECK_LIB(inet, gethostbyname, [LIBS="-linet $LIBS"], [], -lnsl) # Sequent -AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets -;; -esac - +dnl The following three libraries (nsl,inet,socket) are needed on Sequent, +dnl and must be checked for in this order since each library depends on the +dnl preceding one. +dnl +dnl Most SVR4 platforms will need -lsocket and -lnsl. However on SGI IRIX 5, +dnl these exist but are broken, so we use AC_SEARCH_LIBS which will only try +dnl the library if the function isn't already available without it. +AC_SEARCH_LIBS(t_open, nsl) # SVR4 +AC_SEARCH_LIBS(gethostbyname, inet) # Sequent +AC_SEARCH_LIBS(socket, socket) # SVR4 sockets AC_CHECK_LIB(swill, swill_init, [SWIGLIBS="-lswill $LIBS" SWILL="-DSWIG_SWILL"]) AC_SUBST(SWIGLIBS) |