Makefile: use pkg-config to find libiio and libxml

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Remove some unused headers and add macros to protect non-POSIX code

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Split the OSC between a library, libosc, and the osc executable

When using Glibc or other C libraries available on Linux, GCC will
gladly link a shared library even if some symbols are unresolved (and
will be resolved at runtime).

But under Windows it does not work like that; the DLLs must have all
their symbols resolved. The simplest solution here, is to move all the
public symbols of the OSC code to a library, libosc, that the plugins
can link against.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins: Add some tweaks to compile under MinGW

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Add last tweaks to fully support MinGW

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
iio_widget: Use g_timeout_add_full instead of g_timeout_add

The callback calls GTK functions, so locking is required.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
OSC: Disable threading when compiling for Windows

This is required, otherwise the UI will lock as soon as the top-level
window is moved.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Use .exe/.dll suffixes when compiling for Windows

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Glade files: don't hardcode /usr/local prefix

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>