Fail rpm build if "--with servers" used, but servers are not being
built after ./configure. This would happen if --without ldiskfs but
zfs isn't found and thus configure turns off server support.
Test-Parameters: trivial
Change-Id: I57b07c7b7c5ad5bd73165238969ad3b9d2f3a5ab
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/28282
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
--with-linux-obj=%{kobjdir} \
--with-kmp-moddir=%{kmoddir}/%{name}
--with-linux-obj=%{kobjdir} \
--with-kmp-moddir=%{kmoddir}/%{name}
+%if %{with servers}
+if ! grep -q define[[:space:]]*HAVE_SERVER_SUPPORT config.h 2> /dev/null; then
+ echo "Error: Server Support configured but not found"
+ false
+fi
+%endif
+
make %{?_smp_mflags} -s %{?make_args}
%install
make %{?_smp_mflags} -s %{?make_args}
%install