]>
Commit | Line | Data |
---|---|---|
b32b8144 FG |
1 | // (C) Copyright Samuli-Petrus Korhonen 2017. |
2 | // Distributed under the Boost Software License, Version 1.0. (See | |
3 | // accompanying file LICENSE_1_0.txt or copy at | |
4 | // http://www.boost.org/LICENSE_1_0.txt) | |
5 | // | |
6 | // The author gratefully acknowleges the support of NMR Solutions, Inc., in | |
7 | // producing this work. | |
8 | ||
9 | // Revision History: | |
10 | // 15 Feb 17 Initial version | |
11 | ||
12 | #ifndef CONFIG_NUMPY20170215_H_ | |
13 | # define CONFIG_NUMPY20170215_H_ | |
14 | ||
15 | # include <boost/config.hpp> | |
16 | ||
17 | /***************************************************************************** | |
18 | * | |
19 | * Set up dll import/export options: | |
20 | * | |
21 | ****************************************************************************/ | |
22 | ||
23 | // backwards compatibility: | |
24 | #ifdef BOOST_NUMPY_STATIC_LIB | |
25 | # define BOOST_NUMPY_STATIC_LINK | |
26 | # elif !defined(BOOST_NUMPY_DYNAMIC_LIB) | |
27 | # define BOOST_NUMPY_DYNAMIC_LIB | |
28 | #endif | |
29 | ||
30 | #if defined(BOOST_NUMPY_DYNAMIC_LIB) | |
31 | # if defined(BOOST_SYMBOL_EXPORT) | |
32 | # if defined(BOOST_NUMPY_SOURCE) | |
33 | # define BOOST_NUMPY_DECL BOOST_SYMBOL_EXPORT | |
34 | # define BOOST_NUMPY_DECL_FORWARD BOOST_SYMBOL_FORWARD_EXPORT | |
35 | # define BOOST_NUMPY_DECL_EXCEPTION BOOST_EXCEPTION_EXPORT | |
36 | # define BOOST_NUMPY_BUILD_DLL | |
37 | # else | |
38 | # define BOOST_NUMPY_DECL BOOST_SYMBOL_IMPORT | |
39 | # define BOOST_NUMPY_DECL_FORWARD BOOST_SYMBOL_FORWARD_IMPORT | |
40 | # define BOOST_NUMPY_DECL_EXCEPTION BOOST_EXCEPTION_IMPORT | |
41 | # endif | |
42 | # endif | |
43 | ||
44 | #endif | |
45 | ||
46 | #ifndef BOOST_NUMPY_DECL | |
47 | # define BOOST_NUMPY_DECL | |
48 | #endif | |
49 | ||
50 | #ifndef BOOST_NUMPY_DECL_FORWARD | |
51 | # define BOOST_NUMPY_DECL_FORWARD | |
52 | #endif | |
53 | ||
54 | #ifndef BOOST_NUMPY_DECL_EXCEPTION | |
55 | # define BOOST_NUMPY_DECL_EXCEPTION | |
56 | #endif | |
57 | ||
58 | // enable automatic library variant selection ------------------------------// | |
59 | ||
60 | #if !defined(BOOST_NUMPY_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_NUMPY_NO_LIB) | |
61 | // | |
62 | // Set the name of our library, this will get undef'ed by auto_link.hpp | |
63 | // once it's done with it: | |
64 | // | |
92f5a8d4 TL |
65 | #define _BOOST_PYTHON_CONCAT(N, M, m) N ## M ## m |
66 | #define BOOST_PYTHON_CONCAT(N, M, m) _BOOST_PYTHON_CONCAT(N, M, m) | |
67 | #define BOOST_LIB_NAME BOOST_PYTHON_CONCAT(boost_numpy, PY_MAJOR_VERSION, PY_MINOR_VERSION) | |
b32b8144 FG |
68 | // |
69 | // If we're importing code from a dll, then tell auto_link.hpp about it: | |
70 | // | |
71 | #ifdef BOOST_NUMPY_DYNAMIC_LIB | |
72 | # define BOOST_DYN_LINK | |
73 | #endif | |
74 | // | |
75 | // And include the header that does the work: | |
76 | // | |
77 | #include <boost/config/auto_link.hpp> | |
78 | #endif // auto-linking disabled | |
79 | ||
92f5a8d4 TL |
80 | #undef BOOST_PYTHON_CONCAT |
81 | #undef _BOOST_PYTHON_CONCAT | |
82 | ||
b32b8144 FG |
83 | #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
84 | ||
85 | #endif // CONFIG_NUMPY20170215_H_ |