config.guess 1010 B

123456789101112131415161718192021222324252627282930313233
  1. #! /bin/sh
  2. # Copyright (C) 2004 Free Software Foundation, Inc.
  3. #
  4. # This script is free software; the Free Software Foundation gives
  5. # unlimited permission to copy, distribute and modify it.
  6. # Invoke a shell script with the same name two directories up from this
  7. # file. Robust against all kinds of pathological file and directory
  8. # names, as well as all kinds of pathological shells.
  9. # By Nathanael Nerode, Zack Weinberg, and Alexandre Oliva.
  10. # Insert "../../" just before the last slash in the pathname.
  11. # We use a here-document to avoid problems with "echo" and
  12. # pathnames containing backslashes or a leading dash.
  13. script=`sed 's,[^/]*$,../../&,' << EOF
  14. $0
  15. EOF
  16. `
  17. # Must honor CONFIG_SHELL if set.
  18. # Simple "$@" does the wrong thing for zero arguments with
  19. # OSF/1 4.0 /bin/sh, possibly others.
  20. # ${1+"$@"} does the wrong thing with zsh (== /bin/sh in
  21. # some iterations of Darwin).
  22. case $# in
  23. 0) exec ${CONFIG_SHELL-/bin/sh} "$script" ;;
  24. *) exec ${CONFIG_SHELL-/bin/sh} "$script" "$@" ;;
  25. esac