You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.1 KiB

  1. --- a/hints/linux.sh
  2. +++ b/hints/linux.sh
  3. @@ -221,6 +221,24 @@ case "$libc" in
  4. ;;
  5. esac
  6. +# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries
  7. +# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us
  8. +# where to look. We don't want gcc's own libraries, however, so we
  9. +# filter those out.
  10. +# This could be conditional on Unbuntu, but other distributions may
  11. +# follow suit, and this scheme seems to work even on rather old gcc's.
  12. +# This unconditionally uses gcc because even if the user is using another
  13. +# compiler, we still need to find the math library and friends, and I don't
  14. +# know how other compilers will cope with that situation.
  15. +# Still, as an escape hatch, allow Configure command line overrides to
  16. +# plibpth to bypass this check.
  17. +case "$plibpth" in
  18. +'') plibpth=`gcc -print-search-dirs | grep libraries |
  19. + cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'`
  20. + plibpth="$plibpth" # Collapse all entries on one line
  21. + ;;
  22. +esac
  23. +
  24. # Are we using ELF? Thanks to Kenneth Albanowski <kjahds@kjahds.com>
  25. # for this test.
  26. cat >try.c <<'EOM'