[Glamor] [PATCH] configure: Install glamor.conf to xorg.conf.d.

zhigang.gong at linux.intel.com zhigang.gong at linux.intel.com
Tue Mar 27 03:26:43 PDT 2012


From: Zhigang Gong <zhigang.gong at linux.intel.com>

As we need to make sure load DRI2 first and then load
glamoregl and then load GLX module, we create a new
xorg configuration file here and install it to system
configuration directory.

Note: If you are building xserver at your local directory
and set the prefix to your local directory rather than
the system directory, then the glamor.conf may
not be loaded when you run the X server you built locally.

The reason is that currently xorg will search the following dir
/usr/share/X11/xorg.conf.d
if it exist , then will ignore your local configuration
directory where the glamor.conf is at. Then you may fail
to start Xserver.

If this is the case, you may need to copy the glamor.conf
to /usr/share/X11/xorg.conf.d manually.

Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
 Makefile.am      |    4 ++--
 conf/Makefile.am |   24 ++++++++++++++++++++++++
 conf/glamor.conf |    4 ++++
 configure.ac     |   13 ++++++++++++-
 4 files changed, 42 insertions(+), 3 deletions(-)
 create mode 100644 conf/Makefile.am
 create mode 100644 conf/glamor.conf

diff --git a/Makefile.am b/Makefile.am
index 1ca7dbb..684b211 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS=nostdinc
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = src
+SUBDIRS = src conf
 
 aclocaldir = $(datadir)/aclocal
 
@@ -25,7 +25,7 @@ ChangeLog:
 
 dist-hook: ChangeLog INSTALL
 
-DIST_SUBDIRS = src 
+DIST_SUBDIRS = src conf 
 
 # gross hack
 relink: all
diff --git a/conf/Makefile.am b/conf/Makefile.am
new file mode 100644
index 0000000..c43674d
--- /dev/null
+++ b/conf/Makefile.am
@@ -0,0 +1,24 @@
+#  Copyright 2012 Zhigang Gong.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+if HAS_XORG_CONF_DIR
+dist_config_DATA = glamor.conf
+endif
diff --git a/conf/glamor.conf b/conf/glamor.conf
new file mode 100644
index 0000000..62ea2cc
--- /dev/null
+++ b/conf/glamor.conf
@@ -0,0 +1,4 @@
+Section "Module"
+	Load  "dri2"
+	Load  "glamoregl"
+EndSection
diff --git a/configure.ac b/configure.ac
index ed09c62..5b65095 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,16 @@ AC_ARG_WITH(xorg-module-dir,
 
 AC_SUBST([moduledir])
 
+# Define a configure option for an alternate X Server configuration directory
+sysconfigdir=`$PKG_CONFIG --variable=sysconfigdir xorg-server`
+AC_ARG_WITH(xorg-conf-dir,
+            AC_HELP_STRING([--with-xorg-conf-dir=DIR],
+                           [Default xorg.conf.d directory [[default=from $PKG_CONFIG xorg-server]]]),
+            [configdir="$withval"],
+            [configdir="$sysconfigdir"])
+AC_SUBST(configdir)
+AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$sysconfigdir" != "x"])
+
 # X Server SDK location is required to install evdev header files
 # This location is also relayed in the xorg-evdev.pc file
 sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
@@ -166,4 +176,5 @@ AC_SUBST([GLX_SYS_LIBS])
 AC_OUTPUT([Makefile
            glamor-egl.pc
            glamor.pc
-           src/Makefile])
+           src/Makefile
+	   conf/Makefile])
-- 
1.7.4.4



More information about the Glamor mailing list