X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=config%2Flustre-build.m4;h=7e2e239e939096404e92ebc67a60ac146db71810;hp=39f8435b1dd43b03ecec7daf6483abda25aee555;hb=bcbcd5873589c71a5d1028c14e74f8897fc3ffc0;hpb=35b968d916d8bf0f596562721423397b7fae7b36 diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 39f8435..7e2e239 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 @@ -336,8 +336,8 @@ AC_SUBST(ENABLE_INIT_SCRIPTS) # AC_DEFUN([LB_CONFIG_HEADERS], [ AC_CONFIG_HEADERS([config.h]) -CPPFLAGS="-include $PWD/config.h $CPPFLAGS" -EXTRA_KCFLAGS="-include $PWD/config.h $EXTRA_KCFLAGS" +CPPFLAGS="-include $PWD/undef.h -include $PWD/config.h $CPPFLAGS" +EXTRA_KCFLAGS="-include $PWD/undef.h -include $PWD/config.h $EXTRA_KCFLAGS" AC_SUBST(EXTRA_KCFLAGS) ]) # 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_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 @@ -439,7 +434,7 @@ AS_IF([test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om"], LIBCFS_CONDITIONALS LN_CONDITIONALS LC_CONDITIONALS -]) # LB_CONTITIONALS +]) # LB_CONDITIONALS # # LB_CONFIG_FILES @@ -467,6 +462,8 @@ 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]) ]) # @@ -519,28 +516,34 @@ 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-shared | --disable-shared ) ;; + --enable-static | --disable-static ) ;; --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 @@ -597,18 +600,23 @@ 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$BUILD_DLC != xyes ; then - RPMBINARGS="$RPMBINARGS --without lnet_dlc" - RPMSRCARGS="$RPMSRCARGS --without lnet_dlc" +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 +if test x$enable_shared != xyes ; then + RPMBINARGS="$RPMBINARGS --without shared" +fi +if test x$enable_static != xyes ; then + RPMBINARGS="$RPMBINARGS --without static" fi RPMBUILD_BINARY_ARGS=$RPMBINARGS -RPMBUILD_SOURCE_ARGS=$RPMSRCARGS AC_SUBST(RPMBUILD_BINARY_ARGS) -AC_SUBST(RPMBUILD_SOURCE_ARGS) ]) # LB_CONFIG_RPMBUILD_OPTIONS # @@ -638,6 +646,7 @@ LB_PROG_CC LC_OSD_ADDON LB_CONFIG_DOCS +LB_CONFIG_MANPAGES LB_CONFIG_UTILS LB_CONFIG_TESTS LC_CONFIG_CLIENT @@ -647,14 +656,10 @@ LB_CONFIG_SERVERS # Tests depends from utils (multiop from liblustreapi) AS_IF([test "x$enable_utils" = xno], [enable_tests="no"]) -# two macros for cmd3 -m4_ifdef([LC_CONFIG_SPLIT], [LC_CONFIG_SPLIT]) m4_ifdef([LC_NODEMAP_PROC_DEBUG], [LC_NODEMAP_PROC_DEBUG]) -LN_CONFIG_CDEBUG +LIBCFS_CONFIG_CDEBUG LC_QUOTA -LN_CONFIG_USERSPACE - LB_PATH_SNMP LB_PATH_LUSTREIOKIT @@ -688,10 +693,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