summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac9
-rw-r--r--src/dfxml.c2
-rw-r--r--src/fidentify.c2
-rw-r--r--src/misc.c2
-rw-r--r--src/misc.h2
-rw-r--r--src/phmain.c4
-rw-r--r--src/qmainrec.cpp4
-rw-r--r--src/testdisk.c4
8 files changed, 29 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ff8af07..11165d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -267,6 +267,15 @@ AS_IF([test "x$enable_stack_protector" = "xno"],
[stackProtector=1]
)
+AC_ARG_ENABLE([record-compilation-date],
+ AS_HELP_STRING([--enable-record-compilation-date],[record compilation date (default is NO)]),
+ [case "${enableval}" in
+ yes) AC_DEFINE([RECORD_COMPILATION_DATE],1,[Define to 1 to record compilation date]) ;;
+ no) ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-record-compilation-date]) ;;
+ esac]
+ )
+
use_icon=no
case "$target" in
diff --git a/src/dfxml.c b/src/dfxml.c
index fa63292..c9f4803 100644
--- a/src/dfxml.c
+++ b/src/dfxml.c
@@ -185,7 +185,9 @@ void xml_add_DFXML_creator(const char *package, const char *version)
xml_out2s("version", version);
xml_push("build_environment","");
xml_printf("<compiler>%s</compiler>\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
xml_out2s("compilation_date", get_compilation_date());
+#endif
xml_printf("<library name='libext2fs' version='%s'/>\n", td_ext2fs_version());
xml_printf("<library name='libewf' version='%s'/>\n", td_ewf_version());
xml_printf("<library name='libjpeg' version='%s'/>\n", td_jpeg_version());
diff --git a/src/fidentify.c b/src/fidentify.c
index 824924e..a28712d 100644
--- a/src/fidentify.c
+++ b/src/fidentify.c
@@ -189,7 +189,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("libjpeg: %s\n", td_jpeg_version());
printf("OS: %s\n" , get_os());
}
diff --git a/src/misc.c b/src/misc.c
index 0b02a54..34265b1 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -270,6 +270,7 @@ const char *get_compiler(void)
return buffer;
}
+#ifdef RECORD_COMPILATION_DATE
const char *get_compilation_date(void)
{
static char buffer[100] = {0x00};
@@ -294,3 +295,4 @@ const char *get_compilation_date(void)
#endif
return buffer;
}
+#endif
diff --git a/src/misc.h b/src/misc.h
index a553e56..28b0c60 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -25,7 +25,9 @@ extern "C" {
const char *get_os(void);
const char *get_compiler(void);
+#ifdef RECORD_COMPILATION_DATE
const char *get_compilation_date(void);
+#endif
#ifdef __cplusplus
} /* closing brace for extern "C" */
diff --git a/src/phmain.c b/src/phmain.c
index 869f01e..a1e4484 100644
--- a/src/phmain.c
+++ b/src/phmain.c
@@ -114,7 +114,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version(), td_curses_version());
printf("OS: %s\n" , get_os());
@@ -318,7 +320,9 @@ int main( int argc, char **argv )
log_info("PhotoRec %s, Data Recovery Utility, %s\nChristophe GRENIER <grenier@cgsecurity.org>\nhttp://www.cgsecurity.org\n", VERSION, TESTDISKDATE);
log_info("OS: %s\n" , get_os());
log_info("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
log_info("Compilation date: %s\n", get_compilation_date());
+#endif
log_info("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version(), td_curses_version());
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(DJGPP)
diff --git a/src/qmainrec.cpp b/src/qmainrec.cpp
index b8cf0ad..43b9c94 100644
--- a/src/qmainrec.cpp
+++ b/src/qmainrec.cpp
@@ -63,7 +63,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version());
printf("OS: %s\n" , get_os());
@@ -114,7 +116,9 @@ int main(int argc, char *argv[])
log_info("PhotoRec %s, Data Recovery Utility, %s\nChristophe GRENIER <grenier@cgsecurity.org>\nhttp://www.cgsecurity.org\n", VERSION, TESTDISKDATE);
log_info("OS: %s\n" , get_os());
log_info("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
log_info("Compilation date: %s\n", get_compilation_date());
+#endif
log_info("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version());
diff --git a/src/testdisk.c b/src/testdisk.c
index 1e594e9..21c67f8 100644
--- a/src/testdisk.c
+++ b/src/testdisk.c
@@ -117,7 +117,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("ext2fs lib: %s, ntfs lib: %s, reiserfs lib: %s, ewf lib: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_reiserfs_version(), td_ewf_version(), td_curses_version());
printf("OS: %s\n" , get_os());
@@ -404,7 +406,9 @@ int main( int argc, char **argv )
log_info("TestDisk %s, Data Recovery Utility, %s\nChristophe GRENIER <grenier@cgsecurity.org>\nhttp://www.cgsecurity.org\n", VERSION, TESTDISKDATE);
log_info("OS: %s\n" , get_os());
log_info("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
log_info("Compilation date: %s\n", get_compilation_date());
+#endif
log_info("ext2fs lib: %s, ntfs lib: %s, reiserfs lib: %s, ewf lib: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_reiserfs_version(), td_ewf_version(), td_curses_version());
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(DJGPP)