aboutsummaryrefslogtreecommitdiff
path: root/mesalib/configure.ac
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-06-08 15:05:49 +0200
committermarha <marha@users.sourceforge.net>2014-06-08 15:05:49 +0200
commit71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec (patch)
treeea689cdd51f395980ddc37dc33781635976f3a16 /mesalib/configure.ac
parentaec798fb4dc72d616732d0fa711faffaa8cd7590 (diff)
parent2acb86c9b086bdb9a3897db0b93820652e07cb59 (diff)
downloadvcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.tar.gz
vcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.tar.bz2
vcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.zip
Merge remote-tracking branch 'origin/released'
Conflicts: apps/xwininfo/xwininfo.c xorg-server/hw/xwin/glx/indirect.c
Diffstat (limited to 'mesalib/configure.ac')
-rw-r--r--mesalib/configure.ac44
1 files changed, 32 insertions, 12 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index bee85a131..a12f27ac2 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -552,7 +552,13 @@ dnl See if posix_memalign is available
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
dnl Check for pthreads
-AX_PTHREAD
+case "$host_os" in
+mingw*)
+ ;;
+*)
+ AX_PTHREAD
+ ;;
+esac
dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS
dnl to -pthread, which causes problems if we need -lpthread to appear in
dnl pkgconfig files.
@@ -870,14 +876,21 @@ fi
case "$host_os" in
linux*)
- need_libudev=yes ;;
+ need_pci_id=yes ;;
*)
- need_libudev=no ;;
+ need_pci_id=no ;;
esac
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
have_libudev=yes, have_libudev=no)
+AC_ARG_ENABLE([sysfs],
+ [AS_HELP_STRING([--enable-sysfs],
+ [enable /sys PCI identification @<:@default=disabled@:>@])],
+ [have_sysfs="$enableval"],
+ [have_sysfs=no]
+)
+
if test "x$enable_dri" = xyes; then
if test "$enable_static" = yes; then
AC_MSG_ERROR([Cannot use static libraries for DRI drivers])
@@ -973,8 +986,15 @@ xyesno)
;;
esac
+have_pci_id=no
if test "$have_libudev" = yes; then
DEFINES="$DEFINES -DHAVE_LIBUDEV"
+ have_pci_id=yes
+fi
+
+if test "$have_sysfs" = yes; then
+ DEFINES="$DEFINES -DHAVE_SYSFS"
+ have_pci_id=yes
fi
# This is outside the case (above) so that it is invoked even for non-GLX
@@ -1076,8 +1096,8 @@ if test "x$enable_dri" = xyes; then
DEFINES="$DEFINES -DHAVE_DRI3"
fi
- if test "x$have_libudev" != xyes; then
- AC_MSG_ERROR([libudev-dev required for building DRI])
+ if test "x$have_pci_id" != xyes; then
+ AC_MSG_ERROR([libudev-dev or sysfs required for building DRI])
fi
case "$host_cpu" in
@@ -1252,8 +1272,8 @@ if test "x$enable_gbm" = xauto; then
esac
fi
if test "x$enable_gbm" = xyes; then
- if test "x$need_libudev$have_libudev" = xyesno; then
- AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED])
+ if test "x$need_pci_id$have_pci_id" = xyesno; then
+ AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED or sysfs])
fi
if test "x$enable_dri" = xyes; then
@@ -1271,7 +1291,7 @@ if test "x$enable_gbm" = xyes; then
fi
fi
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
-if test "x$need_libudev" = xyes; then
+if test "x$need_pci_id$have_libudev" = xyesyes; then
GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
else
GBM_PC_REQ_PRIV=""
@@ -1560,9 +1580,9 @@ for plat in $egl_platforms; do
;;
esac
- case "$plat$need_libudev$have_libudev" in
+ case "$plat$need_pci_id$have_pci_id" in
waylandyesno|drmyesno)
- AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;;
+ AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED or sysfs]) ;;
esac
done
@@ -1843,8 +1863,8 @@ gallium_require_llvm() {
gallium_require_drm_loader() {
if test "x$enable_gallium_loader" = xyes; then
- if test "x$need_libudev$have_libudev" = xyesno; then
- AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED])
+ if test "x$need_pci_id$have_pci_id" = xyesno; then
+ AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED or sysfs])
fi
if test "x$have_libdrm" != xyes; then
AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])