@@ -7529,11 +7529,9 @@ if ${ac_cv_pthread+:} false; then :
7529
7529
$as_echo_n " (cached) " >&6
7530
7530
else
7531
7531
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
7537
7535
/* end confdefs.h. */
7538
7536
7539
7537
#include <stdio.h>
@@ -7550,15 +7548,13 @@ int main(){
7550
7548
}
7551
7549
7552
7550
_ACEOF
7553
- if ac_fn_c_try_run " $LINENO " ; then :
7551
+ if ac_fn_c_try_link " $LINENO " ; then :
7554
7552
ac_cv_pthread=yes
7555
7553
else
7556
7554
ac_cv_pthread=no
7557
7555
fi
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
7562
7558
CC=" $ac_save_cc "
7563
7559
fi
7564
7560
@@ -7585,7 +7581,8 @@ then
7585
7581
ac_cv_cxx_thread=yes
7586
7582
elif test " $ac_cv_pthread " = " yes"
7587
7583
then
7588
- CXX=" $CXX -pthread"
7584
+ CXX=" $CXX "
7585
+ CXXFLAGS=" -pthread"
7589
7586
ac_cv_cxx_thread=yes
7590
7587
fi
7591
7588
@@ -8865,7 +8862,7 @@ then CC="$CC -Kpthread"
8865
8862
elif test " $ac_cv_kthread " = " yes"
8866
8863
then CC=" $CC -Kthread"
8867
8864
elif test " $ac_cv_pthread " = " yes"
8868
- then CC=" $CC -pthread"
8865
+ then CC=" $CC " ; BASECFLAGS= " $BASECFLAGS -pthread " ; BASECXXFLAGS= " $BASECXXFLAGS -pthread"
8869
8866
fi
8870
8867
8871
8868
{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for pthread_t" >&5
@@ -10298,9 +10295,11 @@ then
10298
10295
posix_threads=yes
10299
10296
elif test " $ac_cv_pthread " = " yes"
10300
10297
then
10301
- CC=" $CC -pthread"
10298
+ CC=" $CC "
10299
+ BASECFLAGS=" $BASECFLAGS -pthread"
10302
10300
if test " $ac_cv_cxx_thread " = " yes" ; then
10303
- CXX=" $CXX -pthread"
10301
+ CXX=" $CXX "
10302
+ BASECXXFLAGS=" $BASECFLAGS -pthread"
10304
10303
fi
10305
10304
posix_threads=yes
10306
10305
else
0 commit comments