|
| 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 | +// |
| 65 | +#define BOOST_LIB_NAME boost_numpy |
| 66 | +// |
| 67 | +// If we're importing code from a dll, then tell auto_link.hpp about it: |
| 68 | +// |
| 69 | +#ifdef BOOST_NUMPY_DYNAMIC_LIB |
| 70 | +# define BOOST_DYN_LINK |
| 71 | +#endif |
| 72 | +// |
| 73 | +// And include the header that does the work: |
| 74 | +// |
| 75 | +#include <boost/config/auto_link.hpp> |
| 76 | +#endif // auto-linking disabled |
| 77 | + |
| 78 | +#endif // CONFIG_NUMPY20170215_H_ |
0 commit comments