summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-05-06 11:14:50 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-05-06 11:14:50 -0500
commit1108cf8c0eba1ae386c306b6f1a9871d72f50fe9 (patch)
tree07d7c8fb556cefcc8e88a0ef895f3ef7c00bbb8d
parent663a6f38445f7ebd9dbd5aff2ab4d5f066e85d2d (diff)
downloadabslibre-1108cf8c0eba1ae386c306b6f1a9871d72f50fe9.tar.gz
abslibre-1108cf8c0eba1ae386c306b6f1a9871d72f50fe9.tar.bz2
abslibre-1108cf8c0eba1ae386c306b6f1a9871d72f50fe9.zip
libotr3-3.2.1-2: add new package to [pcr]
-rw-r--r--pcr/libotr3/PKGBUILD34
-rw-r--r--pcr/libotr3/libotr3-soname.patch695
2 files changed, 729 insertions, 0 deletions
diff --git a/pcr/libotr3/PKGBUILD b/pcr/libotr3/PKGBUILD
new file mode 100644
index 000000000..99519bff4
--- /dev/null
+++ b/pcr/libotr3/PKGBUILD
@@ -0,0 +1,34 @@
+# Contributor (Arch): Gaetan Bisson <bisson@archlinux.org>
+# Contributor (Arch): Pierre Schmitz <pierre@archlinux.de>
+# Contributor (Arch): Bug <Bug2000@gmail.com>
+# Maintainer : Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=libotr3
+pkgver=3.2.1
+pkgrel=2
+pkgdesc='Off-the-Record Messaging Library and Toolkit (version 3.X)'
+url='http://www.cypherpunks.ca/otr/'
+license=('GPL' 'LGPL')
+arch=('i686' 'x86_64')
+depends=('libgcrypt')
+source=("http://www.cypherpunks.ca/otr/libotr-${pkgver}.tar.gz" "libotr3-soname.patch")
+sha1sums=('898bf00d019f49ca34cd0116dd2e22685c67c394'
+ '08c85f20fa1a0c5e8935d9a3f00b1d4e37f1b2d1')
+
+build() {
+ cd "${srcdir}/libotr-${pkgver}"
+ patch -p1 -i "${srcdir}/libotr3-soname.patch"
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --program-transform-name='s/otr/otr3/'
+ make
+}
+
+package() {
+ cd "${srcdir}/libotr-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ for i in parse sesskeys mackey readforge modify remac; do
+ rm "${pkgdir}"/usr/share/man/man1/otr_$i.1
+ ln -sf otr3_toolkit.1 "${pkgdir}"/usr/share/man/man1/otr3_$i.1
+ done
+}
diff --git a/pcr/libotr3/libotr3-soname.patch b/pcr/libotr3/libotr3-soname.patch
new file mode 100644
index 000000000..aa9b58318
--- /dev/null
+++ b/pcr/libotr3/libotr3-soname.patch
@@ -0,0 +1,695 @@
+diff -Naur libotr-3.2.1.orig/configure libotr-3.2.1/configure
+--- libotr-3.2.1.orig/configure 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/configure 2012-11-02 04:53:47.533538908 -0400
+@@ -791,7 +791,7 @@
+ LDFLAGS
+ CFLAGS
+ CC
+-LIBOTR_LIBTOOL_VERSION
++LIBOTR3_LIBTOOL_VERSION
+ am__untar
+ am__tar
+ AMTAR
+@@ -2674,7 +2674,7 @@
+
+
+ # Define the identity of the package.
+- PACKAGE=libotr
++ PACKAGE=libotr3
+ VERSION=3.2.1
+
+
+@@ -2715,7 +2715,7 @@
+
+
+
+-LIBOTR_LIBTOOL_VERSION="4:1:2"
++LIBOTR3_LIBTOOL_VERSION="4:1:2"
+
+
+
+@@ -10461,7 +10461,7 @@
+
+
+
+-ac_config_files="$ac_config_files Makefile src/Makefile toolkit/Makefile libotr.pc"
++ac_config_files="$ac_config_files Makefile src/Makefile toolkit/Makefile libotr3.pc"
+
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -11434,7 +11434,7 @@
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "toolkit/Makefile") CONFIG_FILES="$CONFIG_FILES toolkit/Makefile" ;;
+- "libotr.pc") CONFIG_FILES="$CONFIG_FILES libotr.pc" ;;
++ "libotr3.pc") CONFIG_FILES="$CONFIG_FILES libotr3.pc" ;;
+
+ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+diff -Naur libotr-3.2.1.orig/libotr3.m4 libotr-3.2.1/libotr3.m4
+--- libotr-3.2.1.orig/libotr3.m4 1969-12-31 19:00:00.000000000 -0500
++++ libotr-3.2.1/libotr3.m4 2012-11-02 04:53:59.983891029 -0400
+@@ -0,0 +1,134 @@
++dnl
++dnl Off-the-Record Messaging library
++dnl Copyright (C) 2004-2007 Ian Goldberg, Chris Alexander, Nikita Borisov
++dnl <otr@cypherpunks.ca>
++dnl
++dnl This library is free software; you can redistribute it and/or
++dnl modify it under the terms of version 2.1 of the GNU Lesser General
++dnl Public License as published by the Free Software Foundation.
++dnl
++dnl This library is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++dnl Lesser General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU Lesser General Public
++dnl License along with this library; if not, write to the Free Software
++dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++dnl
++
++dnl AM_PATH_LIBOTR3([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
++dnl Test for libotr3, and define LIBOTR3_CFLAGS and LIBOTR3_LIBS as appropriate.
++dnl enables arguments --with-libotr3-prefix=
++dnl --with-libotr3-inc-prefix=
++dnl
++dnl You must already have found libgcrypt with AM_PATH_LIBGCRYPT
++dnl
++dnl Adapted from alsa.m4, originally by
++dnl Richard Boulton <richard-alsa@tartarus.org>
++dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
++dnl Jaroslav Kysela <perex@suse.cz>
++
++AC_DEFUN([AM_PATH_LIBOTR3],
++[dnl Save the original CFLAGS, LDFLAGS, and LIBS
++libotr3_save_CFLAGS="$CFLAGS"
++libotr3_save_LDFLAGS="$LDFLAGS"
++libotr3_save_LIBS="$LIBS"
++libotr3_found=yes
++
++dnl
++dnl Get the cflags and libraries for libotr3
++dnl
++AC_ARG_WITH(libotr3-prefix,
++[ --with-libotr3-prefix=PFX Prefix where libotr3 is installed(optional)],
++[libotr3_prefix="$withval"], [libotr3_prefix=""])
++
++AC_ARG_WITH(libotr3-inc-prefix,
++[ --with-libotr3-inc-prefix=PFX Prefix where libotr3 includes are (optional)],
++[libotr3_inc_prefix="$withval"], [libotr3_inc_prefix=""])
++
++dnl Add any special include directories
++AC_MSG_CHECKING(for libotr3 CFLAGS)
++if test "$libotr3_inc_prefix" != "" ; then
++ LIBOTR3_CFLAGS="$LIBOTR3_CFLAGS -I$libotr3_inc_prefix"
++ CFLAGS="$CFLAGS $LIBOTR3_CFLAGS"
++fi
++AC_MSG_RESULT($LIBOTR3_CFLAGS)
++
++dnl add any special lib dirs
++AC_MSG_CHECKING(for libotr3 LIBS)
++if test "$libotr3_prefix" != "" ; then
++ LIBOTR3_LIBS="$LIBOTR3_LIBS -L$libotr3_prefix"
++ LDFLAGS="$LDFLAGS $LIBOTR3_LIBS"
++fi
++
++dnl add the libotr3 library
++LIBOTR3_LIBS="$LIBOTR3_LIBS -lotr3"
++LIBS="$LIBOTR3_LIBS $LIBS"
++AC_MSG_RESULT($LIBOTR3_LIBS)
++
++dnl Check for a working version of libotr3 that is of the right version.
++min_libotr3_version=ifelse([$1], ,3.0.0,$1)
++no_libotr3=""
++ libotr3_min_major_version=`echo $min_libotr3_version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
++ libotr3_min_minor_version=`echo $min_libotr3_version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
++ libotr3_min_sub_version=`echo $min_libotr3_version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
++AC_MSG_CHECKING(for libotr3 headers version $libotr3_min_major_version.x >= $min_libotr3_version)
++
++AC_LANG_SAVE
++AC_LANG_C
++AC_TRY_COMPILE([
++#include <stdlib.h>
++#include <libotr3/version.h>
++], [
++# if(OTRL_VERSION_MAJOR != $libotr3_min_major_version)
++# error not present
++# else
++
++# if(OTRL_VERSION_MINOR > $libotr3_min_minor_version)
++ exit(0);
++# else
++# if(OTRL_VERSION_MINOR < $libotr3_min_minor_version)
++# error not present
++# endif
++
++# if(OTRL_VERSION_SUB < $libotr3_min_sub_version)
++# error not present
++# endif
++# endif
++# endif
++exit(0);
++],
++ [AC_MSG_RESULT(found.)],
++ [AC_MSG_RESULT(not present.)
++ ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libotr3 not found.)])
++ libotr3_found=no]
++)
++AC_LANG_RESTORE
++
++dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
++AC_CHECK_LIB([otr], [otrl_message_receiving],,
++ [ifelse([$3], , [AC_MSG_ERROR(No linkable libotr3 was found.)])
++ libotr3_found=no],
++ $LIBGCRYPT_LIBS
++)
++
++LDFLAGS="$libotr3_save_LDFLAGS"
++LIBS="$libotr3_save_LIBS"
++
++if test "x$libotr3_found" = "xyes" ; then
++ ifelse([$2], , :, [$2])
++else
++ LIBOTR3_CFLAGS=""
++ LIBOTR3_LIBS=""
++ ifelse([$3], , :, [$3])
++fi
++
++dnl That should be it. Now just export our symbols:
++AC_SUBST(LIBOTR3_CFLAGS)
++AC_SUBST(LIBOTR3_LIBS)
++])
++
+diff -Naur libotr-3.2.1.orig/libotr3.pc.in libotr-3.2.1/libotr3.pc.in
+--- libotr-3.2.1.orig/libotr3.pc.in 1969-12-31 19:00:00.000000000 -0500
++++ libotr-3.2.1/libotr3.pc.in 2012-11-02 04:53:59.983891029 -0400
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: libotr3
++Description: Off-the-Record Messaging Library
++Version: 3.1.0
++URL: http://otr.cypherpunks.ca/
++Libs: -L${libdir} -lotr3
++Cflags: -I${includedir}
+diff -Naur libotr-3.2.1.orig/libotr.m4 libotr-3.2.1/libotr.m4
+--- libotr-3.2.1.orig/libotr.m4 2012-11-02 04:53:36.606563083 -0400
++++ libotr-3.2.1/libotr.m4 1969-12-31 19:00:00.000000000 -0500
+@@ -1,134 +0,0 @@
+-dnl
+-dnl Off-the-Record Messaging library
+-dnl Copyright (C) 2004-2007 Ian Goldberg, Chris Alexander, Nikita Borisov
+-dnl <otr@cypherpunks.ca>
+-dnl
+-dnl This library is free software; you can redistribute it and/or
+-dnl modify it under the terms of version 2.1 of the GNU Lesser General
+-dnl Public License as published by the Free Software Foundation.
+-dnl
+-dnl This library is distributed in the hope that it will be useful,
+-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-dnl Lesser General Public License for more details.
+-dnl
+-dnl You should have received a copy of the GNU Lesser General Public
+-dnl License along with this library; if not, write to the Free Software
+-dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-dnl
+-
+-dnl AM_PATH_LIBOTR([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+-dnl Test for libotr, and define LIBOTR_CFLAGS and LIBOTR_LIBS as appropriate.
+-dnl enables arguments --with-libotr-prefix=
+-dnl --with-libotr-inc-prefix=
+-dnl
+-dnl You must already have found libgcrypt with AM_PATH_LIBGCRYPT
+-dnl
+-dnl Adapted from alsa.m4, originally by
+-dnl Richard Boulton <richard-alsa@tartarus.org>
+-dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
+-dnl Jaroslav Kysela <perex@suse.cz>
+-
+-AC_DEFUN([AM_PATH_LIBOTR],
+-[dnl Save the original CFLAGS, LDFLAGS, and LIBS
+-libotr_save_CFLAGS="$CFLAGS"
+-libotr_save_LDFLAGS="$LDFLAGS"
+-libotr_save_LIBS="$LIBS"
+-libotr_found=yes
+-
+-dnl
+-dnl Get the cflags and libraries for libotr
+-dnl
+-AC_ARG_WITH(libotr-prefix,
+-[ --with-libotr-prefix=PFX Prefix where libotr is installed(optional)],
+-[libotr_prefix="$withval"], [libotr_prefix=""])
+-
+-AC_ARG_WITH(libotr-inc-prefix,
+-[ --with-libotr-inc-prefix=PFX Prefix where libotr includes are (optional)],
+-[libotr_inc_prefix="$withval"], [libotr_inc_prefix=""])
+-
+-dnl Add any special include directories
+-AC_MSG_CHECKING(for libotr CFLAGS)
+-if test "$libotr_inc_prefix" != "" ; then
+- LIBOTR_CFLAGS="$LIBOTR_CFLAGS -I$libotr_inc_prefix"
+- CFLAGS="$CFLAGS $LIBOTR_CFLAGS"
+-fi
+-AC_MSG_RESULT($LIBOTR_CFLAGS)
+-
+-dnl add any special lib dirs
+-AC_MSG_CHECKING(for libotr LIBS)
+-if test "$libotr_prefix" != "" ; then
+- LIBOTR_LIBS="$LIBOTR_LIBS -L$libotr_prefix"
+- LDFLAGS="$LDFLAGS $LIBOTR_LIBS"
+-fi
+-
+-dnl add the libotr library
+-LIBOTR_LIBS="$LIBOTR_LIBS -lotr"
+-LIBS="$LIBOTR_LIBS $LIBS"
+-AC_MSG_RESULT($LIBOTR_LIBS)
+-
+-dnl Check for a working version of libotr that is of the right version.
+-min_libotr_version=ifelse([$1], ,3.0.0,$1)
+-no_libotr=""
+- libotr_min_major_version=`echo $min_libotr_version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+- libotr_min_minor_version=`echo $min_libotr_version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+- libotr_min_sub_version=`echo $min_libotr_version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+-AC_MSG_CHECKING(for libotr headers version $libotr_min_major_version.x >= $min_libotr_version)
+-
+-AC_LANG_SAVE
+-AC_LANG_C
+-AC_TRY_COMPILE([
+-#include <stdlib.h>
+-#include <libotr/version.h>
+-], [
+-# if(OTRL_VERSION_MAJOR != $libotr_min_major_version)
+-# error not present
+-# else
+-
+-# if(OTRL_VERSION_MINOR > $libotr_min_minor_version)
+- exit(0);
+-# else
+-# if(OTRL_VERSION_MINOR < $libotr_min_minor_version)
+-# error not present
+-# endif
+-
+-# if(OTRL_VERSION_SUB < $libotr_min_sub_version)
+-# error not present
+-# endif
+-# endif
+-# endif
+-exit(0);
+-],
+- [AC_MSG_RESULT(found.)],
+- [AC_MSG_RESULT(not present.)
+- ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libotr not found.)])
+- libotr_found=no]
+-)
+-AC_LANG_RESTORE
+-
+-dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
+-AC_CHECK_LIB([otr], [otrl_message_receiving],,
+- [ifelse([$3], , [AC_MSG_ERROR(No linkable libotr was found.)])
+- libotr_found=no],
+- $LIBGCRYPT_LIBS
+-)
+-
+-LDFLAGS="$libotr_save_LDFLAGS"
+-LIBS="$libotr_save_LIBS"
+-
+-if test "x$libotr_found" = "xyes" ; then
+- ifelse([$2], , :, [$2])
+-else
+- LIBOTR_CFLAGS=""
+- LIBOTR_LIBS=""
+- ifelse([$3], , :, [$3])
+-fi
+-
+-dnl That should be it. Now just export our symbols:
+-AC_SUBST(LIBOTR_CFLAGS)
+-AC_SUBST(LIBOTR_LIBS)
+-])
+-
+diff -Naur libotr-3.2.1.orig/libotr.m4.orig libotr-3.2.1/libotr.m4.orig
+--- libotr-3.2.1.orig/libotr.m4.orig 1969-12-31 19:00:00.000000000 -0500
++++ libotr-3.2.1/libotr.m4.orig 2012-08-14 08:15:56.000000000 -0400
+@@ -0,0 +1,134 @@
++dnl
++dnl Off-the-Record Messaging library
++dnl Copyright (C) 2004-2007 Ian Goldberg, Chris Alexander, Nikita Borisov
++dnl <otr@cypherpunks.ca>
++dnl
++dnl This library is free software; you can redistribute it and/or
++dnl modify it under the terms of version 2.1 of the GNU Lesser General
++dnl Public License as published by the Free Software Foundation.
++dnl
++dnl This library is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++dnl Lesser General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU Lesser General Public
++dnl License along with this library; if not, write to the Free Software
++dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++dnl
++
++dnl AM_PATH_LIBOTR([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
++dnl Test for libotr, and define LIBOTR_CFLAGS and LIBOTR_LIBS as appropriate.
++dnl enables arguments --with-libotr-prefix=
++dnl --with-libotr-inc-prefix=
++dnl
++dnl You must already have found libgcrypt with AM_PATH_LIBGCRYPT
++dnl
++dnl Adapted from alsa.m4, originally by
++dnl Richard Boulton <richard-alsa@tartarus.org>
++dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
++dnl Jaroslav Kysela <perex@suse.cz>
++
++AC_DEFUN([AM_PATH_LIBOTR],
++[dnl Save the original CFLAGS, LDFLAGS, and LIBS
++libotr_save_CFLAGS="$CFLAGS"
++libotr_save_LDFLAGS="$LDFLAGS"
++libotr_save_LIBS="$LIBS"
++libotr_found=yes
++
++dnl
++dnl Get the cflags and libraries for libotr
++dnl
++AC_ARG_WITH(libotr-prefix,
++[ --with-libotr-prefix=PFX Prefix where libotr is installed(optional)],
++[libotr_prefix="$withval"], [libotr_prefix=""])
++
++AC_ARG_WITH(libotr-inc-prefix,
++[ --with-libotr-inc-prefix=PFX Prefix where libotr includes are (optional)],
++[libotr_inc_prefix="$withval"], [libotr_inc_prefix=""])
++
++dnl Add any special include directories
++AC_MSG_CHECKING(for libotr CFLAGS)
++if test "$libotr_inc_prefix" != "" ; then
++ LIBOTR_CFLAGS="$LIBOTR_CFLAGS -I$libotr_inc_prefix"
++ CFLAGS="$CFLAGS $LIBOTR_CFLAGS"
++fi
++AC_MSG_RESULT($LIBOTR_CFLAGS)
++
++dnl add any special lib dirs
++AC_MSG_CHECKING(for libotr LIBS)
++if test "$libotr_prefix" != "" ; then
++ LIBOTR_LIBS="$LIBOTR_LIBS -L$libotr_prefix"
++ LDFLAGS="$LDFLAGS $LIBOTR_LIBS"
++fi
++
++dnl add the libotr library
++LIBOTR_LIBS="$LIBOTR_LIBS -lotr"
++LIBS="$LIBOTR_LIBS $LIBS"
++AC_MSG_RESULT($LIBOTR_LIBS)
++
++dnl Check for a working version of libotr that is of the right version.
++min_libotr_version=ifelse([$1], ,3.0.0,$1)
++no_libotr=""
++ libotr_min_major_version=`echo $min_libotr_version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
++ libotr_min_minor_version=`echo $min_libotr_version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
++ libotr_min_sub_version=`echo $min_libotr_version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
++AC_MSG_CHECKING(for libotr headers version $libotr_min_major_version.x >= $min_libotr_version)
++
++AC_LANG_SAVE
++AC_LANG_C
++AC_TRY_COMPILE([
++#include <stdlib.h>
++#include <libotr/version.h>
++], [
++# if(OTRL_VERSION_MAJOR != $libotr_min_major_version)
++# error not present
++# else
++
++# if(OTRL_VERSION_MINOR > $libotr_min_minor_version)
++ exit(0);
++# else
++# if(OTRL_VERSION_MINOR < $libotr_min_minor_version)
++# error not present
++# endif
++
++# if(OTRL_VERSION_SUB < $libotr_min_sub_version)
++# error not present
++# endif
++# endif
++# endif
++exit(0);
++],
++ [AC_MSG_RESULT(found.)],
++ [AC_MSG_RESULT(not present.)
++ ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libotr not found.)])
++ libotr_found=no]
++)
++AC_LANG_RESTORE
++
++dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
++AC_CHECK_LIB([otr], [otrl_message_receiving],,
++ [ifelse([$3], , [AC_MSG_ERROR(No linkable libotr was found.)])
++ libotr_found=no],
++ $LIBGCRYPT_LIBS
++)
++
++LDFLAGS="$libotr_save_LDFLAGS"
++LIBS="$libotr_save_LIBS"
++
++if test "x$libotr_found" = "xyes" ; then
++ ifelse([$2], , :, [$2])
++else
++ LIBOTR_CFLAGS=""
++ LIBOTR_LIBS=""
++ ifelse([$3], , :, [$3])
++fi
++
++dnl That should be it. Now just export our symbols:
++AC_SUBST(LIBOTR_CFLAGS)
++AC_SUBST(LIBOTR_LIBS)
++])
++
+diff -Naur libotr-3.2.1.orig/libotr.pc.in libotr-3.2.1/libotr.pc.in
+--- libotr-3.2.1.orig/libotr.pc.in 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/libotr.pc.in 1969-12-31 19:00:00.000000000 -0500
+@@ -1,11 +0,0 @@
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
+-
+-Name: libotr
+-Description: Off-the-Record Messaging Library
+-Version: 3.1.0
+-URL: http://otr.cypherpunks.ca/
+-Libs: -L${libdir} -lotr
+-Cflags: -I${includedir}
+diff -Naur libotr-3.2.1.orig/Makefile.am libotr-3.2.1/Makefile.am
+--- libotr-3.2.1.orig/Makefile.am 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/Makefile.am 2012-11-02 04:53:47.536872337 -0400
+@@ -1,9 +1,9 @@
+ SUBDIRS = src toolkit
+
+-EXTRA_DIST = Protocol-v2.html UPGRADING packaging libotr.m4 libotr.pc.in
++EXTRA_DIST = Protocol-v2.html UPGRADING packaging libotr3.m4 libotr3.pc.in
+
+ aclocaldir = $(datadir)/aclocal
+-aclocal_DATA = libotr.m4
++aclocal_DATA = libotr3.m4
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = libotr.pc
++pkgconfig_DATA = libotr3.pc
+diff -Naur libotr-3.2.1.orig/Makefile.in libotr-3.2.1/Makefile.in
+--- libotr-3.2.1.orig/Makefile.in 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/Makefile.in 2012-11-02 04:53:47.536872337 -0400
+@@ -37,7 +37,7 @@
+ subdir = .
+ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+- $(srcdir)/libotr.pc.in $(top_srcdir)/configure AUTHORS COPYING \
++ $(srcdir)/libotr3.pc.in $(top_srcdir)/configure AUTHORS COPYING \
+ COPYING.LIB ChangeLog INSTALL NEWS config.guess config.sub \
+ depcomp install-sh ltmain.sh missing
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+@@ -48,7 +48,7 @@
+ configure.lineno config.status.lineno
+ mkinstalldirs = $(install_sh) -d
+ CONFIG_HEADER = config.h
+-CONFIG_CLEAN_FILES = libotr.pc
++CONFIG_CLEAN_FILES = libotr3.pc
+ CONFIG_CLEAN_VPATH_FILES =
+ SOURCES =
+ DIST_SOURCES =
+@@ -162,7 +162,7 @@
+ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+ LIBOBJS = @LIBOBJS@
+-LIBOTR_LIBTOOL_VERSION = @LIBOTR_LIBTOOL_VERSION@
++LIBOTR3_LIBTOOL_VERSION = @LIBOTR3_LIBTOOL_VERSION@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
+ LIPO = @LIPO@
+@@ -243,11 +243,11 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUBDIRS = src toolkit
+-EXTRA_DIST = Protocol-v2.html UPGRADING packaging libotr.m4 libotr.pc.in
++EXTRA_DIST = Protocol-v2.html UPGRADING packaging libotr3.m4 libotr3.pc.in
+ aclocaldir = $(datadir)/aclocal
+-aclocal_DATA = libotr.m4
++aclocal_DATA = libotr3.m4
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = libotr.pc
++pkgconfig_DATA = libotr3.pc
+ all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+@@ -303,7 +303,7 @@
+
+ distclean-hdr:
+ -rm -f config.h stamp-h1
+-libotr.pc: $(top_builddir)/config.status $(srcdir)/libotr.pc.in
++libotr3.pc: $(top_builddir)/config.status $(srcdir)/libotr3.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+ mostlyclean-libtool:
+diff -Naur libotr-3.2.1.orig/src/Makefile.am libotr-3.2.1/src/Makefile.am
+--- libotr-3.2.1.orig/src/Makefile.am 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/src/Makefile.am 2012-11-02 04:53:47.536872337 -0400
+@@ -1,13 +1,13 @@
+ INCLUDES = @LIBGCRYPT_CFLAGS@
+
+-lib_LTLIBRARIES = libotr.la
++lib_LTLIBRARIES = libotr3.la
+
+-libotr_la_SOURCES = privkey.c context.c proto.c b64.c dh.c mem.c message.c \
++libotr3_la_SOURCES = privkey.c context.c proto.c b64.c dh.c mem.c message.c \
+ userstate.c tlv.c auth.c sm.c
+
+-libotr_la_LDFLAGS = -version-info @LIBOTR_LIBTOOL_VERSION@ @LIBS@ @LIBGCRYPT_LIBS@
++libotr3_la_LDFLAGS = -version-info @LIBOTR3_LIBTOOL_VERSION@ @LIBS@ @LIBGCRYPT_LIBS@
+
+-otrincdir = $(includedir)/libotr
++otrincdir = $(includedir)/libotr3
+
+ otrinc_HEADERS = b64.h context.h dh.h mem.h message.h privkey.h proto.h \
+ version.h userstate.h tlv.h serial.h auth.h sm.h privkey-t.h
+diff -Naur libotr-3.2.1.orig/src/Makefile.in libotr-3.2.1/src/Makefile.in
+--- libotr-3.2.1.orig/src/Makefile.in 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/src/Makefile.in 2012-11-02 04:53:47.536872337 -0400
+@@ -69,13 +69,13 @@
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(otrincdir)"
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+-libotr_la_LIBADD =
+-am_libotr_la_OBJECTS = privkey.lo context.lo proto.lo b64.lo dh.lo \
++libotr3_la_LIBADD =
++am_libotr3_la_OBJECTS = privkey.lo context.lo proto.lo b64.lo dh.lo \
+ mem.lo message.lo userstate.lo tlv.lo auth.lo sm.lo
+-libotr_la_OBJECTS = $(am_libotr_la_OBJECTS)
+-libotr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++libotr3_la_OBJECTS = $(am_libotr3_la_OBJECTS)
++libotr3_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(libotr_la_LDFLAGS) $(LDFLAGS) -o $@
++ $(libotr3_la_LDFLAGS) $(LDFLAGS) -o $@
+ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -89,8 +89,8 @@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+-SOURCES = $(libotr_la_SOURCES)
+-DIST_SOURCES = $(libotr_la_SOURCES)
++SOURCES = $(libotr3_la_SOURCES)
++DIST_SOURCES = $(libotr3_la_SOURCES)
+ HEADERS = $(otrinc_HEADERS)
+ ETAGS = etags
+ CTAGS = ctags
+@@ -130,7 +130,7 @@
+ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+ LIBOBJS = @LIBOBJS@
+-LIBOTR_LIBTOOL_VERSION = @LIBOTR_LIBTOOL_VERSION@
++LIBOTR3_LIBTOOL_VERSION = @LIBOTR3_LIBTOOL_VERSION@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
+ LIPO = @LIPO@
+@@ -211,12 +211,12 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ INCLUDES = @LIBGCRYPT_CFLAGS@
+-lib_LTLIBRARIES = libotr.la
+-libotr_la_SOURCES = privkey.c context.c proto.c b64.c dh.c mem.c message.c \
++lib_LTLIBRARIES = libotr3.la
++libotr3_la_SOURCES = privkey.c context.c proto.c b64.c dh.c mem.c message.c \
+ userstate.c tlv.c auth.c sm.c
+
+-libotr_la_LDFLAGS = -version-info @LIBOTR_LIBTOOL_VERSION@ @LIBS@ @LIBGCRYPT_LIBS@
+-otrincdir = $(includedir)/libotr
++libotr3_la_LDFLAGS = -version-info @LIBOTR3_LIBTOOL_VERSION@ @LIBS@ @LIBGCRYPT_LIBS@
++otrincdir = $(includedir)/libotr3
+ otrinc_HEADERS = b64.h context.h dh.h mem.h message.h privkey.h proto.h \
+ version.h userstate.h tlv.h serial.h auth.h sm.h privkey-t.h
+
+@@ -285,8 +285,8 @@
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+-libotr.la: $(libotr_la_OBJECTS) $(libotr_la_DEPENDENCIES)
+- $(libotr_la_LINK) -rpath $(libdir) $(libotr_la_OBJECTS) $(libotr_la_LIBADD) $(LIBS)
++libotr3.la: $(libotr3_la_OBJECTS) $(libotr3_la_DEPENDENCIES)
++ $(libotr3_la_LINK) -rpath $(libdir) $(libotr3_la_OBJECTS) $(libotr3_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+diff -Naur libotr-3.2.1.orig/toolkit/Makefile.am libotr-3.2.1/toolkit/Makefile.am
+--- libotr-3.2.1.orig/toolkit/Makefile.am 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/toolkit/Makefile.am 2012-11-02 04:53:47.536872337 -0400
+@@ -6,7 +6,7 @@
+ otr_modify otr_remac
+
+ COMMON_S = parse.c sha1hmac.c
+-COMMON_LD = ../src/libotr.la @LIBS@ @LIBGCRYPT_LIBS@
++COMMON_LD = ../src/libotr3.la @LIBS@ @LIBGCRYPT_LIBS@
+
+ otr_parse_SOURCES = otr_parse.c readotr.c $(COMMON_S)
+ otr_parse_LDADD = $(COMMON_LD)
+diff -Naur libotr-3.2.1.orig/toolkit/Makefile.in libotr-3.2.1/toolkit/Makefile.in
+--- libotr-3.2.1.orig/toolkit/Makefile.in 2012-11-02 04:53:36.609896510 -0400
++++ libotr-3.2.1/toolkit/Makefile.in 2012-11-02 04:53:47.536872337 -0400
+@@ -55,7 +55,7 @@
+ am_otr_mackey_OBJECTS = otr_mackey.$(OBJEXT) sesskeys.$(OBJEXT) \
+ $(am__objects_1)
+ otr_mackey_OBJECTS = $(am_otr_mackey_OBJECTS)
+-am__DEPENDENCIES_1 = ../src/libotr.la
++am__DEPENDENCIES_1 = ../src/libotr3.la
+ otr_mackey_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_otr_modify_OBJECTS = otr_modify.$(OBJEXT) readotr.$(OBJEXT) \
+ $(am__objects_1)
+@@ -159,7 +159,7 @@
+ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+ LIBOBJS = @LIBOBJS@
+-LIBOTR_LIBTOOL_VERSION = @LIBOTR_LIBTOOL_VERSION@
++LIBOTR3_LIBTOOL_VERSION = @LIBOTR3_LIBTOOL_VERSION@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
+ LIPO = @LIPO@
+@@ -242,7 +242,7 @@
+ INCLUDES = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@
+ noinst_HEADERS = aes.h ctrmode.h parse.h sesskeys.h readotr.h sha1hmac.h
+ COMMON_S = parse.c sha1hmac.c
+-COMMON_LD = ../src/libotr.la @LIBS@ @LIBGCRYPT_LIBS@
++COMMON_LD = ../src/libotr3.la @LIBS@ @LIBGCRYPT_LIBS@
+ otr_parse_SOURCES = otr_parse.c readotr.c $(COMMON_S)
+ otr_parse_LDADD = $(COMMON_LD)
+ otr_sesskeys_SOURCES = otr_sesskeys.c sesskeys.c $(COMMON_S)