aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 16 insertions, 15 deletions
diff --git a/configure b/configure
index f91819b7f1..99da4e0478 100755
--- a/configure
+++ b/configure
@@ -125,9 +125,12 @@ _prefix=/usr/local
_srcdir=`dirname $0`
-# TODO: We should really use mktemp(1) to determine a random tmp file name.
-# However, that tool might not be available everywhere.
-TMPO=${_srcdir}/scummvm-conf
+# Determine a tmp file name, using mktemp(1) when available.
+if type mktemp > /dev/null 2>&1 ; then
+ TMPO=`mktemp`
+else
+ TMPO=${_srcdir}/scummvm-conf
+fi
TMPC=${TMPO}.cpp
TMPLOG=${_srcdir}/config.log
@@ -159,7 +162,7 @@ add_line_to_config_mk() {
'"$1"
}
-# Add a line of data to h.mk.
+# Add a line of data to config.h.
add_line_to_config_h() {
_config_h_data="$_config_h_data"'
'"$1"
@@ -218,7 +221,7 @@ if test -n "$_host"; then
# In cross-compiling mode, we cannot run the result
eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
else
- eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
+ eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "./tmp_cxx_compiler$EXEEXT 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
fi
}
@@ -381,7 +384,7 @@ engine_enable() {
fi
if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then
- if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build ${engine}`" != "$opt" ; then
+ if test "`get_engine_name ${engine}`" != "" ; then
eval _engine_${engine}_build=$opt
else
option_error
@@ -400,7 +403,7 @@ engine_disable() {
fi
engine=`echo $1 | sed 's/-/_/g'`
- if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build $engine`" != "no" ; then
+ if test "`get_engine_name ${engine}`" != "" ; then
eval _engine_${engine}_build=no
else
option_error
@@ -579,7 +582,7 @@ Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
- --backend=BACKEND backend to build (sdl, x11, morphos, dc, gp32, gp2x, iphone, null) [sdl]
+ --backend=BACKEND backend to build (sdl, x11, morphos, dc, gp2x, iphone, null) [sdl]
Installation directories:
--prefix=DIR use this prefix for installing ScummVM [/usr/local]
@@ -1089,7 +1092,7 @@ if test -n "$_host"; then
;;
arm-linux|arm*-linux-gnueabi|arm-*-linux|*-angstrom-linux)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
- DEFINES="$DEFINES -DUNIX -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM"
+ DEFINES="$DEFINES -DUNIX -DUSE_ARM_SMUSH_ASM"
#not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen
_endian=little
_need_memalign=yes
@@ -1104,7 +1107,7 @@ if test -n "$_host"; then
;;
gp2x)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
- DEFINES="$DEFINES -DUNIX -DGP2X -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM"
+ DEFINES="$DEFINES -DUNIX -DGP2X -DUSE_ARM_SMUSH_ASM"
_endian=little
_need_memalign=yes
type_1_byte='char'
@@ -1113,7 +1116,6 @@ if test -n "$_host"; then
add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
_backend="gp2x"
- _mak_hq_scalers='DISABLE_HQ_SCALERS = 1'
_build_hq_scalers="no"
;;
ppc-amigaos)
@@ -1151,7 +1153,7 @@ if test -n "$_host"; then
;;
iphone)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
- DEFINES="$DEFINES -DIPHONE -DUNIX -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM"
+ DEFINES="$DEFINES -DIPHONE -DUNIX -DUSE_ARM_SMUSH_ASM"
_endian=little
_need_memalign=yes
type_1_byte='char'
@@ -1160,7 +1162,6 @@ if test -n "$_host"; then
add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
_backend="iphone"
- _mak_hq_scalers='DISABLE_HQ_SCALERS = 1'
_build_hq_scalers="no"
;;
*)
@@ -1211,7 +1212,7 @@ int main(int argc, char **argv)
}
EOF
_need_memalign=yes
- cc_check && $TMPO && _need_memalign=no
+ cc_check && $TMPO$EXEEXT && _need_memalign=no
;;
esac
echo "$_need_memalign"
@@ -1520,7 +1521,7 @@ EOF
# don't execute while cross compiling
cc_check $LDFLAGS $CXXFLAGS $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && _mpeg2=yes
else
- cc_check $LDFLAGS $CXXFLAGS $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && $TMPO && _mpeg2=yes
+ cc_check $LDFLAGS $CXXFLAGS $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && $TMPO$EXEEXT && _mpeg2=yes
fi
fi
if test "$_mpeg2" = yes ; then