checking for Xft library defines HAVE_LIBXFT upon success
This commit is contained in:
parent
4b00524b31
commit
74b95a3069
21
configure.ac
21
configure.ac
|
|
@ -668,16 +668,10 @@ fi
|
||||||
# Checks for X libraries - if X11 wasn't found then don't make following
|
# Checks for X libraries - if X11 wasn't found then don't make following
|
||||||
# tests and compile without X11 support - otherwise, check if the following
|
# tests and compile without X11 support - otherwise, check if the following
|
||||||
# libraries are present (error if they are not)
|
# libraries are present (error if they are not)
|
||||||
# In CYGWIN library ordering has to be changed. Is this compatible to LINUX?
|
|
||||||
# XShmAttach is a struct in CYGWIN, not a function
|
# XShmAttach is a struct in CYGWIN, not a function
|
||||||
# SJB: 13th march 2005
|
# Library order is
|
||||||
# Library order is giving linker warnings on MacOSX
|
# -lXaw -lXmu -lXt -lXext -lX11 (-lXft -lfontconfig -lXrender -lfreetype)
|
||||||
# It's not clear to me which order is required for Cygwin (see comment above)
|
# Xft is optional, allows text rotation in plots
|
||||||
# and neither can I find any authoritative answer for the correct link order
|
|
||||||
# for MacOSX or Linux, but
|
|
||||||
# -lXaw -lXmu -lXt -lXext -lX11
|
|
||||||
# seems to be the popular choice.
|
|
||||||
# (The previous order was -lX11 -lXt -lXext -lXmu -lXaw)
|
|
||||||
|
|
||||||
if test "x$no_x" != xyes ; then
|
if test "x$no_x" != xyes ; then
|
||||||
X_CFLAGS="$X_CFLAGS -I/usr/include/freetype2"
|
X_CFLAGS="$X_CFLAGS -I/usr/include/freetype2"
|
||||||
|
|
@ -688,11 +682,16 @@ if test "x$no_x" != xyes ; then
|
||||||
X_LIBS="$X_LIBS -lXt"
|
X_LIBS="$X_LIBS -lXt"
|
||||||
AC_CHECK_LIB([Xext], [XShmAttach], [X_LIBS="$X_LIBS -lXext"],
|
AC_CHECK_LIB([Xext], [XShmAttach], [X_LIBS="$X_LIBS -lXext"],
|
||||||
[AC_MSG_ERROR([Couldn't find Xext library])], [$X_LIBS $X_EXTRA_LIBS])
|
[AC_MSG_ERROR([Couldn't find Xext library])], [$X_LIBS $X_EXTRA_LIBS])
|
||||||
AC_CHECK_LIB([Xft], [main], [X_LIBS="$X_LIBS -lXft"],
|
|
||||||
[AC_MSG_ERROR([Couldn't find Xft library])], [$X_LIBS $X_EXTRA_LIBS])
|
|
||||||
X_LIBS="$X_LIBS -lX11"
|
X_LIBS="$X_LIBS -lX11"
|
||||||
|
AC_CHECK_LIB([Xft], [main],
|
||||||
|
[AC_DEFINE([HAVE_LIBXFT], [], [Have xft routines in libxft])
|
||||||
|
LIBS="$LIBS -lXft"
|
||||||
AC_CHECK_LIB([fontconfig], [main], [X_LIBS="$X_LIBS -lfontconfig"],
|
AC_CHECK_LIB([fontconfig], [main], [X_LIBS="$X_LIBS -lfontconfig"],
|
||||||
[AC_MSG_ERROR([Couldn't find fontconfig library])], [$X_LIBS $X_EXTRA_LIBS])
|
[AC_MSG_ERROR([Couldn't find fontconfig library])], [$X_LIBS $X_EXTRA_LIBS])
|
||||||
|
AC_CHECK_LIB([Xrender], [main], [X_LIBS="$X_LIBS -lXrender"],
|
||||||
|
[AC_MSG_ERROR([Couldn't find Xrender library])], [$X_LIBS $X_EXTRA_LIBS])
|
||||||
|
AC_CHECK_LIB([freetype], [main], [X_LIBS="$X_LIBS -lfreetype"],
|
||||||
|
[AC_MSG_ERROR([Couldn't find freetype library])], [$X_LIBS $X_EXTRA_LIBS])])
|
||||||
has_no_x=false
|
has_no_x=false
|
||||||
else
|
else
|
||||||
AC_DEFINE([X_DISPLAY_MISSING])
|
AC_DEFINE([X_DISPLAY_MISSING])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue