Re: Mangled argument vector choking on spaces?

2015-01-05 Thread Fotis Georgatos
Hi David, (this is a belated reply :) On Jan 1, 2015, at 11:57 PM, autoconf-requ...@gnu.org autoconf-requ...@gnu.org wrote: Basically, ` ` becomes `_space_` and so on, for many more potentially tricky characters. The aim was to have freedom in relation to packages/filenames. It seems to

Re: Mangled argument vector choking on spaces?

2015-01-05 Thread David A. Wheeler
On Sat, 03 Jan 2015 15:37:14 -0800, Paul Eggert egg...@cs.ucla.edu wrote: David A. Wheeler wrote: E.g. when using AC_CHECK_PROG to search for sbcl, the generated makefile would say: SBCL = sbcl That's easy to do without changing Autoconf. Put this in configure.ac:

Re: Mangled argument vector choking on spaces?

2015-01-05 Thread Kip Warner
On Mon, 2015-01-05 at 17:17 -0500, David A. Wheeler wrote: It'd still be good to have a solution for spaces-in-directories. I think the best way I can think of is via an M4 implemented API to provide all path related functions for both creating and modifying as well as rendering out into an

Re: Mangled argument vector choking on spaces?

2015-01-03 Thread David A. Wheeler
While paths with spaces in them may be a fact of reality, they are non-portable according to POSIX. It is going to be an uphill battle if you want to submit patches to make autoconf automatically handle file names with spaces, as there is nothing portable about them. POSIX does not forbid the

Re: Mangled argument vector choking on spaces?

2015-01-03 Thread David A. Wheeler
While paths with spaces in them may be a fact of reality, they are non-portable according to POSIX. It is going to be an uphill battle if you want to submit patches to make autoconf automatically handle file names with spaces, as there is nothing portable about them. I just thought of an

Re: Mangled argument vector choking on spaces?

2015-01-03 Thread Bob Friesenhahn
On Sat, 3 Jan 2015, David A. Wheeler wrote: I just thought of an alternative. What if program searching did NOT insert the directory path in front? At least if the path includes a space and the directory is part of the PATH? Seems to me that AC_CHECK_PROG could be modified to allow

Re: Mangled argument vector choking on spaces?

2015-01-03 Thread Paul Eggert
David A. Wheeler wrote: E.g. when using AC_CHECK_PROG to search for sbcl, the generated makefile would say: SBCL = sbcl That's easy to do without changing Autoconf. Put this in configure.ac: AC_CHECK_PROG([SBCL], [sbcl], [sbcl], [false]) and this in Makefile: SBCL = @SBCL@ Unfortunately,

Re: Mangled argument vector choking on spaces?

2015-01-02 Thread Kip Warner
On Fri, 2015-01-02 at 16:06 -0700, Eric Blake wrote: While paths with spaces in them may be a fact of reality, they are non-portable according to POSIX. It is going to be an uphill battle if you want to submit patches to make autoconf automatically handle file names with spaces, as there is

Re: Mangled argument vector choking on spaces?

2015-01-02 Thread Eric Blake
On 01/01/2015 02:57 PM, Kip Warner wrote: On Wed, 2014-12-31 at 12:02 -0500, David A. Wheeler wrote: They can do workarounds with symlinks, etc., to try to *hide* the reality, but since autoconf is supposed to do things *automatically*, that means that autoconf fails to do the one job it's

Re: Mangled argument vector choking on spaces?

2015-01-02 Thread Bob Friesenhahn
On Fri, 2 Jan 2015, Eric Blake wrote: While paths with spaces in them may be a fact of reality, they are non-portable according to POSIX. It is going to be an uphill battle if you want to submit patches to make autoconf automatically handle file names with spaces, as there is nothing portable

Re: Mangled argument vector choking on spaces?

2015-01-01 Thread David A. Wheeler
Fotis Georgatos fo...@mail.cern.ch: As regards $subject, this so-called STRING_ENCODING_CHARMAP may be relevant: https://github.com/hpcugent/easybuild-framework/blob/master/easybuild/tools/filetools.py#L59 Look around line L1000 for the rational of that design and some pointers. Basically, ` `

Re: Mangled argument vector choking on spaces?

2015-01-01 Thread Kip Warner
On Wed, 2014-12-31 at 12:02 -0500, David A. Wheeler wrote: They can do workarounds with symlinks, etc., to try to *hide* the reality, but since autoconf is supposed to do things *automatically*, that means that autoconf fails to do the one job it's supposed to do: automatic configuration.

Re: Mangled argument vector choking on spaces?

2014-12-31 Thread David A. Wheeler
I wrote: SBCL =/cygdrive/c/Program Files/Steel Bank Common Lisp/1.2.6/sbcl On Tue, 30 Dec 2014 23:38:20 -0800, Paul Eggert egg...@cs.ucla.edu replied: That wouldn't work for commands that do stuff like this: $(MAKE) SBCL=$(SBCL) Sure, but this minor variation WOULD work in a makefile,

Re: Mangled argument vector choking on spaces?

2014-12-31 Thread Fotis Georgatos
Hello * and a happy new year, As regards $subject, this so-called STRING_ENCODING_CHARMAP may be relevant: https://github.com/hpcugent/easybuild-framework/blob/master/easybuild/tools/filetools.py#L59 Look around line L1000 for the rational of that design and some pointers. Basically, ` `

