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.
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
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.
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.)
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>
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>
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>
GCC takes the last -O* option, which defaults to -O0 anyway. With
./configure forcing -O0, there was no way to select a custom
optimization level via external CFLAGS.
Optimizing VLC code for size is probably not such a great idea,
considering that media playback is performance critical. There are
better ways to reduce code size than -Os, e.g. Thumb(2) code on ARM.
And of course, removing unneeded plugins and feature is the best way
to reduce code size.