Xlib-GLX and OSMesa support static building.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53962
;;
esac
+AM_CONDITIONAL(BUILD_SHARED, test "x$enable_shared" = xyes)
+
dnl
dnl mklib options
dnl
$(top_builddir)/src/mesa/libmesa.la \
$(top_builddir)/src/mapi/glapi/libglapi.la
+if BUILD_SHARED
# Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree.
all-local: lib@OSMESA_LIB@.la
$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
ln -f .libs/lib@OSMESA_LIB@.so $(top_builddir)/$(LIB_DIR)/lib@OSMESA_LIB@.so;
ln -f .libs/lib@OSMESA_LIB@.so.@VERSION@ $(top_builddir)/$(LIB_DIR)/lib@OSMESA_LIB@.so.@VERSION@;
+endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = osmesa.pc
-no-undefined \
$(GL_LIB_DEPS)
+if BUILD_SHARED
# Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree.
all-local: lib@GL_LIB@.la
$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
ln -f .libs/lib@GL_LIB@.so.$(GL_MAJOR).$(GL_MINOR).$(GL_PATCH) $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so.$(GL_MAJOR)
ln -sf lib@GL_LIB@.so.$(GL_MAJOR) $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so
+endif