summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 018b3f6..96aafab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,7 @@ AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_SYS_LARGEFILE
+AC_CANONICAL_HOST
m4_ifndef([PKG_PROG_PKG_CONFIG],
[m4_fatal([Could not locate the pkg-config autoconf
@@ -41,6 +42,18 @@ UL_WARN_ADD([-pedantic])
AC_SUBST([WARN_CFLAGS])
+##### target detection & target specific stuff #####
+
+build_windows="no"
+
+case "${host_os}" in
+cygwin*|mingw*)
+ build_windows=yes
+ ;;
+esac
+
+AM_CONDITIONAL([WINDOWS], [test "x$build_windows" = "xyes"])
+
##### config options #####
AC_ARG_WITH([xz],
@@ -74,6 +87,14 @@ AC_ARG_WITH([tools],
[Only build libsquashfs, do not build the tools.])],
[build_tools="${withval}"], [build_tools="yes"])
+if test "x$build_windows" = "xyes"; then
+ want_pthread="no"
+fi
+
+if test "x$build_windows" = "xyes"; then
+ build_tools="no"
+fi
+
AM_CONDITIONAL([BUILD_TOOLS], [test "x$build_tools" = "xyes"])
##### Doxygen reference manual #####