eglglessink: Integrate into the build system
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 18 Oct 2012 12:07:07 +0000 (14:07 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 18 Oct 2012 12:35:49 +0000 (14:35 +0200)
Conflicts:
ext/Makefile.am

configure.ac
ext/Makefile.am
ext/eglgles/Makefile.am

index 06e7da5225ba7c6c8d253775aaab13c579289fc7..d6904c2bf250ba0720e8b03c25d9057eadcf971b 100644 (file)
@@ -1522,6 +1522,36 @@ AG_GST_CHECK_FEATURE(RSVG, [rsvg decoder], rsvg, [
   AC_SUBST(RSVG_LIBS)
 ])
 
+dnl *** eglgles ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_EGLGLES, true)
+AG_GST_CHECK_FEATURE(EGLGLES, [eglgles sink], eglgles, [
+  HAVE_EGLGLES="no"
+  PKG_CHECK_MODULES(EGLGLES, egl glesv2, HAVE_EGLGLES="yes", [
+    HAVE_EGLGLES="no"
+    old_LIBS=$LIBS
+    old_CFLAGS=$CFLAGS
+    AC_CHECK_LIB([GLESv2], [glEnable],
+      [
+        AC_CHECK_HEADER([GLES2/gl2.h],
+          [
+            AC_CHECK_LIB([EGL], [eglGetProcAddress],
+              [
+                AC_CHECK_HEADER([EGL/egl.h],
+                  [
+                    HAVE_EGLGLES="yes"
+                    EGLGLES_LIBS="-lGLESv2 -lEGL"
+                    EGLGLES_CFLAGS=""
+                  ])
+              ])
+          ])
+      ])
+    LIBS=$old_LIBS
+    CFLAGS=$old_CFLAGS
+  ])
+  AC_SUBST(EGLGLES_CFLAGS)
+  AC_SUBST(EGLGLES_LIBS)
+])
+
 dnl *** timidity ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
@@ -2116,6 +2146,7 @@ ext/dirac/Makefile
 ext/directfb/Makefile
 ext/wayland/Makefile
 ext/dts/Makefile
+ext/eglgles/Makefile
 ext/faac/Makefile
 ext/faad/Makefile
 ext/flite/Makefile
index 74b7b0ecfdbc506ef24c70b1502db9aef28e9c64..68c347ecf9baf81cefa3c502b66c9e2d1cd9e16b 100644 (file)
@@ -88,6 +88,12 @@ else
 DTS_DIR=
 endif
 
+if USE_EGLGLES
+EGLGLES_DIR=eglgles
+else
+EGLGLES_DIR=
+endif
+
 if USE_RESINDVD
  RESINDVD_DIR = resindvd
 else
@@ -379,6 +385,7 @@ SUBDIRS=\
        $(WAYLAND_DIR) \
        $(DTS_DIR) \
        $(RESINDVD_DIR) \
+       $(EGLGLES_DIR) \
        $(FAAC_DIR) \
        $(FAAD_DIR) \
        $(FLITE_DIR) \
@@ -446,6 +453,7 @@ DIST_SUBDIRS = \
        libmms \
        lv2 \
        dts \
+       eglgles \
        modplug \
        mimic \
        mpeg2enc \
index af79dfd57c138bfc0fc32fc624f53e6ab95ffc62..2573247abe61d9bde25379cbdbaede96b1c90916 100644 (file)
@@ -14,8 +14,6 @@ libgsteglglessink_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
        -lgstinterfaces-$(GST_MAJORMINOR)
 
 libgsteglglessink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-if !GST_PLUGIN_BUILD_STATIC
 libgsteglglessink_la_LIBTOOLFLAGS = --tag=disable-static
-endif
 
 noinst_HEADERS = gsteglglessink.h video_platform_wrapper.h