# Process this file with autoconf to produce a configure script.
-AC_INIT([Lustre ldiskfs], 3.0.9, [https://bugzilla.lustre.org/])
+AC_INIT([Lustre ldiskfs], 3.3.0, [http://bugs.whamcloud.com/])
AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
# Don't look for install-sh, etc. in ..
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([1.9 tar-ustar])
AC_PROG_CC
LB_CANONICAL_SYSTEM
+
+LB_DOWNSTREAM_RELEASE
+
+LB_BUILDID
+
LB_INCLUDE_RULES
LB_PROG_CC
+AC_ARG_ENABLE([dist],
+ AC_HELP_STRING([--enable-dist],
+ [only configure enough for make dist]),
+ [enable_dist='yes'],[enable_dist='no'])
+AC_MSG_RESULT([$enable_dist])
+if test x$enable_dist != xno; then
+ enable_modules='no'
+fi
#
# LC_TARGET_SUPPORTED
esac
])
-AC_DEFUN([LC_KERNEL_WITH_EXT4],
-[if test -f $LINUX/fs/ext4/ext4.h ; then
-$1
-else
-$2
-fi
-])
-
AC_MSG_CHECKING([whether to build kernel modules])
AC_ARG_ENABLE([modules],
AC_HELP_STRING([--disable-modules],
fi
fi
+LB_LDISKFS_SERIES([test x$enable_dist = xno])
+
+AC_MSG_CHECKING([whether to build Lustre server support])
+AC_ARG_ENABLE([server],
+ AC_HELP_STRING([--disable-server],
+ [disable Lustre server support]),
+ [],[
+ if test -n "$LDISKFS_SERIES"; then
+ enable_server='yes'
+ else
+ enable_server='no'
+ fi
+ ])
+AC_MSG_RESULT([$enable_server])
+
LB_CONFIG_HEADERS
# These allow Lustre Makefiles and autoMakefiles to be used unchanged.
AC_PATH_PROG(QUILT, quilt, [no])
fi
-if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
+if test x$enable_server$PATCH$QUILT = xyesnono ; then
AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
fi
AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
+AM_CONDITIONAL(USE_EXT4, test x$enable_ext4 = xyes)
-LB_DEFINE_LDISKFS_OPTIONS
-
-AC_MSG_CHECKING([whether to build ldisk based on ext4])
-AC_ARG_ENABLE([ext4],
- AC_HELP_STRING([--disable-ext4],
- [enable building of ldiskfs based on ext4]),[],
- [LC_KERNEL_WITH_EXT4([enable_ext4='yes'],
- [enable_ext4='no'])])
-AC_MSG_RESULT([$enable_ext4])
+if test x$enable_server$enable_dist = xyesno ; then
+LB_LDISKFS_EXT_RELEASE
+LB_LDISKFS_EXT_DIR
+LB_LDISKFS_EXT_SOURCE
+LB_LDISKFS_DEFINE_OPTIONS
-if test x$enable_ext4 = xyes ; then
- AC_DEFINE(HAVE_EXT4_LDISKFS, 1, [ldiskfs based on ext4])
- BACKFS=ext4
-else
- BACKFS=ext3
-fi
+BACKFS=$LDISKFS_BACKFS
AC_SUBST(BACKFS)
BACKFSU=${BACKFS/ext/EXT}
AC_SUBST(BACKFSU) # We need a Upper string
+fi
-AM_CONDITIONAL(USE_EXT4, test x$enable_ext4 = xyes)
-
-AC_MSG_CHECKING([which ldiskfs series to use])
-case $LINUXRELEASE in
-2.6.5*) LDISKFS_SERIES="2.6-suse.series" ;;
-2.6.9*) LDISKFS_SERIES="2.6-rhel4.series" ;;
-2.6.10-ac*) LDISKFS_SERIES="2.6-fc3.series" ;;
-2.6.10*) LDISKFS_SERIES="2.6-rhel4.series" ;;
-2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;;
-2.6.15*) LDISKFS_SERIES="2.6-fc5.series";;
-2.6.16*) LDISKFS_SERIES="2.6-sles10.series";;
-2.6.18*)
- if test x$RHEL_KENEL = xyes; then
- if test x$enable_ext4 = xyes; then
- LDISKFS_SERIES="2.6-rhel5-ext4.series"
- else
- LDISKFS_SERIES="2.6-rhel5.series"
- fi
- else
- LDISKFS_SERIES="2.6.18-vanilla.series"
- fi
- ;;
-2.6.22*) LDISKFS_SERIES="2.6.22-vanilla.series";;
-2.6.27*) LDISKFS_SERIES="2.6-sles11.series";;
-*) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix ldiskfs/configure.ac])
-esac
-AC_MSG_RESULT([$LDISKFS_SERIES])
-AC_SUBST(LDISKFS_SERIES)
+AM_CONDITIONAL(LDISKFS_PDO, test x$with_ldiskfs_pdo = xyes)
AC_SUBST(ac_configure_args)
-LB_CHECK_SYMBOL_EXPORT([d_rehash_cond],
- [fs/dcache.c],
- [AC_DEFINE(HAVE_D_REHASH_COND, 1,
- [d_rehash_cond is exported by the kernel])],
- [])
-
-LB_CHECK_SYMBOL_EXPORT([__d_rehash],
- [fs/dcache.c],
- [AC_DEFINE(HAVE___D_REHASH, 1,
- [__d_rehash is exported by the kernel])],
- [])
-
-LB_CHECK_SYMBOL_EXPORT([d_move_locked],
- [fs/dcache.c],
- [AC_DEFINE(HAVE_D_MOVE_LOCKED, 1,
- [d_move_locked is exported by the kernel])],
- [])
-
-LB_CHECK_SYMBOL_EXPORT([__d_move],
- [fs/dcache.c],
- [AC_DEFINE(HAVE___D_MOVE, 1,
- [__d_move exported by the kernel])],
- [])
-
LB_CONFIG_FILES
AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])