[PATCH weston 2/7] autotools: Define paths in configure.ac

Kristian Høgsberg hoegsberg at gmail.com
Thu Jun 20 12:09:18 PDT 2013


On Tue, Jun 18, 2013 at 09:11:29AM +0200, Quentin Glidic wrote:
> 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

I'm not sure we want this, it's convention to define the *dir variable
in the Makefile.am along with the dependent varialbles... 

>  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

... I certainly find it confusion to find module_LTLIBRARIES in the
Makefile.am and not have the moduledir definition nearby.

Kristian

>  xwayland = xwayland.la
> -- 
> 1.8.3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list