curlpp-config.in 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #! /bin/sh
  2. #
  3. # The idea to this kind of setup info script was stolen from numerous
  4. # other packages, such as neon, libxml and gnome.
  5. #
  6. # $Id: curlpp-config.in,v 1.4 2004/10/05 01:48:40 jpbl Exp $
  7. #
  8. prefix=@prefix@
  9. includedir=@includedir@
  10. usage()
  11. {
  12. cat <<EOF
  13. Usage: curlpp-config [OPTION]
  14. Available values for OPTION include:
  15. --cc compiler
  16. --cflags pre-processor and compiler flags
  17. --feature newline separated list of enabled features
  18. --help display this help and exit
  19. --libs library linking information
  20. --prefix curl install prefix
  21. --version output version information
  22. --vernum output the version information as a number (hexadecimal)
  23. EOF
  24. exit $1
  25. }
  26. if test $# -eq 0; then
  27. usage 1
  28. fi
  29. while test $# -gt 0; do
  30. case "$1" in
  31. # this deals with options in the style
  32. # --option=value and extracts the value part
  33. # [not currently used]
  34. -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  35. *) value= ;;
  36. esac
  37. case "$1" in
  38. --cc)
  39. echo @CC@
  40. ;;
  41. --prefix)
  42. echo $prefix
  43. ;;
  44. --feature)
  45. curl-config --feature
  46. ;;
  47. --version)
  48. echo libcurlpp @CURLPP_VERSION@
  49. exit 0
  50. ;;
  51. --vernum)
  52. echo @CURLPP_VERSION_NUM@
  53. exit 0
  54. ;;
  55. --help)
  56. usage 0
  57. ;;
  58. --cflags)
  59. echo -I@includedir@ @CURLPP_CXXFLAGS@ `curl-config --cflags`
  60. ;;
  61. --libs)
  62. echo -L@libdir@ @LDFLAGS@ @LIBS@ `curl-config --libs` -lcurlpp
  63. ;;
  64. --static-libs)
  65. echo @libdir_static@/libcurlpp.@libext@ @LDFLAGS@ @LIBS@ `curl-config --static-libs`
  66. ;;
  67. *)
  68. echo "unknown option: $1"
  69. usage
  70. exit 1
  71. ;;
  72. esac
  73. shift
  74. done
  75. exit 0