From 5f6fd14df10e3f11ef628fbacdb1664c0c2e9194 Mon Sep 17 00:00:00 2001 From: jacob <jacob> Date: Thu, 14 Jul 2005 21:10:04 +0000 Subject: [PATCH] add support for the snmp module. --- build/autoMakefile.am.toplevel | 4 ++-- build/autoconf/lustre-build.m4 | 18 ++++++++++++++++++ build/autogen.sh | 7 +++++++ build/buildcvs | 3 ++- build/lustre.spec.in | 7 ++++++- 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/build/autoMakefile.am.toplevel b/build/autoMakefile.am.toplevel index e42c7252b2..5ecc7d16b5 100644 --- a/build/autoMakefile.am.toplevel +++ b/build/autoMakefile.am.toplevel @@ -1,7 +1,7 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS := . build @LIBSYSIO_SUBDIR@ portals lustre -DIST_SUBDIRS := build libsysio portals lustre +SUBDIRS := . build @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ portals lustre +DIST_SUBDIRS := build @SNMP_DIST_SUBDIR@ libsysio portals lustre EXTRA_DIST := config.h.in diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index 8d0db0a00a..b2a516b92d 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -190,6 +190,16 @@ else fi ]) +# +# LB_PATH_SNMP +# +# check for in-tree snmp support +# +AC_DEFUN([LB_PATH_SNMP], +[LB_CHECK_FILE([$srcdir/snmp/lustre-snmp.c],[SNMP_DIST_SUBDIR="snmp"]) +AC_SUBST(SNMP_DIST_SUBDIR) +]) + # # LB_CONFIG_MODULES # @@ -444,6 +454,7 @@ LB_DARWIN_CONDITIONALS LP_CONDITIONALS LC_CONDITIONALS +LS_CONDITIONALS ]) # @@ -462,6 +473,7 @@ LB_PROG_CC LB_PATH_LIBSYSIO LB_PATH_CRAY_PORTALS +LB_PATH_SNMP LB_CONFIG_DOCS LB_CONFIG_UTILS @@ -474,6 +486,9 @@ LC_CONFIG_LIBLUSTRE LP_CONFIGURE LC_CONFIGURE +if test "$SNMP_DIST_SUBDIR" ; then + LS_CONFIGURE +fi LB_CONDITIONALS LB_CONFIG_HEADERS @@ -489,6 +504,9 @@ build/lustre.spec LP_CONFIG_FILES LC_CONFIG_FILES +if test "$SNMP_DIST_SUBDIR" ; then + LS_CONFIG_FILES +fi AC_SUBST(ac_configure_args) diff --git a/build/autogen.sh b/build/autogen.sh index 05be061f63..b27e0f983b 100644 --- a/build/autogen.sh +++ b/build/autogen.sh @@ -78,6 +78,7 @@ check_version() { } echo "Checking for a complete tree..." +# required directories for dir in build portals lustre ; do if [ ! -d "$dir" ] ; then cat >&2 <<EOF @@ -88,6 +89,12 @@ EOF fi ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf" done +# some are optional +for dir in snmp ; do + if [ -d "$dir" ] ; then + ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf" + fi +done check_version automake automake-1.7 "1.7.8" check_version autoconf autoconf "2.57" diff --git a/build/buildcvs b/build/buildcvs index f2187dcecd..3013ff0cdf 100644 --- a/build/buildcvs +++ b/build/buildcvs @@ -2,7 +2,7 @@ portalstag="HEAD" libsysiotag="HEAD" -snmptag="" +snmptag="HEAD" export LC_COLLATE=C @@ -78,4 +78,5 @@ esac cvs_cmd libsysio libsysio "$libsysiotag" cvs_cmd portals portals "$portalstag" +cvs_cmd snmp lustre-snmp "$snmptag" cvs_cmd lustre lustre-core "$lustretag" diff --git a/build/lustre.spec.in b/build/lustre.spec.in index 33d4d467b3..6e56726c94 100644 --- a/build/lustre.spec.in +++ b/build/lustre.spec.in @@ -126,11 +126,16 @@ cat >lustre.files <<EOF %attr(-, root, root) /usr/share/lustre/lustre2ldif.xsl %attr(-, root, root) /usr/share/lustre/top.ldif EOF -if [ -f $RPM_BUILD_ROOT/usr/lib/liblustre.so ] ; then +if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then echo '%attr(-, root, root) %{_libdir}/liblustre.a' >>lustre.files echo '%attr(-, root, root) %{_libdir}/liblustre.so' >>lustre.files fi +if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then + echo '%attr(-, root, root) %{_libdir}/lustre/snmp' >>lustre.files + echo '%attr(-, root, root) %{_datadir}/lustre/snmp/mibs' >>lustre.files +fi + %files -f lustre.files %files modules -- GitLab