rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit f08474ea0c5d4ad9266081d5f3dd0017448d2498
parent 13d5710c5af78365a5dd2699e8bad15b93aee773
Author: tgoodwin <tgoodwin>
Date:   Thu, 19 Feb 1998 12:39:21 +0000

do preprocessor trick: it works now

Diffstat:
Mconfigure.ac | 28+++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)

diff --git 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 <signal.h>' 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 <signal.h>' 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 <signal.h>, rc_cv_full_signal_h, [ + echo '#include <signal.h>' > 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 <signal.h>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