build: Only build libmesagallium.la if building Gallium
authorMatt Turner <mattst88@gmail.com>
Fri, 17 Aug 2012 22:51:59 +0000 (15:51 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 22 Aug 2012 18:08:06 +0000 (11:08 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
configure.ac
src/mesa/Makefile.am

index efd5d648912a2af505dd02938068dff8c792426b..306188b9b0fe240fb35dec1ce69fcea3ba4e97ac 100644 (file)
@@ -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])
index f1cd6d67c6e788b37873e22ec5507fe10ad8af36..3b5ef24c0edc59f9018b59bd5023909e89cc6811 100644 (file)
@@ -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