|
|
|
@ -558,10 +558,10 @@ check_params() {
|
|
|
|
|
log 1 " PREPROCESSOR is only available for OSX"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, and WINCE
|
|
|
|
|
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE)$'`" ]; then
|
|
|
|
|
# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS
|
|
|
|
|
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS)$'`" ]; then
|
|
|
|
|
log 1 "configure: error: invalid option --os=$os"
|
|
|
|
|
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE]"
|
|
|
|
|
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS]"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
# cpu_type can be either 32 or 64
|
|
|
|
@ -760,13 +760,13 @@ check_params() {
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
|
|
|
|
|
log 1 "checking GDI video driver... found"
|
|
|
|
|
else
|
|
|
|
|
log 1 "checking GDI video driver... not Windows, skipping"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -z "$allegro_config" ] && [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
|
|
|
|
|
if [ -z "$allegro_config" ] && [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
|
|
|
|
|
log 1 "configure: error: no video driver development files found"
|
|
|
|
|
log 1 " If you want a dedicated server use --enable-dedicated as parameter"
|
|
|
|
|
exit 1
|
|
|
|
@ -1106,7 +1106,7 @@ check_params() {
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$personal_dir" = "1" ]; then
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ] || [ "$os" = "DOS" ] || [ "$os" = "HAIKU" ]; then
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ] || [ "$os" = "HAIKU" ]; then
|
|
|
|
|
personal_dir="OpenTTD"
|
|
|
|
|
elif [ "$os" = "OSX" ]; then
|
|
|
|
|
personal_dir="Documents/OpenTTD"
|
|
|
|
@ -1594,16 +1594,13 @@ make_cflags_and_ldflags() {
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "OS2" ]; then
|
|
|
|
|
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "OS2" ]; then
|
|
|
|
|
LIBS="$LIBS -lpthread"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ]; then
|
|
|
|
|
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "DOS" ]; then
|
|
|
|
|
LIBS="$LIBS -lc"
|
|
|
|
|
fi
|
|
|
|
|
if [ "$os" = "WINCE" ]; then
|
|
|
|
|
LIBS="$LIBS -lcoredll -lcorelibc -laygshell -lws2 -e WinMainCRTStartup"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$os" = "MORPHOS" ]; then
|
|
|
|
|
# -Wstrict-prototypes generates much noise because of system headers
|
|
|
|
@ -1642,14 +1639,14 @@ make_cflags_and_ldflags() {
|
|
|
|
|
CFLAGS="$CFLAGS -DUNIX"
|
|
|
|
|
fi
|
|
|
|
|
# And others like Windows
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
|
|
|
|
|
CFLAGS="$CFLAGS -DWIN"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -n "$allegro_config" ]; then
|
|
|
|
|
CFLAGS="$CFLAGS -DWITH_ALLEGRO"
|
|
|
|
|
CFLAGS="$CFLAGS `$allegro_config --cflags`"
|
|
|
|
|
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
|
|
|
|
|
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
|
|
|
|
|
if [ "$enable_static" != "0" ]; then
|
|
|
|
|
LIBS="$LIBS `$allegro_config --static --libs`"
|
|
|
|
|
else
|
|
|
|
@ -1662,7 +1659,7 @@ make_cflags_and_ldflags() {
|
|
|
|
|
CFLAGS="$CFLAGS -DWITH_SDL"
|
|
|
|
|
# SDL must not add _GNU_SOURCE as it breaks many platforms
|
|
|
|
|
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`"
|
|
|
|
|
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
|
|
|
|
|
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
|
|
|
|
|
if [ "$enable_static" != "0" ]; then
|
|
|
|
|
LIBS="$LIBS `$sdl_config --static-libs`"
|
|
|
|
|
else
|
|
|
|
@ -2098,7 +2095,7 @@ check_cxx_host() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
check_windres() {
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
|
|
|
|
|
check_compiler "host windres" "windres" "$host" "$windres" "$WINDRES" "windres" "windres" "2" "-V"
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
@ -2304,7 +2301,7 @@ detect_awk() {
|
|
|
|
|
|
|
|
|
|
detect_os() {
|
|
|
|
|
if [ "$os" = "DETECT" ]; then
|
|
|
|
|
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, and WINCE
|
|
|
|
|
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, and DOS
|
|
|
|
|
|
|
|
|
|
# Try first via dumpmachine, then via uname
|
|
|
|
|
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
|
|
|
|
@ -2324,7 +2321,6 @@ detect_os() {
|
|
|
|
|
/mingw/ { print "MINGW"; exit}
|
|
|
|
|
/os2/ { print "OS2"; exit}
|
|
|
|
|
/dos/ { print "DOS"; exit}
|
|
|
|
|
/wince/ { print "WINCE"; exit}
|
|
|
|
|
'`
|
|
|
|
|
|
|
|
|
|
if [ -z "$os" ]; then
|
|
|
|
@ -2350,7 +2346,7 @@ detect_os() {
|
|
|
|
|
if [ -z "$os" ]; then
|
|
|
|
|
log 1 "detecting OS... none detected"
|
|
|
|
|
log 1 "I couldn't detect your OS. Please use --os=OS to force one"
|
|
|
|
|
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, and WINCE"
|
|
|
|
|
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -2793,7 +2789,7 @@ detect_fontconfig() {
|
|
|
|
|
fontconfig_config=""
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
|
|
|
|
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
|
|
|
|
|
log 1 "checking libfontconfig... WIN32, skipping"
|
|
|
|
|
fontconfig_config=""
|
|
|
|
|
return 0
|
|
|
|
@ -3409,7 +3405,7 @@ showhelp() {
|
|
|
|
|
echo " --os=OS the OS we are compiling for [DETECT]"
|
|
|
|
|
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
|
|
|
|
|
echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
|
|
|
|
|
echo " MINGW/OS2/DOS/WINCE/HAIKU"
|
|
|
|
|
echo " MINGW/OS2/DOS/HAIKU"
|
|
|
|
|
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Paths:"
|
|
|
|
|