README.ares 2.4 KB

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