diff --git a/ChangeLog b/ChangeLog
index 35fbefc7128ace6ef1e0319d90df8fb49e490438..9a4d62f9c6410c6f3c3b0d5c87a851e8be011202 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-03-30  Niels Möller  <nisse@diamant.hack.org>
 
+	* version.h.in (GMP_NUMB_BITS) [NETTLE_USE_MINI_GMP]: Move
+	definition here (uses configure substitution).
+	* bignum.h (GMP_NUMB_BITS): ...old location.
+
 	* nettle.texinfo: Updated version number.
 	(Installation): Document some more configure options.
 
diff --git a/bignum.h b/bignum.h
index 84530d387a9594d592afda31ad46114351296594..24158e069561514c0c221fc3309c38a5a3dedb6b 100644
--- a/bignum.h
+++ b/bignum.h
@@ -44,9 +44,6 @@
 #if NETTLE_USE_MINI_GMP
 # include "mini-gmp.h"
 
-/* We need a preprocessor constant for GMP_NUMB_BITS, simply using
-   sizeof(mp_limb_t) * CHAR_BIT is not good enough. */
-# define GMP_NUMB_BITS @GMP_NUMB_BITS@
 # define GMP_NUMB_MASK (~(mp_limb_t) 0)
 
 /* Functions missing in older gmp versions, and checked for with ifdef */
diff --git a/version.h.in b/version.h.in
index e3c01dba0d3ac65b4908236852e3210c23c26a68..447e933e515eadb0afb04259ec43235502cfec5b 100644
--- a/version.h.in
+++ b/version.h.in
@@ -44,6 +44,12 @@ extern "C" {
 
 #define NETTLE_USE_MINI_GMP @NETTLE_USE_MINI_GMP@
 
+/* We need a preprocessor constant for GMP_NUMB_BITS, simply using
+   sizeof(mp_limb_t) * CHAR_BIT is not good enough. */
+#if NETTLE_USE_MINI_GMP
+# define GMP_NUMB_BITS @GMP_NUMB_BITS@
+#endif
+
 #ifdef __cplusplus
 }
 #endif