$NetBSD: patch-aa,v 1.16 2013/08/16 02:04:25 obache Exp $

--- configure.orig	2013-02-14 20:01:52.000000000 +0000
+++ configure
@@ -15413,7 +15413,7 @@ if ${ac_cv_lib_esmtp_smtp_start_session+
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lesmtp -lpthread $LIBS"
+LIBS="-lesmtp ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -15455,7 +15455,7 @@ if ${ac_cv_lib_esmtp_smtp_option_require
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lesmtp -lpthread $LIBS"
+LIBS="-lesmtp ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -15502,7 +15502,7 @@ if ${ac_cv_lib_esmtp_smtp_starttls_set_p
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lesmtp -lpthread $LIBS"
+LIBS="-lesmtp ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */