--- /dev/null
+Move AC_CONFIG_AUX_DIR up a few lines so the autotools can find it
+
+This patch is based on the same solution adopted by Debian:
+
+ https://lists.debian.org/debian-release/2014/11/msg01231.html
+
+Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+
+diff -rup a/configure.ac b/configure.ac
+--- a/configure.ac 2014-02-09 11:52:42.000000000 +0000
++++ b/configure.ac 2015-01-06 15:07:10.003074775 +0000
+@@ -13,11 +13,12 @@ m4_include([version.m4])
+ AC_PREREQ([2.61])
+ AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/])
+
++AC_CONFIG_AUX_DIR([build-aux])
++
+ # Setup the compilers early on
+ AC_PROG_CC([cc gcc clang])
+ AC_PROG_CXX([c++ g++ clang++])
+
+-AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
+
+ AC_CANONICAL_HOST