On Sun, Nov 14, 2010 at 5:25 PM, Peter Hutterer
<[email protected]> wrote:
> From: Adam Jackson <[email protected]>
>
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
>  hw/xfree86/parser/Makefile.am |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am
> index caf7079..3bda51e 100644
> --- a/hw/xfree86/parser/Makefile.am
> +++ b/hw/xfree86/parser/Makefile.am
> @@ -32,7 +32,7 @@ libxf86config_internal_la_SOURCES = \
>
>  libxf86config_a_SOURCES = \
>        $(INTERNAL_SOURCES)
> -libxf86config_a_CFLAGS = $(AM_CFLAGS)
> +libxf86config_a_CFLAGS = $(AM_CFLAGS) -fPIC
>
>  AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) \
>        -DSYSCONFDIR=\"$(sysconfdir)\" \

Why not just make libxf86config into a libtool library? Then libtool
will take care of all the PIC details, follow the --with-pic
configuration, and be static or shared as requested by the user.
Here's an untested diff, but I think it's all it would take (gmail has
surely broken the whitespace).

diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am
index caf7079..6cbf8e4 100644
--- a/hw/xfree86/parser/Makefile.am
+++ b/hw/xfree86/parser/Makefile.am
@@ -1,6 +1,6 @@
 if INSTALL_LIBXF86CONFIG
 noinst_LTLIBRARIES = libxf86config_internal.la
-lib_LIBRARIES = libxf86config.a
+lib_LTLIBRARIES = libxf86config.la
 LIBHEADERS = \
        xf86Optrec.h \
        xf86Parser.h
@@ -30,9 +30,9 @@ INTERNAL_SOURCES= \
 libxf86config_internal_la_SOURCES = \
        $(INTERNAL_SOURCES)

-libxf86config_a_SOURCES = \
+libxf86config_la_SOURCES = \
        $(INTERNAL_SOURCES)
-libxf86config_a_CFLAGS = $(AM_CFLAGS)
+libxf86config_la_CFLAGS = $(AM_CFLAGS)

 AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) \
        -DSYSCONFDIR=\"$(sysconfdir)\" \
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to