Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/avi/intern/avi.c4
-rw-r--r--source/blender/avi/intern/codecs.c4
-rw-r--r--source/blender/avi/intern/mjpeg.c4
-rw-r--r--source/blender/avi/intern/options.c5
-rw-r--r--source/blender/avi/intern/rgb32.c5
-rw-r--r--source/blender/blenkernel/bad_level_call_stubs/stubs.c6
-rw-r--r--source/blender/blenkernel/intern/action.c4
-rw-r--r--source/blender/blenkernel/intern/anim.c4
-rw-r--r--source/blender/blenkernel/intern/armature.c4
-rw-r--r--source/blender/blenkernel/intern/blender.c4
-rw-r--r--source/blender/blenkernel/intern/bmfont.c4
-rw-r--r--source/blender/blenkernel/intern/constraint.c6
-rw-r--r--source/blender/blenkernel/intern/curve.c4
-rw-r--r--source/blender/blenkernel/intern/deform.c7
-rw-r--r--source/blender/blenkernel/intern/effect.c3
-rw-r--r--source/blender/blenkernel/intern/exotic.c5
-rw-r--r--source/blender/blenkernel/intern/font.c5
-rw-r--r--source/blender/blenkernel/intern/group.c4
-rw-r--r--source/blender/blenkernel/intern/ika.c4
-rw-r--r--source/blender/blenkernel/intern/ipo.c5
-rw-r--r--source/blender/blenkernel/intern/key.c3
-rw-r--r--source/blender/blenkernel/intern/lattice.c4
-rw-r--r--source/blender/blenkernel/intern/library.c4
-rw-r--r--source/blender/blenkernel/intern/material.c4
-rw-r--r--source/blender/blenkernel/intern/mball.c4
-rw-r--r--source/blender/blenkernel/intern/mesh.c4
-rw-r--r--source/blender/blenkernel/intern/nla.c7
-rw-r--r--source/blender/blenkernel/intern/object.c7
-rw-r--r--source/blender/blenkernel/intern/packedFile.c5
-rw-r--r--source/blender/blenkernel/intern/property.c4
-rw-r--r--source/blender/blenkernel/intern/scene.c4
-rw-r--r--source/blender/blenkernel/intern/screen.c6
-rw-r--r--source/blender/blenkernel/intern/sound.c4
-rw-r--r--source/blender/blenkernel/intern/subsurf.c4
-rw-r--r--source/blender/blenkernel/intern/text.c4
-rw-r--r--source/blender/blenkernel/intern/texture.c4
-rw-r--r--source/blender/blenkernel/intern/world.c3
-rw-r--r--source/blender/blenkernel/intern/writeavi.c4
-rw-r--r--source/blender/blenlib/intern/BLI_dynstr.c5
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c5
-rw-r--r--source/blender/blenlib/intern/BLI_linklist.c4
-rw-r--r--source/blender/blenlib/intern/BLI_memarena.c4
-rw-r--r--source/blender/blenlib/intern/arithb.c4
-rw-r--r--source/blender/blenlib/intern/dynlib.c5
-rw-r--r--source/blender/blenlib/intern/fileops.c4
-rw-r--r--source/blender/blenlib/intern/gsqueue.c5
-rw-r--r--source/blender/blenlib/intern/matrixops.c5
-rw-r--r--source/blender/blenlib/intern/noise.c4
-rw-r--r--source/blender/blenlib/intern/psfont.c4
-rw-r--r--source/blender/blenlib/intern/rand.c4
-rw-r--r--source/blender/blenlib/intern/rct.c4
-rw-r--r--source/blender/blenlib/intern/scanfill.c4
-rw-r--r--source/blender/blenlib/intern/storage.c4
-rw-r--r--source/blender/blenlib/intern/time.c4
-rw-r--r--source/blender/blenlib/intern/util.c4
-rw-r--r--source/blender/blenlib/intern/vectorops.c4
-rw-r--r--source/blender/blenlib/intern/winstuff.c4
-rw-r--r--source/blender/blenloader/intern/genfile.c4
-rw-r--r--source/blender/blenloader/intern/readblenentry.c4
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/blenloader/intern/writefile.c4
-rw-r--r--source/blender/blenpluginapi/intern/pluginapi.c4
-rw-r--r--source/blender/bpython/intern/BPY_constobject.c5
-rw-r--r--source/blender/bpython/intern/BPY_csg.c8
-rw-r--r--source/blender/bpython/intern/BPY_image.c4
-rw-r--r--source/blender/bpython/intern/BPY_ipo.c4
-rw-r--r--source/blender/bpython/intern/BPY_links.c4
-rw-r--r--source/blender/bpython/intern/BPY_main.c4
-rw-r--r--source/blender/bpython/intern/BPY_object.c4
-rw-r--r--source/blender/bpython/intern/BPY_scene.c4
-rw-r--r--source/blender/bpython/intern/BPY_text.c4
-rw-r--r--source/blender/bpython/intern/BPY_tools.c4
-rw-r--r--source/blender/bpython/intern/b_import.c9
-rw-r--r--source/blender/bpython/intern/b_interface.c4
-rw-r--r--source/blender/bpython/intern/opy_blender.c4
-rw-r--r--source/blender/bpython/intern/opy_datablock.c4
-rw-r--r--source/blender/bpython/intern/opy_matrix.c4
-rw-r--r--source/blender/bpython/intern/opy_nmesh.c5
-rw-r--r--source/blender/bpython/intern/opy_vector.c4
-rw-r--r--source/blender/bpython/intern/opy_window.c3
-rw-r--r--source/blender/decrypt/intern/BLO_decrypt.c4
-rw-r--r--source/blender/decrypt/stub/BLO_decryptSTUB.c4
-rw-r--r--source/blender/deflate/intern/BLO_deflate.c4
-rw-r--r--source/blender/deflate/stub/BLO_deflateSTUB.c4
-rw-r--r--source/blender/deflate/test/stubbed/stubbed.c4
-rw-r--r--source/blender/encrypt/intern/BLO_encrypt.c4
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c4
-rw-r--r--source/blender/imbuf/intern/amiga.c4
-rw-r--r--source/blender/imbuf/intern/anim.c4
-rw-r--r--source/blender/imbuf/intern/antialias.c5
-rw-r--r--source/blender/imbuf/intern/bitplanes.c4
-rw-r--r--source/blender/imbuf/intern/bmp_decode.c4
-rw-r--r--source/blender/imbuf/intern/cmap.c4
-rw-r--r--source/blender/imbuf/intern/cspace.c4
-rw-r--r--source/blender/imbuf/intern/data.c4
-rw-r--r--source/blender/imbuf/intern/dither.c4
-rw-r--r--source/blender/imbuf/intern/divers.c4
-rw-r--r--source/blender/imbuf/intern/filter.c5
-rw-r--r--source/blender/imbuf/intern/ham.c5
-rw-r--r--source/blender/imbuf/intern/hamx.c5
-rw-r--r--source/blender/imbuf/intern/iff.c6
-rw-r--r--source/blender/imbuf/intern/imageprocess.c4
-rw-r--r--source/blender/imbuf/intern/iris.c5
-rw-r--r--source/blender/imbuf/intern/jpeg.c6
-rw-r--r--source/blender/imbuf/intern/png_decode.c4
-rw-r--r--source/blender/imbuf/intern/png_encode.c4
-rw-r--r--source/blender/imbuf/intern/readimage.c4
-rw-r--r--source/blender/imbuf/intern/rectop.c4
-rw-r--r--source/blender/imbuf/intern/rotate.c4
-rw-r--r--source/blender/imbuf/intern/scaling.c4
-rw-r--r--source/blender/imbuf/intern/targa.c4
-rw-r--r--source/blender/imbuf/intern/util.c4
-rw-r--r--source/blender/imbuf/intern/writeimage.c4
-rw-r--r--source/blender/inflate/intern/BLO_inflate.c4
-rw-r--r--source/blender/makesdna/intern/dna.c4
-rw-r--r--source/blender/makesdna/intern/makesdna.c5
-rw-r--r--source/blender/misc/blendertimer.c4
-rw-r--r--source/blender/radiosity/intern/source/raddisplay.c4
-rw-r--r--source/blender/radiosity/intern/source/radfactors.c5
-rw-r--r--source/blender/radiosity/intern/source/radio.c4
-rw-r--r--source/blender/radiosity/intern/source/radnode.c4
-rw-r--r--source/blender/radiosity/intern/source/radpostprocess.c4
-rw-r--r--source/blender/radiosity/intern/source/radpreprocess.c6
-rw-r--r--source/blender/readblenfile/intern/BLO_readblenfile.c4
-rw-r--r--source/blender/readblenfile/stub/BLO_readblenfileSTUB.c4
-rw-r--r--source/blender/readblenfile/test/test.c4
-rw-r--r--source/blender/readstreamglue/intern/BLO_keyStore.c4
-rw-r--r--source/blender/readstreamglue/intern/BLO_readStreamGlue.c4
-rw-r--r--source/blender/readstreamglue/intern/BLO_readStreamGlueLoopBack.c4
-rw-r--r--source/blender/render/intern/source/RE_callbacks.c4
-rw-r--r--source/blender/render/intern/source/edgeRender.c4
-rw-r--r--source/blender/render/intern/source/envmap.c4
-rw-r--r--source/blender/render/intern/source/errorHandler.c5
-rw-r--r--source/blender/render/intern/source/gammaCorrectionTables.c5
-rw-r--r--source/blender/render/intern/source/initrender.c4
-rw-r--r--source/blender/render/intern/source/jitter.c4
-rw-r--r--source/blender/render/intern/source/outerRenderLoop.c4
-rw-r--r--source/blender/render/intern/source/pixelblending.c3
-rw-r--r--source/blender/render/intern/source/pixelshading.c4
-rw-r--r--source/blender/render/intern/source/renderHelp.c4
-rw-r--r--source/blender/render/intern/source/renderPreAndPost.c4
-rw-r--r--source/blender/render/intern/source/rendercore.c4
-rw-r--r--source/blender/render/intern/source/renderdatabase.c4
-rw-r--r--source/blender/render/intern/source/shadbuf.c4
-rw-r--r--source/blender/render/intern/source/vanillaRenderPipe.c4
-rw-r--r--source/blender/render/intern/source/zbuf.c4
-rw-r--r--source/blender/render/intern/source/zbufferdatastruct.c5
-rw-r--r--source/blender/renderconverter/intern/convertBlenderScene.c4
-rw-r--r--source/blender/sign/intern/BLO_sign.c4
-rw-r--r--source/blender/src/B.blend.c4
-rw-r--r--source/blender/src/Bfont.c5
-rw-r--r--source/blender/src/blenderbuttons.c4
-rw-r--r--source/blender/src/booleanops.c5
-rw-r--r--source/blender/src/booleanops_mesh.c4
-rw-r--r--source/blender/src/buttons.c4
-rw-r--r--source/blender/src/cmap.tga.c4
-rw-r--r--source/blender/src/cmovie.tga.c4
-rw-r--r--source/blender/src/cre/license.jpeg.c4
-rw-r--r--source/blender/src/cre/license_key.c4
-rw-r--r--source/blender/src/drawaction.c4
-rw-r--r--source/blender/src/drawimage.c5
-rw-r--r--source/blender/src/drawimasel.c11
-rw-r--r--source/blender/src/drawipo.c4
-rw-r--r--source/blender/src/drawmesh.c4
-rw-r--r--source/blender/src/drawnla.c4
-rw-r--r--source/blender/src/drawobject.c4
-rw-r--r--source/blender/src/drawoops.c4
-rw-r--r--source/blender/src/drawscene.c3
-rw-r--r--source/blender/src/drawseq.c4
-rw-r--r--source/blender/src/drawsound.c4
-rw-r--r--source/blender/src/drawtext.c5
-rw-r--r--source/blender/src/drawview.c5
-rw-r--r--source/blender/src/edit.c5
-rw-r--r--source/blender/src/editaction.c4
-rw-r--r--source/blender/src/editarmature.c4
-rw-r--r--source/blender/src/editconstraint.c4
-rw-r--r--source/blender/src/editcurve.c5
-rw-r--r--source/blender/src/editdeform.c4
-rw-r--r--source/blender/src/editface.c5
-rw-r--r--source/blender/src/editfont.c6
-rw-r--r--source/blender/src/editgroup.c4
-rw-r--r--source/blender/src/editika.c5
-rw-r--r--source/blender/src/editimasel.c4
-rw-r--r--source/blender/src/editipo.c7
-rw-r--r--source/blender/src/editkey.c5
-rw-r--r--source/blender/src/editlattice.c5
-rw-r--r--source/blender/src/editmball.c4
-rw-r--r--source/blender/src/editmesh.c6
-rw-r--r--source/blender/src/editnla.c4
-rw-r--r--source/blender/src/editobject.c4
-rw-r--r--source/blender/src/editoops.c5
-rw-r--r--source/blender/src/editsca.c4
-rw-r--r--source/blender/src/editscreen.c4
-rw-r--r--source/blender/src/editseq.c5
-rw-r--r--source/blender/src/editsima.c4
-rw-r--r--source/blender/src/editsound.c5
-rw-r--r--source/blender/src/editview.c4
-rw-r--r--source/blender/src/eventdebug.c4
-rw-r--r--source/blender/src/filesel.c4
-rw-r--r--source/blender/src/ghostwinlay.c4
-rw-r--r--source/blender/src/glutil.c4
-rw-r--r--source/blender/src/headerbuttons.c4
-rw-r--r--source/blender/src/imasel.c5
-rw-r--r--source/blender/src/interface.c4
-rw-r--r--source/blender/src/keyval.c9
-rw-r--r--source/blender/src/mainqueue.c5
-rw-r--r--source/blender/src/mywindow.c4
-rw-r--r--source/blender/src/oops.c4
-rw-r--r--source/blender/src/osx_creator_splash.jpg.c5
-rw-r--r--source/blender/src/playanim.c5
-rw-r--r--source/blender/src/poseobject.c4
-rw-r--r--source/blender/src/previewrender.c4
-rw-r--r--source/blender/src/pub/license_key.c4
-rw-r--r--source/blender/src/pub/osx_publisher_splash.jpg.c5
-rw-r--r--source/blender/src/pub/unix_publisher_splash.jpg.c5
-rw-r--r--source/blender/src/pub/windows_publisher_splash.jpg.c5
-rw-r--r--source/blender/src/renderwin.c4
-rw-r--r--source/blender/src/resources.c4
-rw-r--r--source/blender/src/scrarea.c5
-rw-r--r--source/blender/src/screendump.c4
-rw-r--r--source/blender/src/sequence.c4
-rw-r--r--source/blender/src/space.c4
-rw-r--r--source/blender/src/spacetypes.c4
-rw-r--r--source/blender/src/swapbuffers.c6
-rw-r--r--source/blender/src/toets.c4
-rw-r--r--source/blender/src/toolbox.c4
-rw-r--r--source/blender/src/unix_creator_splash.jpg.c5
-rw-r--r--source/blender/src/usiblender.c4
-rw-r--r--source/blender/src/view.c4
-rw-r--r--source/blender/src/vpaint.c4
-rw-r--r--source/blender/src/windows_creator_splash.jpg.c5
-rw-r--r--source/blender/src/writeavicodec.c4
-rw-r--r--source/blender/src/writeimage.c5
-rw-r--r--source/blender/src/writemovie.c4
-rw-r--r--source/blender/verify/intern/BLO_verify.c4
-rw-r--r--source/blender/writeblenfile/intern/BLO_writeblenfile.c4
-rw-r--r--source/blender/writeblenfile/test/test.c4
-rw-r--r--source/blender/writestreamglue/intern/BLO_dumpFromMemory.c7
-rw-r--r--source/blender/writestreamglue/intern/BLO_getPubKey.c4
-rw-r--r--source/blender/writestreamglue/intern/BLO_streamGlueControl.c4
-rw-r--r--source/blender/writestreamglue/intern/BLO_writeStreamGlue.c8
-rw-r--r--source/blender/writestreamglue/stub/BLO_getPubKeySTUB.c4
-rw-r--r--source/blender/writestreamglue/stub/BLO_keyStoreSTUB.c4
-rw-r--r--source/blender/writestreamglue/stub/BLO_streamGlueControlSTUB.c6
-rw-r--r--source/blender/writestreamglue/stub/BLO_writeStreamGlueSTUB.c4
-rw-r--r--source/blender/writestreamglue/test/readwritetest/readwritetest.c4
-rw-r--r--source/blender/writestreamglue/test/typetest/typetest.c4
247 files changed, 1011 insertions, 79 deletions
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c
index e822e81a7f3..f2e99d4929d 100644
--- a/source/blender/avi/intern/avi.c
+++ b/source/blender/avi/intern/avi.c
@@ -46,6 +46,10 @@
#include "endian.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
static int AVI_DEBUG=0;
static char DEBUG_FCC[4];
diff --git a/source/blender/avi/intern/codecs.c b/source/blender/avi/intern/codecs.c
index fa44dd46c41..3daff52a947 100644
--- a/source/blender/avi/intern/codecs.c
+++ b/source/blender/avi/intern/codecs.c
@@ -41,6 +41,10 @@
#include "mjpeg.h"
#include "rgb32.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void *avi_format_convert (AviMovie *movie, int stream, void *buffer, AviFormat from, AviFormat to, int *size) {
if (from == to)
return buffer;
diff --git a/source/blender/avi/intern/mjpeg.c b/source/blender/avi/intern/mjpeg.c
index 8831e3ca615..ff31b04908a 100644
--- a/source/blender/avi/intern/mjpeg.c
+++ b/source/blender/avi/intern/mjpeg.c
@@ -43,6 +43,10 @@
#include "mjpeg.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#define PADUP(num, amt) ((num+(amt-1))&~(amt-1))
static void jpegmemdestmgr_build (j_compress_ptr cinfo, unsigned char *buffer, int bufsize);
diff --git a/source/blender/avi/intern/options.c b/source/blender/avi/intern/options.c
index 2c75c5773b7..a46688c8263 100644
--- a/source/blender/avi/intern/options.c
+++ b/source/blender/avi/intern/options.c
@@ -37,9 +37,12 @@
#include "AVI_avi.h"
#include "avi_intern.h"
-
#include "endian.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* avi_set_compress_options gets its own file... now don't WE feel important? */
AviError AVI_set_compress_option (AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data) {
diff --git a/source/blender/avi/intern/rgb32.c b/source/blender/avi/intern/rgb32.c
index b35bb9a7379..d838ba5b786 100644
--- a/source/blender/avi/intern/rgb32.c
+++ b/source/blender/avi/intern/rgb32.c
@@ -38,9 +38,12 @@
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
-
#include "rgb32.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void *avi_converter_from_rgb32 (AviMovie *movie, int stream, unsigned char *buffer, int *size) {
int y, x, rowstridea, rowstrideb;
unsigned char *buf;
diff --git a/source/blender/blenkernel/bad_level_call_stubs/stubs.c b/source/blender/blenkernel/bad_level_call_stubs/stubs.c
index 239e4f16487..fd28e670d65 100644
--- a/source/blender/blenkernel/bad_level_call_stubs/stubs.c
+++ b/source/blender/blenkernel/bad_level_call_stubs/stubs.c
@@ -33,11 +33,13 @@
#include "BLI_blenlib.h"
-
#include "DNA_material_types.h"
-
#include "BKE_bad_level_calls.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int winqueue_break= 0;
/* readfile.c */
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 928b714e340..46132db027b 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -66,6 +66,10 @@
#include "BKE_constraint.h"
#include "DNA_constraint_types.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* Local function prototypes */
static
void
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index afaf8b4ae66..859249eee1f 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -58,6 +58,10 @@
#include "BKE_bad_level_calls.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
ListBase duplilist= {0, 0};
void free_path(Path *path)
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 86ce2faa07c..b4ef397b64b 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -66,6 +66,10 @@
#include "IK_solver.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* Function prototypes */
static void apply_pose_bonechildren (Bone* bone, bPose* pose, int doit);
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 23927fd793c..00b63a4ed36 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -34,6 +34,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h> // for read close
#include <sys/param.h> // for MAXPATHLEN
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index c5c4221a076..6ea08b5cfbb 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -61,6 +61,10 @@
#include "BKE_bmfont.h"
#include "BKE_bmfont_types.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void printfGlyph(bmGlyph * glyph)
{
printf("unicode: %d '%c'\n", glyph->unicode, glyph->unicode);
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 9c1a4607dca..7ac20470878 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -57,6 +57,10 @@
#include "blendef.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
@@ -729,4 +733,4 @@ void free_constraint_channels (ListBase *chanbase)
}
BLI_freelistN(chanbase);
-} \ No newline at end of file
+}
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 06022977e2d..403908ab7c8 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -40,6 +40,10 @@
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index 76983001bb6..1cf76135371 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -36,15 +36,14 @@
*/
#include <string.h>
-
#include "MEM_guardedalloc.h"
-
#include "BLI_blenlib.h"
-
#include "DNA_object_types.h"
-
#include "BKE_deform.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
void color_temperature (float input, unsigned char *r, unsigned char *g, unsigned char *b)
{
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index bdcb17e2d54..8956d92a540 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -66,6 +66,9 @@
#include "BKE_displist.h"
#include "BKE_lattice.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
Effect *add_effect(int type)
{
diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c
index 7d14e711e83..6aead73a6d2 100644
--- a/source/blender/blenkernel/intern/exotic.c
+++ b/source/blender/blenkernel/intern/exotic.c
@@ -77,6 +77,11 @@
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 4f6b6c4b0c2..4cbc45ff401 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -39,6 +39,11 @@
#include <string.h>
#include <math.h>
#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 6f01d028326..65c4ed42e03 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -53,6 +53,10 @@
#include "BKE_object.h"
#include "BKE_ipo.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void free_object_key(ObjectKey *ok)
{
if(ok->ipo) ok->ipo->id.us--;
diff --git a/source/blender/blenkernel/intern/ika.c b/source/blender/blenkernel/intern/ika.c
index 885c64f0397..fefc8595b0c 100644
--- a/source/blender/blenkernel/intern/ika.c
+++ b/source/blender/blenkernel/intern/ika.c
@@ -56,6 +56,10 @@
#include "BKE_object.h"
#include "BKE_ika.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* Let's go! */
#define TOLER 0.000076
#define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c)
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index cab1efba716..b2abda296b6 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -36,6 +36,11 @@
#include <math.h>
#include <stdio.h>
#include <string.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index d3ea2da204b..0c19b33e3ac 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -61,6 +61,9 @@
#include "BKE_ipo.h"
#include "BKE_lattice.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#define KEY_BPOINT 1
#define KEY_BEZTRIPLE 2
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 64d4ca367b2..0e479f82f8c 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -63,6 +63,10 @@
#include "BKE_object.h"
#include "BKE_ika.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
Lattice *editLatt=0, *deformLatt=0;
float *latticedata=0, latmat[4][4];
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 97ede69280c..74cc09a1b8b 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -41,6 +41,10 @@
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 71d0e95031d..d39983c2f17 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -59,6 +59,10 @@
#include "BPY_extern.h"
#include "BKE_material.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void free_material(Material *ma)
{
int a;
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 9f09191f9d2..ce9e5f409a1 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -69,6 +69,10 @@
#include "BKE_displist.h"
#include "BKE_mball.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* Functions */
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index b691441f099..55496b30e68 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -35,6 +35,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 40851b27c6c..5adde76accc 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -34,17 +34,18 @@
#include "BKE_nla.h"
#include "BKE_blender.h"
-
#include "BLI_blenlib.h"
-
#include "DNA_space_types.h"
#include "DNA_nla_types.h"
#include "DNA_action_types.h"
#include "DNA_ID.h"
#include "DNA_ipo_types.h"
-
#include "MEM_guardedalloc.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void copy_actionstrip (bActionStrip **dst, bActionStrip **src){
bActionStrip *dstrip;
bActionStrip *sstrip = *src;
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index c6c91d00609..04b6ccede4d 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -33,11 +33,14 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
-
-
#include <string.h>
#include <math.h>
#include <stdio.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 991b4a8c840..f0058ee6ad0 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -35,6 +35,11 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c
index d097dba0db0..8d38b5e72ca 100644
--- a/source/blender/blenkernel/intern/property.c
+++ b/source/blender/blenkernel/intern/property.c
@@ -37,6 +37,10 @@
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index d1da1d4d1b6..1bc467e2fd3 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -37,6 +37,10 @@
#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 1f04c20cc72..c009a6be945 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -37,11 +37,13 @@
#include <math.h>
#include "DNA_screen_types.h"
-
#include "BKE_bad_level_calls.h"
-
#include "BLI_blenlib.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* don't free screen itself */
void free_screen(bScreen *sc)
{
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 6f8c46bb877..9d33e9163ce 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -20,6 +20,10 @@
#include "BKE_sound.h"
#include "BKE_packedFile.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
ListBase _samples = {0,0}, *samples = &_samples;
void sound_free_sound(bSound *sound)
diff --git a/source/blender/blenkernel/intern/subsurf.c b/source/blender/blenkernel/intern/subsurf.c
index 3f747fb684f..aeae6d3215d 100644
--- a/source/blender/blenkernel/intern/subsurf.c
+++ b/source/blender/blenkernel/intern/subsurf.c
@@ -35,6 +35,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 7f1c6f4935b..462b989a081 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -48,6 +48,10 @@
#include "BPY_extern.h" // Blender Python library
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/***************/ /*
How Texts should work
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index eed8a39d6ce..c4ed7865e4c 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -35,6 +35,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index d0f3ba4cb1a..f38911cedec 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -58,6 +58,9 @@
#include "BPY_extern.h"
#include "BKE_main.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
void free_world(World *wrld)
{
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index 49d4f5a6f40..5980d2b5fc4 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -35,6 +35,10 @@
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenlib/intern/BLI_dynstr.c b/source/blender/blenlib/intern/BLI_dynstr.c
index c9b7737427a..8bde670eef5 100644
--- a/source/blender/blenlib/intern/BLI_dynstr.c
+++ b/source/blender/blenlib/intern/BLI_dynstr.c
@@ -35,10 +35,13 @@
#include <string.h>
#include "MEM_guardedalloc.h"
-
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/***/
typedef struct DynStrElem DynStrElem;
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index d0f1f78fb73..bb7ef40ffb4 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -35,9 +35,12 @@
#include <string.h>
#include "MEM_guardedalloc.h"
-
#include "BLI_ghash.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/***/
static unsigned int hashsizes[]= {
diff --git a/source/blender/blenlib/intern/BLI_linklist.c b/source/blender/blenlib/intern/BLI_linklist.c
index 0c1275b6389..ad945b53d11 100644
--- a/source/blender/blenlib/intern/BLI_linklist.c
+++ b/source/blender/blenlib/intern/BLI_linklist.c
@@ -36,6 +36,10 @@
#include "BLI_linklist.h"
#include "BLI_memarena.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int BLI_linklist_length(LinkNode *list) {
if (0) {
return list?(1+BLI_linklist_length(list->next)):0;
diff --git a/source/blender/blenlib/intern/BLI_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c
index 596624fcc9e..218fdb3c45b 100644
--- a/source/blender/blenlib/intern/BLI_memarena.c
+++ b/source/blender/blenlib/intern/BLI_memarena.c
@@ -37,6 +37,10 @@
#include "BLI_memarena.h"
#include "BLI_linklist.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
struct MemArena {
unsigned char *curbuf;
int bufsize, cursize;
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 49f5772c6c3..88838342046 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -44,6 +44,10 @@
#include <string.h>
#include <float.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef __sun__
#include <strings.h>
#endif
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c
index c232be3c206..b1d19f46c38 100644
--- a/source/blender/blenlib/intern/dynlib.c
+++ b/source/blender/blenlib/intern/dynlib.c
@@ -30,9 +30,12 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#include <stdlib.h>
-
#include "../PIL_dynlib.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/*
* XXX, should use mallocN so we can see
* handle's not being released. fixme zr
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 02f54e60df6..a7d8c9c0323 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -39,6 +39,10 @@
#include <string.h>
#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#else
diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c
index eb49fe92cb1..fbbc42115d5 100644
--- a/source/blender/blenlib/intern/gsqueue.c
+++ b/source/blender/blenlib/intern/gsqueue.c
@@ -32,9 +32,12 @@
#include <string.h>
#include "MEM_guardedalloc.h"
-
#include "BLI_gsqueue.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
typedef struct _GSQueueElem GSQueueElem;
struct _GSQueueElem {
GSQueueElem *next;
diff --git a/source/blender/blenlib/intern/matrixops.c b/source/blender/blenlib/intern/matrixops.c
index f33596d803a..c95e0064155 100644
--- a/source/blender/blenlib/intern/matrixops.c
+++ b/source/blender/blenlib/intern/matrixops.c
@@ -41,6 +41,11 @@
#include "MTC_matrixops.h"
#include "MTC_vectorops.h"
/* ------------------------------------------------------------------------- */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 124b520ed11..ca2cf44595f 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -35,6 +35,10 @@
#include <math.h>
#include "BLI_blenlib.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#pragma warning (once : 4244) // "conversion from double to float"
#pragma warning (once : 4305) // "truncation from const double to float"
diff --git a/source/blender/blenlib/intern/psfont.c b/source/blender/blenlib/intern/psfont.c
index ea2525c1f90..4a04e40403c 100644
--- a/source/blender/blenlib/intern/psfont.c
+++ b/source/blender/blenlib/intern/psfont.c
@@ -46,6 +46,10 @@
#include "DNA_packedFile_types.h"
#include "DNA_curve_types.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* ObjFnt types */
typedef struct chardesc {
diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c
index bf29d57c2cf..e7c9ec1c864 100644
--- a/source/blender/blenlib/intern/rand.c
+++ b/source/blender/blenlib/intern/rand.c
@@ -32,6 +32,10 @@
#include "PIL_time.h"
#include "BLI_rand.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
typedef unsigned __int64 r_uint64;
#else
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index 373edd1af5a..1b19a6b769d 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -41,6 +41,10 @@
#include "DNA_vec_types.h"
#include "BLI_blenlib.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int BLI_rcti_is_empty(rcti * rect)
{
return ((rect->xmax<=rect->xmin) ||
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index a6a1771148f..153d24aaf99 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -46,6 +46,10 @@
#include "BLI_scanfill.h"
#include "BLI_callbacks.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* callbacks for errors and interrupts and some goo */
static void (*BLI_localErrorCallBack)(char*) = NULL;
static int (*BLI_localInterruptCallBack)(void) = NULL;
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 1f86fcbf54b..58b5607ded5 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -36,6 +36,10 @@
#include <stdio.h>
#include <stdlib.h> /* voorkomt dat je bij malloc type moet aangeven */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <windows.h>
diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c
index 832a6c8b2e9..47abca10b36 100644
--- a/source/blender/blenlib/intern/time.c
+++ b/source/blender/blenlib/intern/time.c
@@ -31,6 +31,10 @@
*/
#include "PIL_time.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <windows.h>
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index f3a2d4f3970..abee9e3bad3 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -46,6 +46,10 @@
#include "BLI_util.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/blenlib/intern/vectorops.c b/source/blender/blenlib/intern/vectorops.c
index 9314e7fca3e..ee4cabac1d3 100644
--- a/source/blender/blenlib/intern/vectorops.c
+++ b/source/blender/blenlib/intern/vectorops.c
@@ -44,6 +44,10 @@
#include "MTC_vectorops.h"
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void MTC_diff3Int(int v1[3], int v2[3], int v3[3])
{
v1[0] = v2[0] - v3[0];
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 91062297cda..a0fb005e992 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -31,6 +31,10 @@
* Windows-posix compatibility layer, windows-specific functions.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <stdlib.h>
diff --git a/source/blender/blenloader/intern/genfile.c b/source/blender/blenloader/intern/genfile.c
index 6d897b500bd..3cd7a6c868b 100644
--- a/source/blender/blenloader/intern/genfile.c
+++ b/source/blender/blenloader/intern/genfile.c
@@ -31,6 +31,10 @@
* DNA handling
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h> // for read close
#else
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 2f4723e6b8c..7797f4468d1 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -31,6 +31,10 @@
* .blend file reading entry point
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 7addde6e529..0430921d92e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -31,6 +31,10 @@
* .blend file reading
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "winsock2.h"
#include "BLI_winstuff.h"
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 61c933cb005..68084bd533e 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -74,6 +74,10 @@ ACHTER LibBlock
- schrijf USER als aangegeven (~/.B.blend)
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/blenpluginapi/intern/pluginapi.c b/source/blender/blenpluginapi/intern/pluginapi.c
index e4e4058707f..889c50fe0dc 100644
--- a/source/blender/blenpluginapi/intern/pluginapi.c
+++ b/source/blender/blenpluginapi/intern/pluginapi.c
@@ -41,6 +41,10 @@
* - util.h : Useful defines, memory management.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "blenpluginapi\util.h"
#else
diff --git a/source/blender/bpython/intern/BPY_constobject.c b/source/blender/bpython/intern/BPY_constobject.c
index 9f1a6b4cc3b..3dca07a6105 100644
--- a/source/blender/bpython/intern/BPY_constobject.c
+++ b/source/blender/bpython/intern/BPY_constobject.c
@@ -51,9 +51,12 @@ c = module.Const['CONSTANT']
#include "Python.h"
#include "BPY_macros.h"
-
#include "BPY_constobject.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#define Const_Check(v) ((v)->ob_type == &Const_Type)
diff --git a/source/blender/bpython/intern/BPY_csg.c b/source/blender/bpython/intern/BPY_csg.c
index 7237a843428..fe9af750209 100644
--- a/source/blender/bpython/intern/BPY_csg.c
+++ b/source/blender/bpython/intern/BPY_csg.c
@@ -33,17 +33,17 @@
// TODO
-
#include "Python.h"
-
#include "BPY_csg.h"
-
#include "BKE_booleanops_mesh.h"
#include "BKE_booleanops.h"
#include "MEM_guardedalloc.h"
-
#include "b_interface.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef DEBUG
#define CSG_DEBUG(str) \
{ printf str; }
diff --git a/source/blender/bpython/intern/BPY_image.c b/source/blender/bpython/intern/BPY_image.c
index a94abb594a7..ce4332eb87e 100644
--- a/source/blender/bpython/intern/BPY_image.c
+++ b/source/blender/bpython/intern/BPY_image.c
@@ -40,6 +40,10 @@
#include "BPY_macros.h"
#include "b_interface.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
PyObject *INITMODULE(Image)(void);
/* Image_Get */
diff --git a/source/blender/bpython/intern/BPY_ipo.c b/source/blender/bpython/intern/BPY_ipo.c
index 237692ca38d..d1966ce58fd 100644
--- a/source/blender/bpython/intern/BPY_ipo.c
+++ b/source/blender/bpython/intern/BPY_ipo.c
@@ -44,6 +44,10 @@
#include "BSE_editipo.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* GLOBALS */
/* These should be put into a proper dictionary for quicker retrieval..*/
diff --git a/source/blender/bpython/intern/BPY_links.c b/source/blender/bpython/intern/BPY_links.c
index e3c6458ef82..8cde80d176d 100644
--- a/source/blender/bpython/intern/BPY_links.c
+++ b/source/blender/bpython/intern/BPY_links.c
@@ -37,6 +37,10 @@
#include "BPY_macros.h"
#include "b_interface.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* GLOBALS */
PyObject *g_blenderdict;
diff --git a/source/blender/bpython/intern/BPY_main.c b/source/blender/bpython/intern/BPY_main.c
index 17995476749..f65bcce693a 100644
--- a/source/blender/bpython/intern/BPY_main.c
+++ b/source/blender/bpython/intern/BPY_main.c
@@ -46,6 +46,10 @@
#include "mydevice.h"
#include "import.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* PROTOS */
extern void init_frozenmodules(void); // frozen module library
diff --git a/source/blender/bpython/intern/BPY_object.c b/source/blender/bpython/intern/BPY_object.c
index d0184f9b729..054891dc9a5 100644
--- a/source/blender/bpython/intern/BPY_object.c
+++ b/source/blender/bpython/intern/BPY_object.c
@@ -41,6 +41,10 @@
#include "BLI_arithb.h" /* Mat4Invert */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* PROTOS */
diff --git a/source/blender/bpython/intern/BPY_scene.c b/source/blender/bpython/intern/BPY_scene.c
index 19e992e6bb1..0918d116e3b 100644
--- a/source/blender/bpython/intern/BPY_scene.c
+++ b/source/blender/bpython/intern/BPY_scene.c
@@ -52,6 +52,10 @@
#include "BPY_macros.h"
#include "BPY_window.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* DEFINES */
#define CHECK_VALIDSCENE(x) CHECK_VALIDDATA(x, \
diff --git a/source/blender/bpython/intern/BPY_text.c b/source/blender/bpython/intern/BPY_text.c
index 855e12a6b9f..535595df564 100644
--- a/source/blender/bpython/intern/BPY_text.c
+++ b/source/blender/bpython/intern/BPY_text.c
@@ -74,6 +74,10 @@
#include "b_interface.h"
#include "opy_datablock.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
DATABLOCK_GET(Textmodule, text object, getTextList())
#define CHECK_VALIDTEXT(x) CHECK_VALIDDATA(x, \
diff --git a/source/blender/bpython/intern/BPY_tools.c b/source/blender/bpython/intern/BPY_tools.c
index 5a2c483607c..6ae82ad4267 100644
--- a/source/blender/bpython/intern/BPY_tools.c
+++ b/source/blender/bpython/intern/BPY_tools.c
@@ -34,6 +34,10 @@
#include "BKE_global.h"
#include "BPY_tools.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* These should all have BPY prefixes later on */
PyObject *BPY_incr_ret(PyObject *ob) {
diff --git a/source/blender/bpython/intern/b_import.c b/source/blender/bpython/intern/b_import.c
index e490ee82338..1e4c27af77f 100644
--- a/source/blender/bpython/intern/b_import.c
+++ b/source/blender/bpython/intern/b_import.c
@@ -40,8 +40,6 @@
*/
-
-
#include "DNA_text_types.h"
#include "Python.h"
#include "import.h"
@@ -49,14 +47,15 @@
#include "BKE_main.h"
#include "BKE_library.h"
#include "BKE_text.h"
-
#include "BLI_blenlib.h" // mallocs
-
#include "BPY_macros.h"
#include "BPY_main.h"
-
#include "b_import.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* ---------------------------------------------------------------------------- */
diff --git a/source/blender/bpython/intern/b_interface.c b/source/blender/bpython/intern/b_interface.c
index ec89680ad91..850ee1fd695 100644
--- a/source/blender/bpython/intern/b_interface.c
+++ b/source/blender/bpython/intern/b_interface.c
@@ -58,6 +58,10 @@
#include "b_interface.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/************************************************************************
* Generic low level routines
*
diff --git a/source/blender/bpython/intern/opy_blender.c b/source/blender/bpython/intern/opy_blender.c
index 6bbac3d958e..642f4c22e03 100644
--- a/source/blender/bpython/intern/opy_blender.c
+++ b/source/blender/bpython/intern/opy_blender.c
@@ -59,6 +59,10 @@
//#include "screen.h"
//#include "ipo.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void INITMODULE(BLENDERMODULE)(void);
PyObject *g_sysmodule;
diff --git a/source/blender/bpython/intern/opy_datablock.c b/source/blender/bpython/intern/opy_datablock.c
index 6804c834897..3e63e2d5610 100644
--- a/source/blender/bpython/intern/opy_datablock.c
+++ b/source/blender/bpython/intern/opy_datablock.c
@@ -99,6 +99,10 @@
#include "b_interface.h" /* needed for most of the DNA datatypes */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* ---------------------------------------------------------------------- */
diff --git a/source/blender/bpython/intern/opy_matrix.c b/source/blender/bpython/intern/opy_matrix.c
index cd93bd5f311..df91c499fb1 100644
--- a/source/blender/bpython/intern/opy_matrix.c
+++ b/source/blender/bpython/intern/opy_matrix.c
@@ -41,6 +41,10 @@
#include "BLI_arithb.h"
#include "opy_vector.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
PyObject *BPY_tuple_repr(PyObject *self, int size);
/* PROTOS */
diff --git a/source/blender/bpython/intern/opy_nmesh.c b/source/blender/bpython/intern/opy_nmesh.c
index 48de7726dd8..6d1cbc2ecd8 100644
--- a/source/blender/bpython/intern/opy_nmesh.c
+++ b/source/blender/bpython/intern/opy_nmesh.c
@@ -59,6 +59,11 @@
#include "opy_vector.h"
#include "b_interface.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* PROTOS */
static int convert_NMeshToMesh(Mesh *mesh, NMesh *nmesh);
diff --git a/source/blender/bpython/intern/opy_vector.c b/source/blender/bpython/intern/opy_vector.c
index 905c6aeed34..fa318251cf1 100644
--- a/source/blender/bpython/intern/opy_vector.c
+++ b/source/blender/bpython/intern/opy_vector.c
@@ -38,7 +38,9 @@
#include "BPY_modules.h"
#include "opy_vector.h"
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
/*****************************/
/* Vector Python Object */
diff --git a/source/blender/bpython/intern/opy_window.c b/source/blender/bpython/intern/opy_window.c
index 8aa976382a9..f5d4b07ff0c 100644
--- a/source/blender/bpython/intern/opy_window.c
+++ b/source/blender/bpython/intern/opy_window.c
@@ -54,6 +54,9 @@
#include "DNA_view3d_types.h"
#include "DNA_space_types.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
/*********************************/
/* helper routines */
diff --git a/source/blender/decrypt/intern/BLO_decrypt.c b/source/blender/decrypt/intern/BLO_decrypt.c
index 4d2eefd9631..9d3fd6fb63a 100644
--- a/source/blender/decrypt/intern/BLO_decrypt.c
+++ b/source/blender/decrypt/intern/BLO_decrypt.c
@@ -48,6 +48,10 @@
#include "BLO_decrypt.h"
#include "BLO_en_de_cryptHeader.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
struct decryptStructType {
struct readStreamGlueStruct *streamGlue;
unsigned int streamDone;
diff --git a/source/blender/decrypt/stub/BLO_decryptSTUB.c b/source/blender/decrypt/stub/BLO_decryptSTUB.c
index 62d78bfd983..e11aafc9ca7 100644
--- a/source/blender/decrypt/stub/BLO_decryptSTUB.c
+++ b/source/blender/decrypt/stub/BLO_decryptSTUB.c
@@ -38,6 +38,10 @@
#include "BLO_readStreamErrors.h"
#include "BLO_decrypt.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
BLO_decryptStructHandle
BLO_decrypt_begin(
void *endControl)
diff --git a/source/blender/deflate/intern/BLO_deflate.c b/source/blender/deflate/intern/BLO_deflate.c
index 407b4f77c3a..372a4d40163 100644
--- a/source/blender/deflate/intern/BLO_deflate.c
+++ b/source/blender/deflate/intern/BLO_deflate.c
@@ -42,6 +42,10 @@
#include "BLO_deflate.h"
#include "BLO_in_de_flateHeader.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
// TODO use other error function
static int CHECK_ERR(int err, char *msg);
diff --git a/source/blender/deflate/stub/BLO_deflateSTUB.c b/source/blender/deflate/stub/BLO_deflateSTUB.c
index cb6323dfd3e..fc0b038bc0a 100644
--- a/source/blender/deflate/stub/BLO_deflateSTUB.c
+++ b/source/blender/deflate/stub/BLO_deflateSTUB.c
@@ -37,6 +37,10 @@
#include "BLO_streamglue.h"
#include "BLO_deflate.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int
BLO_deflate(
unsigned char *data,
diff --git a/source/blender/deflate/test/stubbed/stubbed.c b/source/blender/deflate/test/stubbed/stubbed.c
index 9984676e9f6..9f1d03e780e 100644
--- a/source/blender/deflate/test/stubbed/stubbed.c
+++ b/source/blender/deflate/test/stubbed/stubbed.c
@@ -55,6 +55,10 @@
#include "BLO_deflate.h"
#include "BLO_writeStreamGlue.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
struct streamGlueControlStruct *Global_streamGlueControl;
void printStreamGlueHeader(struct streamGlueHeaderStruct *s)
diff --git a/source/blender/encrypt/intern/BLO_encrypt.c b/source/blender/encrypt/intern/BLO_encrypt.c
index ecea0d5fc14..ce44baf5e22 100644
--- a/source/blender/encrypt/intern/BLO_encrypt.c
+++ b/source/blender/encrypt/intern/BLO_encrypt.c
@@ -34,6 +34,10 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 8d9eb17c9c2..01f887bd514 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -44,6 +44,10 @@
#include "IMB_divers.h"
#include "IMB_allocimbuf.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
static unsigned int dfltcmap[16] = {
0x00000000, 0xffffffff, 0x777777ff, 0xccccccff,
0xcc3344ff, 0xdd8844ff, 0xccdd44ff, 0x888833ff,
diff --git a/source/blender/imbuf/intern/amiga.c b/source/blender/imbuf/intern/amiga.c
index a006b415d9c..393b16f6268 100644
--- a/source/blender/imbuf/intern/amiga.c
+++ b/source/blender/imbuf/intern/amiga.c
@@ -43,6 +43,10 @@
#include "IMB_bitplanes.h"
#include "IMB_amiga.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* actually hard coded endianness */
#define GET_BIG_LONG(x) (((uchar *) (x))[0] << 24 | ((uchar *) (x))[1] << 16 | ((uchar *) (x))[2] << 8 | ((uchar *) (x))[3])
#define GET_LITTLE_LONG(x) (((uchar *) (x))[3] << 24 | ((uchar *) (x))[2] << 16 | ((uchar *) (x))[1] << 8 | ((uchar *) (x))[0])
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c
index 9525fe4ab5f..7fcf094e5e7 100644
--- a/source/blender/imbuf/intern/anim.c
+++ b/source/blender/imbuf/intern/anim.c
@@ -41,6 +41,10 @@
#include <commdlg.h>
#include <vfw.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#undef AVIIF_KEYFRAME // redefined in AVI_avi.h
#undef AVIIF_LIST // redefined in AVI_avi.h
diff --git a/source/blender/imbuf/intern/antialias.c b/source/blender/imbuf/intern/antialias.c
index de45a47a708..6c6513bd107 100644
--- a/source/blender/imbuf/intern/antialias.c
+++ b/source/blender/imbuf/intern/antialias.c
@@ -40,9 +40,12 @@
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_allocimbuf.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* werking:
1 - zoek een overgang in een kolom
diff --git a/source/blender/imbuf/intern/bitplanes.c b/source/blender/imbuf/intern/bitplanes.c
index 0f1c4bf238c..60e04e0f5ca 100644
--- a/source/blender/imbuf/intern/bitplanes.c
+++ b/source/blender/imbuf/intern/bitplanes.c
@@ -39,10 +39,12 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_allocimbuf.h"
#include "IMB_bitplanes.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
unsigned int **imb_copyplanelist(struct ImBuf *ibuf)
{
diff --git a/source/blender/imbuf/intern/bmp_decode.c b/source/blender/imbuf/intern/bmp_decode.c
index d8b38f367e0..79a249c6b81 100644
--- a/source/blender/imbuf/intern/bmp_decode.c
+++ b/source/blender/imbuf/intern/bmp_decode.c
@@ -40,11 +40,13 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_allocimbuf.h"
#include "IMB_cmap.h"
#include "IMB_bmp.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
// some code copied from article on microsoft.com, copied
// here for enhanced BMP support in the future
diff --git a/source/blender/imbuf/intern/cmap.c b/source/blender/imbuf/intern/cmap.c
index 300c3049dea..36dd5318380 100644
--- a/source/blender/imbuf/intern/cmap.c
+++ b/source/blender/imbuf/intern/cmap.c
@@ -42,6 +42,10 @@
#include "IMB_cmap.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
static short *lastcube = 0;
static uchar *lastcoltab = 0;
static short lastmaxcol;
diff --git a/source/blender/imbuf/intern/cspace.c b/source/blender/imbuf/intern/cspace.c
index 5cd2da5a998..51b1c3c6639 100644
--- a/source/blender/imbuf/intern/cspace.c
+++ b/source/blender/imbuf/intern/cspace.c
@@ -37,6 +37,10 @@
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/************************************************************************/
/* COLORSPACE */
/************************************************************************/
diff --git a/source/blender/imbuf/intern/data.c b/source/blender/imbuf/intern/data.c
index ad9194cb80e..12e7b34436f 100644
--- a/source/blender/imbuf/intern/data.c
+++ b/source/blender/imbuf/intern/data.c
@@ -35,6 +35,10 @@
#include "imbuf.h"
#include "matrix.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/*
static short quadbase[31] = {
150,133,117,102,
diff --git a/source/blender/imbuf/intern/dither.c b/source/blender/imbuf/intern/dither.c
index 608332af244..367e23abcd9 100644
--- a/source/blender/imbuf/intern/dither.c
+++ b/source/blender/imbuf/intern/dither.c
@@ -39,6 +39,10 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void IMB_dit0(struct ImBuf * ibuf, short ofs, short bits)
{
int x, y, and, add, pix;
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 81484ef6dfc..76197aa4eeb 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -38,9 +38,11 @@
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_divers.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
void imb_checkncols(struct ImBuf *ibuf)
/* struct ImBuf *ibuf; */
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index dfc6e26e68a..aac5b2c625d 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -38,9 +38,12 @@
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_filter.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/************************************************************************/
/* FILTERS */
diff --git a/source/blender/imbuf/intern/ham.c b/source/blender/imbuf/intern/ham.c
index f9c6cf996a0..1ac6ca2bafe 100644
--- a/source/blender/imbuf/intern/ham.c
+++ b/source/blender/imbuf/intern/ham.c
@@ -38,11 +38,14 @@
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_cmap.h"
#include "IMB_hamx.h"
#include "IMB_ham.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
extern short alpha_col0;
#define HAMB 0x0100
diff --git a/source/blender/imbuf/intern/hamx.c b/source/blender/imbuf/intern/hamx.c
index 69e686ecdfc..4829b300e81 100644
--- a/source/blender/imbuf/intern/hamx.c
+++ b/source/blender/imbuf/intern/hamx.c
@@ -33,6 +33,11 @@
*/
#include "BLI_blenlib.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#include <io.h>
diff --git a/source/blender/imbuf/intern/iff.c b/source/blender/imbuf/intern/iff.c
index 640eb253c26..c23f18f73b0 100644
--- a/source/blender/imbuf/intern/iff.c
+++ b/source/blender/imbuf/intern/iff.c
@@ -33,13 +33,15 @@
*/
#include "BLI_blenlib.h"
-
#include "imbuf.h"
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
-
#include "IMB_iff.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
unsigned short imb_start_iff(struct ImBuf *ibuf, int file)
{
unsigned int *point, size, *buf;
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index dcdd0692fc4..78550903b69 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -42,6 +42,10 @@
#include "IMB_imbuf.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* Only this one is used liberally here, and in imbuf */
void IMB_convert_rgba_to_abgr(int size, unsigned int *rect)
{
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 72a9a76d044..e3a3e490941 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -34,15 +34,16 @@
#include <string.h>
#include "BLI_blenlib.h"
-
#include "imbuf.h"
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_allocimbuf.h"
#include "IMB_iris.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
typedef struct {
unsigned short imagic; /* stuff saved on disk . . */
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 8132997e5cd..7e6a63f3f5a 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -41,11 +41,13 @@
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
#include "IMB_jpeg.h"
-
#include "jpeglib.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* the types are from the jpeg lib */
static void jpeg_error (j_common_ptr cinfo);
static void init_source(j_decompress_ptr cinfo);
diff --git a/source/blender/imbuf/intern/png_decode.c b/source/blender/imbuf/intern/png_decode.c
index c4d795fa5af..3f9f3936270 100644
--- a/source/blender/imbuf/intern/png_decode.c
+++ b/source/blender/imbuf/intern/png_decode.c
@@ -32,6 +32,10 @@
#include "png.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/imbuf/intern/png_encode.c b/source/blender/imbuf/intern/png_encode.c
index a4423f57830..d5d25dceca6 100644
--- a/source/blender/imbuf/intern/png_encode.c
+++ b/source/blender/imbuf/intern/png_encode.c
@@ -33,6 +33,10 @@
#include "png.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 9c8e42d0702..751d4106200 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -47,6 +47,10 @@
#include "IMB_jpeg.h"
#include "IMB_bmp.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* actually hard coded endianness */
#define GET_BIG_LONG(x) (((uchar *) (x))[0] << 24 | ((uchar *) (x))[1] << 16 | ((uchar *) (x))[2] << 8 | ((uchar *) (x))[3])
#define GET_LITTLE_LONG(x) (((uchar *) (x))[3] << 24 | ((uchar *) (x))[2] << 16 | ((uchar *) (x))[1] << 8 | ((uchar *) (x))[0])
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index 32f01eea6c8..baeda999e89 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -32,6 +32,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/imbuf/intern/rotate.c b/source/blender/imbuf/intern/rotate.c
index edd82347a8c..34ea65af1ab 100644
--- a/source/blender/imbuf/intern/rotate.c
+++ b/source/blender/imbuf/intern/rotate.c
@@ -32,6 +32,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index eb397f6bced..477fbecf5c8 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -32,6 +32,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index dd1451a939a..fc098deddf4 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -30,6 +30,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#include <io.h>
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 52a29217bef..af95e0f8324 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -42,6 +42,10 @@
#include "IMB_targa.h"
#include "IMB_png.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* from misc_util: flip the bytes from x */
#define GS(x) (((unsigned char *)(x))[0] << 8 | ((unsigned char *)(x))[1])
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index e4d24097760..015a062f1cf 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -53,6 +53,10 @@
#include "IMB_bitplanes.h"
#include "IMB_divers.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
short (*IMB_fp_png_encode)(struct ImBuf *ibuf, int file, int flags) = 0;
diff --git a/source/blender/inflate/intern/BLO_inflate.c b/source/blender/inflate/intern/BLO_inflate.c
index 62c90fcb06a..50245ab7372 100644
--- a/source/blender/inflate/intern/BLO_inflate.c
+++ b/source/blender/inflate/intern/BLO_inflate.c
@@ -43,6 +43,10 @@
#include "BLO_inflate.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
// TODO use other error function
static int CHECK_ERR(int err, char *msg);
diff --git a/source/blender/makesdna/intern/dna.c b/source/blender/makesdna/intern/dna.c
index e4de70fbc34..4e24ee72a7d 100644
--- a/source/blender/makesdna/intern/dna.c
+++ b/source/blender/makesdna/intern/dna.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
unsigned char DNAstr[]= {
83,68,78,65,78,65,77,69,219,3,0,0,42,110,101,120,116,0,42,112,
114,101,118,0,42,102,105,114,115,116,0,42,108,97,115,116,0,120,0,121,
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 98a23472a9c..ddfd822b56d 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -56,9 +56,12 @@
#include <stdio.h>
#include "MEM_guardedalloc.h"
-
#include "DNA_sdna_types.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#define SDNA_MAX_FILENAME_LENGTH 255
diff --git a/source/blender/misc/blendertimer.c b/source/blender/misc/blendertimer.c
index 02b42a866b0..93b4cb275aa 100644
--- a/source/blender/misc/blendertimer.c
+++ b/source/blender/misc/blendertimer.c
@@ -34,6 +34,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#else
diff --git a/source/blender/radiosity/intern/source/raddisplay.c b/source/blender/radiosity/intern/source/raddisplay.c
index b2689cf2ad6..de8ffbacd81 100644
--- a/source/blender/radiosity/intern/source/raddisplay.c
+++ b/source/blender/radiosity/intern/source/raddisplay.c
@@ -43,6 +43,10 @@
#include <stdlib.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/radiosity/intern/source/radfactors.c b/source/blender/radiosity/intern/source/radfactors.c
index 2f6ac2043c2..9ea47a9a298 100644
--- a/source/blender/radiosity/intern/source/radfactors.c
+++ b/source/blender/radiosity/intern/source/radfactors.c
@@ -40,7 +40,6 @@
#include <string.h>
#include <math.h>
-
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
@@ -57,6 +56,10 @@
#include "render.h" /* for `RE_zbufferall_radio and RE_zbufferall_radio */
#include "blendertimer.h" /* timer functions */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* locals */
void rad_setmatrices(RadView *vw);
void clearsubflagelem(RNode *rn);
diff --git a/source/blender/radiosity/intern/source/radio.c b/source/blender/radiosity/intern/source/radio.c
index af3797d6c2b..b601605157a 100644
--- a/source/blender/radiosity/intern/source/radio.c
+++ b/source/blender/radiosity/intern/source/radio.c
@@ -96,6 +96,10 @@
#include "radio.h"
#include "mydevice.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* locals? This one was already done in radio.h... */
/* void rad_status_str(char *str); */
diff --git a/source/blender/radiosity/intern/source/radnode.c b/source/blender/radiosity/intern/source/radnode.c
index b75edc0c2cf..522f08d4e00 100644
--- a/source/blender/radiosity/intern/source/radnode.c
+++ b/source/blender/radiosity/intern/source/radnode.c
@@ -53,6 +53,10 @@
#include "radio.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* locals */
void *malloc_fast(int size);
void *calloc_fast(int size);
diff --git a/source/blender/radiosity/intern/source/radpostprocess.c b/source/blender/radiosity/intern/source/radpostprocess.c
index 8cbbfb1f4de..010189ccb81 100644
--- a/source/blender/radiosity/intern/source/radpostprocess.c
+++ b/source/blender/radiosity/intern/source/radpostprocess.c
@@ -43,6 +43,10 @@
#include <stdlib.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/radiosity/intern/source/radpreprocess.c b/source/blender/radiosity/intern/source/radpreprocess.c
index c04886ca2fc..9946809926d 100644
--- a/source/blender/radiosity/intern/source/radpreprocess.c
+++ b/source/blender/radiosity/intern/source/radpreprocess.c
@@ -64,9 +64,11 @@
#include "radio.h"
-void setparelem(RNode *rn, RPatch *par);
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+void setparelem(RNode *rn, RPatch *par);
void splitconnected()
{
diff --git a/source/blender/readblenfile/intern/BLO_readblenfile.c b/source/blender/readblenfile/intern/BLO_readblenfile.c
index 9b9bf7d27a3..28937935497 100644
--- a/source/blender/readblenfile/intern/BLO_readblenfile.c
+++ b/source/blender/readblenfile/intern/BLO_readblenfile.c
@@ -36,6 +36,10 @@
#include <string.h>
#include <fcntl.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <io.h> // read, open
#else // ! WIN32
diff --git a/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c b/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
index 19ebd4491bb..4c52cb1b77f 100644
--- a/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
+++ b/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
@@ -34,6 +34,10 @@
#include <stdio.h>
#include "GEN_messaging.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int
BLO_readblenfilememory(
char *fromBuffer, int fromBufferSize)
diff --git a/source/blender/readblenfile/test/test.c b/source/blender/readblenfile/test/test.c
index 6210cb6f219..5b2a194e0e0 100644
--- a/source/blender/readblenfile/test/test.c
+++ b/source/blender/readblenfile/test/test.c
@@ -32,6 +32,10 @@
#include <string.h> // strlen
#include "BLO_readblenfile.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
struct streamGlueControlStruct *Global_streamGlueControl;
int
diff --git a/source/blender/readstreamglue/intern/BLO_keyStore.c b/source/blender/readstreamglue/intern/BLO_keyStore.c
index 3936e73326c..b0da0026408 100644
--- a/source/blender/readstreamglue/intern/BLO_keyStore.c
+++ b/source/blender/readstreamglue/intern/BLO_keyStore.c
@@ -37,6 +37,10 @@
#include "BLO_keyStore.h"
#include "BLO_keyStorePrivate.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
// our ugly but private global pointer
static struct keyStoreStruct *keyStore = NULL;
diff --git a/source/blender/readstreamglue/intern/BLO_readStreamGlue.c b/source/blender/readstreamglue/intern/BLO_readStreamGlue.c
index 5f2754d8628..a6d45188dec 100644
--- a/source/blender/readstreamglue/intern/BLO_readStreamGlue.c
+++ b/source/blender/readstreamglue/intern/BLO_readStreamGlue.c
@@ -47,6 +47,10 @@
#include "BLO_decrypt.h"
#include "BLO_verify.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
unsigned int
correctByteOrder(
unsigned int x)
diff --git a/source/blender/readstreamglue/intern/BLO_readStreamGlueLoopBack.c b/source/blender/readstreamglue/intern/BLO_readStreamGlueLoopBack.c
index e63ae974d5c..84e74407034 100644
--- a/source/blender/readstreamglue/intern/BLO_readStreamGlueLoopBack.c
+++ b/source/blender/readstreamglue/intern/BLO_readStreamGlueLoopBack.c
@@ -36,6 +36,10 @@
#include "BLO_readStreamGlue.h"
#include "BLO_readStreamGlueLoopBack.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
struct readStreamGlueLoopBackStruct *
readStreamGlueLoopBack_begin(
void *endControl)
diff --git a/source/blender/render/intern/source/RE_callbacks.c b/source/blender/render/intern/source/RE_callbacks.c
index 6228edf1731..c0223cf4cec 100644
--- a/source/blender/render/intern/source/RE_callbacks.c
+++ b/source/blender/render/intern/source/RE_callbacks.c
@@ -36,6 +36,10 @@
#include "render_intern.h"
#include "RE_callbacks.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/*
* The callbacks are done in three parts:
*
diff --git a/source/blender/render/intern/source/edgeRender.c b/source/blender/render/intern/source/edgeRender.c
index d3c944efac7..1309336b334 100644
--- a/source/blender/render/intern/source/edgeRender.c
+++ b/source/blender/render/intern/source/edgeRender.c
@@ -67,6 +67,10 @@
#include "zbuf.h" /* for zbufclipwire and zbufclip */
#include "jitter.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef RE_EDGERENDERSAFE
char edgeRender_h[] = EDGERENDER_H;
char edgeRender_c[] = "$Id$";
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index 8aebe3670d0..9e6e406253b 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -37,6 +37,10 @@
#include <math.h>
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/render/intern/source/errorHandler.c b/source/blender/render/intern/source/errorHandler.c
index fc21ee272c4..ed72a68a968 100644
--- a/source/blender/render/intern/source/errorHandler.c
+++ b/source/blender/render/intern/source/errorHandler.c
@@ -34,9 +34,12 @@
#include "GEN_messaging.h"
#include "stdio.h"
#include "errorHandler.h"
-
#include "render_intern.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* ------------------------------------------------------------------------- */
/* counters for error handling */
diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c
index b25e7f0cdca..8af6edf76da 100644
--- a/source/blender/render/intern/source/gammaCorrectionTables.c
+++ b/source/blender/render/intern/source/gammaCorrectionTables.c
@@ -35,9 +35,12 @@
#include "gammaCorrectionTables.h"
#include <stdlib.h>
#include <math.h>
-
#include "render_intern.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* There are two parts here: one for the old renderer, one for the unified */
/* renderer. we start with the latter. */
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index 67fddc271e6..b694e3e932a 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -38,6 +38,10 @@
#include <string.h>
#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/render/intern/source/jitter.c b/source/blender/render/intern/source/jitter.c
index 19311132a7e..8d6c632abde 100644
--- a/source/blender/render/intern/source/jitter.c
+++ b/source/blender/render/intern/source/jitter.c
@@ -43,6 +43,10 @@
#include "render_intern.h"
#include "jitter.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
float jit[64][2];
void init_render_jit(int nr);
diff --git a/source/blender/render/intern/source/outerRenderLoop.c b/source/blender/render/intern/source/outerRenderLoop.c
index 1e16fd251db..21e8796dcd5 100644
--- a/source/blender/render/intern/source/outerRenderLoop.c
+++ b/source/blender/render/intern/source/outerRenderLoop.c
@@ -51,6 +51,10 @@
#include "renderHelp.h"
#include "RE_callbacks.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
extern short pa; /* can move to inside the outer loop */
/* should make a gamtab module, just like the jitter... */
extern unsigned short *mask1[9], *mask2[9], *igamtab2;
diff --git a/source/blender/render/intern/source/pixelblending.c b/source/blender/render/intern/source/pixelblending.c
index 4fa3703d865..9e928aa9fec 100644
--- a/source/blender/render/intern/source/pixelblending.c
+++ b/source/blender/render/intern/source/pixelblending.c
@@ -50,6 +50,9 @@
#include "gammaCorrectionTables.h"
/* externals */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
/* ------------------------------------------------------------------------- */
/* Debug/behaviour defines */
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index ff69b4226bf..18213925884 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -86,6 +86,10 @@
#include "errorHandler.h"
#include "pixelshading.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* ------------------------------------------------------------------------- */
/* maybe declare local functions here? */
/* ------------------------------------------------------------------------- */
diff --git a/source/blender/render/intern/source/renderHelp.c b/source/blender/render/intern/source/renderHelp.c
index c7294d0feeb..54cf5e0c506 100644
--- a/source/blender/render/intern/source/renderHelp.c
+++ b/source/blender/render/intern/source/renderHelp.c
@@ -41,7 +41,9 @@
#include "renderHelp.h"
#include "zbuf.h"
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
static float panovco, panovsi;
static float panophi=0.0;
diff --git a/source/blender/render/intern/source/renderPreAndPost.c b/source/blender/render/intern/source/renderPreAndPost.c
index 761ac75d430..dc28d725552 100644
--- a/source/blender/render/intern/source/renderPreAndPost.c
+++ b/source/blender/render/intern/source/renderPreAndPost.c
@@ -44,6 +44,10 @@
#include "renderHelp.h"
#include "shadowBuffer.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/**
* Rotate all objects, make shadowbuffers and environment maps.
*/
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 32db34d7ac6..4c0b577e014 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -68,6 +68,10 @@
#include "rendercore.h"
#include "rendercore_int.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* globals for this file */
/* moved to renderData.c? Not yet... */
RE_Render R;
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c
index 03b9d117e23..302a8eac9e8 100644
--- a/source/blender/render/intern/source/renderdatabase.c
+++ b/source/blender/render/intern/source/renderdatabase.c
@@ -67,6 +67,10 @@
#include "render.h"
#include "render_intern.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* ------------------------------------------------------------------------- */
VertRen *RE_findOrAddVert(int nr)
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index bd0a844a354..c75d08390cc 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -54,6 +54,10 @@
#include "jitter.h"
#include "zbuf.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* if defined: objects don't cast shadows anymore */
/* #define RE_NO_SHADOWS */
diff --git a/source/blender/render/intern/source/vanillaRenderPipe.c b/source/blender/render/intern/source/vanillaRenderPipe.c
index 5f78e1b25c9..cc9a7331fe3 100644
--- a/source/blender/render/intern/source/vanillaRenderPipe.c
+++ b/source/blender/render/intern/source/vanillaRenderPipe.c
@@ -76,6 +76,10 @@
#include "vanillaRenderPipe.h"
#include "vanillaRenderPipe_int.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* crud */
#define MIN2(x,y) ( (x)<(y) ? (x) : (y) )
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 295e13b8d5f..0f323495857 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -63,6 +63,10 @@
#include "zbuf.h"
#include "zbuf_int.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* crud */
#define MIN2(x,y) ( (x)<(y) ? (x) : (y) )
/*-----------------------------------------------------------*/
diff --git a/source/blender/render/intern/source/zbufferdatastruct.c b/source/blender/render/intern/source/zbufferdatastruct.c
index f8e683d46bd..7406854df66 100644
--- a/source/blender/render/intern/source/zbufferdatastruct.c
+++ b/source/blender/render/intern/source/zbufferdatastruct.c
@@ -63,6 +63,11 @@
#include "zbufferdatastruct.h"
#include "render.h"
#include "render_intern.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* if defined: all jittersamples are stored individually. _very_ serious */
/* performance hit ! also gives some buffer size problems in big scenes */
/* #define RE_INDIVIDUAL_SUBPIXELS */
diff --git a/source/blender/renderconverter/intern/convertBlenderScene.c b/source/blender/renderconverter/intern/convertBlenderScene.c
index 2b08f4d131d..8c1c9d9721f 100644
--- a/source/blender/renderconverter/intern/convertBlenderScene.c
+++ b/source/blender/renderconverter/intern/convertBlenderScene.c
@@ -101,6 +101,10 @@
#include "nla.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* ------------------------------------------------------------------------- */
/* Local functions */
/* ------------------------------------------------------------------------- */
diff --git a/source/blender/sign/intern/BLO_sign.c b/source/blender/sign/intern/BLO_sign.c
index db050654f1b..29bc00ebbd9 100644
--- a/source/blender/sign/intern/BLO_sign.c
+++ b/source/blender/sign/intern/BLO_sign.c
@@ -34,6 +34,10 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
diff --git a/source/blender/src/B.blend.c b/source/blender/src/B.blend.c
index f15ebb05ae7..fd6edef5842 100644
--- a/source/blender/src/B.blend.c
+++ b/source/blender/src/B.blend.c
@@ -31,6 +31,10 @@
*/
/* DataToC output of file <B_blend> */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int datatoc_B_blend_size= 32472;
char datatoc_B_blend[]= {
66, 76, 69, 78, 68, 69, 82, 95,118, 50, 49, 50, 82, 69, 78, 68, 32, 0, 0, 0,136,237,255,191,
diff --git a/source/blender/src/Bfont.c b/source/blender/src/Bfont.c
index adeb73f4ca3..2d442e2cf73 100644
--- a/source/blender/src/Bfont.c
+++ b/source/blender/src/Bfont.c
@@ -31,6 +31,11 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
int datatoc_Bfont_size= 25181;
char datatoc_Bfont[]= {"\x80\x01\xe4\x01\x00\x00\x25\x21\x50\x53\x2d\x41\x64\x6f\x62\x65\x46\x6f\x6e\x74\x2d\x31\x2e\x30\x3a\x20\x42\x66\x6f\x6e\x74\x20\x30\x30\x31\x2e\x30\x30\x31\x0a\x31\x31\x20\x64\x69\x63\x74\x20\x62\x65\x67\x69\x6e\x0a\x2f\x46\x6f\x6e\x74\x49\x6e\x66\x6f\x20\x31\x30\x20\x64\x69\x63\x74\x20\x64\x75\x70\x20\x62\x65\x67\x69\x6e\x0a\x2f\x76\x65\x72\x73\x69\x6f\x6e\x20\x28" \
"\x30\x30\x31\x2e\x30\x30\x31\x29\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x20\x64\x65\x66\x0a\x2f\x46\x75\x6c\x6c\x4e\x61\x6d\x65\x20\x28\x42\x66\x6f\x6e\x74\x29\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x20\x64\x65\x66\x0a\x2f\x46\x61\x6d\x69\x6c\x79\x4e\x61\x6d\x65\x20\x28\x42\x66\x6f\x6e\x74\x29\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x20\x64\x65\x66\x0a\x2f\x57\x65\x69\x67\x68\x74\x20\x28\x52\x65\x67\x75\x6c\x61\x72\x29\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x20\x64\x65\x66\x0a\x2f\x49\x74\x61\x6c\x69\x63\x41\x6e\x67\x6c\x65\x20\x30\x20\x64\x65\x66\x0a\x2f\x69\x73\x46\x69\x78\x65\x64\x50\x69\x74\x63\x68\x20\x66\x61\x6c\x73\x65\x20\x64\x65\x66\x0a\x2f\x55\x6e\x64\x65\x72\x6c\x69\x6e\x65\x50\x6f\x73\x69\x74\x69\x6f\x6e\x20\x2d\x31\x30\x30\x20\x64\x65\x66\x0a\x2f\x55\x6e\x64\x65\x72\x6c\x69\x6e\x65\x54\x68\x69\x63\x6b\x6e\x65\x73\x73\x20\x35\x30\x20\x64\x65\x66\x0a\x65\x6e\x64\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x20\x64\x65\x66\x0a\x2f\x46\x6f\x6e\x74\x4e\x61\x6d\x65\x20\x2f\x42\x66\x6f\x6e\x74\x20\x64\x65\x66\x0a\x2f\x45\x6e" \
diff --git a/source/blender/src/blenderbuttons.c b/source/blender/src/blenderbuttons.c
index b4aedcc9e95..998a5b6f3a5 100644
--- a/source/blender/src/blenderbuttons.c
+++ b/source/blender/src/blenderbuttons.c
@@ -31,6 +31,10 @@
*/
/* DataToC output of file <blenderbuttons> */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int datatoc_blenderbuttons_size= 37540;
char datatoc_blenderbuttons[]= {
137, 80, 78, 71,
diff --git a/source/blender/src/booleanops.c b/source/blender/src/booleanops.c
index 5c89dee1a46..1ba293ba872 100644
--- a/source/blender/src/booleanops.c
+++ b/source/blender/src/booleanops.c
@@ -33,8 +33,6 @@
* CSG operations.
*/
-
-
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
@@ -65,6 +63,9 @@
#include "BLI_linklist.h"
#include "BLI_memarena.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
/**
* Here's the vertex iterator structure used to walk through
diff --git a/source/blender/src/booleanops_mesh.c b/source/blender/src/booleanops_mesh.c
index 8df36833a1d..843478d06ac 100644
--- a/source/blender/src/booleanops_mesh.c
+++ b/source/blender/src/booleanops_mesh.c
@@ -50,6 +50,10 @@
#include "BLI_arithb.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/**
* Implementation of boolean ops mesh interface.
*/
diff --git a/source/blender/src/buttons.c b/source/blender/src/buttons.c
index d72d3393cc2..92ad8d7e8e3 100644
--- a/source/blender/src/buttons.c
+++ b/source/blender/src/buttons.c
@@ -39,6 +39,10 @@
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include "BLI_winstuff.h"
#else
diff --git a/source/blender/src/cmap.tga.c b/source/blender/src/cmap.tga.c
index 8c76d8be460..da515b6b106 100644
--- a/source/blender/src/cmap.tga.c
+++ b/source/blender/src/cmap.tga.c
@@ -31,6 +31,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int datatoc_cmap_tga_size= 13400;
char datatoc_cmap_tga[]= {"\x00\x01\x01\x00\x00\x00\x01\x18\x00\x00\x00\x00\x9a\x00\x50\x00\x08\x08\xf3\xf3\xf3\xdb\xdb\xdb\xc4\xc4\xc4\xad\xad\xad\x96\x96\x96\x7f\x7f\x7f\x67\x67\x67\x50\x50\x50\x39\x39\x39\x22\x22\x22\x0b\x0b\x0b\xf4\xf4\xf4\xe6\xc8\xec\xe6\xa4\xec\xe6\x7f\xec\xe6\x5b\xec\xe6\x36\xec\xe6\x12\xec\xb3\xec\xec\xb3\xc8\xec\xb3\xa4\xec\xb3\x7f\xec\xb3\x5b\xec" \
"\xb3\x36\xec\xb3\x12\xec\x80\xec\xec\x80\xc8\xec\x80\xa4\xec\x80\x7f\xec\x80\x5b\xec\x80\x36\xec\x80\x12\xec\x4d\xec\xec\x4d\xc8\xec\x4d\xa4\xec\x4d\x7f\xec\x4d\x5b\xec\x4d\x36\xec\x4d\x12\xec\x1a\xec\xec\x1a\xc8\xec\x1a\xa4\xec\x1a\x7f\xec\x1a\x5b\xec\x1a\x36\xec\x1a\x12\xec\xe6\xec\xc8\xe6\xc8\xc8\xe6\xa4\xc8\xe6\x7f\xc8\xe6\x5b\xc8\xe6\x36\xc8\xe6\x12\xc8\xb3\xec\xc8\xb3\xc8\xc8\xb3\xa4\xc8\xb3\x7f\xc8\xb3\x5b\xc8\xb3\x36\xc8\xb3\x12\xc8\x80\xec\xc8\x80\xc8\xc8\x80\xa4\xc8\x80\x7f\xc8\x80\x5b\xc8\x80\x36\xc8\x80\x12\xc8\x4d\xec\xc8\x4d\xc8\xc8\x4d\xa4\xc8\x4d\x7f\xc8\x4d\x5b\xc8\x4d\x36\xc8\x4d\x12\xc8\x1a\xec\xc8\x1a\xc8\xc8\x1a\xa4\xc8\x1a\x7f\xc8\x1a\x5b\xc8\x1a\x36\xc8\x1a\x12\xc8\xe6\xec\xa4\xe6\xc8\xa4\xe6\xa4\xa4\xe6\x7f\xa4\xe6\x5b\xa4\xe6\x36\xa4\xe6\x12\xa4\xb3\xec\xa4\xb3\xc8\xa4\xb3\xa4\xa4\xb3\x7f\xa4\xb3\x5b\xa4\xb3\x36\xa4\xb3\x12\xa4\x80\xec\xa4\x80\xc8\xa4\x80\xa4\xa4\x80\x7f\xa4\x80\x5b\xa4\x80\x36\xa4\x80\x12\xa4\x4d\xec\xa4\x4d\xc8\xa4\x4d\xa4\xa4\x4d\x7f\xa4\x4d\x5b\xa4\x4d\x36\xa4\x4d" \
diff --git a/source/blender/src/cmovie.tga.c b/source/blender/src/cmovie.tga.c
index 1d468946352..391c032168d 100644
--- a/source/blender/src/cmovie.tga.c
+++ b/source/blender/src/cmovie.tga.c
@@ -31,6 +31,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int datatoc_cmovie_tga_size= 6247;
char datatoc_cmovie_tga[]= {"\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x34\x00\x20\x00\x01\x0c\x0c\x0c\xff\x0d\x0d\x0d\xff\x82\xe0\xe0\xe0\xff\x01\xdf\xdf\xdf\xff\x0d\x0d\x0d\xff\x83\x0c\x0c\x0c\xff\x17\xfe\xfe\xfe\xff\xfd\xfd\xfd\xff\xfd\xfd\xfd\xff\xfe\xfe\xfe\xff\x50\x50\x50\xff\x9c\x9c\x9c\xff\x9c\x9c\x9c\xff\x9d\x9d\x9d\xff\xac\xac\xac\xff\xb8\xb8\xb8\xff\xb6\xb6\xb6\xff\xa9\xa9\xa9\xff\x9c\x9c\x9c\xff\xa4\xa4\xa4" \
"\xff\xb2\xb2\xb2\xff\x3b\x35\x35\xff\x58\x51\x51\xff\xa3\x9c\x9c\xff\x9a\x97\x97\xff\xb8\xb8\xb8\xff\xaf\xae\xae\xff\x47\x42\x42\xff\x86\x80\x80\xff\xb4\xb4\xb4\xff\x8c\xb7\xb7\xb7\xff\x84\xb8\xb8\xb8\xff\x83\x0c\x0c\x0c\xff\x00\x0d\x0d\x0d\xff\x82\xe0\xe0\xe0\xff\x01\xdf\xdf\xdf\xff\x0d\x0d\x0d\xff\x8b\x0c\x0c\x0c\xff\x83\xfe\xfe\xfe\xff\x13\x52\x52\x52\xff\x9f\x9f\x9f\xff\xa0\xa0\xa0\xff\xa9\xa9\xa9\xff\xb6\xb6\xb6\xff\xb7\xb7\xb7\xff\xac\xac\xac\xff\x9d\x9d\x9d\xff\x9c\x9c\x9c\xff\xa6\xa6\xa6\xff\xa6\xa6\xa6\xff\x38\x32\x32\xff\x72\x6a\x6a\xff\x86\x80\x80\xff\xaf\xaf\xaf\xff\xb7\xb7\xb7\xff\x5d\x5a\x5a\xff\x4d\x46\x46\xff\x9a\x93\x93\xff\xb4\xb4\xb4\xff\x8b\xb7\xb7\xb7\xff\x85\xb8\xb8\xb8\xff\x95\x0c\x0c\x0c\xff\x83\xfe\xfe\xfe\xff\x13\x5a\x5a\x5a\xff\xb3\xb3\xb3\xff\xb4\xb4\xb4\xff\xb7\xb7\xb7\xff\xb8\xb8\xb8\xff\xb5\xb5\xb5\xff\xa2\xa2\xa2\xff\x9c\x9c\x9c\xff\x9d\x9d\x9d\xff\xad\xad\xad\xff\xb8\xb8\xb8\xff\x91\x8f\x8f\xff\x8e\x8b\x8b\xff\xad\xac\xac\xff\xb8\xb8\xb8\xff\x9a\x99\x99\xff\x33\x2c\x2c\xff\x84" \
diff --git a/source/blender/src/cre/license.jpeg.c b/source/blender/src/cre/license.jpeg.c
index ffbc87cd495..880d3dbde2e 100644
--- a/source/blender/src/cre/license.jpeg.c
+++ b/source/blender/src/cre/license.jpeg.c
@@ -30,5 +30,9 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int datatoc_tonize= 0;
char datatoc_ton[]= {0};
diff --git a/source/blender/src/cre/license_key.c b/source/blender/src/cre/license_key.c
index a74c74e64f2..5d066f4edc1 100644
--- a/source/blender/src/cre/license_key.c
+++ b/source/blender/src/cre/license_key.c
@@ -41,6 +41,10 @@
#include "BLO_readfile.h"
#include "BLO_keyStore.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int LICENSE_KEY_VALID = FALSE;
int I_AM_PUBLISHER = FALSE;
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index 77319e5804b..ed57a595076 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -36,6 +36,10 @@
#include <math.h>
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index ede04c45d6b..9c5370600e5 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -31,6 +31,11 @@
*/
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <io.h>
#include "BLI_winstuff.h"
diff --git a/source/blender/src/drawimasel.c b/source/blender/src/drawimasel.c
index 62d5b9ac583..7696be99afa 100644
--- a/source/blender/src/drawimasel.c
+++ b/source/blender/src/drawimasel.c
@@ -32,24 +32,22 @@
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include "BLI_winstuff.h"
#pragma warning (once : 4761)
#endif
#include "MEM_guardedalloc.h"
-
#include "BMF_Api.h"
-
#include "BLI_blenlib.h"
-
#include "IMB_imbuf_types.h"
-
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
-
#include "BKE_global.h"
-
#include "BIF_fsmenu.h"
#include "BIF_gl.h"
#include "BIF_resources.h"
@@ -58,7 +56,6 @@
#include "BIF_imasel.h"
#include "BIF_mywindow.h"
#include "BIF_space.h"
-
#include "BSE_drawimasel.h"
#include "BSE_filesel.h"
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c
index 95f391c2dab..61516565b7b 100644
--- a/source/blender/src/drawipo.c
+++ b/source/blender/src/drawipo.c
@@ -33,6 +33,10 @@
#include <stdio.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef _WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c
index 805dbe84693..23b89728d6f 100644
--- a/source/blender/src/drawmesh.c
+++ b/source/blender/src/drawmesh.c
@@ -33,6 +33,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c
index 8bbcd4b8c2d..62d897b0d93 100644
--- a/source/blender/src/drawnla.c
+++ b/source/blender/src/drawnla.c
@@ -30,6 +30,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#pragma warning (once : 4761)
#include "BLI_winstuff.h"
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 83657303628..a59de393942 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -33,6 +33,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/drawoops.c b/source/blender/src/drawoops.c
index c37d7747c28..bee15ccc7e5 100644
--- a/source/blender/src/drawoops.c
+++ b/source/blender/src/drawoops.c
@@ -34,6 +34,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/drawscene.c b/source/blender/src/drawscene.c
index d5b75645dff..d23b5151da1 100644
--- a/source/blender/src/drawscene.c
+++ b/source/blender/src/drawscene.c
@@ -57,6 +57,9 @@
#include "blendef.h" /* DIE ! */
#include "mydevice.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
void set_scene(Scene *sce) /* zie ook scene.c: set_scene_bg() */
{
diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c
index 22b397abde6..7598eaa8637 100644
--- a/source/blender/src/drawseq.c
+++ b/source/blender/src/drawseq.c
@@ -30,6 +30,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/drawsound.c b/source/blender/src/drawsound.c
index c17ba472e5d..d4ec8b705eb 100644
--- a/source/blender/src/drawsound.c
+++ b/source/blender/src/drawsound.c
@@ -32,6 +32,10 @@
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c
index 0b511149996..e0973e44b0f 100644
--- a/source/blender/src/drawtext.c
+++ b/source/blender/src/drawtext.c
@@ -32,6 +32,11 @@
#include <stdlib.h>
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef _WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 1db14d8cad9..60b8961abf5 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -33,6 +33,11 @@
//#define NAN_LINEAR_PHYSICS
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#include <sys/times.h>
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c
index a811f7fd7c3..18a4174bf1c 100644
--- a/source/blender/src/edit.c
+++ b/source/blender/src/edit.c
@@ -31,6 +31,11 @@
*/
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index f927bcf5264..28234042c93 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -33,6 +33,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index ca76b6607cb..e5f85407292 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -35,6 +35,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/editconstraint.c b/source/blender/src/editconstraint.c
index 1da9069769e..2ac25d1283d 100644
--- a/source/blender/src/editconstraint.c
+++ b/source/blender/src/editconstraint.c
@@ -64,6 +64,10 @@
#include "blendef.h"
#include "nla.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
static short add_constraint_element (Object *owner, const char *substring, Object *parent, const char *parentstring);
static short detect_constraint_loop (Object *owner, const char* substring, int disable);
static void test_bonelist_constraints (Object *owner, ListBase *list);
diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c
index 023fa1bba27..4bd29cd8cda 100644
--- a/source/blender/src/editcurve.c
+++ b/source/blender/src/editcurve.c
@@ -31,6 +31,11 @@
*/
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editdeform.c b/source/blender/src/editdeform.c
index 7bce1aaa695..c4aa8d4b4cc 100644
--- a/source/blender/src/editdeform.c
+++ b/source/blender/src/editdeform.c
@@ -48,6 +48,10 @@
#include "BIF_editdeform.h"
#include "BIF_toolbox.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void sel_verts_defgroup (int select)
{
EditVert *eve;
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c
index 8ae3b2a7035..7a8dcb11839 100644
--- a/source/blender/src/editface.c
+++ b/source/blender/src/editface.c
@@ -32,6 +32,11 @@
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c
index fb39c33976f..d22302d32a7 100644
--- a/source/blender/src/editfont.c
+++ b/source/blender/src/editfont.c
@@ -31,8 +31,12 @@
*/
#include <string.h>
-
#include <fcntl.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editgroup.c b/source/blender/src/editgroup.c
index e72fb33e9b8..35f8fa6210a 100644
--- a/source/blender/src/editgroup.c
+++ b/source/blender/src/editgroup.c
@@ -56,6 +56,10 @@
#include "blendef.h"
#include "mydevice.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void set_active_group(void)
{
/* with active object, find active group */
diff --git a/source/blender/src/editika.c b/source/blender/src/editika.c
index 1c4cde7a247..f167489dc5c 100644
--- a/source/blender/src/editika.c
+++ b/source/blender/src/editika.c
@@ -31,6 +31,11 @@
*/
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/editimasel.c b/source/blender/src/editimasel.c
index f96491b1a6f..de45951b33d 100644
--- a/source/blender/src/editimasel.c
+++ b/source/blender/src/editimasel.c
@@ -35,6 +35,10 @@
#include <stdio.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#else
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c
index 163bf0132c8..ba9a9ae8e4c 100644
--- a/source/blender/src/editipo.c
+++ b/source/blender/src/editipo.c
@@ -33,6 +33,11 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
@@ -5209,4 +5214,4 @@ void select_ipo_key(Ipo *ipo, float selx, int sel)
}
}
}
-} \ No newline at end of file
+}
diff --git a/source/blender/src/editkey.c b/source/blender/src/editkey.c
index 9ef514102f4..b1a2ec1a2ba 100644
--- a/source/blender/src/editkey.c
+++ b/source/blender/src/editkey.c
@@ -31,6 +31,11 @@
*/
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editlattice.c b/source/blender/src/editlattice.c
index 68c16ea2d44..599af1e4947 100644
--- a/source/blender/src/editlattice.c
+++ b/source/blender/src/editlattice.c
@@ -33,6 +33,11 @@
#include <stdlib.h>
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/editmball.c b/source/blender/src/editmball.c
index 329157fcda0..c187a70aa08 100644
--- a/source/blender/src/editmball.c
+++ b/source/blender/src/editmball.c
@@ -30,6 +30,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c
index 7597e0b8cd3..46264a9e7d9 100644
--- a/source/blender/src/editmesh.c
+++ b/source/blender/src/editmesh.c
@@ -34,6 +34,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
@@ -6384,4 +6388,4 @@ void editmesh_align_view_to_selected(View3D *v3d, int axis)
view3d_align_axis_to_vector(v3d, axis, norm);
}
-} \ No newline at end of file
+}
diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c
index 1691d279ffd..86ee77a960b 100644
--- a/source/blender/src/editnla.c
+++ b/source/blender/src/editnla.c
@@ -84,6 +84,10 @@
#include "license_key.h"
#include "keyed_functions.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* Note: A lot of these pretty much duplicate the behaviour of the
action windows. The functions should be shared, not copy-pasted */
typedef struct NlaParam{
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 31f542a2b1b..ab8216a0ce3 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -39,6 +39,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editoops.c b/source/blender/src/editoops.c
index 9ec2001ce5f..bf3f7d995a6 100644
--- a/source/blender/src/editoops.c
+++ b/source/blender/src/editoops.c
@@ -32,6 +32,11 @@
#include <stdlib.h>
#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editsca.c b/source/blender/src/editsca.c
index 6357a4c7ac2..1b515b73762 100644
--- a/source/blender/src/editsca.c
+++ b/source/blender/src/editsca.c
@@ -33,6 +33,10 @@
#include <stdlib.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c
index d71ae8c8e3d..f0b476e326a 100644
--- a/source/blender/src/editscreen.c
+++ b/source/blender/src/editscreen.c
@@ -32,6 +32,10 @@
* handling and drawing. Might be split up as well later...
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c
index 608988458d0..6afdffcf317 100644
--- a/source/blender/src/editseq.c
+++ b/source/blender/src/editseq.c
@@ -33,6 +33,11 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c
index 3aa2f43d19f..70fc1f26802 100644
--- a/source/blender/src/editsima.c
+++ b/source/blender/src/editsima.c
@@ -33,6 +33,10 @@
#include <stdlib.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c
index 53a3628aa48..710800deaa7 100644
--- a/source/blender/src/editsound.c
+++ b/source/blender/src/editsound.c
@@ -34,6 +34,11 @@
#include <math.h>
#include <string.h>
#include <fcntl.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c
index 1ca7672f4d9..0a902d4b1a4 100644
--- a/source/blender/src/editview.c
+++ b/source/blender/src/editview.c
@@ -35,6 +35,10 @@
#include <stdio.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/eventdebug.c b/source/blender/src/eventdebug.c
index 6c9a5ee005b..a754dbfa49f 100644
--- a/source/blender/src/eventdebug.c
+++ b/source/blender/src/eventdebug.c
@@ -32,6 +32,10 @@
#include "mydevice.h"
#include "blendef.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
char *event_to_string(short evt) {
#define smap(evt) case evt: return #evt
switch (evt) {
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c
index 7a63a7779a0..60948b8291e 100644
--- a/source/blender/src/filesel.c
+++ b/source/blender/src/filesel.c
@@ -34,6 +34,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <io.h>
#include <direct.h>
diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c
index 1280278edf6..a8863816a01 100644
--- a/source/blender/src/ghostwinlay.c
+++ b/source/blender/src/ghostwinlay.c
@@ -32,6 +32,10 @@
#include <stdlib.h>
#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/glutil.c b/source/blender/src/glutil.c
index c6144e36ae6..f02570e897c 100644
--- a/source/blender/src/glutil.c
+++ b/source/blender/src/glutil.c
@@ -34,6 +34,10 @@
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c
index 71cbac51dea..c8b007500ee 100644
--- a/source/blender/src/headerbuttons.c
+++ b/source/blender/src/headerbuttons.c
@@ -35,6 +35,10 @@
#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/imasel.c b/source/blender/src/imasel.c
index e75fa8eba26..3b1ee2e1177 100644
--- a/source/blender/src/imasel.c
+++ b/source/blender/src/imasel.c
@@ -32,6 +32,11 @@
#include <stdio.h>
#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 454d4355bdf..a777ae11953 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -34,6 +34,10 @@
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/keyval.c b/source/blender/src/keyval.c
index 2390bc59d4e..3b2a48e4ea5 100644
--- a/source/blender/src/keyval.c
+++ b/source/blender/src/keyval.c
@@ -33,14 +33,15 @@
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
#include "BLI_editVert.h"
-
-
#include "BIF_keyval.h"
-
#include "blendef.h"
-
#include "mydevice.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
char *key_event_to_string(unsigned short event)
{
diff --git a/source/blender/src/mainqueue.c b/source/blender/src/mainqueue.c
index ac78beb9440..a4b4e21babd 100644
--- a/source/blender/src/mainqueue.c
+++ b/source/blender/src/mainqueue.c
@@ -35,9 +35,12 @@
#include <stdlib.h>
#include <string.h>
-
#include "BIF_mainqueue.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
typedef struct {
unsigned short event;
short val;
diff --git a/source/blender/src/mywindow.c b/source/blender/src/mywindow.c
index cf6d002ee5f..de91299a50d 100644
--- a/source/blender/src/mywindow.c
+++ b/source/blender/src/mywindow.c
@@ -35,6 +35,10 @@
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/oops.c b/source/blender/src/oops.c
index 06688d2db9d..2831b3f0fb4 100644
--- a/source/blender/src/oops.c
+++ b/source/blender/src/oops.c
@@ -66,6 +66,10 @@
#include "blendef.h"
#include "mydevice.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
static int correct_oops_y(Oops *oops);
diff --git a/source/blender/src/osx_creator_splash.jpg.c b/source/blender/src/osx_creator_splash.jpg.c
index cf01f410dc6..bf3aa646689 100644
--- a/source/blender/src/osx_creator_splash.jpg.c
+++ b/source/blender/src/osx_creator_splash.jpg.c
@@ -29,6 +29,11 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef __APPLE__
/* DataToC output of file <splash_jpg> */
diff --git a/source/blender/src/playanim.c b/source/blender/src/playanim.c
index ef07d910cc1..ca3cef32eb1 100644
--- a/source/blender/src/playanim.c
+++ b/source/blender/src/playanim.c
@@ -33,6 +33,11 @@
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#include <sys/times.h>
diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c
index d93a93028a7..7fae4f26022 100644
--- a/source/blender/src/poseobject.c
+++ b/source/blender/src/poseobject.c
@@ -31,6 +31,10 @@
* support for animation modes - Reevan McKay
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/previewrender.c b/source/blender/src/previewrender.c
index 1180248c16e..ec16f1dd63e 100644
--- a/source/blender/src/previewrender.c
+++ b/source/blender/src/previewrender.c
@@ -38,6 +38,10 @@
#include <stdlib.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/pub/license_key.c b/source/blender/src/pub/license_key.c
index fb6402cbaeb..44ad7514515 100644
--- a/source/blender/src/pub/license_key.c
+++ b/source/blender/src/pub/license_key.c
@@ -44,6 +44,10 @@
#include "BLO_readfile.h"
#include "BLO_keyStore.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int LICENSE_KEY_VALID = FALSE;
int I_AM_PUBLISHER = TRUE;
diff --git a/source/blender/src/pub/osx_publisher_splash.jpg.c b/source/blender/src/pub/osx_publisher_splash.jpg.c
index 3ac6b870d18..7adb71caa18 100644
--- a/source/blender/src/pub/osx_publisher_splash.jpg.c
+++ b/source/blender/src/pub/osx_publisher_splash.jpg.c
@@ -30,6 +30,11 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
/* DataToC output of file <splash_jpg> */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef __APPLE__
int datatoc_tonize= 30248;
diff --git a/source/blender/src/pub/unix_publisher_splash.jpg.c b/source/blender/src/pub/unix_publisher_splash.jpg.c
index c1ec0dc0430..948f9889696 100644
--- a/source/blender/src/pub/unix_publisher_splash.jpg.c
+++ b/source/blender/src/pub/unix_publisher_splash.jpg.c
@@ -30,6 +30,11 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
/* DataToC output of file <splash_jpg> */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#if !defined(WIN32) && !defined(__APPLE__)
int datatoc_tonize= 29208;
char datatoc_ton[]= {
diff --git a/source/blender/src/pub/windows_publisher_splash.jpg.c b/source/blender/src/pub/windows_publisher_splash.jpg.c
index 520c58bc9f2..1dbef535bb5 100644
--- a/source/blender/src/pub/windows_publisher_splash.jpg.c
+++ b/source/blender/src/pub/windows_publisher_splash.jpg.c
@@ -30,6 +30,11 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
/* DataToC output of file <splash_jpg> */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
int datatoc_tonize= 30796;
diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c
index 77252808170..909d17a3493 100644
--- a/source/blender/src/renderwin.c
+++ b/source/blender/src/renderwin.c
@@ -33,6 +33,10 @@
#include <stdarg.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/resources.c b/source/blender/src/resources.c
index 41645ba126d..22ff4108204 100644
--- a/source/blender/src/resources.c
+++ b/source/blender/src/resources.c
@@ -36,6 +36,10 @@
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/scrarea.c b/source/blender/src/scrarea.c
index c1386473f5e..c9076a105a8 100644
--- a/source/blender/src/scrarea.c
+++ b/source/blender/src/scrarea.c
@@ -31,9 +31,12 @@
*/
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
-
#include "BIF_scrarea.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void *scrarea_find_space_of_type(ScrArea *sa, int type)
{
SpaceLink *sl;
diff --git a/source/blender/src/screendump.c b/source/blender/src/screendump.c
index 657305930e5..48c6981d128 100644
--- a/source/blender/src/screendump.c
+++ b/source/blender/src/screendump.c
@@ -33,6 +33,10 @@
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c
index ec98ed3889b..83438e3c25b 100644
--- a/source/blender/src/sequence.c
+++ b/source/blender/src/sequence.c
@@ -32,6 +32,10 @@
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index 1ee6cf013ae..c52dca1e70b 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -34,6 +34,10 @@
#include <string.h>
#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/spacetypes.c b/source/blender/src/spacetypes.c
index 4a756e5924f..9a9fa755ae2 100644
--- a/source/blender/src/spacetypes.c
+++ b/source/blender/src/spacetypes.c
@@ -32,6 +32,10 @@
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/swapbuffers.c b/source/blender/src/swapbuffers.c
index 5d90392b145..3b7b6bf5b26 100644
--- a/source/blender/src/swapbuffers.c
+++ b/source/blender/src/swapbuffers.c
@@ -32,6 +32,10 @@
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
@@ -277,4 +281,4 @@ void screen_swapbuffers(void)
}
areawinset(tempsa->win);
-} \ No newline at end of file
+}
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c
index cde64754df8..c442060fb84 100644
--- a/source/blender/src/toets.c
+++ b/source/blender/src/toets.c
@@ -34,6 +34,10 @@
#include <string.h>
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#endif
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index 478a45de9cb..a12e294d7e8 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -37,6 +37,10 @@
#include <string.h>
#include <stdarg.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef WIN32
#include <unistd.h>
#else
diff --git a/source/blender/src/unix_creator_splash.jpg.c b/source/blender/src/unix_creator_splash.jpg.c
index f9da6b88ea3..57aa37018a8 100644
--- a/source/blender/src/unix_creator_splash.jpg.c
+++ b/source/blender/src/unix_creator_splash.jpg.c
@@ -29,6 +29,11 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#if !defined(WIN32) && !defined(__APPLE__)
/* DataToC output of file <splash_jpg> */
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 41f1f5f0a43..40ee8ac1a6c 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -39,6 +39,10 @@
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include "BLI_winstuff.h"
#else
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index 05a9de22620..75dbdccfff7 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -32,6 +32,10 @@
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <io.h>
#include "BLI_winstuff.h"
diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c
index d6e8e9b2654..94b3585c6af 100644
--- a/source/blender/src/vpaint.c
+++ b/source/blender/src/vpaint.c
@@ -32,6 +32,10 @@
#include <math.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef WIN32
#include <io.h>
#include "BLI_winstuff.h"
diff --git a/source/blender/src/windows_creator_splash.jpg.c b/source/blender/src/windows_creator_splash.jpg.c
index 577ca6b0c83..47d558c528a 100644
--- a/source/blender/src/windows_creator_splash.jpg.c
+++ b/source/blender/src/windows_creator_splash.jpg.c
@@ -29,6 +29,11 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
/* DataToC output of file <splash_jpg> */
diff --git a/source/blender/src/writeavicodec.c b/source/blender/src/writeavicodec.c
index 6c19dfaac4e..002d1615803 100644
--- a/source/blender/src/writeavicodec.c
+++ b/source/blender/src/writeavicodec.c
@@ -33,6 +33,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#define INC_OLE2
diff --git a/source/blender/src/writeimage.c b/source/blender/src/writeimage.c
index d107347598d..b2c224c2f3a 100644
--- a/source/blender/src/writeimage.c
+++ b/source/blender/src/writeimage.c
@@ -38,9 +38,12 @@
#include "render.h"
#include "license_key.h" // LICENSE_KEY_VALID
#include "BKE_utildefines.h" // ELEM
-
#include "BIF_writeimage.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int BIF_write_ibuf(ImBuf *ibuf, char *name)
{
int ok;
diff --git a/source/blender/src/writemovie.c b/source/blender/src/writemovie.c
index f71156f5131..b6d5b64de6f 100644
--- a/source/blender/src/writemovie.c
+++ b/source/blender/src/writemovie.c
@@ -30,6 +30,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef __sgi
#include <unistd.h>
diff --git a/source/blender/verify/intern/BLO_verify.c b/source/blender/verify/intern/BLO_verify.c
index 7e08b2be0e8..1091b91255f 100644
--- a/source/blender/verify/intern/BLO_verify.c
+++ b/source/blender/verify/intern/BLO_verify.c
@@ -48,6 +48,10 @@
#include "BLO_signer_info.h" /* external signer info struct */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
static struct BLO_SignerInfo g_SignerInfo = {"", "", ""};
struct verifyStructType {
diff --git a/source/blender/writeblenfile/intern/BLO_writeblenfile.c b/source/blender/writeblenfile/intern/BLO_writeblenfile.c
index f529bc5fa9e..de8e70017ca 100644
--- a/source/blender/writeblenfile/intern/BLO_writeblenfile.c
+++ b/source/blender/writeblenfile/intern/BLO_writeblenfile.c
@@ -35,6 +35,10 @@
#include <stdlib.h>
#include <string.h> // strlen
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifdef _WIN32
#include <io.h> // open / write
#else // WIN32
diff --git a/source/blender/writeblenfile/test/test.c b/source/blender/writeblenfile/test/test.c
index 5dd560e0742..450176c0761 100644
--- a/source/blender/writeblenfile/test/test.c
+++ b/source/blender/writeblenfile/test/test.c
@@ -32,6 +32,10 @@
#include <string.h> // strlen
#include "BLO_writeblenfile.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
main()
{
struct BLO_writeblenfileStruct *control;
diff --git a/source/blender/writestreamglue/intern/BLO_dumpFromMemory.c b/source/blender/writestreamglue/intern/BLO_dumpFromMemory.c
index f132840572a..52f8ac2e789 100644
--- a/source/blender/writestreamglue/intern/BLO_dumpFromMemory.c
+++ b/source/blender/writestreamglue/intern/BLO_dumpFromMemory.c
@@ -35,13 +35,14 @@
#include <stdlib.h>
#include "GEN_messaging.h"
-
#include "zlib.h"
-
#include "BLO_writeStreamGlue.h"
-
#include "BLO_dumpFromMemory.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int
BLO_dumpFromMemory(
unsigned char *data,
diff --git a/source/blender/writestreamglue/intern/BLO_getPubKey.c b/source/blender/writestreamglue/intern/BLO_getPubKey.c
index d691c0ae2be..d115d8a6ac2 100644
--- a/source/blender/writestreamglue/intern/BLO_getPubKey.c
+++ b/source/blender/writestreamglue/intern/BLO_getPubKey.c
@@ -36,6 +36,10 @@
#include "BLO_keyStore.h"
#include "BLO_getPubKey.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int
getPubKey(byte *dataStreamPubKey,
int dataStreamPubKeyLen,
diff --git a/source/blender/writestreamglue/intern/BLO_streamGlueControl.c b/source/blender/writestreamglue/intern/BLO_streamGlueControl.c
index fc12738fa35..2d4d408d848 100644
--- a/source/blender/writestreamglue/intern/BLO_streamGlueControl.c
+++ b/source/blender/writestreamglue/intern/BLO_streamGlueControl.c
@@ -37,6 +37,10 @@
#include "BLO_writeStreamGlue.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
struct streamGlueControlStruct *
streamGlueControlConstructor(
void)
diff --git a/source/blender/writestreamglue/intern/BLO_writeStreamGlue.c b/source/blender/writestreamglue/intern/BLO_writeStreamGlue.c
index 934cbb91004..4eb32efe09a 100644
--- a/source/blender/writestreamglue/intern/BLO_writeStreamGlue.c
+++ b/source/blender/writestreamglue/intern/BLO_writeStreamGlue.c
@@ -36,18 +36,18 @@
#include <assert.h>
#include "zlib.h"
-
#include "GEN_messaging.h"
-
#include "BLO_writeStreamGlue.h"
-
#include "BLO_dumpFromMemory.h"
-
#include "BLO_writeblenfile.h"
#include "BLO_deflate.h"
#include "BLO_encrypt.h"
#include "BLO_sign.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/**
* streamGlueWrite does not really stream; it buffers all data it gets
* because it needs everything to create the header, which is in front
diff --git a/source/blender/writestreamglue/stub/BLO_getPubKeySTUB.c b/source/blender/writestreamglue/stub/BLO_getPubKeySTUB.c
index 86cdfdacd69..f11dfc1bb24 100644
--- a/source/blender/writestreamglue/stub/BLO_getPubKeySTUB.c
+++ b/source/blender/writestreamglue/stub/BLO_getPubKeySTUB.c
@@ -35,6 +35,10 @@
#include "blenkey.h" // for byte ... duh this needs change !
#include "BLO_getPubKey.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int
getPubKey(byte *dataStreamPubKey,
int dataStreamPubKeyLen,
diff --git a/source/blender/writestreamglue/stub/BLO_keyStoreSTUB.c b/source/blender/writestreamglue/stub/BLO_keyStoreSTUB.c
index 2cf118d8e5e..8c73281356c 100644
--- a/source/blender/writestreamglue/stub/BLO_keyStoreSTUB.c
+++ b/source/blender/writestreamglue/stub/BLO_keyStoreSTUB.c
@@ -35,6 +35,10 @@
#include "BLO_keyStore.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
void
keyStoreConstructor(
UserStruct *keyUserStruct,
diff --git a/source/blender/writestreamglue/stub/BLO_streamGlueControlSTUB.c b/source/blender/writestreamglue/stub/BLO_streamGlueControlSTUB.c
index 5c4b5794e76..8f4165c8c64 100644
--- a/source/blender/writestreamglue/stub/BLO_streamGlueControlSTUB.c
+++ b/source/blender/writestreamglue/stub/BLO_streamGlueControlSTUB.c
@@ -32,11 +32,13 @@
*/
#include <stdio.h>
-
#include "GEN_messaging.h"
-
#include "BLO_writeStreamGlue.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
struct streamGlueControlStruct *
streamGlueControlConstructor(
void)
diff --git a/source/blender/writestreamglue/stub/BLO_writeStreamGlueSTUB.c b/source/blender/writestreamglue/stub/BLO_writeStreamGlueSTUB.c
index 9b077efbd59..07a7c48e6b6 100644
--- a/source/blender/writestreamglue/stub/BLO_writeStreamGlueSTUB.c
+++ b/source/blender/writestreamglue/stub/BLO_writeStreamGlueSTUB.c
@@ -36,6 +36,10 @@
#include "GEN_messaging.h"
#include "BLO_writeStreamGlue.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int
writeStreamGlue(
struct streamGlueControlStruct *streamGlueControl,
diff --git a/source/blender/writestreamglue/test/readwritetest/readwritetest.c b/source/blender/writestreamglue/test/readwritetest/readwritetest.c
index 9006fe3345a..d0a8ddef50e 100644
--- a/source/blender/writestreamglue/test/readwritetest/readwritetest.c
+++ b/source/blender/writestreamglue/test/readwritetest/readwritetest.c
@@ -48,6 +48,10 @@
#include "BLO_writeStreamGlue.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#ifndef _WIN32
#define O_BINARY 0
#endif
diff --git a/source/blender/writestreamglue/test/typetest/typetest.c b/source/blender/writestreamglue/test/typetest/typetest.c
index 447abd9d792..3bab75340c8 100644
--- a/source/blender/writestreamglue/test/typetest/typetest.c
+++ b/source/blender/writestreamglue/test/typetest/typetest.c
@@ -35,6 +35,10 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int main (int argc, char *argv[])
{
int verbose = 0;