comparison configure.in @ 3155:abc49915ccb2 gsoc2009_ps3

Checking for spu-progs and libs.
author Martin Lowinski <martin@goldtopf.org>
date Tue, 11 Aug 2009 14:37:19 +0000
parents 95e48f7a3a93
children 30f3b987fec3
comparison
equal deleted inserted replaced
3154:95e48f7a3a93 3155:abc49915ccb2
1506 { 1506 {
1507 AC_ARG_ENABLE(video-ps3, 1507 AC_ARG_ENABLE(video-ps3,
1508 AC_HELP_STRING([--enable-video-ps3], [use PlayStation 3 Cell driver [[default=yes]]]), 1508 AC_HELP_STRING([--enable-video-ps3], [use PlayStation 3 Cell driver [[default=yes]]]),
1509 , enable_video_ps3=yes) 1509 , enable_video_ps3=yes)
1510 if test x$enable_video = xyes -a x$enable_video_ps3 = xyes; then 1510 if test x$enable_video = xyes -a x$enable_video_ps3 = xyes; then
1511 AC_MSG_CHECKING(for PlayStation 3 Cell support)
1512 video_ps3=no 1511 video_ps3=no
1513 AC_TRY_COMPILE([ 1512 AC_CHECK_HEADER([linux/fb.h])
1514 #include <linux/fb.h> 1513 AC_CHECK_HEADER([asm/ps3fb.h], [have_ps3fb_hdr=yes], [],
1515 #include <asm/ps3fb.h> 1514 [#ifndef _LINUX_TYPES_H
1516 ],[ 1515 #include <linux/types.h>
1517 ],[ 1516 #endif])
1518 video_ps3=yes 1517 AC_CHECK_HEADER([libspe2.h], have_libspe2_hdr=yes)
1519 ]) 1518 AC_CHECK_LIB([spe2], spe_context_create, have_spe2_lib=yes)
1520 AC_MSG_RESULT($video_ps3) 1519
1521 if test x$video_ps3 = xyes; then 1520 AC_CHECK_PROGS(SPU_GCC, [spu-gcc])
1522 AC_DEFINE(SDL_VIDEO_DRIVER_PS3) 1521 AC_CHECK_PROGS(EMBEDSPU, [embedspu])
1523 SOURCES="$SOURCES $srcdir/src/video/ps3/*.c" 1522
1524 EXTRA_CFLAGS="$EXTRA_CFLAGS -I/opt/cell/sdk/usr/include" 1523 have_spu_libs=yes
1525 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/cell/sdk/usr/lib -lspe2 -lfb_writer_spu -lyuv2rgb_spu -lbilin_scaler_spu" 1524 AC_CHECK_LIB([fb_writer_spu], [main], [], [have_spu_libs=no])
1526 echo "*** Before building SDL please run make ps3libs" 1525 AC_CHECK_LIB([yuv2rgb_spu], [main], [], [have_spu_libs=no])
1527 have_video=yes 1526 AC_CHECK_LIB([bilin_scaler_spu], [main], [], [have_spu_libs=no])
1528 fi 1527 if test x$have_ps3fb_hdr = xyes -a x$have_libspe2_hdr = xyes -a x$have_spe2_lib = xyes -a "$SPU_GCC" -a "$EMBEDSPU"; then
1528 AC_DEFINE(SDL_VIDEO_DRIVER_PS3)
1529 video_ps3=yes
1530 have_video=yes
1531 SOURCES="$SOURCES $srcdir/src/video/ps3/*.c"
1532 EXTRA_CFLAGS="$EXTRA_CFLAGS -I/opt/cell/sdk/usr/include"
1533 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/cell/sdk/usr/lib -lspe2 -lfb_writer_spu -lyuv2rgb_spu -lbilin_scaler_spu"
1534
1535 if test x$have_spu_libs = xno; then
1536 AC_MSG_WARN([ps3libs missing, please run make ps3libs])
1537 fi
1538 fi
1539 AC_MSG_CHECKING([for PlayStation 3 Cell support])
1540 AC_MSG_RESULT([$video_ps3])
1529 fi 1541 fi
1530 } 1542 }
1531 1543
1532 dnl Find the SVGAlib includes and libraries 1544 dnl Find the SVGAlib includes and libraries
1533 CheckSVGA() 1545 CheckSVGA()