Ethereal-dev: [Ethereal-dev] [PATCH] configure.in: --with-net-snmp

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

From: Thomas Anders <thomas.anders@xxxxxxxxxxxxx>
Date: Fri, 14 May 2004 23:11:14 +0200
In 0.10.4 configure gives strange warnings if one uses
"--with-net-snmp=/path/to/dir" (instead of /path/to/net-snmp-config)
by accident. The attached patch fixes this. configure now fully
supports "--with-net-snmp=/path/to/dir" for consistency with other
configure options and to better meet user expectations.

Objections?


+Thomas

--
Thomas Anders <thomas.anders@xxxxxxxxxxxxx>

--- configure.in.FCS	2004-05-14 00:38:02.000000000 +0200
+++ configure.in	2004-05-14 22:52:17.000000000 +0200
@@ -659,8 +659,11 @@
 		AC_PATH_PROG(NETSNMPCONFIG,net-snmp-config)
 	else
 		NETSNMPCONFIG=$netsnmpconfig
-		if test ! -x $NETSNMPCONFIG ; then
-			AC_MSG_ERROR(Invalid net-snmp-config: $NETSNMPCONFIG)
+		if test ! -x $NETSNMPCONFIG -o ! -f $NETSNMPCONFIG ; then
+		        NETSNMPCONFIG=$netsnmpconfig/bin/net-snmp-config
+			if test ! -x $NETSNMPCONFIG -o ! -f $NETSNMPCONFIG ; then
+				AC_MSG_ERROR(Invalid net-snmp-config: $netsnmpconfig)
+			fi
 		fi
 	fi
 else