diff --git a/configure.ac b/configure.ac
--- cacao/cacao/configure.ac
+++ cacao/cacao/configure.ac
@@ -50,7 +50,7 @@
     JAVA_ARCH="arm"
 
     case "$host" in
-	*-gnueabihf)
+       *-hardfloat-*-gnueabi | *-gnueabihf)
 		ARCH_FLAGS="$ARCH_FLAGS -D__ARMHF__"
 		;;
 	esac
