[PATCH 2/4] configure: add helper for setting xserver directory

Tiago Vignatti tiago.vignatti at intel.com
Wed Aug 3 02:12:31 PDT 2011


With this the X server directory can become independent from the
installation prefix set by autoconf.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 compositor/Makefile.am |    2 +-
 configure.ac           |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/compositor/Makefile.am b/compositor/Makefile.am
index f913a92..20a217d 100644
--- a/compositor/Makefile.am
+++ b/compositor/Makefile.am
@@ -3,7 +3,7 @@ bin_PROGRAMS = wayland-compositor
 AM_CPPFLAGS =					\
 	-DDATADIR='"$(datadir)"'		\
 	-DMODULEDIR='"$(moduledir)"'		\
-	-DBINDIR='"$(bindir)"'			\
+	-DBINDIR='"@XSERVER_DIR@"'		\
 	$(COMPOSITOR_CFLAGS)
 
 wayland_compositor_LDFLAGS = -export-dynamic
diff --git a/configure.ac b/configure.ac
index 228b527..9034fdf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,11 @@ AM_CONDITIONAL(ENABLE_XSERVER_LAUNCHER, test x$enable_xserver_launcher == xyes)
 if test x$enable_xserver_launcher == xyes; then
   PKG_CHECK_MODULES([XSERVER_LAUNCHER], xcb)
   AC_DEFINE([BUILD_XSERVER_LAUNCHER], [1], [Build the X server launcher])
+
+  AC_ARG_WITH(xserver-dir, AS_HELP_STRING([--with-xserver-dir=DIR],
+              [Directory containing X server]), [XSERVER_DIR="$withval"],
+              [XSERVER_DIR="$bindir"])
+  AC_SUBST([XSERVER_DIR])
 fi
 
 
-- 
1.7.2.2



More information about the wayland-devel mailing list