Mesa (master): build: Only build libmesa.la when needed
Matt Turner
mattst88 at kemper.freedesktop.org
Fri Aug 24 18:07:29 UTC 2012
Module: Mesa
Branch: master
Commit: 8cdce6c136799aa75310086c078d8cd5f19b84ce
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cdce6c136799aa75310086c078d8cd5f19b84ce
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue Aug 21 22:26:52 2012 -0700
build: Only build libmesa.la when needed
Namely, for Xlib-GLX, OSMesa, or test programs.
---
configure.ac | 2 ++
src/mesa/Makefile.am | 12 ++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4a59e19..59e8874 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,6 +699,8 @@ if test "x$enable_glx" = xyes -a \
fi
AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes)
+AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
+ "x$enable_osmesa" = xyes)
AC_ARG_ENABLE([shared-glapi],
[AS_HELP_STRING([--enable-shared-glapi],
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 1ac64e6..6964c8a 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -94,7 +94,12 @@ program/lex.yy.c: program/program_lexer.l
$(MKDIR_P) program
$(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
-noinst_LTLIBRARIES = libmesa.la
+noinst_LTLIBRARIES =
+if NEED_LIBMESA
+noinst_LTLIBRARIES += libmesa.la
+else
+check_LTLIBRARIES = libmesa.la
+endif
if HAVE_GALLIUM
noinst_LTLIBRARIES += libmesagallium.la
endif
@@ -145,15 +150,14 @@ libmesagallium_la_SOURCES = \
libmesagallium_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
libmesagallium_la_LDFLAGS =
+if HAVE_GALLIUM
# Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the library in the current directory.
all-local: $(noinst_LTLIBRARIES)
- ln -f .libs/libmesa.a .
-if HAVE_GALLIUM
ln -f .libs/libmesagallium.a .
endif
-CLEANFILES += libmesa.a libmesagallium.a
+CLEANFILES += libmesagallium.a
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gl.pc
More information about the mesa-commit
mailing list