a2ps configure warning if pwd contains whitespace

Bryan Paul Inderhees <[email protected]> Wed, 14 Nov 2007 11:23:06 -0500
Newsgroups gmane.comp.printing.a2ps.bugs
Message-ID <[email protected]>
Hello--

I'm building a2ps 4.13b on a Windows (GnuWin32 [1]) system, and also  
repeated this on Mac OS X 10.4.10, both using bash as shell.

When running the configure script in a directory that has a space in  
it, such as under cygwin/GnuWin32:
/cygdrive/c/Program Files/GnuWin32/src/a2ps/4.13b/a2ps-4.13b-src
or Mac OS X:
/Users/bryan/with space/a2ps-4.13

The configure script generates an error when it tries to run the  
"missing" script:
---begin output sample---
$ ./configure
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/Users/bryan/with: /Users/bryan/with: No such file or directory
configure: warning: `missing' script is too old or missing
checking for mawk... no
---end output sample---

I managed to solve the problem by adding escaped quotes to the  
command, and have included a unified diff/patchfile for it.

Admittedly, in playing around with it, it still fails under the  
(admittedly even weirder) situation where someone includes a  
directory that includes a $, such as:
/Users/bryan/$HOME/a2ps-4.13
So the ideal solution would be something that provides the  
appropriate escapes when necessary, but nothing's coming to mind that  
can do that easily.

--Bryan Inderhees
configure.patch (application/octet-stream, 452 B)
--- configure	2007-11-14 10:32:41.000000000 -0500
+++ configure-bryanpi	2007-11-14 10:39:55.000000000 -0500
@@ -758,7 +758,7 @@
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 test x"${MISSING+set}" = xset || \
-  MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing"
+  MISSING="\${SHELL} \"`CDPATH=: && cd $ac_aux_dir && pwd`/missing\""
 if eval "$MISSING --run :"; then
   am_missing_run="$MISSING --run "
 else
smime.p7s (application/pkcs7-signature, 2.4 KB) - not displayed