Commit Graph

123 Commits

Author SHA1 Message Date
Martijn van Beurden 7dd7f94822 Fix building both static and shared libs on MinGW with autotools
When building both static and shared libs on MinGW with autotools,
the build broke down without any error message. This commit makes
such a build work
2022-04-15 09:36:15 +02:00
Martijn van Beurden ecede0bc72 Remove AC_C_VARARRAYS from configure.ac
With autoconf 2.70, the behaviour of AC_C_VARARRAYS has changed,
causing a lot of warnings and as a result a cluttered make output.

Doing some research as to where this comes from, I found an strange
piece of code that seems to rely on a misunderstanding as to VLA's
in C++. As I found, the C++ standard does not have VLA's. The
configure.ac code and some code in libFLAC++ seems to think it does.
This now causes strange behaviour.

This commit removes the code relying on this behaviour and removing
all VLA related autoconf macro's from configure.ac
2022-04-15 09:36:15 +02:00
Martijn van Beurden 13149acddd Remove more obsolete autoconf macro's
Autoconf 2.71 warns about obsolete macro's on running ./autogen.sh.

AC_PROG_CC_STDC is replaced by AC_PROG_CC as recommended by autoupdate

AC_HEADER_STDC has been removed. Autoupdate recommended the following:
> The preprocessor macro `STDC_HEADERS' is obsolete. Except in unusual
> embedded environments, you can safely include all ISO C90 headers
> unconditionally.
2022-04-15 09:36:15 +02:00
Martijn van Beurden d94a43d5c3 Update configure.ac and m4 files with autoupdate 2.60
Starting with autoconf 2.70, obsolescence warnings are output by
default. To keep the script as compatible as possible, I build
autoconf 2.60 and ran the autoupdate that came with it on
configure.ac and all m4 files.
2022-04-15 09:36:15 +02:00
Martijn van Beurden e75495be3d
Change version to 1.3.4 and add placeholders for release date
Signed-off-by: Ralph Giles <giles@thaumas.net>
2022-02-20 20:54:19 -08:00
Thomas BERNARD 4fbb6d4f2e fix build under Mac OS X with PowerPC CPU
revert 44036c9a9b because auxv.h is only
available under Linux and FreeBSD.
2020-05-03 17:14:33 +10:00
NotTsunami f706f28322 cmake/configure.ac: Enable -fstack-protector-strong by default
This commit contains the following changes:

- Drops -fstack-protector in favor of -fstack-protector-strong.
  Consequently, the ssp-buffer-size parameter has been removed as
  -fstack-protector-strong ignores array size.

- Add new global opt-out for stack smash protection. This is enabled
  by default for both autotools and CMake builds. Users can opt out
  of stack smash protection by passing -DWITH_STACK_PROTECTOR=OFF to
  CMake or --disable-stack-smash-protection when running ./configure.

- Renames HAVE_SSP_FLAG to HAVE_STACK_PROTECTOR_FLAG in
  CMakeLists.txt to be more readable.
2019-11-20 17:12:03 +11:00
Erik de Castro Lopo e0f7e0ece5 oss-fuzz: Add fuzzing targets
These fuzzing targets were originally from:

    https://github.com/guidovranken/flac-fuzzers.git

but having them in a separate repo was a huge pain in the neck when
working on fixing any problems found.
2019-11-18 06:29:10 +11:00
sezero d4a1b345dd configure.ac: allow several compiler flags for clang
The flac configury marked clang as 'not being gcc' and excluded
a lot of compiler switches, most importantly the visibility flags,
from being used with it. This was done possibly after a problem
reported at: https://github.com/erikd/libsndfile/issues/49 .

This patch does the following:

- m4/gcc_version.m4 (XIPH_GCC_VERSION): set GCC_MAJOR_VERSION and
  GCC_MINOR_VERSION to 0 for non-gcc. Previously, they were left
  unset.

- configure: the gcc version checks are, naturally, against non-
  zero values, so, allow many compiler switches to be used with
  clang without affecting real-gcc cases.

- configure: When setting CFLAGS="-O3 -funroll-loops", also set
  CXXFLAGS="-O3".  Prevents g++ warnings with _FORTIFY_SOURCE, i.e.:
 '_FORTIFY_SOURCE requires compiling with optimization (-O)'

Tested compilation using gcc-7.3.1 and clang-5.0.2 on x86_64-linux,
and gcc-4.4.7 and clang-3.4.2 on an i686-linux.  Also tested cross-
compiling for Mac OS X using clang-5.0.2.
2019-10-10 18:31:26 +11:00
sezero b917d456d2 make dllexport work with compilers other than MSVC
the issue is, flac and metaflac exes rely on flac_internal_???_utf8()
procedures from windows_unicode_filenames.c and there is no easy way
to exclude them from exports without breaking things. So export them
explicitly (they are exported anyway w/o this patch), but add a FIXME
note about the kludge in windows_unicode_filenames.c.
2019-10-10 18:30:39 +11:00
Erik de Castro Lopo f771c6451b Remove un-needed Makefile.am 2019-10-01 08:18:28 +10:00
Peter Seiderer 44036c9a9b configure.ac: check for sys/auxv.h before defining FLAC__CPU_PPC
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Note: One of the buildroot autobuilder provided powerpc toolchains
seem to not provide the sys/auxv.h header file, resulting in a
compile failure (see [1] for details).

[1] http://lists.busybox.net/pipermail/buildroot/2019-September/259732.html
2019-09-30 07:49:10 +10:00
Erik de Castro Lopo f764434a39 Version 1.3.3 2019-08-04 19:47:53 +10:00
Dagobert Michelsen fcabd81aba Add -lrt for all operating systems for clock_gettime 2019-07-17 08:16:39 +10:00
Amitay Isaacs c0215fc149 Check if compiler supports target attribute on ppc64
Check if the compiler supports __attribute__((target("cpu=power8")))
and __attribute__((target("cpu=power9")))

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
2018-08-20 18:16:34 +10:00
Anton Blanchard f301518c52 configure.ac: Fix FLAC__CPU_PPC on little endian, and add FLAC__CPU_PPC64
FLAC__CPU_PPC wasn't catching powerpcle or powerpc64le. Fix that and
add a new define for FLAC__CPU_PPC64.

Signed-off-by: Anton Blanchard <anton@ozlabs.org>
2018-08-20 18:16:34 +10:00
Anton Blanchard 5e0d4187a2 configure.ac: Add VSX enable/disable
We want to create functions with PowerPC VSX instructions, so add
a configure check.

Signed-off-by: Anton Blanchard <anton@ozlabs.org>
2018-08-20 18:16:34 +10:00
Anton Blanchard 595ac14023 configure.ac: Remove SPE detection code
We don't have any SPE code, so there's no need to detect it
at configure time.

Signed-off-by: Anton Blanchard <anton@ozlabs.org>
2018-08-20 18:16:34 +10:00
luz.paz 01eb19708c Fix miscellaneous typos.
Found via `codespell -q 3`
2018-05-24 07:20:19 +10:00
Rosen Penev c669249e4c Fix compile with cygwin
The underscores are wrong. The comment is also correct.

Also remove the configure.ac option. Otherwise it tries to compile the
windows unicode stuff which POSIX(cygwin) does not understand.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-02-09 20:02:18 +11:00
Erik de Castro Lopo d2cb0d1eb2 configure.ac: Clean up CFLAGS code
Also moves _FORTIFY_SOURCE detection to an M4 macro.

Patchfrom: David Seifert <soap@gentoo.org>
2017-02-06 19:54:15 +11:00
David Seifert b3ece71334 Do not override CFLAGS, as CFLAGS is a user flag.
* Furthermore, use NDEBUG globally to detect the presence
  of building with more debug output information.
  AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays
  Gnome has also switched to it from its own custom solution.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-19 20:47:26 +11:00
David Seifert cc08bebaaa Make building/installing examples optional
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-15 12:34:03 +11:00
sezero 31b219f0bf Support nasm coff obj format for djgpp
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-14 18:32:49 +11:00
Peter Korsgaard 5572155616 configure.ac: relax linux OS detection
Not all linux hosts match the *-pc-linux-gnu wildcard, causing build
failures for older glibc versions where we need to link with -lrt for
clock_gettime - E.G.:

 - arm-unknown-linux-musleabihf
 - powerpc-unknown-linux-gnuspe
 - bfin-linux-linux-uclibc
 ..

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-13 21:32:29 +11:00
Erik de Castro Lopo ac39d3719f Version 1.3.2 2017-01-01 14:54:28 +11:00
Erik de Castro Lopo f39a0ea67e configure.ac: Fix description of --disable-sse 2016-12-05 05:37:44 +11:00
Erik de Castro Lopo 459fdc5e6e configure.ac: Remove unused config flags
FLAC__NO_SSE_OS and FLAC__SSE_OS.

Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com>
2016-12-05 05:34:23 +11:00
Erik de Castro Lopo 36a0ab100d Fix use of FLAC__HAS_X86INTRIN configure variable 2016-06-20 20:42:44 +10:00
Erik de Castro Lopo e120037f3c Fix use of FLAC__SSE_OS configure variable 2016-06-20 20:42:44 +10:00
Erik de Castro Lopo 9548d4b953 configure.ac: Force FLAC__HAS_OGG to 0 or 1 2016-03-20 20:44:59 +11:00
Erik de Castro Lopo 9cf42fe5e0 Fix autotool warnings 2016-02-10 21:24:41 +11:00
Dave Yeo 50e7aea808 microbench: Add fallback to gettimeofday()
Some operating systems such as OS/2 don't have any of the CLOCK* API
functions so add gettimeofday() as a fallback.

Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2016-02-09 20:30:29 +11:00
Dave Yeo 0435a231c8 Make AVX and AVX2 instructions a configure option
Handy for toolchains or operating systems that don't support AVX or AVX2
like OS/2.

Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2016-02-08 22:12:37 +11:00
Erik de Castro Lopo 7411724bc9 Fix ioctl/TIOCGWINSZ for OSX 2016-01-26 13:35:24 +11:00
Erik de Castro Lopo d6c774c108 configure.ac: Drop -Wunreachable-code from CFLAGS
According to:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46158

this warning was removed in GCC 4.5.
2016-01-26 12:33:55 +11:00
Erik de Castro Lopo 09ca8abc67 configure.ac: Remove redundant `XIPH_ADD_CFLAGS([-Wextra])` 2016-01-25 10:12:33 +11:00
Erik de Castro Lopo 924cade2d9 Fix linking of microbenchmark program
On some setups, benchmark_residual linkage fails with an undefined
reference to clock_gettime(). Adding -lrt fixes that.

Patch-from: Ozkan Sezer <sezeroz@gmail.com>
2016-01-24 08:21:26 +11:00
Erik de Castro Lopo a3224c0434 configure.ac: Add --enable-64-bit-words option
The old 32 bit words the default which can be overridded with this
configure option.
2016-01-04 11:47:21 +11:00
Erik de Castro Lopo 95fc3bf314 Add first micro-benchmark 2015-09-01 04:14:17 +10:00
Mario Sanchez Prada 5ff15bddeb configure.ac : Pass -fno-inline-small-functions when using GCC 4.7
For some reason, the build fails when using GCC 4.7 due to the implicit
-finline-functions option passed to the compiler when -O3 is enabled,
which does not happen in newer versions of GCC, probably due to some of
the "General Optimizer Improvements" included in 4.8 (see [1]).

Fortunately, we don't need to disable -finline-functions completely but
just do it for "small functions", which is what this patch does.

[1] https://gcc.gnu.org/gcc-4.8/changes.html

Closes: https://sourceforge.net/p/flac/bugs/429/
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2015-07-08 22:20:52 +10:00
Tristan Matthews a84587061c configure: Only use -mstackrealign on i686 for mingw32/os2
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2015-04-19 06:27:20 +10:00
Erik de Castro Lopo 1ed65e5600 configure.ac : Add -mstackrealign whenever we add -msse2.
There have been some (pretty much unconfirmed) reports of problems
with SSE enabled but without this stack alignment flag.
2015-03-31 10:14:29 +11:00
Erik de Castro Lopo 7566d3d4c1 configure.ac : Tweak for x32 architecture.
The x32 architecture uses and ILP32 (32 bit ints, longs and pointers)
on an x86_64 CPU. Since the CPU is x86_64 we need to set FLAC__CPU_X86_64
even though the pointer size is 32 bits.

Patch-from: Stuart Shelton
Closes: https://sourceforge.net/p/flac/bugs/427/
2015-03-12 08:28:01 +11:00
Erik de Castro Lopo 336f6a5429 configure.ac : Fix FLAC__HAS_X86INTRIN / FLaC__SSE_OS.
* Correct definition of FLAC__HAS_X86INTRIN in config.h file.
* Correct comparison of sse_os with 'true' instead of 'yes'.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2015-02-25 06:48:34 +11:00
Christian Weisgerber b5a10e75ed configure.ac : Detect 'amd64' as being same as 'x86_64'.
On BSD systems, the 64-bit x86 architecture is called "amd64".

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2015-02-19 06:13:01 +11:00
Erik de Castro Lopo 723cfa34f2 configure.ac : Relax automake version requirements.
Suggested-by: Jan Stary <hans@stare.cz>
2014-12-01 05:28:18 +11:00
Erik de Castro Lopo 1e4ffabb6e configure.ac : Don't zap '-g' from $CFLAGS.
The '-g' was in-correctly getting zapped from all CFLAGS expressions
including eg:

    -mfloat-gprs=double (for powerpc e500) -> -mfloatprs=double.

Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-11-30 11:56:54 +11:00
Erik de Castro Lopo 0e11f73eab Version 1.3.1 final. 2014-11-27 14:04:48 +11:00
Erik de Castro Lopo b83ee75363 Set version to 1.3.1pre1. 2014-11-25 19:10:31 +11:00