117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
AC_DEFINE([NANO_TCL_HAVE_OPENMP], [1], [Define if you have support for OpenMP])
fi
dnl Random number generation mechanisms
AC_CHECK_FUNCS(getrandom,, [
AC_CHECK_FUNCS(getentropy,, [
AC_CHECK_FUNCS(CryptGenRandom)
])
])
dnl Check for name resolution capabilities
AC_CHECK_FUNCS(getaddrinfo, [
AC_CHECK_FUNCS(getnameinfo, [
AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
|
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
156
|
AC_DEFINE([NANO_TCL_HAVE_OPENMP], [1], [Define if you have support for OpenMP])
fi
dnl Random number generation mechanisms
AC_CHECK_FUNCS(getrandom,, [
AC_CHECK_FUNCS(getentropy,, [
AC_CACHE_CHECK([for CryptGenRandom], nanotcl_cv_func_CryptGenRandom, [
save_LIBS="${LIBS}"
LIBS="${save_LIBS} -ladvapi32"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <windows.h>
#include <wincrypt.h>
]], [[
HCRYPTPROV provider;
BOOL ret;
ret = CryptGenRandom(provider, 0, NULL);
if (ret) {
return(0);
} else {
return(1);
}
]])], [
nanotcl_cv_func_CryptGenRandom='yes'
], [
nanotcl_cv_func_CryptGenRandom='no'
])
LIBS="${save_LIBS}"
])
if test "x$nanotcl_cv_func_CryptGenRandom" = 'xyes'; then
LIBS="${LIBS} -ladvapi32"
AC_DEFINE(HAVE_CRYPTGENRANDOM, [1], [Define if we have CryptGenRandom])
fi
])
])
dnl Check for name resolution capabilities
AC_CHECK_FUNCS(getaddrinfo, [
AC_CHECK_FUNCS(getnameinfo, [
AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
|