| @@ -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 [ "$D" = yes ] || [ "$D" = no ] | |||||
| if [ "$3" = yes ] || [ "$3" = no ] | |||||
| then | then | ||||
| if [ "$D" = yes ] | |||||
| then | |||||
| echo -n "$2" | sed s/^USE_/--enable-/ | tr '[[:upper:]]' '[[:lower:]]' | |||||
| else | |||||
| echo -n "$2" | sed s/^USE_/--disable-/ | tr '[[:upper:]]' '[[:lower:]]' | |||||
| fi | |||||
| O=`echo -n "$2" | sed s/^USE_/--enable-/ | tr '[[:upper:]]' '[[:lower:]]'` | |||||
| else | else | ||||
| echo -n "--$2" | tr '[[:upper:]]' '[[:lower:]]' | |||||
| O=`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 "****" | |||||
| echo "This is not an autoconf script! Run without any arguments and you will be prompted." | |||||
| echo "Alternatively, you may use the following autoconf style arguments for" | |||||
| echo "non-interactive configuration." | |||||
| echo "****" | |||||
| warn "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" | |||||
| warn "non-interactive configuration." | |||||
| echo | echo | ||||
| echo " Available options:" | echo " Available options:" | ||||
| echo | echo | ||||