diff --git a/clutter/Makefile.am b/clutter/Makefile.am index cb0a6c0ef..71ab39271 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -20,7 +20,7 @@ DISTCLEANFILES = EXTRA_DIST = BUILT_SOURCES = -if WINSYS_WIN32 +if SUPPORT_WIN32 # Ideally this resources stuff would go in win32/ but libtool doesn't # seem to pass on the -Wl argument when linking a convenience library @@ -35,7 +35,7 @@ win32/resources.o : $(srcdir)/win32/invisible-cursor.cur win32_resources = win32/resources.o win32_resources_ldflag = -Wl,win32/resources.o -endif # WINSYS_WIN32 +endif # SUPPORT_WIN32 INCLUDES = \ -I$(top_srcdir) \ diff --git a/clutter/cogl/cogl/Makefile.am b/clutter/cogl/cogl/Makefile.am index 058551d77..43934ad33 100644 --- a/clutter/cogl/cogl/Makefile.am +++ b/clutter/cogl/cogl/Makefile.am @@ -71,20 +71,8 @@ cogl_public_h = \ $(srcdir)/cogl.h \ $(NULL) -# windowing system; all sources have to be distributed, but we'll -# compile just the one we need -cogl_winsys_sources = \ - $(srcdir)/winsys/cogl-eglnative.c \ - $(srcdir)/winsys/cogl-eglx.c \ - $(srcdir)/winsys/cogl-glx.c \ - $(srcdir)/winsys/cogl-osx.c \ - $(srcdir)/winsys/cogl-sdl.c \ - $(srcdir)/winsys/cogl-win32.c \ - $(NULL) - cogl_sources_c = \ $(srcdir)/winsys/cogl-winsys.h \ - $(srcdir)/winsys/cogl-@COGL_WINSYS@.c \ $(srcdir)/cogl-handle.h \ $(srcdir)/cogl-context.h \ $(srcdir)/cogl-context.c \ @@ -161,7 +149,31 @@ libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) $(top_builddir)/clutter/cogl/cog libclutter_cogl_la_SOURCES = $(BUILT_SOURCES) $(cogl_sources_c) -EXTRA_DIST += $(cogl_winsys_sources) +if SUPPORT_GLX +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-glx.c +endif +if SUPPORT_EGL_PLATFORM_POWERVR_X11 +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-eglx.c +endif +if SUPPORT_EGL_PLATFORM_POWERVR_NULL +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-eglnative.c +endif +if SUPPORT_EGL_PLATFORM_FRUITY +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-fruity.c +endif +if SUPPORT_WIN32 +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-win32.c +endif +if SUPPORT_OSX +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-osx.c +endif + EXTRA_DIST += stb_image.c # COGL installed headers diff --git a/configure.ac b/configure.ac index 2b103f31a..6b4507315 100644 --- a/configure.ac +++ b/configure.ac @@ -351,7 +351,21 @@ AS_CASE([$CLUTTER_WINSYS], [AC_MSG_ERROR([Invalid backend for Clutter: use glx, osx, win32, eglx, eglnative or fruity])] ) -AM_CONDITIONAL(WINSYS_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"]) +# winsys conditionals for use in automake files... +AM_CONDITIONAL(SUPPORT_GLX, [test "x$CLUTTER_WINSYS" = "xglx"]) +AM_CONDITIONAL(SUPPORT_X11, [test "x$CLUTTER_WINSYS" = "xglx" -o \ + "x$CLUTTER_WINSYS" = "xeglx"]) +AM_CONDITIONAL(SUPPORT_XLIB, [test "x$CLUTTER_WINSYS" = "xglx" -o \ + "x$CLUTTER_WINSYS" = "xeglx"]) +AM_CONDITIONAL(SUPPORT_EGL, + [test "x$CLUTTER_WINSYS" = "xeglx" -o \ + "x$CLUTTER_WINSYS" = "xeglnative" -o \ + "x$CLUTTER_WINSYS" = "xfruity"]) +AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_X11, [test "x$CLUTTER_WINSYS" = "xeglx"]) +AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_NULL, [test "x$CLUTTER_WINSYS" = "xeglnative"]) +AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_FRUITY, [test "x$CLUTTER_WINSYS" = "xfruity"]) +AM_CONDITIONAL(SUPPORT_OSX, [test "x$CLUTTER_WINSYS" = "xosx"]) +AM_CONDITIONAL(SUPPORT_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"]) # at this point we must have a GL header to check AS_IF([test "x$clutter_gl_header" = "x"], [AC_MSG_ERROR([Internal error: no GL header set])])