@@ -300,16 +300,16 @@ check_params() {
# Endian only allows AUTO, LE and, BE
if [ -z "`echo $endian | egrep '^(AUTO|LE|BE)$'`" ]; then
echo "configure: error: invalid option --endian=$endian"
echo " Available options are: --endian=[AUTO|LE|BE]"
exit 1
fi
# OS only allows DETECT, UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP)$'`" ]; then
# OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP)$'`" ]; then
echo "configure: error: invalid option --os=$os"
echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP]"
echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE|PSP]"
# enable_debug should be between 0 and 4
if [ -z "`echo $enable_debug | grep '^[0123]$'`" ]; then
echo "configure: error: invalid option --enable-debug=$enable_debug"
echo " Available options are: --enable-debug[=0123]"
@@ -706,13 +706,13 @@ make_cflags_and_ldflags() {
# compiler all happy.
if [ $cc_version -ge 40 ]; then
CFLAGS="$CFLAGS -fno-strict-aliasing"
if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ]; then
if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ]; then
LIBS="$LIBS -lpthread"
LIBS="$LIBS -lrt"
if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ] && [ "$os" != "WINCE" ]; then
LIBS="$LIBS -lc"
@@ -730,25 +730,29 @@ make_cflags_and_ldflags() {
if [ "$os" = "MORPHOS" ]; then
# -Wstrict-prototypes generates much noise because of system headers
CFLAGS="$CFLAGS -Wno-strict-prototypes"
if [ "$os" = "OPENBSD" ]; then
LIBS="$LIBS -pthread"
if [ "$os" = "OSX" ]; then
LDFLAGS="$LDFLAGS -framework Cocoa"
if [ "$enable_dedicated" = "0" ]; then
LIBS="$LIBS -framework QuickTime"
if [ "$os" = "BEOS" ]; then
LIBS="$LIBS -lmidi -lbe"
# Most targets act like UNIX, just with some additions
if [ "$os" = "BEOS" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
if [ "$os" = "BEOS" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
CFLAGS="$CFLAGS -DUNIX"
# And others like Windows
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
CFLAGS="$CFLAGS -DWIN"
@@ -1236,19 +1240,20 @@ detect_awk() {
log 1 "checking awk... $awk"
}
detect_os() {
if [ "$os" = "DETECT" ]; then
# Detect UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
# Detect UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
# Try first via dumpmachine, then via uname
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
/linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit}
/openbsd/ { print "OPENBSD"; exit}
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/sunos/ { print "SUNOS"; exit}
/solaris/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
@@ -1259,25 +1264,26 @@ detect_os() {
if [ -z "$os" ]; then
os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk '
/os\/2/ { print "OS2"; exit}
'`
log 1 "detecting OS... none detected"
log 1 "I couldn't detect your OS. Please use --with-os=OS to force one"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP"
log 1 "I couldn't detect your OS. Please use --os=OS to force one"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP"
log 1 "detecting OS... $os"
else
log 1 "forcing OS... $os"
@@ -1957,14 +1963,14 @@ showhelp() {
echo " on HOST [BUILD]"
echo " --windres=WINDRES the windres to use [HOST-windres]"
echo " --strip=STRIP the strip to use [HOST-strip]"
echo " --awk=AWK the awk to use in configure [awk]"
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/MORPHOS/BEOS/"
echo " SUNOS/CYGWIN/MINGW/OS2/WINCE/PSP"
echo " DETECT/UNIX/OSX/FREEBSD/OPENBSD/MORPHOS/"
echo " BEOS/SUNOS/CYGWIN/MINGW/OS2/WINCE/PSP"
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
echo " --revision=rXXXX overwrite the revision detection."
echo " Use with care!"
echo ""
echo "Paths:"
echo " --prefix-dir=dir specifies the prefix for all installed"
@@ -72,12 +72,13 @@ are:
BeOS - SDL
FreeBSD - SDL
Linux - SDL
MacOS X (universal) - Cocoa video and sound drivers (SDL works too, but not 100% and not as a universal binary)
MorphOS - SDL
OpenBSD - SDL
OS/2 - SDL
Windows - Win32 GDI (faster) or SDL
4.0) Running OpenTTD:
---- ----------------
@@ -171,12 +172,16 @@ BeOS:
FreeBSD:
You need the port devel/sdl12 for a non-dedicated build.
graphics/png is optional for screenshots in the PNG format.
Use "gmake", but do a "./configure" before the first build.
OpenBSD:
Note that you need the port devel/sdl to compile OpenTTD.
MorphOS:
Use "make". However, for the first build one has to do a "./configure" first.
Note that you need the MorphOS SDK, latest libnix updates (else C++ parts of
OpenTTD will not build) and the powersdl.library SDK. Optionally libz,
libpng and freetype2 developer files.
Status change: