[PATCH] xfree86: Convert libxf86config to static libtool library

Dan Nicholson dbn.lists at gmail.com
Tue Nov 23 12:10:31 PST 2010


In order to use libxf86config in a shared library, all the code must be
compiled with -fPIC. Add proper PIC support for libxf86config by turning
it into a libtool library. However, since we don't want to guarantee API
or ABI stability, make sure it's only built static.

Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
---
 I think this will work without changing the static/shared status quo.

 hw/xfree86/parser/Makefile.am |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am
index caf7079..323088c 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,10 @@ 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)
+libxf86config_la_LDFLAGS = -static
 
 AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) \
 	-DSYSCONFDIR=\"$(sysconfdir)\" \
-- 
1.7.2.3


More information about the xorg-devel mailing list