Commit graph

146 commits

Author SHA1 Message Date
Tim-Philipp Müller 09dac522ca meson: add glib-checks option to disable API guards and such
We want this enabled by default, also in releases, but people
may want to disable this for performance-critical workloads or
on embedded devices.
2018-09-19 11:32:16 +01:00
Nirbheek Chauhan c389c59b22 meson: Maintain macOS ABI through dylib versioning
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library
2018-08-31 14:40:14 +05:30
Nirbheek Chauhan 0a84fae16c meson: host_system is 'ios' when building for iOS
The cross file sets this value, and we use 'ios' in Cerbero.
2018-08-17 02:55:43 +05:30
Tim-Philipp Müller fffc312893 meson: add options to disable gobject cast checks and glib asserts
And match what we do for autotools here currently.
2018-08-11 18:17:29 +01:00
Tim-Philipp Müller e839f312fe meson: define G_DISABLE_DEPRECATED for development versions
Like in autotools.
2018-08-10 09:22:51 +01:00
Tim-Philipp Müller fcbd110810 meson: add memory-alignment option 2018-08-10 00:34:29 +01:00
Tim-Philipp Müller d11450f238 meson: add option to disable command-line option parsing 2018-08-10 00:18:55 +01:00
Tim-Philipp Müller e5ad55d649 meson: add options to disable tests, examples, benchmarks and tools
And remove duplicate option 'poisoning' and unused 'build_tools' one.
2018-08-09 23:32:49 +01:00
Tim-Philipp Müller 69400c9fcf meson: fix setting of extra checks option
It's checked for with #ifdef so setting it to 0 or 1
will always enable it.
2018-08-03 10:36:21 +01:00
Tim-Philipp Müller 463663d4b4 meson: add option to enable poisoning of deallocated objects 2018-08-03 10:35:07 +01:00
Nirbheek Chauhan 09f67fe76a meson: Add feature options for optional deps
Everything should be behind an option now.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 16:14:29 +05:30
Nicolas Dufresne ac83e18323 meson: Install bash completion helper in prefix
A regression was causing the helpers to be installed in /share which
would lead to permission denied error or PolicyKit to promtp for
permission. See:

  054fa3aa2 meson: Use new define_variable: feature instead of run_command()
2018-07-25 18:51:58 -04:00
Nirbheek Chauhan c80a1fd64c meson: host_machine.system() is darwin even on iOS
Also use host_system everywhere.
2018-07-25 16:02:06 +05:30
Nirbheek Chauhan 054fa3aa2e meson: Use new define_variable: feature instead of run_command() 2018-07-25 14:25:59 +05:30
Nirbheek Chauhan 6935d3f1db meson: Small cleanup, unused variable 2018-07-25 14:25:59 +05:30
Nirbheek Chauhan 415e0e68af meson: Use copy: true for configure_file()
Fixes a warning.
2018-07-25 14:25:59 +05:30
Thibault Saunier cc869065a5 meson: Add an option to activate extra checks
And activate them by default as with autotools
2018-05-22 16:31:21 +02:00
Tim-Philipp Müller 724cc53b28 meson: rename gtkdoc option to gtk_doc 2018-05-21 23:10:21 +01:00
Tim-Philipp Müller 661490d60d meson: add 'nls' option to disable translations
And enable by default. Was implicitly disabled because
ENABLE_NLS was not defined.
2018-05-20 14:07:39 +01:00
Nirbheek Chauhan 4fb02fc85b meson: Update option names to omit disable_ and with- prefixes
Also yield common options to the outer project (gst-build in our case)
so that they don't have to be set manually.
2018-05-05 20:30:43 +05:30
Xavier Claessens b00b1d5361 Meson: Use library() to build both static and shared libs
Meson supports building both static and shared libraries in a single
library() call. It has the advantage of reusing the same .o objects and
thus avoid double compilation.

https://bugzilla.gnome.org/show_bug.cgi?id=794627
2018-04-25 00:40:30 +01:00
Xavier Claessens ca3698b9c1 Meson: Fix check for linker args
https://bugzilla.gnome.org/show_bug.cgi?id=795513
2018-04-25 00:40:30 +01:00
Tim-Philipp Müller a7aeaca772 meson: fix invalid keyword argument warnings
cc.compiles() doesn't have a 'prefix' argument (yet) and the
prefix has already been prepended to the source code snippets.

