]> wimlib.net Git - wimlib/blobdiff - configure.ac
mount_image.c: add fallback definitions of RENAME_* constants
[wimlib] / configure.ac
index 8c77b2eb55c0a454bc628bcb093f9ebcbaa41cfd..21fec5bfe59481b21cabc77e6420a258ca2d2611 100644 (file)
@@ -1,6 +1,6 @@
 ###############################################################################
 
-AC_INIT([wimlib], m4_esyscmd_s([tools/get-version-number]),
+AC_INIT([wimlib], m4_esyscmd_s([tools/get-version-number.sh]),
        [https://wimlib.net/forums/])
 AC_CONFIG_SRCDIR([src/wim.c])
 AC_CONFIG_MACRO_DIR([m4])
@@ -10,6 +10,7 @@ AM_SILENT_RULES([yes])
 AC_C_BIGENDIAN
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 LT_INIT
+PKG_PROG_PKG_CONFIG
 
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile] [doc/Doxyfile] [wimlib.pc])
@@ -36,7 +37,7 @@ mingw*)
        # Native Windows
        WINDOWS_NATIVE_BUILD="yes"
        # -D__MINGW_USE_VC2005_COMPAT: make time_t 64-bit on 32-bit Windows.
-       PLATFORM_CPPFLAGS="-D_POSIX -D_POSIX_THREAD_SAFE_FUNCTIONS -DUNICODE -D_UNICODE -D_CRT_NON_CONFORMING_SWPRINTFS -D__MINGW_USE_VC2005_COMPAT"
+       PLATFORM_CPPFLAGS="-D_POSIX -D_POSIX_THREAD_SAFE_FUNCTIONS -DUNICODE -D_UNICODE -D_CRT_NON_CONFORMING_SWPRINTFS -D__MINGW_USE_VC2005_COMPAT -D_WIN32_WINNT=0x0600"
        PLATFORM_CFLAGS="-municode -mno-ms-bitfields"
        PLATFORM_LDFLAGS="-no-undefined"
        WITH_NTFS_3G_DEFAULT="no"
@@ -94,23 +95,14 @@ AC_CHECK_MEMBER([struct stat.st_mtim],
                [],
                [#include <sys/stat.h>])
 
-# Check for possible support for the Linux getrandom() system call
-AC_CHECK_DECL([__NR_getrandom],
-             [AC_DEFINE([HAVE_NR_GETRANDOM], [1], [Define to 1 if the system
-              headers define a system call number for getrandom()])],
-             [],
-             [#include <sys/syscall.h>])
-
 ###############################################################################
 #                           Required libraries                               #
 ###############################################################################
 
 # ------------------------------ pthreads -------------------------------------
-AX_PTHREAD([], [AC_MSG_ERROR(["cannot find pthreads library"])])
-
-# ------------------------------ libxml2 --------------------------------------
-PKG_CHECK_MODULES([LIBXML2], [libxml-2.0])
-PKGCONFIG_PRIVATE_REQUIRES="$PKGCONFIG_PRIVATE_REQUIRES libxml-2.0"
+if test "$WINDOWS_NATIVE_BUILD" != "yes"; then
+       AX_PTHREAD([], [AC_MSG_ERROR(["cannot find pthreads library"])])
+fi
 
 ###############################################################################
 #                        Configuration options                               #
@@ -136,7 +128,9 @@ if test "$WITH_NTFS_3G" = "yes"; then
                 NTFS volume while preserving NTFS-specific data such as
                 security descriptors and named data streams.  Either install
                 libntfs-3g, or configure --without-ntfs-3g to disable this
-                feature.])])
+                feature.  If your operating system packages development files
+                separately, the package you need to install may be called
+                ntfs-3g-dev, ntfs-3g-devel, or similar.])])
        PKGCONFIG_PRIVATE_REQUIRES="$PKGCONFIG_PRIVATE_REQUIRES libntfs-3g"
        AC_DEFINE([WITH_NTFS_3G], [1], [Define to 1 if using NTFS-3G support])
 fi
@@ -147,7 +141,7 @@ AM_CONDITIONAL([WITH_NTFS_3G], [test "$WITH_NTFS_3G" = "yes"])
 AC_MSG_CHECKING([whether to include support for mounting WIMs])
 AC_ARG_WITH([fuse],
            [AS_HELP_STRING([--without-fuse],
-                           [build without libfuse.  This will disable the
+                           [build without libfuse3.  This will disable the
                             ability to mount WIM images.])],
            [WITH_FUSE=$withval],
            [WITH_FUSE=$WITH_FUSE_DEFAULT])
@@ -155,11 +149,13 @@ AC_MSG_RESULT([$WITH_FUSE])
 
 if test "$WITH_FUSE" = "yes"; then
 
-       PKG_CHECK_MODULES([LIBFUSE], [fuse], [],
-               [AC_MSG_ERROR([Cannot find libfuse!
-               Without libfuse, wimlib cannot include support for mounting WIM
-               images.  Either install libfuse, or configure --without-fuse to
-               disable this feature.])])
+       PKG_CHECK_MODULES([LIBFUSE], [fuse3], [],
+               [AC_MSG_ERROR([Cannot find libfuse3!
+               Without libfuse3, wimlib cannot include support for mounting WIM
+               images.  Either install libfuse3, or configure --without-fuse to
+               disable this feature.  If your operating system packages
+               development files separately, the package you need to install
+               may be called libfuse3-dev, fuse-devel, or similar.])])
        PKGCONFIG_PRIVATE_REQUIRES="$PKGCONFIG_PRIVATE_REQUIRES fuse"
        AC_DEFINE([WITH_FUSE], [1], [Define to 1 if using FUSE support])