1 --- net-snmp-5.4.1/agent/mibgroup/host/hr_swinst.c 2008-05-15 13:05:07.575307614 +0300
2 +++ net-snmp-5.4.1.hrmib/agent/mibgroup/host/hr_swinst.c 2008-05-15 13:04:24.676830108 +0300
4 #define _PATH_HRSW_directory "/var/db/pkg"
7 +#if defined(RPM_HRMIB_PATH)
8 +#define _PATH_HRSW_directory RPM_HRMIB_PATH
14 --- net-snmp-5.5/configure.d/config_os_libs~ 2010-05-12 14:31:17.751301337 +0200
15 +++ net-snmp-5.5/configure.d/config_os_libs 2010-05-12 14:34:11.694627717 +0200
20 -AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h)
22 -AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no)
23 -AC_CHECK_HEADER(rpm/header.h,rpmheader_h=yes,rpmheader_h=no)
25 -if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then
26 - if test "x$with_rpm" = "xyes" ; then
27 - AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support])
34 +# check if we can use rpm hrmib export
35 +if test "$with_rpm" != "no" ; then
36 + AC_PATH_PROG([RPM], rpm)
37 + if test -n "$RPM"; then
39 + RPM_HRMIB_PATH=$($RPM -E %{_hrmib_path} | sed -e 's,/[^/]\+$,,')
41 + if test -n "$RPM_HRMIB_PATH"; then
42 + AC_DEFINE_UNQUOTED([RPM_HRMIB_PATH], ["$RPM_HRMIB_PATH"], [Directory where RPM exports packages hrmib information])
46 +# otherwise try binary linkin
47 +if test -z "$RPM_HRMIB_PATH"; then
48 + AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h)
50 + AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no)
51 + AC_CHECK_HEADER(rpm/header.h,rpmheader_h=yes,rpmheader_h=no)
53 + if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then
54 + if test "x$with_rpm" = "xyes" ; then
55 + AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support])
61 # rpm libraries only needed for the host resources mib software
62 # installed tables (on linux in particular)
65 LMIBLIBS="$_rpmlibs $LMIBLIBS"
66 CFLAGS="$CFLAGS -I/usr/include/rpm"
67 ],, $LMIBLIBS, _rpmlibs)
71 + AC_CHECK_FUNCS(rpmGetPath)
80 --- net-snmp-5.5/configure.d/config_os_functions~ 2009-07-26 20:20:55.000000000 +0200
81 +++ net-snmp-5.5/configure.d/config_os_functions 2010-05-12 14:35:39.421276242 +0200
86 -# rpmGetPath check needs clean LIBS environment (Linux)
88 -if test "x$with_rpm" != "xno" && \
89 - echo " $module_list " | $GREP " host/hr_swinst " > /dev/null; then
92 - AC_CHECK_FUNCS(rpmGetPath)
96 # statfs( char *, struct fs_data* ) (Ultrix)