[PATCH v2] Record some additional library dependencies in xf86 modules

Dan Nicholson dbn.lists at gmail.com
Sun Jun 6 13:01:08 PDT 2010


On Sun, Jun 6, 2010 at 12:22 PM, Alan Coopersmith
<alan.coopersmith at oracle.com> wrote:
> Helps with symbol resolution when building with -z defs
>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  configure.ac                 |    8 +++++++-
>  fb/Makefile.am               |    2 ++
>  hw/xfree86/int10/Makefile.am |    1 +
>  3 files changed, 10 insertions(+), 1 deletions(-)
>
> Changes since v1:
>
>  - Added the PKG_CHECK_MODULES(PIXMAN) as suggested by Julien Cristau.
>
>  - Move the addition of PIXMAN_LIBS up to the top-level fb Makefile.am
>   and let libtool propogate it down to everything that links against
>   libfb.la or libwfb.la from there.
>
> diff --git a/configure.ac b/configure.ac
> index c8b49de..dc35bf7 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -794,7 +794,7 @@ APPLEWMPROTO="applewmproto >= 1.4"
>
>  dnl Core modules for most extensions, et al.
>  REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.17] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
> -REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
> +REQUIRED_LIBS="xfont xau"
>
>  dnl List of libraries that require a specific version
>  LIBAPPLEWM="applewm >= 1.4"
> @@ -809,6 +809,12 @@ LIBPCIACCESS="pciaccess >= 0.8.0"
>  LIBGLIB="glib-2.0 >= 2.16"
>  LIBUDEV="libudev >= 143"
>  LIBSELINUX="libselinux >= 2.0.86"
> +LIBPIXMAN="pixman-1 >= 0.15.20"
> +
> +dnl Pixman is always required, but we separate it out so we can link
> +dnl specific modules against it
> +PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN)
> +REQUIRED_LIBS="$REQUIRED_LIBS [$LIBPIXMAN]"

This is probably irrelevant, but I wanted to note that the quoting
here is backward. In the above REQUIRED_LIBS line, the [] are
completely superfluous.

Pre-autoconf:
REQUIRED_LIBS="$REQUIRED_LIBS [$LIBPIXMAN]"
Post-autoconf:
REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN"

The m4 quoting only has an effect when you're passing an argument to a
macro or you're using a string that might be a macro name. Otherwise,
the strings just pass through verbatim. So, here it would be far more
effective if you quoted the arguments to PKG_CHECK_MODULES, and not
shell variable assignments.

The quoting probably won't have any effect either way unless there's
embedded newlines or there are potential namespace conflicts, but I
see stuff like the REQUIRED_MODULES line and it's obvious it's not
fully understood.

Besides this nitpicking,

Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>


More information about the xorg-devel mailing list