diff --git a/Makefile.am b/Makefile.am
index 1d10e30..4ac71f9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,7 +51,7 @@ radsecproxy_LDADD = librsp.a @SSL_LIBS@
radsecproxy_conf_LDFLAGS = @TARGET_LDFLAGS@
-dist_man_MANS = radsecproxy.1 radsecproxy-hash.1 radsecproxy.conf.5
+dist_man_MANS = radsecproxy.1 radsecproxy-hash.1 $(GENMANPAGES)
EXTRA_DIST = \
LICENSE THANKS \
@@ -64,7 +64,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-fticks
####################
radsecproxy.conf.5: $(srcdir)/radsecproxy.conf.5.xml
- docbook2x-man $<
+ $(DOCBOOK2X_MAN) $<
html: radsecproxy.html radsecproxy-hash.html radsecproxy.conf.html
diff --git a/configure.ac b/configure.ac
index 1a19ced..a28e399 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,8 +119,11 @@ AM_CONDITIONAL(ENABLE_EXPERIMENTAL_DYNDISC,
AC_ARG_VAR([DOCBOOK2X_MAN], [docbook2x-man])
-AC_CHECK_PROG([DOCBOOK2X_MAN], [docbook2x-man], [yes])
-AM_CONDITIONAL(HAVE_DOCBOOK2X_MAN, test "$DOCBOOK2X_MAN" = "yes")
+if test ! "$DOCBOOK2X_MAN" ; then
+ AC_SUBST([DOCBOOK2X_MAN], [docbook2x-man])
+fi
+AC_CHECK_PROG([DOCBOOK2X_MAN_PROG], [$DOCBOOK2X_MAN], [yes])
+AM_CONDITIONAL(HAVE_DOCBOOK2X_MAN, test "$DOCBOOK2X_MAN_PROG" = "yes")
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LDFLAGS)
diff --git a/radsecproxy.conf.5.xml b/radsecproxy.conf.5.xml
index 120666f..d7290c8 100644
--- a/radsecproxy.conf.5.xml
+++ b/radsecproxy.conf.5.xml
@@ -5,9 +5,7 @@
2016-03-14
-
- radsecproxy.conf
-
+ radsecproxy.conf
5
radsecproxy 1.6.7