summaryrefslogtreecommitdiff
blob: 6e2b21ac89c02a6dd8f7a247870c1ac755b4d00b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Fix building on FreeBSD systems.
Index: domino-0.4/configure.in.in
===================================================================
--- domino-0.4.orig/configure.in.in
+++ domino-0.4/configure.in.in
@@ -1 +1,3 @@
 #MIN_CONFIG
+
+AC_CHECK_HEADERS([endian.h sys/endian.h])
Index: domino-0.4/domino/misc.cpp
===================================================================
--- domino-0.4.orig/domino/misc.cpp
+++ domino-0.4/domino/misc.cpp
@@ -22,19 +22,30 @@
 #include "misc.h"
 #include <qimage.h>
 #include <qpixmap.h>
-#include <endian.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#undef WORDS_BIGENDIAN
-#define WORDS_LITTLEENDIAN 1
-#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
-	#undef WORDS_LITTLEENDIAN
-	#define WORDS_BIGENDIAN 1
-#endif
-
 
+#include <config.h>
 
+#ifdef HAVE_ENDIAN_H
+# include <endian.h>
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+#  undef WORDS_BIGENDIAN
+#  define WORDS_LITTLEENDIAN 1
+# endif
+# if __BYTE_ORDER == __BIG_ENDIAN
+#  undef WORDS_LITTLEENDIAN
+#  define WORDS_BIGENDIAN 1
+# endif
+#elif HAVE_SYS_ENDIAN_H /* *BSD in general */
+# include <sys/endian.h>
+# if _BYTE_ORDER == _LITTLE_ENDIAN
+#  undef WORDS_BIGENDIAN
+#  define WORDS_LITTLEENDIAN 1
+# endif
+# if _BYTE_ORDER == _BIG_ENDIAN
+#  undef WORDS_LITTLEENDIAN
+#  define WORDS_BIGENDIAN 1
+# endif
+#endif
 
 QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a)
 {