Configure.h.in 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*============================================================================
  2. KWSys - Kitware System Library
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef @KWSYS_NAMESPACE@_Configure_h
  11. #define @KWSYS_NAMESPACE@_Configure_h
  12. /* If we are building a kwsys .c or .cxx file, let it use the kwsys
  13. namespace. When not building a kwsys source file these macros are
  14. temporarily defined inside the headers that use them. */
  15. #if defined(KWSYS_NAMESPACE)
  16. # define kwsys_ns(x) @KWSYS_NAMESPACE@##x
  17. # define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
  18. #endif
  19. /* Disable some warnings inside kwsys source files. */
  20. #if defined(KWSYS_NAMESPACE)
  21. # if defined(__BORLANDC__)
  22. # pragma warn -8027 /* function not inlined. */
  23. # endif
  24. # if defined(__INTEL_COMPILER)
  25. # pragma warning (disable: 1572) /* floating-point equality test */
  26. # endif
  27. # if defined(__sgi) && !defined(__GNUC__)
  28. # pragma set woff 3970 /* pointer to int conversion */
  29. # pragma set woff 3968 /* 64 bit conversion */
  30. # endif
  31. #endif
  32. /* Whether kwsys namespace is "kwsys". */
  33. #define @KWSYS_NAMESPACE@_NAME_IS_KWSYS @KWSYS_NAME_IS_KWSYS@
  34. /* If we are building a kwsys .c or .cxx file, suppress the Microsoft
  35. deprecation warnings. */
  36. #if defined(KWSYS_NAMESPACE)
  37. # ifndef _CRT_NONSTDC_NO_DEPRECATE
  38. # define _CRT_NONSTDC_NO_DEPRECATE
  39. # endif
  40. # ifndef _CRT_SECURE_NO_DEPRECATE
  41. # define _CRT_SECURE_NO_DEPRECATE
  42. # endif
  43. # ifndef _SCL_SECURE_NO_DEPRECATE
  44. # define _SCL_SECURE_NO_DEPRECATE
  45. # endif
  46. #endif
  47. /* Whether Large File Support is requested. */
  48. #define @KWSYS_NAMESPACE@_LFS_REQUESTED @KWSYS_LFS_REQUESTED@
  49. /* Whether Large File Support is available. */
  50. #if @KWSYS_NAMESPACE@_LFS_REQUESTED
  51. # define @KWSYS_NAMESPACE@_LFS_AVAILABLE @KWSYS_LFS_AVAILABLE@
  52. #endif
  53. /* Setup Large File Support if requested. */
  54. #if @KWSYS_NAMESPACE@_LFS_REQUESTED
  55. /* Since LFS is requested this header must be included before system
  56. headers whether or not LFS is available. */
  57. # if 0 && (defined(_SYS_TYPES_H) || defined(_SYS_TYPES_INCLUDED))
  58. # error "@KWSYS_NAMESPACE@/Configure.h must be included before sys/types.h"
  59. # endif
  60. /* Enable the large file API if it is available. */
  61. # if @KWSYS_NAMESPACE@_LFS_AVAILABLE && \
  62. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINES)
  63. # if !defined(_LARGEFILE_SOURCE) && \
  64. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE_SOURCE)
  65. # define _LARGEFILE_SOURCE
  66. # endif
  67. # if !defined(_LARGEFILE64_SOURCE) && \
  68. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE64_SOURCE)
  69. # define _LARGEFILE64_SOURCE
  70. # endif
  71. # if !defined(_LARGE_FILES) && \
  72. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGE_FILES)
  73. # define _LARGE_FILES
  74. # endif
  75. # if !defined(_FILE_OFFSET_BITS) && \
  76. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_FILE_OFFSET_BITS)
  77. # define _FILE_OFFSET_BITS 64
  78. # endif
  79. # if 0 && (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64)
  80. # error "_FILE_OFFSET_BITS must be defined to at least 64"
  81. # endif
  82. # endif
  83. #endif
  84. /* Setup the export macro. */
  85. #if @KWSYS_BUILD_SHARED@
  86. # if defined(_WIN32) || defined(__CYGWIN__)
  87. # if defined(@KWSYS_NAMESPACE@_EXPORTS)
  88. # define @KWSYS_NAMESPACE@_EXPORT __declspec(dllexport)
  89. # else
  90. # define @KWSYS_NAMESPACE@_EXPORT __declspec(dllimport)
  91. # endif
  92. # elif __GNUC__ >= 4
  93. # define @KWSYS_NAMESPACE@_EXPORT __attribute__ ((visibility("default")))
  94. # else
  95. # define @KWSYS_NAMESPACE@_EXPORT
  96. # endif
  97. #else
  98. # define @KWSYS_NAMESPACE@_EXPORT
  99. #endif
  100. /* Enable warnings that are off by default but are useful. */
  101. #if !defined(@KWSYS_NAMESPACE@_NO_WARNING_ENABLE)
  102. # if defined(_MSC_VER)
  103. # pragma warning ( default : 4263 ) /* no override, call convention differs */
  104. # endif
  105. #endif
  106. /* Disable warnings that are on by default but occur in valid code. */
  107. #if !defined(@KWSYS_NAMESPACE@_NO_WARNING_DISABLE)
  108. # if defined(_MSC_VER)
  109. # pragma warning (disable: 4097) /* typedef is synonym for class */
  110. # pragma warning (disable: 4127) /* conditional expression is constant */
  111. # pragma warning (disable: 4244) /* possible loss in conversion */
  112. # pragma warning (disable: 4251) /* missing DLL-interface */
  113. # pragma warning (disable: 4305) /* truncation from type1 to type2 */
  114. # pragma warning (disable: 4309) /* truncation of constant value */
  115. # pragma warning (disable: 4514) /* unreferenced inline function */
  116. # pragma warning (disable: 4706) /* assignment in conditional expression */
  117. # pragma warning (disable: 4710) /* function not inlined */
  118. # pragma warning (disable: 4786) /* identifier truncated in debug info */
  119. # endif
  120. #endif
  121. /* MSVC 6.0 in release mode will warn about code it produces with its
  122. optimizer. Disable the warnings specifically for this
  123. configuration. Real warnings will be revealed by a debug build or
  124. by other compilers. */
  125. #if !defined(@KWSYS_NAMESPACE@_NO_WARNING_DISABLE_BOGUS)
  126. # if defined(_MSC_VER) && (_MSC_VER < 1300) && defined(NDEBUG)
  127. # pragma warning ( disable : 4701 ) /* Variable may be used uninitialized. */
  128. # pragma warning ( disable : 4702 ) /* Unreachable code. */
  129. # endif
  130. #endif
  131. #endif