s390x: fix generation of event information crw
[qemu.git] / scripts / create_config
blob9cb176f1ba3436e5a146e990429655dca4fa5a2b
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 qemu_*dir=*) # qemu-specific directory configuration
17 name=${line%=*}
18 value=${line#*=}
19 define_name=`echo $name | LC_ALL=C tr '[a-z]' '[A-Z]'`
20 eval "define_value=\"$value\""
21 echo "#define CONFIG_$define_name \"$define_value\""
22 # save for the next definitions
23 eval "$name=\$define_value"
25 prefix=*)
26 # save for the next definitions
27 prefix=${line#*=}
29 IASL=*) # iasl executable
30 value=${line#*=}
31 echo "#define CONFIG_IASL $value"
33 CONFIG_AUDIO_DRIVERS=*)
34 drivers=${line#*=}
35 echo "#define CONFIG_AUDIO_DRIVERS \\"
36 for drv in $drivers; do
37 echo " &${drv}_audio_driver,\\"
38 done
39 echo ""
41 CONFIG_BDRV_RW_WHITELIST=*)
42 echo "#define CONFIG_BDRV_RW_WHITELIST\\"
43 for drv in ${line#*=}; do
44 echo " \"${drv}\",\\"
45 done
46 echo " NULL"
48 CONFIG_BDRV_RO_WHITELIST=*)
49 echo "#define CONFIG_BDRV_RO_WHITELIST\\"
50 for drv in ${line#*=}; do
51 echo " \"${drv}\",\\"
52 done
53 echo " NULL"
55 CONFIG_*=y) # configuration
56 name=${line%=*}
57 echo "#define $name 1"
59 CONFIG_*=*) # configuration
60 name=${line%=*}
61 value=${line#*=}
62 echo "#define $name $value"
64 HAVE_*=y) # configuration
65 name=${line%=*}
66 echo "#define $name 1"
68 HAVE_*=*) # configuration
69 name=${line%=*}
70 value=${line#*=}
71 echo "#define $name $value"
73 ARCH=*) # configuration
74 arch=${line#*=}
75 arch_name=`echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
76 echo "#define HOST_$arch_name 1"
78 HOST_USB=*)
79 # do nothing
81 HOST_CC=*)
82 # do nothing
84 HOST_*=y) # configuration
85 name=${line%=*}
86 echo "#define $name 1"
88 HOST_*=*) # configuration
89 name=${line%=*}
90 value=${line#*=}
91 echo "#define $name $value"
93 TARGET_BASE_ARCH=*) # configuration
94 target_base_arch=${line#*=}
95 base_arch_name=`echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
96 echo "#define TARGET_$base_arch_name 1"
98 TARGET_XML_FILES=*)
99 # do nothing
101 TARGET_ABI_DIR=*)
102 # do nothing
104 TARGET_NAME=*)
105 target_name=${line#*=}
106 echo "#define TARGET_NAME \"$target_name\""
108 TARGET_DIRS=*)
109 # do nothing
111 TARGET_*=y) # configuration
112 name=${line%=*}
113 echo "#define $name 1"
115 TARGET_*=*) # configuration
116 name=${line%=*}
117 value=${line#*=}
118 echo "#define $name $value"
120 DSOSUF=*)
121 echo "#define HOST_DSOSUF \"${line#*=}\""
123 esac
125 done # read