From ec83e6d09ef55c59546cb02faafe0d8fd2e6c248 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 16 Feb 2005 17:52:23 +0000 Subject: 20811. --- configure.ac | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 99d1c49df..96bcd2dad 100644 --- a/configure.ac +++ b/configure.ac @@ -1274,13 +1274,26 @@ dnl Look for the file containing the RLIMIT_* definitions dnl ----------------------------------------------------- dnl CALL FOR MORE (FEWER?) LOCATIONS: I've just copied the signal checking. AC_CACHE_CHECK(where the RLIMIT macros are located,zsh_cv_path_rlimit_h, -[for RESOURCE_H in /usr/include/bsd/sys/resource.h dnl - /usr/include/asm/resource.h dnl - /usr/include/linux/resource.h dnl - /usr/include/sys/resource.h dnl - /usr/include/bits/resource.h dnl - /usr/include/resourcebits.h dnl - /dev/null; +[dnl Look at the output from the preprocessor. +dnl Copied from the search for the signal names above. +echo "#include " >restmp.c +resourcefile_list="`$CPP restmp.c | +sed -n -e 's/^#line[ ].*\"\(.*\)\"/\1/p' \ + -e 's/^#[ ].*\"\(.*\)\"/\1/p' | +sed 's/\\\\\\\\/\//g' | +$AWK '{ if (\$1 ~ \"resource\") files[[\$1]] = \$1 } + END { for (var in files) print var }'`" +rm -f restmp.c +if test -z "$resourcefile_list"; then + dnl No list: look at standard places. + resourcefile_list="/usr/include/bsd/sys/resource.h +/usr/include/asm/resource.h +/usr/include/linux/resource.h +/usr/include/sys/resource.h +/usr/include/bits/resource.h +/usr/include/resourcebits.h" +fi +for RESOURCE_H in $resourcefile_list /dev/null; do test -f $RESOURCE_H && \ grep '#[ ]*define[ ][ ]*RLIMIT_[A-Z]*[ ]*[0-9A-Z][0-9]*' $RESOURCE_H > /dev/null && \ -- cgit 1.4.1