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