7554d91998-10-31Mirar (Pontus Hagland) #
9710172002-08-27Henrik Grubbström (Grubba) # $Id: configure.in,v 1.12 2002/08/27 15:38:30 grubba Exp $
7554d91998-10-31Mirar (Pontus Hagland) # AC_INIT(image_ttf.c) AC_CONFIG_HEADER(config.h)
7b8c791998-11-01Per Hedbor AC_ARG_WITH(ttflib, [ --with(out)-ttflib Support TTF via ttf.lib (freetype) (Image.TTF)],[],[with_ttflib=yes])
7554d91998-10-31Mirar (Pontus Hagland) 
7b8c791998-11-01Per Hedbor AC_MODULE_INIT()
7554d91998-10-31Mirar (Pontus Hagland) 
8c885e2001-02-13Mirar (Pontus Hagland) PIKE_FEATURE_WITHOUT(Image.TTF)
774c0d2001-02-13Mirar (Pontus Hagland) 
7554d91998-10-31Mirar (Pontus Hagland) if test x$with_ttflib = xyes ; then
8c885e2001-02-13Mirar (Pontus Hagland)  PIKE_FEATURE_NODEP(Image.TTF)
774c0d2001-02-13Mirar (Pontus Hagland) 
9710172002-08-27Henrik Grubbström (Grubba)  # Try adding freetype1 to the include path. real_include_dirs='' for flag in $CPPFLAGS; do case "$flag" in -I*) d="`echo q$flag|sed -e 's/^Q-I//'`/freetype1" AC_MSG_CHECKING($d) if test -d "$d/."; then REALDIR="`cd $d/. ; /bin/pwd`" if test "x$REALDIR" = x ; then REALDIR=UNKNOWN else : fi case " $CPPFLAGS $real_include_dirs " in *\ -I$d\ * | *\ -I$REALDIR\ *) AC_MSG_RESULT(already added) ;; *) OLD_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} -I$d" AC_TRY_CPP([include <stdio.h>], [ AC_MSG_RESULT(added) if test "x$REALDIR" != xUNKNOWN; then real_include_dirs="${real_include_dirs} -I$REALDIR" else : fi ], [ AC_MSG_RESULT(fails) CPPFLAGS="${OLD_CPPFLAGS}" ]) ;; esac else AC_MSG_RESULT(no) fi ;; esac done
c50e2b2002-08-27Xavier Beaudouin  AC_CHECK_HEADERS(freetype.h ftxkern.h freetype/freetype.h freetype/ftxkern.h)
b421242000-01-17Henrik Grubbström (Grubba)  parent="$ac_cv_header_ftxkern_h$ac_cv_header_freetype_h" subdir="$ac_cv_header_freetype_ftxkern_h$ac_cv_header_freetype_freetype_h" freetype_h="$ac_cv_header_freetype_h$ac_cv_header_freetype_freetype_h"
c50e2b2002-08-27Xavier Beaudouin  if test "$parent" = "yesyes" -o "$subdir" = "yesyes" ; then
bf2e621999-07-30Marcus Comstedt  AC_CHECK_LIB(ttf, TT_Open_Collection, [
7554d91998-10-31Mirar (Pontus Hagland)  AC_DEFINE(HAVE_LIBTTF) LIBS="${LIBS-} -lttf"
8c885e2001-02-13Mirar (Pontus Hagland)  PIKE_FEATURE_OK(Image.TTF)
806b181999-02-09Henrik Grubbström (Grubba)  ]) AC_MSG_CHECKING([if TT_Horizontal_Header has the member Reserved0]) AC_CACHE_VAL(pike_cv_tt_hh_reserved0, [ AC_TRY_COMPILE([
b421242000-01-17Henrik Grubbström (Grubba) #ifdef HAVE_FREETYPE_FREETYPE_H #include <freetype/freetype.h> #else
806b181999-02-09Henrik Grubbström (Grubba) #include <freetype.h>
b421242000-01-17Henrik Grubbström (Grubba) #endif
806b181999-02-09Henrik Grubbström (Grubba)  ],[ extern TT_Horizontal_Header *horiz; horiz->Reserved0 = 0; ],[ pike_cv_tt_hh_reserved0=yes ], [ pike_cv_tt_hh_reserved0=no
7b8c791998-11-01Per Hedbor  ])
806b181999-02-09Henrik Grubbström (Grubba)  ])
44d31e1999-03-06Henrik Grubbström (Grubba)  AC_MSG_RESULT($pike_cv_tt_hh_reserved0)
806b181999-02-09Henrik Grubbström (Grubba)  if test "x$pike_cv_tt_hh_reserved0" = "xyes"; then AC_DEFINE(HAVE_TT_H_H_Reserved0) else :; fi
b421242000-01-17Henrik Grubbström (Grubba)  else if test "$freetype_h" = "nono"; then :; else
8c885e2001-02-13Mirar (Pontus Hagland)  PIKE_FEATURE(Image.TTF,[no (too old)])
b421242000-01-17Henrik Grubbström (Grubba)  AC_MSG_WARN(Detected freetype library (libttf), but too old version) fi
7554d91998-10-31Mirar (Pontus Hagland)  fi fi AC_OUTPUT(Makefile,echo FOO >stamp-h )