summaryrefslogtreecommitdiff
path: root/gst-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'gst-plugin')
-rw-r--r--gst-plugin/Makefile.am4
-rw-r--r--gst-plugin/configure.ac16
-rw-r--r--gst-plugin/m4/Makefile.am1
-rw-r--r--gst-plugin/m4/as-compiler-flag.m425
4 files changed, 44 insertions, 2 deletions
diff --git a/gst-plugin/Makefile.am b/gst-plugin/Makefile.am
index af437a6..538a4b1 100644
--- a/gst-plugin/Makefile.am
+++ b/gst-plugin/Makefile.am
@@ -1 +1,3 @@
-SUBDIRS = src
+SUBDIRS = m4 src
+
+EXTRA_DIST = autogen.sh
diff --git a/gst-plugin/configure.ac b/gst-plugin/configure.ac
index 19b826f..126c99d 100644
--- a/gst-plugin/configure.ac
+++ b/gst-plugin/configure.ac
@@ -20,6 +20,17 @@ dnl check for tools
AC_PROG_CC
AC_PROG_LIBTOOL
+dnl decide on error flags
+AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
+
+if test "x$GST_WALL" = "xyes"; then
+ GST_ERROR="$GST_ERROR -Wall"
+
+ if test "x$GST_CVS" = "xyes"; then
+ AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
+ fi
+fi
+
dnl Check for pkgconfig first
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
@@ -43,6 +54,9 @@ if test "x$HAVE_GST" = "xno"; then
AC_MSG_ERROR(you need gstreamer development packages installed !)
fi
+dnl append GST_ERROR cflags to GST_CFLAGS
+GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
+
dnl make GST_CFLAGS and GST_LIBS available
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_LIBS)
@@ -71,5 +85,5 @@ dnl set proper LDFLAGS for plugins
GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
AC_SUBST(GST_PLUGIN_LDFLAGS)
-AC_OUTPUT(Makefile src/Makefile)
+AC_OUTPUT(Makefile m4/Makefile src/Makefile)
diff --git a/gst-plugin/m4/Makefile.am b/gst-plugin/m4/Makefile.am
new file mode 100644
index 0000000..4a44032
--- /dev/null
+++ b/gst-plugin/m4/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST = as-version.m4 as-compiler-flag.m4
diff --git a/gst-plugin/m4/as-compiler-flag.m4 b/gst-plugin/m4/as-compiler-flag.m4
new file mode 100644
index 0000000..2f0ba19
--- /dev/null
+++ b/gst-plugin/m4/as-compiler-flag.m4
@@ -0,0 +1,25 @@
+dnl as-compiler-flag.m4 0.0.1
+dnl autostars m4 macro for detection of compiler flags
+dnl
+dnl ds@schleef.org
+
+AC_DEFUN([AS_COMPILER_FLAG],
+[
+ AC_MSG_CHECKING([to see if compiler understands $1])
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+
+ AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
+ CFLAGS="$save_CFLAGS"
+
+ if test "X$flag_ok" = Xyes ; then
+ $2
+ true
+ else
+ $3
+ true
+ fi
+ AC_MSG_RESULT([$flag_ok])
+])
+