Building gettext on OpenBSD 6.3, I get this failure: Updating man page gettext.1.in /usr/bin/perl -w -- ../../../gettext-runtime/man/help2man --include=../../../gettext-runtime/man/gettext.x ../src/gettext > gettext.1.in Can't locate Locale/gettext.pm in @INC (you may need to install the Locale::gettext module) (@INC contains: /usr/local/libdata/perl5/site_perl/amd64-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/amd64-openbsd /usr/libdata/perl5 .) at ../../../gettext-runtime/man/help2man line 29. BEGIN failed--compilation aborted at ../../../gettext-runtime/man/help2man line 29. *** Error 1 in gettext-runtime/man (Makefile:1660 'gettext.1.in')
This patch avoids the failure, leading to a message "WARNING: The man page gettext.1.in cannot be updated yet." - and the build continues. 2019-04-13 Bruno Haible <br...@clisp.org> x-to-1: Avoid failure due to missing perl modules. * build-aux/x-to-1.in: Test whether all the perl modules that help2man needs are installed. diff --git a/build-aux/x-to-1.in b/build-aux/x-to-1.in index 1b09d33..b31175f 100644 --- a/build-aux/x-to-1.in +++ b/build-aux/x-to-1.in @@ -41,7 +41,20 @@ aux="$4" output="$5" progname=`basename $aux .x` -case "$PERL" in *"/missing perl") perlok=no;; *) perlok=yes;; esac +# configure determined whether perl exists. +case "$PERL" in + *"/missing perl") + perlok=no + ;; + *) + # Determine whether all the perl modules that help2man needs are installed. + if $PERL $HELP2MAN --help >/dev/null 2>/dev/null; then + perlok=yes + else + perlok=no + fi + ;; +esac if test @CROSS_COMPILING@ = no && test -f $executable && test $perlok = yes; then echo "Updating man page $output" echo "$PERL $HELP2MAN --include=$aux $executable > $output"