revision 1239:be3121267597
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 1239:be3121267597 |
parent | 1238:91bcb2dec4ef |
child | 1240:190df8a791ca |
author | nkeynes |
date | Sat Feb 25 21:30:49 2012 +1000 (11 years ago) |
Android support WIP
1.1 --- a/.hgignore Sat Feb 25 21:27:06 2012 +10001.2 +++ b/.hgignore Sat Feb 25 21:30:49 2012 +10001.3 @@ -6,12 +6,17 @@1.4 .*\~1.5 .*\.gmo1.6 .*\.mo1.7 +.*\.class1.8 +.*\.apk1.9 +.*\.ap_1.10 +classes.dex1.11 autom4te.cache1.12 Makefile1.13 config.h1.14 config.status1.15 lxdream.11.16 lxdream.app1.17 +gdbserver1.18 Info.plist1.19 stamp-h11.20 lxdream-.*.tar.gz1.21 @@ -28,6 +33,8 @@1.22 src/sh4/sh4x86.c1.23 src/version.c1.24 src/lxdream1.25 +src/liblxdream-core.a1.26 +src/liblxdream.so1.27 src/testsh4x861.28 src/test/.dirstamp1.29 src/test/testsh4x86
2.1 --- a/Makefile.am Sat Feb 25 21:27:06 2012 +10002.2 +++ b/Makefile.am Sat Feb 25 21:30:49 2012 +10002.3 @@ -98,3 +98,19 @@2.4 @echo --- Done ---2.6 bundle: all2.7 +2.8 +if GUI_ANDROID2.9 +Lxdream-debug.apk: src/liblxdream.so2.10 + $(mkdir_p) android/libs/armeabi2.11 + $(INSTALL) src/liblxdream.so android/libs/armeabi/liblxdream.so2.12 + $(INSTALL) $(ANDROID_GDBSERVER) android/libs/armeabi/gdbserver2.13 + $(STRIP) --strip-unneeded android/libs/armeabi/liblxdream.so2.14 + (TARGETDIR="`pwd`/android" && cd $(srcdir)/android && \2.15 + $(ANT) -buildfile build.xml -Dsdk.dir=$(ANDROID_SDK_HOME) \2.16 + -Dout.dir="$$TARGETDIR" \2.17 + -Dnative.libs.dir="$$TARGETDIR/libs" \2.18 + -Dtarget=$(ANDROID_SDK_VERSION) debug )2.19 + cp android/Lxdream-debug.apk Lxdream-debug.apk2.20 +2.21 +all-local: Lxdream-debug.apk2.22 +endif
3.1 --- a/Makefile.in Sat Feb 25 21:27:06 2012 +10003.2 +++ b/Makefile.in Sat Feb 25 21:30:49 2012 +10003.3 @@ -40,13 +40,13 @@3.4 $(srcdir)/Info.plist.in $(srcdir)/Makefile.am \3.5 $(srcdir)/Makefile.in $(srcdir)/config.h.in \3.6 $(top_srcdir)/configure $(top_srcdir)/test/Makefile.in AUTHORS \3.7 - COPYING ChangeLog INSTALL NEWS TODO acconfig.h compile \3.8 - config.guess config.sub depcomp install-sh missing \3.9 - mkinstalldirs3.10 + COPYING ChangeLog INSTALL NEWS acconfig.h compile config.guess \3.11 + config.sub depcomp install-sh missing mkinstalldirs3.12 subdir = .3.13 ACLOCAL_M4 = $(top_srcdir)/aclocal.m43.14 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \3.15 - $(top_srcdir)/m4/ccforbuild.m4 $(top_srcdir)/configure.in3.16 + $(top_srcdir)/m4/ccforbuild.m4 $(top_srcdir)/m4/android.m4 \3.17 + $(top_srcdir)/configure.in3.18 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \3.19 $(ACLOCAL_M4)3.20 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \3.21 @@ -94,6 +94,11 @@3.22 AMDEP_FALSE = @AMDEP_FALSE@3.23 AMDEP_TRUE = @AMDEP_TRUE@3.24 AMTAR = @AMTAR@3.25 +ANDROID_GDBSERVER = @ANDROID_GDBSERVER@3.26 +ANDROID_NDK_HOME = @ANDROID_NDK_HOME@3.27 +ANDROID_SDK_HOME = @ANDROID_SDK_HOME@3.28 +ANDROID_SDK_VERSION = @ANDROID_SDK_VERSION@3.29 +ANT = @ANT@3.30 ARMCC = @ARMCC@3.31 ARMLD = @ARMLD@3.32 ARMOBJCOPY = @ARMOBJCOPY@3.33 @@ -162,6 +167,8 @@3.34 GREP = @GREP@3.35 GTK_CFLAGS = @GTK_CFLAGS@3.36 GTK_LIBS = @GTK_LIBS@3.37 +GUI_ANDROID_FALSE = @GUI_ANDROID_FALSE@3.38 +GUI_ANDROID_TRUE = @GUI_ANDROID_TRUE@3.39 GUI_COCOA_FALSE = @GUI_COCOA_FALSE@3.40 GUI_COCOA_TRUE = @GUI_COCOA_TRUE@3.41 GUI_GTK_FALSE = @GUI_GTK_FALSE@3.42 @@ -697,7 +704,7 @@3.43 exit 1; } >&23.44 check-am: all-am3.45 check: check-recursive3.46 -@GUI_COCOA_FALSE@all-local:3.47 +@GUI_ANDROID_FALSE@@GUI_COCOA_FALSE@all-local:3.48 all-am: Makefile $(MANS) $(DATA) config.h all-local3.49 installdirs: installdirs-recursive3.50 installdirs-am:3.51 @@ -881,6 +888,20 @@3.52 @echo --- Done ---3.54 bundle: all3.55 +3.56 +@GUI_ANDROID_TRUE@Lxdream-debug.apk: src/liblxdream.so3.57 +@GUI_ANDROID_TRUE@ $(mkdir_p) android/libs/armeabi3.58 +@GUI_ANDROID_TRUE@ $(INSTALL) src/liblxdream.so android/libs/armeabi/liblxdream.so3.59 +@GUI_ANDROID_TRUE@ $(INSTALL) $(ANDROID_GDBSERVER) android/libs/armeabi/gdbserver3.60 +@GUI_ANDROID_TRUE@ $(STRIP) --strip-unneeded android/libs/armeabi/liblxdream.so3.61 +@GUI_ANDROID_TRUE@ (TARGETDIR="`pwd`/android" && cd $(srcdir)/android && \3.62 +@GUI_ANDROID_TRUE@ $(ANT) -buildfile build.xml -Dsdk.dir=$(ANDROID_SDK_HOME) \3.63 +@GUI_ANDROID_TRUE@ -Dout.dir="$$TARGETDIR" \3.64 +@GUI_ANDROID_TRUE@ -Dnative.libs.dir="$$TARGETDIR/libs" \3.65 +@GUI_ANDROID_TRUE@ -Dtarget=$(ANDROID_SDK_VERSION) debug )3.66 +@GUI_ANDROID_TRUE@ cp android/Lxdream-debug.apk Lxdream-debug.apk3.67 +3.68 +@GUI_ANDROID_TRUE@all-local: Lxdream-debug.apk3.69 # Tell versions [3.59,3.63) of GNU make to not export all variables.3.70 # Otherwise a system limit (for SysV at least) may be exceeded.3.71 .NOEXPORT:
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00004.2 +++ b/android/AndroidManifest.xml Sat Feb 25 21:30:49 2012 +10004.3 @@ -0,0 +1,16 @@4.4 +<?xml version="1.0" encoding="utf-8"?>4.5 +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.lxdream">4.6 + <application android:label="@string/lxdream_activity">4.7 + <activity android:name="LxdreamActivity"4.8 + android:theme="@android:style/Theme.NoTitleBar.Fullscreen"4.9 + android:launchMode="singleTask"4.10 + android:configChanges="orientation|keyboardHidden">4.11 + <intent-filter>4.12 + <action android:name="android.intent.action.MAIN" />4.13 + <category android:name="android.intent.category.LAUNCHER" />4.14 + </intent-filter>4.15 + </activity>4.16 + </application>4.17 + <uses-feature android:glEsVersion="0x00020000"/>4.18 + <uses-sdk android:minSdkVersion="8"/>4.19 +</manifest>
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00005.2 +++ b/android/build.xml Sat Feb 25 21:30:49 2012 +10005.3 @@ -0,0 +1,79 @@5.4 +<?xml version="1.0" encoding="UTF-8"?>5.5 +<project name="Lxdream" default="help">5.6 +5.7 +<!-- The local.properties file is created and updated by the 'android'5.8 + tool.5.9 + It contains the path to the SDK. It should *NOT* be checked into5.10 + Version Control Systems. -->5.11 + <property file="local.properties" />5.12 +5.13 + <!-- The build.properties file can be created by you and is never touched5.14 + by the 'android' tool. This is the place to change some of the5.15 + default property values used by the Ant rules.5.16 + Here are some properties you may want to change/update:5.17 +5.18 + source.dir5.19 + The name of the source directory. Default is 'src'.5.20 + out.dir5.21 + The name of the output directory. Default is 'bin'.5.22 +5.23 + Properties related to the SDK location or the project target should5.24 + be updated using the 'android' tool with the 'update' action.5.25 +5.26 + This file is an integral part of the build system for your5.27 + application and should be checked into Version Control Systems.5.28 +5.29 + -->5.30 + <property file="build.properties" />5.31 +5.32 + <!-- The default.properties file is created and updated by the 'android'5.33 + tool, as well as ADT.5.34 + This file is an integral part of the build system for your5.35 + application and should be checked into Version Control Systems. -->5.36 + <property file="default.properties" />5.37 +5.38 +5.39 + <!-- Required pre-setup import -->5.40 + <import file="${sdk.dir}/tools/ant/pre_setup.xml" />5.41 +5.42 +5.43 +<!-- extension targets. Uncomment the ones where you want to do custom work5.44 + in between standard targets -->5.45 +<!--5.46 + <target name="-pre-build">5.47 + </target>5.48 + <target name="-pre-compile">5.49 + </target>5.50 +5.51 + [This is typically used for code obfuscation.5.52 + Compiled code location: ${out.classes.absolute.dir}5.53 + If this is not done in place, override ${out.dex.input.absolute.dir}]5.54 + <target name="-post-compile">5.55 + </target>5.56 +-->5.57 +5.58 + <!-- Execute the Android Setup task that will setup some properties5.59 + specific to the target, and import the build rules files.5.60 +5.61 + The rules file is imported from5.62 + <SDK>/tools/ant/5.63 + Depending on the project type it can be either:5.64 + - main_rules.xml5.65 + - lib_rules.xml5.66 + - test_rules.xml5.67 +5.68 + To customize existing targets, there are two options:5.69 + - Customize only one target:5.70 + - copy/paste the target into this file, *before* the5.71 + <setup> task.5.72 + - customize it to your needs.5.73 + - Customize the whole script.5.74 + - copy/paste the content of the rules files (minus the top node)5.75 + into this file, *after* the <setup> task5.76 + - disable the import of the rules by changing the setup task5.77 + below to <setup import="false" />.5.78 + - customize to your needs.5.79 + -->5.80 + <setup />5.81 +5.82 +</project>
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00006.2 +++ b/android/deps/builddeps.sh Sat Feb 25 21:30:49 2012 +10006.3 @@ -0,0 +1,79 @@6.4 +#!/bin/sh6.5 +6.6 +TAR=tar6.7 +PATCH=patch6.8 +MAKE=make6.9 +WGET=wget6.10 +6.11 +GETTEXT=gettext-0.18.1.16.12 +LIBICONV=libiconv-1.13.16.13 +LIBPNG=libpng-1.4.36.14 +LIBISOFS=libisofs-0.6.386.15 +GLIB=glib-2.26.06.16 +6.17 +TARGETPREFIX="${HOME}/android/usr"6.18 +NDK_BINDIR="${HOME}/lxdream/android/arm-linux-androideabi-4.4.3/bin"6.19 +PATH="${NDK_BINDIR}:$PATH"6.20 +export PATH6.21 +BUILDALIAS=`gcc -dumpmachine`6.22 +6.23 +if [ ! -e $TARGETPREFIX/lib/libiconv.a ]; then6.24 + ${WGET} http://ftp.gnu.org/gnu/libiconv/${LIBCONV}.tar.gz6.25 + ${TAR} -xzf ${LIBCONV}.tar.gz6.26 + cp config.guess config.sub ${LIBCONV}/build-aux6.27 + cp config.guess config.sub ${LIBCONV}/libcharset/build-aux6.28 + ${PATCH} -p0 < libiconv-1.13.1.diff6.29 + mkdir -p build-${LIBCONV}6.30 + cd build-${LIBCONV}6.31 + ../${LIBCONV}/configure --prefix=$TARGETPREFIX --build=$BUILDALIAS --host=arm-linux-androideabi --disable-shared 'CPPFLAGS=-fPIC'6.32 + ${MAKE} all install6.33 + cd ..6.34 +fi6.35 +6.36 +if [ ! -e $TARGETPREFIX/lib/libgettextpo.a ]; then6.37 + ${WGET} http://ftp.gnu.org/gnu/getttext/${GETTEXT}.tar.gz6.38 + ${TAR} -xzf ${GETTEXT}.tar.gz6.39 + ${PATCH} -p0 < ${GETTEXT}.diff6.40 + mkdir -p build-${GETTEXT}6.41 + cd build-${GETTEXT}6.42 + ../${GETTEXT}/configure --prefix=$TARGETPREFIX --build=$BUILDALIAS --host=arm-linux-androideabi --disable-shared "CPPFLAGS=-I$TARGETPREFIX/include -fPIC" "LDFLAGS=-L$TARGETPREFIX/lib"6.43 + ${MAKE} all install6.44 + cd ..6.45 +fi6.46 +6.47 +if [ ! -e $TARGETPREFIX/lib/libpng14.a ]; then6.48 + ${WGET} http://sourceforge.net/projects/libpng/files/libpng14/older-releases/1.4.3/${LIBPNG}.tar.gz/download6.49 + ${TAR} -xzf ${LIBPNG}.tar.gz6.50 + cp config.guess config.sub ${LIBPNG}6.51 + mkdir -p build-${LIBPNG}6.52 + cd build-${LIBPNG}6.53 + ../${LIBPNG}/configure --prefix=$TARGETPREFIX --build=$BUILDALIAS --host=arm-linux-androideabi --disable-shared "CPPFLAGS=-I$TARGETPREFIX/include -fPIC" "LDFLAGS=-L$TARGETPREFIX/lib"6.54 + ${MAKE} all install6.55 + cd ..6.56 +fi6.57 +6.58 +if [ ! -e $TARGETPREFIX/lib/libisofs.a ]; then6.59 + ${WGET} http://files.libburnia-project.org/releases/${LIBISOFS}.tar.gz6.60 + ${TAR} -xzf ${LIBISOFS}.tar.gz6.61 + cp config.guess config.sub ${LIBISOFS}6.62 + ${PATCH} -p0 < ${LIBISOFS}.diff6.63 + cd ${LIBISOFS}6.64 + ./configure --prefix=$TARGETPREFIX --build=$BUILDALIAS --host=arm-linux-androideabi --disable-shared "CPPFLAGS=-I$TARGETPREFIX/include -fPIC" "LDFLAGS=-L$TARGETPREFIX/lib" LIBISOFS_ASSUME_ICONV=yes6.65 + ${MAKE} all install THREAD_LIBS=6.66 + cd ..6.67 +fi6.68 +6.69 +if [ ! -e $TARGETPREFIX/lib/libglib-2.0.a ]; then6.70 + ${WGET} http://ftp.gnome.org/pub/gnome/sources/glib/2.26/${GLIB}.tar.bz26.71 + ${TAR} -xjf ${GLIB}.tar.bz26.72 + cp config.guess config.sub ${GLIB}6.73 + ${PATCH} -p0 < ${GLIB}.diff6.74 + mkdir -p build-${GLIB}6.75 + cp ${GLIB}.cache build-${GLIB}6.76 + cd build-${GLIB}6.77 + ../${GLIB}/configure --prefix=$TARGETPREFIX --build=$BUILDALIAS --host=arm-linux-androideabi --disable-shared "CPPFLAGS=-I$TARGETPREFIX/include -fPIC" "LDFLAGS=-L$TARGETPREFIX/lib" \6.78 + --cache-file=${GLIB}.cache --without-threads6.79 + ${MAKE} install6.80 + cd ..6.81 +fi6.82 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00007.2 +++ b/android/deps/config.guess Sat Feb 25 21:30:49 2012 +10007.3 @@ -0,0 +1,1517 @@7.4 +#! /bin/sh7.5 +# Attempt to guess a canonical system name.7.6 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,7.7 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,7.8 +# 2011 Free Software Foundation, Inc.7.9 +7.10 +timestamp='2011-06-03'7.11 +7.12 +# This file is free software; you can redistribute it and/or modify it7.13 +# under the terms of the GNU General Public License as published by7.14 +# the Free Software Foundation; either version 2 of the License, or7.15 +# (at your option) any later version.7.16 +#7.17 +# This program is distributed in the hope that it will be useful, but7.18 +# WITHOUT ANY WARRANTY; without even the implied warranty of7.19 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU7.20 +# General Public License for more details.7.21 +#7.22 +# You should have received a copy of the GNU General Public License7.23 +# along with this program; if not, write to the Free Software7.24 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA7.25 +# 02110-1301, USA.7.26 +#7.27 +# As a special exception to the GNU General Public License, if you7.28 +# distribute this file as part of a program that contains a7.29 +# configuration script generated by Autoconf, you may include it under7.30 +# the same distribution terms that you use for the rest of that program.7.31 +7.32 +7.33 +# Originally written by Per Bothner. Please send patches (context7.34 +# diff format) to <config-patches@gnu.org> and include a ChangeLog7.35 +# entry.7.36 +#7.37 +# This script attempts to guess a canonical system name similar to7.38 +# config.sub. If it succeeds, it prints the system name on stdout, and7.39 +# exits with 0. Otherwise, it exits with 1.7.40 +#7.41 +# You can get the latest version of this script from:7.42 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD7.43 +7.44 +me=`echo "$0" | sed -e 's,.*/,,'`7.45 +7.46 +usage="\7.47 +Usage: $0 [OPTION]7.48 +7.49 +Output the configuration name of the system \`$me' is run on.7.50 +7.51 +Operation modes:7.52 + -h, --help print this help, then exit7.53 + -t, --time-stamp print date of last modification, then exit7.54 + -v, --version print version number, then exit7.55 +7.56 +Report bugs and patches to <config-patches@gnu.org>."7.57 +7.58 +version="\7.59 +GNU config.guess ($timestamp)7.60 +7.61 +Originally written by Per Bothner.7.62 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,7.63 +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free7.64 +Software Foundation, Inc.7.65 +7.66 +This is free software; see the source for copying conditions. There is NO7.67 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."7.68 +7.69 +help="7.70 +Try \`$me --help' for more information."7.71 +7.72 +# Parse command line7.73 +while test $# -gt 0 ; do7.74 + case $1 in7.75 + --time-stamp | --time* | -t )7.76 + echo "$timestamp" ; exit ;;7.77 + --version | -v )7.78 + echo "$version" ; exit ;;7.79 + --help | --h* | -h )7.80 + echo "$usage"; exit ;;7.81 + -- ) # Stop option processing7.82 + shift; break ;;7.83 + - ) # Use stdin as input.7.84 + break ;;7.85 + -* )7.86 + echo "$me: invalid option $1$help" >&27.87 + exit 1 ;;7.88 + * )7.89 + break ;;7.90 + esac7.91 +done7.92 +7.93 +if test $# != 0; then7.94 + echo "$me: too many arguments$help" >&27.95 + exit 17.96 +fi7.97 +7.98 +trap 'exit 1' 1 2 157.99 +7.100 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a7.101 +# compiler to aid in system detection is discouraged as it requires7.102 +# temporary files to be created and, as you can see below, it is a7.103 +# headache to deal with in a portable fashion.7.104 +7.105 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still7.106 +# use `HOST_CC' if defined, but it is deprecated.7.107 +7.108 +# Portable tmp directory creation inspired by the Autoconf team.7.109 +7.110 +set_cc_for_build='7.111 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;7.112 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;7.113 +: ${TMPDIR=/tmp} ;7.114 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||7.115 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||7.116 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||7.117 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;7.118 +dummy=$tmp/dummy ;7.119 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;7.120 +case $CC_FOR_BUILD,$HOST_CC,$CC in7.121 + ,,) echo "int x;" > $dummy.c ;7.122 + for c in cc gcc c89 c99 ; do7.123 + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then7.124 + CC_FOR_BUILD="$c"; break ;7.125 + fi ;7.126 + done ;7.127 + if test x"$CC_FOR_BUILD" = x ; then7.128 + CC_FOR_BUILD=no_compiler_found ;7.129 + fi7.130 + ;;7.131 + ,,*) CC_FOR_BUILD=$CC ;;7.132 + ,*,*) CC_FOR_BUILD=$HOST_CC ;;7.133 +esac ; set_cc_for_build= ;'7.134 +7.135 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.7.136 +# (ghazi@noc.rutgers.edu 1994-08-24)7.137 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then7.138 + PATH=$PATH:/.attbin ; export PATH7.139 +fi7.140 +7.141 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown7.142 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown7.143 +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown7.144 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown7.145 +7.146 +# Note: order is significant - the case branches are not exclusive.7.147 +7.148 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in7.149 + *:NetBSD:*:*)7.150 + # NetBSD (nbsd) targets should (where applicable) match one or7.151 + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,7.152 + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently7.153 + # switched to ELF, *-*-netbsd* would select the old7.154 + # object file format. This provides both forward7.155 + # compatibility and a consistent mechanism for selecting the7.156 + # object file format.7.157 + #7.158 + # Note: NetBSD doesn't particularly care about the vendor7.159 + # portion of the name. We always set it to "unknown".7.160 + sysctl="sysctl -n hw.machine_arch"7.161 + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \7.162 + /usr/sbin/$sysctl 2>/dev/null || echo unknown)`7.163 + case "${UNAME_MACHINE_ARCH}" in7.164 + armeb) machine=armeb-unknown ;;7.165 + arm*) machine=arm-unknown ;;7.166 + sh3el) machine=shl-unknown ;;7.167 + sh3eb) machine=sh-unknown ;;7.168 + sh5el) machine=sh5le-unknown ;;7.169 + *) machine=${UNAME_MACHINE_ARCH}-unknown ;;7.170 + esac7.171 + # The Operating System including object format, if it has switched7.172 + # to ELF recently, or will in the future.7.173 + case "${UNAME_MACHINE_ARCH}" in7.174 + arm*|i386|m68k|ns32k|sh3*|sparc|vax)7.175 + eval $set_cc_for_build7.176 + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \7.177 + | grep -q __ELF__7.178 + then7.179 + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).7.180 + # Return netbsd for either. FIX?7.181 + os=netbsd7.182 + else7.183 + os=netbsdelf7.184 + fi7.185 + ;;7.186 + *)7.187 + os=netbsd7.188 + ;;7.189 + esac7.190 + # The OS release7.191 + # Debian GNU/NetBSD machines have a different userland, and7.192 + # thus, need a distinct triplet. However, they do not need7.193 + # kernel version information, so it can be replaced with a7.194 + # suitable tag, in the style of linux-gnu.7.195 + case "${UNAME_VERSION}" in7.196 + Debian*)7.197 + release='-gnu'7.198 + ;;7.199 + *)7.200 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`7.201 + ;;7.202 + esac7.203 + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:7.204 + # contains redundant information, the shorter form:7.205 + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.7.206 + echo "${machine}-${os}${release}"7.207 + exit ;;7.208 + *:OpenBSD:*:*)7.209 + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`7.210 + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}7.211 + exit ;;7.212 + *:ekkoBSD:*:*)7.213 + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}7.214 + exit ;;7.215 + *:SolidBSD:*:*)7.216 + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}7.217 + exit ;;7.218 + macppc:MirBSD:*:*)7.219 + echo powerpc-unknown-mirbsd${UNAME_RELEASE}7.220 + exit ;;7.221 + *:MirBSD:*:*)7.222 + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}7.223 + exit ;;7.224 + alpha:OSF1:*:*)7.225 + case $UNAME_RELEASE in7.226 + *4.0)7.227 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`7.228 + ;;7.229 + *5.*)7.230 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`7.231 + ;;7.232 + esac7.233 + # According to Compaq, /usr/sbin/psrinfo has been available on7.234 + # OSF/1 and Tru64 systems produced since 1995. I hope that7.235 + # covers most systems running today. This code pipes the CPU7.236 + # types through head -n 1, so we only detect the type of CPU 0.7.237 + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`7.238 + case "$ALPHA_CPU_TYPE" in7.239 + "EV4 (21064)")7.240 + UNAME_MACHINE="alpha" ;;7.241 + "EV4.5 (21064)")7.242 + UNAME_MACHINE="alpha" ;;7.243 + "LCA4 (21066/21068)")7.244 + UNAME_MACHINE="alpha" ;;7.245 + "EV5 (21164)")7.246 + UNAME_MACHINE="alphaev5" ;;7.247 + "EV5.6 (21164A)")7.248 + UNAME_MACHINE="alphaev56" ;;7.249 + "EV5.6 (21164PC)")7.250 + UNAME_MACHINE="alphapca56" ;;7.251 + "EV5.7 (21164PC)")7.252 + UNAME_MACHINE="alphapca57" ;;7.253 + "EV6 (21264)")7.254 + UNAME_MACHINE="alphaev6" ;;7.255 + "EV6.7 (21264A)")7.256 + UNAME_MACHINE="alphaev67" ;;7.257 + "EV6.8CB (21264C)")7.258 + UNAME_MACHINE="alphaev68" ;;7.259 + "EV6.8AL (21264B)")7.260 + UNAME_MACHINE="alphaev68" ;;7.261 + "EV6.8CX (21264D)")7.262 + UNAME_MACHINE="alphaev68" ;;7.263 + "EV6.9A (21264/EV69A)")7.264 + UNAME_MACHINE="alphaev69" ;;7.265 + "EV7 (21364)")7.266 + UNAME_MACHINE="alphaev7" ;;7.267 + "EV7.9 (21364A)")7.268 + UNAME_MACHINE="alphaev79" ;;7.269 + esac7.270 + # A Pn.n version is a patched version.7.271 + # A Vn.n version is a released version.7.272 + # A Tn.n version is a released field test version.7.273 + # A Xn.n version is an unreleased experimental baselevel.7.274 + # 1.2 uses "1.2" for uname -r.7.275 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`7.276 + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.7.277 + exitcode=$?7.278 + trap '' 07.279 + exit $exitcode ;;7.280 + Alpha\ *:Windows_NT*:*)7.281 + # How do we know it's Interix rather than the generic POSIX subsystem?7.282 + # Should we change UNAME_MACHINE based on the output of uname instead7.283 + # of the specific Alpha model?7.284 + echo alpha-pc-interix7.285 + exit ;;7.286 + 21064:Windows_NT:50:3)7.287 + echo alpha-dec-winnt3.57.288 + exit ;;7.289 + Amiga*:UNIX_System_V:4.0:*)7.290 + echo m68k-unknown-sysv47.291 + exit ;;7.292 + *:[Aa]miga[Oo][Ss]:*:*)7.293 + echo ${UNAME_MACHINE}-unknown-amigaos7.294 + exit ;;7.295 + *:[Mm]orph[Oo][Ss]:*:*)7.296 + echo ${UNAME_MACHINE}-unknown-morphos7.297 + exit ;;7.298 + *:OS/390:*:*)7.299 + echo i370-ibm-openedition7.300 + exit ;;7.301 + *:z/VM:*:*)7.302 + echo s390-ibm-zvmoe7.303 + exit ;;7.304 + *:OS400:*:*)7.305 + echo powerpc-ibm-os4007.306 + exit ;;7.307 + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)7.308 + echo arm-acorn-riscix${UNAME_RELEASE}7.309 + exit ;;7.310 + arm:riscos:*:*|arm:RISCOS:*:*)7.311 + echo arm-unknown-riscos7.312 + exit ;;7.313 + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)7.314 + echo hppa1.1-hitachi-hiuxmpp7.315 + exit ;;7.316 + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)7.317 + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.7.318 + if test "`(/bin/universe) 2>/dev/null`" = att ; then7.319 + echo pyramid-pyramid-sysv37.320 + else7.321 + echo pyramid-pyramid-bsd7.322 + fi7.323 + exit ;;7.324 + NILE*:*:*:dcosx)7.325 + echo pyramid-pyramid-svr47.326 + exit ;;7.327 + DRS?6000:unix:4.0:6*)7.328 + echo sparc-icl-nx67.329 + exit ;;7.330 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)7.331 + case `/usr/bin/uname -p` in7.332 + sparc) echo sparc-icl-nx7; exit ;;7.333 + esac ;;7.334 + s390x:SunOS:*:*)7.335 + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`7.336 + exit ;;7.337 + sun4H:SunOS:5.*:*)7.338 + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`7.339 + exit ;;7.340 + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)7.341 + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`7.342 + exit ;;7.343 + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)7.344 + echo i386-pc-auroraux${UNAME_RELEASE}7.345 + exit ;;7.346 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)7.347 + eval $set_cc_for_build7.348 + SUN_ARCH="i386"7.349 + # If there is a compiler, see if it is configured for 64-bit objects.7.350 + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.7.351 + # This test works for both compilers.7.352 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then7.353 + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \7.354 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \7.355 + grep IS_64BIT_ARCH >/dev/null7.356 + then7.357 + SUN_ARCH="x86_64"7.358 + fi7.359 + fi7.360 + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`7.361 + exit ;;7.362 + sun4*:SunOS:6*:*)7.363 + # According to config.sub, this is the proper way to canonicalize7.364 + # SunOS6. Hard to guess exactly what SunOS6 will be like, but7.365 + # it's likely to be more like Solaris than SunOS4.7.366 + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`7.367 + exit ;;7.368 + sun4*:SunOS:*:*)7.369 + case "`/usr/bin/arch -k`" in7.370 + Series*|S4*)7.371 + UNAME_RELEASE=`uname -v`7.372 + ;;7.373 + esac7.374 + # Japanese Language versions have a version number like `4.1.3-JL'.7.375 + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`7.376 + exit ;;7.377 + sun3*:SunOS:*:*)7.378 + echo m68k-sun-sunos${UNAME_RELEASE}7.379 + exit ;;7.380 + sun*:*:4.2BSD:*)7.381 + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`7.382 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=37.383 + case "`/bin/arch`" in7.384 + sun3)7.385 + echo m68k-sun-sunos${UNAME_RELEASE}7.386 + ;;7.387 + sun4)7.388 + echo sparc-sun-sunos${UNAME_RELEASE}7.389 + ;;7.390 + esac7.391 + exit ;;7.392 + aushp:SunOS:*:*)7.393 + echo sparc-auspex-sunos${UNAME_RELEASE}7.394 + exit ;;7.395 + # The situation for MiNT is a little confusing. The machine name7.396 + # can be virtually everything (everything which is not7.397 + # "atarist" or "atariste" at least should have a processor7.398 + # > m68000). The system name ranges from "MiNT" over "FreeMiNT"7.399 + # to the lowercase version "mint" (or "freemint"). Finally7.400 + # the system name "TOS" denotes a system which is actually not7.401 + # MiNT. But MiNT is downward compatible to TOS, so this should7.402 + # be no problem.7.403 + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)7.404 + echo m68k-atari-mint${UNAME_RELEASE}7.405 + exit ;;7.406 + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)7.407 + echo m68k-atari-mint${UNAME_RELEASE}7.408 + exit ;;7.409 + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)7.410 + echo m68k-atari-mint${UNAME_RELEASE}7.411 + exit ;;7.412 + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)7.413 + echo m68k-milan-mint${UNAME_RELEASE}7.414 + exit ;;7.415 + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)7.416 + echo m68k-hades-mint${UNAME_RELEASE}7.417 + exit ;;7.418 + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)7.419 + echo m68k-unknown-mint${UNAME_RELEASE}7.420 + exit ;;7.421 + m68k:machten:*:*)7.422 + echo m68k-apple-machten${UNAME_RELEASE}7.423 + exit ;;7.424 + powerpc:machten:*:*)7.425 + echo powerpc-apple-machten${UNAME_RELEASE}7.426 + exit ;;7.427 + RISC*:Mach:*:*)7.428 + echo mips-dec-mach_bsd4.37.429 + exit ;;7.430 + RISC*:ULTRIX:*:*)7.431 + echo mips-dec-ultrix${UNAME_RELEASE}7.432 + exit ;;7.433 + VAX*:ULTRIX*:*:*)7.434 + echo vax-dec-ultrix${UNAME_RELEASE}7.435 + exit ;;7.436 + 2020:CLIX:*:* | 2430:CLIX:*:*)7.437 + echo clipper-intergraph-clix${UNAME_RELEASE}7.438 + exit ;;7.439 + mips:*:*:UMIPS | mips:*:*:RISCos)7.440 + eval $set_cc_for_build7.441 + sed 's/^ //' << EOF >$dummy.c7.442 +#ifdef __cplusplus7.443 +#include <stdio.h> /* for printf() prototype */7.444 + int main (int argc, char *argv[]) {7.445 +#else7.446 + int main (argc, argv) int argc; char *argv[]; {7.447 +#endif7.448 + #if defined (host_mips) && defined (MIPSEB)7.449 + #if defined (SYSTYPE_SYSV)7.450 + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);7.451 + #endif7.452 + #if defined (SYSTYPE_SVR4)7.453 + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);7.454 + #endif7.455 + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)7.456 + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);7.457 + #endif7.458 + #endif7.459 + exit (-1);7.460 + }7.461 +EOF7.462 + $CC_FOR_BUILD -o $dummy $dummy.c &&7.463 + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&7.464 + SYSTEM_NAME=`$dummy $dummyarg` &&7.465 + { echo "$SYSTEM_NAME"; exit; }7.466 + echo mips-mips-riscos${UNAME_RELEASE}7.467 + exit ;;7.468 + Motorola:PowerMAX_OS:*:*)7.469 + echo powerpc-motorola-powermax7.470 + exit ;;7.471 + Motorola:*:4.3:PL8-*)7.472 + echo powerpc-harris-powermax7.473 + exit ;;7.474 + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)7.475 + echo powerpc-harris-powermax7.476 + exit ;;7.477 + Night_Hawk:Power_UNIX:*:*)7.478 + echo powerpc-harris-powerunix7.479 + exit ;;7.480 + m88k:CX/UX:7*:*)7.481 + echo m88k-harris-cxux77.482 + exit ;;7.483 + m88k:*:4*:R4*)7.484 + echo m88k-motorola-sysv47.485 + exit ;;7.486 + m88k:*:3*:R3*)7.487 + echo m88k-motorola-sysv37.488 + exit ;;7.489 + AViiON:dgux:*:*)7.490 + # DG/UX returns AViiON for all architectures7.491 + UNAME_PROCESSOR=`/usr/bin/uname -p`7.492 + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]7.493 + then7.494 + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \7.495 + [ ${TARGET_BINARY_INTERFACE}x = x ]7.496 + then7.497 + echo m88k-dg-dgux${UNAME_RELEASE}7.498 + else7.499 + echo m88k-dg-dguxbcs${UNAME_RELEASE}7.500 + fi7.501 + else7.502 + echo i586-dg-dgux${UNAME_RELEASE}7.503 + fi7.504 + exit ;;7.505 + M88*:DolphinOS:*:*) # DolphinOS (SVR3)7.506 + echo m88k-dolphin-sysv37.507 + exit ;;7.508 + M88*:*:R3*:*)7.509 + # Delta 88k system running SVR37.510 + echo m88k-motorola-sysv37.511 + exit ;;7.512 + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)7.513 + echo m88k-tektronix-sysv37.514 + exit ;;7.515 + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)7.516 + echo m68k-tektronix-bsd7.517 + exit ;;7.518 + *:IRIX*:*:*)7.519 + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`7.520 + exit ;;7.521 + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.7.522 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id7.523 + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '7.524 + i*86:AIX:*:*)7.525 + echo i386-ibm-aix7.526 + exit ;;7.527 + ia64:AIX:*:*)7.528 + if [ -x /usr/bin/oslevel ] ; then7.529 + IBM_REV=`/usr/bin/oslevel`7.530 + else7.531 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}7.532 + fi7.533 + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}7.534 + exit ;;7.535 + *:AIX:2:3)7.536 + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then7.537 + eval $set_cc_for_build7.538 + sed 's/^ //' << EOF >$dummy.c7.539 + #include <sys/systemcfg.h>7.540 +7.541 + main()7.542 + {7.543 + if (!__power_pc())7.544 + exit(1);7.545 + puts("powerpc-ibm-aix3.2.5");7.546 + exit(0);7.547 + }7.548 +EOF7.549 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`7.550 + then7.551 + echo "$SYSTEM_NAME"7.552 + else7.553 + echo rs6000-ibm-aix3.2.57.554 + fi7.555 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then7.556 + echo rs6000-ibm-aix3.2.47.557 + else7.558 + echo rs6000-ibm-aix3.27.559 + fi7.560 + exit ;;7.561 + *:AIX:*:[4567])7.562 + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`7.563 + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then7.564 + IBM_ARCH=rs60007.565 + else7.566 + IBM_ARCH=powerpc7.567 + fi7.568 + if [ -x /usr/bin/oslevel ] ; then7.569 + IBM_REV=`/usr/bin/oslevel`7.570 + else7.571 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}7.572 + fi7.573 + echo ${IBM_ARCH}-ibm-aix${IBM_REV}7.574 + exit ;;7.575 + *:AIX:*:*)7.576 + echo rs6000-ibm-aix7.577 + exit ;;7.578 + ibmrt:4.4BSD:*|romp-ibm:BSD:*)7.579 + echo romp-ibm-bsd4.47.580 + exit ;;7.581 + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and7.582 + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to7.583 + exit ;; # report: romp-ibm BSD 4.37.584 + *:BOSX:*:*)7.585 + echo rs6000-bull-bosx7.586 + exit ;;7.587 + DPX/2?00:B.O.S.:*:*)7.588 + echo m68k-bull-sysv37.589 + exit ;;7.590 + 9000/[34]??:4.3bsd:1.*:*)7.591 + echo m68k-hp-bsd7.592 + exit ;;7.593 + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)7.594 + echo m68k-hp-bsd4.47.595 + exit ;;7.596 + 9000/[34678]??:HP-UX:*:*)7.597 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`7.598 + case "${UNAME_MACHINE}" in7.599 + 9000/31? ) HP_ARCH=m68000 ;;7.600 + 9000/[34]?? ) HP_ARCH=m68k ;;7.601 + 9000/[678][0-9][0-9])7.602 + if [ -x /usr/bin/getconf ]; then7.603 + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`7.604 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`7.605 + case "${sc_cpu_version}" in7.606 + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_07.607 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_17.608 + 532) # CPU_PA_RISC2_07.609 + case "${sc_kernel_bits}" in7.610 + 32) HP_ARCH="hppa2.0n" ;;7.611 + 64) HP_ARCH="hppa2.0w" ;;7.612 + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.207.613 + esac ;;7.614 + esac7.615 + fi7.616 + if [ "${HP_ARCH}" = "" ]; then7.617 + eval $set_cc_for_build7.618 + sed 's/^ //' << EOF >$dummy.c7.619 +7.620 + #define _HPUX_SOURCE7.621 + #include <stdlib.h>7.622 + #include <unistd.h>7.623 +7.624 + int main ()7.625 + {7.626 + #if defined(_SC_KERNEL_BITS)7.627 + long bits = sysconf(_SC_KERNEL_BITS);7.628 + #endif7.629 + long cpu = sysconf (_SC_CPU_VERSION);7.630 +7.631 + switch (cpu)7.632 + {7.633 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;7.634 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;7.635 + case CPU_PA_RISC2_0:7.636 + #if defined(_SC_KERNEL_BITS)7.637 + switch (bits)7.638 + {7.639 + case 64: puts ("hppa2.0w"); break;7.640 + case 32: puts ("hppa2.0n"); break;7.641 + default: puts ("hppa2.0"); break;7.642 + } break;7.643 + #else /* !defined(_SC_KERNEL_BITS) */7.644 + puts ("hppa2.0"); break;7.645 + #endif7.646 + default: puts ("hppa1.0"); break;7.647 + }7.648 + exit (0);7.649 + }7.650 +EOF7.651 + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`7.652 + test -z "$HP_ARCH" && HP_ARCH=hppa7.653 + fi ;;7.654 + esac7.655 + if [ ${HP_ARCH} = "hppa2.0w" ]7.656 + then7.657 + eval $set_cc_for_build7.658 +7.659 + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating7.660 + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler7.661 + # generating 64-bit code. GNU and HP use different nomenclature:7.662 + #7.663 + # $ CC_FOR_BUILD=cc ./config.guess7.664 + # => hppa2.0w-hp-hpux11.237.665 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess7.666 + # => hppa64-hp-hpux11.237.667 +7.668 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |7.669 + grep -q __LP64__7.670 + then7.671 + HP_ARCH="hppa2.0w"7.672 + else7.673 + HP_ARCH="hppa64"7.674 + fi7.675 + fi7.676 + echo ${HP_ARCH}-hp-hpux${HPUX_REV}7.677 + exit ;;7.678 + ia64:HP-UX:*:*)7.679 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`7.680 + echo ia64-hp-hpux${HPUX_REV}7.681 + exit ;;7.682 + 3050*:HI-UX:*:*)7.683 + eval $set_cc_for_build7.684 + sed 's/^ //' << EOF >$dummy.c7.685 + #include <unistd.h>7.686 + int7.687 + main ()7.688 + {7.689 + long cpu = sysconf (_SC_CPU_VERSION);7.690 + /* The order matters, because CPU_IS_HP_MC68K erroneously returns7.691 + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct7.692 + results, however. */7.693 + if (CPU_IS_PA_RISC (cpu))7.694 + {7.695 + switch (cpu)7.696 + {7.697 + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;7.698 + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;7.699 + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;7.700 + default: puts ("hppa-hitachi-hiuxwe2"); break;7.701 + }7.702 + }7.703 + else if (CPU_IS_HP_MC68K (cpu))7.704 + puts ("m68k-hitachi-hiuxwe2");7.705 + else puts ("unknown-hitachi-hiuxwe2");7.706 + exit (0);7.707 + }7.708 +EOF7.709 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&7.710 + { echo "$SYSTEM_NAME"; exit; }7.711 + echo unknown-hitachi-hiuxwe27.712 + exit ;;7.713 + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )7.714 + echo hppa1.1-hp-bsd7.715 + exit ;;7.716 + 9000/8??:4.3bsd:*:*)7.717 + echo hppa1.0-hp-bsd7.718 + exit ;;7.719 + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)7.720 + echo hppa1.0-hp-mpeix7.721 + exit ;;7.722 + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )7.723 + echo hppa1.1-hp-osf7.724 + exit ;;7.725 + hp8??:OSF1:*:*)7.726 + echo hppa1.0-hp-osf7.727 + exit ;;7.728 + i*86:OSF1:*:*)7.729 + if [ -x /usr/sbin/sysversion ] ; then7.730 + echo ${UNAME_MACHINE}-unknown-osf1mk7.731 + else7.732 + echo ${UNAME_MACHINE}-unknown-osf17.733 + fi7.734 + exit ;;7.735 + parisc*:Lites*:*:*)7.736 + echo hppa1.1-hp-lites7.737 + exit ;;7.738 + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)7.739 + echo c1-convex-bsd7.740 + exit ;;7.741 + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)7.742 + if getsysinfo -f scalar_acc7.743 + then echo c32-convex-bsd7.744 + else echo c2-convex-bsd7.745 + fi7.746 + exit ;;7.747 + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)7.748 + echo c34-convex-bsd7.749 + exit ;;7.750 + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)7.751 + echo c38-convex-bsd7.752 + exit ;;7.753 + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)7.754 + echo c4-convex-bsd7.755 + exit ;;7.756 + CRAY*Y-MP:*:*:*)7.757 + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'7.758 + exit ;;7.759 + CRAY*[A-Z]90:*:*:*)7.760 + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \7.761 + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \7.762 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \7.763 + -e 's/\.[^.]*$/.X/'7.764 + exit ;;7.765 + CRAY*TS:*:*:*)7.766 + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'7.767 + exit ;;7.768 + CRAY*T3E:*:*:*)7.769 + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'7.770 + exit ;;7.771 + CRAY*SV1:*:*:*)7.772 + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'7.773 + exit ;;7.774 + *:UNICOS/mp:*:*)7.775 + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'7.776 + exit ;;7.777 + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)7.778 + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`7.779 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`7.780 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`7.781 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"7.782 + exit ;;7.783 + 5000:UNIX_System_V:4.*:*)7.784 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`7.785 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`7.786 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"7.787 + exit ;;7.788 + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)7.789 + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}7.790 + exit ;;7.791 + sparc*:BSD/OS:*:*)7.792 + echo sparc-unknown-bsdi${UNAME_RELEASE}7.793 + exit ;;7.794 + *:BSD/OS:*:*)7.795 + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}7.796 + exit ;;7.797 + *:FreeBSD:*:*)7.798 + case ${UNAME_MACHINE} in7.799 + pc98)7.800 + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;7.801 + amd64)7.802 + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;7.803 + *)7.804 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;7.805 + esac7.806 + exit ;;7.807 + i*:CYGWIN*:*)7.808 + echo ${UNAME_MACHINE}-pc-cygwin7.809 + exit ;;7.810 + *:MINGW*:*)7.811 + echo ${UNAME_MACHINE}-pc-mingw327.812 + exit ;;7.813 + i*:windows32*:*)7.814 + # uname -m includes "-pc" on this system.7.815 + echo ${UNAME_MACHINE}-mingw327.816 + exit ;;7.817 + i*:PW*:*)7.818 + echo ${UNAME_MACHINE}-pc-pw327.819 + exit ;;7.820 + *:Interix*:*)7.821 + case ${UNAME_MACHINE} in7.822 + x86)7.823 + echo i586-pc-interix${UNAME_RELEASE}7.824 + exit ;;7.825 + authenticamd | genuineintel | EM64T)7.826 + echo x86_64-unknown-interix${UNAME_RELEASE}7.827 + exit ;;7.828 + IA64)7.829 + echo ia64-unknown-interix${UNAME_RELEASE}7.830 + exit ;;7.831 + esac ;;7.832 + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)7.833 + echo i${UNAME_MACHINE}-pc-mks7.834 + exit ;;7.835 + 8664:Windows_NT:*)7.836 + echo x86_64-pc-mks7.837 + exit ;;7.838 + i*:Windows_NT*:* | Pentium*:Windows_NT*:*)7.839 + # How do we know it's Interix rather than the generic POSIX subsystem?7.840 + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we7.841 + # UNAME_MACHINE based on the output of uname instead of i386?7.842 + echo i586-pc-interix7.843 + exit ;;7.844 + i*:UWIN*:*)7.845 + echo ${UNAME_MACHINE}-pc-uwin7.846 + exit ;;7.847 + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)7.848 + echo x86_64-unknown-cygwin7.849 + exit ;;7.850 + p*:CYGWIN*:*)7.851 + echo powerpcle-unknown-cygwin7.852 + exit ;;7.853 + prep*:SunOS:5.*:*)7.854 + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`7.855 + exit ;;7.856 + *:GNU:*:*)7.857 + # the GNU system7.858 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`7.859 + exit ;;7.860 + *:GNU/*:*:*)7.861 + # other systems with GNU libc and userland7.862 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu7.863 + exit ;;7.864 + i*86:Minix:*:*)7.865 + echo ${UNAME_MACHINE}-pc-minix7.866 + exit ;;7.867 + alpha:Linux:*:*)7.868 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in7.869 + EV5) UNAME_MACHINE=alphaev5 ;;7.870 + EV56) UNAME_MACHINE=alphaev56 ;;7.871 + PCA56) UNAME_MACHINE=alphapca56 ;;7.872 + PCA57) UNAME_MACHINE=alphapca56 ;;7.873 + EV6) UNAME_MACHINE=alphaev6 ;;7.874 + EV67) UNAME_MACHINE=alphaev67 ;;7.875 + EV68*) UNAME_MACHINE=alphaev68 ;;7.876 + esac7.877 + objdump --private-headers /bin/sh | grep -q ld.so.17.878 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi7.879 + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}7.880 + exit ;;7.881 + arm*:Linux:*:*)7.882 + eval $set_cc_for_build7.883 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \7.884 + | grep -q __ARM_EABI__7.885 + then7.886 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.887 + else7.888 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \7.889 + | grep -q __ARM_PCS_VFP7.890 + then7.891 + echo ${UNAME_MACHINE}-unknown-linux-gnueabi7.892 + else7.893 + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf7.894 + fi7.895 + fi7.896 + exit ;;7.897 + avr32*:Linux:*:*)7.898 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.899 + exit ;;7.900 + cris:Linux:*:*)7.901 + echo cris-axis-linux-gnu7.902 + exit ;;7.903 + crisv32:Linux:*:*)7.904 + echo crisv32-axis-linux-gnu7.905 + exit ;;7.906 + frv:Linux:*:*)7.907 + echo frv-unknown-linux-gnu7.908 + exit ;;7.909 + i*86:Linux:*:*)7.910 + LIBC=gnu7.911 + eval $set_cc_for_build7.912 + sed 's/^ //' << EOF >$dummy.c7.913 + #ifdef __dietlibc__7.914 + LIBC=dietlibc7.915 + #endif7.916 +EOF7.917 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`7.918 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}"7.919 + exit ;;7.920 + ia64:Linux:*:*)7.921 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.922 + exit ;;7.923 + m32r*:Linux:*:*)7.924 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.925 + exit ;;7.926 + m68*:Linux:*:*)7.927 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.928 + exit ;;7.929 + mips:Linux:*:* | mips64:Linux:*:*)7.930 + eval $set_cc_for_build7.931 + sed 's/^ //' << EOF >$dummy.c7.932 + #undef CPU7.933 + #undef ${UNAME_MACHINE}7.934 + #undef ${UNAME_MACHINE}el7.935 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)7.936 + CPU=${UNAME_MACHINE}el7.937 + #else7.938 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)7.939 + CPU=${UNAME_MACHINE}7.940 + #else7.941 + CPU=7.942 + #endif7.943 + #endif7.944 +EOF7.945 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`7.946 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }7.947 + ;;7.948 + or32:Linux:*:*)7.949 + echo or32-unknown-linux-gnu7.950 + exit ;;7.951 + padre:Linux:*:*)7.952 + echo sparc-unknown-linux-gnu7.953 + exit ;;7.954 + parisc64:Linux:*:* | hppa64:Linux:*:*)7.955 + echo hppa64-unknown-linux-gnu7.956 + exit ;;7.957 + parisc:Linux:*:* | hppa:Linux:*:*)7.958 + # Look for CPU level7.959 + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in7.960 + PA7*) echo hppa1.1-unknown-linux-gnu ;;7.961 + PA8*) echo hppa2.0-unknown-linux-gnu ;;7.962 + *) echo hppa-unknown-linux-gnu ;;7.963 + esac7.964 + exit ;;7.965 + ppc64:Linux:*:*)7.966 + echo powerpc64-unknown-linux-gnu7.967 + exit ;;7.968 + ppc:Linux:*:*)7.969 + echo powerpc-unknown-linux-gnu7.970 + exit ;;7.971 + s390:Linux:*:* | s390x:Linux:*:*)7.972 + echo ${UNAME_MACHINE}-ibm-linux7.973 + exit ;;7.974 + sh64*:Linux:*:*)7.975 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.976 + exit ;;7.977 + sh*:Linux:*:*)7.978 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.979 + exit ;;7.980 + sparc:Linux:*:* | sparc64:Linux:*:*)7.981 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.982 + exit ;;7.983 + tile*:Linux:*:*)7.984 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.985 + exit ;;7.986 + vax:Linux:*:*)7.987 + echo ${UNAME_MACHINE}-dec-linux-gnu7.988 + exit ;;7.989 + x86_64:Linux:*:*)7.990 + echo x86_64-unknown-linux-gnu7.991 + exit ;;7.992 + xtensa*:Linux:*:*)7.993 + echo ${UNAME_MACHINE}-unknown-linux-gnu7.994 + exit ;;7.995 + i*86:DYNIX/ptx:4*:*)7.996 + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.7.997 + # earlier versions are messed up and put the nodename in both7.998 + # sysname and nodename.7.999 + echo i386-sequent-sysv47.1000 + exit ;;7.1001 + i*86:UNIX_SV:4.2MP:2.*)7.1002 + # Unixware is an offshoot of SVR4, but it has its own version7.1003 + # number series starting with 2...7.1004 + # I am not positive that other SVR4 systems won't match this,7.1005 + # I just have to hope. -- rms.7.1006 + # Use sysv4.2uw... so that sysv4* matches it.7.1007 + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}7.1008 + exit ;;7.1009 + i*86:OS/2:*:*)7.1010 + # If we were able to find `uname', then EMX Unix compatibility7.1011 + # is probably installed.7.1012 + echo ${UNAME_MACHINE}-pc-os2-emx7.1013 + exit ;;7.1014 + i*86:XTS-300:*:STOP)7.1015 + echo ${UNAME_MACHINE}-unknown-stop7.1016 + exit ;;7.1017 + i*86:atheos:*:*)7.1018 + echo ${UNAME_MACHINE}-unknown-atheos7.1019 + exit ;;7.1020 + i*86:syllable:*:*)7.1021 + echo ${UNAME_MACHINE}-pc-syllable7.1022 + exit ;;7.1023 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)7.1024 + echo i386-unknown-lynxos${UNAME_RELEASE}7.1025 + exit ;;7.1026 + i*86:*DOS:*:*)7.1027 + echo ${UNAME_MACHINE}-pc-msdosdjgpp7.1028 + exit ;;7.1029 + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)7.1030 + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`7.1031 + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then7.1032 + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}7.1033 + else7.1034 + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}7.1035 + fi7.1036 + exit ;;7.1037 + i*86:*:5:[678]*)7.1038 + # UnixWare 7.x, OpenUNIX and OpenServer 6.7.1039 + case `/bin/uname -X | grep "^Machine"` in7.1040 + *486*) UNAME_MACHINE=i486 ;;7.1041 + *Pentium) UNAME_MACHINE=i586 ;;7.1042 + *Pent*|*Celeron) UNAME_MACHINE=i686 ;;7.1043 + esac7.1044 + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}7.1045 + exit ;;7.1046 + i*86:*:3.2:*)7.1047 + if test -f /usr/options/cb.name; then7.1048 + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`7.1049 + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL7.1050 + elif /bin/uname -X 2>/dev/null >/dev/null ; then7.1051 + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`7.1052 + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i4867.1053 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \7.1054 + && UNAME_MACHINE=i5867.1055 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \7.1056 + && UNAME_MACHINE=i6867.1057 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \7.1058 + && UNAME_MACHINE=i6867.1059 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL7.1060 + else7.1061 + echo ${UNAME_MACHINE}-pc-sysv327.1062 + fi7.1063 + exit ;;7.1064 + pc:*:*:*)7.1065 + # Left here for compatibility:7.1066 + # uname -m prints for DJGPP always 'pc', but it prints nothing about7.1067 + # the processor, so we play safe by assuming i586.7.1068 + # Note: whatever this is, it MUST be the same as what config.sub7.1069 + # prints for the "djgpp" host, or else GDB configury will decide that7.1070 + # this is a cross-build.7.1071 + echo i586-pc-msdosdjgpp7.1072 + exit ;;7.1073 + Intel:Mach:3*:*)7.1074 + echo i386-pc-mach37.1075 + exit ;;7.1076 + paragon:*:*:*)7.1077 + echo i860-intel-osf17.1078 + exit ;;7.1079 + i860:*:4.*:*) # i860-SVR47.1080 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then7.1081 + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR47.1082 + else # Add other i860-SVR4 vendors below as they are discovered.7.1083 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR47.1084 + fi7.1085 + exit ;;7.1086 + mini*:CTIX:SYS*5:*)7.1087 + # "miniframe"7.1088 + echo m68010-convergent-sysv7.1089 + exit ;;7.1090 + mc68k:UNIX:SYSTEM5:3.51m)7.1091 + echo m68k-convergent-sysv7.1092 + exit ;;7.1093 + M680?0:D-NIX:5.3:*)7.1094 + echo m68k-diab-dnix7.1095 + exit ;;7.1096 + M68*:*:R3V[5678]*:*)7.1097 + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;7.1098 + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)7.1099 + OS_REL=''7.1100 + test -r /etc/.relid \7.1101 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`7.1102 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \7.1103 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }7.1104 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \7.1105 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;7.1106 + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)7.1107 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \7.1108 + && { echo i486-ncr-sysv4; exit; } ;;7.1109 + NCR*:*:4.2:* | MPRAS*:*:4.2:*)7.1110 + OS_REL='.3'7.1111 + test -r /etc/.relid \7.1112 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`7.1113 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \7.1114 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }7.1115 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \7.1116 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; }7.1117 + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \7.1118 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;7.1119 + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)7.1120 + echo m68k-unknown-lynxos${UNAME_RELEASE}7.1121 + exit ;;7.1122 + mc68030:UNIX_System_V:4.*:*)7.1123 + echo m68k-atari-sysv47.1124 + exit ;;7.1125 + TSUNAMI:LynxOS:2.*:*)7.1126 + echo sparc-unknown-lynxos${UNAME_RELEASE}7.1127 + exit ;;7.1128 + rs6000:LynxOS:2.*:*)7.1129 + echo rs6000-unknown-lynxos${UNAME_RELEASE}7.1130 + exit ;;7.1131 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)7.1132 + echo powerpc-unknown-lynxos${UNAME_RELEASE}7.1133 + exit ;;7.1134 + SM[BE]S:UNIX_SV:*:*)7.1135 + echo mips-dde-sysv${UNAME_RELEASE}7.1136 + exit ;;7.1137 + RM*:ReliantUNIX-*:*:*)7.1138 + echo mips-sni-sysv47.1139 + exit ;;7.1140 + RM*:SINIX-*:*:*)7.1141 + echo mips-sni-sysv47.1142 + exit ;;7.1143 + *:SINIX-*:*:*)7.1144 + if uname -p 2>/dev/null >/dev/null ; then7.1145 + UNAME_MACHINE=`(uname -p) 2>/dev/null`7.1146 + echo ${UNAME_MACHINE}-sni-sysv47.1147 + else7.1148 + echo ns32k-sni-sysv7.1149 + fi7.1150 + exit ;;7.1151 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort7.1152 + # says <Richard.M.Bartel@ccMail.Census.GOV>7.1153 + echo i586-unisys-sysv47.1154 + exit ;;7.1155 + *:UNIX_System_V:4*:FTX*)7.1156 + # From Gerald Hewes <hewes@openmarket.com>.7.1157 + # How about differentiating between stratus architectures? -djm7.1158 + echo hppa1.1-stratus-sysv47.1159 + exit ;;7.1160 + *:*:*:FTX*)7.1161 + # From seanf@swdc.stratus.com.7.1162 + echo i860-stratus-sysv47.1163 + exit ;;7.1164 + i*86:VOS:*:*)7.1165 + # From Paul.Green@stratus.com.7.1166 + echo ${UNAME_MACHINE}-stratus-vos7.1167 + exit ;;7.1168 + *:VOS:*:*)7.1169 + # From Paul.Green@stratus.com.7.1170 + echo hppa1.1-stratus-vos7.1171 + exit ;;7.1172 + mc68*:A/UX:*:*)7.1173 + echo m68k-apple-aux${UNAME_RELEASE}7.1174 + exit ;;7.1175 + news*:NEWS-OS:6*:*)7.1176 + echo mips-sony-newsos67.1177 + exit ;;7.1178 + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)7.1179 + if [ -d /usr/nec ]; then7.1180 + echo mips-nec-sysv${UNAME_RELEASE}7.1181 + else7.1182 + echo mips-unknown-sysv${UNAME_RELEASE}7.1183 + fi7.1184 + exit ;;7.1185 + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.7.1186 + echo powerpc-be-beos7.1187 + exit ;;7.1188 + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.7.1189 + echo powerpc-apple-beos7.1190 + exit ;;7.1191 + BePC:BeOS:*:*) # BeOS running on Intel PC compatible.7.1192 + echo i586-pc-beos7.1193 + exit ;;7.1194 + BePC:Haiku:*:*) # Haiku running on Intel PC compatible.7.1195 + echo i586-pc-haiku7.1196 + exit ;;7.1197 + SX-4:SUPER-UX:*:*)7.1198 + echo sx4-nec-superux${UNAME_RELEASE}7.1199 + exit ;;7.1200 + SX-5:SUPER-UX:*:*)7.1201 + echo sx5-nec-superux${UNAME_RELEASE}7.1202 + exit ;;7.1203 + SX-6:SUPER-UX:*:*)7.1204 + echo sx6-nec-superux${UNAME_RELEASE}7.1205 + exit ;;7.1206 + SX-7:SUPER-UX:*:*)7.1207 + echo sx7-nec-superux${UNAME_RELEASE}7.1208 + exit ;;7.1209 + SX-8:SUPER-UX:*:*)7.1210 + echo sx8-nec-superux${UNAME_RELEASE}7.1211 + exit ;;7.1212 + SX-8R:SUPER-UX:*:*)7.1213 + echo sx8r-nec-superux${UNAME_RELEASE}7.1214 + exit ;;7.1215 + Power*:Rhapsody:*:*)7.1216 + echo powerpc-apple-rhapsody${UNAME_RELEASE}7.1217 + exit ;;7.1218 + *:Rhapsody:*:*)7.1219 + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}7.1220 + exit ;;7.1221 + *:Darwin:*:*)7.1222 + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown7.1223 + case $UNAME_PROCESSOR in7.1224 + i386)7.1225 + eval $set_cc_for_build7.1226 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then7.1227 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \7.1228 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \7.1229 + grep IS_64BIT_ARCH >/dev/null7.1230 + then7.1231 + UNAME_PROCESSOR="x86_64"7.1232 + fi7.1233 + fi ;;7.1234 + unknown) UNAME_PROCESSOR=powerpc ;;7.1235 + esac7.1236 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}7.1237 + exit ;;7.1238 + *:procnto*:*:* | *:QNX:[0123456789]*:*)7.1239 + UNAME_PROCESSOR=`uname -p`7.1240 + if test "$UNAME_PROCESSOR" = "x86"; then7.1241 + UNAME_PROCESSOR=i3867.1242 + UNAME_MACHINE=pc7.1243 + fi7.1244 + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}7.1245 + exit ;;7.1246 + *:QNX:*:4*)7.1247 + echo i386-pc-qnx7.1248 + exit ;;7.1249 + NEO-?:NONSTOP_KERNEL:*:*)7.1250 + echo neo-tandem-nsk${UNAME_RELEASE}7.1251 + exit ;;7.1252 + NSE-?:NONSTOP_KERNEL:*:*)7.1253 + echo nse-tandem-nsk${UNAME_RELEASE}7.1254 + exit ;;7.1255 + NSR-?:NONSTOP_KERNEL:*:*)7.1256 + echo nsr-tandem-nsk${UNAME_RELEASE}7.1257 + exit ;;7.1258 + *:NonStop-UX:*:*)7.1259 + echo mips-compaq-nonstopux7.1260 + exit ;;7.1261 + BS2000:POSIX*:*:*)7.1262 + echo bs2000-siemens-sysv7.1263 + exit ;;7.1264 + DS/*:UNIX_System_V:*:*)7.1265 + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}7.1266 + exit ;;7.1267 + *:Plan9:*:*)7.1268 + # "uname -m" is not consistent, so use $cputype instead. 3867.1269 + # is converted to i386 for consistency with other x867.1270 + # operating systems.7.1271 + if test "$cputype" = "386"; then7.1272 + UNAME_MACHINE=i3867.1273 + else7.1274 + UNAME_MACHINE="$cputype"7.1275 + fi7.1276 + echo ${UNAME_MACHINE}-unknown-plan97.1277 + exit ;;7.1278 + *:TOPS-10:*:*)7.1279 + echo pdp10-unknown-tops107.1280 + exit ;;7.1281 + *:TENEX:*:*)7.1282 + echo pdp10-unknown-tenex7.1283 + exit ;;7.1284 + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)7.1285 + echo pdp10-dec-tops207.1286 + exit ;;7.1287 + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)7.1288 + echo pdp10-xkl-tops207.1289 + exit ;;7.1290 + *:TOPS-20:*:*)7.1291 + echo pdp10-unknown-tops207.1292 + exit ;;7.1293 + *:ITS:*:*)7.1294 + echo pdp10-unknown-its7.1295 + exit ;;7.1296 + SEI:*:*:SEIUX)7.1297 + echo mips-sei-seiux${UNAME_RELEASE}7.1298 + exit ;;7.1299 + *:DragonFly:*:*)7.1300 + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`7.1301 + exit ;;7.1302 + *:*VMS:*:*)7.1303 + UNAME_MACHINE=`(uname -p) 2>/dev/null`7.1304 + case "${UNAME_MACHINE}" in7.1305 + A*) echo alpha-dec-vms ; exit ;;7.1306 + I*) echo ia64-dec-vms ; exit ;;7.1307 + V*) echo vax-dec-vms ; exit ;;7.1308 + esac ;;7.1309 + *:XENIX:*:SysV)7.1310 + echo i386-pc-xenix7.1311 + exit ;;7.1312 + i*86:skyos:*:*)7.1313 + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'7.1314 + exit ;;7.1315 + i*86:rdos:*:*)7.1316 + echo ${UNAME_MACHINE}-pc-rdos7.1317 + exit ;;7.1318 + i*86:AROS:*:*)7.1319 + echo ${UNAME_MACHINE}-pc-aros7.1320 + exit ;;7.1321 +esac7.1322 +7.1323 +#echo '(No uname command or uname output not recognized.)' 1>&27.1324 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&27.1325 +7.1326 +eval $set_cc_for_build7.1327 +cat >$dummy.c <<EOF7.1328 +#ifdef _SEQUENT_7.1329 +# include <sys/types.h>7.1330 +# include <sys/utsname.h>7.1331 +#endif7.1332 +main ()7.1333 +{7.1334 +#if defined (sony)7.1335 +#if defined (MIPSEB)7.1336 + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,7.1337 + I don't know.... */7.1338 + printf ("mips-sony-bsd\n"); exit (0);7.1339 +#else7.1340 +#include <sys/param.h>7.1341 + printf ("m68k-sony-newsos%s\n",7.1342 +#ifdef NEWSOS47.1343 + "4"7.1344 +#else7.1345 + ""7.1346 +#endif7.1347 + ); exit (0);7.1348 +#endif7.1349 +#endif7.1350 +7.1351 +#if defined (__arm) && defined (__acorn) && defined (__unix)7.1352 + printf ("arm-acorn-riscix\n"); exit (0);7.1353 +#endif7.1354 +7.1355 +#if defined (hp300) && !defined (hpux)7.1356 + printf ("m68k-hp-bsd\n"); exit (0);7.1357 +#endif7.1358 +7.1359 +#if defined (NeXT)7.1360 +#if !defined (__ARCHITECTURE__)7.1361 +#define __ARCHITECTURE__ "m68k"7.1362 +#endif7.1363 + int version;7.1364 + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;7.1365 + if (version < 4)7.1366 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);7.1367 + else7.1368 + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);7.1369 + exit (0);7.1370 +#endif7.1371 +7.1372 +#if defined (MULTIMAX) || defined (n16)7.1373 +#if defined (UMAXV)7.1374 + printf ("ns32k-encore-sysv\n"); exit (0);7.1375 +#else7.1376 +#if defined (CMU)7.1377 + printf ("ns32k-encore-mach\n"); exit (0);7.1378 +#else7.1379 + printf ("ns32k-encore-bsd\n"); exit (0);7.1380 +#endif7.1381 +#endif7.1382 +#endif7.1383 +7.1384 +#if defined (__386BSD__)7.1385 + printf ("i386-pc-bsd\n"); exit (0);7.1386 +#endif7.1387 +7.1388 +#if defined (sequent)7.1389 +#if defined (i386)7.1390 + printf ("i386-sequent-dynix\n"); exit (0);7.1391 +#endif7.1392 +#if defined (ns32000)7.1393 + printf ("ns32k-sequent-dynix\n"); exit (0);7.1394 +#endif7.1395 +#endif7.1396 +7.1397 +#if defined (_SEQUENT_)7.1398 + struct utsname un;7.1399 +7.1400 + uname(&un);7.1401 +7.1402 + if (strncmp(un.version, "V2", 2) == 0) {7.1403 + printf ("i386-sequent-ptx2\n"); exit (0);7.1404 + }7.1405 + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */7.1406 + printf ("i386-sequent-ptx1\n"); exit (0);7.1407 + }7.1408 + printf ("i386-sequent-ptx\n"); exit (0);7.1409 +7.1410 +#endif7.1411 +7.1412 +#if defined (vax)7.1413 +# if !defined (ultrix)7.1414 +# include <sys/param.h>7.1415 +# if defined (BSD)7.1416 +# if BSD == 437.1417 + printf ("vax-dec-bsd4.3\n"); exit (0);7.1418 +# else7.1419 +# if BSD == 1990067.1420 + printf ("vax-dec-bsd4.3reno\n"); exit (0);7.1421 +# else7.1422 + printf ("vax-dec-bsd\n"); exit (0);7.1423 +# endif7.1424 +# endif7.1425 +# else7.1426 + printf ("vax-dec-bsd\n"); exit (0);7.1427 +# endif7.1428 +# else7.1429 + printf ("vax-dec-ultrix\n"); exit (0);7.1430 +# endif7.1431 +#endif7.1432 +7.1433 +#if defined (alliant) && defined (i860)7.1434 + printf ("i860-alliant-bsd\n"); exit (0);7.1435 +#endif7.1436 +7.1437 + exit (1);7.1438 +}7.1439 +EOF7.1440 +7.1441 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&7.1442 + { echo "$SYSTEM_NAME"; exit; }7.1443 +7.1444 +# Apollos put the system type in the environment.7.1445 +7.1446 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }7.1447 +7.1448 +# Convex versions that predate uname can use getsysinfo(1)7.1449 +7.1450 +if [ -x /usr/convex/getsysinfo ]7.1451 +then7.1452 + case `getsysinfo -f cpu_type` in7.1453 + c1*)7.1454 + echo c1-convex-bsd7.1455 + exit ;;7.1456 + c2*)7.1457 + if getsysinfo -f scalar_acc7.1458 + then echo c32-convex-bsd7.1459 + else echo c2-convex-bsd7.1460 + fi7.1461 + exit ;;7.1462 + c34*)7.1463 + echo c34-convex-bsd7.1464 + exit ;;7.1465 + c38*)7.1466 + echo c38-convex-bsd7.1467 + exit ;;7.1468 + c4*)7.1469 + echo c4-convex-bsd7.1470 + exit ;;7.1471 + esac7.1472 +fi7.1473 +7.1474 +cat >&2 <<EOF7.1475 +$0: unable to guess system type7.1476 +7.1477 +This script, last modified $timestamp, has failed to recognize7.1478 +the operating system you are using. It is advised that you7.1479 +download the most up to date version of the config scripts from7.1480 +7.1481 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD7.1482 +and7.1483 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD7.1484 +7.1485 +If the version you run ($0) is already up to date, please7.1486 +send the following data and any information you think might be7.1487 +pertinent to <config-patches@gnu.org> in order to provide the needed7.1488 +information to handle your system.7.1489 +7.1490 +config.guess timestamp = $timestamp7.1491 +7.1492 +uname -m = `(uname -m) 2>/dev/null || echo unknown`7.1493 +uname -r = `(uname -r) 2>/dev/null || echo unknown`7.1494 +uname -s = `(uname -s) 2>/dev/null || echo unknown`7.1495 +uname -v = `(uname -v) 2>/dev/null || echo unknown`7.1496 +7.1497 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`7.1498 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null`7.1499 +7.1500 +hostinfo = `(hostinfo) 2>/dev/null`7.1501 +/bin/universe = `(/bin/universe) 2>/dev/null`7.1502 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`7.1503 +/bin/arch = `(/bin/arch) 2>/dev/null`7.1504 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`7.1505 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`7.1506 +7.1507 +UNAME_MACHINE = ${UNAME_MACHINE}7.1508 +UNAME_RELEASE = ${UNAME_RELEASE}7.1509 +UNAME_SYSTEM = ${UNAME_SYSTEM}7.1510 +UNAME_VERSION = ${UNAME_VERSION}7.1511 +EOF7.1512 +7.1513 +exit 17.1514 +7.1515 +# Local variables:7.1516 +# eval: (add-hook 'write-file-hooks 'time-stamp)7.1517 +# time-stamp-start: "timestamp='"7.1518 +# time-stamp-format: "%:y-%02m-%02d"7.1519 +# time-stamp-end: "'"7.1520 +# End:
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00008.2 +++ b/android/deps/config.sub Sat Feb 25 21:30:49 2012 +10008.3 @@ -0,0 +1,1767 @@8.4 +#! /bin/sh8.5 +# Configuration validation subroutine script.8.6 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,8.7 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,8.8 +# 2011 Free Software Foundation, Inc.8.9 +8.10 +timestamp='2011-10-29'8.11 +8.12 +# This file is (in principle) common to ALL GNU software.8.13 +# The presence of a machine in this file suggests that SOME GNU software8.14 +# can handle that machine. It does not imply ALL GNU software can.8.15 +#8.16 +# This file is free software; you can redistribute it and/or modify8.17 +# it under the terms of the GNU General Public License as published by8.18 +# the Free Software Foundation; either version 2 of the License, or8.19 +# (at your option) any later version.8.20 +#8.21 +# This program is distributed in the hope that it will be useful,8.22 +# but WITHOUT ANY WARRANTY; without even the implied warranty of8.23 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the8.24 +# GNU General Public License for more details.8.25 +#8.26 +# You should have received a copy of the GNU General Public License8.27 +# along with this program; if not, write to the Free Software8.28 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA8.29 +# 02110-1301, USA.8.30 +#8.31 +# As a special exception to the GNU General Public License, if you8.32 +# distribute this file as part of a program that contains a8.33 +# configuration script generated by Autoconf, you may include it under8.34 +# the same distribution terms that you use for the rest of that program.8.35 +8.36 +8.37 +# Please send patches to <config-patches@gnu.org>. Submit a context8.38 +# diff and a properly formatted GNU ChangeLog entry.8.39 +#8.40 +# Configuration subroutine to validate and canonicalize a configuration type.8.41 +# Supply the specified configuration type as an argument.8.42 +# If it is invalid, we print an error message on stderr and exit with code 1.8.43 +# Otherwise, we print the canonical config type on stdout and succeed.8.44 +8.45 +# You can get the latest version of this script from:8.46 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD8.47 +8.48 +# This file is supposed to be the same for all GNU packages8.49 +# and recognize all the CPU types, system types and aliases8.50 +# that are meaningful with *any* GNU software.8.51 +# Each package is responsible for reporting which valid configurations8.52 +# it does not support. The user should be able to distinguish8.53 +# a failure to support a valid configuration from a meaningless8.54 +# configuration.8.55 +8.56 +# The goal of this file is to map all the various variations of a given8.57 +# machine specification into a single specification in the form:8.58 +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM8.59 +# or in some cases, the newer four-part form:8.60 +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM8.61 +# It is wrong to echo any other type of specification.8.62 +8.63 +me=`echo "$0" | sed -e 's,.*/,,'`8.64 +8.65 +usage="\8.66 +Usage: $0 [OPTION] CPU-MFR-OPSYS8.67 + $0 [OPTION] ALIAS8.68 +8.69 +Canonicalize a configuration name.8.70 +8.71 +Operation modes:8.72 + -h, --help print this help, then exit8.73 + -t, --time-stamp print date of last modification, then exit8.74 + -v, --version print version number, then exit8.75 +8.76 +Report bugs and patches to <config-patches@gnu.org>."8.77 +8.78 +version="\8.79 +GNU config.sub ($timestamp)8.80 +8.81 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,8.82 +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free8.83 +Software Foundation, Inc.8.84 +8.85 +This is free software; see the source for copying conditions. There is NO8.86 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."8.87 +8.88 +help="8.89 +Try \`$me --help' for more information."8.90 +8.91 +# Parse command line8.92 +while test $# -gt 0 ; do8.93 + case $1 in8.94 + --time-stamp | --time* | -t )8.95 + echo "$timestamp" ; exit ;;8.96 + --version | -v )8.97 + echo "$version" ; exit ;;8.98 + --help | --h* | -h )8.99 + echo "$usage"; exit ;;8.100 + -- ) # Stop option processing8.101 + shift; break ;;8.102 + - ) # Use stdin as input.8.103 + break ;;8.104 + -* )8.105 + echo "$me: invalid option $1$help"8.106 + exit 1 ;;8.107 +8.108 + *local*)8.109 + # First pass through any local machine types.8.110 + echo $18.111 + exit ;;8.112 +8.113 + * )8.114 + break ;;8.115 + esac8.116 +done8.117 +8.118 +case $# in8.119 + 0) echo "$me: missing argument$help" >&28.120 + exit 1;;8.121 + 1) ;;8.122 + *) echo "$me: too many arguments$help" >&28.123 + exit 1;;8.124 +esac8.125 +8.126 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).8.127 +# Here we must recognize all the valid KERNEL-OS combinations.8.128 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`8.129 +case $maybe_os in8.130 + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \8.131 + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \8.132 + knetbsd*-gnu* | netbsd*-gnu* | \8.133 + kopensolaris*-gnu* | \8.134 + storm-chaos* | os2-emx* | rtmk-nova*)8.135 + os=-$maybe_os8.136 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`8.137 + ;;8.138 + *)8.139 + basic_machine=`echo $1 | sed 's/-[^-]*$//'`8.140 + if [ $basic_machine != $1 ]8.141 + then os=`echo $1 | sed 's/.*-/-/'`8.142 + else os=; fi8.143 + ;;8.144 +esac8.145 +8.146 +### Let's recognize common machines as not being operating systems so8.147 +### that things like config.sub decstation-3100 work. We also8.148 +### recognize some manufacturers as not being operating systems, so we8.149 +### can provide default operating systems below.8.150 +case $os in8.151 + -sun*os*)8.152 + # Prevent following clause from handling this invalid input.8.153 + ;;8.154 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \8.155 + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \8.156 + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \8.157 + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\8.158 + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \8.159 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \8.160 + -apple | -axis | -knuth | -cray | -microblaze)8.161 + os=8.162 + basic_machine=$18.163 + ;;8.164 + -bluegene*)8.165 + os=-cnk8.166 + ;;8.167 + -sim | -cisco | -oki | -wec | -winbond)8.168 + os=8.169 + basic_machine=$18.170 + ;;8.171 + -scout)8.172 + ;;8.173 + -wrs)8.174 + os=-vxworks8.175 + basic_machine=$18.176 + ;;8.177 + -chorusos*)8.178 + os=-chorusos8.179 + basic_machine=$18.180 + ;;8.181 + -chorusrdb)8.182 + os=-chorusrdb8.183 + basic_machine=$18.184 + ;;8.185 + -hiux*)8.186 + os=-hiuxwe28.187 + ;;8.188 + -sco6)8.189 + os=-sco5v68.190 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.191 + ;;8.192 + -sco5)8.193 + os=-sco3.2v58.194 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.195 + ;;8.196 + -sco4)8.197 + os=-sco3.2v48.198 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.199 + ;;8.200 + -sco3.2.[4-9]*)8.201 + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`8.202 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.203 + ;;8.204 + -sco3.2v[4-9]*)8.205 + # Don't forget version if it is 3.2v4 or newer.8.206 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.207 + ;;8.208 + -sco5v6*)8.209 + # Don't forget version if it is 3.2v4 or newer.8.210 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.211 + ;;8.212 + -sco*)8.213 + os=-sco3.2v28.214 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.215 + ;;8.216 + -udk*)8.217 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.218 + ;;8.219 + -isc)8.220 + os=-isc2.28.221 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.222 + ;;8.223 + -clix*)8.224 + basic_machine=clipper-intergraph8.225 + ;;8.226 + -isc*)8.227 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`8.228 + ;;8.229 + -lynx*)8.230 + os=-lynxos8.231 + ;;8.232 + -ptx*)8.233 + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`8.234 + ;;8.235 + -windowsnt*)8.236 + os=`echo $os | sed -e 's/windowsnt/winnt/'`8.237 + ;;8.238 + -psos*)8.239 + os=-psos8.240 + ;;8.241 + -mint | -mint[0-9]*)8.242 + basic_machine=m68k-atari8.243 + os=-mint8.244 + ;;8.245 +esac8.246 +8.247 +# Decode aliases for certain CPU-COMPANY combinations.8.248 +case $basic_machine in8.249 + # Recognize the basic CPU types without company name.8.250 + # Some are omitted here because they have special meanings below.8.251 + 1750a | 580 \8.252 + | a29k \8.253 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \8.254 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \8.255 + | am33_2.0 \8.256 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \8.257 + | be32 | be64 \8.258 + | bfin \8.259 + | c4x | clipper \8.260 + | d10v | d30v | dlx | dsp16xx \8.261 + | epiphany \8.262 + | fido | fr30 | frv \8.263 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \8.264 + | hexagon \8.265 + | i370 | i860 | i960 | ia64 \8.266 + | ip2k | iq2000 \8.267 + | le32 | le64 \8.268 + | lm32 \8.269 + | m32c | m32r | m32rle | m68000 | m68k | m88k \8.270 + | maxq | mb | microblaze | mcore | mep | metag \8.271 + | mips | mipsbe | mipseb | mipsel | mipsle \8.272 + | mips16 \8.273 + | mips64 | mips64el \8.274 + | mips64octeon | mips64octeonel \8.275 + | mips64orion | mips64orionel \8.276 + | mips64r5900 | mips64r5900el \8.277 + | mips64vr | mips64vrel \8.278 + | mips64vr4100 | mips64vr4100el \8.279 + | mips64vr4300 | mips64vr4300el \8.280 + | mips64vr5000 | mips64vr5000el \8.281 + | mips64vr5900 | mips64vr5900el \8.282 + | mipsisa32 | mipsisa32el \8.283 + | mipsisa32r2 | mipsisa32r2el \8.284 + | mipsisa64 | mipsisa64el \8.285 + | mipsisa64r2 | mipsisa64r2el \8.286 + | mipsisa64sb1 | mipsisa64sb1el \8.287 + | mipsisa64sr71k | mipsisa64sr71kel \8.288 + | mipstx39 | mipstx39el \8.289 + | mn10200 | mn10300 \8.290 + | moxie \8.291 + | mt \8.292 + | msp430 \8.293 + | nds32 | nds32le | nds32be \8.294 + | nios | nios2 \8.295 + | ns16k | ns32k \8.296 + | open8 \8.297 + | or32 \8.298 + | pdp10 | pdp11 | pj | pjl \8.299 + | powerpc | powerpc64 | powerpc64le | powerpcle \8.300 + | pyramid \8.301 + | rl78 | rx \8.302 + | score \8.303 + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \8.304 + | sh64 | sh64le \8.305 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \8.306 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \8.307 + | spu \8.308 + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \8.309 + | ubicom32 \8.310 + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \8.311 + | we32k \8.312 + | x86 | xc16x | xstormy16 | xtensa \8.313 + | z8k | z80)8.314 + basic_machine=$basic_machine-unknown8.315 + ;;8.316 + c54x)8.317 + basic_machine=tic54x-unknown8.318 + ;;8.319 + c55x)8.320 + basic_machine=tic55x-unknown8.321 + ;;8.322 + c6x)8.323 + basic_machine=tic6x-unknown8.324 + ;;8.325 + m6811 | m68hc11 | m6812 | m68hc12 | picochip)8.326 + # Motorola 68HC11/12.8.327 + basic_machine=$basic_machine-unknown8.328 + os=-none8.329 + ;;8.330 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)8.331 + ;;8.332 + ms1)8.333 + basic_machine=mt-unknown8.334 + ;;8.335 +8.336 + strongarm | thumb | xscale)8.337 + basic_machine=arm-unknown8.338 + ;;8.339 +8.340 + xscaleeb)8.341 + basic_machine=armeb-unknown8.342 + ;;8.343 +8.344 + xscaleel)8.345 + basic_machine=armel-unknown8.346 + ;;8.347 +8.348 + # We use `pc' rather than `unknown'8.349 + # because (1) that's what they normally are, and8.350 + # (2) the word "unknown" tends to confuse beginning users.8.351 + i*86 | x86_64)8.352 + basic_machine=$basic_machine-pc8.353 + ;;8.354 + # Object if more than one company name word.8.355 + *-*-*)8.356 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&28.357 + exit 18.358 + ;;8.359 + # Recognize the basic CPU types with company name.8.360 + 580-* \8.361 + | a29k-* \8.362 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \8.363 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \8.364 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \8.365 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \8.366 + | avr-* | avr32-* \8.367 + | be32-* | be64-* \8.368 + | bfin-* | bs2000-* \8.369 + | c[123]* | c30-* | [cjt]90-* | c4x-* \8.370 + | clipper-* | craynv-* | cydra-* \8.371 + | d10v-* | d30v-* | dlx-* \8.372 + | elxsi-* \8.373 + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \8.374 + | h8300-* | h8500-* \8.375 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \8.376 + | hexagon-* \8.377 + | i*86-* | i860-* | i960-* | ia64-* \8.378 + | ip2k-* | iq2000-* \8.379 + | le32-* | le64-* \8.380 + | lm32-* \8.381 + | m32c-* | m32r-* | m32rle-* \8.382 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \8.383 + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \8.384 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \8.385 + | mips16-* \8.386 + | mips64-* | mips64el-* \8.387 + | mips64octeon-* | mips64octeonel-* \8.388 + | mips64orion-* | mips64orionel-* \8.389 + | mips64r5900-* | mips64r5900el-* \8.390 + | mips64vr-* | mips64vrel-* \8.391 + | mips64vr4100-* | mips64vr4100el-* \8.392 + | mips64vr4300-* | mips64vr4300el-* \8.393 + | mips64vr5000-* | mips64vr5000el-* \8.394 + | mips64vr5900-* | mips64vr5900el-* \8.395 + | mipsisa32-* | mipsisa32el-* \8.396 + | mipsisa32r2-* | mipsisa32r2el-* \8.397 + | mipsisa64-* | mipsisa64el-* \8.398 + | mipsisa64r2-* | mipsisa64r2el-* \8.399 + | mipsisa64sb1-* | mipsisa64sb1el-* \8.400 + | mipsisa64sr71k-* | mipsisa64sr71kel-* \8.401 + | mipstx39-* | mipstx39el-* \8.402 + | mmix-* \8.403 + | mt-* \8.404 + | msp430-* \8.405 + | nds32-* | nds32le-* | nds32be-* \8.406 + | nios-* | nios2-* \8.407 + | none-* | np1-* | ns16k-* | ns32k-* \8.408 + | open8-* \8.409 + | orion-* \8.410 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \8.411 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \8.412 + | pyramid-* \8.413 + | rl78-* | romp-* | rs6000-* | rx-* \8.414 + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \8.415 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \8.416 + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \8.417 + | sparclite-* \8.418 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \8.419 + | tahoe-* \8.420 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \8.421 + | tile*-* \8.422 + | tron-* \8.423 + | ubicom32-* \8.424 + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \8.425 + | vax-* \8.426 + | we32k-* \8.427 + | x86-* | x86_64-* | xc16x-* | xps100-* \8.428 + | xstormy16-* | xtensa*-* \8.429 + | ymp-* \8.430 + | z8k-* | z80-*)8.431 + ;;8.432 + # Recognize the basic CPU types without company name, with glob match.8.433 + xtensa*)8.434 + basic_machine=$basic_machine-unknown8.435 + ;;8.436 + # Recognize the various machine names and aliases which stand8.437 + # for a CPU type and a company and sometimes even an OS.8.438 + 386bsd)8.439 + basic_machine=i386-unknown8.440 + os=-bsd8.441 + ;;8.442 + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)8.443 + basic_machine=m68000-att8.444 + ;;8.445 + 3b*)8.446 + basic_machine=we32k-att8.447 + ;;8.448 + a29khif)8.449 + basic_machine=a29k-amd8.450 + os=-udi8.451 + ;;8.452 + abacus)8.453 + basic_machine=abacus-unknown8.454 + ;;8.455 + adobe68k)8.456 + basic_machine=m68010-adobe8.457 + os=-scout8.458 + ;;8.459 + alliant | fx80)8.460 + basic_machine=fx80-alliant8.461 + ;;8.462 + altos | altos3068)8.463 + basic_machine=m68k-altos8.464 + ;;8.465 + am29k)8.466 + basic_machine=a29k-none8.467 + os=-bsd8.468 + ;;8.469 + amd64)8.470 + basic_machine=x86_64-pc8.471 + ;;8.472 + amd64-*)8.473 + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`8.474 + ;;8.475 + amdahl)8.476 + basic_machine=580-amdahl8.477 + os=-sysv8.478 + ;;8.479 + amiga | amiga-*)8.480 + basic_machine=m68k-unknown8.481 + ;;8.482 + amigaos | amigados)8.483 + basic_machine=m68k-unknown8.484 + os=-amigaos8.485 + ;;8.486 + amigaunix | amix)8.487 + basic_machine=m68k-unknown8.488 + os=-sysv48.489 + ;;8.490 + apollo68)8.491 + basic_machine=m68k-apollo8.492 + os=-sysv8.493 + ;;8.494 + apollo68bsd)8.495 + basic_machine=m68k-apollo8.496 + os=-bsd8.497 + ;;8.498 + aros)8.499 + basic_machine=i386-pc8.500 + os=-aros8.501 + ;;8.502 + aux)8.503 + basic_machine=m68k-apple8.504 + os=-aux8.505 + ;;8.506 + balance)8.507 + basic_machine=ns32k-sequent8.508 + os=-dynix8.509 + ;;8.510 + blackfin)8.511 + basic_machine=bfin-unknown8.512 + os=-linux8.513 + ;;8.514 + blackfin-*)8.515 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`8.516 + os=-linux8.517 + ;;8.518 + bluegene*)8.519 + basic_machine=powerpc-ibm8.520 + os=-cnk8.521 + ;;8.522 + c54x-*)8.523 + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`8.524 + ;;8.525 + c55x-*)8.526 + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`8.527 + ;;8.528 + c6x-*)8.529 + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`8.530 + ;;8.531 + c90)8.532 + basic_machine=c90-cray8.533 + os=-unicos8.534 + ;;8.535 + cegcc)8.536 + basic_machine=arm-unknown8.537 + os=-cegcc8.538 + ;;8.539 + convex-c1)8.540 + basic_machine=c1-convex8.541 + os=-bsd8.542 + ;;8.543 + convex-c2)8.544 + basic_machine=c2-convex8.545 + os=-bsd8.546 + ;;8.547 + convex-c32)8.548 + basic_machine=c32-convex8.549 + os=-bsd8.550 + ;;8.551 + convex-c34)8.552 + basic_machine=c34-convex8.553 + os=-bsd8.554 + ;;8.555 + convex-c38)8.556 + basic_machine=c38-convex8.557 + os=-bsd8.558 + ;;8.559 + cray | j90)8.560 + basic_machine=j90-cray8.561 + os=-unicos8.562 + ;;8.563 + craynv)8.564 + basic_machine=craynv-cray8.565 + os=-unicosmp8.566 + ;;8.567 + cr16 | cr16-*)8.568 + basic_machine=cr16-unknown8.569 + os=-elf8.570 + ;;8.571 + crds | unos)8.572 + basic_machine=m68k-crds8.573 + ;;8.574 + crisv32 | crisv32-* | etraxfs*)8.575 + basic_machine=crisv32-axis8.576 + ;;8.577 + cris | cris-* | etrax*)8.578 + basic_machine=cris-axis8.579 + ;;8.580 + crx)8.581 + basic_machine=crx-unknown8.582 + os=-elf8.583 + ;;8.584 + da30 | da30-*)8.585 + basic_machine=m68k-da308.586 + ;;8.587 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)8.588 + basic_machine=mips-dec8.589 + ;;8.590 + decsystem10* | dec10*)8.591 + basic_machine=pdp10-dec8.592 + os=-tops108.593 + ;;8.594 + decsystem20* | dec20*)8.595 + basic_machine=pdp10-dec8.596 + os=-tops208.597 + ;;8.598 + delta | 3300 | motorola-3300 | motorola-delta \8.599 + | 3300-motorola | delta-motorola)8.600 + basic_machine=m68k-motorola8.601 + ;;8.602 + delta88)8.603 + basic_machine=m88k-motorola8.604 + os=-sysv38.605 + ;;8.606 + dicos)8.607 + basic_machine=i686-pc8.608 + os=-dicos8.609 + ;;8.610 + djgpp)8.611 + basic_machine=i586-pc8.612 + os=-msdosdjgpp8.613 + ;;8.614 + dpx20 | dpx20-*)8.615 + basic_machine=rs6000-bull8.616 + os=-bosx8.617 + ;;8.618 + dpx2* | dpx2*-bull)8.619 + basic_machine=m68k-bull8.620 + os=-sysv38.621 + ;;8.622 + ebmon29k)8.623 + basic_machine=a29k-amd8.624 + os=-ebmon8.625 + ;;8.626 + elxsi)8.627 + basic_machine=elxsi-elxsi8.628 + os=-bsd8.629 + ;;8.630 + encore | umax | mmax)8.631 + basic_machine=ns32k-encore8.632 + ;;8.633 + es1800 | OSE68k | ose68k | ose | OSE)8.634 + basic_machine=m68k-ericsson8.635 + os=-ose8.636 + ;;8.637 + fx2800)8.638 + basic_machine=i860-alliant8.639 + ;;8.640 + genix)8.641 + basic_machine=ns32k-ns8.642 + ;;8.643 + gmicro)8.644 + basic_machine=tron-gmicro8.645 + os=-sysv8.646 + ;;8.647 + go32)8.648 + basic_machine=i386-pc8.649 + os=-go328.650 + ;;8.651 + h3050r* | hiux*)8.652 + basic_machine=hppa1.1-hitachi8.653 + os=-hiuxwe28.654 + ;;8.655 + h8300hms)8.656 + basic_machine=h8300-hitachi8.657 + os=-hms8.658 + ;;8.659 + h8300xray)8.660 + basic_machine=h8300-hitachi8.661 + os=-xray8.662 + ;;8.663 + h8500hms)8.664 + basic_machine=h8500-hitachi8.665 + os=-hms8.666 + ;;8.667 + harris)8.668 + basic_machine=m88k-harris8.669 + os=-sysv38.670 + ;;8.671 + hp300-*)8.672 + basic_machine=m68k-hp8.673 + ;;8.674 + hp300bsd)8.675 + basic_machine=m68k-hp8.676 + os=-bsd8.677 + ;;8.678 + hp300hpux)8.679 + basic_machine=m68k-hp8.680 + os=-hpux8.681 + ;;8.682 + hp3k9[0-9][0-9] | hp9[0-9][0-9])8.683 + basic_machine=hppa1.0-hp8.684 + ;;8.685 + hp9k2[0-9][0-9] | hp9k31[0-9])8.686 + basic_machine=m68000-hp8.687 + ;;8.688 + hp9k3[2-9][0-9])8.689 + basic_machine=m68k-hp8.690 + ;;8.691 + hp9k6[0-9][0-9] | hp6[0-9][0-9])8.692 + basic_machine=hppa1.0-hp8.693 + ;;8.694 + hp9k7[0-79][0-9] | hp7[0-79][0-9])8.695 + basic_machine=hppa1.1-hp8.696 + ;;8.697 + hp9k78[0-9] | hp78[0-9])8.698 + # FIXME: really hppa2.0-hp8.699 + basic_machine=hppa1.1-hp8.700 + ;;8.701 + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)8.702 + # FIXME: really hppa2.0-hp8.703 + basic_machine=hppa1.1-hp8.704 + ;;8.705 + hp9k8[0-9][13679] | hp8[0-9][13679])8.706 + basic_machine=hppa1.1-hp8.707 + ;;8.708 + hp9k8[0-9][0-9] | hp8[0-9][0-9])8.709 + basic_machine=hppa1.0-hp8.710 + ;;8.711 + hppa-next)8.712 + os=-nextstep38.713 + ;;8.714 + hppaosf)8.715 + basic_machine=hppa1.1-hp8.716 + os=-osf8.717 + ;;8.718 + hppro)8.719 + basic_machine=hppa1.1-hp8.720 + os=-proelf8.721 + ;;8.722 + i370-ibm* | ibm*)8.723 + basic_machine=i370-ibm8.724 + ;;8.725 +# I'm not sure what "Sysv32" means. Should this be sysv3.2?8.726 + i*86v32)8.727 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`8.728 + os=-sysv328.729 + ;;8.730 + i*86v4*)8.731 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`8.732 + os=-sysv48.733 + ;;8.734 + i*86v)8.735 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`8.736 + os=-sysv8.737 + ;;8.738 + i*86sol2)8.739 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`8.740 + os=-solaris28.741 + ;;8.742 + i386mach)8.743 + basic_machine=i386-mach8.744 + os=-mach8.745 + ;;8.746 + i386-vsta | vsta)8.747 + basic_machine=i386-unknown8.748 + os=-vsta8.749 + ;;8.750 + iris | iris4d)8.751 + basic_machine=mips-sgi8.752 + case $os in8.753 + -irix*)8.754 + ;;8.755 + *)8.756 + os=-irix48.757 + ;;8.758 + esac8.759 + ;;8.760 + isi68 | isi)8.761 + basic_machine=m68k-isi8.762 + os=-sysv8.763 + ;;8.764 + m68knommu)8.765 + basic_machine=m68k-unknown8.766 + os=-linux8.767 + ;;8.768 + m68knommu-*)8.769 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`8.770 + os=-linux8.771 + ;;8.772 + m88k-omron*)8.773 + basic_machine=m88k-omron8.774 + ;;8.775 + magnum | m3230)8.776 + basic_machine=mips-mips8.777 + os=-sysv8.778 + ;;8.779 + merlin)8.780 + basic_machine=ns32k-utek8.781 + os=-sysv8.782 + ;;8.783 + microblaze)8.784 + basic_machine=microblaze-xilinx8.785 + ;;8.786 + mingw32)8.787 + basic_machine=i386-pc8.788 + os=-mingw328.789 + ;;8.790 + mingw32ce)8.791 + basic_machine=arm-unknown8.792 + os=-mingw32ce8.793 + ;;8.794 + miniframe)8.795 + basic_machine=m68000-convergent8.796 + ;;8.797 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)8.798 + basic_machine=m68k-atari8.799 + os=-mint8.800 + ;;8.801 + mips3*-*)8.802 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`8.803 + ;;8.804 + mips3*)8.805 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown8.806 + ;;8.807 + monitor)8.808 + basic_machine=m68k-rom68k8.809 + os=-coff8.810 + ;;8.811 + morphos)8.812 + basic_machine=powerpc-unknown8.813 + os=-morphos8.814 + ;;8.815 + msdos)8.816 + basic_machine=i386-pc8.817 + os=-msdos8.818 + ;;8.819 + ms1-*)8.820 + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`8.821 + ;;8.822 + mvs)8.823 + basic_machine=i370-ibm8.824 + os=-mvs8.825 + ;;8.826 + nacl)8.827 + basic_machine=le32-unknown8.828 + os=-nacl8.829 + ;;8.830 + ncr3000)8.831 + basic_machine=i486-ncr8.832 + os=-sysv48.833 + ;;8.834 + netbsd386)8.835 + basic_machine=i386-unknown8.836 + os=-netbsd8.837 + ;;8.838 + netwinder)8.839 + basic_machine=armv4l-rebel8.840 + os=-linux8.841 + ;;8.842 + news | news700 | news800 | news900)8.843 + basic_machine=m68k-sony8.844 + os=-newsos8.845 + ;;8.846 + news1000)8.847 + basic_machine=m68030-sony8.848 + os=-newsos8.849 + ;;8.850 + news-3600 | risc-news)8.851 + basic_machine=mips-sony8.852 + os=-newsos8.853 + ;;8.854 + necv70)8.855 + basic_machine=v70-nec8.856 + os=-sysv8.857 + ;;8.858 + next | m*-next )8.859 + basic_machine=m68k-next8.860 + case $os in8.861 + -nextstep* )8.862 + ;;8.863 + -ns2*)8.864 + os=-nextstep28.865 + ;;8.866 + *)8.867 + os=-nextstep38.868 + ;;8.869 + esac8.870 + ;;8.871 + nh3000)8.872 + basic_machine=m68k-harris8.873 + os=-cxux8.874 + ;;8.875 + nh[45]000)8.876 + basic_machine=m88k-harris8.877 + os=-cxux8.878 + ;;8.879 + nindy960)8.880 + basic_machine=i960-intel8.881 + os=-nindy8.882 + ;;8.883 + mon960)8.884 + basic_machine=i960-intel8.885 + os=-mon9608.886 + ;;8.887 + nonstopux)8.888 + basic_machine=mips-compaq8.889 + os=-nonstopux8.890 + ;;8.891 + np1)8.892 + basic_machine=np1-gould8.893 + ;;8.894 + neo-tandem)8.895 + basic_machine=neo-tandem8.896 + ;;8.897 + nse-tandem)8.898 + basic_machine=nse-tandem8.899 + ;;8.900 + nsr-tandem)8.901 + basic_machine=nsr-tandem8.902 + ;;8.903 + op50n-* | op60c-*)8.904 + basic_machine=hppa1.1-oki8.905 + os=-proelf8.906 + ;;8.907 + openrisc | openrisc-*)8.908 + basic_machine=or32-unknown8.909 + ;;8.910 + os400)8.911 + basic_machine=powerpc-ibm8.912 + os=-os4008.913 + ;;8.914 + OSE68000 | ose68000)8.915 + basic_machine=m68000-ericsson8.916 + os=-ose8.917 + ;;8.918 + os68k)8.919 + basic_machine=m68k-none8.920 + os=-os68k8.921 + ;;8.922 + pa-hitachi)8.923 + basic_machine=hppa1.1-hitachi8.924 + os=-hiuxwe28.925 + ;;8.926 + paragon)8.927 + basic_machine=i860-intel8.928 + os=-osf8.929 + ;;8.930 + parisc)8.931 + basic_machine=hppa-unknown8.932 + os=-linux8.933 + ;;8.934 + parisc-*)8.935 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`8.936 + os=-linux8.937 + ;;8.938 + pbd)8.939 + basic_machine=sparc-tti8.940 + ;;8.941 + pbb)8.942 + basic_machine=m68k-tti8.943 + ;;8.944 + pc532 | pc532-*)8.945 + basic_machine=ns32k-pc5328.946 + ;;8.947 + pc98)8.948 + basic_machine=i386-pc8.949 + ;;8.950 + pc98-*)8.951 + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`8.952 + ;;8.953 + pentium | p5 | k5 | k6 | nexgen | viac3)8.954 + basic_machine=i586-pc8.955 + ;;8.956 + pentiumpro | p6 | 6x86 | athlon | athlon_*)8.957 + basic_machine=i686-pc8.958 + ;;8.959 + pentiumii | pentium2 | pentiumiii | pentium3)8.960 + basic_machine=i686-pc8.961 + ;;8.962 + pentium4)8.963 + basic_machine=i786-pc8.964 + ;;8.965 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)8.966 + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`8.967 + ;;8.968 + pentiumpro-* | p6-* | 6x86-* | athlon-*)8.969 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`8.970 + ;;8.971 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)8.972 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`8.973 + ;;8.974 + pentium4-*)8.975 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`8.976 + ;;8.977 + pn)8.978 + basic_machine=pn-gould8.979 + ;;8.980 + power) basic_machine=power-ibm8.981 + ;;8.982 + ppc | ppcbe) basic_machine=powerpc-unknown8.983 + ;;8.984 + ppc-* | ppcbe-*)8.985 + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`8.986 + ;;8.987 + ppcle | powerpclittle | ppc-le | powerpc-little)8.988 + basic_machine=powerpcle-unknown8.989 + ;;8.990 + ppcle-* | powerpclittle-*)8.991 + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`8.992 + ;;8.993 + ppc64) basic_machine=powerpc64-unknown8.994 + ;;8.995 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`8.996 + ;;8.997 + ppc64le | powerpc64little | ppc64-le | powerpc64-little)8.998 + basic_machine=powerpc64le-unknown8.999 + ;;8.1000 + ppc64le-* | powerpc64little-*)8.1001 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`8.1002 + ;;8.1003 + ps2)8.1004 + basic_machine=i386-ibm8.1005 + ;;8.1006 + pw32)8.1007 + basic_machine=i586-unknown8.1008 + os=-pw328.1009 + ;;8.1010 + rdos)8.1011 + basic_machine=i386-pc8.1012 + os=-rdos8.1013 + ;;8.1014 + rom68k)8.1015 + basic_machine=m68k-rom68k8.1016 + os=-coff8.1017 + ;;8.1018 + rm[46]00)8.1019 + basic_machine=mips-siemens8.1020 + ;;8.1021 + rtpc | rtpc-*)8.1022 + basic_machine=romp-ibm8.1023 + ;;8.1024 + s390 | s390-*)8.1025 + basic_machine=s390-ibm8.1026 + ;;8.1027 + s390x | s390x-*)8.1028 + basic_machine=s390x-ibm8.1029 + ;;8.1030 + sa29200)8.1031 + basic_machine=a29k-amd8.1032 + os=-udi8.1033 + ;;8.1034 + sb1)8.1035 + basic_machine=mipsisa64sb1-unknown8.1036 + ;;8.1037 + sb1el)8.1038 + basic_machine=mipsisa64sb1el-unknown8.1039 + ;;8.1040 + sde)8.1041 + basic_machine=mipsisa32-sde8.1042 + os=-elf8.1043 + ;;8.1044 + sei)8.1045 + basic_machine=mips-sei8.1046 + os=-seiux8.1047 + ;;8.1048 + sequent)8.1049 + basic_machine=i386-sequent8.1050 + ;;8.1051 + sh)8.1052 + basic_machine=sh-hitachi8.1053 + os=-hms8.1054 + ;;8.1055 + sh5el)8.1056 + basic_machine=sh5le-unknown8.1057 + ;;8.1058 + sh64)8.1059 + basic_machine=sh64-unknown8.1060 + ;;8.1061 + sparclite-wrs | simso-wrs)8.1062 + basic_machine=sparclite-wrs8.1063 + os=-vxworks8.1064 + ;;8.1065 + sps7)8.1066 + basic_machine=m68k-bull8.1067 + os=-sysv28.1068 + ;;8.1069 + spur)8.1070 + basic_machine=spur-unknown8.1071 + ;;8.1072 + st2000)8.1073 + basic_machine=m68k-tandem8.1074 + ;;8.1075 + stratus)8.1076 + basic_machine=i860-stratus8.1077 + os=-sysv48.1078 + ;;8.1079 + strongarm-* | thumb-*)8.1080 + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`8.1081 + ;;8.1082 + sun2)8.1083 + basic_machine=m68000-sun8.1084 + ;;8.1085 + sun2os3)8.1086 + basic_machine=m68000-sun8.1087 + os=-sunos38.1088 + ;;8.1089 + sun2os4)8.1090 + basic_machine=m68000-sun8.1091 + os=-sunos48.1092 + ;;8.1093 + sun3os3)8.1094 + basic_machine=m68k-sun8.1095 + os=-sunos38.1096 + ;;8.1097 + sun3os4)8.1098 + basic_machine=m68k-sun8.1099 + os=-sunos48.1100 + ;;8.1101 + sun4os3)8.1102 + basic_machine=sparc-sun8.1103 + os=-sunos38.1104 + ;;8.1105 + sun4os4)8.1106 + basic_machine=sparc-sun8.1107 + os=-sunos48.1108 + ;;8.1109 + sun4sol2)8.1110 + basic_machine=sparc-sun8.1111 + os=-solaris28.1112 + ;;8.1113 + sun3 | sun3-*)8.1114 + basic_machine=m68k-sun8.1115 + ;;8.1116 + sun4)8.1117 + basic_machine=sparc-sun8.1118 + ;;8.1119 + sun386 | sun386i | roadrunner)8.1120 + basic_machine=i386-sun8.1121 + ;;8.1122 + sv1)8.1123 + basic_machine=sv1-cray8.1124 + os=-unicos8.1125 + ;;8.1126 + symmetry)8.1127 + basic_machine=i386-sequent8.1128 + os=-dynix8.1129 + ;;8.1130 + t3e)8.1131 + basic_machine=alphaev5-cray8.1132 + os=-unicos8.1133 + ;;8.1134 + t90)8.1135 + basic_machine=t90-cray8.1136 + os=-unicos8.1137 + ;;8.1138 + tile*)8.1139 + basic_machine=$basic_machine-unknown8.1140 + os=-linux-gnu8.1141 + ;;8.1142 + tx39)8.1143 + basic_machine=mipstx39-unknown8.1144 + ;;8.1145 + tx39el)8.1146 + basic_machine=mipstx39el-unknown8.1147 + ;;8.1148 + toad1)8.1149 + basic_machine=pdp10-xkl8.1150 + os=-tops208.1151 + ;;8.1152 + tower | tower-32)8.1153 + basic_machine=m68k-ncr8.1154 + ;;8.1155 + tpf)8.1156 + basic_machine=s390x-ibm8.1157 + os=-tpf8.1158 + ;;8.1159 + udi29k)8.1160 + basic_machine=a29k-amd8.1161 + os=-udi8.1162 + ;;8.1163 + ultra3)8.1164 + basic_machine=a29k-nyu8.1165 + os=-sym18.1166 + ;;8.1167 + v810 | necv810)8.1168 + basic_machine=v810-nec8.1169 + os=-none8.1170 + ;;8.1171 + vaxv)8.1172 + basic_machine=vax-dec8.1173 + os=-sysv8.1174 + ;;8.1175 + vms)8.1176 + basic_machine=vax-dec8.1177 + os=-vms8.1178 + ;;8.1179 + vpp*|vx|vx-*)8.1180 + basic_machine=f301-fujitsu8.1181 + ;;8.1182 + vxworks960)8.1183 + basic_machine=i960-wrs8.1184 + os=-vxworks8.1185 + ;;8.1186 + vxworks68)8.1187 + basic_machine=m68k-wrs8.1188 + os=-vxworks8.1189 + ;;8.1190 + vxworks29k)8.1191 + basic_machine=a29k-wrs8.1192 + os=-vxworks8.1193 + ;;8.1194 + w65*)8.1195 + basic_machine=w65-wdc8.1196 + os=-none8.1197 + ;;8.1198 + w89k-*)8.1199 + basic_machine=hppa1.1-winbond8.1200 + os=-proelf8.1201 + ;;8.1202 + xbox)8.1203 + basic_machine=i686-pc8.1204 + os=-mingw328.1205 + ;;8.1206 + xps | xps100)8.1207 + basic_machine=xps100-honeywell8.1208 + ;;8.1209 + xscale-* | xscalee[bl]-*)8.1210 + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`8.1211 + ;;8.1212 + ymp)8.1213 + basic_machine=ymp-cray8.1214 + os=-unicos8.1215 + ;;8.1216 + z8k-*-coff)8.1217 + basic_machine=z8k-unknown8.1218 + os=-sim8.1219 + ;;8.1220 + z80-*-coff)8.1221 + basic_machine=z80-unknown8.1222 + os=-sim8.1223 + ;;8.1224 + none)8.1225 + basic_machine=none-none8.1226 + os=-none8.1227 + ;;8.1228 +8.1229 +# Here we handle the default manufacturer of certain CPU types. It is in8.1230 +# some cases the only manufacturer, in others, it is the most popular.8.1231 + w89k)8.1232 + basic_machine=hppa1.1-winbond8.1233 + ;;8.1234 + op50n)8.1235 + basic_machine=hppa1.1-oki8.1236 + ;;8.1237 + op60c)8.1238 + basic_machine=hppa1.1-oki8.1239 + ;;8.1240 + romp)8.1241 + basic_machine=romp-ibm8.1242 + ;;8.1243 + mmix)8.1244 + basic_machine=mmix-knuth8.1245 + ;;8.1246 + rs6000)8.1247 + basic_machine=rs6000-ibm8.1248 + ;;8.1249 + vax)8.1250 + basic_machine=vax-dec8.1251 + ;;8.1252 + pdp10)8.1253 + # there are many clones, so DEC is not a safe bet8.1254 + basic_machine=pdp10-unknown8.1255 + ;;8.1256 + pdp11)8.1257 + basic_machine=pdp11-dec8.1258 + ;;8.1259 + we32k)8.1260 + basic_machine=we32k-att8.1261 + ;;8.1262 + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)8.1263 + basic_machine=sh-unknown8.1264 + ;;8.1265 + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)8.1266 + basic_machine=sparc-sun8.1267 + ;;8.1268 + cydra)8.1269 + basic_machine=cydra-cydrome8.1270 + ;;8.1271 + orion)8.1272 + basic_machine=orion-highlevel8.1273 + ;;8.1274 + orion105)8.1275 + basic_machine=clipper-highlevel8.1276 + ;;8.1277 + mac | mpw | mac-mpw)8.1278 + basic_machine=m68k-apple8.1279 + ;;8.1280 + pmac | pmac-mpw)8.1281 + basic_machine=powerpc-apple8.1282 + ;;8.1283 + *-unknown)8.1284 + # Make sure to match an already-canonicalized machine name.8.1285 + ;;8.1286 + *)8.1287 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&28.1288 + exit 18.1289 + ;;8.1290 +esac8.1291 +8.1292 +# Here we canonicalize certain aliases for manufacturers.8.1293 +case $basic_machine in8.1294 + *-digital*)8.1295 + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`8.1296 + ;;8.1297 + *-commodore*)8.1298 + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`8.1299 + ;;8.1300 + *)8.1301 + ;;8.1302 +esac8.1303 +8.1304 +# Decode manufacturer-specific aliases for certain operating systems.8.1305 +8.1306 +if [ x"$os" != x"" ]8.1307 +then8.1308 +case $os in8.1309 + # First match some system type aliases8.1310 + # that might get confused with valid system types.8.1311 + # -solaris* is a basic system type, with this one exception.8.1312 + -auroraux)8.1313 + os=-auroraux8.1314 + ;;8.1315 + -solaris1 | -solaris1.*)8.1316 + os=`echo $os | sed -e 's|solaris1|sunos4|'`8.1317 + ;;8.1318 + -solaris)8.1319 + os=-solaris28.1320 + ;;8.1321 + -svr4*)8.1322 + os=-sysv48.1323 + ;;8.1324 + -unixware*)8.1325 + os=-sysv4.2uw8.1326 + ;;8.1327 + -gnu/linux*)8.1328 + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`8.1329 + ;;8.1330 + # First accept the basic system types.8.1331 + # The portable systems comes first.8.1332 + # Each alternative MUST END IN A *, to match a version number.8.1333 + # -sysv* is not here because it comes later, after sysvr4.8.1334 + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \8.1335 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\8.1336 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \8.1337 + | -sym* | -kopensolaris* \8.1338 + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \8.1339 + | -aos* | -aros* \8.1340 + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \8.1341 + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \8.1342 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \8.1343 + | -openbsd* | -solidbsd* \8.1344 + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \8.1345 + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \8.1346 + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \8.1347 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \8.1348 + | -chorusos* | -chorusrdb* | -cegcc* \8.1349 + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \8.1350 + | -mingw32* | -linux-gnu* | -linux-android* \8.1351 + | -linux-newlib* | -linux-uclibc* \8.1352 + | -uxpv* | -beos* | -mpeix* | -udk* \8.1353 + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \8.1354 + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \8.1355 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \8.1356 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \8.1357 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \8.1358 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \8.1359 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)8.1360 + # Remember, each alternative MUST END IN *, to match a version number.8.1361 + ;;8.1362 + -qnx*)8.1363 + case $basic_machine in8.1364 + x86-* | i*86-*)8.1365 + ;;8.1366 + *)8.1367 + os=-nto$os8.1368 + ;;8.1369 + esac8.1370 + ;;8.1371 + -nto-qnx*)8.1372 + ;;8.1373 + -nto*)8.1374 + os=`echo $os | sed -e 's|nto|nto-qnx|'`8.1375 + ;;8.1376 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \8.1377 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \8.1378 + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)8.1379 + ;;8.1380 + -mac*)8.1381 + os=`echo $os | sed -e 's|mac|macos|'`8.1382 + ;;8.1383 + -linux-dietlibc)8.1384 + os=-linux-dietlibc8.1385 + ;;8.1386 + -linux*)8.1387 + os=`echo $os | sed -e 's|linux|linux-gnu|'`8.1388 + ;;8.1389 + -sunos5*)8.1390 + os=`echo $os | sed -e 's|sunos5|solaris2|'`8.1391 + ;;8.1392 + -sunos6*)8.1393 + os=`echo $os | sed -e 's|sunos6|solaris3|'`8.1394 + ;;8.1395 + -opened*)8.1396 + os=-openedition8.1397 + ;;8.1398 + -os400*)8.1399 + os=-os4008.1400 + ;;8.1401 + -wince*)8.1402 + os=-wince8.1403 + ;;8.1404 + -osfrose*)8.1405 + os=-osfrose8.1406 + ;;8.1407 + -osf*)8.1408 + os=-osf8.1409 + ;;8.1410 + -utek*)8.1411 + os=-bsd8.1412 + ;;8.1413 + -dynix*)8.1414 + os=-bsd8.1415 + ;;8.1416 + -acis*)8.1417 + os=-aos8.1418 + ;;8.1419 + -atheos*)8.1420 + os=-atheos8.1421 + ;;8.1422 + -syllable*)8.1423 + os=-syllable8.1424 + ;;8.1425 + -386bsd)8.1426 + os=-bsd8.1427 + ;;8.1428 + -ctix* | -uts*)8.1429 + os=-sysv8.1430 + ;;8.1431 + -nova*)8.1432 + os=-rtmk-nova8.1433 + ;;8.1434 + -ns2 )8.1435 + os=-nextstep28.1436 + ;;8.1437 + -nsk*)8.1438 + os=-nsk8.1439 + ;;8.1440 + # Preserve the version number of sinix5.8.1441 + -sinix5.*)8.1442 + os=`echo $os | sed -e 's|sinix|sysv|'`8.1443 + ;;8.1444 + -sinix*)8.1445 + os=-sysv48.1446 + ;;8.1447 + -tpf*)8.1448 + os=-tpf8.1449 + ;;8.1450 + -triton*)8.1451 + os=-sysv38.1452 + ;;8.1453 + -oss*)8.1454 + os=-sysv38.1455 + ;;8.1456 + -svr4)8.1457 + os=-sysv48.1458 + ;;8.1459 + -svr3)8.1460 + os=-sysv38.1461 + ;;8.1462 + -sysvr4)8.1463 + os=-sysv48.1464 + ;;8.1465 + # This must come after -sysvr4.8.1466 + -sysv*)8.1467 + ;;8.1468 + -ose*)8.1469 + os=-ose8.1470 + ;;8.1471 + -es1800*)8.1472 + os=-ose8.1473 + ;;8.1474 + -xenix)8.1475 + os=-xenix8.1476 + ;;8.1477 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)8.1478 + os=-mint8.1479 + ;;8.1480 + -aros*)8.1481 + os=-aros8.1482 + ;;8.1483 + -kaos*)8.1484 + os=-kaos8.1485 + ;;8.1486 + -zvmoe)8.1487 + os=-zvmoe8.1488 + ;;8.1489 + -dicos*)8.1490 + os=-dicos8.1491 + ;;8.1492 + -nacl*)8.1493 + ;;8.1494 + -none)8.1495 + ;;8.1496 + *)8.1497 + # Get rid of the `-' at the beginning of $os.8.1498 + os=`echo $os | sed 's/[^-]*-//'`8.1499 + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&28.1500 + exit 18.1501 + ;;8.1502 +esac8.1503 +else8.1504 +8.1505 +# Here we handle the default operating systems that come with various machines.8.1506 +# The value should be what the vendor currently ships out the door with their8.1507 +# machine or put another way, the most popular os provided with the machine.8.1508 +8.1509 +# Note that if you're going to try to match "-MANUFACTURER" here (say,8.1510 +# "-sun"), then you have to tell the case statement up towards the top8.1511 +# that MANUFACTURER isn't an operating system. Otherwise, code above8.1512 +# will signal an error saying that MANUFACTURER isn't an operating8.1513 +# system, and we'll never get to this point.8.1514 +8.1515 +case $basic_machine in8.1516 + score-*)8.1517 + os=-elf8.1518 + ;;8.1519 + spu-*)8.1520 + os=-elf8.1521 + ;;8.1522 + *-acorn)8.1523 + os=-riscix1.28.1524 + ;;8.1525 + arm*-rebel)8.1526 + os=-linux8.1527 + ;;8.1528 + arm*-semi)8.1529 + os=-aout8.1530 + ;;8.1531 + c4x-* | tic4x-*)8.1532 + os=-coff8.1533 + ;;8.1534 + tic54x-*)8.1535 + os=-coff8.1536 + ;;8.1537 + tic55x-*)8.1538 + os=-coff8.1539 + ;;8.1540 + tic6x-*)8.1541 + os=-coff8.1542 + ;;8.1543 + # This must come before the *-dec entry.8.1544 + pdp10-*)8.1545 + os=-tops208.1546 + ;;8.1547 + pdp11-*)8.1548 + os=-none8.1549 + ;;8.1550 + *-dec | vax-*)8.1551 + os=-ultrix4.28.1552 + ;;8.1553 + m68*-apollo)8.1554 + os=-domain8.1555 + ;;8.1556 + i386-sun)8.1557 + os=-sunos4.0.28.1558 + ;;8.1559 + m68000-sun)8.1560 + os=-sunos38.1561 + # This also exists in the configure program, but was not the8.1562 + # default.8.1563 + # os=-sunos48.1564 + ;;8.1565 + m68*-cisco)8.1566 + os=-aout8.1567 + ;;8.1568 + mep-*)8.1569 + os=-elf8.1570 + ;;8.1571 + mips*-cisco)8.1572 + os=-elf8.1573 + ;;8.1574 + mips*-*)8.1575 + os=-elf8.1576 + ;;8.1577 + or32-*)8.1578 + os=-coff8.1579 + ;;8.1580 + *-tti) # must be before sparc entry or we get the wrong os.8.1581 + os=-sysv38.1582 + ;;8.1583 + sparc-* | *-sun)8.1584 + os=-sunos4.1.18.1585 + ;;8.1586 + *-be)8.1587 + os=-beos8.1588 + ;;8.1589 + *-haiku)8.1590 + os=-haiku8.1591 + ;;8.1592 + *-ibm)8.1593 + os=-aix8.1594 + ;;8.1595 + *-knuth)8.1596 + os=-mmixware8.1597 + ;;8.1598 + *-wec)8.1599 + os=-proelf8.1600 + ;;8.1601 + *-winbond)8.1602 + os=-proelf8.1603 + ;;8.1604 + *-oki)8.1605 + os=-proelf8.1606 + ;;8.1607 + *-hp)8.1608 + os=-hpux8.1609 + ;;8.1610 + *-hitachi)8.1611 + os=-hiux8.1612 + ;;8.1613 + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)8.1614 + os=-sysv8.1615 + ;;8.1616 + *-cbm)8.1617 + os=-amigaos8.1618 + ;;8.1619 + *-dg)8.1620 + os=-dgux8.1621 + ;;8.1622 + *-dolphin)8.1623 + os=-sysv38.1624 + ;;8.1625 + m68k-ccur)8.1626 + os=-rtu8.1627 + ;;8.1628 + m88k-omron*)8.1629 + os=-luna8.1630 + ;;8.1631 + *-next )8.1632 + os=-nextstep8.1633 + ;;8.1634 + *-sequent)8.1635 + os=-ptx8.1636 + ;;8.1637 + *-crds)8.1638 + os=-unos8.1639 + ;;8.1640 + *-ns)8.1641 + os=-genix8.1642 + ;;8.1643 + i370-*)8.1644 + os=-mvs8.1645 + ;;8.1646 + *-next)8.1647 + os=-nextstep38.1648 + ;;8.1649 + *-gould)8.1650 + os=-sysv8.1651 + ;;8.1652 + *-highlevel)8.1653 + os=-bsd8.1654 + ;;8.1655 + *-encore)8.1656 + os=-bsd8.1657 + ;;8.1658 + *-sgi)8.1659 + os=-irix8.1660 + ;;8.1661 + *-siemens)8.1662 + os=-sysv48.1663 + ;;8.1664 + *-masscomp)8.1665 + os=-rtu8.1666 + ;;8.1667 + f30[01]-fujitsu | f700-fujitsu)8.1668 + os=-uxpv8.1669 + ;;8.1670 + *-rom68k)8.1671 + os=-coff8.1672 + ;;8.1673 + *-*bug)8.1674 + os=-coff8.1675 + ;;8.1676 + *-apple)8.1677 + os=-macos8.1678 + ;;8.1679 + *-atari*)8.1680 + os=-mint8.1681 + ;;8.1682 + *)8.1683 + os=-none8.1684 + ;;8.1685 +esac8.1686 +fi8.1687 +8.1688 +# Here we handle the case where we know the os, and the CPU type, but not the8.1689 +# manufacturer. We pick the logical manufacturer.8.1690 +vendor=unknown8.1691 +case $basic_machine in8.1692 + *-unknown)8.1693 + case $os in8.1694 + -riscix*)8.1695 + vendor=acorn8.1696 + ;;8.1697 + -sunos*)8.1698 + vendor=sun8.1699 + ;;8.1700 + -cnk*|-aix*)8.1701 + vendor=ibm8.1702 + ;;8.1703 + -beos*)8.1704 + vendor=be8.1705 + ;;8.1706 + -hpux*)8.1707 + vendor=hp8.1708 + ;;8.1709 + -mpeix*)8.1710 + vendor=hp8.1711 + ;;8.1712 + -hiux*)8.1713 + vendor=hitachi8.1714 + ;;8.1715 + -unos*)8.1716 + vendor=crds8.1717 + ;;8.1718 + -dgux*)8.1719 + vendor=dg8.1720 + ;;8.1721 + -luna*)8.1722 + vendor=omron8.1723 + ;;8.1724 + -genix*)8.1725 + vendor=ns8.1726 + ;;8.1727 + -mvs* | -opened*)8.1728 + vendor=ibm8.1729 + ;;8.1730 + -os400*)8.1731 + vendor=ibm8.1732 + ;;8.1733 + -ptx*)8.1734 + vendor=sequent8.1735 + ;;8.1736 + -tpf*)8.1737 + vendor=ibm8.1738 + ;;8.1739 + -vxsim* | -vxworks* | -windiss*)8.1740 + vendor=wrs8.1741 + ;;8.1742 + -aux*)8.1743 + vendor=apple8.1744 + ;;8.1745 + -hms*)8.1746 + vendor=hitachi8.1747 + ;;8.1748 + -mpw* | -macos*)8.1749 + vendor=apple8.1750 + ;;8.1751 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)8.1752 + vendor=atari8.1753 + ;;8.1754 + -vos*)8.1755 + vendor=stratus8.1756 + ;;8.1757 + esac8.1758 + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`8.1759 + ;;8.1760 +esac8.1761 +8.1762 +echo $basic_machine$os8.1763 +exit8.1764 +8.1765 +# Local variables:8.1766 +# eval: (add-hook 'write-file-hooks 'time-stamp)8.1767 +# time-stamp-start: "timestamp='"8.1768 +# time-stamp-format: "%:y-%02m-%02d"8.1769 +# time-stamp-end: "'"8.1770 +# End:
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00009.2 +++ b/android/deps/gettext-0.18.1.1.diff Sat Feb 25 21:30:49 2012 +10009.3 @@ -0,0 +1,102 @@9.4 +diff -ur gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h9.5 +--- gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h 2010-04-25 19:20:42.000000000 +10009.6 ++++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h 2012-02-16 09:06:32.000000000 +10009.7 +@@ -33,6 +33,13 @@9.8 + <inttypes.h>. */9.9 + #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H9.10 +9.11 ++/* On Android (Bionic libc), <sys/types.h> includes this file before9.12 ++ having defined 'time_t'. Therefore in this case avoid including9.13 ++ other system header files; just include the system's <stdint.h>. */9.14 ++#if defined __ANDROID__9.15 ++# @INCLUDE_NEXT@ @NEXT_STDINT_H@9.16 ++#else9.17 ++9.18 + /* Get those types that are already defined in other system include9.19 + files, so that we can "#define int8_t signed char" below without9.20 + worrying about a later system include file containing a "typedef9.21 +@@ -566,3 +573,4 @@9.22 +9.23 + #endif /* _GL_STDINT_H */9.24 + #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */9.25 ++#endif /* !(defined __ANDROID__) */9.26 +diff -ur gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h9.27 +--- gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h 2010-05-24 19:42:46.000000000 +10009.28 ++++ gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h 2012-02-16 09:06:53.000000000 +10009.29 +@@ -33,6 +33,13 @@9.30 + <inttypes.h>. */9.31 + #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H9.32 +9.33 ++/* On Android (Bionic libc), <sys/types.h> includes this file before9.34 ++ having defined 'time_t'. Therefore in this case avoid including9.35 ++ other system header files; just include the system's <stdint.h>. */9.36 ++#if defined __ANDROID__9.37 ++# @INCLUDE_NEXT@ @NEXT_STDINT_H@9.38 ++#else9.39 ++9.40 + /* Get those types that are already defined in other system include9.41 + files, so that we can "#define int8_t signed char" below without9.42 + worrying about a later system include file containing a "typedef9.43 +@@ -566,3 +573,4 @@9.44 +9.45 + #endif /* _GL_STDINT_H */9.46 + #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */9.47 ++#endif /* !(defined __ANDROID__) */9.48 +diff -ur gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h9.49 +--- gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h 2010-04-25 19:22:40.000000000 +10009.50 ++++ gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h 2012-02-16 09:07:10.000000000 +10009.51 +@@ -33,6 +33,13 @@9.52 + <inttypes.h>. */9.53 + #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H9.54 +9.55 ++/* On Android (Bionic libc), <sys/types.h> includes this file before9.56 ++ having defined 'time_t'. Therefore in this case avoid including9.57 ++ other system header files; just include the system's <stdint.h>. */9.58 ++#if defined __ANDROID__9.59 ++# @INCLUDE_NEXT@ @NEXT_STDINT_H@9.60 ++#else9.61 ++9.62 + /* Get those types that are already defined in other system include9.63 + files, so that we can "#define int8_t signed char" below without9.64 + worrying about a later system include file containing a "typedef9.65 +@@ -566,3 +573,4 @@9.66 +9.67 + #endif /* _GL_STDINT_H */9.68 + #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */9.69 ++#endif /* !(defined __ANDROID__) */9.70 +diff -ur gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c9.71 +--- gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c 2010-05-25 00:49:26.000000000 +10009.72 ++++ gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c 2012-02-16 17:42:53.000000000 +10009.73 +@@ -142,9 +142,17 @@9.74 + # endif9.75 + /* nl_langinfo items of the LC_NUMERIC category */9.76 + case RADIXCHAR:9.77 ++#ifdef __ANDROID__9.78 ++ return ".";9.79 ++#else9.80 + return localeconv () ->decimal_point;9.81 ++#endif9.82 + case THOUSEP:9.83 ++#ifdef __ANDROID__9.84 ++ return ",";9.85 ++#else9.86 + return localeconv () ->thousands_sep;9.87 ++#endif9.88 + /* nl_langinfo items of the LC_TIME category.9.89 + TODO: Really use the locale. */9.90 + case D_T_FMT:9.91 +diff -ur gettext-0.18.1.1/gettext-tools/src/msginit.c gettext-0.18.1.1/gettext-tools/src/msginit.c9.92 +--- gettext-0.18.1.1/gettext-tools/src/msginit.c 2010-06-06 22:49:58.000000000 +10009.93 ++++ gettext-0.18.1.1/gettext-tools/src/msginit.c 2012-02-16 17:44:33.000000000 +10009.94 +@@ -1081,7 +1081,11 @@9.95 + char *result;9.96 +9.97 + /* Return the pw_gecos field, upto the first comma (if any). */9.98 ++#ifdef __ANDROID__9.99 ++ fullname = pwd->pw_name;9.100 ++#else9.101 + fullname = pwd->pw_gecos;9.102 ++#endif9.103 + fullname_end = strchr (fullname, ',');9.104 + if (fullname_end == NULL)9.105 + fullname_end = fullname + strlen (fullname);
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000010.2 +++ b/android/deps/glib-2.26.0.cache Sat Feb 25 21:30:49 2012 +100010.3 @@ -0,0 +1,2 @@10.4 +glib_cv_stack_grows=no10.5 +glib_cv_uscore=no
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000011.2 +++ b/android/deps/glib-2.26.0.diff Sat Feb 25 21:30:49 2012 +100011.3 @@ -0,0 +1,57 @@11.4 +diff -ur glib-2.26.0/glib/gstrfuncs.c glib-2.26.0/glib/gstrfuncs.c11.5 +--- glib-2.26.0/glib/gstrfuncs.c 2010-09-14 01:57:51.000000000 +100011.6 ++++ glib-2.26.0/glib/gstrfuncs.c 2012-02-16 17:36:27.000000000 +100011.7 +@@ -442,8 +442,12 @@11.8 +11.9 + fail_pos = NULL;11.10 +11.11 ++#ifdef __ANDROID__11.12 ++ decimal_point = ".";11.13 ++#else11.14 + locale_data = localeconv ();11.15 + decimal_point = locale_data->decimal_point;11.16 ++#endif11.17 + decimal_point_len = strlen (decimal_point);11.18 +11.19 + g_assert (decimal_point_len != 0);11.20 +@@ -656,8 +660,12 @@11.21 +11.22 + _g_snprintf (buffer, buf_len, format, d);11.23 +11.24 ++#ifdef __ANDROID__11.25 ++ decimal_point = ".";11.26 ++#else11.27 + locale_data = localeconv ();11.28 + decimal_point = locale_data->decimal_point;11.29 ++#endif11.30 + decimal_point_len = strlen (decimal_point);11.31 +11.32 + g_assert (decimal_point_len != 0);11.33 +diff -ur glib-2.26.0/glib/gutils.c glib-2.26.0/glib/gutils.c11.34 +--- glib-2.26.0/glib/gutils.c 2010-09-14 01:57:51.000000000 +100011.35 ++++ glib-2.26.0/glib/gutils.c 2012-02-16 17:35:33.000000000 +100011.36 +@@ -1694,14 +1694,12 @@11.37 +11.38 + if (!pw)11.39 + {11.40 +- setpwent ();11.41 + pw = getpwuid (getuid ());11.42 +- endpwent ();11.43 + }11.44 + if (pw)11.45 + {11.46 + g_user_name = g_strdup (pw->pw_name);11.47 +-11.48 ++#ifndef __ANDROID__11.49 + if (pw->pw_gecos && *pw->pw_gecos != '\0')11.50 + {11.51 + gchar **gecos_fields;11.52 +@@ -1715,7 +1713,7 @@11.53 + g_strfreev (gecos_fields);11.54 + g_strfreev (name_parts);11.55 + }11.56 +-11.57 ++#endif11.58 + if (!g_home_dir)11.59 + g_home_dir = g_strdup (pw->pw_dir);11.60 + }
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000012.2 +++ b/android/deps/libiconv-1.13.1.diff Sat Feb 25 21:30:49 2012 +100012.3 @@ -0,0 +1,23 @@12.4 +diff -ur libiconv-1.13.1/srclib/stdint.in.h /Users/nkeynes/src/libiconv-1.13.1/srclib/stdint.in.h12.5 +--- libiconv-1.13.1-orig/srclib/stdint.in.h 2009-06-21 21:31:08.000000000 +100012.6 ++++ libiconv-1.13.1/srclib/stdint.in.h 2012-02-16 09:57:24.000000000 +100012.7 +@@ -29,6 +29,13 @@12.8 + <inttypes.h>. */12.9 + #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H12.10 +12.11 ++/* On Android (Bionic libc), <sys/types.h> includes this file before12.12 ++ having defined 'time_t'. Therefore in this case avoid including12.13 ++ other system header files; just include the system's <stdint.h>. */12.14 ++#if defined __ANDROID__12.15 ++# @INCLUDE_NEXT@ @NEXT_STDINT_H@12.16 ++#else12.17 ++12.18 + /* Get those types that are already defined in other system include12.19 + files, so that we can "#define int8_t signed char" below without12.20 + worrying about a later system include file containing a "typedef12.21 +@@ -565,3 +572,4 @@12.22 +12.23 + #endif /* _GL_STDINT_H */12.24 + #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */12.25 ++#endif /* !__ANDROID__ */12.26 +\ No newline at end of file
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000013.2 +++ b/android/deps/libisofs-0.6.38.diff Sat Feb 25 21:30:49 2012 +100013.3 @@ -0,0 +1,78 @@13.4 +diff -ur libisofs-0.6.38/demo/demo.c libisofs-0.6.38/demo/demo.c13.5 +--- libisofs-0.6.38/demo/demo.c 2010-08-31 19:24:04.000000000 +100013.6 ++++ libisofs-0.6.38/demo/demo.c 2012-02-16 18:07:47.000000000 +100013.7 +@@ -311,7 +311,7 @@13.8 +13.9 + fp = fopen(argv[optind+1], "w");13.10 + if (fp == NULL) {13.11 +- err(1, "error opening output file");13.12 ++ fprintf(stderr, "error opening output file");13.13 + goto ex;13.14 + }13.15 +13.16 +@@ -639,7 +639,7 @@13.17 +13.18 + fp = fopen(argv[3], "w");13.19 + if (fp == NULL) {13.20 +- err(1, "error opening output file");13.21 ++ fprintf(stderr, "error opening output file");13.22 + goto ex;13.23 + }13.24 +13.25 +@@ -749,7 +749,7 @@13.26 +13.27 + fp = fopen(argv[5], "w");13.28 + if (!fp) {13.29 +- err(1, "error opening output file");13.30 ++ fprintf(stderr, "error opening output file");13.31 + goto ex;13.32 + }13.33 +13.34 +diff -ur libisofs-0.6.38/libisofs/ecma119.c libisofs-0.6.38/libisofs/ecma119.c13.35 +--- libisofs-0.6.38/libisofs/ecma119.c 2010-10-19 20:41:15.000000000 +100013.36 ++++ libisofs-0.6.38/libisofs/ecma119.c 2012-02-16 17:57:46.000000000 +100013.37 +@@ -38,7 +38,7 @@13.38 + #include <time.h>13.39 + #include <string.h>13.40 + #include <locale.h>13.41 +-#include <langinfo.h>13.42 ++//#include <langinfo.h>13.43 + #include <stdio.h>13.44 +13.45 + #ifdef Xorriso_standalonE13.46 +diff -ur libisofs-0.6.38/libisofs/fs_image.c libisofs-0.6.38/libisofs/fs_image.c13.47 +--- libisofs-0.6.38/libisofs/fs_image.c 2010-08-31 20:05:09.000000000 +100013.48 ++++ libisofs-0.6.38/libisofs/fs_image.c 2012-02-16 17:53:29.000000000 +100013.49 +@@ -30,7 +30,7 @@13.50 + #include <stdlib.h>13.51 + #include <string.h>13.52 + #include <locale.h>13.53 +-#include <langinfo.h>13.54 ++//#include <langinfo.h>13.55 + #include <limits.h>13.56 + #include <stdio.h>13.57 +13.58 +diff -ur libisofs-0.6.38/libisofs/util.c libisofs-0.6.38/libisofs/util.c13.59 +--- libisofs-0.6.38/libisofs/util.c 2010-05-29 06:33:28.000000000 +100013.60 ++++ libisofs-0.6.38/libisofs/util.c 2012-02-16 17:57:28.000000000 +100013.61 +@@ -27,7 +27,7 @@13.62 + #include <limits.h>13.63 + #include <iconv.h>13.64 + #include <locale.h>13.65 +-#include <langinfo.h>13.66 ++//#include <langinfo.h>13.67 +13.68 + #include <unistd.h>13.69 +13.70 +@@ -185,7 +185,11 @@13.71 + {13.72 + if(libisofs_local_charset[0])13.73 + return libisofs_local_charset;13.74 ++#ifdef __ANDROID__13.75 ++ return "UTF-8";13.76 ++#else13.77 + return nl_langinfo(CODESET);13.78 ++#endif13.79 + }13.80 +13.81 + int strconv(const char *str, const char *icharset, const char *ocharset,
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000014.2 +++ b/android/gen/org/lxdream/R.java Sat Feb 25 21:30:49 2012 +100014.3 @@ -0,0 +1,16 @@14.4 +/* AUTO-GENERATED FILE. DO NOT MODIFY.14.5 + *14.6 + * This class was automatically generated by the14.7 + * aapt tool from the resource data it found. It14.8 + * should not be modified by hand.14.9 + */14.10 +14.11 +package org.lxdream;14.12 +14.13 +public final class R {14.14 + public static final class attr {14.15 + }14.16 + public static final class string {14.17 + public static final int lxdream_activity=0x7f020000;14.18 + }14.19 +}
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000015.2 +++ b/android/res/values/strings.xml Sat Feb 25 21:30:49 2012 +100015.3 @@ -0,0 +1,4 @@15.4 +<?xml version="1.0" encoding="utf-8"?>15.5 +<resources>15.6 + <string name="lxdream_activity">Lxdream</string>15.7 +</resources>
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000016.2 +++ b/android/src/org/lxdream/ConfigChooser.java Sat Feb 25 21:30:49 2012 +100016.3 @@ -0,0 +1,234 @@16.4 +/**16.5 + * $Id$16.6 + *16.7 + * GL config chooser. Derived from android ndk gl2jni sample code.16.8 + *16.9 + * Copyright (c) 2011 Nathan Keynes.16.10 + *16.11 + * This program is free software; you can redistribute it and/or modify16.12 + * it under the terms of the GNU General Public License as published by16.13 + * the Free Software Foundation; either version 2 of the License, or16.14 + * (at your option) any later version.16.15 + *16.16 + * This program is distributed in the hope that it will be useful,16.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of16.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16.19 + * GNU General Public License for more details.16.20 + */16.21 +16.22 +package org.lxdream;16.23 +16.24 +import android.opengl.GLSurfaceView;16.25 +import android.util.Log;16.26 +16.27 +import javax.microedition.khronos.egl.EGL10;16.28 +import javax.microedition.khronos.egl.EGLConfig;16.29 +import javax.microedition.khronos.egl.EGLContext;16.30 +import javax.microedition.khronos.egl.EGLDisplay;16.31 +16.32 +/*16.33 + * Copyright (C) 2008,2009 The Android Open Source Project16.34 + *16.35 + * Licensed under the Apache License, Version 2.0 (the "License");16.36 + * you may not use this file except in compliance with the License.16.37 + * You may obtain a copy of the License at16.38 + *16.39 + * http://www.apache.org/licenses/LICENSE-2.016.40 + *16.41 + * Unless required by applicable law or agreed to in writing, software16.42 + * distributed under the License is distributed on an "AS IS" BASIS,16.43 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.16.44 + * See the License for the specific language governing permissions and16.45 + * limitations under the License.16.46 + */16.47 +16.48 +class ConfigChooser implements GLSurfaceView.EGLConfigChooser {16.49 + private final static String TAG = "ConfigChooser";16.50 +16.51 + public ConfigChooser(int r, int g, int b, int a, int depth, int stencil) {16.52 + mRedSize = r;16.53 + mGreenSize = g;16.54 + mBlueSize = b;16.55 + mAlphaSize = a;16.56 + mDepthSize = depth;16.57 + mStencilSize = stencil;16.58 + }16.59 +16.60 + /* This EGL config specification is used to specify 2.0 rendering.16.61 + * We use a minimum size of 4 bits for red/green/blue, but will16.62 + * perform actual matching in chooseConfig() below.16.63 + */16.64 + private static int EGL_OPENGL_ES2_BIT = 4;16.65 + private static int[] s_configAttribs2 =16.66 + {16.67 + EGL10.EGL_RED_SIZE, 4,16.68 + EGL10.EGL_GREEN_SIZE, 4,16.69 + EGL10.EGL_BLUE_SIZE, 4,16.70 + EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,16.71 + EGL10.EGL_NONE16.72 + };16.73 +16.74 + public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {16.75 +16.76 + /* Get the number of minimally matching EGL configurations16.77 + */16.78 + int[] num_config = new int[1];16.79 + egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);16.80 +16.81 + int numConfigs = num_config[0];16.82 +16.83 + if (numConfigs <= 0) {16.84 + throw new IllegalArgumentException("No configs match configSpec");16.85 + }16.86 +16.87 + /* Allocate then read the array of minimally matching EGL configs16.88 + */16.89 + EGLConfig[] configs = new EGLConfig[numConfigs];16.90 + egl.eglChooseConfig(display, s_configAttribs2, configs, numConfigs, num_config);16.91 +16.92 + /* Now return the "best" one16.93 + */16.94 + return chooseConfig(egl, display, configs);16.95 + }16.96 +16.97 + public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,16.98 + EGLConfig[] configs) {16.99 + for(EGLConfig config : configs) {16.100 + int d = findConfigAttrib(egl, display, config,16.101 + EGL10.EGL_DEPTH_SIZE, 0);16.102 + int s = findConfigAttrib(egl, display, config,16.103 + EGL10.EGL_STENCIL_SIZE, 0);16.104 +16.105 + // We need at least mDepthSize and mStencilSize bits16.106 + if (d < mDepthSize || s < mStencilSize)16.107 + continue;16.108 +16.109 + // We want an *exact* match for red/green/blue/alpha16.110 + int r = findConfigAttrib(egl, display, config,16.111 + EGL10.EGL_RED_SIZE, 0);16.112 + int g = findConfigAttrib(egl, display, config,16.113 + EGL10.EGL_GREEN_SIZE, 0);16.114 + int b = findConfigAttrib(egl, display, config,16.115 + EGL10.EGL_BLUE_SIZE, 0);16.116 + int a = findConfigAttrib(egl, display, config,16.117 + EGL10.EGL_ALPHA_SIZE, 0);16.118 +16.119 + if (r == mRedSize && g == mGreenSize && b == mBlueSize && a == mAlphaSize)16.120 + return config;16.121 + }16.122 + return null;16.123 + }16.124 +16.125 + private int findConfigAttrib(EGL10 egl, EGLDisplay display,16.126 + EGLConfig config, int attribute, int defaultValue) {16.127 +16.128 + if (egl.eglGetConfigAttrib(display, config, attribute, mValue)) {16.129 + return mValue[0];16.130 + }16.131 + return defaultValue;16.132 + }16.133 +16.134 + public void printConfigs(EGL10 egl, EGLDisplay display,16.135 + EGLConfig[] configs) {16.136 + int numConfigs = configs.length;16.137 + Log.w(TAG, String.format("%d configurations", numConfigs));16.138 + for (int i = 0; i < numConfigs; i++) {16.139 + Log.w(TAG, String.format("Configuration %d:\n", i));16.140 + printConfig(egl, display, configs[i]);16.141 + }16.142 + }16.143 +16.144 + public void printConfig(EGL10 egl, EGLDisplay display,16.145 + EGLConfig config) {16.146 + int[] attributes = {16.147 + EGL10.EGL_BUFFER_SIZE,16.148 + EGL10.EGL_ALPHA_SIZE,16.149 + EGL10.EGL_BLUE_SIZE,16.150 + EGL10.EGL_GREEN_SIZE,16.151 + EGL10.EGL_RED_SIZE,16.152 + EGL10.EGL_DEPTH_SIZE,16.153 + EGL10.EGL_STENCIL_SIZE,16.154 + EGL10.EGL_CONFIG_CAVEAT,16.155 + EGL10.EGL_CONFIG_ID,16.156 + EGL10.EGL_LEVEL,16.157 + EGL10.EGL_MAX_PBUFFER_HEIGHT,16.158 + EGL10.EGL_MAX_PBUFFER_PIXELS,16.159 + EGL10.EGL_MAX_PBUFFER_WIDTH,16.160 + EGL10.EGL_NATIVE_RENDERABLE,16.161 + EGL10.EGL_NATIVE_VISUAL_ID,16.162 + EGL10.EGL_NATIVE_VISUAL_TYPE,16.163 + 0x3030, // EGL10.EGL_PRESERVED_RESOURCES,16.164 + EGL10.EGL_SAMPLES,16.165 + EGL10.EGL_SAMPLE_BUFFERS,16.166 + EGL10.EGL_SURFACE_TYPE,16.167 + EGL10.EGL_TRANSPARENT_TYPE,16.168 + EGL10.EGL_TRANSPARENT_RED_VALUE,16.169 + EGL10.EGL_TRANSPARENT_GREEN_VALUE,16.170 + EGL10.EGL_TRANSPARENT_BLUE_VALUE,16.171 + 0x3039, // EGL10.EGL_BIND_TO_TEXTURE_RGB,16.172 + 0x303A, // EGL10.EGL_BIND_TO_TEXTURE_RGBA,16.173 + 0x303B, // EGL10.EGL_MIN_SWAP_INTERVAL,16.174 + 0x303C, // EGL10.EGL_MAX_SWAP_INTERVAL,16.175 + EGL10.EGL_LUMINANCE_SIZE,16.176 + EGL10.EGL_ALPHA_MASK_SIZE,16.177 + EGL10.EGL_COLOR_BUFFER_TYPE,16.178 + EGL10.EGL_RENDERABLE_TYPE,16.179 + 0x3042 // EGL10.EGL_CONFORMANT16.180 + };16.181 + String[] names = {16.182 + "EGL_BUFFER_SIZE",16.183 + "EGL_ALPHA_SIZE",16.184 + "EGL_BLUE_SIZE",16.185 + "EGL_GREEN_SIZE",16.186 + "EGL_RED_SIZE",16.187 + "EGL_DEPTH_SIZE",16.188 + "EGL_STENCIL_SIZE",16.189 + "EGL_CONFIG_CAVEAT",16.190 + "EGL_CONFIG_ID",16.191 + "EGL_LEVEL",16.192 + "EGL_MAX_PBUFFER_HEIGHT",16.193 + "EGL_MAX_PBUFFER_PIXELS",16.194 + "EGL_MAX_PBUFFER_WIDTH",16.195 + "EGL_NATIVE_RENDERABLE",16.196 + "EGL_NATIVE_VISUAL_ID",16.197 + "EGL_NATIVE_VISUAL_TYPE",16.198 + "EGL_PRESERVED_RESOURCES",16.199 + "EGL_SAMPLES",16.200 + "EGL_SAMPLE_BUFFERS",16.201 + "EGL_SURFACE_TYPE",16.202 + "EGL_TRANSPARENT_TYPE",16.203 + "EGL_TRANSPARENT_RED_VALUE",16.204 + "EGL_TRANSPARENT_GREEN_VALUE",16.205 + "EGL_TRANSPARENT_BLUE_VALUE",16.206 + "EGL_BIND_TO_TEXTURE_RGB",16.207 + "EGL_BIND_TO_TEXTURE_RGBA",16.208 + "EGL_MIN_SWAP_INTERVAL",16.209 + "EGL_MAX_SWAP_INTERVAL",16.210 + "EGL_LUMINANCE_SIZE",16.211 + "EGL_ALPHA_MASK_SIZE",16.212 + "EGL_COLOR_BUFFER_TYPE",16.213 + "EGL_RENDERABLE_TYPE",16.214 + "EGL_CONFORMANT"16.215 + };16.216 + int[] value = new int[1];16.217 + for (int i = 0; i < attributes.length; i++) {16.218 + int attribute = attributes[i];16.219 + String name = names[i];16.220 + if ( egl.eglGetConfigAttrib(display, config, attribute, value)) {16.221 + Log.w(TAG, String.format(" %s: %d\n", name, value[0]));16.222 + } else {16.223 + // Log.w(TAG, String.format(" %s: failed\n", name));16.224 + while (egl.eglGetError() != EGL10.EGL_SUCCESS);16.225 + }16.226 + }16.227 + }16.228 +16.229 + // Subclasses can adjust these values:16.230 + protected int mRedSize;16.231 + protected int mGreenSize;16.232 + protected int mBlueSize;16.233 + protected int mAlphaSize;16.234 + protected int mDepthSize;16.235 + protected int mStencilSize;16.236 + private int[] mValue = new int[1];16.237 +}
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000017.2 +++ b/android/src/org/lxdream/Dreamcast.java Sat Feb 25 21:30:49 2012 +100017.3 @@ -0,0 +1,49 @@17.4 +/**17.5 + * $Id$17.6 + *17.7 + * Main Lxdream activity17.8 + *17.9 + * Copyright (c) 2011 Nathan Keynes.17.10 + *17.11 + * This program is free software; you can redistribute it and/or modify17.12 + * it under the terms of the GNU General Public License as published by17.13 + * the Free Software Foundation; either version 2 of the License, or17.14 + * (at your option) any later version.17.15 + *17.16 + * This program is distributed in the hope that it will be useful,17.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of17.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17.19 + * GNU General Public License for more details.17.20 + */17.21 +17.22 +package org.lxdream;17.23 +17.24 +public class Dreamcast {17.25 +17.26 + static {17.27 + System.loadLibrary("lxdream");17.28 + }17.29 +17.30 + /* Core emulation */17.31 + public static native void init();17.32 + public static native void setViewSize(int width, int height);17.33 + public static native void run();17.34 + public static native void stop();17.35 + /*17.36 + public static native void start();17.37 + public static native void run_slice();17.38 + public static boolean canRun();17.39 +*/17.40 + /* Save state management */17.41 +/* public static native boolean saveState( String filename );17.42 + public static native boolean loadState( String filename );17.43 + public static native boolean quickSave();17.44 + public static native boolean quickLoad();17.45 + public static native void setQuickState(int state);17.46 + */17.47 + /* GD-Rom */17.48 +/* public static native boolean mount_disc( String filename );17.49 + public static native void unmount_disc();17.50 + */17.51 + /* ... */17.52 +}
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000018.2 +++ b/android/src/org/lxdream/LxdreamActivity.java Sat Feb 25 21:30:49 2012 +100018.3 @@ -0,0 +1,50 @@18.4 +/**18.5 + * $Id$18.6 + *18.7 + * Main Lxdream activity18.8 + *18.9 + * Copyright (c) 2011 Nathan Keynes.18.10 + *18.11 + * This program is free software; you can redistribute it and/or modify18.12 + * it under the terms of the GNU General Public License as published by18.13 + * the Free Software Foundation; either version 2 of the License, or18.14 + * (at your option) any later version.18.15 + *18.16 + * This program is distributed in the hope that it will be useful,18.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of18.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18.19 + * GNU General Public License for more details.18.20 + */18.21 +18.22 +package org.lxdream;18.23 +18.24 +import android.app.Activity;18.25 +import android.os.Bundle;18.26 +import android.util.Log;18.27 +import android.view.WindowManager;18.28 +18.29 +import java.io.File;18.30 +18.31 +18.32 +public class LxdreamActivity extends Activity {18.33 + LxdreamView view;18.34 +18.35 + @Override18.36 + protected void onCreate(Bundle bundle) {18.37 + super.onCreate(bundle);18.38 + view = new LxdreamView(getApplication());18.39 + setContentView(view);18.40 + }18.41 +18.42 + @Override18.43 + protected void onPause() {18.44 + super.onPause();18.45 + view.onPause();18.46 + }18.47 +18.48 + @Override18.49 + protected void onResume() {18.50 + super.onResume();18.51 + view.onResume();18.52 + }18.53 +}
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000019.2 +++ b/android/src/org/lxdream/LxdreamView.java Sat Feb 25 21:30:49 2012 +100019.3 @@ -0,0 +1,150 @@19.4 +/**19.5 + * $Id$19.6 + *19.7 + * Lxdream GL view. Derived from android19.8 + *19.9 + * Copyright (c) 2011 Nathan Keynes.19.10 + *19.11 + * This program is free software; you can redistribute it and/or modify19.12 + * it under the terms of the GNU General Public License as published by19.13 + * the Free Software Foundation; either version 2 of the License, or19.14 + * (at your option) any later version.19.15 + *19.16 + * This program is distributed in the hope that it will be useful,19.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of19.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19.19 + * GNU General Public License for more details.19.20 + */19.21 +19.22 +package org.lxdream;19.23 +/*19.24 + * Copyright (C) 2008,2009 The Android Open Source Project19.25 + *19.26 + * Licensed under the Apache License, Version 2.0 (the "License");19.27 + * you may not use this file except in compliance with the License.19.28 + * You may obtain a copy of the License at19.29 + *19.30 + * http://www.apache.org/licenses/LICENSE-2.019.31 + *19.32 + * Unless required by applicable law or agreed to in writing, software19.33 + * distributed under the License is distributed on an "AS IS" BASIS,19.34 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.19.35 + * See the License for the specific language governing permissions and19.36 + * limitations under the License.19.37 + */19.38 +19.39 +19.40 +import android.content.Context;19.41 +import android.graphics.PixelFormat;19.42 +import android.opengl.GLSurfaceView;19.43 +import android.util.AttributeSet;19.44 +import android.util.Log;19.45 +import android.view.KeyEvent;19.46 +import android.view.MotionEvent;19.47 +19.48 +import javax.microedition.khronos.egl.EGL10;19.49 +import javax.microedition.khronos.egl.EGLConfig;19.50 +import javax.microedition.khronos.egl.EGLContext;19.51 +import javax.microedition.khronos.egl.EGLDisplay;19.52 +import javax.microedition.khronos.opengles.GL10;19.53 +19.54 +/**19.55 + * A simple GLSurfaceView sub-class that demonstrate how to perform19.56 + * OpenGL ES 2.0 rendering into a GL Surface. Note the following important19.57 + * details:19.58 + *19.59 + * - The class must use a custom context factory to enable 2.0 rendering.19.60 + * See ContextFactory class definition below.19.61 + *19.62 + * - The class must use a custom EGLConfigChooser to be able to select19.63 + * an EGLConfig that supports 2.0. This is done by providing a config19.64 + * specification to eglChooseConfig() that has the attribute19.65 + * EGL10.ELG_RENDERABLE_TYPE containing the EGL_OPENGL_ES2_BIT flag19.66 + * set. See ConfigChooser class definition below.19.67 + *19.68 + * - The class must select the surface's format, then choose an EGLConfig19.69 + * that matches it exactly (with regards to red/green/blue/alpha channels19.70 + * bit depths). Failure to do so would result in an EGL_BAD_MATCH error.19.71 + */19.72 +class LxdreamView extends GLSurfaceView {19.73 + private static String TAG = "LxdreamView";19.74 + private static final boolean DEBUG = false;19.75 +19.76 + public LxdreamView(Context context) {19.77 + super(context);19.78 + init(false, 0, 0);19.79 + }19.80 +19.81 + public LxdreamView(Context context, boolean translucent, int depth, int stencil) {19.82 + super(context);19.83 + init(translucent, depth, stencil);19.84 + }19.85 +19.86 + private void init(boolean translucent, int depth, int stencil) {19.87 +19.88 + /* By default, GLSurfaceView() creates a RGB_565 opaque surface.19.89 + * If we want a translucent one, we should change the surface's19.90 + * format here, using PixelFormat.TRANSLUCENT for GL Surfaces19.91 + * is interpreted as any 32-bit surface with alpha by SurfaceFlinger.19.92 + */19.93 + if (translucent) {19.94 + this.getHolder().setFormat(PixelFormat.TRANSLUCENT);19.95 + }19.96 +19.97 + /* Setup the context factory for 2.0 rendering.19.98 + * See ContextFactory class definition below19.99 + */19.100 + setEGLContextFactory(new ContextFactory());19.101 +19.102 + /* We need to choose an EGLConfig that matches the format of19.103 + * our surface exactly. This is going to be done in our19.104 + * custom config chooser. See ConfigChooser class definition19.105 + * below.19.106 + */19.107 + setEGLConfigChooser( translucent ?19.108 + new ConfigChooser(8, 8, 8, 8, depth, stencil) :19.109 + new ConfigChooser(5, 6, 5, 0, depth, stencil) );19.110 +19.111 + /* Set the renderer responsible for frame rendering */19.112 + setRenderer(new Renderer());19.113 + }19.114 +19.115 + private static class ContextFactory implements GLSurfaceView.EGLContextFactory {19.116 + private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;19.117 + public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {19.118 + Log.w(TAG, "creating OpenGL ES 2.0 context");19.119 + checkEglError("Before eglCreateContext", egl);19.120 + int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };19.121 + EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);19.122 + checkEglError("After eglCreateContext", egl);19.123 + return context;19.124 + }19.125 +19.126 + public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {19.127 + egl.eglDestroyContext(display, context);19.128 + }19.129 + }19.130 +19.131 + private static void checkEglError(String prompt, EGL10 egl) {19.132 + int error;19.133 + while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {19.134 + Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));19.135 + }19.136 + }19.137 +19.138 +19.139 + private static class Renderer implements GLSurfaceView.Renderer {19.140 + public void onDrawFrame(GL10 gl) {19.141 + Dreamcast.run();19.142 + }19.143 +19.144 + public void onSurfaceChanged(GL10 gl, int width, int height) {19.145 + Dreamcast.init();19.146 + Dreamcast.setViewSize(width,height);19.147 + }19.148 +19.149 + public void onSurfaceCreated(GL10 gl, EGLConfig config) {19.150 + // Do nothing.19.151 + }19.152 + }19.153 +}
20.1 --- a/config.h.in Sat Feb 25 21:27:06 2012 +100020.2 +++ b/config.h.in Sat Feb 25 21:30:49 2012 +100020.3 @@ -67,6 +67,9 @@20.4 /* Define if the GNU gettext() function is already present or preinstalled. */20.5 #undef HAVE_GETTEXT20.7 +/* Using GLESv2 */20.8 +#undef HAVE_GLES220.9 +20.10 /* Have GLX support */20.11 #undef HAVE_GLX
21.1 --- a/configure Sat Feb 25 21:27:06 2012 +100021.2 +++ b/configure Sat Feb 25 21:30:49 2012 +100021.3 @@ -682,6 +682,13 @@21.4 host_cpu21.5 host_vendor21.6 host_os21.7 +ANT21.8 +ANDROID_SDK_HOME21.9 +ANDROID_NDK_HOME21.10 +ANDROID_SDK_VERSION21.11 +ANDROID_GDBSERVER21.12 +GUI_ANDROID_TRUE21.13 +GUI_ANDROID_FALSE21.14 CC21.15 CFLAGS21.16 LDFLAGS21.17 @@ -1455,6 +1462,9 @@21.18 Optional Packages:21.19 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]21.20 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)21.21 + --with-android=SDK Specify the location of the Android SDK21.22 + --with-android-ndk=NDK Specify the location of the Android NDK21.23 + --with-android-version Specify target Android SDK version21.24 --with-osmesa Build with the osmesa GL library (software21.25 rendering)21.26 --with-gtk Build with the GTK UI. Default on X11 systems21.27 @@ -2508,6 +2518,236 @@21.31 +# LX_ANDROID_BUILD21.32 +# Defines --with-android, --with-android-ndk, and --with-android-version21.33 +# If specified, checks for a working install, and sets build parameters21.34 +# appropriately for an Android host.21.35 +21.36 +21.37 +21.38 +21.39 +21.40 +# Check whether --with-android was given.21.41 +if test "${with_android+set}" = set; then21.42 + withval=$with_android;21.43 +fi21.44 +21.45 +21.46 +# Check whether --with-android-ndk was given.21.47 +if test "${with_android_ndk+set}" = set; then21.48 + withval=$with_android_ndk;21.49 +fi21.50 +21.51 +21.52 +# Check whether --with-android-version was given.21.53 +if test "${with_android_version+set}" = set; then21.54 + withval=$with_android_version;21.55 +else21.56 + with_android_version="android-8"21.57 +fi21.58 +21.59 +21.60 + if test "x$with_android" != "x"; then21.61 + if test "$with_android" = "yes"; then21.62 + { { echo "$as_me:$LINENO: error: --with-android option must be given with the path to the Android SDK " >&521.63 +echo "$as_me: error: --with-android option must be given with the path to the Android SDK " >&2;}21.64 + { (exit 1); exit 1; }; }21.65 + fi21.66 + if test "x$with_android_ndk" = "x" -o "x$with_android_ndk" = "xyes"; then21.67 + { { echo "$as_me:$LINENO: error: --with-android-ndk=/path/to/ndk option must be used with --with-android " >&521.68 +echo "$as_me: error: --with-android-ndk=/path/to/ndk option must be used with --with-android " >&2;}21.69 + { (exit 1); exit 1; }; }21.70 + fi21.71 +21.72 + ANDROID_SDK_HOME="$with_android"21.73 + ANDROID_NDK_HOME="$with_android_ndk"21.74 + ANDROID_SDK_VERSION="$with_android_version"21.75 +21.76 + as_ac_File=`echo "ac_cv_file_$ANDROID_SDK_HOME/tools/ant/pre_setup.xml" | $as_tr_sh`21.77 +{ echo "$as_me:$LINENO: checking for $ANDROID_SDK_HOME/tools/ant/pre_setup.xml" >&521.78 +echo $ECHO_N "checking for $ANDROID_SDK_HOME/tools/ant/pre_setup.xml... $ECHO_C" >&6; }21.79 +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then21.80 + echo $ECHO_N "(cached) $ECHO_C" >&621.81 +else21.82 + test "$cross_compiling" = yes &&21.83 + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&521.84 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}21.85 + { (exit 1); exit 1; }; }21.86 +if test -r "$ANDROID_SDK_HOME/tools/ant/pre_setup.xml"; then21.87 + eval "$as_ac_File=yes"21.88 +else21.89 + eval "$as_ac_File=no"21.90 +fi21.91 +fi21.92 +ac_res=`eval echo '${'$as_ac_File'}'`21.93 + { echo "$as_me:$LINENO: result: $ac_res" >&521.94 +echo "${ECHO_T}$ac_res" >&6; }21.95 +if test `eval echo '${'$as_ac_File'}'` = yes; then21.96 + :21.97 +else21.98 + { { echo "$as_me:$LINENO: error: Android SDK not found in $ANDROID_SDK_HOME" >&521.99 +echo "$as_me: error: Android SDK not found in $ANDROID_SDK_HOME" >&2;}21.100 + { (exit 1); exit 1; }; }21.101 +fi21.102 +21.103 + as_ac_File=`echo "ac_cv_file_$ANDROID_SDK_HOME/platforms/$ANDROID_SDK_VERSION/sdk.properties" | $as_tr_sh`21.104 +{ echo "$as_me:$LINENO: checking for $ANDROID_SDK_HOME/platforms/$ANDROID_SDK_VERSION/sdk.properties" >&521.105 +echo $ECHO_N "checking for $ANDROID_SDK_HOME/platforms/$ANDROID_SDK_VERSION/sdk.properties... $ECHO_C" >&6; }21.106 +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then21.107 + echo $ECHO_N "(cached) $ECHO_C" >&621.108 +else21.109 + test "$cross_compiling" = yes &&21.110 + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&521.111 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}21.112 + { (exit 1); exit 1; }; }21.113 +if test -r "$ANDROID_SDK_HOME/platforms/$ANDROID_SDK_VERSION/sdk.properties"; then21.114 + eval "$as_ac_File=yes"21.115 +else21.116 + eval "$as_ac_File=no"21.117 +fi21.118 +fi21.119 +ac_res=`eval echo '${'$as_ac_File'}'`21.120 + { echo "$as_me:$LINENO: result: $ac_res" >&521.121 +echo "${ECHO_T}$ac_res" >&6; }21.122 +if test `eval echo '${'$as_ac_File'}'` = yes; then21.123 + :21.124 +else21.125 + { { echo "$as_me:$LINENO: error: Android platform version $ANDROID_SDK_VERSION not found in $ANDROID_SDK_HOME" >&521.126 +echo "$as_me: error: Android platform version $ANDROID_SDK_VERSION not found in $ANDROID_SDK_HOME" >&2;}21.127 + { (exit 1); exit 1; }; }21.128 +fi21.129 +21.130 + as_ac_File=`echo "ac_cv_file_$ANDROID_NDK_HOME/toolchains" | $as_tr_sh`21.131 +{ echo "$as_me:$LINENO: checking for $ANDROID_NDK_HOME/toolchains" >&521.132 +echo $ECHO_N "checking for $ANDROID_NDK_HOME/toolchains... $ECHO_C" >&6; }21.133 +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then21.134 + echo $ECHO_N "(cached) $ECHO_C" >&621.135 +else21.136 + test "$cross_compiling" = yes &&21.137 + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&521.138 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}21.139 + { (exit 1); exit 1; }; }21.140 +if test -r "$ANDROID_NDK_HOME/toolchains"; then21.141 + eval "$as_ac_File=yes"21.142 +else21.143 + eval "$as_ac_File=no"21.144 +fi21.145 +fi21.146 +ac_res=`eval echo '${'$as_ac_File'}'`21.147 + { echo "$as_me:$LINENO: result: $ac_res" >&521.148 +echo "${ECHO_T}$ac_res" >&6; }21.149 +if test `eval echo '${'$as_ac_File'}'` = yes; then21.150 + :21.151 +else21.152 + { { echo "$as_me:$LINENO: error: Android NDK not found in $ANDROID_NDK_HOME" >&521.153 +echo "$as_me: error: Android NDK not found in $ANDROID_NDK_HOME" >&2;}21.154 + { (exit 1); exit 1; }; }21.155 +fi21.156 +21.157 +21.158 + case $host_alias in21.159 + arm-* | "")21.160 + host_alias="arm-linux-androideabi"21.161 + host_cpu="arm"21.162 + host_vendor="unknown";21.163 + host_os="linux-androideabi"21.164 + ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/*/bin`21.165 + ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/gdbserver`21.166 + ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_SDK_VERSION/arch-arm"21.167 + TARGETFLAGS="-ffunction-sections -funwind-tables -fstack-protector -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wno-psabi -Wa,--noexecstack"21.168 + TARGETFLAGS="$TARGETFLAGS -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -Os"21.169 + ;;21.170 + i686-*)21.171 + host_alias="i686-android-linux"21.172 + host_cpu="i686"21.173 + host_vendor="android"21.174 + host_os="linux"21.175 + ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/*/bin`21.176 + ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/gdbserver`21.177 + ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_SDK_VERSION/arch-x86"21.178 + TARGETFLAGS=""21.179 + ;;21.180 + *)21.181 + { { echo "$as_me:$LINENO: error: Unsupported android host $host_alias" >&521.182 +echo "$as_me: error: Unsupported android host $host_alias" >&2;}21.183 + { (exit 1); exit 1; }; }21.184 + ;;21.185 + esac21.186 +21.187 + # Extract the first word of "ant ", so it can be a program name with args.21.188 +set dummy ant ; ac_word=$221.189 +{ echo "$as_me:$LINENO: checking for $ac_word" >&521.190 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }21.191 +if test "${ac_cv_path_ANT+set}" = set; then21.192 + echo $ECHO_N "(cached) $ECHO_C" >&621.193 +else21.194 + case $ANT in21.195 + [\\/]* | ?:[\\/]*)21.196 + ac_cv_path_ANT="$ANT" # Let the user override the test with a path.21.197 + ;;21.198 + *)21.199 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR21.200 +for as_dir in $PATH21.201 +do21.202 + IFS=$as_save_IFS21.203 + test -z "$as_dir" && as_dir=.21.204 + for ac_exec_ext in '' $ac_executable_extensions; do21.205 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then21.206 + ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"21.207 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&521.208 + break 221.209 + fi21.210 +done21.211 +done21.212 +IFS=$as_save_IFS21.213 +21.214 + ;;21.215 +esac21.216 +fi21.217 +ANT=$ac_cv_path_ANT21.218 +if test -n "$ANT"; then21.219 + { echo "$as_me:$LINENO: result: $ANT" >&521.220 +echo "${ECHO_T}$ANT" >&6; }21.221 +else21.222 + { echo "$as_me:$LINENO: result: no" >&521.223 +echo "${ECHO_T}no" >&6; }21.224 +fi21.225 +21.226 +21.227 +21.228 + CC="$ANDROID_NDK_BIN/${host_alias}-gcc"21.229 + CXX="$ANDROID_NDK_BIN/${host_alias}-g++"21.230 + CPP="$ANDROID_NDK_BIN/${host_alias}-cpp"21.231 + LD="$ANDROID_NDK_BIN/${host_alias}-ld"21.232 + AR="$ANDROID_NDK_BIN/${host_alias}-ar"21.233 + RANLIB="$ANDROID_NDK_BIN/${host_alias}-ranlib"21.234 + STRIP="$ANDROID_NDK_BIN/${host_alias}-strip"21.235 + OBJDUMP="$ANDROID_NDK_BIN/${host_alias}-objdump"21.236 + CPPFLAGS="-fPIC --sysroot=$ANDROID_SYSROOT -I$ANDROID_SYSROOT/usr/include $TARGETFLAGS $CPPFLAGS"21.237 + LDFLAGS="-nostdlib -Wl,--no-undefined -L${ANDROID_SYSROOT}/usr/lib -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib -Wl,-allow-shlib-undefined -Wl,-z,noexecstack $LDFLAGS"21.238 + LIBS="$LIBS -liconv -llog -lgcc -lc"21.239 +21.240 +21.241 +21.242 +21.243 +21.244 +21.245 + ANDROID_BUILD=yes21.246 + cross_compiling=yes21.247 + fi21.248 +21.249 +21.250 +21.251 +if test "$ANDROID_BUILD" = "yes"; then21.252 + GUI_ANDROID_TRUE=21.253 + GUI_ANDROID_FALSE='#'21.254 +else21.255 + GUI_ANDROID_TRUE='#'21.256 + GUI_ANDROID_FALSE=21.257 +fi21.258 +21.259 +21.260 +21.262 DEPDIR="${am__leading_dot}deps"21.264 @@ -8727,6 +8967,17 @@21.268 +if test "$ANDROID_BUILD" = "yes"; then21.269 + with_gtk=no;21.270 + EXTRA_OUTPUT_FILES="src/android/build.properties"21.271 + LIBS="-lGLESv2 $LIBS"21.272 +21.273 +cat >>confdefs.h <<\_ACEOF21.274 +#define HAVE_GLES2 121.275 +_ACEOF21.276 +21.277 + with_sdl=no21.278 +else21.281 ac_ext=m21.282 @@ -9358,6 +9609,7 @@21.283 ac_compiler_gnu=$ac_cv_c_compiler_gnu21.286 +fi21.290 @@ -9840,7 +10092,7 @@21.293 fi21.294 -if test "x$have_dlopen" = "xyes"; then21.295 +if test "x$have_dlopen" = "xyes" -a "x$ANDROID_BUILD" != "xyes"; then21.297 cat >>confdefs.h <<\_ACEOF21.298 #define BUILD_PLUGINS 121.299 @@ -9849,7 +10101,7 @@21.300 fi21.303 -if test "x$have_dlopen" = "xyes"; then21.304 +if test "x$have_dlopen" = "xyes" -a "x$ANDROID_BUILD" != "xyes"; then21.305 BUILD_PLUGINS_TRUE=21.306 BUILD_PLUGINS_FALSE='#'21.307 else21.308 @@ -11420,7 +11672,7 @@21.309 else21.312 - if test "x$APPLE_BUILD" != 'xyes'; then21.313 + if test "x$APPLE_BUILD" != 'xyes' -a "x$ANDROID_BUILD" != 'xyes'; then21.315 pkg_failed=no21.316 { echo "$as_me:$LINENO: checking for LIBGL" >&521.317 @@ -12562,8 +12814,6 @@21.318 fi21.321 -21.322 -21.323 if test "x$enable_translator" != "xno"; then21.324 case $host_cpu in21.325 i386|i486|i586|i686|x86_64)21.326 @@ -13135,7 +13385,8 @@21.330 -if test "${ac_cv_header_linux_cdrom_h+set}" = set; then21.331 +if test "$ANDROID_BUILD" != "yes"; then21.332 + if test "${ac_cv_header_linux_cdrom_h+set}" = set; then21.333 { echo "$as_me:$LINENO: checking for linux/cdrom.h" >&521.334 echo $ECHO_N "checking for linux/cdrom.h... $ECHO_C" >&6; }21.335 if test "${ac_cv_header_linux_cdrom_h+set}" = set; then21.336 @@ -13319,7 +13570,7 @@21.337 fi21.340 -if test "${ac_cv_header_IOKit_IOKitLib_h+set}" = set; then21.341 + if test "${ac_cv_header_IOKit_IOKitLib_h+set}" = set; then21.342 { echo "$as_me:$LINENO: checking for IOKit/IOKitLib.h" >&521.343 echo $ECHO_N "checking for IOKit/IOKitLib.h... $ECHO_C" >&6; }21.344 if test "${ac_cv_header_IOKit_IOKitLib_h+set}" = set; then21.345 @@ -13446,13 +13697,14 @@21.346 fi21.347 if test $ac_cv_header_IOKit_IOKitLib_h = yes; then21.349 - CDROM_DRIVER=osx21.350 - LIBS="$LIBS -framework IOKit"21.351 + CDROM_DRIVER=osx21.352 + LIBS="$LIBS -framework IOKit"21.353 else21.354 true21.355 fi21.358 +fi21.361 if test "x$CDROM_DRIVER" = "xlinux"; then21.362 @@ -15704,6 +15956,13 @@21.363 Usually this means the macro was only invoked conditionally." >&2;}21.364 { (exit 1); exit 1; }; }21.365 fi21.366 +if test -z "${GUI_ANDROID_TRUE}" && test -z "${GUI_ANDROID_FALSE}"; then21.367 + { { echo "$as_me:$LINENO: error: conditional \"GUI_ANDROID\" was never defined.21.368 +Usually this means the macro was only invoked conditionally." >&521.369 +echo "$as_me: error: conditional \"GUI_ANDROID\" was never defined.21.370 +Usually this means the macro was only invoked conditionally." >&2;}21.371 + { (exit 1); exit 1; }; }21.372 +fi21.373 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then21.374 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.21.375 Usually this means the macro was only invoked conditionally." >&521.376 @@ -16486,6 +16745,13 @@21.377 host_cpu!$host_cpu$ac_delim21.378 host_vendor!$host_vendor$ac_delim21.379 host_os!$host_os$ac_delim21.380 +ANT!$ANT$ac_delim21.381 +ANDROID_SDK_HOME!$ANDROID_SDK_HOME$ac_delim21.382 +ANDROID_NDK_HOME!$ANDROID_NDK_HOME$ac_delim21.383 +ANDROID_SDK_VERSION!$ANDROID_SDK_VERSION$ac_delim21.384 +ANDROID_GDBSERVER!$ANDROID_GDBSERVER$ac_delim21.385 +GUI_ANDROID_TRUE!$GUI_ANDROID_TRUE$ac_delim21.386 +GUI_ANDROID_FALSE!$GUI_ANDROID_FALSE$ac_delim21.387 CC!$CC$ac_delim21.388 CFLAGS!$CFLAGS$ac_delim21.389 LDFLAGS!$LDFLAGS$ac_delim21.390 @@ -16507,13 +16773,6 @@21.391 CFLAGS!$CFLAGS$ac_delim21.392 CPPFLAGS!$CPPFLAGS$ac_delim21.393 CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim21.394 -ac_ct_CC_FOR_BUILD!$ac_ct_CC_FOR_BUILD$ac_delim21.395 -CC_FOR_BUILDDEPMODE!$CC_FOR_BUILDDEPMODE$ac_delim21.396 -am__fastdepCC_FOR_BUILD_TRUE!$am__fastdepCC_FOR_BUILD_TRUE$ac_delim21.397 -am__fastdepCC_FOR_BUILD_FALSE!$am__fastdepCC_FOR_BUILD_FALSE$ac_delim21.398 -CPP!$CPP$ac_delim21.399 -CPPFLAGS!$CPPFLAGS$ac_delim21.400 -CPP_FOR_BUILD!$CPP_FOR_BUILD$ac_delim21.401 _ACEOF21.403 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then21.404 @@ -16555,6 +16814,13 @@21.405 ac_delim='%!_!# '21.406 for ac_last_try in false false false false false :; do21.407 cat >conf$$subs.sed <<_ACEOF21.408 +ac_ct_CC_FOR_BUILD!$ac_ct_CC_FOR_BUILD$ac_delim21.409 +CC_FOR_BUILDDEPMODE!$CC_FOR_BUILDDEPMODE$ac_delim21.410 +am__fastdepCC_FOR_BUILD_TRUE!$am__fastdepCC_FOR_BUILD_TRUE$ac_delim21.411 +am__fastdepCC_FOR_BUILD_FALSE!$am__fastdepCC_FOR_BUILD_FALSE$ac_delim21.412 +CPP!$CPP$ac_delim21.413 +CPPFLAGS!$CPPFLAGS$ac_delim21.414 +CPP_FOR_BUILD!$CPP_FOR_BUILD$ac_delim21.415 BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim21.416 BUILD_OBJEXT!$BUILD_OBJEXT$ac_delim21.417 CFLAGS_FOR_BUILD!$CFLAGS_FOR_BUILD$ac_delim21.418 @@ -16645,13 +16911,6 @@21.419 BUILD_ARMTEST_FALSE!$BUILD_ARMTEST_FALSE$ac_delim21.420 LXDREAM_LIBS!$LXDREAM_LIBS$ac_delim21.421 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim21.422 -USE_NLS!$USE_NLS$ac_delim21.423 -MSGFMT!$MSGFMT$ac_delim21.424 -MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim21.425 -GMSGFMT!$GMSGFMT$ac_delim21.426 -XGETTEXT!$XGETTEXT$ac_delim21.427 -CATALOGS!$CATALOGS$ac_delim21.428 -CATOBJEXT!$CATOBJEXT$ac_delim21.429 _ACEOF21.431 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then21.432 @@ -16693,6 +16952,13 @@21.433 ac_delim='%!_!# '21.434 for ac_last_try in false false false false false :; do21.435 cat >conf$$subs.sed <<_ACEOF21.436 +USE_NLS!$USE_NLS$ac_delim21.437 +MSGFMT!$MSGFMT$ac_delim21.438 +MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim21.439 +GMSGFMT!$GMSGFMT$ac_delim21.440 +XGETTEXT!$XGETTEXT$ac_delim21.441 +CATALOGS!$CATALOGS$ac_delim21.442 +CATOBJEXT!$CATOBJEXT$ac_delim21.443 DATADIRNAME!$DATADIRNAME$ac_delim21.444 GMOFILES!$GMOFILES$ac_delim21.445 INSTOBJEXT!$INSTOBJEXT$ac_delim21.446 @@ -16706,7 +16972,7 @@21.447 LTLIBOBJS!$LTLIBOBJS$ac_delim21.448 _ACEOF21.450 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 11; then21.451 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then21.452 break21.453 elif $ac_last_try; then21.454 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22.1 --- a/configure.in Sat Feb 25 21:27:06 2012 +100022.2 +++ b/configure.in Sat Feb 25 21:30:49 2012 +100022.3 @@ -9,6 +9,8 @@22.4 AC_CANONICAL_HOST22.6 m4_include([m4/ccforbuild.m4])22.7 +m4_include([m4/android.m4])22.8 +LX_ANDROID_BUILD22.10 AC_ISC_POSIX22.11 AC_PROG_CC22.12 @@ -81,6 +83,13 @@22.13 dnl ------------ Check if we're building on Darwin --------------22.15 dnl For starters, do we have a working objective-c compiler?22.16 +if test "$ANDROID_BUILD" = "yes"; then22.17 + with_gtk=no;22.18 + EXTRA_OUTPUT_FILES="src/android/build.properties"22.19 + LIBS="-lGLESv2 $LIBS"22.20 + AC_DEFINE(HAVE_GLES2, 1, [Using GLESv2])22.21 + with_sdl=no22.22 +else22.23 AC_HAVE_OBJC([22.24 AC_CHECK_HEADER([Cocoa/Cocoa.h], [22.25 HAVE_COCOA='yes'22.26 @@ -102,6 +111,7 @@22.27 AC_CHECK_OBJCFLAG([-msse2])22.28 AC_CHECK_OBJCFLAG([-mfpmath=sse])22.29 ])22.30 +fi22.32 AM_CONDITIONAL(GUI_COCOA, [test "$HAVE_COCOA" = 'yes' -a "$with_gtk" = "no"])22.33 if test "x$HAVE_COCOA" = 'xyes' -a "x$with_gtk" = "xno"; then22.34 @@ -185,10 +195,10 @@22.35 AC_SUBST(PLUGINLDFLAGS)22.36 AC_SUBST(LXDREAMLDFLAGS)22.37 fi22.38 -if test "x$have_dlopen" = "xyes"; then22.39 +if test "x$have_dlopen" = "xyes" -a "x$ANDROID_BUILD" != "xyes"; then22.40 AC_DEFINE(BUILD_PLUGINS, [1], [Enable dynamic plugin support])22.41 fi22.42 -AM_CONDITIONAL(BUILD_PLUGINS, [test "x$have_dlopen" = "xyes"])22.43 +AM_CONDITIONAL(BUILD_PLUGINS, [test "x$have_dlopen" = "xyes" -a "x$ANDROID_BUILD" != "xyes"])22.45 AC_CHECK_FASTCALL([22.46 AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions])22.47 @@ -247,7 +257,7 @@22.48 PKG_CHECK_MODULES(LIBISOFS, [libisofs-1] )22.49 dnl AC_CHECK_HEADER([libisofs/libisofs.h], [22.50 dnl AC_CHECK_LIB(isofs, [iso_data_source_new_from_file], [22.51 - dnl LIBS="$LIBS -lisofs"22.52 + dnl LIBS="-lisofs $LIBS"22.53 dnl ], [ AC_MSG_FAILURE( ["Libisofs library not found, but is required"]) ])],22.54 dnl [ AC_MSG_FAILURE( ["Libisofs headers not found, but is required"]) ])22.56 @@ -263,9 +273,9 @@22.57 VIDEO_DRIVERS="$VIDEO_DRIVERS osmesa"22.58 AC_DEFINE([HAVE_OSMESA],1,[Building with the OSMesa video driver]) ], [22.60 -dnl Otherwise we want a real GL library (unless we're on darwin, in which case it's already22.61 +dnl Otherwise we want a real GL library (unless we're on darwin or android, in which case it's already22.62 dnl taken care of above).22.63 - if test "x$APPLE_BUILD" != 'xyes'; then22.64 + if test "x$APPLE_BUILD" != 'xyes' -a "x$ANDROID_BUILD" != 'xyes'; then22.65 PKG_CHECK_MODULES(LIBGL, [gl] )22.66 dnl AC_CHECK_LIB(GL, glVertex3f, [], [22.67 dnl AC_MSG_FAILURE( ["The OpenGL library (libGL.so) could not be found, but is required."])])22.68 @@ -310,8 +320,6 @@22.69 AC_CHECK_FUNC(glDrawBuffer, [ AC_DEFINE([HAVE_OPENGL_DRAW_BUFFER],1,[Have glDrawBuffer function])], [])22.70 AC_CHECK_FUNC(glTexEnvi, [ AC_DEFINE([HAVE_OPENGL_FIXEDFUNC],1,[Have OpenGL fixed-functionality]) ], [])dnl glTexEnvi is a pretty fair proxy for this.22.72 -22.73 -22.74 dnl ------------------- SH4 translator target -------------------22.76 if test "x$enable_translator" != "xno"; then22.77 @@ -383,7 +391,8 @@22.80 dnl Check for native cdrom support. There can be only one.22.81 -AC_CHECK_HEADER([linux/cdrom.h], [22.82 +if test "$ANDROID_BUILD" != "yes"; then22.83 + AC_CHECK_HEADER([linux/cdrom.h], [22.84 CDROM_DRIVER=linux22.85 dnl Some kernel versions have non-c99 compliant headers - check here22.86 AC_MSG_CHECKING([C99 compliant kernel headers])22.87 @@ -393,10 +402,11 @@22.88 AC_MSG_RESULT([No])22.89 STDCFLAG="-std=gnu99"])22.90 CFLAGS="$old_CFLAGS"22.91 -], [true])22.92 -AC_CHECK_HEADER([IOKit/IOKitLib.h], [22.93 - CDROM_DRIVER=osx22.94 - LIBS="$LIBS -framework IOKit"],[true])22.95 + ], [true])22.96 + AC_CHECK_HEADER([IOKit/IOKitLib.h], [22.97 + CDROM_DRIVER=osx22.98 + LIBS="$LIBS -framework IOKit"],[true])22.99 +fi22.100 AM_CONDITIONAL(CDROM_LINUX, [test "x$CDROM_DRIVER" = "xlinux"])22.101 AM_CONDITIONAL(CDROM_OSX, [test "x$CDROM_DRIVER" = "xosx"])22.102 AM_CONDITIONAL(CDROM_NONE, [test "x$CDROM_DRIVER" = "x"])
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000023.2 +++ b/m4/android.m4 Sat Feb 25 21:30:49 2012 +100023.3 @@ -0,0 +1,79 @@23.4 +# LX_ANDROID_BUILD23.5 +# Defines --with-android, --with-android-ndk, and --with-android-version23.6 +# If specified, checks for a working install, and sets build parameters23.7 +# appropriately for an Android host.23.8 +AC_DEFUN([LX_ANDROID_BUILD], [23.9 + AC_REQUIRE([AC_CANONICAL_HOST])23.10 + AC_ARG_WITH( android, AS_HELP_STRING( [--with-android=SDK], [Specify the location of the Android SDK] ) )23.11 + AC_ARG_WITH( android-ndk, AS_HELP_STRING( [--with-android-ndk=NDK], [Specify the location of the Android NDK] ) )23.12 + AC_ARG_WITH( android-version, AS_HELP_STRING( [--with-android-version], [Specify target Android SDK version]), [], [with_android_version="android-8"] )23.13 +23.14 + if test "x$with_android" != "x"; then23.15 + if test "$with_android" = "yes"; then23.16 + AC_MSG_ERROR( [--with-android option must be given with the path to the Android SDK] )23.17 + fi23.18 + if test "x$with_android_ndk" = "x" -o "x$with_android_ndk" = "xyes"; then23.19 + AC_MSG_ERROR( [--with-android-ndk=/path/to/ndk option must be used with --with-android] )23.20 + fi23.21 +23.22 + ANDROID_SDK_HOME="$with_android"23.23 + ANDROID_NDK_HOME="$with_android_ndk"23.24 + ANDROID_SDK_VERSION="$with_android_version"23.25 +23.26 + AC_CHECK_FILE( [$ANDROID_SDK_HOME/tools/ant/pre_setup.xml], [], [ AC_MSG_ERROR([Android SDK not found in $ANDROID_SDK_HOME]) ])23.27 + AC_CHECK_FILE( [$ANDROID_SDK_HOME/platforms/$ANDROID_SDK_VERSION/sdk.properties], [], [ AC_MSG_ERROR([Android platform version $ANDROID_SDK_VERSION not found in $ANDROID_SDK_HOME]) ])23.28 + AC_CHECK_FILE( [$ANDROID_NDK_HOME/toolchains], [], [ AC_MSG_ERROR([Android NDK not found in $ANDROID_NDK_HOME]) ])23.29 +23.30 + case $host_alias in23.31 + arm-* | "")23.32 + host_alias="arm-linux-androideabi"23.33 + host_cpu="arm"23.34 + host_vendor="unknown";23.35 + host_os="linux-androideabi"23.36 + ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/*/bin`23.37 + ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/gdbserver`23.38 + ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_SDK_VERSION/arch-arm"23.39 + TARGETFLAGS="-ffunction-sections -funwind-tables -fstack-protector -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wno-psabi -Wa,--noexecstack"23.40 + TARGETFLAGS="$TARGETFLAGS -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -Os"23.41 + ;;23.42 + i686-*)23.43 + host_alias="i686-android-linux"23.44 + host_cpu="i686"23.45 + host_vendor="android"23.46 + host_os="linux"23.47 + ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/*/bin`23.48 + ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/gdbserver`23.49 + ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_SDK_VERSION/arch-x86"23.50 + TARGETFLAGS=""23.51 + ;;23.52 + *)23.53 + AC_MSG_ERROR([Unsupported android host $host_alias])23.54 + ;;23.55 + esac23.56 +23.57 + AC_PATH_PROG( ANT, [ant] )23.58 +23.59 + CC="$ANDROID_NDK_BIN/${host_alias}-gcc"23.60 + CXX="$ANDROID_NDK_BIN/${host_alias}-g++"23.61 + CPP="$ANDROID_NDK_BIN/${host_alias}-cpp"23.62 + LD="$ANDROID_NDK_BIN/${host_alias}-ld"23.63 + AR="$ANDROID_NDK_BIN/${host_alias}-ar"23.64 + RANLIB="$ANDROID_NDK_BIN/${host_alias}-ranlib"23.65 + STRIP="$ANDROID_NDK_BIN/${host_alias}-strip"23.66 + OBJDUMP="$ANDROID_NDK_BIN/${host_alias}-objdump"23.67 + CPPFLAGS="-fPIC --sysroot=$ANDROID_SYSROOT -I$ANDROID_SYSROOT/usr/include $TARGETFLAGS $CPPFLAGS"23.68 + LDFLAGS="-nostdlib -Wl,--no-undefined -L${ANDROID_SYSROOT}/usr/lib -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib -Wl,-allow-shlib-undefined -Wl,-z,noexecstack $LDFLAGS"23.69 + LIBS="$LIBS -liconv -llog -lgcc -lc"23.70 +23.71 + AC_SUBST(ANDROID_SDK_HOME)23.72 + AC_SUBST(ANDROID_NDK_HOME)23.73 + AC_SUBST(ANDROID_SDK_VERSION)23.74 + AC_SUBST(ANDROID_GDBSERVER)23.75 +23.76 + ANDROID_BUILD=yes23.77 + cross_compiling=yes23.78 + fi23.79 +23.80 + AM_CONDITIONAL(GUI_ANDROID, [test "$ANDROID_BUILD" = "yes"])23.81 +23.82 +])
24.1 --- a/src/Makefile.am Sat Feb 25 21:27:06 2012 +100024.2 +++ b/src/Makefile.am Sat Feb 25 21:30:49 2012 +100024.3 @@ -110,6 +110,15 @@24.4 drivers/video_gtk.c24.5 endif24.7 +if GUI_ANDROID24.8 +lxdream_SOURCES += gui_none.c24.9 +noinst_PROGRAMS=liblxdream.so24.10 +liblxdream_so_LINK = $(LINK) -Wl,-soname,liblxdream.so -shared24.11 +liblxdream_so_LDADD = liblxdream-core.a @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @LIBISOFS_LIBS@ $(INTLLIBS) @LXDREAM_LIBS@ -lm24.12 +liblxdream_so_SOURCES = gui_jni.c drivers/cdrom/cd_none.c24.13 +liblxdream_so_LIBS = liblxdream-core.a24.14 +endif24.15 +24.16 if GUI_COCOA24.17 liblxdream_core_a_SOURCES += cocoaui/paths_osx.m drivers/io_osx.m drivers/mac_keymap.h drivers/mac_keymap.txt24.18 lxdream_SOURCES += cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \
25.1 --- a/src/Makefile.in Sat Feb 25 21:27:06 2012 +100025.2 +++ b/src/Makefile.in Sat Feb 25 21:30:49 2012 +100025.3 @@ -58,41 +58,44 @@25.4 @GUI_GTK_TRUE@ gtkui/gtk_ctrl.c gtkui/gtk_gd.c \25.5 @GUI_GTK_TRUE@ drivers/video_gtk.c25.7 -@GUI_COCOA_TRUE@am__append_5 = cocoaui/paths_osx.m drivers/io_osx.m drivers/mac_keymap.h drivers/mac_keymap.txt25.8 -@GUI_COCOA_TRUE@am__append_6 = cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \25.9 +@GUI_ANDROID_TRUE@am__append_5 = gui_none.c25.10 +@GUI_ANDROID_TRUE@noinst_PROGRAMS = liblxdream.so$(EXEEXT)25.11 +@GUI_COCOA_TRUE@am__append_6 = cocoaui/paths_osx.m drivers/io_osx.m drivers/mac_keymap.h drivers/mac_keymap.txt25.12 +@GUI_COCOA_TRUE@am__append_7 = cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \25.13 @GUI_COCOA_TRUE@ cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \25.14 @GUI_COCOA_TRUE@ cocoaui/cocoa_ctrl.m drivers/video_osx.m25.16 -@GUI_COCOA_FALSE@am__append_7 = paths_unix.c drivers/io_glib.c25.17 -@VIDEO_OSMESA_TRUE@am__append_8 = drivers/video_gdk.c25.18 -@VIDEO_GLX_TRUE@am__append_9 = drivers/video_glx.c drivers/video_glx.h25.19 -@VIDEO_NSGL_TRUE@am__append_10 = drivers/video_nsgl.m drivers/video_nsgl.h25.20 -@AUDIO_OSX_TRUE@am__append_11 = drivers/audio_osx.m25.21 -@BUILD_PLUGINS_TRUE@am__append_12 = lxdream_dummy.@SOEXT@25.22 -@AUDIO_SDL_TRUE@@BUILD_PLUGINS_TRUE@am__append_13 = audio_sdl.@SOEXT@25.23 -@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_TRUE@am__append_14 = audio_pulse.@SOEXT@25.24 -@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_TRUE@am__append_15 = audio_esd.@SOEXT@25.25 -@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_TRUE@am__append_16 = audio_alsa.@SOEXT@25.26 -@BUILD_PLUGINS_TRUE@@INPUT_LIRC_TRUE@am__append_17 = input_lirc.@SOEXT@25.27 -@AUDIO_SDL_TRUE@@BUILD_PLUGINS_FALSE@am__append_18 = drivers/audio_sdl.c25.28 -@AUDIO_SDL_TRUE@@BUILD_PLUGINS_FALSE@am__append_19 = @SDL_LIBS@25.29 -@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_FALSE@am__append_20 = drivers/audio_pulse.c25.30 -@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_FALSE@am__append_21 = @PULSE_LIBS@25.31 -@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_FALSE@am__append_22 = drivers/audio_esd.c25.32 -@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_FALSE@am__append_23 = @ESOUND_LIBS@25.33 -@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_FALSE@am__append_24 = drivers/audio_alsa.c25.34 -@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_FALSE@am__append_25 = @ALSA_LIBS@25.35 -@BUILD_PLUGINS_FALSE@@INPUT_LIRC_TRUE@am__append_26 = drivers/input_lirc.c25.36 -@BUILD_PLUGINS_FALSE@@INPUT_LIRC_TRUE@am__append_27 = -llirc_client25.37 -@CDROM_LINUX_TRUE@am__append_28 = drivers/cdrom/cd_linux.c25.38 -@CDROM_OSX_TRUE@am__append_29 = drivers/cdrom/cd_osx.c drivers/osx_iokit.m drivers/osx_iokit.h25.39 -@CDROM_NONE_TRUE@am__append_30 = drivers/cdrom/cd_none.c25.40 -@JOY_LINUX_TRUE@am__append_31 = drivers/joy_linux.c drivers/joy_linux.h25.41 +@GUI_COCOA_FALSE@am__append_8 = paths_unix.c drivers/io_glib.c25.42 +@VIDEO_OSMESA_TRUE@am__append_9 = drivers/video_gdk.c25.43 +@VIDEO_GLX_TRUE@am__append_10 = drivers/video_glx.c drivers/video_glx.h25.44 +@VIDEO_NSGL_TRUE@am__append_11 = drivers/video_nsgl.m drivers/video_nsgl.h25.45 +@AUDIO_OSX_TRUE@am__append_12 = drivers/audio_osx.m25.46 +@BUILD_PLUGINS_TRUE@am__append_13 = lxdream_dummy.@SOEXT@25.47 +@AUDIO_SDL_TRUE@@BUILD_PLUGINS_TRUE@am__append_14 = audio_sdl.@SOEXT@25.48 +@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_TRUE@am__append_15 = audio_pulse.@SOEXT@25.49 +@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_TRUE@am__append_16 = audio_esd.@SOEXT@25.50 +@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_TRUE@am__append_17 = audio_alsa.@SOEXT@25.51 +@BUILD_PLUGINS_TRUE@@INPUT_LIRC_TRUE@am__append_18 = input_lirc.@SOEXT@25.52 +@AUDIO_SDL_TRUE@@BUILD_PLUGINS_FALSE@am__append_19 = drivers/audio_sdl.c25.53 +@AUDIO_SDL_TRUE@@BUILD_PLUGINS_FALSE@am__append_20 = @SDL_LIBS@25.54 +@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_FALSE@am__append_21 = drivers/audio_pulse.c25.55 +@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_FALSE@am__append_22 = @PULSE_LIBS@25.56 +@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_FALSE@am__append_23 = drivers/audio_esd.c25.57 +@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_FALSE@am__append_24 = @ESOUND_LIBS@25.58 +@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_FALSE@am__append_25 = drivers/audio_alsa.c25.59 +@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_FALSE@am__append_26 = @ALSA_LIBS@25.60 +@BUILD_PLUGINS_FALSE@@INPUT_LIRC_TRUE@am__append_27 = drivers/input_lirc.c25.61 +@BUILD_PLUGINS_FALSE@@INPUT_LIRC_TRUE@am__append_28 = -llirc_client25.62 +@CDROM_LINUX_TRUE@am__append_29 = drivers/cdrom/cd_linux.c25.63 +@CDROM_OSX_TRUE@am__append_30 = drivers/cdrom/cd_osx.c drivers/osx_iokit.m drivers/osx_iokit.h25.64 +@CDROM_NONE_TRUE@am__append_31 = drivers/cdrom/cd_none.c25.65 +@JOY_LINUX_TRUE@am__append_32 = drivers/joy_linux.c drivers/joy_linux.h25.66 subdir = src25.67 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in25.68 ACLOCAL_M4 = $(top_srcdir)/aclocal.m425.69 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \25.70 - $(top_srcdir)/m4/ccforbuild.m4 $(top_srcdir)/configure.in25.71 + $(top_srcdir)/m4/ccforbuild.m4 $(top_srcdir)/m4/android.m4 \25.72 + $(top_srcdir)/configure.in25.73 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \25.74 $(ACLOCAL_M4)25.75 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs25.76 @@ -192,7 +195,7 @@25.77 @AUDIO_ALSA_TRUE@@BUILD_PLUGINS_TRUE@am__EXEEXT_6 = audio_alsa.@SOEXT@$(EXEEXT)25.78 @BUILD_PLUGINS_TRUE@@INPUT_LIRC_TRUE@am__EXEEXT_7 = input_lirc.@SOEXT@$(EXEEXT)25.79 pkglibPROGRAMS_INSTALL = $(INSTALL_PROGRAM)25.80 -PROGRAMS = $(bin_PROGRAMS) $(pkglib_PROGRAMS)25.81 +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglib_PROGRAMS)25.82 am_audio_alsa_@SOEXT@_OBJECTS =25.83 audio_alsa_@SOEXT@_OBJECTS = $(am_audio_alsa_@SOEXT@_OBJECTS)25.84 @AUDIO_ALSA_TRUE@@BUILD_PLUGINS_TRUE@audio_alsa_@SOEXT@_DEPENDENCIES = \25.85 @@ -213,10 +216,17 @@25.86 input_lirc_@SOEXT@_OBJECTS = $(am_input_lirc_@SOEXT@_OBJECTS)25.87 @BUILD_PLUGINS_TRUE@@INPUT_LIRC_TRUE@input_lirc_@SOEXT@_DEPENDENCIES = \25.88 @BUILD_PLUGINS_TRUE@@INPUT_LIRC_TRUE@ input_lirc.lo25.89 +am__liblxdream_so_SOURCES_DIST = gui_jni.c drivers/cdrom/cd_none.c25.90 +@GUI_ANDROID_TRUE@am_liblxdream_so_OBJECTS = gui_jni.$(OBJEXT) \25.91 +@GUI_ANDROID_TRUE@ cd_none.$(OBJEXT)25.92 +liblxdream_so_OBJECTS = $(am_liblxdream_so_OBJECTS)25.93 +am__DEPENDENCIES_1 =25.94 +@GUI_ANDROID_TRUE@liblxdream_so_DEPENDENCIES = liblxdream-core.a \25.95 +@GUI_ANDROID_TRUE@ $(am__DEPENDENCIES_1)25.96 am__lxdream_SOURCES_DIST = main.c plugin.c plugin.h gtkui/gtkui.c \25.97 gtkui/gtkui.h gtkui/gtk_win.c gtkui/gtkcb.c gtkui/gtk_cfg.c \25.98 gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \25.99 - gtkui/gtk_ctrl.c gtkui/gtk_gd.c drivers/video_gtk.c \25.100 + gtkui/gtk_ctrl.c gtkui/gtk_gd.c drivers/video_gtk.c gui_none.c \25.101 cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \25.102 cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \25.103 cocoaui/cocoa_ctrl.m drivers/video_osx.m drivers/video_gdk.c \25.104 @@ -233,36 +243,36 @@25.105 @GUI_GTK_TRUE@ gtk_mmio.$(OBJEXT) gtk_debug.$(OBJEXT) \25.106 @GUI_GTK_TRUE@ gtk_dump.$(OBJEXT) gtk_ctrl.$(OBJEXT) \25.107 @GUI_GTK_TRUE@ gtk_gd.$(OBJEXT) video_gtk.$(OBJEXT)25.108 -@GUI_COCOA_TRUE@am__objects_6 = cocoaui.$(OBJEXT) cocoa_cfg.$(OBJEXT) \25.109 +@GUI_ANDROID_TRUE@am__objects_6 = gui_none.$(OBJEXT)25.110 +@GUI_COCOA_TRUE@am__objects_7 = cocoaui.$(OBJEXT) cocoa_cfg.$(OBJEXT) \25.111 @GUI_COCOA_TRUE@ cocoa_win.$(OBJEXT) cocoa_gd.$(OBJEXT) \25.112 @GUI_COCOA_TRUE@ cocoa_prefs.$(OBJEXT) cocoa_ctrl.$(OBJEXT) \25.113 @GUI_COCOA_TRUE@ video_osx.$(OBJEXT)25.114 -@VIDEO_OSMESA_TRUE@am__objects_7 = video_gdk.$(OBJEXT)25.115 -@VIDEO_GLX_TRUE@am__objects_8 = video_glx.$(OBJEXT)25.116 -@VIDEO_NSGL_TRUE@am__objects_9 = video_nsgl.$(OBJEXT)25.117 -@AUDIO_OSX_TRUE@am__objects_10 = audio_osx.$(OBJEXT)25.118 -@AUDIO_SDL_TRUE@@BUILD_PLUGINS_FALSE@am__objects_11 = \25.119 +@VIDEO_OSMESA_TRUE@am__objects_8 = video_gdk.$(OBJEXT)25.120 +@VIDEO_GLX_TRUE@am__objects_9 = video_glx.$(OBJEXT)25.121 +@VIDEO_NSGL_TRUE@am__objects_10 = video_nsgl.$(OBJEXT)25.122 +@AUDIO_OSX_TRUE@am__objects_11 = audio_osx.$(OBJEXT)25.123 +@AUDIO_SDL_TRUE@@BUILD_PLUGINS_FALSE@am__objects_12 = \25.124 @AUDIO_SDL_TRUE@@BUILD_PLUGINS_FALSE@ audio_sdl.$(OBJEXT)25.125 -@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_FALSE@am__objects_12 = \25.126 +@AUDIO_PULSE_TRUE@@BUILD_PLUGINS_FALSE@am__objects_13 = \25.127 @AUDIO_PULSE_TRUE@@BUILD_PLUGINS_FALSE@ audio_pulse.$(OBJEXT)25.128 -@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_FALSE@am__objects_13 = \25.129 +@AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_FALSE@am__objects_14 = \25.130 @AUDIO_ESOUND_TRUE@@BUILD_PLUGINS_FALSE@ audio_esd.$(OBJEXT)25.131 -@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_FALSE@am__objects_14 = \25.132 +@AUDIO_ALSA_TRUE@@BUILD_PLUGINS_FALSE@am__objects_15 = \25.133 @AUDIO_ALSA_TRUE@@BUILD_PLUGINS_FALSE@ audio_alsa.$(OBJEXT)25.134 -@BUILD_PLUGINS_FALSE@@INPUT_LIRC_TRUE@am__objects_15 = \25.135 +@BUILD_PLUGINS_FALSE@@INPUT_LIRC_TRUE@am__objects_16 = \25.136 @BUILD_PLUGINS_FALSE@@INPUT_LIRC_TRUE@ input_lirc.$(OBJEXT)25.137 -@CDROM_LINUX_TRUE@am__objects_16 = cd_linux.$(OBJEXT)25.138 -@CDROM_OSX_TRUE@am__objects_17 = cd_osx.$(OBJEXT) osx_iokit.$(OBJEXT)25.139 -@CDROM_NONE_TRUE@am__objects_18 = cd_none.$(OBJEXT)25.140 -@JOY_LINUX_TRUE@am__objects_19 = joy_linux.$(OBJEXT)25.141 +@CDROM_LINUX_TRUE@am__objects_17 = cd_linux.$(OBJEXT)25.142 +@CDROM_OSX_TRUE@am__objects_18 = cd_osx.$(OBJEXT) osx_iokit.$(OBJEXT)25.143 +@CDROM_NONE_TRUE@am__objects_19 = cd_none.$(OBJEXT)25.144 +@JOY_LINUX_TRUE@am__objects_20 = joy_linux.$(OBJEXT)25.145 am_lxdream_OBJECTS = main.$(OBJEXT) $(am__objects_4) $(am__objects_5) \25.146 $(am__objects_6) $(am__objects_7) $(am__objects_8) \25.147 $(am__objects_9) $(am__objects_10) $(am__objects_11) \25.148 $(am__objects_12) $(am__objects_13) $(am__objects_14) \25.149 $(am__objects_15) $(am__objects_16) $(am__objects_17) \25.150 - $(am__objects_18) $(am__objects_19)25.151 + $(am__objects_18) $(am__objects_19) $(am__objects_20)25.152 lxdream_OBJECTS = $(am_lxdream_OBJECTS)25.153 -am__DEPENDENCIES_1 =25.154 lxdream_DEPENDENCIES = liblxdream-core.a $(am__DEPENDENCIES_1) \25.155 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \25.156 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \25.157 @@ -305,13 +315,14 @@25.158 SOURCES = $(liblxdream_core_a_SOURCES) $(audio_alsa_@SOEXT@_SOURCES) \25.159 $(audio_esd_@SOEXT@_SOURCES) $(audio_pulse_@SOEXT@_SOURCES) \25.160 $(audio_sdl_@SOEXT@_SOURCES) $(input_lirc_@SOEXT@_SOURCES) \25.161 - $(lxdream_SOURCES) $(lxdream_dummy_@SOEXT@_SOURCES) \25.162 - $(test_testlxpaths_SOURCES) $(test_testsh4x86_SOURCES) \25.163 - $(test_testxlt_SOURCES)25.164 + $(liblxdream_so_SOURCES) $(lxdream_SOURCES) \25.165 + $(lxdream_dummy_@SOEXT@_SOURCES) $(test_testlxpaths_SOURCES) \25.166 + $(test_testsh4x86_SOURCES) $(test_testxlt_SOURCES)25.167 DIST_SOURCES = $(am__liblxdream_core_a_SOURCES_DIST) \25.168 $(audio_alsa_@SOEXT@_SOURCES) $(audio_esd_@SOEXT@_SOURCES) \25.169 $(audio_pulse_@SOEXT@_SOURCES) $(audio_sdl_@SOEXT@_SOURCES) \25.170 - $(input_lirc_@SOEXT@_SOURCES) $(am__lxdream_SOURCES_DIST) \25.171 + $(input_lirc_@SOEXT@_SOURCES) \25.172 + $(am__liblxdream_so_SOURCES_DIST) $(am__lxdream_SOURCES_DIST) \25.173 $(lxdream_dummy_@SOEXT@_SOURCES) $(test_testlxpaths_SOURCES) \25.174 $(am__test_testsh4x86_SOURCES_DIST) $(test_testxlt_SOURCES)25.175 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \25.176 @@ -330,6 +341,11 @@25.177 AMDEP_FALSE = @AMDEP_FALSE@25.178 AMDEP_TRUE = @AMDEP_TRUE@25.179 AMTAR = @AMTAR@25.180 +ANDROID_GDBSERVER = @ANDROID_GDBSERVER@25.181 +ANDROID_NDK_HOME = @ANDROID_NDK_HOME@25.182 +ANDROID_SDK_HOME = @ANDROID_SDK_HOME@25.183 +ANDROID_SDK_VERSION = @ANDROID_SDK_VERSION@25.184 +ANT = @ANT@25.185 ARMCC = @ARMCC@25.186 ARMLD = @ARMLD@25.187 ARMOBJCOPY = @ARMOBJCOPY@25.188 @@ -398,6 +414,8 @@25.189 GREP = @GREP@25.190 GTK_CFLAGS = @GTK_CFLAGS@25.191 GTK_LIBS = @GTK_LIBS@25.192 +GUI_ANDROID_FALSE = @GUI_ANDROID_FALSE@25.193 +GUI_ANDROID_TRUE = @GUI_ANDROID_TRUE@25.194 GUI_COCOA_FALSE = @GUI_COCOA_FALSE@25.195 GUI_COCOA_TRUE = @GUI_COCOA_TRUE@25.196 GUI_GTK_FALSE = @GUI_GTK_FALSE@25.197 @@ -547,15 +565,15 @@25.198 AM_CPPFLAGS = @LXDREAMCPPFLAGS@25.199 lxdream_LINK = $(LINK) @LXDREAMLDFLAGS@25.200 lxdream_LDADD = liblxdream-core.a @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ \25.201 - @LIBISOFS_LIBS@ $(INTLLIBS) @LXDREAM_LIBS@ $(am__append_19) \25.202 - $(am__append_21) $(am__append_23) $(am__append_25) \25.203 - $(am__append_27)25.204 + @LIBISOFS_LIBS@ $(INTLLIBS) @LXDREAM_LIBS@ $(am__append_20) \25.205 + $(am__append_22) $(am__append_24) $(am__append_26) \25.206 + $(am__append_28)25.207 lxdream_SOURCES = main.c $(am__append_1) $(am__append_4) \25.208 - $(am__append_6) $(am__append_8) $(am__append_9) \25.209 - $(am__append_10) $(am__append_11) $(am__append_18) \25.210 - $(am__append_20) $(am__append_22) $(am__append_24) \25.211 - $(am__append_26) $(am__append_28) $(am__append_29) \25.212 - $(am__append_30) $(am__append_31)25.213 + $(am__append_5) $(am__append_7) $(am__append_9) \25.214 + $(am__append_10) $(am__append_11) $(am__append_12) \25.215 + $(am__append_19) $(am__append_21) $(am__append_23) \25.216 + $(am__append_25) $(am__append_27) $(am__append_29) \25.217 + $(am__append_30) $(am__append_31) $(am__append_32)25.218 lxdream_LIBS = liblxdream-core.a25.219 noinst_LIBRARIES = liblxdream-core.a25.220 liblxdream_core_a_SOURCES = version.c config.c config.h lxdream.h \25.221 @@ -595,8 +613,8 @@25.222 drivers/cdrom/cd_mmc.c drivers/cdrom/isofs.h \25.223 drivers/cdrom/isofs.c drivers/cdrom/isomem.c sh4/sh4.def \25.224 sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \25.225 - hotkeys.c hotkeys.h $(am__append_2) $(am__append_5) \25.226 - $(am__append_7)25.227 + hotkeys.c hotkeys.h $(am__append_2) $(am__append_6) \25.228 + $(am__append_8)25.229 @BUILD_SH4X86_TRUE@test_testsh4x86_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@25.230 @BUILD_SH4X86_TRUE@test_testsh4x86_SOURCES = test/testsh4x86.c x86dasm/x86dasm.c \25.231 @BUILD_SH4X86_TRUE@ x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \25.232 @@ -604,6 +622,10 @@25.233 @BUILD_SH4X86_TRUE@ sh4/sh4trans.c sh4/sh4x86.c xlat/xltcache.c sh4/sh4dasm.c \25.234 @BUILD_SH4X86_TRUE@ xlat/xltcache.h mem.c util.c cpu.c25.236 +@GUI_ANDROID_TRUE@liblxdream_so_LINK = $(LINK) -Wl,-soname,liblxdream.so -shared25.237 +@GUI_ANDROID_TRUE@liblxdream_so_LDADD = liblxdream-core.a @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @LIBISOFS_LIBS@ $(INTLLIBS) @LXDREAM_LIBS@ -lm25.238 +@GUI_ANDROID_TRUE@liblxdream_so_SOURCES = gui_jni.c drivers/cdrom/cd_none.c25.239 +@GUI_ANDROID_TRUE@liblxdream_so_LIBS = liblxdream-core.a25.240 @BUILD_PLUGINS_TRUE@lxdream_dummy_@SOEXT@_SOURCES =25.241 @BUILD_PLUGINS_TRUE@lxdream_dummy_@SOEXT@_LDADD = lxdream_dummy.lo @SDL_LIBS@25.242 @BUILD_PLUGINS_TRUE@lxdream_dummy_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)25.243 @@ -695,6 +717,9 @@25.245 clean-checkPROGRAMS:25.246 -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)25.247 +25.248 +clean-noinstPROGRAMS:25.249 + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)25.250 install-pkglibPROGRAMS: $(pkglib_PROGRAMS)25.251 @$(NORMAL_INSTALL)25.252 test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"25.253 @@ -733,6 +758,9 @@25.254 input_lirc.@SOEXT@$(EXEEXT): $(input_lirc_@SOEXT@_OBJECTS) $(input_lirc_@SOEXT@_DEPENDENCIES)25.255 @rm -f input_lirc.@SOEXT@$(EXEEXT)25.256 $(LINK) $(input_lirc_@SOEXT@_LDFLAGS) $(input_lirc_@SOEXT@_OBJECTS) $(input_lirc_@SOEXT@_LDADD) $(LIBS)25.257 +liblxdream.so$(EXEEXT): $(liblxdream_so_OBJECTS) $(liblxdream_so_DEPENDENCIES)25.258 + @rm -f liblxdream.so$(EXEEXT)25.259 + $(liblxdream_so_LINK) $(liblxdream_so_LDFLAGS) $(liblxdream_so_OBJECTS) $(liblxdream_so_LDADD) $(LIBS)25.260 lxdream$(EXEEXT): $(lxdream_OBJECTS) $(lxdream_DEPENDENCIES)25.261 @rm -f lxdream$(EXEEXT)25.262 $(lxdream_LINK) $(lxdream_LDFLAGS) $(lxdream_OBJECTS) $(lxdream_LDADD) $(LIBS)25.263 @@ -816,6 +844,8 @@25.264 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_win.Po@am__quote@25.265 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcb.Po@am__quote@25.266 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkui.Po@am__quote@25.267 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_jni.Po@am__quote@25.268 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_none.Po@am__quote@25.269 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hotkeys.Po@am__quote@25.270 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-dis.Po@am__quote@25.271 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ide.Po@am__quote@25.272 @@ -1808,6 +1838,20 @@25.273 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@25.274 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o io_glib.obj `if test -f 'drivers/io_glib.c'; then $(CYGPATH_W) 'drivers/io_glib.c'; else $(CYGPATH_W) '$(srcdir)/drivers/io_glib.c'; fi`25.276 +cd_none.o: drivers/cdrom/cd_none.c25.277 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cd_none.o -MD -MP -MF "$(DEPDIR)/cd_none.Tpo" -c -o cd_none.o `test -f 'drivers/cdrom/cd_none.c' || echo '$(srcdir)/'`drivers/cdrom/cd_none.c; \25.278 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cd_none.Tpo" "$(DEPDIR)/cd_none.Po"; else rm -f "$(DEPDIR)/cd_none.Tpo"; exit 1; fi25.279 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drivers/cdrom/cd_none.c' object='cd_none.o' libtool=no @AMDEPBACKSLASH@25.280 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@25.281 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cd_none.o `test -f 'drivers/cdrom/cd_none.c' || echo '$(srcdir)/'`drivers/cdrom/cd_none.c25.282 +25.283 +cd_none.obj: drivers/cdrom/cd_none.c25.284 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cd_none.obj -MD -MP -MF "$(DEPDIR)/cd_none.Tpo" -c -o cd_none.obj `if test -f 'drivers/cdrom/cd_none.c'; then $(CYGPATH_W) 'drivers/cdrom/cd_none.c'; else $(CYGPATH_W) '$(srcdir)/drivers/cdrom/cd_none.c'; fi`; \25.285 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cd_none.Tpo" "$(DEPDIR)/cd_none.Po"; else rm -f "$(DEPDIR)/cd_none.Tpo"; exit 1; fi25.286 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drivers/cdrom/cd_none.c' object='cd_none.obj' libtool=no @AMDEPBACKSLASH@25.287 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@25.288 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cd_none.obj `if test -f 'drivers/cdrom/cd_none.c'; then $(CYGPATH_W) 'drivers/cdrom/cd_none.c'; else $(CYGPATH_W) '$(srcdir)/drivers/cdrom/cd_none.c'; fi`25.289 +25.290 gtkui.o: gtkui/gtkui.c25.291 @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkui.o -MD -MP -MF "$(DEPDIR)/gtkui.Tpo" -c -o gtkui.o `test -f 'gtkui/gtkui.c' || echo '$(srcdir)/'`gtkui/gtkui.c; \25.292 @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gtkui.Tpo" "$(DEPDIR)/gtkui.Po"; else rm -f "$(DEPDIR)/gtkui.Tpo"; exit 1; fi25.293 @@ -2074,20 +2118,6 @@25.294 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@25.295 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cd_osx.obj `if test -f 'drivers/cdrom/cd_osx.c'; then $(CYGPATH_W) 'drivers/cdrom/cd_osx.c'; else $(CYGPATH_W) '$(srcdir)/drivers/cdrom/cd_osx.c'; fi`25.297 -cd_none.o: drivers/cdrom/cd_none.c25.298 -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cd_none.o -MD -MP -MF "$(DEPDIR)/cd_none.Tpo" -c -o cd_none.o `test -f 'drivers/cdrom/cd_none.c' || echo '$(srcdir)/'`drivers/cdrom/cd_none.c; \25.299 -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cd_none.Tpo" "$(DEPDIR)/cd_none.Po"; else rm -f "$(DEPDIR)/cd_none.Tpo"; exit 1; fi25.300 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drivers/cdrom/cd_none.c' object='cd_none.o' libtool=no @AMDEPBACKSLASH@25.301 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@25.302 -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cd_none.o `test -f 'drivers/cdrom/cd_none.c' || echo '$(srcdir)/'`drivers/cdrom/cd_none.c25.303 -25.304 -cd_none.obj: drivers/cdrom/cd_none.c25.305 -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cd_none.obj -MD -MP -MF "$(DEPDIR)/cd_none.Tpo" -c -o cd_none.obj `if test -f 'drivers/cdrom/cd_none.c'; then $(CYGPATH_W) 'drivers/cdrom/cd_none.c'; else $(CYGPATH_W) '$(srcdir)/drivers/cdrom/cd_none.c'; fi`; \25.306 -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cd_none.Tpo" "$(DEPDIR)/cd_none.Po"; else rm -f "$(DEPDIR)/cd_none.Tpo"; exit 1; fi25.307 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drivers/cdrom/cd_none.c' object='cd_none.obj' libtool=no @AMDEPBACKSLASH@25.308 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@25.309 -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cd_none.obj `if test -f 'drivers/cdrom/cd_none.c'; then $(CYGPATH_W) 'drivers/cdrom/cd_none.c'; else $(CYGPATH_W) '$(srcdir)/drivers/cdrom/cd_none.c'; fi`25.310 -25.311 joy_linux.o: drivers/joy_linux.c25.312 @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT joy_linux.o -MD -MP -MF "$(DEPDIR)/joy_linux.Tpo" -c -o joy_linux.o `test -f 'drivers/joy_linux.c' || echo '$(srcdir)/'`drivers/joy_linux.c; \25.313 @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/joy_linux.Tpo" "$(DEPDIR)/joy_linux.Po"; else rm -f "$(DEPDIR)/joy_linux.Tpo"; exit 1; fi25.314 @@ -2617,7 +2647,8 @@25.315 clean: clean-recursive25.317 clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \25.318 - clean-noinstLIBRARIES clean-pkglibPROGRAMS mostlyclean-am25.319 + clean-noinstLIBRARIES clean-noinstPROGRAMS \25.320 + clean-pkglibPROGRAMS mostlyclean-am25.322 distclean: distclean-recursive25.323 -rm -rf ./$(DEPDIR)25.324 @@ -2669,19 +2700,19 @@25.326 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \25.327 check-am clean clean-binPROGRAMS clean-checkPROGRAMS \25.328 - clean-generic clean-noinstLIBRARIES clean-pkglibPROGRAMS \25.329 - clean-recursive ctags ctags-recursive distclean \25.330 - distclean-compile distclean-generic distclean-recursive \25.331 - distclean-tags distdir dvi dvi-am html html-am info info-am \25.332 - install install-am install-binPROGRAMS install-data \25.333 - install-data-am install-exec install-exec-am install-info \25.334 - install-info-am install-man install-pkglibPROGRAMS \25.335 - install-strip installcheck installcheck-am installdirs \25.336 - installdirs-am maintainer-clean maintainer-clean-generic \25.337 - maintainer-clean-recursive mostlyclean mostlyclean-compile \25.338 - mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \25.339 - tags tags-recursive uninstall uninstall-am \25.340 - uninstall-binPROGRAMS uninstall-info-am \25.341 + clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \25.342 + clean-pkglibPROGRAMS clean-recursive ctags ctags-recursive \25.343 + distclean distclean-compile distclean-generic \25.344 + distclean-recursive distclean-tags distdir dvi dvi-am html \25.345 + html-am info info-am install install-am install-binPROGRAMS \25.346 + install-data install-data-am install-exec install-exec-am \25.347 + install-info install-info-am install-man \25.348 + install-pkglibPROGRAMS install-strip installcheck \25.349 + installcheck-am installdirs installdirs-am maintainer-clean \25.350 + maintainer-clean-generic maintainer-clean-recursive \25.351 + mostlyclean mostlyclean-compile mostlyclean-generic \25.352 + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \25.353 + uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am \25.354 uninstall-pkglibPROGRAMS
26.1 --- a/src/display.c Sat Feb 25 21:27:06 2012 +100026.2 +++ b/src/display.c Sat Feb 25 21:30:49 2012 +100026.3 @@ -74,6 +74,19 @@26.4 struct keymap_entry *keymap[0];26.5 } *input_driver_entry_t;26.7 +26.8 +#ifndef GL_RGBA826.9 +#define GL_RGBA8 GL_RGBA8_OES26.10 +#endif26.11 +26.12 +#ifndef GL_RGB526.13 +#define GL_RGB5 GL_RGB56526.14 +#endif26.15 +26.16 +#ifndef GL_BGR26.17 +#define GL_BGR GL_BGRA26.18 +#endif26.19 +26.20 /**26.21 * Colour format information26.22 */
27.1 --- a/src/display.h Sat Feb 25 21:27:06 2012 +100027.2 +++ b/src/display.h Sat Feb 25 21:30:49 2012 +100027.3 @@ -32,9 +32,14 @@27.4 #include <OpenGL/gl.h>27.5 #include <OpenGL/glext.h>27.6 #else27.7 +#if HAVE_GLES227.8 +#include <GLES2/gl2.h>27.9 +#include <GLES2/gl2ext.h>27.10 +#else27.11 #include <GL/gl.h>27.12 #include <GL/glext.h>27.13 #endif27.14 +#endif27.16 #ifdef __cplusplus27.17 extern "C" {
28.1 --- a/src/drivers/video_gl.c Sat Feb 25 21:27:06 2012 +100028.2 +++ b/src/drivers/video_gl.c Sat Feb 25 21:30:49 2012 +100028.3 @@ -23,6 +23,11 @@28.4 #include "pvr2/glutil.h"28.5 #include "drivers/video_gl.h"28.7 +/* FIXME: Need to actually handle this case */28.8 +#ifndef GL_PACK_ROW_LENGTH28.9 +#define glPixelStorei(key,val)28.10 +#endif28.11 +28.12 uint32_t video_width, video_height;28.13 struct video_vertex {28.14 float x,y;28.15 @@ -89,15 +94,16 @@28.16 defineOrthoMatrix(video_box.viewMatrix, video_width, video_height, 0, 65535);28.17 }28.19 +#ifdef HAVE_OPENGL_FIXEDFUNC28.20 /**28.21 * Setup the gl context for writes to the display output.28.22 */28.23 void gl_framebuffer_setup()28.24 {28.25 + glViewport( 0, 0, video_width, video_height );28.26 glLoadMatrixf(video_box.viewMatrix);28.27 glBlendFunc( GL_ONE, GL_ZERO );28.28 glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );28.29 - glViewport( 0, 0, video_width, video_height );28.30 glVertexPointer(2, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].x);28.31 glColorPointer(3, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].r);28.32 glTexCoordPointer(2, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].u);28.33 @@ -106,6 +112,13 @@28.34 glEnableClientState( GL_TEXTURE_COORD_ARRAY );28.35 }28.37 +#else28.38 +void gl_framebuffer_setup()28.39 +{28.40 + /* TODO */28.41 +}28.42 +#endif28.43 +28.44 void gl_display_render_buffer( render_buffer_t buffer )28.45 {28.46 gl_texture_window( buffer->width, buffer->height, buffer->buf_id, buffer->inverted );
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000029.2 +++ b/src/gui_jni.c Sat Feb 25 21:30:49 2012 +100029.3 @@ -0,0 +1,103 @@29.4 +/**29.5 + * $Id$29.6 + *29.7 + * JNI wrappers for operating the emulator from Java.29.8 + *29.9 + * Copyright (c) 2012 Nathan Keynes.29.10 + *29.11 + * This program is free software; you can redistribute it and/or modify29.12 + * it under the terms of the GNU General Public License as published by29.13 + * the Free Software Foundation; either version 2 of the License, or29.14 + * (at your option) any later version.29.15 + *29.16 + * This program is distributed in the hope that it will be useful,29.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of29.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the29.19 + * GNU General Public License for more details.29.20 + */29.21 +29.22 +#include <jni.h>29.23 +#include <android/log.h>29.24 +#include <libisofs.h>29.25 +#include "dreamcast.h"29.26 +#include "gui.h"29.27 +#include "config.h"29.28 +#include "display.h"29.29 +#include "gdlist.h"29.30 +#include "hotkeys.h"29.31 +#include "serial.h"29.32 +#include "aica/audio.h"29.33 +#include "maple/maple.h"29.34 +#include "vmu/vmulist.h"29.35 +29.36 +JNIEXPORT void JNICALL Java_org_lxdream_Dreamcast_init(JNIEnv * env, jobject obj, jint width, jint height)29.37 +{29.38 + lxdream_make_config_dir( );29.39 + lxdream_load_config( );29.40 + iso_init();29.41 + gdrom_list_init();29.42 + vmulist_init();29.43 + dreamcast_init(1);29.44 +29.45 + audio_init_driver(NULL);29.46 + display_driver_t display_driver = get_display_driver_by_name(NULL);29.47 + display_set_driver(display_driver);29.48 +29.49 + hotkeys_init();29.50 + serial_init();29.51 + maple_reattach_all();29.52 + INFO( "%s! ready...", APP_NAME );29.53 +}29.54 +29.55 +JNIEXPORT void JNICALL Java_org_lxdream_Dreamcast_setViewSize(JNIEnv * env, jobject obj, jint width, jint height)29.56 +{29.57 +29.58 +}29.59 +29.60 +JNIEXPORT void JNICALL Java_org_lxdream_Dreamcast_run(JNIEnv * env, jobject obj)29.61 +{29.62 + dreamcast_run();29.63 +}29.64 +29.65 +JNIEXPORT void JNICALL Java_org_lxdream_Dreamcast_stop(JNIEnv * env, jobject obj)29.66 +{29.67 + dreamcast_stop();29.68 +}29.69 +29.70 +gboolean gui_parse_cmdline( int *argc, char **argv[] )29.71 +{29.72 + return TRUE;29.73 +}29.74 +29.75 +gboolean gui_init( gboolean debug, gboolean fullscreen )29.76 +{29.77 + return TRUE;29.78 +}29.79 +29.80 +void gui_main_loop( gboolean run ) {29.81 + if( run ) {29.82 + dreamcast_run();29.83 + }29.84 +}29.85 +29.86 +gboolean gui_error_dialog( const char *fmt, ... )29.87 +{29.88 + return TRUE;29.89 +}29.90 +29.91 +void gui_update_state()29.92 +{29.93 +}29.94 +29.95 +void gui_set_use_grab( gboolean grab )29.96 +{29.97 +}29.98 +29.99 +void gui_update_io_activity( io_activity_type activity, gboolean active )29.100 +{29.101 +}29.102 +29.103 +void gui_do_later( do_later_callback_t func )29.104 +{29.105 + func();29.106 +}
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000030.2 +++ b/src/gui_none.c Sat Feb 25 21:30:49 2012 +100030.3 @@ -0,0 +1,58 @@30.4 +/**30.5 + * $Id$30.6 + *30.7 + * Dummy GUI implementation for headless systems.30.8 + *30.9 + * Copyright (c) 2012 Nathan Keynes.30.10 + *30.11 + * This program is free software; you can redistribute it and/or modify30.12 + * it under the terms of the GNU General Public License as published by30.13 + * the Free Software Foundation; either version 2 of the License, or30.14 + * (at your option) any later version.30.15 + *30.16 + * This program is distributed in the hope that it will be useful,30.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of30.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the30.19 + * GNU General Public License for more details.30.20 + */30.21 +30.22 +#include "gui.h"30.23 +30.24 +gboolean gui_parse_cmdline( int *argc, char **argv[] )30.25 +{30.26 + return TRUE;30.27 +}30.28 +30.29 +gboolean gui_init( gboolean debug, gboolean fullscreen )30.30 +{30.31 + return TRUE;30.32 +}30.33 +30.34 +void gui_main_loop( gboolean run ) {30.35 + if( run ) {30.36 + dreamcast_run();30.37 + }30.38 +}30.39 +30.40 +gboolean gui_error_dialog( const char *fmt, ... )30.41 +{30.42 + return TRUE;30.43 +}30.44 +30.45 +void gui_update_state()30.46 +{30.47 +}30.48 +30.49 +void gui_set_use_grab( gboolean grab )30.50 +{30.51 +}30.52 +30.53 +void gui_update_io_activity( io_activity_type activity, gboolean active )30.54 +{30.55 +}30.56 +30.57 +void gui_do_later( do_later_callback_t func )30.58 +{30.59 + func();30.60 +}30.61 +
31.1 --- a/src/tools/Makefile.in Sat Feb 25 21:27:06 2012 +100031.2 +++ b/src/tools/Makefile.in Sat Feb 25 21:30:49 2012 +100031.3 @@ -41,7 +41,8 @@31.4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in31.5 ACLOCAL_M4 = $(top_srcdir)/aclocal.m431.6 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \31.7 - $(top_srcdir)/m4/ccforbuild.m4 $(top_srcdir)/configure.in31.8 + $(top_srcdir)/m4/ccforbuild.m4 $(top_srcdir)/m4/android.m4 \31.9 + $(top_srcdir)/configure.in31.10 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \31.11 $(ACLOCAL_M4)31.12 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs31.13 @@ -77,6 +78,11 @@31.14 AMDEP_FALSE = @AMDEP_FALSE@31.15 AMDEP_TRUE = @AMDEP_TRUE@31.16 AMTAR = @AMTAR@31.17 +ANDROID_GDBSERVER = @ANDROID_GDBSERVER@31.18 +ANDROID_NDK_HOME = @ANDROID_NDK_HOME@31.19 +ANDROID_SDK_HOME = @ANDROID_SDK_HOME@31.20 +ANDROID_SDK_VERSION = @ANDROID_SDK_VERSION@31.21 +ANT = @ANT@31.22 ARMCC = @ARMCC@31.23 ARMLD = @ARMLD@31.24 ARMOBJCOPY = @ARMOBJCOPY@31.25 @@ -145,6 +151,8 @@31.26 GREP = @GREP@31.27 GTK_CFLAGS = @GTK_CFLAGS@31.28 GTK_LIBS = @GTK_LIBS@31.29 +GUI_ANDROID_FALSE = @GUI_ANDROID_FALSE@31.30 +GUI_ANDROID_TRUE = @GUI_ANDROID_TRUE@31.31 GUI_COCOA_FALSE = @GUI_COCOA_FALSE@31.32 GUI_COCOA_TRUE = @GUI_COCOA_TRUE@31.33 GUI_GTK_FALSE = @GUI_GTK_FALSE@
32.1 --- a/src/util.c Sat Feb 25 21:27:06 2012 +100032.2 +++ b/src/util.c Sat Feb 25 21:30:49 2012 +100032.3 @@ -23,6 +23,7 @@32.4 #include <stdarg.h>32.5 #include <stdio.h>32.6 #include <stdlib.h>32.7 +#include <unistd.h>32.8 #include <signal.h>32.9 #include <time.h>32.10 #include <zlib.h>32.11 @@ -34,6 +35,11 @@32.12 #include "gui.h"32.13 #include "sh4/sh4.h"32.15 +#ifdef __ANDROID__32.16 +#include <android/log.h>32.17 +static int android_log_levels[] = {ANDROID_LOG_FATAL, ANDROID_LOG_ERROR, ANDROID_LOG_WARN, ANDROID_LOG_INFO, ANDROID_LOG_DEBUG, ANDROID_LOG_VERBOSE};32.18 +#endif32.19 +32.20 char *msg_levels[] = { "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" };32.21 int global_msg_level = EMIT_WARN;32.23 @@ -344,8 +350,11 @@32.24 }32.25 }32.27 -32.28 strftime( buf, sizeof(buf), "%H:%M:%S", localtime(&tm) );32.29 +#ifdef __ANDROID__32.30 + __android_log_print(android_log_levels[level], "lxdream", "%s %08X %s\n", buf, sh4r.pc, text );32.31 +#else32.32 fprintf( stderr, "%s %08X %-5s %s\n", buf, sh4r.pc, msg_levels[level], text );32.33 +#endif32.34 g_free(text);32.35 }
.