]>
Commit | Line | Data |
---|---|---|
5431ee70 ER |
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 | |
3 | @@ -183,6 +183,10 @@ | |
5131293d ER |
4 | #define _PATH_HRSW_directory "/var/db/pkg" |
5 | #endif | |
6 | ||
5431ee70 ER |
7 | +#if defined(RPM_HRMIB_PATH) |
8 | +#define _PATH_HRSW_directory RPM_HRMIB_PATH | |
9 | +#endif | |
5131293d ER |
10 | + |
11 | void | |
12 | init_hr_swinst(void) | |
13 | { | |
849c236b AM |
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 | |
16 | @@ -261,20 +261,34 @@ | |
17 | # RPM checks | |
18 | # | |
19 | ## | |
5431ee70 | 20 | -AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h) |
849c236b | 21 | - |
5431ee70 ER |
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) | |
24 | - | |
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]) | |
28 | - else | |
29 | - with_rpm=no | |
30 | - fi | |
849c236b AM |
31 | -fi |
32 | - | |
5431ee70 | 33 | # |
849c236b AM |
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 | |
38 | + changequote(, ) | |
39 | + RPM_HRMIB_PATH=$($RPM -E %{_hrmib_path} | sed -e 's,/[^/]\+$,,') | |
40 | + changequote([, ]) | |
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]) | |
43 | + fi | |
44 | + fi | |
45 | +fi | |
46 | +# otherwise try binary linkin | |
47 | +if test -z "$RPM_HRMIB_PATH"; then | |
48 | + AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h) | |
49 | + | |
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) | |
52 | + | |
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]) | |
56 | + else | |
57 | + with_rpm=no | |
58 | + fi | |
59 | + fi | |
60 | + | |
5431ee70 ER |
61 | # rpm libraries only needed for the host resources mib software |
62 | # installed tables (on linux in particular) | |
63 | # | |
849c236b AM |
64 | @@ -319,7 +333,14 @@ |
65 | LMIBLIBS="$_rpmlibs $LMIBLIBS" | |
66 | CFLAGS="$CFLAGS -I/usr/include/rpm" | |
67 | ],, $LMIBLIBS, _rpmlibs) | |
68 | -fi | |
69 | + OLDLIBS=$LIBS | |
70 | + LIBS=$LMIBLIBS | |
71 | + AC_CHECK_FUNCS(rpmGetPath) | |
5431ee70 | 72 | + LIBS=$OLDLIBS |
849c236b AM |
73 | + |
74 | + fi | |
5431ee70 ER |
75 | + |
76 | +fi # with rpmlib | |
5431ee70 | 77 | |
849c236b AM |
78 | ## |
79 | # mysql | |
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 | |
82 | @@ -67,15 +67,6 @@ | |
83 | # (Agent) | |
84 | ## | |
85 | ||
86 | -# rpmGetPath check needs clean LIBS environment (Linux) | |
87 | -# | |
5431ee70 | 88 | -if test "x$with_rpm" != "xno" && \ |
849c236b AM |
89 | - echo " $module_list " | $GREP " host/hr_swinst " > /dev/null; then |
90 | - OLDLIBS=$LIBS | |
91 | - LIBS=$LMIBLIBS | |
92 | - AC_CHECK_FUNCS(rpmGetPath) | |
93 | - LIBS=$OLDLIBS | |
5431ee70 ER |
94 | -fi |
95 | ||
849c236b AM |
96 | # statfs( char *, struct fs_data* ) (Ultrix) |
97 | # | |
98 |