From f08474ea0c5d4ad9266081d5f3dd0017448d2498 Mon Sep 17 00:00:00 2001 From: tgoodwin Date: Thu, 19 Feb 1998 12:39:21 +0000 Subject: do preprocessor trick: it works now --- configure.ac | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 16ea3b1..649f18c 100644 --- a/configure.ac +++ b/configure.ac @@ -22,11 +22,28 @@ AC_CHECK_HEADERS(sys/resource.h sys/time.h sys/types.h unistd.h) AC_HEADER_DIRENT AC_HEADER_STDC -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' + +dnl Most systems put the real signal names in /usr/include/sys/signal.h. +dnl Linux puts them in /usr/include/asm/signal.h. CygWin32 puts them +dnl somewhere else altogether. This hack attempts to parse the output +dnl of saying `#include ' to the preprocessor in order to find +dnl the full path of files named signal.h. If this doesn't +dnl produce any filenames, fall back to the (Unixoid) defaults. + +AC_CACHE_CHECK(for full paths of , rc_cv_full_signal_h, [ + echo '#include ' > temp.c + rc_cv_full_signal_h=`$CPP temp.c |sed -n 's/.*"\(.*signal.h\)".*/\1/p' | +sort -u |tr ' +' ' '` + rm -f temp.c + case "$rc_cv_full_signal_h" in + '') rc_cv_full_signal_h='/usr/include/signal.h /usr/include/sys/signal.h /usr/include/asm/signal.h' ;; + esac +]) + +dnl Phew! We now have a list of s. Examine each one to see +dnl if it contains the signal names we're after. If not, that's a a +dnl configure error: bomb out. AC_CACHE_CHECK(for signal names, rc_cv_signal_h, for i in $rc_cv_full_signal_h; do @@ -41,6 +58,7 @@ case "$rc_cv_signal_h" in esac AC_SUBST(SIGNAL_H) + AC_TYPE_GETGROUPS AC_TYPE_PID_T AC_TYPE_SIZE_T -- cgit v1.2.3