]> git.proxmox.com Git - mirror_qemu.git/blob - scripts/create_config
migration/postcopy: wait for decompress thread in precopy
[mirror_qemu.git] / scripts / create_config
1 #!/bin/sh
2
3 echo "/* Automatically generated by create_config - do not modify */"
4
5 while read line; do
6
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"
17 ;;
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"
26 ;;
27 prefix=*)
28 # save for the next definitions
29 prefix=${line#*=}
30 ;;
31 IASL=*) # iasl executable
32 value=${line#*=}
33 echo "#define CONFIG_IASL $value"
34 ;;
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 ""
42 ;;
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"
49 ;;
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"
56 ;;
57 CONFIG_*=y) # configuration
58 name=${line%=*}
59 echo "#define $name 1"
60 ;;
61 CONFIG_*=n) # configuration
62 ;;
63 CONFIG_*=*) # configuration
64 name=${line%=*}
65 value=${line#*=}
66 echo "#define $name $value"
67 ;;
68 HAVE_*=y) # configuration
69 name=${line%=*}
70 echo "#define $name 1"
71 ;;
72 HAVE_*=*) # configuration
73 name=${line%=*}
74 value=${line#*=}
75 echo "#define $name $value"
76 ;;
77 ARCH=*) # configuration
78 arch=${line#*=}
79 arch_name=$(echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]')
80 echo "#define HOST_$arch_name 1"
81 ;;
82 HOST_USB=*)
83 # do nothing
84 ;;
85 HOST_CC=*)
86 # do nothing
87 ;;
88 HOST_*=y) # configuration
89 name=${line%=*}
90 echo "#define $name 1"
91 ;;
92 HOST_*=*) # configuration
93 name=${line%=*}
94 value=${line#*=}
95 echo "#define $name $value"
96 ;;
97 TARGET_BASE_ARCH=*) # configuration
98 target_base_arch=${line#*=}
99 base_arch_name=$(echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]')
100 echo "#define TARGET_$base_arch_name 1"
101 ;;
102 TARGET_XML_FILES=*)
103 # do nothing
104 ;;
105 TARGET_ABI_DIR=*)
106 # do nothing
107 ;;
108 TARGET_NAME=*)
109 target_name=${line#*=}
110 echo "#define TARGET_NAME \"$target_name\""
111 ;;
112 TARGET_DIRS=*)
113 # do nothing
114 ;;
115 TARGET_*=y) # configuration
116 name=${line%=*}
117 echo "#define $name 1"
118 ;;
119 TARGET_*=*) # configuration
120 name=${line%=*}
121 value=${line#*=}
122 echo "#define $name $value"
123 ;;
124 DSOSUF=*)
125 echo "#define HOST_DSOSUF \"${line#*=}\""
126 ;;
127 esac
128
129 done # read