Configure.h.in 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. #endif
  25. /* Whether kwsys namespace is "kwsys". */
  26. #define @KWSYS_NAMESPACE@_NAME_IS_KWSYS @KWSYS_NAME_IS_KWSYS@
  27. /* If we are building a kwsys .c or .cxx file, suppress the Microsoft
  28. deprecation warnings. */
  29. #if defined(KWSYS_NAMESPACE)
  30. # ifndef _CRT_NONSTDC_NO_DEPRECATE
  31. # define _CRT_NONSTDC_NO_DEPRECATE
  32. # endif
  33. # ifndef _CRT_SECURE_NO_DEPRECATE
  34. # define _CRT_SECURE_NO_DEPRECATE
  35. # endif
  36. # ifndef _SCL_SECURE_NO_DEPRECATE
  37. # define _SCL_SECURE_NO_DEPRECATE
  38. # endif
  39. #endif
  40. /* Whether Large File Support is requested. */
  41. #define @KWSYS_NAMESPACE@_LFS_REQUESTED @KWSYS_LFS_REQUESTED@
  42. /* Whether Large File Support is available. */
  43. #if @KWSYS_NAMESPACE@_LFS_REQUESTED
  44. # define @KWSYS_NAMESPACE@_LFS_AVAILABLE @KWSYS_LFS_AVAILABLE@
  45. #endif
  46. /* Setup Large File Support if requested. */
  47. #if @KWSYS_NAMESPACE@_LFS_REQUESTED
  48. /* Since LFS is requested this header must be included before system
  49. headers whether or not LFS is available. */
  50. # if 0 && (defined(_SYS_TYPES_H) || defined(_SYS_TYPES_INCLUDED))
  51. # error "@KWSYS_NAMESPACE@/Configure.h must be included before sys/types.h"
  52. # endif
  53. /* Enable the large file API if it is available. */
  54. # if @KWSYS_NAMESPACE@_LFS_AVAILABLE && \
  55. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINES)
  56. # if !defined(_LARGEFILE_SOURCE) && \
  57. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE_SOURCE)
  58. # define _LARGEFILE_SOURCE
  59. # endif
  60. # if !defined(_LARGEFILE64_SOURCE) && \
  61. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE64_SOURCE)
  62. # define _LARGEFILE64_SOURCE
  63. # endif
  64. # if !defined(_LARGE_FILES) && \
  65. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGE_FILES)
  66. # define _LARGE_FILES
  67. # endif
  68. # if !defined(_FILE_OFFSET_BITS) && \
  69. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_FILE_OFFSET_BITS)
  70. # define _FILE_OFFSET_BITS 64
  71. # endif
  72. # if 0 && (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64)
  73. # error "_FILE_OFFSET_BITS must be defined to at least 64"
  74. # endif
  75. # endif
  76. #endif
  77. /* Setup the export macro. */
  78. #if defined(_WIN32) && @KWSYS_BUILD_SHARED@
  79. # if defined(@KWSYS_NAMESPACE@_EXPORTS)
  80. # define @KWSYS_NAMESPACE@_EXPORT __declspec(dllexport)
  81. # else
  82. # define @KWSYS_NAMESPACE@_EXPORT __declspec(dllimport)
  83. # endif
  84. #else
  85. # define @KWSYS_NAMESPACE@_EXPORT
  86. #endif
  87. /* Enable warnings that are off by default but are useful. */
  88. #if !defined(@KWSYS_NAMESPACE@_NO_WARNING_ENABLE)
  89. # if defined(_MSC_VER)
  90. # pragma warning ( default : 4263 ) /* no override, call convention differs */
  91. # endif
  92. #endif
  93. /* Disable warnings that are on by default but occur in valid code. */
  94. #if !defined(@KWSYS_NAMESPACE@_NO_WARNING_DISABLE)
  95. # if defined(_MSC_VER)
  96. # pragma warning (disable: 4097) /* typedef is synonym for class */
  97. # pragma warning (disable: 4127) /* conditional expression is constant */
  98. # pragma warning (disable: 4244) /* possible loss in conversion */
  99. # pragma warning (disable: 4251) /* missing DLL-interface */
  100. # pragma warning (disable: 4305) /* truncation from type1 to type2 */
  101. # pragma warning (disable: 4309) /* truncation of constant value */
  102. # pragma warning (disable: 4514) /* unreferenced inline function */
  103. # pragma warning (disable: 4706) /* assignment in conditional expression */
  104. # pragma warning (disable: 4710) /* function not inlined */
  105. # pragma warning (disable: 4786) /* identifier truncated in debug info */
  106. # endif
  107. #endif
  108. /* MSVC 6.0 in release mode will warn about code it produces with its
  109. optimizer. Disable the warnings specifically for this
  110. configuration. Real warnings will be revealed by a debug build or
  111. by other compilers. */
  112. #if !defined(@KWSYS_NAMESPACE@_NO_WARNING_DISABLE_BOGUS)
  113. # if defined(_MSC_VER) && (_MSC_VER < 1300) && defined(NDEBUG)
  114. # pragma warning ( disable : 4701 ) /* Variable may be used uninitialized. */
  115. # pragma warning ( disable : 4702 ) /* Unreachable code. */
  116. # endif
  117. #endif
  118. #endif