[Gambas-devel] Gambas2 and SDL

Laurent Carlier lordheavy at ...141...
Thu Nov 9 16:56:01 CET 2006


Le jeudi 9 novembre 2006 16:41, Silvan Calarco a écrit :
> With the latest releases of SDL, the dependency on X11 has became
> dynamical. This means that "sdl-config --libs" won't return the path to X11
> libraries anymore, so because the gambas-gb-sdl depends on X instead I had
> to make the attached patch to be able to build 1.9.45.
>
> bye,
> Silvan

Try with the attached file ,i've add path to X11 lib into configure.ac.
-------------- next part --------------
dnl ---- configure.ac for gb.sdl

AC_INIT(configure.ac)
GB_INIT(gb.sdl)
AC_PROG_LIBTOOL
AC_PATH_X
AC_PATH_XTRA

dnl TODO: add a version test in GB_COMPONENT!
AM_PATH_SDL(1.2.8, [rm -f DISABLED], [touch DISABLED])

if test -e DISABLED; then
  AC_MSG_WARN([SDL component is disabled])
  SDL_DIR=""
  AC_SUBST(SDL_DIR)
else
  dnl check Xcursor support
  AC_CHECK_LIB(Xcursor, XcursorLibraryLoadCursor,
    [echo -n
    LDFLAGS="$LDFLAGS -lXcursor"], 
    [AC_MSG_WARN([libXcursor not found. Check 'config.log' for more details.])
    touch DISABLED],
    $X_LIBS)

  if test -e DISABLED; then
    AC_MSG_WARN([SDL component is disabled])
    SDL_DIR=""
    AC_SUBST(SDL_DIR)
  else
    GB_COMPONENT(
      sdl,
      SDL,
      [SDL],
      [src],
      [GB_FIND(SDL_opengl.h SDL.h SDL_image.h, `sdl-config --prefix`, include/SDL)],
      [GB_FIND(libSDL_image.$SHLIBEXT , /usr /usr/X11R6 /usr/local `sdl-config --prefix`, lib)],
      [$SDL_LIBS $X_LIBS -lSDL_image -lGL -lGLU],
      [$SDL_CFLAGS])
  fi
fi

AC_OUTPUT( \
Makefile \
src/Makefile \
)


More information about the Devel mailing list