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
52 if test x$linux25 = xyes ; then
59 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
60 AM_CONDITIONAL(MODULES, true)
61 AM_CONDITIONAL(LINUX, true)
62 AM_CONDITIONAL(DARWIN, true)
63 AM_CONDITIONAL(LINUX25, true)
65 LDISKFSDIR="$PWD/ldiskfs"
68 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
69 AC_ARG_ENABLE([quilt],
70 AC_HELP_STRING([--disable-quilt],[disable use of quilt for ldiskfs]),
71 [],[enable_quilt='yes'])
72 AC_MSG_RESULT([$enable_quilt])
74 AC_PATH_PROG(PATCH, patch, [no])
76 if test x$enable_quilt = xno ; then
79 AC_PATH_PROG(QUILT, quilt, [no])
82 if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
83 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
86 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
88 LB_DEFINE_LDISKFS_OPTIONS
90 AC_MSG_CHECKING([which ldiskfs series to use])
92 2.6.5*) LDISKFS_SERIES="2.6-suse.series" ;;
93 2.6.9*) LDISKFS_SERIES="2.6-rhel4.series" ;;
94 2.6.10-ac*) LDISKFS_SERIES="2.6-fc3.series" ;;
95 2.6.10*) LDISKFS_SERIES="2.6-rhel4.series" ;;
96 2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;;
97 2.6.15*) LDISKFS_SERIES="2.6-fc5.series";;
98 2.6.16*) LDISKFS_SERIES="2.6-sles10.series";;
99 2.6.18-*el5*) LDISKFS_SERIES="2.6-rhel5.series";;
100 2.6.18-*prep*) LDISKFS_SERIES="2.6-rhel5.series";;
101 2.6.18*) LDISKFS_SERIES="2.6.18-vanilla.series";;
102 2.6.22*) LDISKFS_SERIES="2.6.22-vanilla.series";;
103 *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix ldiskfs/configure.ac])
105 AC_MSG_RESULT([$LDISKFS_SERIES])
106 AC_SUBST(LDISKFS_SERIES)
108 AC_SUBST(ac_configure_args)
111 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
113 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.*'
114 AC_SUBST(MOSTLYCLEANFILES)