diff -ru weechat-1.6.orig/config.sub weechat-1.6/config.sub
--- weechat-1.6.orig/config.sub 2016-10-19 20:51:03.610252372 +0200
+++ weechat-1.6/config.sub 2016-10-19 20:33:14.686252372 +0200
@@ -1376,7 +1376,7 @@
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
diff -ru weechat-1.6.orig/configure weechat-1.6/configure
--- weechat-1.6.orig/configure 2016-10-19 20:51:02.366252372 +0200
+++ weechat-1.6/configure 2016-10-19 20:46:26.802252372 +0200
@@ -23683,7 +23683,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
GCRYPT_CFLAGS=`libgcrypt-config --cflags`
- GCRYPT_LFLAGS=`libgcrypt-config --libs`
+ GCRYPT_LFLAGS="-lgcrypt -lgpg-error"
fi