]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Remove the tests for
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Jul 2005 22:20:56 +0000 (22:20 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Jul 2005 22:20:56 +0000 (22:20 +0000)
directories with weird names.  Apparently some people like living
on the edge.  However, improve the test that "pwd" actually does
report a name for the working directory.
* NEWS: Remove the claim that we test for funny chars in dir names.

ChangeLog
NEWS
lib/autoconf/general.m4

index c383755ca81091d28df4aaac3959f12348a5ad93..8b6134097a0f03aea4f7c04bc0817a920a2a5360 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Remove the tests for
+       directories with weird names.  Apparently some people like living
+       on the edge.  However, improve the test that "pwd" actually does
+       report a name for the working directory.
+       * NEWS: Remove the claim that we test for funny chars in dir names.
+
 2005-06-30  Stepan Kasal  <kasal@ucw.cz>
 
        * doc/autoconf.texi (Configuration Headers): Change the explanation
@@ -16,7 +24,7 @@
        Likewise for --header; moreover, recognize --he and --h as shortcuts
        for --help in that case.
 
-2005-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> 
+2005-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Fix also for
        single-quoted -cmdline argument in Portland Group compiler.
diff --git a/NEWS b/NEWS
index e7f66f845f58e00605c4a33eea46481c302f1398..ee4b6ee49f4053cb9e34bbb3789a3a91e5b169da 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,5 @@
 * Major changes in Autoconf 2.59c
 
-** The configure command now diagnoses attempts to use a working or source
-  directory whose name contains a special character like space, newline, or "\".
-  Such names are not supported, and can cause "configure" to crash.
-
 ** The configure command now redirects standard input from /dev/null,
   to help avoid problems with subsidiary commands that might mistakenly
   read standard input.  AS_ORIGINAL_STDIN_FD points to the original
index 7a21bde5a3cb618fefcb3185946eea8eac95e4ac..3f333eaec8f469ca6651b6d938d34e35159048eb 100644 (file)
@@ -450,38 +450,13 @@ AC_DEFUN([AC_CONFIG_SRCDIR],
 m4_define([_AC_INIT_DIRCHECK],
 [m4_divert_push([PARSE_ARGS])dnl
 
-ac_pwd=`pwd` && test -n "$ac_pwd" ||
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
   AC_MSG_ERROR([Working directory cannot be determined])
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  AC_MSG_ERROR([pwd does not report name of working directory])
 
-ac_pat="[[\$][{][_$as_cr_Letters][_$as_cr_alnum]*[}]]"
-ac_pat1='*[)]*'
-
-for ac_var in ac_pwd srcdir
-do
-  # Remove references to shell or make variables.
-  eval ac_dir=\$$ac_var
-  ac_dirx=$ac_dir
-  while :
-  do
-    case $ac_dirx in
-    *\${*}*)
-      ac_dirx=`
-       expr "X$ac_dirx" : "X\\(.*\\)$ac_pat"`X`
-       expr "X$ac_dirx" : "X.*$ac_pat\\(.*\\)"`;;
-    *) break;;
-    esac
-  done
-
-  # Check for newline, tab, space, and other weird possibilities.
-  # Preserve that tab character below!
-  case $ac_dirx in
-  '' | -* | */-* | *'
-'* | *'        '* | *' '* | *\"* | *\#* | *\$* | *\&* | *\'* | *\(* | $ac_pat1 | \
-  *\** | *\;* | *\<* | *\=* | *\>* | *\?* | *\@<:@* | *\\* | *\`* | \
-  *\|* | \~*)
-    AC_MSG_ERROR([$ac_var directory name `$ac_dir' has special characters]);;
-  esac
-done
 m4_divert_pop([PARSE_ARGS])dnl
 ])# _AC_INIT_DIRCHECK
 
@@ -512,7 +487,9 @@ fi
 dnl Remove unnecessary trailing slashes from srcdir.
 dnl Double slashes in file names in object file debugging info
 dnl mess up M-x gdb in Emacs.
-srcdir=`echo "$srcdir" | sed 's%\([[^/]]\)/*$%\1%'`
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
 m4_divert_pop([PARSE_ARGS])dnl
 ])# _AC_INIT_SRCDIR