From 3b39a6827f68a5183ce44637ca6b39c464d30067 Mon Sep 17 00:00:00 2001 From: tgoodwin Date: Thu, 5 Feb 1998 15:22:28 +0000 Subject: use sigsetjmp, etc. --- configure.ac | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 89eb4e8..1858300 100644 --- a/configure.ac +++ b/configure.ac @@ -18,23 +18,11 @@ AC_CHECK_HEADERS(sys/resource.h sys/time.h sys/types.h unistd.h) AC_HEADER_DIRENT AC_HEADER_STDC -dnl Linux puts real signal names in /usr/include/asm/signal.h. NT puts -dnl them somewhere else altogether. This attempts to parse the output -dnl of saying `#include ' to find the full path of files named -dnl signal.h, then examines each of those to see if it contains the -dnl `#define's we want. What a hack. - -echo '#include ' > temp.c -AC_CACHE_CHECK(for full paths of , rc_cv_full_signal_h, [ - rc_cv_full_signal_h=`$CPP temp.c |sed -n 's/.*"\(.*signal.h\)".*/\1/p' |sort -u |sed 'y/ -/ /'` - case "x$rc_cv_full_signal_h" in - x) - rc_cv_full_signal_h='/usr/include/sys/signal.h /usr/include/asm/signal.h' - ;; - esac -]) -rm temp.c +dnl At some point, we might attempt to parse the output of saying +dnl `#include ' using something like +dnl rc_cv_full_signal_h=`$CPP temp.c |sed -n 's/.*"\(.*signal.h\)".*/\1/p' |sort -u |sed 'y/\n/ /'` +dnl (but that doesn't work quite right). +rc_cv_full_signal_h='/usr/include/signal.h /usr/include/sys/signal.h /usr/include/asm/signal.h' AC_CACHE_CHECK(for signal names, rc_cv_signal_h, for i in $rc_cv_full_signal_h; do @@ -60,8 +48,25 @@ AC_TYPE_UID_T AC_CHECK_FUNCS(getgroups setpgrp setrlimit) + +dnl sigsetjmp() isn't a real function in some places. +AC_CACHE_CHECK(for sigsetjmp, rc_cv_sigsetjmp, + AC_TRY_LINK([ +#include + ], [ +jmp_buf e; +setjmp(e); + ], rc_cv_sigsetjmp=yes, rc_cv_sigsetjmp=no)) +case "x$rc_cv_sigsetjmp" in +xyes) + AC_DEFINE(HAVE_SIGSETJMP) + ;; +esac + + AC_FUNC_SETPGRP + dnl HPUX needs _KERNEL defined to pick up RLIMIT_foo defines. (Why?) AC_CACHE_CHECK(if _KERNEL is required for RLIMIT defines, rc_cv_kernel_rlimit, AC_TRY_COMPILE([ @@ -85,6 +90,7 @@ xyes) ;; esac + dnl Look for rlim_t in sys/types.h and sys/resource.h AC_CACHE_CHECK(for rlim_t, rc_cv_have_rlim_t, AC_EGREP_CPP(rlim_t, [ -- cgit v1.2.3