[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Spaces in the checks with ac_unique_file break the program
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Spaces in the checks with ac_unique_file break the program |
Date: |
Thu, 23 Jun 2005 23:26:28 +0200 |
On Thu, Jun 23, 2005 at 01:15:36PM -0700, Paul Eggert wrote:
> * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Put name of invalid
> variable into diagnostic. Make the diagnostic an error, not a warning,
> because we really don't support spaces and suchlike in dir names.
(NEWS still says "warns")
I don't now what the limitations actually are on the autoconf side,
but automake-wise I'm quite troubled by this change.
Diagnosing "space in srcdir" as an error sounds sane to me, because
$(srcdir) is used in targets and dependences in Makefiles, and space
is wrong there.
However I can't see what's wrong with spaces in installation
directories. I believe these are not used by Autoconf, and Automake
has test cases to ensure this works, because it has been requested
several times. Think of installation directories such as /Program
Files/. Or user directories such as "/users/john smith/" (seems
common in Mac-infested shops); this user should still be able to
compile a package in /tmp and install it in its homedir.
(FWIW the Automake test case for this is tests/instspc.test, I guess
it will now fail with this change. I haven't tried.)
> --- lib/autoconf/general.m4 22 Jun 2005 09:10:50 -0000 1.866
> +++ lib/autoconf/general.m4 23 Jun 2005 20:03:13 -0000
> @@ -468,13 +468,14 @@ ac_pwd=`pwd` && test -n "$ac_pwd" ||
>
> ac_pat="[[\$][{][_$as_cr_Letters][_$as_cr_alnum]*[}]]"
>
> -for ac_dir in "$ac_pwd" "$srcdir" \
> - "$bindir" "$sbindir" "$libexecdir" "$datarootdir" "$datadir" \
> - "$sysconfdir" "$sharedstatedir" "$localstatedir" "$includedir" \
> - "$oldincludedir" "$docdir" "$infodir" "$htmldir" "$dvidir" "$pdfdir" \
> - "$psdir" "$libdir" "$localedir" "$mandir"
> +for ac_var in ac_pwd srcdir \
> + bindir sbindir libexecdir datarootdir datadir \
> + sysconfdir sharedstatedir localstatedir includedir \
> + oldincludedir docdir infodir htmldir dvidir pdfdir \
> + psdir libdir localedir mandir
> do
> # Remove references to shell or make variables.
> + eval ac_dir=\$$ac_var
> ac_dirx=$ac_dir
> while :
> do
> @@ -494,7 +495,7 @@ do
> '* | *' '* | *' '* | *\"* | *\#* | *\$* | *\&* | *\'* | *\(* | *\)* | \
> *\** | *\;* | *\<* | *\=* | *\>* | *\?* | *\@<:@* | *\\* | *\`* | \
> *\|* | \~*)
> - AC_MSG_WARN([Directory name `$ac_dir' contains special characters]);;
> + AC_MSG_ERROR([$ac_var directory name `$ac_dir' has special characters]);;
> esac
> done