rrthomas / libpaper

Library and command-line tools for configuring and getting information on paper sizes
GNU Lesser General Public License v2.1
9 stars 11 forks source link

fix x-to-1 invocation #41

Closed spotaws closed 1 year ago

spotaws commented 1 year ago

With 2.0.9, x-to-1 no longer works properly for two reasons:

  1. It depends on perl, via the $PERL var, but this is never set.
  2. It depends on specific # of args passed to x-to-1, and if help2man and its options aren't quote-wrapped, it miscounts and tosses a generic error.

This PR adds basic detection of the perl runtime and assignment to $PERL to configure.ac AND quote-wraps the help2man invocation in man/Makefile.am.

rrthomas commented 1 year ago

Thanks for this. I think I have worked out how the lack of PERL setting got past both past make distcheck on my machine and GitHub CI!

I have applied a different fix, using the recommended code in x-to-1 for Perl detection (unfortunately I can't use the gnulib perl module, because it's GPL; I'll ask if that can be relicensed).

The arguments passed to x-to-1 are correct; in particular, the options to help2man must be distinct arguments from the path to help2man.