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
])
#
+# 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
#
# Build kernel modules?
LP_CONDITIONALS
LC_CONDITIONALS
+LS_CONDITIONALS
])
#
LB_PATH_LIBSYSIO
LB_PATH_CRAY_PORTALS
+LB_PATH_SNMP
LB_CONFIG_DOCS
LB_CONFIG_UTILS
LP_CONFIGURE
LC_CONFIGURE
+if test "$SNMP_DIST_SUBDIR" ; then
+ LS_CONFIGURE
+fi
LB_CONDITIONALS
LB_CONFIG_HEADERS
LP_CONFIG_FILES
LC_CONFIG_FILES
+if test "$SNMP_DIST_SUBDIR" ; then
+ LS_CONFIG_FILES
+fi
AC_SUBST(ac_configure_args)
}
echo "Checking for a complete tree..."
+# required directories
for dir in build portals lustre ; do
if [ ! -d "$dir" ] ; then
cat >&2 <<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"
portalstag="HEAD"
libsysiotag="HEAD"
-snmptag=""
+snmptag="HEAD"
export LC_COLLATE=C
cvs_cmd libsysio libsysio "$libsysiotag"
cvs_cmd portals portals "$portalstag"
+cvs_cmd snmp lustre-snmp "$snmptag"
cvs_cmd lustre lustre-core "$lustretag"
%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