pike.git/
src/
modules/
_Image_TTF/
configure.in
Branch:
Tag:
Non-build tags
All tags
No tags
2002-12-18
2002-12-18 15:01:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>
0bc3651fba157664c0ae1a91f4393834ebd2f339 (
49
lines) (+
46
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
Added detection of broken Irix TTF.
Rev: src/modules/_Image_TTF/configure.in:1.14
1:
#
-
# $Id: configure.in,v 1.
13
2002/
08
/
28
10
:
18
:
10
grubba Exp $
+
# $Id: configure.in,v 1.
14
2002/
12
/
18
15
:
01
:
41
grubba Exp $
# AC_INIT(image_ttf.c) AC_CONFIG_HEADER(config.h)
62:
if test "$parent" = "yesyes" -o "$subdir" = "yesyes" ; then AC_CHECK_LIB(ttf, TT_Open_Collection, [
-
AC_DEFINE(HAVE_LIBTTF)
+
LIBS="${LIBS-} -lttf"
-
+
AC_MSG_CHECKING([if libttf actually works])
+
AC_CACHE_VAL(pike_cv_lib_ttf_works, [
+
AC_TRY_RUN([
+
#include <stdio.h>
+
#if defined(HAVE_FREETYPE_FREETYPE_H) && defined(HAVE_FREETYPE_FTXKERN_H)
+
+
#include <freetype/freetype.h>
+
#include <freetype/ftxkern.h>
+
+
#else /* !HAVE_FREETYPE_FREETYPE_H || !HAVE_FREETYPE_FTXKERN_H */
+
+
#include <freetype.h>
+
#include <ftxkern.h>
+
+
#endif /* HAVE_FREETYPE_FREETYPE_H && HAVE_FREETYPE_FTXKERN_H */
+
+
int main(int argc, char **argv)
+
{
+
unsigned char palette[5] = {0,64,128,192,255};
+
TT_Error errcode;
+
TT_Engine engine;
+
+
if ((errcode = TT_Init_FreeType(&engine))) {
+
fprintf(stderr, "TT_Init_FreeType() failed with code 0x%02lx\n",
+
(unsigned long)errcode);
+
exit(1);
+
}
+
/* Irix libttf breaks here... */
+
TT_Set_Raster_Gray_Palette(engine,(char*)palette);
+
TT_Init_Kerning_Extension( engine );
+
exit(0);
+
}
+
], [ pike_cv_lib_ttf_works=yes ], [ pike_cv_lib_ttf_works=no ], [
+
# Assume working when cross-compiling.
+
pike_cv_lib_ttf_works=yes
+
])
+
])
+
AC_MSG_RESULT([$pike_cv_lib_ttf_works])
+
if test "x$pike_cv_lib_ttf_works" = "xyes"; then
+
AC_DEFINE(HAVE_LIBTTF)
PIKE_FEATURE_OK(Image.TTF)
-
+
else
+
PIKE_FEATURE([Image.TTF], [no (broken library)])
+
fi
]) AC_MSG_CHECKING([if TT_Horizontal_Header has the member Reserved0]) AC_CACHE_VAL(pike_cv_tt_hh_reserved0, [