diff options
author | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2011-01-23 11:22:50 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2011-01-23 11:22:50 +0000 |
commit | dcbc2167d1c02acf6b6bd9b3e584e37003327bda (patch) | |
tree | d3a148d701e062a710213c9f3b151082c0203102 /mcon/U/Oldconfig.U | |
parent | 4d556accb556e664de7fbe285c2420d265d9d056 (diff) |
Recognize MinGW as an OS.
Be smarter when old values not corresponding to our current os are loaded,
and ask whether they should be made the default.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@85 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/Oldconfig.U')
-rw-r--r-- | mcon/U/Oldconfig.U | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/mcon/U/Oldconfig.U b/mcon/U/Oldconfig.U index 58467e3..6feabbe 100644 --- a/mcon/U/Oldconfig.U +++ b/mcon/U/Oldconfig.U @@ -121,6 +121,7 @@ myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` ?X: Save the value we just computed to reset myuname after we get done here. newmyuname="$myuname" +has_uname= $test -f "$uname$_exe" && has_uname=y : Guessing of the OS name -- half the following guesses are probably wrong... @@ -190,7 +191,8 @@ if $test "X$has_uname" != X; then osvers=4 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then osvers=3 - elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then + elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 + then osvers=2 fi fi @@ -234,7 +236,10 @@ if $test "X$has_uname" != X; then osvers=`$uname -r` ;; cygwin*) osname=cygwin - osvers="$3" + osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'` + ;; + mingw*) osname=mingw + osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'` ;; *dc.osx) osname=dcosx osvers="$3" @@ -447,6 +452,9 @@ esac ?X: just computed above so that we can propagate these new values. saved_osname="$osname" saved_osvers="$osvers" +tmp_n="$n" +tmp_c="$c" +tmp_sh="$sh" : Get old answers from config file if it was generated on the same system hint=default @@ -460,14 +468,19 @@ if $test -f ../config.sh; then myuname="$newmyuname" ;; *) echo "Fetching default answers from your old config.sh file..." >&4 - tmp_n="$n" - tmp_c="$c" - tmp_sh="$sh" . ../config.sh cp ../config.sh . - n="$tmp_n" - c="$tmp_c" hint=previous + case "$dflt" in + n) + echo " " + rp="Do you want further invocations to use these defaults?" + . ./myread + case "$ans" in + y*|Y*) myuname="$newmyuname";; + esac + ;; + esac ;; esac fi @@ -476,9 +489,6 @@ fi *) echo " " echo "Fetching default answers from $config_sh..." >&4 - tmp_n="$n" - tmp_c="$c" - tmp_sh="$sh" cd .. ?X: preserve symbolic links, if any cp $config_sh config.sh 2>/dev/null @@ -486,8 +496,6 @@ fi . ./config.sh cd UU cp ../config.sh . - n="$tmp_n" - c="$tmp_c" hint=previous ;; esac @@ -501,9 +509,12 @@ $test "$override" && . ./optdef.sh for file in $loclist $trylist; do eval $file="\$_$file" done -?X: Restore computed OS name / version + +?X: Restore saved variables osname="$saved_osname" osvers="$saved_osvers" +n="$tmp_n" +c="$tmp_c" . ./checkcc ?X: Cross-compiling support |