/*
 * AB: this file (config.h) was generated by cmake from config.h.cmake
 *     this is a quick-and-dirty conversion of ODE's original config.h.in (which
 *     is an autotools template for config.h).
 *     for simplification several features are disabled entirely (hardcoded).
 */
#ifndef ODE_CONFIG_H
#define ODE_CONFIG_H

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdarg.h>


#define ODE_API

/* AB: we require float.h to make things more simple to us.
       if we want to support systems without float.h, we may need to write
       additional configure tests for some stuff below (especially dEpsilon and
       dInfinity) */
#cmakedefine HAVE_FLOAT_H

#ifdef HAVE_FLOAT_H
#include <float.h>
#else
#error have no float.h - our ODE copy does not support this system
#endif

/* AB: ode timers may be more precise/efficient on pentium systems, however we
       don't really care about that here and thus dont use it */
/* #define PENTIUM 1 */

/* AB: X86_64_SYSTEM is only used if PENTIUM is used, so we dont need it */
/* #define X86_64_SYSTEM 1 */

/* AB: we use single precision */
/* #define dDOUBLE */
#define dSINGLE
#define dEpsilon FLT_EPSILON
#define dInfinity FLT_MAX

#define dGYROSCOPIC

/* AB: disable ODE's debug output */
#define dNODEBUG




#cmakedefine SIZEOF_CHAR ${SIZEOF_CHAR}
#cmakedefine SIZEOF_INT ${SIZEOF_INT}
#cmakedefine SIZEOF_LONG_INT ${SIZEOF_LONG_INT}
#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT}
#cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP}

#if SIZEOF_CHAR == 1
typedef char int8;
typedef unsigned char uint8;
#else
#error "expecting sizeof(char) == 1"
#endif
#if SIZEOF_SHORT == 2
typedef short int16;
typedef unsigned short uint16;
#else
#error "can not find 2 byte integer type"
#endif
/* integer types (we assume int >= 32 bits) */
#if SIZEOF_INT == 4
typedef short int32;
typedef unsigned short uint32;
#else
#error "can not find 4 byte integer type"
#endif
/* an integer type that we can safely cast a pointer to and
 * from without loss of bits.
 */
#if SIZEOF_SHORT == SIZEOF_VOIDP
typedef unsigned short intP;
#elif SIZEOF_INT == SIZEOF_VOIDP
typedef unsigned int intP;
#elif SIZEOF_LONG_INT == SIZEOF_VOIDP
typedef unsigned long int intP;
#endif



/*
Handle Windows DLL odities
Its easier to export all symbols using the -shared flag
for MinGW than differentiating with declspec,
so only do it for MSVC
*/
#if defined(ODE_DLL) && defined(WIN32) && defined(_MSC_VER)
#define ODE_API __declspec( dllexport )
#elif !defined(ODE_DLL) && defined(WIN32) && defined(MSC_VER)
#define ODE_API __declspec( dllimport )
#else
#define ODE_API
#endif


/*
 * AB: we support neither OPCODE nor GIMPACT trimeshes.
 */
#define dTRIMESH_ENABLED 0

#endif /* ODE_CONFIG_H */

