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
864 B

  1. dnl Check to find the libsodium headers/libraries
  2. AC_DEFUN([ss_SODIUM],
  3. [
  4. AC_ARG_WITH(sodium,
  5. AS_HELP_STRING([--with-sodium=DIR], [The Sodium crypto library base directory, or:]),
  6. [sodium="$withval"
  7. CFLAGS="$CFLAGS -I$withval/include"
  8. LDFLAGS="$LDFLAGS -L$withval/lib"]
  9. )
  10. AC_ARG_WITH(sodium-include,
  11. AS_HELP_STRING([--with-sodium-include=DIR], [The Sodium crypto library headers directory (without trailing /sodium)]),
  12. [sodium_include="$withval"
  13. CFLAGS="$CFLAGS -I$withval"]
  14. )
  15. AC_ARG_WITH(sodium-lib,
  16. AS_HELP_STRING([--with-sodium-lib=DIR], [The Sodium crypto library library directory]),
  17. [sodium_lib="$withval"
  18. LDFLAGS="$LDFLAGS -L$withval"]
  19. )
  20. AC_CHECK_LIB(sodium, sodium_init,
  21. [LIBS="-lsodium $LIBS"],
  22. [AC_MSG_ERROR([The Sodium crypto library libraries not found.])]
  23. )
  24. ])