Ignore:
Timestamp:
Jul 28, 2012, 1:51:03 AM (7 years ago)
Author:
sam
Message:

build: fix the Raspberry Pi build and add a build script for it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r1670 r1677  
    170170dnl  Use the Raspberry Pi libraries?
    171171if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
    172 AC_CHECK_HEADER(bcm_host.h,
    173  [AC_MSG_RESULT(yes)
    174   AC_CHECK_LIB(bcm_host, main,
    175    [ac_cv_my_have_gl="yes"
    176     ac_cv_my_stop_looking_for_gl="yes"
    177     AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
    178     GL_LIBS="-lGLESv2_static -lkhrn_static -lvcos -lvchiq_arm -lbcm_host"])],
    179  [AC_MSG_RESULT(no)])
     172  AC_CHECK_HEADERS(bcm_host.h,
     173   [AC_CHECK_LIB(vcos, main,
     174     [ac_cv_my_have_gl="yes"
     175      ac_cv_my_stop_looking_for_gl="yes"
     176      AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
     177      dnl  FIXME: -lEGL does not belong here but the configure test fails
     178      dnl  when cross-compiling, so we add it manually here.
     179      GL_LIBS="-lGLESv2 -lEGL -lvcos -lvchiq_arm -lbcm_host"])])
    180180fi
    181181
    182182dnl  Use the PS3 PSGL?
    183183if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
    184   AC_CHECK_HEADER(PSGL/psgl.h,
     184  AC_CHECK_HEADERS(PSGL/psgl.h,
    185185   [ac_cv_my_have_gl="yes"
    186186    ac_cv_my_stop_looking_for_gl="yes"])
     
    352352
    353353
    354 dnl Use EGL?
     354dnl  Use EGL?
    355355ac_cv_my_have_egl="no"
    356356PKG_CHECK_MODULES(EGL, egl, [ac_cv_my_have_egl="yes"], [:])
     
    359359  EGL_LIBS="${EGL_LIBS} -lX11"
    360360fi
    361 dnl Use the Raspberry Pi libraries?
    362 AC_CHECK_LIB(EGL_static, main,
     361AC_CHECK_LIB(EGL, main,
    363362 [ac_cv_my_have_egl="yes"
    364363  AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl)
    365   EGL_LIBS="-lEGL_static"])
     364  EGL_LIBS="-lEGL"])
     365dnl  Raspberry Pi is different, check for it with extra libs; also we
     366dnl  look for a different function to bypass autoconf caching
     367AC_CHECK_LIB(EGL, eglGetDisplay,
     368 [ac_cv_my_have_egl="yes"
     369  AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl)
     370  EGL_LIBS="-lEGL -lvcos -lvchiq_arm -lbcm_host -lGLESv2"],
     371 [:],
     372 [-lvcos -lvchiq_arm -lbcm_host -lGLESv2])
    366373AM_CONDITIONAL(USE_EGL, test "${ac_cv_my_have_egl}" != "no")
    367374
Note: See TracChangeset for help on using the changeset viewer.