2001-12-16 09:17:33 +01:00
|
|
|
#! /bin/sh
|
2005-06-05 01:04:30 +02:00
|
|
|
#
|
2008-06-09 23:27:17 +02:00
|
|
|
# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008 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
|
|
|
|
|
|
|
prefix=@prefix@
|
|
|
|
exec_prefix=@exec_prefix@
|
2004-02-08 23:45:48 +01:00
|
|
|
exec_prefix_set=no
|
|
|
|
includedir=@includedir@
|
|
|
|
libdir=@libdir@
|
2008-06-09 23:27:17 +02:00
|
|
|
enable_shared=@build_libtool_libs@
|
2004-02-08 23:45:48 +01:00
|
|
|
wl=@wl@
|
|
|
|
hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@'
|
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)
|
2001-03-20 08:52:52 +01:00
|
|
|
echo @ft_version@
|
2000-11-10 23:43:37 +01:00
|
|
|
exit 0
|
|
|
|
;;
|
2005-02-10 09:18:27 +01:00
|
|
|
--ftversion)
|
|
|
|
major=`grep define @prefix@/include/freetype2/freetype/freetype.h \
|
|
|
|
| grep FREETYPE_MAJOR \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
|
|
|
minor=`grep define @prefix@/include/freetype2/freetype/freetype.h \
|
|
|
|
| grep FREETYPE_MINOR \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
|
|
|
patch=`grep define @prefix@/include/freetype2/freetype/freetype.h \
|
|
|
|
| grep FREETYPE_PATCH \
|
|
|
|
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
|
|
|
echo $major.$minor.$patch
|
|
|
|
exit 0
|
|
|
|
;;
|
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
|
2004-02-08 23:45:48 +01:00
|
|
|
echo $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
|
2004-02-08 23:45:48 +01:00
|
|
|
echo $exec_prefix
|
|
|
|
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
|
|
|
|
2002-01-13 07:36:02 +01:00
|
|
|
if test "$echo_cflags" = "yes" ; then
|
2004-02-08 23:45:48 +01:00
|
|
|
cflags="-I$includedir/freetype2"
|
|
|
|
if test "$includedir" != "/usr/include" ; then
|
|
|
|
echo $cflags -I$includedir
|
|
|
|
else
|
|
|
|
echo $cflags
|
|
|
|
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_libs" = "yes" ; then
|
2004-02-08 23:45:48 +01:00
|
|
|
rpath=
|
|
|
|
if test "$enable_shared" = "yes" ; then
|
|
|
|
eval "rpath=\"$hardcode_libdir_flag_spec\""
|
|
|
|
fi
|
2006-10-12 03:35:54 +02:00
|
|
|
libs="-lfreetype @LIBZ@ @FT2_EXTRA_LIBS@"
|
2004-11-16 14:06:43 +01:00
|
|
|
if test "$libdir" != "/usr/lib" && test "$libdir" != "/usr/lib64"; then
|
2004-02-08 23:45:48 +01:00
|
|
|
echo -L$libdir $rpath $libs
|
|
|
|
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"
|
|
|
|
echo $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
|