diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-05-30 13:09:25 +0400 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-05-30 13:28:33 +0400 |
commit | 6bd61f861ca18e523cbd7e0993ea78cee28cff1b (patch) | |
tree | 16a6b41f192885508b5efd26fd220c0d16843ec4 /configure.ac | |
parent | 0fdc918350e2cef2cb2a871815733bfbaf7e25f9 (diff) |
configure: Add OBJC specific compiler flags
See bug #643939.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index f88295675..77ecae513 100644 --- a/configure.ac +++ b/configure.ac @@ -112,7 +112,7 @@ dnl determine c++ preprocessor dnl FIXME: do we need this ? AC_PROG_CXXCPP -AS_PROG_OBJC +AC_PROG_OBJC dnl check if the compiler supports '-c' and '-o' options AM_PROG_CC_C_O @@ -280,22 +280,11 @@ AG_GST_CHECK_GST_DEBUG_DISABLED([NO_WARNINGS="-Wno-unused"], [NO_WARNINGS=""]) dnl define an ERROR_CFLAGS Makefile variable dnl -Wundef: too many broken headers -if test "x$HAVE_OSX_VIDEO" != "xyes"; then - AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [ - -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls - -Wwrite-strings -Wold-style-definition -Waggregate-return - -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 -Wold-style-definition - -Winit-self -Wmissing-include-dirs -Wno-multichar - -Wnested-externs $NO_WARNINGS]) -fi +AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [ + -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls + -Wwrite-strings -Wold-style-definition -Waggregate-return + -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar + -Wnested-externs $NO_WARNINGS]) dnl define an ERROR_CXXFLAGS Makefile variable AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [ @@ -304,6 +293,13 @@ AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [ -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 -Wmissing-prototypes -Wredundant-decls + -Wwrite-strings -Wold-style-definition + -Winit-self -Wmissing-include-dirs -Wno-multichar + -Wnested-externs $NO_WARNINGS]) + dnl define correct level for debugging messages AG_GST_SET_LEVEL_DEFAULT($GST_GIT) @@ -1011,12 +1007,14 @@ else fi AC_SUBST(DEPRECATED_CFLAGS) -dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden +dnl every flag in GST_OPTION_CFLAGS, GST_OPTION_CXXFLAGS and GST_OPTION_OBJCFLAGS 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 our libraries need to be versioned correctly AC_SUBST(GST_LT_LDFLAGS) @@ -1027,9 +1025,11 @@ dnl also add builddir include for enumtypes and marshal dnl add ERROR_CFLAGS, but overridable GST_CFLAGS="$GST_CFLAGS -DGST_USE_UNSTABLE_API" GST_CXXFLAGS="-I\$(top_srcdir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS)" +GST_OBJCFLAGS="-I\$(top_srcdir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS)" GST_CFLAGS="-I\$(top_srcdir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS)" AC_SUBST(GST_CFLAGS) AC_SUBST(GST_CXXFLAGS) +AC_SUBST(GST_OBJCFLAGS) AC_SUBST(GST_LIBS) dnl LDFLAGS really should only contain flags, not libs - they get added before |