mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-23 09:26:27 -06:00
Bug #548218: Unify command substitution shell pattern
The command substiturion by $(expression) causes configure error on solaris. 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, this patch is simply unifying the command substitution pattern in our scripts. Patch by Halton Huo. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17720 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6346583aaf
commit
31b25c1d6e
14
configure.in
14
configure.in
@ -37,8 +37,9 @@ GNUCASH_MICRO_VERSION=`echo $GNUCASH_VERSION_STRING | [ sed -e 's/^\([^\.]*\)\.\
|
||||
# --enable-debug:
|
||||
USER_OPTIMIZATION=""
|
||||
for flag in $CFLAGS; do
|
||||
if test -z $(echo $flag | sed -e 's,-O.,,'); then
|
||||
USER_OPTIMIZATION="$USER_OPTIMIZATION ${flag}"
|
||||
tmp_flag=`echo $flag | sed -e 's,-O.,,'`
|
||||
if test -z "$tmp_flag"; then
|
||||
USER_OPTIMIZATION="$USER_OPTIMIZATION ${tmp_flag}"
|
||||
fi
|
||||
done
|
||||
|
||||
@ -703,13 +704,14 @@ AC_SUBST(GNC_LIBEXECDIR)
|
||||
|
||||
AC_ARG_ENABLE( debug,
|
||||
[ --enable-debug compile with debugging flags set],
|
||||
[
|
||||
# remove any optimization flags...
|
||||
CFLAGS=$(echo $CFLAGS | sed -e 's,-O.,,g')
|
||||
CFLAGS=`echo ${CFLAGS} | sed -e 's,-O.,,g'`
|
||||
# ...except for those the user wants.
|
||||
CFLAGS="${CFLAGS} -g ${USER_OPTIMIZATION}"
|
||||
LDFLAGS="${LDFLAGS} -g"
|
||||
AC_DEFINE(DEBUG_MEMORY,1,Enable debug memory),
|
||||
AC_DEFINE(DEBUG_MEMORY,0,Enable debug memory) )
|
||||
AC_DEFINE(DEBUG_MEMORY,0,Enable debug memory)])
|
||||
|
||||
AC_ARG_ENABLE( profile,
|
||||
[ --enable-profile compile with profiling set],
|
||||
@ -1183,8 +1185,8 @@ dnl if Mac OSX, also scrub /sw/include
|
||||
dnl GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I/sw/include ;;" | sed -e "s;-I/sw/include$;;")
|
||||
case $host_os in
|
||||
darwin*)
|
||||
GTKHTML_CFLAGS=$(echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include ;;" | ${SED} -e "s;-I/sw/include$;;")
|
||||
GTKHTML_CFLAGS=$(echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include/gtkhtml ;;" | ${SED} -e "s;-I/sw/includ/gtkhtmle$;;")
|
||||
GTKHTML_CFLAGS=`echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include ;;" | ${SED} -e "s;-I/sw/include$;;"`
|
||||
GTKHTML_CFLAGS=`echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include/gtkhtml ;;" | ${SED} -e "s;-I/sw/includ/gtkhtmle$;;"`
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(GTKHTML_CFLAGS)
|
||||
|
@ -26,7 +26,7 @@ AC_DEFUN([AS_SCRUB_INCLUDE],
|
||||
dnl line
|
||||
INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'`
|
||||
for dir in $INCLUDE_DIRS; do
|
||||
GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I$dir ;;" | sed -e "s;-I$dir$;;")
|
||||
GIVEN_CFLAGS=`echo $GIVEN_CFLAGS | sed -e "s;-I$dir ;;" | sed -e "s;-I$dir$;;"`
|
||||
done
|
||||
[$1]=$GIVEN_CFLAGS
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user