Whamcloud - gitweb
2a423684a6669e8598fbd137bd01b1e74c0f140b
[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                 [char *LINUXRELEASE;
213                  LINUXRELEASE=UTS_RELEASE;],
214                 [$makerule LUSTRE_KERNEL_TEST=conftest.i],
215                 [test -s kernel-tests/conftest.i],
216                 [
217                         # LINUXRELEASE="UTS_RELEASE"
218                         eval $(grep "LINUXRELEASE=" kernel-tests/conftest.i)
219                 ],[
220                         AC_MSG_RESULT([unknown])
221                         AC_MSG_ERROR([Could not preprocess test program.  Consult config.log for details.])
222                 ])
223         rm -f kernel-tests/conftest.i
224         if test x$LINUXRELEASE = x ; then
225                 AC_MSG_RESULT([unknown])
226                 AC_MSG_ERROR([Could not determine Linux release version from linux/version.h.])
227         fi
228         AC_MSG_RESULT([$LINUXRELEASE])
229         AC_SUBST(LINUXRELEASE)
230
231         moduledir='$(libdir)/modules/'$LINUXRELEASE/kernel
232         AC_SUBST(moduledir)
233
234         modulefsdir='$(moduledir)/fs/$(PACKAGE)'
235         AC_SUBST(modulefsdir)
236
237         # ------------ RELEASE --------------------------------
238         AC_MSG_CHECKING([for Lustre release])
239         RELEASE="`echo ${LINUXRELEASE} | tr '-' '_'`_`date +%Y%m%d%H%M`"
240         AC_MSG_RESULT($RELEASE)
241         AC_SUBST(RELEASE)
242 fi
243
244 # ---------- Portals flags --------------------
245
246 #AC_PREFIX_DEFAULT([])
247 #if test "x$prefix" = xNONE || test "x$prefix" = x; then
248 #  usrprefix=/usr
249 #else
250 #  usrprefix='${prefix}'
251 #fi
252 #AC_SUBST(usrprefix)
253
254 AC_MSG_CHECKING([for zero-copy TCP support])
255 AC_ARG_ENABLE([zerocopy],
256         AC_HELP_STRING([--disable-zerocopy],
257                        [disable socknal zerocopy]),
258         [],[enable_zerocopy='yes'])
259 if test x$enable_zerocopy = xno ; then
260         AC_MSG_RESULT([no (by request)])
261 else
262         ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
263         if test "$ZCCD" != 0 ; then
264                 AC_DEFINE(SOCKNAL_ZC, 1, [use zero-copy TCP])
265                 AC_MSG_RESULT(yes)
266         else
267                 AC_MSG_RESULT([no (no kernel support)])
268         fi
269 fi
270
271 AC_MSG_CHECKING([for CPU affinity support])
272 AC_ARG_ENABLE([affinity],
273         AC_HELP_STRING([--disable-affinity],
274                        [disable process/irq affinity]),
275         [],[enable_affinity='yes'])
276 if test x$enable_affinity = xno ; then
277         AC_MSG_RESULT([no (by request)])
278 else
279         SET_CPUS_ALLOW="`grep -c set_cpus_allowed $LINUX/kernel/softirq.c`"
280         if test "$SET_CPUS_ALLOW" != 0 ; then
281                 AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
282                 AC_MSG_RESULT([yes])
283         else
284                 AC_MSG_RESULT([no (no kernel support)])
285         fi
286 fi
287
288
289 #####################################
290
291 AC_MSG_CHECKING([if quadrics kernel headers are present])
292 if test -d $LINUX/drivers/net/qsnet ; then
293         AC_MSG_RESULT([yes])
294         QSWNAL="qswnal"
295         AC_MSG_CHECKING([for multirail EKC])
296         if test -f $LINUX/include/elan/epcomms.h; then
297                 AC_MSG_RESULT([supported])
298                 QSWCPPFLAGS="-DMULTIRAIL_EKC=1"
299         else
300                 AC_MSG_RESULT([not supported])
301                 QSWCPPFLAGS="-I$LINUX/drivers/net/qsnet/include"
302         fi
303 else
304         AC_MSG_RESULT([no])
305         QSWNAL=""
306         QSWCPPFLAGS=""
307 fi
308 AC_SUBST(QSWCPPFLAGS)
309 AC_SUBST(QSWNAL)
310 AM_CONDITIONAL(BUILD_QSWNAL, test x$QSWNAL = "xqswnal")
311
312 AC_MSG_CHECKING([if gm support was requested])
313 AC_ARG_WITH([gm],
314         AC_HELP_STRING([--with-gm=path],
315                        [build gmnal against path]),
316         [
317                 case $with_gm in 
318                         yes)
319                                 AC_MSG_RESULT([yes])
320                                 GMCPPFLAGS="-I/usr/local/gm/include"
321                                 GMNAL="gmnal"
322                                 ;;
323                         no)
324                                 AC_MSG_RESULT([no])
325                                 GMCPPFLAGS=""
326                                 GMNAL=""
327                                 ;;
328                         *)
329                                 AC_MSG_RESULT([yes])
330                                 GMCPPFLAGS="-I$with_gm/include -I$with_gm/drivers -I$with_gm/drivers/linux/gm"
331                                 GMNAL="gmnal"
332                                 ;;
333                 esac
334         ],[
335                 AC_MSG_RESULT([no])
336                 GMCPPFLAGS=""
337                 GMNAL=""
338         ])
339 AC_SUBST(GMCPPFLAGS)
340 AC_SUBST(GMNAL)
341 AM_CONDITIONAL(BUILD_GMNAL, test x$GMNAL = "xgmnal")
342
343 #fixme: where are the default IB includes?
344 default_ib_include_dir=/usr/local/ib/include
345 an_ib_include_file=vapi.h
346
347 AC_MSG_CHECKING([if ib nal support was requested])
348 AC_ARG_WITH([ib],
349         AC_HELP_STRING([--with-ib=yes/no/path],
350                        [Path to IB includes]),
351         [
352                 case $with_ib in
353                         yes)
354                                 AC_MSG_RESULT([yes])
355                                 IBCPPFLAGS="-I/usr/local/ib/include"
356                                 IBNAL="ibnal"
357                                 ;;
358                         no)
359                                 AC_MSG_RESULT([no])
360                                 IBCPPFLAGS=""
361                                 IBNAL=""
362                                 ;;
363                         *)
364                                 AC_MSG_RESULT([yes])
365                                 IBCPPFLAGS="-I$with_ib"
366                                 IBNAL=""
367                                 ;;
368                 esac
369         ],[
370                 AC_MSG_RESULT([no])
371                 IBFLAGS=""
372                 IBNAL=""
373         ])
374 AC_SUBST(IBNAL)
375 AC_SUBST(IBCPPFLAGS)
376 AM_CONDITIONAL(BUILD_IBNAL, test x$IBNAL = "xibnal")
377
378 def_scamac=/opt/scali/include
379 AC_MSG_CHECKING([if ScaMAC support was requested])
380 AC_ARG_WITH([scamac],
381         AC_HELP_STRING([--with-scamac=yes/no/path],
382                        [Path to ScaMAC includes (default=/opt/scali/include)]),
383         [
384                 case $with_scamac in
385                         yes)
386                                 AC_MSG_RESULT([yes])
387                                 SCIMACCPPFLAGS="-I/opt/scali/include"
388                                 SCIMACNAL="scimacnal"
389                                 ;;
390                         no)
391                                 AC_MSG_RESULT([no])
392                                 SCIMACCPPFLAGS=""
393                                 SCIMACNAL=""
394                                 ;;
395                         *)
396                                 AC_MSG_RESULT([yes])
397                                 SCIMACCPPFLAGS="-I$with_scamac -I$with_scamac/icm"
398                                 SCIMACNAL="scimacnal"
399                                 ;;
400                 esac
401         ],[
402                 AC_MSG_RESULT([no])
403                 SCIMACCPPFLAGS=""
404                 SCIMACNAL=""
405         ])
406 AC_SUBST(SCIMACCPPFLAGS)
407 AC_SUBST(SCIMACNAL)
408 AM_CONDITIONAL(BUILD_SCIMACNAL, test x$SCIMACNAL = "xscimacnal")
409 # if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
410
411 AC_SUBST(MOD_LINK)
412 AC_SUBST(LINUX25)
413
414 # ---------- Red Hat 2.4.18 has iobuf->dovary --------------
415 # But other kernels don't
416
417 AC_MSG_CHECKING([if struct kiobuf has a dovary field])
418 LUSTRE_MODULE_TRY_COMPILE(
419         [
420                 #include <linux/iobuf.h>
421         ],[
422                 struct kiobuf iobuf;
423                 iobuf.dovary = 1;
424         ],[
425                 AC_MSG_RESULT([yes])
426                 AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
427         ],[
428                 AC_MSG_RESULT([no])
429         ])
430
431 # ----------- 2.6.4 no longer has page->list ---------------
432 AC_MSG_CHECKING([if struct page has a list field])
433 LUSTRE_MODULE_TRY_COMPILE(
434         [
435                 #include <linux/mm.h>
436         ],[
437                 struct page page;
438                 &page.list;
439         ],[
440                 AC_MSG_RESULT([yes])
441                 AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
442         ],[
443                 AC_MSG_RESULT([no])
444         ])
445
446 # ---------- Red Hat 2.4.20 backports some 2.5 bits --------
447 # This needs to run after we've defined the KCPPFLAGS
448
449 AC_MSG_CHECKING([for kernel version])
450 LUSTRE_MODULE_TRY_COMPILE(
451         [
452                 #include <linux/sched.h>
453         ],[
454                 struct task_struct p;
455                 p.sighand = NULL;
456         ],[
457                 AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
458                 AC_MSG_RESULT([redhat-2.4.20])
459         ],[
460                 AC_MSG_RESULT([$LINUXRELEASE])
461         ])
462
463 # ---------- Red Hat 2.4.21 backports some more 2.5 bits --------
464
465 AC_MSG_CHECKING([if kernel defines PDE])
466 HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
467 if test "$HAVE_PDE" != 0 ; then
468         AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE])
469         AC_MSG_RESULT([yes])
470 else
471         AC_MSG_RESULT([no])
472 fi
473
474 AC_MSG_CHECKING([if kernel passes struct file to direct_IO])
475 HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
476 if test "$HAVE_DIO_FILE" != 0 ; then
477         AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO])
478         AC_MSG_RESULT(yes)
479 else
480         AC_MSG_RESULT(no)
481 fi
482
483 if test x$enable_modules != xno ; then
484         # ---------- modules? ------------------------
485         AC_MSG_CHECKING([for module support])
486         LUSTRE_MODULE_TRY_COMPILE(
487                 [
488                         #include <linux/config.h>
489                 ],[
490                         #ifndef CONFIG_MODULES
491                         #error CONFIG_MODULES not #defined
492                         #endif
493                 ],[
494                         AC_MSG_RESULT([yes])
495                 ],[
496                         AC_MSG_RESULT([no])
497                         AC_MSG_ERROR([module support is required to build Lustre kernel modules.])
498                 ])
499
500         # ---------- modversions? --------------------
501         AC_MSG_CHECKING([for MODVERSIONS])
502         LUSTRE_MODULE_TRY_COMPILE(
503                 [
504                         #include <linux/config.h>
505                 ],[
506                         #ifndef CONFIG_MODVERSIONS
507                         #error CONFIG_MODVERSIONS not #defined
508                         #endif
509                 ],[
510                         AC_MSG_RESULT([yes])
511                 ],[
512                         AC_MSG_RESULT([no])
513                 ])
514
515         # ------------ preempt -----------------------
516         AC_MSG_CHECKING([if preempt is enabled])
517         LUSTRE_MODULE_TRY_COMPILE(
518                 [
519                         #include <linux/config.h>
520                 ],[
521                         #ifndef CONFIG_PREEMPT
522                         #error CONFIG_PREEMPT is not #defined
523                         #endif
524                 ],[
525                         AC_MSG_RESULT([yes])
526                         AC_MSG_ERROR([Lustre does not support kernels with preempt enabled.])
527                 ],[
528                         AC_MSG_RESULT([no])
529                 ])
530
531         if test $BACKINGFS = 'ext3' ; then
532                 # --- Check that ext3 and ext3 xattr are enabled in the kernel
533                 AC_MSG_CHECKING([that ext3 is enabled in the kernel])
534                 LUSTRE_MODULE_TRY_COMPILE(
535                         [
536                                 #include <linux/config.h>
537                         ],[
538                                 #ifndef CONFIG_EXT3_FS
539                                 #ifndef CONFIG_EXT3_FS_MODULE
540                                 #error CONFIG_EXT3_FS not #defined
541                                 #endif
542                                 #endif
543                         ],[
544                                 AC_MSG_RESULT([yes])
545                         ],[
546                                 AC_MSG_RESULT([no])
547                                 AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel (CONFIG_EXT3_FS)])
548                         ])
549
550                 AC_MSG_CHECKING([that extended attributes for ext3 are enabled in the kernel])
551                 LUSTRE_MODULE_TRY_COMPILE(
552                         [
553                                 #include <linux/config.h>
554                         ],[
555                                 #ifndef CONFIG_EXT3_FS_XATTR
556                                 #error CONFIG_EXT3_FS_XATTR not #defined
557                                 #endif
558                         ],[
559                                 AC_MSG_RESULT([yes])
560                         ],[
561                                 AC_MSG_RESULT([no])
562                                 AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel (CONFIG_EXT3_FS_XATTR.)])
563                                 AC_MSG_WARN([This build may fail.])
564                         ])
565         fi # BACKINGFS = ext3
566 fi
567
568 CPPFLAGS="-include \$(top_builddir)/include/config.h $CPPFLAGS"
569 EXTRA_KCFLAGS="-include $PWD/include/config.h $EXTRA_KCFLAGS"
570 AC_SUBST(EXTRA_KCFLAGS)
571
572 #echo "KCPPFLAGS: $KCPPFLAGS"
573 #echo "KCFLAGS: $KCFLAGS"
574 #echo "LLCPPFLAGS: $LLCPPFLAGS"
575 #echo "LLCFLAGS: $LLCFLAGS"
576 #echo "MOD_LINK: $MOD_LINK"
577 #echo "CFLAGS: $CFLAGS"
578 #echo "CPPFLAGS: $CPPFLAGS"