You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

161 lines
3.7 KiB

  1. #! /bin/sh
  2. #
  3. # Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 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. prefix=`dirname $0`/..
  12. exec_prefix=${prefix}
  13. exec_prefix_set=no
  14. includedir=${prefix}/include
  15. libdir=${exec_prefix}/lib
  16. enable_shared=
  17. wl=-Wl,
  18. hardcode_libdir_flag_spec='-L$libdir'
  19. usage()
  20. {
  21. cat <<EOF
  22. Usage: freetype-config [OPTION]...
  23. Get FreeType compilation and linking information.
  24. Options:
  25. --prefix display \`--prefix' value used for building the
  26. FreeType library
  27. --prefix=PREFIX override \`--prefix' value with PREFIX
  28. --exec-prefix display \`--exec-prefix' value used for building
  29. the FreeType library
  30. --exec-prefix=EPREFIX override \`--exec-prefix' value with EPREFIX
  31. --version display libtool version of the FreeType library
  32. --ftversion display FreeType version number
  33. --libs display flags for linking with the FreeType library
  34. --libtool display library name for linking with libtool
  35. --cflags display flags for compiling with the FreeType
  36. library
  37. EOF
  38. exit $1
  39. }
  40. if test $# -eq 0 ; then
  41. usage 1 1>&2
  42. fi
  43. while test $# -gt 0 ; do
  44. case "$1" in
  45. -*=*)
  46. optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
  47. ;;
  48. *)
  49. optarg=
  50. ;;
  51. esac
  52. case $1 in
  53. --prefix=*)
  54. prefix=$optarg
  55. local_prefix=yes
  56. ;;
  57. --prefix)
  58. echo_prefix=yes
  59. ;;
  60. --exec-prefix=*)
  61. exec_prefix=$optarg
  62. exec_prefix_set=yes
  63. local_prefix=yes
  64. ;;
  65. --exec-prefix)
  66. echo_exec_prefix=yes
  67. ;;
  68. --version)
  69. echo 12.2.6
  70. exit 0
  71. ;;
  72. --ftversion)
  73. echo_ft_version=yes
  74. ;;
  75. --cflags)
  76. echo_cflags=yes
  77. ;;
  78. --libs)
  79. echo_libs=yes
  80. ;;
  81. --libtool)
  82. echo_libtool=yes
  83. ;;
  84. *)
  85. usage 1 1>&2
  86. ;;
  87. esac
  88. shift
  89. done
  90. if test "$local_prefix" = "yes" ; then
  91. if test "$exec_prefix_set" != "yes" ; then
  92. exec_prefix=$prefix
  93. fi
  94. fi
  95. if test "$echo_prefix" = "yes" ; then
  96. echo ${SYSROOT}$prefix
  97. fi
  98. if test "$echo_exec_prefix" = "yes" ; then
  99. echo ${SYSROOT}$exec_prefix
  100. fi
  101. if test "$exec_prefix_set" = "yes" ; then
  102. libdir=$exec_prefix/lib
  103. else
  104. if test "$local_prefix" = "yes" ; then
  105. includedir=$prefix/include
  106. libdir=$prefix/lib
  107. fi
  108. fi
  109. if test "$echo_ft_version" = "yes" ; then
  110. major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
  111. | grep FREETYPE_MAJOR \
  112. | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
  113. minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
  114. | grep FREETYPE_MINOR \
  115. | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
  116. patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
  117. | grep FREETYPE_PATCH \
  118. | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
  119. echo $major.$minor.$patch
  120. fi
  121. if test "$echo_cflags" = "yes" ; then
  122. cflags="-I${SYSROOT}$includedir/freetype2"
  123. if test "${SYSROOT}$includedir" != "/usr/include" ; then
  124. echo $cflags -I${SYSROOT}$includedir
  125. else
  126. echo $cflags
  127. fi
  128. fi
  129. if test "$echo_libs" = "yes" ; then
  130. rpath=
  131. if test "$enable_shared" = "yes" ; then
  132. eval "rpath=\"$hardcode_libdir_flag_spec\""
  133. fi
  134. libs="-lfreetype "
  135. if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then
  136. echo -L${SYSROOT}$libdir $libs
  137. else
  138. echo $libs
  139. fi
  140. fi
  141. if test "$echo_libtool" = "yes" ; then
  142. convlib="libfreetype.la"
  143. echo ${SYSROOT}$libdir/$convlib
  144. fi
  145. # EOF