summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2010-05-26 16:08:25 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-06-10 00:09:49 +0200
commit1dabe05ce40010588a7b2485219a2692fe1e7472 (patch)
tree9a5368e8860843db23d75900152dbbd7fcbf922b
parent99d7cc75dd1f1167a02294804f993deb354d8159 (diff)
downloadqemu-1dabe05ce40010588a7b2485219a2692fe1e7472.tar.gz
configure: expand ${prefix} in create_config
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rwxr-xr-xconfigure3
-rwxr-xr-xcreate_config9
-rw-r--r--vl.c2
3 files changed, 11 insertions, 3 deletions
diff --git a/configure b/configure
index c99461ac12..9d8b4b36e7 100755
--- a/configure
+++ b/configure
@@ -2073,8 +2073,7 @@ echo "mandir=$mandir" >> $config_host_mak
echo "datadir=$datadir" >> $config_host_mak
echo "sysconfdir=$sysconfdir" >> $config_host_mak
echo "docdir=$docdir" >> $config_host_mak
-echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
-echo "CONFIG_QEMU_CONFDIR=\"$confdir\"" >> $config_host_mak
+echo "confdir=$confdir" >> $config_host_mak
case "$cpu" in
i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
diff --git a/create_config b/create_config
index edcad254d3..23c0cd51f7 100755
--- a/create_config
+++ b/create_config
@@ -13,6 +13,15 @@ case $line in
pkgversion=${line#*=}
echo "#define QEMU_PKGVERSION \"$pkgversion\""
;;
+ prefix=* | *dir=*) # directory configuration
+ name=${line%=*}
+ value=${line#*=}
+ define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
+ eval "define_value=\"$value\""
+ echo "#define CONFIG_QEMU_$define_name \"$define_value\""
+ # save for the next definitions
+ eval "$name=\$define_value"
+ ;;
CONFIG_AUDIO_DRIVERS=*)
drivers=${line#*=}
echo "#define CONFIG_AUDIO_DRIVERS \\"
diff --git a/vl.c b/vl.c
index 7121cd0264..6d08ec834a 100644
--- a/vl.c
+++ b/vl.c
@@ -3423,7 +3423,7 @@ int main(int argc, char **argv, char **envp)
}
/* If all else fails use the install patch specified when building. */
if (!data_dir) {
- data_dir = CONFIG_QEMU_SHAREDIR;
+ data_dir = CONFIG_QEMU_DATADIR;
}
/*