diff options
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) |