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

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

Re: Fwd: [Mingw-cross-env-list] Error compiling source file including <s


From: Volker Grabsch
Subject: Re: Fwd: [Mingw-cross-env-list] Error compiling source file including <string.h>
Date: Tue, 16 Feb 2010 18:15:35 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Pierre-Henri Trivier <address@hidden> schrieb:
> So things are now all good and well !!!
> 
> Thanks so much for the help, and the incredibly usefull tool that
> mingw-cross-env turns out to be.

Thanks, but I think there's still room for improvement in your
configure.ac :-)

> > PKG_CHECK_MODULES([SDL], [sdl >= 1.2.13], , )
> > PKG_CHECK_MODULES([SDL_image], [SDL_image])
> > PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer])
> >
> > AC_SEARCH_LIBS(TTF_OpenFontRW, SDL_ttf, ,
> >       AC_MSG_WARN([*** Unable to find SDL_ttf library.
> >            Are you cross compiling ?]))

I recommend to check at least for freetype2 via PKG_CONFIG_*,
and to use AC_CHECK_LIB instead of AC_SEARCH_LIBS for getting
SDL_ttf. You can also combine the PKG_CONFIG_* calls:

    PKG_CHECK_MODULES([DEPS], [sdl >= 1.2.0 SDL_image SDL_mixer freetype2])

    AC_CHECK_LIB([SDL_ttf], [TTF_Init], ,
        AC_MSG_ERROR(...))

Of course, you can use any other constant prefix than DEPS. Also, you
might want to add lines such as:

    CFLAGS="$CFLAGS $DEPS_CFLAGS"
    LIBS="$LIBS $DEPS_LIBS"

That way, you don't need to specify that stuff in your Makefile.am.
Except, of course, if you want to link some parts of your project
without these libs. Then don't use these two lines and mention them
explicitly within your Makefile.am.


Greets,

    Volker

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




reply via email to

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