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

Commitab93f90

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

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

‎configure

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8227,6 +8227,63 @@ if test "$ac_res" != no; then :
82278227

82288228
fi
82298229

8230+
# Required for thread_test.c on Solaris
8231+
{$as_echo"$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield">&5
8232+
$as_echo_n"checking for library containing sched_yield...">&6; }
8233+
if${ac_cv_search_sched_yield+:}false;then:
8234+
$as_echo_n"(cached)">&6
8235+
else
8236+
ac_func_search_save_LIBS=$LIBS
8237+
cat confdefs.h -<<_ACEOF >conftest.$ac_ext
8238+
/* end confdefs.h. */
8239+
8240+
/* Override any GCC internal prototype to avoid an error.
8241+
Use char because int might match the return type of a GCC
8242+
builtin and then its argument prototype would still apply. */
8243+
#ifdef __cplusplus
8244+
extern "C"
8245+
#endif
8246+
char sched_yield ();
8247+
int
8248+
main ()
8249+
{
8250+
return sched_yield ();
8251+
;
8252+
return 0;
8253+
}
8254+
_ACEOF
8255+
forac_libin'' rt;do
8256+
iftest -z"$ac_lib";then
8257+
ac_res="none required"
8258+
else
8259+
ac_res=-l$ac_lib
8260+
LIBS="-l$ac_lib$ac_func_search_save_LIBS"
8261+
fi
8262+
if ac_fn_c_try_link"$LINENO";then:
8263+
ac_cv_search_sched_yield=$ac_res
8264+
fi
8265+
rm -f core conftest.err conftest.$ac_objext \
8266+
conftest$ac_exeext
8267+
if${ac_cv_search_sched_yield+:}false;then:
8268+
break
8269+
fi
8270+
done
8271+
if${ac_cv_search_sched_yield+:}false;then:
8272+
8273+
else
8274+
ac_cv_search_sched_yield=no
8275+
fi
8276+
rm conftest.$ac_ext
8277+
LIBS=$ac_func_search_save_LIBS
8278+
fi
8279+
{$as_echo"$as_me:${as_lineno-$LINENO}: result:$ac_cv_search_sched_yield">&5
8280+
$as_echo"$ac_cv_search_sched_yield">&6; }
8281+
ac_res=$ac_cv_search_sched_yield
8282+
iftest"$ac_res"!= no;then:
8283+
test"$ac_res" ="none required"|| LIBS="$ac_res$LIBS"
8284+
8285+
fi
8286+
82308287
# Required for thread_test.c on Solaris 2.5:
82318288
# Other ports use it too (HP-UX) so test unconditionally
82328289
{$as_echo"$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r">&5

‎configure.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,8 @@ AC_SEARCH_LIBS(shm_open, rt)
974974
AC_SEARCH_LIBS(shm_unlink, rt)
975975
# Solaris:
976976
AC_SEARCH_LIBS(fdatasync, [rt posix4])
977+
# Required for thread_test.c on Solaris
978+
AC_SEARCH_LIBS(sched_yield, rt)
977979
# Required for thread_test.c on Solaris 2.5:
978980
# Other ports use it too (HP-UX) so test unconditionally
979981
AC_SEARCH_LIBS(gethostbyname_r, nsl)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp