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

Author: Matt Turner <[email protected]>
Date:   Fri Aug 17 15:51:59 2012 -0700

build: Only build libmesagallium.la if building Gallium

Reviewed-by: Kenneth Graunke <[email protected]>

---

 configure.ac         |    1 +
 src/mesa/Makefile.am |    9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index efd5d64..306188b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1530,6 +1530,7 @@ dnl
 if test "x$with_gallium_drivers" != x; then
     SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
 fi
+AM_CONDITIONAL(HAVE_GALLIUM, test "x$with_gallium_drivers" != x)
 
 AC_SUBST([LLVM_BINDIR])
 AC_SUBST([LLVM_CFLAGS])
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index f1cd6d6..3b5ef24 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -92,7 +92,10 @@ program/lex.yy.c: program/program_lexer.l
        $(MKDIR_P) program
        $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
 
-noinst_LTLIBRARIES = libmesa.la libmesagallium.la
+noinst_LTLIBRARIES = libmesa.la
+if HAVE_GALLIUM
+noinst_LTLIBRARIES += libmesagallium.la
+endif
 
 SRCDIR = $(top_srcdir)/src/mesa/
 BUILDDIR = $(top_builddir)/src/mesa/
@@ -142,9 +145,11 @@ libmesagallium_la_LDFLAGS =
 
 # 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: libmesa.la libmesagallium.la
+all-local: $(noinst_LTLIBRARIES)
        ln -f .libs/libmesa.a .
+if HAVE_GALLIUM
        ln -f .libs/libmesagallium.a .
+endif
 
 CLEANFILES += libmesa.a libmesagallium.a
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to