[Nut-upsdev] patch for m4/nut_check_libnetsnmp.m4

Tim Rice tim at multitalents.net
Tue Dec 15 23:03:17 UTC 2009


On Tue, 15 Dec 2009, Arjen de Korte wrote:

> Citeren Tim Rice <tim at multitalents.net>:
> 
> > It looks like the change to m4/nut_check_libnetsnmp.m4 in r1968 broke
> > the test on at least Solaris 10. Here is one possible fix.
> 
> Thanks for the report. AC_CHECK_HEADER is probably easier to use here (and
> AC_TRY_CPP is obsolete, so we really shouldn't use that).

I should have caught that.
This works. (and my old patch had a typo so was broken)
-------------------------
--- nut-svn/m4/nut_check_libnetsnmp.m4.old	2009-12-15 09:30:48.000000000 -0800
+++ nut-svn/m4/nut_check_libnetsnmp.m4	2009-12-15 14:48:58.382895000 -0800
@@ -38,7 +38,7 @@
    fi
 
    AC_MSG_CHECKING(for Net-SNMP headers)
-   AC_TRY_CPP([#include <net-snmp/net-snmp-config.h>],
+   AC_CHECK_HEADER([net-snmp/net-snmp-config.h],
 			[AC_MSG_RESULT(yes)
 			],
 			[AC_MSG_RESULT(no)
-------------------------

> 
> Best regards, Arjen
> 

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net





More information about the Nut-upsdev mailing list