|
Added
Link Here
|
| 1 |
--- configure.ac.orig 2020-05-06 06:11:56 UTC |
| 2 |
+++ configure.ac |
| 3 |
@@ -707,7 +707,6 @@ fi |
| 4 |
# Xft is optional, allows text rotation in plots |
| 5 |
|
| 6 |
if test "x$no_x" != xyes ; then |
| 7 |
- X_CFLAGS="$X_CFLAGS -I/usr/include/freetype2" |
| 8 |
AC_CHECK_LIB([Xaw], [main], [X_LIBS="$X_LIBS -lXaw"], |
| 9 |
[AC_MSG_ERROR([Couldn't find Xaw library])], [$X_LIBS $X_EXTRA_LIBS]) |
| 10 |
AC_CHECK_LIB([Xmu], [main], [X_LIBS="$X_LIBS -lXmu"], |
| 11 |
@@ -716,21 +715,8 @@ if test "x$no_x" != xyes ; then |
| 12 |
AC_CHECK_LIB([Xext], [XShmAttach], [X_LIBS="$X_LIBS -lXext"], |
| 13 |
[AC_MSG_ERROR([Couldn't find Xext library])], [$X_LIBS $X_EXTRA_LIBS]) |
| 14 |
X_LIBS="$X_LIBS -lX11" |
| 15 |
- AC_CHECK_LIB([Xft], [main], |
| 16 |
- [AC_DEFINE([HAVE_LIBXFT], [1], [Have xft routines in libxft])] |
| 17 |
- X_LIBS="$X_LIBS -lXft -lfontconfig -lXrender -lfreetype" |
| 18 |
- has_xft=yes, |
| 19 |
- [has_xft=no], [$X_LIBS $X_EXTRA_LIBS]) |
| 20 |
- |
| 21 |
- if test "x$has_xft" = xyes ; then |
| 22 |
- AC_CHECK_LIB([fontconfig], [main], [], |
| 23 |
- [AC_MSG_ERROR([Couldn't find fontconfig library])], [$X_LIBS $X_EXTRA_LIBS]) |
| 24 |
-# AC_CHECK_LIB([Xrender], [main], [], |
| 25 |
-# [AC_MSG_ERROR([Couldn't find Xrender library])], [$X_LIBS $X_EXTRA_LIBS]) |
| 26 |
- AC_CHECK_LIB([freetype], [main], [], |
| 27 |
- [AC_MSG_ERROR([Couldn't find freetype library])], [$X_LIBS $X_EXTRA_LIBS]) |
| 28 |
- fi |
| 29 |
- |
| 30 |
+ PKG_CHECK_MODULES([XFT], [xft], [X_CFLAGS="$X_CFLAGS $XFT_CFLAGS"; X_LIBS="$X_LIBS $XFT_LIBS"], |
| 31 |
+ [AC_MSG_ERROR([Couldn't find freetype library])]) |
| 32 |
has_no_x=false |
| 33 |
else |
| 34 |
AC_DEFINE([X_DISPLAY_MISSING]) |