--- libgcrypt-1.1.42/configure.ac~ Wed Jul 10 00:09:12 2002 +++ libgcrypt-1.1.42/configure.ac Wed Jul 10 00:09:12 2002 @@ -320,18 +320,8 @@ # Solaris needs -lsocket and -lnsl. Unisys system includes # gethostbyname in libsocket but needs libnsl for socket. -AC_CHECK_LIB(nsl, gethostbyname) -AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1) -if test x$ac_need_libsocket = x1; then - LIBS="$LIBS -lsocket" -fi -if test x$ac_try_nsl = x1; then - AC_CHECK_LIB(nsl, gethostbyname, ac_need_libnsl=1) - if test x$ac_need_libnsl = x1 - then - LIBS="$LIBS -lnsl" - fi -fi +AC_CHECK_FUNC(socket, [], AC_CHECK_LIB(socket, socket)) +AC_CHECK_FUNC(gethostbyname, [], AC_CHECK_LIB(nsl, gethostbyname)) ################################## #### Checks for header files. ####