Rewrite library option handling in `configure'; improve `freetype-config'.
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.
This commit is contained in:
parent
e962a914fd
commit
93ebcbd0ac
29
ChangeLog
29
ChangeLog
|
@ -1,3 +1,32 @@
|
||||||
|
2014-03-03 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Rewrite library option handling in `configure'.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2014-03-01 Werner Lemberg <wl@gnu.org>
|
2014-03-01 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
Avoid `long long' warnings with older gcc compilers.
|
Avoid `long long' warnings with older gcc compilers.
|
||||||
|
|
|
@ -36,6 +36,8 @@ AC_SUBST(EXEEXT)
|
||||||
|
|
||||||
PKG_PROG_PKG_CONFIG([0.24])
|
PKG_PROG_PKG_CONFIG([0.24])
|
||||||
|
|
||||||
|
LT_INIT(win32-dll)
|
||||||
|
|
||||||
|
|
||||||
# checks for native programs to generate building tool
|
# checks for native programs to generate building tool
|
||||||
|
|
||||||
|
@ -287,94 +289,214 @@ AC_SUBST([XX_CFLAGS])
|
||||||
AC_SUBST([XX_ANSIFLAGS])
|
AC_SUBST([XX_ANSIFLAGS])
|
||||||
|
|
||||||
|
|
||||||
|
# All library tests below try `pkg-config' first. If that fails, a function
|
||||||
|
# from the library is tested in the traditional autoconf way (zlib, bzip2),
|
||||||
|
# or a config script is called (libpng).
|
||||||
|
#
|
||||||
|
# The `xxx_reqpriv' variables are for the `Requires.private' field in
|
||||||
|
# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private'
|
||||||
|
# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file.
|
||||||
|
#
|
||||||
|
# The `xxx_libstaticconf' variables are for the `freetype-config' script.
|
||||||
|
#
|
||||||
|
# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the
|
||||||
|
# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set
|
||||||
|
# for a library by the user, no entry for this library is added to
|
||||||
|
# `Requires.private'. Instead, it gets added to `Libs.private'
|
||||||
|
|
||||||
|
|
||||||
# check for system zlib
|
# check for system zlib
|
||||||
|
|
||||||
# don't quote AS_HELP_STRING!
|
|
||||||
AC_ARG_WITH([zlib],
|
AC_ARG_WITH([zlib],
|
||||||
AS_HELP_STRING([--without-zlib],
|
[AS_HELP_STRING([--with-zlib=@<:@yes|no|auto@:>@],
|
||||||
[use internal zlib instead of system-wide]))
|
[use system zlib instead of internal library @<:@default=auto@:>@])],
|
||||||
if test x$with_zlib != xno && test -z "$LIBZ"; then
|
[], [with_zlib=auto])
|
||||||
AC_CHECK_LIB([z],
|
|
||||||
[gzsetparams],
|
have_zlib=no
|
||||||
[AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
|
if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then
|
||||||
fi
|
zlib_pkg="zlib"
|
||||||
if test x$with_zlib != xno && test -n "$LIBZ"; then
|
have_zlib_pkg=no
|
||||||
SYSTEM_ZLIB=yes
|
|
||||||
|
if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then
|
||||||
|
PKG_CHECK_EXISTS([$zlib_pkg], [have_zlib_pkg=yes])
|
||||||
|
fi
|
||||||
|
PKG_CHECK_MODULES([ZLIB], [$zlib_pkg],
|
||||||
|
[have_zlib="yes (pkg-config)"], [:])
|
||||||
|
|
||||||
|
if test $have_zlib_pkg = yes; then
|
||||||
|
# we have zlib.pc
|
||||||
|
zlib_reqpriv="$zlib_pkg"
|
||||||
|
zlib_libpriv=
|
||||||
|
zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"`
|
||||||
|
else
|
||||||
|
zlib_reqpriv=
|
||||||
|
|
||||||
|
if test "$have_zlib" != no; then
|
||||||
|
# ZLIB_CFLAGS and ZLIB_LIBS are set by the user
|
||||||
|
zlib_libpriv="$ZLIB_LIBS"
|
||||||
|
zlib_libstaticconf="$ZLIB_LIBS"
|
||||||
|
have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)"
|
||||||
|
else
|
||||||
|
# fall back to standard autoconf test
|
||||||
|
AC_CHECK_LIB([z],
|
||||||
|
[gzsetparams],
|
||||||
|
[AC_CHECK_HEADER([zlib.h],
|
||||||
|
[have_zlib="yes (autoconf test)"
|
||||||
|
zlib_libpriv="-lz"
|
||||||
|
zlib_libstaticconf="$zlib_libpriv"
|
||||||
|
ZLIB_LIBS="$zlib_libpriv"])])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$with_zlib" = xyes -a "$have_zlib" = no; then
|
||||||
# All library tests below use `pkg-config'. The `XXX_PKG' variables are for
|
AC_MSG_ERROR([external zlib support requested but library not found])
|
||||||
# the `Requires.private' field in `freetype2.pc'; we use the `HAVE_PKG' flag
|
fi
|
||||||
# to insert commas between the entries.
|
|
||||||
HAVE_PKG=no
|
|
||||||
|
|
||||||
|
|
||||||
# check for system libbz2
|
# check for system libbz2
|
||||||
|
|
||||||
HAVE_LIBBZIP2=no
|
|
||||||
# don't quote AS_HELP_STRING!
|
|
||||||
AC_ARG_WITH([bzip2],
|
AC_ARG_WITH([bzip2],
|
||||||
AS_HELP_STRING([--without-bzip2],
|
[AS_HELP_STRING([--with-bzip2=@<:@yes|no|auto@:>@],
|
||||||
[do not support bzip2 compressed fonts]))
|
[support bzip2 compressed fonts @<:@default=auto@:>@])],
|
||||||
if test x$with_bzip2 != xno; then
|
[], [with_bzip2=auto])
|
||||||
BZIP2_PKG="bzip2"
|
|
||||||
# as a side effect, this call sets and creates output variables
|
have_bzip2=no
|
||||||
# BZIP2_CFLAGS and BZIP2_LIBS
|
if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then
|
||||||
PKG_CHECK_MODULES([BZIP2], [$BZIP2_PKG])
|
bzip2_pkg="bzip2"
|
||||||
LIBBZIP2=`$PKG_CONFIG --libs-only-l "$BZIP2_PKG"`
|
have_bzip2_pkg=no
|
||||||
HAVE_LIBBZIP2=yes
|
|
||||||
AC_MSG_RESULT([$BZIP2_LIBS])
|
if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then
|
||||||
if test $HAVE_PKG = no; then
|
PKG_CHECK_EXISTS([$bzip2_pkg], [have_bzip2_pkg=yes])
|
||||||
HAVE_PKG=yes
|
|
||||||
else
|
|
||||||
BZIP2_PKG=", $BZIP2_PKG"
|
|
||||||
fi
|
fi
|
||||||
|
PKG_CHECK_MODULES([BZIP2], [$bzip2_pkg],
|
||||||
|
[have_bzip2="yes (pkg-config)"], [:])
|
||||||
|
|
||||||
|
if test $have_bzip2_pkg = yes; then
|
||||||
|
# we have bzip2.pc
|
||||||
|
bzip2_reqpriv="$bzip2_pkg"
|
||||||
|
bzip2_libpriv=
|
||||||
|
bzip2_libstaticconf=`$PKG_CONFIG --static --libs "$bzip2_pkg"`
|
||||||
|
else
|
||||||
|
bzip2_reqpriv=
|
||||||
|
|
||||||
|
if test "$have_bzip2" != no; then
|
||||||
|
# BZIP2_CFLAGS and BZIP2_LIBS are set by the user
|
||||||
|
bzip2_libpriv="$BZIP2_LIBS"
|
||||||
|
bzip2_libstaticconf="$BZIP2_LIBS"
|
||||||
|
have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)"
|
||||||
|
else
|
||||||
|
# fall back to standard autoconf test
|
||||||
|
AC_CHECK_LIB([bz2],
|
||||||
|
[BZ2_bzDecompress],
|
||||||
|
[AC_CHECK_HEADER([bzlib.h],
|
||||||
|
[have_bzip2="yes (autoconf test)"
|
||||||
|
bzip2_libpriv="-lbz2"
|
||||||
|
bzip2_libstaticconf="$bzip2_libpriv"
|
||||||
|
BZIP2_LIBS="$bzip2_libpriv"])])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then
|
||||||
|
AC_MSG_ERROR([bzip2 support requested but library not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# check for system libpng
|
# check for system libpng
|
||||||
|
|
||||||
HAVE_LIBPNG=no
|
|
||||||
# don't quote AS_HELP_STRING!
|
|
||||||
AC_ARG_WITH([png],
|
AC_ARG_WITH([png],
|
||||||
AS_HELP_STRING([--without-png],
|
[AS_HELP_STRING([--with-png=@<:@yes|no|auto@:>@],
|
||||||
[do not support png compressed OpenType embedded bitmaps]))
|
[support png compressed OpenType embedded bitmaps @<:@default=auto@:>@])],
|
||||||
if test x$with_png != xno; then
|
[], [with_png=auto])
|
||||||
LIBPNG_PKG="libpng"
|
|
||||||
# as a side effect, this call sets and creates output variables
|
have_libpng=no
|
||||||
# LIBPNG_CFLAGS and LIBPNG_LIBS
|
if test x"$with_png" = xyes -o x"$with_png" = xauto; then
|
||||||
PKG_CHECK_MODULES([LIBPNG], [$LIBPNG_PKG])
|
libpng_pkg="libpng"
|
||||||
LIBPNG=`$PKG_CONFIG --libs-only-l "$LIBPNG_PKG"`
|
have_libpng_pkg=no
|
||||||
HAVE_LIBPNG=yes
|
|
||||||
AC_MSG_RESULT([$LIBPNG_LIBS])
|
if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then
|
||||||
if test $HAVE_PKG = no; then
|
PKG_CHECK_EXISTS([$libpng_pkg], [have_libpng_pkg=yes])
|
||||||
HAVE_PKG=yes
|
|
||||||
else
|
|
||||||
LIBPNG_PKG=", $LIBPNG_PKG"
|
|
||||||
fi
|
fi
|
||||||
|
PKG_CHECK_MODULES([LIBPNG], [$libpng_pkg],
|
||||||
|
[have_libpng="yes (pkg-config)"], [:])
|
||||||
|
|
||||||
|
if test $have_libpng_pkg = yes; then
|
||||||
|
# we have libpng.pc
|
||||||
|
libpng_reqpriv="$libpng_pkg"
|
||||||
|
libpng_libpriv=
|
||||||
|
libpng_libstaticconf=`$PKG_CONFIG --static --libs "$libpng_pkg"`
|
||||||
|
else
|
||||||
|
libpng_reqpriv=
|
||||||
|
|
||||||
|
if test "$have_libpng" != no; then
|
||||||
|
# LIBPNG_CFLAGS and LIBPNG_LIBS are set by the user
|
||||||
|
libpng_libpriv="$LIBPNG_LIBS"
|
||||||
|
libpng_libstaticconf="$LIBPNG_LIBS"
|
||||||
|
have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)"
|
||||||
|
else
|
||||||
|
# fall back to config script.
|
||||||
|
AC_MSG_CHECKING([for libpng-config])
|
||||||
|
if which libpng-config > /dev/null; then
|
||||||
|
LIBPNG_CFLAGS=`libpng-config --cflags`
|
||||||
|
LIBPNG_LIBS=`libpng-config --ldflags`
|
||||||
|
libpng_libpriv=`libpng-config --static --ldflags`
|
||||||
|
libpng_libstaticconf="$libpng_libpriv"
|
||||||
|
have_libpng="yes (libpng-config)"
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$with_png" = xyes -a "$have_libpng" = no; then
|
||||||
|
AC_MSG_ERROR([libpng support requested but library not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# check for system libharfbuzz
|
# check for system libharfbuzz
|
||||||
|
|
||||||
HAVE_HARFBUZZ=no
|
|
||||||
# don't quote AS_HELP_STRING!
|
|
||||||
AC_ARG_WITH([harfbuzz],
|
AC_ARG_WITH([harfbuzz],
|
||||||
AS_HELP_STRING([--without-harfbuzz],
|
[AS_HELP_STRING([--with-harfbuzz=@<:@yes|no|auto@:>@],
|
||||||
[do not use improved auto-hinting of OpenType fonts]))
|
[improve auto-hinting of OpenType fonts @<:@default=auto@:>@])],
|
||||||
if test x$with_harfbuzz != xno; then
|
[], [with_harfbuzz=auto])
|
||||||
HARFBUZZ_PKG="harfbuzz >= 0.9.19"
|
|
||||||
# as a side effect, this call sets and creates output variables
|
have_harfbuzz=no
|
||||||
# HARFBUZZ_CFLAGS and HARFBUZZ_LIBS
|
if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
|
||||||
PKG_CHECK_MODULES([HARFBUZZ], [$HARFBUZZ_PKG])
|
harfbuzz_pkg="harfbuzz >= 0.9.19"
|
||||||
LIBHARFBUZZ=`$PKG_CONFIG --libs-only-l "$HARFBUZZ_PKG"`
|
have_harfbuzz_pkg=no
|
||||||
HAVE_LIBHARFBUZZ=yes
|
|
||||||
AC_MSG_RESULT([$HARFBUZZ_LIBS])
|
if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
|
||||||
if test $HAVE_PKG = no; then
|
PKG_CHECK_EXISTS([$harfbuzz_pkg], [have_harfbuzz_pkg=yes])
|
||||||
HAVE_PKG=yes
|
|
||||||
else
|
|
||||||
HARFBUZZ_PKG=", $HARFBUZZ_PKG"
|
|
||||||
fi
|
fi
|
||||||
|
PKG_CHECK_MODULES([HARFBUZZ], [$harfbuzz_pkg],
|
||||||
|
[have_harfbuzz="yes (pkg-config)"], [:])
|
||||||
|
|
||||||
|
if test $have_harfbuzz_pkg = yes; then
|
||||||
|
# we have harfbuzz.pc
|
||||||
|
harfbuzz_reqpriv="$harfbuzz_pkg"
|
||||||
|
harfbuzz_libpriv=
|
||||||
|
harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"`
|
||||||
|
else
|
||||||
|
harfbuzz_reqpriv=
|
||||||
|
|
||||||
|
if test "$have_harfbuzz" != no; then
|
||||||
|
# HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user
|
||||||
|
harfbuzz_libpriv="$HARFBUZZ_LIBS"
|
||||||
|
harfbuzz_libstaticconf="$HARFBUZZ_LIBS"
|
||||||
|
have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)"
|
||||||
|
else
|
||||||
|
# since HarfBuzz is quite a new library we don't fall back to a
|
||||||
|
# different test; additionally, it has too many dependencies
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
|
||||||
|
AC_MSG_ERROR([harfbuzz support requested but library not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -426,15 +548,14 @@ set ${save_config_args}
|
||||||
|
|
||||||
ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default
|
ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default
|
||||||
|
|
||||||
# don't quote AS_HELP_STRING!
|
|
||||||
AC_ARG_WITH([old-mac-fonts],
|
AC_ARG_WITH([old-mac-fonts],
|
||||||
AS_HELP_STRING([--with-old-mac-fonts],
|
AS_HELP_STRING([--with-old-mac-fonts],
|
||||||
[allow Mac resource-based fonts to be used]))
|
[allow Mac resource-based fonts to be used]))
|
||||||
if test x$with_old_mac_fonts = xyes; then
|
if test x$with_old_mac_fonts = xyes; then
|
||||||
orig_LDFLAGS="${LDFLAGS}"
|
orig_LDFLAGS="${LDFLAGS}"
|
||||||
AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X])
|
AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X])
|
||||||
FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
|
ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
|
||||||
LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
|
LDFLAGS="$LDFLAGS $ft2_extra_libs"
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
|
|
||||||
|
@ -520,7 +641,7 @@ if test x$with_old_mac_fonts = xyes; then
|
||||||
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
|
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
|
||||||
])],
|
])],
|
||||||
[AC_MSG_RESULT([not found])
|
[AC_MSG_RESULT([not found])
|
||||||
FT2_EXTRA_LIBS=""
|
ft2_extra_libs=""
|
||||||
LDFLAGS="${orig_LDFLAGS}"
|
LDFLAGS="${orig_LDFLAGS}"
|
||||||
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
|
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
|
||||||
else
|
else
|
||||||
|
@ -740,7 +861,6 @@ fi
|
||||||
|
|
||||||
# Whether to use AppleTypeService since Mac OS X.
|
# Whether to use AppleTypeService since Mac OS X.
|
||||||
|
|
||||||
# don't quote AS_HELP_STRING!
|
|
||||||
AC_ARG_WITH([ats],
|
AC_ARG_WITH([ats],
|
||||||
AS_HELP_STRING([--with-ats],
|
AS_HELP_STRING([--with-ats],
|
||||||
[use AppleTypeService, if available (default=yes)]))
|
[use AppleTypeService, if available (default=yes)]))
|
||||||
|
@ -791,41 +911,91 @@ case "$CFLAGS" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# entries in Requires.private are separated by commas;
|
||||||
|
REQUIRES_PRIVATE="$zlib_reqpriv, \
|
||||||
|
$bzip2_reqpriv, \
|
||||||
|
$libpng_reqpriv, \
|
||||||
|
$harfbuzz_reqpriv"
|
||||||
|
# beautify
|
||||||
|
REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \
|
||||||
|
| sed -e 's/^ *//' \
|
||||||
|
-e 's/ *$//' \
|
||||||
|
-e 's/, */,/g' \
|
||||||
|
-e 's/,,*/,/g' \
|
||||||
|
-e 's/^,*//' \
|
||||||
|
-e 's/,*$//' \
|
||||||
|
-e 's/,/, /g'`
|
||||||
|
|
||||||
|
LIBS_PRIVATE="$zlib_libpriv \
|
||||||
|
$bzip2_libpriv \
|
||||||
|
$libpng_libpriv \
|
||||||
|
$harfbuzz_libpriv \
|
||||||
|
$ft2_extra_libs"
|
||||||
|
# beautify
|
||||||
|
LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \
|
||||||
|
| sed -e 's/^ *//' \
|
||||||
|
-e 's/ *$//' \
|
||||||
|
-e 's/ */ /g'`
|
||||||
|
|
||||||
|
LIBS_CONFIG="-lfreetype \
|
||||||
|
$ZLIB_LIBS \
|
||||||
|
$BZIP2_LIBS \
|
||||||
|
$LIBPNG_LIBS \
|
||||||
|
$HARFBUZZ_LIBS \
|
||||||
|
$ft2_extra_libs"
|
||||||
|
# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
|
||||||
|
# on if necessary; also beautify
|
||||||
|
LIBS_CONFIG=`echo "$LIBS_CONFIG" \
|
||||||
|
| sed -e 's|-L */usr/lib64/* | |g' \
|
||||||
|
-e 's|-L */usr/lib/* | |g' \
|
||||||
|
-e 's/^ *//' \
|
||||||
|
-e 's/ *$//' \
|
||||||
|
-e 's/ */ /g'`
|
||||||
|
|
||||||
|
LIBSSTATIC_CONFIG="-lfreetype \
|
||||||
|
$zlib_libstaticconf \
|
||||||
|
$bzip2_libstaticconf \
|
||||||
|
$libpng_libstaticconf \
|
||||||
|
$harfbuzz_libstaticconf \
|
||||||
|
$ft2_extra_libs"
|
||||||
|
# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
|
||||||
|
# on if necessary; also beautify
|
||||||
|
LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \
|
||||||
|
| sed -e 's|-L */usr/lib64/* | |g' \
|
||||||
|
-e 's|-L */usr/lib/* | |g' \
|
||||||
|
-e 's/^ *//' \
|
||||||
|
-e 's/ *$//' \
|
||||||
|
-e 's/ */ /g'`
|
||||||
|
|
||||||
|
|
||||||
AC_SUBST([ftmac_c])
|
AC_SUBST([ftmac_c])
|
||||||
AC_SUBST([LIBZ])
|
AC_SUBST([REQUIRES_PRIVATE])
|
||||||
AC_SUBST([LIBBZIP2])
|
AC_SUBST([LIBS_PRIVATE])
|
||||||
AC_SUBST([LIBPNG])
|
AC_SUBST([LIBS_CONFIG])
|
||||||
AC_SUBST([LIBHARFBUZZ])
|
AC_SUBST([LIBSSTATIC_CONFIG])
|
||||||
AC_SUBST([FT2_EXTRA_LIBS])
|
|
||||||
AC_SUBST([SYSTEM_ZLIB])
|
|
||||||
|
|
||||||
AC_SUBST([BZIP2_PKG])
|
|
||||||
AC_SUBST([LIBPNG_PKG])
|
|
||||||
AC_SUBST([HARFBUZZ_PKG])
|
|
||||||
|
|
||||||
LT_INIT(win32-dll)
|
|
||||||
|
|
||||||
AC_SUBST([hardcode_libdir_flag_spec])
|
AC_SUBST([hardcode_libdir_flag_spec])
|
||||||
AC_SUBST([wl])
|
AC_SUBST([wl])
|
||||||
AC_SUBST([build_libtool_libs])
|
AC_SUBST([build_libtool_libs])
|
||||||
|
|
||||||
|
|
||||||
# changing LDFLAGS value should only be done after
|
# changing LDFLAGS value should only be done after
|
||||||
# lt_cv_prog_compiler_static_works test
|
# lt_cv_prog_compiler_static_works test
|
||||||
|
|
||||||
if test x$SYSTEM_ZLIB = xyes; then
|
if test "$have_zlib" != no; then
|
||||||
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
|
CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
|
||||||
LDFLAGS="$LDFLAGS $LIBZ"
|
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$HAVE_LIBBZIP2 = xyes; then
|
if test "$have_bzip2" != no; then
|
||||||
CFLAGS="$CFLAGS $LIBBZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
|
CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
|
||||||
LDFLAGS="$LDFLAGS $LIBBZIP2_LIBS"
|
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
|
||||||
fi
|
fi
|
||||||
if test x$HAVE_LIBPNG = xyes; then
|
if test x"$have_libpng" != no; then
|
||||||
CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
|
CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
|
||||||
LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
|
LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
|
||||||
fi
|
fi
|
||||||
if test x$HAVE_LIBHARFBUZZ = xyes; then
|
if test x"$have_harfbuzz" != no; then
|
||||||
CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
|
CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
|
||||||
LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
|
LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
|
||||||
fi
|
fi
|
||||||
|
@ -855,4 +1025,13 @@ AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
AC_MSG_NOTICE([
|
||||||
|
|
||||||
|
Library configuration:
|
||||||
|
external zlib: $have_zlib
|
||||||
|
bzip2: $have_bzip2
|
||||||
|
libpng: $have_libpng
|
||||||
|
harfbuzz: $have_harfbuzz
|
||||||
|
])
|
||||||
|
|
||||||
# end of configure.raw
|
# end of configure.raw
|
||||||
|
|
|
@ -38,6 +38,8 @@ Options:
|
||||||
--libtool display library name for linking with libtool
|
--libtool display library name for linking with libtool
|
||||||
--cflags display flags for compiling with the FreeType
|
--cflags display flags for compiling with the FreeType
|
||||||
library
|
library
|
||||||
|
--static make command line options display flags
|
||||||
|
for static linking
|
||||||
EOF
|
EOF
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
@ -88,6 +90,9 @@ while test $# -gt 0 ; do
|
||||||
--libtool)
|
--libtool)
|
||||||
echo_libtool=yes
|
echo_libtool=yes
|
||||||
;;
|
;;
|
||||||
|
--static)
|
||||||
|
show_static=yes
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage 1 1>&2
|
usage 1 1>&2
|
||||||
;;
|
;;
|
||||||
|
@ -137,7 +142,11 @@ if test "$echo_cflags" = "yes" ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$echo_libs" = "yes" ; then
|
if test "$echo_libs" = "yes" ; then
|
||||||
libs="-lfreetype %LIBZ% %LIBBZIP2% %LIBPNG% %LIBHARFBUZZ% %FT2_EXTRA_LIBS%"
|
libs="%LIBS_CONFIG%"
|
||||||
|
staticlibs="%LIBSSTATIC_CONFIG%"
|
||||||
|
if test "$show_static" = "yes" ; then
|
||||||
|
libs="$staticlibs"
|
||||||
|
fi
|
||||||
if test "${SYSROOT}$libdir" != "/usr/lib" &&
|
if test "${SYSROOT}$libdir" != "/usr/lib" &&
|
||||||
test "${SYSROOT}$libdir" != "/usr/lib64"; then
|
test "${SYSROOT}$libdir" != "/usr/lib64"; then
|
||||||
echo -L${SYSROOT}$libdir $libs
|
echo -L${SYSROOT}$libdir $libs
|
||||||
|
|
|
@ -8,7 +8,7 @@ URL: http://freetype.org
|
||||||
Description: A free, high-quality, and portable font engine.
|
Description: A free, high-quality, and portable font engine.
|
||||||
Version: %ft_version%
|
Version: %ft_version%
|
||||||
Requires:
|
Requires:
|
||||||
Requires.private: %BZIP2_PKG%%LIBPNG_PKG%%HARFBUZZ_PKG%
|
Requires.private: %REQUIRES_PRIVATE%
|
||||||
Libs: -L${libdir} -lfreetype
|
Libs: -L${libdir} -lfreetype
|
||||||
Libs.private: %LIBZ% %FT2_EXTRA_LIBS%
|
Libs.private: %LIBS_PRIVATE%
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|
|
@ -62,16 +62,12 @@ version_info := @version_info@
|
||||||
|
|
||||||
# Variables needed for `freetype-config' and `freetype.pc'.
|
# Variables needed for `freetype-config' and `freetype.pc'.
|
||||||
#
|
#
|
||||||
FT2_EXTRA_LIBS := @FT2_EXTRA_LIBS@
|
REQUIRES_PRIVATE := @REQUIRES_PRIVATE@
|
||||||
LIBZ := @LIBZ@
|
LIBS_PRIVATE := @LIBS_PRIVATE@
|
||||||
LIBBZIP2 := @LIBBZIP2@
|
LIBS_CONFIG := @LIBS_CONFIG@
|
||||||
LIBPNG := @LIBPNG@
|
LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
|
||||||
LIBHARFBUZZ := @LIBHARFBUZZ@
|
|
||||||
build_libtool_libs := @build_libtool_libs@
|
build_libtool_libs := @build_libtool_libs@
|
||||||
ft_version := @ft_version@
|
ft_version := @ft_version@
|
||||||
BZIP2_PKG := @BZIP2_PKG@
|
|
||||||
LIBPNG_PKG := @LIBPNG_PKG@
|
|
||||||
HARFBUZZ_PKG := @HARFBUZZ_PKG@
|
|
||||||
|
|
||||||
# The directory where all library files are placed.
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
|
@ -106,18 +102,15 @@ NO_OUTPUT := 2> /dev/null
|
||||||
|
|
||||||
$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
|
$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
|
||||||
rm -f $@ $@.tmp
|
rm -f $@ $@.tmp
|
||||||
sed -e 's|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \
|
sed -e 's|%LIBS_CONFIG%|$(LIBS_CONFIG)|' \
|
||||||
-e 's|%LIBZ%|$(LIBZ)|' \
|
-e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
|
||||||
-e 's|%LIBBZIP2%|$(LIBBZIP2)|' \
|
|
||||||
-e 's|%LIBPNG%|$(LIBPNG)|' \
|
|
||||||
-e 's|%LIBHARFBUZZ%|$(LIBHARFBUZZ)|' \
|
|
||||||
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
||||||
-e 's|%exec_prefix%|$(exec_prefix)|' \
|
-e 's|%exec_prefix%|$(exec_prefix)|' \
|
||||||
-e 's|%ft_version%|$(ft_version)|' \
|
-e 's|%ft_version%|$(ft_version)|' \
|
||||||
-e 's|%includedir%|$(includedir)|' \
|
-e 's|%includedir%|$(includedir)|' \
|
||||||
-e 's|%libdir%|$(libdir)|' \
|
-e 's|%libdir%|$(libdir)|' \
|
||||||
-e 's|%prefix%|$(prefix)|' \
|
-e 's|%prefix%|$(prefix)|' \
|
||||||
$< \
|
$< \
|
||||||
> $@.tmp
|
> $@.tmp
|
||||||
chmod +x $@.tmp
|
chmod +x $@.tmp
|
||||||
chmod a-w $@.tmp
|
chmod a-w $@.tmp
|
||||||
|
@ -125,18 +118,15 @@ $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
|
||||||
|
|
||||||
$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
|
$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
|
||||||
rm -f $@ $@.tmp
|
rm -f $@ $@.tmp
|
||||||
sed -e 's|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \
|
sed -e 's|%REQUIRES_PRIVATE%|$(REQUIRES_PRIVATE)|' \
|
||||||
-e 's|%LIBZ%|$(LIBZ)|' \
|
-e 's|%LIBS_PRIVATE%|$(LIBS_PRIVATE)|' \
|
||||||
-e 's|%BZIP2_PKG%|$(BZIP2_PKG)|' \
|
|
||||||
-e 's|%LIBPNG_PKG%|$(LIBPNG_PKG)|' \
|
|
||||||
-e 's|%HARFBUZZ_PKG%|$(HARFBUZZ_PKG)|' \
|
|
||||||
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
||||||
-e 's|%exec_prefix%|$(exec_prefix)|' \
|
-e 's|%exec_prefix%|$(exec_prefix)|' \
|
||||||
-e 's|%ft_version%|$(ft_version)|' \
|
-e 's|%ft_version%|$(ft_version)|' \
|
||||||
-e 's|%includedir%|$(includedir)|' \
|
-e 's|%includedir%|$(includedir)|' \
|
||||||
-e 's|%libdir%|$(libdir)|' \
|
-e 's|%libdir%|$(libdir)|' \
|
||||||
-e 's|%prefix%|$(prefix)|' \
|
-e 's|%prefix%|$(prefix)|' \
|
||||||
$< \
|
$< \
|
||||||
> $@.tmp
|
> $@.tmp
|
||||||
chmod a-w $@.tmp
|
chmod a-w $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
|
@ -68,6 +68,10 @@ Return compiler flags for linking with the installed FreeType library.
|
||||||
.B \-\-cflags
|
.B \-\-cflags
|
||||||
Return compiler flags for compiling against the installed FreeType library.
|
Return compiler flags for compiling against the installed FreeType library.
|
||||||
.
|
.
|
||||||
|
.TP
|
||||||
|
.B \-\-static
|
||||||
|
Make command line options display flags for static linking.
|
||||||
|
.
|
||||||
.
|
.
|
||||||
.SS Path override options
|
.SS Path override options
|
||||||
.
|
.
|
||||||
|
|
Loading…
Reference in New Issue