diff --git a/configure.ac b/configure.ac index ff927c6..278a0d6 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,10 @@ AX_CHECK_COMPILE_FLAG([-Werror=missing-prototypes], [CFLAGS="$CFLAGS AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"]) AX_CHECK_COMPILE_FLAG([-Werror=int-to-pointer-cast], [CFLAGS="$CFLAGS -Werror=int-to-pointer-cast"]) +AX_GCC_FUNC_ATTRIBUTE([visibility]) +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [VISIBILITY_CFLAGS="-fvisibility=hidden"]) + + AC_MSG_CHECKING([for native Win32]) case "$host_os" in *mingw*|*cygwin*) @@ -145,6 +149,15 @@ AS_IF([test "x$epoxy_has_glx" = "x1" && test "x$enable_glx" != "xno"], [ AM_CONDITIONAL([HAVE_EPOXY_GLX], [test "x$epoxy_has_glx" = "xyes"]) AC_SUBST([DEFINES]) + +case "$host_os" in +cygwin*) + VISIBILITY_CFLAGS="" + ;; +esac + +AC_SUBST([VISIBILITY_CFLAGS]) + AC_CONFIG_FILES([ virglrenderer.pc Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 592f0fb..0aa7c77 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,7 +4,7 @@ if BUILD_TESTS AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/gallium/include $(CHECK_CFLAGS) -I$(top_srcdir)/src/gallium/auxiliary $(DEFINES) -TEST_LIBS = libvrtest.la $(top_builddir)/src/libvirglrenderer.la $(CHECK_LIBS) +TEST_LIBS = libvrtest.la $(top_builddir)/src/gallium/auxiliary/libgallium.la $(top_builddir)/src/libvirglrenderer.la $(CHECK_LIBS) run_tests = test_virgl_init test_virgl_transfer test_virgl_resource test_virgl_cmd diff --git a/vtest/Makefile.am b/vtest/Makefile.am index e60956e..caaa4d7 100644 --- a/vtest/Makefile.am +++ b/vtest/Makefile.am @@ -24,4 +24,4 @@ virgl_test_server_SOURCES = \ vtest_protocol.h \ vtest.h -virgl_test_server_LDADD = $(top_builddir)/src/libvirglrenderer.la +virgl_test_server_LDADD = $(top_builddir)/src/gallium/auxiliary/libgallium.la $(top_builddir)/src/libvirglrenderer.la