After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739241 - configure.ac: BROWSER_PLUGIN_DIR variable expansion is not compatible with dash
configure.ac: BROWSER_PLUGIN_DIR variable expansion is not compatible with dash
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: building
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-27 13:48 UTC by Alexander Tsoy
Modified: 2014-11-30 10:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-configure.ac-workaround-quoting-issues.patch (992 bytes, patch)
2014-10-27 13:48 UTC, Alexander Tsoy
committed Details | Review

Description Alexander Tsoy 2014-10-27 13:48:04 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
Comment 1 Florian Müllner 2014-10-27 15:18:18 UTC
Review of attachment 289411 [details] [review]:

OK
Comment 2 Rémi Cardona 2014-11-29 16:35:05 UTC
Could this patch be backported to the 3-14 branch ?

Thanks
Comment 3 Florian Müllner 2014-11-29 16:38:54 UTC
Done.
Comment 4 Rémi Cardona 2014-11-30 10:56:09 UTC
Many thanks!