diff options
author | Jeremy Allison <jra@samba.org> | 2013-01-14 15:21:35 -0800 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-01-15 08:28:45 +0100 |
commit | fe6e323addb967b392bfd406c499a6f67fcdc152 (patch) | |
tree | d31c5c131fe9086262cc84dcbdcb2a19858686cb | |
parent | 7fe400de4c189c8bdf0cc8afdebde2f21680fac2 (diff) | |
download | samba-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>
-rw-r--r-- | lib/replace/libreplace.m4 | 13 |
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" |