You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
828 B

7 years ago
  1. dnl Check to find the libcares headers/libraries
  2. AC_DEFUN([ss_CARES],
  3. [
  4. AC_ARG_WITH(cares,
  5. AS_HELP_STRING([--with-cares=DIR], [The c-ares library base directory, or:]),
  6. [cares="$withval"
  7. CFLAGS="$CFLAGS -I$withval/include"
  8. LDFLAGS="$LDFLAGS -L$withval/lib"]
  9. )
  10. AC_ARG_WITH(cares-include,
  11. AS_HELP_STRING([--with-cares-include=DIR], [The c-ares library headers directory (without trailing /cares)]),
  12. [cares_include="$withval"
  13. CFLAGS="$CFLAGS -I$withval"]
  14. )
  15. AC_ARG_WITH(cares-lib,
  16. AS_HELP_STRING([--with-cares-lib=DIR], [The c-ares library library directory]),
  17. [cares_lib="$withval"
  18. LDFLAGS="$LDFLAGS -L$withval"]
  19. )
  20. AC_CHECK_LIB(cares, ares_library_init,
  21. [LIBS="-lcares $LIBS"],
  22. [AC_MSG_ERROR([The c-ares library libraries not found.])]
  23. )
  24. ])