(svn r27223) -Add [FS#6274]: Support for DragonflyBSD (AMDmi3)

This commit is contained in:
planetmaker 2015-04-11 10:25:36 +00:00
parent 55f42eaa1f
commit b1a9cf2ed8

View File

@ -526,10 +526,10 @@ check_params() {
log 1 " PREPROCESSOR is only available for OSX" log 1 " PREPROCESSOR is only available for OSX"
exit 1 exit 1
fi fi
# OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP # 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|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then 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 "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 exit 1
fi fi
# cpu_type can be either 32 or 64 # cpu_type can be either 32 or 64
@ -1054,7 +1054,7 @@ check_params() {
fi fi
if [ "$doc_dir" = "1" ]; then 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" doc_dir="share/doc/openttd"
else else
doc_dir="$data_dir/docs" doc_dir="$data_dir/docs"
@ -1064,7 +1064,7 @@ check_params() {
fi fi
if [ "$icon_theme_dir" = "1" ]; then 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" icon_theme_dir="share/icons/hicolor"
else else
icon_theme_dir="" icon_theme_dir=""
@ -1098,7 +1098,7 @@ check_params() {
if [ "$man_dir" = "1" ]; then if [ "$man_dir" = "1" ]; then
# add manpage on UNIX systems # 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" man_dir="share/man/man6"
else else
man_dir="" man_dir=""
@ -1109,7 +1109,7 @@ check_params() {
if [ "$menu_dir" = "1" ]; then if [ "$menu_dir" = "1" ]; then
# add a freedesktop menu item only for some UNIX systems # 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" menu_dir="share/applications"
else else
menu_dir="" menu_dir=""
@ -1538,7 +1538,7 @@ make_cflags_and_ldflags() {
fi fi
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" LIBS="$LIBS -lpthread"
fi fi
@ -1610,7 +1610,7 @@ make_cflags_and_ldflags() {
fi fi
# Most targets act like UNIX, just with some additions # 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" CFLAGS="$CFLAGS -DUNIX"
fi fi
# And others like Windows # And others like Windows
@ -2268,52 +2268,54 @@ detect_awk() {
detect_os() { detect_os() {
if [ "$os" = "DETECT" ]; then 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 # Try first via dumpmachine, then via uname
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk ' os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
/linux/ { print "UNIX"; exit} /linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit} /darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit} /freebsd/ { print "FREEBSD"; exit}
/openbsd/ { print "OPENBSD"; exit} /dragonfly/ { print "DRAGONFLY"; exit}
/netbsd/ { print "NETBSD"; exit} /openbsd/ { print "OPENBSD"; exit}
/hp-ux/ { print "HPUX"; exit} /netbsd/ { print "NETBSD"; exit}
/morphos/ { print "MORPHOS"; exit} /hp-ux/ { print "HPUX"; exit}
/beos/ { print "BEOS"; exit} /morphos/ { print "MORPHOS"; exit}
/haiku/ { print "HAIKU"; exit} /beos/ { print "BEOS"; exit}
/sunos/ { print "SUNOS"; exit} /haiku/ { print "HAIKU"; exit}
/solaris/ { print "SUNOS"; exit} /sunos/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit} /solaris/ { print "SUNOS"; exit}
/mingw/ { print "MINGW"; exit} /cygwin/ { print "CYGWIN"; exit}
/os2/ { print "OS2"; exit} /mingw/ { print "MINGW"; exit}
/dos/ { print "DOS"; exit} /os2/ { print "OS2"; exit}
/wince/ { print "WINCE"; exit} /dos/ { print "DOS"; exit}
/psp/ { print "PSP"; exit} /wince/ { print "WINCE"; exit}
/psp/ { print "PSP"; exit}
'` '`
if [ -z "$os" ]; then if [ -z "$os" ]; then
os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk ' os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk '
/linux/ { print "UNIX"; exit} /linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit} /darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit} /freebsd/ { print "FREEBSD"; exit}
/openbsd/ { print "OPENBSD"; exit} /dragonfly/ { print "DRAGONFLY"; exit}
/netbsd/ { print "NETBSD"; exit} /openbsd/ { print "OPENBSD"; exit}
/hp-ux/ { print "HPUX"; exit} /netbsd/ { print "NETBSD"; exit}
/morphos/ { print "MORPHOS"; exit} /hp-ux/ { print "HPUX"; exit}
/beos/ { print "BEOS"; exit} /morphos/ { print "MORPHOS"; exit}
/haiku/ { print "HAIKU"; exit} /beos/ { print "BEOS"; exit}
/sunos/ { print "SUNOS"; exit} /haiku/ { print "HAIKU"; exit}
/cygwin/ { print "CYGWIN"; exit} /sunos/ { print "SUNOS"; exit}
/mingw/ { print "MINGW"; exit} /cygwin/ { print "CYGWIN"; exit}
/os\/2/ { print "OS2"; exit} /mingw/ { print "MINGW"; exit}
/gnu/ { print "UNIX"; exit} /os\/2/ { print "OS2"; exit}
/gnu/ { print "UNIX"; exit}
'` '`
fi fi
if [ -z "$os" ]; then if [ -z "$os" ]; then
log 1 "detecting OS... none detected" log 1 "detecting OS... none detected"
log 1 "I couldn't detect your OS. Please use --os=OS to force one" 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 exit 1
fi fi
@ -3592,9 +3594,9 @@ showhelp() {
echo " --awk=AWK the awk to use in configure [awk]" echo " --awk=AWK the awk to use in configure [awk]"
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]" echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]" echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/" echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
echo " MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/" echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
echo " DOS/WINCE/PSP/HAIKU" echo " MINGW/OS2/DOS/WINCE/PSP/HAIKU"
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)" echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
echo "" echo ""
echo "Paths:" echo "Paths:"