Diff

Differences From Artifact [a03ae74853]:

To Artifact [5539a13b22]:


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
156
157
158
159
160
161
162
163
164

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
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







-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-









-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-








	AC_DEFINE([NANO_TCL_HAVE_OPENMP], [1], [Define if you have support for OpenMP])
])

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);
		XAX_CHECK_FUNC_IN_LIB(windows.h wincrypt.h, -ladvapi32, CryptGenRandom)
				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_WINDOWS_H, [1], [Define if we have <windows.h>])
			AC_DEFINE(HAVE_WINCRYPT_H, [1], [Define if we have <wincrypt.h>])
			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)
	])
], [
	AC_CACHE_CHECK([for getaddrinfo on Windows], nanotcl_cv_func_getaddrinfo, [
	XAX_CHECK_FUNC_IN_LIB(ws2tcpip.h windows.h, -lws2_32, getaddrinfo, [
		save_LIBS="${LIBS}"
		LIBS="${save_LIBS} -lws2_32"
		AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <ws2tcpip.h>
		XAX_CHECK_FUNC_IN_LIB(ws2tcpip.h windows.h, -lws2_32, getnameinfo)
#include <windows.h>
		]], [[
			int gai_ret;
			gai_ret = getaddrinfo(NULL, NULL, NULL, NULL);
			if (gai_ret == 0) {
				return(1);
			} else {
				return(0);
			}
		]])], [
			nanotcl_cv_func_getaddrinfo='yes'
		], [
			nanotcl_cv_func_getaddrinfo='no'
		])
	])
		LIBS="${save_LIBS}"
	])
	if test "x$nanotcl_cv_func_getaddrinfo" = 'xyes'; then
		LIBS="${LIBS} -lws2_32"
		AC_DEFINE(HAVE_GETADDRINFO, [1], [Define if we have getaddrinfo])
		AC_DEFINE(HAVE_GETNAMEINFO, [1], [Define if we have getnameinfo])
		AC_DEFINE(HAVE_WINDOWS_H, [1], [Define if we have <windows.h>])
		AC_DEFINE(HAVE_WS2TCPIP_H, [1], [Define if we have <ws2tcpip.h>])
	fi
])

dnl Handle specifying where TCLLIB is, for testing
AC_SUBST(TCLLIB_PATH)
TCLLIB_PATH='/dev/null'
AC_ARG_WITH([tcllib-path], AS_HELP_STRING([--with-tcllib-path], [Specify a path to Tcllib for the test suite]), [
	if test "$withval" != "no" -a "$withval" != "yes"; then