Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc085e07

Browse files
committed
Test -lrt for sched_yield
Apparently, this is needed in some Solaris versions.Author: Oskari Saarenmaa
1 parent5a56c25 commitc085e07

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

‎configure

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8512,6 +8512,94 @@ if test "$ac_res" != no; then
85128512

85138513
fi
85148514

8515+
# Required for thread_test.c on Solaris
8516+
{ $as_echo "$as_me:$LINENO: checking for library containing sched_yield" >&5
8517+
$as_echo_n "checking for library containing sched_yield... " >&6; }
8518+
if test "${ac_cv_search_sched_yield+set}" = set; then
8519+
$as_echo_n "(cached) " >&6
8520+
else
8521+
ac_func_search_save_LIBS=$LIBS
8522+
cat >conftest.$ac_ext <<_ACEOF
8523+
/* confdefs.h. */
8524+
_ACEOF
8525+
cat confdefs.h >>conftest.$ac_ext
8526+
cat >>conftest.$ac_ext <<_ACEOF
8527+
/* end confdefs.h. */
8528+
8529+
/* Override any GCC internal prototype to avoid an error.
8530+
Use char because int might match the return type of a GCC
8531+
builtin and then its argument prototype would still apply. */
8532+
#ifdef __cplusplus
8533+
extern "C"
8534+
#endif
8535+
char sched_yield ();
8536+
int
8537+
main ()
8538+
{
8539+
return sched_yield ();
8540+
;
8541+
return 0;
8542+
}
8543+
_ACEOF
8544+
for ac_lib in '' rt; do
8545+
if test -z "$ac_lib"; then
8546+
ac_res="none required"
8547+
else
8548+
ac_res=-l$ac_lib
8549+
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8550+
fi
8551+
rm -f conftest.$ac_objext conftest$ac_exeext
8552+
if { (ac_try="$ac_link"
8553+
case "(($ac_try" in
8554+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8555+
*) ac_try_echo=$ac_try;;
8556+
esac
8557+
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8558+
$as_echo "$ac_try_echo") >&5
8559+
(eval "$ac_link") 2>conftest.er1
8560+
ac_status=$?
8561+
grep -v '^ *+' conftest.er1 >conftest.err
8562+
rm -f conftest.er1
8563+
cat conftest.err >&5
8564+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8565+
(exit $ac_status); } && {
8566+
test -z "$ac_c_werror_flag" ||
8567+
test ! -s conftest.err
8568+
} && test -s conftest$ac_exeext && {
8569+
test "$cross_compiling" = yes ||
8570+
$as_test_x conftest$ac_exeext
8571+
}; then
8572+
ac_cv_search_sched_yield=$ac_res
8573+
else
8574+
$as_echo "$as_me: failed program was:" >&5
8575+
sed 's/^/| /' conftest.$ac_ext >&5
8576+
8577+
8578+
fi
8579+
8580+
rm -rf conftest.dSYM
8581+
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8582+
conftest$ac_exeext
8583+
if test "${ac_cv_search_sched_yield+set}" = set; then
8584+
break
8585+
fi
8586+
done
8587+
if test "${ac_cv_search_sched_yield+set}" = set; then
8588+
:
8589+
else
8590+
ac_cv_search_sched_yield=no
8591+
fi
8592+
rm conftest.$ac_ext
8593+
LIBS=$ac_func_search_save_LIBS
8594+
fi
8595+
{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sched_yield" >&5
8596+
$as_echo "$ac_cv_search_sched_yield" >&6; }
8597+
ac_res=$ac_cv_search_sched_yield
8598+
if test "$ac_res" != no; then
8599+
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8600+
8601+
fi
8602+
85158603
# Required for thread_test.c on Solaris 2.5:
85168604
# Other ports use it too (HP-UX) so test unconditionally
85178605
{ $as_echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5

‎configure.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,8 @@ AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt])
892892
AC_SEARCH_LIBS(crypt, crypt)
893893
# Solaris:
894894
AC_SEARCH_LIBS(fdatasync, [rt posix4])
895+
# Required for thread_test.c on Solaris
896+
AC_SEARCH_LIBS(sched_yield, rt)
895897
# Required for thread_test.c on Solaris 2.5:
896898
# Other ports use it too (HP-UX) so test unconditionally
897899
AC_SEARCH_LIBS(gethostbyname_r, nsl)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp