curl-config.in 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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: curl-config.in,v 1.18 2003/12/08 10:00:21 bagder Exp $
  7. #
  8. prefix=@prefix@
  9. exec_prefix=@exec_prefix@
  10. includedir=@includedir@
  11. usage()
  12. {
  13. cat <<EOF
  14. Usage: curl-config [OPTION]
  15. Available values for OPTION include:
  16. --ca ca bundle install path
  17. --cc compiler
  18. --cflags pre-processor and compiler flags
  19. --feature newline separated list of enabled features
  20. --help display this help and exit
  21. --libs library linking information
  22. --prefix curl install prefix
  23. --version output version information
  24. --vernum output the version information as a number (hexadecimal)
  25. EOF
  26. exit $1
  27. }
  28. if test $# -eq 0; then
  29. usage 1
  30. fi
  31. while test $# -gt 0; do
  32. case "$1" in
  33. # this deals with options in the style
  34. # --option=value and extracts the value part
  35. # [not currently used]
  36. -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  37. *) value= ;;
  38. esac
  39. case "$1" in
  40. --ca)
  41. echo @CURL_CA_BUNDLE@
  42. ;;
  43. --cc)
  44. echo @CC@
  45. ;;
  46. --prefix)
  47. echo $prefix
  48. ;;
  49. --feature)
  50. if test "@OPENSSL_ENABLED@" = "1"; then
  51. echo "SSL"
  52. fi
  53. if test "@KRB4_ENABLED@" = "1"; then
  54. echo "KRB4"
  55. fi
  56. if test "@IPV6_ENABLED@" = "1"; then
  57. echo "IPv6"
  58. fi
  59. if test "@HAVE_LIBZ@" = "1"; then
  60. echo "libz"
  61. fi
  62. if test "@CURL_DISABLE_HTTP@" = "1"; then
  63. echo "HTTP-disabled"
  64. fi
  65. if test "@CURL_DISABLE_FTP@" = "1"; then
  66. echo "FTP-disabled"
  67. fi
  68. if test "@CURL_DISABLE_GOPHER@" = "1"; then
  69. echo "GOPHER-disabled"
  70. fi
  71. if test "@CURL_DISABLE_FILE@" = "1"; then
  72. echo "FILE-disabled"
  73. fi
  74. if test "@CURL_DISABLE_TELNET@" = "1"; then
  75. echo "TELNET-disabled"
  76. fi
  77. if test "@CURL_DISABLE_LDAP@" = "1"; then
  78. echo "LDAP-disabled"
  79. fi
  80. if test "@CURL_DISABLE_DICT@" = "1"; then
  81. echo "DICT-disabled"
  82. fi
  83. if test "@HAVE_ARES@" = "1"; then
  84. echo "AsynchDNS"
  85. fi
  86. ;;
  87. --version)
  88. echo libcurl @VERSION@
  89. exit 0
  90. ;;
  91. --vernum)
  92. echo @VERSIONNUM@
  93. exit 0
  94. ;;
  95. --help)
  96. usage 0
  97. ;;
  98. --cflags)
  99. if test "X@includedir@" = "X/usr/include"; then
  100. echo ""
  101. else
  102. echo "-I@includedir@"
  103. fi
  104. ;;
  105. --libs)
  106. echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@
  107. ;;
  108. *)
  109. echo "unknown option: $1"
  110. usage
  111. exit 1
  112. ;;
  113. esac
  114. shift
  115. done
  116. exit 0