summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-01-14 15:21:35 -0800
committerStefan Metzmacher <metze@samba.org>2013-01-15 08:28:45 +0100
commitfe6e323addb967b392bfd406c499a6f67fcdc152 (patch)
treed31c5c131fe9086262cc84dcbdcb2a19858686cb /lib/replace
parent7fe400de4c189c8bdf0cc8afdebde2f21680fac2 (diff)
downloadsamba-fe6e323addb967b392bfd406c499a6f67fcdc152.tar.gz
samba-fe6e323addb967b392bfd406c499a6f67fcdc152.tar.bz2
samba-fe6e323addb967b392bfd406c499a6f67fcdc152.zip
lib/replace: Add ucontext configure autoconf checks.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/libreplace.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 1cdefc0870..f4ae715340 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -126,6 +126,7 @@ AC_CHECK_HEADERS(unix.h)
AC_CHECK_HEADERS(malloc.h)
AC_CHECK_HEADERS(syscall.h)
AC_CHECK_HEADERS(sys/syscall.h)
+AC_CHECK_HEADERS(sys/ucontext.h)
AC_CHECK_FUNCS(syscall setuid seteuid setreuid setresuid setgid setegid setregid setresgid setgroups)
AC_CHECK_FUNCS(chroot bzero strerror strerror_r memalign posix_memalign getpagesize)
@@ -415,6 +416,18 @@ if test x"$libreplace_cv_struct_timespec" = x"yes"; then
AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec])
fi
+AC_CACHE_CHECK([for ucontext_t type],libreplace_cv_ucontext_t, [
+ AC_TRY_COMPILE([
+#include <signal.h>
+#if HAVE_SYS_UCONTEXT_H
+#include <sys/ucontext.h>
+# endif
+],[ucontext_t uc; sigaddset(&uc.uc_sigmask, SIGUSR1);],
+ libreplace_cv_ucontext_t=yes,libreplace_cv_ucontext_t=no)])
+if test x"$libreplace_cv_ucontext_t" = x"yes"; then
+ AC_DEFINE(HAVE_UCONTEXT_T,1,[Whether we have ucontext_t])
+fi
+
AC_CHECK_FUNCS([printf memset memcpy],,[AC_MSG_ERROR([Required function not found])])
echo "LIBREPLACE_BROKEN_CHECKS: END"