_auto_link.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* We do not use auto link feature when:
  2. * - user asked not to use it (_STLP_DONT_USE_AUTO_LINK)
  3. * - STLport is used only as a STL library (_STLP_NO_IOSTREAMS || _STLP_USE_NO_IOSTREAMS)
  4. * - we are building a C translation unit, STLport is a C++ Standard library implementation
  5. */
  6. #if !defined (__BUILDING_STLPORT) && !defined (_STLP_DONT_USE_AUTO_LINK) && \
  7. !defined (_STLP_NO_IOSTREAMS) && !defined (_STLP_USE_NO_IOSTREAMS) && \
  8. defined (__cplusplus)
  9. # define _STLP_STRINGIZE(X) _STLP_STRINGIZE_AUX(X)
  10. # define _STLP_STRINGIZE_AUX(X) #X
  11. # if defined (_STLP_DEBUG)
  12. # define _STLP_LIB_OPTIM_MODE "stld"
  13. # elif defined (_DEBUG)
  14. # define _STLP_LIB_OPTIM_MODE "d"
  15. # else
  16. # define _STLP_LIB_OPTIM_MODE ""
  17. # endif
  18. # if defined (_STLP_LIB_NAME_MOTIF)
  19. # define _STLP_LIB_MOTIF "_"_STLP_LIB_NAME_MOTIF
  20. # else
  21. # define _STLP_LIB_MOTIF ""
  22. # endif
  23. # if defined (_STLP_USE_DYNAMIC_LIB)
  24. # if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
  25. # define _STLP_LIB_TYPE "_x"
  26. # else
  27. # define _STLP_LIB_TYPE ""
  28. # endif
  29. # else
  30. # if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
  31. # define _STLP_LIB_TYPE "_statix"
  32. # else
  33. # define _STLP_LIB_TYPE "_static"
  34. # endif
  35. # endif
  36. # if defined (_STLP_USE_DYNAMIC_LIB)
  37. # define _STLP_VERSION_STR "."_STLP_STRINGIZE(_STLPORT_MAJOR)"."_STLP_STRINGIZE(_STLPORT_MINOR)
  38. # else
  39. # define _STLP_VERSION_STR ""
  40. # endif
  41. # define _STLP_STLPORT_LIB "stlport"_STLP_LIB_OPTIM_MODE""_STLP_LIB_TYPE""_STLP_LIB_MOTIF""_STLP_VERSION_STR".lib"
  42. # if defined (_STLP_VERBOSE)
  43. # pragma message ("STLport: Auto linking to "_STLP_STLPORT_LIB)
  44. # endif
  45. # pragma comment (lib, _STLP_STLPORT_LIB)
  46. # undef _STLP_STLPORT_LIB
  47. # undef _STLP_LIB_OPTIM_MODE
  48. # undef _STLP_LIB_TYPE
  49. # undef _STLP_STRINGIZE_AUX
  50. # undef _STLP_STRINGIZE
  51. #endif /* _STLP_DONT_USE_AUTO_LINK */