--- a/components/memcached/Makefile Tue Mar 04 15:26:51 2014 -0800
+++ b/components/memcached/Makefile Thu Mar 06 15:09:47 2014 -0800
@@ -51,7 +51,13 @@
CFLAGS += -D__ATTRIBUTE_DISABLED
CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/lib/$(MACH64)
-CONFIGURE_OPTIONS.64 += --with-libevent=/usr/lib/${MACH64}
+CONFIGURE_OPTIONS.64 += --with-libevent=/usr/lib/$(MACH64)
+# The below works around a bug in configure/configure.ac that sets
+# an incorrect runpath.
+# Setting ac_cv_libevent bypasses libevent checks in configure,
+# including setting the runpath (-R), which is currently ok
+# because libevent is in a default library directory.
+CONFIGURE_OPTIONS.64 += "ac_cv_libevent_dir=/usr/lib/$(MACH64)"
CONFIGURE_OPTIONS += --enable-dtrace --disable-docs --disable-coverage
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"