configure: minor improvements.
This commit is contained in:
parent
1c599fd7f6
commit
7aa95de4c5
|
@ -59,28 +59,21 @@ fi
|
||||||
|
|
||||||
ask ()
|
ask ()
|
||||||
{
|
{
|
||||||
local A D
|
local A D O
|
||||||
|
|
||||||
D="`eval echo \\$$2`"
|
D="`eval echo \\$$2`"
|
||||||
D=${D:-$3}
|
D=${D:-$3}
|
||||||
|
|
||||||
if [ $HELP = yes ]
|
if [ $HELP = yes ]
|
||||||
then
|
then
|
||||||
echo -en "\t"
|
if [ "$3" = yes ] || [ "$3" = no ]
|
||||||
|
|
||||||
if [ "$D" = yes ] || [ "$D" = no ]
|
|
||||||
then
|
then
|
||||||
if [ "$D" = yes ]
|
O=`echo -n "$2" | sed s/^USE_/--enable-/ | tr '[[:upper:]]' '[[:lower:]]'`
|
||||||
then
|
|
||||||
echo -n "$2" | sed s/^USE_/--enable-/ | tr '[[:upper:]]' '[[:lower:]]'
|
|
||||||
else
|
else
|
||||||
echo -n "$2" | sed s/^USE_/--disable-/ | tr '[[:upper:]]' '[[:lower:]]'
|
O=`echo -n "--$2" | tr '[[:upper:]]' '[[:lower:]]'`
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -n "--$2" | tr '[[:upper:]]' '[[:lower:]]'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\t$1"
|
printf " ${BOLD}${GREEN}%-15s${SGR0}\t%-40s (currently: ${BOLD}%s${SGR0})\n" "$O" "$1" "$D"
|
||||||
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -165,6 +158,11 @@ begin ()
|
||||||
ok
|
ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warn ()
|
||||||
|
{
|
||||||
|
echo "${BOLD}${YELLOW}* ${SGR0}$*"
|
||||||
|
}
|
||||||
|
|
||||||
begin_options ()
|
begin_options ()
|
||||||
{
|
{
|
||||||
# get the old values
|
# get the old values
|
||||||
|
@ -172,11 +170,9 @@ begin_options ()
|
||||||
|
|
||||||
if [ $HELP = yes ]
|
if [ $HELP = yes ]
|
||||||
then
|
then
|
||||||
echo "****"
|
warn "This is not an autoconf script! Run without any arguments and you will be prompted."
|
||||||
echo "This is not an autoconf script! Run without any arguments and you will be prompted."
|
warn "Alternatively, you may use the following autoconf style arguments for"
|
||||||
echo "Alternatively, you may use the following autoconf style arguments for"
|
warn "non-interactive configuration."
|
||||||
echo "non-interactive configuration."
|
|
||||||
echo "****"
|
|
||||||
echo
|
echo
|
||||||
echo " Available options:"
|
echo " Available options:"
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue