summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorjoye <joye>2013-09-11 17:57:40 (GMT)
committerjoye <joye>2013-09-11 17:57:40 (GMT)
commit2d6a5ecf25186291946cf7dd882e8d5b5cd31bae (patch)
treec89678657813278b94c8f3dde12eaca4dc2a6ed1 /configure.in
parent00e61449b604dea32384f017b66ec0bf368bbcba (diff)
downloadblt-2d6a5ecf25186291946cf7dd882e8d5b5cd31bae.zip
blt-2d6a5ecf25186291946cf7dd882e8d5b5cd31bae.tar.gz
blt-2d6a5ecf25186291946cf7dd882e8d5b5cd31bae.tar.bz2
*** empty log message ***
Diffstat (limited to 'configure.in')
-rwxr-xr-xconfigure.in81
1 files changed, 80 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 55007f6..6fbddc5 100755
--- a/configure.in
+++ b/configure.in
@@ -115,7 +115,7 @@ TEA_ADD_SOURCES([
bltWindow.c
])
TEA_ADD_HEADERS([generic/bltVector.h])
-TEA_ADD_INCLUDES([-I. -I\"`${CYGPATH} ${srcdir}/generic`\"])
+TEA_ADD_INCLUDES([-I. -I\"`${CYGPATH} ${srcdir}/generic`\" -I/usr/X11/include/freetype2])
TEA_ADD_LIBS([])
TEA_ADD_CFLAGS([])
TEA_ADD_STUB_SOURCES([])
@@ -209,6 +209,85 @@ AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
TEA_MAKE_LIB
#--------------------------------------------------------------------
+# Locate the X11 header files and the X11 library archive.
+#--------------------------------------------------------------------
+
+SC_PATH_X
+
+#--------------------------------------------------------------------
+# Check for freetype / fontconfig / Xft support.
+#--------------------------------------------------------------------
+
+#if test $tk_aqua = no; then
+ AC_MSG_CHECKING([whether to use xft])
+ AC_ARG_ENABLE(xft,
+ AC_HELP_STRING([--enable-xft],
+ [use freetype/fontconfig/xft (default: on)]),
+ [enable_xft=$enableval], [enable_xft="default"])
+ XFT_CFLAGS=""
+ XFT_LIBS=""
+ if test "$enable_xft" = "no" ; then
+ AC_MSG_RESULT([$enable_xft])
+ else
+ found_xft="yes"
+ dnl make sure package configurator (xft-config or pkg-config
+ dnl says that xft is present.
+ XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no"
+ XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
+ if test "$found_xft" = "no" ; then
+ found_xft=yes
+ XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
+ XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no"
+ fi
+ AC_MSG_RESULT([$found_xft])
+ dnl make sure that compiling against Xft header file doesn't bomb
+ if test "$found_xft" = "yes" ; then
+ tk_oldCFlags=$CFLAGS
+ CFLAGS="$XINCLUDES $XFT_CFLAGS"
+ tk_oldLibs=$LIBS
+ LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"
+ AC_CHECK_HEADER(X11/Xft/Xft.h, [], [
+ found_xft=no
+ ],[#include <X11/Xlib.h>])
+ CFLAGS=$tk_oldCFlags
+ LIBS=$tk_oldLibs
+ fi
+ dnl make sure that linking against Xft libraries finds freetype
+ if test "$found_xft" = "yes" ; then
+ tk_oldCFlags=$CFLAGS
+ CFLAGS="$XINCLUDES $XFT_CFLAGS"
+ tk_oldLibs=$LIBS
+ LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"
+ AC_CHECK_LIB(Xft, XftFontOpen, [], [
+ found_xft=no
+ ])
+ CFLAGS=$tk_oldCFlags
+ LIBS=$tk_oldLibs
+ fi
+ dnl print a warning if xft is unusable and was specifically requested
+ if test "$found_xft" = "no" ; then
+ if test "$enable_xft" = "yes" ; then
+ AC_MSG_WARN([Can't find xft configuration, or xft is unusable])
+ fi
+ enable_xft=no
+ XFT_CFLAGS=""
+ XFT_LIBS=""
+ else
+ enable_xft=yes
+ fi
+ fi
+ if test $enable_xft = "yes" ; then
+ UNIX_FONT_OBJS=tkUnixRFont.o
+ AC_DEFINE(HAVE_XFT, 1, [Have we turned on XFT (antialiased fonts)?])
+ else
+ UNIX_FONT_OBJS=tkUnixFont.o
+ fi
+ AC_SUBST(XFT_CFLAGS)
+ AC_SUBST(XFT_LIBS)
+ AC_SUBST(UNIX_FONT_OBJS)
+#fi
+
+#--------------------------------------------------------------------
# Determine the name of the tclsh and/or wish executables in the
# Tcl and Tk build directories or the location they were installed
# into. These paths are used to support running test cases only,