[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] autoconf piece for getting freetype version
From: |
Lars Clausen |
Subject: |
[Freetype] autoconf piece for getting freetype version |
Date: |
Sun, 09 Mar 2003 17:58:43 -0600 |
User-agent: |
Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.1 |
I now have a nicer piece of autoconf for checking the freetype version:
AC_MSG_CHECKING([if FreeType version is 2.0.9 or higher])
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS=`freetype-config --cflags`
AC_TRY_CPP([#include <freetype/freetype.h>
#if (FREETYPE_MAJOR*1000+FREETYPE_MINOR)*1000+FREETYPE_PATCH < 2000009
#error Freetype version too low.
#endif
],
[AC_MSG_RESULT(yes)
FREETYPE_LIBS=`freetype-config --libs`
AC_SUBST(FREETYPE_LIBS)
AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
CPPFLAGS="$old_CPPFLAGS"]
,
[AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
It should be nicely encapsulated in its own macro, but I haven't gotten
that far yet. And I'm dismayed by the need to save the CPPFLAGS, but it
works.
-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?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freetype] autoconf piece for getting freetype version,
Lars Clausen <=