summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index cf4a872..91f70bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,29 @@ PKG_CHECK_MODULES(libplist, libplist >= 0.15)
PKG_CHECK_MODULES(libzip, libzip >= 0.8)
PKG_CHECK_MODULES(libcurl, libcurl >= 7.0)
+GLOBAL_CFLAGS=""
+AC_LDADD=""
+AC_LDFLAGS=""
+case "$host_os" in
+ darwin*)
+ AC_LDADD="-lusb-1.0"
+ ;;
+ linux*)
+ AC_LDADD="-lusb-1.0"
+ ;;
+ mingw32)
+ GLOBAL_CFLAGS+="-DWIN32 -D__LITTLE_ENDIAN__=1"
+ AC_LDFLAGS+="-static-libgcc"
+ AC_LDADD="-lsetupapi"
+ ;;
+ *)
+ ;;
+esac
+
+AC_SUBST(GLOBAL_CFLAGS)
+AC_SUBST(AC_LDFLAGS)
+AC_SUBST(AC_LDADD)
+
AC_CONFIG_FILES(Makefile src/Makefile)
AC_OUTPUT