summary refs log tree commit diff
path: root/pkgs/development/libraries/mesa/static-gallium.patch
blob: bb3f60eaf88a24bc56149d810b2b3a3ce6770e22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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 += \