Configure.h.in 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. /* Whether Large File Support is requested. */
  35. #define @KWSYS_NAMESPACE@_LFS_REQUESTED @KWSYS_LFS_REQUESTED@
  36. /* Whether Large File Support is available. */
  37. #if @KWSYS_NAMESPACE@_LFS_REQUESTED
  38. # define @KWSYS_NAMESPACE@_LFS_AVAILABLE @KWSYS_LFS_AVAILABLE@
  39. #endif
  40. /* Setup Large File Support if requested. */
  41. #if @KWSYS_NAMESPACE@_LFS_REQUESTED
  42. /* Since LFS is requested this header must be included before system
  43. headers whether or not LFS is available. */
  44. # if 0 && (defined(_SYS_TYPES_H) || defined(_SYS_TYPES_INCLUDED))
  45. # error "@KWSYS_NAMESPACE@/Configure.h must be included before sys/types.h"
  46. # endif
  47. /* Enable the large file API if it is available. */
  48. # if @KWSYS_NAMESPACE@_LFS_AVAILABLE && \
  49. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINES)
  50. # if !defined(_LARGEFILE_SOURCE) && \
  51. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE_SOURCE)
  52. # define _LARGEFILE_SOURCE
  53. # endif
  54. # if !defined(_LARGEFILE64_SOURCE) && \
  55. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE64_SOURCE)
  56. # define _LARGEFILE64_SOURCE
  57. # endif
  58. # if !defined(_LARGE_FILES) && \
  59. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGE_FILES)
  60. # define _LARGE_FILES
  61. # endif
  62. # if !defined(_FILE_OFFSET_BITS) && \
  63. !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_FILE_OFFSET_BITS)
  64. # define _FILE_OFFSET_BITS 64
  65. # endif
  66. # if 0 && (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64)
  67. # error "_FILE_OFFSET_BITS must be defined to at least 64"
  68. # endif
  69. # endif
  70. #endif
  71. /* Setup the export macro. */
  72. #if @KWSYS_BUILD_SHARED@
  73. # if defined(_WIN32) || defined(__CYGWIN__)
  74. # if defined(@KWSYS_NAMESPACE@_EXPORTS)
  75. # define @KWSYS_NAMESPACE@_EXPORT __declspec(dllexport)
  76. # else
  77. # define @KWSYS_NAMESPACE@_EXPORT __declspec(dllimport)
  78. # endif
  79. # elif __GNUC__ >= 4
  80. # define @KWSYS_NAMESPACE@_EXPORT __attribute__ ((visibility("default")))
  81. # else
  82. # define @KWSYS_NAMESPACE@_EXPORT
  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. # if defined(__BORLANDC__) && !defined(__cplusplus)
  108. /* Code has no effect; raised by winnt.h in C (not C++) when ignoring an
  109. unused parameter using "(param)" syntax (i.e. no cast to void). */
  110. # pragma warn -8019
  111. # endif
  112. #endif
  113. /* MSVC 6.0 in release mode will warn about code it produces with its
  114. optimizer. Disable the warnings specifically for this
  115. configuration. Real warnings will be revealed by a debug build or
  116. by other compilers. */
  117. #if !defined(@KWSYS_NAMESPACE@_NO_WARNING_DISABLE_BOGUS)
  118. # if defined(_MSC_VER) && (_MSC_VER < 1300) && defined(NDEBUG)
  119. # pragma warning ( disable : 4701 ) /* Variable may be used uninitialized. */
  120. # pragma warning ( disable : 4702 ) /* Unreachable code. */
  121. # endif
  122. #endif
  123. #endif