File: config_os_misc2

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 (155 lines) | stat: -rw-r--r-- 4,747 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# -*- autoconf -*-
#########################################
##
# Miscellaneous checks
##
#########################################

##
#   Package characteristics
#       Authentication/Encryption support
##

#       Check for PKCS11
#
AC_MSG_CHECKING([for authentication support])
useopenssl=no
usepkcs=no
if test "x$ac_cv_lib_pkcs11_C_Initialize" != "xyes" -o "x$ac_cv_header_security_cryptoki_h" != "xyes"; then
    if test "x$askedpkcs" = "xyes"; then
        AC_MSG_ERROR(Asked to use PKCS11 but I couldn't find it.)
    fi
else
    if test "x$askedpkcs" = "xyes"; then
        usepkcs=yes
    fi
fi

#       Check for OpenSSL
#
if test "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a "x$ac_cv_lib_eay32_EVP_md5" != "xyes" -o "x$ac_cv_header_openssl_hmac_h" != "xyes"; then
    if test "x$askedopenssl" = "xyes"; then
        AC_MSG_ERROR(Asked to use OpenSSL but I couldn't find it.)
    fi
else
    if test "x$askedopenssl" = "xyes"; then
        useopenssl=yes
    elif test "x$tryopenssl" = "xyes"; then
        if test "x$usepkcs" != "xyes"; then
            useopenssl=yes
        fi
    fi
fi

#       Available authentication/encryption modes
#
if test "x$CRYPTO" = "xinternal" ; then
    authmodes="MD5 SHA1"
    if test "x$enable_privacy" != "xno" ; then
        encrmodes="DES AES"
    else
        encrmodes="[disabled]"
    fi
    AC_DEFINE(NETSNMP_USE_INTERNAL_CRYPTO, 1, "Define if internal cryptography code should be used")
    AC_MSG_RESULT(Internal Crypto Support)
elif test "x$useopenssl" != "xno" ; then
    authmodes="MD5 SHA1"
    if test "x$ac_cv_func_EVP_sha224" = xyes; then
        authmodes="$authmodes SHA224 SHA256"
    fi
    if test "x$ac_cv_func_EVP_sha384" = xyes; then
        authmodes="$authmodes SHA384 SHA512"
    fi
    if test "x$enable_privacy" != "xno" ; then
        if test "x$ac_cv_header_openssl_aes_h" = "xyes" ; then
            encrmodes="DES AES"
	else
	    encrmodes="DES"
	fi
    else
        encrmodes="[disabled]"
    fi
    AC_DEFINE(NETSNMP_USE_OPENSSL)
    LNETSNMPLIBS="$LNETSNMPLIBS $LIBCRYPTO"
    AC_MSG_RESULT(OpenSSL Support)
elif test "x$usepkcs" != "xno" ; then
    authmodes="MD5 SHA1"
    if test "x$enable_privacy" != "xno" ; then
        encrmodes="DES"
    else
        encrmodes="[disabled]"
    fi
    AC_DEFINE(NETSNMP_USE_PKCS11, 1,
      [Define if you are using the codeS11 library ...])
    LNETSNMPLIBS="$LNETSNMPLIBS $LIBPKCS11"
    AC_MSG_RESULT(PKCS11 Support)
elif test "x$enable_md5" != "xno"; then
    authmodes="MD5"
    encrmodes=""
    AC_DEFINE(NETSNMP_USE_INTERNAL_MD5)
    AC_MSG_RESULT(Internal MD5 Support)
fi
if test "x$enable_md5" = "xno"; then
    authmodes=`echo $authmodes | $SED 's/MD5 *//;'`
fi
if test "x$ac_cv_func_AES_cfb128_encrypt" = xyes ||
   test "x$CRYPTO" = xinternal; then
    encrmodes="$encrmodes AES128"
    if test "x$aes_capable" = "xyes"; then
        encrmodes="$encrmodes AES192 AES192C AES256 AES256C"
    fi
fi
AC_SUBST(LNETSNMPLIBS)
AC_SUBST(LAGENTLIBS)

AC_MSG_CACHE_ADD(Crypto support from:        $CRYPTO)
AC_MSG_CACHE_ADD(Authentication support:     $authmodes)
AC_MSG_CACHE_ADD(Encryption support:         $encrmodes)

if test "x$all_warnings" != "x"; then
    AC_MSG_CACHE_ADD(WARNING: $all_warnings)
fi

#
# Check whether user wants DNSSEC local validation support
#
_libs=${LIBS}
if ! test "x-$want_dnssec" = "x-no" ; then
    AC_CHECK_HEADERS([validator/validator-config.h])
    if test "$ac_cv_header_validator_validator_config_h" != yes; then
        AC_MSG_ERROR(Can't find validator.h)
    fi
    if test "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a \
            "x$ac_cv_lib_eay32_EVP_md5" != "xyes" -o \
            "x$ac_cv_header_openssl_hmac_h" != "xyes"; then
        AC_MSG_ERROR(Couldn't find OpenSSL for local DNSSEC validation support.)
    fi
    LIBS="$LIBS $LIBCRYPTO"
    AC_CHECK_LIB(sres, query_send,,AC_MSG_ERROR([Can't find libsres]))
    VAL_LIBS="-lsres $LIBCRYPTO"
    LIBS="$LIBS -lsres"
    AC_CHECK_LIB(val, p_val_status,
                 LIBS="$LIBS -lval"
                 VAL_LIBS="$VAL_LIBS -lval"
                 have_val_res_query=yes,
                 [ AC_CHECK_LIB(pthread, pthread_rwlock_init)
		   AC_CHECK_LIB(val-threads, p_val_status,
                   have_val_res_query=yes
                   LIBS="-lval-threads $LIBS"
                   VAL_LIBS="-lval-threads -lpthread $VAL_LIBS"
                   LIBVAL_SUFFIX="-threads",
                   AC_MSG_ERROR(Can't find libval or libval-threads))
                 ])
    AC_DEFINE(DNSSEC_LOCAL_VALIDATION, 1,
              [Define if you want local DNSSEC validation support])
    DNSSEC="enabled"
else
    DNSSEC="disabled"
fi

LIBS=${_libs}

AC_SUBST(VAL_LIBS)
AC_MSG_CACHE_ADD(Local DNSSEC validation:    $DNSSEC)