Changeset 949


Ignore:
Timestamp:
Sep 13, 2011, 6:09:44 PM (8 years ago)
Author:
sam
Message:

build: move SDL_image and SDL_mixer binaries to an i686-only directory.

Location:
trunk
Files:
2 added
3 edited
13 moved

Legend:

Unmodified
Added
Removed
  • trunk/build-ps3

    r945 r949  
    44make distclean
    55
     6set -e
    67./build/lol-build bootstrap ps3-ppu
    78./build/lol-build configure ps3-ppu
  • trunk/build/lol-build

    r948 r949  
    2828platform="$2"
    2929
    30 top_srcdir=$(dirname "$0")/..
    31 cd $top_srcdir
    32 top_srcdir="`pwd`"
     30__init__()
     31{
     32    top_srcdir=$(dirname "$0")/..
     33    cd $top_srcdir
     34    top_srcdir="`pwd`"
     35
     36    case "${MSYSTEM}" in
     37        MINGW32|MINGW64)
     38            PATH="$PATH:./contrib/gtk-2.22.1/bin"
     39            M4PATH="$M4PATH:./contrib/gtk-2.22.1/share/aclocal"
     40            ;;
     41    esac
     42}
    3343
    3444bootstrap()
     
    4252            # No bootstrapping needed
    4353            ;;
    44         windows-i386|windows-amd64)
    45             PATH="$PATH:./contrib/gtk-2.22.1/bin"
    46             M4PATH="$M4PATH:./contrib/gtk-2.22.1/share/aclocal"
     54        *)
    4755            PATH="$PATH" M4PATH="$M4PATH" ./bootstrap
    48             ;;
    49         *)
    50             ./bootstrap
    5156            ;;
    5257    esac
     
    7075                false
    7176            fi
     77            PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/contrib/gtkglarea-2.0.1/lib/pkgconfig"
    7278            LDFLAGS="$LDFLAGS -L$PWD/contrib/glew-1.7.0/lib/i686-w64-mingw32"
    7379            LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-1.2.14/lib/i686-w64-mingw32"
     80            LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-image-1.2.10/lib/i686-w64-mingw32"
     81            LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-mixer-1.2.11/lib/i686-w64-mingw32"
     82            LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/lib"
     83            LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/bin"
     84            LDFLAGS="$LDFLAGS -L$PWD/contrib/gtkglarea-2.0.1/lib"
    7485            ;;
    7586        windows-amd64)
     
    8596            LDFLAGS="$LDFLAGS -L$PWD/contrib/glew-1.7.0/lib/x86_64-w64-mingw32"
    8697            LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-1.2.14/lib/x86_64-w64-mingw32"
     98            LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-image-1.2.10/lib/x86_64-w64-mingw32"
     99            LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-mixer-1.2.11/lib/x86_64-w64-mingw32"
    87100            ;;
    88101    esac
     
    96109            ;;
    97110        ps3-ppu)
    98             ./configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=none
     111            PATH="$PATH" ./configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=none
    99112            ;;
    100113        windows-i386|windows-amd64)
    101             PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/contrib/gtkglarea-2.0.1/lib/pkgconfig"
    102114            CPPFLAGS="$CPPFLAGS -I$PWD/contrib/sdl-1.2.14/include"
    103115            CPPFLAGS="$CPPFLAGS -I$PWD/contrib/sdl-image-1.2.10/include"
     
    113125            CPPFLAGS="$CPPFLAGS -I$PWD/contrib/gtk-2.22.1/include/atk-1.0"
    114126            CPPFLAGS="$CPPFLAGS -I$PWD/contrib/gtkglarea-2.0.1/include"
    115             LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-image-1.2.10/lib"
    116             LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-mixer-1.2.11/lib"
    117             LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/lib"
    118             LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/bin"
    119             LDFLAGS="$LDFLAGS -L$PWD/contrib/gtkglarea-2.0.1/lib"
    120127            CPPFLAGS="$CPPFLAGS -mms-bitfields"
    121128            LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
     
    123130            GTK_LIBS="$GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0"
    124131            GTK_LIBS="$GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0"
    125             LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32"
    126             PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS" LOL_LIBS="$LOL_LIBS"
     132            PATH="$PATH" PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS"
    127133            ;;
    128134        *)
    129             ./configure
     135            PATH="$PATH" ./configure
    130136            ;;
    131137    esac
     
    186192}
    187193
     194__init__
    188195echo "lol-build: executing action '$action' on platform '$platform'" >&2
    189196eval "$action"
  • trunk/configure.ac

    r943 r949  
    174174dnl Use SDL? (always required on Linux or Win32)
    175175ac_cv_my_have_sdl="no"
    176 if test "x$cross_compiling" != xyes; then
    177   ac_cv_my_have_sdl="yes"
     176ac_cv_my_have_sdl_image="no"
     177ac_cv_my_have_sdl_mixer="no"
     178dnl
     179dnl  First, try the proper pkg-config check
     180PKG_CHECK_MODULES(SDL, sdl, [ac_cv_my_have_sdl="yes"], [:])
     181PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [ac_cv_my_have_sdl_mixer="yes"], [:])
     182PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [ac_cv_my_have_sdl_image="yes"], [:])
     183dnl
     184dnl  Then the old sdl-config method
     185if test "x${cross_compiling}" != xyes -a "${ac_cv_my_have_sdl}" != yes; then
    178186  AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
    179   if test "${SDL_CONFIG}" != "no" -a "x$cross_compiling" != xyes; then
    180     SDL_CFLAGS="${SDL_CFLAGS} `sdl-config --cflags`"
    181     SDL_LIBS="${SDL_LIBS} `sdl-config --libs`"
     187  if test "${SDL_CONFIG}" != "no"; then
     188    SDL_CFLAGS="${SDL_CFLAGS} `${SDL_CONFIG} --cflags`"
     189    SDL_LIBS="${SDL_LIBS} `${SDL_CONFIG} --libs`"
     190    ac_cv_my_have_sdl="yes"
    182191  fi
    183   PKG_CHECK_MODULES(SDL, sdl, [:],
    184    [SDL_LIBS="${SDL_LIBS} -lSDL"])
    185   PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [:],
    186    [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"])
    187   PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [:],
    188    [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"])
    189   SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
    190   SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
    191   save_CPPFLAGS="${CPPFLAGS}"
    192   CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}"
    193   AC_CHECK_HEADERS(SDL_mixer.h, [:], [ac_cv_my_have_sdl="no"])
    194   AC_CHECK_HEADERS(SDL_image.h, [:], [ac_cv_my_have_sdl="no"])
    195   CPPFLAGS="${save_CPPFLAGS}"
    196   if test "${ac_cv_my_have_sdl}" = "no"; then
    197     AC_MSG_WARN([[One of SDL, SDL_Image or SDL_Mixer not found]])
    198   else
    199     AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
    200   fi
     192fi
     193dnl
     194dnl  Maybe all this has failed, try direct inclusion
     195save_CPPFLAGS="${CPPFLAGS}"
     196save_LIBS="${LIBS}"
     197CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
     198LIBS="${LIBS} ${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
     199AC_CHECK_HEADERS(SDL.h SDL/SDL.h, [ac_cv_my_have_sdl="yes"])
     200AC_CHECK_HEADERS(SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"])
     201AC_CHECK_HEADERS(SDL_image.h, [ac_cv_my_have_sdl_image="yes"])
     202AC_CHECK_LIB(SDL, main,
     203 [SDL_LIBS="${SDL_LIBS} -lSDL"],
     204 [ac_cv_my_have_sdl="no"])
     205AC_CHECK_LIB(SDL_mixer, main,
     206 [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"],
     207 [ac_cv_my_have_sdl_mixer="no"])
     208AC_CHECK_LIB(SDL_image, main,
     209 [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"],
     210 [ac_cv_my_have_sdl_image="no"])
     211SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
     212SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
     213CPPFLAGS="${save_CPPFLAGS}"
     214LIBS="${save_LIBS}"
     215if test "${ac_cv_my_have_sdl}" = "no"; then
     216  AC_MSG_WARN([SDL not found])
     217else
     218  AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
     219fi
     220if test "${ac_cv_my_have_sdl_mixer}" = "no"; then
     221  AC_MSG_WARN([SDL_mixer not found])
     222fi
     223if test "${ac_cv_my_have_sdl_image}" = "no"; then
     224  AC_MSG_WARN([SDL_image not found])
    201225fi
    202226AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
     227AM_CONDITIONAL(USE_SDL_MIXER, test "${ac_cv_my_have_sdl_mixer}" = "yes")
     228AM_CONDITIONAL(USE_SDL_IMAGE, test "${ac_cv_my_have_sdl_image}" = "yes")
    203229
    204230
Note: See TracChangeset for help on using the changeset viewer.