README.ares 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. $Id$
  2. _ _ ____ _
  3. ___| | | | _ \| |
  4. / __| | | | |_) | |
  5. | (__| |_| | _ <| |___
  6. \___|\___/|_| \_\_____|
  7. How To Build libcurl to Use c-ares For Asynch Name Resolves
  8. ===========================================================
  9. c-ares:
  10. http://daniel.haxx.se/projects/c-ares/
  11. NOTE
  12. The latest libcurl version requires c-ares 1.4.0 or later.
  13. Once upon the time libcurl built fine with the "original" ares. That is no
  14. longer true. You need to use c-ares.
  15. Build c-ares
  16. ============
  17. 1. unpack the c-ares archive
  18. 2. cd c-ares-dir
  19. 3. ./configure
  20. 4. make
  21. Build libcurl to use c-ares in the curl source tree
  22. ===================================================
  23. 1. name the c-ares source directory 'ares' in the curl source directory
  24. (if you have checked out the curl sources from CVS, you will already have
  25. c-ares in a directory named ares).
  26. 2. ./configure --enable-ares
  27. 3. make
  28. Build libcurl to use an installed c-ares
  29. ========================================
  30. 1. ./configure --enable-ares=/path/to/ares/install
  31. 2. make
  32. c-ares and ipv6
  33. ===============
  34. If the configure script enables IPv6 support you need to explicitly disable
  35. that (--disable-ipv6) since c-ares isn't IPv6 compatible (yet).
  36. c-ares on win32
  37. ===============
  38. (description brought by Dominick Meglio)
  39. First I compiled c-ares. I changed the default C runtime library to be the
  40. single-threaded rather than the multi-threaded (this seems to be required to
  41. prevent linking errors later on). Then I simply build the areslib project (the
  42. other projects adig/ahost seem to fail under MSVC).
  43. Next was libcurl. I opened lib/config-win32.h and I added a:
  44. #define USE_ARES 1
  45. Next thing I did was I added the path for the ares includes to the include
  46. path, and the libares.lib to the libraries.
  47. Lastly, I also changed libcurl to be single-threaded rather than
  48. multi-threaded, again this was to prevent some duplicate symbol errors. I'm
  49. not sure why I needed to change everything to single-threaded, but when I
  50. didn't I got redefinition errors for several CRT functions (malloc, stricmp,
  51. etc.)
  52. I would have modified the MSVC++ project files, but I only have VC.NET and it
  53. uses a different format than VC6.0 so I didn't want to go and change
  54. everything and remove VC6.0 support from libcurl.