https://github.com/mesonbuild/meson/issues/2364
2018-04-20 12:30:24 +01:00
Tim-Philipp Müller 63e71468d4 meson: bump meson req for gnome.mkenums_simple() 2018-03-22 13:00:21 +00:00
Alessandro Decina cf2be53b24 meson: use gnome.mkenums_simple() to generate controller enumtypes 2018-03-22 12:50:24 +00:00
Tim-Philipp Müller b405b35f8c Back to development 2018-03-20 09:02:34 +00:00
Tim-Philipp Müller 80e0e90d00 Release 1.14.0 2018-03-19 20:09:55 +00:00
Tim-Philipp Müller bc431c2af3 Release 1.13.91 2018-03-13 19:09:04 +00:00
Tim-Philipp Müller 87be91a260 Release 1.13.90 2018-03-03 21:51:58 +00:00
Mathieu Duponchelle 9e44738ae7 meson: -Wformat-* require -Wformat 2018-03-01 18:38:01 +01:00
Mathieu Duponchelle d67623c7a9 meson: enable more warnings
Modeled on the autotools build, -W flags are only
added if the compiler supports them.

https://bugzilla.gnome.org/show_bug.cgi?id=793958
2018-03-01 17:20:48 +01:00
Justin Kim 580e3a799e meson: Use .dylib suffix if darwin
For Mac OS, GST_EXTRA_MODULE_SUFFIX should be set as '.dylib'.
Otherwise, GStreamer fails to load its plugins.

