kvm: init mp_state
[qemu/stefanha.git] / create_config
blob0098e683e20c9b7c600f712d0d6d6cf50f37517e
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 echo "#define QEMU_VERSION \"$version\""
12 PKGVERSION=*) # configuration
13 pkgversion=${line#*=}
14 echo "#define QEMU_PKGVERSION \"$pkgversion\""
16 prefix=* | [a-z]*dir=*) # directory configuration
17 name=${line%=*}
18 value=${line#*=}
19 define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
20 eval "define_value=\"$value\""
21 echo "#define CONFIG_QEMU_$define_name \"$define_value\""
22 # save for the next definitions
23 eval "$name=\$define_value"
25 CONFIG_AUDIO_DRIVERS=*)
26 drivers=${line#*=}
27 echo "#define CONFIG_AUDIO_DRIVERS \\"
28 for drv in $drivers; do
29 echo " &${drv}_audio_driver,\\"
30 done
31 echo ""
33 CONFIG_BDRV_WHITELIST=*)
34 echo "#define CONFIG_BDRV_WHITELIST \\"
35 for drv in ${line#*=}; do
36 echo " \"${drv}\",\\"
37 done
38 echo " NULL"
40 CONFIG_*=y) # configuration
41 name=${line%=*}
42 echo "#define $name 1"
44 CONFIG_*=*) # configuration
45 name=${line%=*}
46 value=${line#*=}
47 echo "#define $name $value"
49 ARCH=*) # configuration
50 arch=${line#*=}
51 arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
52 echo "#define HOST_$arch_name 1"
54 HOST_USB=*)
55 # do nothing
57 HOST_CC=*)
58 # do nothing
60 HOST_*=y) # configuration
61 name=${line%=*}
62 echo "#define $name 1"
64 HOST_*=*) # configuration
65 name=${line%=*}
66 value=${line#*=}
67 echo "#define $name $value"
69 TARGET_ARCH=*) # configuration
70 target_arch=${line#*=}
71 echo "#define TARGET_ARCH \"$target_arch\""
73 TARGET_BASE_ARCH=*) # configuration
74 target_base_arch=${line#*=}
75 if [ "$target_base_arch" != "$target_arch" ]; then
76 base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'`
77 echo "#define TARGET_$base_arch_name 1"
80 TARGET_XML_FILES=*)
81 # do nothing
83 TARGET_ABI_DIR=*)
84 # do nothing
86 TARGET_ARCH2=*)
87 # do nothing
89 TARGET_DIRS=*)
90 # do nothing
92 TARGET_*=y) # configuration
93 name=${line%=*}
94 echo "#define $name 1"
96 TARGET_*=*) # configuration
97 name=${line%=*}
98 value=${line#*=}
99 echo "#define $name $value"
101 esac
103 done # read