@@ -7529,11 +7529,9 @@ if ${ac_cv_pthread+:} false; then :
75297529 $as_echo_n " (cached) " >&6
75307530else
75317531 ac_save_cc=" $CC "
7532- CC=" $CC -pthread"
7533- if test " $cross_compiling " = yes; then :
7534- ac_cv_pthread=no
7535- else
7536- cat confdefs.h - << _ACEOF >conftest.$ac_ext
7532+ CC=" $CC "
7533+ CFLAGS=" -pthread"
7534+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
75377535/* end confdefs.h. */
75387536
75397537#include <stdio.h>
@@ -7550,15 +7548,13 @@ int main(){
75507548}
75517549
75527550_ACEOF
7553- if ac_fn_c_try_run " $LINENO " ; then :
7551+ if ac_fn_c_try_link " $LINENO " ; then :
75547552 ac_cv_pthread=yes
75557553else
75567554 ac_cv_pthread=no
75577555fi
7558- rm -f core * .core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7559- conftest.$ac_objext conftest.beam conftest.$ac_ext
7560- fi
7561-
7556+ rm -f core conftest.err conftest.$ac_objext \
7557+ conftest$ac_exeext conftest.$ac_ext
75627558CC=" $ac_save_cc "
75637559fi
75647560
@@ -7585,7 +7581,8 @@ then
75857581 ac_cv_cxx_thread=yes
75867582elif test " $ac_cv_pthread " = " yes"
75877583then
7588- CXX=" $CXX -pthread"
7584+ CXX=" $CXX "
7585+ CXXFLAGS=" -pthread"
75897586 ac_cv_cxx_thread=yes
75907587fi
75917588
@@ -8865,7 +8862,7 @@ then CC="$CC -Kpthread"
88658862elif test " $ac_cv_kthread " = " yes"
88668863then CC=" $CC -Kthread"
88678864elif test " $ac_cv_pthread " = " yes"
8868- then CC=" $CC -pthread"
8865+ then CC=" $CC " ; BASECFLAGS= " $BASECFLAGS -pthread " ; BASECXXFLAGS= " $BASECXXFLAGS -pthread"
88698866fi
88708867
88718868{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for pthread_t" >&5
@@ -10298,9 +10295,11 @@ then
1029810295 posix_threads=yes
1029910296elif test " $ac_cv_pthread " = " yes"
1030010297then
10301- CC=" $CC -pthread"
10298+ CC=" $CC "
10299+ BASECFLAGS=" $BASECFLAGS -pthread"
1030210300 if test " $ac_cv_cxx_thread " = " yes" ; then
10303- CXX=" $CXX -pthread"
10301+ CXX=" $CXX "
10302+ BASECXXFLAGS=" $BASECFLAGS -pthread"
1030410303 fi
1030510304 posix_threads=yes
1030610305else
0 commit comments