[FFmpeg-devel] [PATCH 2/2] configure: Add --enable-concise-version option.

Stephen Hutchinson qyot27 at gmail.com
Sun Aug 11 18:17:58 CEST 2013


This gives the user the ability to disable 'configuration:' from
the regular invocation report.
---
 cmdutils.c | 2 ++
 configure  | 6 ++++++
 ffmpeg.c   | 3 +++
 ffplay.c   | 3 +++
 ffprobe.c  | 3 +++
 5 files changed, 17 insertions(+)

diff --git a/cmdutils.c b/cmdutils.c
index 43ea21c..827a3f5 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1063,7 +1063,9 @@ static void print_program_info(int flags, int level)
     av_log(NULL, level, "%sbuilt on %s %s with %s\n",
            indent, __DATE__, __TIME__, CC_IDENT);
 
+#ifndef CONCISE_CONF
     av_log(NULL, level, "%sconfiguration: " FFMPEG_CONFIGURATION "\n", indent);
+#endif
 }
 
 static void print_buildconf(int flags, int level)
diff --git a/configure b/configure
index 3946632..a39b3d6 100755
--- a/configure
+++ b/configure
@@ -294,6 +294,7 @@ Advanced options (experts only):
                            (faster, but may crash)
   --enable-memalign-hack   emulate memalign, interferes with memory debuggers
   --enable-lto             use link-time optimization
+  --enable-concise-version omit 'configuration:' from regular invocation
 
 Optimization options (experts only):
   --disable-asm            disable all assembler optimizations
@@ -1592,6 +1593,7 @@ CMDLINE_SELECT="
     lto
     optimizations
     stripping
+    concise_version
 "
 
 PATHS_LIST='
@@ -4621,6 +4623,10 @@ test -e Makefile || $ln_s "$source_path/Makefile" .
 
 enabled stripping || strip="echo skipping strip"
 
+if enabled concise_version; then
+     add_cflags -DCONCISE_CONF
+fi
+
 config_files="$TMPH config.mak doc/config.texi"
 
 cat > config.mak <<EOF
diff --git a/ffmpeg.c b/ffmpeg.c
index cc709ab..69dab71 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3371,6 +3371,9 @@ int main(int argc, char **argv)
     if (nb_output_files <= 0 && nb_input_files == 0) {
         show_usage();
         av_log(NULL, AV_LOG_WARNING, "Use -h to get full help or, even better, run 'man %s'\n", program_name);
+#ifdef CONCISE_CONF
+        av_log(NULL, AV_LOG_WARNING, "\nUse -buildconf to get info about how this build of %s was compiled.\n", program_name);
+#endif
         exit_program(1);
     }
 
diff --git a/ffplay.c b/ffplay.c
index d462eee..8643080 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -3524,6 +3524,9 @@ int main(int argc, char **argv)
         av_log(NULL, AV_LOG_FATAL, "An input file must be specified\n");
         av_log(NULL, AV_LOG_FATAL,
                "Use -h to get full help or, even better, run 'man %s'\n", program_name);
+#ifdef CONCISE_CONF
+        av_log(NULL, AV_LOG_FATAL, "\nUse -buildconf to get info about how this build of %s was compiled.\n", program_name);
+#endif
         exit(1);
     }
 
diff --git a/ffprobe.c b/ffprobe.c
index 8a65e1a..e7bc1a6 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2414,6 +2414,9 @@ int main(int argc, char **argv)
             show_usage();
             av_log(NULL, AV_LOG_ERROR, "You have to specify one input file.\n");
             av_log(NULL, AV_LOG_ERROR, "Use -h to get full help or, even better, run 'man %s'.\n", program_name);
+#ifdef CONCISE_CONF
+            av_log(NULL, AV_LOG_ERROR, "\nUse -buildconf to get info about how this build of %s was compiled.\n", program_name);
+#endif
             ret = AVERROR(EINVAL);
         } else if (input_filename) {
             ret = probe_file(wctx, input_filename);
-- 
1.8.1.2



More information about the ffmpeg-devel mailing list