summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-02-10 14:48:54 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2014-02-20 13:12:54 +0100
commit6ebc91e5d0f408371460ab4329dc6de7f93306ac (patch)
tree7e1c75dbe62cc9023b1cce652e3ba98c4466ff66 /configure
parent5c0d52bcd3aada33e274ea7dad75955f98bc2636 (diff)
downloadqemu-6ebc91e5d0f408371460ab4329dc6de7f93306ac.tar.gz
qemu-6ebc91e5d0f408371460ab4329dc6de7f93306ac.tar.bz2
qemu-6ebc91e5d0f408371460ab4329dc6de7f93306ac.zip
block: use per-object cflags and libs
No longer adds flags and libs for them to global variables, instead create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is used as per object cflags and libs. This removes unwanted dependencies from libcacard. Signed-off-by: Fam Zheng <famz@redhat.com> [Split from Fam's patch to enable modules. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure25
1 files changed, 10 insertions, 15 deletions
diff --git a/configure b/configure
index 66b1d30c99..1201cc32bb 100755
--- a/configure
+++ b/configure
@@ -2318,8 +2318,6 @@ EOF
curl_libs=`$curlconfig --libs 2>/dev/null`
if compile_prog "$curl_cflags" "$curl_libs" ; then
curl=yes
- libs_tools="$curl_libs $libs_tools"
- libs_softmmu="$curl_libs $libs_softmmu"
else
if test "$curl" = "yes" ; then
feature_not_found "curl" "Install libcurl devel"
@@ -2475,8 +2473,6 @@ EOF
rbd_libs="-lrbd -lrados"
if compile_prog "" "$rbd_libs" ; then
rbd=yes
- libs_tools="$rbd_libs $libs_tools"
- libs_softmmu="$rbd_libs $libs_softmmu"
else
if test "$rbd" = "yes" ; then
feature_not_found "rados block device" "Install librbd/ceph devel"
@@ -2493,9 +2489,6 @@ if test "$libssh2" != "no" ; then
libssh2_cflags=`$pkg_config libssh2 --cflags`
libssh2_libs=`$pkg_config libssh2 --libs`
libssh2=yes
- libs_tools="$libssh2_libs $libs_tools"
- libs_softmmu="$libssh2_libs $libs_softmmu"
- QEMU_CFLAGS="$QEMU_CFLAGS $libssh2_cflags"
else
if test "$libssh2" = "yes" ; then
error_exit "libssh2 >= $min_libssh2_version required for --enable-libssh2"
@@ -2541,8 +2534,6 @@ int main(void) { io_setup(0, NULL); io_set_eventfd(NULL, 0); eventfd(0, 0); retu
EOF
if compile_prog "" "-laio" ; then
linux_aio=yes
- libs_softmmu="$libs_softmmu -laio"
- libs_tools="$libs_tools -laio"
else
if test "$linux_aio" = "yes" ; then
feature_not_found "linux AIO" "Install libaio devel"
@@ -2711,9 +2702,6 @@ if test "$glusterfs" != "no" ; then
glusterfs="yes"
glusterfs_cflags=`$pkg_config --cflags glusterfs-api`
glusterfs_libs=`$pkg_config --libs glusterfs-api`
- CFLAGS="$CFLAGS $glusterfs_cflags"
- libs_tools="$glusterfs_libs $libs_tools"
- libs_softmmu="$glusterfs_libs $libs_softmmu"
if $pkg_config --atleast-version=5 glusterfs-api; then
glusterfs_discard="yes"
fi
@@ -3084,11 +3072,9 @@ EOF
libiscsi="yes"
libiscsi_cflags=$($pkg_config --cflags libiscsi)
libiscsi_libs=$($pkg_config --libs libiscsi)
- CFLAGS="$CFLAGS $libiscsi_cflags"
- LIBS="$LIBS $libiscsi_libs"
elif compile_prog "" "-liscsi" ; then
libiscsi="yes"
- LIBS="$LIBS -liscsi"
+ libiscsi_libs="-liscsi"
else
if test "$libiscsi" = "yes" ; then
feature_not_found "libiscsi" "Install libiscsi devel"
@@ -4101,6 +4087,7 @@ fi
if test "$curl" = "yes" ; then
echo "CONFIG_CURL=y" >> $config_host_mak
echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak
+ echo "CURL_LIBS=$curl_libs" >> $config_host_mak
fi
if test "$brlapi" = "yes" ; then
echo "CONFIG_BRLAPI=y" >> $config_host_mak
@@ -4193,6 +4180,8 @@ if test "$libiscsi" = "yes" ; then
if test "$libiscsi_version" = "1.4.0"; then
echo "CONFIG_LIBISCSI_1_4=y" >> $config_host_mak
fi
+ echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak
+ echo "LIBISCSI_LIBS=$libiscsi_libs" >> $config_host_mak
fi
if test "$libnfs" = "yes" ; then
@@ -4218,6 +4207,8 @@ if test "$qom_cast_debug" = "yes" ; then
fi
if test "$rbd" = "yes" ; then
echo "CONFIG_RBD=y" >> $config_host_mak
+ echo "RBD_CFLAGS=$rbd_cflags" >> $config_host_mak
+ echo "RBD_LIBS=$rbd_libs" >> $config_host_mak
fi
echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak
@@ -4261,6 +4252,8 @@ fi
if test "$glusterfs" = "yes" ; then
echo "CONFIG_GLUSTERFS=y" >> $config_host_mak
+ echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak
+ echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak
fi
if test "$glusterfs_discard" = "yes" ; then
@@ -4273,6 +4266,8 @@ fi
if test "$libssh2" = "yes" ; then
echo "CONFIG_LIBSSH2=y" >> $config_host_mak
+ echo "LIBSSH2_CFLAGS=$libssh2_cflags" >> $config_host_mak
+ echo "LIBSSH2_LIBS=$libssh2_libs" >> $config_host_mak
fi
if test "$virtio_blk_data_plane" = "yes" ; then