autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patch] Some more DOS compatibility


From: Tim Van Holder
Subject: [Patch] Some more DOS compatibility
Date: Fri, 16 Feb 2001 19:01:40 +0100

[This _might_ overlap some patches I previously sent it.]

* Some more support for DOS paths (i.e. backslashes as dirsep).

* The pathsep test was broken; it ran

PATH="foo"; command
         ^^^
The semicolon negated setting PATH.

* Use as_ln_s in config.status for CONFIG_LINKS.

2001-02-16      Tim Van Holder <address@hidden>

        * acgeneral.m4: More support for DOS paths.  Fix pathsep
        test.  Add missing backslash.  Use $as_ln_s for making links.

Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.694
diff -u -r1.694 acgeneral.m4
--- acgeneral.m4        2001/02/07 15:04:52     1.694
+++ acgeneral.m4        2001/02/16 17:41:09
@@ -706,7 +706,7 @@
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

 # Name of the executable.
-as_me=`echo "$[0]" | sed 's,.*/,,'`
+as_me=`echo "$[0]" | sed 's,.*[[\\/]],,'`

 cat >config.log <<EOF
 This file contains any messages produced by compilers while
@@ -781,7 +785,7 @@
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then its parent.
   ac_prog=$[0]
-  ac_confdir=`echo "$ac_prog" | sed 's%/[[^/][^/]]*$%%'`
+  ac_confdir=`echo "$ac_prog" | sed 's%[[\\/][^\\/][^\\/]]*$%%'`
   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
@@ -799,7 +803,7 @@
 fi
 dnl Double slashes in pathnames in object file debugging info
 dnl mess up M-x gdb in Emacs.
-srcdir=`echo "$srcdir" | sed 's%\([[^/]]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
 m4_divert_pop([PARSE_ARGS])dnl
 ])# _AC_INIT_SRCDIR

@@ -1370,7 +1386,7 @@
 [echo "#! $SHELL" >conftest.sh
 echo  "exit 0"   >>conftest.sh
 chmod +x conftest.sh
-if AC_RUN_LOG([PATH=".;`pwd`"; conftest.sh]); then
+if AC_RUN_LOG([PATH=".;`pwd`" conftest.sh]); then
   ac_path_separator=';'
 else
   ac_path_separator=:
@@ -1442,8 +1458,8 @@
   test "$ac_signal" != 0 &&
     echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
   echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
-  rm -rf conftest* confdefs* core core.* *.core $ac_clean_files &&
-    exit $exit_status
+  rm -rf conftest* confdefs* core core.* *.core $ac_clean_files && \
+     exit $exit_status
      ' 0
 for ac_signal in 1 2 13 15; do
   trap 'ac_status=$?; ac_signal='$ac_signal'; AS_EXIT([$ac_status])'
$ac_signal
@@ -3661,7 +3685,9 @@
 $CONFIG_STATUS generated by $as_me (Autoconf AC_ACVERSION).
 Configured on host $ac_hostname by
   `echo "[$]0 $ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
-srcdir=$srcdir
+
+dnl Add the quotes to protect paths with spaces/backslashes/etc
+srcdir='$srcdir'
 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
 [dnl Leave those double quotes here: this $INSTALL is evaluated in a
 dnl here document, which might result in `INSTALL=/bin/install -c'.
@@ -4321,8 +4409,7 @@
   esac

   # Make a symlink if possible; otherwise try a hard link.
-  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-    ln $srcdir/$ac_source $ac_dest ||
+  $ac_ln_s $ac_rel_source $ac_dest 2>/dev/null ||
     AC_MSG_ERROR([cannot link $ac_dest to $srcdir/$ac_source])
 m4_ifset([AC_LIST_LINKS_COMMANDS],
 [  # Run the commands associated with the file.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]