1 Index: KoboDeluxe-0.5.1/configure.in
2 ===================================================================
3 --- KoboDeluxe-0.5.1.orig/configure.in 2008-02-10 12:27:11.000000000 +0100
4 +++ KoboDeluxe-0.5.1/configure.in 2008-02-10 15:50:11.000000000 +0100
7 LIBS="$LIBS -lSDL_image"
10 dnl-------------------------------------------------------
12 dnl-------------------------------------------------------
14 dnl-------------------------------------------------------
15 dnl Checks for library functions.
16 dnl-------------------------------------------------------
17 +dnl SDL_putenv may not be available in all SDL ports
18 +AC_CHECK_DECLS(SDL_putenv,,,[#include <SDL.h>])
20 AC_CHECK_FUNCS(strdup strstr strchr strrchr)
21 AC_CHECK_FUNCS(snprintf _snprintf vsnprintf _vsnprintf)
22 AC_CHECK_FUNCS(pow sqrt)
23 AC_CHECK_FUNCS(munmap mkdir select stat)
24 AC_CHECK_FUNCS(atexit floor memmove memset memcmp)
25 -AC_CHECK_FUNCS(gettimeofday)
26 +AC_CHECK_FUNCS(gettimeofday putenv)
27 AC_CHECK_FUNCS(getegid setgid)
33 Index: KoboDeluxe-0.5.1/graphics/gfxengine.cpp
34 ===================================================================
35 --- KoboDeluxe-0.5.1.orig/graphics/gfxengine.cpp 2008-02-10 12:41:31.000000000 +0100
36 +++ KoboDeluxe-0.5.1/graphics/gfxengine.cpp 2008-02-10 15:58:06.000000000 +0100
47 +#if not (HAVE_DECL_SDL_PUTENV) and defined (HAVE_PUTENV)
51 #include "gfxengine.h"
57 - if(_centered && !_fullscreen)
58 - SDL_putenv((char *)"SDL_VIDEO_CENTERED=1");
59 + if(_centered && !_fullscreen)
60 +#if HAVE_DECL_SDL_PUTENV
61 + SDL_putenv("SDL_VIDEO_CENTERED=1");
62 +#elif defined(HAVE_PUTENV)
63 + putenv("SDL_VIDEO_CENTERED=1");
65 + #error Neither SDL_putenv() nor putenv() are available. Fix it!
68 log_printf(DLOG, "Opening screen...\n");
69 if(!SDL_WasInit(SDL_INIT_VIDEO))