3 # ./configure -- A very simple configure script for splashutils.
5 # (c) 2006-2007, Michal Januszewski <spock@gentoo.org>
7 # In time, it will be replaced by a fully-fledged version.
10 copt_klibc
=CONFIG_KLIBC
11 copt_klibc_desc
="Link statically against klibc"
12 copt_klibc_type
="bool"
15 copt_x86emu
=CONFIG_X86EMU
16 copt_x86emu_desc
="Use x86emu for BIOS calls"
17 copt_x86emu_type
="bool"
22 if [ "$m" != "i686" -a "$m" != "i586" -a "$m" != "i486" -a "$m" != "i386" ]; then
29 options
=`set | grep '^copt_' | sed -re 's/copt_([^_=]+)[_=].*/\1/' | uniq`
35 for i
in ${options} ; do
36 eval vval
=\
$copt_$i\_val
37 eval vtype
=\
$copt_$i\_type
40 if [[ "$vtype" == "bool" ]]; then
41 if [[ "$vval" == "y" ]]; then
42 echo "#define $vname" >> config.h
44 echo "#undef $vname" >> config.h
47 echo "#define $vname \"$vval\"" >> config.h
51 echo "config.h successfully created."
52 echo "You can run \`make\` now."
58 v86d configuration script
60 Please use the following options to configure v86d.
62 printf " %-20s %-s\n\n" --default "Use a default v86d configuration"
64 for i
in ${options} ; do
65 eval vtype
=\
$copt_$i\_type
66 eval vdesc
=\
$copt_$i\_desc
67 eval vdef
=\
$copt_$i\_def
69 if [[ ${vtype} == "string" ]]; then
70 with
="--with-${i}=VAL"
75 vdesc
="${vdesc} (default: $vdef)"
77 printf " %-20s %-s\n" ${with} "${vdesc}"
81 if [[ $# == 0 ]]; then
86 for i
in ${options} ; do
87 eval copt_
${i}_val
="\$copt_${i}_def"
88 if [ -n "$(set | grep copt_${i}_test)" ]; then
89 eval copt_
${i}_val
="\$(copt_${i}_test)"
94 if [[ "$i" == "--help" ]]; then
97 elif [[ "$i" == "--default" ]]; then
103 if [[ "$j" != "$i" ]]; then
107 if [[ "$j" != "$i" ]]; then
118 eval t
=\
$copt_${optname}_val
119 if [[ "x$t" == "x" ]]; then
120 echo "Unrecognized setting ${optname}." 1>&2
124 eval vtype
=\
$copt_${optname}_type
125 if [[ "$vtype" == "bool" ]]; then
126 eval copt_
${optname}_val
=${with}
128 eval copt_
${optname}_val
=${optval}