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])
6 # Don't look for install-sh, etc. in ..
11 AM_INIT_AUTOMAKE([1.9 tar-ustar])
25 AC_HELP_STRING([--enable-dist],
26 [only configure enough for make dist]),
27 [enable_dist='yes'],[enable_dist='no'])
28 AC_MSG_RESULT([$enable_dist])
29 if test x$enable_dist != xno; then
36 # is the target os supported?
38 AC_DEFUN([LC_TARGET_SUPPORTED],
49 AC_MSG_CHECKING([whether to build kernel modules])
50 AC_ARG_ENABLE([modules],
51 AC_HELP_STRING([--disable-modules],
52 [disable building of Lustre kernel modules]),[],
53 [LC_TARGET_SUPPORTED([enable_modules='yes'],
54 [enable_modules='no'])])
55 AC_MSG_RESULT([$enable_modules])
57 if test x$enable_modules = xyes ; then
59 if test x$linux25 = xyes ; then
64 LB_LDISKFS_SERIES([test x$enable_dist = xno])
66 AC_MSG_CHECKING([whether to build Lustre server support])
67 AC_ARG_ENABLE([server],
68 AC_HELP_STRING([--disable-server],
69 [disable Lustre server support]),
71 if test -n "$LDISKFS_SERIES"; then
77 AC_MSG_RESULT([$enable_server])
81 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
82 AM_CONDITIONAL(MODULES, true)
83 AM_CONDITIONAL(LINUX, true)
84 AM_CONDITIONAL(DARWIN, true)
85 AM_CONDITIONAL(LINUX25, true)
87 LDISKFSDIR="$PWD/ldiskfs"
90 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
91 AC_ARG_ENABLE([quilt],
92 AC_HELP_STRING([--disable-quilt],
93 [disable use of quilt for ldiskfs]),[],
95 AC_MSG_RESULT([$enable_quilt])
97 AC_PATH_PROG(PATCH, patch, [no])
99 if test x$enable_quilt = xno ; then
102 AC_PATH_PROG(QUILT, quilt, [no])
105 if test x$enable_server$PATCH$QUILT = xyesnono ; then
106 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
109 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
110 AM_CONDITIONAL(USE_EXT4, test x$enable_ext4 = xyes)
112 if test x$enable_server$enable_dist = xyesno ; then
113 LB_LDISKFS_EXT_RELEASE
115 LB_LDISKFS_EXT_SOURCE
116 LB_LDISKFS_DEFINE_OPTIONS
118 BACKFS=$LDISKFS_BACKFS
120 BACKFSU=${BACKFS/ext/EXT}
121 AC_SUBST(BACKFSU) # We need a Upper string
124 AM_CONDITIONAL(LDISKFS_PDO, test x$with_ldiskfs_pdo = xyes)
126 AC_SUBST(ac_configure_args)
129 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
131 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
132 AC_SUBST(MOSTLYCLEANFILES)