From: Felix Morgner Date: Wed, 23 Apr 2014 13:31:08 +0000 (+0200) Subject: Preparation for GnuTLS backend X-Git-Url: http://git.code-monkey.de/?p=umurmur.git;a=commitdiff_plain;h=599f90122371e8f776936996521073a7a84b1381 Preparation for GnuTLS backend I added the necessary lines to the autotools files. Maybe someone else should look into this as it seems to me like its currently more of a dirty hack. I works though. --- diff --git a/configure.ac b/configure.ac index ff2ddd5..3fb9757 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,7 @@ AC_PREREQ([2.63]) AC_INIT([umurmur], [0.2.14], [http://code.google.com/p/umurmur/issues/entry], [umurmur], [http://code.google.com/p/umurmur]) AC_CONFIG_SRCDIR([src/client.h]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([src/config.h]) AM_INIT_AUTOMAKE AC_CANONICAL_HOST @@ -86,6 +86,9 @@ AS_IF([test "x$with_ssl" = xopenssl], [ AC_CHECK_LIB([ssl], [SSL_library_init], [], [AC_MSG_ERROR([could not find libssl])]) ]) +AM_CONDITIONAL(USE_OPENSSL, test x$with_ssl = xopenssl) +AM_CONDITIONAL(USE_GNUTLS, test x$with_ssl = xgnutls) + AC_DEFINE([DEFAULT_CONFIG], ["/etc/umurmur.conf"], [Default config]) # Checks for header files. diff --git a/src/Makefile.am b/src/Makefile.am index 3118dc5..912232e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,5 +27,14 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. bin_PROGRAMS=umurmurd -umurmurd_SOURCES=client.c main.c messages.c pds.c server.c ssl.c log.c conf.c crypt.c timer.c messagehandler.c channel.c Mumble.pb-c.c voicetarget.c ban.c +umurmurd_SOURCES=client.c main.c messages.c pds.c server.c log.c conf.c crypt.c timer.c messagehandler.c channel.c Mumble.pb-c.c voicetarget.c ban.c +if USE_OPENSSL +umurmurd_SOURCES+=ssli_openssl.c +else +if USE_GNUTLS +umurmurd_SOURCES+=ssli_gnutls.c +else +umurmurd_SOURCES+=ssli_polarssl.c +endif +endif diff --git a/src/ssli_gnutls.c b/src/ssli_gnutls.c new file mode 100644 index 0000000..e69de29