1 | --- a/configure |
2 | +++ b/configure |
3 | @@ -888,10 +888,6 @@ BUILD_RIPEMD_TRUE |
4 | BUILD_RIPEMD_FALSE |
5 | BUILD_SHA512_TRUE |
6 | BUILD_SHA512_FALSE |
7 | -acx_pthread_config |
8 | -PTHREAD_CC |
9 | -PTHREAD_LIBS |
10 | -PTHREAD_CFLAGS |
11 | LIBOBJS |
12 | LTLIBOBJS' |
13 | ac_subst_files='' |
14 | @@ -22251,430 +22247,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con |
15 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
16 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
17 | |
18 | -acx_pthread_ok=no |
19 | - |
20 | -# We used to check for pthread.h first, but this fails if pthread.h |
21 | -# requires special compiler flags (e.g. on True64 or Sequent). |
22 | -# It gets checked for in the link test anyway. |
23 | - |
24 | -# First of all, check if the user has set any of the PTHREAD_LIBS, |
25 | -# etcetera environment variables, and if threads linking works using |
26 | -# them: |
27 | -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then |
28 | - save_CFLAGS="$CFLAGS" |
29 | - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
30 | - save_LIBS="$LIBS" |
31 | - LIBS="$PTHREAD_LIBS $LIBS" |
32 | - { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 |
33 | -echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; } |
34 | - cat >conftest.$ac_ext <<_ACEOF |
35 | -/* confdefs.h. */ |
36 | -_ACEOF |
37 | -cat confdefs.h >>conftest.$ac_ext |
38 | -cat >>conftest.$ac_ext <<_ACEOF |
39 | -/* end confdefs.h. */ |
40 | - |
41 | -/* Override any GCC internal prototype to avoid an error. |
42 | - Use char because int might match the return type of a GCC |
43 | - builtin and then its argument prototype would still apply. */ |
44 | -#ifdef __cplusplus |
45 | -extern "C" |
46 | -#endif |
47 | -char pthread_join (); |
48 | -int |
49 | -main () |
50 | -{ |
51 | -return pthread_join (); |
52 | - ; |
53 | - return 0; |
54 | -} |
55 | -_ACEOF |
56 | -rm -f conftest.$ac_objext conftest$ac_exeext |
57 | -if { (ac_try="$ac_link" |
58 | -case "(($ac_try" in |
59 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
60 | - *) ac_try_echo=$ac_try;; |
61 | -esac |
62 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
63 | - (eval "$ac_link") 2>conftest.er1 |
64 | - ac_status=$? |
65 | - grep -v '^ *+' conftest.er1 >conftest.err |
66 | - rm -f conftest.er1 |
67 | - cat conftest.err >&5 |
68 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
69 | - (exit $ac_status); } && { |
70 | - test -z "$ac_c_werror_flag" || |
71 | - test ! -s conftest.err |
72 | - } && test -s conftest$ac_exeext && |
73 | - $as_test_x conftest$ac_exeext; then |
74 | - acx_pthread_ok=yes |
75 | -else |
76 | - echo "$as_me: failed program was:" >&5 |
77 | -sed 's/^/| /' conftest.$ac_ext >&5 |
78 | - |
79 | - |
80 | -fi |
81 | - |
82 | -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
83 | - conftest$ac_exeext conftest.$ac_ext |
84 | - { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 |
85 | -echo "${ECHO_T}$acx_pthread_ok" >&6; } |
86 | - if test x"$acx_pthread_ok" = xno; then |
87 | - PTHREAD_LIBS="" |
88 | - PTHREAD_CFLAGS="" |
89 | - fi |
90 | - LIBS="$save_LIBS" |
91 | - CFLAGS="$save_CFLAGS" |
92 | -fi |
93 | - |
94 | -# We must check for the threads library under a number of different |
95 | -# names; the ordering is very important because some systems |
96 | -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the |
97 | -# libraries is broken (non-POSIX). |
98 | - |
99 | -# Create a list of thread flags to try. Items starting with a "-" are |
100 | -# C compiler flags, and other items are library names, except for "none" |
101 | -# which indicates that we try without any flags at all, and "pthread-config" |
102 | -# which is a program returning the flags for the Pth emulation library. |
103 | - |
104 | -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
105 | - |
106 | -# The ordering *is* (sometimes) important. Some notes on the |
107 | -# individual items follow: |
108 | - |
109 | -# pthreads: AIX (must check this before -lpthread) |
110 | -# none: in case threads are in libc; should be tried before -Kthread and |
111 | -# other compiler flags to prevent continual compiler warnings |
112 | -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) |
113 | -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
114 | -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) |
115 | -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) |
116 | -# -pthreads: Solaris/gcc |
117 | -# -mthreads: Mingw32/gcc, Lynx/gcc |
118 | -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it |
119 | -# doesn't hurt to check since this sometimes defines pthreads too; |
120 | -# also defines -D_REENTRANT) |
121 | -# ... -mt is also the pthreads flag for HP/aCC |
122 | -# pthread: Linux, etcetera |
123 | -# --thread-safe: KAI C++ |
124 | -# pthread-config: use pthread-config program (for GNU Pth library) |
125 | - |
126 | -case "${host_cpu}-${host_os}" in |
127 | - *solaris*) |
128 | - |
129 | - # On Solaris (at least, for some versions), libc contains stubbed |
130 | - # (non-functional) versions of the pthreads routines, so link-based |
131 | - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ |
132 | - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather |
133 | - # a function called by this macro, so we could check for that, but |
134 | - # who knows whether they'll stub that too in a future libc.) So, |
135 | - # we'll just look for -pthreads and -lpthread first: |
136 | - |
137 | - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" |
138 | - ;; |
139 | -esac |
140 | - |
141 | -if test x"$acx_pthread_ok" = xno; then |
142 | -for flag in $acx_pthread_flags; do |
143 | - |
144 | - case $flag in |
145 | - none) |
146 | - { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 |
147 | -echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; } |
148 | - ;; |
149 | - |
150 | - -*) |
151 | - { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 |
152 | -echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; } |
153 | - PTHREAD_CFLAGS="$flag" |
154 | - ;; |
155 | - |
156 | - pthread-config) |
157 | - # Extract the first word of "pthread-config", so it can be a program name with args. |
158 | -set dummy pthread-config; ac_word=$2 |
159 | -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 |
160 | -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } |
161 | -if test "${ac_cv_prog_acx_pthread_config+set}" = set; then |
162 | - echo $ECHO_N "(cached) $ECHO_C" >&6 |
163 | -else |
164 | - if test -n "$acx_pthread_config"; then |
165 | - ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. |
166 | -else |
167 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
168 | -for as_dir in $PATH |
169 | -do |
170 | - IFS=$as_save_IFS |
171 | - test -z "$as_dir" && as_dir=. |
172 | - for ac_exec_ext in '' $ac_executable_extensions; do |
173 | - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
174 | - ac_cv_prog_acx_pthread_config="yes" |
175 | - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
176 | - break 2 |
177 | - fi |
178 | -done |
179 | -done |
180 | -IFS=$as_save_IFS |
181 | - |
182 | - test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" |
183 | -fi |
184 | -fi |
185 | -acx_pthread_config=$ac_cv_prog_acx_pthread_config |
186 | -if test -n "$acx_pthread_config"; then |
187 | - { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 |
188 | -echo "${ECHO_T}$acx_pthread_config" >&6; } |
189 | -else |
190 | - { echo "$as_me:$LINENO: result: no" >&5 |
191 | -echo "${ECHO_T}no" >&6; } |
192 | -fi |
193 | - |
194 | - |
195 | - if test x"$acx_pthread_config" = xno; then continue; fi |
196 | - PTHREAD_CFLAGS="`pthread-config --cflags`" |
197 | - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" |
198 | - ;; |
199 | - |
200 | - *) |
201 | - { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 |
202 | -echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; } |
203 | - PTHREAD_LIBS="-l$flag" |
204 | - ;; |
205 | - esac |
206 | - |
207 | - save_LIBS="$LIBS" |
208 | - save_CFLAGS="$CFLAGS" |
209 | - LIBS="$PTHREAD_LIBS $LIBS" |
210 | - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
211 | - |
212 | - # Check for various functions. We must include pthread.h, |
213 | - # since some functions may be macros. (On the Sequent, we |
214 | - # need a special flag -Kthread to make this header compile.) |
215 | - # We check for pthread_join because it is in -lpthread on IRIX |
216 | - # while pthread_create is in libc. We check for pthread_attr_init |
217 | - # due to DEC craziness with -lpthreads. We check for |
218 | - # pthread_cleanup_push because it is one of the few pthread |
219 | - # functions on Solaris that doesn't have a non-functional libc stub. |
220 | - # We try pthread_create on general principles. |
221 | - cat >conftest.$ac_ext <<_ACEOF |
222 | -/* confdefs.h. */ |
223 | -_ACEOF |
224 | -cat confdefs.h >>conftest.$ac_ext |
225 | -cat >>conftest.$ac_ext <<_ACEOF |
226 | -/* end confdefs.h. */ |
227 | -#include <pthread.h> |
228 | -int |
229 | -main () |
230 | -{ |
231 | -pthread_t th; pthread_join(th, 0); |
232 | - pthread_attr_init(0); pthread_cleanup_push(0, 0); |
233 | - pthread_create(0,0,0,0); pthread_cleanup_pop(0); |
234 | - ; |
235 | - return 0; |
236 | -} |
237 | -_ACEOF |
238 | -rm -f conftest.$ac_objext conftest$ac_exeext |
239 | -if { (ac_try="$ac_link" |
240 | -case "(($ac_try" in |
241 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
242 | - *) ac_try_echo=$ac_try;; |
243 | -esac |
244 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
245 | - (eval "$ac_link") 2>conftest.er1 |
246 | - ac_status=$? |
247 | - grep -v '^ *+' conftest.er1 >conftest.err |
248 | - rm -f conftest.er1 |
249 | - cat conftest.err >&5 |
250 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
251 | - (exit $ac_status); } && { |
252 | - test -z "$ac_c_werror_flag" || |
253 | - test ! -s conftest.err |
254 | - } && test -s conftest$ac_exeext && |
255 | - $as_test_x conftest$ac_exeext; then |
256 | - acx_pthread_ok=yes |
257 | -else |
258 | - echo "$as_me: failed program was:" >&5 |
259 | -sed 's/^/| /' conftest.$ac_ext >&5 |
260 | - |
261 | - |
262 | -fi |
263 | - |
264 | -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
265 | - conftest$ac_exeext conftest.$ac_ext |
266 | - |
267 | - LIBS="$save_LIBS" |
268 | - CFLAGS="$save_CFLAGS" |
269 | - |
270 | - { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 |
271 | -echo "${ECHO_T}$acx_pthread_ok" >&6; } |
272 | - if test "x$acx_pthread_ok" = xyes; then |
273 | - break; |
274 | - fi |
275 | - |
276 | - PTHREAD_LIBS="" |
277 | - PTHREAD_CFLAGS="" |
278 | -done |
279 | -fi |
280 | - |
281 | -# Various other checks: |
282 | -if test "x$acx_pthread_ok" = xyes; then |
283 | - save_LIBS="$LIBS" |
284 | - LIBS="$PTHREAD_LIBS $LIBS" |
285 | - save_CFLAGS="$CFLAGS" |
286 | - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
287 | - |
288 | - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
289 | - { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 |
290 | -echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; } |
291 | - attr_name=unknown |
292 | - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do |
293 | - cat >conftest.$ac_ext <<_ACEOF |
294 | -/* confdefs.h. */ |
295 | -_ACEOF |
296 | -cat confdefs.h >>conftest.$ac_ext |
297 | -cat >>conftest.$ac_ext <<_ACEOF |
298 | -/* end confdefs.h. */ |
299 | -#include <pthread.h> |
300 | -int |
301 | -main () |
302 | -{ |
303 | -int attr=$attr; return attr; |
304 | - ; |
305 | - return 0; |
306 | -} |
307 | -_ACEOF |
308 | -rm -f conftest.$ac_objext conftest$ac_exeext |
309 | -if { (ac_try="$ac_link" |
310 | -case "(($ac_try" in |
311 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
312 | - *) ac_try_echo=$ac_try;; |
313 | -esac |
314 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
315 | - (eval "$ac_link") 2>conftest.er1 |
316 | - ac_status=$? |
317 | - grep -v '^ *+' conftest.er1 >conftest.err |
318 | - rm -f conftest.er1 |
319 | - cat conftest.err >&5 |
320 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
321 | - (exit $ac_status); } && { |
322 | - test -z "$ac_c_werror_flag" || |
323 | - test ! -s conftest.err |
324 | - } && test -s conftest$ac_exeext && |
325 | - $as_test_x conftest$ac_exeext; then |
326 | - attr_name=$attr; break |
327 | -else |
328 | - echo "$as_me: failed program was:" >&5 |
329 | -sed 's/^/| /' conftest.$ac_ext >&5 |
330 | - |
331 | - |
332 | -fi |
333 | - |
334 | -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
335 | - conftest$ac_exeext conftest.$ac_ext |
336 | - done |
337 | - { echo "$as_me:$LINENO: result: $attr_name" >&5 |
338 | -echo "${ECHO_T}$attr_name" >&6; } |
339 | - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then |
340 | - |
341 | -cat >>confdefs.h <<_ACEOF |
342 | -#define PTHREAD_CREATE_JOINABLE $attr_name |
343 | -_ACEOF |
344 | - |
345 | - fi |
346 | - |
347 | - { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 |
348 | -echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; } |
349 | - flag=no |
350 | - case "${host_cpu}-${host_os}" in |
351 | - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; |
352 | - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; |
353 | - esac |
354 | - { echo "$as_me:$LINENO: result: ${flag}" >&5 |
355 | -echo "${ECHO_T}${flag}" >&6; } |
356 | - if test "x$flag" != xno; then |
357 | - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" |
358 | - fi |
359 | - |
360 | - LIBS="$save_LIBS" |
361 | - CFLAGS="$save_CFLAGS" |
362 | - |
363 | - # More AIX lossage: must compile with xlc_r or cc_r |
364 | - if test x"$GCC" != xyes; then |
365 | - for ac_prog in xlc_r cc_r |
366 | -do |
367 | - # Extract the first word of "$ac_prog", so it can be a program name with args. |
368 | -set dummy $ac_prog; ac_word=$2 |
369 | -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 |
370 | -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } |
371 | -if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then |
372 | - echo $ECHO_N "(cached) $ECHO_C" >&6 |
373 | -else |
374 | - if test -n "$PTHREAD_CC"; then |
375 | - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. |
376 | -else |
377 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
378 | -for as_dir in $PATH |
379 | -do |
380 | - IFS=$as_save_IFS |
381 | - test -z "$as_dir" && as_dir=. |
382 | - for ac_exec_ext in '' $ac_executable_extensions; do |
383 | - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
384 | - ac_cv_prog_PTHREAD_CC="$ac_prog" |
385 | - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
386 | - break 2 |
387 | - fi |
388 | -done |
389 | -done |
390 | -IFS=$as_save_IFS |
391 | - |
392 | -fi |
393 | -fi |
394 | -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC |
395 | -if test -n "$PTHREAD_CC"; then |
396 | - { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 |
397 | -echo "${ECHO_T}$PTHREAD_CC" >&6; } |
398 | -else |
399 | - { echo "$as_me:$LINENO: result: no" >&5 |
400 | -echo "${ECHO_T}no" >&6; } |
401 | -fi |
402 | - |
403 | - |
404 | - test -n "$PTHREAD_CC" && break |
405 | -done |
406 | -test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" |
407 | - |
408 | - else |
409 | - PTHREAD_CC=$CC |
410 | - fi |
411 | -else |
412 | - PTHREAD_CC="$CC" |
413 | -fi |
414 | - |
415 | - |
416 | - |
417 | - |
418 | - |
419 | -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
420 | -if test x"$acx_pthread_ok" = xyes; then |
421 | - |
422 | -cat >>confdefs.h <<\_ACEOF |
423 | -#define HAVE_PTHREAD 1 |
424 | -_ACEOF |
425 | - |
426 | - : |
427 | -else |
428 | - acx_pthread_ok=no |
429 | - |
430 | -fi |
431 | -ac_ext=c |
432 | -ac_cpp='$CPP $CPPFLAGS' |
433 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
434 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
435 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu |
436 | - |
437 | - |
438 | - |
439 | -LIBS="$PTHREAD_LIBS $LIBS" |
440 | -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
441 | - |
442 | |
443 | { echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 |
444 | echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6; } |
445 | |