[gstreamermm/devel-other-plugins] build: autogenerate gstreamermm-plugins-bad.h header



commit 881853af661df689b8db3aa2f0b057ecd8782eed
Author: Marcin Kolny <marcin kolny flytronic pl>
Date:   Wed Jul 29 14:53:53 2015 +0200

    build: autogenerate gstreamermm-plugins-bad.h header
    
        * .gitignore: add autogenerated file to ignore list
        * Makefile.am: conditionally add gstreamermm-plugins-bad.h file to
          installed headers list.
        * build/gstreamermm.m4: share info about enabled modules with
          preprocessor.
        * configure.ac: gstreamermm-plugins-bad.h as config header file.
        * gst-plugins-bad/gstreamermm/plugins-bad.h.in: add input header file
          for gstreamermm-plugins-bad module.

 .gitignore                                   |    1 +
 Makefile.am                                  |    5 +++--
 build/gstreamermm.m4                         |    2 +-
 configure.ac                                 |    2 +-
 gst-plugins-bad/gstreamermm-plugins-bad.h.in |   14 ++++++++++++++
 5 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6067323..e1109e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -500,6 +500,7 @@ gstreamer/src/xvimagesink.ccg
 gstreamer/src/xvimagesink.hg
 
 #gst-plugins-bad/
+gst-plugins-bad/gstreamermm-plugins-bad.h
 gst-plugins-bad/gstreamermm-plugins-bad/glbasefilter.cc
 gst-plugins-bad/gstreamermm-plugins-bad/glbasefilter.h
 gst-plugins-bad/gstreamermm-plugins-bad/glfilter.cc
diff --git a/Makefile.am b/Makefile.am
index b6e11b9..6daa93c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal
 EXTRA_DIST =  tests/plugins/test-foo.h tests/regression/utils.h tests/regression/pluginbin.h 
tests/resources/input-image.png
 srcmm_subdirs = gstreamer/gstreamermm
 pkgconfig_files = gstreamer/$(GSTREAMERMM_MODULE_NAME).pc
+gstreamermm_include_HEADERS = gstreamer/gstreamermm.h
 
 if MAINTAINER_MODE
 src_subdirs = gstreamer/src
@@ -36,14 +37,14 @@ if MAINTAINER_MODE
 src_subdirs += gst-plugins-bad/src
 endif # MAINTAINER_MODE
 srcmm_subdirs += gst-plugins-bad/gstreamermm-plugins-bad
-pkgconfig_files +=  gst-plugins-bad/$(GSTREAMERMM_PLUGINS_BAD_MODULE_NAME).pc
+pkgconfig_files += gst-plugins-bad/$(GSTREAMERMM_PLUGINS_BAD_MODULE_NAME).pc
+gstreamermm_include_HEADERS += gst-plugins-bad/gstreamermm-plugins-bad.h
 endif #ENABLE_PLUGINS_BAD
 
 SUBDIRS = tools $(src_subdirs) $(srcmm_subdirs) \
           tests examples $(doc_subdirs)
 
 gstreamermm_includedir = $(includedir)/$(GSTREAMERMM_MODULE_NAME)
-gstreamermm_include_HEADERS = gstreamer/gstreamermm.h
 gstreamermm_libincludedir = $(libdir)/$(GSTREAMERMM_MODULE_NAME)/include
 nodist_gstreamermm_libinclude_HEADERS = gstreamer/gstreamermmconfig.h
 
diff --git a/build/gstreamermm.m4 b/build/gstreamermm.m4
index 3d8035a..9a28084 100644
--- a/build/gstreamermm.m4
+++ b/build/gstreamermm.m4
@@ -37,9 +37,9 @@ AC_DEFUN([FIND_GST_MODULE],
   fi
 
   gstmm_$3_version=$(pkg-config --modversion gstreamer-[$2]-1.0)
-
   AS_IF([test "x$enable_$3" = "xno" || test "$tst" != xyes], [gstmm_enable_$3=no])
   AM_CONDITIONAL([ENABLE_$1], [test "x$gstmm_enable_$3" = xyes])
+  AS_IF([test "x$gstmm_enable_$3" = xyes], [AC_DEFINE(ENABLE_$1, [], [Enable gstreamer-$2 module])])
 ])
 
 ## Arguments:
diff --git a/configure.ac b/configure.ac
index 7ef603a..9c942af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ AC_PREREQ([2.59])
 AC_CONFIG_SRCDIR([gstreamer/gstreamermm.h])
 AC_CONFIG_AUX_DIR([build])
 AC_CONFIG_MACRO_DIR([build])
-AC_CONFIG_HEADERS([config.h gstreamer/gstreamermmconfig.h])
+AC_CONFIG_HEADERS([config.h gstreamer/gstreamermmconfig.h gst-plugins-bad/gstreamermm-plugins-bad.h])
 
 MM_PREREQ([0.9.6])
 MM_INIT_MODULE([gstreamermm-1.0])
diff --git a/gst-plugins-bad/gstreamermm-plugins-bad.h.in b/gst-plugins-bad/gstreamermm-plugins-bad.h.in
new file mode 100644
index 0000000..f68965e
--- /dev/null
+++ b/gst-plugins-bad/gstreamermm-plugins-bad.h.in
@@ -0,0 +1,14 @@
+/* This is part of gstreamermm */
+
+#ifndef _GSTREAMERMM_PLUGINS_BAD_H
+#define _GSTREAMERMM_PLUGINS_BAD_H
+
+/* Enable gstreamer-gl module */
+#undef ENABLE_GSTREAMERMM_GL
+
+#ifdef ENABLE_GSTREAMERMM_GL
+#include <gstreamermm-plugins-bad/glbasefilter.h>
+#include <gstreamermm-plugins-bad/glfilter.h>
+#endif
+
+#endif /* _GSTREAMERMM_PLUGINS_BAD_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]