mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-10-26 16:29:37 -04:00
configure: Deduce the path to sdl-config from the compiler
This commit is contained in:
parent
6901d0e45d
commit
ae632fd100
1 changed files with 6 additions and 5 deletions
11
configure
vendored
11
configure
vendored
|
|
@ -51,6 +51,7 @@ optimize_arm920="no"
|
||||||
CC="${CC-${CROSS_COMPILE}gcc}"
|
CC="${CC-${CROSS_COMPILE}gcc}"
|
||||||
CXX="${CXX-${CROSS_COMPILE}g++}"
|
CXX="${CXX-${CROSS_COMPILE}g++}"
|
||||||
AS="${AS-${CROSS_COMPILE}as}"
|
AS="${AS-${CROSS_COMPILE}as}"
|
||||||
|
SDL_CONFIG="`$CC --print-sysroot`/usr/bin/sdl-config"
|
||||||
MAIN_LDLIBS="$LDLIBS -lm"
|
MAIN_LDLIBS="$LDLIBS -lm"
|
||||||
config_mak="config.mak"
|
config_mak="config.mak"
|
||||||
|
|
||||||
|
|
@ -308,7 +309,7 @@ if [ "x$sound_drivers" = "x" ]; then
|
||||||
sound_drivers="$sound_drivers alsa"
|
sound_drivers="$sound_drivers alsa"
|
||||||
MAIN_LDLIBS="-lasound $MAIN_LDLIBS"
|
MAIN_LDLIBS="-lasound $MAIN_LDLIBS"
|
||||||
fi
|
fi
|
||||||
if [ "$need_sdl" = "yes" ] || check_sdl `sdl-config --cflags --libs`; then
|
if [ "$need_sdl" = "yes" ] || check_sdl `$SDL_CONFIG --cflags --libs`; then
|
||||||
sound_drivers="$sound_drivers sdl"
|
sound_drivers="$sound_drivers sdl"
|
||||||
need_sdl="yes"
|
need_sdl="yes"
|
||||||
fi
|
fi
|
||||||
|
|
@ -323,11 +324,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$need_sdl" = "yes" ]; then
|
if [ "$need_sdl" = "yes" ]; then
|
||||||
which sdl-config > /dev/null || \
|
[ -x "$SDL_CONFIG" ] || \
|
||||||
fail "sdl-config is missing; please install libsdl (libsdl1.2-dev)"
|
fail "sdl-config is missing; please install libsdl (libsdl1.2-dev)"
|
||||||
CFLAGS="$CFLAGS `sdl-config --cflags`"
|
CFLAGS="$CFLAGS `$SDL_CONFIG --cflags`"
|
||||||
MAIN_LDLIBS="`sdl-config --libs` $MAIN_LDLIBS"
|
MAIN_LDLIBS="`$SDL_CONFIG --libs` $MAIN_LDLIBS"
|
||||||
check_sdl `sdl-config --libs` || fail "please install libsdl (libsdl1.2-dev)"
|
check_sdl `$SDL_CONFIG --libs` || fail "please install libsdl (libsdl1.2-dev)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat > $TMPC <<EOF
|
cat > $TMPC <<EOF
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue