[FFmpeg-devel] [PATCH 3/3] cmdutils: Make the output of -buildconf print one option per line.

Stephen Hutchinson qyot27 at gmail.com
Sat Aug 10 15:45:38 CEST 2013


---
 cmdutils.c | 9 ++++++++-
 configure  | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index 4faf5ad..ffe7bba 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1072,8 +1072,15 @@ static void print_program_info(int flags, int level)
 static void print_buildconf(int flags, int level)
 {
     const char *indent = flags & INDENT? "  " : "";
+    char str[] = { FFMPEG_CONFIGURATION_FORMATTED };
+    char *splitconf;
 
-    av_log(NULL, level, "\n%sconfiguration:\n" "%s%s"FFMPEG_CONFIGURATION "\n", indent, indent, indent);
+    splitconf = strtok(str, "~");
+    av_log(NULL, level, "\n%sconfiguration:\n",indent);
+    while(splitconf != NULL) {
+        av_log(NULL, level, "%s%s%s\n", indent, indent, splitconf);
+        splitconf = strtok(NULL, "~");
+    }
 }
 
 void show_banner(int argc, char **argv, const OptionDef *options)
diff --git a/configure b/configure
index 3946632..e18a929 100755
--- a/configure
+++ b/configure
@@ -4623,11 +4623,14 @@ enabled stripping || strip="echo skipping strip"
 
 config_files="$TMPH config.mak doc/config.texi"
 
+FFMPEG_CONFIGURATION_FORMATTED=`echo $FFMPEG_CONFIGURATION | sed -e 's/\ --/~--/g' -e 's/pkg-config~/pkg-config\ /'`
+
 cat > config.mak <<EOF
 # Automatically generated by configure - do not modify!
 ifndef FFMPEG_CONFIG_MAK
 FFMPEG_CONFIG_MAK=1
 FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION
+FFMPEG_CONFIGURATION_FORMATTED=$FFMPEG_CONFIGURATION_FORMATTED
 prefix=$prefix
 LIBDIR=\$(DESTDIR)$libdir
 SHLIBDIR=\$(DESTDIR)$shlibdir
@@ -4751,6 +4754,7 @@ cat > $TMPH <<EOF
 #ifndef FFMPEG_CONFIG_H
 #define FFMPEG_CONFIG_H
 #define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
+#define FFMPEG_CONFIGURATION_FORMATTED "$(c_escape $FFMPEG_CONFIGURATION_FORMATTED)"
 #define FFMPEG_LICENSE "$(c_escape $license)"
 #define FFMPEG_DATADIR "$(eval c_escape $datadir)"
 #define AVCONV_DATADIR "$(eval c_escape $datadir)"
-- 
1.8.1.2



More information about the ffmpeg-devel mailing list