https://bugzilla.gnome.org/show_bug.cgi?id=793584
2018-02-21 14:58:13 +00:00
Tim-Philipp Müller 81a767bbdb Back to development 2018-02-15 19:44:14 +00:00
Tim-Philipp Müller 124f2f566f Release 1.13.1 2018-02-15 16:43:52 +00:00
Tim-Philipp Müller 24f9c2dcb3 meson: make version numbers ints and fix int/string comparison
WARNING: Trying to compare values of different types (str, int).
The result of this is undefined and will become a hard error
in a future Meson release.
2018-02-08 17:22:14 +00:00
Tim-Philipp Müller e1fdb5bf03 meson: use -fno-strict-aliasing if supported
https://bugzilla.gnome.org/show_bug.cgi?id=769183
2018-01-30 20:30:54 +00:00
Tim-Philipp Müller d51ff55af1 meson: skip translations if gettext is not available 2017-12-26 13:46:20 +01:00
Havard Graff fee176d253 meson: remove vs_module_defs
The GST_EXPORT should handle it.
2017-10-05 09:35:41 +01:00
Tim-Philipp Müller be8eb436b2 meson: hide symbols by default unless explicitly exported 2017-08-10 13:34:25 +01:00
Tim-Philipp Müller 24880717cf meson: fix a few warnings 2017-08-07 11:06:58 +01:00
Tim-Philipp Müller d123291183 win32: find plugin scanner in libexecdir subdir as configured
https://bugzilla.gnome.org/show_bug.cgi?id=679115
2017-07-14 16:13:12 +01:00
Nicolas Dufresne 5443ce69ff meson: Fix bashcomp installation
For some reason the double quotes ended up in the path, hence
the helper where installed at "."/share/...
2017-07-11 14:57:36 -04:00
Nicolas Dufresne 4a108c7858 meson: Use join_paths and .set_quoted where possible 2017-07-11 14:57:26 -04:00
Tim-Philipp Müller f28435b0d4 meson: find python3 via python3 module
And rename python3 variable in meson build files for clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=783198
2017-07-07 12:07:09 +01:00
Tim-Philipp Müller a405aedde8 meson: check for ppoll() as well 2017-06-29 09:10:04 +01:00
Thibault Saunier 992c54b774 meson: Allow using glib as a subproject 2017-06-28 09:36:48 -04:00
Tim-Philipp Müller 3683a0753a meson: fix with-package-name option
https://bugzilla.gnome.org/show_bug.cgi?id=784082
2017-06-23 11:11:44 +01:00
Tim-Philipp Müller f6b42d1f56 meson: don't need config.h.meson any more
Meson does the largefile support automatically nowadays, and
can generate a config.h from configuration_data() without a
template as input.
2017-05-21 14:31:56 +01:00
Tim-Philipp Müller fe5111e71d meson: make C++ compiler optional
It's only used to build tests to see if our headers are C++ clean.
2017-05-21 09:02:54 +01:00
Tim-Philipp Müller 4341bd0ba3 meson: add options to set package name and origin
https://bugzilla.gnome.org/show_bug.cgi?id=782172
2017-05-13 18:30:27 +01:00
Tim-Philipp Müller da1d11be77 meson: bump meson version requirement to 0.40.1 2017-05-09 16:29:21 +01:00
Tim-Philipp Müller dcfb222e05 meson: add gst-ptp-helper
https://bugzilla.gnome.org/show_bug.cgi?id=774418
2017-05-05 11:49:08 +01:00
Tim-Philipp Müller 426164348a meson: fix indentation
No tabs please.
2017-05-05 09:10:56 +01:00
Tim-Philipp Müller 3d8d81ecb7 g-i: no need to load registry in g-i scanner 2017-05-04 21:59:48 +01:00
Tim-Philipp Müller ecb0228cf0 meson: install gst-element-check-1.0.m4
https://bugzilla.gnome.org/show_bug.cgi?id=782174
2017-05-04 21:06:21 +01:00
Sebastian Dröge b7062aafc0 Back to development 2017-05-04 18:59:14 +03:00
Sebastian Dröge 7854a65978 Release 1.12.0 2017-05-04 15:36:55 +03:00
Sebastian Dröge a0d2f0a464 Release 1.11.91 2017-04-27 17:24:05 +03:00
Sebastian Dröge dc71c4a477 meson: Add check for glib-mkenums 2017-04-09 12:09:33 +03:00
Sebastian Dröge 47047992fc Release 1.11.90 2017-04-07 16:30:35 +03:00
Nicolas Dufresne 35c4428083 meson: Add bash completion support 2017-04-04 14:46:48 -04:00
Thibault Saunier d6dba3fd6f meson: Add an option to disable usage of libunwind
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=778193
2017-02-24 16:16:23 -03:00
Sebastian Dröge 3a3d688c33 meson: Update version 2017-02-24 15:59:35 +02:00
Tim-Philipp Müller 7a5bde14a1 meson: bump version 2017-01-13 12:34:43 +00:00
Nirbheek Chauhan aefc8007c6 meson: Add several missing features from configure.ac
* -Wl,-Bsymbolic-functions
* HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID
* HAVE_POSIX_TIMERS
* HAVE_MONOTONIC_CLOCK
* HAVE_UINT128_T
* HAVE_LONG_LONG
* HAVE_PROCESS_H
* HAVE_GMP
* HAVE_GSL
* HAVE_DLADDR

Also, don't use prefix for checking functions, and only check msvc
functions on Windows.
2016-12-21 23:51:36 +05:30
Nirbheek Chauhan 77d2774f1b build: Remove unused functions
fgetpos, fsetpos, mmap, posix_memalign. None of these are used anywhere
in the codebase.
2016-12-21 23:51:36 +05:30
Nirbheek Chauhan 97f39cae63 meson: Derive defines from header/function names
This is what Autoconf already does for us, so just do this. Avoids
people making typos while adding header or function checks. Because we
use a config.h.meson, such typos won't even be noticed.

Also, starting from Meson 0.36.0, the XCode 8 workaround that we use for
clock_gettime is no longer needed.
2016-12-21 23:51:36 +05:30
Nirbheek Chauhan 4d179024f0 meson: Don't search for python3 twice 2016-12-17 00:00:11 +05:30
Thibault Saunier bd5d43e8f9 meson: Support building with Gst debug disabled 2016-12-09 17:57:10 -03:00
Nirbheek Chauhan d8e8e92176 libcheck: Update the compatibility code and checks
This brings us up-to-speed with the latest compatibility code from upstream
check git. For completeness, we do all the checks that upstream check does, but
we skip the snprintf/vsnprintf code because it's not straightforward (involves
running code and that is bad for cross-compilation) and not necessary for the
platforms we support anyway.

