]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Changes to configure.ac from MSYS2 Pacman project for mingw-w64. This allows you...
authorJ. Peter Mugaas <jpmugaas@suddenlink.net>
Mon, 12 Dec 2016 13:32:01 +0000 (08:32 -0500)
committerJ. Peter Mugaas <jpmugaas@suddenlink.net>
Mon, 12 Dec 2016 13:32:01 +0000 (08:32 -0500)
configure.ac

index ffefa6c51d1d9d0ab847a7e720abe8b8508680b1..c35adc129b7703bdaa04608aac74b53a8b5693b3 100644 (file)
@@ -279,7 +279,6 @@ AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/statfs.h sys/statvfs.h
 AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h])
 AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h wctype.h])
 AC_CHECK_HEADERS([windows.h])
-AC_CHECK_HEADERS([Bcrypt.h])
 # check windows.h first; the other headers require it.
 AC_CHECK_HEADERS([wincrypt.h winioctl.h],[],[],
 [[#ifdef HAVE_WINDOWS_H
@@ -386,6 +385,9 @@ if test "x$with_lzo2" != "xno"; then
   AC_CHECK_LIB(lzo2,lzo1x_decompress_safe)
 fi
 
+AC_ARG_WITH([cng],
+  AS_HELP_STRING([--without-cng], [Don't build support of CNG(Crypto Next Generation)]))
+
 AC_ARG_WITH([nettle],
   AS_HELP_STRING([--without-nettle], [Don't build with crypto support from Nettle]))
 AC_ARG_WITH([openssl],
@@ -820,6 +822,16 @@ case "$host_os" in
        ;;
 esac
 
+if test "x$with_cng" != "xno"; then
+    AC_CHECK_HEADERS([bcrypt.h],[
+        LIBS="$LIBS -lbcrypt"
+    ],[],
+    [[#ifdef HAVE_WINDOWS_H
+    # include <windows.h>
+    #endif
+    ]])
+fi
+
 if test "x$with_nettle" != "xno"; then
     AC_CHECK_HEADERS([nettle/md5.h nettle/ripemd160.h nettle/sha.h])
     AC_CHECK_HEADERS([nettle/pbkdf2.h nettle/aes.h nettle/hmac.h])