summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoye <joye>2013-11-07 20:41:50 (GMT)
committerjoye <joye>2013-11-07 20:41:50 (GMT)
commitf2e711835e38c23114bb796898c7f9eadfd0cfc4 (patch)
tree1a02048ae70eb39c578af4e9d033f227a2363263
parent2ca1ce17342a4cf84c30eb07cdd790fef1ca2aba (diff)
downloadblt-f2e711835e38c23114bb796898c7f9eadfd0cfc4.zip
blt-f2e711835e38c23114bb796898c7f9eadfd0cfc4.tar.gz
blt-f2e711835e38c23114bb796898c7f9eadfd0cfc4.tar.bz2
*** empty log message ***
-rwxr-xr-xaclocal.m470
-rwxr-xr-xconfigure4
-rwxr-xr-xconfigure.in65
3 files changed, 75 insertions, 64 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 0b05739..b05bd59 100755
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -7,3 +7,73 @@ builtin(include,tclconfig/tcl.m4)
#
# Add here whatever m4 macros you want to define for your package
#
+
+AC_DEFUN([XFT], [
+
+if test "${TEA_WINDOWINGSYSTEM}" = "x11"; 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
+ AC_DEFINE(HAVE_XFT, 1, [Have we turned on XFT (antialiased fonts)?])
+ fi
+ AC_SUBST(XFT_CFLAGS)
+ AC_SUBST(XFT_LIBS)
+fi
+
+])
+
diff --git a/configure b/configure
index a7178a0..da13964 100755
--- a/configure
+++ b/configure
@@ -9377,6 +9377,8 @@ rm -f conftest*
# Check for freetype / fontconfig / Xft support.
#--------------------------------------------------------------------
+
+
if test "${TEA_WINDOWINGSYSTEM}" = "x11"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xft" >&5
$as_echo_n "checking whether to use xft... " >&6; }
@@ -9500,6 +9502,8 @@ $as_echo "#define HAVE_XFT 1" >>confdefs.h
fi
+
+
#--------------------------------------------------------------------
# Determine the name of the tclsh and/or wish executables in the
# Tcl and Tk build directories or the location they were installed
diff --git a/configure.in b/configure.in
index d82da19..f24bd02 100755
--- a/configure.in
+++ b/configure.in
@@ -210,70 +210,7 @@ TEA_MAKE_LIB
# Check for freetype / fontconfig / Xft support.
#--------------------------------------------------------------------
-if test "${TEA_WINDOWINGSYSTEM}" = "x11"; 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
- AC_DEFINE(HAVE_XFT, 1, [Have we turned on XFT (antialiased fonts)?])
- fi
- AC_SUBST(XFT_CFLAGS)
- AC_SUBST(XFT_LIBS)
-fi
+XFT
#--------------------------------------------------------------------
# Determine the name of the tclsh and/or wish executables in the