mutter/tests/tools/Makefile.am
Neil Roberts e5543a658f Make libdisable-npots a bit more portable
Instead of including GL/gl.h directly it now includes cogl/cogl.h
instead which should include the right GL header.

Instead of using dlopen to specifically open libGL it now tries to use
dlsym with RTLD_NEXT. This requires defining _GNU_SOURCE on GNU
systems. If RTLD_NEXT is not available it will try passing NULL which
is unlikely to work but it will at least catch the case where it
returns the wrapper version of glGetString to prevent infinite
recursion.

This should hopefully make it work on OS X where the name of the
header and library are different (although this is currently
untested).
2009-01-05 17:11:44 +00:00

29 lines
620 B
Makefile

lib_LTLIBRARIES =
if HAVE_LIBDL
lib_LTLIBRARIES += libdisable-npots.la
endif
libdisable_npots_la_SOURCES = disable-npots.c
libdisable_npots_la_LIBADD = -ldl
INCLUDES = \
-I$(top_srcdir)/clutter \
-I$(top_builddir)/clutter \
$(CLUTTER_CFLAGS) \
-D_GNU_SOURCE
all-local : disable-npots.sh
clean-local :
rm -f disable-npots.sh
disable-npots.sh : $(top_builddir)/tests/tools/disable-npots.sh.in
sed 's|--builddir--|'`cd '$(top_builddir)' && pwd`'|' < $< > $@ && \
chmod 755 disable-npots.sh
EXTRA_DIST = README disable-npots.sh.in