I had this problem earlier. For fixing I added checking for inttypes.h to configure.ac:
# Check inttypes.h header
AC_CHECK_HEADER([inttypes.h],
[AC_DEFINE([HAVE_INTTYPES_H])],
[AC_MSG_WARN([[warning: defining fixed int types explicitly]])])
so if we have inttypes.h header on the system we define HAVE_INTTYPES_H and #include it in TypeDefine.h, else we
have to define them by hand
#ifndef HAVE_INTTYPES_H -> I think this had to be #ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#else
#ifndef _MSC_VER
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned long int uint32_t;
typedef signed char int8_t;
typedef signed short int int16_t;
typedef signed long int int32_t;
#else
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
#endif // _MSC_VER
#endif // HAVE_INTTYPES_H
Now me have this problem - I can fix it, but I don't want to break someone else compilation
g++ -DHAVE_CONFIG_H -I. -I../.. -I ../../src -I ../../src -I/usr/include/libxml2 -g -O0 -fomit-frame-pointer -O3 -march=athlon64 -Wall -W -fpermissive -pipe -MT display/actor/libcommon_la-Actor.lo -MD -MP -MF display/actor/.deps/libcommon_la-Actor.Tpo -c display/actor/Actor.cpp -fPIC -DPIC -o display/actor/.libs/libcommon_la-Actor.o
display/actor/../../TypeDefine.h:22: error: conflicting declaration 'typedef long unsigned int uint32_t'
/usr/include/stdint.h:52: error: 'uint32_t' has a previous declaration as 'typedef unsigned int uint32_t'
display/actor/../../TypeDefine.h:26: error: conflicting declaration 'typedef long int int32_t'
/usr/include/sys/types.h:197: error: 'int32_t' has a previous declaration as 'typedef int int32_t'