blob: 8b704cb1c3c1a5c4a0303836df0fdb847e648285 [file] [log] [blame]
Emeric Vigier2f625822012-08-06 11:09:52 -04001dnl Copyright (C) 2001-2005 Open Source Telecom Corporation.
2dnl Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
3dnl
4dnl This program is free software; you can redistribute it and/or modify
5dnl it under the terms of the GNU General Public License as published by
6dnl the Free Software Foundation; either version 2 of the License, or
7dnl (at your option) any later version.
8dnl
9dnl This program is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12dnl GNU General Public License for more details.
13dnl
14dnl You should have received a copy of the GNU General Public License
15dnl along with this program; if not, write to the Free Software
16dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17dnl
18dnl As a special exception to the GNU General Public License, if you
19dnl distribute this file as part of a program that contains a configuration
20dnl script generated by Autoconf, you may include it under the same
21dnl distribution terms that you use for the rest of that program.
22
23AC_DEFUN([OST_LIB_NOSSL],[
24 SSL_LIBS=""
25 AC_SUBST(SSL_LIBS)
26])
27
28AC_DEFUN([OST_LIB_SSL],[
29 SSL_LIBS=""
30#
31# WE CANNOT YET USE GNUTLS BECAUSE GNUTLS OPENSSL EMULATION DOES
32# NOT SUPPORT THREAD SAFETY, SO ssl.cpp MUST BE REWRITTEN TO USE
33# NATIVE GNUTLS API.
34#
35# AC_CHECK_HEADER(gnutls/gnutls.h,[
36# AC_CHECK_LIB(gnutls, gnutls_init, [
37# SSL_LIBS="-lgnutls -lgcrypt -ltasn1"
38# ost_cv_ssl=true
39# AC_DEFINE(CCXX_SSL, [GNUTLS], [defines ssl])
40# AC_DEFINE(CCXX_GNUTLS, [1], [define gnutls])
41# ])
42# ],[
43 AC_CHECK_HEADER(openssl/ssl.h,[
44 SSL_LIBS="-lssl"
45 ost_cv_ssl=true
46 AC_DEFINE(CCXX_OPENSSL, [1], [define openssl])
47 AC_DEFINE(CCXX_SSL, [OPENSSL], [defines ssl])
48 ])
49# ])
50 AC_SUBST(SSL_LIBS)
51])
52
53