diff --git a/classes/autotools-brokensep.bbclass b/classes/autotools-brokensep.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..71cf97a391d8fbc28ea1e0113dfbf097ab069ee5
--- /dev/null
+++ b/classes/autotools-brokensep.bbclass
@@ -0,0 +1,5 @@
+# Autotools class for recipes where separate build dir doesn't work
+# Ideally we should fix software so it does work. Standard autotools supports
+# this.
+inherit autotools
+B = "${S}"
diff --git a/recipes-devtools/log4cxx/log4cxx_0.10.0.bb b/recipes-devtools/log4cxx/log4cxx_0.10.0.bb
index 106e3b3c9bcdee8049bfc34b44dce9f7f9d16c30..a51699744847047b9bd581e1bb0ae17008434906 100644
--- a/recipes-devtools/log4cxx/log4cxx_0.10.0.bb
+++ b/recipes-devtools/log4cxx/log4cxx_0.10.0.bb
@@ -15,6 +15,6 @@ SRC_URI[sha256sum] = "0de0396220a9566a580166e66b39674cb40efd2176f52ad2c65486c99c
 
 S = "${WORKDIR}/apache-${BP}"
 
-inherit autotools pkgconfig
+inherit autotools-brokensep pkgconfig
 
 BBCLASSEXTEND += "native"