aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTomáš Golembiovský <tgolembi@redhat.com>2017-07-17 15:58:33 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2017-07-17 19:10:09 -0500
commite674605f9821a275e3ed87ce9accc835d565b753 (patch)
tree4990d07583fae99f8d716eb03c9caf44f6fcf95a /configure
parentf2dce827f55a9b76ca7b2fc60b976b4760fc9eb1 (diff)
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