summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-05-30 11:24:06 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-05-30 11:28:53 +0200
commitdf5f39658fdf58f3a84e847ff555c5ba128a616f (patch)
tree1c9aef11723662996bd3425ffbf3369c6e320a58 /configure.ac
parent8adceb9808f0ec0715e05554d7275a41f2b1d5ce (diff)
downloadgstreamer-plugins-bad-df5f39658fdf58f3a84e847ff555c5ba128a616f.tar.gz
configure: Add OBJC specific compiler flags
See bug #643939.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac35
1 files changed, 29 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 59b50f043..d831f9183 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,7 +114,7 @@ AC_PROG_CXX
dnl determine if c++ is available on this system
AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
-AS_PROG_OBJC
+AC_PROG_OBJC
dnl check if the compiler supports '-c' and '-o' options
AM_PROG_CC_C_O
@@ -283,11 +283,22 @@ AG_GST_CHECK_GST_DEBUG_DISABLED([NO_WARNINGS="-Wno-unused"], [NO_WARNINGS=""])
dnl define an ERROR_CFLAGS Makefile variable
dnl -Waggregate-return - libexif returns aggregates
dnl -Wundef - Windows headers check _MSC_VER unconditionally
-AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
- -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
- -Wwrite-strings -Wformat-security -Wold-style-definition
- -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar
- -Wnested-externs $NO_WARNINGS])
+if test "x$HAVE_APPLE_MEDIA" != "xyes"; then
+ AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
+ -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
+ -Wwrite-strings -Wformat-security -Wold-style-definition
+ -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar
+ -Wnested-externs $NO_WARNINGS])
+else
+ dnl work-around for us passing GST_CFLAGS to the ObjC-compiler, which
+ dnl doesn't understand all warning flags that the C compiler knows about
+ dnl (e.g. -Waddress) or causes problems with some flags (-Waggregate-return)
+ AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
+ -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
+ -Wwrite-strings -Wformat-security -Wold-style-definition
+ -Winit-self -Wmissing-include-dirs -Wno-multichar
+ -Wnested-externs $NO_WARNINGS])
+fi
dnl define an ERROR_CXXFLAGS Makefile variable
AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [
@@ -295,6 +306,12 @@ AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [
-Wwrite-strings -Wformat-nonliteral -Wformat-security
-Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar $NO_WARNINGS])
+dnl define an ERROR_OBJCFLAGS Makefile variable
+AG_GST_SET_ERROR_OBJCFLAGS($FATAL_WARNINGS, [
+ -Wmissing-declarations -Wredundant-decls
+ -Wwrite-strings -Wformat-nonliteral -Wformat-security
+ -Winit-self -Wmissing-include-dirs -Wno-multichar $NO_WARNINGS])
+
dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
@@ -1953,8 +1970,10 @@ dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
dnl at make time with e.g. make ERROR_CFLAGS=""
GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
GST_OPTION_CXXFLAGS="\$(WARNING_CXXFLAGS) \$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
+GST_OPTION_OBJCFLAGS="\$(WARNING_OBJCFLAGS) \$(ERROR_OBJCFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
AC_SUBST(GST_OPTION_CFLAGS)
AC_SUBST(GST_OPTION_CXXFLAGS)
+AC_SUBST(GST_OPTION_OBJCFLAGS)
dnl FIXME: do we want to rename to GST_ALL_* ?
dnl prefer internal headers to already installed ones
@@ -1962,14 +1981,18 @@ dnl also add builddir include for enumtypes and marshal
dnl add GST_OPTION_CFLAGS, but overridable
GST_CFLAGS="$GST_CFLAGS -DGST_USE_UNSTABLE_API"
GST_CXXFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS)"
+GST_OBJCFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_OBJCFLAGS)"
GST_CFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS)"
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_CXXFLAGS)
+AC_SUBST(GST_OBJCFLAGS)
AC_SUBST(GST_LIBS)
GST_PLUGINS_BAD_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
+GST_PLUGINS_BAD_OBJCFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
GST_PLUGINS_BAD_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
AC_SUBST(GST_PLUGINS_BAD_CFLAGS)
AC_SUBST(GST_PLUGINS_BAD_CXXFLAGS)
+AC_SUBST(GST_PLUGINS_BAD_OBJCFLAGS)
dnl LDFLAGS really should only contain flags, not libs - they get added before
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking