CFLAGS="$X_CFLAGS $CFLAGS"
fi
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT
if test "x$ac_cv_header_utempter_h" != xyes; then
--- /dev/null
+dist_man1_MANS = wall-notify.1
+dist_noinst_DATA = wall-notify.txt
+
+DISTCLEANFILES = $(dist_man1_MANS)
+
+
+ASCIIDOC = asciidoc
+XMLTO = xmlto
+
+A2XML = $(ASCIIDOC) --backend=docbook --doctype=manpage \
+ --conf-file=$(srcdir)/man.conf
+XML2MAN = $(XMLTO) man
+
+.txt.1:
+ $(A2XML) -o $@.xml $<
+ $(XML2MAN) $@.xml
+ rm $@.xml
--- /dev/null
+# Macro to display links to other man pages. Inspired by Git's linkgit:[]
+# macro.
+[macros]
+(?su)[\\]?(?P<name>manlink):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
+
+[manlink-inlinemacro]
+<citerefentry>
+ <refentrytitle>{target}</refentrytitle>
+ <manvolnum>{0}</manvolnum>
+</citerefentry>
--- /dev/null
+wall-notify(1)
+==============
+
+NAME
+----
+
+wall-notify - receive wall messages and pass them to a notification program
+
+
+SYNOPSIS
+--------
+
+*wall-notify* ['-X'] ['-m'] 'cmd' ['args']..
+
+
+DESCRIPTION
+-----------
+
+*wall-notify* receives *wall* messages and passes them to the notification
+program 'cmd' and its arguments via stdin. For each received message a new
+instance of 'cmd' is created.
+
+
+OPTIONS
+-------
+
+*-X*::
+ Quit when the current X session terminates. By default *wall-notify* keeps
+ running. This option is intended for `~/.xinitrc` to prevent stale
+ *wall-notify* processes when the user logs out. Requires a running X
+ server.
+
+*-m*::
+ Receive messages from all users. Works similar to *mesg y*. By default
+ only messages from root are allowed. Be careful when using this option, it
+ might be abused by local users to send fake messages.
+
+
+AUTHORS
+-------
+
+Written by Simon Ruderich <simon@ruderich.org>.
+
+
+COPYRIGHT
+---------
+
+Copyright \(C) 2014 Simon Ruderich. Free software licensed under GPL version
+3 or later.
+
+
+SEE ALSO
+--------
+
+manlink:wall[1], manlink:utmp[5], manlink:shtudown[1]
+
+// vim: ft=asciidoc