diff --git a/ChangeLog b/ChangeLog index a87cb166..7dfa0f93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,7 @@ - Move ntfs2utc and utc2ntfs from utils.[ch] to ntfstime.h. (Yura, Anton) - Add [acm]time fields to struct ntfs_inode and set them during - ntfs_inode_openi(). Update ntfsmount to use them. (Yura) + ntfs_inode_open(). Update ntfsmount to use them. (Yura) - index.c::ntfs_index_lookup(): Fix bug when index context did not point to the index root in which the entry located. (Yura) - ntfsresize: relocate_attributes(): Do not stop processing MFT record diff --git a/configure.ac b/configure.ac index 65215d6d..1dcecde3 100644 --- a/configure.ac +++ b/configure.ac @@ -51,7 +51,7 @@ fi # Command-line options. AC_ARG_ENABLE(debug, AS_HELP_STRING(--enable-debug,enable additional debugging code and - output), , + output), , enable_debug=no ) @@ -77,14 +77,20 @@ AC_ARG_ENABLE(gnome-vfs, ) AC_ARG_ENABLE(fuse-module, - AS_HELP_STRING(--disable-fuse-module,omit FUSE 'libntfs' - interface (default=detect)), , + AS_HELP_STRING(--disable-fuse-module,omit FUSE 'libntfs' interface + (default=detect)), , enable_fuse_module=auto ) +AC_ARG_ENABLE(crypto, + AS_HELP_STRING(--enable-crypto,enable crypto related code and utilities + (default=no)), , + enable_crypto=no +) + AC_ARG_ENABLE(really-static, - AS_HELP_STRING(--enable-really-static,create completely static - binaries for the utilities), , + AS_HELP_STRING(--enable-really-static,create completely static binaries + for the utilities), , enable_really_static=no ) AM_CONDITIONAL(REALLYSTATIC, test "$enable_really_static" = yes) @@ -150,6 +156,20 @@ if test "$enable_fuse_module" != "no"; then fi AM_CONDITIONAL(ENABLE_FUSE_MODULE, $compile_fuse_module) +# Autodetect whether we can build crypto stuff or not. +compile_crypto=false +if test "$enable_crypto" != "no"; then + PKG_CHECK_MODULES(CRYPTO, [libgcrypt], [ compile_crypto=true ], + [ + if test "$enable_crypto" = "yes"; then + AC_MSG_ERROR([Linux-NTFS crypto code requires the gcrypt library.]) + else + AC_MSG_WARN([Linux-NTFS crypto code requires the gcrypt library.]) + fi + ]) +fi +AM_CONDITIONAL(ENABLE_CRYPTO, $compile_crypto) + # add --with-extra-includes and --with-extra-libs switch to ./configure all_libraries="$all_libraries $USER_LDFLAGS" all_includes="$all_includes $USER_INCLUDES" @@ -217,7 +237,7 @@ AC_CHECK_HEADERS([ctype.h fcntl.h libintl.h limits.h locale.h mntent.h \ errno.h time.h unistd.h utime.h wchar.h getopt.h features.h endian.h \ byteswap.h sys/byteorder.h sys/endian.h sys/param.h sys/ioctl.h \ sys/mount.h sys/stat.h sys/types.h sys/vfs.h linux/major.h linux/fd.h \ - linux/hdreg.h machine/endian.h]) + linux/hdreg.h machine/endian.h gcrypt.h windows.h wincrypt.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL @@ -243,7 +263,7 @@ AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF AC_CHECK_FUNCS([atexit fdatasync hasmntopt memmove memset regcomp setlocale \ strcasecmp strchr strdup strerror strtol strtoul utime mbsinit \ - setxattr]) + setxattr getopt_long ]) # Makefiles to be created by configure. AC_CONFIG_FILES([ diff --git a/ntfsprogs/Makefile.am b/ntfsprogs/Makefile.am index e74bf4de..99f2bd2d 100644 --- a/ntfsprogs/Makefile.am +++ b/ntfsprogs/Makefile.am @@ -15,7 +15,7 @@ bin_PROGRAMS = ntfsfix ntfsinfo ntfscluster ntfsls ntfscat sbin_PROGRAMS = mkntfs ntfslabel ntfsundelete ntfsresize ntfsclone \ ntfscp EXTRA_PROGRAMS = ntfsdump_logfile ntfswipe ntfstruncate ntfsmove \ - ntfsrm ntfsmftalloc ntfsdecrypt + ntfsrm ntfsmftalloc man_MANS = mkntfs.8 ntfsfix.8 ntfslabel.8 ntfsinfo.8 \ ntfsundelete.8 ntfsresize.8 ntfsprogs.8 ntfsls.8 \ @@ -33,6 +33,10 @@ if ENABLE_FUSE_MODULE bin_PROGRAMS += ntfsmount endif +if ENABLE_CRYPTO +EXTRA_PROGRAMS += ntfsdecrypt +endif + # Set the include path. AM_CPPFLAGS = -I$(top_srcdir)/include/ntfs $(all_includes) @@ -89,10 +93,6 @@ endif # We don't distribute these -ntfsdecrypt_SOURCES = ntfsdecrypt.c decrypt.c decrypt.h utils.c utils.h -ntfsdecrypt_LDADD = $(AM_LIBS) -ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) -lgcrypt - ntfsrm_SOURCES = ntfsrm.c ntfsrm.h utils.c utils.h ntfsrm_LDADD = $(AM_LIBS) ntfsrm_LDFLAGS = $(AM_LFLAGS) @@ -117,6 +117,12 @@ ntfsdump_logfile_SOURCES= ntfsdump_logfile.c ntfsdump_logfile_LDADD = $(AM_LIBS) ntfsdump_logfile_LDFLAGS= $(AM_LFLAGS) +if ENABLE_CRYPTO +ntfsdecrypt_SOURCES = ntfsdecrypt.c decrypt.c decrypt.h utils.c utils.h +ntfsdecrypt_LDADD = $(AM_LIBS) +ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) -lgcrypt +endif + # Extra targets strip: $(bin_PROGRAMS) $(sbin_PROGRAMS) @@ -125,4 +131,3 @@ strip: $(bin_PROGRAMS) $(sbin_PROGRAMS) extra: extras extras: $(EXTRA_PROGRAMS) -