Ethereal-dev: [Ethereal-dev] Ethereal 0.9.0 acinclude.m4 patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Albert Chin <ethereal-dev@xxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Jan 2002 12:17:32 -0600
No need to use the internal $ac_cv_func_xxx name.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)

-- snip snip
--- acinclude.m4.orig	Thu Jan  3 11:35:27 2002
+++ acinclude.m4	Thu Jan  3 11:40:17 2002
@@ -209,10 +204,8 @@
     # needs -lnsl.
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@xxxxxxxxx.
-    AC_CHECK_FUNC(gethostbyname)
-    if test $ac_cv_func_gethostbyname = no; then
-      AC_CHECK_LIB(nsl, gethostbyname, NSL_LIBS="-lnsl")
-    fi
+    AC_CHECK_FUNC(gethostbyname, ,
+	AC_CHECK_LIB(nsl, gethostbyname, NSL_LIBS="-lnsl"))
     AC_SUBST(NSL_LIBS)
 ])
 
@@ -239,11 +232,9 @@
     # gethostby* variants that don't use the nameserver (or something).
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
-    AC_CHECK_FUNC(connect)
-    if test $ac_cv_func_connect = no; then
+    AC_CHECK_FUNC(connect, ,
       AC_CHECK_LIB(socket, connect, SOCKET_LIBS="-lsocket",
-		AC_MSG_ERROR(Function 'socket' not found.), $NSL_LIBS)
-    fi
+		AC_MSG_ERROR(Function 'socket' not found.), $NSL_LIBS))
     AC_SUBST(SOCKET_LIBS)
 ])