1 # Process this file with autoconf to produce a configure script.
3 AC_INIT([Lustre ldiskfs], 3.3.0, [http://bugs.whamcloud.com/])
4 AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
7 # Don't look for install-sh, etc. in ..
12 AM_INIT_AUTOMAKE([1.9 tar-ustar])
26 AC_HELP_STRING([--enable-dist],
27 [only configure enough for make dist]),
28 [enable_dist='yes'],[enable_dist='no'])
29 AC_MSG_RESULT([$enable_dist])
30 if test x$enable_dist != xno; then
37 # is the target os supported?
39 AC_DEFUN([LC_TARGET_SUPPORTED],
51 AC_MSG_CHECKING([whether to build kernel modules])
52 AC_ARG_ENABLE([modules],
53 AC_HELP_STRING([--disable-modules],
54 [disable building of Lustre kernel modules]),[],
55 [LC_TARGET_SUPPORTED([enable_modules='yes'],
56 [enable_modules='no'])])
57 AC_MSG_RESULT([$enable_modules])
59 if test x$enable_modules = xyes ; then
61 if test x$linux25 = xyes ; then
68 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
69 AM_CONDITIONAL(MODULES, true)
70 AM_CONDITIONAL(LINUX, true)
71 AM_CONDITIONAL(DARWIN, true)
72 AM_CONDITIONAL(LINUX25, true)
74 LDISKFSDIR="$PWD/ldiskfs"
77 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
78 AC_ARG_ENABLE([quilt],
79 AC_HELP_STRING([--disable-quilt],
80 [disable use of quilt for ldiskfs]),[],
82 AC_MSG_RESULT([$enable_quilt])
84 AC_PATH_PROG(PATCH, patch, [no])
86 if test x$enable_quilt = xno ; then
89 AC_PATH_PROG(QUILT, quilt, [no])
92 if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
93 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
96 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
98 LB_DEFINE_LDISKFS_OPTIONS
102 if test x$enable_ext4 = xyes ; then
103 AC_DEFINE(HAVE_EXT4_LDISKFS, 1, [ldiskfs based on ext4])
110 BACKFSU=${BACKFS/ext/EXT}
111 AC_SUBST(BACKFSU) # We need a Upper string
113 AM_CONDITIONAL(USE_EXT4, test x$enable_ext4 = xyes)
115 if test x$enable_dist != xyes; then
116 # don't need to do this if only configuring for make dist
117 AC_MSG_CHECKING([which ldiskfs series to use])
118 case $LINUXRELEASE in
120 if test x$RHEL_KERNEL = xyes; then
121 LDISKFS_SERIES="2.6-rhel5-ext4.series"
125 if test x$RHEL_KERNEL = xyes; then
126 LDISKFS_SERIES="2.6-rhel6.series"
129 *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix ldiskfs/configure.ac])
131 AC_MSG_RESULT([$LDISKFS_SERIES])
133 AC_SUBST(LDISKFS_SERIES)
135 AC_SUBST(ac_configure_args)
139 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
141 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
142 AC_SUBST(MOSTLYCLEANFILES)