]> git.buserror.net Git - polintos/scott/priv.git/blob - include/c++/stl/stl/config/_detect_dll_or_lib.h
Add STLport 5.1.4
[polintos/scott/priv.git] / include / c++ / stl / stl / config / _detect_dll_or_lib.h
1 /* File used to define macros:
2  * _STLP_USE_DYNAMIC_LIB: To signal use STLport as a dll or build of the
3  *                        STLport dlls.
4  * _STLP_USE_STATIC_LIB: To signal use of STLport as a static lib or build of
5  *                       the STLport static libs.
6  * _STLP_USING_CROSS_NATIVE_RUNTIME_LIB: Signal that we are using a native runtime
7  *                                       in a version different from the STLport one.
8  * If _STLP_USE_DYNAMIC_LIB or _STLP_USE_STATIC_LIB is alreday defined it means that
9  * user forces use of a specific version. In this case _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
10  * will surely be defined otherwise there is no need to force macro defines.
11  *
12  * Before including this file the compiler must define:
13  * _STLP_DLL: If we are building a dll
14  * _STLP_RUNTIME_DLL: If we are using native runtime as a dll
15  */
16 #if defined (__BUILDING_STLPORT)
17 #  undef _STLP_USE_DYNAMIC_LIB
18 #  undef _STLP_USE_STATIC_LIB
19 #  if defined (_STLP_DLL)
20 /* We are building the STLport dll */
21 #    define _STLP_USE_DYNAMIC_LIB
22 #    if !defined (_STLP_RUNTIME_DLL)
23 #      define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
24 #    endif
25 #  else
26 #    define _STLP_USE_STATIC_LIB
27 #    if defined (_STLP_RUNTIME_DLL)
28 #      define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
29 #    endif
30 #  endif
31 #else
32 #  if !defined (_STLP_NO_IOSTREAMS)
33 /* STLport use only depend on _STLP_RUNTIME_DLL as we are replacing
34  * the native runtime.
35  */
36 #    if defined (_STLP_RUNTIME_DLL)
37 #      if !defined (_STLP_USE_STATIC_LIB)
38 #        if !defined (_STLP_USE_DYNAMIC_LIB)
39 #          define _STLP_USE_DYNAMIC_LIB
40 #        endif
41 #      else
42 /* The user is forcing use of STLport as a dynamic library. We signal it so
43  * that the STLport namespace will be modify to report such a combination
44  * and force the user to link with the rebuilt STLport library.
45  */
46 #        define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
47 #      endif
48 #    else
49 #      if !defined(_STLP_USE_DYNAMIC_LIB)
50 #        if !defined (_STLP_USE_STATIC_LIB)
51 #          define _STLP_USE_STATIC_LIB
52 #        endif
53 #      else
54 /* Idem previous remark but the user forces use of the static native runtime.
55  */
56 #        define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
57 #      endif
58 #    endif
59 #  else
60 /* If we do not build and use STLport libs we consider that we are in a static lib
61  * mode as only dynamic lib needs additional export/import specifier.
62  */
63 #    define _STLP_USE_STATIC_LIB
64 #  endif
65 #endif
66
67 /* we don't have a static native runtime library on evc3/evc4 */
68 #ifdef _STLP_WCE
69 #  undef _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
70 #endif