| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, we delay loading Dwrite.dll until runtime to allow building
and running DirectWrite-enabled libass binaries on old Windows versions
that lack DirectWrite. However, this is forbidden in WinRT/UWP.
DirectWrite is present in all versions of Windows that support WinRT/UWP,
so we lose nothing by requiring it.
Older Windows SDKs (Microsoft and MinGW alike) lack <winapifamily.h>,
so include it only if we really need it.
Based on VLC patch for libass:
https://github.com/videolan/vlc/commit/eedb57aa96d2bc0046a6da2e081c75ae9edf8fd5
and on this autoconf code:
https://github.com/lu-zero/mfx_dispatch/commit/c51a54c15f51579804030c70592c0a26065f1242
Note: the VLC patch retained an unconditional call to FreeLibrary
in destroy_provider. However, FreeLibrary does not actually expect
NULL as argument, so this commit adds a guard to that call.
Perhaps FreeLibrary(NULL) simply fails cleanly and that's why
this has not caused VLC problems, but we should not rely on this.
|
| |
|
|
|
|
|
|
|
|
|
| |
This could help us in future bug reports and we already do so for
shapers and freetype. Also include a guess about the source code
version, which may not be entirely reliable. Eg if custom tarballs are
involved or if patches are added after configure was called, the value
will be wrong.
But hopefully it will be "good enough" for most cases.
|
|
|
|
| |
This should fix the warnings introduced with nasm 2.15
|
|
|
|
| |
AC_LANG_PROGRAMM only takes two parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AC_CONFIG_HEADER has been replaced with AC_CONFIG_HEADERS for a long
time and recent version of autotools started complaining about it.
AC_HEADER_STDC has been deemed "obsolescent" and unneeded for
"new programs" since at least autotools 2.60, which was released 2006.
On top of it we're not even using its output variable anywhere to
check if the system headers do in fact conform to the C standard, so
remove this superfluous test.
AC_HEADER_STDBOOL is not obsolecent, but simalarly to AC_HEADER_STDC we
never use its output anywhere, so it can be removed as well.
|
|
|
|
|
|
|
|
|
| |
This patch was adapted from FreeBSD:
https://svnweb.freebsd.org/ports/head/multimedia/libass/files/patch-configure.ac?view=markup
and was also applied in DragonFlyBSD (eventhough DragonFlyBSD dropped
32bit support in 2014)
closes https://github.com/libass/libass/issues/451
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows to eg supply an alternative math library via
LIBS="-lmymath" ./configure
(in case the system has a seperate libm)
This also means user-supplied LIBS now end up in our pc's Libs.private,
which is probably correct for most cases.
In case this assumptions turns out to be wrong and your reading this
after bisecting some obscure error, well sorry about that. To exclude
user-LIBS from pkg_libs again, eg save OLDLIBS="$LIBS" before and then
set pkg_libs="${LIBS#$OLDLIBS}" after locating system libs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libs.* are to be used for libraries not supplying a pc-file, eg system
libs, while Requires.* is meant for libraries which do supply a
*.pc-file.
The public version of those fields is only to be used for libs whose
symbols end up being exposed by our lib, by eg including one of their
headers in our own headers. Those libs must be linked to both for
dynamic and static builds.
The private versions are not directly exposed to users of our lib and
will only be linked to if an static build is requested. Those libs don't
need to be linked for dynamic builds, but _will_ be linked in static
builds. This also has implications for package maintainers, see eg
https://lists.debian.org/debian-devel-announce/2005/11/msg00016.html .
The intent in 7393996cfe0136f130a6a23bb9fb6f4ddce82d87, seems to have
been making this static/dynamic build distinction ourselves. However
this is both a needless complication in our config script as pkg-config
already handles this, and prone to fail as requesting a static build is
required anyway to get the *.private link flags of our dependencies as
well.
The correct way to handle a static build is to request one, eg one way
to do this for an executable built with autotools and pkg-config is:
LDFLAGS="-static" PKG_CONFIG="/usr/bin/pkg-config --static" ./configure
|
|
|
|
|
|
| |
- Prefer Autotool's M4-macros over raw shell constructs
- Consistent indents
- Always quote variables in test expressions
|
|
|
|
|
|
|
|
| |
The result of the stdint.h check is neither used in the config script
nor the code; remove the superfluous stdint-h check.
As we do not use AC_CHECK_HEADERS (not-)found-callbacks or its
additional includes, AC_CHECK_HEADERS_ONCE is sufficient and a tad
faster; replace AC_CHECK_HEADERS with AC_CHECK_HEADERS_ONCE.
|
|
|
|
|
|
| |
We don't use the C-preprocessor standalone and manually choose and
configure NASM as our assembler, so there's no need to let autotools
search for CPP and an assembler.
|
|
|
|
|
|
| |
Due to a misplaced comma this config switch was broken.
A follow-up commit will change our autoconf-style in a way, that should
make it harder for errors like this one to slip in.
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids unneccessary -lm flags on some platforms integrating libm
into libc and allows us to detect systems that do not provide
implementations of math functions in either libc or libm.
The caveat is, that some systems, like FreeBSD split their math
functions between libc and libm. By checking for C99 lrint instead of
C89 fabs, this check correctly includes libm in FreeBSD; let's hope this
also holds for other systems splitting up their math.h implementations.
|
|
|
|
|
|
|
| |
Those were added in commit 29fd129671bb66a2e54717ca666b6ccd7f7ee941
together with the initial DirectWrite implementation, which was in C++.
As of 1c55ca966f356030a863479459055c48e98ed1e5 our DirectWrite
implementation is C, so CXXFLAGS are no longer needed.
|
|
|
|
|
|
|
|
|
|
| |
Commit 8bebabe4a62a6d54cdfecace59c382efa80a8e47 apparently added the
libiconv_open check to support libraries like GNU libiconv defining
their iconv-functions as a macro expanding to lib*. As this i not
immediately obvious, add an explaining comment.
Additionally AC_SEARCH_LIBS will first try to link the ptrogramm with
only the current $LIBS and not add anything to $LIBS if that already
succeeds, thus avoiding adding '-liconv' twice.
|
|
|
|
|
|
|
|
|
| |
This seems to have erronously slipped in again with commit
5ab9950816ffcac46afec4ad327640ab28a49109. It was previously addded in
commmit e572a26d29ddff883880ef7b1c295acaa62a8a2f when all libs were
still added manually and shortly after removed again in commit
4b6a81eb4fd79198ceef813418aaa938190624ba, which switched to generating
pkg_libs from LIBS.
|
|
|
|
|
| |
This should make this a bit easier to understand and more readable.
Apart from comments nothing was removed or added, just reodered.
|
| |
|
|
|
|
|
|
| |
And print an error on attempts to use ASM on an unrecognized system as
NASM would very likely produce borked files anyway.
(erroring out can still be avoided with --disable-asm)
|
| |
|
| |
|
| |
|
|
|
|
| |
`test` subdirectory contains complete test example.
|
| |
|
|
|
|
|
| |
The internal rasterizer cannot be disabled (and the option has
no effect) since commit ef6cc020bc00118a5b142b37fe401327a029a1fc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loosely based on behdad/harfbuzz@b96af03c20e46105982b3608b608614403540661.
Prefer to link against ApplicationServices to maximize the
portability of binaries built on newer versions of macOS.
The symbol kCTFontURLAttribute, which is checked in this commit, was
introduced in Mac OS X 10.6, the latest of any Core Text symbols that
we use. It is essential to our Core Text font provider, so this is the
earliest version of Mac OS X where we can support this font provider.
The TARGET_OS_IPHONE conditional that this commit adds is necessary to
continue supporting iOS in addition to supporting old Mac OS X. On iOS,
CoreText.h *must* be included to use Core Text, whereas on old Mac OS X,
CoreText.h is not directly accessible and ApplicationServices.h must be
used. On modern macOS, either header works. This conditional is also
used in HarfBuzz.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
sizeof(ASS_Style) is actually part of the ABI, so adding the Justify field
in commit e54c123d5a08b6212533ddcced2cb1a50fa3d2b2 broke the ABI even
though we tried to avoid it by placing the field at the end of the struct.
|
| |
|
| |
|
| |
|
|
|
|
| |
Unquoted strings cause an error when the test variable is empty.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
And fix two wrong comments.
Bump the Fontconfig version requirement to 2.10.92 (2.11 RC2), released
on 2013-03-29, to ensure Fontconfig caches and exposes PostScript names.
|
|
|
|
|
|
| |
Library checks can succeed if the needed functions exist in libc
and don't need any extra linker flags. Avoid adding unnecessary
flags (which break static linking against libass) in this case.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This was forgotten. We always load dwrite.dll at runtime, so this isn't
needed.
|
|
|
|
|
|
|
|
|
|
|
| |
There is no real value in it. ENCA only works in some cases and I
can't find any information about software that integrates libass
which relies on it or users that rely on ENCA support in case the
interface is exposed directly (e.g. in MPlayer).
If there is still a wish to have charset detection integrated into
libass (it is out of scope, IMHO), a better library like uchardet
should be used for that.
|
| |
|
| |
|
|
|
|
|
| |
Also, remove the ass_coretext.c conditional compilation hack, and fix
Makefile.am instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, nobody ever tested the MinGW dwrite.h header in C. There
are multiple glaring mistakes, and the header doesn't even compile by
itself. The main issues are overloaded functions (which doesn't work
in C), and broken COBJMACROS defines.
dwrite.diff contains changes to dwrite.h which make libass work.
Warning: the patch lacks a required change to the DrawInlineObject
method of IDWriteTextRenderer (missing THIS_).
Additionally, these definitions would ideally be provided by dwrite.h:
DEFINE_GUID(IID_IDWriteFactory, 0xb859ee5a,0xd838,0x4b5b,0xa2,0xe8,0x1a,0xdc,0x7d,0x93,0xdb,0x48);
DEFINE_GUID(IID_IDWritePixelSnapping, 0xeaf3a2da,0xecf4,0x4d24,0xb6,0x44,0xb3,0x4f,0x68,0x42,0x02,0x4b);
DEFINE_GUID(IID_IDWriteTextRenderer, 0xef8a8135,0x5cc6,0x45fe,0x88,0x25,0xc5,0xa0,0x72,0x4e,0xb8,0x19);
Also, in order to make libass compile out of the box with current
MinGW/msys installations, a very stripped down in-tree copy of dwrite.h
is provided.
|
| |
|
| |
|
|
|
|
|
|
| |
This uses a faux rendering with a high-level interface of DirectWrite
to determine a suitable fallback. Choices are different from GDI,
but reasonable.
|
| |
|
|
|
|
| |
Incomplete, leaks memory, but capable of rendering something.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fontconfig is known to be very slow on OS X and Windows, this has to do with
the extremely prohibitive cache times (which are getting even longer with
latest versions of Fontconfig).
This commits starts to address the problem by using CoreText on OS X to load
the font data. The commit uses the simplest possible approach to load all of
the data in memory and then use it to match. This causes a somewhat slow
startup time (around ~400ms on my i7) but it is already better than waiting
*minutes* for Fontconfig to cache the fonts data.
A later commit will improve the speed of the match by using a hybrid approach
that lazy loads in the libass database only the necessary fonts.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This standard function is not available everywhere, so we detect it and
provide a fallback if missing.
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Rodger Combs <rodger.combs@gmail.com>
|
| |
|
|
|
|
|
|
| |
Adds yasm version check and handles Free/OpenBSD/win32 correctly.
Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
|
| |
|
| |
|