summaryrefslogtreecommitdiffstats
path: root/waftools/detections
Commit message (Collapse)AuthorAgeFilesLines
* win32: make sure __STRICT_ANSI__ is not definedJames Ross-Gowan2015-01-161-2/+2
| | | | | | | __STRICT_ANSI__ disables functions and definitions that aren't in ANSI C. Unfortunately this includes j1(), which is used by the new ewa_lanczos code. Cygwin's CFLAGS already unset __STRICT_ANSI__, but it should be unset for both Cygwin and MinGW.
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macroswm42015-01-071-0/+5
| | | | | Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code.
* build: add -Werror=format-security, add -W flags in all platformswm42014-12-171-5/+7
| | | | | | | The idea of using -Werror=format-security comes from MPlayer. Try to use the compiler flags with any compiler. There's no reason not to apply them on clang.
* build: add checks for some compiler warning flagswm42014-12-141-8/+8
|
* build: add -Wno-format-zero-lengthwm42014-09-261-0/+1
| | | | | | This warning makes absolutely no sense. Passing an empty string to printf-like functions is perfectly fine. In the OSD case, it just sets an empty message, practically clearing the OSD.
* build: enable compiler optimization by defaultTsukasa OMOTO2014-07-201-0/+3
|
* Revert "build: avoid defining _GNU_SOURCE"wm42014-07-101-2/+1
| | | | | | This reverts commit 2e6a8f260ca169e2e1a5646eecfc322de6f77307. Too many problems for now, such as with OSX and asprintf().
* build: deal with endian messwm42014-07-101-3/+0
| | | | | | | | | | | | | | | | | | | | There is no standard mechanism for detecting endianess. Doing it at compile time in a portable way is probably hard. Doing it properly with a configure check is probably hard too. Using the endian definitions in <sys/types.h> (usually includes <endian.h>, which is not available everywhere) works under circumstances, but the previous commit broke it on OSX. Ideally all code should be endian dependent, but that is not possible due to the dependencies (such as FFmpeg, some video output APIs, some audio output APIs). Create a header osdep/endian.h, which contains various fallbacks. Note that the last fallback uses libavutil; however, it's not clear whether AV_HAVE_BIGENDIAN is a public symbol, or whether including <libavutil/bswap.h> really makes it visible. And in fact we don't want to pollute the namespace with libavutil definitions either. Thus it's only the last fallback.
* build: avoid defining _GNU_SOURCEwm42014-07-091-1/+2
| | | | | | | | | _GNU_SOURCE defines the kitchen sink, and also prefers glibc definitions where glibc and POSIX conflict. Even though POSIX is worth less than toilet paper, we still prefer the POSIX definitions. rar.c needs asprintf(), which is _GNU_SOURCE-only. So we define _GNU_SOURCE too specifically for this file.
* build: set default cdrom and dvd devices on linuxAlessandro Ghedini2014-06-301-0/+2
|
* build: add some warning cflagswm42014-05-141-1/+3
| | | | | | | | | These were in the old configure script too. Two flags are explicitly tested, because I have no idea how widespread support for them is, and testing them is just easier than trying to look them up in various gcc/clang manuals. There are people using gcc 4.2 out there, so some caution is warranted.
* build: fix OpenBSD DVD/CDROM device nameswm42014-05-121-2/+2
| | | | Closes #781.
* build: conditionally use -Wempty-bodyStefano Pigozzi2014-04-261-2/+8
| | | | | | | | | -Wempty-body is not available on all gcc versions but we were using it unconditionally. Also remove the usage from the clang case. clang still defines `__GNUC__` so it still gets all the gcc specific flags. This should fix the build on systems with older gcc versions like OpenBSD which still comes bundled with gcc 4.2 for license issues.
* Remove CPU detection and inline asm handlingwm42014-04-191-28/+0
| | | | | | | | | | | | | | Not needed anymore. I'm not opposed to having asm, but inline asm is too much of a pain, and it was planned long ago to eventually get rid fo all inline asm uses. For the note, the inline asm use that was removed with the previous commits was almost worthless. It was confined to video filters, and most video filtering is now done with libavfilter. Some mpv filters (like vf_pullup) actually redirect to libavfilter if possible. If asm is added in the future, it should happen in the form of external files.
* build: add -Wempty-body to compiler flagswm42014-04-041-2/+2
| | | | Warns against "if(0);" but not "if(0){}" - perfect for our purposes.
* build: Add -U__STRICT_ANSI__ to CFLAGS on CygwinDiogo Franco (Kovensky)2014-02-131-0/+1
| | | | | | | | | | | | Cygwin's libc (newlib) doesn't obey a lot of unix feature test macros, including _GNU_SOURCE; as a result, a lot of functions and defines get masked out -- important defines such as M_PI and strcasecmp. Work around it by undefining __STRICT_ANSI__ on cygwin systems. This will still cause compilation issues on any non-cygwin system that uses newlib, but hopefully nobody does that, or if they do, they will find this commit message and know to add -U__STRICT_ANSI__ to their CFLAGS. Hopefully.
* build: disable clang's tautological compare warnings [2]Stefano Pigozzi2014-02-131-3/+3
| | | | Fixup 8009646583d523fc0.
* build: disable clang's tautological compare warningsStefano Pigozzi2014-02-131-0/+2
| | | | | This silences two non issues in the client.c file. Fixing them as clang would want us to, would introduce security bugs and potential crashes.
* build: switch to -std=c99 for saner float semanticswm42014-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | This fixes a weird bug with aspect ratio handling. It has to do with float handling: with -std=gnu99, gcc implicitly enables broken non- standard semantics giving float variables excess precision. This can for example make this fail in theory: "float a = 0.1; assert(a == a);" While standard C allows excess precision _within_ expressions, it requires truncation when storing float values in variables of types "float" or "double". The "gnu99" mode breaks this. It can be unbroken by using "c99", or by specifying -fexcess-precision=standard. The former seems less likely to break compilers other than modern gcc. Note that -ffloat-store would also fix this, but also makes float expressions less efficient and less precise for no reason. The code that mistakenly fails because of this is dec_video.c line 393. It caused the container aspect to be ignored in some or all situations, depending how the compiler optimizes. For example, on gcc-4.6 with -Os, the aspect is always ignored. In future, we should probably just get rid of storing aspects as floats.
* Windows: use the GUI subsystem, attach to consoleMartin Herkt2014-01-021-1/+1
| | | | | | | | This is necessary to start mpv without forcing a console window, but also breaks console usability. A workaround is to call mpv from a wrapper process that uses the console subsystem and helps redirecting the standard streams and WriteConsole output to where they belong.
* build: add flag for inline assemblyStefano Pigozzi2013-12-291-5/+5
| | | | | This is used to disable inline assembly (useful for old version of binutils like the one in OpenBSD).
* build: add -mwin32 on cygwinStefano Pigozzi2013-11-261-0/+4
|
* build: cache compiler defines on the configure context directlyStefano Pigozzi2013-11-241-3/+3
|
* switch the build system to wafStefano Pigozzi2013-11-214-0/+114
This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at README.md and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script.