libftdi-config.in 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/sh
  2. prefix=@prefix@
  3. exec_prefix=@exec_prefix@
  4. exec_prefix_set=no
  5. usage()
  6. {
  7. cat <<EOF
  8. Usage: libftdi-config [OPTIONS] [LIBRARIES]
  9. Options:
  10. [--prefix[=DIR]]
  11. [--exec-prefix[=DIR]]
  12. [--version]
  13. [--libs]
  14. [--cflags]
  15. EOF
  16. exit $1
  17. }
  18. if test $# -eq 0; then
  19. usage 1 1>&2
  20. fi
  21. while test $# -gt 0; do
  22. case "$1" in
  23. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  24. *) optarg= ;;
  25. esac
  26. case $1 in
  27. --prefix=*)
  28. prefix=$optarg
  29. if test $exec_prefix_set = no ; then
  30. exec_prefix=$optarg
  31. fi
  32. ;;
  33. --prefix)
  34. echo_prefix=yes
  35. ;;
  36. --exec-prefix=*)
  37. exec_prefix=$optarg
  38. exec_prefix_set=yes
  39. ;;
  40. --exec-prefix)
  41. echo_exec_prefix=yes
  42. ;;
  43. --version)
  44. echo @VERSION@
  45. exit 0
  46. ;;
  47. --cflags)
  48. if test "@includedir@" != /usr/include ; then
  49. includes="-I@includedir@"
  50. fi
  51. echo_cflags=yes
  52. ;;
  53. --libs)
  54. echo_libs=yes
  55. ;;
  56. *)
  57. usage 1 1>&2
  58. ;;
  59. esac
  60. shift
  61. done
  62. if test "$echo_prefix" = "yes"; then
  63. echo $prefix
  64. fi
  65. if test "$echo_exec_prefix" = "yes"; then
  66. echo $exec_prefix
  67. fi
  68. if test "$echo_cflags" = "yes"; then
  69. echo $includes
  70. fi
  71. if test "$echo_libs" = "yes"; then
  72. echo -L@libdir@ -lftdi @LIBS@
  73. fi