RQUOTAD=
fi
AM_CONDITIONAL(CONFIG_RQUOTAD, [test "$enable_rquotad" = "yes"])
-
+AC_ARG_WITH(rpcgen,
+ [AC_HELP_STRING([--with-rpcgen=/usr/bin/rpcgen], [use system rpcgen instead of compiling our own])],
+ if test "$withval" == "yes"; then
+ for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
+ do if test -f $p ; then withval=$p ; break; fi ; done
+ fi
+ RPCGEN_PATH=$withval,
+ RPCGEN_PATH= )
+ AC_SUBST(RPCGEN_PATH)
+ AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" == ""])
AC_ARG_ENABLE(mount,
[AC_HELP_STRING([--enable-mount],
[Create mount.nfs and don't use the util-linux mount(8) functionality. @<:@default=no@:>@])],
## Process this file with automake to produce Makefile.in
-RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
GENFILES_CLNT = mount_clnt.c
GENFILES_XDR = mount_xdr.c
rm ${distdir}/$$f; \
done
+if CONFIG_RPCGEN
+RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
$(RPCGEN):
make -C $(top_srcdir)/tools/rpcgen all
+else
+RPCGEN = @RPCGEN_PATH@
+endif
$(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN)
test -f $@ && rm -rf $@ || true
## Process this file with automake to produce Makefile.in
-SUBDIRS = locktest rpcdebug rpcgen nlmtest
+OPTDIRS =
+
+if CONFIG_RPCGEN
+OPTDIRS += rpcgen
+endif
+
+SUBDIRS = locktest rpcdebug nlmtest $(OPTDIRS)
MAINTAINERCLEANFILES = Makefile.in
## Process this file with automake to produce Makefile.in
-RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
GENFILES_XDR = rquota_xdr.c
GENFILES_H = rquota.h
MAINTAINERCLEANFILES = Makefile.in
-
+if CONFIG_RPCGEN
+RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
$(RPCGEN):
make -C $(top_srcdir)/tools/rpcgen all
+else
+RPCGEN = @RPCGEN_PATH@
+endif
$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
test -f $@ && rm -rf $@ || true
man8_MANS = statd.man sm-notify.man
-RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
-
GENFILES_CLNT = sm_inter_clnt.c
GENFILES_SVC = sm_inter_svc.c
GENFILES_XDR = sm_inter_xdr.c
EXTRA_DIST = sim_sm_inter.x sm_inter.x $(man8_MANS) COPYRIGHT simulate.c
+if CONFIG_RPCGEN
+RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
$(RPCGEN):
make -C ../../tools/rpcgen all
+else
+RPCGEN = @RPCGEN_PATH@
+endif
$(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN)
test -f $@ && rm -rf $@ || true