buildfix: check for old pod2man versions
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 29 Mar 2012 08:55:18 +0000 (10:55 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 31 Mar 2012 12:04:08 +0000 (12:04 +0000)
Older pod2man don't have a --utf8 switch, check for this in conffigure
and use it only when present.  Fixes build on RHEL-5.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile
configure

index d8e1f362296863a65fb09c49324d6d02cea9be3b..35c7a2a551460b02a8f63ddcb68e9eed2e27ce83 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -348,7 +348,6 @@ QMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx
 qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
        $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"  GEN   $@")
 
-POD2MAN = pod2man --utf8
 qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
        $(call quiet-command, \
          perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \
index dd01911e37fb2da39f87263e70ef35456046ec58..b51a7494757897b86f4841ce01e2b550dc632577 100755 (executable)
--- a/configure
+++ b/configure
@@ -2821,6 +2821,13 @@ if test "$solaris" = "no" ; then
     fi
 fi
 
+# test if pod2man has --utf8 option
+if pod2man --help | grep -q utf8; then
+    POD2MAN="pod2man --utf8"
+else
+    POD2MAN="pod2man"
+fi
+
 # Use ASLR, no-SEH and DEP if available
 if test "$mingw32" = "yes" ; then
     for flag in --dynamicbase --no-seh --nxcompat; do
@@ -3358,6 +3365,7 @@ echo "LIBS+=$LIBS" >> $config_host_mak
 echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 echo "LIBS_QGA+=$libs_qga" >> $config_host_mak
+echo "POD2MAN=$POD2MAN" >> $config_host_mak
 
 # generate list of library paths for linker script