mirror of https://github.com/postgres/postgres
Test -lrt for sched_yield
Apparently, this is needed in some Solaris versions. Author: Oskari Saarenmaa
This commit is contained in:
parent
131926a52d
commit
ab93f90cd3
|
@ -8227,6 +8227,63 @@ if test "$ac_res" != no; then :
|
|||
|
||||
fi
|
||||
|
||||
# Required for thread_test.c on Solaris
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
|
||||
$as_echo_n "checking for library containing sched_yield... " >&6; }
|
||||
if ${ac_cv_search_sched_yield+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_func_search_save_LIBS=$LIBS
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char sched_yield ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return sched_yield ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
for ac_lib in '' rt; do
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
ac_res=-l$ac_lib
|
||||
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
fi
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_search_sched_yield=$ac_res
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext
|
||||
if ${ac_cv_search_sched_yield+:} false; then :
|
||||
break
|
||||
fi
|
||||
done
|
||||
if ${ac_cv_search_sched_yield+:} false; then :
|
||||
|
||||
else
|
||||
ac_cv_search_sched_yield=no
|
||||
fi
|
||||
rm conftest.$ac_ext
|
||||
LIBS=$ac_func_search_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
|
||||
$as_echo "$ac_cv_search_sched_yield" >&6; }
|
||||
ac_res=$ac_cv_search_sched_yield
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
# Required for thread_test.c on Solaris 2.5:
|
||||
# Other ports use it too (HP-UX) so test unconditionally
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
|
||||
|
|
|
@ -974,6 +974,8 @@ AC_SEARCH_LIBS(shm_open, rt)
|
|||
AC_SEARCH_LIBS(shm_unlink, rt)
|
||||
# Solaris:
|
||||
AC_SEARCH_LIBS(fdatasync, [rt posix4])
|
||||
# Required for thread_test.c on Solaris
|
||||
AC_SEARCH_LIBS(sched_yield, rt)
|
||||
# Required for thread_test.c on Solaris 2.5:
|
||||
# Other ports use it too (HP-UX) so test unconditionally
|
||||
AC_SEARCH_LIBS(gethostbyname_r, nsl)
|
||||
|
|
Loading…
Reference in New Issue