lapack95-config 757 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. lapack95_version=@VERSION@
  3. lapack95_libs="-llapack -lblas -llapack95"
  4. lapack95_fflags="-I/usr/include/lapack95"
  5. usage()
  6. {
  7. cat <<EOF
  8. Usage: lapack95-config [OPTIONS]
  9. Options:
  10. [--version]
  11. [--libs]
  12. [--fflags]
  13. EOF
  14. exit $1
  15. }
  16. if [ $# -eq 0 ] ; then
  17. usage 1 1>&2
  18. fi
  19. while [ $# -gt 0 ] ; do
  20. case "$1" in
  21. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  22. *) optarg= ;;
  23. esac
  24. case $1 in
  25. --version)
  26. echo $lapack95_version
  27. ;;
  28. --fflags)
  29. echo_fflags=yes
  30. ;;
  31. --libs)
  32. echo_libs=yes
  33. ;;
  34. *)
  35. usage 1 1>&2
  36. ;;
  37. esac
  38. shift
  39. done
  40. if [ "$echo_fflags" = "yes" ] ; then
  41. echo $lapack95_fflags
  42. fi
  43. if [ "$echo_libs" = "yes" ] ; then
  44. echo $lapack95_libs
  45. fi
  46. exit 0