@@ -7521,11 +7521,9 @@ if ${ac_cv_pthread+:} false; then :
75217521 $as_echo_n " (cached) " >&6
75227522else
75237523 ac_save_cc=" $CC "
7524- CC=" $CC -pthread"
7525- if test " $cross_compiling " = yes; then :
7526- ac_cv_pthread=no
7527- else
7528- cat confdefs.h - << _ACEOF >conftest.$ac_ext
7524+ CC=" $CC "
7525+ CFLAGS=" -pthread"
7526+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
75297527/* end confdefs.h. */
75307528
75317529#include <stdio.h>
@@ -7542,15 +7540,13 @@ int main(){
75427540}
75437541
75447542_ACEOF
7545- if ac_fn_c_try_run " $LINENO " ; then :
7543+ if ac_fn_c_try_link " $LINENO " ; then :
75467544 ac_cv_pthread=yes
75477545else
75487546 ac_cv_pthread=no
75497547fi
7550- rm -f core * .core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7551- conftest.$ac_objext conftest.beam conftest.$ac_ext
7552- fi
7553-
7548+ rm -f core conftest.err conftest.$ac_objext \
7549+ conftest$ac_exeext conftest.$ac_ext
75547550CC=" $ac_save_cc "
75557551fi
75567552
@@ -7577,7 +7573,8 @@ then
75777573 ac_cv_cxx_thread=yes
75787574elif test " $ac_cv_pthread " = " yes"
75797575then
7580- CXX=" $CXX -pthread"
7576+ CXX=" $CXX "
7577+ CXXFLAGS=" -pthread"
75817578 ac_cv_cxx_thread=yes
75827579fi
75837580
@@ -8857,7 +8854,7 @@ then CC="$CC -Kpthread"
88578854elif test " $ac_cv_kthread " = " yes"
88588855then CC=" $CC -Kthread"
88598856elif test " $ac_cv_pthread " = " yes"
8860- then CC=" $CC -pthread"
8857+ then CC=" $CC " ; BASECFLAGS= " $BASECFLAGS -pthread " ; BASECXXFLAGS= " $BASECXXFLAGS -pthread"
88618858fi
88628859
88638860{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for pthread_t" >&5
@@ -10290,9 +10287,11 @@ then
1029010287 posix_threads=yes
1029110288elif test " $ac_cv_pthread " = " yes"
1029210289then
10293- CC=" $CC -pthread"
10290+ CC=" $CC "
10291+ BASECFLAGS=" $BASECFLAGS -pthread"
1029410292 if test " $ac_cv_cxx_thread " = " yes" ; then
10295- CXX=" $CXX -pthread"
10293+ CXX=" $CXX "
10294+ BASECXXFLAGS=" $BASECFLAGS -pthread"
1029610295 fi
1029710296 posix_threads=yes
1029810297else
0 commit comments