mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 22:59:16 +02:00
Also assume AC_LINK_IFELSE() is OK when cross-compiling for the libs
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com> * configure.in: Also assume AC_LINK_IFELSE() is OK when cross-compiling for the libs checks, and for the sched_get_priority_min() check. * configure.in: Add cached value glib_cv_use_pid_surrogate.
This commit is contained in:
parent
f25174bcbc
commit
bf2ae7b7e5
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Also assume AC_LINK_IFELSE() is
|
||||||
|
OK when cross-compiling for the libs checks, and for
|
||||||
|
the sched_get_priority_min() check.
|
||||||
|
|
||||||
|
* configure.in: Add cached value glib_cv_use_pid_surrogate.
|
||||||
|
|
||||||
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Factor out repeated thread test into
|
* configure.in: Factor out repeated thread test into
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Also assume AC_LINK_IFELSE() is
|
||||||
|
OK when cross-compiling for the libs checks, and for
|
||||||
|
the sched_get_priority_min() check.
|
||||||
|
|
||||||
|
* configure.in: Add cached value glib_cv_use_pid_surrogate.
|
||||||
|
|
||||||
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Factor out repeated thread test into
|
* configure.in: Factor out repeated thread test into
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Also assume AC_LINK_IFELSE() is
|
||||||
|
OK when cross-compiling for the libs checks, and for
|
||||||
|
the sched_get_priority_min() check.
|
||||||
|
|
||||||
|
* configure.in: Add cached value glib_cv_use_pid_surrogate.
|
||||||
|
|
||||||
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Factor out repeated thread test into
|
* configure.in: Factor out repeated thread test into
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Also assume AC_LINK_IFELSE() is
|
||||||
|
OK when cross-compiling for the libs checks, and for
|
||||||
|
the sched_get_priority_min() check.
|
||||||
|
|
||||||
|
* configure.in: Add cached value glib_cv_use_pid_surrogate.
|
||||||
|
|
||||||
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Factor out repeated thread test into
|
* configure.in: Factor out repeated thread test into
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Also assume AC_LINK_IFELSE() is
|
||||||
|
OK when cross-compiling for the libs checks, and for
|
||||||
|
the sched_get_priority_min() check.
|
||||||
|
|
||||||
|
* configure.in: Add cached value glib_cv_use_pid_surrogate.
|
||||||
|
|
||||||
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Factor out repeated thread test into
|
* configure.in: Factor out repeated thread test into
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Also assume AC_LINK_IFELSE() is
|
||||||
|
OK when cross-compiling for the libs checks, and for
|
||||||
|
the sched_get_priority_min() check.
|
||||||
|
|
||||||
|
* configure.in: Add cached value glib_cv_use_pid_surrogate.
|
||||||
|
|
||||||
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Factor out repeated thread test into
|
* configure.in: Factor out repeated thread test into
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 11 15:52:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Also assume AC_LINK_IFELSE() is
|
||||||
|
OK when cross-compiling for the libs checks, and for
|
||||||
|
the sched_get_priority_min() check.
|
||||||
|
|
||||||
|
* configure.in: Add cached value glib_cv_use_pid_surrogate.
|
||||||
|
|
||||||
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 15:10:25 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Factor out repeated thread test into
|
* configure.in: Factor out repeated thread test into
|
||||||
|
82
configure.in
82
configure.in
@ -1282,7 +1282,19 @@ main()
|
|||||||
pthread_create (&t, 0, func, 0);
|
pthread_create (&t, 0, func, 0);
|
||||||
pthread_join (t, &ret);
|
pthread_join (t, &ret);
|
||||||
exit (check_me != 42 || ret != 42);
|
exit (check_me != 42 || ret != 42);
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Test program for sched_get_priority_min()
|
||||||
|
dnl
|
||||||
|
m4_define([glib_sched_priority_test],[
|
||||||
|
#include <sched.h>
|
||||||
|
#include <errno.h>
|
||||||
|
int main() {
|
||||||
|
errno = 0;
|
||||||
|
return sched_get_priority_min(SCHED_OTHER)==-1
|
||||||
|
&& errno != 0;
|
||||||
|
}])
|
||||||
|
|
||||||
if test x"$have_threads" != xno; then
|
if test x"$have_threads" != xno; then
|
||||||
|
|
||||||
@ -1297,9 +1309,9 @@ if test x"$have_threads" != xno; then
|
|||||||
AC_TRY_RUN(glib_thread_test,
|
AC_TRY_RUN(glib_thread_test,
|
||||||
glib_flag_works=yes,
|
glib_flag_works=yes,
|
||||||
glib_flag_works=no,
|
glib_flag_works=no,
|
||||||
AC_LINK_IFELSE(glib_thread_test,
|
[AC_LINK_IFELSE(glib_thread_test,
|
||||||
glib_flag_works=yes,
|
glib_flag_works=yes,
|
||||||
glib_flag_works=no))
|
glib_flag_works=no)])
|
||||||
CFLAGS="$glib_save_CFLAGS"
|
CFLAGS="$glib_save_CFLAGS"
|
||||||
if test $glib_flag_works = yes ; then
|
if test $glib_flag_works = yes ; then
|
||||||
G_THREAD_CFLAGS=-$flag
|
G_THREAD_CFLAGS=-$flag
|
||||||
@ -1422,10 +1434,17 @@ case $have_threads in
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for pthread_create/pthread_join$IN)
|
AC_MSG_CHECKING(for pthread_create/pthread_join$IN)
|
||||||
AC_TRY_RUN(glib_thread_test,
|
AC_TRY_RUN(glib_thread_test,
|
||||||
[AC_MSG_RESULT(yes)
|
glib_result=yes,
|
||||||
G_THREAD_LIBS="$add_thread_lib"
|
glib_result=no,
|
||||||
break],
|
[AC_LINK_IFELSE(glib_thread_test,
|
||||||
[AC_MSG_RESULT(no)])
|
glib_result=yes
|
||||||
|
glib_result=no)])
|
||||||
|
AC_MSG_RESULT($glib_result)
|
||||||
|
|
||||||
|
if test "$glib_result" = "yes" ; then
|
||||||
|
G_THREAD_LIBS="$add_thread_lib"
|
||||||
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
if test "x$G_THREAD_LIBS" = xerror; then
|
if test "x$G_THREAD_LIBS" = xerror; then
|
||||||
AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2)
|
AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2)
|
||||||
@ -1447,20 +1466,20 @@ case $have_threads in
|
|||||||
LIBS="$glib_save_LIBS $add_thread_lib"
|
LIBS="$glib_save_LIBS $add_thread_lib"
|
||||||
|
|
||||||
AC_MSG_CHECKING(for sched_get_priority_min$IN)
|
AC_MSG_CHECKING(for sched_get_priority_min$IN)
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN(glib_sched_priority_test,
|
||||||
#include <sched.h>
|
glib_result=yes,
|
||||||
#include <errno.h>
|
glib_result=no,
|
||||||
int main() {
|
[AC_LINK_IFELSE(glib_sched_priority_test,
|
||||||
errno = 0;
|
glib_result=yes
|
||||||
return sched_get_priority_min(SCHED_OTHER)==-1
|
glib_result=no)])
|
||||||
&& errno != 0;
|
AC_MSG_RESULT($glib_result)
|
||||||
} ],
|
|
||||||
[AC_MSG_RESULT(yes)
|
if test "$glib_result" = "yes" ; then
|
||||||
G_THREAD_LIBS="$G_THREAD_LIBS $add_thread_lib"
|
G_THREAD_LIBS="$G_THREAD_LIBS $add_thread_lib"
|
||||||
posix_priority_min="sched_get_priority_min(SCHED_OTHER)"
|
posix_priority_min="sched_get_priority_min(SCHED_OTHER)"
|
||||||
posix_priority_max="sched_get_priority_max(SCHED_OTHER)"
|
posix_priority_max="sched_get_priority_max(SCHED_OTHER)"
|
||||||
break],
|
break
|
||||||
[AC_MSG_RESULT(no)])
|
fi
|
||||||
done
|
done
|
||||||
LIBS="$glib_save_LIBS"
|
LIBS="$glib_save_LIBS"
|
||||||
mutex_has_default=yes
|
mutex_has_default=yes
|
||||||
@ -1622,8 +1641,9 @@ int main () {
|
|||||||
AC_DEFINE_UNQUOTED(POSIX_YIELD_FUNC,$posix_yield_func,[The POSIX RT yield function])
|
AC_DEFINE_UNQUOTED(POSIX_YIELD_FUNC,$posix_yield_func,[The POSIX RT yield function])
|
||||||
CPPFLAGS="$glib_save_CPPFLAGS"
|
CPPFLAGS="$glib_save_CPPFLAGS"
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to use the PID niceness surrogate for thread priorities)
|
AC_CACHE_CHECK([whether to use the PID niceness surrogate for thread priorities],
|
||||||
AC_TRY_RUN([
|
glib_cv_use_pid_surrogate,
|
||||||
|
[AC_TRY_RUN([
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -1637,11 +1657,15 @@ main()
|
|||||||
pthread_join (t, &ret);
|
pthread_join (t, &ret);
|
||||||
exit (getpid()==other_pid ||
|
exit (getpid()==other_pid ||
|
||||||
$posix_priority_min != $posix_priority_max);
|
$posix_priority_min != $posix_priority_max);
|
||||||
} ],
|
} ],
|
||||||
[AC_MSG_RESULT(yes)
|
[glib_cv_use_pid_surrogate=yes],
|
||||||
AC_DEFINE(G_THREAD_USE_PID_SURROGATE, 1, [whether to use the PID niceness surrogate for thread priorities])
|
[glib_cv_use_pid_surrogate=no],
|
||||||
],
|
[])])
|
||||||
[AC_MSG_RESULT(no)])
|
if test "$glib_cv_use_pid_surrogate" = "yes" ; then
|
||||||
|
AC_DEFINE(G_THREAD_USE_PID_SURROGATE, 1,
|
||||||
|
[whether to use the PID niceness surrogate for thread priorities])
|
||||||
|
fi
|
||||||
|
|
||||||
elif test x"$have_threads" = xwin32; then
|
elif test x"$have_threads" = xwin32; then
|
||||||
# It's a pointer to a private struct
|
# It's a pointer to a private struct
|
||||||
GLIB_SIZEOF(,struct _GThreadData *, system_thread)
|
GLIB_SIZEOF(,struct _GThreadData *, system_thread)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user