SQLite4
Check-in [7bf5b6c8d0]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New autoconf/make apparatus. Usage:

./autogen.sh ./configure make

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7bf5b6c8d0fe0ce9d23668ffb9ffe48ea3697e83
User & Date: owensmk 2013-03-04 22:37:29
Context
2013-03-08
09:59
Merge prefix-mmap branch with trunk. This allows lsm to memory map a prefix of the database file and use regular read and write system calls to access the remainder. check-in: 02954a5b8d user: dan tags: trunk
2013-03-06
20:15
Allow accessing a prefix of the database file using mmap and the remainder using read and write. check-in: abe0420724 user: dan tags: prefix-mmap
2013-03-04
22:37
New autoconf/make apparatus. Usage:

./autogen.sh ./configure make check-in: 7bf5b6c8d0 user: owensmk tags: trunk

17:09
Merge xPutMeta and xGetMeta related changes from experimental branch. check-in: 03550f6b28 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added Make.defines.

            1  +DEBUG_ON      = -D DEBUG
            2  +DEBUG_OFF     = -O2
            3  +PROFILE_ON    = -pg --profile-arcs --test-coverage
            4  +PROFILE_OFF   = 
            5  +PROFILING     = $(PROFILE_OFF)
            6  +DEBUGGING	  = $(DEBUG_ON)
            7  +
            8  +NAME          = sqlite4
            9  +
           10  +# The toplevel directory of the source tree.  This is the directory that
           11  +# contains this "Makefile.in" and the "configure.in" script.
           12  +
           13  +TOP = .
           14  +
           15  +###############################################################################
           16  +# The following macros should be defined before this script is
           17  +# invoked:
           18  +#
           19  +# TOP              The toplevel directory of the source tree.  This is the
           20  +#                  directory that contains files "VERSION" and "README".
           21  +#
           22  +# BCC              C Compiler and options for use in building executables that
           23  +#                  will run on the platform that is doing the build.
           24  +#
           25  +# TCC              C Compiler and options for use in building executables that 
           26  +#                  will run on the target platform.  This is usually the same
           27  +#                  as BCC, unless you are cross-compiling.
           28  +#
           29  +# THREADLIB        Specify any extra linker options needed to make the library
           30  +#                  thread safe
           31  +#
           32  +# OPTS             Extra compiler command-line options for the TCC compiler
           33  +#
           34  +# EXE              The suffix to add to executable files.  ".exe" for windows
           35  +#                  and "" for Unix.
           36  +#
           37  +# AR               Tools used to build a static library.
           38  +# RANLIB
           39  +#
           40  +# TCL_FLAGS        Extra compiler options needed for programs that use the
           41  +#                  TCL library.
           42  +#
           43  +# LIBTCL           Linker options needed to link against the TCL library.
           44  +#
           45  +# READLINE_FLAGS   Compiler options needed for programs that use the
           46  +#                  readline() library.
           47  +#
           48  +# LIBREADLINE      Linker options needed by programs using readline() must
           49  +#                  link against.
           50  +#
           51  +# NAWK             Nawk compatible awk program.  Older (obsolete?) solaris
           52  +#                  systems need this to avoid using the original AT&T AWK.
           53  +#
           54  +# Once the macros above are defined, the rest of this make script will
           55  +# build the SQLite library and testing tools.
           56  +
           57  +# Tools used to build a static library
           58  +
           59  +AR     = ar cr
           60  +RANLIB = ranlib
           61  +
           62  +# Linker options needed to link against the TCL library.
           63  +#LIBTCL = -ltcl8.4 -lm -ldl
           64  +LIBTCL = -ltcl8.6 -lm -lpthread -ldl -lz
           65  +
           66  +# Extra compiler options needed for programs that use the TCL library.
           67  +# TCL_FLAGS = -DSTATIC_BUILD=1
           68  +
           69  +# Compiler options needed for programs that use the readline() library.
           70  +READLINE_FLAGS =
           71  +#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
           72  +
           73  +# Linker options needed by programs using readline() must link against.
           74  +LIBREADLINE = -ldl -lpthread
           75  +#LIBREADLINE = -static -lreadline -ltermcap
           76  +
           77  +# Should the database engine assume text is coded as UTF-8 or iso8859?
           78  +ENCODING  = UTF8
           79  +#ENCODING = ISO8859
           80  +
           81  +# Math library
           82  +MATHLIB = -lm
           83  +
           84  +# AWK (Needed by brain-dead Solaris systems)
           85  +NAWK = awk
           86  +
           87  +# THREADLIB  Libraries needed for threadtest 
           88  +THREADLIB = -ldl -lpthread
           89  +
           90  +LIBOBJ+= vdbe.o parse.o \
           91  +         alter.o analyze.o attach.o auth.o \
           92  +         build.o \
           93  +         callback.o complete.o ctime.o date.o delete.o env.o expr.o \
           94  +         fault.o fkey.o fts5.o fts5func.o \
           95  +         func.o global.o hash.o \
           96  +         icu.o insert.o kv.o kvlsm.o kvmem.o legacy.o \
           97  +         lsm_ckpt.o lsm_file.o lsm_log.o lsm_main.o lsm_mem.o lsm_mutex.o \
           98  +         lsm_shared.o lsm_str.o lsm_sorted.o lsm_tree.o \
           99  +         lsm_unix.o lsm_varint.o \
          100  +         main.o malloc.o math.o mem.o mem0.o mem1.o mem2.o mem3.o mem5.o \
          101  +         mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
          102  +         opcodes.o os.o \
          103  +         pragma.o prepare.o printf.o \
          104  +         random.o resolve.o rowset.o rtree.o select.o status.o \
          105  +         tokenize.o trigger.o \
          106  +         update.o util.o varint.o \
          107  +         vdbeapi.o vdbeaux.o vdbecodec.o vdbecursor.o \
          108  +         vdbemem.o vdbetrace.o \
          109  +         walker.o where.o utf.o
          110  +
          111  +# All of the source code files.
          112  +SRC = \
          113  +  $(TOP)/src/alter.c \
          114  +  $(TOP)/src/analyze.c \
          115  +  $(TOP)/src/attach.c \
          116  +  $(TOP)/src/auth.c \
          117  +  $(TOP)/src/build.c \
          118  +  $(TOP)/src/callback.c \
          119  +  $(TOP)/src/complete.c \
          120  +  $(TOP)/src/ctime.c \
          121  +  $(TOP)/src/date.c \
          122  +  $(TOP)/src/delete.c \
          123  +  $(TOP)/src/env.c \
          124  +  $(TOP)/src/expr.c \
          125  +  $(TOP)/src/fault.c \
          126  +  $(TOP)/src/fkey.c \
          127  +  $(TOP)/src/fts5.c \
          128  +  $(TOP)/src/fts5func.c \
          129  +  $(TOP)/src/func.c \
          130  +  $(TOP)/src/global.c \
          131  +  $(TOP)/src/hash.c \
          132  +  $(TOP)/src/hash.h \
          133  +  $(TOP)/src/hwtime.h \
          134  +  $(TOP)/src/insert.c \
          135  +  $(TOP)/src/kv.c \
          136  +  $(TOP)/src/kv.h \
          137  +  $(TOP)/src/kvlsm.c \
          138  +  $(TOP)/src/kvmem.c \
          139  +  $(TOP)/src/legacy.c \
          140  +  $(TOP)/src/lsm.h \
          141  +  $(TOP)/src/lsmInt.h \
          142  +  $(TOP)/src/lsm_ckpt.c \
          143  +  $(TOP)/src/lsm_file.c \
          144  +  $(TOP)/src/lsm_log.c \
          145  +  $(TOP)/src/lsm_main.c \
          146  +  $(TOP)/src/lsm_mem.c \
          147  +  $(TOP)/src/lsm_mutex.c \
          148  +  $(TOP)/src/lsm_shared.c \
          149  +  $(TOP)/src/lsm_str.c \
          150  +  $(TOP)/src/lsm_sorted.c \
          151  +  $(TOP)/src/lsm_tree.c \
          152  +  $(TOP)/src/lsm_unix.c \
          153  +  $(TOP)/src/lsm_varint.c \
          154  +  $(TOP)/src/main.c \
          155  +  $(TOP)/src/malloc.c \
          156  +  $(TOP)/src/math.c \
          157  +  $(TOP)/src/mem.c \
          158  +  $(TOP)/src/mem0.c \
          159  +  $(TOP)/src/mem1.c \
          160  +  $(TOP)/src/mem2.c \
          161  +  $(TOP)/src/mem3.c \
          162  +  $(TOP)/src/mem5.c \
          163  +  $(TOP)/src/mutex.c \
          164  +  $(TOP)/src/mutex.h \
          165  +  $(TOP)/src/mutex_noop.c \
          166  +  $(TOP)/src/mutex_unix.c \
          167  +  $(TOP)/src/mutex_w32.c \
          168  +  $(TOP)/src/os.c \
          169  +  $(TOP)/src/os.h \
          170  +  $(TOP)/src/parse.y \
          171  +  $(TOP)/src/pragma.c \
          172  +  $(TOP)/src/prepare.c \
          173  +  $(TOP)/src/printf.c \
          174  +  $(TOP)/src/random.c \
          175  +  $(TOP)/src/resolve.c \
          176  +  $(TOP)/src/rowset.c \
          177  +  $(TOP)/src/select.c \
          178  +  $(TOP)/src/shell.c \
          179  +  $(TOP)/src/sqlite.h.in \
          180  +  $(TOP)/src/sqliteInt.h \
          181  +  $(TOP)/src/sqliteLimit.h \
          182  +  $(TOP)/src/status.c \
          183  +  $(TOP)/src/tclsqlite.c \
          184  +  $(TOP)/src/tokenize.c \
          185  +  $(TOP)/src/trigger.c \
          186  +  $(TOP)/src/utf.c \
          187  +  $(TOP)/src/update.c \
          188  +  $(TOP)/src/util.c \
          189  +  $(TOP)/src/varint.c \
          190  +  $(TOP)/src/vdbe.c \
          191  +  $(TOP)/src/vdbe.h \
          192  +  $(TOP)/src/vdbeapi.c \
          193  +  $(TOP)/src/vdbeaux.c \
          194  +  $(TOP)/src/vdbecodec.c \
          195  +  $(TOP)/src/vdbecursor.c \
          196  +  $(TOP)/src/vdbemem.c \
          197  +  $(TOP)/src/vdbetrace.c \
          198  +  $(TOP)/src/vdbeInt.h \
          199  +  $(TOP)/src/walker.c \
          200  +  $(TOP)/src/where.c
          201  +
          202  +# Source code for extensions
          203  +SRC += \
          204  +  $(TOP)/ext/fts3/fts3.c \
          205  +  $(TOP)/ext/fts3/fts3.h \
          206  +  $(TOP)/ext/fts3/fts3Int.h \
          207  +  $(TOP)/ext/fts3/fts3_aux.c \
          208  +  $(TOP)/ext/fts3/fts3_expr.c \
          209  +  $(TOP)/ext/fts3/fts3_hash.c \
          210  +  $(TOP)/ext/fts3/fts3_hash.h \
          211  +  $(TOP)/ext/fts3/fts3_icu.c \
          212  +  $(TOP)/ext/fts3/fts3_porter.c \
          213  +  $(TOP)/ext/fts3/fts3_snippet.c \
          214  +  $(TOP)/ext/fts3/fts3_tokenizer.h \
          215  +  $(TOP)/ext/fts3/fts3_tokenizer.c \
          216  +  $(TOP)/ext/fts3/fts3_tokenizer1.c \
          217  +  $(TOP)/ext/fts3/fts3_write.c
          218  +SRC += \
          219  +  $(TOP)/ext/icu/sqliteicu.h \
          220  +  $(TOP)/ext/icu/icu.c
          221  +SRC += \
          222  +  $(TOP)/ext/rtree/rtree.h \
          223  +  $(TOP)/ext/rtree/rtree.c
          224  +
          225  +# Generated source code files
          226  +SRC += \
          227  +  keywordhash.h \
          228  +  opcodes.c \
          229  +  opcodes.h \
          230  +  parse.c \
          231  +  parse.h \
          232  +  sqlite4.h
          233  +
          234  +# Source code to the test files.
          235  +TESTSRC = \
          236  +  $(TOP)/test/test_main.c \
          237  +  $(TOP)/test/test_thread0.c \
          238  +  $(TOP)/test/test_utf.c \
          239  +  $(TOP)/test/test_misc1.c \
          240  +  $(TOP)/test/test_config.c \
          241  +  $(TOP)/test/test_func.c \
          242  +  $(TOP)/test/test_hexio.c \
          243  +  $(TOP)/test/test_lsm.c \
          244  +  $(TOP)/test/test_kv.c \
          245  +  $(TOP)/test/test_kv2.c \
          246  +  $(TOP)/test/test_malloc.c \
          247  +  $(TOP)/test/test_mem.c \
          248  +  $(TOP)/test/test_mutex.c \
          249  +  $(TOP)/test/test_thread.c \
          250  +  $(TOP)/test/test_wsd.c
          251  +
          252  +#TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
          253  +#TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
          254  +
          255  +TESTSRC2 = \
          256  +  $(TOP)/src/attach.c \
          257  +  $(TOP)/src/build.c \
          258  +  $(TOP)/src/date.c \
          259  +  $(TOP)/src/expr.c \
          260  +  $(TOP)/src/fts5.c \
          261  +  $(TOP)/src/fts5func.c \
          262  +  $(TOP)/src/func.c \
          263  +  $(TOP)/src/insert.c \
          264  +  $(TOP)/src/mem5.c \
          265  +  $(TOP)/src/os.c \
          266  +  $(TOP)/src/pragma.c \
          267  +  $(TOP)/src/prepare.c \
          268  +  $(TOP)/src/printf.c \
          269  +  $(TOP)/src/random.c \
          270  +  $(TOP)/src/select.c \
          271  +  $(TOP)/src/tokenize.c \
          272  +  $(TOP)/src/utf.c \
          273  +  $(TOP)/src/util.c \
          274  +  $(TOP)/src/vdbeapi.c \
          275  +  $(TOP)/src/vdbeaux.c \
          276  +  $(TOP)/src/vdbe.c \
          277  +  $(TOP)/src/vdbemem.c \
          278  +  $(TOP)/src/where.c \
          279  +  parse.c \
          280  +
          281  +# Header files used by all library source files.
          282  +HDR = \
          283  +   $(TOP)/src/hash.h \
          284  +   $(TOP)/src/hwtime.h \
          285  +   keywordhash.h \
          286  +   $(TOP)/src/kv.h \
          287  +   $(TOP)/src/lsm.h \
          288  +   $(TOP)/src/lsmInt.h \
          289  +   $(TOP)/src/mutex.h \
          290  +   opcodes.h \
          291  +   $(TOP)/src/os.h \
          292  +   parse.h  \
          293  +   sqlite4.h  \
          294  +   $(TOP)/src/sqliteInt.h  \
          295  +   $(TOP)/src/sqliteLimit.h \
          296  +   $(TOP)/src/vdbe.h \
          297  +   $(TOP)/src/vdbeInt.h
          298  +
          299  +EXTHDR = \
          300  +  $(TOP)/ext/fts3/fts3.h \
          301  +  $(TOP)/ext/fts3/fts3Int.h \
          302  +  $(TOP)/ext/fts3/fts3_hash.h \
          303  +  $(TOP)/ext/fts3/fts3_tokenizer.h
          304  +EXTHDR += \
          305  +  $(TOP)/ext/rtree/rtree.h
          306  +EXTHDR += \
          307  +  $(TOP)/ext/icu/sqliteicu.h
          308  +
          309  +LSMTESTSRC = $(TOP)/lsm-test/lsmtest1.c $(TOP)/lsm-test/lsmtest2.c           \
          310  +             $(TOP)/lsm-test/lsmtest3.c $(TOP)/lsm-test/lsmtest4.c           \
          311  +             $(TOP)/lsm-test/lsmtest5.c $(TOP)/lsm-test/lsmtest6.c           \
          312  +             $(TOP)/lsm-test/lsmtest7.c $(TOP)/lsm-test/lsmtest8.c           \
          313  +             $(TOP)/lsm-test/lsmtest9.c                                      \
          314  +             $(TOP)/lsm-test/lsmtest_datasource.c \
          315  +             $(TOP)/lsm-test/lsmtest_func.c $(TOP)/lsm-test/lsmtest_io.c     \
          316  +             $(TOP)/lsm-test/lsmtest_main.c $(TOP)/lsm-test/lsmtest_mem.c    \
          317  +             $(TOP)/lsm-test/lsmtest_tdb.c $(TOP)/lsm-test/lsmtest_tdb3.c    \
          318  +             $(TOP)/lsm-test/lsmtest_util.c 
          319  +
          320  +LSMTESTHDR = $(TOP)/lsm-test/lsmtest.h $(TOP)/lsm-test/lsmtest_tdb.h

Added Make.freebsd.

            1  +# FreeBSD build configuration
            2  +
            3  +include Make.unix
            4  +

Added Make.linux.

            1  +# Linux build configuration
            2  +
            3  +include Make.unix
            4  +
            5  +# Pick a compiler...
            6  +compiler ?= gcc
            7  +compiler ?= tcc
            8  +compiler ?= clang
            9  +
           10  +########################################################################
           11  +# LIBTCL compile/link flags
           12  +TCL_FLAGS ?= -I/usr/include/tcl
           13  +LIBTCL ?= -L/usr/lib -ltcl8.5 -lm -ldl
           14  +
           15  +########################################################################
           16  +# TCC=Compiler for target platform binaries.
           17  +# BCC=Compiler for local native binaries.
           18  +ifeq (gcc,$(compiler))
           19  +  BCC ?= gcc -g -fPIC -UNDEBUG -DDEBUG -Wall
           20  +  BCC += -std=c89
           21  +endif
           22  +ifeq (tcc,$(compiler))
           23  +  BCC ?= tcc -g -Wall
           24  +endif
           25  +ifeq (clang,$(compiler))
           26  +  BCC ?= clang -g -Wall
           27  +endif
           28  +
           29  +# Force regeneration of sqlite4.h if any makefiles change...
           30  +parse.h sqlite4.h: $(MAKEFILE_LIST)
           31  +$(MAKEFILE_LIST):
           32  +

Added Make.mingw.

            1  +# MingGW build configuration
            2  +
            3  +include Make.win

Added Make.opts.

            1  +
            2  +################################################################################
            3  +
            4  +OPTS ?=# leave this blank
            5  +
            6  +# FIXME:  Required options for now.
            7  +
            8  +OPTS += -DLSM_MUTEX_NONE
            9  +OPTS += -DSQLITE4_DEBUG=1 -DLSM_DEBUG=1
           10  +OPTS += -DHAVE_GMTIME_R
           11  +OPTS += -DHAVE_LOCALTIME_R
           12  +OPTS += -DHAVE_MALLOC_USABLE_SIZE
           13  +OPTS += -DHAVE_USLEEP
           14  +OPTS += -DSQLITE4_MEMDEBUG=1
           15  +#OPTS += -DSQLITE4_NO_SYNC=1 -DLSM_NO_SYNC=1
           16  +OPTS += -DSQLITE4_OMIT_ANALYZE
           17  +OPTS += -DSQLITE4_OMIT_AUTOMATIC_INDEX
           18  +OPTS += -DSQLITE4_OMIT_BTREECOUNT
           19  +OPTS += -DSQLITE4_OMIT_VIRTUALTABLE=1
           20  +OPTS += -DSQLITE4_OMIT_XFER_OPT
           21  +OPTS += -DSQLITE4_THREADSAFE=0
           22  +
           23  +#### Leave SQLITE4_DEBUG undefined for maximum speed.  Use SQLITE4_DEBUG=1
           24  +#    to check for memory leaks.  Use SQLITE4_DEBUG=2 to print a log of all
           25  +#    malloc()s and free()s in order to track down memory leaks.
           26  +#    
           27  +#    SQLite uses some expensive assert() statements in the inner loop.
           28  +#    You can make the library go almost twice as fast if you compile
           29  +#    with -DNDEBUG=1
           30  +#
           31  +#OPTS += -DHAVE_DLOPEN
           32  +OPTS += -DSQLITE4_DEBUG=1
           33  +OPTS += -DHAVE_GMTIME_R
           34  +OPTS += -DHAVE_LOCALTIME_R
           35  +OPTS += -DHAVE_MALLOC_USABLE_SIZE
           36  +OPTS += -DHAVE_USLEEP
           37  +
           38  +#OPTS += -DSQLITE4_DEBUG=2
           39  +#OPTS += -DSQLITE4_DEBUG=1
           40  +OPTS += -DNDEBUG=1
           41  +OPTS += -DHAVE_FDATASYNC=1
           42  +
           43  +#OPTS += -DLONGDOUBLE_TYPE=double
           44  +#OPTS += -DSQLITE4_64BIT_STATS
           45  +#OPTS += -DSQLITE4_CASE_SENSITIVE_LIKE
           46  +#OPTS += -DSQLITE4_CHECK_PAGES
           47  +#OPTS += -DSQLITE4_COVERAGE_TEST
           48  +#OPTS += -DSQLITE4_DEBUG
           49  +#OPTS += -DSQLITE4_DEFAULT_AUTOVACUUM=1
           50  +#OPTS += -DSQLITE4_DEFAULT_CACHE_SIZE=64
           51  +#OPTS += -DSQLITE4_DEFAULT_FILE_FORMAT=4
           52  +#OPTS += -DSQLITE4_DEFAULT_MEMSTATUS=0
           53  +#OPTS += -DSQLITE4_DEFAULT_PAGE_SIZE=1024
           54  +#OPTS += -DSQLITE4_DEFAULT_TEMP_CACHE_SIZE=32
           55  +#OPTS += -DSQLITE4_DISABLE_LFS=1
           56  +#OPTS += -DSQLITE4_ENABLE_8_3_NAMES
           57  +#OPTS += -DSQLITE4_ENABLE_ASYNCIO
           58  +#OPTS += -DSQLITE4_ENABLE_ATOMIC_WRITE
           59  +#OPTS += -DSQLITE4_ENABLE_COLUMN_METADATA
           60  +#OPTS += -DSQLITE4_ENABLE_EXPENSIVE_ASSERT
           61  +#OPTS += -DSQLITE4_ENABLE_FTS3
           62  +#OPTS += -DSQLITE4_ENABLE_FTS4
           63  +#OPTS += -DSQLITE4_ENABLE_FTS3_PARENTHESIS
           64  +#OPTS += -DSQLITE4_ENABLE_INSTVFS=1
           65  +#OPTS += -DSQLITE4_ENABLE_ICU
           66  +#OPTS += -DSQLITE4_ENABLE_IOTRACE=1
           67  +#OPTS += -DSQLITE4_ENABLE_LOAD_EXTENSION=1
           68  +#OPTS += -DSQLITE4_ENABLE_LOCKING_STYLE=1
           69  +#OPTS += -DSQLITE4_ENABLE_MEMORY_MANAGEMENT=1
           70  +#OPTS += -DSQLITE4_ENABLE_MEMSYS3=1
           71  +#OPTS += -DSQLITE4_ENABLE_MEMSYS5=1
           72  +#OPTS += -DSQLITE4_ENABLE_OVERSIZE_CELL_CHECK
           73  +#OPTS += -DSQLITE4_ENABLE_PREUPDATE_HOOK
           74  +#OPTS += -DSQLITE4_ENABLE_RTREE
           75  +#OPTS += -DSQLITE4_ENABLE_RTREE -DVARIANT_RSTARTREE_CHOOSESUBTREE
           76  +#OPTS += -DSQLITE4_ENABLE_SESSION
           77  +#OPTS += -DSQLITE4_ENABLE_STAT2
           78  +#OPTS += -DSQLITE4_ENABLE_STAT3
           79  +#OPTS += -DSQLITE4_ENABLE_TREE_EXPLAIN
           80  +#OPTS += -DSQLITE4_ENABLE_UNLOCK_NOTIFY
           81  +#OPTS += -DSQLITE4_ENABLE_UPDATE_DELETE_LIMIT
           82  +#OPTS += '-DSQLITE4_FILE_HEADER="MotorolaDB v001"'
           83  +#OPTS += -DSQLITE4_HAVE_ISNAN
           84  +#OPTS += -DSQLITE4_HOMEGROWN_RECURSIVE_MUTEX=1
           85  +#OPTS += -DSQLITE4_INT64_TYPE=int
           86  +#OPTS += -DSQLITE4_LOCK_TRACE
           87  +#OPTS += -DSQLITE4_MALLOC_SOFT_LIMIT=1024
           88  +#OPTS += -DSQLITE4_MAX_EXPR_DEPTH=0
           89  +#OPTS += -DSQLITE4_MAX_PAGE_SIZE=4096
           90  +#OPTS += -DSQLITE4_MAX_VARIABLE_NUMBER=500000
           91  +#OPTS += -DSQLITE4_MEMDEBUG=1
           92  +#OPTS += -DSQLITE4_MIXED_ENDIAN_64BIT_FLOAT=1
           93  +#OPTS += -DSQLITE4_MUTEX_NOOP=1
           94  +#OPTS += -DNO_GETTOD=1
           95  +OPTS += -DSQLITE4_NO_SYNC=1
           96  +#OPTS += -DSQLITE4_OMIT_ALTER_TABLE=1
           97  +#OPTS += -DSQLITE4_OMIT_AUTOMATIC_INDEX
           98  +#OPTS += -DSQLITE4_OMIT_AUTOVACUUM=1
           99  +#OPTS += -DSQLITE4_OMIT_BLOB_LITERAL=1
          100  +#OPTS += -DSQLITE4_OMIT_CHECK=1
          101  +#OPTS += -DSQLITE4_OMIT_DATETIME_FUNCS=1
          102  +#OPTS += -DSQLITE4_OMIT_DEPRECATED=1
          103  +#OPTS += -DSQLITE4_OMIT_DISKIO
          104  +#OPTS += -DSQLITE4_OMIT_FLOATING_POINT=1
          105  +#OPTS += -DSQLITE4_OMIT_ICU_LIKE
          106  +#OPTS += -DSQLITE4_OMIT_LOAD_EXTENSION=1
          107  +#OPTS += -DSQLITE4_OMIT_LOOKASIDE=1
          108  +#OPTS += -DSQLITE4_OMIT_MEMORYDB=1
          109  +#OPTS += -DSQLITE4_OMIT_MERGE_SORT=1
          110  +#OPTS += -DSQLITE4_OMIT_PROGESS_CALLBACK=1
          111  +#OPTS += -DSQLITE4_OMIT_REINDEX=1
          112  +#OPTS += -DSQLITE4_OMIT_SHARED_CACHE=1
          113  +#OPTS += -DSQLITE4_OMIT_TRACE=1
          114  +#OPTS += -DSQLITE4_OMIT_UTF16=1
          115  +#OPTS += -DSQLITE4_OMIT_VIEW=1
          116  +#OPTS += -DSQLITE4_OMIT_VIRTUALTABLE=1
          117  +#OPTS += -DSQLITE4_OMIT_WAL
          118  +#OPTS += -DSQLITE4_OMIT_WSD=1
          119  +#OPTS += -DSQLITE4_OS_OTHER=1
          120  +#OPTS += -DSQLITE4_OS_UNIX=1
          121  +#OPTS += -DSQLITE4_PCACHE_SEPARATE_HEADER
          122  +#OPTS += -DSQLITE4_PAGECACHE_BLOCKALLOC
          123  +#OPTS += -DSQLITE4_SECURE_DELETE=1
          124  +#OPTS += '-DSQLITE4_SHM_DIRECTORY="/dev/shm"'
          125  +#OPTS += -DSQLITE4_SMALL_STACK
          126  +#OPTS += -DSQLITE4_SOUNDEX=1
          127  +#OPTS += -DSQLITE4_TCL_DEFAULT_FULLMUTEX=1
          128  +#OPTS += -DSQLITE4_TEMP_STORE=3
          129  +#OPTS += -DSQLITE4_THREADSAFE=0
          130  +#OPTS += -DSQLITE4_THREADSAFE=1
          131  +#OPTS += -DSQLITE4_USE_ALLOCA
          132  +#OPTS += -DSQLITE4_ZERO_MALLOC=1
          133  +#OPTS += -DUSE_PREAD64=1
          134  +#OPTS += -DYYSTACKDEPTH=0
          135  +#OPTS += -DSQLITE4_DEFAULT_AUTOVACUUM=1
          136  +#OPTS += -DSQLITE4_DEFAULT_CACHE_SIZE=64
          137  +#OPTS += -DSQLITE4_DEFAULT_PAGE_SIZE=1024
          138  +#OPTS += -DSQLITE4_DEFAULT_TEMP_CACHE_SIZE=32
          139  +#OPTS += -DSQLITE4_DISABLE_LFS=1
          140  +#OPTS += -DSQLITE4_ENABLE_ATOMIC_WRITE=1
          141  +#OPTS += -DSQLITE4_ENABLE_IOTRACE=1
          142  +#OPTS += -DSQLITE4_ENABLE_MEMORY_MANAGEMENT=1
          143  +#OPTS += -DSQLITE4_MAX_PAGE_SIZE=4096
          144  +#OPTS += -DSQLITE4_OMIT_LOAD_EXTENSION=1
          145  +#OPTS += -DSQLITE4_OMIT_PROGRESS_CALLBACK=1
          146  +#OPTS += -DSQLITE4_OMIT_VIRTUALTABLE=1
          147  +#OPTS += -DSQLITE4_TEMP_STORE=3

Added Make.solaris.

            1  +# Solaris build configuration
            2  +
            3  +include Make.unix
            4  +

