|
1345 | 1345 | AC_MSG_CHECKING(whether pthreads are available without options) |
1346 | 1346 | AC_CACHE_VAL(ac_cv_pthread_is_default, |
1347 | 1347 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
| 1348 | +#include <stdio.h> |
1348 | 1349 | #include <pthread.h> |
1349 | 1350 |
|
1350 | 1351 | void* routine(void* p){return NULL;} |
@@ -1379,6 +1380,7 @@ AC_CACHE_VAL(ac_cv_kpthread, |
1379 | 1380 | [ac_save_cc="$CC" |
1380 | 1381 | CC="$CC -Kpthread" |
1381 | 1382 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
| 1383 | +#include <stdio.h> |
1382 | 1384 | #include <pthread.h> |
1383 | 1385 |
|
1384 | 1386 | void* routine(void* p){return NULL;} |
@@ -1407,6 +1409,7 @@ AC_CACHE_VAL(ac_cv_kthread, |
1407 | 1409 | [ac_save_cc="$CC" |
1408 | 1410 | CC="$CC -Kthread" |
1409 | 1411 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
| 1412 | +#include <stdio.h> |
1410 | 1413 | #include <pthread.h> |
1411 | 1414 |
|
1412 | 1415 | void* routine(void* p){return NULL;} |
@@ -1435,6 +1438,7 @@ AC_CACHE_VAL(ac_cv_thread, |
1435 | 1438 | [ac_save_cc="$CC" |
1436 | 1439 | CC="$CC -pthread" |
1437 | 1440 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
| 1441 | +#include <stdio.h> |
1438 | 1442 | #include <pthread.h> |
1439 | 1443 |
|
1440 | 1444 | void* routine(void* p){return NULL;} |
@@ -2356,7 +2360,9 @@ yes |
2356 | 2360 | _libs=$LIBS |
2357 | 2361 | LIBS="$LIBS -lpthread" |
2358 | 2362 | AC_MSG_CHECKING([for pthread_create in -lpthread]) |
2359 | | - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h> |
| 2363 | + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
| 2364 | +#include <stdio.h> |
| 2365 | +#include <pthread.h> |
2360 | 2366 |
|
2361 | 2367 | void * start_routine (void *arg) { exit (0); }]], [[ |
2362 | 2368 | pthread_create (NULL, NULL, start_routine, NULL)]])],[ |
@@ -2422,7 +2428,9 @@ if test "$posix_threads" = "yes"; then |
2422 | 2428 |
|
2423 | 2429 | AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported) |
2424 | 2430 | AC_CACHE_VAL(ac_cv_pthread_system_supported, |
2425 | | - [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h> |
| 2431 | + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
| 2432 | + #include <stdio.h> |
| 2433 | + #include <pthread.h> |
2426 | 2434 | void *foo(void *parm) { |
2427 | 2435 | return NULL; |
2428 | 2436 | } |
|
0 commit comments