X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=inline;f=config%2Flustre-build.m4;h=ad2321827d31e4f2cab679e55f1cd57defd8d229;hb=6d5fe29066af5f8e40055fd89b285853c363e947;hp=69f77e5d2c27b12c0dced68d98fe96c29c923939;hpb=3344e648236778565a8838ca85c655446ee7028c;p=fs%2Flustre-release.git diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 69f77e5..ad23218 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 # @@ -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,44 +344,104 @@ AS_IF([test $target_cpu = powerpc64], [ CC="$CC -m64" ]) -CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include -I$PWD/lustre/include/uapi $CPPFLAGS" +# libcfs/include for util headers, lnetconfig headers, lustre/include for liblustreapi and friends +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" +# 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 # +# Check if gcc supports -Wno-format-truncation +# +# To supress many warnings with gcc7 +# +AC_DEFUN([LB_CC_NO_FORMAT_TRUNCATION], [ + AC_MSG_CHECKING([for -Wno-format-truncation support]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-format-truncation" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ + EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-format-truncation" + AC_SUBST(EXTRA_KCFLAGS) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" +]) + +# +# Check if gcc supports -Wno-stringop-truncation +# +# To supress many warnings with gcc8 +# +AC_DEFUN([LB_CC_NO_STRINGOP_TRUNCATION], [ + AC_MSG_CHECKING([for -Wno-stringop-truncation support]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-stringop-truncation" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ + EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-stringop-truncation" + AC_SUBST(EXTRA_KCFLAGS) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" +]) + +# +# Check if gcc supports -Wno-stringop-overflow +# +# To supress many warnings with gcc8 +# +AC_DEFUN([LB_CC_NO_STRINGOP_OVERFLOW], [ + AC_MSG_CHECKING([for -Wno-stringop-overflow support]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-stringop-overflow" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ + EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-stringop-overflow" + AC_SUBST(EXTRA_KCFLAGS) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" +]) + +# # LB_CONDITIONALS # # AM_CONDITIONAL instances for everything # (so that portals/lustre can disable some if needed) # AC_DEFUN([LB_CONDITIONALS], [ +AM_CONDITIONAL([PLUGINS], [test x$enable_shared = xyes]) AM_CONDITIONAL([MODULES], [test x$enable_modules = xyes]) AM_CONDITIONAL([UTILS], [test x$enable_utils = xyes]) AM_CONDITIONAL([TESTS], [test x$enable_tests = xyes]) AM_CONDITIONAL([DOC], [test x$ENABLE_DOC = x1]) AM_CONDITIONAL([MANPAGES], [test x$enable_manpages = xyes]) AM_CONDITIONAL([LINUX], [test x$lb_target_os = xlinux]) -AM_CONDITIONAL([USES_DPKG], [test x$uses_dpkg = xyes]) AM_CONDITIONAL([USE_QUILT], [test x$use_quilt = xyes]) -AM_CONDITIONAL([RHEL], [test x$RHEL_KERNEL = xyes]) -AM_CONDITIONAL([SUSE], [test x$SUSE_KERNEL = xyes]) - -# Sanity check for PCLMULQDQ instruction availability -# PCLMULQDQ instruction is a new instruction available beginning with -# the all new Core processor family based on the 32nm microarchitecture -# codename Westmere. So, $target_cpu = x86_64 should have this instruction -# except MIC microarchitecture (k1om). -AM_CONDITIONAL(HAVE_PCLMULQDQ, test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om") -AS_IF([test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om"], - [AC_DEFINE(HAVE_PCLMULQDQ, 1, [have PCLMULQDQ instruction])]) - -LIBCFS_CONDITIONALS +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]) +AM_CONDITIONAL([LIBIBERTY_SUBDIR], [test -d /usr/include/libiberty]) + LN_CONDITIONALS LC_CONDITIONALS ]) # LB_CONDITIONALS @@ -394,8 +469,6 @@ AC_DEFUN([LB_CONFIG_FILES], [ lustre-iokit/ior-survey/Makefile lustre-iokit/stats-collect/Makefile ) - AC_CONFIG_FILES([lustre/scripts/dkms.mkconf], - [chmod +x lustre/scripts/dkms.mkconf]) ]) # @@ -439,8 +512,12 @@ AS_IF([test x$enable_ldiskfs = xno -a x$enable_zfs = xno], [ AC_MSG_CHECKING([whether to build Lustre server support]) AC_MSG_RESULT([$enable_server]) -AS_IF([test x$enable_server = xyes], - [AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])]) +AS_IF([test x$enable_server = xyes], [ + AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server]) + AC_SUBST(ENABLE_SERVER, yes) +], [ + AC_SUBST(ENABLE_SERVER, no) +]) ]) # LB_CONFIG_SERVERS # @@ -473,7 +550,6 @@ for arg; do --enable-tests | --disable-tests ) ;; --enable-utils | --disable-utils ) ;; --enable-iokit | --disable-iokit ) ;; - --enable-dlc | --disable-dlc ) ;; --enable-manpages | --disable-manpages ) ;; * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;; esac @@ -493,6 +569,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 @@ -505,11 +584,28 @@ fi if test x$enable_zfs = xyes ; then RPMBINARGS="$RPMBINARGS --with zfs" fi +if test x$enable_gss_keyring = xyes ; then + RPMBINARGS="$RPMBINARGS --with gss_keyring --with gss" +fi +if test x$enable_gss = xyes ; then + RPMBINARGS="$RPMBINARGS --with gss" + AC_SUBST(ENABLE_GSS, yes) +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 -if test x$USE_DLC = xyes ; then - RPMBINARGS="$RPMBINARGS --with lnet_dlc" +if test x$enable_snmp != xyes ; then + RPMBINARGS="$RPMBINARGS --without snmp" fi if test x$enable_manpages != xyes ; then RPMBINARGS="$RPMBINARGS --without manpages" @@ -520,6 +616,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 @@ -541,13 +640,14 @@ LB_CONFIG_DIST LB_DOWNSTREAM_RELEASE LB_USES_DPKG -LB_LIBCFS_DIR - LB_INCLUDE_RULES LB_PATH_DEFAULTS LB_PROG_CC +LB_CC_NO_FORMAT_TRUNCATION +LB_CC_NO_STRINGOP_TRUNCATION +LB_CC_NO_STRINGOP_OVERFLOW LC_OSD_ADDON @@ -558,11 +658,15 @@ 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"]) -m4_ifdef([LC_NODEMAP_PROC_DEBUG], [LC_NODEMAP_PROC_DEBUG]) +AS_IF([test "x$enable_tests" = xyes], [ + LC_HAVE_LIBAIO +]) + LIBCFS_CONFIG_CDEBUG LC_QUOTA