diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2015-04-08 18:25:41 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2015-04-08 22:58:47 -0700 |
commit | 5b7d9cf15ae44361a3de506916f769d8dfec61d1 (patch) | |
tree | af533c0b4c172b9f420de32c159f00e641e8fcb1 /configure.ac | |
parent | c8ec00f537a640db049a1afb44a31c2199859085 (diff) |
vmmouse: Fix vmmouse_detect build on BSD
Tested with FreeBSD, but changes affect also OpenBSD and NetBSD to fix
compiling and linking with the relevant system libraries.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 212f083..248fde9 100644 --- a/configure.ac +++ b/configure.ac @@ -148,6 +148,37 @@ case $host_os in ;; esac +case $host_cpu in + i*86) + case $host_os in + *freebsd*) AC_DEFINE(USE_DEV_IO) ;; + *netbsd*) AC_DEFINE(USE_I386_IOPL) + use_i386_iopl=yes ;; + *openbsd*) AC_DEFINE(USE_I386_IOPL) + use_i386_iopl=yes ;; + esac + ;; + x86_64*|amd64*) + case $host_os in + *freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; + *netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl]) + use_i386_iopl=yes ;; + *openbsd*) AC_DEFINE(USE_AMD64_IOPL, 1, [BSD AMD64 iopl]) + use_amd64_iopl=yes ;; + esac + ;; +esac + +if test x$use_i386_iopl = xyes; then + AC_CHECK_LIB(i386, i386_iopl,[], + [AC_MSG_ERROR([cannot find library for i386_iopl])]) +fi + +if test x$use_amd64_iopl = xyes; then + AC_CHECK_LIB(amd64, amd64_iopl,[], + [AC_MSG_ERROR([cannot find library for amd64_iopl])]) +fi + PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.1] xproto $REQUIRED_MODULES) PKG_CHECK_EXISTS([xorg-server >= 1.1.0], |