+]) # LB_CONFIG_SERVERS
+
+#
+# LB_CONFIG_RPMBUILD_OPTIONS
+#
+# 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 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=
+CONFIGURE_ARGS=
+eval set -- $ac_configure_args
+for arg; do
+ case $arg in
+ --*dir=* ) ;;
+ -C | --cache-file=* ) ;;
+ --prefix=* | --*-prefix=* ) ;;
+ --enable-dist ) ;;
+ --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-tests | --disable-tests ) ;;
+ --enable-utils | --disable-utils ) ;;
+ --enable-iokit | --disable-iokit ) ;;
+ --enable-manpages | --disable-manpages ) ;;
+ * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;;
+ esac
+done
+if test -n "$CONFIGURE_ARGS" ; then
+ RPMBINARGS="$RPMBINARGS --define \"configure_args $CONFIGURE_ARGS\""
+fi
+if test -n "$LINUX" ; then
+ RPMBINARGS="$RPMBINARGS --define \"kdir $LINUX\""
+ if test -n "$LINUX_OBJ" -a "$LINUX_OBJ" != x"$LINUX" ; then
+ RPMBINARGS="$RPMBINARGS --define \"kobjdir $LINUX_OBJ\""
+ fi
+fi
+if test x$enable_modules != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without lustre_modules"
+fi
+if test x$enable_tests != xyes ; then
+ RPMBINARGS="$RPMBINARGS --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_ldiskfs != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without ldiskfs"
+fi
+if test x$enable_zfs = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with zfs"
+fi
+if test x$enable_gss_keyring = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with gss_keyring --with gss"
+fi
+if test x$enable_gss = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with gss"
+ AC_SUBST(ENABLE_GSS, yes)
+elif test x$enable_gss = xno ; then
+ RPMBINARGS="$RPMBINARGS --without gss"
+ AC_SUBST(ENABLE_GSS, no)
+fi
+if test x$enable_iokit != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without lustre_iokit"
+fi
+if test x$enable_snmp != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without snmp"
+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
+
+AC_SUBST(RPMBUILD_BINARY_ARGS)
+]) # LB_CONFIG_RPMBUILD_OPTIONS