mirror of
https://github.com/chocolate-doom/buildscripts.git
synced 2024-11-22 11:51:23 +00:00
Add option to build libsamplerate.
Subversion-branch: /buildscripts Subversion-revision: 2476
This commit is contained in:
parent
a8da34dc91
commit
68108fda5a
1 changed files with 19 additions and 6 deletions
|
@ -212,7 +212,7 @@ autogen_module() {
|
||||||
# Check if a given header file is in the standard include directory or
|
# Check if a given header file is in the standard include directory or
|
||||||
# SDL include directory.
|
# SDL include directory.
|
||||||
|
|
||||||
check_header() {
|
have_header() {
|
||||||
headerfile=$1
|
headerfile=$1
|
||||||
|
|
||||||
echo "#include <$headerfile>" | cpp $SDL_CFLAGS $CPPFLAGS > /dev/null
|
echo "#include <$headerfile>" | cpp $SDL_CFLAGS $CPPFLAGS > /dev/null
|
||||||
|
@ -237,6 +237,7 @@ usage() {
|
||||||
echo
|
echo
|
||||||
echo "Extra options:"
|
echo "Extra options:"
|
||||||
echo "-v2 : Build v2-branch instead of trunk"
|
echo "-v2 : Build v2-branch instead of trunk"
|
||||||
|
echo "-libsamplerate : Build libsamplerate"
|
||||||
echo "-host <spec> : Cross-compile for the specified target."
|
echo "-host <spec> : Cross-compile for the specified target."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
@ -268,6 +269,7 @@ fi
|
||||||
|
|
||||||
svn_build=false
|
svn_build=false
|
||||||
force_build_sdl=false
|
force_build_sdl=false
|
||||||
|
build_libsamplerate=false
|
||||||
|
|
||||||
INSTALL_DIR=$CHOCOLATE_DOOM_DIR/install
|
INSTALL_DIR=$CHOCOLATE_DOOM_DIR/install
|
||||||
INSTALL_COMMAND=
|
INSTALL_COMMAND=
|
||||||
|
@ -293,6 +295,9 @@ for arg in "$@"; do
|
||||||
# Build libraries from scratch when cross compiling:
|
# Build libraries from scratch when cross compiling:
|
||||||
force_build_sdl=true
|
force_build_sdl=true
|
||||||
;;
|
;;
|
||||||
|
"-libsamplerate")
|
||||||
|
build_libsamplerate=true
|
||||||
|
;;
|
||||||
"-svn")
|
"-svn")
|
||||||
svn_build=true
|
svn_build=true
|
||||||
;;
|
;;
|
||||||
|
@ -334,7 +339,6 @@ fi
|
||||||
|
|
||||||
# Windows build?
|
# Windows build?
|
||||||
|
|
||||||
echo $HOST_ARG
|
|
||||||
if [ `uname` = "Cygwin" ] || pattern_match "*mingw*" "$HOST_ARG"; then
|
if [ `uname` = "Cygwin" ] || pattern_match "*mingw*" "$HOST_ARG"; then
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -367,7 +371,7 @@ else
|
||||||
"$SDL_BUILD_OPTIONS $HOST_ARG"
|
"$SDL_BUILD_OPTIONS $HOST_ARG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $force_build_sdl || ! check_header SDL_net.h; then
|
if $force_build_sdl || ! have_header SDL_net.h; then
|
||||||
|
|
||||||
# SDL_net not installed; we must build it
|
# SDL_net not installed; we must build it
|
||||||
|
|
||||||
|
@ -375,7 +379,7 @@ if $force_build_sdl || ! check_header SDL_net.h; then
|
||||||
SDL_net 1.2.6 "$HOST_ARG"
|
SDL_net 1.2.6 "$HOST_ARG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $force_build_sdl || ! check_header SDL_mixer.h; then
|
if $force_build_sdl || ! have_header SDL_mixer.h; then
|
||||||
|
|
||||||
# SDL_mixer not installed; we must build it
|
# SDL_mixer not installed; we must build it
|
||||||
# Disable dependencies on external libraries for sound file formats:
|
# Disable dependencies on external libraries for sound file formats:
|
||||||
|
@ -387,6 +391,15 @@ if $force_build_sdl || ! check_header SDL_mixer.h; then
|
||||||
SDL_mixer 1.2.11 "$HOST_ARG $mixer_opts"
|
SDL_mixer 1.2.11 "$HOST_ARG $mixer_opts"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Optional libsamplerate support:
|
||||||
|
|
||||||
|
if $build_libsamplerate
|
||||||
|
if $force_build_sdl || ! have_header libsamplerate.h; then
|
||||||
|
fetch_and_build_module http://www.mega-nerd.com/SRC/ \
|
||||||
|
libsamplerate 0.1.8 "$HOST_ARG"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Build Chocolate Doom. We can build the stable version or check out
|
# Build Chocolate Doom. We can build the stable version or check out
|
||||||
# the latest code from Subversion.
|
# the latest code from Subversion.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue