-cdata.set('VERSION', '"@0@"'.format(gst_version))
-cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
-cdata.set('GST_LICENSE', '"LGPL"')
-cdata.set('PACKAGE', '"gst-plugins-good"')
-cdata.set('GETTEXT_PACKAGE', '"gst-plugins-good-1.0"')
-cdata.set('PACKAGE_NAME', '"GStreamer Good Plug-ins"')
-cdata.set('GST_PACKAGE_NAME', '"GStreamer Good Plug-ins"')
-cdata.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"') # FIXME: make configurable
+cdata.set_quoted('VERSION', gst_version)
+cdata.set_quoted('PACKAGE_VERSION', gst_version)
+cdata.set_quoted('GST_LICENSE', 'LGPL')
+cdata.set_quoted('PACKAGE', 'gst-plugins-good')
+cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-good-1.0')
+cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
+
+warning_flags = [
+ '-Wmissing-declarations',
+ '-Wredundant-decls',
+ '-Wwrite-strings',
+ '-Winit-self',
+ '-Wmissing-include-dirs',
+ '-Wno-multichar',
+ '-Wvla',
+ '-Wpointer-arith',
+]
+
+warning_c_flags = [
+ '-Wmissing-prototypes',
+ '-Wdeclaration-after-statement',
+ '-Wold-style-definition',
+ '-Waggregate-return',
+]
+
+if have_cxx
+ cxx = meson.get_compiler('cpp')
+endif
+
+foreach extra_arg : warning_flags
+ if cc.has_argument (extra_arg)
+ add_project_arguments([extra_arg], language: 'c')
+ endif
+ if have_cxx and cxx.has_argument (extra_arg)
+ add_project_arguments([extra_arg], language: 'cpp')
+ endif
+endforeach
+
+foreach extra_arg : warning_c_flags
+ if cc.has_argument (extra_arg)
+ add_project_arguments([extra_arg], language: 'c')
+ endif
+endforeach
+
+# GStreamer package name and origin url
+gst_package_name = get_option('package-name')
+if gst_package_name == ''
+ if gst_version_nano == 0
+ gst_package_name = 'GStreamer Good Plug-ins source release'
+ elif gst_version_nano == 1
+ gst_package_name = 'GStreamer Good Plug-ins git'
+ else
+ gst_package_name = 'GStreamer Good Plug-ins prerelease'
+ endif
+endif
+cdata.set_quoted('GST_PACKAGE_NAME', gst_package_name)
+cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))