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
8787 for opt do
8888 eval opt=\"$opt\"
8989 case "$opt" in
90− --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
90+ --prefix=*) prefix=`echo $opt | cut -d '=' -f 2-`
9191 ;;
92− --exec-prefix=*) execprefix=`echo $opt | cut -d '=' -f 2`
92+ --exec-prefix=*) execprefix=`echo $opt | cut -d '=' -f 2-`
9393 ;;
94− --tccdir=*) tccdir=`echo $opt | cut -d '=' -f 2`
94+ --tccdir=*) tccdir=`echo $opt | cut -d '=' -f 2-`
9595 ;;
96− --bindir=*) bindir=`echo $opt | cut -d '=' -f 2`
96+ --bindir=*) bindir=`echo $opt | cut -d '=' -f 2-`
9797 ;;
98− --libdir=*) libdir=`echo $opt | cut -d '=' -f 2`
98+ --libdir=*) libdir=`echo $opt | cut -d '=' -f 2-`
9999 ;;
100− --includedir=*) includedir=`echo $opt | cut -d '=' -f 2`
100+ --includedir=*) includedir=`echo $opt | cut -d '=' -f 2-`
101101 ;;
102− --sharedir=*) sharedir=`echo $opt | cut -d '=' -f 2`
102+ --sharedir=*) sharedir=`echo $opt | cut -d '=' -f 2-`
103103 ;;
104− --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
104+ --mandir=*) mandir=`echo $opt | cut -d '=' -f 2-`
105105 ;;
106− --infodir=*) infodir=`echo $opt | cut -d '=' -f 2`
106+ --infodir=*) infodir=`echo $opt | cut -d '=' -f 2-`
107107 ;;
108− --docdir=*) docdir=`echo $opt | cut -d '=' -f 2`
108+ --docdir=*) docdir=`echo $opt | cut -d '=' -f 2-`
109109 ;;
110− --sysroot=*) sysroot=`echo $opt | cut -d '=' -f 2`
110+ --sysroot=*) sysroot=`echo $opt | cut -d '=' -f 2-`
111111 ;;
112− --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
112+ --source-path=*) source_path=`echo $opt | cut -d '=' -f 2-`
113113 ;;
114− --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
114+ --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2-`
115115 ;;
116− --cc=*) cc=`echo $opt | cut -d '=' -f 2`
116+ --cc=*) cc=`echo $opt | cut -d '=' -f 2-`
117117 ;;
118− --ar=*) ar=`echo $opt | cut -d '=' -f 2` ; ar_set="yes"
118+ --ar=*) ar=`echo $opt | cut -d '=' -f 2-` ; ar_set="yes"
119119 ;;
120120 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
121121 ;;
@@ -123,17 +123,17 @@ for opt do · 1 unmodified line
123123 ;;
124124 --extra-libs=*) extralibs="${opt#--extra-libs=}"
125125 ;;
126− --sysincludepaths=*) tcc_sysincludepaths=`echo $opt | cut -d '=' -f 2`
126+ --sysincludepaths=*) tcc_sysincludepaths=`echo $opt | cut -d '=' -f 2-`
127127 ;;
128− --libpaths=*) tcc_libpaths=`echo $opt | cut -d '=' -f 2`
128+ --libpaths=*) tcc_libpaths=`echo $opt | cut -d '=' -f 2-`
129129 ;;
130− --crtprefix=*) tcc_crtprefix=`echo $opt | cut -d '=' -f 2`
130+ --crtprefix=*) tcc_crtprefix=`echo $opt | cut -d '=' -f 2-`
131131 ;;
132− --elfinterp=*) tcc_elfinterp=`echo $opt | cut -d '=' -f 2`
132+ --elfinterp=*) tcc_elfinterp=`echo $opt | cut -d '=' -f 2-`
133133 ;;
134− --triplet=*) triplet=`echo $opt | cut -d '=' -f 2`
134+ --triplet=*) triplet=`echo $opt | cut -d '=' -f 2-`
135135 ;;
136− --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
136+ --cpu=*) cpu=`echo $opt | cut -d '=' -f 2-`
137137 ;;
138138 --enable-cross) confvars="$confvars cross"
139139 ;;

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