Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #! /bin/sh
  2. #
  3. # Copyright 2000-2005, 2008, 2009, 2013 by
  4. # David Turner, Robert Wilhelm, and Werner Lemberg.
  5. #
  6. # This file is part of the FreeType project, and may only be used, modified,
  7. # and distributed under the terms of the FreeType project license,
  8. # LICENSE.TXT.  By continuing to use, modify, or distribute this file you
  9. # indicate that you have read the license and understand and accept it
  10. # fully.
  11.  
  12. LC_ALL=C
  13. export LC_ALL
  14.  
  15. prefix="/usr/local"
  16. exec_prefix="/usr/local"
  17. exec_prefix_set="no"
  18. includedir="/usr/local/include"
  19. libdir="/usr/local/lib"
  20. enable_shared=""
  21.  
  22. usage()
  23. {
  24.   cat <<EOF
  25. Usage: freetype-config [OPTION]...
  26. Get FreeType compilation and linking information.
  27.  
  28. Options:
  29.   --prefix               display \`--prefix' value used for building the
  30.                          FreeType library
  31.   --prefix=PREFIX        override \`--prefix' value with PREFIX
  32.   --exec-prefix          display \`--exec-prefix' value used for building
  33.                          the FreeType library
  34.   --exec-prefix=EPREFIX  override \`--exec-prefix' value with EPREFIX
  35.   --version              display libtool version of the FreeType library
  36.   --ftversion            display FreeType version number
  37.   --libs                 display flags for linking with the FreeType library
  38.   --libtool              display library name for linking with libtool
  39.   --cflags               display flags for compiling with the FreeType
  40.                          library
  41. EOF
  42.   exit $1
  43. }
  44.  
  45. if test $# -eq 0 ; then
  46.   usage 1 1>&2
  47. fi
  48.  
  49. while test $# -gt 0 ; do
  50.   case "$1" in
  51.   -*=*)
  52.     optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
  53.     ;;
  54.   *)
  55.     optarg=
  56.     ;;
  57.   esac
  58.  
  59.   case $1 in
  60.   --prefix=*)
  61.     prefix=$optarg
  62.     local_prefix=yes
  63.     ;;
  64.   --prefix)
  65.     echo_prefix=yes
  66.     ;;
  67.   --exec-prefix=*)
  68.     exec_prefix=$optarg
  69.     exec_prefix_set=yes
  70.     local_prefix=yes
  71.     ;;
  72.   --exec-prefix)
  73.     echo_exec_prefix=yes
  74.     ;;
  75.   --version)
  76.     echo 16.2.10
  77.     exit 0
  78.     ;;
  79.   --ftversion)
  80.     echo_ft_version=yes
  81.     ;;
  82.   --cflags)
  83.     echo_cflags=yes
  84.     ;;
  85.   --libs)
  86.     echo_libs=yes
  87.     ;;
  88.   --libtool)
  89.     echo_libtool=yes
  90.     ;;
  91.   *)
  92.     usage 1 1>&2
  93.     ;;
  94.   esac
  95.   shift
  96. done
  97.  
  98. if test "$local_prefix" = "yes" ; then
  99.   if test "$exec_prefix_set" != "yes" ; then
  100.     exec_prefix=$prefix
  101.   fi
  102. fi
  103.  
  104. if test "$echo_prefix" = "yes" ; then
  105.   echo ${SYSROOT}$prefix
  106. fi
  107.  
  108. if test "$echo_exec_prefix" = "yes" ; then
  109.   echo ${SYSROOT}$exec_prefix
  110. fi
  111.  
  112. if test "$exec_prefix_set" = "yes" ; then
  113.   libdir=$exec_prefix/lib
  114. else
  115.   if test "$local_prefix" = "yes" ; then
  116.     includedir=$prefix/include
  117.     libdir=$prefix/lib
  118.   fi
  119. fi
  120.  
  121. if test "$echo_ft_version" = "yes" ; then
  122.   major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
  123.          | grep FREETYPE_MAJOR \
  124.          | sed 's/.*[   ]\([0-9][0-9]*\).*/\1/'`
  125.   minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
  126.          | grep FREETYPE_MINOR \
  127.          | sed 's/.*[   ]\([0-9][0-9]*\).*/\1/'`
  128.   patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
  129.          | grep FREETYPE_PATCH \
  130.          | sed 's/.*[   ]\([0-9][0-9]*\).*/\1/'`
  131.   echo $major.$minor.$patch
  132. fi
  133.  
  134. if test "$echo_cflags" = "yes" ; then
  135.   cflags="-I${SYSROOT}$includedir/freetype2"
  136.   if test "${SYSROOT}$includedir" != "/usr/include" ; then
  137.     echo $cflags -I${SYSROOT}$includedir
  138.   else
  139.     echo $cflags
  140.   fi
  141. fi
  142.  
  143. if test "$echo_libs" = "yes" ; then
  144.   libs="-lfreetype   "
  145.   if test "${SYSROOT}$libdir" != "/usr/lib"  &&
  146.      test "${SYSROOT}$libdir" != "/usr/lib64"; then
  147.     echo -L${SYSROOT}$libdir $libs
  148.   else
  149.     echo $libs
  150.   fi
  151. fi
  152.  
  153. if test "$echo_libtool" = "yes" ; then
  154.   convlib="libfreetype.la"
  155.   echo ${SYSROOT}$libdir/$convlib
  156. fi
  157.  
  158. # EOF
  159.