If someone really wants this, they can uncomment this and copy the relevant
checks from the check git repository.

https://bugzilla.gnome.org/show_bug.cgi?id=775870
2016-12-09 15:31:01 +05:30
Thibault Saunier 469d53edf5 meson: Set default debug level to ERROR when running from git 2016-11-29 10:34:20 -03:00
Ting-Wei Lan ec2e213c50 meson: Support execinfo.h on FreeBSD by using -lexecinfo
FreeBSD supports execinfo.h and backtrace* functions, but
using them requires linking with -lexecinfo.

Requires sufficiently-new meson with #1053 fixed (post-0.36).

https://bugzilla.gnome.org/show_bug.cgi?id=774424
2016-11-25 19:28:04 +00:00
Scott D Phillips 7b29403e06 meson: add_global_arguments -> add_project_arguments
https://bugzilla.gnome.org/show_bug.cgi?id=774656
2016-11-18 09:30:12 +00:00
Thibault Saunier ae608845ca meson: require meson 0.36 and use new pic arg on static libs
Removes a meson warning and some special casing we had.
2016-11-14 19:21:13 +00:00
Scott D Phillips 03286b7b7e meson: don't add_global_arguments when being built as a subproject
https://bugzilla.gnome.org/show_bug.cgi?id=773568
2016-11-11 16:14:55 +00:00
Thibault Saunier c67958aed9 meson: Unset the plugin paths to generate the .gir files
Avoiding problems when using subproject:

    Failed to load plugin 'something.so: file too short
2016-11-04 14:37:43 -03:00
Thibault Saunier a8d4857555 gst: Use libunwind/libdw to generate backtraces if avalaible
Making the gst_debug_print_trace function more generally useful.

API:
  + gst_debug_get_trace

https://bugzilla.gnome.org/show_bug.cgi?id=772555
2016-11-04 14:22:05 -03:00
Tim-Philipp Müller c570df71e5 meson: update version 2016-11-01 18:08:18 +00:00
Nirbheek Chauhan 9154132135 meson: Add an option to explicitly disable gtk-doc
Similar to how Autotools provides an option, default is 'enabled'.
2016-10-25 12:21:07 +05:30
Thibault Saunier c0bfb1b524 Revert "meson: Use the new pic argument on static libs"
This reverts commit a5752240a1.

pic was added after 0.35 and will be present in 0.36 (meson
documentation was wrong).
2016-10-20 17:19:25 -03:00
Thibault Saunier a5752240a1 meson: Use the new pic argument on static libs
We depend on meson 0.35 which makes it simpler to handle

Removes a meson warning
2016-10-20 16:04:42 -03:00
Nirbheek Chauhan c57cb35ae6 build: Apply XCode 8 workaround for iOS too
clock_gettime was also added for iOS 10.0, so don't use it if we're
targetting an older version. That would've caused the symbol to not be
found at runtime on older devices.
2016-10-18 11:24:57 +05:30
Nirbheek Chauhan df5ac34dec meson: Don't use c_std=c99
Just use the default c_std used by the compiler. With GCC on Linux this
is gnu89.

Tons of errors related to time.h, signal.h, etc when using c99:

FAILED: libs/gst/check/libcheck/check@sta/check_run.c.o
cc  '-Ilibs/gst/check/libcheck/check@sta' '-fdiagnostics-color=always' '-I../libs/gst/check/libcheck' '-Ilibs/gst/check/libcheck' '-I.' '-I../.' '-Ilibs/gst/check/libcheck/..' '-I../libs/gst/check/libcheck/..' '-pipe' '-Wall' '-Winvalid-pch' '-std=c99' '-DHAVE_CONFIG_H' '-fPIC' '-O2' '-g' '-fPIC' '-MMD' '-MQ' 'libs/gst/check/libcheck/check@sta/check_run.c.o' '-MF' 'libs/gst/check/libcheck/check@sta/check_run.c.o.d' -o 'libs/gst/check/libcheck/check@sta/check_run.c.o' -c ../libs/gst/check/libcheck/check_run.c
In file included from ../libs/gst/check/libcheck/check_run.c:21:0:
../libs/gst/check/libcheck/libcompat.h:167:18: warning: ‘struct itimerspec’ declared inside parameter list will not be visible outside of this definition or declaration
     const struct itimerspec *new_value, struct itimerspec *old_value);
                  ^~~~~~~~~~
