diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2006-01-13 12:36:05 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2006-01-13 12:36:05 +0000 |
commit | c9bc0489a4a17dc6fe0281ea2749755147072e03 (patch) | |
tree | c49d6c76edffbfe54030f3d083e8499547ee12eb | |
parent | aa375c19225045c8fb75d610149daba10454a8e5 (diff) |
adding version and compiler flag to template
Original commit message from CVS:
adding version and compiler flag to template
m--------- | common | 0 | ||||
-rw-r--r-- | gst-plugin/Makefile.am | 4 | ||||
-rw-r--r-- | gst-plugin/configure.ac | 16 | ||||
-rw-r--r-- | gst-plugin/m4/Makefile.am | 1 | ||||
-rw-r--r-- | gst-plugin/m4/as-compiler-flag.m4 | 25 |
5 files changed, 44 insertions, 2 deletions
diff --git a/common b/common -Subproject 4edc214072fe07d2aade96bc336493425654d7b +Subproject e0b121388ece524c0b7035a72bddd191d122d8b 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]) +]) + |