Commit Graph

141 Commits

Author SHA1 Message Date
Steve Lhomme b164a2f4b9 switch to C17 2024-02-06 08:32:48 +00:00
Steve Lhomme 5dcc5ff839 switch C++ support to C++17
As contribs keep being updated with newer versions of the language, we need to
support a more modern version of C++ going forward.

Setting -std=c++17 should not break existing contribs that are built with C++11 or C++14.
In fact we already support the mix of versions between 11 and 14 without problem.
Modern C++ compilers are designed to take care of this [1].
When switching to a new C++ version there might however be some slight differences on how the
code is interpreted. These differences [2] might trigger some build errors for removed parts.

[1] https://stackoverflow.com/questions/46746878/is-it-safe-to-link-c17-c14-and-c11-objects
[2] https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0636r3.html
2024-01-26 10:42:23 +00:00
Khalid Masum a7ede0f075 wasm: build: Use .wasm extension for shared module
This makes sure the shared modules are built with .wasm extension
instead of .so.

However libvlc and libvlccore are still built with .so extension.
2023-09-24 20:31:18 +00:00
Alexandre Janniaux 784c324571 configure: check typeof on C++ compilers
C compilers can have GNU extensions to support typeof in C code, but
some C++ compilers like clang are removing the builtin since decltype
can be used in C++ without the constraints from typeof. Decltype is not
100% equivalent for this reason: references will be kept in the returned
type.

The check in m4/typeof.m4 comes from graydon/monotone and dovecot/core
and was slightly modified to namespace the define for C++ code.
2022-05-21 15:17:00 +00:00
Dave Nicolson 09d1dc2fc0 m4: fix gettext detection on macOS 2022-04-22 15:57:44 +00:00
Rémi Denis-Courmont 5767210b25 gettext: remove stray old m4 files
See gettext documentation.
2022-02-01 17:26:37 +00:00
Alexandre Janniaux e1634b6b32 m4: host-cpu-c-abi: add missing m4 from gnulib
The m4 file is a dependency of lib-prefix, leading to error at
bootstrap because it was missing after update from commit
32b3f47bf0.

    configure.ac:618: warning: gl_HOST_CPU_C_ABI_32BIT is m4_require'd but not m4_defun'd
    m4/lib-prefix.m4:155: AC_LIB_PREPARE_MULTILIB is expanded from...
    m4/lib-link.m4:181: AC_LIB_LINKFLAGS_BODY is expanded from...
    m4/iconv.m4:10: AM_ICONV_LINKFLAGS_BODY is expanded from...
    m4/gettext.m4:55: AM_GNU_GETTEXT is expanded from...
    configure.ac:618: the top level
    configure.ac:618: warning: gl_HOST_CPU_C_ABI_32BIT is m4_require'd but not m4_defun'd
    m4/lib-prefix.m4:155: AC_LIB_PREPARE_MULTILIB is expanded from...
    m4/lib-link.m4:181: AC_LIB_LINKFLAGS_BODY is expanded from...
    m4/iconv.m4:10: AM_ICONV_LINKFLAGS_BODY is expanded from...
    m4/gettext.m4:55: AM_GNU_GETTEXT is expanded from...
    configure.ac:618: the top level
    autoreconf: configure.ac: tracing
    configure.ac:618: warning: gl_HOST_CPU_C_ABI_32BIT is m4_require'd but not m4_defun'd
    m4/lib-prefix.m4:155: AC_LIB_PREPARE_MULTILIB is expanded from...
    m4/lib-link.m4:181: AC_LIB_LINKFLAGS_BODY is expanded from...
    m4/iconv.m4:10: AM_ICONV_LINKFLAGS_BODY is expanded from...
    m4/gettext.m4:55: AM_GNU_GETTEXT is expanded from...
    configure.ac:618: the top level
2022-01-28 19:09:09 +00:00
Rémi Denis-Courmont 32b3f47bf0 gettext: update to 0.21 2022-01-22 08:24:11 +00:00
Mehdi Sabwat d6f4442879 nacl: remove deprecated platform
This commit removes conditional code for the Nacl platform, in the core.

https://blog.chromium.org/2020/08/changes-to-chrome-app-support-timeline.html
2021-09-16 16:46:02 +00:00
Alexandre Janniaux d0dd974576 m4: with_pkg: fix PKG_HAVE_WITH_MODULES macro
The macro was checking for $with_foo to be set but only $enabled_foo was
set correctly by the PKG_WITH_MODULES macro. In addition, this patch
adds an intermediate macro for the name to be readable.
2021-03-04 19:47:48 +01:00
Hugo Beauzée-Luyssen f799f9ced9 configure.ac: Bump required C++ version to 14 2019-04-04 10:31:17 +02:00
Rémi Denis-Courmont 8b3ebbbb2a m4: fix false negative working iconv test
Part of the test is leaking memory, which can trip the leak sanitizer.

(This should be fixed in gettext. In the mean time, it will need to be
 applied manually at every gettext update.)
2017-11-14 18:59:50 +02:00
Luca Barbato dc05abe89d configure: Pass the macosx deps even if the intl to try is external
We build our own copy, gettext.m4 did not account this corner case.

close #17972
Signed-off-by: David Fuhrmann <dfuhrmann@videolan.org>
2017-09-03 14:19:33 +02:00
Shaleen Jain 57949e7a9b configure: refactor RDC_PROG_{CC, CXX}_FLAGS with AX_APPEND_COMPILE_FLAGS
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2017-08-28 13:32:40 +02:00
Filip Roséen c1ec873403 m4: fix c++ check for -f flags
Both gcc and clang generate warnings for unsupported -f$FLAG by
default, meaning that the previous implementation would consider
unsupported flags as supported (as a warning is not an error that
fails compilation).

The addition of -Werror treats warnings as errors, and will prevent
false-positives in terms of -f$FLAG support.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-24 00:22:48 +01:00
Rémi Denis-Courmont d8a1f9378a Remove unused private.m4 2017-01-22 16:48:09 +02:00
Rémi Denis-Courmont 8325c17d62 gettext: update to version 0.19.8 2016-10-27 14:21:45 +03:00
Konstantin Pavlov 0946ea9f3c m4: fix C11 tests for FreeBSD/clang. 2016-10-04 16:01:07 +03:00
Rémi Denis-Courmont 606776eb3e m4: expand C++11 test 2016-09-20 13:03:20 +03:00
Rémi Denis-Courmont 03df6aeedd m4: helper for -f flags 2016-05-29 22:46:27 +03:00
Rémi Denis-Courmont b3239cf77e configure: update gettext to 0.19.6 2015-11-02 21:36:01 +02:00
Rémi Denis-Courmont f0e29749a7 configure: update gettext to 0.19.4 2015-07-06 22:11:45 +03:00
Rémi Denis-Courmont ce150f3849 configure: test and enable C11 where available 2015-06-22 00:10:48 +03:00
Rémi Denis-Courmont d3b892b8bc m4: improve C++11 check 2015-06-22 00:10:36 +03:00
Steve Lhomme 93c858553d add stdcxx_11 to the list of M4 files
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2015-05-16 12:08:01 +03:00
Jonathan Calmels edf1c76018 configure: add support for C++11
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2015-04-30 14:03:43 +02:00
Diego Elio Pettenò 358ae6ba60 build: create a macro to check for, and replace, possibly-inline functions.
mingw (both 32 and 64) provides a number of functions that have no C
linkage, but are only available as static inline. Define a macro that can
check for the function declaration but acts like AC_REPLACE_FUNC.

Use the new macro for asprintf/vasprintf (previously implemented in
configure.ac directly).

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2015-03-16 19:21:42 +02:00
David Fuhrmann 17653702c7 m4: fix detection of supported "-Wxxx" flags with clang
Clang does not fail, but only prints a warning by default for unknown
-W options.
2014-10-18 09:15:00 +02:00
Rémi Denis-Courmont e68826bd61 Update gettext to version 19.2 2014-09-30 20:48:13 +03:00
Francois Cartegnie ba13ac0ca1 rename art_finder as meta_fetcher 2014-05-19 12:02:41 +02:00
Luca Barbato dcffc92496 build: support YASM targets
The files must be .asm

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2013-11-05 14:39:50 +01:00
Rémi Denis-Courmont d73a089667 Update to gettext 0.18.3.1, fix AC_CHECK_DECLS usage 2013-09-05 22:31:16 +03:00
Rémi Denis-Courmont 27be91965e gettext: update to version 0.18.3 2013-07-28 23:10:49 +03:00
Felix Paul Kühne d879f020ae m4: fix gettext detection on OSX (close #5816) 2013-06-27 12:31:00 +02:00
Rémi Denis-Courmont 9d348109e4 Update gettext to 0.18.2
This supersedes commit 53c901581b.
2013-06-04 20:55:04 +03:00
Rémi Denis-Courmont 53c901581b Fix warning with automake 1.12 2013-05-25 10:38:52 +03:00
Felix Paul Kühne 16b0b99d80 m4: enable dolt support for further apple platforms
This allows us to use it on x86_64, ppc and iOS, too.
2012-10-08 15:09:46 +02:00
Luca Barbato be75acdff7 dolt: support nacl and silent-rules on fallback
nacl doesn't use pic as does mingw.

Signed-off-by: Rafaël Carré <funman@videolan.org>
2012-09-10 15:46:17 +02:00
Luca Barbato 8d969f7f52 configure: add DOLT
Shorten build time.

On x86_64 linux build:

LIBTOOL make -j2  60,82s user 13,98s system 112% cpu 1:06,59 total
        make -j2  56,83s user 12,72s system 110% cpu 1:03,20 total
DOLT    make -j2  44,32s user 11,02s system 108% cpu 51,215 total
        make -j2  42,15s user 11,04s system 106% cpu 50,155 total

Signed-off-by: Rafaël Carré <funman@videolan.org>
2012-09-04 17:37:26 +02:00
Rafaël Carré 91df5145e0 Remove unused PLUGINS variable 2012-03-01 09:11:52 -05:00
Jean Baptiste-Kempf e423b4ec42 Fix MacOS gettext intl detection
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
2012-01-22 09:19:03 -08:00
Faustino E. Osuna c1df08645f Fix typo in M4 Cxx flags macro
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2012-01-02 14:30:48 +01:00
Rafaël Carré 6d652d11d4 remove obsolete comment 2011-09-18 22:53:41 -04:00
Rémi Denis-Courmont ccf9342370 Remove vlc-config 2011-08-18 22:02:21 +03:00
Rémi Denis-Courmont e7df8e75ea Migrate VLC_ADD_* flags from vlc-config to AC_SUBST 2011-08-18 21:23:25 +03:00
Rémi Denis-Courmont 873280f2ad Remove broken and useless vlc-config --list 2011-08-18 19:02:28 +03:00
Rémi Denis-Courmont 631e9e7f8a M4 C++ flags macros 2011-05-14 13:53:28 +03:00
Rémi Denis-Courmont c3a51903f2 Remove some leftovers from pre-libtool era
(Note __BUILTIN__ was not used anymore as we have !__PLUGIN__)
2011-05-02 11:01:12 +03:00
Rémi Denis-Courmont 8b5b0cfa90 vlc-config: remove unused linkage command 2011-05-02 11:01:10 +03:00
Rémi Denis-Courmont 2c9b0d37a0 Only check optimization flags when useful 2011-05-01 20:43:11 +03:00