Mesa (master): build: Only add links to .so files if we're building them

Matt Turner mattst88 at kemper.freedesktop.org
Fri Aug 24 18:07:30 UTC 2012


Module: Mesa
Branch: master
Commit: df4dccc7a9691555e05c8945048603621340b5d7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=df4dccc7a9691555e05c8945048603621340b5d7

Author: Matt Turner <mattst88 at gmail.com>
Date:   Wed Aug 22 11:51:31 2012 -0700

build: Only add links to .so files if we're building them

Xlib-GLX and OSMesa support static building.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53962

---

 configure.ac                        |    2 ++
 src/mesa/drivers/osmesa/Makefile.am |    2 ++
 src/mesa/drivers/x11/Makefile.am    |    2 ++
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 46e9527..ad20c87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,6 +283,8 @@ xnono )
     ;;
 esac
 
+AM_CONDITIONAL(BUILD_SHARED, test "x$enable_shared" = xyes)
+
 dnl
 dnl mklib options
 dnl
diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am
index 1ceff88..db1d14f 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -40,12 +40,14 @@ lib at OSMESA_LIB@_la_LIBADD = \
 	$(top_builddir)/src/mesa/libmesa.la \
 	$(top_builddir)/src/mapi/glapi/libglapi.la
 
+if BUILD_SHARED
 # Provide compatibility with scripts for the old Mesa build system for
 # a while by putting a link to the driver into /lib of the build tree.
 all-local: lib at OSMESA_LIB@.la
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
 	ln -f .libs/lib at OSMESA_LIB@.so $(top_builddir)/$(LIB_DIR)/lib at OSMESA_LIB@.so;
 	ln -f .libs/lib at OSMESA_LIB@.so. at VERSION@ $(top_builddir)/$(LIB_DIR)/lib at OSMESA_LIB@.so. at VERSION@;
+endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = osmesa.pc
diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am
index dab4d6b..2b0a163 100644
--- a/src/mesa/drivers/x11/Makefile.am
+++ b/src/mesa/drivers/x11/Makefile.am
@@ -65,9 +65,11 @@ lib at GL_LIB@_la_LDFLAGS = \
 	-no-undefined \
 	$(GL_LIB_DEPS)
 
+if BUILD_SHARED
 # Provide compatibility with scripts for the old Mesa build system for
 # a while by putting a link to the driver into /lib of the build tree.
 all-local: lib at GL_LIB@.la
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
 	ln -f .libs/lib at GL_LIB@.so.$(GL_MAJOR).$(GL_MINOR).$(GL_PATCH) $(top_builddir)/$(LIB_DIR)/lib at GL_LIB@.so.$(GL_MAJOR)
 	ln -sf lib at GL_LIB@.so.$(GL_MAJOR) $(top_builddir)/$(LIB_DIR)/lib at GL_LIB@.so
+endif




More information about the mesa-commit mailing list