Added Make.unix.

            1  +# Linux/UNIX build configuration
            2  +
            3  +ADDCFLAGS     = -ggdb -D UNIX -D_REENTRANT -W -fPIC
            4  +ADDCPPFLAGS   = 
            5  +ADDLDFLAGS    = -D_REENTRANT -L $(PREFIX)/lib 
            6  +ADDLIBS       = -pthread
            7  +DSO_EXTENSION = so
            8  +INCPATHS      = -I $(PREFIX)/include
            9  +
           10  +# C Compiler and options for use in building executables that will run on the
           11  +# platform that is doing the build.
           12  +
           13  +BCC = clang -g
           14  +#BCC = /opt/ancic/bin/c89 -0
           15  +
           16  +# If the target operating system supports the "usleep()" system call, then
           17  +# define the HAVE_USLEEP macro for all C modules.
           18  +
           19  +#USLEEP = 
           20  +USLEEP = -DHAVE_USLEEP=1
           21  +
           22  +#### If you want the SQLite library to be safe for use within a 
           23  +#    multi-threaded program, then define the following macro
           24  +#    appropriately:
           25  +#
           26  +#THREADSAFE = -DTHREADSAFE=1
           27  +THREADSAFE = -DTHREADSAFE=0
           28  +
           29  +#### Specify any extra linker options needed to make the library
           30  +#    thread safe
           31  +#
           32  +#THREADLIB = -lpthread
           33  +THREADLIB = 
           34  +
           35  +#### Specify any extra libraries needed to access required functions.
           36  +#
           37  +#TLIBS = -lrt    # fdatasync on Solaris 8
           38  +TLIBS = 
           39  +
           40  +# Compiler Settings
           41  +
           42  +#### C Compile and options for use in building executables that 
           43  +#    will run on the target platform.  This is usually the same
           44  +#    as BCC, unless you are cross-compiling.
           45  +#
           46  +#TCC = gcc -O6
           47  +TCC = gcc -g -rdynamic -O0 -Wall -fstrict-aliasing
           48  +#TCC = clang -g -O0 -Wall -fstrict-aliasing
           49  +#TCC = gcc420 -g -O2 -Wall
           50  +#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
           51  +#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
           52  +#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
           53  +
           54  +TCCX  =  $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP) 
           55  +TCCX += -I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3
           56  +TCCX += -I$(TOP)/ext/async
           57  +TCPPX = g++ -Wall -g -I. -I$(TOP)/src $(OPTS)
           58  +
           59  +#-------------------------------------------------------------------------------
           60  +# Build
           61  +#-------------------------------------------------------------------------------
           62  +
           63  +# This is the default Makefile target.  The objects listed here
           64  +# are what get build when you type just "make" with no arguments.
           65  +#
           66  +all:	sqlite4.h libsqlite4.a sqlite4$(EXE)
           67  +
           68  +libsqlite4.a:	parse.c $(LIBOBJ)
           69  +	$(AR) libsqlite4.a $(LIBOBJ)
           70  +	$(RANLIB) libsqlite4.a
           71  +
           72  +sqlite4$(EXE):	$(TOP)/src/shell.c libsqlite4.a sqlite4.h
           73  +	$(TCCX) $(READLINE_FLAGS) -o sqlite4$(EXE)                  \
           74  +		$(TOP)/src/shell.c                                  \
           75  +		libsqlite4.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) $(MATHLIB)
           76  +
           77  +sqlite4.o:	sqlite4.c
           78  +	$(TCCX) -c sqlite4.c
           79  +
           80  +# This target creates a directory named "tsrc" and fills it with copies of all
           81  +# of the C source code and header files needed to build on the target
           82  +# system. Some of the C source code and header files are automatically
           83  +# generated.  This target takes care of all that automatic generation.
           84  +
           85  +target_source:	$(SRC) $(TOP)/tool/vdbe-compress.tcl
           86  +	rm -rf tsrc
           87  +	mkdir tsrc
           88  +	cp -f $(SRC) tsrc
           89  +	rm tsrc/sqlite.h.in tsrc/parse.y
           90  +	tclsh $(TOP)/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new
           91  +	mv vdbe.new tsrc/vdbe.c
           92  +	touch target_source
           93  +
           94  +sqlite4.c:	target_source $(TOP)/tool/mksqlite4c.tcl
           95  +	tclsh $(TOP)/tool/mksqlite4c.tcl
           96  +	echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite4.c
           97  +	cat sqlite4.c >>tclsqlite4.c
           98  +	echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite4.c
           99  +	cat $(TOP)/src/tclsqlite.c >>tclsqlite4.c
          100  +
          101  +sqlite4.c-debug:	target_source $(TOP)/tool/mksqlite4c.tcl
          102  +	tclsh $(TOP)/tool/mksqlite4c.tcl --linemacros
          103  +	echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite4.c
          104  +	cat sqlite4.c >>tclsqlite4.c
          105  +	echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite4.c
          106  +	echo '#line 1 "tclsqlite.c"' >>tclsqlite4.c
          107  +	cat $(TOP)/src/tclsqlite.c >>tclsqlite4.c
          108  +
          109  +sqlite4-all.c:	sqlite4.c $(TOP)/tool/split-sqlite4c.tcl
          110  +	tclsh $(TOP)/tool/split-sqlite4c.tcl
          111  +
          112  +fts2amal.c:	target_source $(TOP)/ext/fts2/mkfts2amal.tcl
          113  +	tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
          114  +
          115  +fts3amal.c:	target_source $(TOP)/ext/fts3/mkfts3amal.tcl
          116  +	tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
          117  +
          118  +# Rules to build the LEMON compiler generator
          119  +#
          120  +lemon:	$(TOP)/tool/lemon.c $(TOP)/src/lempar.c
          121  +	$(BCC) -o lemon $(TOP)/tool/lemon.c
          122  +	cp $(TOP)/src/lempar.c .
          123  +
          124  +# Rules to build individual *.o files from generated *.c files. This
          125  +# applies to:
          126  +#
          127  +#     parse.o
          128  +#     opcodes.o
          129  +#
          130  +%.o: %.c $(HDR)
          131  +	$(TCCX) -c $<
          132  +
          133  +# Rules to build individual *.o files from files in the src directory.
          134  +#
          135  +%.o: $(TOP)/src/%.c $(HDR)
          136  +	$(TCCX) -c $<
          137  +
          138  +tclsqlite.o:	$(TOP)/src/tclsqlite.c $(HDR)
          139  +	$(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
          140  +
          141  +# Rules to build opcodes.c and opcodes.h
          142  +#
          143  +opcodes.c:	opcodes.h $(TOP)/tool/mkopcodec.awk
          144  +	$(NAWK) -f $(TOP)/tool/mkopcodec.awk opcodes.h >opcodes.c
          145  +
          146  +opcodes.h:	parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.awk
          147  +	cat parse.h $(TOP)/src/vdbe.c | \
          148  +		$(NAWK) -f $(TOP)/tool/mkopcodeh.awk >opcodes.h
          149  +
          150  +# Rules to build parse.c and parse.h - the outputs of lemon.
          151  +#
          152  +parse.h:	parse.c
          153  +
          154  +parse.c:	$(TOP)/src/parse.y lemon $(TOP)/tool/addopcodes.awk
          155  +	cp $(TOP)/src/parse.y .
          156  +	rm -f parse.h
          157  +	./lemon $(OPTS) parse.y
          158  +	mv parse.h parse.h.temp
          159  +	$(NAWK) -f $(TOP)/tool/addopcodes.awk parse.h.temp >parse.h
          160  +
          161  +sqlite4.h:	$(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
          162  +	tclsh $(TOP)/tool/mksqlite4h.tcl $(TOP) >sqlite4.h
          163  +
          164  +keywordhash.h:	$(TOP)/tool/mkkeywordhash.c
          165  +	$(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
          166  +	./mkkeywordhash >keywordhash.h
          167  +
          168  +# Rules to build the extension objects.
          169  +icu.o:	$(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
          170  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/icu/icu.c
          171  +
          172  +fts2.o:	$(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
          173  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts2/fts2.c
          174  +
          175  +fts2_hash.o:	$(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
          176  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts2/fts2_hash.c
          177  +
          178  +fts2_icu.o:	$(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
          179  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts2/fts2_icu.c
          180  +
          181  +fts2_porter.o:	$(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
          182  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts2/fts2_porter.c
          183  +
          184  +fts2_tokenizer.o:	$(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
          185  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
          186  +
          187  +fts2_tokenizer1.o:	$(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
          188  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
          189  +
          190  +fts3.o:	$(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
          191  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3.c
          192  +
          193  +fts3_aux.o:	$(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR)
          194  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_aux.c
          195  +
          196  +fts3_expr.o:	$(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
          197  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_expr.c
          198  +
          199  +fts3_hash.o:	$(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
          200  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_hash.c
          201  +
          202  +fts3_icu.o:	$(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
          203  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_icu.c
          204  +
          205  +fts3_snippet.o:	$(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR)
          206  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_snippet.c
          207  +
          208  +fts3_porter.o:	$(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
          209  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_porter.c
          210  +
          211  +fts3_tokenizer.o:	$(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
          212  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
          213  +
          214  +fts3_tokenizer1.o:	$(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
          215  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
          216  +
          217  +fts3_write.o:	$(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
          218  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/fts3/fts3_write.c
          219  +
          220  +rtree.o:	$(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
          221  +	$(TCCX) -DSQLITE4_CORE -c $(TOP)/ext/rtree/rtree.c
          222  +
          223  +# Rules for building test programs and for running tests
          224  +#
          225  +tclsqlite4:	$(TOP)/src/tclsqlite.c libsqlite4.a
          226  +	$(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite4 \
          227  +		$(TOP)/src/tclsqlite.c libsqlite4.a $(LIBTCL) $(THREADLIB)
          228  +
          229  +# Rules to build the 'testfixture' application.
          230  +#
          231  +TESTFIXTURE_FLAGS  = -DSQLITE4_TEST=1 -DSQLITE4_CRASH_TEST=1
          232  +TESTFIXTURE_FLAGS += -DSQLITE4_SERVER=1 -DSQLITE4_PRIVATE="" -DSQLITE4_CORE 
          233  +
          234  +TESTFIXTURE_PREREQ  = $(TESTSRC) $(TESTSRC2) 
          235  +TESTFIXTURE_PREREQ += $(TOP)/src/tclsqlite.c
          236  +TESTFIXTURE_PREREQ += libsqlite4.a
          237  +
          238  +testfixture$(EXE): $(TESTFIXTURE_PREREQ)
          239  +	$(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS)              \
          240  +		$(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c                \
          241  +		-o testfixture$(EXE) $(LIBTCL) libsqlite4.a $(THREADLIB)
          242  +
          243  +amalgamation-testfixture$(EXE): sqlite4.c $(TESTSRC) $(TOP)/src/tclsqlite.c
          244  +	$(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS)              \
          245  +		$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite4.c                  \
          246  +		-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
          247  +
          248  +fts3-testfixture$(EXE): sqlite4.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
          249  +	$(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS)              \
          250  +	-DSQLITE4_ENABLE_FTS3=1                                          \
          251  +		$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite4.c fts3amal.c       \
          252  +		-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
          253  +
          254  +fulltest:	testfixture$(EXE) sqlite4$(EXE)
          255  +	./testfixture$(EXE) $(TOP)/test/all.test
          256  +
          257  +soaktest:	testfixture$(EXE) sqlite4$(EXE)
          258  +	./testfixture$(EXE) $(TOP)/test/all.test -soak=1
          259  +
          260  +test:	testfixture$(EXE) sqlite4$(EXE)
          261  +	./testfixture$(EXE) $(TOP)/test/src4.test
          262  +
          263  +# Rules to build the 'lsmtest' application.
          264  +#
          265  +lsmtest$(EXE): libsqlite4.a $(LSMTESTSRC) $(LSMTESTHDR)
          266  +	$(TCPPX) -c $(TOP)/lsm-test/lsmtest_tdb2.cc
          267  +	$(TCCX) $(LSMTESTSRC) lsmtest_tdb2.o libsqlite4.a -o lsmtest$(EXE) $(THREADLIB) -lsqlite3
          268  +
          269  +
          270  +varint$(EXE):	$(TOP)/src/varint.c
          271  +	$(TCCX) -DVARINT_TOOL -o varint$(EXE) $(TOP)/src/varint.c
          272  +
          273  +# The next two rules are used to support the "threadtest" target. Building
          274  +# threadtest runs a few thread-safety tests that are implemented in C. This
          275  +# target is invoked by the releasetest.tcl script.
          276  +# 
          277  +threadtest3$(EXE): sqlite4.o $(TOP)/test/threadtest3.c $(TOP)/test/tt3_checkpoint.c
          278  +	$(TCCX) -O2 sqlite4.o $(TOP)/test/threadtest3.c \
          279  +		-o threadtest3$(EXE) $(THREADLIB)
          280  +
          281  +threadtest: threadtest3$(EXE)
          282  +	./threadtest3$(EXE)
          283  +
          284  +TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
          285  +$(TEST_EXTENSION): $(TOP)/test/test_loadext.c
          286  +	$(MKSHLIB) $(TOP)/test/test_loadext.c -o $(TEST_EXTENSION)
          287  +
          288  +extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
          289  +	./testfixture$(EXE) $(TOP)/test/loadext.test
          290  +
          291  +# This target will fail if the SQLite amalgamation contains any exported
          292  +# symbols that do not begin with "sqlite4_". It is run as part of the
          293  +# releasetest.tcl script.
          294  +#
          295  +checksymbols: sqlite4.o
          296  +	nm -g --defined-only sqlite4.o | grep -v " sqlite4_" ; test $$? -ne 0
          297  +
          298  +# Standard install and cleanup targets
          299  +#
          300  +install:	sqlite4 libsqlite4.a sqlite4.h
          301  +	mv sqlite4 /usr/bin
          302  +	mv libsqlite4.a /usr/lib
          303  +	mv sqlite4.h /usr/include
          304  +
          305  +clean:	
          306  +	rm -f *.o sqlite4 sqlite4.exe libsqlite4.a sqlite4.h opcodes.*
          307  +	rm -f lemon lemon.exe lempar.c parse.* sqlite*.tar.gz
          308  +	rm -f mkkeywordhash mkkeywordhash.exe keywordhash.h
          309  +	rm -f $(PUBLISH)
          310  +	rm -f *.da *.bb *.bbg gmon.out
          311  +	rm -rf tsrc target_source
          312  +	rm -f testloadext.dll libtestloadext.so
          313  +	rm -f amalgamation-testfixture amalgamation-testfixture.exe
          314  +	rm -f fts3-testfixture fts3-testfixture.exe
          315  +	rm -f testfixture testfixture.exe
          316  +	rm -f lsmtest
          317  +	rm -f threadtest3 threadtest3.exe
          318  +	rm -f sqlite4.c fts?amal.c tclsqlite4.c
          319  +	rm -f sqlite4_analyzer sqlite4_analyzer.exe sqlite4_analyzer.c
          320  +
          321  +fossil-clean:
          322  +	fossil extras | xargs rm
          323  +

Added Make.win.

            1  +# Windows build configuration
            2  +
            3  +DSO_EXTENSION = dll
            4  +INCPATHS      = -I ../include
            5  +ADDCFLAGS     = -Wall -D_WIN32
            6  +ADDLDFLAGS    = -L/usr/lib -Wl,-L,/c/usr/bin -Wl,--dll
            7  +ADDLIBS  	  = $(STATIC_LIBS) -lbz2 \
            8  +                -lrpcrt4 -lshell32 -lws2_32 -ladvapi32 -lkernel32 -lmsvcrt

Deleted Makefile.

     1         -#!/usr/make
     2         -#
     3         -# Makefile for SQLITE
     4         -#
     5         -# This is a template makefile for SQLite.  Most people prefer to
     6         -# use the autoconf generated "configure" script to generate the
     7         -# makefile automatically.  But that does not work for everybody
     8         -# and in every situation.  If you are having problems with the
     9         -# "configure" script, you might want to try this makefile as an
    10         -# alternative.  Create a copy of this file, edit the parameters
    11         -# below and type "make".
    12         -#
    13         -
    14         -#### The toplevel directory of the source tree.  This is the directory
    15         -#    that contains this "Makefile.in" and the "configure.in" script.
    16         -#
    17         -TOP = .
    18         -
    19         -#### C Compiler and options for use in building executables that
    20         -#    will run on the platform that is doing the build.
    21         -#
    22         -BCC = clang -g
    23         -#BCC = /opt/ancic/bin/c89 -0
    24         -
    25         -#### If the target operating system supports the "usleep()" system
    26         -#    call, then define the HAVE_USLEEP macro for all C modules.
    27         -#
    28         -#USLEEP = 
    29         -USLEEP = -DHAVE_USLEEP=1
    30         -
    31         -#### Leave SQLITE4_DEBUG undefined for maximum speed.  Use SQLITE4_DEBUG=1
    32         -#    to check for memory leaks.  Use SQLITE4_DEBUG=2 to print a log of all
    33         -#    malloc()s and free()s in order to track down memory leaks.
    34         -#    
    35         -#    SQLite uses some expensive assert() statements in the inner loop.
    36         -#    You can make the library go almost twice as fast if you compile
    37         -#    with -DNDEBUG=1
    38         -#
    39         -#OPTS += -DHAVE_DLOPEN
    40         -OPTS += -DSQLITE4_DEBUG=1
    41         -OPTS += -DHAVE_GMTIME_R
    42         -OPTS += -DHAVE_LOCALTIME_R
    43         -OPTS += -DHAVE_MALLOC_USABLE_SIZE
    44         -OPTS += -DHAVE_USLEEP
    45         -#OPTS += -DLONGDOUBLE_TYPE=double
    46         -#OPTS += -DSQLITE4_64BIT_STATS
    47         -#OPTS += -DSQLITE4_CASE_SENSITIVE_LIKE
    48         -#OPTS += -DSQLITE4_CHECK_PAGES
    49         -#OPTS += -DSQLITE4_COVERAGE_TEST
    50         -#OPTS += -DSQLITE4_DEBUG
    51         -#OPTS += -DSQLITE4_DEFAULT_AUTOVACUUM=1
    52         -#OPTS += -DSQLITE4_DEFAULT_CACHE_SIZE=64
    53         -#OPTS += -DSQLITE4_DEFAULT_FILE_FORMAT=4
    54         -#OPTS += -DSQLITE4_DEFAULT_MEMSTATUS=0
    55         -#OPTS += -DSQLITE4_DEFAULT_PAGE_SIZE=1024
    56         -#OPTS += -DSQLITE4_DEFAULT_TEMP_CACHE_SIZE=32
    57         -#OPTS += -DSQLITE4_DISABLE_LFS=1
    58         -#OPTS += -DSQLITE4_ENABLE_8_3_NAMES
    59         -#OPTS += -DSQLITE4_ENABLE_ASYNCIO
    60         -#OPTS += -DSQLITE4_ENABLE_ATOMIC_WRITE
    61         -#OPTS += -DSQLITE4_ENABLE_COLUMN_METADATA
    62         -#OPTS += -DSQLITE4_ENABLE_EXPENSIVE_ASSERT
    63         -#OPTS += -DSQLITE4_ENABLE_FTS3
    64         -OPTS += -DSQLITE4_ENABLE_FTS4
    65         -#OPTS += -DSQLITE4_ENABLE_FTS3_PARENTHESIS
    66         -#OPTS += -DSQLITE4_ENABLE_INSTVFS=1
    67         -#OPTS += -DSQLITE4_ENABLE_ICU
    68         -#OPTS += -DSQLITE4_ENABLE_IOTRACE=1
    69         -#OPTS += -DSQLITE4_ENABLE_LOAD_EXTENSION=1
    70         -#OPTS += -DSQLITE4_ENABLE_LOCKING_STYLE=1
    71         -#OPTS += -DSQLITE4_ENABLE_MEMORY_MANAGEMENT=1
    72         -#OPTS += -DSQLITE4_ENABLE_MEMSYS3=1
    73         -#OPTS += -DSQLITE4_ENABLE_MEMSYS5=1
    74         -#OPTS += -DSQLITE4_ENABLE_OVERSIZE_CELL_CHECK
    75         -#OPTS += -DSQLITE4_ENABLE_PREUPDATE_HOOK
    76         -OPTS += -DSQLITE4_ENABLE_RTREE
    77         -#OPTS += -DSQLITE4_ENABLE_RTREE -DVARIANT_RSTARTREE_CHOOSESUBTREE
    78         -#OPTS += -DSQLITE4_ENABLE_SESSION
    79         -#OPTS += -DSQLITE4_ENABLE_STAT2
    80         -#OPTS += -DSQLITE4_ENABLE_STAT3
    81         -#OPTS += -DSQLITE4_ENABLE_TREE_EXPLAIN
    82         -#OPTS += -DSQLITE4_ENABLE_UNLOCK_NOTIFY
    83         -#OPTS += -DSQLITE4_ENABLE_UPDATE_DELETE_LIMIT
    84         -#OPTS += '-DSQLITE4_FILE_HEADER="MotorolaDB v001"'
    85         -#OPTS += -DSQLITE4_HAVE_ISNAN
    86         -#OPTS += -DSQLITE4_HOMEGROWN_RECURSIVE_MUTEX=1
    87         -#OPTS += -DSQLITE4_INT64_TYPE=int
    88         -#OPTS += -DSQLITE4_LOCK_TRACE
    89         -#OPTS += -DSQLITE4_MALLOC_SOFT_LIMIT=1024
    90         -#OPTS += -DSQLITE4_MAX_EXPR_DEPTH=0
    91         -#OPTS += -DSQLITE4_MAX_PAGE_SIZE=4096
    92         -#OPTS += -DSQLITE4_MAX_VARIABLE_NUMBER=500000
    93         -#OPTS += -DSQLITE4_MEMDEBUG=1
    94         -#OPTS += -DSQLITE4_MIXED_ENDIAN_64BIT_FLOAT=1
    95         -#OPTS += -DSQLITE4_MUTEX_NOOP=1
    96         -#OPTS += -DNO_GETTOD=1
    97         -OPTS += -DSQLITE4_NO_SYNC=1
    98         -#OPTS += -DSQLITE4_OMIT_ALTER_TABLE=1
    99         -#OPTS += -DSQLITE4_OMIT_AUTOMATIC_INDEX
   100         -#OPTS += -DSQLITE4_OMIT_AUTOVACUUM=1
   101         -#OPTS += -DSQLITE4_OMIT_BLOB_LITERAL=1
   102         -#OPTS += -DSQLITE4_OMIT_CHECK=1
   103         -#OPTS += -DSQLITE4_OMIT_DATETIME_FUNCS=1
   104         -#OPTS += -DSQLITE4_OMIT_DEPRECATED=1
   105         -#OPTS += -DSQLITE4_OMIT_DISKIO
   106         -#OPTS += -DSQLITE4_OMIT_FLOATING_POINT=1
   107         -#OPTS += -DSQLITE4_OMIT_ICU_LIKE
   108         -#OPTS += -DSQLITE4_OMIT_LOAD_EXTENSION=1
   109         -#OPTS += -DSQLITE4_OMIT_LOOKASIDE=1
   110         -#OPTS += -DSQLITE4_OMIT_MEMORYDB=1
   111         -#OPTS += -DSQLITE4_OMIT_MERGE_SORT=1
   112         -#OPTS += -DSQLITE4_OMIT_PROGESS_CALLBACK=1
   113         -#OPTS += -DSQLITE4_OMIT_REINDEX=1
   114         -#OPTS += -DSQLITE4_OMIT_SHARED_CACHE=1
   115         -#OPTS += -DSQLITE4_OMIT_TRACE=1
   116         -#OPTS += -DSQLITE4_OMIT_UTF16=1
   117         -#OPTS += -DSQLITE4_OMIT_VIEW=1
   118         -#OPTS += -DSQLITE4_OMIT_VIRTUALTABLE=1
   119         -#OPTS += -DSQLITE4_OMIT_WAL
   120         -#OPTS += -DSQLITE4_OMIT_WSD=1
   121         -#OPTS += -DSQLITE4_OS_OTHER=1
   122         -#OPTS += -DSQLITE4_OS_UNIX=1
   123         -#OPTS += -DSQLITE4_PCACHE_SEPARATE_HEADER
   124         -#OPTS += -DSQLITE4_PAGECACHE_BLOCKALLOC
   125         -#OPTS += -DSQLITE4_SECURE_DELETE=1
   126         -#OPTS += '-DSQLITE4_SHM_DIRECTORY="/dev/shm"'
   127         -#OPTS += -DSQLITE4_SMALL_STACK
   128         -#OPTS += -DSQLITE4_SOUNDEX=1
   129         -#OPTS += -DSQLITE4_TCL_DEFAULT_FULLMUTEX=1
   130         -#OPTS += -DSQLITE4_TEMP_STORE=3
   131         -#OPTS += -DSQLITE4_THREADSAFE=0
   132         -#OPTS += -DSQLITE4_THREADSAFE=1
   133         -#OPTS += -DSQLITE4_USE_ALLOCA
   134         -#OPTS += -DSQLITE4_ZERO_MALLOC=1
   135         -#OPTS += -DUSE_PREAD64=1
   136         -#OPTS += -DYYSTACKDEPTH=0
   137         -#OPTS += -DSQLITE4_DEFAULT_AUTOVACUUM=1
   138         -#OPTS += -DSQLITE4_DEFAULT_CACHE_SIZE=64
   139         -#OPTS += -DSQLITE4_DEFAULT_PAGE_SIZE=1024
   140         -#OPTS += -DSQLITE4_DEFAULT_TEMP_CACHE_SIZE=32
   141         -#OPTS += -DSQLITE4_DISABLE_LFS=1
   142         -#OPTS += -DSQLITE4_ENABLE_ATOMIC_WRITE=1
   143         -#OPTS += -DSQLITE4_ENABLE_IOTRACE=1
   144         -#OPTS += -DSQLITE4_ENABLE_MEMORY_MANAGEMENT=1
   145         -#OPTS += -DSQLITE4_MAX_PAGE_SIZE=4096
   146         -#OPTS += -DSQLITE4_OMIT_LOAD_EXTENSION=1
   147         -#OPTS += -DSQLITE4_OMIT_PROGRESS_CALLBACK=1
   148         -#OPTS += -DSQLITE4_OMIT_VIRTUALTABLE=1
   149         -#OPTS += -DSQLITE4_TEMP_STORE=3
   150         -
   151         -#### The suffix to add to executable files.  ".exe" for windows.
   152         -#    Nothing for unix.
   153         -#
   154         -#EXE = .exe
   155         -EXE =
   156         -
   157         -#### C Compile and options for use in building executables that 
   158         -#    will run on the target platform.  This is usually the same
   159         -#    as BCC, unless you are cross-compiling.
   160         -#
   161         -#TCC = gcc -O6
   162         -#TCC = gcc -g -rdynamic -O0 -Wall -fstrict-aliasing
   163         -TCC = clang -g -O0 -Wall -fstrict-aliasing
   164         -#TCC = gcc420 -g -O2 -Wall
   165         -#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
   166         -#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
   167         -#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
   168         -
   169         -#### Tools used to build a static library.
   170         -#
   171         -AR = ar cr
   172         -#AR = /opt/mingw/bin/i386-mingw32-ar cr
   173         -RANLIB = ranlib
   174         -#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib
   175         -
   176         -#### Extra compiler options needed for programs that use the TCL library.
   177         -#
   178         -#TCL_FLAGS =
   179         -#TCL_FLAGS = -DSTATIC_BUILD=1
   180         -#TCL_FLAGS = -I/home/drh/tcltk/85linux
   181         -#TCL_FLAGS = -I/home/drh/tcltk/86linux
   182         -#TCL_FLAGS = -I/home/drh/tcltk/84win -DSTATIC_BUILD=1
   183         -#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
   184         -
   185         -#### Linker options needed to link against the TCL library.
   186         -#
   187         -#LIBTCL = -ltcl8.4 -lm -ldl
   188         -#LIBTCL = /home/drh/tcltk/85linux/libtcl8.5.a -lm -ldl -lpthread
   189         -LIBTCL = -ltcl8.6 -lm -lpthread -ldl -lz
   190         -#LIBTCL = /home/drh/tcltk/84linux/libtcl84thread.a -lm -ldl
   191         -#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt
   192         -#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
   193         -
   194         -#### Compiler options needed for programs that use the readline() library.
   195         -#
   196         -READLINE_FLAGS =
   197         -#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
   198         -
   199         -#### Linker options needed by programs using readline() must link against.
   200         -#
   201         -LIBREADLINE = -ldl -lpthread
   202         -#LIBREADLINE = -static -lreadline -ltermcap
   203         -
   204         -#### Should the database engine assume text is coded as UTF-8 or iso8859?
   205         -#
   206         -ENCODING  = UTF8
   207         -#ENCODING = ISO8859
   208         -
   209         -#### Math library
   210         -#
   211         -MATHLIB = -lm
   212         -# MATHLIB =
   213         -
   214         -#### AWK  (Needed by brain-dead Solaris systems)
   215         -#
   216         -NAWK = awk
   217         -
   218         -#### THREADLIB  Libraries needed for threadtest 
   219         -#
   220         -THREADLIB = -ldl -lpthread
   221         -
   222         -#OPTS += -DSQLITE4_FILE_HEADER='"bogus header..."'
   223         -
   224         -# You should not have to change anything below this line
   225         -###############################################################################
   226         -include $(TOP)/main.mk

Added Makefile.in.

            1  +#-------------------------------------------------------------------------------
            2  +# Project Specific Parameters
            3  +#-------------------------------------------------------------------------------
            4  +
            5  +include Make.defines
            6  +include Make.opts
            7  +
            8  +#-------------------------------------------------------------------------------
            9  +# Directories
           10  +#-------------------------------------------------------------------------------
           11  +
           12  +PREFIX      = @prefix@
           13  +DESTDIR     = 
           14  +BINDIR      = $(DESTDIR)/$(PREFIX)/bin
           15  +INCDIR      = $(DESTDIR)/$(PREFIX)/include
           16  +LIBDIR      = $(DESTDIR)/$(PREFIX)/lib
           17  +INFODIR     = $(DESTDIR)/$(PREFIX)/info
           18  +MANDIR      = $(DESTDIR)/$(PREFIX)/man
           19  +TOP_SRCDIR  = @top_srcdir@
           20  +SRCDIR      = @srcdir@
           21  +
           22  +include @OS_MAKEFILE@
           23  +
           24  +#-------------------------------------------------------------------------------
           25  +# Compile Options
           26  +#-------------------------------------------------------------------------------
           27  +
           28  +CPP         = g++
           29  +CC          = gcc
           30  +CFLAGS      = $(ADDLCFLAGS) $(INCPATHS) \
           31  +              $(PROFILING) $(MEM_TRACING) $(DEBUGGING) $(TRACING)
           32  +CPPFLAGS    = @CPPFLAGS@ $(ADDCPPFLAGS)
           33  +LDFLAGS     = @LDFLAGS@  $(ADDLDFLAGS)
           34  +LIBS        = @LIBS@     $(ADDLIBS)
           35  +INSTALL     = @INSTALL@
           36  +
           37  +#-------------------------------------------------------------------------------
           38  +# Targets
           39  +#-------------------------------------------------------------------------------
           40  +
           41  +LIBVER      = @VERSION@
           42  +A_LIB       = lib$(NAME).a
           43  +S_LIB       = lib$(NAME).$(DSO_EXTENSION)
           44  +VS_LIB      = $(S_LIB).$(LIBVER)
           45  +PROGS       = all
           46  +FILES       = 
           47  +LIBFILES    = lib.o fs.o common.o
           48  +HDR         =
           49  +CLEANFILES  = gmon.out prof.txt *core		      \
           50  +	          *.o *~ *.$(DSO_EXTENSION) *.a 
           51  +
           52  +BUILDFILES  = config.h autoscan.log config.status \
           53  +              tmp.txt configure config.log configure.scan
           54  +
           55  +#-------------------------------------------------------------------------------
           56  +# Autoconf
           57  +#-------------------------------------------------------------------------------
           58  +
           59  +# automatic re-running of configure if the ocnfigure.in file has changed
           60  +${SRCDIR}/configure: configure.in
           61  +	cd ${SRCDIR} && autoconf
           62  +
           63  +# autoheader might not change config.h.in, so touch a stamp file
           64  +${SRCDIR}/config.h.in: stamp-h.in
           65  +${SRCDIR}/stamp-h.in: configure.in aclocal.m4
           66  +		cd ${SRCDIR} && autoheader
           67  +		echo timestamp > ${SRCDIR}/stamp-h.in
           68  +
           69  +config.h: stamp-h
           70  +
           71  +stamp-h: config.h.in config.status
           72  +	./config.status
           73  +
           74  +Makefile: Makefile.in config.status
           75  +	./config.status
           76  +
           77  +config.status: configure
           78  +	./config.status --recheck

Changes to README.

     7      7   build directory be separate from the source directory.  Cd into the
     8      8   build directory and then from the build directory run the configure
     9      9   script found at the root of the source tree.  Then run "make".
    10     10   
    11     11   For example:
    12     12   
    13     13       tar xzf sqlite.tar.gz    ;#  Unpack the source tree into "sqlite"
    14         -    mkdir bld                ;#  Build will occur in a sibling directory
    15         -    cd bld                   ;#  Change to the build directory
    16         -    ../sqlite/configure      ;#  Run the configure script
           14  +    ./autogen.sh             ;#  Create the configure script
           15  +    configure                ;#  Run the configure script
    17     16       make                     ;#  Run the makefile.
    18     17       make install             ;#  (Optional) Install the build products
    19     18   
    20     19   The configure script uses autoconf 2.61 and libtool.  If the configure
    21     20   script does not work out for you, there is a generic makefile named
    22     21   "Makefile.linux-gcc" in the top directory of the source tree that you
    23     22   can copy and edit to suit your needs.  Comments on the generic makefile

Added autogen.sh.

            1  +#!/bin/sh
            2  +
            3  +echo "m4_define([VERSION_NUMBER],[$(cat VERSION)])" > VERSION.m4
            4  +autoscan && autoheader && autoconf

Added config.h.in.

            1  +/* config.h.in.  Generated from configure.in by autoheader.  */
            2  +
            3  +/* Define to 1 if you have the <inttypes.h> header file. */
            4  +#undef HAVE_INTTYPES_H
            5  +
            6  +/* Define to 1 if you have the <memory.h> header file. */
            7  +#undef HAVE_MEMORY_H
            8  +
            9  +/* Define to 1 if you have the <stdint.h> header file. */
           10  +#undef HAVE_STDINT_H
           11  +
           12  +/* Define to 1 if you have the <stdlib.h> header file. */
           13  +#undef HAVE_STDLIB_H
           14  +
           15  +/* Define to 1 if you have the <strings.h> header file. */
           16  +#undef HAVE_STRINGS_H
           17  +
           18  +/* Define to 1 if you have the <string.h> header file. */
           19  +#undef HAVE_STRING_H
           20  +
           21  +/* Define to 1 if you have the <sys/stat.h> header file. */
           22  +#undef HAVE_SYS_STAT_H
           23  +
           24  +/* Define to 1 if you have the <sys/types.h> header file. */
           25  +#undef HAVE_SYS_TYPES_H
           26  +
           27  +/* Define to 1 if you have the <unistd.h> header file. */
           28  +#undef HAVE_UNISTD_H
           29  +
           30  +/* Define to 1 if you have the <utime.h> header file. */
           31  +#undef HAVE_UTIME_H
           32  +
           33  +/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
           34  +#undef HAVE_UTIME_NULL
           35  +
           36  +/* Define to the address where bug reports for this package should be sent. */
           37  +#undef PACKAGE_BUGREPORT
           38  +
           39  +/* Define to the full name of this package. */
           40  +#undef PACKAGE_NAME
           41  +
           42  +/* Define to the full name and version of this package. */
           43  +#undef PACKAGE_STRING
           44  +
           45  +/* Define to the one symbol short name of this package. */
           46  +#undef PACKAGE_TARNAME
           47  +
           48  +/* Define to the home page for this package. */
           49  +#undef PACKAGE_URL
           50  +
           51  +/* Define to the version of this package. */
           52  +#undef PACKAGE_VERSION
           53  +
           54  +/* Define to 1 if you have the ANSI C header files. */
           55  +#undef STDC_HEADERS

Added config/config.guess.

            1  +#! /bin/sh
            2  +# Attempt to guess a canonical system name.
            3  +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
            4  +#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
            5  +#   Inc.
            6  +
            7  +timestamp='2006-12-08'
            8  +
            9  +# This file is free software; you can redistribute it and/or modify it
           10  +# under the terms of the GNU General Public License as published by
           11  +# the Free Software Foundation; either version 2 of the License, or
           12  +# (at your option) any later version.
           13  +#
           14  +# This program is distributed in the hope that it will be useful, but
           15  +# WITHOUT ANY WARRANTY; without even the implied warranty of
           16  +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
           17  +# General Public License for more details.
           18  +#
           19  +# You should have received a copy of the GNU General Public License
           20  +# along with this program; if not, write to the Free Software
           21  +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
           22  +# 02110-1301, USA.
           23  +#
           24  +# As a special exception to the GNU General Public License, if you
           25  +# distribute this file as part of a program that contains a
           26  +# configuration script generated by Autoconf, you may include it under
           27  +# the same distribution terms that you use for the rest of that program.
           28  +
           29  +
           30  +# Originally written by Per Bothner <per@bothner.com>.
           31  +# Please send patches to <config-patches@gnu.org>.  Submit a context
           32  +# diff and a properly formatted ChangeLog entry.
           33  +#
           34  +# This script attempts to guess a canonical system name similar to
           35  +# config.sub.  If it succeeds, it prints the system name on stdout, and
           36  +# exits with 0.  Otherwise, it exits with 1.
           37  +#
           38  +# The plan is that this can be called by configure scripts if you
           39  +# don't specify an explicit build system type.
           40  +
           41  +me=`echo "$0" | sed -e 's,.*/,,'`
           42  +
           43  +usage="\
           44  +Usage: $0 [OPTION]
           45  +
           46  +Output the configuration name of the system \`$me' is run on.
           47  +
           48  +Operation modes:
           49  +  -h, --help         print this help, then exit
           50  +  -t, --time-stamp   print date of last modification, then exit
           51  +  -v, --version      print version number, then exit
           52  +
           53  +Report bugs and patches to <config-patches@gnu.org>."
           54  +
           55  +version="\
           56  +GNU config.guess ($timestamp)
           57  +
           58  +Originally written by Per Bothner.
           59  +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
           60  +Free Software Foundation, Inc.
           61  +
           62  +This is free software; see the source for copying conditions.  There is NO
           63  +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
           64  +
           65  +help="
           66  +Try \`$me --help' for more information."
           67  +
           68  +# Parse command line
           69  +while test $# -gt 0 ; do
           70  +  case $1 in
           71  +    --time-stamp | --time* | -t )
           72  +       echo "$timestamp" ; exit ;;
           73  +    --version | -v )
           74  +       echo "$version" ; exit ;;
           75  +    --help | --h* | -h )
           76  +       echo "$usage"; exit ;;
           77  +    -- )     # Stop option processing
           78  +       shift; break ;;
           79  +    - )	# Use stdin as input.
           80  +       break ;;
           81  +    -* )
           82  +       echo "$me: invalid option $1$help" >&2
           83  +       exit 1 ;;
           84  +    * )
           85  +       break ;;
           86  +  esac
           87  +done
           88  +
           89  +if test $# != 0; then
           90  +  echo "$me: too many arguments$help" >&2
           91  +  exit 1
           92  +fi
           93  +
           94  +trap 'exit 1' 1 2 15
           95  +
           96  +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
           97  +# compiler to aid in system detection is discouraged as it requires
           98  +# temporary files to be created and, as you can see below, it is a
           99  +# headache to deal with in a portable fashion.
          100  +
          101  +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
          102  +# use `HOST_CC' if defined, but it is deprecated.
          103  +
          104  +# Portable tmp directory creation inspired by the Autoconf team.
          105  +
          106  +set_cc_for_build='
          107  +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
          108  +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
          109  +: ${TMPDIR=/tmp} ;
          110  + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
          111  + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
          112  + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
          113  + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
          114  +dummy=$tmp/dummy ;
          115  +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
          116  +case $CC_FOR_BUILD,$HOST_CC,$CC in
          117  + ,,)    echo "int x;" > $dummy.c ;
          118  +	for c in cc gcc c89 c99 ; do
          119  +	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
          120  +	     CC_FOR_BUILD="$c"; break ;
          121  +	  fi ;
          122  +	done ;
          123  +	if test x"$CC_FOR_BUILD" = x ; then
          124  +	  CC_FOR_BUILD=no_compiler_found ;
          125  +	fi
          126  +	;;
          127  + ,,*)   CC_FOR_BUILD=$CC ;;
          128  + ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
          129  +esac ; set_cc_for_build= ;'
          130  +
          131  +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
          132  +# (ghazi@noc.rutgers.edu 1994-08-24)
          133  +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
          134  +	PATH=$PATH:/.attbin ; export PATH
          135  +fi
          136  +
          137  +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
          138  +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
          139  +UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
          140  +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
          141  +
          142  +# Note: order is significant - the case branches are not exclusive.
          143  +
          144  +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
          145  +    *:NetBSD:*:*)
          146  +	# NetBSD (nbsd) targets should (where applicable) match one or
          147  +	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
          148  +	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
          149  +	# switched to ELF, *-*-netbsd* would select the old
          150  +	# object file format.  This provides both forward
          151  +	# compatibility and a consistent mechanism for selecting the
          152  +	# object file format.
          153  +	#
          154  +	# Note: NetBSD doesn't particularly care about the vendor
          155  +	# portion of the name.  We always set it to "unknown".
          156  +	sysctl="sysctl -n hw.machine_arch"
          157  +	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
          158  +	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
          159  +	case "${UNAME_MACHINE_ARCH}" in
          160  +	    armeb) machine=armeb-unknown ;;
          161  +	    arm*) machine=arm-unknown ;;
          162  +	    sh3el) machine=shl-unknown ;;
          163  +	    sh3eb) machine=sh-unknown ;;
          164  +	    sh5el) machine=sh5le-unknown ;;
          165  +	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
          166  +	esac
          167  +	# The Operating System including object format, if it has switched
          168  +	# to ELF recently, or will in the future.
          169  +	case "${UNAME_MACHINE_ARCH}" in
          170  +	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
          171  +		eval $set_cc_for_build
          172  +		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
          173  +			| grep __ELF__ >/dev/null
          174  +		then
          175  +		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
          176  +		    # Return netbsd for either.  FIX?
          177  +		    os=netbsd
          178  +		else
          179  +		    os=netbsdelf
          180  +		fi
          181  +		;;
          182  +	    *)
          183  +	        os=netbsd
          184  +		;;
          185  +	esac
          186  +	# The OS release
          187  +	# Debian GNU/NetBSD machines have a different userland, and
          188  +	# thus, need a distinct triplet. However, they do not need
          189  +	# kernel version information, so it can be replaced with a
          190  +	# suitable tag, in the style of linux-gnu.
          191  +	case "${UNAME_VERSION}" in
          192  +	    Debian*)
          193  +		release='-gnu'
          194  +		;;
          195  +	    *)
          196  +		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
          197  +		;;
          198  +	esac
          199  +	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
          200  +	# contains redundant information, the shorter form:
          201  +	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
          202  +	echo "${machine}-${os}${release}"
          203  +	exit ;;
          204  +    *:OpenBSD:*:*)
          205  +	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
          206  +	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
          207  +	exit ;;
          208  +    *:ekkoBSD:*:*)
          209  +	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
          210  +	exit ;;
          211  +    *:SolidBSD:*:*)
          212  +	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
          213  +	exit ;;
          214  +    macppc:MirBSD:*:*)
          215  +	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
          216  +	exit ;;
          217  +    *:MirBSD:*:*)
          218  +	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
          219  +	exit ;;
          220  +    alpha:OSF1:*:*)
          221  +	case $UNAME_RELEASE in
          222  +	*4.0)
          223  +		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
          224  +		;;
          225  +	*5.*)
          226  +	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
          227  +		;;
          228  +	esac
          229  +	# According to Compaq, /usr/sbin/psrinfo has been available on
          230  +	# OSF/1 and Tru64 systems produced since 1995.  I hope that
          231  +	# covers most systems running today.  This code pipes the CPU
          232  +	# types through head -n 1, so we only detect the type of CPU 0.
          233  +	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
          234  +	case "$ALPHA_CPU_TYPE" in
          235  +	    "EV4 (21064)")
          236  +		UNAME_MACHINE="alpha" ;;
          237  +	    "EV4.5 (21064)")
          238  +		UNAME_MACHINE="alpha" ;;
          239  +	    "LCA4 (21066/21068)")
          240  +		UNAME_MACHINE="alpha" ;;
          241  +	    "EV5 (21164)")
          242  +		UNAME_MACHINE="alphaev5" ;;
          243  +	    "EV5.6 (21164A)")
          244  +		UNAME_MACHINE="alphaev56" ;;
          245  +	    "EV5.6 (21164PC)")
          246  +		UNAME_MACHINE="alphapca56" ;;
          247  +	    "EV5.7 (21164PC)")
          248  +		UNAME_MACHINE="alphapca57" ;;
          249  +	    "EV6 (21264)")
          250  +		UNAME_MACHINE="alphaev6" ;;
          251  +	    "EV6.7 (21264A)")
          252  +		UNAME_MACHINE="alphaev67" ;;
          253  +	    "EV6.8CB (21264C)")
          254  +		UNAME_MACHINE="alphaev68" ;;
          255  +	    "EV6.8AL (21264B)")
          256  +		UNAME_MACHINE="alphaev68" ;;
          257  +	    "EV6.8CX (21264D)")
          258  +		UNAME_MACHINE="alphaev68" ;;
          259  +	    "EV6.9A (21264/EV69A)")
          260  +		UNAME_MACHINE="alphaev69" ;;
          261  +	    "EV7 (21364)")
          262  +		UNAME_MACHINE="alphaev7" ;;
          263  +	    "EV7.9 (21364A)")
          264  +		UNAME_MACHINE="alphaev79" ;;
          265  +	esac
          266  +	# A Pn.n version is a patched version.
          267  +	# A Vn.n version is a released version.
          268  +	# A Tn.n version is a released field test version.
          269  +	# A Xn.n version is an unreleased experimental baselevel.
          270  +	# 1.2 uses "1.2" for uname -r.
          271  +	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
          272  +	exit ;;
          273  +    Alpha\ *:Windows_NT*:*)
          274  +	# How do we know it's Interix rather than the generic POSIX subsystem?
          275  +	# Should we change UNAME_MACHINE based on the output of uname instead
          276  +	# of the specific Alpha model?
          277  +	echo alpha-pc-interix
          278  +	exit ;;
          279  +    21064:Windows_NT:50:3)
          280  +	echo alpha-dec-winnt3.5
          281  +	exit ;;
          282  +    Amiga*:UNIX_System_V:4.0:*)
          283  +	echo m68k-unknown-sysv4
          284  +	exit ;;
          285  +    *:[Aa]miga[Oo][Ss]:*:*)
          286  +	echo ${UNAME_MACHINE}-unknown-amigaos
          287  +	exit ;;
          288  +    *:[Mm]orph[Oo][Ss]:*:*)
          289  +	echo ${UNAME_MACHINE}-unknown-morphos
          290  +	exit ;;
          291  +    *:OS/390:*:*)
          292  +	echo i370-ibm-openedition
          293  +	exit ;;
          294  +    *:z/VM:*:*)
          295  +	echo s390-ibm-zvmoe
          296  +	exit ;;
          297  +    *:OS400:*:*)
          298  +        echo powerpc-ibm-os400
          299  +	exit ;;
          300  +    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
          301  +	echo arm-acorn-riscix${UNAME_RELEASE}
          302  +	exit ;;
          303  +    arm:riscos:*:*|arm:RISCOS:*:*)
          304  +	echo arm-unknown-riscos
          305  +	exit ;;
          306  +    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
          307  +	echo hppa1.1-hitachi-hiuxmpp
          308  +	exit ;;
          309  +    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
          310  +	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
          311  +	if test "`(/bin/universe) 2>/dev/null`" = att ; then
          312  +		echo pyramid-pyramid-sysv3
          313  +	else
          314  +		echo pyramid-pyramid-bsd
          315  +	fi
          316  +	exit ;;
          317  +    NILE*:*:*:dcosx)
          318  +	echo pyramid-pyramid-svr4
          319  +	exit ;;
          320  +    DRS?6000:unix:4.0:6*)
          321  +	echo sparc-icl-nx6
          322  +	exit ;;
          323  +    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
          324  +	case `/usr/bin/uname -p` in
          325  +	    sparc) echo sparc-icl-nx7; exit ;;
          326  +	esac ;;
          327  +    sun4H:SunOS:5.*:*)
          328  +	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
          329  +	exit ;;
          330  +    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
          331  +	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
          332  +	exit ;;
          333  +    i86pc:SunOS:5.*:*)
          334  +	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
          335  +	exit ;;
          336  +    sun4*:SunOS:6*:*)
          337  +	# According to config.sub, this is the proper way to canonicalize
          338  +	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
          339  +	# it's likely to be more like Solaris than SunOS4.
          340  +	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
          341  +	exit ;;
          342  +    sun4*:SunOS:*:*)
          343  +	case "`/usr/bin/arch -k`" in
          344  +	    Series*|S4*)
          345  +		UNAME_RELEASE=`uname -v`
          346  +		;;
          347  +	esac
          348  +	# Japanese Language versions have a version number like `4.1.3-JL'.
          349  +	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
          350  +	exit ;;
          351  +    sun3*:SunOS:*:*)
          352  +	echo m68k-sun-sunos${UNAME_RELEASE}
          353  +	exit ;;
          354  +    sun*:*:4.2BSD:*)
          355  +	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
          356  +	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
          357  +	case "`/bin/arch`" in
          358  +	    sun3)
          359  +		echo m68k-sun-sunos${UNAME_RELEASE}
          360  +		;;
          361  +	    sun4)
          362  +		echo sparc-sun-sunos${UNAME_RELEASE}
          363  +		;;
          364  +	esac
          365  +	exit ;;
          366  +    aushp:SunOS:*:*)
          367  +	echo sparc-auspex-sunos${UNAME_RELEASE}
          368  +	exit ;;
          369  +    # The situation for MiNT is a little confusing.  The machine name
          370  +    # can be virtually everything (everything which is not
          371  +    # "atarist" or "atariste" at least should have a processor
          372  +    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
          373  +    # to the lowercase version "mint" (or "freemint").  Finally
          374  +    # the system name "TOS" denotes a system which is actually not
          375  +    # MiNT.  But MiNT is downward compatible to TOS, so this should
          376  +    # be no problem.
          377  +    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
          378  +        echo m68k-atari-mint${UNAME_RELEASE}
          379  +	exit ;;
          380  +    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
          381  +	echo m68k-atari-mint${UNAME_RELEASE}
          382  +        exit ;;
          383  +    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
          384  +        echo m68k-atari-mint${UNAME_RELEASE}
          385  +	exit ;;
          386  +    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
          387  +        echo m68k-milan-mint${UNAME_RELEASE}
          388  +        exit ;;
          389  +    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
          390  +        echo m68k-hades-mint${UNAME_RELEASE}
          391  +        exit ;;
          392  +    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
          393  +        echo m68k-unknown-mint${UNAME_RELEASE}
          394  +        exit ;;
          395  +    m68k:machten:*:*)
          396  +	echo m68k-apple-machten${UNAME_RELEASE}
          397  +	exit ;;
          398  +    powerpc:machten:*:*)
          399  +	echo powerpc-apple-machten${UNAME_RELEASE}
          400  +	exit ;;
          401  +    RISC*:Mach:*:*)
          402  +	echo mips-dec-mach_bsd4.3
          403  +	exit ;;
          404  +    RISC*:ULTRIX:*:*)
          405  +	echo mips-dec-ultrix${UNAME_RELEASE}
          406  +	exit ;;
          407  +    VAX*:ULTRIX*:*:*)
          408  +	echo vax-dec-ultrix${UNAME_RELEASE}
          409  +	exit ;;
          410  +    2020:CLIX:*:* | 2430:CLIX:*:*)
          411  +	echo clipper-intergraph-clix${UNAME_RELEASE}
          412  +	exit ;;
          413  +    mips:*:*:UMIPS | mips:*:*:RISCos)
          414  +	eval $set_cc_for_build
          415  +	sed 's/^	//' << EOF >$dummy.c
          416  +#ifdef __cplusplus
          417  +#include <stdio.h>  /* for printf() prototype */
          418  +	int main (int argc, char *argv[]) {
          419  +#else
          420  +	int main (argc, argv) int argc; char *argv[]; {
          421  +#endif
          422  +	#if defined (host_mips) && defined (MIPSEB)
          423  +	#if defined (SYSTYPE_SYSV)
          424  +	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
          425  +	#endif
          426  +	#if defined (SYSTYPE_SVR4)
          427  +	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
          428  +	#endif
          429  +	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
          430  +	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
          431  +	#endif
          432  +	#endif
          433  +	  exit (-1);
          434  +	}
          435  +EOF
          436  +	$CC_FOR_BUILD -o $dummy $dummy.c &&
          437  +	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
          438  +	  SYSTEM_NAME=`$dummy $dummyarg` &&
          439  +	    { echo "$SYSTEM_NAME"; exit; }
          440  +	echo mips-mips-riscos${UNAME_RELEASE}
          441  +	exit ;;
          442  +    Motorola:PowerMAX_OS:*:*)
          443  +	echo powerpc-motorola-powermax
          444  +	exit ;;
          445  +    Motorola:*:4.3:PL8-*)
          446  +	echo powerpc-harris-powermax
          447  +	exit ;;
          448  +    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
          449  +	echo powerpc-harris-powermax
          450  +	exit ;;
          451  +    Night_Hawk:Power_UNIX:*:*)
          452  +	echo powerpc-harris-powerunix
          453  +	exit ;;
          454  +    m88k:CX/UX:7*:*)
          455  +	echo m88k-harris-cxux7
          456  +	exit ;;
          457  +    m88k:*:4*:R4*)
          458  +	echo m88k-motorola-sysv4
          459  +	exit ;;
          460  +    m88k:*:3*:R3*)
          461  +	echo m88k-motorola-sysv3
          462  +	exit ;;
          463  +    AViiON:dgux:*:*)
          464  +        # DG/UX returns AViiON for all architectures
          465  +        UNAME_PROCESSOR=`/usr/bin/uname -p`
          466  +	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
          467  +	then
          468  +	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
          469  +	       [ ${TARGET_BINARY_INTERFACE}x = x ]
          470  +	    then
          471  +		echo m88k-dg-dgux${UNAME_RELEASE}
          472  +	    else
          473  +		echo m88k-dg-dguxbcs${UNAME_RELEASE}
          474  +	    fi
          475  +	else
          476  +	    echo i586-dg-dgux${UNAME_RELEASE}
          477  +	fi
          478  + 	exit ;;
          479  +    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
          480  +	echo m88k-dolphin-sysv3
          481  +	exit ;;
          482  +    M88*:*:R3*:*)
          483  +	# Delta 88k system running SVR3
          484  +	echo m88k-motorola-sysv3
          485  +	exit ;;
          486  +    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
          487  +	echo m88k-tektronix-sysv3
          488  +	exit ;;
          489  +    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
          490  +	echo m68k-tektronix-bsd
          491  +	exit ;;
          492  +    *:IRIX*:*:*)
          493  +	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
          494  +	exit ;;
          495  +    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
          496  +	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
          497  +	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
          498  +    i*86:AIX:*:*)
          499  +	echo i386-ibm-aix
          500  +	exit ;;
          501  +    ia64:AIX:*:*)
          502  +	if [ -x /usr/bin/oslevel ] ; then
          503  +		IBM_REV=`/usr/bin/oslevel`
          504  +	else
          505  +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
          506  +	fi
          507  +	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
          508  +	exit ;;
          509  +    *:AIX:2:3)
          510  +	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
          511  +		eval $set_cc_for_build
          512  +		sed 's/^		//' << EOF >$dummy.c
          513  +		#include <sys/systemcfg.h>
          514  +
          515  +		main()
          516  +			{
          517  +			if (!__power_pc())
          518  +				exit(1);
          519  +			puts("powerpc-ibm-aix3.2.5");
          520  +			exit(0);
          521  +			}
          522  +EOF
          523  +		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
          524  +		then
          525  +			echo "$SYSTEM_NAME"
          526  +		else
          527  +			echo rs6000-ibm-aix3.2.5
          528  +		fi
          529  +	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
          530  +		echo rs6000-ibm-aix3.2.4
          531  +	else
          532  +		echo rs6000-ibm-aix3.2
          533  +	fi
          534  +	exit ;;
          535  +    *:AIX:*:[45])
          536  +	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
          537  +	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
          538  +		IBM_ARCH=rs6000
          539  +	else
          540  +		IBM_ARCH=powerpc
          541  +	fi
          542  +	if [ -x /usr/bin/oslevel ] ; then
          543  +		IBM_REV=`/usr/bin/oslevel`
          544  +	else
          545  +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
          546  +	fi
          547  +	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
          548  +	exit ;;
          549  +    *:AIX:*:*)
          550  +	echo rs6000-ibm-aix
          551  +	exit ;;
          552  +    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
          553  +	echo romp-ibm-bsd4.4
          554  +	exit ;;
          555  +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
          556  +	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
          557  +	exit ;;                             # report: romp-ibm BSD 4.3
          558  +    *:BOSX:*:*)
          559  +	echo rs6000-bull-bosx
          560  +	exit ;;
          561  +    DPX/2?00:B.O.S.:*:*)
          562  +	echo m68k-bull-sysv3
          563  +	exit ;;
          564  +    9000/[34]??:4.3bsd:1.*:*)
          565  +	echo m68k-hp-bsd
          566  +	exit ;;
          567  +    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
          568  +	echo m68k-hp-bsd4.4
          569  +	exit ;;
          570  +    9000/[34678]??:HP-UX:*:*)
          571  +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
          572  +	case "${UNAME_MACHINE}" in
          573  +	    9000/31? )            HP_ARCH=m68000 ;;
          574  +	    9000/[34]?? )         HP_ARCH=m68k ;;
          575  +	    9000/[678][0-9][0-9])
          576  +		if [ -x /usr/bin/getconf ]; then
          577  +		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
          578  +                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
          579  +                    case "${sc_cpu_version}" in
          580  +                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
          581  +                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
          582  +                      532)                      # CPU_PA_RISC2_0
          583  +                        case "${sc_kernel_bits}" in
          584  +                          32) HP_ARCH="hppa2.0n" ;;
          585  +                          64) HP_ARCH="hppa2.0w" ;;
          586  +			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
          587  +                        esac ;;
          588  +                    esac
          589  +		fi
          590  +		if [ "${HP_ARCH}" = "" ]; then
          591  +		    eval $set_cc_for_build
          592  +		    sed 's/^              //' << EOF >$dummy.c
          593  +
          594  +              #define _HPUX_SOURCE
          595  +              #include <stdlib.h>
          596  +              #include <unistd.h>
          597  +
          598  +              int main ()
          599  +              {
          600  +              #if defined(_SC_KERNEL_BITS)
          601  +                  long bits = sysconf(_SC_KERNEL_BITS);
          602  +              #endif
          603  +                  long cpu  = sysconf (_SC_CPU_VERSION);
          604  +
          605  +                  switch (cpu)
          606  +              	{
          607  +              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
          608  +              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
          609  +              	case CPU_PA_RISC2_0:
          610  +              #if defined(_SC_KERNEL_BITS)
          611  +              	    switch (bits)
          612  +              		{
          613  +              		case 64: puts ("hppa2.0w"); break;
          614  +              		case 32: puts ("hppa2.0n"); break;
          615  +              		default: puts ("hppa2.0"); break;
          616  +              		} break;
          617  +              #else  /* !defined(_SC_KERNEL_BITS) */
          618  +              	    puts ("hppa2.0"); break;
          619  +              #endif
          620  +              	default: puts ("hppa1.0"); break;
          621  +              	}
          622  +                  exit (0);
          623  +              }
          624  +EOF
          625  +		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
          626  +		    test -z "$HP_ARCH" && HP_ARCH=hppa
          627  +		fi ;;
          628  +	esac
          629  +	if [ ${HP_ARCH} = "hppa2.0w" ]
          630  +	then
          631  +	    eval $set_cc_for_build
          632  +
          633  +	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
          634  +	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
          635  +	    # generating 64-bit code.  GNU and HP use different nomenclature:
          636  +	    #
          637  +	    # $ CC_FOR_BUILD=cc ./config.guess
          638  +	    # => hppa2.0w-hp-hpux11.23
          639  +	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
          640  +	    # => hppa64-hp-hpux11.23
          641  +
          642  +	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
          643  +		grep __LP64__ >/dev/null
          644  +	    then
          645  +		HP_ARCH="hppa2.0w"
          646  +	    else
          647  +		HP_ARCH="hppa64"
          648  +	    fi
          649  +	fi
          650  +	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
          651  +	exit ;;
          652  +    ia64:HP-UX:*:*)
          653  +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
          654  +	echo ia64-hp-hpux${HPUX_REV}
          655  +	exit ;;
          656  +    3050*:HI-UX:*:*)
          657  +	eval $set_cc_for_build
          658  +	sed 's/^	//' << EOF >$dummy.c
          659  +	#include <unistd.h>
          660  +	int
          661  +	main ()
          662  +	{
          663  +	  long cpu = sysconf (_SC_CPU_VERSION);
          664  +	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
          665  +	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
          666  +	     results, however.  */
          667  +	  if (CPU_IS_PA_RISC (cpu))
          668  +	    {
          669  +	      switch (cpu)
          670  +		{
          671  +		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
          672  +		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
          673  +		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
          674  +		  default: puts ("hppa-hitachi-hiuxwe2"); break;
          675  +		}
          676  +	    }
          677  +	  else if (CPU_IS_HP_MC68K (cpu))
          678  +	    puts ("m68k-hitachi-hiuxwe2");
          679  +	  else puts ("unknown-hitachi-hiuxwe2");
          680  +	  exit (0);
          681  +	}
          682  +EOF
          683  +	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
          684  +		{ echo "$SYSTEM_NAME"; exit; }
          685  +	echo unknown-hitachi-hiuxwe2
          686  +	exit ;;
          687  +    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
          688  +	echo hppa1.1-hp-bsd
          689  +	exit ;;
          690  +    9000/8??:4.3bsd:*:*)
          691  +	echo hppa1.0-hp-bsd
          692  +	exit ;;
          693  +    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
          694  +	echo hppa1.0-hp-mpeix
          695  +	exit ;;
          696  +    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
          697  +	echo hppa1.1-hp-osf
          698  +	exit ;;
          699  +    hp8??:OSF1:*:*)
          700  +	echo hppa1.0-hp-osf
          701  +	exit ;;
          702  +    i*86:OSF1:*:*)
          703  +	if [ -x /usr/sbin/sysversion ] ; then
          704  +	    echo ${UNAME_MACHINE}-unknown-osf1mk
          705  +	else
          706  +	    echo ${UNAME_MACHINE}-unknown-osf1
          707  +	fi
          708  +	exit ;;
          709  +    parisc*:Lites*:*:*)
          710  +	echo hppa1.1-hp-lites
          711  +	exit ;;
          712  +    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
          713  +	echo c1-convex-bsd
          714  +        exit ;;
          715  +    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
          716  +	if getsysinfo -f scalar_acc
          717  +	then echo c32-convex-bsd
          718  +	else echo c2-convex-bsd
          719  +	fi
          720  +        exit ;;
          721  +    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
          722  +	echo c34-convex-bsd
          723  +        exit ;;
          724  +    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
          725  +	echo c38-convex-bsd
          726  +        exit ;;
          727  +    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
          728  +	echo c4-convex-bsd
          729  +        exit ;;
          730  +    CRAY*Y-MP:*:*:*)
          731  +	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
          732  +	exit ;;
          733  +    CRAY*[A-Z]90:*:*:*)
          734  +	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
          735  +	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
          736  +	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
          737  +	      -e 's/\.[^.]*$/.X/'
          738  +	exit ;;
          739  +    CRAY*TS:*:*:*)
          740  +	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
          741  +	exit ;;
          742  +    CRAY*T3E:*:*:*)
          743  +	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
          744  +	exit ;;
          745  +    CRAY*SV1:*:*:*)
          746  +	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
          747  +	exit ;;
          748  +    *:UNICOS/mp:*:*)
          749  +	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
          750  +	exit ;;
          751  +    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
          752  +	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
          753  +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
          754  +        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
          755  +        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
          756  +        exit ;;
          757  +    5000:UNIX_System_V:4.*:*)
          758  +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
          759  +        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
          760  +        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
          761  +	exit ;;
          762  +    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
          763  +	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
          764  +	exit ;;
          765  +    sparc*:BSD/OS:*:*)
          766  +	echo sparc-unknown-bsdi${UNAME_RELEASE}
          767  +	exit ;;
          768  +    *:BSD/OS:*:*)
          769  +	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
          770  +	exit ;;
          771  +    *:FreeBSD:*:*)
          772  +	case ${UNAME_MACHINE} in
          773  +	    pc98)
          774  +		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
          775  +	    amd64)
          776  +		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
          777  +	    *)
          778  +		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
          779  +	esac
          780  +	exit ;;
          781  +    i*:CYGWIN*:*)
          782  +	echo ${UNAME_MACHINE}-pc-cygwin
          783  +	exit ;;
          784  +    i*:MINGW*:*)
          785  +	echo ${UNAME_MACHINE}-pc-mingw32
          786  +	exit ;;
          787  +    i*:windows32*:*)
          788  +    	# uname -m includes "-pc" on this system.
          789  +    	echo ${UNAME_MACHINE}-mingw32
          790  +	exit ;;
          791  +    i*:PW*:*)
          792  +	echo ${UNAME_MACHINE}-pc-pw32
          793  +	exit ;;
          794  +    x86:Interix*:[3456]*)
          795  +	echo i586-pc-interix${UNAME_RELEASE}
          796  +	exit ;;
          797  +    EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*)
          798  +	echo x86_64-unknown-interix${UNAME_RELEASE}
          799  +	exit ;;
          800  +    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
          801  +	echo i${UNAME_MACHINE}-pc-mks
          802  +	exit ;;
          803  +    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
          804  +	# How do we know it's Interix rather than the generic POSIX subsystem?
          805  +	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
          806  +	# UNAME_MACHINE based on the output of uname instead of i386?
          807  +	echo i586-pc-interix
          808  +	exit ;;
          809  +    i*:UWIN*:*)
          810  +	echo ${UNAME_MACHINE}-pc-uwin
          811  +	exit ;;
          812  +    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
          813  +	echo x86_64-unknown-cygwin
          814  +	exit ;;
          815  +    p*:CYGWIN*:*)
          816  +	echo powerpcle-unknown-cygwin
          817  +	exit ;;
          818  +    prep*:SunOS:5.*:*)
          819  +	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
          820  +	exit ;;
          821  +    *:GNU:*:*)
          822  +	# the GNU system
          823  +	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
          824  +	exit ;;
          825  +    *:GNU/*:*:*)
          826  +	# other systems with GNU libc and userland
          827  +	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
          828  +	exit ;;
          829  +    i*86:Minix:*:*)
          830  +	echo ${UNAME_MACHINE}-pc-minix
          831  +	exit ;;
          832  +    arm*:Linux:*:*)
          833  +	echo ${UNAME_MACHINE}-unknown-linux-gnu
          834  +	exit ;;
          835  +    avr32*:Linux:*:*)
          836  +	echo ${UNAME_MACHINE}-unknown-linux-gnu
          837  +	exit ;;
          838  +    cris:Linux:*:*)
          839  +	echo cris-axis-linux-gnu
          840  +	exit ;;
          841  +    crisv32:Linux:*:*)
          842  +	echo crisv32-axis-linux-gnu
          843  +	exit ;;
          844  +    frv:Linux:*:*)
          845  +    	echo frv-unknown-linux-gnu
          846  +	exit ;;
          847  +    ia64:Linux:*:*)
          848  +	echo ${UNAME_MACHINE}-unknown-linux-gnu
          849  +	exit ;;
          850  +    m32r*:Linux:*:*)
          851  +	echo ${UNAME_MACHINE}-unknown-linux-gnu
          852  +	exit ;;
          853  +    m68*:Linux:*:*)
          854  +	echo ${UNAME_MACHINE}-unknown-linux-gnu
          855  +	exit ;;
          856  +    mips:Linux:*:*)
          857  +	eval $set_cc_for_build
          858  +	sed 's/^	//' << EOF >$dummy.c
          859  +	#undef CPU
          860  +	#undef mips
          861  +	#undef mipsel
          862  +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
          863  +	CPU=mipsel
          864  +	#else
          865  +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
          866  +	CPU=mips
          867  +	#else
          868  +	CPU=
          869  +	#endif
          870  +	#endif
          871  +EOF
          872  +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
          873  +	    /^CPU/{
          874  +		s: ::g
          875  +		p
          876  +	    }'`"
          877  +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
          878  +	;;
          879  +    mips64:Linux:*:*)
          880  +	eval $set_cc_for_build
          881  +	sed 's/^	//' << EOF >$dummy.c
          882  +	#undef CPU
          883  +	#undef mips64
          884  +	#undef mips64el
          885  +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
          886  +	CPU=mips64el
          887  +	#else
          888  +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
          889  +	CPU=mips64
          890  +	#else
          891  +	CPU=
          892  +	#endif
          893  +	#endif
          894  +EOF
          895  +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
          896  +	    /^CPU/{
          897  +		s: ::g
          898  +		p
          899  +	    }'`"
          900  +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
          901  +	;;
          902  +    or32:Linux:*:*)
          903  +	echo or32-unknown-linux-gnu
          904  +	exit ;;
          905  +    ppc:Linux:*:*)
          906  +	echo powerpc-unknown-linux-gnu
          907  +	exit ;;
          908  +    ppc64:Linux:*:*)
          909  +	echo powerpc64-unknown-linux-gnu
          910  +	exit ;;
          911  +    alpha:Linux:*:*)
          912  +	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
          913  +	  EV5)   UNAME_MACHINE=alphaev5 ;;
          914  +	  EV56)  UNAME_MACHINE=alphaev56 ;;
          915  +	  PCA56) UNAME_MACHINE=alphapca56 ;;
          916  +	  PCA57) UNAME_MACHINE=alphapca56 ;;
          917  +	  EV6)   UNAME_MACHINE=alphaev6 ;;
          918  +	  EV67)  UNAME_MACHINE=alphaev67 ;;
          919  +	  EV68*) UNAME_MACHINE=alphaev68 ;;
          920  +        esac
          921  +	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
          922  +	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
          923  +	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
          924  +	exit ;;
          925  +    parisc:Linux:*:* | hppa:Linux:*:*)
          926  +	# Look for CPU level
          927  +	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
          928  +	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
          929  +	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
          930  +	  *)    echo hppa-unknown-linux-gnu ;;
          931  +	esac
          932  +	exit ;;
          933  +    parisc64:Linux:*:* | hppa64:Linux:*:*)
          934  +	echo hppa64-unknown-linux-gnu
          935  +	exit ;;
          936  +    s390:Linux:*:* | s390x:Linux:*:*)
          937  +	echo ${UNAME_MACHINE}-ibm-linux
          938  +	exit ;;
          939  +    sh64*:Linux:*:*)
          940  +    	echo ${UNAME_MACHINE}-unknown-linux-gnu
          941  +	exit ;;
          942  +    sh*:Linux:*:*)
          943  +	echo ${UNAME_MACHINE}-unknown-linux-gnu
          944  +	exit ;;
          945  +    sparc:Linux:*:* | sparc64:Linux:*:*)
          946  +	echo ${UNAME_MACHINE}-unknown-linux-gnu
          947  +	exit ;;
          948  +    vax:Linux:*:*)
          949  +	echo ${UNAME_MACHINE}-dec-linux-gnu
          950  +	exit ;;
          951  +    x86_64:Linux:*:*)
          952  +	echo x86_64-unknown-linux-gnu
          953  +	exit ;;
          954  +    xtensa:Linux:*:*)
          955  +    	echo xtensa-unknown-linux-gnu
          956  +	exit ;;
          957  +    i*86:Linux:*:*)
          958  +	# The BFD linker knows what the default object file format is, so
          959  +	# first see if it will tell us. cd to the root directory to prevent
          960  +	# problems with other programs or directories called `ld' in the path.
          961  +	# Set LC_ALL=C to ensure ld outputs messages in English.
          962  +	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
          963  +			 | sed -ne '/supported targets:/!d
          964  +				    s/[ 	][ 	]*/ /g
          965  +				    s/.*supported targets: *//
          966  +				    s/ .*//
          967  +				    p'`
          968  +        case "$ld_supported_targets" in
          969  +	  elf32-i386)
          970  +		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
          971  +		;;
          972  +	  a.out-i386-linux)
          973  +		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
          974  +		exit ;;
          975  +	  coff-i386)
          976  +		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
          977  +		exit ;;
          978  +	  "")
          979  +		# Either a pre-BFD a.out linker (linux-gnuoldld) or
          980  +		# one that does not give us useful --help.
          981  +		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
          982  +		exit ;;
          983  +	esac
          984  +	# Determine whether the default compiler is a.out or elf
          985  +	eval $set_cc_for_build
          986  +	sed 's/^	//' << EOF >$dummy.c
          987  +	#include <features.h>
          988  +	#ifdef __ELF__
          989  +	# ifdef __GLIBC__
          990  +	#  if __GLIBC__ >= 2
          991  +	LIBC=gnu
          992  +	#  else
          993  +	LIBC=gnulibc1
          994  +	#  endif
          995  +	# else
          996  +	LIBC=gnulibc1
          997  +	# endif
          998  +	#else
          999  +	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
         1000  +	LIBC=gnu
         1001  +	#else
         1002  +	LIBC=gnuaout
         1003  +	#endif
         1004  +	#endif
         1005  +	#ifdef __dietlibc__
         1006  +	LIBC=dietlibc
         1007  +	#endif
         1008  +EOF
         1009  +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
         1010  +	    /^LIBC/{
         1011  +		s: ::g
         1012  +		p
         1013  +	    }'`"
         1014  +	test x"${LIBC}" != x && {
         1015  +		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
         1016  +		exit
         1017  +	}
         1018  +	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
         1019  +	;;
         1020  +    i*86:DYNIX/ptx:4*:*)
         1021  +	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
         1022  +	# earlier versions are messed up and put the nodename in both
         1023  +	# sysname and nodename.
         1024  +	echo i386-sequent-sysv4
         1025  +	exit ;;
         1026  +    i*86:UNIX_SV:4.2MP:2.*)
         1027  +        # Unixware is an offshoot of SVR4, but it has its own version
         1028  +        # number series starting with 2...
         1029  +        # I am not positive that other SVR4 systems won't match this,
         1030  +	# I just have to hope.  -- rms.
         1031  +        # Use sysv4.2uw... so that sysv4* matches it.
         1032  +	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
         1033  +	exit ;;
         1034  +    i*86:OS/2:*:*)
         1035  +	# If we were able to find `uname', then EMX Unix compatibility
         1036  +	# is probably installed.
         1037  +	echo ${UNAME_MACHINE}-pc-os2-emx
         1038  +	exit ;;
         1039  +    i*86:XTS-300:*:STOP)
         1040  +	echo ${UNAME_MACHINE}-unknown-stop
         1041  +	exit ;;
         1042  +    i*86:atheos:*:*)
         1043  +	echo ${UNAME_MACHINE}-unknown-atheos
         1044  +	exit ;;
         1045  +    i*86:syllable:*:*)
         1046  +	echo ${UNAME_MACHINE}-pc-syllable
         1047  +	exit ;;
         1048  +    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
         1049  +	echo i386-unknown-lynxos${UNAME_RELEASE}
         1050  +	exit ;;
         1051  +    i*86:*DOS:*:*)
         1052  +	echo ${UNAME_MACHINE}-pc-msdosdjgpp
         1053  +	exit ;;
         1054  +    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
         1055  +	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
         1056  +	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
         1057  +		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
         1058  +	else
         1059  +		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
         1060  +	fi
         1061  +	exit ;;
         1062  +    i*86:*:5:[678]*)
         1063  +    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
         1064  +	case `/bin/uname -X | grep "^Machine"` in
         1065  +	    *486*)	     UNAME_MACHINE=i486 ;;
         1066  +	    *Pentium)	     UNAME_MACHINE=i586 ;;
         1067  +	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
         1068  +	esac
         1069  +	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
         1070  +	exit ;;
         1071  +    i*86:*:3.2:*)
         1072  +	if test -f /usr/options/cb.name; then
         1073  +		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
         1074  +		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
         1075  +	elif /bin/uname -X 2>/dev/null >/dev/null ; then
         1076  +		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
         1077  +		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
         1078  +		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
         1079  +			&& UNAME_MACHINE=i586
         1080  +		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
         1081  +			&& UNAME_MACHINE=i686
         1082  +		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
         1083  +			&& UNAME_MACHINE=i686
         1084  +		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
         1085  +	else
         1086  +		echo ${UNAME_MACHINE}-pc-sysv32
         1087  +	fi
         1088  +	exit ;;
         1089  +    pc:*:*:*)
         1090  +	# Left here for compatibility:
         1091  +        # uname -m prints for DJGPP always 'pc', but it prints nothing about
         1092  +        # the processor, so we play safe by assuming i386.
         1093  +	echo i386-pc-msdosdjgpp
         1094  +        exit ;;
         1095  +    Intel:Mach:3*:*)
         1096  +	echo i386-pc-mach3
         1097  +	exit ;;
         1098  +    paragon:*:*:*)
         1099  +	echo i860-intel-osf1
         1100  +	exit ;;
         1101  +    i860:*:4.*:*) # i860-SVR4
         1102  +	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
         1103  +	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
         1104  +	else # Add other i860-SVR4 vendors below as they are discovered.
         1105  +	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
         1106  +	fi
         1107  +	exit ;;
         1108  +    mini*:CTIX:SYS*5:*)
         1109  +	# "miniframe"
         1110  +	echo m68010-convergent-sysv
         1111  +	exit ;;
         1112  +    mc68k:UNIX:SYSTEM5:3.51m)
         1113  +	echo m68k-convergent-sysv
         1114  +	exit ;;
         1115  +    M680?0:D-NIX:5.3:*)
         1116  +	echo m68k-diab-dnix
         1117  +	exit ;;
         1118  +    M68*:*:R3V[5678]*:*)
         1119  +	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
         1120  +    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)
         1121  +	OS_REL=''
         1122  +	test -r /etc/.relid \
         1123  +	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
         1124  +	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
         1125  +	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
         1126  +	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
         1127  +	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
         1128  +    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         1129  +        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
         1130  +          && { echo i486-ncr-sysv4; exit; } ;;
         1131  +    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
         1132  +	echo m68k-unknown-lynxos${UNAME_RELEASE}
         1133  +	exit ;;
         1134  +    mc68030:UNIX_System_V:4.*:*)
         1135  +	echo m68k-atari-sysv4
         1136  +	exit ;;
         1137  +    TSUNAMI:LynxOS:2.*:*)
         1138  +	echo sparc-unknown-lynxos${UNAME_RELEASE}
         1139  +	exit ;;
         1140  +    rs6000:LynxOS:2.*:*)
         1141  +	echo rs6000-unknown-lynxos${UNAME_RELEASE}
         1142  +	exit ;;
         1143  +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
         1144  +	echo powerpc-unknown-lynxos${UNAME_RELEASE}
         1145  +	exit ;;
         1146  +    SM[BE]S:UNIX_SV:*:*)
         1147  +	echo mips-dde-sysv${UNAME_RELEASE}
         1148  +	exit ;;
         1149  +    RM*:ReliantUNIX-*:*:*)
         1150  +	echo mips-sni-sysv4
         1151  +	exit ;;
         1152  +    RM*:SINIX-*:*:*)
         1153  +	echo mips-sni-sysv4
         1154  +	exit ;;
         1155  +    *:SINIX-*:*:*)
         1156  +	if uname -p 2>/dev/null >/dev/null ; then
         1157  +		UNAME_MACHINE=`(uname -p) 2>/dev/null`
         1158  +		echo ${UNAME_MACHINE}-sni-sysv4
         1159  +	else
         1160  +		echo ns32k-sni-sysv
         1161  +	fi
         1162  +	exit ;;
         1163  +    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
         1164  +                      # says <Richard.M.Bartel@ccMail.Census.GOV>
         1165  +        echo i586-unisys-sysv4
         1166  +        exit ;;
         1167  +    *:UNIX_System_V:4*:FTX*)
         1168  +	# From Gerald Hewes <hewes@openmarket.com>.
         1169  +	# How about differentiating between stratus architectures? -djm
         1170  +	echo hppa1.1-stratus-sysv4
         1171  +	exit ;;
         1172  +    *:*:*:FTX*)
         1173  +	# From seanf@swdc.stratus.com.
         1174  +	echo i860-stratus-sysv4
         1175  +	exit ;;
         1176  +    i*86:VOS:*:*)
         1177  +	# From Paul.Green@stratus.com.
         1178  +	echo ${UNAME_MACHINE}-stratus-vos
         1179  +	exit ;;
         1180  +    *:VOS:*:*)
         1181  +	# From Paul.Green@stratus.com.
         1182  +	echo hppa1.1-stratus-vos
         1183  +	exit ;;
         1184  +    mc68*:A/UX:*:*)
         1185  +	echo m68k-apple-aux${UNAME_RELEASE}
         1186  +	exit ;;
         1187  +    news*:NEWS-OS:6*:*)
         1188  +	echo mips-sony-newsos6
         1189  +	exit ;;
         1190  +    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
         1191  +	if [ -d /usr/nec ]; then
         1192  +	        echo mips-nec-sysv${UNAME_RELEASE}
         1193  +	else
         1194  +	        echo mips-unknown-sysv${UNAME_RELEASE}
         1195  +	fi
         1196  +        exit ;;
         1197  +    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
         1198  +	echo powerpc-be-beos
         1199  +	exit ;;
         1200  +    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
         1201  +	echo powerpc-apple-beos
         1202  +	exit ;;
         1203  +    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
         1204  +	echo i586-pc-beos
         1205  +	exit ;;
         1206  +    SX-4:SUPER-UX:*:*)
         1207  +	echo sx4-nec-superux${UNAME_RELEASE}
         1208  +	exit ;;
         1209  +    SX-5:SUPER-UX:*:*)
         1210  +	echo sx5-nec-superux${UNAME_RELEASE}
         1211  +	exit ;;
         1212  +    SX-6:SUPER-UX:*:*)
         1213  +	echo sx6-nec-superux${UNAME_RELEASE}
         1214  +	exit ;;
         1215  +    SX-7:SUPER-UX:*:*)
         1216  +	echo sx7-nec-superux${UNAME_RELEASE}
         1217  +	exit ;;
         1218  +    SX-8:SUPER-UX:*:*)
         1219  +	echo sx8-nec-superux${UNAME_RELEASE}
         1220  +	exit ;;
         1221  +    Power*:Rhapsody:*:*)
         1222  +	echo powerpc-apple-rhapsody${UNAME_RELEASE}
         1223  +	exit ;;
         1224  +    *:Rhapsody:*:*)
         1225  +	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
         1226  +	exit ;;
         1227  +    *:Darwin:*:*)
         1228  +	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
         1229  +	case $UNAME_PROCESSOR in
         1230  +	    unknown) UNAME_PROCESSOR=powerpc ;;
         1231  +	esac
         1232  +	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
         1233  +	exit ;;
         1234  +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
         1235  +	UNAME_PROCESSOR=`uname -p`
         1236  +	if test "$UNAME_PROCESSOR" = "x86"; then
         1237  +		UNAME_PROCESSOR=i386
         1238  +		UNAME_MACHINE=pc
         1239  +	fi
         1240  +	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
         1241  +	exit ;;
         1242  +    *:QNX:*:4*)
         1243  +	echo i386-pc-qnx
         1244  +	exit ;;
         1245  +    NSE-?:NONSTOP_KERNEL:*:*)
         1246  +	echo nse-tandem-nsk${UNAME_RELEASE}
         1247  +	exit ;;
         1248  +    NSR-?:NONSTOP_KERNEL:*:*)
         1249  +	echo nsr-tandem-nsk${UNAME_RELEASE}
         1250  +	exit ;;
         1251  +    *:NonStop-UX:*:*)
         1252  +	echo mips-compaq-nonstopux
         1253  +	exit ;;
         1254  +    BS2000:POSIX*:*:*)
         1255  +	echo bs2000-siemens-sysv
         1256  +	exit ;;
         1257  +    DS/*:UNIX_System_V:*:*)
         1258  +	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
         1259  +	exit ;;
         1260  +    *:Plan9:*:*)
         1261  +	# "uname -m" is not consistent, so use $cputype instead. 386
         1262  +	# is converted to i386 for consistency with other x86
         1263  +	# operating systems.
         1264  +	if test "$cputype" = "386"; then
         1265  +	    UNAME_MACHINE=i386
         1266  +	else
         1267  +	    UNAME_MACHINE="$cputype"
         1268  +	fi
         1269  +	echo ${UNAME_MACHINE}-unknown-plan9
         1270  +	exit ;;
         1271  +    *:TOPS-10:*:*)
         1272  +	echo pdp10-unknown-tops10
         1273  +	exit ;;
         1274  +    *:TENEX:*:*)
         1275  +	echo pdp10-unknown-tenex
         1276  +	exit ;;
         1277  +    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
         1278  +	echo pdp10-dec-tops20
         1279  +	exit ;;
         1280  +    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
         1281  +	echo pdp10-xkl-tops20
         1282  +	exit ;;
         1283  +    *:TOPS-20:*:*)
         1284  +	echo pdp10-unknown-tops20
         1285  +	exit ;;
         1286  +    *:ITS:*:*)
         1287  +	echo pdp10-unknown-its
         1288  +	exit ;;
         1289  +    SEI:*:*:SEIUX)
         1290  +        echo mips-sei-seiux${UNAME_RELEASE}
         1291  +	exit ;;
         1292  +    *:DragonFly:*:*)
         1293  +	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
         1294  +	exit ;;
         1295  +    *:*VMS:*:*)
         1296  +    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
         1297  +	case "${UNAME_MACHINE}" in
         1298  +	    A*) echo alpha-dec-vms ; exit ;;
         1299  +	    I*) echo ia64-dec-vms ; exit ;;
         1300  +	    V*) echo vax-dec-vms ; exit ;;
         1301  +	esac ;;
         1302  +    *:XENIX:*:SysV)
         1303  +	echo i386-pc-xenix
         1304  +	exit ;;
         1305  +    i*86:skyos:*:*)
         1306  +	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
         1307  +	exit ;;
         1308  +    i*86:rdos:*:*)
         1309  +	echo ${UNAME_MACHINE}-pc-rdos
         1310  +	exit ;;
         1311  +esac
         1312  +
         1313  +#echo '(No uname command or uname output not recognized.)' 1>&2
         1314  +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
         1315  +
         1316  +eval $set_cc_for_build
         1317  +cat >$dummy.c <<EOF
         1318  +#ifdef _SEQUENT_
         1319  +# include <sys/types.h>
         1320  +# include <sys/utsname.h>
         1321  +#endif
         1322  +main ()
         1323  +{
         1324  +#if defined (sony)
         1325  +#if defined (MIPSEB)
         1326  +  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
         1327  +     I don't know....  */
         1328  +  printf ("mips-sony-bsd\n"); exit (0);
         1329  +#else
         1330  +#include <sys/param.h>
         1331  +  printf ("m68k-sony-newsos%s\n",
         1332  +#ifdef NEWSOS4
         1333  +          "4"
         1334  +#else
         1335  +	  ""
         1336  +#endif
         1337  +         ); exit (0);
         1338  +#endif
         1339  +#endif
         1340  +
         1341  +#if defined (__arm) && defined (__acorn) && defined (__unix)
         1342  +  printf ("arm-acorn-riscix\n"); exit (0);
         1343  +#endif
         1344  +
         1345  +#if defined (hp300) && !defined (hpux)
         1346  +  printf ("m68k-hp-bsd\n"); exit (0);
         1347  +#endif
         1348  +
         1349  +#if defined (NeXT)
         1350  +#if !defined (__ARCHITECTURE__)
         1351  +#define __ARCHITECTURE__ "m68k"
         1352  +#endif
         1353  +  int version;
         1354  +  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
         1355  +  if (version < 4)
         1356  +    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
         1357  +  else
         1358  +    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
         1359  +  exit (0);
         1360  +#endif
         1361  +
         1362  +#if defined (MULTIMAX) || defined (n16)
         1363  +#if defined (UMAXV)
         1364  +  printf ("ns32k-encore-sysv\n"); exit (0);
         1365  +#else
         1366  +#if defined (CMU)
         1367  +  printf ("ns32k-encore-mach\n"); exit (0);
         1368  +#else
         1369  +  printf ("ns32k-encore-bsd\n"); exit (0);
         1370  +#endif
         1371  +#endif
         1372  +#endif
         1373  +
         1374  +#if defined (__386BSD__)
         1375  +  printf ("i386-pc-bsd\n"); exit (0);
         1376  +#endif
         1377  +
         1378  +#if defined (sequent)
         1379  +#if defined (i386)
         1380  +  printf ("i386-sequent-dynix\n"); exit (0);
         1381  +#endif
         1382  +#if defined (ns32000)
         1383  +  printf ("ns32k-sequent-dynix\n"); exit (0);
         1384  +#endif
         1385  +#endif
         1386  +
         1387  +#if defined (_SEQUENT_)
         1388  +    struct utsname un;
         1389  +
         1390  +    uname(&un);
         1391  +
         1392  +    if (strncmp(un.version, "V2", 2) == 0) {
         1393  +	printf ("i386-sequent-ptx2\n"); exit (0);
         1394  +    }
         1395  +    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
         1396  +	printf ("i386-sequent-ptx1\n"); exit (0);
         1397  +    }
         1398  +    printf ("i386-sequent-ptx\n"); exit (0);
         1399  +
         1400  +#endif
         1401  +
         1402  +#if defined (vax)
         1403  +# if !defined (ultrix)
         1404  +#  include <sys/param.h>
         1405  +#  if defined (BSD)
         1406  +#   if BSD == 43
         1407  +      printf ("vax-dec-bsd4.3\n"); exit (0);
         1408  +#   else
         1409  +#    if BSD == 199006
         1410  +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
         1411  +#    else
         1412  +      printf ("vax-dec-bsd\n"); exit (0);
         1413  +#    endif
         1414  +#   endif
         1415  +#  else
         1416  +    printf ("vax-dec-bsd\n"); exit (0);
         1417  +#  endif
         1418  +# else
         1419  +    printf ("vax-dec-ultrix\n"); exit (0);
         1420  +# endif
         1421  +#endif
         1422  +
         1423  +#if defined (alliant) && defined (i860)
         1424  +  printf ("i860-alliant-bsd\n"); exit (0);
         1425  +#endif
         1426  +
         1427  +  exit (1);
         1428  +}
         1429  +EOF
         1430  +
         1431  +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
         1432  +	{ echo "$SYSTEM_NAME"; exit; }
         1433  +
         1434  +# Apollos put the system type in the environment.
         1435  +
         1436  +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
         1437  +
         1438  +# Convex versions that predate uname can use getsysinfo(1)
         1439  +
         1440  +if [ -x /usr/convex/getsysinfo ]
         1441  +then
         1442  +    case `getsysinfo -f cpu_type` in
         1443  +    c1*)
         1444  +	echo c1-convex-bsd
         1445  +	exit ;;
         1446  +    c2*)
         1447  +	if getsysinfo -f scalar_acc
         1448  +	then echo c32-convex-bsd
         1449  +	else echo c2-convex-bsd
         1450  +	fi
         1451  +	exit ;;
         1452  +    c34*)
         1453  +	echo c34-convex-bsd
         1454  +	exit ;;
         1455  +    c38*)
         1456  +	echo c38-convex-bsd
         1457  +	exit ;;
         1458  +    c4*)
         1459  +	echo c4-convex-bsd
         1460  +	exit ;;
         1461  +    esac
         1462  +fi
         1463  +
         1464  +cat >&2 <<EOF
         1465  +$0: unable to guess system type
         1466  +
         1467  +This script, last modified $timestamp, has failed to recognize
         1468  +the operating system you are using. It is advised that you
         1469  +download the most up to date version of the config scripts from
         1470  +
         1471  +  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
         1472  +and
         1473  +  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
         1474  +
         1475  +If the version you run ($0) is already up to date, please
         1476  +send the following data and any information you think might be
         1477  +pertinent to <config-patches@gnu.org> in order to provide the needed
         1478  +information to handle your system.
         1479  +
         1480  +config.guess timestamp = $timestamp
         1481  +
         1482  +uname -m = `(uname -m) 2>/dev/null || echo unknown`
         1483  +uname -r = `(uname -r) 2>/dev/null || echo unknown`
         1484  +uname -s = `(uname -s) 2>/dev/null || echo unknown`
         1485  +uname -v = `(uname -v) 2>/dev/null || echo unknown`
         1486  +
         1487  +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
         1488  +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
         1489  +
         1490  +hostinfo               = `(hostinfo) 2>/dev/null`
         1491  +/bin/universe          = `(/bin/universe) 2>/dev/null`
         1492  +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
         1493  +/bin/arch              = `(/bin/arch) 2>/dev/null`
         1494  +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
         1495  +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
         1496  +
         1497  +UNAME_MACHINE = ${UNAME_MACHINE}
         1498  +UNAME_RELEASE = ${UNAME_RELEASE}
         1499  +UNAME_SYSTEM  = ${UNAME_SYSTEM}
         1500  +UNAME_VERSION = ${UNAME_VERSION}
         1501  +EOF
         1502  +
         1503  +exit 1
         1504  +
         1505  +# Local variables:
         1506  +# eval: (add-hook 'write-file-hooks 'time-stamp)
         1507  +# time-stamp-start: "timestamp='"
         1508  +# time-stamp-format: "%:y-%02m-%02d"
         1509  +# time-stamp-end: "'"
         1510  +# End:

