mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] sdl_ttf not detected by configure.ac because


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] sdl_ttf not detected by configure.ac because needs freetype
Date: Mon, 3 May 2010 11:27:11 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

David Bruce <address@hidden> schrieb:
> If I build tuxtype using sdl_ttf rather than sdl_pango (i.e.
> "./configure --without-sdlpango"), the build fails to detect sdl_ttf.
> Upon looking in config.log, the problem is that the test program
> generated by configure does not link to freetype.  As a test, I put
> "LIBS=-lfreetype $LIBS" into tuxtype's configure.ac just before the
> check for sdl_ttf and the build succeeds.

Please have a look at my originally proposed configure.ac, where
this problem was fixed, IIRC.

In short:

Sdl_ttf depends on Freetype, thus static linking requires that both
are mentioned. There simplest way around that issue is to check
for Freetype immediately before Sdl_ttf. That way, the "-lfreetype",
or whatever is needed, will be added to LIBS and will be available
in the Sdl_ttf check.

I recommend that you use the PKGCONFIG macros to check for Freetype,
and that you accept a failure, i.e. don't break the build if Freetype
isn't found. You don't even need to output a warning in that case.
This is because Freetype isn't always needed by Sdl_ttf on all systems.

I think this approach will work on any system, so you do _not_ need
to enclose it into "if mingw32" conditionals.

If there's anything unclear with this approach, please don't hesitate
to ask again.


Greets,

    Volker

-- 
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR




reply via email to

[Prev in Thread] Current Thread [Next in Thread]