GNOME Bugzilla – Bug 548218
OpenSolaris: $(expression) cause configure error on solaris
Last modified: 2018-06-29 22:08:51 UTC
I'm trying to build gnucash trunk r17473, after running ./autogen.sh and configure, I get following error: $./configure --enable-compile-warnings --prefix=/export/home/halton/work/dist --enable-debug --enable-gui ./configure: syntax error at line 2665: `(' unexpected Paste configure here: 2664 for flag in $CFLAGS; do 2665 if test -z $(echo $flag | sed -e 's,-O.,,'); then 2666 USER_OPTIMIZATION="$USER_OPTIMIZATION ${flag}" 2667 fi 2668 done
try using bash as your shell?
bash will help, but /bin/sh solairs is sh, not bash. I'd like to rewrite in configure.in to allow sh works for it.
Created attachment 117181 [details] [review] patch for bug #548218
Created attachment 117184 [details] [review] new patch for bug #548218 Add missing macros/as-scrub-include.m4 in this patch.
What version of Solaris is that, btw? I do not know a lot about old unixes, but command substitution via $() is even part of http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html , which I regard as POSIX definition of a shell, i.e. the absolute minimum I think a shell should be able to do.
From that document, backticks are "just as standarized" as the $() form. In that sense, I don't have a problem with the patch in comment 4 and would regard this as unifying the command substitution pattern in our scripts. Anyone else an opinion here?
I think using backticks are better.
Backticks cannot be nested, but it seems we do not need that. Feel free to commit.
I do not have commit acess for GnuCash, anyone could help to commit it?
Committed to trunk, r17720. Back-porting would be nice, but isn't strictly necessary.
2.2-branch, r17742
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=548218. Please update any external references or bookmarks.