X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=config%2Flustre-build.m4;h=a643fc0a20cab708ab4957882bde1127c8ac34f6;hb=ec03ee091f931125f3bbeb3628b0c5aaa4709930;hp=7d9ab58a7e37d4e88858bd57764724fe82890f4f;hpb=7a7309fa849577ddd5a4f6bb5bfb69e84a7fec89;p=fs%2Flustre-release.git diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 7d9ab58..a643fc0 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -103,19 +103,6 @@ AC_SUBST(LUSTREIOKIT_SUBDIR) AM_CONDITIONAL([BUILD_LUSTREIOKIT], [test "x$enable_iokit" = xyes]) ]) # LB_PATH_LUSTREIOKIT -# Define no libcfs by default. -AC_DEFUN([LB_LIBCFS_DIR], [ -AS_IF([test "x$libcfs_is_module" = xyes], [ - LIBCFS_INCLUDE_DIR="libcfs/include" - LIBCFS_SUBDIR="libcfs" - ], [ - LIBCFS_INCLUDE_DIR="lnet/include" - LIBCFS_SUBDIR="" - ]) -AC_SUBST(LIBCFS_INCLUDE_DIR) -AC_SUBST(LIBCFS_SUBDIR) -]) # LB_LIBCFS_DIR - # # LB_LIBMOUNT # @@ -161,7 +148,7 @@ AC_MSG_CHECKING([whether to build Linux kernel modules]) AC_ARG_ENABLE([modules], AC_HELP_STRING([--disable-modules], [disable building of Lustre kernel modules]), - [], [ + [ AC_DEFINE(HAVE_NATIVE_LINUX_CLIENT, 1, [support native Linux client])], [ LC_TARGET_SUPPORTED([enable_modules="yes"], [enable_modules="no"]) ]) @@ -170,16 +157,32 @@ AC_MSG_RESULT([$enable_modules ($target_os)]) AS_IF([test "x$enable_modules" = xyes], [ AS_CASE([$target_os], [linux*], [ + # Run serial tests LB_PROG_LINUX LIBCFS_PROG_LINUX LN_PROG_LINUX AS_IF([test "x$enable_server" != xno], [LB_EXT4_SRC_DIR]) LC_PROG_LINUX + + # Run any parallel compile tests + LIBCFS_PROG_LINUX_SRC + LN_PROG_LINUX_SRC + AS_IF([test "x$enable_server" != xno], [LB_EXT4_SRC_DIR_SRC]) + LC_PROG_LINUX_SRC + + # Collect parallel compile tests results + LIBCFS_PROG_LINUX_RESULTS + LN_PROG_LINUX_RESULTS + AS_IF([test "x$enable_server" != xno], [LB_EXT4_SRC_DIR_RESULTS]) + LC_PROG_LINUX_RESULTS + ], [*], [ # This is strange - Lustre supports a target we don't AC_MSG_ERROR([Modules are not supported on $target_os]) - ]) ]) + # Use OpenSFS UAPI header path instead of linux kernel + CPPFLAGS="-I$PWD/lnet/include/uapi -I$PWD/lustre/include/uapi $CPPFLAGS" +]) ]) # LB_CONFIG_MODULES # @@ -207,6 +210,18 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests], [disable building of Lustre tests]), [], [enable_tests="yes"]) + +# +# Check to see if we can build the lutf +# +AX_PYTHON_DEVEL() +AS_IF([test "x$PYTHON_VERSION_CHECK" = xno], [ + enable_lutf="no" +], [ + AX_PKG_SWIG(2.0, [ enable_lutf="yes" ], + [ enable_lutf="no" ]) +]) + AC_MSG_RESULT([$enable_tests]) ]) # LB_CONFIG_TESTS @@ -329,13 +344,16 @@ AS_IF([test $target_cpu = powerpc64], [ CC="$CC -m64" ]) -CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lnet/include/uapi -I$PWD/lustre/include -I$PWD/lustre/include/uapi $CPPFLAGS" +# libcfs/include for util headers, lustre/include for liblustreapi and friends +# UAPI headers from OpenSFS are included if modules support is enabled, otherwise +# it will use the native kernel implementation. +CPPFLAGS="-I$PWD/libcfs/include -I$PWD/lnet/utils/ -I$PWD/lustre/include $CPPFLAGS" CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE" AC_SUBST(CCASFLAGS) -# everyone builds against lnet and lustre -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include/uapi -I$PWD/lustre/include" +# everyone builds against lnet and lustre kernel headers +EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/libcfs/include -I$PWD/libcfs/include/libcfs -I$PWD/lnet/include/uapi -I$PWD/lnet/include -I$PWD/lustre/include/uapi -I$PWD/lustre/include" AC_SUBST(EXTRA_KCFLAGS) ]) # LB_PROG_CC @@ -370,7 +388,7 @@ AC_DEFUN([LB_CC_NO_STRINGOP_TRUNCATION], [ AC_MSG_CHECKING([for -Wno-stringop-truncation support]) saved_flags="$CFLAGS" - CFLAGS="$CFLAGS -Wno-stringop-truncation" + CFLAGS="$CFLAGS -Werror -Wno-stringop-truncation" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-stringop-truncation" @@ -423,6 +441,7 @@ AM_CONDITIONAL([USE_QUILT], [test x$use_quilt = xyes]) AM_CONDITIONAL([RHEL], [test -f /etc/redhat-release]) AM_CONDITIONAL([SUSE], [test -f /etc/SUSE-brand -o -f /etc/SuSE-release]) AM_CONDITIONAL([UBUNTU], [test x$UBUNTU_KERNEL = xyes]) +AM_CONDITIONAL([BUILD_LUTF], [test x$enable_lutf = xyes]) LN_CONDITIONALS LC_CONDITIONALS @@ -443,6 +462,7 @@ AC_DEFUN([LB_CONFIG_FILES], [ AC_PACKAGE_TARNAME[-dkms.spec] ldiskfs/Makefile ldiskfs/autoMakefile + lustre/utils/lustre.pc lustre-iokit/Makefile lustre-iokit/obdfilter-survey/Makefile lustre-iokit/ost-survey/Makefile @@ -551,6 +571,9 @@ fi if test x$enable_tests != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_tests" fi +if test x$enable_lutf != xyes ; then + RPMBINARGS="$RPMBINARGS --without lustre_tests_lutf" +fi if test x$enable_utils != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_utils" fi @@ -573,6 +596,13 @@ elif test x$enable_gss = xno ; then RPMBINARGS="$RPMBINARGS --without gss" AC_SUBST(ENABLE_GSS, no) fi +if test x$enable_crypto = xyes ; then + RPMBINARGS="$RPMBINARGS --with crypto" + AC_SUBST(ENABLE_CRYPTO, yes) +elif test x$enable_crypto = xno ; then + RPMBINARGS="$RPMBINARGS --without crypto" + AC_SUBST(ENABLE_CRYPTO, no) +fi if test x$enable_iokit != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_iokit" fi @@ -588,6 +618,9 @@ fi if test x$enable_static != xyes ; then RPMBINARGS="$RPMBINARGS --without static" fi +if test x$enable_mpitests != xyes ; then + RPMBINARGS="$RPMBINARGS --without mpi" +fi RPMBUILD_BINARY_ARGS=$RPMBINARGS @@ -595,6 +628,19 @@ AC_SUBST(RPMBUILD_BINARY_ARGS) ]) # LB_CONFIG_RPMBUILD_OPTIONS # +# LB_CONFIG_CACHE_OPTIONS +# +# Propagate config cache option +# +AC_DEFUN([LB_CONFIG_CACHE_OPTIONS], [ +CONFIG_CACHE_FILE= +if test -f "$cache_file"; then + CONFIG_CACHE_FILE=$(readlink --canonicalize "$cache_file") +fi +AC_SUBST(CONFIG_CACHE_FILE) +]) # LB_CONFIG_CACHE_OPTIONS + +# # LB_CONFIGURE # # main configure steps @@ -609,8 +655,6 @@ LB_CONFIG_DIST LB_DOWNSTREAM_RELEASE LB_USES_DPKG -LB_LIBCFS_DIR - LB_INCLUDE_RULES LB_PATH_DEFAULTS @@ -629,10 +673,23 @@ LB_CONFIG_TESTS LC_CONFIG_CLIENT LB_CONFIG_MPITESTS LB_CONFIG_SERVERS +LC_CONFIG_CRYPTO # Tests depends from utils (multiop from liblustreapi) AS_IF([test "x$enable_utils" = xno], [enable_tests="no"]) +AS_IF([test "x$enable_utils" = xyes], [ + LC_GLIBC_SUPPORT_COPY_FILE_RANGE + LC_OPENSSL_SSK + LC_OPENSSL_GETSEPOL + LC_FID2PATH_ANON_UNION + LC_IOC_REMOVE_ENTRY +]) +AS_IF([test "x$enable_tests" = xyes], [ + LC_HAVE_LIBAIO + LC_GLIBC_SUPPORT_FHANDLES +]) + LIBCFS_CONFIG_CDEBUG LC_QUOTA @@ -662,6 +719,7 @@ MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symver AC_SUBST(MOSTLYCLEANFILES) LB_CONFIG_RPMBUILD_OPTIONS +LB_CONFIG_CACHE_OPTIONS AC_OUTPUT