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
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, [
-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)
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
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