summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure33
1 files changed, 24 insertions, 9 deletions
diff --git a/configure b/configure
index 4738c840..0b545d8f 100755
--- a/configure
+++ b/configure
@@ -1106,23 +1106,38 @@ if ! [ $diag_flags_given ] ; then
done
fi
-printf "Checking compiler version for various workarounds ... "
+printf "Checking gcc version for various workarounds ... "
output=$($make conftest.ccver)
set -- $output
if [ "$1" = "gcc" ] ; then
- gcc_version=$3
- save_ifs=$IFS ; IFS=. ; set -- $gcc_version ; IFS=$save_ifs
- if [ $1 -lt 4 ] || [ $1 -eq 4 -a $2 -le 3 ] ; then
- broken128=y
- fi
- [ $1 -lt 5 ] && do_nopie=
+ shift;
+
+ while [ $# -gt 0 ] ; do
+ case $1 in
+ [0-9].[0-9].[0-9] | [0-9].[0-9].[1-9][0-9] | \
+ [0-9].[1-9][0-9].[0-9] | [0-9].[1-9][0-9].[1-9][0-9] | \
+ [1-9][0-9].[0-9].[0-9] | [1-9][0-9].[0-9].[1-9][0-9] | \
+ [1-9][0-9].[1-9][0-9].[0-9] | [1-9][0-9].[1-9][0-9].[1-9][0-9] )
+ gcc_version=$1
+ save_ifs=$IFS ; IFS=. ; set -- $gcc_version ; IFS=$save_ifs
+ printf "(%s)\n" "$*"
+ if [ $1 -lt 4 ] || [ $1 -eq 4 -a $2 -le 3 ] ; then
+ broken128=y
+ fi
+ [ $1 -lt 5 ] && do_nopie=
+ break
+ ;;
+ esac
+ shift
+ done
elif [ "$1" = "clang" -o "$2" = "clang" ] ; then
+ printf "(clang)\n"
do_nopie=
+else
+ printf "(unrecognized)\n"
fi
-printf "done\n"
-
printf "Checking whether executables require an .exe suffix ... "
if ls conftest.exe > /dev/null 2>&1 ; then