diff options
author | Tomáš Golembiovský | 2017-07-17 15:58:33 +0200 |
---|---|---|
committer | Michael Roth | 2017-07-18 02:10:09 +0200 |
commit | e674605f9821a275e3ed87ce9accc835d565b753 (patch) | |
tree | 4990d07583fae99f8d716eb03c9caf44f6fcf95a /configure | |
parent | qemu-ga: add missing libpcre to MSI build (diff) | |
download | qemu-e674605f9821a275e3ed87ce9accc835d565b753.tar.gz qemu-e674605f9821a275e3ed87ce9accc835d565b753.tar.xz qemu-e674605f9821a275e3ed87ce9accc835d565b753.zip |
qemu-ga: check if utmpx.h is available on the system
Commit 161a56a9065 added command guest-get-users and requires the
utmpx.h (defined by POSIX) to work. It is however not always available
(e.g. on OpenBSD) therefor a check for its existence is necessary.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -4915,6 +4915,21 @@ if compile_prog "" "" ; then fi ########################################## +# check for utmpx.h, it is missing e.g. on OpenBSD + +have_utmpx=no +cat > $TMPC << EOF +#include <utmpx.h> +struct utmpx user_info; +int main(void) { + return 0; +} +EOF +if compile_prog "" "" ; then + have_utmpx=yes +fi + +########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5959,6 +5974,10 @@ if test "$have_static_assert" = "yes" ; then echo "CONFIG_STATIC_ASSERT=y" >> $config_host_mak fi +if test "$have_utmpx" = "yes" ; then + echo "HAVE_UTMPX=y" >> $config_host_mak +fi + # Hold two types of flag: # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on # a thread we have a handle to |