On a fresh Ubuntu 14.10 system (g++ 4.9.1), with current HEAD (93a8c468)
./autogen.sh && ./configure --disable-wallet --disable-tests --with-gui=no --without-miniupnpc
generates a bitcoin-config.h without HAVE_ENDIAN_H and no endian macros (HAVE_DECL_HTOxx, etc.) set.
With that, a compile run fails immediately, since <endian.h> is included from other headers and causes errors like
CXX crypto/libbitcoinconsensus_la-ripemd160.lo
In file included from ./crypto/common.h:14:0,
from crypto/ripemd160.cpp:7:
./compat/endian.h:132:18: error: expected unqualified-id before '__extension__'
inline uint16_t be16toh(uint16_t big_endian_16bits)
^
./compat/endian.h:132:18: error: expected ')' before '__extension__'
./compat/endian.h:160:17: error: redefinition of 'uint32_t __bswap_32(uint32_t)'
inline uint32_t be32toh(uint32_t big_endian_32bits)
^
In file included from /usr/include/endian.h:60:0,
from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
from /usr/include/stdlib.h:42,
from ./crypto/ripemd160.h:9,
from crypto/ripemd160.cpp:5:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:45:1: note: 'unsigned int __bswap_32(unsigned int)' previously defined here
__bswap_32 (unsigned int __bsx)
^
As a quick workaround it is enough to undefine the endian functions when HAVE_ENDIAN_H is not set:
diff --git a/src/compat/endian.h b/src/compat/endian.h
index 4d041d6..cd86ab4 100644
--- a/src/compat/endian.h
+++ b/src/compat/endian.h
@@ -15,6 +15,23 @@
#if defined(HAVE_ENDIAN_H)
#include <endian.h>
+#else
+#undef htobe16
+#undef htobe32
+#undef htobe64
+
+#undef htole16
+#undef htole32
+#undef htole64
+
+#undef be16toh
+#undef be32toh
+#undef be64toh
+
+#undef le16toh
+#undef le32toh
+#undef le64toh
+
#endif
#if defined(WORDS_BIGENDIAN)
But that's most probably not the right type of fix.