@@ -7521,11 +7521,9 @@ if ${ac_cv_pthread+:} false; then :
7521
7521
$as_echo_n " (cached) " >&6
7522
7522
else
7523
7523
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
7529
7527
/* end confdefs.h. */
7530
7528
7531
7529
#include <stdio.h>
@@ -7542,15 +7540,13 @@ int main(){
7542
7540
}
7543
7541
7544
7542
_ACEOF
7545
- if ac_fn_c_try_run " $LINENO " ; then :
7543
+ if ac_fn_c_try_link " $LINENO " ; then :
7546
7544
ac_cv_pthread=yes
7547
7545
else
7548
7546
ac_cv_pthread=no
7549
7547
fi
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
7554
7550
CC=" $ac_save_cc "
7555
7551
fi
7556
7552
@@ -7577,7 +7573,8 @@ then
7577
7573
ac_cv_cxx_thread=yes
7578
7574
elif test " $ac_cv_pthread " = " yes"
7579
7575
then
7580
- CXX=" $CXX -pthread"
7576
+ CXX=" $CXX "
7577
+ CXXFLAGS=" -pthread"
7581
7578
ac_cv_cxx_thread=yes
7582
7579
fi
7583
7580
@@ -8857,7 +8854,7 @@ then CC="$CC -Kpthread"
8857
8854
elif test " $ac_cv_kthread " = " yes"
8858
8855
then CC=" $CC -Kthread"
8859
8856
elif test " $ac_cv_pthread " = " yes"
8860
- then CC=" $CC -pthread"
8857
+ then CC=" $CC " ; BASECFLAGS= " $BASECFLAGS -pthread " ; BASECXXFLAGS= " $BASECXXFLAGS -pthread"
8861
8858
fi
8862
8859
8863
8860
{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for pthread_t" >&5
@@ -10290,9 +10287,11 @@ then
10290
10287
posix_threads=yes
10291
10288
elif test " $ac_cv_pthread " = " yes"
10292
10289
then
10293
- CC=" $CC -pthread"
10290
+ CC=" $CC "
10291
+ BASECFLAGS=" $BASECFLAGS -pthread"
10294
10292
if test " $ac_cv_cxx_thread " = " yes" ; then
10295
- CXX=" $CXX -pthread"
10293
+ CXX=" $CXX "
10294
+ BASECXXFLAGS=" $BASECFLAGS -pthread"
10296
10295
fi
10297
10296
posix_threads=yes
10298
10297
else
0 commit comments