File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 5970e9c117ebf0b3056536553dee046fa05b6c9d
2
+ refs/heads/master: a26554d97bcba62f221d5dc4112f34f86b5b60e3
Original file line number Diff line number Diff line change @@ -77,6 +77,32 @@ probe_need() {
77
77
fi
78
78
}
79
79
80
+ valopt () {
81
+ local OP=$1
82
+ local DEFAULT=$2
83
+ shift
84
+ shift
85
+ local DOC=" $* "
86
+ if [ $HELP -eq 0 ]
87
+ then
88
+ local UOP=$( echo $OP | tr ' a-z-' ' A-Z_' )
89
+ local V=" CFG_${UOP} "
90
+ eval $V =" $DEFAULT "
91
+ for arg in $CFG_CONFIGURE_ARGS
92
+ do
93
+ if echo " $arg " | grep -q -- " --$OP ="
94
+ then
95
+ val=$( echo " $arg " | cut -f2 -d=)
96
+ eval $V =$val
97
+ fi
98
+ done
99
+ putvar $V
100
+ else
101
+ local OPDEF=" ${OP} =[${DEFAULT} ]"
102
+ printf " --%-30s %s\n" " $OPDEF " " $DOC "
103
+ fi
104
+ }
105
+
80
106
opt () {
81
107
local OP=$1
82
108
local DEFAULT=$2
@@ -219,7 +245,7 @@ opt valgrind 1 "run tests with valgrind"
219
245
opt docs 1 " build documentation"
220
246
opt optimize 1 " build optimized rust code"
221
247
opt mingw-cross 0 " cross-compile for win32 using mingw"
222
-
248
+ valopt prefix " /usr/local " " set installation prefix "
223
249
224
250
if [ $HELP -eq 1 ]
225
251
then
You can’t perform that action at this time.
0 commit comments