Ignore:
Timestamp:
Aug 20, 2011, 11:28:53 PM (8 years ago)
Author:
sam
Message:

ps3: add a build-ps3 script that uses autoconf and automake.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r802 r840  
    7070fi
    7171
     72dnl No exceptions
     73CXXFLAGS="${CXXFLAGS} -fno-exceptions"
    7274dnl Optimizations
    7375CXXFLAGS="${CXXFLAGS} ${REL} ${OPT}"
     
    7678
    7779AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
     80
     81
     82dnl Are we on the PS3?
     83AC_CHECK_LIB(sysmodule_stub, cellSysmoduleLoadModule,
     84 [LOL_LIBS="${LOL_LIBS} -lsysmodule_stub -lsysutil_stub -lresc_stub"
     85  dnl  For PSGL
     86  AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) # FIXME: hack
     87  GL_LIBS="${GL_LIBS} -lPSGL -lgcm_cmd -lgcm_sys_stub"
     88  if test "x${enable_debug}" = xyes; then
     89    GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/debug"
     90  elif test "x${enable_release}" = xyes; then
     91    GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/ultra-opt"
     92  else
     93    GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/opt"
     94  fi
     95  dnl  For the runtime Cg compiler
     96  GL_LIBS="${GL_LIBS} -lcgc -lPSGLcgc"
     97  dnl  For the PNG decoder
     98  LOL_LIBS="${LOL_LIBS} -lpngdec_stub"
     99  dnl  For the pad library
     100  LOL_LIBS="${LOL_LIBS} -lio_stub -lusbd_stub -lpadfilter"
     101  AC_PATH_PROG(MAKE_FSELF, make_fself, no)
     102  AM_CONDITIONAL(USE_MAKE_FSELF, test "${MAKE_FSELF}" != "no")])
     103
    78104
    79105dnl Which version of OpenGL to use?
     
    96122   [glLoadIdentity();],
    97123   [ac_cv_my_have_gl="yes"
    98     AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hacky
     124    AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hack
    99125    AC_MSG_RESULT(yes)
    100126    GL_LIBS="-lopengl32"],
    101127   [AC_MSG_RESULT(no)])
    102128  LIBS="$LIBS_save"])
     129AC_CHECK_HEADER(PSGL/psgl.h,
     130 [ac_cv_my_have_gl="yes"])
    103131if test "${ac_cv_my_have_gl}" = "no"; then
    104132  AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]])
     
    136164LIBS="${save_LIBS}"
    137165
    138 dnl Use SDL? (always required)
     166dnl Use SDL? (always required on Linux or Win32)
    139167ac_cv_my_have_sdl="yes"
    140168AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
    141 if test "${SDL_CONFIG}" != "no"; then
     169if test "${SDL_CONFIG}" != "no" -a "x$cross_compiling" != xyes; then
    142170  SDL_CFLAGS="${SDL_CFLAGS} `sdl-config --cflags`"
    143171  SDL_LIBS="${SDL_LIBS} `sdl-config --libs`"
     
    160188CPPFLAGS="${save_CPPFLAGS}"
    161189if test "${ac_cv_my_have_sdl}" = "no"; then
    162   AC_MSG_ERROR([[One of SDL, SDL_Image or SDL_Mixer not found]])
     190  AC_MSG_WARN([[One of SDL, SDL_Image or SDL_Mixer not found]])
    163191else
    164192  AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
Note: See TracChangeset for help on using the changeset viewer.