2001-12-16 09:17:33 +01:00
|
|
|
#! /bin/sh
|
2005-06-05 01:04:30 +02:00
|
|
|
#
|
2016-01-13 11:54:10 +01:00
|
|
|
# Copyright 2000-2016 by
|
2005-06-05 01:04:30 +02:00
|
|
|
# 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.
|
2000-11-09 19:23:30 +01:00
|
|
|
|
2013-02-01 23:45:04 +01:00
|
|
|
LC_ALL=C
|
|
|
|
export LC_ALL
|
|
|
|
|
2013-02-08 12:49:41 +01:00
|
|
|
prefix="%prefix%"
|
|
|
|
exec_prefix="%exec_prefix%"
|
|
|
|
exec_prefix_set="no"
|
|
|
|
includedir="%includedir%"
|
|
|
|
libdir="%libdir%"
|
2000-11-09 19:23:30 +01:00
|
|
|
|
|
|
|
usage()
|
|
|
|
{
|
2000-11-10 23:43:37 +01:00
|
|
|
cat <<EOF
|
2004-04-17 20:58:43 +02:00
|
|
|
Usage: freetype-config [OPTION]...
|
|
|
|
Get FreeType compilation and linking information.
|
|
|
|
|
2000-11-09 19:23:30 +01:00
|
|
|
Options:
|
2004-04-17 20:58:43 +02:00
|
|
|
--prefix display \`--prefix' value used for building the
|
|
|
|
FreeType library
|
|
|
|
--prefix=PREFIX override \`--prefix' value with PREFIX
|
|
|
|
--exec-prefix display \`--exec-prefix' value used for building
|
|
|
|
the FreeType library
|
|
|
|
--exec-prefix=EPREFIX override \`--exec-prefix' value with EPREFIX
|
|
|
|
--version display libtool version of the FreeType library
|
2005-02-10 09:18:27 +01:00
|
|
|
--ftversion display FreeType version number
|
2004-04-17 20:58:43 +02:00
|
|
|
--libs display flags for linking with the FreeType library
|
|
|
|
--libtool display library name for linking with libtool
|
|
|
|
--cflags display flags for compiling with the FreeType
|
|
|
|
library
|
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.
2014-03-03 07:13:45 +01:00
|
|
|
--static make command line options display flags
|
|
|
|
for static linking
|
2000-11-09 19:23:30 +01:00
|
|
|
EOF
|
2000-11-10 23:43:37 +01:00
|
|
|
exit $1
|
2000-11-09 19:23:30 +01:00
|
|
|
}
|
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
if test $# -eq 0 ; then
|
2000-11-10 23:43:37 +01:00
|
|
|
usage 1 1>&2
|
2000-11-09 19:23:30 +01:00
|
|
|
fi
|
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
while test $# -gt 0 ; do
|
2000-11-09 19:23:30 +01:00
|
|
|
case "$1" in
|
2004-02-08 23:45:48 +01:00
|
|
|
-*=*)
|
|
|
|
optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
optarg=
|
|
|
|
;;
|
2000-11-09 19:23:30 +01:00
|
|
|
esac
|
|
|
|
|
|
|
|
case $1 in
|
2000-11-10 23:43:37 +01:00
|
|
|
--prefix=*)
|
|
|
|
prefix=$optarg
|
2001-01-12 06:32:04 +01:00
|
|
|
local_prefix=yes
|
2000-11-10 23:43:37 +01:00
|
|
|
;;
|
|
|
|
--prefix)
|
|
|
|
echo_prefix=yes
|
|
|
|
;;
|
|
|
|
--exec-prefix=*)
|
|
|
|
exec_prefix=$optarg
|
|
|
|
exec_prefix_set=yes
|
2001-01-12 06:32:04 +01:00
|
|
|
local_prefix=yes
|
2000-11-10 23:43:37 +01:00
|
|
|
;;
|
|
|
|
--exec-prefix)
|
|
|
|
echo_exec_prefix=yes
|
|
|
|
;;
|
|
|
|
--version)
|
2013-02-08 12:49:41 +01:00
|
|
|
echo %ft_version%
|
2000-11-10 23:43:37 +01:00
|
|
|
exit 0
|
|
|
|
;;
|
2005-02-10 09:18:27 +01:00
|
|
|
--ftversion)
|
2009-02-04 08:59:16 +01:00
|
|
|
echo_ft_version=yes
|
2005-02-10 09:18:27 +01:00
|
|
|
;;
|
2000-11-10 23:43:37 +01:00
|
|
|
--cflags)
|
|
|
|
echo_cflags=yes
|
|
|
|
;;
|
|
|
|
--libs)
|
|
|
|
echo_libs=yes
|
|
|
|
;;
|
2000-11-12 03:55:25 +01:00
|
|
|
--libtool)
|
|
|
|
echo_libtool=yes
|
|
|
|
;;
|
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.
2014-03-03 07:13:45 +01:00
|
|
|
--static)
|
|
|
|
show_static=yes
|
|
|
|
;;
|
2000-11-10 23:43:37 +01:00
|
|
|
*)
|
|
|
|
usage 1 1>&2
|
|
|
|
;;
|
2000-11-09 19:23:30 +01:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
2001-01-12 06:32:04 +01:00
|
|
|
if test "$local_prefix" = "yes" ; then
|
2004-02-08 23:45:48 +01:00
|
|
|
if test "$exec_prefix_set" != "yes" ; then
|
|
|
|
exec_prefix=$prefix
|
|
|
|
fi
|
2000-11-10 23:43:37 +01:00
|
|
|
fi
|
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
if test "$echo_prefix" = "yes" ; then
|
2009-12-22 00:25:38 +01:00
|
|
|
echo ${SYSROOT}$prefix
|
2000-11-09 19:23:30 +01:00
|
|
|
fi
|
2001-12-11 14:38:52 +01:00
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
if test "$echo_exec_prefix" = "yes" ; then
|
2009-12-22 00:25:38 +01:00
|
|
|
echo ${SYSROOT}$exec_prefix
|
2004-02-08 23:45:48 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$exec_prefix_set" = "yes" ; then
|
|
|
|
libdir=$exec_prefix/lib
|
|
|
|
else
|
|
|
|
if test "$local_prefix" = "yes" ; then
|
|
|
|
includedir=$prefix/include
|
|
|
|
libdir=$prefix/lib
|
|
|
|
fi
|
2000-11-09 19:23:30 +01:00
|
|
|
fi
|
2001-12-11 14:38:52 +01:00
|
|
|
|
2009-02-04 08:59:16 +01:00
|
|
|
if test "$echo_ft_version" = "yes" ; then
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
|
2009-02-04 08:59:16 +01:00
|
|
|
| grep FREETYPE_MAJOR \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
|
2009-02-04 08:59:16 +01:00
|
|
|
| grep FREETYPE_MINOR \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
|
2009-02-04 08:59:16 +01:00
|
|
|
| grep FREETYPE_PATCH \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
|
|
|
echo $major.$minor.$patch
|
|
|
|
fi
|
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
if test "$echo_cflags" = "yes" ; then
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
echo -I${SYSROOT}$includedir/freetype2
|
2000-11-09 19:23:30 +01:00
|
|
|
fi
|
2001-12-11 14:38:52 +01:00
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
if test "$echo_libs" = "yes" ; then
|
2014-03-24 19:45:03 +01:00
|
|
|
libs="-lfreetype"
|
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.
2014-03-03 07:13:45 +01:00
|
|
|
staticlibs="%LIBSSTATIC_CONFIG%"
|
|
|
|
if test "$show_static" = "yes" ; then
|
|
|
|
libs="$staticlibs"
|
|
|
|
fi
|
2013-02-08 12:49:41 +01:00
|
|
|
if test "${SYSROOT}$libdir" != "/usr/lib" &&
|
|
|
|
test "${SYSROOT}$libdir" != "/usr/lib64"; then
|
2009-12-22 00:25:38 +01:00
|
|
|
echo -L${SYSROOT}$libdir $libs
|
2004-02-08 23:45:48 +01:00
|
|
|
else
|
|
|
|
echo $libs
|
|
|
|
fi
|
2000-11-09 19:23:30 +01:00
|
|
|
fi
|
2001-12-11 14:38:52 +01:00
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
if test "$echo_libtool" = "yes" ; then
|
2004-02-08 23:45:48 +01:00
|
|
|
convlib="libfreetype.la"
|
2009-12-22 00:25:38 +01:00
|
|
|
echo ${SYSROOT}$libdir/$convlib
|
2000-11-12 03:55:25 +01:00
|
|
|
fi
|
2000-11-09 19:23:30 +01:00
|
|
|
|
2000-11-10 23:43:37 +01:00
|
|
|
# EOF
|