libpng-config-body.in 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. usage()
  2. {
  3. cat <<EOF
  4. Usage: libpng-config [OPTION] ...
  5. Known values for OPTION are:
  6. --prefix print libpng prefix
  7. --libdir print path to directory containing library
  8. --libs print library linking information
  9. --ccopts print compiler options
  10. --cppflags print pre-processor flags
  11. --cflags print preprocessor flags, I_opts, and compiler options
  12. --I_opts print "-I" include options
  13. --L_opts print linker "-L" flags for dynamic linking
  14. --R_opts print dynamic linker "-R" or "-rpath" flags
  15. --ldopts print linker options
  16. --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
  17. --static revise subsequent outputs for static linking
  18. --help print this help and exit
  19. --version print version information
  20. EOF
  21. exit $1
  22. }
  23. if test $# -eq 0; then
  24. usage 1
  25. fi
  26. while test $# -gt 0; do
  27. case "$1" in
  28. --prefix)
  29. echo ${prefix}
  30. ;;
  31. --version)
  32. echo ${version}
  33. exit 0
  34. ;;
  35. --help)
  36. usage 0
  37. ;;
  38. --ccopts)
  39. echo ${ccopts}
  40. ;;
  41. --cppflags)
  42. echo ${cppflags}
  43. ;;
  44. --cflags)
  45. echo ${I_opts} ${cppflags} ${ccopts}
  46. ;;
  47. --libdir)
  48. echo ${libdir}
  49. ;;
  50. --libs)
  51. echo ${libs}
  52. ;;
  53. --I_opts)
  54. echo ${I_opts}
  55. ;;
  56. --L_opts)
  57. echo ${L_opts}
  58. ;;
  59. --R_opts)
  60. echo ${R_opts}
  61. ;;
  62. --ldflags)
  63. echo ${ldflags} ${L_opts} ${R_opts} ${libs}
  64. ;;
  65. --static)
  66. R_opts=""
  67. ;;
  68. *)
  69. usage
  70. exit 1
  71. ;;
  72. esac
  73. shift
  74. done
  75. exit 0