TDE graphics utilities
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.
 
 
 
 
 

207 lines
6.3 KiB

  1. # Check for libart
  2. KDE_FIND_PATH(libart2-config, LIBART_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin],)
  3. if test -n "$LIBART_CONFIG"; then
  4. vers=`$LIBART_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  5. if test -n "$vers" && test "$vers" -ge 2003008
  6. then
  7. LIBART_LIBS="`$LIBART_CONFIG --libs`"
  8. LIBART_RPATH=
  9. for args in $LIBART_LIBS; do
  10. case $args in
  11. -L*)
  12. LIBART_RPATH="$LIBART_RPATH $args"
  13. ;;
  14. esac
  15. done
  16. LIBART_RPATH=`echo $LIBART_RPATH | sed -e "s/-L/-R/g"`
  17. LIBART_CFLAGS="`$LIBART_CONFIG --cflags`"
  18. AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library])
  19. fi
  20. fi
  21. AC_SUBST(LIBART_LIBS)
  22. AC_SUBST(LIBART_CFLAGS)
  23. AC_SUBST(LIBART_RPATH)
  24. if test -z "$LIBART_LIBS"; then
  25. DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
  26. fi
  27. # Check for fontconfig
  28. KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
  29. KDE_FIND_PATH( pkg-config, PKG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin],)
  30. if test -n "$PKG_CONFIG"; then
  31. if ! $PKG_CONFIG --exists fontconfig; then
  32. unset PKG_CONFIG
  33. fi
  34. fi
  35. ])
  36. if test -n "$FONTCONFIG_CONFIG" -o -n "$PKG_CONFIG"; then
  37. if test -n "$FONTCONFIG_CONFIG"; then
  38. fontconfigvers="`$FONTCONFIG_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`"
  39. fontconfiglibs="`$FONTCONFIG_CONFIG --libs`"
  40. fontconfigcflags="`$FONTCONFIG_CONFIG --cflags`"
  41. else
  42. fontconfigvers=`$PKG_CONFIG --modversion fontconfig 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3; }'`
  43. fontconfiglibs=`$PKG_CONFIG --libs fontconfig`
  44. fontconfigcflags="`$PKG_CONFIG --cflags fontconfig`"
  45. fi
  46. if test -n "$vers" && test "$vers" -ge 2002000
  47. then
  48. FONTCONFIG_LIBS=$fontconfiglibs
  49. FONTCONFIG_RPATH=
  50. for args in $FONTCONFIG_LIBS; do
  51. case $args in
  52. -L*)
  53. FONTCONFIG_RPATH="$FONTCONFIG_RPATH $args"
  54. ;;
  55. esac
  56. done
  57. FONTCONFIG_RPATH=`echo $FONTCONFIG_RPATH | sed -e "s/-L/-R/g"`
  58. FONTCONFIG_CFLAGS=$fontconfigcflags
  59. AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG, 1, [Defines if your system has the fontconfig library])
  60. fi
  61. fi
  62. AC_SUBST(FONTCONFIG_LIBS)
  63. AC_SUBST(FONTCONFIG_CFLAGS)
  64. AC_SUBST(FONTCONFIG_RPATH)
  65. if test -z "$FONTCONFIG_LIBS"; then
  66. DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
  67. fi
  68. # Check for freetype2
  69. KDE_FIND_PATH(freetype-config, FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin],)
  70. if test -n "$FREETYPE_CONFIG"; then
  71. vers=`$FREETYPE_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  72. if test -n "$vers" && test "$vers" -ge 8000002
  73. then
  74. FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
  75. FREETYPE_RPATH=
  76. for args in $FREETYPE_LIBS; do
  77. case $args in
  78. -L*)
  79. FREETYPE_RPATH="$FREETYPE_RPATH $args"
  80. ;;
  81. esac
  82. done
  83. FREETYPE_RPATH=`echo $FREETYPE_RPATH | sed -e "s/-L/-R/g"`
  84. FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
  85. AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the freetype library])
  86. ftvers=`$FREETYPE_CONFIG --ftversion 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  87. if test -n "$ftvers" && test "$ftvers" -ge 2002000
  88. then
  89. AC_DEFINE_UNQUOTED(HAVE_FREETYPE_2_2_x, 1, [Defines if your system has the 2.2.x freetype library])
  90. fi
  91. fi
  92. fi
  93. AC_SUBST(FREETYPE_LIBS)
  94. AC_SUBST(FREETYPE_CFLAGS)
  95. AC_SUBST(FREETYPE_RPATH)
  96. if test -z "$FREETYPE_LIBS"; then
  97. DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
  98. fi
  99. # Check for lcms
  100. have_lcms_header='no'
  101. KDE_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
  102. if test "$have_lcms_header" = 'yes'
  103. then
  104. LCMS_LIBS='-llcms'
  105. AC_DEFINE(LCMS_HEADER, <lcms/lcms.h>, [The correct header])
  106. else
  107. # Alternative! Debian does it this way...
  108. KDE_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
  109. if test "$have_lcms_header" = 'yes'
  110. then
  111. LCMS_LIBS='-llcms'
  112. AC_DEFINE(LCMS_HEADER, <lcms.h>, [The correct header])
  113. # Try to find the full path of lcms.h
  114. for a in $includedir $prefix/include /usr/include /usr/local/include $kde_extra_includes; do
  115. for b in lcms.h lcms/lcms.h ; do
  116. if test -d "$a" && test -f "$a/$b" ; then
  117. LCMSHDR="$a/$b"
  118. fi
  119. done
  120. done
  121. # Check if lcms.h was found. If not then it means that we didn't search
  122. # the right dirs since the kde check already found a usable lcms.h
  123. if test -n "$LCMSHDR" ; then
  124. # Get lcms version
  125. lcms_ver_line=`cat $LCMSHDR | grep '^// Version' `
  126. if test -z "$lcms_ver_line" ; then
  127. # Some versions of lcms have the version in /* */
  128. lcms_ver_line=`cat $LCMSHDR | grep '^/\* Version' `
  129. fi
  130. lcms_ver=`echo "$lcms_ver_line" | head -n 1 | cut -d ' ' -f 3 `
  131. # Get major and minor version numbers
  132. lcms_var_maj=`echo $lcms_ver | cut -d . -f 1`
  133. # Some versions have a character attached to the end of minor version
  134. lcms_var_min=`echo $lcms_ver | cut -d . -f 2 | sed 's,[^0-9],,g'`
  135. if test "$lcms_var_maj" -gt 1 || test "$lcms_var_min" -lt 9 ; then
  136. LCMS_LIBS=''
  137. fi
  138. fi
  139. else
  140. LCMS_LIBS=''
  141. fi
  142. fi
  143. if test -z "$LCMS_LIBS"; then
  144. DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
  145. fi
  146. AC_SUBST(LCMS_LIBS)
  147. # Check for fribidi
  148. KDE_FIND_PATH(fribidi-config, FRIBIDI_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin],)
  149. if test -n "$FRIBIDI_CONFIG"; then
  150. vers=`$FRIBIDI_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  151. if test -n "$vers" && test "$vers" -ge 10004
  152. then
  153. FRIBIDI_LIBS="`$FRIBIDI_CONFIG --libs`"
  154. FRIBIDI_RPATH=
  155. for args in $FIBIDI_LIBS; do
  156. case $args in
  157. -L*)
  158. FRIBIDI_RPATH="$FRIBIDI_CONFIG $args"
  159. ;;
  160. esac
  161. done
  162. FRIBIDI_RPATH=`echo $FRIBIDI_RPATH | sed -e "s/-L/-R/g"`
  163. FRIBIDI_CFLAGS="`$FRIBIDI_CONFIG --cflags`"
  164. AC_DEFINE_UNQUOTED(HAVE_FRIBIDI, 1, [Defines if your system has the fribidi library])
  165. fi
  166. else
  167. FRIBIDI_LIBS=`$PKG_CONFIG --libs fribidi`
  168. FRIBIDI_CFLAGS="`$PKG_CONFIG --cflags fribidi`"
  169. fi
  170. AC_SUBST(FRIBIDI_LIBS)
  171. AC_SUBST(FRIBIDI_CFLAGS)
  172. AC_SUBST(FRIBIDI_RPATH)
  173. if test -z "$FRIBIDI_LIBS"; then
  174. DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
  175. fi
  176. AC_LANG_SAVE
  177. AC_LANG_CPLUSPLUS
  178. KDE_CHECK_HEADERS(sstream)
  179. AC_LANG_RESTORE