Merge "AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)"
[asterisk/asterisk.git] / configure.ac
index 2029917..1bb4bc4 100644 (file)
@@ -49,7 +49,7 @@ AC_SUBST([astvarrundir],      ['${localstatedir}/run/asterisk'])dnl
 
 case "${host_os}" in
      *bsd*)
-     if test ${prefix} = 'NONE'; then
+     if test ${prefix} != 'NONE'; then
         astvarlibdir='${prefix}/share/asterisk'
         astdbdir='${localstatedir}/db/asterisk'
      fi
@@ -1575,12 +1575,15 @@ if test "${USE_ILBC}" != "no"; then
 fi
 
 AST_PKG_CONFIG_CHECK(LIBEDIT, libedit)
-AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])
-
+if test "${PBX_LIBEDIT}" != 1; then
+       # some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
+       AST_EXT_LIB_CHECK([LIBEDIT], [edit], [history_init], [histedit.h], [-ltermcap])
+fi
 if test "${PBX_LIBEDIT}" != 1; then
        AC_MSG_ERROR(*** Please install the 'libedit' development package.)
        exit 1
 fi
+AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])
 
 AST_EXT_LIB_CHECK([ICONV], [iconv], [iconv_open], [iconv.h])
 # GNU libiconv #define's iconv_open to libiconv_open, so we need to search for that symbol
@@ -1977,7 +1980,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}"