[OpenAFS-devel] not sure what to do about rlim --- also on other 64 bit machines?

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 30 Jun 2006 13:01:37 -0400


On Friday, June 30, 2006 09:23:50 AM -0400 chas williams - CONTRACTOR 
<chas@cmf.nrl.navy.mil> wrote:

> In message <99CF0450362A26FDB2823951@sirius.fac.cs.cmu.edu>,Jeffrey
> Hutzelman w rites:
>> Basically, we need AC_TRY_KBUILD or some such thing.  It's a little
>> messy,  but doable.
>
> is this round enough?  see bug #34561 for the complete rewrite.
>
># AC_TRY_KBUILD26([INCLUDES], [FUNCTION-BODY],
>#                 [ACTION-IF-SUCCESS], [ACTION-IF-FAILURE])
>#
> AC_DEFUN([AC_TRY_KBUILD26], [
>   rm -fr conftest.dir
>   if mkdir conftest.dir; then
>   cd conftest.dir
>     cat >Makefile <<_ACEOF
> CFLAGS += $CPPFLAGS
> _ACEOF
>     cat >conftest.c <<\_ACEOF
> $1
>
> void conftest(void)
> {
> $2
> }
> _ACEOF
>     cd ..
>   fi
>   AS_IF(AC_RUN_LOG([make -C $LINUX_KERNEL_PATH M=`pwd`/conftest.dir
> conftest.o > /dev/null]),       [$3], [$4])
>   rm -fr conftest.dir])


That's pretty much the direction I had in mind.  I had intended to actually 
build a complete module, but what you've done is a closer equivalent to 
AC_TRY_COMPILE, which was sort of the point.  Note that the Makefile should 
be setting EXTRA_CFLAGS, not CFLAGS.

Assuming this appears to work, we should put this in a release, but with a 
configure switch that allows falling back to the old method.

-- Jeff