[PATCH] Use -no-undefined libtool flag, fix underlinking when configured --enable-motif

Jon TURNEY jon.turney at dronecode.org.uk
Sun Aug 7 06:36:40 PDT 2011


Use -no-undefined to assure libtool that the library has no unresolved
symbols at link time, so that libtool will build a shared library on
platforms require that all symbols are resolved when the library is linked.

This exposes the fact that we are underlinked when ./configured with
--enable-motif, so also link with motif libs in that case.

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 Makefile.am  |    2 +-
 configure.ac |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4f8bb04..b95438c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,7 @@ lib_LTLIBRARIES = libGLw.la
 libGLw_la_SOURCES = GLwDrawA.c
 libGLw_la_CFLAGS = $(GLW_CLFAGS)
 libGLw_la_LIBADD = $(GLW_LIBS)
-libGLw_la_LDFLAGS = -version-info $(GLW_LIBRARY_VERSION)
+libGLw_la_LDFLAGS = -version-info $(GLW_LIBRARY_VERSION) -no-undefined
 if ENABLE_MOTIF
 libGLw_la_SOURCES += GLwMDrawA.c
 libGLw_la_CFLAGS += $(MOTIF_CFLAGS)
diff --git a/configure.ac b/configure.ac
index 8d46a11..da4d445 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,7 +87,7 @@ AC_SUBST([GLW_PC_LIB_PRIV])
 AC_SUBST([GLW_PC_CFLAGS])
 
 CFLAGS="$CFLAGS $GL_CFLAGS"
-LIBS="$LIBS $GL_LIBS"
+LIBS="$LIBS $GL_LIBS $MOTIF_LIBS"
 
 dnl Set up C warning flags.  Copy of XORG_CWARNFLAGS.
 if  test "x$GCC" = xyes ; then
-- 
1.7.5.1


--------------020302020202050806090105--


More information about the mesa-dev mailing list