xfs/linux/Makefile.in

Dave Morrison dave at bnl.gov
Sun Dec 5 07:06:08 CET 1999


On 5 Dec 1999, Assar Westerlund wrote:

> With the appended patch these two commands should work:
> 
> configure --with-sys=/usr/src/linux/include

I found that I had to tweak the flags in one of the autoconf macros to
help it track down types defined in the kernel sources.  With your patch
plus the one I've included here, xfs compiles just fine after using the
configure statement you give above.  Without your patch alone, I get
things like this:

../../../arla-0.29pre1/xfs/linux/xfs/xfs_locl.h:108: redefinition
of `int8_t'
/usr/src/linux/include/linux/types.h:76: `int8_t' previously
declared here

Perhaps the include statement in the macro should be done in term of
KERNEL_CFLAGS instead of SYS, but if so, that's an easy change to make.
Or, maybe it should be handled in some other way altogether. Thanks!

Cheers,
Dave

--- cf/have-linux-kernel-type.m4.orig	Sun Dec  5 00:42:12 1999
+++ cf/have-linux-kernel-type.m4	Sun Dec  5 00:37:39 1999
@@ -7,6 +7,10 @@
 dnl AC_HAVE_LINUX_KERNEL_TYPE(type)
 AC_DEFUN(AC_HAVE_LINUX_KERNEL_TYPE, [
 cv=`echo "$1" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+save_CFLAGS=$CFLAGS
+if test -n "$SYS"; then
+CFLAGS="-I${SYS} ${CFLAGS}"
+fi
 AC_MSG_CHECKING(for $i in the linux kernel)
 AC_CACHE_VAL(ac_cv_linux_kernel_type_$cv,
 AC_TRY_COMPILE([
@@ -18,6 +22,7 @@
 eval "ac_cv_linux_kernel_type_$cv=yes",
 eval "ac_cv_linux_kernel_type_$cv=no"))dnl
 AC_MSG_RESULT(`eval echo \\$ac_cv_linux_kernel_type_$cv`)
+CFLAGS="$save_CFLAGS"
 if test `eval echo \\$ac_cv_linux_kernel_type_$cv` = yes; then
   ac_tr_hdr=HAVE_LINUX_KERNEL_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
   AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)

David Morrison  Brookhaven National Laboratory  phone: 631-344-5840
                Physics Department, Bldg 510 C    fax: 631-344-3253
		          Upton, NY 11973-5000  email: dave at bnl.gov






More information about the Arla-drinkers mailing list