about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-06-21 23:32:03 +0100
committerJames Booth <boothj5@gmail.com>2015-06-21 23:32:03 +0100
commit2c8b598d3fdff97f5c3d9394ac8343cab6b34b4d (patch)
treef2d1d33e65b7ed8633d6c144643977c1321e49d1
parent918e55becf804de47a89acacce365f12369808e0 (diff)
parent1dba341da872baa553742ae69b010e285b59e5e5 (diff)
downloadprofani-tty-2c8b598d3fdff97f5c3d9394ac8343cab6b34b4d.tar.gz
Merge remote-tracking branch 'pasis/configure-cleanup'
-rw-r--r--configure.ac21
1 files changed, 4 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 40a810d2..a652abfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -202,7 +202,7 @@ fi
 AM_CONDITIONAL([BUILD_OTR], [false])
 AM_CONDITIONAL([BUILD_OTR3], [false])
 AM_CONDITIONAL([BUILD_OTR4], [false])
-if test "x$enable_otr" = xyes; then
+if test "x$enable_otr" != xno; then
     AC_SEARCH_LIBS([otrl_init], [otr],
         [AC_COMPILE_IFELSE(
             [AC_LANG_PROGRAM([[
@@ -216,22 +216,9 @@ if test "x$enable_otr" = xyes; then
             ]])],
             [AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR4], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])],
             [AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR3], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])])],
-        [AC_MSG_ERROR([libotr is required for otr encryption support])])
-elif test "x$enable_otr" = x; then
-    AC_SEARCH_LIBS([otrl_init], [otr],
-        [AC_COMPILE_IFELSE(
-            [AC_LANG_PROGRAM([[
-            #include <libotr/version.h>
-            ]],[[
-            #if OTRL_VERSION_MAJOR == 4
-            // OK
-            #else
-            # assume version 3
-            #endif
-            ]])],
-            [AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR4], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])],
-            [AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR3], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])])],
-        [AC_MSG_NOTICE([libotr not found, otr encryption support not enabled])])
+        [AS_IF([test "x$enable_otr" = xyes],
+            [AC_MSG_ERROR([libotr is required for otr encryption support])],
+            [AC_MSG_NOTICE([libotr not found, otr encryption support not enabled])])])
 fi
 
 AS_IF([test "x$with_themes" = xno],