[PATCH weston 2/7] autotools: Define paths in configure.ac
Quentin Glidic
sardemff7+wayland at sardemff7.net
Tue Jun 18 00:11:29 PDT 2013
From: Quentin Glidic <sardemff7+git at sardemff7.net>
Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
configure.ac | 26 ++++++++++++++++++++++++++
man/Makefile.am | 2 +-
src/Makefile.am | 2 --
src/weston.pc.in | 4 ++--
src/xwayland/Makefile.am | 1 -
5 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index b625221..4a4dc1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,32 @@ LT_INIT([disable-static])
AC_ARG_VAR([WESTON_NATIVE_BACKEND],
[Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@])
+
+#
+# Directories
+#
+
+# package-specific dirs
+pkglibdir='${libdir}/'${PACKAGE}
+pkgincludedir='${includedir}/'${PACKAGE}
+pkgdatadir='${datadir}/'${PACKAGE}
+AC_SUBST([pkglibdir])
+AC_SUBST([pkgincludedir])
+AC_SUBST([pkgdatadir])
+
+# pkg-config files
+m4_ifdef([PKG_INSTALLDIR], [
+ PKG_INSTALLDIR()
+ ], [
+ pkgconfigdir='${libdir}/pkgconfig'
+ AC_SUBST([pkgconfigdir])
+ ])
+
+# weston specific dirs
+moduledir='${pkglibdir}/plugins'
+AC_SUBST([moduledir])
+
+
PKG_PROG_PKG_CONFIG()
AC_CHECK_FUNC([dlopen], [],
diff --git a/man/Makefile.am b/man/Makefile.am
index e4abd8c..37174e2 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -6,7 +6,7 @@ endif
MAN_SUBSTS = \
-e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
- -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
+ -e 's|__weston_modules_dir__|$(moduledir)|g' \
-e 's|__version__|$(PACKAGE_VERSION)|g'
SUFFIXES = .1 .5 .7 .man
diff --git a/src/Makefile.am b/src/Makefile.am
index d06e773..0c386f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -84,7 +84,6 @@ endif
endif # BUILD_WESTON_LAUNCH
-pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = weston.pc
westonincludedir = $(includedir)/weston
@@ -94,7 +93,6 @@ westoninclude_HEADERS = \
../shared/matrix.h \
../shared/config-parser.h
-moduledir = $(libdir)/weston
module_LTLIBRARIES = \
$(desktop_shell) \
$(tablet_shell) \
diff --git a/src/weston.pc.in b/src/weston.pc.in
index 7a09938..262b311 100644
--- a/src/weston.pc.in
+++ b/src/weston.pc.in
@@ -1,9 +1,9 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@includedir@
libexecdir=@libexecdir@
-pkglibexecdir=${libexecdir}/@PACKAGE@
+includedir=@includedir@
+pkglibexecdir=@pkglibexecdir@
Name: Weston Plugin API
Description: Header files for Weston plugin development
diff --git a/src/xwayland/Makefile.am b/src/xwayland/Makefile.am
index 3a26cbd..1f8ee5c 100644
--- a/src/xwayland/Makefile.am
+++ b/src/xwayland/Makefile.am
@@ -6,7 +6,6 @@ AM_CPPFLAGS = \
-DLIBEXECDIR='"$(libexecdir)"' \
-DXSERVER_PATH='"@XSERVER_PATH@"'
-moduledir = @libdir@/weston
module_LTLIBRARIES = xwayland.la
xwayland = xwayland.la
--
1.8.3
More information about the wayland-devel
mailing list