From 6ce49ca04d9f02749a815759ffff088cfd9ead2e Mon Sep 17 00:00:00 2001 From: Matan Bareket Date: Wed, 19 Dec 2018 09:17:14 -0500 Subject: BUILD: Update pandoc options to support different formats/filenames --- configure | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 64d49af6d2..5799aa52eb 100755 --- a/configure +++ b/configure @@ -180,7 +180,7 @@ _no_undefined_var_template=no _no_pragma_pack=no _bink=yes _cloud=auto -_convert_readme=no +_pandoc=no # Default vkeybd/keymapper/eventrec options _vkeybd=no _keymapper=no @@ -225,8 +225,10 @@ _nasmpath="$PATH" NASMFLAGS="" NASM="" _tainted_build=no +PANDOC="" _pandocpath="$PATH" -PANDOCFLAGS="" +_pandocoutput="README" +_pandocformat="plain" # The following variables are automatically detected, and should not # be modified otherwise. Consider them read-only. _posix=no @@ -1008,7 +1010,6 @@ Optional Features: --disable-taskbar don't build support for taskbar and launcher integration --disable-cloud don't build cloud support --disable-system-dialogs don't build support for system dialogs - --enable-pandoc convert README.md to README --enable-vkeybd build virtual keyboard support --enable-keymapper build key mapper support --enable-eventrecorder enable event recording functionality @@ -1093,6 +1094,9 @@ Optional Libraries: --with-nasm-prefix=DIR prefix where nasm executable is installed (optional) --disable-nasm disable assembly language optimizations [autodetect] + --with-pandoc-output=FILE filename to convert README.md to (optional) + --with-pandoc-format=FORMAT pandoc format to use during the conversion (optional) + --with-readline-prefix=DIR prefix where readline is installed (optional) --disable-readline disable readline support in text console [autodetect] @@ -1184,8 +1188,6 @@ for ac_option in $@; do --disable-osx-dock-plugin) _osxdockplugin=no;; --enable-nasm) _nasm=yes ;; --disable-nasm) _nasm=no ;; - --enable-pandoc) _convert_readme=yes;; - --disable-pandoc) _convert_readme=no;; --enable-mpeg2) _mpeg2=yes ;; --disable-mpeg2) _mpeg2=no ;; --enable-a52) _a52=yes ;; @@ -1396,6 +1398,16 @@ for ac_option in $@; do arg=`echo $ac_option | cut -d '=' -f 2` _nasmpath="$arg:$arg/bin" ;; + --with-pandoc-output=*) + arg=`echo $ac_option | cut -d '=' -f 2` + _pandocoutput="$arg" + _pandoc=yes + ;; + --with-pandoc-format=*) + arg=`echo $ac_option | cut -d '=' -f 2` + _pandocformat="$arg" + _pandoc=yes + ;; --with-staticlib-prefix=*) _staticlibpath=`echo $ac_option | cut -d '=' -f 2` ;; @@ -5078,7 +5090,7 @@ define_in_config_if_yes $_nasm 'USE_NASM' # # Check for pandoc # -if test "$_convert_readme" = yes ; then +if test "$_pandoc" = yes ; then echocheck "pandoc" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$SEPARATOR @@ -5086,7 +5098,6 @@ if test "$_convert_readme" = yes ; then for path_dir in $_pandocpath; do if test -x "$path_dir/pandoc$NATIVEEXEEXT" ; then PANDOC="$path_dir/pandoc$NATIVEEXEEXT" - PANDOCFLAGS="-f gfm -t plain -o README README.md" break fi done @@ -5094,13 +5105,13 @@ if test "$_convert_readme" = yes ; then IFS="$ac_save_ifs" if ! test "$PANDOC" ; then - _convert_readme = no + _pandoc = no fi fi -echo $_convert_readme -define_in_config_if_yes $_convert_readme 'USE_PANDOC' +echo $_pandoc +define_in_config_if_yes $_pandoc 'USE_PANDOC' # # Enable vkeybd / keymapper / event recorder @@ -5579,7 +5590,8 @@ EXEEXT := $HOSTEXEEXT NASM := $NASM NASMFLAGS := $NASMFLAGS PANDOC := $PANDOC -PANDOCFLAGS := $PANDOCFLAGS +PANDOCOUTPUT := $_pandocoutput +PANDOCFORMAT := $_pandocformat ZLIB_LIBS := $ZLIB_LIBS ZLIB_CFLAGS := $ZLIB_CFLAGS -- cgit v1.2.3