From e10ea1be4e21f78bc308b74390249d194645ba8e Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 19 May 2014 20:41:19 +0100 Subject: [PATCH] Fixed OTR dependency when library not present, changed version to 0.4.2 --- configure.ac | 2 +- src/command/command.c | 2 ++ src/command/commands.c | 4 ++++ src/ui/core.c | 2 ++ tests/otr/mock_otr.c | 4 ++++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f94adcb7..2163c546 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([profanity], [0.5.0], [boothj5web@gmail.com]) +AC_INIT([profanity], [0.4.2], [boothj5web@gmail.com]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/src/command/command.c b/src/command/command.c index 181f5d0d..578a3940 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -41,7 +41,9 @@ #include "jid.h" #include "log.h" #include "muc.h" +#ifdef HAVE_LIBOTR #include "otr/otr.h" +#endif #include "profanity.h" #include "tools/autocomplete.h" #include "tools/parser.h" diff --git a/src/command/commands.c b/src/command/commands.c index 45e1c730..9a6cf919 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -24,7 +24,9 @@ #include #include #include +#ifdef HAVE_LIBOTR #include +#endif #include "chat_session.h" #include "command/commands.h" @@ -39,7 +41,9 @@ #include "jid.h" #include "log.h" #include "muc.h" +#ifdef HAVE_LIBOTR #include "otr/otr.h" +#endif #include "profanity.h" #include "tools/autocomplete.h" #include "tools/parser.h" diff --git a/src/ui/core.c b/src/ui/core.c index 4bccf5d5..eec21351 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -48,7 +48,9 @@ #include "jid.h" #include "log.h" #include "muc.h" +#ifdef HAVE_LIBOTR #include "otr/otr.h" +#endif #include "ui/ui.h" #include "ui/titlebar.h" #include "ui/statusbar.h" diff --git a/tests/otr/mock_otr.c b/tests/otr/mock_otr.c index 0cda802e..8a063b99 100644 --- a/tests/otr/mock_otr.c +++ b/tests/otr/mock_otr.c @@ -6,9 +6,12 @@ #include #include +#ifdef HAVE_LIBOTR #include "otr/otr.h" +#endif #include "config/account.h" +#ifdef HAVE_LIBOTR static void _mock_otr_keygen(ProfAccount *account) { @@ -88,3 +91,4 @@ otr_start_query_returns(char *query) otr_start_query = _mock_otr_start_query; will_return(_mock_otr_start_query, query); } +#endif