@@ -20396,6 +20396,17 @@ fi
20396
20396
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday" >&5
20397
20397
$as_echo_n "checking for gettimeofday... " >&6; }
20398
20398
20399
+ runtests=yes
20400
+ ac_has_gettimeofday=no
20401
+ ac_has_sys_time_h=no
20402
+
20403
+ case "${target}" in
20404
+ *zephyr*)
20405
+ runtests=no
20406
+ ac_has_gettimeofday=yes
20407
+ ac_has_sys_time_h=yes
20408
+ ;;
20409
+ esac
20399
20410
20400
20411
ac_ext=cpp
20401
20412
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -20406,7 +20417,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20406
20417
ac_save_CXXFLAGS="$CXXFLAGS"
20407
20418
CXXFLAGS="$CXXFLAGS -fno-exceptions"
20408
20419
20409
- ac_has_gettimeofday=no;
20420
+ if test x"$runtests" = x"yes"; then
20410
20421
for ac_header in sys/time.h
20411
20422
do :
20412
20423
ac_fn_cxx_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
@@ -20420,10 +20431,12 @@ else
20420
20431
fi
20421
20432
20422
20433
done
20434
+ fi
20423
20435
20424
20436
if test x"$ac_has_sys_time_h" = x"yes"; then
20425
20437
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday" >&5
20426
20438
$as_echo_n "checking for gettimeofday... " >&6; }
20439
+ if test x"$runtests" = x"yes"; then
20427
20440
if test x$gcc_no_link = xyes; then
20428
20441
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20429
20442
/* end confdefs.h. */
@@ -20464,11 +20477,12 @@ else
20464
20477
fi
20465
20478
rm -f core conftest.err conftest.$ac_objext \
20466
20479
conftest$ac_exeext conftest.$ac_ext
20480
+ fi
20481
+ fi
20467
20482
fi
20468
20483
20469
20484
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_gettimeofday" >&5
20470
20485
$as_echo "$ac_has_gettimeofday" >&6; }
20471
- fi
20472
20486
20473
20487
if test x"$ac_has_gettimeofday" = x"yes"; then
20474
20488
@@ -20517,6 +20531,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20517
20531
ac_has_clock_realtime=no
20518
20532
ac_has_nanosleep=no
20519
20533
ac_has_sched_yield=no
20534
+ ac_has_sleep=no
20535
+ ac_has_usleep=no
20520
20536
20521
20537
if test x"$enable_libstdcxx_time" = x"auto"; then
20522
20538
@@ -20626,6 +20642,17 @@ fi
20626
20642
ac_has_sched_yield=yes
20627
20643
esac
20628
20644
20645
+ case "${target}" in
20646
+ *zephyr*)
20647
+ ac_has_clock_monotonic=yes
20648
+ ac_has_clock_realtime=yes
20649
+ ac_has_nanosleep=yes
20650
+ ac_has_sched_yield=yes
20651
+ ac_has_sleep=yes
20652
+ ac_has_usleep=yes
20653
+ ;;
20654
+ esac
20655
+
20629
20656
elif test x"$enable_libstdcxx_time" != x"no"; then
20630
20657
20631
20658
if test x"$enable_libstdcxx_time" = x"rt"; then
@@ -76041,6 +76068,23 @@ else
76041
76068
fi
76042
76069
76043
76070
76071
+ runtests=yes
76072
+ ac_gthread_use_mutex_timedlock=no
76073
+ ac_has_gthreads=no
76074
+ ac_gthread_use_pthreads=no
76075
+ ac_have_posix_semaphore=no
76076
+ ac_gthread_use_pthreads_rwlock_t=no
76077
+
76078
+ case "${target}" in
76079
+ *zephyr*)
76080
+ runtests=no
76081
+ ac_gthread_use_mutex_timedlock=yes
76082
+ ac_has_gthreads=yes
76083
+ ac_gthread_use_pthreads=yes
76084
+ ac_have_posix_semaphore=yes
76085
+ ac_gthread_use_pthreads_rwlock_t=yes
76086
+ ;;
76087
+ esac
76044
76088
76045
76089
if test x$enable_libstdcxx_threads = xauto ||
76046
76090
test x$enable_libstdcxx_threads = xyes; then
@@ -76066,6 +76110,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
76066
76110
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it can be safely assumed that mutex_timedlock is available" >&5
76067
76111
$as_echo_n "checking whether it can be safely assumed that mutex_timedlock is available... " >&6; }
76068
76112
76113
+ if x"$runtests" = x"yes"; then
76069
76114
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76070
76115
/* end confdefs.h. */
76071
76116
#include <unistd.h>
@@ -76089,6 +76134,7 @@ else
76089
76134
ac_gthread_use_mutex_timedlock=0
76090
76135
fi
76091
76136
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
76137
+ fi
76092
76138
76093
76139
76094
76140
cat >>confdefs.h <<_ACEOF
@@ -76104,6 +76150,7 @@ $as_echo "$res_mutex_timedlock" >&6; }
76104
76150
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gthreads library" >&5
76105
76151
$as_echo_n "checking for gthreads library... " >&6; }
76106
76152
76153
+ if x"$runtests" = x"yes"; then
76107
76154
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76108
76155
/* end confdefs.h. */
76109
76156
#include "gthr.h"
@@ -76128,6 +76175,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
76128
76175
else
76129
76176
ac_has_gthreads=no
76130
76177
fi
76178
+ fi
76131
76179
76132
76180
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_gthreads" >&5
76133
76181
$as_echo "$ac_has_gthreads" >&6; }
@@ -76142,6 +76190,7 @@ $as_echo "#define _GLIBCXX_HAS_GTHREADS 1" >>confdefs.h
76142
76190
# On VxWorks for example, pthread_rwlock_t is defined in sys/types.h
76143
76191
# but the pthread library is not there by default and the gthread library
76144
76192
# does not use it.
76193
+ if x"$runtests" = x"yes"; then
76145
76194
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76146
76195
/* end confdefs.h. */
76147
76196
#include "gthr.h"
@@ -76163,18 +76212,27 @@ else
76163
76212
ac_gthread_use_pthreads=no
76164
76213
fi
76165
76214
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
76215
+ fi
76166
76216
if test x"$ac_gthread_use_pthreads" = x"yes"; then
76217
+ if x"$runtests" = x"yes"; then
76167
76218
ac_fn_cxx_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include \"gthr.h\"
76168
76219
"
76169
76220
if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
76170
76221
76171
76222
$as_echo "#define _GLIBCXX_USE_PTHREAD_RWLOCK_T 1" >>confdefs.h
76172
76223
76173
76224
fi
76225
+ else
76226
+ if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
76174
76227
76228
+ $as_echo "#define _GLIBCXX_USE_PTHREAD_RWLOCK_T 1" >>confdefs.h
76229
+
76230
+ fi
76231
+ fi
76175
76232
fi
76176
76233
fi
76177
76234
76235
+ if x"$runtests" = x"yes"; then
76178
76236
ac_fn_cxx_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
76179
76237
if test "x$ac_cv_header_semaphore_h" = xyes; then :
76180
76238
@@ -76222,6 +76280,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
76222
76280
else
76223
76281
ac_have_posix_semaphore=no
76224
76282
fi
76283
+ fi
76225
76284
76226
76285
76227
76286
0 commit comments