From f64af1d45df2a76f97337b47259363f61fab6b5f Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 9 Dec 2004 21:39:28 +0000 Subject: [PATCH] refine skeletal configure.ac --- autoMakefile.am | 58 +---- autogen.sh | 100 +------- build/Makefile.in.toplevel | 4 + build/autoMakefile.am.toplevel | 58 +++++ build/autoconf/configure.ac | 50 ---- build/autoconf/lustre-build-darwin.m4 | 9 + build/autoconf/lustre-build-linux.m4 | 10 + build/autoconf/lustre-build.m4 | 48 +++- build/autogen.sh | 109 +++++++++ build/build.ac | 438 ---------------------------------- configure.ac | 43 +--- lustrecvs | 25 +- 12 files changed, 259 insertions(+), 693 deletions(-) create mode 100644 build/Makefile.in.toplevel create mode 100644 build/autoMakefile.am.toplevel delete mode 100644 build/autoconf/configure.ac create mode 100644 build/autogen.sh delete mode 100644 build/build.ac diff --git a/autoMakefile.am b/autoMakefile.am index 884b636..d9e18a8 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -1,57 +1 @@ -SUBDIRS := . build portals lustre - -# these empty rules are needed so that automake doesn't add its own -# recursive rules -etags-recursive: - -ctags-recursive: - -tags-recursive: - -TAGS: - -tags: - rm -f $(top_srcdir)/TAGS - ETAGSF=`etags --version | grep -iq exuberant && \ - echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \ - find $(top_srcdir) -name '*.[hc]' | xargs etags $$ETAGSF -a - - rm -f $(top_srcdir)/tags - CTAGSF=`ctags --version | grep -iq exuberant && \ - echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \ - find $(top_srcdir) -name '*.[hc]' | xargs ctags $$CTAGSF -a - -if MODULES -all-am: modules - -all-sources: - $(MAKE) sources -C portals - $(MAKE) sources -C lustre - -if !LINUX25 -DEP = dep -dep: .depend - -.depend: all-sources - $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) \ - -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \ - -o scripts -o include/config/MARKER _sfdep_$(PWD) \ - _FASTDEP_ALL_SUB_DIRS="$(PWD)" - -CLEANFILES = .depend -endif - -modules: $(DEP) all-sources - $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) \ - -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \ - $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \ - include/config/MARKER $@ - -endif # MODULES - -dist-hook: - find $(distdir) -name .deps | xargs rm -rf - find $(distdir) -name CVS | xargs rm -rf - -rpms: dist Makefile - rpmbuild -ta $(distdir).tar.gz +include build/autoMakefile.am.toplevel diff --git a/autogen.sh b/autogen.sh index d8ccf52..3920385 100644 --- a/autogen.sh +++ b/autogen.sh @@ -1,98 +1,2 @@ -#!/bin/bash - -# taken from gnome-common/macros2/autogen.sh -compare_versions() { - ch_min_version=$1 - ch_actual_version=$2 - ch_status=0 - IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." - set $ch_actual_version - for ch_min in $ch_min_version; do - ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes - if [ -z "$ch_min" ]; then break; fi - if [ -z "$ch_cur" ]; then ch_status=1; break; fi - if [ $ch_cur -gt $ch_min ]; then break; fi - if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi - done - IFS="$ch_save_IFS" - return $ch_status -} - -error_msg() { - echo "$cmd is $1. version $required is required to build Lustre." - - if [ -e /usr/lib/autolustre/bin/$cmd ]; then - cat >&2 <<-EOF - You apparently already have Lustre-specific autoconf/make RPMs - installed on your system at /usr/lib/autolustre/share/$cmd. - Please set your PATH to point to those versions: - - export PATH="/usr/lib/autolustre/bin:\$PATH" - EOF - else - cat >&2 <<-EOF - CFS provides RPMs which can be installed alongside your - existing autoconf/make RPMs, if you are nervous about - upgrading. See - - ftp://ftp.lustre.org/pub/other/autolustre/README.autolustre - - You may be able to download newer version from: - - http://ftp.gnu.org/gnu/$cmd/$cmd-$required.tar.gz - EOF - fi - [ "$cmd" = "autoconf" -a "$required" = "2.57" ] && cat >&2 <&2 </dev/null ; then - error_msg "missing" - fi - version=$($cmd --version | awk "BEGIN { IGNORECASE=1 } /$tool \(GNU $tool\)/ { print \$4 }") - echo "found $version" - if ! compare_versions "$required" "$version" ; then - error_msg "too old" - fi -} - -echo "Checking for a complete tree..." -if ! [ -d build -a -d portals -a -d lustre ] ; then - cat >&2 <list diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index 6132eb6..fefa9d8 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -335,22 +335,45 @@ AC_DEFUN([LB_CONDITIONALS], 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(INKERNEL, test x$enable_inkernel = xyes) -AM_CONDITIONAL(LINUX25, test x$linux25 = xyes) AM_CONDITIONAL(CRAY_PORTALS, test x$with_cray_portals != xno) AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1") +LB_LINUX_CONDITIONALS +LB_DARWIN_CONDITIONALS + LP_CONDITIONALS LC_CONDITIONALS ]) # -# LB_CONFIG_FILES +# LB_CONFIGURE # -# files that should be generated with AC_OUTPUT +# main configure steps # -AC_DEFUN([LB_CONFIG_FILES], -[AC_CONFIG_FILES([ +AC_DEFUN([LB_CONFIGURE], +[LB_INCLUDE_RULES + +LB_PATH_DEFAULTS + +LB_PROG_CC + +LB_PATH_LIBSYSIO +LB_PATH_CRAY_PORTALS + +LB_CONFIG_DOCS +LB_CONFIG_UTILS +LB_CONFIG_TESTS + +LB_CONFIG_MODULES + +LB_CONFIG_LIBLUSTRE + +LB_CONDITIONALS +LB_CONFIG_HEADERS + +AC_CONFIG_FILES( +[Makefile:build/Makefile.in.toplevel] +[autoMakefile build/autoMakefile build/Rules build/lustre.spec @@ -358,4 +381,17 @@ build/lustre.spec LP_CONFIG_FILES LC_CONFIG_FILES + +AC_OUTPUT + +cat <<_ACEOF + +CPPFLAGS: $CPPFLAGS +LLCPPFLAGS: $LLCPPFLAGS +CFLAGS: $CFLAGS +EXTRA_KCFLAGS: $EXTRA_KCFLAGS +LLCFLAGS: $LLCFLAGS + +Type 'make' to build Lustre. +_ACEOF ]) diff --git a/build/autogen.sh b/build/autogen.sh new file mode 100644 index 0000000..3c3bf5f --- /dev/null +++ b/build/autogen.sh @@ -0,0 +1,109 @@ +#!/bin/bash + +# taken from gnome-common/macros2/autogen.sh +compare_versions() { + ch_min_version=$1 + ch_actual_version=$2 + ch_status=0 + IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." + set $ch_actual_version + for ch_min in $ch_min_version; do + ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes + if [ -z "$ch_min" ]; then break; fi + if [ -z "$ch_cur" ]; then ch_status=1; break; fi + if [ $ch_cur -gt $ch_min ]; then break; fi + if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi + done + IFS="$ch_save_IFS" + return $ch_status +} + +error_msg() { + echo "$cmd is $1. version $required is required to build Lustre." + + if [ -e /usr/lib/autolustre/bin/$cmd ]; then + cat >&2 <<-EOF + You apparently already have Lustre-specific autoconf/make RPMs + installed on your system at /usr/lib/autolustre/share/$cmd. + Please set your PATH to point to those versions: + + export PATH="/usr/lib/autolustre/bin:\$PATH" + EOF + else + cat >&2 <<-EOF + CFS provides RPMs which can be installed alongside your + existing autoconf/make RPMs, if you are nervous about + upgrading. See + + ftp://ftp.lustre.org/pub/other/autolustre/README.autolustre + + You may be able to download newer version from: + + http://ftp.gnu.org/gnu/$cmd/$cmd-$required.tar.gz + EOF + fi + [ "$cmd" = "autoconf" -a "$required" = "2.57" ] && cat >&2 <&2 </dev/null ; then + error_msg "missing" + fi + version=$($cmd --version | awk "BEGIN { IGNORECASE=1 } /$tool \(GNU $tool\)/ { print \$4 }") + echo "found $version" + if ! compare_versions "$required" "$version" ; then + error_msg "too old" + fi +} + +echo "Checking for a complete tree..." +for dir in build portals lustre ; do + if [ ! -d "$dir" ] ; then + cat >&2 </dev/null + echo "Running autogen for libsysio..." + sh autogen.sh + popd >/dev/null +fi diff --git a/build/build.ac b/build/build.ac deleted file mode 100644 index f538e55..0000000 --- a/build/build.ac +++ /dev/null @@ -1,438 +0,0 @@ -# Four main targets: lustre kernel modules, utilities, tests, and liblustre -AC_MSG_CHECKING([whether to build kernel modules]) -AC_ARG_ENABLE([modules], - AC_HELP_STRING([--disable-modules], - [disable building of Lustre kernel modules]), - [],[enable_modules='yes']) -AC_MSG_RESULT([$enable_modules]) -AM_CONDITIONAL(MODULES, test x$enable_modules = xyes) - -AC_MSG_CHECKING([whether to build utilities]) -AC_ARG_ENABLE([utils], - AC_HELP_STRING([--disable-utils], - [disable building of Lustre utility programs]), - [],[enable_utils='yes']) -AC_MSG_RESULT([$enable_utils]) - -AC_MSG_CHECKING([whether to build Lustre tests]) -AC_ARG_ENABLE([tests], - AC_HELP_STRING([--disable-tests], - [disable building of Lustre tests]), - [],[enable_tests='yes']) -AC_MSG_RESULT([$enable_tests]) - -# specify wether to build doc or not -AC_MSG_CHECKING([whether to build docs]) -AC_ARG_ENABLE(doc, - AC_HELP_STRING([--disable-doc], - [skip creation of pdf documentation]), - [ - if test x$enable_doc = xyes ; then - ENABLE_DOC=1 - else - ENABLE_DOC=0 - fi - ],[ - ENABLE_DOC=0 - enable_doc='no' - ]) -AC_MSG_RESULT([$enable_doc]) -AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1) -AC_SUBST(ENABLE_DOC) - -# we need to pass a full path here for kernel makefiles -INCLUDE_RULES="include $PWD/build/Rules" -AC_SUBST(INCLUDE_RULES) - -# directories for binaries -AC_PREFIX_DEFAULT([/usr]) - -sysconfdir='/etc' -AC_SUBST(sysconfdir) - -# Directories for documentation and demos. -docdir='${datadir}/doc/$(PACKAGE)' -AC_SUBST(docdir) - -# ---------- BAD gcc? ------------ -AC_PROG_RANLIB -AC_PROG_CC -AC_MSG_CHECKING([for buggy compiler]) -CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"` -bad_cc() { - AC_MSG_RESULT([buggy compiler found!]) - echo - echo " '$CC_VERSION'" - echo " has been known to generate bad code, " - echo " please get an updated compiler." - AC_MSG_ERROR([sorry]) -} -TMP_VERSION=`echo $CC_VERSION | cut -c 1-16` -if test "$TMP_VERSION" = "gcc version 2.95"; then - bad_cc -fi -case "$CC_VERSION" in - # ost_pack_niobuf putting 64bit NTOH temporaries on the stack - # without "sub $0xc,%esp" to protect the stack from being - # stomped on by interrupts (bug 606) - "gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)") - bad_cc - ;; - # mandrake's similar sub 0xc compiler bug - # http://marc.theaimsgroup.com/?l=linux-kernel&m=104748366226348&w=2 - "gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)") - bad_cc - ;; - *) - AC_MSG_RESULT([no known problems]) - ;; -esac -# end ------ BAD gcc? ------------ - -# --------- unsigned long long sane? ------- - -AC_CHECK_SIZEOF(unsigned long long, 0) -echo "---> size SIZEOF $SIZEOF_unsigned_long_long" -echo "---> size SIZEOF $ac_cv_sizeof_unsigned_long_long" -if test $ac_cv_sizeof_unsigned_long_long != 8 ; then - AC_MSG_ERROR([** we assume that sizeof(long long) == 8. Tell phil@clusterfs.com]) -fi - -# -------- we can't build modules unless srcdir = builddir -if test x$enable_modules != xno ; then - AC_CHECK_FILE([autoMakefile.am],[], - [AC_MSG_ERROR([At this time, Lustre does not support building kernel modules with srcdir != buildir.])]) -fi - -# -------- in kernel compilation? (2.5 only) ------------- -AC_MSG_CHECKING([if inkernel build support is requested]) -AC_ARG_ENABLE([inkernel], - AC_HELP_STRING([--enable-inkernel], - [set up 2.5 kernel makefiles]), - [],[enable_inkernel=no]) -AC_MSG_RESULT([$enable_inkernel]) -AM_CONDITIONAL(INKERNEL, test x$enable_inkernel = xyes) - -if test x$enable_inkernel = xyes ; then - find portals lustre -name Makefile.mk | sed 's/.mk$//' | xargs -n 1 \ - sh -e -x -c '(cp -f $0.mk $0.in)' -fi - -if test x$enable_modules != xno ; then - # -------- set linuxdir ------------ - AC_MSG_CHECKING([for Linux sources]) - AC_ARG_WITH([linux], - AC_HELP_STRING([--with-linux=path], - [set path to Linux source (default=/usr/src/linux)]), - [LINUX=$with_linux], - [LINUX=/usr/src/linux]) - AC_MSG_RESULT([$LINUX]) - AC_SUBST(LINUX) - if test x$enable_inkernel = xyes ; then - echo ln -s `pwd` $LINUX/fs/lustre - rm $LINUX/fs/lustre - ln -s `pwd` $LINUX/fs/lustre - fi - - # -------- linux objects (for 2.6) -- - AC_MSG_CHECKING([for Linux objects dir]) - AC_ARG_WITH([linux-obj], - AC_HELP_STRING([--with-linux-obj=path], - [set path to Linux objects dir (default=\$LINUX)]), - [LINUX_OBJ=$with_linux_obj], - [LINUX_OBJ=$LINUX]) - AC_MSG_RESULT([$LINUX_OBJ]) - AC_SUBST(LINUX_OBJ) - - # -------- check for .confg -------- - AC_ARG_WITH([linux-config], - [AC_HELP_STRING([--with-linux-config=path], - [set path to Linux .conf (default=\$LINUX_OBJ/.config)])], - [LINUX_CONFIG=$with_linux_config], - [LINUX_CONFIG=$LINUX_OBJ/.config]) - AC_SUBST(LINUX_CONFIG) - - AC_CHECK_FILE([/boot/kernel.h], - [KERNEL_SOURCE_HEADER='/boot/kernel.h'], - [AC_CHECK_FILE([/var/adm/running-kernel.h]), - [KERNEL_SOURCE_HEADER='/var/adm/running-kernel.h']]) - - AC_ARG_WITH([kernel-source-header], - AC_HELP_STRING([--with-kernel-source-header=path], - [Use a different kernel version header. Consult README.kernel-source for details.]), - [KERNEL_SOURCE_HEADER=$with_kernel_source_header]) - - # -------------------- - ARCH_UM= - UML_CFLAGS= - - AC_MSG_CHECKING([if you are running user mode linux for $host_cpu]) - if test -e $LINUX/include/asm-um ; then - if test X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then - ARCH_UM='ARCH=um' - # see notes in Rules.in - UML_CFLAGS='-O0' - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT([no (asm doesn't point at asm-um)]) - fi - else - AC_MSG_RESULT([no (asm-um missing)]) - fi - - AC_SUBST(ARCH_UM) - AC_SUBST(UML_CFLAGS) - - # --------- Linux 25 ------------------ - AC_CHECK_FILE([$LINUX/include/linux/namei.h], - [ - linux25="yes" - KMODEXT=".ko" - ],[ - KMODEXT=".o" - linux25="no" - ]) - AC_MSG_CHECKING([if you are using Linux 2.6]) - AC_MSG_RESULT([$linux25]) - - AC_SUBST(LINUX25) - AC_SUBST(KMODEXT) -fi -AM_CONDITIONAL(LINUX25, test x$linux25 = xyes) - - -# ------- Makeflags ------------------ - -CPPFLAGS="$CPPFLAGS $CRAY_PORTALS_INCLUDES -I\$(top_srcdir)/lustre/include -I\$(top_srcdir)/portals/include" - -# liblustre are all the same -LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1" -AC_SUBST(LLCPPFLAGS) - -LLCFLAGS="-g -Wall -fPIC" -AC_SUBST(LLCFLAGS) - -# everyone builds against portals and lustre - -EXTRA_KCFLAGS="-g $CRAY_PORTALS_INCLUDES -I$PWD/portals/include -I$PWD/lustre/include" - -# these are like AC_TRY_COMPILE, but try to build modules against the -# kernel, inside the kernel-tests directory - -AC_DEFUN([LUSTRE_MODULE_CONFTEST], -[cat >conftest.c <<_ACEOF -$1 -_ACEOF -]) - -AC_DEFUN([LUSTRE_MODULE_COMPILE_IFELSE], -[m4_ifvaln([$1], [LUSTRE_MODULE_CONFTEST([$1])])dnl -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko -AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" -f $PWD/build/Makefile LUSTRE_LINUX_CONFIG=$LINUX_CONFIG -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM $MODULE_TARGET=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], - [$4], - [_AC_MSG_LOG_CONFTEST -m4_ifvaln([$5],[$5])dnl])dnl -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko m4_ifval([$1], [build/conftest.c conftest.c])[]dnl -]) - -AC_DEFUN([LUSTRE_MODULE_TRY_COMPILE], -[LUSTRE_MODULE_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[$1]], [[$2]])], - [modules], - [test -s build/conftest.o], - [$3], [$4])]) - -AC_DEFUN([LUSTRE_MODULE_TRY_MAKE], -[LUSTRE_MODULE_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4], [$5], [$6])]) - -# ------------ include paths ------------------ - -if test x$enable_modules != xno ; then - # ------------ .config exists ---------------- - AC_CHECK_FILE([$LINUX_CONFIG],[], - [AC_MSG_ERROR([Kernel config could not be found. If you are building from a kernel-source rpm consult README.kernel-source])]) - - # ----------- make dep run? ------------------ - AC_CHECK_FILES([$LINUX_OBJ/include/linux/autoconf.h - $LINUX_OBJ/include/linux/version.h - $LINUX/include/linux/config.h],[], - [AC_MSG_ERROR([Run make config in $LINUX.])]) - - # ------------ rhconfig.h includes runtime-generated bits -- - # red hat kernel-source checks - - # we know this exists after the check above. if the user - # tarred up the tree and ran make dep etc. in it, then - # version.h gets overwritten with a standard linux one. - - if grep rhconfig $LINUX_OBJ/include/linux/version.h >/dev/null ; then - # This is a clean kernel-source tree, we need to - # enable extensive workarounds to get this to build - # modules - AC_CHECK_FILE([$KERNEL_SOURCE_HEADER], - [if test $KERNEL_SOURCE_HEADER = '/boot/kernel.h' ; then - AC_MSG_WARN([Using /boot/kernel.h from RUNNING kernel.]) - AC_MSG_WARN([If this is not what you want, use --with-kernel-source-header.]) - AC_MSG_WARN([Consult README.kernel-source for details.]) - fi], - [AC_MSG_ERROR([$KERNEL_SOURCE_HEADER not found. Consult README.kernel-source for details.])]) - EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS" - fi - - # ------------ external module support --------------------- - MODULE_TARGET="SUBDIRS" - if test $linux25 = 'yes' ; then - makerule="$PWD/build" - AC_MSG_CHECKING([for external module build support]) - rm -f build/conftest.i - LUSTRE_MODULE_TRY_MAKE([],[], - [$makerule LUSTRE_KERNEL_TEST=conftest.i], - [test -s build/conftest.i], - [ - AC_MSG_RESULT([no]) - ],[ - AC_MSG_RESULT([yes]) - makerule="_module_$makerule" - MODULE_TARGET="M" - ]) - else - makerule="_dir_$PWD/build" - fi - AC_SUBST(MODULE_TARGET) - - # --- check that we can build modules at all - AC_MSG_CHECKING([that modules can be built]) - LUSTRE_MODULE_TRY_COMPILE([],[], - [ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_WARN([Consult config.log for details.]) - AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult README.kernel-source]) - AC_MSG_ERROR([Kernel modules could not be built.]) - ]) - - # ------------ LINUXRELEASE and moduledir ------------------ - LINUXRELEASE= - rm -f build/conftest.i - AC_MSG_CHECKING([for Linux release]) - LUSTRE_MODULE_TRY_MAKE( - [#include ], - [char *LINUXRELEASE; - LINUXRELEASE=UTS_RELEASE;], - [$makerule LUSTRE_KERNEL_TEST=conftest.i], - [test -s build/conftest.i], - [ - # LINUXRELEASE="UTS_RELEASE" - eval $(grep "LINUXRELEASE=" build/conftest.i) - ],[ - AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([Could not preprocess test program. Consult config.log for details.]) - ]) - rm -f build/conftest.i - if test x$LINUXRELEASE = x ; then - AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([Could not determine Linux release version from linux/version.h.]) - fi - AC_MSG_RESULT([$LINUXRELEASE]) - AC_SUBST(LINUXRELEASE) - - moduledir='/lib/modules/'$LINUXRELEASE/kernel - modulefsdir='$(moduledir)/fs/$(PACKAGE)' - modulenetdir='$(moduledir)/net/$(PACKAGE)' - - AC_SUBST(moduledir) - AC_SUBST(modulefsdir) - AC_SUBST(modulenetdir) - - # ------------ RELEASE -------------------------------- - AC_MSG_CHECKING([for Lustre release]) - RELEASE="`echo ${LINUXRELEASE} | tr '-' '_'`_`date +%Y%m%d%H%M`" - AC_MSG_RESULT($RELEASE) - AC_SUBST(RELEASE) - - # ---------- modules? ------------------------ - AC_MSG_CHECKING([for module support]) - LUSTRE_MODULE_TRY_COMPILE( - [ - #include - ],[ - #ifndef CONFIG_MODULES - #error CONFIG_MODULES not #defined - #endif - ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_ERROR([module support is required to build Lustre kernel modules.]) - ]) - - # ---------- modversions? -------------------- - AC_MSG_CHECKING([for MODVERSIONS]) - LUSTRE_MODULE_TRY_COMPILE( - [ - #include - ],[ - #ifndef CONFIG_MODVERSIONS - #error CONFIG_MODVERSIONS not #defined - #endif - ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - ]) - - # ------------ preempt ----------------------- - AC_MSG_CHECKING([if preempt is enabled]) - LUSTRE_MODULE_TRY_COMPILE( - [ - #include - ],[ - #ifndef CONFIG_PREEMPT - #error CONFIG_PREEMPT is not #defined - #endif - ],[ - AC_MSG_RESULT([yes]) - AC_MSG_ERROR([Lustre does not support kernels with preempt enabled.]) - ],[ - AC_MSG_RESULT([no]) - ]) - - # ------------ kallsyms (so software watchdogs produce useful stacks) - AC_MSG_CHECKING([if kallsyms is enabled]) - LUSTRE_MODULE_TRY_COMPILE( - [ - #include - ],[ - #ifndef CONFIG_KALLSYMS - #error CONFIG_KALLSYMS is not #defined - #endif - ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - if test "x$ARCH_UM" = "x" ; then - AC_MSG_ERROR([Lustre requires that CONFIG_KALLSYMS is enabled in your kernel.]) - fi - ]) -fi - -ENABLE_INIT_SCRIPTS=0 -if test x$enable_utils = xyes ; then - AC_MSG_CHECKING([whether to install init scripts]) - # our scripts only work on red hat systems - if test -f /etc/init.d/functions -a -f /etc/sysconfig/network ; then - ENABLE_INIT_SCRIPTS=1 - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi -fi -AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1") -AC_SUBST(ENABLE_INIT_SCRIPTS) - -AC_CONFIG_FILES([ -build/autoMakefile -build/Rules -build/lustre.spec -]) diff --git a/configure.ac b/configure.ac index ce1df2a..7e8d2d3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,45 +1,14 @@ -sinclude(lustre/version.m4) +sinclude(lustre/autoconf/lustre-version.ac) -AC_INIT([Lustre], [LUSTRE_VERSION], [http://bugzilla.lustre.org/], [lustre]) +AC_INIT([Lustre], [LUSTRE_VERSION], [https://bugzilla.lustre.org/], [lustre]) -if test "LUSTRE_VERSION" = "LUSTRE""_VERSION" ; then - cat >&2 <<-EOF - This script was not built with a version number. +LB_CHECK_VERSION - This is likely due to an incorrect checkout, or a broken - tarball. +LC_CONFIG_SRCDIR - Please see README.lustrecvs, or contact your Lustre vendor. - EOF - exit 1 -fi +AC_CANONICAL_SYSTEM -AC_CONFIG_SRCDIR(lustre/obdclass/obdo.c) AM_INIT_AUTOMAKE # AM_MAINTAINER_MODE -sinclude(build/build.ac) -sinclude(portals/portals.ac) -sinclude(lustre/lustre.ac) - -AC_CONFIG_HEADERS([config.h]) - -CPPFLAGS="-include \$(top_builddir)/config.h $CPPFLAGS" -EXTRA_KCFLAGS="-include $PWD/config.h $EXTRA_KCFLAGS" -AC_SUBST(EXTRA_KCFLAGS) - -AC_OUTPUT([ -Makefile -autoMakefile -]) - -cat <&2 @@ -45,6 +47,10 @@ case "$1" in portalstag="b1_4_bgl" ;; + b_newsysio | b_sec) + libsysiotag="head_0809" + ;; + esac cvs_cmd () @@ -53,15 +59,20 @@ cvs_cmd () local module="$2" local tag="$3" + if [ "$tag" != "HEAD" ] ; then + cvstag="-r $tag" + fi + if [ -d "$dir" ] ; then - echo "$progname: Updating $dir to -r $tag" - ( cd "$dir" && cvs up -r "$tag" ) + echo "$progname: Updating $dir to $tag" + ( cd "$dir" && cvs up $cvstag ) else - echo "$progname: Checking out $dir from -r $tag" - cvs co -r "$tag" -d "$dir" "$module" + echo "$progname: Checking out $dir from $tag" + cvs co $cvstag -d "$dir" "$module" fi } -cvs_cmd build build "$buildtag" +cvs_cmd build lustre-build "$buildtag" +cvs_cmd libsysio libsysio "$libsysiotag" cvs_cmd portals portals "$portalstag" cvs_cmd lustre lustre-core "$lustretag" -- 1.8.3.1