open-vm-tools/udev-rules.patch

64 lines
1.8 KiB
Diff

--- configure.ac.orig 2016-09-20 15:43:37.000488000 -0700
+++ configure.ac 2016-09-20 16:12:30.000350000 -0700
@@ -1129,6 +1129,26 @@
fi
fi
+if test "$os" = "linux"; then
+ have_udev="yes"
+ AC_ARG_WITH([udev-rules-dir],
+ [AS_HELP_STRING([--with-udev-rules-dir=DIR],
+ [where to install udev rules])],
+ [UDEVRULESDIR="$withval"],
+ [
+ UDEVRULESDIR="/lib/udev/rules.d"
+ if test $HAVE_PKG_CONFIG = "yes"; then
+ udevdir=$(pkg-config udev --variable=udevdir)
+ if test "x$udevdir" != "x"; then
+ UDEVRULESDIR="$udevdir/rules.d"
+ fi
+ fi
+ ])
+else
+ have_udev="no"
+ UDEVRULESDIR=""
+fi
+
AM_CONDITIONAL(BUILD_HGFSMOUNTER, test "$buildHgfsmounter" = "yes")
AM_CONDITIONAL(LINUX, test "$os" = "linux")
AM_CONDITIONAL(SOLARIS, test "$os" = "solaris")
@@ -1155,6 +1175,7 @@
AM_CONDITIONAL(ENABLE_GRABBITMQPROXY, test "$enable_grabbitmqproxy" = "yes")
AM_CONDITIONAL(ENABLE_VGAUTH, test "$enable_vgauth" = "yes")
AM_CONDITIONAL(HAVE_VSOCK, test "$os" = "linux")
+AM_CONDITIONAL(HAVE_UDEV, test "$have_udev" = "yes")
if test "$have_xsm" != "yes"; then
AC_DEFINE([NO_XSM], 1, [])
@@ -1258,6 +1279,8 @@
AC_SUBST([VIX_LIBADD])
AC_SUBST([VGAUTH_LIBADD])
+AC_SUBST([UDEVRULESDIR])
+
###
### Create the Makefiles
###
@@ -1357,6 +1380,7 @@
docs/api/Makefile \
scripts/Makefile \
scripts/build/rpcgen_wrapper.sh \
+ udev/Makefile \
])
###
--- Makefile.am.orig 2016-09-20 15:43:16.000191000 -0700
+++ Makefile.am 2016-09-20 15:58:00.001125000 -0700
@@ -64,3 +64,6 @@
endif
SUBDIRS += docs
+if HAVE_UDEV
+ SUBDIRS += udev
+endif