summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac16
-rw-r--r--src/Makefile.am5
2 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6c4722f..b60548f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,22 @@ if test "x$ac_cv_have_endian" = "xno"; then
fi
fi
+# Check for operating system
+AC_MSG_CHECKING([whether to enable WIN32 build settings])
+case ${host_os} in
+ *mingw32*|*cygwin*)
+ win32=true
+ AC_MSG_RESULT([yes])
+ AC_CHECK_TOOL([WINDRES], [windres], AC_MSG_ERROR([windres not found]))
+ AC_SUBST(WINDRES)
+ ;;
+ *)
+ win32=false
+ AC_MSG_RESULT([no])
+ ;;
+esac
+AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
+
# Cython Python Bindings
AC_ARG_WITH([cython],
[AS_HELP_STRING([--without-cython],
diff --git a/src/Makefile.am b/src/Makefile.am
index f1f5f39..9186230 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,6 +4,7 @@ AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusbmuxd_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1
AM_LDFLAGS = $(libgnutls_LIBS) $(libtasn1_LIBS) $(libplist_LIBS) $(libusbmuxd_LIBS) $(libgcrypt_LIBS) ${libpthread_LIBS} $(openssl_LIBS)
lib_LTLIBRARIES = libimobiledevice.la
+libimobiledevice_la_LIBADD =
libimobiledevice_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBIMOBILEDEVICE_SO_VERSION) -no-undefined
libimobiledevice_la_SOURCES = idevice.c idevice.h \
debug.c debug.h\
@@ -25,3 +26,7 @@ libimobiledevice_la_SOURCES = idevice.c idevice.h \
misagent.c misagent.h\
restore.c restore.h\
diagnostics_relay.c diagnostics_relay.h
+
+if WIN32
+libimobiledevice_la_LIBADD += -lole32
+endif \ No newline at end of file