00001 /* 00002 * ----------------------------------------------------------------- 00003 * $Revision: 1.2 $ 00004 * $Date: 2006/11/08 00:48:24 $ 00005 * ----------------------------------------------------------------- 00006 * Programmer(s): Aaron Collier and Radu Serban @ LLNL 00007 * ----------------------------------------------------------------- 00008 * Copyright (c) 2005, The Regents of the University of California. 00009 * Produced at the Lawrence Livermore National Laboratory. 00010 * All rights reserved. 00011 * For details, see the LICENSE file. 00012 *------------------------------------------------------------------ 00013 * SUNDIALS configuration header file 00014 *------------------------------------------------------------------ 00015 */ 00016 00017 00018 /***** ADDED BY SHERM 20061121 */ 00019 #include "SimTKcommon.h" 00020 00021 /* Keeps MS VC++ 8 quiet about sprintf, strcpy, etc. (sherm) */ 00022 #ifdef _MSC_VER 00023 #pragma warning(disable:4996) 00024 #endif 00025 00026 /* Shared libraries are messy in Visual Studio. We have to distinguish three 00027 * cases: 00028 * (1) this header is being used to build the SimTKcpodes shared library (dllexport) 00029 * (2) this header is being used by a *client* of the SimTKcpodes shared 00030 * library (dllimport) 00031 * (3) we are building the SimTKcpodes static library, or the client is 00032 * being compiled with the expectation of linking with the 00033 * SimTKcpodes static library (nothing special needed) 00034 * In the CMake script for building this library, we define one of the symbols 00035 * SimTK_CPODES_BUILDING_{SHARED|STATIC}_LIBRARY 00036 * Client code normally has no special symbol defined, in which case we'll 00037 * assume it wants to use the shared library. However, if the client defines 00038 * the symbol SimTK_USE_STATIC_LIBRARIES we'll suppress the dllimport so 00039 * that the client code can be linked with static libraries. Note that 00040 * the client symbol is not library dependent, while the library symbols 00041 * affect only the SimTKcpodes library, meaning that other libraries can 00042 * be clients of this one. However, we are assuming all-static or all-shared. 00043 */ 00044 00045 #ifdef WIN32 00046 #if defined(SimTK_CPODES_BUILDING_SHARED_LIBRARY) 00047 #define SUNDIALS_EXPORT __declspec(dllexport) 00048 #elif defined(SimTK_CPODES_BUILDING_STATIC_LIBRARY) || defined(SimTK_USE_STATIC_LIBRARIES) 00049 #define SUNDIALS_EXPORT 00050 #else 00051 /* i.e., a client of a shared library */ 00052 #define SUNDIALS_EXPORT __declspec(dllimport) 00053 #endif 00054 #else 00055 /* Linux, Mac */ 00056 #define SUNDIALS_EXPORT 00057 #endif 00058 00059 /* Define precision of SUNDIALS data type 'realtype' 00060 * Depending on the precision level, one of the following 00061 * three macros will be defined: 00062 * #define SUNDIALS_SINGLE_PRECISION 1 00063 * #define SUNDIALS_DOUBLE_PRECISION 1 00064 * #define SUNDIALS_EXTENDED_PRECISION 1 00065 */ 00066 #ifdef SimTK_DEFAULT_PRECISION 00067 #if (SimTK_DEFAULT_PRECISION == 1) 00068 #define SUNDIALS_SINGLE_PRECISION 1 00069 #elif (SimTK_DEFAULT_PRECISION == 2) 00070 #define SUNDIALS_DOUBLE_PRECISION 1 00071 #elif (SimTK_DEFAULT_PRECISION == 4) 00072 #define SUNDIALS_EXTENDED_PRECISION 1 00073 #endif 00074 #else 00075 #define SUNDIALS_DOUBLE_PRECISION 1 00076 #endif 00077 00078 /***** END OF SHERM'S ADDITIONS */ 00079 00080 /* Define SUNDIALS version number */ 00081 #define SUNDIALS_PACKAGE_VERSION "2.3.0" 00082 00083 /* FCMIX: Define Fortran name-mangling macro 00084 * Depending on the inferred scheme, one of the following 00085 * six macros will be defined: 00086 * #define F77_FUNC(name,NAME) name 00087 * #define F77_FUNC(name,NAME) name ## _ 00088 * #define F77_FUNC(name,NAME) name ## __ 00089 * #define F77_FUNC(name,NAME) NAME 00090 * #define F77_FUNC(name,NAME) NAME ## _ 00091 * #define F77_FUNC(name,NAME) NAME ## __ 00092 */ 00093 #define F77_FUNC(name,NAME) name ## _ 00094 #define F77_FUNC_(name,NAME) name ## _ 00095 00096 00097 /* Use generic math functions 00098 * If it was decided that generic math functions can be used, then 00099 * #define SUNDIALS_USE_GENERIC_MATH 1 00100 * otherwise 00101 * #define SUNDIALS_USE_GENERIC_MATH 0 00102 */ 00103 #define SUNDIALS_USE_GENERIC_MATH 1 00104 00105 /* FNVECTOR: Allow user to specify different MPI communicator 00106 * If it was found that the MPI implementation supports MPI_Comm_f2c, then 00107 * #define SUNDIALS_MPI_COMM_F2C 1 00108 * otherwise 00109 * #define SUNDIALS_MPI_COMM_F2C 0 00110 */ 00111