summaryrefslogtreecommitdiffstats
path: root/waftools
Commit message (Collapse)AuthorAgeFilesLines
* w32: use DisplayConfig API to retrieve correct monitor refresh rateJames Ross-Gowan2015-11-061-1/+1
| | | | | | | | | | This is based on an older patch by James Ross-Gowan. It was rebased and cleaned up. Also, the DWM API usage present in the older patch was removed, because DWM reports nonsense rates at least on Windows 8.1 (they are rounded to integers, just like with the old GDI API - except the GDI API had a good excuse, as it could report only integers). Signed-off-by: wm4 <wm4@nowhere>
* video: refactor GPU memcpy usagewm42015-09-251-0/+18
| | | | | | | | | | | | | | | | | Make the GPU memcpy from the dxva2 code generally useful to other parts of the player. We need to check at configure time whether SSE intrinsics work at all. (At least in this form, they won't work on clang, for example. It also won't work on non-x86.) Introduce a mp_image_copy_gpu(), and make the dxva2 code use it. Do some awkward stuff to share the existing code used by mp_image_copy(). I'm hoping that FFmpeg will sooner or later provide a function like this, so we can remove most of this again. (There is a patch, bit it's stuck in limbo since forever.) All this is used by the following commit.
* build: make sure the HAVE_ key is undefined on failureStefano Pigozzi2015-08-191-0/+1
| | | | | | Some particular checks can define the HAVE_ key on their own. To make sure they work correctly when composed (with compose_checks) we force the HAVE_ key to be undefined if a check fails.
* win32: revert wchar_t changeswm42015-08-011-1/+0
| | | | | | | | | | | Revert "win32: more wchar_t -> WCHAR replacements" Revert "win32: replace wchar_t with WCHAR" Doing a "partial" port of this makes no sense anymore from my perspective. Revert the changes, as they're confusing without context, maintenance, and progress. These changes were a bit premature anyway, and might actually cause other issues (locale neutrality etc. as it was pointed out).
* win32: more wchar_t -> WCHAR replacementswm42015-07-301-0/+1
| | | | | | | | | | | | | This was essentially missing from commit 0b52ac8a. Since L"..." string literals have the type wchar_t[], we can't use them for UTF-16 strings. Use C11 u"..." string literals instead. These have the type char16_t[], but we simply assume char16_t is the same underlying type as WCHAR. In practice, they're both unsigned short. For this reason use -std=c11 on Windows. Since Windows is a "special" environment (we require either MinGW or Cygwin), we don't need to worry too much about compiler compatibility.
* build: remove useless classStefano Pigozzi2015-07-266-48/+37
|
* build: always regenerate version hashwm42015-06-301-26/+0
| | | | | | | | | Until now, it only used the hash from the previous configure run, instead of trying to get the latest hash. The "old" build system did this correctly - we just have to use the existing logic in version.sh. Since waf supports separate build dirs, extend version.sh with an argument for setting the path of version.h.
* build: check for lua52Christian Hesse2015-05-131-0/+1
| | | | | | | Arch linux is about to update to lua 5.3.x, but lua 5.2.x will be provided by package lua52, which contains pkg-config file lua52.pc. Signed-off-by: wm4 <wm4@nowhere>
* build: exclude -Wredundant-declswm42015-05-091-2/+3
| | | | | | | It's useless, and creates a bogus warning in subprocess-posix.c. Since I don't know which compilers might have it by default, just change it to -Wno-redundant-decls.
* win32: use a platform-specific unicode entry-pointJames Ross-Gowan2015-04-111-2/+2
| | | | | | | | | | Add a platform-specific entry-point for Windows. This will allow some platform-specific initialization to be added without the need for ugly ifdeffery in main.c. As an immediate advantage, mpv can now use a unicode entry-point and convert the command line arguments to UTF-8 before passing them to mpv_main, so osdep_preinit can be simplified a little bit.
* lua: reject Lua 5.3wm42015-04-011-1/+1
| | | | | | | | | | | | | | It simply doesn't work, and is hard to make work. Lua 5.3 is a different language from 5.1 and 5.2, and is different enough to make adding support a major issue. Most importantly, 5.3 introduced integer types, which completely mess up any code which deals with numbers. I tried to make this a compile time check, but failed. Still at least try to avoid selecting the 5.3 pkg-config package when the generic "lua" name is used (why can't Lua upstream just provide an official .pc file...). Maybe this actually covers all cases. Fixes #1729 (kind of).
* build: fix building with spaces in pathPhilip Sequeira2015-03-311-3/+3
|
* player: dump list of satisfied deps instead of config.h with -vwm42015-03-111-1/+11
| | | | | | Starting to get tired of seeing the full config.h in verbose output every time. Make it slightly more elegant by outputting the list of satisfied dependencies instead.
* build: make vdpau and dxva2 checks nicerwm42015-03-061-2/+2
| | | | | | Using check_statement() with an empty statement just to check for the header is quite a hack. Fix check_headers() (so it takes a "use" parameter), and use it for the checks instead.
* buid: readd -Wparentheseswm42015-03-021-1/+1
| | | | | | | | | This warning wasn't overly helpful in the past, and warned against perfectly fine code. But at least with recent gcc versions, this is the warning that complains about assignments in if expressions (why???), so we want to enable it. Also change all the code this warning complains about for no reason.
* stream_dvb: Always define NO_STREAM_ID_FILTER if missing.Oliver Freyermuth2015-02-281-1/+1
| | | | | | | It is also used for initialization in channel-list setup. Should fix compilation on FreeBSD, and is more correct since it is used unconditionally. Reverts 6445648 .
* build: improve DVB checkwm42015-02-271-1/+1
| | | | | | A use of NO_STREAM_ID_FILTER was added to the DVB code recently. While I have no idea what it's needed for, it makes mpv fail to compile on FreeBSD 10.1. Add it to the dvb configure check.
* build: move QuartzCore linking to the cocoa checkStefano Pigozzi2015-02-252-1/+3
| | | | | It's needed for the DisplayLink functions so it must be enabled for the basic cocoa code.
* build: print pkg-config query on failureStefano Pigozzi2015-02-211-0/+2
|
* build: fix Python 3 unicode issue with waf 1.8.6wm42015-02-191-1/+7
| | | | | | | | | | | | | Starting with waf 1.8.6 (in Python 3), the hcode variable isn't a string, but a byte string. This commit adds the solution proposed in the upstream waf bug report: https://code.google.com/p/waf/issues/detail?id=1535 It seems a bit overly verbose, but on the other hand, this solution has the chance of being most correct/compatible. Fixes #1604.
* build: add option to generate a clang compilation databaseStefano Pigozzi2015-02-051-0/+67
| | | | | | | | The compilation database is a JSON file[1] storing all compilation flags. That is useful for tools using libclang for code completion and error reporting (for example: YouCompleteMe for vim). [1]: http://clang.llvm.org/docs/JSONCompilationDatabase.html
* vo_opengl: cleanups after vo_opengl_old removalwm42015-01-211-0/+2
| | | | | | | | | | | | | Don't load all the legacy functions (including ancient extensions). Slightly simplify function loader and context creation, now that legacy GL doesn't need to be handled. Remove the code for drawing OSD in legacy mode. Remove all the header hacks, which were meant for ancient OpenGL headers which didn't even support things like OpenGL 1.3. Instead, adjust the GLX check to make sure we get both OpenGL 3x and 2.1 symbols. For win32 and OSX, we assume that the user has the latest headers anyway. For wayland, we hope that things somehow go right.
* 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: drop hacks for possibly broken static pthreads-win32 linkingwm42015-01-112-5/+0
| | | | | | | | | | | | We now use threads and other pthread API a lot, and not always we use it from threads created with pthread_create() (or the main thread). As I understand, with static linking we would have to use pthread_win32_thread_attach/detach_np() every time we enter or leave a foreign thread. We don't do this, and it's not feasible either, so it's just broken. This still should work with dynamic pthreads-win32. The MinGW pthread implementation should be unaffected from all of this.
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macroswm42015-01-073-3/+6
| | | | | 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: rename MPLAYER_CONFDIR definewm42015-01-021-3/+3
| | | | | | We certainly don't use the mplayer configuration dir. The name didn't matter, but now that it's in user-visible output (as part of config.h being dumped in verbose mode), it's a bit too strange.
* player: print config.h contents in verbose modewm42015-01-021-0/+5
| | | | | | | | | It was requested that mpv should print what features etc. have been enabled at compile time. It can print the configure command line, but it obviously doesn't include autodetected features. I tried to think of a nicer way than dumping the config.h as text, but this was still the simplest way.
* win32: add native wrappers for pthread functionswm42015-01-011-0/+6
| | | | | | | Off by default, use --enable-win32-internal-pthreads . This probably still needs a lot more testing. It also won't work on Windows XP.
* 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
|
* vaapi/GLX: don't access VO backendwm42014-12-031-0/+1
| | | | Same as with the VDA change.
* build: give precedence to Lua52 over LuaJITStefano Pigozzi2014-12-021-2/+1
| | | | | LuaJIT ships with a broken .pc file on OS X (see #1110), and leaving Lua52 last was done only to improve libquvi interoperability.
* build: fix Lua detectionStefano Pigozzi2014-10-251-2/+4
| | | | | | | | | | | | | We need to manually define the flag since we are using a separate identifier for each of the Lua checks. This was done before 9b45b48 by the composed check with a define_key (see waftools/checks/generic.py). The pkg-config check was the only one to not redefine a define key because Waf already does that automatically when we call the generated function with the same identifier as the generator function. Now if they are called with two different arguments we will get two different definitions. Fixes #1218
* Drop libquvi supportwm42014-10-254-53/+3
| | | | | | | | | | | No development activity (or even any sign of life) for almost a year. A replacement based on youtube-dl will probably be provided before the next mpv release. Ask on the IRC channel if you want to test. Simplify the Lua check too: libquvi linking against a different Lua version than mpv was a frequent issue, but with libquvi gone, no direct dependency uses Lua, and such a clash is rather unlikely.
* build: remove useless functionStefano Pigozzi2014-10-111-3/+0
|
* build: update waf to version 1.8.1Stefano Pigozzi2014-10-112-18/+4
| | | | Fixes #1164
* 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: add a check_program checkStefano Pigozzi2014-09-031-1/+6
| | | | | | | | | | | | | | | | | | | This wraps waf's find_program in our own check boilerplate code so that it can be used in the declarative dependencies section of the wscript. Can be used like this: }, { 'name': 'sed', 'desc': 'sed program', 'func': check_program('sed', 'SED'), }, { First argument is the program name, and the second is the waf variable name where the program path will be stored. In this example we will be able to refer to sed with ${{SED}} when creating waf Tasks in wscript_build. /cc @giselher: I think you need this for wayland-scanner.
* build: drop check for XF86keysym.hwm42014-08-161-6/+0
| | | | | | This is always included in the Xorg development headers. Strictly speaking it's not necessarily available with other X implementations, but these are hopefully all dead.
* x11: use xrandr to retrieve display refresh ratewm42014-08-161-8/+0
| | | | | | | | | | | | | | | | | Drop use of the ancient XF86VM, and use the slightly less ancient Xrandr extension to retrieve the refresh rate. Xrandr has the advantage that it supports multiple monitors (at least the modern version of it). For now, we don't attempt any dynamic reconfiguration. We don't request and listen to Xrandr events, and we don't notify the VO code of changes in the refresh rate. (The later works by assuming that X coordinates map directly to Xrandr coordinates, which probably is wrong with compositing window manager, at least if these use complicated transformations. But I know of no API to handle this.) It would be nice to drop use of the Xinerama extension too, but unfortunately, at least one EWMH feature uses Xinerama screen numbers, and I don't know how that maps to Xrandr outputs.
* build: expose waf variants to the userStefano Pigozzi2014-08-061-0/+8
| | | | | This allows the user to execute multiple configuration and build steps. It can be used for several scenarios where you need different compiler flags.
* build: syms: reindentStefano Pigozzi2014-08-051-29/+28
| | | | | | | We avoided reindenting this in the past to allow merging upstream changes. In hindsight these are very unlikely and we are actually doing changes on the code, so it's better to have the correct indentation and formatting in our source file.
* build: syms: fix *.def file for mach-o binary formatStefano Pigozzi2014-08-051-1/+1
| | | | | There was a missing trailing newline which caused some warnings when calling `ld`.
* build: list exported symbols explicitlywm42014-08-051-40/+8
| | | | | | | | | | | Instead of using a regex to match names to be exported from the libmpv dynamic shared library, use a libmpv.def file, which lists all exported functions explicitly. This reduces the platform specifics in syms.py. I'm not sure if the separate compile_sym task is still needed (it could probably be collapsed, which would concentrate the platform specifics into one place).
* build: fix export of libmpv symbols on mingwwm42014-08-051-1/+1
| | | | The _ usually prefixed to functions on Windows was unexpectedly missing.
* 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: version string as native str type for each Python versionPhilip Sequeira2014-06-141-2/+4
| | | | | | | Should resolve the "mpv b'...'" issue on Python 3 without breaking things on Python 2. Also, remove redundant wait for process.
* build: fix generation of zsh completionAlessandro Ghedini2014-06-131-2/+2
| | | | | The Perl script must be run *after* the mpv executable is generated. Also use an absolute path to it.
* build: generate and install zsh completion scriptAlessandro Ghedini2014-06-081-0/+13
|
* stream: remove VCD supportwm42014-06-011-7/+0
| | | | | | | | | If a single person complains, I will readd it. But I don't expect that this will happen. The main reason for removing this is that it's some of the most unclean code remaining, it's unmaintained, and I've never ever heard of someone using it.
* gl_x11: always require some GLX API functions, avoid dlsym()wm42014-05-311-0/+3
| | | | | | | | | | | | | | The functions glXGetProcAddressARB() and glXQueryExtensionsString() were loaded using dlsym(). This could fail when compiling to libmpv, because then dlopen(NULL, ...) will look in the main program's list of libraries, and the libGL linked to libmpv is never considered. (Don't know if this somehow could be worked around.) The result is that using vo_opengl with libmpv can fail. Avoid this by not using dlsym(). glXGetProcAddressARB() was already used directly in the same file, and that never caused any problems. (Still add it to the configure test.) glXQueryExtensionsString() is documented as added in GLX 1.1 - that's ancient.
* 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: removed undefined behavior from PVR checkwm42014-05-111-1/+1
| | | | | | | | This shouldn't matter, but it's probably better if the code to check is valid - otherwise an extremely clever compiler might fail to compile it, and the feature would be misdetected. (Probably.) Found by cppcheck.
* waf: make shlib tasks less noisyMartin Herkt2014-05-071-0/+14
|
* build: use -pthread when availableStefano Pigozzi2014-04-271-0/+13
| | | | | | | | | | | | Our code currently tries to link -lpthread and adds stuff like -D_REENTRANT based on the target platform. GCC actually supports to just pass a -pthread compiler and linker flag that will automatically enable threading and define the correct symbols for the platform, so let's try to just use that as our first choice. clang also supports -pthread but it must be used only as a compiler flag, so we also take care of that scenario with this commit.
* 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-192-40/+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 u