1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
From b017e29aad70702c69e6016b07a932b7825a83e5 Mon Sep 17 00:00:00 2001
From: Thomas D <whissi@whissi.de>
Date: Sat, 3 May 2014 14:45:25 +0200
Subject: [PATCH] Remove "--enable-cached-man-pages" switch and make rst2man
optional when required man pages already exist
This commit backports the bugfix for issue #52 for the v7-stable branch.
---
configure.ac | 61 +++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 36 insertions(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0dd40c2..07d96dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1087,30 +1087,6 @@ fi
AM_CONDITIONAL(ENABLE_GUARDTIME, test x$enable_guardtime = xyes)
-# Support using cached man file copies, to avoid the need for rst2man
-# in the build environment
-AC_ARG_ENABLE(cached_man_pages,
- [AS_HELP_STRING([--enable-cached-man-pages],[Enable using cached versions of man files (avoid rst2man) @<:@default=no@:>@])],
- [case "${enableval}" in
- yes) enable_cached_man_pages="yes" ;;
- no) enable_cached_man_pages="no" ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-cached-man-pages) ;;
- esac],
- [enable_cached_man_pages=no]
-)
-if test "x$enable_cached_man_pages" = "xno"; then
-# obtain path for rst2man
- if test "x$enable_libgcrypt" = "xyes" || \
- test "x$enable_guardtime" = "xyes"; then
- AC_PATH_PROG([RST2MAN], [rst2man])
- if test "x${RST2MAN}" == "x"; then
- AC_MSG_FAILURE([rst2man not found in PATH])
- fi
- fi
-fi
-
-
-
# RFC 3195 support
AC_ARG_ENABLE(rfc3195,
[AS_HELP_STRING([--enable-rfc3195],[Enable RFC3195 support @<:@default=no@:>@])],
@@ -1519,6 +1495,41 @@ AM_CONDITIONAL(ENABLE_OMHIREDIS, test x$enable_omhiredis = xyes)
# END HIREDIS SUPPORT
+
+AC_CHECKING([if required man pages already exist])
+have_to_generate_man_pages="no"
+
+# man pages for libgcrypt module
+if test "x$enable_usertools" = "xyes" && test "x$enable_libgcrypt" = "xyes"; then
+ AC_CHECK_FILES(["tools/rscryutil.1" "tools/rsgtutil.1"],
+ [],
+ [have_to_generate_man_pages="yes"]
+ )
+fi
+
+# man pages for GuardTime module
+if test "x$enable_usertools" = "xyes" && test "x$enable_guardtime" = "xyes"; then
+ AC_CHECK_FILES(["tools/rscryutil.1" "tools/rsgtutil.1"],
+ [],
+ [have_to_generate_man_pages="yes"]
+ )
+fi
+
+if test "x$have_to_generate_man_pages" = "xyes"; then
+ AC_MSG_RESULT([Some man pages are missing. We need rst2man to generate the missing man pages from source...])
+else
+ AC_MSG_RESULT([All required man pages found. We don't need rst2man!])
+fi
+
+if test "x$have_to_generate_man_pages" = "xyes"; then
+ # We need rst2man to generate our man pages
+ AC_CHECK_PROGS([RST2MAN], [rst2man rst2man.py], [])
+ if test -z "$RST2MAN"; then
+ AC_MSG_ERROR([rst2man is required to build man pages. You can use the release tarball with pregenerated man pages to avoid this depedency.])
+ fi
+fi
+
+
AC_CONFIG_FILES([Makefile \
runtime/Makefile \
compat/Makefile \
@@ -1594,7 +1605,7 @@ echo " Zlib compression support enabled: $enable_zlib"
echo " rsyslog runtime will be built: $enable_rsyslogrt"
echo " rsyslogd will be built: $enable_rsyslogd"
echo " GUI components will be built: $enable_gui"
-echo " cached man files will be used: $enable_cached_man_pages"
+echo " have to generate man pages: $have_to_generate_man_pages"
echo " Unlimited select() support enabled: $enable_unlimited_select"
echo " uuid support enabled: $enable_uuid"
echo " Log file signing support: $enable_guardtime"
--
1.9.2
|