On Friday, June 30, 2006 09:23:50 AM -0400 chas williams - CONTRACTOR
<[EMAIL PROTECTED]> wrote:
In message <[EMAIL PROTECTED]>,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
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel