2001-12-16 09:17:33 +01:00
|
|
|
#! /bin/sh
|
2005-06-05 01:04:30 +02:00
|
|
|
#
|
2013-02-01 23:45:04 +01:00
|
|
|
# Copyright 2000-2005, 2008, 2009, 2013 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%"
|
|
|
|
enable_shared="%build_libtool_libs%"
|
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
|
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
|
|
|
|
;;
|
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
|
2013-11-13 08:55:46 +01:00
|
|
|
major=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
|
2009-02-04 08:59:16 +01:00
|
|
|
| grep FREETYPE_MAJOR \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
2013-11-13 08:55:46 +01:00
|
|
|
minor=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
|
2009-02-04 08:59:16 +01:00
|
|
|
| grep FREETYPE_MINOR \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
2013-11-13 08:55:46 +01:00
|
|
|
patch=`grep define ${SYSROOT}$includedir/freetype2/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
|
2009-12-22 00:25:38 +01:00
|
|
|
cflags="-I${SYSROOT}$includedir/freetype2"
|
2013-11-13 08:55:46 +01:00
|
|
|
echo $cflags
|
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
|
2013-08-18 18:34:05 +02:00
|
|
|
libs="-lfreetype %LIBZ% %LIBBZ2% %LIBPNG% %FT2_EXTRA_LIBS%"
|
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
|