#
# 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_CONFIG_DOCS
#
+# LB_CONFIG_MANPAGES
+#
+# Build manpages?
+#
+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
#
# add -include config.h
#
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_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([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])
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
--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-utils | --disable-utils ) ;;
--enable-iokit | --disable-iokit ) ;;
--enable-dlc | --disable-dlc ) ;;
+ --enable-manpages | --disable-manpages ) ;;
* ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;;
esac
done
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
-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
+LIBCFS_CONFIG_CDEBUG
LC_QUOTA
LB_PATH_SNMP
CC: $CC
LD: $LD
CPPFLAGS: $CPPFLAGS
-LLCPPFLAGS: $LLCPPFLAGS
CFLAGS: $CFLAGS
EXTRA_KCFLAGS: $EXTRA_KCFLAGS
-LLCFLAGS: $LLCFLAGS
Type 'make' to build Lustre.
_ACEOF