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" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then
24 elif [ "$m" = "x86_64" ]; then
27 echo "It looks like your architecture '$m' isn't supported by this version of v86d." >&2
32 options
=`set | grep '^copt_' | sed -re 's/copt_([^_=]+)[_=].*/\1/' | uniq`
38 for i
in ${options} ; do
39 eval vval
=\
$copt_$i\_val
40 eval vtype
=\
$copt_$i\_type
43 if [[ "$vtype" == "bool" ]]; then
44 if [[ "$vval" == "y" ]]; then
45 echo "#define $vname" >> config.h
47 echo "#undef $vname" >> config.h
50 echo "#define $vname \"$vval\"" >> config.h
54 echo "config.h successfully created."
55 echo "You can run \`make\` now."
61 v86d configuration script
63 Please use the following options to configure v86d.
65 printf " %-20s %-s\n\n" --default "Use a default v86d configuration"
67 for i
in ${options} ; do
68 eval vtype
=\
$copt_$i\_type
69 eval vdesc
=\
$copt_$i\_desc
70 eval vdef
=\
$copt_$i\_def
72 if [[ ${vtype} == "string" ]]; then
73 with
="--with-${i}=VAL"
78 vdesc
="${vdesc} (default: $vdef)"
80 printf " %-20s %-s\n" ${with} "${vdesc}"
84 if [[ $# == 0 ]]; then
89 for i
in ${options} ; do
90 eval copt_
${i}_val
="\$copt_${i}_def"
91 if [ -n "$(set | grep copt_${i}_test)" ]; then
92 eval copt_
${i}_val
="\$(copt_${i}_test)"
97 if [[ "$i" == "--help" ]]; then
100 elif [[ "$i" == "--default" ]]; then
106 if [[ "$j" != "$i" ]]; then
110 if [[ "$j" != "$i" ]]; then
121 eval t
=\
$copt_${optname}_val
122 if [[ "x$t" == "x" ]]; then
123 echo "Unrecognized setting ${optname}." 1>&2
127 eval vtype
=\
$copt_${optname}_type
128 if [[ "$vtype" == "bool" ]]; then
129 eval copt_
${optname}_val
=${with}
131 eval copt_
${optname}_val
=${optval}