Whamcloud - gitweb
Land b_smallfix onto HEAD (20040416_1638) (more 2.6 build fixes)
[fs/lustre-release.git] / lustre / portals / archdep.m4
1 # -------- we can't build modules unless srcdir = builddir
2 if test x$enable_modules != xno ; then
3 AC_CHECK_FILE([autoMakefile.am],[],
4         [AC_MSG_ERROR([At this time, Lustre does not support building kernel modules with srcdir != buildir.])])
5 fi
6
7 # -------- in kernel compilation? (2.5 only) -------------
8 AC_MSG_CHECKING([if inkernel build support is requested])
9 AC_ARG_ENABLE([inkernel],
10         AC_HELP_STRING([--enable-inkernel],
11                        [set up 2.5 kernel makefiles]),
12         [],[enable_inkernel=no])
13 AC_MSG_RESULT([$enable_inkernel])
14 AM_CONDITIONAL(INKERNEL, test x$enable_inkernel = xyes)
15
16 # -------- are we building against an external portals? -------
17 AC_MSG_CHECKING([if Cray portals should be used])
18 AC_ARG_WITH([cray-portals],
19         AC_HELP_STRING([--with-cray-portals=path],
20                        [path to cray portals]),
21         [
22                 CRAY_PORTALS_INCLUDE="-I$with_cray_portals"
23                 AC_DEFINE(CRAY_PORTALS, 1, [Building with Cray Portals])
24         ],[with_cray_portals=no])
25 AC_MSG_RESULT([$with_cray_portals])
26 AM_CONDITIONAL(CRAY_PORTALS, test x$with_cray_portals != xno)
27 if test x$enable_tests = xno ; then
28         AC_MSG_NOTICE([disabling tests])
29         enable_tests=no
30 fi
31 if test x$enable_utils = xno ; then
32         AC_MSG_NOTICE([disabling utilities])
33         enable_utils=no
34 fi
35
36 # -------- set linuxdir ------------
37 AC_MSG_CHECKING([for Linux sources])
38 AC_ARG_WITH([linux],
39         AC_HELP_STRING([--with-linux=path],
40                        [set path to Linux source (default=/usr/src/linux)]),
41         [LINUX=$with_linux],
42         [LINUX=/usr/src/linux])
43 AC_MSG_RESULT([$LINUX])
44 AC_SUBST(LINUX)
45 if test x$enable_inkernel = xyes ; then
46         echo ln -s `pwd` $LINUX/fs/lustre
47         rm $LINUX/fs/lustre
48         ln -s `pwd` $LINUX/fs/lustre
49 fi
50
51 # -------- check for .confg --------
52 AC_ARG_WITH([linux-config],
53         [AC_HELP_STRING([--with-linux-config=path],
54                         [set path to Linux .conf (default=\$LINUX/.config)])],
55         [LINUX_CONFIG=$with_linux_config],
56         [LINUX_CONFIG=$LINUX/.config])
57 AC_SUBST(LINUX_CONFIG)
58
59 AC_CHECK_FILE([/boot/kernel.h],
60         [KERNEL_SOURCE_HEADER='/boot/kernel.h'],
61         [AC_CHECK_FILE([/var/adm/running-kernel.h]),
62                 [KERNEL_SOURCE_HEADER='/var/adm/running-kernel.h']])
63
64 AC_ARG_WITH([kernel-source-header],
65         AC_HELP_STRING([--with-kernel-source-header=path],
66                         [Use a different kernel version header.  Consult README.kernel-source for details.]),
67         [KERNEL_SOURCE_HEADER=$with_kernel_source_header])
68
69 #  --------------------
70 ARCH_UM=
71 UML_CFLAGS=
72 if test x$enable_modules != xno ; then
73         AC_MSG_CHECKING([if you are running user mode linux for $host_cpu])
74         if test -e $LINUX/include/asm-um ; then
75                 if test  X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then
76                         ARCH_UM='ARCH=um'
77                         # see notes in Rules.in
78                         UML_CFLAGS='-O0'
79                         AC_MSG_RESULT(yes)
80                 else
81                         AC_MSG_RESULT([no (asm doesn't point at asm-um)])
82                 fi
83         else
84                 AC_MSG_RESULT([no (asm-um missing)])
85         fi
86 fi
87 AC_SUBST(ARCH_UM)
88 AC_SUBST(UML_CFLAGS)
89 # --------- Linux 25 ------------------
90
91 AC_CHECK_FILE([$LINUX/include/linux/namei.h],
92         [
93                 linux25="yes"
94                 KMODEXT=".ko"
95         ],[
96                 KMODEXT=".o"
97                 linux25="no"
98         ])
99 AC_MSG_CHECKING([if you are using Linux 2.6])
100 AC_MSG_RESULT([$linux25])
101 AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
102 AC_SUBST(KMODEXT)
103
104 # -------  Makeflags ------------------
105
106 CPPFLAGS="$CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE -I\$(top_srcdir)/include -I\$(top_srcdir)/portals/include"
107
108 # liblustre are all the same
109 LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
110 AC_SUBST(LLCPPFLAGS)
111
112 LLCFLAGS="-g -Wall -fPIC"
113 AC_SUBST(LLCFLAGS)
114
115 # everyone builds against portals and lustre
116
117 if test x$enable_ldiskfs = xyes ; then
118         AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
119         AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
120         AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls])
121         AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
122 fi
123
124 EXTRA_KCFLAGS="-g $CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE -I$PWD/portals/include -I$PWD/include"
125
126 # these are like AC_TRY_COMPILE, but try to build modules against the
127 # kernel, inside the kernel-tests directory
128
129 AC_DEFUN([LUSTRE_MODULE_CONFTEST],
130 [cat >conftest.c <<_ACEOF
131 $1
132 _ACEOF
133 ])
134
135 AC_DEFUN([LUSTRE_MODULE_COMPILE_IFELSE],
136 [m4_ifvaln([$1], [LUSTRE_MODULE_CONFTEST([$1])])dnl
137 rm -f kernel-tests/conftest.o kernel-tests/conftest.mod.c kernel-tests/conftest.ko
138 AS_IF([AC_TRY_COMMAND(cp conftest.c kernel-tests && make [$2] -f $PWD/kernel-tests/Makefile LUSTRE_LINUX_CONFIG=$LINUX_CONFIG -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX EXTRA_CFLAGS="$EXTRA_KCFLAGS" $ARCH_UM SUBDIRS=$PWD/kernel-tests) >/dev/null && AC_TRY_COMMAND([$3])],
139         [$4],
140         [_AC_MSG_LOG_CONFTEST
141 m4_ifvaln([$5],[$5])dnl])dnl
142 rm -f kernel-tests/conftest.o kernel-tests/conftest.mod.c kernel-tests/conftest.mod.o kernel-tests/conftest.ko m4_ifval([$1], [kernel-tests/conftest.c conftest.c])[]dnl
143 ])
144
145 AC_DEFUN([LUSTRE_MODULE_TRY_COMPILE],
146 [LUSTRE_MODULE_COMPILE_IFELSE(
147         [AC_LANG_PROGRAM([[$1]], [[$2]])],
148         [modules],
149         [test -s kernel-tests/conftest.o],
150         [$3], [$4])])
151
152 AC_DEFUN([LUSTRE_MODULE_TRY_MAKE],
153 [LUSTRE_MODULE_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4], [$5], [$6])])
154
155 # ------------ include paths ------------------
156
157 if test x$enable_modules != xno ; then
158         # ------------ .config exists ----------------
159         AC_CHECK_FILE([$LINUX_CONFIG],[],
160                 [AC_MSG_ERROR([Kernel config could not be found.  If you are building from a kernel-source rpm consult README.kernel-source])])
161
162         # ----------- make dep run? ------------------
163         AC_CHECK_FILES([$LINUX/include/linux/autoconf.h
164                         $LINUX/include/linux/version.h
165                         $LINUX/include/linux/config.h],[],
166                 [AC_MSG_ERROR([Run make config in $LINUX.])])
167
168         # ------------ rhconfig.h includes runtime-generated bits --
169         # red hat kernel-source checks
170
171         # we know this exists after the check above.  if the user
172         # tarred up the tree and ran make dep etc. in it, then
173         # version.h gets overwritten with a standard linux one.
174
175         if grep rhconfig $LINUX/include/linux/version.h >/dev/null ; then
176                 # This is a clean kernel-source tree, we need to
177                 # enable extensive workarounds to get this to build
178                 # modules
179                 AC_CHECK_FILE([$KERNEL_SOURCE_HEADER],
180                         [if test $KERNEL_SOURCE_HEADER = '/boot/kernel.h' ; then
181                                 AC_MSG_WARN([Using /boot/kernel.h from RUNNING kernel.])
182                                 AC_MSG_WARN([If this is not what you want, use --with-kernel-source-header.])
183                                 AC_MSG_WARN([Consult README.kernel-source for details.])
184                         fi],
185                         [AC_MSG_ERROR([$KERNEL_SOURCE_HEADER not found.  Consult README.kernel-source for details.])])
186                 EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS"
187         fi
188
189         # --- check that we can build modules at all
190         AC_MSG_CHECKING([that modules can be built])
191         LUSTRE_MODULE_TRY_COMPILE([],[],
192                 [
193                         AC_MSG_RESULT([yes])
194                 ],[
195                         AC_MSG_RESULT([no])
196                         AC_MSG_WARN([Consult config.log for details.])
197                         AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult README.kernel-source])
198                         AC_MSG_ERROR([Kernel modules could not be built.])
199                 ])
200
201         # ------------ LINUXRELEASE and moduledir ------------------
202         AC_MSG_CHECKING([for Linux release])
203         rm -f kernel-tests/conftest.i
204         LINUXRELEASE=
205         if test $linux25 = 'yes' ; then
206                 makerule="$PWD/kernel-tests"
207         else
208                 makerule="_dir_$PWD/kernel-tests"
209         fi
210         LUSTRE_MODULE_TRY_MAKE(
211                 [#include <linux/version.h>],
212                 [LINUXRELEASE=UTS_RELEASE],
213                 [$makerule LUSTRE_KERNEL_TEST=conftest.i],
214                 [test -s kernel-tests/conftest.i],
215                 [
216                         # LINUXRELEASE="UTS_RELEASE"
217                         eval $(grep LINUXRELEASE kernel-tests/conftest.i)
218                 ],[
219                         AC_MSG_RESULT([unknown])
220                         AC_MSG_ERROR([Could not preprocess test program.  Consult config.log for details.])
221                 ])
222         rm -f kernel-tests/conftest.i
223         if test x$LINUXRELEASE = x ; then
224                 AC_MSG_RESULT([unknown])
225                 AC_MSG_ERROR([Could not determine Linux release version from linux/version.h.])
226         fi
227         AC_MSG_RESULT([$LINUXRELEASE])
228         AC_SUBST(LINUXRELEASE)
229
230         moduledir='$(libdir)/modules/'$LINUXRELEASE/kernel
231         AC_SUBST(moduledir)
232
233         modulefsdir='$(moduledir)/fs/$(PACKAGE)'
234         AC_SUBST(modulefsdir)
235
236         # ------------ RELEASE --------------------------------
237         AC_MSG_CHECKING([for Lustre release])
238         RELEASE="${LINUXRELEASE}_`date +%Y%m%d%H%M`"
239         AC_MSG_RESULT($RELEASE)
240         AC_SUBST(RELEASE)
241 fi
242
243 # ---------- Portals flags --------------------
244
245 #AC_PREFIX_DEFAULT([])
246 #if test "x$prefix" = xNONE || test "x$prefix" = x; then
247 #  usrprefix=/usr
248 #else
249 #  usrprefix='${prefix}'
250 #fi
251 #AC_SUBST(usrprefix)
252
253 AC_MSG_CHECKING([for zero-copy TCP support])
254 AC_ARG_ENABLE([zerocopy],
255         AC_HELP_STRING([--disable-zerocopy],
256                        [disable socknal zerocopy]),
257         [],[enable_zerocopy='yes'])
258 if test x$enable_zerocopy = xno ; then
259         AC_MSG_RESULT([no (by request)])
260 else
261         ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
262         if test "$ZCCD" != 0 ; then
263                 AC_DEFINE(SOCKNAL_ZC, 1, [use zero-copy TCP])
264                 AC_MSG_RESULT(yes)
265         else
266                 AC_MSG_RESULT([no (no kernel support)])
267         fi
268 fi
269
270 AC_MSG_CHECKING([for CPU affinity support])
271 AC_ARG_ENABLE([affinity],
272         AC_HELP_STRING([--disable-affinity],
273                        [disable process/irq affinity]),
274         [],[enable_affinity='yes'])
275 if test x$enable_affinity = xno ; then
276         AC_MSG_RESULT([no (by request)])
277 else
278         SET_CPUS_ALLOW="`grep -c set_cpus_allowed $LINUX/kernel/softirq.c`"
279         if test "$SET_CPUS_ALLOW" != 0 ; then
280                 AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
281                 AC_MSG_RESULT([yes])
282         else
283                 AC_MSG_RESULT([no (no kernel support)])
284         fi
285 fi
286
287
288 #####################################
289
290 AC_MSG_CHECKING([if quadrics kernel headers are present])
291 if test -d $LINUX/drivers/net/qsnet ; then
292         AC_MSG_RESULT([yes])
293         QSWNAL="qswnal"
294         AC_MSG_CHECKING([for multirail EKC])
295         if test -f $LINUX/include/elan/epcomms.h; then
296                 AC_MSG_RESULT([supported])
297                 QSWCPPFLAGS="-DMULTIRAIL_EKC=1"
298         else
299                 AC_MSG_RESULT([not supported])
300                 QSWCPPFLAGS="-I$LINUX/drivers/net/qsnet/include"
301         fi
302 else
303         AC_MSG_RESULT([no])
304         QSWNAL=""
305         QSWCPPFLAGS=""
306 fi
307 AC_SUBST(QSWCPPFLAGS)
308 AC_SUBST(QSWNAL)
309 AM_CONDITIONAL(BUILD_QSWNAL, test x$QSWNAL = "xqswnal")
310
311 AC_MSG_CHECKING([if gm support was requested])
312 AC_ARG_WITH([gm],
313         AC_HELP_STRING([--with-gm=path],
314                        [build gmnal against path]),
315         [
316                 case $with_gm in 
317                         yes)
318                                 AC_MSG_RESULT([yes])
319                                 GMCPPFLAGS="-I/usr/local/gm/include"
320                                 GMNAL="gmnal"
321                                 ;;
322                         no)
323                                 AC_MSG_RESULT([no])
324                                 GMCPPFLAGS=""
325                                 GMNAL=""
326                                 ;;
327                         *)
328                                 AC_MSG_RESULT([yes])
329                                 GMCPPFLAGS="-I$with_gm/include -I$with_gm/drivers -I$with_gm/drivers/linux/gm"
330                                 GMNAL="gmnal"
331                                 ;;
332                 esac
333         ],[
334                 AC_MSG_RESULT([no])
335                 GMCPPFLAGS=""
336                 GMNAL=""
337         ])
338 AC_SUBST(GMCPPFLAGS)
339 AC_SUBST(GMNAL)
340 AM_CONDITIONAL(BUILD_GMNAL, test x$GMNAL = "xgmnal")
341
342 #fixme: where are the default IB includes?
343 default_ib_include_dir=/usr/local/ib/include
344 an_ib_include_file=vapi.h
345
346 AC_MSG_CHECKING([if ib nal support was requested])
347 AC_ARG_WITH([ib],
348         AC_HELP_STRING([--with-ib=yes/no/path],
349                        [Path to IB includes]),
350         [
351                 case $with_ib in
352                         yes)
353                                 AC_MSG_RESULT([yes])
354                                 IBCPPFLAGS="-I/usr/local/ib/include"
355                                 IBNAL="ibnal"
356                                 ;;
357                         no)
358                                 AC_MSG_RESULT([no])
359                                 IBCPPFLAGS=""
360                                 IBNAL=""
361                                 ;;
362                         *)
363                                 AC_MSG_RESULT([yes])
364                                 IBCPPFLAGS="-I$with_ib"
365                                 IBNAL=""
366                                 ;;
367                 esac
368         ],[
369                 AC_MSG_RESULT([no])
370                 IBFLAGS=""
371                 IBNAL=""
372         ])
373 AC_SUBST(IBNAL)
374 AC_SUBST(IBCPPFLAGS)
375 AM_CONDITIONAL(BUILD_IBNAL, test x$IBNAL = "xibnal")
376
377 def_scamac=/opt/scali/include
378 AC_MSG_CHECKING([if ScaMAC support was requested])
379 AC_ARG_WITH([scamac],
380         AC_HELP_STRING([--with-scamac=yes/no/path],
381                        [Path to ScaMAC includes (default=/opt/scali/include)]),
382         [
383                 case $with_scamac in
384                         yes)
385                                 AC_MSG_RESULT([yes])
386                                 SCIMACCPPFLAGS="-I/opt/scali/include"
387                                 SCIMACNAL="scimacnal"
388                                 ;;
389                         no)
390                                 AC_MSG_RESULT([no])
391                                 SCIMACCPPFLAGS=""
392                                 SCIMACNAL=""
393                                 ;;
394                         *)
395                                 AC_MSG_RESULT([yes])
396                                 SCIMACCPPFLAGS="-I$with_scamac -I$with_scamac/icm"
397                                 SCIMACNAL="scimacnal"
398                                 ;;
399                 esac
400         ],[
401                 AC_MSG_RESULT([no])
402                 SCIMACCPPFLAGS=""
403                 SCIMACNAL=""
404         ])
405 AC_SUBST(SCIMACCPPFLAGS)
406 AC_SUBST(SCIMACNAL)
407 AM_CONDITIONAL(BUILD_SCIMACNAL, test x$SCIMACNAL = "xscimacnal")
408 # if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
409
410 AC_SUBST(MOD_LINK)
411 AC_SUBST(LINUX25)
412
413 # ---------- Red Hat 2.4.18 has iobuf->dovary --------------
414 # But other kernels don't
415
416 AC_MSG_CHECKING([if struct kiobuf has a dovary field])
417 LUSTRE_MODULE_TRY_COMPILE(
418         [
419                 #include <linux/iobuf.h>
420         ],[
421                 struct kiobuf iobuf;
422                 iobuf.dovary = 1;
423         ],[
424                 AC_MSG_RESULT([yes])
425                 AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
426         ],[
427                 AC_MSG_RESULT([no])
428         ])
429
430 # ----------- 2.6.4 no longer has page->list ---------------
431 AC_MSG_CHECKING([if struct page has a list field])
432 LUSTRE_MODULE_TRY_COMPILE(
433         [
434                 #include <linux/mm.h>
435         ],[
436                 struct page page;
437                 &page.list;
438         ],[
439                 AC_MSG_RESULT([yes])
440                 AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
441         ],[
442                 AC_MSG_RESULT([no])
443         ])
444
445 # ---------- Red Hat 2.4.20 backports some 2.5 bits --------
446 # This needs to run after we've defined the KCPPFLAGS
447
448 AC_MSG_CHECKING([for kernel version])
449 LUSTRE_MODULE_TRY_COMPILE(
450         [
451                 #include <linux/sched.h>
452         ],[
453                 struct task_struct p;
454                 p.sighand = NULL;
455         ],[
456                 AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
457                 AC_MSG_RESULT([redhat-2.4.20])
458         ],[
459                 AC_MSG_RESULT([$LINUXRELEASE])
460         ])
461
462 # ---------- Red Hat 2.4.21 backports some more 2.5 bits --------
463
464 AC_MSG_CHECKING([if kernel defines PDE])
465 HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
466 if test "$HAVE_PDE" != 0 ; then
467         AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE])
468         AC_MSG_RESULT([yes])
469 else
470         AC_MSG_RESULT([no])
471 fi
472
473 AC_MSG_CHECKING([if kernel passes struct file to direct_IO])
474 HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
475 if test "$HAVE_DIO_FILE" != 0 ; then
476         AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO])
477         AC_MSG_RESULT(yes)
478 else
479         AC_MSG_RESULT(no)
480 fi
481
482 if test x$enable_modules != xno ; then
483         # ---------- modules? ------------------------
484         AC_MSG_CHECKING([for module support])
485         LUSTRE_MODULE_TRY_COMPILE(
486                 [
487                         #include <linux/config.h>
488                 ],[
489                         #ifndef CONFIG_MODULES
490                         #error CONFIG_MODULES not #defined
491                         #endif
492                 ],[
493                         AC_MSG_RESULT([yes])
494                 ],[
495                         AC_MSG_RESULT([no])
496                         AC_MSG_ERROR([module support is required to build Lustre kernel modules.])
497                 ])
498
499         # ---------- modversions? --------------------
500         AC_MSG_CHECKING([for MODVERSIONS])
501         LUSTRE_MODULE_TRY_COMPILE(
502                 [
503                         #include <linux/config.h>
504                 ],[
505                         #ifndef CONFIG_MODVERSIONS
506                         #error CONFIG_MODVERSIONS not #defined
507                         #endif
508                 ],[
509                         AC_MSG_RESULT([yes])
510                 ],[
511                         AC_MSG_RESULT([no])
512                 ])
513
514         # ------------ preempt -----------------------
515         AC_MSG_CHECKING([if preempt is enabled])
516         LUSTRE_MODULE_TRY_COMPILE(
517                 [
518                         #include <linux/config.h>
519                 ],[
520                         #ifndef CONFIG_PREEMPT
521                         #error CONFIG_PREEMPT is not #defined
522                         #endif
523                 ],[
524                         AC_MSG_RESULT([yes])
525                         AC_MSG_ERROR([Lustre does not support kernels with preempt enabled.])
526                 ],[
527                         AC_MSG_RESULT([no])
528                 ])
529
530         if test $BACKINGFS = 'ext3' ; then
531                 # --- Check that ext3 and ext3 xattr are enabled in the kernel
532                 AC_MSG_CHECKING([that ext3 is enabled in the kernel])
533                 LUSTRE_MODULE_TRY_COMPILE(
534                         [
535                                 #include <linux/config.h>
536                         ],[
537                                 #ifndef CONFIG_EXT3_FS
538                                 #ifndef CONFIG_EXT3_FS_MODULE
539                                 #error CONFIG_EXT3_FS not #defined
540                                 #endif
541                                 #endif
542                         ],[
543                                 AC_MSG_RESULT([yes])
544                         ],[
545                                 AC_MSG_RESULT([no])
546                                 AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel (CONFIG_EXT3_FS)])
547                         ])
548
549                 AC_MSG_CHECKING([that extended attributes for ext3 are enabled in the kernel])
550                 LUSTRE_MODULE_TRY_COMPILE(
551                         [
552                                 #include <linux/config.h>
553                         ],[
554                                 #ifndef CONFIG_EXT3_FS_XATTR
555                                 #error CONFIG_EXT3_FS_XATTR not #defined
556                                 #endif
557                         ],[
558                                 AC_MSG_RESULT([yes])
559                         ],[
560                                 AC_MSG_RESULT([no])
561                                 AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel (CONFIG_EXT3_FS_XATTR.)])
562                                 AC_MSG_WARN([This build may fail.])
563                         ])
564         fi # BACKINGFS = ext3
565 fi
566
567 CPPFLAGS="-include \$(top_builddir)/include/config.h $CPPFLAGS"
568 EXTRA_KCFLAGS="-include $PWD/include/config.h $EXTRA_KCFLAGS"
569 AC_SUBST(EXTRA_KCFLAGS)
570
571 #echo "KCPPFLAGS: $KCPPFLAGS"
572 #echo "KCFLAGS: $KCFLAGS"
573 #echo "LLCPPFLAGS: $LLCPPFLAGS"
574 #echo "LLCFLAGS: $LLCFLAGS"
575 #echo "MOD_LINK: $MOD_LINK"
576 #echo "CFLAGS: $CFLAGS"
577 #echo "CPPFLAGS: $CPPFLAGS"