From e58e98feee46d9862fcac985f3e5b91a3f770b61 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 13 Dec 2013 16:59:49 -0800 Subject: [PATCH] Fix the behavior of glx_shared_znow if it doesn't die at startup. We're sharing the source file with glx_static, but we don't want to SKIP due to not being statically linked. --- test/Makefile.am | 1 + test/glx_static.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/test/Makefile.am b/test/Makefile.am index 43be8e5..1b774a1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -107,6 +107,7 @@ glx_glxgetprocaddress_nocontext_DEPENDENCIES = $(EPOXY) libglx_common.la glx_has_extension_nocontext_LDFLAGS = $(X11_LIBS) $(EPOXY) libglx_common.la glx_has_extension_nocontext_DEPENDENCIES = $(EPOXY) libglx_common.la +glx_static_CFLAGS = -DNEEDS_TO_BE_STATIC glx_static_LDFLAGS = -ldl $(X11_LIBS) -static $(EPOXY) libglx_common.la glx_static_DEPENDENCIES = $(EPOXY) libglx_common.la diff --git a/test/glx_static.c b/test/glx_static.c index 981435f..d528a60 100644 --- a/test/glx_static.c +++ b/test/glx_static.c @@ -48,10 +48,12 @@ main(int argc, char **argv) bool pass = true; int val; +#if NEEDS_TO_BE_STATIC if (dlsym(NULL, "epoxy_glCompileShader")) { fprintf(stderr, "glx_static requires epoxy built with --enable-static\n"); return 77; } +#endif Display *dpy = get_display_or_skip(); make_glx_context_current_or_skip(dpy);