summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTomáš Golembiovský2017-07-17 15:58:33 +0200
committerMichael Roth2017-07-18 02:10:09 +0200
commite674605f9821a275e3ed87ce9accc835d565b753 (patch)
tree4990d07583fae99f8d716eb03c9caf44f6fcf95a /configure
parentqemu-ga: add missing libpcre to MSI build (diff)
downloadqemu-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-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index a3f0522e8f..e8798cec79 100755
--- a/configure
+++ b/configure
@@ -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