+WITH_NTFS_3G_DEFAULT="no"
+WITH_FUSE_DEFAULT="no"
+WINDOWS_NATIVE_BUILD="no"
+VISIBILITY_CFLAGS="-fvisibility=hidden"
+WINDOWS_CFLAGS=""
+WINDOWS_CPPFLAGS=""
+WINDOWS_LDFLAGS=""
+
+case "$host_os" in
+ mingw*)
+ # Native Windows
+ WINDOWS_NATIVE_BUILD="yes"
+ VISIBILITY_CFLAGS=""
+ WINDOWS_CFLAGS="-municode"
+ WINDOWS_CPPFLAGS="-D_POSIX -DUNICODE -D_UNICODE -D_CRT_NON_CONFORMING_SWPRINTFS"
+ WINDOWS_LDFLAGS="-no-undefined"
+ ;;
+ linux*)
+ # Linux
+ WITH_FUSE_DEFAULT="yes"
+ WITH_NTFS_3G_DEFAULT="yes"
+ ;;
+ *)
+ # Other UNIX
+ WITH_NTFS_3G_DEFAULT="yes"
+ ;;
+esac
+
+AC_SUBST([VISIBILITY_CFLAGS], [$VISIBILITY_CFLAGS])
+AC_SUBST([WINDOWS_LDFLAGS], [$WINDOWS_LDFLAGS])
+AC_SUBST([WINDOWS_CPPFLAGS], [$WINDOWS_CPPFLAGS])
+AC_SUBST([WINDOWS_CFLAGS], [$WINDOWS_CFLAGS])
+AM_CONDITIONAL([WINDOWS_NATIVE_BUILD], [test "x$WINDOWS_NATIVE_BUILD" = "xyes"])
+
+
+AM_ICONV
+if test "x$am_cv_func_iconv" != "xyes"; then
+ AC_MSG_ERROR([Cannot find the iconv() function. iconv() is used to
+ convert between encodings of WIM filenames and XML data.
+ wimlib cannot be compiled without it. iconv() is
+ available in the latest version of glibc and sometimes in
+ other libraries.])
+fi
+