Added config/config.sub.

            1  +#! /bin/sh
            2  +# Configuration validation subroutine script.
            3  +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
            4  +#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
            5  +#   Inc.
            6  +
            7  +timestamp='2006-12-08'
            8  +
            9  +# This file is (in principle) common to ALL GNU software.
           10  +# The presence of a machine in this file suggests that SOME GNU software
           11  +# can handle that machine.  It does not imply ALL GNU software can.
           12  +#
           13  +# This file is free software; you can redistribute it and/or modify
           14  +# it under the terms of the GNU General Public License as published by
           15  +# the Free Software Foundation; either version 2 of the License, or
           16  +# (at your option) any later version.
           17  +#
           18  +# This program is distributed in the hope that it will be useful,
           19  +# but WITHOUT ANY WARRANTY; without even the implied warranty of
           20  +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
           21  +# GNU General Public License for more details.
           22  +#
           23  +# You should have received a copy of the GNU General Public License
           24  +# along with this program; if not, write to the Free Software
           25  +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
           26  +# 02110-1301, USA.
           27  +#
           28  +# As a special exception to the GNU General Public License, if you
           29  +# distribute this file as part of a program that contains a
           30  +# configuration script generated by Autoconf, you may include it under
           31  +# the same distribution terms that you use for the rest of that program.
           32  +
           33  +
           34  +# Please send patches to <config-patches@gnu.org>.  Submit a context
           35  +# diff and a properly formatted ChangeLog entry.
           36  +#
           37  +# Configuration subroutine to validate and canonicalize a configuration type.
           38  +# Supply the specified configuration type as an argument.
           39  +# If it is invalid, we print an error message on stderr and exit with code 1.
           40  +# Otherwise, we print the canonical config type on stdout and succeed.
           41  +
           42  +# This file is supposed to be the same for all GNU packages
           43  +# and recognize all the CPU types, system types and aliases
           44  +# that are meaningful with *any* GNU software.
           45  +# Each package is responsible for reporting which valid configurations
           46  +# it does not support.  The user should be able to distinguish
           47  +# a failure to support a valid configuration from a meaningless
           48  +# configuration.
           49  +
           50  +# The goal of this file is to map all the various variations of a given
           51  +# machine specification into a single specification in the form:
           52  +#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
           53  +# or in some cases, the newer four-part form:
           54  +#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
           55  +# It is wrong to echo any other type of specification.
           56  +
           57  +me=`echo "$0" | sed -e 's,.*/,,'`
           58  +
           59  +usage="\
           60  +Usage: $0 [OPTION] CPU-MFR-OPSYS
           61  +       $0 [OPTION] ALIAS
           62  +
           63  +Canonicalize a configuration name.
           64  +
           65  +Operation modes:
           66  +  -h, --help         print this help, then exit
           67  +  -t, --time-stamp   print date of last modification, then exit
           68  +  -v, --version      print version number, then exit
           69  +
           70  +Report bugs and patches to <config-patches@gnu.org>."
           71  +
           72  +version="\
           73  +GNU config.sub ($timestamp)
           74  +
           75  +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
           76  +Free Software Foundation, Inc.
           77  +
           78  +This is free software; see the source for copying conditions.  There is NO
           79  +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
           80  +
           81  +help="
           82  +Try \`$me --help' for more information."
           83  +
           84  +# Parse command line
           85  +while test $# -gt 0 ; do
           86  +  case $1 in
           87  +    --time-stamp | --time* | -t )
           88  +       echo "$timestamp" ; exit ;;
           89  +    --version | -v )
           90  +       echo "$version" ; exit ;;
           91  +    --help | --h* | -h )
           92  +       echo "$usage"; exit ;;
           93  +    -- )     # Stop option processing
           94  +       shift; break ;;
           95  +    - )	# Use stdin as input.
           96  +       break ;;
           97  +    -* )
           98  +       echo "$me: invalid option $1$help"
           99  +       exit 1 ;;
          100  +
          101  +    *local*)
          102  +       # First pass through any local machine types.
          103  +       echo $1
          104  +       exit ;;
          105  +
          106  +    * )
          107  +       break ;;
          108  +  esac
          109  +done
          110  +
          111  +case $# in
          112  + 0) echo "$me: missing argument$help" >&2
          113  +    exit 1;;
          114  + 1) ;;
          115  + *) echo "$me: too many arguments$help" >&2
          116  +    exit 1;;
          117  +esac
          118  +
          119  +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
          120  +# Here we must recognize all the valid KERNEL-OS combinations.
          121  +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
          122  +case $maybe_os in
          123  +  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
          124  +  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
          125  +  storm-chaos* | os2-emx* | rtmk-nova*)
          126  +    os=-$maybe_os
          127  +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
          128  +    ;;
          129  +  *)
          130  +    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
          131  +    if [ $basic_machine != $1 ]
          132  +    then os=`echo $1 | sed 's/.*-/-/'`
          133  +    else os=; fi
          134  +    ;;
          135  +esac
          136  +
          137  +### Let's recognize common machines as not being operating systems so
          138  +### that things like config.sub decstation-3100 work.  We also
          139  +### recognize some manufacturers as not being operating systems, so we
          140  +### can provide default operating systems below.
          141  +case $os in
          142  +	-sun*os*)
          143  +		# Prevent following clause from handling this invalid input.
          144  +		;;
          145  +	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
          146  +	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
          147  +	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
          148  +	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
          149  +	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
          150  +	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
          151  +	-apple | -axis | -knuth | -cray)
          152  +		os=
          153  +		basic_machine=$1
          154  +		;;
          155  +	-sim | -cisco | -oki | -wec | -winbond)
          156  +		os=
          157  +		basic_machine=$1
          158  +		;;
          159  +	-scout)
          160  +		;;
          161  +	-wrs)
          162  +		os=-vxworks
          163  +		basic_machine=$1
          164  +		;;
          165  +	-chorusos*)
          166  +		os=-chorusos
          167  +		basic_machine=$1
          168  +		;;
          169  + 	-chorusrdb)
          170  + 		os=-chorusrdb
          171  +		basic_machine=$1
          172  + 		;;
          173  +	-hiux*)
          174  +		os=-hiuxwe2
          175  +		;;
          176  +	-sco6)
          177  +		os=-sco5v6
          178  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          179  +		;;
          180  +	-sco5)
          181  +		os=-sco3.2v5
          182  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          183  +		;;
          184  +	-sco4)
          185  +		os=-sco3.2v4
          186  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          187  +		;;
          188  +	-sco3.2.[4-9]*)
          189  +		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
          190  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          191  +		;;
          192  +	-sco3.2v[4-9]*)
          193  +		# Don't forget version if it is 3.2v4 or newer.
          194  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          195  +		;;
          196  +	-sco5v6*)
          197  +		# Don't forget version if it is 3.2v4 or newer.
          198  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          199  +		;;
          200  +	-sco*)
          201  +		os=-sco3.2v2
          202  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          203  +		;;
          204  +	-udk*)
          205  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          206  +		;;
          207  +	-isc)
          208  +		os=-isc2.2
          209  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          210  +		;;
          211  +	-clix*)
          212  +		basic_machine=clipper-intergraph
          213  +		;;
          214  +	-isc*)
          215  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          216  +		;;
          217  +	-lynx*)
          218  +		os=-lynxos
          219  +		;;
          220  +	-ptx*)
          221  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
          222  +		;;
          223  +	-windowsnt*)
          224  +		os=`echo $os | sed -e 's/windowsnt/winnt/'`
          225  +		;;
          226  +	-psos*)
          227  +		os=-psos
          228  +		;;
          229  +	-mint | -mint[0-9]*)
          230  +		basic_machine=m68k-atari
          231  +		os=-mint
          232  +		;;
          233  +esac
          234  +
          235  +# Decode aliases for certain CPU-COMPANY combinations.
          236  +case $basic_machine in
          237  +	# Recognize the basic CPU types without company name.
          238  +	# Some are omitted here because they have special meanings below.
          239  +	1750a | 580 \
          240  +	| a29k \
          241  +	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
          242  +	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
          243  +	| am33_2.0 \
          244  +	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
          245  +	| bfin \
          246  +	| c4x | clipper \
          247  +	| d10v | d30v | dlx | dsp16xx \
          248  +	| fido | fr30 | frv \
          249  +	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
          250  +	| i370 | i860 | i960 | ia64 \
          251  +	| ip2k | iq2000 \
          252  +	| m32c | m32r | m32rle | m68000 | m68k | m88k \
          253  +	| maxq | mb | microblaze | mcore \
          254  +	| mips | mipsbe | mipseb | mipsel | mipsle \
          255  +	| mips16 \
          256  +	| mips64 | mips64el \
          257  +	| mips64vr | mips64vrel \
          258  +	| mips64orion | mips64orionel \
          259  +	| mips64vr4100 | mips64vr4100el \
          260  +	| mips64vr4300 | mips64vr4300el \
          261  +	| mips64vr5000 | mips64vr5000el \
          262  +	| mips64vr5900 | mips64vr5900el \
          263  +	| mipsisa32 | mipsisa32el \
          264  +	| mipsisa32r2 | mipsisa32r2el \
          265  +	| mipsisa64 | mipsisa64el \
          266  +	| mipsisa64r2 | mipsisa64r2el \
          267  +	| mipsisa64sb1 | mipsisa64sb1el \
          268  +	| mipsisa64sr71k | mipsisa64sr71kel \
          269  +	| mipstx39 | mipstx39el \
          270  +	| mn10200 | mn10300 \
          271  +	| mt \
          272  +	| msp430 \
          273  +	| nios | nios2 \
          274  +	| ns16k | ns32k \
          275  +	| or32 \
          276  +	| pdp10 | pdp11 | pj | pjl \
          277  +	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
          278  +	| pyramid \
          279  +	| score \
          280  +	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
          281  +	| sh64 | sh64le \
          282  +	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
          283  +	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
          284  +	| spu | strongarm \
          285  +	| tahoe | thumb | tic4x | tic80 | tron \
          286  +	| v850 | v850e \
          287  +	| we32k \
          288  +	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
          289  +	| z8k)
          290  +		basic_machine=$basic_machine-unknown
          291  +		;;
          292  +	m6811 | m68hc11 | m6812 | m68hc12)
          293  +		# Motorola 68HC11/12.
          294  +		basic_machine=$basic_machine-unknown
          295  +		os=-none
          296  +		;;
          297  +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
          298  +		;;
          299  +	ms1)
          300  +		basic_machine=mt-unknown
          301  +		;;
          302  +
          303  +	# We use `pc' rather than `unknown'
          304  +	# because (1) that's what they normally are, and
          305  +	# (2) the word "unknown" tends to confuse beginning users.
          306  +	i*86 | x86_64)
          307  +	  basic_machine=$basic_machine-pc
          308  +	  ;;
          309  +	# Object if more than one company name word.
          310  +	*-*-*)
          311  +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
          312  +		exit 1
          313  +		;;
          314  +	# Recognize the basic CPU types with company name.
          315  +	580-* \
          316  +	| a29k-* \
          317  +	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
          318  +	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
          319  +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
          320  +	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
          321  +	| avr-* | avr32-* \
          322  +	| bfin-* | bs2000-* \
          323  +	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
          324  +	| clipper-* | craynv-* | cydra-* \
          325  +	| d10v-* | d30v-* | dlx-* \
          326  +	| elxsi-* \
          327  +	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
          328  +	| h8300-* | h8500-* \
          329  +	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
          330  +	| i*86-* | i860-* | i960-* | ia64-* \
          331  +	| ip2k-* | iq2000-* \
          332  +	| m32c-* | m32r-* | m32rle-* \
          333  +	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
          334  +	| m88110-* | m88k-* | maxq-* | mcore-* \
          335  +	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
          336  +	| mips16-* \
          337  +	| mips64-* | mips64el-* \
          338  +	| mips64vr-* | mips64vrel-* \
          339  +	| mips64orion-* | mips64orionel-* \
          340  +	| mips64vr4100-* | mips64vr4100el-* \
          341  +	| mips64vr4300-* | mips64vr4300el-* \
          342  +	| mips64vr5000-* | mips64vr5000el-* \
          343  +	| mips64vr5900-* | mips64vr5900el-* \
          344  +	| mipsisa32-* | mipsisa32el-* \
          345  +	| mipsisa32r2-* | mipsisa32r2el-* \
          346  +	| mipsisa64-* | mipsisa64el-* \
          347  +	| mipsisa64r2-* | mipsisa64r2el-* \
          348  +	| mipsisa64sb1-* | mipsisa64sb1el-* \
          349  +	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
          350  +	| mipstx39-* | mipstx39el-* \
          351  +	| mmix-* \
          352  +	| mt-* \
          353  +	| msp430-* \
          354  +	| nios-* | nios2-* \
          355  +	| none-* | np1-* | ns16k-* | ns32k-* \
          356  +	| orion-* \
          357  +	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
          358  +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
          359  +	| pyramid-* \
          360  +	| romp-* | rs6000-* \
          361  +	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
          362  +	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
          363  +	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
          364  +	| sparclite-* \
          365  +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
          366  +	| tahoe-* | thumb-* \
          367  +	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
          368  +	| tron-* \
          369  +	| v850-* | v850e-* | vax-* \
          370  +	| we32k-* \
          371  +	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
          372  +	| xstormy16-* | xtensa-* \
          373  +	| ymp-* \
          374  +	| z8k-*)
          375  +		;;
          376  +	# Recognize the various machine names and aliases which stand
          377  +	# for a CPU type and a company and sometimes even an OS.
          378  +	386bsd)
          379  +		basic_machine=i386-unknown
          380  +		os=-bsd
          381  +		;;
          382  +	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
          383  +		basic_machine=m68000-att
          384  +		;;
          385  +	3b*)
          386  +		basic_machine=we32k-att
          387  +		;;
          388  +	a29khif)
          389  +		basic_machine=a29k-amd
          390  +		os=-udi
          391  +		;;
          392  +    	abacus)
          393  +		basic_machine=abacus-unknown
          394  +		;;
          395  +	adobe68k)
          396  +		basic_machine=m68010-adobe
          397  +		os=-scout
          398  +		;;
          399  +	alliant | fx80)
          400  +		basic_machine=fx80-alliant
          401  +		;;
          402  +	altos | altos3068)
          403  +		basic_machine=m68k-altos
          404  +		;;
          405  +	am29k)
          406  +		basic_machine=a29k-none
          407  +		os=-bsd
          408  +		;;
          409  +	amd64)
          410  +		basic_machine=x86_64-pc
          411  +		;;
          412  +	amd64-*)
          413  +		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
          414  +		;;
          415  +	amdahl)
          416  +		basic_machine=580-amdahl
          417  +		os=-sysv
          418  +		;;
          419  +	amiga | amiga-*)
          420  +		basic_machine=m68k-unknown
          421  +		;;
          422  +	amigaos | amigados)
          423  +		basic_machine=m68k-unknown
          424  +		os=-amigaos
          425  +		;;
          426  +	amigaunix | amix)
          427  +		basic_machine=m68k-unknown
          428  +		os=-sysv4
          429  +		;;
          430  +	apollo68)
          431  +		basic_machine=m68k-apollo
          432  +		os=-sysv
          433  +		;;
          434  +	apollo68bsd)
          435  +		basic_machine=m68k-apollo
          436  +		os=-bsd
          437  +		;;
          438  +	aux)
          439  +		basic_machine=m68k-apple
          440  +		os=-aux
          441  +		;;
          442  +	balance)
          443  +		basic_machine=ns32k-sequent
          444  +		os=-dynix
          445  +		;;
          446  +	c90)
          447  +		basic_machine=c90-cray
          448  +		os=-unicos
          449  +		;;
          450  +	convex-c1)
          451  +		basic_machine=c1-convex
          452  +		os=-bsd
          453  +		;;
          454  +	convex-c2)
          455  +		basic_machine=c2-convex
          456  +		os=-bsd
          457  +		;;
          458  +	convex-c32)
          459  +		basic_machine=c32-convex
          460  +		os=-bsd
          461  +		;;
          462  +	convex-c34)
          463  +		basic_machine=c34-convex
          464  +		os=-bsd
          465  +		;;
          466  +	convex-c38)
          467  +		basic_machine=c38-convex
          468  +		os=-bsd
          469  +		;;
          470  +	cray | j90)
          471  +		basic_machine=j90-cray
          472  +		os=-unicos
          473  +		;;
          474  +	craynv)
          475  +		basic_machine=craynv-cray
          476  +		os=-unicosmp
          477  +		;;
          478  +	cr16c)
          479  +		basic_machine=cr16c-unknown
          480  +		os=-elf
          481  +		;;
          482  +	crds | unos)
          483  +		basic_machine=m68k-crds
          484  +		;;
          485  +	crisv32 | crisv32-* | etraxfs*)
          486  +		basic_machine=crisv32-axis
          487  +		;;
          488  +	cris | cris-* | etrax*)
          489  +		basic_machine=cris-axis
          490  +		;;
          491  +	crx)
          492  +		basic_machine=crx-unknown
          493  +		os=-elf
          494  +		;;
          495  +	da30 | da30-*)
          496  +		basic_machine=m68k-da30
          497  +		;;
          498  +	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
          499  +		basic_machine=mips-dec
          500  +		;;
          501  +	decsystem10* | dec10*)
          502  +		basic_machine=pdp10-dec
          503  +		os=-tops10
          504  +		;;
          505  +	decsystem20* | dec20*)
          506  +		basic_machine=pdp10-dec
          507  +		os=-tops20
          508  +		;;
          509  +	delta | 3300 | motorola-3300 | motorola-delta \
          510  +	      | 3300-motorola | delta-motorola)
          511  +		basic_machine=m68k-motorola
          512  +		;;
          513  +	delta88)
          514  +		basic_machine=m88k-motorola
          515  +		os=-sysv3
          516  +		;;
          517  +	djgpp)
          518  +		basic_machine=i586-pc
          519  +		os=-msdosdjgpp
          520  +		;;
          521  +	dpx20 | dpx20-*)
          522  +		basic_machine=rs6000-bull
          523  +		os=-bosx
          524  +		;;
          525  +	dpx2* | dpx2*-bull)
          526  +		basic_machine=m68k-bull
          527  +		os=-sysv3
          528  +		;;
          529  +	ebmon29k)
          530  +		basic_machine=a29k-amd
          531  +		os=-ebmon
          532  +		;;
          533  +	elxsi)
          534  +		basic_machine=elxsi-elxsi
          535  +		os=-bsd
          536  +		;;
          537  +	encore | umax | mmax)
          538  +		basic_machine=ns32k-encore
          539  +		;;
          540  +	es1800 | OSE68k | ose68k | ose | OSE)
          541  +		basic_machine=m68k-ericsson
          542  +		os=-ose
          543  +		;;
          544  +	fx2800)
          545  +		basic_machine=i860-alliant
          546  +		;;
          547  +	genix)
          548  +		basic_machine=ns32k-ns
          549  +		;;
          550  +	gmicro)
          551  +		basic_machine=tron-gmicro
          552  +		os=-sysv
          553  +		;;
          554  +	go32)
          555  +		basic_machine=i386-pc
          556  +		os=-go32
          557  +		;;
          558  +	h3050r* | hiux*)
          559  +		basic_machine=hppa1.1-hitachi
          560  +		os=-hiuxwe2
          561  +		;;
          562  +	h8300hms)
          563  +		basic_machine=h8300-hitachi
          564  +		os=-hms
          565  +		;;
          566  +	h8300xray)
          567  +		basic_machine=h8300-hitachi
          568  +		os=-xray
          569  +		;;
          570  +	h8500hms)
          571  +		basic_machine=h8500-hitachi
          572  +		os=-hms
          573  +		;;
          574  +	harris)
          575  +		basic_machine=m88k-harris
          576  +		os=-sysv3
          577  +		;;
          578  +	hp300-*)
          579  +		basic_machine=m68k-hp
          580  +		;;
          581  +	hp300bsd)
          582  +		basic_machine=m68k-hp
          583  +		os=-bsd
          584  +		;;
          585  +	hp300hpux)
          586  +		basic_machine=m68k-hp
          587  +		os=-hpux
          588  +		;;
          589  +	hp3k9[0-9][0-9] | hp9[0-9][0-9])
          590  +		basic_machine=hppa1.0-hp
          591  +		;;
          592  +	hp9k2[0-9][0-9] | hp9k31[0-9])
          593  +		basic_machine=m68000-hp
          594  +		;;
          595  +	hp9k3[2-9][0-9])
          596  +		basic_machine=m68k-hp
          597  +		;;
          598  +	hp9k6[0-9][0-9] | hp6[0-9][0-9])
          599  +		basic_machine=hppa1.0-hp
          600  +		;;
          601  +	hp9k7[0-79][0-9] | hp7[0-79][0-9])
          602  +		basic_machine=hppa1.1-hp
          603  +		;;
          604  +	hp9k78[0-9] | hp78[0-9])
          605  +		# FIXME: really hppa2.0-hp
          606  +		basic_machine=hppa1.1-hp
          607  +		;;
          608  +	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
          609  +		# FIXME: really hppa2.0-hp
          610  +		basic_machine=hppa1.1-hp
          611  +		;;
          612  +	hp9k8[0-9][13679] | hp8[0-9][13679])
          613  +		basic_machine=hppa1.1-hp
          614  +		;;
          615  +	hp9k8[0-9][0-9] | hp8[0-9][0-9])
          616  +		basic_machine=hppa1.0-hp
          617  +		;;
          618  +	hppa-next)
          619  +		os=-nextstep3
          620  +		;;
          621  +	hppaosf)
          622  +		basic_machine=hppa1.1-hp
          623  +		os=-osf
          624  +		;;
          625  +	hppro)
          626  +		basic_machine=hppa1.1-hp
          627  +		os=-proelf
          628  +		;;
          629  +	i370-ibm* | ibm*)
          630  +		basic_machine=i370-ibm
          631  +		;;
          632  +# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
          633  +	i*86v32)
          634  +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
          635  +		os=-sysv32
          636  +		;;
          637  +	i*86v4*)
          638  +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
          639  +		os=-sysv4
          640  +		;;
          641  +	i*86v)
          642  +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
          643  +		os=-sysv
          644  +		;;
          645  +	i*86sol2)
          646  +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
          647  +		os=-solaris2
          648  +		;;
          649  +	i386mach)
          650  +		basic_machine=i386-mach
          651  +		os=-mach
          652  +		;;
          653  +	i386-vsta | vsta)
          654  +		basic_machine=i386-unknown
          655  +		os=-vsta
          656  +		;;
          657  +	iris | iris4d)
          658  +		basic_machine=mips-sgi
          659  +		case $os in
          660  +		    -irix*)
          661  +			;;
          662  +		    *)
          663  +			os=-irix4
          664  +			;;
          665  +		esac
          666  +		;;
          667  +	isi68 | isi)
          668  +		basic_machine=m68k-isi
          669  +		os=-sysv
          670  +		;;
          671  +	m88k-omron*)
          672  +		basic_machine=m88k-omron
          673  +		;;
          674  +	magnum | m3230)
          675  +		basic_machine=mips-mips
          676  +		os=-sysv
          677  +		;;
          678  +	merlin)
          679  +		basic_machine=ns32k-utek
          680  +		os=-sysv
          681  +		;;
          682  +	mingw32)
          683  +		basic_machine=i386-pc
          684  +		os=-mingw32
          685  +		;;
          686  +	miniframe)
          687  +		basic_machine=m68000-convergent
          688  +		;;
          689  +	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
          690  +		basic_machine=m68k-atari
          691  +		os=-mint
          692  +		;;
          693  +	mips3*-*)
          694  +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
          695  +		;;
          696  +	mips3*)
          697  +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
          698  +		;;
          699  +	monitor)
          700  +		basic_machine=m68k-rom68k
          701  +		os=-coff
          702  +		;;
          703  +	morphos)
          704  +		basic_machine=powerpc-unknown
          705  +		os=-morphos
          706  +		;;
          707  +	msdos)
          708  +		basic_machine=i386-pc
          709  +		os=-msdos
          710  +		;;
          711  +	ms1-*)
          712  +		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
          713  +		;;
          714  +	mvs)
          715  +		basic_machine=i370-ibm
          716  +		os=-mvs
          717  +		;;
          718  +	ncr3000)
          719  +		basic_machine=i486-ncr
          720  +		os=-sysv4
          721  +		;;
          722  +	netbsd386)
          723  +		basic_machine=i386-unknown
          724  +		os=-netbsd
          725  +		;;
          726  +	netwinder)
          727  +		basic_machine=armv4l-rebel
          728  +		os=-linux
          729  +		;;
          730  +	news | news700 | news800 | news900)
          731  +		basic_machine=m68k-sony
          732  +		os=-newsos
          733  +		;;
          734  +	news1000)
          735  +		basic_machine=m68030-sony
          736  +		os=-newsos
          737  +		;;
          738  +	news-3600 | risc-news)
          739  +		basic_machine=mips-sony
          740  +		os=-newsos
          741  +		;;
          742  +	necv70)
          743  +		basic_machine=v70-nec
          744  +		os=-sysv
          745  +		;;
          746  +	next | m*-next )
          747  +		basic_machine=m68k-next
          748  +		case $os in
          749  +		    -nextstep* )
          750  +			;;
          751  +		    -ns2*)
          752  +		      os=-nextstep2
          753  +			;;
          754  +		    *)
          755  +		      os=-nextstep3
          756  +			;;
          757  +		esac
          758  +		;;
          759  +	nh3000)
          760  +		basic_machine=m68k-harris
          761  +		os=-cxux
          762  +		;;
          763  +	nh[45]000)
          764  +		basic_machine=m88k-harris
          765  +		os=-cxux
          766  +		;;
          767  +	nindy960)
          768  +		basic_machine=i960-intel
          769  +		os=-nindy
          770  +		;;
          771  +	mon960)
          772  +		basic_machine=i960-intel
          773  +		os=-mon960
          774  +		;;
          775  +	nonstopux)
          776  +		basic_machine=mips-compaq
          777  +		os=-nonstopux
          778  +		;;
          779  +	np1)
          780  +		basic_machine=np1-gould
          781  +		;;
          782  +	nsr-tandem)
          783  +		basic_machine=nsr-tandem
          784  +		;;
          785  +	op50n-* | op60c-*)
          786  +		basic_machine=hppa1.1-oki
          787  +		os=-proelf
          788  +		;;
          789  +	openrisc | openrisc-*)
          790  +		basic_machine=or32-unknown
          791  +		;;
          792  +	os400)
          793  +		basic_machine=powerpc-ibm
          794  +		os=-os400
          795  +		;;
          796  +	OSE68000 | ose68000)
          797  +		basic_machine=m68000-ericsson
          798  +		os=-ose
          799  +		;;
          800  +	os68k)
          801  +		basic_machine=m68k-none
          802  +		os=-os68k
          803  +		;;
          804  +	pa-hitachi)
          805  +		basic_machine=hppa1.1-hitachi
          806  +		os=-hiuxwe2
          807  +		;;
          808  +	paragon)
          809  +		basic_machine=i860-intel
          810  +		os=-osf
          811  +		;;
          812  +	pbd)
          813  +		basic_machine=sparc-tti
          814  +		;;
          815  +	pbb)
          816  +		basic_machine=m68k-tti
          817  +		;;
          818  +	pc532 | pc532-*)
          819  +		basic_machine=ns32k-pc532
          820  +		;;
          821  +	pc98)
          822  +		basic_machine=i386-pc
          823  +		;;
          824  +	pc98-*)
          825  +		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
          826  +		;;
          827  +	pentium | p5 | k5 | k6 | nexgen | viac3)
          828  +		basic_machine=i586-pc
          829  +		;;
          830  +	pentiumpro | p6 | 6x86 | athlon | athlon_*)
          831  +		basic_machine=i686-pc
          832  +		;;
          833  +	pentiumii | pentium2 | pentiumiii | pentium3)
          834  +		basic_machine=i686-pc
          835  +		;;
          836  +	pentium4)
          837  +		basic_machine=i786-pc
          838  +		;;
          839  +	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
          840  +		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
          841  +		;;
          842  +	pentiumpro-* | p6-* | 6x86-* | athlon-*)
          843  +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
          844  +		;;
          845  +	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
          846  +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
          847  +		;;
          848  +	pentium4-*)
          849  +		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
          850  +		;;
          851  +	pn)
          852  +		basic_machine=pn-gould
          853  +		;;
          854  +	power)	basic_machine=power-ibm
          855  +		;;
          856  +	ppc)	basic_machine=powerpc-unknown
          857  +		;;
          858  +	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
          859  +		;;
          860  +	ppcle | powerpclittle | ppc-le | powerpc-little)
          861  +		basic_machine=powerpcle-unknown
          862  +		;;
          863  +	ppcle-* | powerpclittle-*)
          864  +		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
          865  +		;;
          866  +	ppc64)	basic_machine=powerpc64-unknown
          867  +		;;
          868  +	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
          869  +		;;
          870  +	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
          871  +		basic_machine=powerpc64le-unknown
          872  +		;;
          873  +	ppc64le-* | powerpc64little-*)
          874  +		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
          875  +		;;
          876  +	ps2)
          877  +		basic_machine=i386-ibm
          878  +		;;
          879  +	pw32)
          880  +		basic_machine=i586-unknown
          881  +		os=-pw32
          882  +		;;
          883  +	rdos)
          884  +		basic_machine=i386-pc
          885  +		os=-rdos
          886  +		;;
          887  +	rom68k)
          888  +		basic_machine=m68k-rom68k
          889  +		os=-coff
          890  +		;;
          891  +	rm[46]00)
          892  +		basic_machine=mips-siemens
          893  +		;;
          894  +	rtpc | rtpc-*)
          895  +		basic_machine=romp-ibm
          896  +		;;
          897  +	s390 | s390-*)
          898  +		basic_machine=s390-ibm
          899  +		;;
          900  +	s390x | s390x-*)
          901  +		basic_machine=s390x-ibm
          902  +		;;
          903  +	sa29200)
          904  +		basic_machine=a29k-amd
          905  +		os=-udi
          906  +		;;
          907  +	sb1)
          908  +		basic_machine=mipsisa64sb1-unknown
          909  +		;;
          910  +	sb1el)
          911  +		basic_machine=mipsisa64sb1el-unknown
          912  +		;;
          913  +	sde)
          914  +		basic_machine=mipsisa32-sde
          915  +		os=-elf
          916  +		;;
          917  +	sei)
          918  +		basic_machine=mips-sei
          919  +		os=-seiux
          920  +		;;
          921  +	sequent)
          922  +		basic_machine=i386-sequent
          923  +		;;
          924  +	sh)
          925  +		basic_machine=sh-hitachi
          926  +		os=-hms
          927  +		;;
          928  +	sh5el)
          929  +		basic_machine=sh5le-unknown
          930  +		;;
          931  +	sh64)
          932  +		basic_machine=sh64-unknown
          933  +		;;
          934  +	sparclite-wrs | simso-wrs)
          935  +		basic_machine=sparclite-wrs
          936  +		os=-vxworks
          937  +		;;
          938  +	sps7)
          939  +		basic_machine=m68k-bull
          940  +		os=-sysv2
          941  +		;;
          942  +	spur)
          943  +		basic_machine=spur-unknown
          944  +		;;
          945  +	st2000)
          946  +		basic_machine=m68k-tandem
          947  +		;;
          948  +	stratus)
          949  +		basic_machine=i860-stratus
          950  +		os=-sysv4
          951  +		;;
          952  +	sun2)
          953  +		basic_machine=m68000-sun
          954  +		;;
          955  +	sun2os3)
          956  +		basic_machine=m68000-sun
          957  +		os=-sunos3
          958  +		;;
          959  +	sun2os4)
          960  +		basic_machine=m68000-sun
          961  +		os=-sunos4
          962  +		;;
          963  +	sun3os3)
          964  +		basic_machine=m68k-sun
          965  +		os=-sunos3
          966  +		;;
          967  +	sun3os4)
          968  +		basic_machine=m68k-sun
          969  +		os=-sunos4
          970  +		;;
          971  +	sun4os3)
          972  +		basic_machine=sparc-sun
          973  +		os=-sunos3
          974  +		;;
          975  +	sun4os4)
          976  +		basic_machine=sparc-sun
          977  +		os=-sunos4
          978  +		;;
          979  +	sun4sol2)
          980  +		basic_machine=sparc-sun
          981  +		os=-solaris2
          982  +		;;
          983  +	sun3 | sun3-*)
          984  +		basic_machine=m68k-sun
          985  +		;;
          986  +	sun4)
          987  +		basic_machine=sparc-sun
          988  +		;;
          989  +	sun386 | sun386i | roadrunner)
          990  +		basic_machine=i386-sun
          991  +		;;
          992  +	sv1)
          993  +		basic_machine=sv1-cray
          994  +		os=-unicos
          995  +		;;
          996  +	symmetry)
          997  +		basic_machine=i386-sequent
          998  +		os=-dynix
          999  +		;;
         1000  +	t3e)
         1001  +		basic_machine=alphaev5-cray
         1002  +		os=-unicos
         1003  +		;;
         1004  +	t90)
         1005  +		basic_machine=t90-cray
         1006  +		os=-unicos
         1007  +		;;
         1008  +	tic54x | c54x*)
         1009  +		basic_machine=tic54x-unknown
         1010  +		os=-coff
         1011  +		;;
         1012  +	tic55x | c55x*)
         1013  +		basic_machine=tic55x-unknown
         1014  +		os=-coff
         1015  +		;;
         1016  +	tic6x | c6x*)
         1017  +		basic_machine=tic6x-unknown
         1018  +		os=-coff
         1019  +		;;
         1020  +	tx39)
         1021  +		basic_machine=mipstx39-unknown
         1022  +		;;
         1023  +	tx39el)
         1024  +		basic_machine=mipstx39el-unknown
         1025  +		;;
         1026  +	toad1)
         1027  +		basic_machine=pdp10-xkl
         1028  +		os=-tops20
         1029  +		;;
         1030  +	tower | tower-32)
         1031  +		basic_machine=m68k-ncr
         1032  +		;;
         1033  +	tpf)
         1034  +		basic_machine=s390x-ibm
         1035  +		os=-tpf
         1036  +		;;
         1037  +	udi29k)
         1038  +		basic_machine=a29k-amd
         1039  +		os=-udi
         1040  +		;;
         1041  +	ultra3)
         1042  +		basic_machine=a29k-nyu
         1043  +		os=-sym1
         1044  +		;;
         1045  +	v810 | necv810)
         1046  +		basic_machine=v810-nec
         1047  +		os=-none
         1048  +		;;
         1049  +	vaxv)
         1050  +		basic_machine=vax-dec
         1051  +		os=-sysv
         1052  +		;;
         1053  +	vms)
         1054  +		basic_machine=vax-dec
         1055  +		os=-vms
         1056  +		;;
         1057  +	vpp*|vx|vx-*)
         1058  +		basic_machine=f301-fujitsu
         1059  +		;;
         1060  +	vxworks960)
         1061  +		basic_machine=i960-wrs
         1062  +		os=-vxworks
         1063  +		;;
         1064  +	vxworks68)
         1065  +		basic_machine=m68k-wrs
         1066  +		os=-vxworks
         1067  +		;;
         1068  +	vxworks29k)
         1069  +		basic_machine=a29k-wrs
         1070  +		os=-vxworks
         1071  +		;;
         1072  +	w65*)
         1073  +		basic_machine=w65-wdc
         1074  +		os=-none
         1075  +		;;
         1076  +	w89k-*)
         1077  +		basic_machine=hppa1.1-winbond
         1078  +		os=-proelf
         1079  +		;;
         1080  +	xbox)
         1081  +		basic_machine=i686-pc
         1082  +		os=-mingw32
         1083  +		;;
         1084  +	xps | xps100)
         1085  +		basic_machine=xps100-honeywell
         1086  +		;;
         1087  +	ymp)
         1088  +		basic_machine=ymp-cray
         1089  +		os=-unicos
         1090  +		;;
         1091  +	z8k-*-coff)
         1092  +		basic_machine=z8k-unknown
         1093  +		os=-sim
         1094  +		;;
         1095  +	none)
         1096  +		basic_machine=none-none
         1097  +		os=-none
         1098  +		;;
         1099  +
         1100  +# Here we handle the default manufacturer of certain CPU types.  It is in
         1101  +# some cases the only manufacturer, in others, it is the most popular.
         1102  +	w89k)
         1103  +		basic_machine=hppa1.1-winbond
         1104  +		;;
         1105  +	op50n)
         1106  +		basic_machine=hppa1.1-oki
         1107  +		;;
         1108  +	op60c)
         1109  +		basic_machine=hppa1.1-oki
         1110  +		;;
         1111  +	romp)
         1112  +		basic_machine=romp-ibm
         1113  +		;;
         1114  +	mmix)
         1115  +		basic_machine=mmix-knuth
         1116  +		;;
         1117  +	rs6000)
         1118  +		basic_machine=rs6000-ibm
         1119  +		;;
         1120  +	vax)
         1121  +		basic_machine=vax-dec
         1122  +		;;
         1123  +	pdp10)
         1124  +		# there are many clones, so DEC is not a safe bet
         1125  +		basic_machine=pdp10-unknown
         1126  +		;;
         1127  +	pdp11)
         1128  +		basic_machine=pdp11-dec
         1129  +		;;
         1130  +	we32k)
         1131  +		basic_machine=we32k-att
         1132  +		;;
         1133  +	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
         1134  +		basic_machine=sh-unknown
         1135  +		;;
         1136  +	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
         1137  +		basic_machine=sparc-sun
         1138  +		;;
         1139  +	cydra)
         1140  +		basic_machine=cydra-cydrome
         1141  +		;;
         1142  +	orion)
         1143  +		basic_machine=orion-highlevel
         1144  +		;;
         1145  +	orion105)
         1146  +		basic_machine=clipper-highlevel
         1147  +		;;
         1148  +	mac | mpw | mac-mpw)
         1149  +		basic_machine=m68k-apple
         1150  +		;;
         1151  +	pmac | pmac-mpw)
         1152  +		basic_machine=powerpc-apple
         1153  +		;;
         1154  +	*-unknown)
         1155  +		# Make sure to match an already-canonicalized machine name.
         1156  +		;;
         1157  +	*)
         1158  +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
         1159  +		exit 1
         1160  +		;;
         1161  +esac
         1162  +
         1163  +# Here we canonicalize certain aliases for manufacturers.
         1164  +case $basic_machine in
         1165  +	*-digital*)
         1166  +		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
         1167  +		;;
         1168  +	*-commodore*)
         1169  +		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
         1170  +		;;
         1171  +	*)
         1172  +		;;
         1173  +esac
         1174  +
         1175  +# Decode manufacturer-specific aliases for certain operating systems.
         1176  +
         1177  +if [ x"$os" != x"" ]
         1178  +then
         1179  +case $os in
         1180  +        # First match some system type aliases
         1181  +        # that might get confused with valid system types.
         1182  +	# -solaris* is a basic system type, with this one exception.
         1183  +	-solaris1 | -solaris1.*)
         1184  +		os=`echo $os | sed -e 's|solaris1|sunos4|'`
         1185  +		;;
         1186  +	-solaris)
         1187  +		os=-solaris2
         1188  +		;;
         1189  +	-svr4*)
         1190  +		os=-sysv4
         1191  +		;;
         1192  +	-unixware*)
         1193  +		os=-sysv4.2uw
         1194  +		;;
         1195  +	-gnu/linux*)
         1196  +		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
         1197  +		;;
         1198  +	# First accept the basic system types.
         1199  +	# The portable systems comes first.
         1200  +	# Each alternative MUST END IN A *, to match a version number.
         1201  +	# -sysv* is not here because it comes later, after sysvr4.
         1202  +	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
         1203  +	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
         1204  +	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
         1205  +	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
         1206  +	      | -aos* \
         1207  +	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
         1208  +	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
         1209  +	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
         1210  +	      | -openbsd* | -solidbsd* \
         1211  +	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
         1212  +	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
         1213  +	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
         1214  +	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
         1215  +	      | -chorusos* | -chorusrdb* \
         1216  +	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
         1217  +	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
         1218  +	      | -uxpv* | -beos* | -mpeix* | -udk* \
         1219  +	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
         1220  +	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
         1221  +	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
         1222  +	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
         1223  +	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
         1224  +	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
         1225  +	      | -skyos* | -haiku* | -rdos* | -toppers*)
         1226  +	# Remember, each alternative MUST END IN *, to match a version number.
         1227  +		;;
         1228  +	-qnx*)
         1229  +		case $basic_machine in
         1230  +		    x86-* | i*86-*)
         1231  +			;;
         1232  +		    *)
         1233  +			os=-nto$os
         1234  +			;;
         1235  +		esac
         1236  +		;;
         1237  +	-nto-qnx*)
         1238  +		;;
         1239  +	-nto*)
         1240  +		os=`echo $os | sed -e 's|nto|nto-qnx|'`
         1241  +		;;
         1242  +	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
         1243  +	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
         1244  +	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
         1245  +		;;
         1246  +	-mac*)
         1247  +		os=`echo $os | sed -e 's|mac|macos|'`
         1248  +		;;
         1249  +	-linux-dietlibc)
         1250  +		os=-linux-dietlibc
         1251  +		;;
         1252  +	-linux*)
         1253  +		os=`echo $os | sed -e 's|linux|linux-gnu|'`
         1254  +		;;
         1255  +	-sunos5*)
         1256  +		os=`echo $os | sed -e 's|sunos5|solaris2|'`
         1257  +		;;
         1258  +	-sunos6*)
         1259  +		os=`echo $os | sed -e 's|sunos6|solaris3|'`
         1260  +		;;
         1261  +	-opened*)
         1262  +		os=-openedition
         1263  +		;;
         1264  +        -os400*)
         1265  +		os=-os400
         1266  +		;;
         1267  +	-wince*)
         1268  +		os=-wince
         1269  +		;;
         1270  +	-osfrose*)
         1271  +		os=-osfrose
         1272  +		;;
         1273  +	-osf*)
         1274  +		os=-osf
         1275  +		;;
         1276  +	-utek*)
         1277  +		os=-bsd
         1278  +		;;
         1279  +	-dynix*)
         1280  +		os=-bsd
         1281  +		;;
         1282  +	-acis*)
         1283  +		os=-aos
         1284  +		;;
         1285  +	-atheos*)
         1286  +		os=-atheos
         1287  +		;;
         1288  +	-syllable*)
         1289  +		os=-syllable
         1290  +		;;
         1291  +	-386bsd)
         1292  +		os=-bsd
         1293  +		;;
         1294  +	-ctix* | -uts*)
         1295  +		os=-sysv
         1296  +		;;
         1297  +	-nova*)
         1298  +		os=-rtmk-nova
         1299  +		;;
         1300  +	-ns2 )
         1301  +		os=-nextstep2
         1302  +		;;
         1303  +	-nsk*)
         1304  +		os=-nsk
         1305  +		;;
         1306  +	# Preserve the version number of sinix5.
         1307  +	-sinix5.*)
         1308  +		os=`echo $os | sed -e 's|sinix|sysv|'`
         1309  +		;;
         1310  +	-sinix*)
         1311  +		os=-sysv4
         1312  +		;;
         1313  +        -tpf*)
         1314  +		os=-tpf
         1315  +		;;
         1316  +	-triton*)
         1317  +		os=-sysv3
         1318  +		;;
         1319  +	-oss*)
         1320  +		os=-sysv3
         1321  +		;;
         1322  +	-svr4)
         1323  +		os=-sysv4
         1324  +		;;
         1325  +	-svr3)
         1326  +		os=-sysv3
         1327  +		;;
         1328  +	-sysvr4)
         1329  +		os=-sysv4
         1330  +		;;
         1331  +	# This must come after -sysvr4.
         1332  +	-sysv*)
         1333  +		;;
         1334  +	-ose*)
         1335  +		os=-ose
         1336  +		;;
         1337  +	-es1800*)
         1338  +		os=-ose
         1339  +		;;
         1340  +	-xenix)
         1341  +		os=-xenix
         1342  +		;;
         1343  +	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
         1344  +		os=-mint
         1345  +		;;
         1346  +	-aros*)
         1347  +		os=-aros
         1348  +		;;
         1349  +	-kaos*)
         1350  +		os=-kaos
         1351  +		;;
         1352  +	-zvmoe)
         1353  +		os=-zvmoe
         1354  +		;;
         1355  +	-none)
         1356  +		;;
         1357  +	*)
         1358  +		# Get rid of the `-' at the beginning of $os.
         1359  +		os=`echo $os | sed 's/[^-]*-//'`
         1360  +		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
         1361  +		exit 1
         1362  +		;;
         1363  +esac
         1364  +else
         1365  +
         1366  +# Here we handle the default operating systems that come with various machines.
         1367  +# The value should be what the vendor currently ships out the door with their
         1368  +# machine or put another way, the most popular os provided with the machine.
         1369  +
         1370  +# Note that if you're going to try to match "-MANUFACTURER" here (say,
         1371  +# "-sun"), then you have to tell the case statement up towards the top
         1372  +# that MANUFACTURER isn't an operating system.  Otherwise, code above
         1373  +# will signal an error saying that MANUFACTURER isn't an operating
         1374  +# system, and we'll never get to this point.
         1375  +
         1376  +case $basic_machine in
         1377  +        score-*)
         1378  +		os=-elf
         1379  +		;;
         1380  +        spu-*)
         1381  +		os=-elf
         1382  +		;;
         1383  +	*-acorn)
         1384  +		os=-riscix1.2
         1385  +		;;
         1386  +	arm*-rebel)
         1387  +		os=-linux
         1388  +		;;
         1389  +	arm*-semi)
         1390  +		os=-aout
         1391  +		;;
         1392  +        c4x-* | tic4x-*)
         1393  +        	os=-coff
         1394  +		;;
         1395  +	# This must come before the *-dec entry.
         1396  +	pdp10-*)
         1397  +		os=-tops20
         1398  +		;;
         1399  +	pdp11-*)
         1400  +		os=-none
         1401  +		;;
         1402  +	*-dec | vax-*)
         1403  +		os=-ultrix4.2
         1404  +		;;
         1405  +	m68*-apollo)
         1406  +		os=-domain
         1407  +		;;
         1408  +	i386-sun)
         1409  +		os=-sunos4.0.2
         1410  +		;;
         1411  +	m68000-sun)
         1412  +		os=-sunos3
         1413  +		# This also exists in the configure program, but was not the
         1414  +		# default.
         1415  +		# os=-sunos4
         1416  +		;;
         1417  +	m68*-cisco)
         1418  +		os=-aout
         1419  +		;;
         1420  +	mips*-cisco)
         1421  +		os=-elf
         1422  +		;;
         1423  +	mips*-*)
         1424  +		os=-elf
         1425  +		;;
         1426  +	or32-*)
         1427  +		os=-coff
         1428  +		;;
         1429  +	*-tti)	# must be before sparc entry or we get the wrong os.
         1430  +		os=-sysv3
         1431  +		;;
         1432  +	sparc-* | *-sun)
         1433  +		os=-sunos4.1.1
         1434  +		;;
         1435  +	*-be)
         1436  +		os=-beos
         1437  +		;;
         1438  +	*-haiku)
         1439  +		os=-haiku
         1440  +		;;
         1441  +	*-ibm)
         1442  +		os=-aix
         1443  +		;;
         1444  +    	*-knuth)
         1445  +		os=-mmixware
         1446  +		;;
         1447  +	*-wec)
         1448  +		os=-proelf
         1449  +		;;
         1450  +	*-winbond)
         1451  +		os=-proelf
         1452  +		;;
         1453  +	*-oki)
         1454  +		os=-proelf
         1455  +		;;
         1456  +	*-hp)
         1457  +		os=-hpux
         1458  +		;;
         1459  +	*-hitachi)
         1460  +		os=-hiux
         1461  +		;;
         1462  +	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
         1463  +		os=-sysv
         1464  +		;;
         1465  +	*-cbm)
         1466  +		os=-amigaos
         1467  +		;;
         1468  +	*-dg)
         1469  +		os=-dgux
         1470  +		;;
         1471  +	*-dolphin)
         1472  +		os=-sysv3
         1473  +		;;
         1474  +	m68k-ccur)
         1475  +		os=-rtu
         1476  +		;;
         1477  +	m88k-omron*)
         1478  +		os=-luna
         1479  +		;;
         1480  +	*-next )
         1481  +		os=-nextstep
         1482  +		;;
         1483  +	*-sequent)
         1484  +		os=-ptx
         1485  +		;;
         1486  +	*-crds)
         1487  +		os=-unos
         1488  +		;;
         1489  +	*-ns)
         1490  +		os=-genix
         1491  +		;;
         1492  +	i370-*)
         1493  +		os=-mvs
         1494  +		;;
         1495  +	*-next)
         1496  +		os=-nextstep3
         1497  +		;;
         1498  +	*-gould)
         1499  +		os=-sysv
         1500  +		;;
         1501  +	*-highlevel)
         1502  +		os=-bsd
         1503  +		;;
         1504  +	*-encore)
         1505  +		os=-bsd
         1506  +		;;
         1507  +	*-sgi)
         1508  +		os=-irix
         1509  +		;;
         1510  +	*-siemens)
         1511  +		os=-sysv4
         1512  +		;;
         1513  +	*-masscomp)
         1514  +		os=-rtu
         1515  +		;;
         1516  +	f30[01]-fujitsu | f700-fujitsu)
         1517  +		os=-uxpv
         1518  +		;;
         1519  +	*-rom68k)
         1520  +		os=-coff
         1521  +		;;
         1522  +	*-*bug)
         1523  +		os=-coff
         1524  +		;;
         1525  +	*-apple)
         1526  +		os=-macos
         1527  +		;;
         1528  +	*-atari*)
         1529  +		os=-mint
         1530  +		;;
         1531  +	*)
         1532  +		os=-none
         1533  +		;;
         1534  +esac
         1535  +fi
         1536  +
         1537  +# Here we handle the case where we know the os, and the CPU type, but not the
         1538  +# manufacturer.  We pick the logical manufacturer.
         1539  +vendor=unknown
         1540  +case $basic_machine in
         1541  +	*-unknown)
         1542  +		case $os in
         1543  +			-riscix*)
         1544  +				vendor=acorn
         1545  +				;;
         1546  +			-sunos*)
         1547  +				vendor=sun
         1548  +				;;
         1549  +			-aix*)
         1550  +				vendor=ibm
         1551  +				;;
         1552  +			-beos*)
         1553  +				vendor=be
         1554  +				;;
         1555  +			-hpux*)
         1556  +				vendor=hp
         1557  +				;;
         1558  +			-mpeix*)
         1559  +				vendor=hp
         1560  +				;;
         1561  +			-hiux*)
         1562  +				vendor=hitachi
         1563  +				;;
         1564  +			-unos*)
         1565  +				vendor=crds
         1566  +				;;
         1567  +			-dgux*)
         1568  +				vendor=dg
         1569  +				;;
         1570  +			-luna*)
         1571  +				vendor=omron
         1572  +				;;
         1573  +			-genix*)
         1574  +				vendor=ns
         1575  +				;;
         1576  +			-mvs* | -opened*)
         1577  +				vendor=ibm
         1578  +				;;
         1579  +			-os400*)
         1580  +				vendor=ibm
         1581  +				;;
         1582  +			-ptx*)
         1583  +				vendor=sequent
         1584  +				;;
         1585  +			-tpf*)
         1586  +				vendor=ibm
         1587  +				;;
         1588  +			-vxsim* | -vxworks* | -windiss*)
         1589  +				vendor=wrs
         1590  +				;;
         1591  +			-aux*)
         1592  +				vendor=apple
         1593  +				;;
         1594  +			-hms*)
         1595  +				vendor=hitachi
         1596  +				;;
         1597  +			-mpw* | -macos*)
         1598  +				vendor=apple
         1599  +				;;
         1600  +			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
         1601  +				vendor=atari
         1602  +				;;
         1603  +			-vos*)
         1604  +				vendor=stratus
         1605  +				;;
         1606  +		esac
         1607  +		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
         1608  +		;;
         1609  +esac
         1610  +
         1611  +echo $basic_machine$os
         1612  +exit
         1613  +
         1614  +# Local variables:
         1615  +# eval: (add-hook 'write-file-hooks 'time-stamp)
         1616  +# time-stamp-start: "timestamp='"
         1617  +# time-stamp-format: "%:y-%02m-%02d"
         1618  +# time-stamp-end: "'"
         1619  +# End:

