$OpenBSD: patch-configure_ac,v 1.36 2014/05/31 00:35:31 sthen Exp $

c-client requires both kerbV libs *and* (separately) libssl.

--- configure.ac.orig	Tue May 13 00:48:13 2014
+++ configure.ac	Thu May 29 21:32:09 2014
@@ -60,7 +60,7 @@ AC_SUBST([astvarrundir],      ['${localstatedir}/run/a
 
 case "${host_os}" in
      *bsd*)
-     if test ${prefix} = 'NONE'; then
+     if test ${prefix} != 'NONE'; then
         astvarlibdir='${prefix}/share/asterisk'
         astdbdir='${localstatedir}/db/asterisk'
      fi
@@ -1747,7 +1747,7 @@ if test "${USE_IMAP_TK}" != "no"; then
 			)
 		else #looking in imap directory didn't work, try c-client
 			imap_ldflags=""
-			imap_libs="-lc-client"
+			imap_libs="-lcrypto -lssl -lc-client"
 			imap_include="-DUSE_SYSTEM_CCLIENT"
 			CPPFLAGS="${saved_cppflags}"
 			LIBS="${saved_libs}"
@@ -1933,7 +1933,7 @@ AST_EXT_TOOL_CHECK([NETSNMP], [net-snmp-config], , [--
 
 AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
 
-AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
+AST_EXT_LIB_CHECK([UNIXODBC], [iodbc], [SQLConnect], [sql.h], [-lpthread])
 
 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
 