../libs/gst/check/libcheck/check_run.c:98:25: error: array type has incomplete element type ‘struct sigaction’
 static struct sigaction old_action[3];
                         ^~~~~~~~~~
../libs/gst/check/libcheck/check_run.c:99:25: error: array type has incomplete element type ‘struct sigaction’
 static struct sigaction new_action[3];
                         ^~~~~~~~~~

[...]

ninja: build stopped: subcommand failed.

The change was originally made because gnu99 was causing issues on OS X.
2016-10-15 22:02:15 +05:30
Thibault Saunier 2be7e4758b meson: Make use of new environment object and set plugin path to builddir
- Properly set where to find gst-plugin-scanner
- Use GST_LOADING_WHITELIST so that only core plugins are used

Bump meson requirement to 0.35
2016-10-14 17:30:00 +02:00
Nirbheek Chauhan 6c1bc80d27 build: Fix clock_gettime check with XCode 8
With XCode 8, clock_gettime will be incorrectly detected as being
available regardless of what OS X version we're targetting because the
symbol is available in the .tbd library as a weak symbol.
See: https://github.com/Homebrew/homebrew-core/issues/3727#issue-170086273

It's only starting from macOS 10.12 that clock_gettime is actually
available, so we can unconditionally disable it when targetting older
versions. We cannot simply do AC_CHECK_FUNCS with -Wl,-no_weak_imports
because the autoconf check does its own prototype declaration that
doesn't trigger that compiler flag.

https://bugzilla.gnome.org/show_bug.cgi?id=772451
2016-10-13 03:40:04 +05:30
Thibault Saunier ba3cde30bf meson: Setup pre-commit hooks when configuring 2016-09-30 11:34:06 -03:00
Tim-Philipp Müller b1d1d36b2a meson: update version 2016-09-30 11:40:52 +01:00
Tim-Philipp Müller 9791669ac3 meson: tracers: signal availability of libunwind and backtrace() to code
Not setting cdata here on purpose because of .. complications.
2016-09-27 18:24:02 +01:00
Thibault Saunier c4aed66eff meson: Build tracers 2016-09-26 18:27:00 -03:00
Tim-Philipp Müller e04d2f230d meson: remove incorrect and unneeded check for ptrdiff_t
Need to include stddef.h for it, so this would've worked:
if cc.has_type('ptrdiff_t', prefix: '#include <stddef.h>')
2016-09-24 18:22:26 +01:00
Nirbheek Chauhan b6e69ffdfb gstconfig: Use __declspec when built with MinGW and linking with MSVC
Earlier we were only using __declspec(dllexport/import) when we were
built with MSVC because when built with MinGW and linking with MinGW we
don't need it (and we get linker errors because of it).

However, when we're built with MinGW and someone wants to link to us
with MSVC, we still need the prototypes to have __declspec(dllimport)
since MSVC cannot do auto-import like GCC can.

https://bugzilla.gnome.org/show_bug.cgi?id=771029
2016-09-13 13:46:19 +05:30
Thibault Saunier 7315a07bc8 meson: Fix building with meson 0.34 2016-09-05 18:07:49 -03:00
Thibault Saunier ed61bff072 meson: Allow others to build GIR files when using GStreamer as subproject
And add a way to disable the introspection and bump version to 1.9.2
2016-09-05 12:39:12 -03:00
Nirbheek Chauhan 22b892b44f gstconfig: Decide GST_EXPORT declaration style at build time
We only use GST_EXPORT consistently when building with MSVC by using the
visual studio definitions files (win32/common/*.def), so always disable
it when building with Autotools and only enable it with Meson when
building with MSVC.

This allows you to use MinGW to link to a GStreamer built with MSVC and
get the correct function prototypes to find functions and variables in
DLLs.
2016-08-26 15:20:50 +01:00
Thibault Saunier d18fff7ff5 meson: doc: Fix building documentation when using subprojects
and check the presence of gtk-doc before building the documentation
2016-08-25 15:10:33 -03:00
Nirbheek Chauhan b2f9808722 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-19 21:26:14 +01:00