detect the availability of ucontext.h

This commit is contained in:
Kalamatee 2021-01-04 21:59:03 +00:00 committed by deadwood
parent ce73388a6f
commit 9ed3a895fa
3 changed files with 16 additions and 0 deletions

View File

@ -162,6 +162,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <ucontext.h> header file. */
#undef HAVE_UCONTEXT_H
/* Define to 1 if you have the <sys/ucontext.h> header file. */
#undef HAVE_SYS_UCONTEXT_H

12
configure vendored
View File

@ -10193,6 +10193,18 @@ if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat"
if test "$aros_host_arch" != "$aros_target_arch" ; then
cross_compiling=yes
fi
for ac_header in ucontext.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "ucontext.h" "ac_cv_header_ucontext_h" "$ac_includes_default"
if test "x$ac_cv_header_ucontext_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UCONTEXT_H 1
_ACEOF
fi
done
for ac_header in sys/ucontext.h
do :
ac_fn_c_check_header_compile "$LINENO" "sys/ucontext.h" "ac_cv_header_sys_ucontext_h" "#include <signal.h>

View File

@ -2391,6 +2391,7 @@ if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat"
if test "$aros_host_arch" != "$aros_target_arch" ; then
cross_compiling=yes
fi
AC_CHECK_HEADERS(ucontext.h)
AC_CHECK_HEADERS(sys/ucontext.h,,,[#include <signal.h>])
else
dnl For a native build we only care if our host_cc can produce static ELF files. If so, we can use