Added config/install-sh.


Added config/missing.


Added config/mkinstalldirs.


Added configure.in.

            1  +m4_include([VERSION.m4])
            2  +
            3  +AC_INIT(sqlite4, VERSION_NUMBER, drh@sqlite.org)
            4  +
            5  +AC_CONFIG_AUX_DIR(config)
            6  +
            7  +PACKAGE=sqlite4
            8  +
            9  +AC_SUBST(VERSION, $VERSION_NUMBER)
           10  +
           11  +AC_CANONICAL_HOST
           12  +AC_MSG_NOTICE([Host = ${host}])
           13  +
           14  +case ${host} in 
           15  +    *-FreeBSD*)
           16  +    AC_SUBST(OS_MAKEFILE, Make.freebsd)
           17  +    ;;
           18  +	*-linux*)
           19  +    AC_SUBST(OS_MAKEFILE, Make.linux)
           20  +    ;;
           21  +     *-*-mingw32*)
           22  +    AC_SUBST(OS_MAKEFILE, Make.mingw)
           23  +    ;;
           24  +    *-solaris*)
           25  +    AC_SUBST(OS_MAKEFILE, Make.solaris)
           26  +    ;;
           27  +esac
           28  +
           29  +AC_CONFIG_HEADERS(config.h)
           30  +
           31  +# Checks for programs.
           32  +AC_PROG_CC
           33  +AC_PROG_CXX
           34  +AC_PROG_CXXCPP
           35  +AC_PROG_INSTALL
           36  +AC_PROG_RANLIB
           37  +AC_PROG_AWK
           38  +
           39  +# Checks for libraries.
           40  +
           41  +# Checks for header files.
           42  +
           43  +AC_HEADER_STDC
           44  +#AC_CHECK_HEADERS(utime.h)
           45  +#AC_CHECK_HEADERS(sys/epoll.h, AC_DEFINE([LINUX_26],[],[Linux 2.6]), AC_DEFINE([LINUX_24],[],[Linux 2.4]))
           46  +#AC_CHECK_HEADERS(sys/epoll.h)
           47  +AC_FUNC_UTIME_NULL
           48  +
           49  +# Checks for typedefs, structures, and compiler characteristics.
           50  +
           51  +# Checks for library functions.
           52  +
           53  +AC_CONFIG_FILES([Makefile])
           54  +
           55  +AC_OUTPUT
           56  +