1 #ifndef LIBPKGCONF_LIBPKGCONF_API_H 2 #define LIBPKGCONF_LIBPKGCONF_API_H 3 4 /* Makefile.am specifies visibility using the libtool option -export-symbols-regex '^pkgconf_' 5 * Unfortunately, that is not available when building with meson, so use attributes instead. 6 */ 7 #if defined(PKGCONFIG_IS_STATIC) 8 # define PKGCONF_API 9 #elif defined(_WIN32) || defined(_WIN64) 10 # if defined(LIBPKGCONF_EXPORT) || defined(DLL_EXPORT) 11 # define PKGCONF_API __declspec(dllexport) 12 # else 13 # define PKGCONF_API __declspec(dllimport) 14 # endif 15 #else 16 # define PKGCONF_API __attribute__((visibility("default"))) 17 #endif 18 19 #endif 20