File: config_os_libs1

package info (click to toggle)
net-snmp 5.9+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 36,760 kB
  • sloc: ansic: 283,039; perl: 17,712; sh: 11,887; makefile: 2,705; xml: 663; python: 623; pascal: 62; sql: 47
file content (123 lines) | stat: -rw-r--r-- 3,349 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# -*- autoconf -*-
#########################################
##
# Checks for libraries that are run
# before the agent module tests.
##
#########################################


##
#   RPM checks
#
##
AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h)

AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no)
AC_CHECK_HEADER(rpm/header.h,rpmheader_h=yes,rpmheader_h=no)

if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then
  if test "x$with_rpm" = "xyes" ; then
    AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support])
  else
    with_rpm=no
  fi
fi

#
# rpm libraries only needed for the host resources mib software
# installed tables (on linux in particular)
#
if test "x$with_rpm" != "xno"; then
  # ARG.  RPM is a real pain.
  # FWIW librpm.la, librpmio.la, and libpopt.la have correct dependencies.
  _rpmlibs=""

  # rpm-4.0.x needs rpmio.
  NETSNMP_SEARCH_LIBS(rpmGetPath, rpmio,,, $LMIBLIBS, _rpmlibs)
  
  # rpm-4.0.3 librpmdb actually contains what we need.
  NETSNMP_SEARCH_LIBS(rpmdbOpen, rpmdb,,, $LMIBLIBS, _rpmlibs)
  # now check for rpm using the appropriate libraries.
  NETSNMP_SEARCH_LIBS(rpmReadConfigFiles, rpm, [
    AC_DEFINE(HAVE_LIBRPM, 1,
      [Define to 1 if you have the `rpm' library (-lrpm).])
    LMIBLIBS="$_rpmlibs $LMIBLIBS"
  ],, $LMIBLIBS, _rpmlibs)

  # rpm 4.6 has incompatible API, turn on the legacy one
  NETSNMP_SEARCH_LIBS(headerGet,, [
    AC_DEFINE(HAVE_HEADERGET, 1,
      [Define to 1 if you have the headerGet function.])],, $LMIBLIBS)
fi

#
# getfsstat/getvfsstat
#
AC_SEARCH_LIBS(getfsstat, [nbutil])
AC_CHECK_FUNCS(getfsstat)
AC_CHECK_FUNCS(getvfsstat)
AC_FUNC_GETMNTENT

#
# kinfo_get_cpus
#
AC_SEARCH_LIBS(kinfo_get_cpus, [kinfo])
AC_CHECK_FUNCS(kinfo_get_cpus)

#
# diskIOLAx requires exp which may require -lm
#
NETSNMP_SEARCH_LIBS([exp], [m],,,, [LMIBLIBS])

#
#   libkvm
#
NETSNMP_SEARCH_LIBS(kvm_read, kvm,,,, LAGENTLIBS)
NETSNMP_SEARCH_LIBS(kvm_openfiles, kvm,,,, LAGENTLIBS)
NETSNMP_SEARCH_LIBS(kvm_getprocs, kvm,,,, LMIBLIBS)
NETSNMP_SEARCH_LIBS(kvm_getproc2, kvm,,,, LMIBLIBS)
NETSNMP_SEARCH_LIBS(kvm_getfiles, kvm,,,, LMIBLIBS)
NETSNMP_SEARCH_LIBS(kvm_getfile2, kvm,,,, LMIBLIBS)
NETSNMP_SEARCH_LIBS(kvm_getswapinfo, kvm,,,, LMIBLIBS)
netsnmp_save_LIBS="$LIBS"
LIBS="$LAGENTLIBS $LMIBLIBS $LIBS"
AC_CHECK_FUNCS([kvm_openfiles kvm_getprocs kvm_getproc2 kvm_getswapinfo kvm_getfiles kvm_getfile2])
LIBS="$netsnmp_save_LIBS"

#
#   dynamic module support
#
NETSNMP_SEARCH_LIBS([dlopen], [dl],,, [$LAGENTLIBS $LSNMPLIBS], [LMIBLIBS])
netsnmp_save_LIBS="$LIBS"
LIBS="$LMIBLIBS $LAGENTLIBS $LSNMPLIBS $LIBS"
AC_CHECK_FUNCS([dlopen])
LIBS="$netsnmp_save_LIBS"

#
#   regex in process table
#
if test "x$with_pcre" != "xno"; then
  AC_CHECK_HEADER([pcre.h], [
      AC_DEFINE([HAVE_PCRE_H], [1], [Define to 1 if you have <pcre.h>.])
      pcre_h=yes
    ],
    [pcre_h=no]
  )
fi
if test "x$pcreheader_h" = "xno" -o "x$pcre_h" = "xno" ; then
  if test "x$with_pcre" = "xyes" ; then
    AC_MSG_ERROR([Could not find the pcre header file needed and was specifically asked to use pcre support])
  else
    with_pcre=no
  fi
fi

#
# pcre libraries only needed for the ucd process agent mib software
#
NETSNMP_SEARCH_LIBS([pcre_exec], [pcre], [
  LMIBLIBS="$LMIBLIBS -lpcre"
  ],,, LAGENTLIBS)
AC_SUBST(LAGENTLIBS)
AC_SUBST(LMIBLIBS)