[12454] | 1 | |
---|
| 2 | # Originally by John Hawkinson <jhawk@mit.edu> |
---|
| 3 | # Under Solaris, those |
---|
| 4 | # applications need to link with "-lsocket -lnsl". Under IRIX, they |
---|
| 5 | # need to link with "-lnsl" but should *not* link with "-lsocket" |
---|
| 6 | # because libsocket.a breaks a number of things (for instance, |
---|
| 7 | # gethostbyname() under IRIX 5.2, and snoop sockets under most versions |
---|
| 8 | # of IRIX). |
---|
| 9 | # |
---|
| 10 | # The check for libresolv is in case you are attempting to link |
---|
| 11 | # statically and happen to have a libresolv.a lying around (and no |
---|
| 12 | # libnsl.a). An example of such a case would be Solaris with |
---|
| 13 | # BIND 4.9.5 installed. |
---|
| 14 | |
---|
| 15 | AC_DEFUN(AC_CHECK_NETLIBS, |
---|
| 16 | [AC_CHECK_FUNC(gethostbyname, , |
---|
| 17 | AC_CHECK_LIB(nsl, gethostbyname, , |
---|
| 18 | AC_CHECK_LIB(resolv, gethostbyname))) |
---|
| 19 | AC_CHECK_FUNC(socket, , |
---|
| 20 | AC_CHECK_LIB(socket, socket)) |
---|
| 21 | ]) |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | # This checks for the function ruserpass. |
---|
| 25 | # |
---|
| 26 | # 1) first, check for ruserpass |
---|
| 27 | # 2) else, check for _ruserpass |
---|
| 28 | # 3) else, check for _ruserpass in libsocket |
---|
| 29 | # 4) else, build version of ruserpass in nmh/sbr |
---|
| 30 | AC_DEFUN(AC_CHECK_RUSERPASS, |
---|
| 31 | [AC_CHECK_FUNC(ruserpass, , |
---|
| 32 | AC_CHECK_FUNC(_ruserpass, , |
---|
| 33 | AC_CHECK_LIB(socket, _ruserpass))) |
---|
| 34 | if test x$ac_cv_func_ruserpass = xno; then |
---|
| 35 | if test x$ac_cv_func__ruserpass = xyes -o x$ac_cv_lib_socket__ruserpass = xyes; then |
---|
| 36 | AC_DEFINE(ruserpass, _ruserpass) |
---|
| 37 | else |
---|
| 38 | LIBOBJS="$LIBOBJS ruserpass.o" |
---|
| 39 | fi |
---|
| 40 | fi |
---|
| 41 | ]) |
---|