diff --git a/configure b/configure
index 7cfa5051e509b65bb13df1a2612ab55c38164895..84cd39e85720d33ebabac0bd3b22e54d0a9d1eb6 100755
--- a/configure
+++ b/configure
@@ -760,6 +760,11 @@ EOF
 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
 fi
 
+if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
+    echo "error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack"
+    exit 1
+fi
+
 cat > $TMPC << EOF
 #include <time.h>
 int main( void ) { localtime_r(NULL, NULL); }