]> sjero.net Git - wget/blobdiff - configure.in
[svn] Upgrade libtool to 1.4.
[wget] / configure.in
index dea539929fdd5641314ad303dc90f89a1d37234d..ee755dfa275a138192a74186662c826094741dae 100644 (file)
@@ -83,12 +83,6 @@ dnl Find a good install
 dnl
 AC_PROG_INSTALL
 
-dnl
-dnl Configure our included libtool and make sure it's regenerated when needed
-dnl
-AM_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
-
 dnl
 dnl Find the compiler
 dnl
@@ -121,6 +115,12 @@ dnl Handle AIX
 dnl
 AC_AIX
 
+dnl
+dnl Configure our included libtool and make sure it's regenerated when needed
+dnl
+AC_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+
 dnl
 dnl In case of {cyg,gnu}win32.  Should be a _target_ test.
 dnl Might also be erelevant for DJGPP.
@@ -176,14 +176,27 @@ AC_CHECK_FUNCS(gettimeofday mktime strptime)
 AC_CHECK_FUNCS(strerror snprintf vsnprintf select signal symlink access isatty)
 AC_CHECK_FUNCS(uname gethostname)
 
-AC_CHECK_FUNCS(gethostbyname, [], [
-  AC_CHECK_LIB(nsl, gethostbyname)
-])
-
 dnl
 dnl Checks for libraries.
 dnl
 
+dnl On Solaris, -lnsl is needed to use gethostbyname.  On "NCR MP-RAS
+dnl 3.0", however, gethostbyname is in libc, but -lnsl is still needed
+dnl to use -lsocket, as well as for functions such as inet_ntoa.  We
+dnl look for such known offenders and if one of them is not found, we
+dnl check if -lnsl is needed.
+
+wget_check_in_nsl=NONE
+AC_CHECK_FUNCS(gethostbyname, [], [
+  wget_check_in_nsl=gethostbyname
+])
+AC_CHECK_FUNCS(inet_ntoa, [], [
+  wget_check_in_nsl=inet_ntoa
+])
+if test $wget_check_in_nsl != NONE; then
+  AC_CHECK_LIB(nsl, $wget_check_in_nsl)
+fi
+
 AC_CHECK_LIB(socket, socket)
 
 dnl #### This appears to be deficient with later versions of SOCKS.