aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-10 15:43:34 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-11 13:03:00 +0200
commitbd94eccbdf17c17faf8c0bc96177a497fd9d2655 (patch)
treec15ae30141d5d10f53aaea5b7dc205b17a315afa
parentf6097a5e6846199a04eb5b2f1895afc09bf9132b (diff)
Add configure check for Windows
Set an automake variable and force --without-tools by default. Also, don't even try to check for pthread if we are compiling for Windows. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-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 #####