diff mcabber/configure.ac @ 2076:9fb1ccf291cc

Switch to libotr v4 API Patch merged from isbear's mcabber-patches repository (Mikael)
author Myhailo Danylenko <isbear@ukrpost.net>
date Wed, 15 May 2013 13:32:42 +0300
parents 710654b6b85f
children f81b4a97afaa
line wrap: on
line diff
--- a/mcabber/configure.ac	Wed May 15 13:32:42 2013 +0300
+++ b/mcabber/configure.ac	Wed May 15 13:32:42 2013 +0300
@@ -184,16 +184,26 @@
 
 # Check for otr
 AC_ARG_ENABLE(otr,
-              AC_HELP_STRING([--enable-otr],
-                             [enable OTR (Off-the-Record) messaging support]),
-              enable_otr=$enableval, otr="")
+    AC_HELP_STRING([--enable-otr],
+                   [enable OTR (Off-the-Record) messaging support]),
+    enable_otr=$enableval,
+    otr="")
 if test "x$enable_otr" = "xyes"; then
-  # Look for libgcrypt and libotr
-  AM_PATH_LIBGCRYPT(1.2.2, [
-          AM_PATH_LIBOTR(3.1.0, ,
-                         AC_MSG_ERROR(libotr 3.1.0 or newer is required.))
-      ], AC_MSG_ERROR(libgcrypt 1.2.2 or newer is required.)
-  )
+    # Look for libgcrypt and libotr
+    AM_PATH_LIBGCRYPT(1.2.2, [
+        AM_PATH_LIBOTR(4.0.0, [
+            AC_DEFINE([HAVE_LIBOTR], 1, [Define if you use libotr])
+        ], [
+            AM_PATH_LIBOTR(3.1.0, [
+                AC_DEFINE([HAVE_LIBOTR], 1, [Define if you use libotr])
+                AC_DEFINE([HAVE_LIBOTR3], 1, [Define if you use libotr v3])
+            ], [
+                AC_MSG_ERROR(libotr 3.1.0 or newer is required.)
+            ])
+        ])
+    ], [
+        AC_MSG_ERROR(libgcrypt 1.2.2 or newer is required.)
+    ])
 fi
 
 # Check for Enchant stuff
@@ -290,3 +300,4 @@
                  mcabber.pc
                  Makefile])
 AC_OUTPUT
+dnl vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users...