Whamcloud - gitweb
LU-5953 build: use installed OFED by default
[fs/lustre-release.git] / config / lustre-build.m4
index cbcd90d..3745d92 100644 (file)
@@ -18,12 +18,6 @@ case $target_os in
        linux*)
                lb_target_os="linux"
                ;;
-       darwin*)
-               lb_target_os="darwin"
-               ;;
-       solaris*)
-               lb_target_os="SunOS"
-               ;;
 esac
 AC_SUBST(lb_target_os)
 ]) # LB_CANONICAL_SYSTEM
@@ -239,9 +233,6 @@ AS_IF([test "x$enable_modules" = xyes], [
                        LN_PROG_LINUX
                        AS_IF([test "x$enable_server" != xno], [LB_EXT4_SRC_DIR])
                        LC_PROG_LINUX
-               ], [darwin*], [
-                       LB_PROG_DARWIN
-                       LIBCFS_PROG_DARWIN
                ], [*], [
                        # This is strange - Lustre supports a target we don't
                        AC_MSG_ERROR([Modules are not supported on $target_os])
@@ -261,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
 
 #
@@ -319,26 +309,6 @@ AC_SUBST(ENABLE_DOC)
 ]) # LB_CONFIG_DOCS
 
 #
-# LB_CONFIG_INIT_SCRIPTS
-#
-# our init scripts only work on red hat linux
-#
-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)
-])
-
-#
 # LB_CONFIG_HEADERS
 #
 # add -include config.h
@@ -405,7 +375,7 @@ 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"
+LLCPPFLAGS="-D_LARGEFILE64_SOURCE=1"
 AC_SUBST(LLCPPFLAGS)
 
 # Add _GNU_SOURCE for strnlen on linux
@@ -431,12 +401,11 @@ 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([LINUX], [test x$lb_target_os = xlinux])
-AM_CONDITIONAL([DARWIN], [test x$lb_target_os = xdarwin])
-AM_CONDITIONAL([SUNOS], [test x$lb_target_os = xSunOS])
 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
@@ -447,8 +416,6 @@ AM_CONDITIONAL(HAVE_PCLMULQDQ, test x$target_cpu = "xx86_64" -a x$target_vendor
 AS_IF([test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om"],
        [AC_DEFINE(HAVE_PCLMULQDQ, 1, [have PCLMULQDQ instruction])])
 
-LB_DARWIN_CONDITIONALS
-
 LIBCFS_CONDITIONALS
 LN_CONDITIONALS
 LC_CONDITIONALS
@@ -544,11 +511,20 @@ 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 ) ;;
                * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;;
        esac
 done
@@ -587,7 +563,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"
@@ -603,7 +581,9 @@ 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
 
 RPMBUILD_BINARY_ARGS=$RPMBINARGS
@@ -643,16 +623,22 @@ LB_CONFIG_DOCS
 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])
+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
+
+# 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