This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: fix DOS absolute path handling in configure


It catches a few more places where previously only UNIX
absolute paths were supported.

2000-12-30  Laurynas Biveinis  <lauras@softhome.net>

	* configure: handle DOS-style absolute paths.

Index: configure
===================================================================
RCS file: /cvs/gcc/egcs/configure,v
retrieving revision 1.32
diff -u -r1.32 configure
--- configure	2000/11/13 13:39:33	1.32
+++ configure	2000/12/30 18:23:29
@@ -155,7 +155,7 @@
 if [ -n "$PWD" ]; then PWD=`pwd`; fi
 
 case "${progname}" in
-/*) ;;
+/* | [A-Za-z]:[\\/]* ) ;;
 */*) ;;
 *)
         PATH=$PATH:${PWD=`pwd`} ; export PATH
@@ -1096,7 +1096,7 @@
     case "${srcdir}" in
         ".")  # no -srcdir option.  We're building in place.
                 makesrcdir=. ;;
-        /*) # absolute path
+        /* | [A-Za-z]:[\\/]* ) # absolute path
                 makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
                 ;;
         *) # otherwise relative
@@ -1322,19 +1322,19 @@
 
             case "${package_makefile_frag}" in
               "") ;;
-              /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
+              /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
               *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
             esac
 
             case "${target_makefile_frag}" in
               "") ;;
-              /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
+              /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
               *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
             esac
 
             case "${host_makefile_frag}" in
               "") ;;
-              /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
+              /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
               *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
             esac
 
@@ -1545,14 +1545,10 @@
 ### figure out what to do with srcdir
                         case "${srcdir}" in
                         ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
-                        /*) # absolute path
+                        /* | [A-Za-z]:[\\/]* ) # absolute path
                                 newsrcdir=${srcdir}/${cfg_dir}
                                 srcdiroption="--srcdir=${newsrcdir}"
                                 ;;
-                        ?:*) # absolute path on win32
-                                newsrcdir=${srcdir}/${cfg_dir}
-                                srcdiroption="--srcdir=${newsrcdir}"
-                                ;;
                         *) # otherwise relative
                                 newsrcdir=../${srcdir}/${cfg_dir}
                                 srcdiroption="--srcdir=${newsrcdir}"
@@ -1562,11 +1558,8 @@
 			# Handle --cache-file=../XXX
 			case "${cache_file}" in
 			"") # empty
-				;;
-			/*) # absolute path
-				cache_file_option="--cache-file=${cache_file}"
 				;;
-			?:*) # absolute path on win32
+			/* | [A-Za-z]:[\\/]* ) # absolute path
 				cache_file_option="--cache-file=${cache_file}"
 				;;
 			*) # relative path
@@ -1579,9 +1572,8 @@
                                 recprog=${newsrcdir}/configure
                         elif [ -f ${newsrcdir}/configure.in ] ; then
                                 case "${progname}" in
-                                /*)     recprog=${progname} ;;
-                                ?:*)    recprog=${progname} ;;
-                                *)      recprog=../${progname} ;;
+                                /* | [A-Za-z]:[\\/]* )  recprog=${progname} ;;
+                                *)                      recprog=../${progname} ;;
                                 esac
 			else
 				eval echo No configuration information in ${cfg_dir} ${redirect}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]