1
0
Fork 0
forked from len0rd/rockbox

configure: Parameterize the neame of the "sdl config" executable

We moved to SDL2 but still had the SDL1 'sdl-config' executable
used in one place.  Additionally, all comments and the help text
referenced the wrong executable name.

Change-Id: Ie2efa80d27be5f6391fc84e49e207aa2aac26e72
This commit is contained in:
Solomon Peachy 2024-10-31 08:32:23 -04:00
parent 65241f5a32
commit 825e406965

26
tools/configure vendored
View file

@ -26,7 +26,7 @@ rbdir="/.rockbox"
bindir= bindir=
libdir= libdir=
sharedir= sharedir=
sdl_config=sdl2-config
arm_thumb_boot= arm_thumb_boot=
thread_support="ASSEMBLER_THREADS" thread_support="ASSEMBLER_THREADS"
sysfont="08-Schumacher-Clean" sysfont="08-Schumacher-Clean"
@ -159,13 +159,13 @@ findtool(){
fi fi
} }
# scan the $PATH for sdl-config - check whether for a (cross-)win32 # scan the $PATH for ${sdl_config} - check whether for a (cross-)win32
# sdl as requested # sdl as requested
findsdl(){ findsdl(){
files=sdl2-config files=${sdl_config}
if [ -n "$CROSS_COMPILE" ]; then if [ -n "$CROSS_COMPILE" ]; then
# sdl-config might (not) be prefixed for cross compiles so try both. # ${sdl_config} might (not) be prefixed for cross compiles so try both.
files="${CROSS_COMPILE}sdl-config:${files}" files="${CROSS_COMPILE}${sdl_config}:${files}"
fi fi
winbuild="$1" winbuild="$1"
@ -191,7 +191,7 @@ findsdl(){
fi fi
fi fi
# search for the correct sdl-config # search for the correct ${sdl_config}
IFS=":" IFS=":"
for path in $paths2check for path in $paths2check
do do
@ -421,19 +421,19 @@ simcc () {
if [ -n `echo $app_type | grep "sdl"` ]; then if [ -n `echo $app_type | grep "sdl"` ]; then
if [ -z "$sdl" ]; then if [ -z "$sdl" ]; then
echo "configure didn't find sdl-config, which indicates that you" echo "configure didn't find ${sdl_config}, which indicates that you"
echo "don't have SDL (properly) installed. Please correct and" echo "don't have SDL (properly) installed. Please correct and"
echo "re-run configure!" echo "re-run configure!"
exit 2 exit 2
else else
echo Using $sdl echo Using $sdl
# generic sdl-config checker # generic ${sdl_config} checker
sdlccopts=$($sdl --cflags) sdlccopts=$($sdl --cflags)
if $sdl --static-libs > /dev/null 2>&1 ; then if $sdl --static-libs > /dev/null 2>&1 ; then
sdlldopts=$($sdl --static-libs) sdlldopts=$($sdl --static-libs)
else else
echo "Your sdl-config does not know about static libs, falling back to shared library" echo "Your ${sdl_config} does not know about static libs, falling back to shared library"
sdlldopts=$($sdl --libs) sdlldopts=$($sdl --libs)
# if [ "$win32crosscompile" = "yes" ] ; then # if [ "$win32crosscompile" = "yes" ] ; then
LDOPTS=`echo $LDOPTS | sed -e s/-static//` LDOPTS=`echo $LDOPTS | sed -e s/-static//`
@ -661,8 +661,8 @@ maemocc () {
GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`" GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
LDOPTS="$LDOPTS `pkg-config --libs sdl`" LDOPTS="$LDOPTS `pkg-config --libs sdl`"
else else
GCCOPTS="$GCCOPTS `sdl-config --cflags`" GCCOPTS="$GCCOPTS `${sdl_config} --cflags`"
LDOPTS="$LDOPTS `sdl-config --libs`" LDOPTS="$LDOPTS `${sdl_config} --libs`"
fi fi
# glib and libosso support # glib and libosso support
@ -737,8 +737,8 @@ pandoracc () {
prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-" prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
# Detect SDL # Detect SDL
GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`" GCCOPTS="$GCCOPTS `$PNDSDK/bin/${sdl_config} --cflags`"
LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`" LDOPTS="$LDOPTS `$PNDSDK/bin/${sdl_config} --libs`"
# Compiler options # Compiler options
GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing" GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"