cdata.set('SIZEOF_SHORT', cc.sizeof('short'))
cdata.set('SIZEOF_VOIDP', cc.sizeof('void*'))
-cdata.set('VERSION', '"@0@"'.format(gst_version))
-cdata.set('PACKAGE', '"gst-plugins-ugly"')
-cdata.set('GETTEXT_PACKAGE', '"gst-plugins-ugly-1.0"')
-cdata.set('GST_LICENSE', '"LGPL"')
+cdata.set_quoted('VERSION', gst_version)
+cdata.set_quoted('PACKAGE', 'gst-plugins-ugly')
+cdata.set_quoted('GST_LICENSE', 'LGPL')
+cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-ugly-1.0')
+cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
+if get_option('nls')
+ cdata.set('ENABLE_NLS', 1)
+endif
# GStreamer package name and origin url
gst_package_name = get_option('package-name')
subdir('tests')
# xgettext is optional (on Windows for instance)
-if find_program('xgettext', required : false).found()
+if get_option('nls') and find_program('xgettext', required : false).found()
subdir('po')
endif
description : 'Colon separated list of additional x264 library paths, e.g. for 10-bit version')
# Common options
+option('nls', type : 'boolean', value : true, yield: true,
+ description : 'Enable native language support (translations)')
option('package-name', type : 'string', yield : true,
description : 'package name to use in plugins')
option('package-origin', type : 'string', value : 'Unknown package origin', yield: true,