aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure60
1 files changed, 27 insertions, 33 deletions
diff --git a/configure b/configure
index 2fc8631f57..69fffc7eea 100755
--- a/configure
+++ b/configure
@@ -1548,7 +1548,6 @@ case $_host_os in
LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm"
LDFLAGS="$LDFLAGS -mthumb-interwork"
add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK"
- _posix=yes
_seq_midi=no
;;
beos*)
@@ -1558,12 +1557,8 @@ case $_host_os in
CFLAGS="-I/boot/home/config/include"
CXXFLAGS="$CXXFLAGS -fhuge-objects"
LIBS="$LIBS -lbind -lsocket"
- _posix=yes
_seq_midi=no
;;
- bsd* | hpux* | netbsd* | openbsd* | sunos*)
- _posix=yes
- ;;
cygwin*)
echo ERROR: Cygwin building is not supported by ScummVM anymore. Consider using MinGW.
exit 1
@@ -1572,7 +1567,6 @@ case $_host_os in
DEFINES="$DEFINES -DMACOSX"
LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI"
add_line_to_config_mk 'MACOSX = 1'
- _posix=yes
;;
dreamcast)
DEFINES="$DEFINES -D__DC__ -DNONSTANDARD_PORT"
@@ -1598,7 +1592,6 @@ case $_host_os in
freebsd*)
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CXXFLAGS="$CXXFLAGS -I/usr/local/include"
- _posix=yes
;;
gamecube)
CXXFLAGS="$CXXFLAGS -Os -mogc -mcpu=750 -meabi -mhard-float"
@@ -1616,14 +1609,12 @@ case $_host_os in
DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE"
# Needs -lnetwork for the timidity MIDI driver
LIBS="$LIBS -lnetwork"
- _posix=yes
_seq_midi=no
;;
irix*)
DEFINES="$DEFINES -DIRIX -DSYSTEM_NOT_SUPPORTING_D_TYPE"
LIBS="$LIBS -lmd -lfastm -lm"
_ranlib=:
- _posix=yes
;;
linux* | uclinux*)
# When not cross-compiling, enable large file support, but don't
@@ -1631,7 +1622,6 @@ case $_host_os in
if test -z "$_host"; then
CXXFLAGS="$CXXFLAGS $(getconf LFS_CFLAGS 2>/dev/null)"
fi
- _posix=yes
DEFINES="$DEFINES -DLUA_USE_POSIX"
;;
mingw*)
@@ -1642,7 +1632,6 @@ case $_host_os in
;;
mint*)
DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE"
- _posix=yes
;;
n64)
DEFINES="$DEFINES -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT"
@@ -1650,9 +1639,6 @@ case $_host_os in
DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU"
DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE"
;;
- os2-emx*)
- _posix=yes # FIXME??? Why??
- ;;
ps2)
# TODO ps2
CXXFLAGS="$CXXFLAGS -G2"
@@ -1669,7 +1655,6 @@ case $_host_os in
DEFINES="$DEFINES -DSOLARIS -DSYSTEM_NOT_SUPPORTING_D_TYPE"
# Needs -lbind -lsocket for the timidity MIDI driver
LIBS="$LIBS -lnsl -lsocket"
- _posix=yes
;;
webos)
CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL -I$WEBOS_PDK/device/usr/include"
@@ -1679,7 +1664,6 @@ case $_host_os in
LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined"
LDFLAGS="$LDFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK"
- _posix=yes
_seq_midi=no
;;
wii)
@@ -1699,19 +1683,42 @@ case $_host_os in
DEFINES="$DEFINES -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT"
DEFINES="$DEFINES -DWIN32 -Dcdecl= -D__cdecl__="
;;
- # given this is a shell script assume some type of posix
- *)
- echo "WARNING: could not establish system type, assuming unix like"
+esac
+
+#
+# Determine whether host is POSIX compliant, or at least POSIX
+# compatible enough to support our POSIX code (including dlsym(),
+# mkdir() and some other APIs).
+#
+# TODO: Instead of basing this on the host name, we should really base
+# this on the presence of features (such as the dlsym and mkdir APIs).
+#
+echo_n "Checking if host is POSIX compliant... "
+case $_host_os in
+ amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | psp | wii | wince)
+ ;;
+ android | beos* | bsd* | darwin* | freebsd* | gph-linux | haiku* | hpux* | iphone | irix* | linux* | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
_posix=yes
;;
+ os2-emx*)
+ _posix=yes # FIXME: Really???
+ ;;
+ *)
+ # given this is a shell script, we might assume some type of posix.
+ # However, the host system might be a totally different one, so
+ # we can assume nothing about it.
+ # Indeed, as mentioned further above, we really should test for the
+ # presences of relevant APIs on the host anyway...
+ _posix=no
+ ;;
esac
+echo $_posix
if test -n "$_host"; then
# Cross-compiling mode - add your target here if needed
echo "Cross-compiling to $_host"
case "$_host" in
android | android-v7a)
- _posix=yes
# we link a .so as default
LDFLAGS="$LDFLAGS -shared -Wl,-Bsymbolic,--no-undefined"
HOSTEXEPRE=lib
@@ -1724,11 +1731,9 @@ if test -n "$_host"; then
_timidity=no
;;
arm-linux|arm*-linux-gnueabi|arm-*-linux)
- _posix=yes
;;
arm-riscos|linupy)
DEFINES="$DEFINES -DLINUPY"
- _posix=yes
;;
bfin*)
;;
@@ -1744,7 +1749,6 @@ if test -n "$_host"; then
fi
CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
ASFLAGS="$ASFLAGS"
- _posix=yes
_backend="gph"
_build_hq_scalers=no
_vkeybd=yes
@@ -1818,7 +1822,6 @@ if test -n "$_host"; then
CXXFLAGS="$CXXFLAGS -march=armv4t"
ASFLAGS="$ASFLAGS -mfloat-abi=soft"
LDFLAGS="$LDFLAGS -static"
- _posix=yes
_backend="gph"
_build_hq_scalers=no
_vkeybd=yes
@@ -1836,7 +1839,6 @@ if test -n "$_host"; then
fi
CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
ASFLAGS="$ASFLAGS -mfloat-abi=soft"
- _posix=yes
_backend="gph"
_build_hq_scalers=no
_vkeybd=yes
@@ -1847,14 +1849,12 @@ if test -n "$_host"; then
;;
iphone)
DEFINES="$DEFINES -DIPHONE"
- _posix=yes
_backend="iphone"
_build_hq_scalers=no
_seq_midi=no
;;
m68k-atari-mint)
DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE"
- _posix=yes
_ranlib=m68k-atari-mint-ranlib
_ar="m68k-atari-mint-ar cru"
_seq_midi=no
@@ -1872,7 +1872,6 @@ if test -n "$_host"; then
motoezx)
DEFINES="$DEFINES -DMOTOEZX"
ASFLAGS="$ASFLAGS -mfpu=vfp"
- _posix=yes
_backend="linuxmoto"
_build_hq_scalers=no
_mt32emu=no
@@ -1883,7 +1882,6 @@ if test -n "$_host"; then
motomagx)
DEFINES="$DEFINES -DMOTOMAGX"
ASFLAGS="$ASFLAGS -mfpu=vfp"
- _posix=yes
_backend="linuxmoto"
_build_hq_scalers=no
_mt32emu=no
@@ -1915,7 +1913,6 @@ if test -n "$_host"; then
;;
neuros)
DEFINES="$DEFINES -DNEUROS"
- _posix=yes
_backend='null'
_build_hq_scalers=no
_mt32emu=no
@@ -1930,7 +1927,6 @@ if test -n "$_host"; then
fi
CXXFLAGS="$CXXFLAGS -march=armv7-a -mtune=cortex-a8 -mfpu=neon"
ASFLAGS="$ASFLAGS -mfloat-abi=soft"
- _posix=yes
_backend="openpandora"
_build_hq_scalers=yes
_vkeybd=no
@@ -1979,13 +1975,11 @@ if test -n "$_host"; then
DEFINES="$DEFINES -DSAMSUNGTV -DDISABLE_COMMAND_LINE"
ASFLAGS="$ASFLAGS -mfpu=vfp"
HOSTEXEEXT=".so"
- _posix=yes
_backend="samsungtv"
_mt32emu=no
_vkeybd=yes
;;
webos)
- _posix=yes
_backend="webos"
_port_mk="backends/platform/webos/webos.mk"
_build_scalers=no