|
@@ -60,24 +60,25 @@ set_default() {
|
|
|
with_cocoa="1"
|
|
|
with_zlib="1"
|
|
|
with_png="1"
|
|
|
with_makedepend="1"
|
|
|
with_direct_music="1"
|
|
|
with_sort="1"
|
|
|
with_iconv="1"
|
|
|
with_midi=""
|
|
|
with_midi_arg=""
|
|
|
with_libtimidity="1"
|
|
|
with_freetype="1"
|
|
|
with_fontconfig="1"
|
|
|
with_icu="1"
|
|
|
with_psp_config="1"
|
|
|
with_threads="1"
|
|
|
with_distcc="1"
|
|
|
with_ccache="1"
|
|
|
|
|
|
save_params_array="
|
|
|
build
|
|
|
host
|
|
|
cc_build
|
|
|
cc_host
|
|
|
cxx_build
|
|
|
cxx_host
|
|
@@ -124,24 +125,25 @@ set_default() {
|
|
|
with_cocoa
|
|
|
with_zlib
|
|
|
with_png
|
|
|
with_makedepend
|
|
|
with_direct_music
|
|
|
with_sort
|
|
|
with_iconv
|
|
|
with_midi
|
|
|
with_midi_arg
|
|
|
with_libtimidity
|
|
|
with_freetype
|
|
|
with_fontconfig
|
|
|
with_icu
|
|
|
with_psp_config
|
|
|
with_threads
|
|
|
with_distcc
|
|
|
with_ccache
|
|
|
CC CXX CFLAGS LDFLAGS"
|
|
|
}
|
|
|
|
|
|
detect_params() {
|
|
|
# Walk over all params from the user and override any default settings if
|
|
|
# needed. This also handles any invalid option.
|
|
|
for p in "$@"; do
|
|
|
if [ -n "$prev_p" ]; then
|
|
@@ -311,24 +313,31 @@ detect_params() {
|
|
|
--with-freetype=*) with_freetype="$optarg";;
|
|
|
--with-libfreetype) with_freetype="2";;
|
|
|
--without-libfreetype) with_freetype="0";;
|
|
|
--with-libfreetype=*) with_freetype="$optarg";;
|
|
|
|
|
|
--with-fontconfig) with_fontconfig="2";;
|
|
|
--without-fontconfig) with_fontconfig="0";;
|
|
|
--with-fontconfig=*) with_fontconfig="$optarg";;
|
|
|
--with-libfontconfig) with_fontconfig="2";;
|
|
|
--without-libfontconfig) with_fontconfig="0";;
|
|
|
--with-libfontconfig=*) with_fontconfig="$optarg";;
|
|
|
|
|
|
--with-icu) with_icu="2";;
|
|
|
--without-icu) with_icu="0";;
|
|
|
--with-icu=*) with_icu="$optarg";;
|
|
|
--with-libicu) with_icu="2";;
|
|
|
--without-libicu) with_icu="0";;
|
|
|
--with-libicu=*) with_icu="$optarg";;
|
|
|
|
|
|
--with-psp-config) with_psp_config="2";;
|
|
|
--without-psp-config) with_psp_config="0";;
|
|
|
--with-psp-config=*) with_psp_config="$optarg";;
|
|
|
|
|
|
--with-makedepend) with_makedepend="2";;
|
|
|
--without-makedepend) with_makedepend="0";;
|
|
|
--with-makedepend=*) with_makedepend="$optarg";;
|
|
|
|
|
|
--with-direct-music) with_direct_music="2";;
|
|
|
--without-direct-music) with_direct_music="0";;
|
|
|
--with-direct-music=*) with_direct_music="$optarg";;
|
|
|
|
|
@@ -595,24 +604,25 @@ check_params() {
|
|
|
fi
|
|
|
|
|
|
if [ "$enable_assert" != "0" ]; then
|
|
|
log 1 "checking assert... enabled"
|
|
|
else
|
|
|
log 1 "checking assert... disabled"
|
|
|
fi
|
|
|
|
|
|
detect_zlib
|
|
|
detect_png
|
|
|
detect_freetype
|
|
|
detect_fontconfig
|
|
|
detect_icu
|
|
|
detect_pspconfig
|
|
|
detect_libtimidity
|
|
|
|
|
|
if [ "$with_direct_music" = "1" ] || [ "$with_direct_music" = "2" ]; then
|
|
|
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
|
|
|
if [ "$with_direct_music" = "2" ]; then
|
|
|
log 1 "configure: error: direct-music is only supported on Win32 targets"
|
|
|
exit 1
|
|
|
fi
|
|
|
with_direct_music="0"
|
|
|
|
|
|
log 1 "checking direct-music... not Windows, skipping"
|
|
@@ -1218,24 +1228,32 @@ make_cflags_and_ldflags() {
|
|
|
if [ "$enable_static" != "0" ]; then
|
|
|
if [ "$os" = "OSX" ]; then
|
|
|
LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a"
|
|
|
else
|
|
|
# Is it possible to do static with freetype, if so: how?
|
|
|
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
|
|
|
fi
|
|
|
else
|
|
|
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
if [ -n "$icu_config" ]; then
|
|
|
CFLAGS="$CFLAGS -DWITH_ICU"
|
|
|
CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`"
|
|
|
|
|
|
LIBS="$LIBS `$icu_config --ldflags-libsonly | tr '\n\r' ' '`"
|
|
|
fi
|
|
|
|
|
|
|
|
|
if [ "$with_direct_music" != "0" ]; then
|
|
|
CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT"
|
|
|
# GCC 4.0+ doesn't like the DirectX includes (gives tons of
|
|
|
# warnings on it we won't be able to fix). For now just
|
|
|
# suppress those warnings.
|
|
|
if [ $cc_version -ge 40 ]; then
|
|
|
CFLAGS="$CFLAGS -Wno-non-virtual-dtor"
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
if [ -n "$libtimidity" ]; then
|
|
|
if [ "$enable_static" != "0" ]; then
|
|
@@ -2051,24 +2069,67 @@ detect_fontconfig() {
|
|
|
log 1 "configure: error: fontconfig-config couldn't be found"
|
|
|
log 1 "configure: error: you supplied '$with_fontconfig', but it seems invalid"
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
fontconfig_config=""
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
|
log 1 "checking libfontconfig... found"
|
|
|
}
|
|
|
|
|
|
detect_icu() {
|
|
|
# 0 means no, 1 is auto-detect, 2 is force
|
|
|
if [ "$with_icu" = "0" ]; then
|
|
|
log 1 "checking libicu... disabled"
|
|
|
|
|
|
icu_config=""
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
|
if [ "$with_icu" = "1" ] || [ "$with_icu" = "" ] || [ "$with_icu" = "2" ]; then
|
|
|
icu_config="icu-config"
|
|
|
else
|
|
|
icu_config="$with_icu"
|
|
|
fi
|
|
|
|
|
|
version=`$icu_config --version 2>/dev/null`
|
|
|
ret=$?
|
|
|
shortversion=`echo $version | cut -c 1,3`
|
|
|
log 2 "executing $icu_config --version"
|
|
|
log 2 " returned $version"
|
|
|
log 2 " exit code $ret"
|
|
|
|
|
|
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$shortversion" -lt "20" ]; then
|
|
|
if [ -n "$shortversion" ] && [ "$shortversion" -lt "20" ]; then
|
|
|
log 1 "checking libicu... needs at least version 2.0.0, icu NOT enabled"
|
|
|
else
|
|
|
log 1 "checking libicu... not found"
|
|
|
fi
|
|
|
|
|
|
# It was forced, so it should be found.
|
|
|
if [ "$with_icu" != "1" ]; then
|
|
|
log 1 "configure: error: icu-config couldn't be found"
|
|
|
log 1 "configure: error: you supplied '$with_icuconfig', but it seems invalid"
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
icu_config=""
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
|
log 1 "checking libicu... found"
|
|
|
}
|
|
|
|
|
|
detect_pspconfig() {
|
|
|
# 0 means no, 1 is auto-detect, 2 is force
|
|
|
if [ "$with_psp_config" = "0" ]; then
|
|
|
log 1 "checking psp-config... disabled"
|
|
|
|
|
|
psp_config=""
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
|
if [ "$with_psp_config" = "1" ] && [ "$os" != "PSP" ]; then
|
|
|
log 1 "checking psp-config... not PSP, skipping"
|
|
|
|