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.

36 lines
1.2 KiB

  1. --- a/configure.ac
  2. +++ b/configure.ac
  3. @@ -90,8 +90,24 @@ if test x"$enable_smtp" != xno ; then
  4. )
  5. fi
  6. -AC_MSG_CHECKING(whether to use libesmtp)
  7. +AC_MSG_CHECKING(whether to use libesmtp >= v1.1.x)
  8. if test x"$enable_smtp" != xno ; then
  9. + PKG_CHECK_MODULES(ESMTP, libesmtp-1.0 >= 1.1.0, [
  10. + AC_DEFINE([HAVE_LIBESMTP], [1], [Build with libesmtp email support.])
  11. + AC_SUBST(ESMTP_CFLAGS)
  12. + AC_SUBST(ESMTP_LIBS)
  13. + if test x"`echo $ESMTP_LIBS | grep pthread`" != x ; then
  14. + AC_MSG_WARN([libesmtp is compiled with pthread support. This can conflict with pth. If you observe segmentation faults at startup, try to recompile with libesmtp support disabled])
  15. + AC_DEFINE([HAVE_LIBESMTP_PTHREAD], [1], [libesmtp is compiled with pthread support.])
  16. + fi
  17. + found_esmtp=yes
  18. + ],[
  19. + AC_MSG_RESULT([no])
  20. + ])
  21. +fi
  22. +if test x"$found_esmtp" = x ; then
  23. +AC_MSG_CHECKING(whether to use libesmtp v1.0.x)
  24. +if test x"$enable_smtp" != xno && test x`which libesmtp-config` != x ; then
  25. ESMTP_CFLAGS="`libesmtp-config --cflags`"
  26. ESMTP_LIBS="`libesmtp-config --libs`"
  27. if test x"`libesmtp-config --libs | grep pthread`" != x ; then
  28. @@ -110,6 +126,7 @@ if test x"$enable_smtp" != xno ; then
  29. else
  30. AC_MSG_RESULT([no])
  31. fi
  32. +fi
  33. AM_CONDITIONAL([USE_B64], [test x"$enable_smtp" != xno])