|
@@ -69,12 +69,13 @@ set_default() {
|
|
|
with_allegro="1"
|
|
|
with_sdl="1"
|
|
|
with_cocoa="1"
|
|
|
with_zlib="1"
|
|
|
with_lzma="1"
|
|
|
with_lzo2="1"
|
|
|
with_xdg_basedir="1"
|
|
|
with_png="1"
|
|
|
enable_builtin_depend="1"
|
|
|
with_makedepend="0"
|
|
|
with_direct_music="1"
|
|
|
with_sort="1"
|
|
|
with_iconv="1"
|
|
@@ -142,12 +143,13 @@ set_default() {
|
|
|
with_allegro
|
|
|
with_sdl
|
|
|
with_cocoa
|
|
|
with_zlib
|
|
|
with_lzma
|
|
|
with_lzo2
|
|
|
with_xdg_basedir
|
|
|
with_png
|
|
|
enable_builtin_depend
|
|
|
with_makedepend
|
|
|
with_direct_music
|
|
|
with_sort
|
|
|
with_iconv
|
|
@@ -344,12 +346,19 @@ detect_params() {
|
|
|
--without-lzo2) with_lzo2="0";;
|
|
|
--with-lzo2=*) with_lzo2="$optarg";;
|
|
|
--with-liblzo2) with_lzo2="2";;
|
|
|
--without-liblzo2) with_lzo2="0";;
|
|
|
--with-liblzo2=*) with_lzo2="$optarg";;
|
|
|
|
|
|
--with-xdg-basedir) with_xdg_basedir="2";;
|
|
|
--without-xdg-basedir) with_xdg_basedir="0";;
|
|
|
--with-xdg-basedir=*) with_xdg_basedir="$optarg";;
|
|
|
--with-libxdg-basedir) with_xdg_basedir="2";;
|
|
|
--without-libxdg-basedir) with_xdg_basedir="0";;
|
|
|
--with-libxdg-basedir=*) with_xdg_basedir="$optarg";;
|
|
|
|
|
|
--with-png) with_png="2";;
|
|
|
--without-png) with_png="0";;
|
|
|
--with-png=*) with_png="$optarg";;
|
|
|
--with-libpng) with_png="2";;
|
|
|
--without-libpng) with_png="0";;
|
|
|
--with-libpng=*) with_png="$optarg";;
|
|
@@ -815,12 +824,13 @@ check_params() {
|
|
|
log 1 "configure: error: no liblzo2 detected"
|
|
|
log 1 " If you want to compile without liblzo2 use --without-liblzo2 as parameter"
|
|
|
exit
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
detect_xdg_basedir
|
|
|
detect_png
|
|
|
detect_freetype
|
|
|
detect_fontconfig
|
|
|
detect_icu
|
|
|
detect_pspconfig
|
|
|
detect_libtimidity
|
|
@@ -1658,12 +1668,23 @@ make_cflags_and_ldflags() {
|
|
|
else
|
|
|
LIBS="$LIBS -llzo2"
|
|
|
fi
|
|
|
CFLAGS="$CFLAGS -DWITH_LZO"
|
|
|
fi
|
|
|
|
|
|
if [ -n "$xdg_basedir_config" ]; then
|
|
|
CFLAGS="$CFLAGS -DWITH_XDG_BASEDIR"
|
|
|
CFLAGS="$CFLAGS `$xdg_basedir_config --cflags | tr '\n\r' ' '`"
|
|
|
|
|
|
if [ "$enable_static" != "0" ]; then
|
|
|
LIBS="$LIBS `$xdg_basedir_config --libs --static | tr '\n\r' ' '`"
|
|
|
else
|
|
|
LIBS="$LIBS `$xdg_basedir_config --libs | tr '\n\r' ' '`"
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
# 64bit machines need -D_SQ64
|
|
|
if [ "$cpu_type" = "64" ] && [ "$enable_universal" = "0" ]; then
|
|
|
CFLAGS="$CFLAGS -D_SQ64"
|
|
|
fi
|
|
|
CFLAGS="$CFLAGS -I$SCRIPT_SRC_DIR"
|
|
|
|
|
@@ -2719,12 +2740,50 @@ detect_lzma() {
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
|
log 1 "checking liblzma... found"
|
|
|
}
|
|
|
|
|
|
detect_xdg_basedir() {
|
|
|
# 0 means no, 1 is auto-detect, 2 is force
|
|
|
if [ "$with_xdg_basedir" = "0" ]; then
|
|
|
log 1 "checking libxdg_basedir... disabled"
|
|
|
|
|
|
xdg_basedir_config=""
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
|
if [ "$with_xdg_basedir" = "1" ] || [ "$with_xdg_basedir" = "" ] || [ "$with_xdg_basedir" = "2" ]; then
|
|
|
xdg_basedir_config="pkg-config libxdg-basedir"
|
|
|
else
|
|
|
xdg_basedir_config="$with_xdg_basedir"
|
|
|
fi
|
|
|
|
|
|
version=`$xdg_basedir_config --modversion 2>/dev/null`
|
|
|
ret=$?
|
|
|
log 2 "executing $xdg_basedir_config --modversion"
|
|
|
log 2 " returned $version"
|
|
|
log 2 " exit code $ret"
|
|
|
|
|
|
if [ -z "$version" ] || [ "$ret" != "0" ]; then
|
|
|
log 1 "checking libxdg_basedir... not found"
|
|
|
|
|
|
# It was forced, so it should be found.
|
|
|
if [ "$with_xdg_basedir" != "1" ]; then
|
|
|
log 1 "configure: error: pkg-config libxdg_basedir couldn't be found"
|
|
|
log 1 "configure: error: you supplied '$with_xdg_basedir', but it seems invalid"
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
xdg_basedir_config=""
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
|
log 1 "checking libxdg_basedir... found"
|
|
|
}
|
|
|
|
|
|
detect_png() {
|
|
|
# 0 means no, 1 is auto-detect, 2 is force
|
|
|
if [ "$with_png" = "0" ]; then
|
|
|
log 1 "checking libpng... disabled"
|
|
|
|
|
|
png_config=""
|
|
@@ -3639,12 +3698,14 @@ showhelp() {
|
|
|
echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support"
|
|
|
echo " --with-png[=libpng-config] enables libpng support"
|
|
|
echo " --with-freetype[=freetype-config]"
|
|
|
echo " enables libfreetype support"
|
|
|
echo " --with-fontconfig[=pkg-config fontconfig]"
|
|
|
echo " enables fontconfig support"
|
|
|
echo " --with-xdg-basedir[=pkg-config libxdg-basedir]"
|
|
|
echo " enables fontconfig support"
|
|
|
echo " --with-icu[=icu-config] enables icu (used for right-to-left support)"
|
|
|
echo " --static-icu try to link statically (libsicu instead of"
|
|
|
echo " libicu; can fail as the new name is guessed)"
|
|
|
echo " --with-iconv[=iconv-path] enables iconv support"
|
|
|
echo " --with-psp-config[=psp-config] enables psp-config support (PSP ONLY)"
|
|
|
echo " --disable-builtin-depend disable use of builtin deps finder"
|