Merge pull request #1814 from heuripedes/qb-fix

qb improvements
This commit is contained in:
Alcaro 2015-06-17 19:51:35 +02:00
commit bd7b6c1acf
4 changed files with 55 additions and 35 deletions

View File

@ -238,24 +238,35 @@ fi
if [ "$HAVE_OPENGL" != 'no' ] && [ "$HAVE_GLES" != 'yes' ]; then
if [ "$OS" = 'Darwin' ]; then
check_lib CG "-framework Cg" cgCreateContext
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-framework Cg'
check_header OPENGL "OpenGL/gl.h"
check_lib OPENGL "-framework OpenGL"
elif [ "$OS" = 'Win32' ]; then
check_lib_cxx CG -lcg cgCreateContext
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lcg -lcgGL'
else
# On some distros, -lCg doesn't link against -lstdc++ it seems ...
check_lib_cxx CG -lCg cgCreateContext
check_lib OPENGL -lGL
check_header OPENGL "GL/gl.h"
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lCg -lCgGL'
check_lib OPENGL -lopengl32
else
check_header OPENGL "GL/gl.h"
check_lib OPENGL -lGL
fi
# fix undefined variables
PKG_CONF_USED="$PKG_CONF_USED CG"
else
echo "Notice: Ignoring Cg. Desktop OpenGL is not enabled."
HAVE_CG='no'
if [ "$HAVE_OPENGL" = 'yes' ]; then
if [ "$OS" = 'Darwin' ]; then
check_lib CG "-framework Cg" cgCreateContext
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-framework Cg'
elif [ "$OS" = 'Win32' ]; then
check_lib_cxx CG -lcg cgCreateContext
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lcg -lcgGL'
else
# On some distros, -lCg doesn't link against -lstdc++ it seems ...
check_lib_cxx CG -lCg cgCreateContext
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lCg -lCgGL'
fi
# fix undefined variables
PKG_CONF_USED="$PKG_CONF_USED CG"
else
echo "Notice: Ignoring Cg. Desktop OpenGL is not enabled."
HAVE_CG='no'
fi
fi
if [ "$OS" = 'Darwin' ]; then

View File

@ -17,14 +17,14 @@ HAVE_DYLIB=auto # Enable dynamic loading support
HAVE_NETWORKING=auto # Enable networking features (recommended)
HAVE_NETPLAY=auto # Enable netplay support (requires networking)
HAVE_D3D9=yes # Disable Direct3D 9 support
HAVE_OPENGL=yes # Disable OpenGL support
HAVE_OPENGL=auto # Enable OpenGL support
HAVE_GLES=no # Use GLESv2 instead of desktop GL
HAVE_MALI_FBDEV=no # Enable Mali fbdev context support
HAVE_VIVANTE_FBDEV=no # Enable Vivante fbdev context support
HAVE_GLES3=no # Enable OpenGLES3 support
HAVE_X11=auto # Disable everything X11.
HAVE_X11=auto # Enable everything X11.
HAVE_OMAP=no # Enable OMAP video support
HAVE_XINERAMA=auto # Disable Xinerama support.
HAVE_XINERAMA=auto # Enable Xinerama support.
HAVE_KMS=auto # Enable KMS context support
HAVE_EXYNOS=no # Enable Exynos video support
HAVE_DISPMANX=no # Enable Dispmanx video support

View File

@ -22,7 +22,7 @@ fi
rm -f "$TEMP_C" "$TEMP_EXE"
cc_status='does not work'
if [ "$cc_works" == '1' ]; then
if [ "$cc_works" = '1' ]; then
cc_status='works'
elif [ -z "$CC" ]; then
cc_status='not found'
@ -30,7 +30,7 @@ fi
echo "Checking for suitable working C compiler ... $CC $cc_status"
if [ "$cc_works" == '0' ] && [ "$USE_LANG_C" = 'yes' ]; then
if [ "$cc_works" = '0' ] && [ "$USE_LANG_C" = 'yes' ]; then
echo "Error: Cannot proceed without a working C compiler."
exit 1
fi

View File

@ -1,3 +1,10 @@
print_help_option() # $1 = option $@ = description
{
_opt="$1"
shift 1
printf " %-24s %s\n" "$_opt" "$@"
}
print_help()
{ cat << EOF
====================
@ -6,32 +13,34 @@ print_help()
Package: $PACKAGE_NAME
General environment variables:
CC: C compiler
CFLAGS: C compiler flags
CXX: C++ compiler
CXXFLAGS: C++ compiler flags
LDFLAGS: Linker flags
CC: C compiler
CFLAGS: C compiler flags
CXX: C++ compiler
CXXFLAGS: C++ compiler flags
LDFLAGS: Linker flags
General options:
--prefix=\$path: Install path prefix
--global-config-dir=\$path: System wide config file prefix
--host=HOST: cross-compile to build programs to run on HOST
--help: Show this help
Custom options:
EOF
print_help_option "--prefix=PATH" "Install path prefix"
print_help_option "--global-config-dir=PATH" "System wide config file prefix"
print_help_option "--host=HOST" "cross-compile to build programs to run on HOST"
print_help_option "--help" "Show this help"
echo ""
echo "Custom options:"
while IFS='=#' read VAR VAL COMMENT; do
VAR=$(echo "${VAR##HAVE_}" | tr '[A-Z]' '[a-z]')
case "$VAL" in
'yes'*)
echo "--disable-$VAR: $COMMENT";;
print_help_option "--disable-$VAR" "$COMMENT";;
'no'*)
echo "--enable-$VAR: $COMMENT";;
print_help_option "--enable-$VAR" "$COMMENT";;
'auto'*)
echo "--enable-$VAR: $COMMENT"
echo "--disable-$VAR";;
print_help_option "--enable-$VAR" "$COMMENT"
print_help_option "--disable-$VAR";;
*)
echo "--with-$VAR: $COMMENT";;
print_help_option "--with-$VAR" "$COMMENT";;
esac
done < 'qb/config.params.sh'
}