diff --git a/skein.cabal b/skein.cabal
--- a/skein.cabal
+++ b/skein.cabal
@@ -1,6 +1,6 @@
 Cabal-version:       >= 1.8
 Name:                skein
-Version:             0.1.0.3
+Version:             0.1.0.4
 Synopsis:            Skein, a family of cryptographic hash functions.  Includes Skein-MAC as well.
 License:             BSD3
 License-file:        LICENSE
@@ -54,7 +54,14 @@
     Description: Use the reference implementation instead of the optimized one.
     Default: False
 
+Flag force-endianness
+    Description: Use a manually selected endian when compiling (see flag 'big-endian').
+    Default: False
 
+Flag big-endian
+    Description: When manually selecting the endianness, use big-endian (default is little-endian).
+    Default: False
+
 Library
     Hs-Source-Dirs: src
 
@@ -81,10 +88,16 @@
     Includes:
         skein.h
 
-    if arch(i386) || arch(x86_64)
-        CC-options: "-DSKEIN_NEED_SWAP=0"
-    if arch(ppc) || arch(sparc)
-        CC-options: "-DSKEIN_NEED_SWAP=1"
+    if flag(force-endianness)
+        if flag(big-endian)
+            CC-options: "-DSKEIN_NEED_SWAP=1"
+        else
+            CC-options: "-DSKEIN_NEED_SWAP=0"
+    else
+        if arch(i386) || arch(x86_64)
+            CC-options: "-DSKEIN_NEED_SWAP=0"
+        if arch(ppc) || arch(sparc) || arch(s390) || arch(hppa) || arch(s390)
+            CC-options: "-DSKEIN_NEED_SWAP=1"
 
     if flag(reference)
         Include-Dirs:
