X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=config%2Flustre-build.m4;h=d17fb4b9e70b5e6f20a53a60a8d66aed13204a6a;hp=32b3861c41007196d943d406e5143246b36c69f7;hb=a71ab04971382c77f708d6a082e8ee2fa845e9be;hpb=01def2b635ff0b7bacde158d9124334c42cd5d2b diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 32b3861..d17fb4b 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -105,7 +105,7 @@ AC_SUBST(BUILDID) # # LB_CHECK_FILE # -# Check for file existance even when cross compiling +# Check for file existence even when cross compiling # $1 - file to check # $2 - do 'yes' # $3 - do 'no' @@ -252,7 +252,6 @@ AC_ARG_ENABLE([utils], [disable building of Lustre utility programs]), [], [enable_utils="yes"]) AC_MSG_RESULT([$enable_utils]) -AS_IF([test "x$enable_utils" = xyes], [LB_CONFIG_INIT_SCRIPTS]) ]) # LB_CONFIG_UTILS # @@ -310,24 +309,25 @@ AC_SUBST(ENABLE_DOC) ]) # LB_CONFIG_DOCS # -# LB_CONFIG_INIT_SCRIPTS +# LB_CONFIG_MANPAGES # -# our init scripts only work on red hat linux +# Build manpages? # -AC_DEFUN([LB_CONFIG_INIT_SCRIPTS], [ -ENABLE_INIT_SCRIPTS=0 -AS_IF([test x$enable_utils = xyes], [ - AC_CACHE_CHECK([whether to install init scripts], [lb_cv_enable_init_scripts], [ - # our scripts only work on red hat systems - AS_IF([test -f /etc/init.d/functions -a -f /etc/sysconfig/network], - [lb_cv_enable_init_scripts="yes"], - [lb_cv_enable_init_scripts="no"]) - ]) - AS_IF([test "x$lb_cv_enable_init_scripts" = xyes], - [ENABLE_INIT_SCRIPTS=1]) -]) -AC_SUBST(ENABLE_INIT_SCRIPTS) +AC_DEFUN([LB_CONFIG_MANPAGES], [ +AC_MSG_CHECKING([whether to build Lustre manpages]) +AC_ARG_ENABLE([manpages], + AC_HELP_STRING([--disable-manpages], + [skip creation and inclusion of man pages (default is enable)]), + [], [enable_manpages="yes"]) +AC_MSG_RESULT([$enable_manpages]) +AS_IF([test "x$enable_manpages" = xyes], [ +AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], []) + if test "x$RST2MAN" = "x"; then + AC_MSG_ERROR( + [rst2man is needed to build the man pages. Install python-docutils.]) +fi ]) +]) # LB_CONFIG_MANPAGES # # LB_CONFIG_HEADERS @@ -396,13 +396,6 @@ AS_IF([test $target_cpu = powerpc64], [ CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include $CPPFLAGS" -LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1" -AC_SUBST(LLCPPFLAGS) - -# Add _GNU_SOURCE for strnlen on linux -LLCFLAGS="-g -Wall -fPIC -D_GNU_SOURCE" -AC_SUBST(LLCFLAGS) - CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE" AC_SUBST(CCASFLAGS) @@ -422,10 +415,12 @@ 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([INIT_SCRIPTS], [test x$ENABLE_INIT_SCRIPTS = 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 @@ -519,23 +514,32 @@ AS_IF([test x$enable_server = xyes], # # The purpose of this function is to assemble command line options # for the rpmbuild command based on the options passed to the configure -# script, and also upon the descisions that configure makes based on +# script, and also upon the decisions that configure makes based on # the tests that it runs. # These strings can be passed to rpmbuild on the command line # in the Make targets named "rpms" and "srpm". # AC_DEFUN([LB_CONFIG_RPMBUILD_OPTIONS], [ RPMBINARGS= -RPMSRCARGS= CONFIGURE_ARGS= eval set -- $ac_configure_args for arg; do case $arg in + --*dir=* ) ;; + -C | --cache-file=* ) ;; + --prefix=* | --*-prefix=* ) ;; + --enable-dist ) ;; --with-release=* ) ;; --with-kmp-moddir=* ) ;; --with-linux=* | --with-linux-obj=* ) ;; - --enable-tests | --disable-tests ) ;; + --enable-ldiskfs | --disable-ldiskfs ) ;; --enable-modules | --disable-modules ) ;; + --enable-server | --disable-server ) ;; + --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 done @@ -574,7 +578,9 @@ if test x$enable_modules != xyes ; then fi if test x$enable_tests != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_tests" - RPMSRCARGS="$RPMSRCARGS --without lustre_tests" +fi +if test x$enable_utils != xyes ; then + RPMBINARGS="$RPMBINARGS --without lustre_utils" fi if test x$enable_server != xyes ; then RPMBINARGS="$RPMBINARGS --without servers" @@ -590,14 +596,17 @@ if test x$enable_zfs = xyes ; then fi if test x$enable_iokit != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_iokit" - RPMSRCARGS="$RPMSRCARGS --without lustre_iokit" +fi +if test x$USE_DLC = xyes ; then + RPMBINARGS="$RPMBINARGS --with lnet_dlc" +fi +if test x$enable_manpages != xyes ; then + RPMBINARGS="$RPMBINARGS --without manpages" fi RPMBUILD_BINARY_ARGS=$RPMBINARGS -RPMBUILD_SOURCE_ARGS=$RPMSRCARGS AC_SUBST(RPMBUILD_BINARY_ARGS) -AC_SUBST(RPMBUILD_SOURCE_ARGS) ]) # LB_CONFIG_RPMBUILD_OPTIONS # @@ -627,20 +636,20 @@ LB_PROG_CC LC_OSD_ADDON LB_CONFIG_DOCS +LB_CONFIG_MANPAGES LB_CONFIG_UTILS LB_CONFIG_TESTS LC_CONFIG_CLIENT LB_CONFIG_MPITESTS LB_CONFIG_SERVERS -# two macros for cmd3 -m4_ifdef([LC_CONFIG_SPLIT], [LC_CONFIG_SPLIT]) +# 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]) LN_CONFIG_CDEBUG LC_QUOTA -LN_CONFIG_USERSPACE - LB_PATH_SNMP LB_PATH_LUSTREIOKIT @@ -674,10 +683,8 @@ cat <<_ACEOF CC: $CC LD: $LD CPPFLAGS: $CPPFLAGS -LLCPPFLAGS: $LLCPPFLAGS CFLAGS: $CFLAGS EXTRA_KCFLAGS: $EXTRA_KCFLAGS -LLCFLAGS: $LLCFLAGS Type 'make' to build Lustre. _ACEOF