summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2015-04-11 10:25:36 +0000
committerplanetmaker <planetmaker@openttd.org>2015-04-11 10:25:36 +0000
commitb1a9cf2ed81cd859416b85603fc6add57fa49eee (patch)
tree18ef475c55cfd4e483faab3dcd922654d257b58b
parent55f42eaa1fa202476d7b9e011330c433209ba978 (diff)
downloadopenttd-b1a9cf2ed81cd859416b85603fc6add57fa49eee.tar.xz
(svn r27223) -Add [FS#6274]: Support for DragonflyBSD (AMDmi3)
-rw-r--r--config.lib92
1 files changed, 47 insertions, 45 deletions
diff --git a/config.lib b/config.lib
index 72c8fb0dc..531db0c93 100644
--- a/config.lib
+++ b/config.lib
@@ -526,10 +526,10 @@ check_params() {
log 1 " PREPROCESSOR is only available for OSX"
exit 1
fi
- # OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
- if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then
+ # OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
+ if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then
log 1 "configure: error: invalid option --os=$os"
- log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]"
+ log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]"
exit 1
fi
# cpu_type can be either 32 or 64
@@ -1054,7 +1054,7 @@ check_params() {
fi
if [ "$doc_dir" = "1" ]; then
- if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
+ if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
doc_dir="share/doc/openttd"
else
doc_dir="$data_dir/docs"
@@ -1064,7 +1064,7 @@ check_params() {
fi
if [ "$icon_theme_dir" = "1" ]; then
- if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
+ if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
icon_theme_dir="share/icons/hicolor"
else
icon_theme_dir=""
@@ -1098,7 +1098,7 @@ check_params() {
if [ "$man_dir" = "1" ]; then
# add manpage on UNIX systems
- if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then
+ if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then
man_dir="share/man/man6"
else
man_dir=""
@@ -1109,7 +1109,7 @@ check_params() {
if [ "$menu_dir" = "1" ]; then
# add a freedesktop menu item only for some UNIX systems
- if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
+ if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
menu_dir="share/applications"
else
menu_dir=""
@@ -1538,7 +1538,7 @@ make_cflags_and_ldflags() {
fi
fi
- if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
+ if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
LIBS="$LIBS -lpthread"
fi
@@ -1610,7 +1610,7 @@ make_cflags_and_ldflags() {
fi
# Most targets act like UNIX, just with some additions
- if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
+ if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
CFLAGS="$CFLAGS -DUNIX"
fi
# And others like Windows
@@ -2268,52 +2268,54 @@ detect_awk() {
detect_os() {
if [ "$os" = "DETECT" ]; then
- # Detect UNIX, OSX, FREEBSD, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
+ # Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, 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}
- /netbsd/ { print "NETBSD"; exit}
- /hp-ux/ { print "HPUX"; exit}
- /morphos/ { print "MORPHOS"; exit}
- /beos/ { print "BEOS"; exit}
- /haiku/ { print "HAIKU"; exit}
- /sunos/ { print "SUNOS"; exit}
- /solaris/ { print "SUNOS"; exit}
- /cygwin/ { print "CYGWIN"; exit}
- /mingw/ { print "MINGW"; exit}
- /os2/ { print "OS2"; exit}
- /dos/ { print "DOS"; exit}
- /wince/ { print "WINCE"; exit}
- /psp/ { print "PSP"; exit}
+ /linux/ { print "UNIX"; exit}
+ /darwin/ { print "OSX"; exit}
+ /freebsd/ { print "FREEBSD"; exit}
+ /dragonfly/ { print "DRAGONFLY"; exit}
+ /openbsd/ { print "OPENBSD"; exit}
+ /netbsd/ { print "NETBSD"; exit}
+ /hp-ux/ { print "HPUX"; exit}
+ /morphos/ { print "MORPHOS"; exit}
+ /beos/ { print "BEOS"; exit}
+ /haiku/ { print "HAIKU"; exit}
+ /sunos/ { print "SUNOS"; exit}
+ /solaris/ { print "SUNOS"; exit}
+ /cygwin/ { print "CYGWIN"; exit}
+ /mingw/ { print "MINGW"; exit}
+ /os2/ { print "OS2"; exit}
+ /dos/ { print "DOS"; exit}
+ /wince/ { print "WINCE"; exit}
+ /psp/ { print "PSP"; exit}
'`
if [ -z "$os" ]; then
os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk '
- /linux/ { print "UNIX"; exit}
- /darwin/ { print "OSX"; exit}
- /freebsd/ { print "FREEBSD"; exit}
- /openbsd/ { print "OPENBSD"; exit}
- /netbsd/ { print "NETBSD"; exit}
- /hp-ux/ { print "HPUX"; exit}
- /morphos/ { print "MORPHOS"; exit}
- /beos/ { print "BEOS"; exit}
- /haiku/ { print "HAIKU"; exit}
- /sunos/ { print "SUNOS"; exit}
- /cygwin/ { print "CYGWIN"; exit}
- /mingw/ { print "MINGW"; exit}
- /os\/2/ { print "OS2"; exit}
- /gnu/ { print "UNIX"; exit}
+ /linux/ { print "UNIX"; exit}
+ /darwin/ { print "OSX"; exit}
+ /freebsd/ { print "FREEBSD"; exit}
+ /dragonfly/ { print "DRAGONFLY"; exit}
+ /openbsd/ { print "OPENBSD"; exit}
+ /netbsd/ { print "NETBSD"; exit}
+ /hp-ux/ { print "HPUX"; exit}
+ /morphos/ { print "MORPHOS"; exit}
+ /beos/ { print "BEOS"; exit}
+ /haiku/ { print "HAIKU"; exit}
+ /sunos/ { print "SUNOS"; exit}
+ /cygwin/ { print "CYGWIN"; exit}
+ /mingw/ { print "MINGW"; exit}
+ /os\/2/ { print "OS2"; exit}
+ /gnu/ { print "UNIX"; exit}
'`
fi
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, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP"
+ log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP"
exit 1
fi
@@ -3592,9 +3594,9 @@ showhelp() {
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/OPENBSD/NETBSD/"
- echo " MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/"
- echo " DOS/WINCE/PSP/HAIKU"
+ echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
+ echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
+ echo " MINGW/OS2/DOS/WINCE/PSP/HAIKU"
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
echo ""
echo "Paths:"