summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2012-07-18 21:03:08 +0200
committerRichard W.M. Jones <rjones@redhat.com>2012-07-18 22:01:48 +0100
commit225c970d589b855b98068e0adfe20f48e30090d2 (patch)
treed02b0624388b0e03b8c7b5b870b60a8dac956ee9
parenta2f08762bab023b0d1c65145df9d8578ef96217e (diff)
downloadvirt-what-225c970d589b855b98068e0adfe20f48e30090d2.tar.gz
virt-what-225c970d589b855b98068e0adfe20f48e30090d2.tar.xz
virt-what-225c970d589b855b98068e0adfe20f48e30090d2.zip
man: detect with autotools if pod2man is present
When pod2man is not present build will skip the manual. Earlier the condition caused make error, and empty manual page. Signed-off-by: Sami Kerola <kerolasa@iki.fi> RWMJ: - Generate virt-what.txt conditionally too (uses pod2text).
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac7
2 files changed, 13 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 2cd99fb..4ddbb64 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-CLEANFILES = virt-what virt-what.1 virt-what.txt
+CLEANFILES = virt-what
AM_CPPFLAGS = -Wall
@@ -25,15 +25,19 @@ if HOST_CPU_IA64
libexec_PROGRAMS += virt-what-ia64-xen-rdtsc-test
endif
+if HAVE_POD2MAN
+
+CLEANFILES += virt-what.1 virt-what.txt
man_MANS = virt-what.1
virt-what.1: virt-what.pod
pod2man -c "Virtualization Support" --release "$(PACKAGE)-$(VERSION)" \
$< > $@
-
virt-what.txt: virt-what.pod
pod2text $< > $@
+endif
+
TESTS = \
tests/test-baremetal.sh \
tests/test-esx4.1.sh \
diff --git a/configure.ac b/configure.ac
index 347304a..3ffc566 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,4 +36,11 @@ dnl Produce output files.
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([virt-what],[chmod +x virt-what])
AC_CONFIG_FILES([Makefile])
+
+AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man], [false])
+if test "$POD2MAN" = "false"; then
+ AC_MSG_WARN([pod2man was not found. This is needed to build man pages.])
+fi
+AM_CONDITIONAL([HAVE_POD2MAN], [test "$POD2MAN" != "false"])
+
AC_OUTPUT