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
62 LB_LDISKFS_SERIES([test x$enable_dist = xno])
64 AC_MSG_CHECKING([whether to build Lustre server support])
65 AC_ARG_ENABLE([server],
66 AC_HELP_STRING([--disable-server],
67 [disable Lustre server support]),
69 if test -n "$LDISKFS_SERIES"; then
75 AC_MSG_RESULT([$enable_server])
79 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
80 AM_CONDITIONAL(MODULES, true)
81 AM_CONDITIONAL(LINUX, true)
82 AM_CONDITIONAL(DARWIN, true)
84 LDISKFSDIR="$PWD/ldiskfs"
87 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
88 AC_ARG_ENABLE([quilt],
89 AC_HELP_STRING([--disable-quilt],
90 [disable use of quilt for ldiskfs]),[],
92 AC_MSG_RESULT([$enable_quilt])
94 AC_PATH_PROG(PATCH, patch, [no])
96 if test x$enable_quilt = xno ; then
99 AC_PATH_PROG(QUILT, quilt, [no])
102 if test x$enable_server$PATCH$QUILT = xyesnono ; then
103 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
106 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
108 if test x$enable_server$enable_dist = xyesno ; then
110 LB_LDISKFS_EXT_SOURCE
111 LB_LDISKFS_DEFINE_OPTIONS
114 AM_CONDITIONAL(LDISKFS_PDO, test x$with_ldiskfs_pdo = xyes)
116 AC_SUBST(ac_configure_args)
119 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
121 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
122 AC_SUBST(MOSTLYCLEANFILES)