Make awk script compatible with default Solaris /usr/bin/awk
See #18950
This commit is contained in:
parent
90bfddef2d
commit
0cae4399bd
2 changed files with 12 additions and 2 deletions
7
configure
vendored
7
configure
vendored
|
|
@ -40857,7 +40857,12 @@ case "${host}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
dedup_flags () { printf %s "$@" | awk -v RS=' +' -v ORS=' ' '$0=="-arch" || $0=="-framework" || !seen[$0]++'; }
|
||||
dedup_flags()
|
||||
{
|
||||
printf "%s " "$@" |
|
||||
awk 'BEGIN { RS=" "; ORS=" " }
|
||||
{ if ($0=="-arch" || $0=="-framework" || !seen[$0]++) print }'
|
||||
}
|
||||
|
||||
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
|
||||
WX_CFLAGS=`dedup_flags "$CFLAGS"`
|
||||
|
|
|
|||
|
|
@ -8448,7 +8448,12 @@ dnl Also get rid of duplicates in the flags, which results in dramatically
|
|||
dnl shorter build logs and so is well worth it (but preserve some special
|
||||
dnl flags which are explicitly allowed to occur multiple times, as all their
|
||||
dnl occurrences must be preserved).
|
||||
dedup_flags () { printf %s "$@" | awk -v RS=' +' -v ORS=' ' '$0=="-arch" || $0=="-framework" || !seen[[$0]]++'; }
|
||||
dedup_flags()
|
||||
{
|
||||
printf "%s " "$@" |
|
||||
awk 'BEGIN { RS=" "; ORS=" " }
|
||||
{ if ($0=="-arch" || $0=="-framework" || !seen[[$0]]++) print }'
|
||||
}
|
||||
|
||||
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
|
||||
WX_CFLAGS=`dedup_flags "$CFLAGS"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue