(jm_PREREQ_CANON_HOST): Move code from su/configure.in.
authorJim Meyering <jim@meyering.net>
Wed, 12 Jan 2000 08:06:27 +0000 (08:06 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 12 Jan 2000 08:06:27 +0000 (08:06 +0000)
m4/prereq.m4

index d6372a57b696e77e408b988ce9df231f1ca7af00..664d5ef20a9913ed03752ddfe48557c57ae4c197 100644 (file)
@@ -13,12 +13,17 @@ AC_DEFUN(jm_PREREQ,
 
 AC_DEFUN(jm_PREREQ_CANON_HOST,
 [
+  dnl Add any libraries as early as possible.
+  dnl In particular, inet_ntoa needs -lnsl at least on Solaris5.5.1,
+  dnl so we have to add -lnsl to LIBS before checking for that function.
+  AC_SEARCH_LIBS(gethostbyname, [inet nsl])
+
+  dnl These come from -lnsl on Solaris5.5.1.
+  AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
+
   AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
   AC_CHECK_HEADERS(unistd.h string.h netdb.h sys/socket.h \
                    netinet/in.h arpa/inet.h)
-
-  AC_HEADER_STDC
-  AC_FUNC_ALLOCA
 ])
 
 AC_DEFUN(jm_PREREQ_QUOTEARG,