Ethereal-dev: [Ethereal-dev] 0.10.2 patch for AIX 5.1

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: Wed, 25 Feb 2004 16:50:29 -0600
The patch below is required to get Ethereal 0.10.2 to build on AIX 5.1
with libpcap-0.8.1.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)

-- snip snip
--- acinclude.m4.orig	Tue Feb 24 11:26:39 2004
+++ acinclude.m4	Wed Feb 25 16:17:45 2004
@@ -324,8 +319,28 @@
 	  [
 	    PCAP_LIBS=-lpcap
 	    AC_DEFINE(HAVE_LIBPCAP, 1, [Define to use libpcap library])
-	  ], [AC_MSG_ERROR(Library libpcap not found.)],
-	  $SOCKET_LIBS $NSL_LIBS)
+	  ], [
+	    AC_MSG_CHECKING([for pcap_open_live in -lpcap -lcfg -lodm])
+	    ac_save_LIBS="$LIBS"
+	    LIBS="-lpcap -lcfg -lodm"
+	    AC_TRY_LINK(
+		[
+#	include <pcap.h>
+		],
+		[
+	pcap_open_live(NULL, 0, 0, 0, NULL);
+		],
+		[
+		AC_MSG_RESULT([yes])
+		PCAP_LIBS="-lpcap -lcfg -lodm"
+		AC_DEFINE(HAVE_LIBPCAP, 1, [Define to use libpcap library])
+		],
+		[
+		AC_MSG_RESULT([no])
+		AC_MSG_ERROR([Library libpcap not found.])
+		])
+	    LIBS=$ac_save_LIBS
+	  ], $SOCKET_LIBS $NSL_LIBS)
 	AC_SUBST(PCAP_LIBS)
 
 	#