]> wimlib.net Git - wimlib/blobdiff - configure.ac
Win32 capture: Query stream information with native API
[wimlib] / configure.ac
index 84c397a390c734ef91ffac793067c10358c808c5..3e076173dec796c0154b16a5bea78bbc322cb57f 100644 (file)
@@ -231,6 +231,24 @@ case "$host" in
                ;;
 esac
 
+AC_ARG_WITH([ntdll],
+           AS_HELP_STRING([--without-ntdll], [Windows only:  do not link with
+                           ntdll.  By default, in some parts of its code,
+                           wimlib uses Windows NT system calls to work around
+                           flaws in the Win32 API.  This support can be omitted
+                           if needed, but some annoying bugs will surface (e.g.
+                           permission denied errors even when running as the
+                           Administrator).]),
+       [WITH_NTDLL=$withval],
+       [WITH_NTDLL=yes])
+
+if test "x$WINDOWS_NATIVE_BUILD" = "xyes"; then
+       if test "x$WITH_NTDLL" = "xyes"; then
+               WINDOWS_LDADD="$WINDOWS_LDADD -lntdll"
+               AC_DEFINE([WITH_NTDLL], [1], [Define to 1 if linking with ntdll])
+       fi
+fi
+
 AC_SUBST([VISIBILITY_CFLAGS], [$VISIBILITY_CFLAGS])
 AC_SUBST([WINDOWS_LDFLAGS], [$WINDOWS_LDFLAGS])
 AC_SUBST([WINDOWS_LDADD], [$WINDOWS_LDADD])