[Mapserver-dev] Force Freetype1 problem, suggested changeto
configure.in
Daniel Morissette
morissette at dmsolutions.ca
Tue Feb 4 12:26:39 EST 2003
Steve Lime wrote:
>
> Can those familiar with autoconf handle this one?
>
I gave this a try yesterday and couldn't understand why this would work
any better. Then looking at the configure script I started to notice
all sorts of potential problems and gave up thinking I needed some
sleep.
Not sure when, but I'll take care of this.
Daniel
> >>> "Eric L. Blevins" <eblevins at insight.rr.com> 02/02/03 01:52PM >>>
> First I'll say that I am not very familiar with autoconf or even C
> programming.
> I made some changes to the configure.in file that work much better for
> me and thought I would share them.
>
> First I'll explain my particular problem and provide the solution that
> works on my system.
>
> I am using FreeBSD 4.7
> I have both freetype1 and freetype2 installed on my system from the
> freebsd ports.
>
> the --enable-force-freetype1=yes always detects that I have freetype2
> and never sees freetype1
>
> this part of the configure.in does not detect either library hence the
> reason it never finds freetype1 with --enable-force-freetype1
>
> if test "$enable_force_freetype1" = "yes" ; then
> dnl check for freetype1 first
> AC_CHECK_LIB(ttf, TT_Init_FreeType, FT_LIB="-lttf",
> AC_CHECK_LIB(freetype, FT_Init_FreeType, FT_LIB="-lfreetype",,)
> )
> else
> dnl check for freetype2 first
> AC_CHECK_LIB(freetype, FT_Init_FreeType, FT_LIB="-lfreetype",
> AC_CHECK_LIB(ttf, TT_Init_FreeType, FT_LIB="-lttf",,) )
> fi
>
> According to the autoconf documentation I read this should work but it
> does not for some strange reason.
>
> So I did some copying and pasting in the configure.in and came up with
> these changes that do work for me.
> now if I specify --enable-force-freetype1=yes it detects freetype1 if I
> do not specify it it default to detecting freetype2
>
> mapserver compiled fine and renders True Type fonts perfect with these
> changes.
>
> FT_LIB=''
> FT_BIN=''
> FT_TYPE=''
>
> +if test "$enable_force_freetype1" = "yes" ; then
> +test -f $FT_DIR/lib/libttf.a -o -f $FT_DIR/lib/libttf.so -o -f
> $FT_DIR/lib/libttf.sl && FT_LIBDIR="$FT_DIR/lib"
> + test -f $FT_DIR/libttf.a -o -f $FT_DIR/libttf.so -o -f
> $FT_DIR/libttf.sl && FT_LIBDIR="$FT_DIR"
> + if test -n "$FT_LIBDIR" ; then
> + FT_TYPE="-lttf"
> + fi
> +
> +else
> test -x "$FT_DIR" -a "freetype-config" = "`basename $FT_DIR ''`" &&
> FT_BIN="$FT_DIR"
>
> if test -n "$FT_LIBDIR" ; then
> FT_TYPE="-lttf"
> fi
> fi
> fi
> +fi
>
> if test -n "$FT_LIBDIR" -a -z "$FT_BIN" ; then
>
> --------------------------------------------------------
> Eric L. Blevins www.WiFiMaps.com
> --------------------------------------------------------
More information about the mapserver-dev
mailing list