diff options
-rwxr-xr-x | tools/configure | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/configure b/tools/configure index eb426ec0d0..585eadd357 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -4694,17 +4694,20 @@ if [ -z "$gccver" ]; then | |||
4694 | echo "[WARNING] checks we want now." | 4694 | echo "[WARNING] checks we want now." |
4695 | else | 4695 | else |
4696 | 4696 | ||
4697 | # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't | 4697 | # convert gcc version to a number (major*100 + minor). |
4698 | # DEPEND on it | 4698 | # Newer compilers may only return the major number, so we neen to fetch the |
4699 | 4699 | # version using -dumpfullversion. MinGW compilers may return names like | |
4700 | num1=`echo $gccver | cut -d . -f1` | 4700 | # "7.3-win32", so me must strip off the last part. |
4701 | num2=`echo $gccver | cut -d . -f2` | 4701 | gccver2=`$CC -dumpfullversion -dumpversion | cut -d "-" -f1`; |
4702 | num1=`echo $gccver2 | cut -d . -f1` | ||
4703 | num2=`echo $gccver2 | cut -d . -f2` | ||
4702 | gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null` | 4704 | gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null` |
4703 | 4705 | ||
4704 | # This makes: | 4706 | # This makes: |
4705 | # 3.3.X => 303 | 4707 | # 3.3.X => 303 |
4706 | # 3.4.X => 304 | 4708 | # 3.4.X => 304 |
4707 | # 2.95.3 => 295 | 4709 | # 2.95.3 => 295 |
4710 | # 7.3-win32 => 703 | ||
4708 | 4711 | ||
4709 | echo "Using $CC $gccver ($gccnum)" | 4712 | echo "Using $CC $gccver ($gccnum)" |
4710 | 4713 | ||