1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

don't run the `pthread_attr_getstack' check when cross compiling

* configure.ac: Run the `pthread_attr_getstack' test only when building
  natively.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Volker Grabsch 2010-04-15 01:01:23 +02:00 committed by Ludovic Courtès
parent ec20a3c86d
commit b016e12e95

View file

@ -1410,9 +1410,10 @@ AM_CONDITIONAL([BUILD_PTHREAD_SUPPORT],
if test "$with_threads" = pthreads; then if test "$with_threads" = pthreads; then
AC_MSG_CHECKING(whether pthread_attr_getstack works for the main thread) AC_MSG_CHECKING([whether pthread_attr_getstack works for the main thread])
old_CFLAGS="$CFLAGS" old_CFLAGS="$CFLAGS"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS" CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
if test "$cross_compiling" = "no"; then
AC_RUN_IFELSE([AC_LANG_SOURCE([[ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#if HAVE_PTHREAD_ATTR_GETSTACK #if HAVE_PTHREAD_ATTR_GETSTACK
#include <pthread.h> #include <pthread.h>
@ -1443,6 +1444,9 @@ int main ()
AC_DEFINE([PTHREAD_ATTR_GETSTACK_WORKS], [1], [Define when pthread_att_get_stack works for the main thread])], AC_DEFINE([PTHREAD_ATTR_GETSTACK_WORKS], [1], [Define when pthread_att_get_stack works for the main thread])],
[works=no], [works=no],
[]) [])
else
works="assuming it doesn't"
fi
CFLAGS="$old_CFLAGS" CFLAGS="$old_CFLAGS"
AC_MSG_RESULT($works) AC_MSG_RESULT($works)