linux*)
lb_target_os="linux"
;;
- darwin*)
- lb_target_os="darwin"
- ;;
- solaris*)
- lb_target_os="SunOS"
- ;;
esac
AC_SUBST(lb_target_os)
]) # LB_CANONICAL_SYSTEM
#
# 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'
]) # LB_ARG_LIBS_INCLUDES
#
-# LB_PATH_LIBSYSIO
-#
-# Handle internal/external libsysio
-#
-AC_DEFUN([LB_PATH_LIBSYSIO], [
-AC_MSG_CHECKING([location of libsysio])
-AC_ARG_WITH([sysio],
- AC_HELP_STRING([--with-sysio=path],
- [set path to libsysio source (default is included libsysio)]),
- [], [
- AS_IF([test "x$lb_target_os" = xlinux],
- [with_sysio="yes"],
- [with_sysio="no"])
- ])
-AS_IF([test "x$with_sysio" = xyes], [
- AC_MSG_RESULT([internal])
- LB_CHECK_FILE([$srcdir/libsysio/src/rmdir.c], [], [
- AC_MSG_ERROR([A complete internal libsysio was not found.])
- ])
- LIBSYSIO_SUBDIR="libsysio"
- SYSIO="$PWD/libsysio"
- ], [test "x$with_sysio" = xno], [
- AC_MSG_RESULT([disabled])
- ], [
- AC_MSG_RESULT([$with_sysio])
- LB_CHECK_FILE([$with_sysio/lib/libsysio.a], [], [
- AC_MSG_ERROR([A complete (built) external libsysio was not found.])
- ])
- LIBSYSIO_SUBDIR=""
- SYSIO=$with_sysio
- with_sysio="yes"
- ])
-enable_sysio=$with_sysio
-# We have to configure even if we don't build here for make dist to work
-AC_CONFIG_SUBDIRS([libsysio])
-]) # LB_PATH_LIBSYSIO
-
-#
# LB_PATH_LUSTREIOKIT
#
# We no longer handle external lustre-iokit
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])
[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
#
enable_utils="no"
enable_tests="no"
enable_modules="no"
- enable_liblustre="no"
])
]) # LB_CONFIG_DIST
]) # 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
#
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
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)
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([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
AS_IF([test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om"],
[AC_DEFINE(HAVE_PCLMULQDQ, 1, [have PCLMULQDQ instruction])])
-# this lets lustre cancel libsysio, per-branch or if liblustre is
-# disabled
-AS_IF([test "x$LIBSYSIO_SUBDIR" = xlibsysio], [
- AS_IF([test "x$with_sysio" != xyes], [
- SYSIO=""
- LIBSYSIO_SUBDIR=""
- ])
-])
-AC_SUBST(LIBSYSIO_SUBDIR)
-AC_SUBST(SYSIO)
-
-LB_DARWIN_CONDITIONALS
-
LIBCFS_CONDITIONALS
LN_CONDITIONALS
LC_CONDITIONALS
-]) # LB_CONTITIONALS
+]) # LB_CONDITIONALS
#
# 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])
])
#
#
# 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-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
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"
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
+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
#
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
+LIBCFS_CONFIG_CDEBUG
LC_QUOTA
-LN_CONFIG_USERSPACE
-
-LB_PATH_LIBSYSIO
LB_PATH_SNMP
LB_PATH_LUSTREIOKIT
LB_DEFINE_E2FSPROGS_NAMES
-LC_CONFIG_LIBLUSTRE
LIBCFS_CONFIGURE
LN_CONFIGURE
LC_CONFIGURE
CC: $CC
LD: $LD
CPPFLAGS: $CPPFLAGS
-LLCPPFLAGS: $LLCPPFLAGS
CFLAGS: $CFLAGS
EXTRA_KCFLAGS: $EXTRA_KCFLAGS
-LLCFLAGS: $LLCFLAGS
Type 'make' to build Lustre.
_ACEOF