[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Questions before releasing
From: |
Lars Clausen |
Subject: |
Re: [Freetype] Questions before releasing |
Date: |
06 Dec 2002 17:04:47 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
On Fri, 06 Dec 2002, Werner LEMBERG wrote:
>> That's... rather confusing. What do I do to check if a freetype >=
>> 2.0.9 is installed?
>
> Normally, the FreeType version is rather meaningless (provided that
> the libtool version number is updated properly which we missed for
> 2.1.2). If you really want a test for 2.0.9, check freetype.h for
> `FREETYPE_MAJOR', `FREETYPE_MINOR', and `FREETYPE_PATCH' with grep.
>
> Writing a C program to read out these macros won't work with dynamic
> libraries, and FT_Library_Version is buggy up to 2.1.3.
For those in the same boat, here's some configure.in code to test for the
freetype version:
AC_MSG_CHECKING([for version of FreeType])
FREETYPE_INCLUDE=`freetype-config --cflags | cut -c3-`
FREETYPE_MAJOR=`grep '^#define FREETYPE_MAJOR'
$FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
FREETYPE_MINOR=`grep '^#define FREETYPE_MINOR'
$FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
FREETYPE_PATCH=`grep '^#define FREETYPE_PATCH'
$FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
FREETYPE_VERSION=`echo | awk "BEGIN { printf \"%d\", ($FREETYPE_MAJOR *
1000 + $FREETYPE_MINOR) * 1000 + $FREETYPE_PATCH;}"`
AC_MSG_RESULT([$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH])
if test "$FREETYPE_VERSION" -ge 2000009; then
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃ¥rdgrim of Numenor
"I do not agree with a word that you say, but I |----------------------------
will defend to the death your right to say it." | Where are we going, and
--Evelyn Beatrice Hall paraphrasing Voltaire | what's with the handbasket?