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.])])
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)
16 # -------- are we building against an external portals? -------
17 AC_MSG_CHECKING([for Cray portals])
18 AC_ARG_WITH([cray-portals],
19 AC_HELP_STRING([--with-cray-portals=path],
20 [path to cray portals]),
22 if test "$with_cray_portals" != no; then
23 CRAY_PORTALS_PATH=$with_cray_portals
24 CRAY_PORTALS_INCLUDES="$with_cray_portals/include"
25 CRAY_PORTALS_LIBS="$with_cray_portals"
27 ],[with_cray_portals=no])
28 AC_SUBST(CRAY_PORTALS_PATH)
29 AC_MSG_RESULT([$CRAY_PORTALS_PATH])
31 AC_MSG_CHECKING([for Cray portals includes])
32 AC_ARG_WITH([cray-portals-includes],
33 AC_HELP_STRING([--with-cray-portals-includes=path],
34 [path to cray portals includes]),
36 if test "$with_cray_portals_includes" != no; then
37 CRAY_PORTALS_INCLUDES="$with_cray_portals_includes"
40 AC_SUBST(CRAY_PORTALS_INCLUDES)
41 AC_MSG_RESULT([$CRAY_PORTALS_INCLUDES])
43 AC_MSG_CHECKING([for Cray portals libs])
44 AC_ARG_WITH([cray-portals-libs],
45 AC_HELP_STRING([--with-cray-portals-libs=path],
46 [path to cray portals libs]),
48 if test "$with_cray_portals_libs" != no; then
49 CRAY_PORTALS_LIBS="$with_cray_portals_libs"
52 AC_SUBST(CRAY_PORTALS_LIBS)
53 AC_MSG_RESULT([$CRAY_PORTALS_LIBS])
55 if test x$CRAY_PORTALS_INCLUDES != x ; then
56 if test ! -r $CRAY_PORTALS_INCLUDES/portals/api.h ; then
57 AC_MSG_ERROR([Cray portals headers were not found in $CRAY_PORTALS_INCLUDES. Please check the paths passed to --with-cray-portals or --with-cray-portals-includes.])
60 if test x$CRAY_PORTALS_LIBS != x ; then
61 if test ! -r $CRAY_PORTALS_LIBS/libportals.a ; then
62 AC_MSG_ERROR([Cray portals libraries were not found in $CRAY_PORTALS_LIBS. Please check the paths passed to --with-cray-portals or --with-cray-portals-libs.])
66 AC_MSG_CHECKING([whether to use Cray portals])
67 if test x$CRAY_PORTALS_INCLUDES != x -a x$CRAY_PORTALS_LIBS != x ; then
69 AC_DEFINE(CRAY_PORTALS, 1, [Building with Cray Portals])
70 CRAY_PORTALS_INCLUDES="-I$CRAY_PORTALS_INCLUDES"
74 AC_MSG_RESULT([$with_cray_portals])
75 AM_CONDITIONAL(CRAY_PORTALS, test x$with_cray_portals != xno)
77 # ----------------------------------------
78 # some tests for catamount-like systems
79 # ----------------------------------------
80 AC_ARG_ENABLE([sysio_init],
81 AC_HELP_STRING([--disable-sysio-init],
82 [call sysio init functions when initializing liblustre]),
83 [],[enable_sysio_init=yes])
84 AC_MSG_CHECKING([whether to initialize libsysio])
85 AC_MSG_RESULT([$enable_sysio_init])
86 if test x$enable_sysio_init != xno ; then
87 AC_DEFINE([INIT_SYSIO], 1, [call sysio init functions])
90 AC_ARG_ENABLE([urandom],
91 AC_HELP_STRING([--disable-urandom],
92 [disable use of /dev/urandom for liblustre]),
93 [],[enable_urandom=yes])
94 AC_MSG_CHECKING([whether to use /dev/urandom for liblustre])
95 AC_MSG_RESULT([$enable_urandom])
96 if test x$enable_urandom != xno ; then
97 AC_DEFINE([LIBLUSTRE_USE_URANDOM], 1, [use /dev/urandom for random data])
100 # -------- check for -lcap and -lpthread ----
101 if test x$enable_liblustre = xyes ; then
102 AC_CHECK_LIB([cap], [cap_get_proc],
105 AC_DEFINE([HAVE_LIBCAP], 1, [use libcap])
109 AC_CHECK_LIB([pthread], [pthread_create],
111 PTHREAD_LIBS="-lpthread"
112 AC_DEFINE([HAVE_LIBPTHREAD], 1, [use libpthread])
115 AC_SUBST(PTHREAD_LIBS)
118 # -------- enable tests and utils? -------
119 if test x$enable_tests = xno ; then
120 AC_MSG_NOTICE([disabling tests])
123 if test x$enable_utils = xno ; then
124 AC_MSG_NOTICE([disabling utilities])
128 if test x$enable_modules != xno ; then
129 # -------- set linuxdir ------------
130 AC_MSG_CHECKING([for Linux sources])
132 AC_HELP_STRING([--with-linux=path],
133 [set path to Linux source (default=/usr/src/linux)]),
135 [LINUX=/usr/src/linux])
136 AC_MSG_RESULT([$LINUX])
138 if test x$enable_inkernel = xyes ; then
139 echo ln -s `pwd` $LINUX/fs/lustre
141 ln -s `pwd` $LINUX/fs/lustre
144 # -------- check for .confg --------
145 AC_ARG_WITH([linux-config],
146 [AC_HELP_STRING([--with-linux-config=path],
147 [set path to Linux .conf (default=\$LINUX/.config)])],
148 [LINUX_CONFIG=$with_linux_config],
149 [LINUX_CONFIG=$LINUX/.config])
150 AC_SUBST(LINUX_CONFIG)
152 AC_CHECK_FILE([/boot/kernel.h],
153 [KERNEL_SOURCE_HEADER='/boot/kernel.h'],
154 [AC_CHECK_FILE([/var/adm/running-kernel.h]),
155 [KERNEL_SOURCE_HEADER='/var/adm/running-kernel.h']])
157 AC_ARG_WITH([kernel-source-header],
158 AC_HELP_STRING([--with-kernel-source-header=path],
159 [Use a different kernel version header. Consult README.kernel-source for details.]),
160 [KERNEL_SOURCE_HEADER=$with_kernel_source_header])
162 # --------------------
166 AC_MSG_CHECKING([if you are running user mode linux for $host_cpu])
167 if test -e $LINUX/include/asm-um ; then
168 if test X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then
170 # see notes in Rules.in
174 AC_MSG_RESULT([no (asm doesn't point at asm-um)])
177 AC_MSG_RESULT([no (asm-um missing)])
183 # --------- Linux 25 ------------------
184 AC_CHECK_FILE([$LINUX/include/linux/namei.h],
194 AC_MSG_CHECKING([if you are using Linux 2.6])
195 AC_MSG_RESULT([$linux25])
200 AC_PATH_PROG(PATCH, patch, [no])
201 AC_PATH_PROG(QUILT, quilt, [no])
203 if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
204 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module (for Linux 2.6)])
207 AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
208 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
210 # ------- Makeflags ------------------
212 CPPFLAGS="$CPPFLAGS $CRAY_PORTALS_INCLUDES -I\$(top_srcdir)/include -I\$(top_srcdir)/portals/include"
214 # liblustre are all the same
215 LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
218 LLCFLAGS="-g -Wall -fPIC"
221 # everyone builds against portals and lustre
223 if test x$enable_ldiskfs = xyes ; then
224 AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
225 AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
226 AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls])
227 AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
230 EXTRA_KCFLAGS="-g $CRAY_PORTALS_INCLUDES -I$PWD/portals/include -I$PWD/include"
232 # these are like AC_TRY_COMPILE, but try to build modules against the
233 # kernel, inside the kernel-tests directory
235 AC_DEFUN([LUSTRE_MODULE_CONFTEST],
236 [cat >conftest.c <<_ACEOF
241 AC_DEFUN([LUSTRE_MODULE_COMPILE_IFELSE],
242 [m4_ifvaln([$1], [LUSTRE_MODULE_CONFTEST([$1])])dnl
243 rm -f kernel-tests/conftest.o kernel-tests/conftest.mod.c kernel-tests/conftest.ko
244 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])],
246 [_AC_MSG_LOG_CONFTEST
247 m4_ifvaln([$5],[$5])dnl])dnl
248 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
251 AC_DEFUN([LUSTRE_MODULE_TRY_COMPILE],
252 [LUSTRE_MODULE_COMPILE_IFELSE(
253 [AC_LANG_PROGRAM([[$1]], [[$2]])],
255 [test -s kernel-tests/conftest.o],
258 AC_DEFUN([LUSTRE_MODULE_TRY_MAKE],
259 [LUSTRE_MODULE_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4], [$5], [$6])])
261 # ------------ include paths ------------------
263 if test x$enable_modules != xno ; then
264 # ------------ .config exists ----------------
265 AC_CHECK_FILE([$LINUX_CONFIG],[],
266 [AC_MSG_ERROR([Kernel config could not be found. If you are building from a kernel-source rpm consult README.kernel-source])])
268 # ----------- make dep run? ------------------
269 AC_CHECK_FILES([$LINUX/include/linux/autoconf.h
270 $LINUX/include/linux/version.h
271 $LINUX/include/linux/config.h],[],
272 [AC_MSG_ERROR([Run make config in $LINUX.])])
274 # ------------ rhconfig.h includes runtime-generated bits --
275 # red hat kernel-source checks
277 # we know this exists after the check above. if the user
278 # tarred up the tree and ran make dep etc. in it, then
279 # version.h gets overwritten with a standard linux one.
281 if grep rhconfig $LINUX/include/linux/version.h >/dev/null ; then
282 # This is a clean kernel-source tree, we need to
283 # enable extensive workarounds to get this to build
285 AC_CHECK_FILE([$KERNEL_SOURCE_HEADER],
286 [if test $KERNEL_SOURCE_HEADER = '/boot/kernel.h' ; then
287 AC_MSG_WARN([Using /boot/kernel.h from RUNNING kernel.])
288 AC_MSG_WARN([If this is not what you want, use --with-kernel-source-header.])
289 AC_MSG_WARN([Consult README.kernel-source for details.])
291 [AC_MSG_ERROR([$KERNEL_SOURCE_HEADER not found. Consult README.kernel-source for details.])])
292 EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS"
295 # --- check that we can build modules at all
296 AC_MSG_CHECKING([that modules can be built])
297 LUSTRE_MODULE_TRY_COMPILE([],[],
302 AC_MSG_WARN([Consult config.log for details.])
303 AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult README.kernel-source])
304 AC_MSG_ERROR([Kernel modules could not be built.])
307 # ------------ LINUXRELEASE and moduledir ------------------
308 MODULE_TARGET="SUBDIRS"
309 if test $linux25 = 'yes' ; then
310 # ------------ external module support ---------------------
311 makerule="$PWD/kernel-tests"
312 AC_MSG_CHECKING([for external module build support])
313 rm -f kernel-tests/conftest.i
314 LUSTRE_MODULE_TRY_MAKE([],[],
315 [$makerule LUSTRE_KERNEL_TEST=conftest.i],
316 [test -s kernel-tests/conftest.i],
321 makerule="_module_$makerule"
325 makerule="_dir_$PWD/kernel-tests"
327 AC_SUBST(MODULE_TARGET)
329 rm -f kernel-tests/conftest.i
330 AC_MSG_CHECKING([for Linux release])
331 LUSTRE_MODULE_TRY_MAKE(
332 [#include <linux/version.h>],
334 LINUXRELEASE=UTS_RELEASE;],
335 [$makerule LUSTRE_KERNEL_TEST=conftest.i],
336 [test -s kernel-tests/conftest.i],
338 # LINUXRELEASE="UTS_RELEASE"
339 eval $(grep "LINUXRELEASE=" kernel-tests/conftest.i)
341 AC_MSG_RESULT([unknown])
342 AC_MSG_ERROR([Could not preprocess test program. Consult config.log for details.])
344 rm -f kernel-tests/conftest.i
345 if test x$LINUXRELEASE = x ; then
346 AC_MSG_RESULT([unknown])
347 AC_MSG_ERROR([Could not determine Linux release version from linux/version.h.])
349 AC_MSG_RESULT([$LINUXRELEASE])
350 AC_SUBST(LINUXRELEASE)
352 moduledir='/lib/modules/'$LINUXRELEASE/kernel
353 modulefsdir='$(moduledir)/fs/$(PACKAGE)'
354 modulenetdir='$(moduledir)/net/$(PACKAGE)'
357 AC_SUBST(modulefsdir)
358 AC_SUBST(modulenetdir)
360 # ------------ RELEASE --------------------------------
361 AC_MSG_CHECKING([for Lustre release])
362 RELEASE="`echo ${LINUXRELEASE} | tr '-' '_'`_`date +%Y%m%d%H%M`"
363 AC_MSG_RESULT($RELEASE)
366 # ---------- Portals flags --------------------
368 AC_MSG_CHECKING([for zero-copy TCP support])
369 AC_ARG_ENABLE([zerocopy],
370 AC_HELP_STRING([--disable-zerocopy],
371 [disable socknal zerocopy]),
372 [],[enable_zerocopy='yes'])
373 if test x$enable_zerocopy = xno ; then
374 AC_MSG_RESULT([no (by request)])
376 ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
377 if test "$ZCCD" != 0 ; then
378 AC_DEFINE(SOCKNAL_ZC, 1, [use zero-copy TCP])
381 AC_MSG_RESULT([no (no kernel support)])
385 AC_ARG_ENABLE([affinity],
386 AC_HELP_STRING([--disable-affinity],
387 [disable process/irq affinity]),
388 [],[enable_affinity='yes'])
390 AC_MSG_CHECKING([for CPU affinity support])
391 if test x$enable_affinity = xno ; then
392 AC_MSG_RESULT([no (by request)])
394 LUSTRE_MODULE_TRY_COMPILE(
396 #include <linux/sched.h>
398 struct task_struct t;
399 #ifdef CPU_ARRAY_SIZE
404 set_cpus_allowed(&t, m);
406 AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
409 AC_MSG_RESULT([no (no kernel support)])
413 #####################################
415 AC_MSG_CHECKING([if quadrics kernel headers are present])
416 if test -d $LINUX/drivers/net/qsnet ; then
419 AC_MSG_CHECKING([for multirail EKC])
420 if test -f $LINUX/include/elan/epcomms.h; then
421 AC_MSG_RESULT([supported])
422 QSWCPPFLAGS="-DMULTIRAIL_EKC=1"
424 AC_MSG_RESULT([not supported])
425 if test -d $LINUX/drivers/net/qsnet/include; then
426 QSWCPPFLAGS="-I$LINUX/drivers/net/qsnet/include"
428 QSWCPPFLAGS="-I$LINUX/include/linux"
436 AC_SUBST(QSWCPPFLAGS)
439 AC_MSG_CHECKING([if gm support was requested])
441 AC_HELP_STRING([--with-gm=path],
442 [build gmnal against path]),
447 GMCPPFLAGS="-I/usr/local/gm/include"
457 GMCPPFLAGS="-I$with_gm/include -I$with_gm/drivers -I$with_gm/drivers/linux/gm"
470 AC_MSG_CHECKING([if OpenIB kernel headers are present])
471 OPENIBCPPFLAGS="-I$LINUX/drivers/infiniband/include -DIN_TREE_BUILD"
472 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
473 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $OPENIBCPPFLAGS"
474 LUSTRE_MODULE_TRY_COMPILE(
476 #include <ts_ib_core.h>
478 struct ib_device_properties props;
482 OPENIBNAL="openibnal"
488 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
489 AC_SUBST(OPENIBCPPFLAGS)
493 AC_MSG_CHECKING([if Infinicon IB kernel headers are present])
494 # for how the only infinicon ib build has headers in /usr/include/iba
495 IIBCPPFLAGS="-I/usr/include -DIN_TREE_BUILD"
496 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
497 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $IIBCPPFLAGS"
498 LUSTRE_MODULE_TRY_COMPILE(
500 #include <linux/iba/ibt.h>
502 IBT_INTERFACE_UNION interfaces;
505 rc = IbtGetInterfaceByVersion(IBT_INTERFACE_VERSION_2,
508 return rc == FSUCCESS ? 0 : 1;
517 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
518 AC_SUBST(IIBCPPFLAGS)
521 # ---------- Red Hat 2.4.18 has iobuf->dovary --------------
522 # But other kernels don't
524 AC_MSG_CHECKING([if struct kiobuf has a dovary field])
525 LUSTRE_MODULE_TRY_COMPILE(
527 #include <linux/iobuf.h>
533 AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
538 # ----------- 2.6.4 no longer has page->list ---------------
539 AC_MSG_CHECKING([if struct page has a list field])
540 LUSTRE_MODULE_TRY_COMPILE(
542 #include <linux/mm.h>
548 AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
553 # ---------- Red Hat 2.4.20 backports some 2.5 bits --------
554 # This needs to run after we've defined the KCPPFLAGS
556 AC_MSG_CHECKING([if task_struct has a sighand field])
557 LUSTRE_MODULE_TRY_COMPILE(
559 #include <linux/sched.h>
561 struct task_struct p;
564 AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
570 # ---------- 2.4.20 introduced cond_resched --------------
572 AC_MSG_CHECKING([if kernel offers cond_resched])
573 LUSTRE_MODULE_TRY_COMPILE(
575 #include <linux/sched.h>
580 AC_DEFINE(HAVE_COND_RESCHED, 1, [cond_resched found])
585 # --------- zap_page_range(vma) --------------------------------
586 AC_MSG_CHECKING([if zap_pag_range with vma parameter])
587 ZAP_PAGE_RANGE_VMA="`grep -c 'zap_page_range.*struct vm_area_struct' $LINUX/include/linux/mm.h`"
588 if test "$ZAP_PAGE_RANGE_VMA" != 0 ; then
589 AC_DEFINE(ZAP_PAGE_RANGE_VMA, 1, [zap_page_range with vma parameter])
595 # ---------- Red Hat 2.4.21 backports some more 2.5 bits --------
597 AC_MSG_CHECKING([if kernel defines PDE])
598 HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
599 if test "$HAVE_PDE" != 0 ; then
600 AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE])
606 AC_MSG_CHECKING([if kernel passes struct file to direct_IO])
607 HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
608 if test "$HAVE_DIO_FILE" != 0 ; then
609 AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO])
615 AC_MSG_CHECKING([if kernel defines cpu_online()])
616 LUSTRE_MODULE_TRY_COMPILE(
618 #include <linux/sched.h>
623 AC_DEFINE(HAVE_CPU_ONLINE, 1, [cpu_online found])
627 AC_MSG_CHECKING([if kernel defines cpumask_t])
628 LUSTRE_MODULE_TRY_COMPILE(
630 #include <linux/sched.h>
632 return sizeof (cpumask_t);
635 AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
640 # ---------- RHEL kernels define page_count in mm_inline.h
641 AC_MSG_CHECKING([if kernel has mm_inline.h header])
642 LUSTRE_MODULE_TRY_COMPILE(
644 #include <linux/mm_inline.h>
647 #error mm_inline.h does not define page_count
651 AC_DEFINE(HAVE_MM_INLINE, 1, [mm_inline found])
656 # ---------- inode->i_alloc_sem --------------
657 AC_MSG_CHECKING([if struct inode has i_alloc_sem])
658 LUSTRE_MODULE_TRY_COMPILE(
660 #include <linux/fs.h>
661 #include <linux/version.h>
663 #if defined(CONFIG_X86_64) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,24))
664 #error "x86_64 down_read_trylock broken before 2.4.24"
667 return (char *)&i.i_alloc_sem - (char *)&i;
670 AC_DEFINE(HAVE_I_ALLOC_SEM, 1, [struct inode has i_alloc_sem])
676 # ---------- modules? ------------------------
677 AC_MSG_CHECKING([for module support])
678 LUSTRE_MODULE_TRY_COMPILE(
680 #include <linux/config.h>
682 #ifndef CONFIG_MODULES
683 #error CONFIG_MODULES not #defined
689 AC_MSG_ERROR([module support is required to build Lustre kernel modules.])
692 # ---------- modversions? --------------------
693 AC_MSG_CHECKING([for MODVERSIONS])
694 LUSTRE_MODULE_TRY_COMPILE(
696 #include <linux/config.h>
698 #ifndef CONFIG_MODVERSIONS
699 #error CONFIG_MODVERSIONS not #defined
707 # ------------ preempt -----------------------
708 AC_MSG_CHECKING([if preempt is enabled])
709 LUSTRE_MODULE_TRY_COMPILE(
711 #include <linux/config.h>
713 #ifndef CONFIG_PREEMPT
714 #error CONFIG_PREEMPT is not #defined
718 AC_MSG_ERROR([Lustre does not support kernels with preempt enabled.])
725 # --- Check that ext3 and ext3 xattr are enabled in the kernel
726 AC_MSG_CHECKING([that ext3 is enabled in the kernel])
727 LUSTRE_MODULE_TRY_COMPILE(
729 #include <linux/config.h>
731 #ifndef CONFIG_EXT3_FS
732 #ifndef CONFIG_EXT3_FS_MODULE
733 #error CONFIG_EXT3_FS not #defined
740 AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel (CONFIG_EXT3_FS)])
743 AC_MSG_CHECKING([that extended attributes for ext3 are enabled in the kernel])
744 LUSTRE_MODULE_TRY_COMPILE(
746 #include <linux/config.h>
748 #ifndef CONFIG_EXT3_FS_XATTR
749 #error CONFIG_EXT3_FS_XATTR not #defined
755 AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel (CONFIG_EXT3_FS_XATTR.)])
756 AC_MSG_WARN([This build may fail.])
760 AC_MSG_CHECKING([if fshooks are present])
761 LUSTRE_MODULE_TRY_COMPILE(
763 #include <linux/fshooks.h>
766 LDISKFS_SERIES="2.6-suse.series"
769 LDISKFS_SERIES="2.6-vanilla.series"
771 AC_SUBST(LDISKFS_SERIES)
772 # --- check which ldiskfs series we should use
777 AM_CONDITIONAL(BUILD_QSWNAL, test x$QSWNAL = "xqswnal")
778 AM_CONDITIONAL(BUILD_GMNAL, test x$GMNAL = "xgmnal")
779 AM_CONDITIONAL(BUILD_OPENIBNAL, test x$OPENIBNAL = "xopenibnal")
780 AM_CONDITIONAL(BUILD_IIBNAL, test x$IIBNAL = "xiibnal")
782 # portals/utils/portals.c
783 AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h])
784 AC_CHECK_FUNCS([gethostbyname socket connect])
786 # portals/utils/debug.c
787 AC_CHECK_HEADERS([linux/version.h])
789 # include/liblustre.h
790 AC_CHECK_HEADERS([asm/page.h sys/user.h stdint.h])
792 # liblustre/llite_lib.h
793 AC_CHECK_HEADERS([xtio.h file.h])
796 AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
799 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
800 AC_CHECK_FUNCS([inet_ntoa])
802 CPPFLAGS="-include \$(top_builddir)/include/config.h $CPPFLAGS"
803 EXTRA_KCFLAGS="-include $PWD/include/config.h $EXTRA_KCFLAGS"
804 AC_SUBST(EXTRA_KCFLAGS)
806 echo "CPPFLAGS: $CPPFLAGS"
807 echo "LLCPPFLAGS: $LLCPPFLAGS"
808 echo "CFLAGS: $CFLAGS"
809 echo "EXTRA_KCFLAGS: $EXTRA_KCFLAGS"
810 echo "LLCFLAGS: $LLCFLAGS"