aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 10 insertions, 2 deletions
diff --git a/configure b/configure
index 3d89870d99..f6a51e0765 100755
--- a/configure
+++ b/configure
@@ -4612,9 +4612,17 @@ elif compile_prog "" "$pthread_lib -lrt" ; then
libs_qga="$libs_qga -lrt"
fi
-if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
- "$haiku" != "yes" ; then
+# Check whether we need to link libutil for openpty()
+cat > $TMPC << EOF
+extern int openpty(int *am, int *as, char *name, void *termp, void *winp);
+int main(void) { return openpty(0, 0, 0, 0, 0); }
+EOF
+
+if ! compile_prog "" "" ; then
+ if compile_prog "" "-lutil" ; then
libs_softmmu="-lutil $libs_softmmu"
+ libs_tools="-lutil $libs_tools"
+ fi
fi
##########################################