93ebcbd0ac
o Introduce `auto' value for `--with-XXX' library options; this is now the default. o First use `pkg-config' for library detection, then fall back to other tests. * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png, --with-harfbuzz): Rewrite. Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf' variables to collect data for `freetype2.pc' and `freetype-config'. (FT2_EXTRA_LIBS): Renamed to ... (ft2_extra_libs): This since it gets no longer substituted. (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG): New output variables, replacing `XXX_PKG' and `LIBXXX'. Add notice at the end of `configure' showing the library configuration. * builds/unix/freetype-config.in (--static): New command line option. (libs): Updated. (staticlibs): New variable, to be used if `--static' is given. * builds/doc/freetype-config.1: Document `--static'. * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
138 lines
4.2 KiB
Plaintext
138 lines
4.2 KiB
Plaintext
#
|
|
# FreeType 2 configuration rules templates for Unix + configure
|
|
#
|
|
|
|
|
|
# Copyright 1996-2000, 2002, 2004, 2006, 2008, 2013, 2014 by
|
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
#
|
|
# This file is part of the FreeType project, and may only be used, modified,
|
|
# and distributed under the terms of the FreeType project license,
|
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
|
# indicate that you have read the license and understand and accept it
|
|
# fully.
|
|
|
|
SHELL := @SHELL@
|
|
|
|
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
|
|
|
|
DELETE := rm -f
|
|
DELDIR := @RMDIR@
|
|
CAT := cat
|
|
SEP := /
|
|
|
|
# this is used for `make distclean' and `make install'
|
|
OBJ_BUILD ?= $(BUILD_DIR)
|
|
|
|
# don't use `:=' here since the path stuff will be included after this file
|
|
#
|
|
FTSYS_SRC = @FTSYS_SRC@
|
|
|
|
INSTALL := @INSTALL@
|
|
INSTALL_DATA := @INSTALL_DATA@
|
|
INSTALL_PROGRAM := @INSTALL_PROGRAM@
|
|
INSTALL_SCRIPT := @INSTALL_SCRIPT@
|
|
MKINSTALLDIRS := $(BUILD_DIR)/mkinstalldirs
|
|
|
|
CLEAN += $(OBJ_BUILD)/freetype-config \
|
|
$(OBJ_BUILD)/freetype2.pc
|
|
|
|
DISTCLEAN += $(OBJ_BUILD)/config.cache \
|
|
$(OBJ_BUILD)/config.log \
|
|
$(OBJ_BUILD)/config.status \
|
|
$(OBJ_BUILD)/unix-def.mk \
|
|
$(OBJ_BUILD)/unix-cc.mk \
|
|
$(OBJ_BUILD)/ftconfig.h \
|
|
$(LIBTOOL) \
|
|
$(OBJ_BUILD)/Makefile
|
|
|
|
|
|
# Standard installation variables.
|
|
#
|
|
prefix := @prefix@
|
|
exec_prefix := @exec_prefix@
|
|
libdir := @libdir@
|
|
bindir := @bindir@
|
|
includedir := @includedir@
|
|
datarootdir := @datarootdir@
|
|
datadir := @datadir@
|
|
mandir := @mandir@
|
|
|
|
version_info := @version_info@
|
|
|
|
# Variables needed for `freetype-config' and `freetype.pc'.
|
|
#
|
|
REQUIRES_PRIVATE := @REQUIRES_PRIVATE@
|
|
LIBS_PRIVATE := @LIBS_PRIVATE@
|
|
LIBS_CONFIG := @LIBS_CONFIG@
|
|
LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
|
|
build_libtool_libs := @build_libtool_libs@
|
|
ft_version := @ft_version@
|
|
|
|
# The directory where all library files are placed.
|
|
#
|
|
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
|
# to suit particular needs.
|
|
#
|
|
LIB_DIR := $(OBJ_DIR)
|
|
|
|
# The BASE_SRC macro lists all source files that should be included in
|
|
# src/base/ftbase.c. When configure sets up CFLAGS to build ftmac.c,
|
|
# ftmac.c should be added to BASE_SRC.
|
|
ftmac_c := @ftmac_c@
|
|
|
|
# The SYSTEM_ZLIB macro is defined if the user wishes to link dynamically
|
|
# with its system wide zlib. If SYSTEM_ZLIB is 'yes', the zlib part of the
|
|
# ftgzip module is not compiled in.
|
|
SYSTEM_ZLIB := @SYSTEM_ZLIB@
|
|
|
|
|
|
# The NO_OUTPUT macro is appended to command lines in order to ignore
|
|
# the output of some programs.
|
|
#
|
|
NO_OUTPUT := 2> /dev/null
|
|
|
|
|
|
# To support calls like
|
|
#
|
|
# configure --includedir='${libdir}'/freetype2/include
|
|
#
|
|
# we generate `freetype-config' and `freetype.pc' at compile time so that
|
|
# those variables are properly expanded.
|
|
|
|
$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
|
|
rm -f $@ $@.tmp
|
|
sed -e 's|%LIBS_CONFIG%|$(LIBS_CONFIG)|' \
|
|
-e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
|
|
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
|
-e 's|%exec_prefix%|$(exec_prefix)|' \
|
|
-e 's|%ft_version%|$(ft_version)|' \
|
|
-e 's|%includedir%|$(includedir)|' \
|
|
-e 's|%libdir%|$(libdir)|' \
|
|
-e 's|%prefix%|$(prefix)|' \
|
|
$< \
|
|
> $@.tmp
|
|
chmod +x $@.tmp
|
|
chmod a-w $@.tmp
|
|
mv $@.tmp $@
|
|
|
|
$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
|
|
rm -f $@ $@.tmp
|
|
sed -e 's|%REQUIRES_PRIVATE%|$(REQUIRES_PRIVATE)|' \
|
|
-e 's|%LIBS_PRIVATE%|$(LIBS_PRIVATE)|' \
|
|
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
|
-e 's|%exec_prefix%|$(exec_prefix)|' \
|
|
-e 's|%ft_version%|$(ft_version)|' \
|
|
-e 's|%includedir%|$(includedir)|' \
|
|
-e 's|%libdir%|$(libdir)|' \
|
|
-e 's|%prefix%|$(prefix)|' \
|
|
$< \
|
|
> $@.tmp
|
|
chmod a-w $@.tmp
|
|
mv $@.tmp $@
|
|
|
|
all: $(OBJ_BUILD)/freetype-config \
|
|
$(OBJ_BUILD)/freetype2.pc
|
|
|
|
# EOF
|