mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Merge pull request #5514 from psyke83/pkgfix
config: Raspberry Pi: use videocore pkgconfig & fix fallback detection
This commit is contained in:
commit
7d34a5f423
@ -38,16 +38,28 @@ add_define_make DYLIB_LIB "$DYLIB"
|
|||||||
check_lib SYSTEMD -lsystemd sd_get_machine_names
|
check_lib SYSTEMD -lsystemd sd_get_machine_names
|
||||||
|
|
||||||
if [ "$HAVE_VIDEOCORE" != "no" ]; then
|
if [ "$HAVE_VIDEOCORE" != "no" ]; then
|
||||||
[ -d /opt/vc/lib ] && add_library_dirs /opt/vc/lib && add_library_dirs /opt/vc/lib/GL
|
check_pkgconf VC_TEST bcm_host
|
||||||
check_lib VIDEOCORE -lbcm_host bcm_host_init "-lvcos -lvchiq_arm"
|
|
||||||
|
# use fallback if pkgconfig is not available
|
||||||
|
if [ ! "$VC_TEST_LIBS" ]; then
|
||||||
|
[ -d /opt/vc/lib ] && add_library_dirs /opt/vc/lib && add_library_dirs /opt/vc/lib/GL
|
||||||
|
check_lib VIDEOCORE -lbcm_host bcm_host_init "-lvcos -lvchiq_arm"
|
||||||
|
else
|
||||||
|
HAVE_VIDEOCORE="$HAVE_VC_TEST"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$HAVE_VIDEOCORE" = 'yes' ]; then
|
if [ "$HAVE_VIDEOCORE" = 'yes' ]; then
|
||||||
[ -d /opt/vc/include ] && add_include_dirs /opt/vc/include
|
|
||||||
[ -d /opt/vc/include/interface/vcos/pthreads ] && add_include_dirs /opt/vc/include/interface/vcos/pthreads
|
|
||||||
[ -d /opt/vc/include/interface/vmcs_host/linux ] && add_include_dirs /opt/vc/include/interface/vmcs_host/linux
|
|
||||||
HAVE_OPENGLES='auto'
|
HAVE_OPENGLES='auto'
|
||||||
EXTRA_GL_LIBS="-lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm"
|
VC_PREFIX="brcm"
|
||||||
|
|
||||||
|
# use fallback if pkgconfig is not available
|
||||||
|
if [ ! "$VC_TEST_LIBS" ]; then
|
||||||
|
[ -d /opt/vc/include ] && add_include_dirs /opt/vc/include
|
||||||
|
[ -d /opt/vc/include/interface/vcos/pthreads ] && add_include_dirs /opt/vc/include/interface/vcos/pthreads
|
||||||
|
[ -d /opt/vc/include/interface/vmcs_host/linux ] && add_include_dirs /opt/vc/include/interface/vmcs_host/linux
|
||||||
|
EXTRA_GL_LIBS="-lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$HAVE_NEON" = "yes" ]; then
|
if [ "$HAVE_NEON" = "yes" ]; then
|
||||||
@ -101,11 +113,11 @@ if [ "$HAVE_SSE" = "yes" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$HAVE_EGL" != "no" -a "$OS" != 'Win32' ]; then
|
if [ "$HAVE_EGL" != "no" -a "$OS" != 'Win32' ]; then
|
||||||
check_pkgconf EGL egl
|
check_pkgconf EGL "$VC_PREFIX"egl
|
||||||
# some systems have EGL libs, but no pkgconfig
|
# some systems have EGL libs, but no pkgconfig
|
||||||
if [ "$HAVE_EGL" = "no" ]; then
|
if [ "$HAVE_EGL" = "no" ]; then
|
||||||
HAVE_EGL=auto && check_lib EGL "-lEGL $EXTRA_GL_LIBS"
|
HAVE_EGL=auto && check_lib EGL "-l"$VC_PREFIX"EGL $EXTRA_GL_LIBS"
|
||||||
[ "$HAVE_EGL" = "yes" ] && EGL_LIBS=-lEGL
|
[ "$HAVE_EGL" = "yes" ] && EGL_LIBS=-l"$VC_PREFIX"EGL
|
||||||
else
|
else
|
||||||
EGL_LIBS="$EGL_LIBS $EXTRA_GL_LIBS"
|
EGL_LIBS="$EGL_LIBS $EXTRA_GL_LIBS"
|
||||||
fi
|
fi
|
||||||
@ -378,15 +390,15 @@ if [ "$HAVE_EGL" = "yes" ]; then
|
|||||||
add_define_make OPENGLES_LIBS "$OPENGLES_LIBS"
|
add_define_make OPENGLES_LIBS "$OPENGLES_LIBS"
|
||||||
add_define_make OPENGLES_CFLAGS "$OPENGLES_CFLAGS"
|
add_define_make OPENGLES_CFLAGS "$OPENGLES_CFLAGS"
|
||||||
else
|
else
|
||||||
HAVE_OPENGLES=auto check_pkgconf OPENGLES glesv2
|
HAVE_OPENGLES=auto check_pkgconf OPENGLES "$VC_PREFIX"glesv2
|
||||||
[ "$HAVE_OPENGLES" = "no" ] && HAVE_OPENGLES=auto check_lib OPENGLES "-lGLESv2 $EXTRA_GL_LIBS" && add_define_make OPENGLES_LIBS "-lGLESv2 $EXTRA_GL_LIBS"
|
[ "$HAVE_OPENGLES" = "no" ] && HAVE_OPENGLES=auto check_lib OPENGLES "-l"$VC_PREFIX"GLESv2 $EXTRA_GL_LIBS" && add_define_make OPENGLES_LIBS "-l"$VC_PREFIX"GLESv2 $EXTRA_GL_LIBS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$HAVE_VG" != "no" ]; then
|
if [ "$HAVE_VG" != "no" ]; then
|
||||||
check_pkgconf VG vg
|
check_pkgconf VG "$VC_PREFIX"vg
|
||||||
if [ "$HAVE_VG" = "no" ]; then
|
if [ "$HAVE_VG" = "no" ]; then
|
||||||
HAVE_VG=auto check_lib VG "-lOpenVG $EXTRA_GL_LIBS"
|
HAVE_VG=auto check_lib VG "-l"$VC_PREFIX"OpenVG $EXTRA_GL_LIBS"
|
||||||
[ "$HAVE_VG" = "yes" ] && VG_LIBS=-lOpenVG
|
[ "$HAVE_VG" = "yes" ] && VG_LIBS=-l"$VC_PREFIX"OpenVG
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user