mirror of https://github.com/xemu-project/xemu.git
configure: add option to explicitly enable/disable libgio
Now, compilation of util/dbus is implicit and depends on libgio presence on the building host. The patch adds options to manage libgio dependencies explicitly. Signed-off-by: Denis Plotnikov <den-plotnikov@yandex-team.ru> Message-Id: <20210312151440.405776-1-den-plotnikov@yandex-team.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7cac7fea70
commit
20cf7b8e13
|
@ -465,6 +465,7 @@ fuse_lseek="auto"
|
||||||
multiprocess="auto"
|
multiprocess="auto"
|
||||||
|
|
||||||
malloc_trim="auto"
|
malloc_trim="auto"
|
||||||
|
gio="$default_feature"
|
||||||
|
|
||||||
# parse CC options second
|
# parse CC options second
|
||||||
for opt do
|
for opt do
|
||||||
|
@ -1560,6 +1561,10 @@ for opt do
|
||||||
;;
|
;;
|
||||||
--disable-multiprocess) multiprocess="disabled"
|
--disable-multiprocess) multiprocess="disabled"
|
||||||
;;
|
;;
|
||||||
|
--enable-gio) gio=yes
|
||||||
|
;;
|
||||||
|
--disable-gio) gio=no
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "ERROR: unknown option $opt"
|
echo "ERROR: unknown option $opt"
|
||||||
echo "Try '$0 --help' for more information"
|
echo "Try '$0 --help' for more information"
|
||||||
|
@ -1913,6 +1918,7 @@ disabled with --disable-FEATURE, default is enabled if available
|
||||||
fuse FUSE block device export
|
fuse FUSE block device export
|
||||||
fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports
|
fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports
|
||||||
multiprocess Out of process device emulation support
|
multiprocess Out of process device emulation support
|
||||||
|
gio libgio support
|
||||||
|
|
||||||
NOTE: The object files are built at the place where configure is launched
|
NOTE: The object files are built at the place where configure is launched
|
||||||
EOF
|
EOF
|
||||||
|
@ -3319,6 +3325,8 @@ if test "$static" = yes && test "$mingw32" = yes; then
|
||||||
glib_cflags="-DGLIB_STATIC_COMPILATION $glib_cflags"
|
glib_cflags="-DGLIB_STATIC_COMPILATION $glib_cflags"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! test "$gio" = "no"; then
|
||||||
|
pass=no
|
||||||
if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then
|
if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then
|
||||||
gio_cflags=$($pkg_config --cflags gio-2.0)
|
gio_cflags=$($pkg_config --cflags gio-2.0)
|
||||||
gio_libs=$($pkg_config --libs gio-2.0)
|
gio_libs=$($pkg_config --libs gio-2.0)
|
||||||
|
@ -3338,18 +3346,28 @@ int main(void)
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if compile_prog "$gio_cflags" "$gio_libs" ; then
|
if compile_prog "$gio_cflags" "$gio_libs" ; then
|
||||||
gio=yes
|
pass=yes
|
||||||
else
|
else
|
||||||
gio=no
|
pass=no
|
||||||
fi
|
|
||||||
else
|
|
||||||
gio=no
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $pkg_config --atleast-version=$glib_req_ver gio-unix-2.0; then
|
if test "$pass" = "yes" &&
|
||||||
|
$pkg_config --atleast-version=$glib_req_ver gio-unix-2.0; then
|
||||||
gio_cflags="$gio_cflags $($pkg_config --cflags gio-unix-2.0)"
|
gio_cflags="$gio_cflags $($pkg_config --cflags gio-unix-2.0)"
|
||||||
gio_libs="$gio_libs $($pkg_config --libs gio-unix-2.0)"
|
gio_libs="$gio_libs $($pkg_config --libs gio-unix-2.0)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$pass" = "no"; then
|
||||||
|
if test "$gio" = "yes"; then
|
||||||
|
feature_not_found "gio" "Install libgio >= 2.0"
|
||||||
|
else
|
||||||
|
gio=no
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
gio=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Sanity check that the current size_t matches the
|
# Sanity check that the current size_t matches the
|
||||||
# size that glib thinks it should be. This catches
|
# size that glib thinks it should be. This catches
|
||||||
|
|
Loading…
Reference in New Issue