>From 85a28c05b71dead1165f1df4f35b0083fabec01c Mon Sep 17 00:00:00 2001
From: =?utf-8?q?R=C3=A9mi=20Cardona?= <remi.cardona@lri.fr>
Date: Mon, 20 Oct 2008 13:02:54 +0200
Subject: [PATCH] add a configure switch for pre-2.0 compatibility symlinks

---
 configure.ac    |    8 ++++++++
 man/Makefile.am |    7 ++++---
 src/Makefile.am |    2 ++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0f3c780..8da4bd3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,11 @@ AC_ARG_ENABLE(xvmc, AC_HELP_STRING([--disable-xvmc],
               [XVMC="$enableval"],
               [XVMC=auto])
 
+AC_ARG_ENABLE(symlinks, AC_HELP_STRING([--enable-symlinks],
+                                       [Disable old "i810" symlinks [[default=yes]]]),
+              [SYMLINKS="$enableval"],
+              [SYMLINKS="yes"])
+
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -255,6 +260,9 @@ if test "$XVMC" = yes; then
     	AC_SUBST([XVMCLIB_CFLAGS])
 fi
 
+AC_MSG_CHECKING([whether to setup old "i810" symlinks])
+AC_MSG_RESULT([$SYMLINKS])
+AM_CONDITIONAL(SYMLINKS, [test "$SYMLINKS" = "yes"])
 
 AC_SUBST([DRI_CFLAGS])
 AC_SUBST([XORG_CFLAGS])
diff --git a/man/Makefile.am b/man/Makefile.am
index 2a1cc81..b07b3f0 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -25,9 +25,10 @@
 # 
 
 drivermandir = $(DRIVER_MAN_DIR)
-driverman_DATA = \
-	$(DRIVER_NAME).$(DRIVER_MAN_SUFFIX) \
-	i810.$(DRIVER_MAN_SUFFIX)
+driverman_DATA = $(DRIVER_NAME).$(DRIVER_MAN_SUFFIX)
+if SYMLINKS
+driverman_DATA += i810.$(DRIVER_MAN_SUFFIX)
+endif
 
 EXTRA_DIST = $(DRIVER_NAME).man
 
diff --git a/src/Makefile.am b/src/Makefile.am
index b16ba6c..881fbaa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -223,8 +223,10 @@ intel_drv_la_SOURCES += \
 	$(INTEL_XVMC_SRCS)
 endif
 
+if SYMLINKS
 install-exec-hook:
 	(cd $(DESTDIR)$(intel_drv_ladir) && rm -f i810_drv.so && $(LN_S) intel_drv.so i810_drv.so)
 
 uninstall-hook:
 	(cd $(DESTDIR)$(intel_drv_ladir) && rm -f i810_drv.so)
+endif
-- 
1.6.0.2

