Store USE_DLMALLOC in vppinfra/config.h

Change-Id: Ib596e7f525b83dc7e830bcf6a126cd210216ce86
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vppinfra/cache.h b/src/vppinfra/cache.h
index ac08355..7a54d34 100644
--- a/src/vppinfra/cache.h
+++ b/src/vppinfra/cache.h
@@ -45,9 +45,6 @@
  */
 #ifndef CLIB_LOG2_CACHE_LINE_BYTES
 
-/* defines CLIB_LOG2_CACHE_LINE_BYTES */
-#include <vppinfra/config.h>
-
 /* Default cache line size of 64 bytes. */
 #ifndef CLIB_LOG2_CACHE_LINE_BYTES
 #define CLIB_LOG2_CACHE_LINE_BYTES 6
diff --git a/src/vppinfra/clib.h b/src/vppinfra/clib.h
index 42748b0..a6f8824 100644
--- a/src/vppinfra/clib.h
+++ b/src/vppinfra/clib.h
@@ -38,6 +38,8 @@
 #ifndef included_clib_h
 #define included_clib_h
 
+#include <vppinfra/config.h>
+
 /* Standalone means to not assume we are running on a Unix box. */
 #if ! defined (CLIB_STANDALONE) && ! defined (CLIB_LINUX_KERNEL)
 #define CLIB_UNIX
diff --git a/src/vppinfra/config.h.in b/src/vppinfra/config.h.in
index 0947c71..58a9731 100644
--- a/src/vppinfra/config.h.in
+++ b/src/vppinfra/config.h.in
@@ -20,4 +20,5 @@
 #define CLIB_LOG2_CACHE_LINE_BYTES @LOG2_CACHE_LINE_BYTES@
 #endif
 
+#define USE_DLMALLOC @DLMALLOC@
 #endif