summaryrefslogtreecommitdiffstats
path: root/utils/statd
diff options
context:
space:
mode:
Diffstat (limited to 'utils/statd')
-rw-r--r--utils/statd/Makefile.am91
-rw-r--r--utils/statd/callback.c4
-rw-r--r--utils/statd/log.c4
-rw-r--r--utils/statd/misc.c4
-rw-r--r--utils/statd/monitor.c4
-rw-r--r--utils/statd/notify.c4
-rw-r--r--utils/statd/notlist.c4
-rw-r--r--utils/statd/rmtcall.c4
-rw-r--r--utils/statd/simu.c5
-rw-r--r--utils/statd/stat.c5
-rw-r--r--utils/statd/statd.c6
-rw-r--r--utils/statd/statd.h5
-rw-r--r--utils/statd/state.c5
-rw-r--r--utils/statd/svc_run.c6
14 files changed, 138 insertions, 13 deletions
diff --git a/utils/statd/Makefile.am b/utils/statd/Makefile.am
new file mode 100644
index 0000000..26800ea
--- /dev/null
+++ b/utils/statd/Makefile.am
@@ -0,0 +1,91 @@
+## Process this file with automake to produce Makefile.in
+
+man8_MANS = statd.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
+GENFILES_H = sm_inter.h
+
+GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H)
+
+RPCPREFIX = rpc.
+KPREFIX = @kprefix@
+sbin_PROGRAMS = statd
+statd_SOURCES = callback.c notlist.c log.c misc.c monitor.c notify.c \
+ simu.c stat.c statd.c state.c svc_run.c rmtcall.c \
+ sm_inter_clnt.c sm_inter_svc.c sm_inter_xdr.c log.h \
+ notlist.h statd.h system.h version.h sm_inter.h
+BUILT_SOURCES = $(GENFILES)
+statd_LDADD = ../../support/export/libexport.a \
+ ../../support/nfs/libnfs.a \
+ ../../support/misc/libmisc.a \
+ $(LIBWRAP) $(LIBNSL)
+
+EXTRA_DIST = sim_sm_inter.x sm_inter.x $(man8_MANS) COPYRIGHT simulate.c
+
+$(RPCGEN):
+ make -C ../../tools/rpcgen all
+
+$(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -l -o $@ $<
+
+$(GENFILES_SVC): %_svc.c: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -m -o $@ $<
+
+$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -c -o $@ $<
+
+$(GENFILES_H): %.h: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -h -o $@ $<
+
+MAINTAINERCLEANFILES = Makefile.in
+
+CLEANFILES = $(GENFILES)
+
+#######################################################################
+# The following allows the current practice of having
+# daemons renamed during the install to include RPCPREFIX
+# and the KPREFIX
+# This could all be done much easier with program_transform_name
+# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
+# but that also renames the man pages, which the current
+# practice does not do.
+install-exec-hook:
+ (cd $(DESTDIR)$(sbindir) && \
+ for p in $(sbin_PROGRAMS); do \
+ mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
+ done)
+uninstall-hook:
+ (cd $(DESTDIR)$(sbindir) && \
+ for p in $(sbin_PROGRAMS); do \
+ rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
+ done)
+
+
+# XXX This makes some assumptions about what automake does.
+# XXX But there is no install-man-hook or install-man-local.
+install-man: install-man8 install-man-links
+uninstall-man: uninstall-man8 uninstall-man-links
+
+install-man-links:
+ (cd $(DESTDIR)$(man8dir) && \
+ for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
+ inst=`echo $$m | sed -e 's/man$$/8/'`; \
+ rm -f $(RPCPREFIX)$$inst ; \
+ $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
+ done)
+
+uninstall-man-links:
+ (cd $(DESTDIR)$(man8dir) && \
+ for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
+ inst=`echo $$m | sed -e 's/man$$/8/'`; \
+ rm -f $(RPCPREFIX)$$inst ; \
+ done)
+
diff --git a/utils/statd/callback.c b/utils/statd/callback.c
index 0947727..8a85ce9 100644
--- a/utils/statd/callback.c
+++ b/utils/statd/callback.c
@@ -6,7 +6,9 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "statd.h"
#include "notlist.h"
diff --git a/utils/statd/log.c b/utils/statd/log.c
index 008f036..408807e 100644
--- a/utils/statd/log.c
+++ b/utils/statd/log.c
@@ -12,7 +12,9 @@
* 260295 okir started with simply syslog logging.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <syslog.h>
#include <unistd.h>
diff --git a/utils/statd/misc.c b/utils/statd/misc.c
index a3752bb..fd201b4 100644
--- a/utils/statd/misc.c
+++ b/utils/statd/misc.c
@@ -6,7 +6,9 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <errno.h>
#include <limits.h>
diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c
index 40e8f49..8348473 100644
--- a/utils/statd/monitor.c
+++ b/utils/statd/monitor.c
@@ -7,7 +7,9 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <fcntl.h>
#include <limits.h>
diff --git a/utils/statd/notify.c b/utils/statd/notify.c
index ffe2da6..d7aa1dd 100644
--- a/utils/statd/notify.c
+++ b/utils/statd/notify.c
@@ -10,7 +10,9 @@
* NSM notify list handling.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <dirent.h>
#include <errno.h>
diff --git a/utils/statd/notlist.c b/utils/statd/notlist.c
index 0ef5491..4f52b1d 100644
--- a/utils/statd/notlist.c
+++ b/utils/statd/notlist.c
@@ -12,7 +12,9 @@
* Simple list management for notify list
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <string.h>
#include "misc.h"
diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
index a45705b..809d1ad 100644
--- a/utils/statd/rmtcall.c
+++ b/utils/statd/rmtcall.c
@@ -20,7 +20,9 @@
* it won't if it's worth its money).
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/utils/statd/simu.c b/utils/statd/simu.c
index 78a6ee2..9d685ad 100644
--- a/utils/statd/simu.c
+++ b/utils/statd/simu.c
@@ -4,7 +4,10 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "statd.h"
#include "notlist.h"
diff --git a/utils/statd/stat.c b/utils/statd/stat.c
index 7d9d1b1..bcd3550 100644
--- a/utils/statd/stat.c
+++ b/utils/statd/stat.c
@@ -5,7 +5,10 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <netdb.h>
#include "statd.h"
diff --git a/utils/statd/statd.c b/utils/statd/statd.c
index f61914d..8ebb808 100644
--- a/utils/statd/statd.c
+++ b/utils/statd/statd.c
@@ -7,7 +7,11 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/stat.h>
#include <limits.h>
#include <signal.h>
#include <unistd.h>
diff --git a/utils/statd/statd.h b/utils/statd/statd.h
index d9d5d3d..225cc8b 100644
--- a/utils/statd/statd.h
+++ b/utils/statd/statd.h
@@ -5,7 +5,10 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "sm_inter.h"
#include "system.h"
#include "log.h"
diff --git a/utils/statd/state.c b/utils/statd/state.c
index c241985..a6a4077 100644
--- a/utils/statd/state.c
+++ b/utils/statd/state.c
@@ -6,7 +6,10 @@
* NSM for Linux.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c
index 597b68d..67bb05c 100644
--- a/utils/statd/svc_run.c
+++ b/utils/statd/svc_run.c
@@ -47,7 +47,11 @@
* This is the RPC server side idle loop.
* Wait for input, call server program.
*/
-#include "config.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <errno.h>
#include <time.h>
#include "statd.h"