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@9343 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3215cc2938
commit
0fcb9e106c
1 changed files with 10 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue