nixpkgs-suyu/pkgs/development/libraries/mesa/static-gallium.patch
2014-03-21 10:34:19 +01:00

64 lines
1.6 KiB
Diff

117-static-gallium.patch from Ubuntu Trusty
diff --git a/configure.ac b/configure.ac
index b9fcb0b..be89843 100644
--- a/configure.ac
+++ b/configure.ac
@@ -747,6 +747,19 @@ if test "x$enable_shared_glapi" = xyes; then
fi
AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes)
+AC_ARG_ENABLE([shared-gallium],
+ [AS_HELP_STRING([--enable-shared-gallium],
+ [Enable shared gallium core @<:@default=yes@:>@])],
+ [enable_shared_gallium="$enableval"],
+ [enable_shared_gallium=yes])
+
+SHARED_GALLIUM="0"
+if test "x$enable_shared_gallium" = xyes; then
+ SHARED_GALLIUM="1"
+fi
+AC_SUBST([SHARED_GALLIUM])
+AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test $SHARED_GALLIUM = 1)
+
dnl
dnl Driver specific build directories
dnl
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
index f14279b..3cdec83 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -3,14 +3,19 @@ AUTOMAKE_OPTIONS = subdir-objects
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
-noinst_LTLIBRARIES = libgallium.la
-
AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary/util \
- $(GALLIUM_CFLAGS) \
- $(VISIBILITY_CFLAGS)
+ $(GALLIUM_CFLAGS)
-AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
+AM_CXXFLAGS =
+
+if HAVE_SHARED_GALLIUM
+lib_LTLIBRARIES = libgallium.la
+else
+noinst_LTLIBRARIES = libgallium.la
+AM_CFLAGS += $(VISIBILITY_CFLAGS)
+AM_CXXFLAGS += $(VISIBILITY_CXXFLAGS)
+endif
libgallium_la_SOURCES = \
$(C_SOURCES) \
@@ -29,6 +34,8 @@ if LLVM_NEEDS_FNORTTI
AM_CXXFLAGS += -fno-rtti
+libgallium_la_LIBADD = $(LLVM_LIBS)
+
endif
libgallium_la_SOURCES += \