+# use -O2 by default ; -O3 doesn't seem to bring significant benefits with gcc
+'')
+ optimize='-O2'
+ case "$uname_minus_m" in
+ ppc*)
+ # on ppc, it seems that gcc (at least gcc 3.3.2) isn't happy
+ # with -O2 ; so downgrade to -O1.
+ optimize='-O1'
+ ;;
+ ia64*)
+ # This architecture has had various problems with gcc's
+ # in the 3.2, 3.3, and 3.4 releases when optimized to -O2. See
+ # RT #37156 for a discussion of the problem.
+ case "`${cc:-gcc} -v 2>&1`" in
+ *"version 3.2"*|*"version 3.3"*|*"version 3.4"*)
+ ccflags="-fno-delete-null-pointer-checks $ccflags"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries
+# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us
+# where to look. We don't want gcc's own libraries, however, so we
+# filter those out.
+# This could be conditional on Unbuntu, but other distributions may
+# follow suit, and this scheme seems to work even on rather old gcc's.
+# This unconditionally uses gcc because even if the user is using another
+# compiler, we still need to find the math library and friends, and I don't
+# know how other compilers will cope with that situation.
+# Morever, if the user has their own gcc earlier in $PATH than the system gcc,
+# we don't want its libraries. So we try to prefer the system gcc
+# Still, as an escape hatch, allow Configure command line overrides to
+# plibpth to bypass this check.
+if [ -x /usr/bin/gcc ] ; then
+ gcc=/usr/bin/gcc
+else
+ gcc=gcc
+fi
+
+case "$plibpth" in
+'') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
+ cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
+ set X $plibpth # Collapse all entries on one line
+ shift
+ plibpth="$*"
+ ;;
+esac
+
+# libquadmath is sometimes installed as gcc internal library,
+# so contrary to our usual policy of *not* looking at gcc internal
+# directories we now *do* look at them, in case they contain
+# the quadmath library.
+# XXX This may apply to other gcc internal libraries, if such exist.
+# XXX This could be at Configure level, but then the $gcc is messy.
+case "$usequadmath" in
+"$define")
+ for d in `LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries | cut -f2- -d= | tr ':' $trnl | grep 'gcc' | sed -e 's:/$::'`
+ do
+ case `ls $d/*libquadmath*$so* 2>/dev/null` in
+ $d/*libquadmath*$so*) xlibpth="$xlibpth $d" ;;
+ esac
+ done
+ ;;
+esac
+
+case "$libc" in
+'')
+# If you have glibc, then report the version for ./myconfig bug reporting.
+# (Configure doesn't need to know the specific version since it just uses
+# gcc to load the library for all tests.)
+# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
+# are insufficiently precise to distinguish things like
+# libc-2.0.6 and libc-2.0.7.
+ for p in $plibpth
+ do
+ for trylib in libc.so.6 libc.so
+ do
+ if $test -e $p/$trylib; then
+ libc=`ls -l $p/$trylib | awk '{print $NF}'`
+ if $test "X$libc" != X; then
+ break
+ fi
+ fi
+ done
+ if $test "X$libc" != X; then
+ break
+ fi
+ done
+ ;;