| | 2439 | ac_ext=c |
|---|
| | 2440 | ac_cpp='$CPP $CPPFLAGS' |
|---|
| | 2441 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|---|
| | 2442 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|---|
| | 2443 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
|---|
| | 2444 | |
|---|
| | 2445 | ac_ext=c |
|---|
| | 2446 | ac_cpp='$CPP $CPPFLAGS' |
|---|
| | 2447 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|---|
| | 2448 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|---|
| | 2449 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
|---|
| | 2450 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 |
|---|
| | 2451 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 |
|---|
| | 2452 | # On Suns, sometimes $CPP names a directory. |
|---|
| | 2453 | if test -n "$CPP" && test -d "$CPP"; then |
|---|
| | 2454 | CPP= |
|---|
| | 2455 | fi |
|---|
| | 2456 | if test -z "$CPP"; then |
|---|
| | 2457 | if test "${ac_cv_prog_CPP+set}" = set; then |
|---|
| | 2458 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| | 2459 | else |
|---|
| | 2460 | # Double quotes because CPP needs to be expanded |
|---|
| | 2461 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" |
|---|
| | 2462 | do |
|---|
| | 2463 | ac_preproc_ok=false |
|---|
| | 2464 | for ac_c_preproc_warn_flag in '' yes |
|---|
| | 2465 | do |
|---|
| | 2466 | # Use a header file that comes with gcc, so configuring glibc |
|---|
| | 2467 | # with a fresh cross-compiler works. |
|---|
| | 2468 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|---|
| | 2469 | # <limits.h> exists even on freestanding compilers. |
|---|
| | 2470 | # On the NeXT, cc -E runs the code through the compiler's parser, |
|---|
| | 2471 | # not just through cpp. "Syntax error" is here to catch this case. |
|---|
| | 2472 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 2473 | /* confdefs.h. */ |
|---|
| | 2474 | _ACEOF |
|---|
| | 2475 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 2476 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 2477 | /* end confdefs.h. */ |
|---|
| | 2478 | #ifdef __STDC__ |
|---|
| | 2479 | # include <limits.h> |
|---|
| | 2480 | #else |
|---|
| | 2481 | # include <assert.h> |
|---|
| | 2482 | #endif |
|---|
| | 2483 | Syntax error |
|---|
| | 2484 | _ACEOF |
|---|
| | 2485 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| | 2486 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| | 2487 | ac_status=$? |
|---|
| | 2488 | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| | 2489 | rm -f conftest.er1 |
|---|
| | 2490 | cat conftest.err >&5 |
|---|
| | 2491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 2492 | (exit $ac_status); } >/dev/null; then |
|---|
| | 2493 | if test -s conftest.err; then |
|---|
| | 2494 | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| | 2495 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| | 2496 | else |
|---|
| | 2497 | ac_cpp_err= |
|---|
| | 2498 | fi |
|---|
| | 2499 | else |
|---|
| | 2500 | ac_cpp_err=yes |
|---|
| | 2501 | fi |
|---|
| | 2502 | if test -z "$ac_cpp_err"; then |
|---|
| | 2503 | : |
|---|
| | 2504 | else |
|---|
| | 2505 | echo "$as_me: failed program was:" >&5 |
|---|
| | 2506 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 2507 | |
|---|
| | 2508 | # Broken: fails on valid input. |
|---|
| | 2509 | continue |
|---|
| | 2510 | fi |
|---|
| | 2511 | rm -f conftest.err conftest.$ac_ext |
|---|
| | 2512 | |
|---|
| | 2513 | # OK, works on sane cases. Now check whether non-existent headers |
|---|
| | 2514 | # can be detected and how. |
|---|
| | 2515 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 2516 | /* confdefs.h. */ |
|---|
| | 2517 | _ACEOF |
|---|
| | 2518 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 2519 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 2520 | /* end confdefs.h. */ |
|---|
| | 2521 | #include <ac_nonexistent.h> |
|---|
| | 2522 | _ACEOF |
|---|
| | 2523 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| | 2524 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| | 2525 | ac_status=$? |
|---|
| | 2526 | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| | 2527 | rm -f conftest.er1 |
|---|
| | 2528 | cat conftest.err >&5 |
|---|
| | 2529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 2530 | (exit $ac_status); } >/dev/null; then |
|---|
| | 2531 | if test -s conftest.err; then |
|---|
| | 2532 | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| | 2533 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| | 2534 | else |
|---|
| | 2535 | ac_cpp_err= |
|---|
| | 2536 | fi |
|---|
| | 2537 | else |
|---|
| | 2538 | ac_cpp_err=yes |
|---|
| | 2539 | fi |
|---|
| | 2540 | if test -z "$ac_cpp_err"; then |
|---|
| | 2541 | # Broken: success on invalid input. |
|---|
| | 2542 | continue |
|---|
| | 2543 | else |
|---|
| | 2544 | echo "$as_me: failed program was:" >&5 |
|---|
| | 2545 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 2546 | |
|---|
| | 2547 | # Passes both tests. |
|---|
| | 2548 | ac_preproc_ok=: |
|---|
| | 2549 | break |
|---|
| | 2550 | fi |
|---|
| | 2551 | rm -f conftest.err conftest.$ac_ext |
|---|
| | 2552 | |
|---|
| | 2553 | done |
|---|
| | 2554 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
|---|
| | 2555 | rm -f conftest.err conftest.$ac_ext |
|---|
| | 2556 | if $ac_preproc_ok; then |
|---|
| | 2557 | break |
|---|
| | 2558 | fi |
|---|
| | 2559 | |
|---|
| | 2560 | done |
|---|
| | 2561 | ac_cv_prog_CPP=$CPP |
|---|
| | 2562 | |
|---|
| | 2563 | fi |
|---|
| | 2564 | CPP=$ac_cv_prog_CPP |
|---|
| | 2565 | else |
|---|
| | 2566 | ac_cv_prog_CPP=$CPP |
|---|
| | 2567 | fi |
|---|
| | 2568 | echo "$as_me:$LINENO: result: $CPP" >&5 |
|---|
| | 2569 | echo "${ECHO_T}$CPP" >&6 |
|---|
| | 2570 | ac_preproc_ok=false |
|---|
| | 2571 | for ac_c_preproc_warn_flag in '' yes |
|---|
| | 2572 | do |
|---|
| | 2573 | # Use a header file that comes with gcc, so configuring glibc |
|---|
| | 2574 | # with a fresh cross-compiler works. |
|---|
| | 2575 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|---|
| | 2576 | # <limits.h> exists even on freestanding compilers. |
|---|
| | 2577 | # On the NeXT, cc -E runs the code through the compiler's parser, |
|---|
| | 2578 | # not just through cpp. "Syntax error" is here to catch this case. |
|---|
| | 2579 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 2580 | /* confdefs.h. */ |
|---|
| | 2581 | _ACEOF |
|---|
| | 2582 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 2583 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 2584 | /* end confdefs.h. */ |
|---|
| | 2585 | #ifdef __STDC__ |
|---|
| | 2586 | # include <limits.h> |
|---|
| | 2587 | #else |
|---|
| | 2588 | # include <assert.h> |
|---|
| | 2589 | #endif |
|---|
| | 2590 | Syntax error |
|---|
| | 2591 | _ACEOF |
|---|
| | 2592 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| | 2593 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| | 2594 | ac_status=$? |
|---|
| | 2595 | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| | 2596 | rm -f conftest.er1 |
|---|
| | 2597 | cat conftest.err >&5 |
|---|
| | 2598 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 2599 | (exit $ac_status); } >/dev/null; then |
|---|
| | 2600 | if test -s conftest.err; then |
|---|
| | 2601 | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| | 2602 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| | 2603 | else |
|---|
| | 2604 | ac_cpp_err= |
|---|
| | 2605 | fi |
|---|
| | 2606 | else |
|---|
| | 2607 | ac_cpp_err=yes |
|---|
| | 2608 | fi |
|---|
| | 2609 | if test -z "$ac_cpp_err"; then |
|---|
| | 2610 | : |
|---|
| | 2611 | else |
|---|
| | 2612 | echo "$as_me: failed program was:" >&5 |
|---|
| | 2613 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 2614 | |
|---|
| | 2615 | # Broken: fails on valid input. |
|---|
| | 2616 | continue |
|---|
| | 2617 | fi |
|---|
| | 2618 | rm -f conftest.err conftest.$ac_ext |
|---|
| | 2619 | |
|---|
| | 2620 | # OK, works on sane cases. Now check whether non-existent headers |
|---|
| | 2621 | # can be detected and how. |
|---|
| | 2622 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 2623 | /* confdefs.h. */ |
|---|
| | 2624 | _ACEOF |
|---|
| | 2625 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 2626 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 2627 | /* end confdefs.h. */ |
|---|
| | 2628 | #include <ac_nonexistent.h> |
|---|
| | 2629 | _ACEOF |
|---|
| | 2630 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| | 2631 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| | 2632 | ac_status=$? |
|---|
| | 2633 | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| | 2634 | rm -f conftest.er1 |
|---|
| | 2635 | cat conftest.err >&5 |
|---|
| | 2636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 2637 | (exit $ac_status); } >/dev/null; then |
|---|
| | 2638 | if test -s conftest.err; then |
|---|
| | 2639 | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| | 2640 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| | 2641 | else |
|---|
| | 2642 | ac_cpp_err= |
|---|
| | 2643 | fi |
|---|
| | 2644 | else |
|---|
| | 2645 | ac_cpp_err=yes |
|---|
| | 2646 | fi |
|---|
| | 2647 | if test -z "$ac_cpp_err"; then |
|---|
| | 2648 | # Broken: success on invalid input. |
|---|
| | 2649 | continue |
|---|
| | 2650 | else |
|---|
| | 2651 | echo "$as_me: failed program was:" >&5 |
|---|
| | 2652 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 2653 | |
|---|
| | 2654 | # Passes both tests. |
|---|
| | 2655 | ac_preproc_ok=: |
|---|
| | 2656 | break |
|---|
| | 2657 | fi |
|---|
| | 2658 | rm -f conftest.err conftest.$ac_ext |
|---|
| | 2659 | |
|---|
| | 2660 | done |
|---|
| | 2661 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
|---|
| | 2662 | rm -f conftest.err conftest.$ac_ext |
|---|
| | 2663 | if $ac_preproc_ok; then |
|---|
| | 2664 | : |
|---|
| | 2665 | else |
|---|
| | 2666 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
|---|
| | 2667 | See \`config.log' for more details." >&5 |
|---|
| | 2668 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check |
|---|
| | 2669 | See \`config.log' for more details." >&2;} |
|---|
| | 2670 | { (exit 1); exit 1; }; } |
|---|
| | 2671 | fi |
|---|
| | 2672 | |
|---|
| 3855 | | ac_ext=c |
|---|
| 3856 | | ac_cpp='$CPP $CPPFLAGS' |
|---|
| 3857 | | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|---|
| 3858 | | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|---|
| 3859 | | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
|---|
| 3860 | | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 |
|---|
| 3861 | | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 |
|---|
| 3862 | | # On Suns, sometimes $CPP names a directory. |
|---|
| 3863 | | if test -n "$CPP" && test -d "$CPP"; then |
|---|
| 3864 | | CPP= |
|---|
| 3865 | | fi |
|---|
| 3866 | | if test -z "$CPP"; then |
|---|
| 3867 | | if test "${ac_cv_prog_CPP+set}" = set; then |
|---|
| 3868 | | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| 3869 | | else |
|---|
| 3870 | | # Double quotes because CPP needs to be expanded |
|---|
| 3871 | | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" |
|---|
| 3872 | | do |
|---|
| 3873 | | ac_preproc_ok=false |
|---|
| 3874 | | for ac_c_preproc_warn_flag in '' yes |
|---|
| 3875 | | do |
|---|
| 3876 | | # Use a header file that comes with gcc, so configuring glibc |
|---|
| 3877 | | # with a fresh cross-compiler works. |
|---|
| 3878 | | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|---|
| 3879 | | # <limits.h> exists even on freestanding compilers. |
|---|
| 3880 | | # On the NeXT, cc -E runs the code through the compiler's parser, |
|---|
| 3881 | | # not just through cpp. "Syntax error" is here to catch this case. |
|---|
| 3882 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 3883 | | /* confdefs.h. */ |
|---|
| 3884 | | _ACEOF |
|---|
| 3885 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 3886 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 3887 | | /* end confdefs.h. */ |
|---|
| 3888 | | #ifdef __STDC__ |
|---|
| 3889 | | # include <limits.h> |
|---|
| 3890 | | #else |
|---|
| 3891 | | # include <assert.h> |
|---|
| 3892 | | #endif |
|---|
| 3893 | | Syntax error |
|---|
| 3894 | | _ACEOF |
|---|
| 3895 | | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| 3896 | | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| 3897 | | ac_status=$? |
|---|
| 3898 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 3899 | | rm -f conftest.er1 |
|---|
| 3900 | | cat conftest.err >&5 |
|---|
| 3901 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 3902 | | (exit $ac_status); } >/dev/null; then |
|---|
| 3903 | | if test -s conftest.err; then |
|---|
| 3904 | | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| 3905 | | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| 3906 | | else |
|---|
| 3907 | | ac_cpp_err= |
|---|
| 3908 | | fi |
|---|
| 3909 | | else |
|---|
| 3910 | | ac_cpp_err=yes |
|---|
| 3911 | | fi |
|---|
| 3912 | | if test -z "$ac_cpp_err"; then |
|---|
| 3913 | | : |
|---|
| 3914 | | else |
|---|
| 3915 | | echo "$as_me: failed program was:" >&5 |
|---|
| 3916 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 3917 | | |
|---|
| 3918 | | # Broken: fails on valid input. |
|---|
| 3919 | | continue |
|---|
| 3920 | | fi |
|---|
| 3921 | | rm -f conftest.err conftest.$ac_ext |
|---|
| 3922 | | |
|---|
| 3923 | | # OK, works on sane cases. Now check whether non-existent headers |
|---|
| 3924 | | # can be detected and how. |
|---|
| 3925 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 3926 | | /* confdefs.h. */ |
|---|
| 3927 | | _ACEOF |
|---|
| 3928 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 3929 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 3930 | | /* end confdefs.h. */ |
|---|
| 3931 | | #include <ac_nonexistent.h> |
|---|
| 3932 | | _ACEOF |
|---|
| 3933 | | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| 3934 | | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| 3935 | | ac_status=$? |
|---|
| 3936 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 3937 | | rm -f conftest.er1 |
|---|
| 3938 | | cat conftest.err >&5 |
|---|
| 3939 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 3940 | | (exit $ac_status); } >/dev/null; then |
|---|
| 3941 | | if test -s conftest.err; then |
|---|
| 3942 | | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| 3943 | | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| 3944 | | else |
|---|
| 3945 | | ac_cpp_err= |
|---|
| 3946 | | fi |
|---|
| 3947 | | else |
|---|
| 3948 | | ac_cpp_err=yes |
|---|
| 3949 | | fi |
|---|
| 3950 | | if test -z "$ac_cpp_err"; then |
|---|
| 3951 | | # Broken: success on invalid input. |
|---|
| 3952 | | continue |
|---|
| 3953 | | else |
|---|
| 3954 | | echo "$as_me: failed program was:" >&5 |
|---|
| 3955 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 3956 | | |
|---|
| 3957 | | # Passes both tests. |
|---|
| 3958 | | ac_preproc_ok=: |
|---|
| 3959 | | break |
|---|
| 3960 | | fi |
|---|
| 3961 | | rm -f conftest.err conftest.$ac_ext |
|---|
| 3962 | | |
|---|
| 3963 | | done |
|---|
| 3964 | | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
|---|
| 3965 | | rm -f conftest.err conftest.$ac_ext |
|---|
| 3966 | | if $ac_preproc_ok; then |
|---|
| 3967 | | break |
|---|
| 3968 | | fi |
|---|
| 3969 | | |
|---|
| 3970 | | done |
|---|
| 3971 | | ac_cv_prog_CPP=$CPP |
|---|
| 3972 | | |
|---|
| 3973 | | fi |
|---|
| 3974 | | CPP=$ac_cv_prog_CPP |
|---|
| 3975 | | else |
|---|
| 3976 | | ac_cv_prog_CPP=$CPP |
|---|
| 3977 | | fi |
|---|
| 3978 | | echo "$as_me:$LINENO: result: $CPP" >&5 |
|---|
| 3979 | | echo "${ECHO_T}$CPP" >&6 |
|---|
| 3980 | | ac_preproc_ok=false |
|---|
| 3981 | | for ac_c_preproc_warn_flag in '' yes |
|---|
| 3982 | | do |
|---|
| 3983 | | # Use a header file that comes with gcc, so configuring glibc |
|---|
| 3984 | | # with a fresh cross-compiler works. |
|---|
| 3985 | | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|---|
| 3986 | | # <limits.h> exists even on freestanding compilers. |
|---|
| 3987 | | # On the NeXT, cc -E runs the code through the compiler's parser, |
|---|
| 3988 | | # not just through cpp. "Syntax error" is here to catch this case. |
|---|
| 3989 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 3990 | | /* confdefs.h. */ |
|---|
| 3991 | | _ACEOF |
|---|
| 3992 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 3993 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 3994 | | /* end confdefs.h. */ |
|---|
| 3995 | | #ifdef __STDC__ |
|---|
| 3996 | | # include <limits.h> |
|---|
| 3997 | | #else |
|---|
| 3998 | | # include <assert.h> |
|---|
| 3999 | | #endif |
|---|
| 4000 | | Syntax error |
|---|
| 4001 | | _ACEOF |
|---|
| 4002 | | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| 4003 | | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| 4004 | | ac_status=$? |
|---|
| 4005 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 4006 | | rm -f conftest.er1 |
|---|
| 4007 | | cat conftest.err >&5 |
|---|
| 4008 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 4009 | | (exit $ac_status); } >/dev/null; then |
|---|
| 4010 | | if test -s conftest.err; then |
|---|
| 4011 | | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| 4012 | | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| 4013 | | else |
|---|
| 4014 | | ac_cpp_err= |
|---|
| 4015 | | fi |
|---|
| 4016 | | else |
|---|
| 4017 | | ac_cpp_err=yes |
|---|
| 4018 | | fi |
|---|
| 4019 | | if test -z "$ac_cpp_err"; then |
|---|
| 4020 | | : |
|---|
| 4021 | | else |
|---|
| 4022 | | echo "$as_me: failed program was:" >&5 |
|---|
| 4023 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 4024 | | |
|---|
| 4025 | | # Broken: fails on valid input. |
|---|
| 4026 | | continue |
|---|
| 4027 | | fi |
|---|
| 4028 | | rm -f conftest.err conftest.$ac_ext |
|---|
| 4029 | | |
|---|
| 4030 | | # OK, works on sane cases. Now check whether non-existent headers |
|---|
| 4031 | | # can be detected and how. |
|---|
| 4032 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 4033 | | /* confdefs.h. */ |
|---|
| 4034 | | _ACEOF |
|---|
| 4035 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 4036 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 4037 | | /* end confdefs.h. */ |
|---|
| 4038 | | #include <ac_nonexistent.h> |
|---|
| 4039 | | _ACEOF |
|---|
| 4040 | | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| 4041 | | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| 4042 | | ac_status=$? |
|---|
| 4043 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 4044 | | rm -f conftest.er1 |
|---|
| 4045 | | cat conftest.err >&5 |
|---|
| 4046 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 4047 | | (exit $ac_status); } >/dev/null; then |
|---|
| 4048 | | if test -s conftest.err; then |
|---|
| 4049 | | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| 4050 | | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| 4051 | | else |
|---|
| 4052 | | ac_cpp_err= |
|---|
| 4053 | | fi |
|---|
| 4054 | | else |
|---|
| 4055 | | ac_cpp_err=yes |
|---|
| 4056 | | fi |
|---|
| 4057 | | if test -z "$ac_cpp_err"; then |
|---|
| 4058 | | # Broken: success on invalid input. |
|---|
| 4059 | | continue |
|---|
| 4060 | | else |
|---|
| 4061 | | echo "$as_me: failed program was:" >&5 |
|---|
| 4062 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 4063 | | |
|---|
| 4064 | | # Passes both tests. |
|---|
| 4065 | | ac_preproc_ok=: |
|---|
| 4066 | | break |
|---|
| 4067 | | fi |
|---|
| 4068 | | rm -f conftest.err conftest.$ac_ext |
|---|
| 4069 | | |
|---|
| 4070 | | done |
|---|
| 4071 | | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
|---|
| 4072 | | rm -f conftest.err conftest.$ac_ext |
|---|
| 4073 | | if $ac_preproc_ok; then |
|---|
| 4074 | | : |
|---|
| 4075 | | else |
|---|
| 4076 | | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
|---|
| 4077 | | See \`config.log' for more details." >&5 |
|---|
| 4078 | | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check |
|---|
| 4079 | | See \`config.log' for more details." >&2;} |
|---|
| 4080 | | { (exit 1); exit 1; }; } |
|---|
| 4081 | | fi |
|---|
| 4082 | | |
|---|
| 4083 | | ac_ext=c |
|---|
| 4084 | | ac_cpp='$CPP $CPPFLAGS' |
|---|
| 4085 | | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|---|
| 4086 | | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|---|
| 4087 | | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
|---|
| 5283 | | |
|---|
| 5284 | | fi |
|---|
| 5285 | | |
|---|
| 5286 | | done |
|---|
| 5287 | | |
|---|
| 5288 | | |
|---|
| 5289 | | |
|---|
| 5290 | | case $host in |
|---|
| 5291 | | *-solaris*) |
|---|
| 5292 | | |
|---|
| 5293 | | cat >>confdefs.h <<\_ACEOF |
|---|
| 5294 | | #define _POSIX_PTHREAD_SEMANTICS |
|---|
| 5295 | | _ACEOF |
|---|
| 5296 | | |
|---|
| 5297 | | ;; |
|---|
| 5298 | | esac |
|---|
| 5299 | | |
|---|
| 5300 | | |
|---|
| 5301 | | for ac_header in pthread.h |
|---|
| 5302 | | do |
|---|
| 5303 | | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
|---|
| 5304 | | if eval "test \"\${$as_ac_Header+set}\" = set"; then |
|---|
| 5305 | | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
|---|
| 5306 | | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
|---|
| 5307 | | if eval "test \"\${$as_ac_Header+set}\" = set"; then |
|---|
| 5308 | | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| 5309 | | fi |
|---|
| 5310 | | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
|---|
| 5311 | | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 |
|---|
| 5312 | | else |
|---|
| 5313 | | # Is the header compilable? |
|---|
| 5314 | | echo "$as_me:$LINENO: checking $ac_header usability" >&5 |
|---|
| 5315 | | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 |
|---|
| 5316 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5317 | | /* confdefs.h. */ |
|---|
| 5318 | | _ACEOF |
|---|
| 5319 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5320 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5321 | | /* end confdefs.h. */ |
|---|
| 5322 | | $ac_includes_default |
|---|
| 5323 | | #include <$ac_header> |
|---|
| 5324 | | _ACEOF |
|---|
| 5325 | | rm -f conftest.$ac_objext |
|---|
| 5326 | | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
|---|
| 5327 | | (eval $ac_compile) 2>conftest.er1 |
|---|
| 5328 | | ac_status=$? |
|---|
| 5329 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 5330 | | rm -f conftest.er1 |
|---|
| 5331 | | cat conftest.err >&5 |
|---|
| 5332 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5333 | | (exit $ac_status); } && |
|---|
| 5334 | | { ac_try='test -z "$ac_c_werror_flag" |
|---|
| 5335 | | || test ! -s conftest.err' |
|---|
| 5336 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5337 | | (eval $ac_try) 2>&5 |
|---|
| 5338 | | ac_status=$? |
|---|
| 5339 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5340 | | (exit $ac_status); }; } && |
|---|
| 5341 | | { ac_try='test -s conftest.$ac_objext' |
|---|
| 5342 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5343 | | (eval $ac_try) 2>&5 |
|---|
| 5344 | | ac_status=$? |
|---|
| 5345 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5346 | | (exit $ac_status); }; }; then |
|---|
| 5347 | | ac_header_compiler=yes |
|---|
| 5348 | | else |
|---|
| 5349 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5350 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5351 | | |
|---|
| 5352 | | ac_header_compiler=no |
|---|
| 5353 | | fi |
|---|
| 5354 | | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|---|
| 5355 | | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
|---|
| 5356 | | echo "${ECHO_T}$ac_header_compiler" >&6 |
|---|
| 5357 | | |
|---|
| 5358 | | # Is the header present? |
|---|
| 5359 | | echo "$as_me:$LINENO: checking $ac_header presence" >&5 |
|---|
| 5360 | | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 |
|---|
| 5361 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5362 | | /* confdefs.h. */ |
|---|
| 5363 | | _ACEOF |
|---|
| 5364 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5365 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5366 | | /* end confdefs.h. */ |
|---|
| 5367 | | #include <$ac_header> |
|---|
| 5368 | | _ACEOF |
|---|
| 5369 | | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
|---|
| 5370 | | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
|---|
| 5371 | | ac_status=$? |
|---|
| 5372 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 5373 | | rm -f conftest.er1 |
|---|
| 5374 | | cat conftest.err >&5 |
|---|
| 5375 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5376 | | (exit $ac_status); } >/dev/null; then |
|---|
| 5377 | | if test -s conftest.err; then |
|---|
| 5378 | | ac_cpp_err=$ac_c_preproc_warn_flag |
|---|
| 5379 | | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
|---|
| 5380 | | else |
|---|
| 5381 | | ac_cpp_err= |
|---|
| 5382 | | fi |
|---|
| 5383 | | else |
|---|
| 5384 | | ac_cpp_err=yes |
|---|
| 5385 | | fi |
|---|
| 5386 | | if test -z "$ac_cpp_err"; then |
|---|
| 5387 | | ac_header_preproc=yes |
|---|
| 5388 | | else |
|---|
| 5389 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5390 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5391 | | |
|---|
| 5392 | | ac_header_preproc=no |
|---|
| 5393 | | fi |
|---|
| 5394 | | rm -f conftest.err conftest.$ac_ext |
|---|
| 5395 | | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
|---|
| 5396 | | echo "${ECHO_T}$ac_header_preproc" >&6 |
|---|
| 5397 | | |
|---|
| 5398 | | # So? What about this header? |
|---|
| 5399 | | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
|---|
| 5400 | | yes:no: ) |
|---|
| 5401 | | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 |
|---|
| 5402 | | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} |
|---|
| 5403 | | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 |
|---|
| 5404 | | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} |
|---|
| 5405 | | ac_header_preproc=yes |
|---|
| 5406 | | ;; |
|---|
| 5407 | | no:yes:* ) |
|---|
| 5408 | | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 |
|---|
| 5409 | | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} |
|---|
| 5410 | | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 |
|---|
| 5411 | | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} |
|---|
| 5412 | | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 |
|---|
| 5413 | | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} |
|---|
| 5414 | | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 |
|---|
| 5415 | | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} |
|---|
| 5416 | | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 |
|---|
| 5417 | | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} |
|---|
| 5418 | | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 |
|---|
| 5419 | | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} |
|---|
| 5420 | | ( |
|---|
| 5421 | | cat <<\_ASBOX |
|---|
| 5422 | | ## ------------------------------------- ## |
|---|
| 5423 | | ## Report this to axel@zankasoftware.com ## |
|---|
| 5424 | | ## ------------------------------------- ## |
|---|
| 5425 | | _ASBOX |
|---|
| 5426 | | ) | |
|---|
| 5427 | | sed "s/^/$as_me: WARNING: /" >&2 |
|---|
| 5428 | | ;; |
|---|
| 5429 | | esac |
|---|
| 5430 | | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
|---|
| 5431 | | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
|---|
| 5432 | | if eval "test \"\${$as_ac_Header+set}\" = set"; then |
|---|
| 5433 | | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| 5434 | | else |
|---|
| 5435 | | eval "$as_ac_Header=\$ac_header_preproc" |
|---|
| 5436 | | fi |
|---|
| 5437 | | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
|---|
| 5438 | | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 |
|---|
| 5439 | | |
|---|
| 5440 | | fi |
|---|
| 5441 | | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
|---|
| 5442 | | cat >>confdefs.h <<_ACEOF |
|---|
| 5443 | | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
|---|
| 5444 | | _ACEOF |
|---|
| 5445 | | |
|---|
| 5446 | | echo "$as_me:$LINENO: checking for pthreads" >&5 |
|---|
| 5447 | | echo $ECHO_N "checking for pthreads... $ECHO_C" >&6 |
|---|
| 5448 | | |
|---|
| 5449 | | |
|---|
| 5450 | | if test "$_wi_pthreads_found" != yes ; then |
|---|
| 5451 | | OLD_LIBS="$LIBS" |
|---|
| 5452 | | LIBS=" $LIBS" |
|---|
| 5453 | | |
|---|
| 5454 | | if test "$cross_compiling" = yes; then |
|---|
| 5455 | | |
|---|
| 5456 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5457 | | /* confdefs.h. */ |
|---|
| 5458 | | _ACEOF |
|---|
| 5459 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5460 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5461 | | /* end confdefs.h. */ |
|---|
| 5462 | | |
|---|
| 5463 | | #include <pthread.h> |
|---|
| 5464 | | #include <errno.h> |
|---|
| 5465 | | |
|---|
| 5466 | | void * thread(void *arg) { |
|---|
| 5467 | | return NULL; |
|---|
| 5468 | | } |
|---|
| 5469 | | |
|---|
| 5470 | | int |
|---|
| 5471 | | main () |
|---|
| 5472 | | { |
|---|
| 5473 | | |
|---|
| 5474 | | pthread_t tid; |
|---|
| 5475 | | |
|---|
| 5476 | | if(pthread_create(&tid, 0, thread, NULL) < 0) |
|---|
| 5477 | | return errno; |
|---|
| 5478 | | |
|---|
| 5479 | | return 0; |
|---|
| 5480 | | |
|---|
| 5481 | | ; |
|---|
| 5482 | | return 0; |
|---|
| 5483 | | } |
|---|
| 5484 | | _ACEOF |
|---|
| 5485 | | rm -f conftest.$ac_objext conftest$ac_exeext |
|---|
| 5486 | | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| 5487 | | (eval $ac_link) 2>conftest.er1 |
|---|
| 5488 | | ac_status=$? |
|---|
| 5489 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 5490 | | rm -f conftest.er1 |
|---|
| 5491 | | cat conftest.err >&5 |
|---|
| 5492 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5493 | | (exit $ac_status); } && |
|---|
| 5494 | | { ac_try='test -z "$ac_c_werror_flag" |
|---|
| 5495 | | || test ! -s conftest.err' |
|---|
| 5496 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5497 | | (eval $ac_try) 2>&5 |
|---|
| 5498 | | ac_status=$? |
|---|
| 5499 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5500 | | (exit $ac_status); }; } && |
|---|
| 5501 | | { ac_try='test -s conftest$ac_exeext' |
|---|
| 5502 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5503 | | (eval $ac_try) 2>&5 |
|---|
| 5504 | | ac_status=$? |
|---|
| 5505 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5506 | | (exit $ac_status); }; }; then |
|---|
| 5507 | | |
|---|
| 5508 | | _wi_pthreads_test=yes |
|---|
| 5509 | | |
|---|
| 5510 | | else |
|---|
| 5511 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5512 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5513 | | |
|---|
| 5514 | | |
|---|
| 5515 | | _wi_pthreads_test=no |
|---|
| 5516 | | |
|---|
| 5517 | | fi |
|---|
| 5518 | | rm -f conftest.err conftest.$ac_objext \ |
|---|
| 5519 | | conftest$ac_exeext conftest.$ac_ext |
|---|
| 5520 | | |
|---|
| 5521 | | else |
|---|
| 5522 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5523 | | /* confdefs.h. */ |
|---|
| 5524 | | _ACEOF |
|---|
| 5525 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5526 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5527 | | /* end confdefs.h. */ |
|---|
| 5528 | | |
|---|
| 5529 | | |
|---|
| 5530 | | #include <pthread.h> |
|---|
| 5531 | | #include <errno.h> |
|---|
| 5532 | | |
|---|
| 5533 | | void * thread(void *arg) { |
|---|
| 5534 | | return NULL; |
|---|
| 5535 | | } |
|---|
| 5536 | | |
|---|
| 5537 | | |
|---|
| 5538 | | int main(void) { |
|---|
| 5539 | | |
|---|
| 5540 | | pthread_t tid; |
|---|
| 5541 | | |
|---|
| 5542 | | if(pthread_create(&tid, 0, thread, NULL) < 0) |
|---|
| 5543 | | return errno; |
|---|
| 5544 | | |
|---|
| 5545 | | return 0; |
|---|
| 5546 | | |
|---|
| 5547 | | } |
|---|
| 5548 | | |
|---|
| 5549 | | _ACEOF |
|---|
| 5550 | | rm -f conftest$ac_exeext |
|---|
| 5551 | | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| 5552 | | (eval $ac_link) 2>&5 |
|---|
| 5553 | | ac_status=$? |
|---|
| 5554 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5555 | | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
|---|
| 5556 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5557 | | (eval $ac_try) 2>&5 |
|---|
| 5558 | | ac_status=$? |
|---|
| 5559 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5560 | | (exit $ac_status); }; }; then |
|---|
| 5561 | | |
|---|
| 5562 | | _wi_pthreads_test=yes |
|---|
| 5563 | | |
|---|
| 5564 | | else |
|---|
| 5565 | | echo "$as_me: program exited with status $ac_status" >&5 |
|---|
| 5566 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5567 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5568 | | |
|---|
| 5569 | | ( exit $ac_status ) |
|---|
| 5570 | | |
|---|
| 5571 | | _wi_pthreads_test=no |
|---|
| 5572 | | |
|---|
| 5573 | | fi |
|---|
| 5574 | | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
|---|
| 5575 | | fi |
|---|
| 5576 | | |
|---|
| 5577 | | LIBS="$OLD_LIBS" |
|---|
| 5578 | | |
|---|
| 5579 | | if test "$_wi_pthreads_test" = yes ; then |
|---|
| 5580 | | _wi_pthreads_found=yes |
|---|
| 5581 | | _wi_pthreads_libs="" |
|---|
| 5582 | | fi |
|---|
| 5583 | | fi |
|---|
| 5584 | | |
|---|
| 5585 | | |
|---|
| 5586 | | if test "$_wi_pthreads_found" != yes ; then |
|---|
| 5587 | | OLD_LIBS="$LIBS" |
|---|
| 5588 | | LIBS="-pthread $LIBS" |
|---|
| 5589 | | |
|---|
| 5590 | | if test "$cross_compiling" = yes; then |
|---|
| 5591 | | |
|---|
| 5592 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5593 | | /* confdefs.h. */ |
|---|
| 5594 | | _ACEOF |
|---|
| 5595 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5596 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5597 | | /* end confdefs.h. */ |
|---|
| 5598 | | |
|---|
| 5599 | | #include <pthread.h> |
|---|
| 5600 | | #include <errno.h> |
|---|
| 5601 | | |
|---|
| 5602 | | void * thread(void *arg) { |
|---|
| 5603 | | return NULL; |
|---|
| 5604 | | } |
|---|
| 5605 | | |
|---|
| 5606 | | int |
|---|
| 5607 | | main () |
|---|
| 5608 | | { |
|---|
| 5609 | | |
|---|
| 5610 | | pthread_t tid; |
|---|
| 5611 | | |
|---|
| 5612 | | if(pthread_create(&tid, 0, thread, NULL) < 0) |
|---|
| 5613 | | return errno; |
|---|
| 5614 | | |
|---|
| 5615 | | return 0; |
|---|
| 5616 | | |
|---|
| 5617 | | ; |
|---|
| 5618 | | return 0; |
|---|
| 5619 | | } |
|---|
| 5620 | | _ACEOF |
|---|
| 5621 | | rm -f conftest.$ac_objext conftest$ac_exeext |
|---|
| 5622 | | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| 5623 | | (eval $ac_link) 2>conftest.er1 |
|---|
| 5624 | | ac_status=$? |
|---|
| 5625 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 5626 | | rm -f conftest.er1 |
|---|
| 5627 | | cat conftest.err >&5 |
|---|
| 5628 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5629 | | (exit $ac_status); } && |
|---|
| 5630 | | { ac_try='test -z "$ac_c_werror_flag" |
|---|
| 5631 | | || test ! -s conftest.err' |
|---|
| 5632 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5633 | | (eval $ac_try) 2>&5 |
|---|
| 5634 | | ac_status=$? |
|---|
| 5635 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5636 | | (exit $ac_status); }; } && |
|---|
| 5637 | | { ac_try='test -s conftest$ac_exeext' |
|---|
| 5638 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5639 | | (eval $ac_try) 2>&5 |
|---|
| 5640 | | ac_status=$? |
|---|
| 5641 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5642 | | (exit $ac_status); }; }; then |
|---|
| 5643 | | |
|---|
| 5644 | | _wi_pthreads_test=yes |
|---|
| 5645 | | |
|---|
| 5646 | | else |
|---|
| 5647 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5648 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5649 | | |
|---|
| 5650 | | |
|---|
| 5651 | | _wi_pthreads_test=no |
|---|
| 5652 | | |
|---|
| 5653 | | fi |
|---|
| 5654 | | rm -f conftest.err conftest.$ac_objext \ |
|---|
| 5655 | | conftest$ac_exeext conftest.$ac_ext |
|---|
| 5656 | | |
|---|
| 5657 | | else |
|---|
| 5658 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5659 | | /* confdefs.h. */ |
|---|
| 5660 | | _ACEOF |
|---|
| 5661 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5662 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5663 | | /* end confdefs.h. */ |
|---|
| 5664 | | |
|---|
| 5665 | | |
|---|
| 5666 | | #include <pthread.h> |
|---|
| 5667 | | #include <errno.h> |
|---|
| 5668 | | |
|---|
| 5669 | | void * thread(void *arg) { |
|---|
| 5670 | | return NULL; |
|---|
| 5671 | | } |
|---|
| 5672 | | |
|---|
| 5673 | | |
|---|
| 5674 | | int main(void) { |
|---|
| 5675 | | |
|---|
| 5676 | | pthread_t tid; |
|---|
| 5677 | | |
|---|
| 5678 | | if(pthread_create(&tid, 0, thread, NULL) < 0) |
|---|
| 5679 | | return errno; |
|---|
| 5680 | | |
|---|
| 5681 | | return 0; |
|---|
| 5682 | | |
|---|
| 5683 | | } |
|---|
| 5684 | | |
|---|
| 5685 | | _ACEOF |
|---|
| 5686 | | rm -f conftest$ac_exeext |
|---|
| 5687 | | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| 5688 | | (eval $ac_link) 2>&5 |
|---|
| 5689 | | ac_status=$? |
|---|
| 5690 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5691 | | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
|---|
| 5692 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5693 | | (eval $ac_try) 2>&5 |
|---|
| 5694 | | ac_status=$? |
|---|
| 5695 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5696 | | (exit $ac_status); }; }; then |
|---|
| 5697 | | |
|---|
| 5698 | | _wi_pthreads_test=yes |
|---|
| 5699 | | |
|---|
| 5700 | | else |
|---|
| 5701 | | echo "$as_me: program exited with status $ac_status" >&5 |
|---|
| 5702 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5703 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5704 | | |
|---|
| 5705 | | ( exit $ac_status ) |
|---|
| 5706 | | |
|---|
| 5707 | | _wi_pthreads_test=no |
|---|
| 5708 | | |
|---|
| 5709 | | fi |
|---|
| 5710 | | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
|---|
| 5711 | | fi |
|---|
| 5712 | | |
|---|
| 5713 | | LIBS="$OLD_LIBS" |
|---|
| 5714 | | |
|---|
| 5715 | | if test "$_wi_pthreads_test" = yes ; then |
|---|
| 5716 | | _wi_pthreads_found=yes |
|---|
| 5717 | | _wi_pthreads_libs="-pthread" |
|---|
| 5718 | | fi |
|---|
| 5719 | | fi |
|---|
| 5720 | | |
|---|
| 5721 | | |
|---|
| 5722 | | if test "$_wi_pthreads_found" != yes ; then |
|---|
| 5723 | | OLD_LIBS="$LIBS" |
|---|
| 5724 | | LIBS="-lpthread $LIBS" |
|---|
| 5725 | | |
|---|
| 5726 | | if test "$cross_compiling" = yes; then |
|---|
| 5727 | | |
|---|
| 5728 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5729 | | /* confdefs.h. */ |
|---|
| 5730 | | _ACEOF |
|---|
| 5731 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5732 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5733 | | /* end confdefs.h. */ |
|---|
| 5734 | | |
|---|
| 5735 | | #include <pthread.h> |
|---|
| 5736 | | #include <errno.h> |
|---|
| 5737 | | |
|---|
| 5738 | | void * thread(void *arg) { |
|---|
| 5739 | | return NULL; |
|---|
| 5740 | | } |
|---|
| 5741 | | |
|---|
| 5742 | | int |
|---|
| 5743 | | main () |
|---|
| 5744 | | { |
|---|
| 5745 | | |
|---|
| 5746 | | pthread_t tid; |
|---|
| 5747 | | |
|---|
| 5748 | | if(pthread_create(&tid, 0, thread, NULL) < 0) |
|---|
| 5749 | | return errno; |
|---|
| 5750 | | |
|---|
| 5751 | | return 0; |
|---|
| 5752 | | |
|---|
| 5753 | | ; |
|---|
| 5754 | | return 0; |
|---|
| 5755 | | } |
|---|
| 5756 | | _ACEOF |
|---|
| 5757 | | rm -f conftest.$ac_objext conftest$ac_exeext |
|---|
| 5758 | | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| 5759 | | (eval $ac_link) 2>conftest.er1 |
|---|
| 5760 | | ac_status=$? |
|---|
| 5761 | | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| 5762 | | rm -f conftest.er1 |
|---|
| 5763 | | cat conftest.err >&5 |
|---|
| 5764 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5765 | | (exit $ac_status); } && |
|---|
| 5766 | | { ac_try='test -z "$ac_c_werror_flag" |
|---|
| 5767 | | || test ! -s conftest.err' |
|---|
| 5768 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5769 | | (eval $ac_try) 2>&5 |
|---|
| 5770 | | ac_status=$? |
|---|
| 5771 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5772 | | (exit $ac_status); }; } && |
|---|
| 5773 | | { ac_try='test -s conftest$ac_exeext' |
|---|
| 5774 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5775 | | (eval $ac_try) 2>&5 |
|---|
| 5776 | | ac_status=$? |
|---|
| 5777 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5778 | | (exit $ac_status); }; }; then |
|---|
| 5779 | | |
|---|
| 5780 | | _wi_pthreads_test=yes |
|---|
| 5781 | | |
|---|
| 5782 | | else |
|---|
| 5783 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5784 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5785 | | |
|---|
| 5786 | | |
|---|
| 5787 | | _wi_pthreads_test=no |
|---|
| 5788 | | |
|---|
| 5789 | | fi |
|---|
| 5790 | | rm -f conftest.err conftest.$ac_objext \ |
|---|
| 5791 | | conftest$ac_exeext conftest.$ac_ext |
|---|
| 5792 | | |
|---|
| 5793 | | else |
|---|
| 5794 | | cat >conftest.$ac_ext <<_ACEOF |
|---|
| 5795 | | /* confdefs.h. */ |
|---|
| 5796 | | _ACEOF |
|---|
| 5797 | | cat confdefs.h >>conftest.$ac_ext |
|---|
| 5798 | | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| 5799 | | /* end confdefs.h. */ |
|---|
| 5800 | | |
|---|
| 5801 | | |
|---|
| 5802 | | #include <pthread.h> |
|---|
| 5803 | | #include <errno.h> |
|---|
| 5804 | | |
|---|
| 5805 | | void * thread(void *arg) { |
|---|
| 5806 | | return NULL; |
|---|
| 5807 | | } |
|---|
| 5808 | | |
|---|
| 5809 | | |
|---|
| 5810 | | int main(void) { |
|---|
| 5811 | | |
|---|
| 5812 | | pthread_t tid; |
|---|
| 5813 | | |
|---|
| 5814 | | if(pthread_create(&tid, 0, thread, NULL) < 0) |
|---|
| 5815 | | return errno; |
|---|
| 5816 | | |
|---|
| 5817 | | return 0; |
|---|
| 5818 | | |
|---|
| 5819 | | } |
|---|
| 5820 | | |
|---|
| 5821 | | _ACEOF |
|---|
| 5822 | | rm -f conftest$ac_exeext |
|---|
| 5823 | | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| 5824 | | (eval $ac_link) 2>&5 |
|---|
| 5825 | | ac_status=$? |
|---|
| 5826 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5827 | | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
|---|
| 5828 | | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| 5829 | | (eval $ac_try) 2>&5 |
|---|
| 5830 | | ac_status=$? |
|---|
| 5831 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| 5832 | | (exit $ac_status); }; }; then |
|---|
| 5833 | | |
|---|
| 5834 | | _wi_pthreads_test=yes |
|---|
| 5835 | | |
|---|
| 5836 | | else |
|---|
| 5837 | | echo "$as_me: program exited with status $ac_status" >&5 |
|---|
| 5838 | | echo "$as_me: failed program was:" >&5 |
|---|
| 5839 | | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| 5840 | | |
|---|
| 5841 | | ( exit $ac_status ) |
|---|
| 5842 | | |
|---|
| 5843 | | _wi_pthreads_test=no |
|---|
| 5844 | | |
|---|
| 5845 | | fi |
|---|
| 5846 | | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
|---|
| 5847 | | fi |
|---|
| 5848 | | |
|---|
| 5849 | | LIBS="$OLD_LIBS" |
|---|
| 5850 | | |
|---|
| 5851 | | if test "$_wi_pthreads_test" = yes ; then |
|---|
| 5852 | | _wi_pthreads_found=yes |
|---|
| 5853 | | _wi_pthreads_libs="-lpthread" |
|---|
| 5854 | | fi |
|---|
| 5855 | | fi |
|---|
| 5856 | | |
|---|
| 5857 | | |
|---|
| 5858 | | if test "$_wi_pthreads_found" = yes ; then |
|---|
| 5859 | | echo "$as_me:$LINENO: result: yes" >&5 |
|---|
| 5860 | | echo "${ECHO_T}yes" >&6 |
|---|
| 5861 | | LIBS="$_wi_pthreads_libs $LIBS" |
|---|
| 5862 | | else |
|---|
| 5863 | | echo "$as_me:$LINENO: result: no" >&5 |
|---|
| 5864 | | echo "${ECHO_T}no" >&6 |
|---|
| 5865 | | { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 |
|---|
| 5866 | | echo "$as_me: error: could not locate pthreads" >&2;} |
|---|
| 5867 | | { (exit 1); exit 1; }; } |
|---|
| 5868 | | fi |
|---|
| 5869 | | |
|---|
| 5870 | | else |
|---|
| 5871 | | |
|---|
| 5872 | | { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 |
|---|
| 5873 | | echo "$as_me: error: could not locate pthreads" >&2;} |
|---|
| 5874 | | { (exit 1); exit 1; }; } |
|---|