) {
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
- ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB");
+ ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB /D PHP_CURL_EXPORTS=1");
PHP_INSTALL_HEADERS("ext/curl", "php_curl.h");
// TODO: check for curl_version_info
} else {
#include "php.h"
#ifdef PHP_WIN32
-# define PHP_CURL_API __declspec(dllexport)
+# ifdef PHP_CURL_EXPORTS
+# define PHP_CURL_API __declspec(dllexport)
+# else
+# define PHP_CURL_API __declspec(dllimport)
+# endif
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_CURL_API __attribute__ ((visibility("default")))
#else