This fixes warnings reported by autoupdate.
* builds/unix/ax_pthread.m4: Replace `as_echo` with `AS_ECHO`.
* builds/unix/configure.raw: Remove obsolete `AC_HEADER_STDC`.
Don't escape back quotes in messages for `AC_MSG_WARN`.
<top_level>: Use `TOP_DIR` in `wildcard` function.
(check_out_submodule, copy_submodule): Move down to come after
definition of `all` rule.
Call `mkdir` conditionally.
We use a dummy variable to catch its output. Otherwise the `make`
program is going to interpret the return value of `shell`; this can
cause obscure warning or error messages or even be harmful.
This is for future changes with Meson, which doesn't allow a
different name for its `subprojects` directory. Having both a
`submodules` and a `subprojects` directory is confusing.
* .gitmodules, autogen.sh (copy_submodule_files, DLG_INC_DIR,
DLG_SRC_DIR): Updated.
* builds/toplevel.mk (<top-level>, do-dist),
builds/windows/vc2010/script.bat: Updated.
* src/tools/no-copyright: Updated.
This is needed to make commit f1f9705f9 work.
* CMakeLists.txt (HARFBUZZ_MIN_VERSION), builds/unix/configure.raw
(harfbuzz_pkg), meson.build (harfbuzz_dep): Updated.
* autogen.sh (copy_submodule_file), builds/toplevel.mk: Redirect
stderr to `/dev/null`.
* builds/toplevel.mk: Move code block to handle 'dlg' stuff into
`check_platform` conditional.
Also fix wildcard expressions for guarding `git submodule` commands.
Also make file copying work with non-Unix platforms (untested).
Other compilers are unchanged.
* builds/compiler/gcc-dev.mk, builds/compiler/gcc.mk (ANSIFLAGS):
s/-ansi/-std=c99/.
* builds/freetype.mk (FT_CFLAGS): Remove `-std=c99`.
* builds/unix/configure.raw: Handle C99.
Remove no longer needed test for gcc 4.6 and earlier.
* builds/unix/ax_pthread.m4: New file, taken from 'autoconf-archive'
git repository.
* builds/unix/configure.raw: Check for 'pthread'; also check whether
it works.
Based on a patch by Priyesh.
* include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH):
New macro.
* src/base/ftdebug.c, builds/windows/ftdebug.c (ft_log_handler):
Print logs after a fixed width to handle different lengths of
`FT_COMPONENT` entries.
Use `ft_strrchr` to check for final newline character.
We only support Visual C++ 2010 and newer.
* builds/windows/vc2010/script.bat: New windows batch file to copy
necessary 'dlg' files from `submodules/dlg` to `src/dlg`. This file
is used as a pre-built event in Visual C++.
* builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
* builds/windows/vc2010/freetype.vcxproj.filters: Add
`src/dlgwrap.c`.
* builds/windows/vc2010/freetype.vcxproj
(AdditionalIncludeDirectories): Add include files of dlg for 'Debug'
and 'Debug Static' configurations on both 'x64' and 'win32'
platforms.
(PreprocessorDefinitions): Add `FT_LOGGING` for 'Debug' and 'Debug
Static' configurations on both 'x64' and 'win32' platforms.
Add `DLG_STATIC' for 'Debug' configuration on 'x64' and 'win32'
platforms.
(DisableLanguageExtensions): We need to disable the `/Za` option
when building 'dlg' with FreeType as 'dlg' strictly follows the C99
standard. Visual C++ produces behaves unexpectedly when
compiling a C99 file with `/Za` option enabled.
* autogen.sh (copy_submodule_files): New script to copy all the
necessary source and include files from `submodules/dlg` to
`src/dlg`.
* src/dlg/dlgwrap.c: New wrapper file for `src/dlg.c`. It enables
the build of 'dlg' if the `FT_LOGGING` macro is defined.
* src/dlg/rules.mk: New sub-Makefile.
* builds/freetype.mk (DLG_DIR): New variable to include the
header files of the 'dlg' library.
(INCLUDES): Add `DLG_DIR`.
(FT_CFLAGS): Add `-std=c99' flag.
Include `src/dlg/rules.mk` file to build 'dlg' library.
(OBJ_S, OBJ_M): Add `DLG_OBJS_M` and `DLG_OBJS_S`.
* builds/toplevel.mk: For builds directly from the git repository
we need to copy files from `submodule/dlg` to `src/dlg`.
* include/freetype/config/ftoption.h, devel/ftoption.h (FT_LOGGING):
New macro to enable or disable the logging facility in FreeType.
==========================
Tag sources with `VER-2-10-4'.
* docs/VERSION.TXT: Add entry for version 2.10.4.
* docs/CHANGES: Updated.
* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/index.html, docs/freetype-config.1:
s/2.10.3/2.10.4/, s/2103/2104/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
* builds/unix/configure.raw (version_info): Set to 23:4:17.
* CMakeLists.txt (VERSION_PATCH): Set to 4.
==========================
Tag sources with `VER-2-10-3'.
* docs/VERSION.TXT: Add entry for version 2.10.3.
* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/index.html, docs/freetype-config.1:
s/2.10.2/2.10.3/, s/2102/2103/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
* builds/unix/configure.raw (version_info): Set to 23:3:17.
* CMakeLists.txt (VERSION_PATCH): Set to 3.
Example usage:
# Configure Meson build in directory `build-meson` to generate
# release binaries comparable to to the ones from the
# autotools/make build system.
meson setup build-meson \
--prefix=/usr/local \
--buildtype=debugoptimized \
--strip \
-Db_ndebug=true
# After configuring the Meson build with the above command,
# compile and install to `/usr/local/`; this includes a pkg-config
# file.
ninja -C build-meson install
# Alternatively, compile and install to `/tmp/aa/usr/local/...`
# for packaging.
DESTDIR=/tmp/aa ninja -C build-meson install
# Generate documentation under `build-meson/docs`.
ninja -C build-meson docs
Library size comparison for stripped `libfreetype.so` generated by
all three build systems:
- Default build (autotools + libtool): 712 KiB
- CMake build (RelWithDebInfo): 712 KiB
- Meson build: 712 KiB
* meson.build: New top-level Meson build file for the library.
* meson_options.txt: New file. It holds user-selectable options for
the build, which can be printed with `meson configure`, and selected
at `meson setup` or `meson --reconfigure` time with
`-D<option>=<value>`.
* scripts/parse_modules_cfg.py: A script invoked by `meson.build` to
parse `modules.cfg` and extract important information out of it
(i.e., the list of modules).
* scripts/process_ftoption_h.py: New script invoked by `meson.build`
to process the original `ftoption.h` file. It enables or disables
configuration macro variables based on the available dependencies.
This is similar to what other build systems are using (i.e., Meson's
`configure_file()` command is not used here).
* scripts/extract_freetype_version.py: New script invoked by
`meson.build` to extract the FreeType version number from
`<freetype/freetype.h>`.
* scripts/extract_libtool_version.py: New script invoked by
`meson.build` to extract the libtool `revision_info` data from
`builds/unix/configure.raw`, and to generate the corresponding
shared library suffix.
* scripts/generate_reference_docs.py: New script invoked by
`meson.build` to generate the FreeType 2 reference documentation
(using the `docwriter` and `mkdocs` packages, which must be already
installed).
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h: Split off macro definitions
required by the FreeType API headers to...
* include/freetype/config/public-macros.h: ...this new file.
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h: Split off macro definitions used
by the library but not to be exposed to clients to...
* include/freetype/config/compiler-macros.h: ...this new file.
* include/freetype/internal/*.h, src/raster/ftraster.h: Include
`compiler-macros.h' where needed.
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h: Split off mac-specific stuff
to...
* include/freetype/config/mac-support.h: ...this new file.
* CMakeLists.txt, builds/unix/configure.raw: Remove `/undef ->
#undef' string replacement; the affected code is no longer part of
the `ftconfig.h' template.
Refactor some of the `ftconfig.h' headers and template to move the
definition of the FreeType integer types (e.g., `FT_Int16') to a
common header file `freetype/config/integer-types.h'.
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h: Split off integer type
definition stuff to...
* include/freetype/config/integer-types.h: ...this new file.
* builds/unix/ftconfig.h.in: Control the definition of
`FT_SIZEOF_INT' and `FT_SIZEOF_LONG' with macro
`FT_USE_AUTOCONF_SIZEOF_TYPES'. If these are not defined, auto
detection happens in `integer-types.h' as usual based on `INTXX_MAX'
values. Otherwise the autoconf-detected values are used.
* builds/unix/configure.raw (CPPFLAGS): Don't include path to
`config' directory. Instead, ...
(FT_CONFIG_STANDARD_LIBRARY_H): Use complete path.