diff --git a/dnn/dred_rdovae.c b/dnn/dred_rdovae.c
index c7d2d18204d0ae3ebc4379e9d469e70ebde91888..1df5ccf9592a7e24832d82a9f2f1916a77263690 100644
--- a/dnn/dred_rdovae.c
+++ b/dnn/dred_rdovae.c
@@ -1,5 +1,9 @@
-#include "dred_rdovae.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 
+#include "dred_rdovae.h"
 #include "dred_rdovae_enc.h"
 #include "dred_rdovae_dec.h"
 #include "dred_rdovae_stats_data.h"
diff --git a/dnn/dred_rdovae_dec.c b/dnn/dred_rdovae_dec.c
index c62ccb44fafd1538dc6721d3800557f4428034d3..32ecf4b001c2978915b55c30d154290b01b04172 100644
--- a/dnn/dred_rdovae_dec.c
+++ b/dnn/dred_rdovae_dec.c
@@ -1,3 +1,8 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
 #include "dred_rdovae_dec.h"
 #include "dred_rdovae_constants.h"
 //#define DEBUG
diff --git a/dnn/dred_rdovae_enc.c b/dnn/dred_rdovae_enc.c
index e4f0ee0589d361d724dac0f2a5370dc759c01d76..60446a01fd272c0e9c2259bb847396cfe460d2be 100644
--- a/dnn/dred_rdovae_enc.c
+++ b/dnn/dred_rdovae_enc.c
@@ -1,5 +1,10 @@
 #include <math.h>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
 #include "dred_rdovae_enc.h"