update seabios to 1.12
[qemu/kevin.git] / scripts / create_config
blobd727e5e36e1694bdeb1bfb204c2ca47f3a4b6315
1 #!/bin/sh
3 echo "/* Automatically generated by create_config - do not modify */"
5 while read line; do
7 case $line in
8 VERSION=*) # configuration
9 version=${line#*=}
10 major=$(echo "$version" | cut -d. -f1)
11 minor=$(echo "$version" | cut -d. -f2)
12 micro=$(echo "$version" | cut -d. -f3)
13 echo "#define QEMU_VERSION \"$version\""
14 echo "#define QEMU_VERSION_MAJOR $major"
15 echo "#define QEMU_VERSION_MINOR $minor"
16 echo "#define QEMU_VERSION_MICRO $micro"
18 qemu_*dir=* | qemu_*path=*) # qemu-specific directory configuration
19 name=${line%=*}
20 value=${line#*=}
21 define_name=$(echo $name | LC_ALL=C tr '[a-z]' '[A-Z]')
22 eval "define_value=\"$value\""
23 echo "#define CONFIG_$define_name \"$define_value\""
24 # save for the next definitions
25 eval "$name=\$define_value"
27 prefix=*)
28 # save for the next definitions
29 prefix=${line#*=}
31 IASL=*) # iasl executable
32 value=${line#*=}
33 echo "#define CONFIG_IASL $value"
35 CONFIG_AUDIO_DRIVERS=*)
36 drivers=${line#*=}
37 echo "#define CONFIG_AUDIO_DRIVERS \\"
38 for drv in $drivers; do
39 echo " \"${drv}\",\\"
40 done
41 echo ""
43 CONFIG_BDRV_RW_WHITELIST=*)
44 echo "#define CONFIG_BDRV_RW_WHITELIST\\"
45 for drv in ${line#*=}; do
46 echo " \"${drv}\",\\"
47 done
48 echo " NULL"
50 CONFIG_BDRV_RO_WHITELIST=*)
51 echo "#define CONFIG_BDRV_RO_WHITELIST\\"
52 for drv in ${line#*=}; do
53 echo " \"${drv}\",\\"
54 done
55 echo " NULL"
57 CONFIG_*='$(CONFIG_SOFTMMU)'|CONFIG_*=y) # configuration
58 name=${line%=*}
59 echo "#define $name 1"
61 CONFIG_*=*) # configuration
62 name=${line%=*}
63 value=${line#*=}
64 echo "#define $name $value"
66 HAVE_*=y) # configuration
67 name=${line%=*}
68 echo "#define $name 1"
70 HAVE_*=*) # configuration
71 name=${line%=*}
72 value=${line#*=}
73 echo "#define $name $value"
75 ARCH=*) # configuration
76 arch=${line#*=}
77 arch_name=$(echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]')
78 echo "#define HOST_$arch_name 1"
80 HOST_USB=*)
81 # do nothing
83 HOST_CC=*)
84 # do nothing
86 HOST_*=y) # configuration
87 name=${line%=*}
88 echo "#define $name 1"
90 HOST_*=*) # configuration
91 name=${line%=*}
92 value=${line#*=}
93 echo "#define $name $value"
95 TARGET_BASE_ARCH=*) # configuration
96 target_base_arch=${line#*=}
97 base_arch_name=$(echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]')
98 echo "#define TARGET_$base_arch_name 1"
100 TARGET_XML_FILES=*)
101 # do nothing
103 TARGET_ABI_DIR=*)
104 # do nothing
106 TARGET_NAME=*)
107 target_name=${line#*=}
108 echo "#define TARGET_NAME \"$target_name\""
110 TARGET_DIRS=*)
111 # do nothing
113 TARGET_*=y) # configuration
114 name=${line%=*}
115 echo "#define $name 1"
117 TARGET_*=*) # configuration
118 name=${line%=*}
119 value=${line#*=}
120 echo "#define $name $value"
122 DSOSUF=*)
123 echo "#define HOST_DSOSUF \"${line#*=}\""
125 esac
127 done # read