qulogic/pidgin

Fix Windows builds and tests

2020-12-22, Elliott Sales de Andrade
48dfed6f4f1f
Fix Windows builds and tests

* Make math library optional.
As the comment says, it should be optional on Windows and Haiku, but the check defaults to required.
* Don't make `unistd.h` required.
* Disable transparency plugin build as it's very busted.
* Add missing headers to fix compile on Windows.
* Use a fixed pref key for test plugin loading instead of `TEST_DATA_DIR`.
The latter is an absolute path, and thus unsuitable as a preference key, since it will not start with `/` on Windows.
* Add a missing pref initialization on Windows.

Testing Done:
Compiled and run tests on Windows.

Reviewed at https://reviews.imfreedom.org/r/308/
#ifndef PURPLE_SAMETIME_SAMETIME_H
#define PURPLE_SAMETIME_SAMETIME_H
#include <gmodule.h>
#define MW_TYPE_PROTOCOL (mw_protocol_get_type())
#define MW_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MW_TYPE_PROTOCOL, mwProtocol))
#define MW_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MW_TYPE_PROTOCOL, mwProtocolClass))
#define MW_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MW_TYPE_PROTOCOL))
#define MW_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MW_TYPE_PROTOCOL))
#define MW_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MW_TYPE_PROTOCOL, mwProtocolClass))
/* CFLAGS trumps configure values */
/** default host for the purple plugin. You can specialize a build to
default to your server by supplying this at compile time */
#ifndef MW_PLUGIN_DEFAULT_HOST
#define MW_PLUGIN_DEFAULT_HOST ""
#endif
/* "" */
/** default port for the purple plugin. You can specialize a build to
default to your server by supplying this at compile time */
#ifndef MW_PLUGIN_DEFAULT_PORT
#define MW_PLUGIN_DEFAULT_PORT 1533
#endif
/* 1533 */
/** default encoding for the purple plugin.*/
#ifndef MW_PLUGIN_DEFAULT_ENCODING
#define MW_PLUGIN_DEFAULT_ENCODING "ISO-8859-1"
#endif
/* ISO-8859-1 */
typedef struct
{
PurpleProtocol parent;
} mwProtocol;
typedef struct
{
PurpleProtocolClass parent_class;
} mwProtocolClass;
/**
* Returns the GType for the mwProtocol object.
*/
G_MODULE_EXPORT GType mw_protocol_get_type(void);
#endif /* PURPLE_SAMETIME_SAMETIME_H */