GNOME Bugzilla – Bug 739241
configure.ac: BROWSER_PLUGIN_DIR variable expansion is not compatible with dash
Last modified: 2014-11-30 10:56:09 UTC
Created attachment 289411 [details] [review] 0001-configure.ac-workaround-quoting-issues.patch The following code doesn't work in dash (note ^C - I've pressed Ctrl+C here): $ BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" > ^C $ Therefore I get the following configure error: checking for GTKDOC_DEPS... yes checking for xsltproc... (cached) /usr/bin/xsltproc checking whether gcc understands -Wall... yes checking what warning flags to pass to the C compiler... -Wall checking what language compliance flags to pass to the C compiler... ./configure: 2: ./configure: Syntax error: Unterminated quoted string Autoconf manual [1] suggests: "Perhaps the easiest way to work around quoting issues in a manner portable to all shells is to place the results in a temporary variable, then use ‘$t’ as the value, rather than trying to inline the expression needing quoting." An indeed that works: $ t="\${libdir}/mozilla/plugins" $ echo "${BROWSER_PLUGIN_DIR:-$t}" ${libdir}/mozilla/plugins $ But I suggest to replace the problematic code with conditional statement. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Shell-Substitutions.html
Review of attachment 289411 [details] [review]: OK
Could this patch be backported to the 3-14 branch ? Thanks
Done.
Many thanks!