History

Permit '=' character in configure options

By replacing the `-f 2` field selection with `-f 2-`, we select fields 2 and beyond, so that arguments containing the '=' character are not truncated. This option qualifier list format is POSIX standard and tested to work with the `cut` program from: * GNU coreutils * macOS (FreeBSD) * NetBSD * toybox * busybox * uutils-coreutils In my case, this is useful because I'm trying to use an installation prefix which contains an equals sign.

Ryan Burns committed 5 years ago

Commit ca118491 parent 15e9b731 file · +21 −21Browse files

Unified · Split

configure+21−21
@@ -87,35 +87,35 @@ fi · 86 unmodified lines
87for opt do87for opt do
88 eval opt=\"$opt\"88 eval opt=\"$opt\"
89 case "$opt" in89 case "$opt" in
90 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`90 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2-`
91 ;;91 ;;
92 --exec-prefix=*) execprefix=`echo $opt | cut -d '=' -f 2`92 --exec-prefix=*) execprefix=`echo $opt | cut -d '=' -f 2-`
93 ;;93 ;;
94 --tccdir=*) tccdir=`echo $opt | cut -d '=' -f 2`94 --tccdir=*) tccdir=`echo $opt | cut -d '=' -f 2-`
95 ;;95 ;;
96 --bindir=*) bindir=`echo $opt | cut -d '=' -f 2`96 --bindir=*) bindir=`echo $opt | cut -d '=' -f 2-`
97 ;;97 ;;
98 --libdir=*) libdir=`echo $opt | cut -d '=' -f 2`98 --libdir=*) libdir=`echo $opt | cut -d '=' -f 2-`
99 ;;99 ;;
100 --includedir=*) includedir=`echo $opt | cut -d '=' -f 2`100 --includedir=*) includedir=`echo $opt | cut -d '=' -f 2-`
101 ;;101 ;;
102 --sharedir=*) sharedir=`echo $opt | cut -d '=' -f 2`102 --sharedir=*) sharedir=`echo $opt | cut -d '=' -f 2-`
103 ;;103 ;;
104 --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`104 --mandir=*) mandir=`echo $opt | cut -d '=' -f 2-`
105 ;;105 ;;
106 --infodir=*) infodir=`echo $opt | cut -d '=' -f 2`106 --infodir=*) infodir=`echo $opt | cut -d '=' -f 2-`
107 ;;107 ;;
108 --docdir=*) docdir=`echo $opt | cut -d '=' -f 2`108 --docdir=*) docdir=`echo $opt | cut -d '=' -f 2-`
109 ;;109 ;;
110 --sysroot=*) sysroot=`echo $opt | cut -d '=' -f 2`110 --sysroot=*) sysroot=`echo $opt | cut -d '=' -f 2-`
111 ;;111 ;;
112 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`112 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2-`
113 ;;113 ;;
114 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`114 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2-`
115 ;;115 ;;
116 --cc=*) cc=`echo $opt | cut -d '=' -f 2`116 --cc=*) cc=`echo $opt | cut -d '=' -f 2-`
117 ;;117 ;;
118 --ar=*) ar=`echo $opt | cut -d '=' -f 2` ; ar_set="yes"118 --ar=*) ar=`echo $opt | cut -d '=' -f 2-` ; ar_set="yes"
119 ;;119 ;;
120 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"120 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
121 ;;121 ;;
@@ -123,17 +123,17 @@ for opt do · 1 unmodified line
123 ;;123 ;;
124 --extra-libs=*) extralibs="${opt#--extra-libs=}"124 --extra-libs=*) extralibs="${opt#--extra-libs=}"
125 ;;125 ;;
126 --sysincludepaths=*) tcc_sysincludepaths=`echo $opt | cut -d '=' -f 2`126 --sysincludepaths=*) tcc_sysincludepaths=`echo $opt | cut -d '=' -f 2-`
127 ;;127 ;;
128 --libpaths=*) tcc_libpaths=`echo $opt | cut -d '=' -f 2`128 --libpaths=*) tcc_libpaths=`echo $opt | cut -d '=' -f 2-`
129 ;;129 ;;
130 --crtprefix=*) tcc_crtprefix=`echo $opt | cut -d '=' -f 2`130 --crtprefix=*) tcc_crtprefix=`echo $opt | cut -d '=' -f 2-`
131 ;;131 ;;
132 --elfinterp=*) tcc_elfinterp=`echo $opt | cut -d '=' -f 2`132 --elfinterp=*) tcc_elfinterp=`echo $opt | cut -d '=' -f 2-`
133 ;;133 ;;
134 --triplet=*) triplet=`echo $opt | cut -d '=' -f 2`134 --triplet=*) triplet=`echo $opt | cut -d '=' -f 2-`
135 ;;135 ;;
136 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`136 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2-`
137 ;;137 ;;
138 --enable-cross) confvars="$confvars cross"138 --enable-cross) confvars="$confvars cross"
139 ;;139 ;;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t