Re: Mangled argument vector choking on spaces?

2014-12-31 Thread Paul Eggert
David A. Wheeler wrote: Sure, but this minor variation WOULD work in a makefile, and it's an easy fix: $(MAKE) SBCL='$(SBCL)' That won't work if SBCL contains single quotes, another common practice. The best place to start fixing it would be with GNU Make... But that only works with GNU

Re: Mangled argument vector choking on spaces?

2014-12-31 Thread David A. Wheeler
David A. Wheeler wrote: Sure, but this minor variation WOULD work in a makefile, and it's an easy fix: $(MAKE) SBCL='$(SBCL)' On Wed, 31 Dec 2014 11:31:58 -0800, Paul Eggert egg...@cs.ucla.edu wrote: That won't work if SBCL contains single quotes, another common practice. That's pretty

Re: Mangled argument vector choking on spaces?

2014-12-31 Thread Bob Friesenhahn
On Wed, 31 Dec 2014, David A. Wheeler wrote: How about fixing Autoconf to create a symlink from /tmp to srcdir if srcdir contains a space, and using the symlink instead? That should work too. Please feel free to propose a patch along those lines. That is irrelevant for my use case, if I

Re: Mangled argument vector choking on spaces?

2014-12-31 Thread Paul Eggert
David A. Wheeler wrote: David A. Wheeler wrote: That won't work if SBCL contains single quotes, another common practice. That's pretty rare in my experience. Shrug. I do it all the time. I prefer single-quotes, anyway, as they're safer for shell quoting. I know there was some

Re: Mangled argument vector choking on spaces?

2014-12-31 Thread David A. Wheeler
Paul Eggert: Sure. So create a symlink to that, e.g., ln -s '/cygdrive/c/Program Files/Steel Bank Common Lisp/1.2.6/sbc' /tmp/xyz Then configure with the equivalent of SBCL=/tmp/xyz. Obviously the idea needs some elaboration (e.g., if the file name is needed at runtime) but it would work.

Re: Mangled argument vector choking on spaces?

2014-12-30 Thread Bob Friesenhahn
On Mon, 29 Dec 2014, Kip Warner wrote: Unfortunately I need spaces on GNU systems and possibly elsewhere. I'm sure there is a way to do this and it's simply a matter of coalescing parts of the argument vector. From what I can see configure has the correct arguments, but some were accidentally

Re: Mangled argument vector choking on spaces?

2014-12-30 Thread Kip Warner
On Tue, 2014-12-30 at 08:53 -0600, Bob Friesenhahn wrote: On Mon, 29 Dec 2014, Kip Warner wrote: Unfortunately I need spaces on GNU systems and possibly elsewhere. I'm sure there is a way to do this and it's simply a matter of coalescing parts of the argument vector. From what I can see

Re: Mangled argument vector choking on spaces?

2014-12-30 Thread David A. Wheeler
On Mon, 29 Dec 2014 16:27:51 -0800, Kip Warner said: My configure.ac updates CXXFLAGS periodically during execution, such as via pkg-config. Some of the include paths returned from pkg-config's --cflags contain spaces which I require. ... Bob Friesenhahn said: The solution is to assure that

Re: Mangled argument vector choking on spaces?

2014-12-30 Thread Bob Friesenhahn
On Tue, 30 Dec 2014, David A. Wheeler wrote: This is a slightly tricky problem; comments welcome. It'd be nice to see a simple and relatively clean solution to the problem. I think use double-quotes when pathnames contain spaces is a plausible answer. The POSIX-style shell tosses the

Re: Mangled argument vector choking on spaces?

2014-12-30 Thread Paul Eggert
David A. Wheeler wrote: The idea would be that generated Makefiles (for example) could look like this: SBCL =/cygdrive/c/Program Files/Steel Bank Common Lisp/1.2.6/sbcl EGREP = /usr/bin/grep -E That wouldn't work for commands that do stuff like this: $(MAKE) SBCL=$(SBCL) which is a common

Mangled argument vector choking on spaces?

2014-12-29 Thread Kip Warner
Hey list, My configure.ac updates CXXFLAGS periodically during execution, such as via pkg-config. Some of the include paths returned from pkg-config's --cflags contain spaces which I require. It's paths are properly escaped, so this is not a problem thus far. $ pkg-config --cflags libfoo

Re: Mangled argument vector choking on spaces?

2014-12-29 Thread Kip Warner
On Mon, 2014-12-29 at 18:31 -0600, Bob Friesenhahn wrote: The solution is to assure that all paths used do not include spaces. If you use Cygwin or MSYS where paths with spaces often occur, then fix the paths via mounts (/etc/fstab). On Unix type systems, symbolic links should work but

Re: Mangled argument vector choking on spaces?

2014-12-29 Thread Bob Friesenhahn
On Mon, 29 Dec 2014, Kip Warner wrote: If I run what appears to be what configure executed (g++ ...), it executes fine. However, by the looks of it, the argument vector was broken up unintentionally. I'm assuming I am not doing something correctly. Any help appreciated. The solution is to