[Wine-patches] [eterwine] Fix installing rules for udev (eterbug #7325).

Alexander Morozov amorozov на etersoft.ru
Ср Май 25 17:16:08 MSD 2011


----------- следующая часть -----------
From 5f281fab0a6e4d119c85e5a27a84270761dadacb Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 25 May 2011 17:00:56 +0400
Subject: [eterwine] Fix installing rules for udev (eterbug #7325).

---
 configure         |   21 +++++++++++++++++++++
 configure.ac      |   13 +++++++++++++
 tools/Makefile.in |    2 +-
 3 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 5c8fca3..f16c5c3 100755
--- a/configure
+++ b/configure
@@ -599,6 +599,7 @@ LIBOBJS
 LINGUAS
 ALL_TEST_BINARIES
 ALL_WINETEST_DEPENDS
+UDEV_VERSION
 LDAPLIBS
 LIBPOLL
 LIBDL
@@ -14434,6 +14435,26 @@ $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
 
 fi
 
+UDEV_VERSION=""
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev version" >&5
+$as_echo_n "checking for udev version... " >&6; }
+if test "${ac_cv_prog_udev_ver+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -x /sbin/udevadm; then
+                  ac_cv_prog_udev_ver=`/sbin/udevadm --version`
+                else
+                  ac_cv_prog_udev_ver="unknown"
+                fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_udev_ver" >&5
+$as_echo "$ac_cv_prog_udev_ver" >&6; }
+if test "$ac_cv_prog_udev_ver" != "unknown"
+then
+    UDEV_VERSION="$ac_cv_prog_udev_ver"
+fi
+
 
 case $host_cpu in
   *i[3456789]86*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to define __i386__" >&5
diff --git a/configure.ac b/configure.ac
index 95adc9a..bc9ab89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2331,6 +2331,19 @@ then
     AC_DEFINE(HAVE_ISNAN, 1, [Define to 1 if you have the `isnan' function.])
 fi
 
+dnl Check for udev version
+AC_SUBST(UDEV_VERSION,"")
+AC_CACHE_CHECK([for udev version], ac_cv_prog_udev_ver,
+               [if test -x /sbin/udevadm; then
+                  ac_cv_prog_udev_ver=`/sbin/udevadm --version`
+                else
+                  ac_cv_prog_udev_ver="unknown"
+                fi])
+if test "$ac_cv_prog_udev_ver" != "unknown"
+then
+    UDEV_VERSION="$ac_cv_prog_udev_ver"
+fi
+
 dnl *** check for the need to define platform-specific symbols
 
 case $host_cpu in
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 36e0499..1bf24f6 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -70,7 +70,7 @@ install install-lib:: wine.inf $(INSTALLDIRS)
 	$(INSTALL_DATA) wine.inf $(DESTDIR)$(datadir)/wine/wine.inf
 	$(INSTALL_DATA) $(srcdir)/l_intl.nls $(DESTDIR)$(datadir)/wine/l_intl.nls
 	$(INSTALL_DATA) $(srcdir)/wine.desktop $(DESTDIR)$(datadir)/applications/wine.desktop
-	test -x /sbin/udevadm && test "$(/sbin/udevadm --version)" -gt 147 && \
+	test "@UDEV_VERSION@" -gt 147 && \
 		$(INSTALL_DATA) udev.rules $(DESTDIR)$(sysconfdir)/udev/rules.d/99-winekeys.rules || \
 		$(INSTALL_DATA) udev-147.rules $(DESTDIR)$(sysconfdir)/udev/rules.d/99-winekeys.rules
 	-$(UPDATE_DESKTOP_DATABASE)
-- 
1.7.4.5



Подробная информация о списке рассылки Wine-patches