Changeset 848


Ignore:
Timestamp:
Aug 22, 2011, 2:29:55 PM (8 years ago)
Author:
sam
Message:

build: allow to properly cross-compile for PS3 on Mingw.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build-ps3

    r840 r848  
    44
    55set -e
     6
     7# Only on Windows
     8if test "x${MSYSTEM}" = xMINGW32; then
     9  PATH="$PATH:./contrib/gtk-2.22.1/bin"
     10  M4PATH="./contrib/gtk-2.22.1/share/aclocal"
     11  export M4PATH # This looks necessary
     12  PKG_CONFIG_PATH="$PKG_CONFIG_PATH:`pwd`/contrib/gtkglarea-2.0.1/lib/pkgconfig"
     13  export PKG_CONFIG_PATH # This looks necessary, too
     14fi
    615
    716# Bootstrap, configure and make
  • trunk/configure.ac

    r844 r848  
    166166
    167167dnl Use SDL? (always required on Linux or Win32)
    168 ac_cv_my_have_sdl="yes"
    169 AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
    170 if test "${SDL_CONFIG}" != "no" -a "x$cross_compiling" != xyes; then
    171   SDL_CFLAGS="${SDL_CFLAGS} `sdl-config --cflags`"
    172   SDL_LIBS="${SDL_LIBS} `sdl-config --libs`"
    173 fi
    174 SDL_CFLAGS="${SDL_CFLAGS} ${GL_CFLAGS}"
    175 SDL_LIBS="${SDL_LIBS} ${GL_LIBS}"
    176 PKG_CHECK_MODULES(SDL, sdl, [:],
    177  [SDL_LIBS="${SDL_LIBS} -lSDL"])
    178 PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [:],
    179  [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"])
    180 PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [:],
    181  [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"])
    182 SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
    183 SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
    184 
    185 save_CPPFLAGS="${CPPFLAGS}"
    186 CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}"
    187 AC_CHECK_HEADERS(SDL_mixer.h, [:], [ac_cv_my_have_sdl="no"])
    188 AC_CHECK_HEADERS(SDL_image.h, [:], [ac_cv_my_have_sdl="no"])
    189 CPPFLAGS="${save_CPPFLAGS}"
    190 if test "${ac_cv_my_have_sdl}" = "no"; then
    191   AC_MSG_WARN([[One of SDL, SDL_Image or SDL_Mixer not found]])
    192 else
    193   AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
     168ac_cv_my_have_sdl="no"
     169if test "x$cross_compiling" != xyes; then
     170  ac_cv_my_have_sdl="yes"
     171  AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
     172  if test "${SDL_CONFIG}" != "no" -a "x$cross_compiling" != xyes; then
     173    SDL_CFLAGS="${SDL_CFLAGS} `sdl-config --cflags`"
     174    SDL_LIBS="${SDL_LIBS} `sdl-config --libs`"
     175  fi
     176  PKG_CHECK_MODULES(SDL, sdl, [:],
     177   [SDL_LIBS="${SDL_LIBS} -lSDL"])
     178  PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [:],
     179   [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"])
     180  PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [:],
     181   [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"])
     182  SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
     183  SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
     184  save_CPPFLAGS="${CPPFLAGS}"
     185  CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}"
     186  AC_CHECK_HEADERS(SDL_mixer.h, [:], [ac_cv_my_have_sdl="no"])
     187  AC_CHECK_HEADERS(SDL_image.h, [:], [ac_cv_my_have_sdl="no"])
     188  CPPFLAGS="${save_CPPFLAGS}"
     189  if test "${ac_cv_my_have_sdl}" = "no"; then
     190    AC_MSG_WARN([[One of SDL, SDL_Image or SDL_Mixer not found]])
     191  else
     192    AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
     193  fi
    194194fi
    195195AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
     
    250250dnl How to use the Lol Engine inside this tree
    251251LOL_CFLAGS="$LOL_CFLAGS -I \$(top_srcdir)/src"
    252 LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS"
    253 LOL_LIBS="$LOL_LIBS $SDL_LIBS $EGL_LIBS $LIBPNG_LIBS"
     252LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $GL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS"
     253LOL_LIBS="$LOL_LIBS $SDL_LIBS $GL_LIBS $EGL_LIBS $LIBPNG_LIBS"
    254254
    255255AC_SUBST(MATH_LIBS)
Note: See TracChangeset for help on using the changeset viewer.