1 # Process this file with autoconf to produce a configure script.
3 AC_INIT([Lustre ldiskfs], 3.0.4, [https://bugzilla.lustre.org/])
4 AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
6 # Don't look for install-sh, etc. in ..
23 # is the target os supported?
25 AC_DEFUN([LC_TARGET_SUPPORTED],
37 AC_MSG_CHECKING([whether to build kernel modules])
38 AC_ARG_ENABLE([modules],
39 AC_HELP_STRING([--disable-modules],
40 [disable building of Lustre kernel modules]),
48 AC_MSG_RESULT([$enable_modules])
50 if test x$enable_modules = xyes ; then
57 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
58 AM_CONDITIONAL(MODULES, true)
59 AM_CONDITIONAL(LINUX, true)
60 AM_CONDITIONAL(DARWIN, true)
61 AM_CONDITIONAL(LINUX25, true)
63 LDISKFSDIR="$PWD/ldiskfs"
66 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
67 AC_ARG_ENABLE([quilt],
68 AC_HELP_STRING([--disable-quilt],[disable use of quilt for ldiskfs]),
69 [],[enable_quilt='yes'])
70 AC_MSG_RESULT([$enable_quilt])
72 AC_PATH_PROG(PATCH, patch, [no])
74 if test x$enable_quilt = xno ; then
77 AC_PATH_PROG(QUILT, quilt, [no])
80 if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
81 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
84 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
86 LB_DEFINE_LDISKFS_OPTIONS
88 AC_MSG_CHECKING([which ldiskfs series to use])
90 2.6.5*) LDISKFS_SERIES="2.6-suse.series" ;;
91 2.6.9*) LDISKFS_SERIES="2.6-rhel4.series" ;;
92 2.6.10-ac*) LDISKFS_SERIES="2.6-fc3.series" ;;
93 2.6.10*) LDISKFS_SERIES="2.6-rhel4.series" ;;
94 2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;;
95 2.6.15*) LDISKFS_SERIES="2.6-fc5.series";;
96 2.6.16*) LDISKFS_SERIES="2.6-sles10.series";;
97 2.6.18-*el5*) LDISKFS_SERIES="2.6-rhel5.series";;
98 2.6.18-*prep*) LDISKFS_SERIES="2.6-rhel5.series";;
99 2.6.18*) LDISKFS_SERIES="2.6.18-vanilla.series";;
100 *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix ldiskfs/configure.ac])
102 AC_MSG_RESULT([$LDISKFS_SERIES])
103 AC_SUBST(LDISKFS_SERIES)
105 AC_SUBST(ac_configure_args)
108 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
110 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.*'
111 AC_SUBST(MOSTLYCLEANFILES)