1 --- misc/libtextcat-2.2/configure Thu May 22 13:39:55 2003
2 +++ misc/build/libtextcat-2.2/configure Mon Mar 31 11:29:14 2008
6 # This must be Linux ELF.
8 +linux-gnu*|k*bsd*-gnu*)
10 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
11 lt_cv_deplibs_check_method=pass_all ;;
15 need_lib_prefix=unknown
17 +#need_version=unknown
19 # when you set need_version to no, make sure it does not cause -set_version
20 # flags to be left without arguments
23 # cross-compilation, but unfortunately the echo tests do not
24 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
25 # `"' quotes if we put them in here... so don't!
26 - archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
27 + archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$compiler_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
28 # We need to add '_' to the symbols in $export_symbols first
29 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
35 - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
36 + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
37 version_type=freebsd-$objformat
43 # This must be Linux ELF.
45 +linux-gnu*|k*bsd*-gnu*)
49 --- misc/libtextcat-2.2/src/Makefile.in Thu May 22 13:39:52 2003
50 +++ misc/build/libtextcat-2.2/src/Makefile.in Mon Mar 31 11:29:14 2008
52 target_vendor = @target_vendor@
53 AUTOMAKE_OPTIONS = 1.4 foreign
55 -WARNS = -W -Wall -Wshadow -Wpointer-arith
57 -FLAGS = -g -O3 -funroll-loops -D_THREAD_SAFE -D_GNU_SOURCE
58 +#WARNS = -W -Wall -Wshadow -Wpointer-arith
60 +#FLAGS = -g -O3 -funroll-loops -D_THREAD_SAFE -D_GNU_SOURCE
62 AM_CFLAGS = $(IFLAGS) $(VERBOSE) $(WARNS) $(FLAGS)
66 - common.h constants.h fingerprint.h textcat.h wg_mempool.h
67 + common.h constants.h fingerprint.h textcat.h wg_mempool.h utf8misc.h
70 lib_LTLIBRARIES = libtextcat.la
71 libtextcat_la_SOURCES = \
72 - common.c fingerprint.c textcat.c wg_mempool.c
73 + common.c fingerprint.c textcat.c wg_mempool.c utf8misc.c
76 bin_PROGRAMS = createfp
78 libtextcat_la_LDFLAGS =
79 libtextcat_la_LIBADD =
80 am_libtextcat_la_OBJECTS = common.lo fingerprint.lo textcat.lo \
82 + wg_mempool.lo utf8misc.lo
83 libtextcat_la_OBJECTS = $(am_libtextcat_la_OBJECTS)
84 bin_PROGRAMS = createfp$(EXEEXT)
85 noinst_PROGRAMS = testtextcat$(EXEEXT)
87 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/common.Plo ./$(DEPDIR)/createfp.Po \
88 @AMDEP_TRUE@ ./$(DEPDIR)/fingerprint.Plo \
89 @AMDEP_TRUE@ ./$(DEPDIR)/testtextcat.Po ./$(DEPDIR)/textcat.Plo \
90 -@AMDEP_TRUE@ ./$(DEPDIR)/wg_mempool.Plo
91 +@AMDEP_TRUE@ ./$(DEPDIR)/wg_mempool.Plo \
92 +@AMDEP_TRUE@ ./$(DEPDIR)/utf8misc.Plo
93 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
94 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
95 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
98 cd $(top_builddir) && $(SHELL) ./config.status src/config.h
100 -$(srcdir)/config.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
101 +$(srcdir)/config.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
102 cd $(top_srcdir) && $(AUTOHEADER)
103 touch $(srcdir)/config.h.in
106 echo "rm -f \"$${dir}/so_locations\""; \
107 rm -f "$${dir}/so_locations"; \
109 -libtextcat.la: $(libtextcat_la_OBJECTS) $(libtextcat_la_DEPENDENCIES)
110 - $(LINK) -rpath $(libdir) $(libtextcat_la_LDFLAGS) $(libtextcat_la_OBJECTS) $(libtextcat_la_LIBADD) $(LIBS)
111 +libtextcat.la: $(libtextcat_la_OBJECTS) $(libtextcat_la_DEPENDENCIES)
112 + $(LINK) -avoid-version -rpath $(libdir) $(libtextcat_la_LDFLAGS) $(libtextcat_la_OBJECTS) $(libtextcat_la_LIBADD) $(LIBS)
113 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
114 install-binPROGRAMS: $(bin_PROGRAMS)
116 @@ -285,10 +286,10 @@
117 echo " rm -f $$p $$f"; \
120 -createfp$(EXEEXT): $(createfp_OBJECTS) $(createfp_DEPENDENCIES)
121 +createfp$(EXEEXT): $(createfp_OBJECTS) $(createfp_DEPENDENCIES)
122 @rm -f createfp$(EXEEXT)
123 $(LINK) $(createfp_LDFLAGS) $(createfp_OBJECTS) $(createfp_LDADD) $(LIBS)
124 -testtextcat$(EXEEXT): $(testtextcat_OBJECTS) $(testtextcat_DEPENDENCIES)
125 +testtextcat$(EXEEXT): $(testtextcat_OBJECTS) $(testtextcat_DEPENDENCIES)
126 @rm -f testtextcat$(EXEEXT)
127 $(LINK) $(testtextcat_LDFLAGS) $(testtextcat_OBJECTS) $(testtextcat_LDADD) $(LIBS)
130 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtextcat.Po@am__quote@
131 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textcat.Plo@am__quote@
132 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wg_mempool.Plo@am__quote@
133 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8misc.Plo@am__quote@
137 --- misc/libtextcat-2.2/src/common.c Thu May 22 13:32:43 2003
138 +++ misc/build/libtextcat-2.2/src/common.c Mon Mar 31 11:29:14 2008
141 * Copyright (c) 2003, WiseGuys Internet B.V.
142 * All rights reserved.
145 * Redistribution and use in source and binary forms, with or without
146 * modification, are permitted provided that the following conditions
150 * - Redistributions of source code must retain the above copyright
151 * notice, this list of conditions and the following disclaimer.
154 * - Redistributions in binary form must reproduce the above copyright
155 * notice, this list of conditions and the following disclaimer in the
156 * documentation and/or other materials provided with the
160 * - Neither the name of the WiseGuys Internet B.V. nor the names of
161 * its contributors may be used to endorse or promote products derived
162 * from this software without specific prior written permission.
165 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
166 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
167 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
168 @@ -114,11 +114,11 @@
169 wgmem_error( "Error while strduping %u bytes.\n", strlen(s) );
176 -extern void* wg_realloc( void *ptr, size_t size )
178 +extern void* wg_realloc( void *ptr, size_t size )
184 wgmem_error( "Error while reallocing %u bytes.\n", size );
191 extern void wg_free( void *mem )
192 @@ -148,12 +148,12 @@
193 if ( fgets(line, size, fp) == NULL ) {
198 /** kill term null **/
199 if ( (p = strpbrk( line, "\n\r" )) ) {
208 @@ -164,39 +164,39 @@
214 * After the split, this array contains pointers to the start of each
215 * detected segment. Must be preallocated and at least as large as
216 * maxsegments. The pointers point into the dest buffer.
223 * String into which result points as an index. Must be preallocated, and
224 * at least as big as src. You can use src as dest, but in that case src
232 * The string to split. Sequences of whitespace are treated as separators, unless
233 * escaped. There are two ways to escape: by using single quotes (anything
234 * between single quotes is treated as one segment), or by using a backslash
235 * to escape the next character. The backslash escape works inside quotation
242 * "It\'s very\ easy 'to use WiseGuys\' wg_split()' function" is split into:
247 * "to use WiseGuys' wg_split()"
255 * The maximum number of segments. If the splitter runs out of segments,
256 * the remainder of the string is stored in the last segment.
260 * The number of segments found.
262 @@ -218,12 +218,12 @@
265 /*** Skip spaces ***/
266 - while ( isspace((int) *p) ) {
267 + while ( isspace((unsigned char) *p) ) {
274 /*** Start segment ***/
277 @@ -232,12 +232,12 @@
279 /*** Unquoted segment ***/
281 - if ( isspace((int) *p) ) {
282 + if ( isspace((unsigned char) *p) ) {
289 else if ( *p == '\'' ) {
290 /*** Start quotation ***/
292 @@ -292,17 +292,17 @@
296 +#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */
297 extern void wg_timerstart(wgtimer_t *t)
299 -#ifdef HAVE_GETTIMEOFDAY
300 gettimeofday( &(t->start), NULL );
303 +#endif /* TL : no struct timeval under Win32 */
306 +#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */
307 extern uint4 wg_timerstop(wgtimer_t *t)
309 -#ifdef HAVE_GETTIMEOFDAY
311 gettimeofday( &(t->stop), NULL );
312 result = (t->stop.tv_sec - t->start.tv_sec) * 1000000 +
313 @@ -312,25 +312,23 @@
314 t->start.tv_usec = t->stop.tv_usec;
321 +#endif /* TL : no struct timeval under Win32 */
325 * wg_strgmov -- a guarded strcpy() variation
328 * copies src to dest (including terminating zero), and returns
329 * pointer to position of terminating zero in dest. The function is
330 * guaranteed not to write past destlimit. If the copy couldn't be
331 - * finished, the function returns NULL after restoring the first
332 - * character in dest for your convenience (since this is usually a zero).
333 + * finished, the function returns NULL after restoring the first
334 + * character in dest for your convenience (since this is usually a zero).
336 char *wg_strgmov( char *dest, const char *src, const char *destlimit )
341 if ( !dest || dest >= destlimit ) {
348 - * wg_trim() -- remove whitespace surrounding a string.
349 + * wg_trim() -- remove whitespace surrounding a string.
351 * Example: " bla bla bla " becomes "bla bla bla" after trimming.
353 @@ -373,12 +371,12 @@
354 char *lastnonspace = &dest[-1];
358 - while ( isspace((int)*p) ) {
360 + while ( isspace((unsigned char)*p) ) {
364 - if ( !isspace((int)*p) ) {
365 + if ( !isspace((unsigned char)*p) ) {
369 --- misc/libtextcat-2.2/src/common.h Thu May 22 15:02:29 2003
370 +++ misc/build/libtextcat-2.2/src/common.h Mon Mar 31 11:29:14 2008
375 - * common.h -- a mixed bag of helper functions
376 + * common.h -- a mixed bag of helper functions
378 * Copyright (C) 2003 WiseGuys Internet B.V.
383 * Redistribution and use in source and binary forms, with or without
384 * modification, are permitted provided that the following conditions
388 * - Redistributions of source code must retain the above copyright
389 * notice, this list of conditions and the following disclaimer.
392 * - Redistributions in binary form must reproduce the above copyright
393 * notice, this list of conditions and the following disclaimer in the
394 * documentation and/or other materials provided with the
398 * - Neither the name of the WiseGuys Internet B.V. nor the names of
399 * its contributors may be used to endorse or promote products derived
400 * from this software without specific prior written permission.
403 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
404 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
405 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
410 +#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */
411 typedef struct wgtimer_s {
412 struct timeval start;
415 +#endif /* TL : no struct timeval under Win32 */
418 extern void *wg_malloc( size_t size );
419 @@ -101,13 +103,15 @@
421 extern char *wg_getline( char *line, int size, FILE *fp );
423 +#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */
424 extern void wg_timerstart(wgtimer_t *t);
425 extern uint4 wg_timerstop(wgtimer_t *t);
426 +#endif /* TL : no struct timeval under Win32 */
428 extern unsigned int wg_split( char **result, char *dest, char *src, int maxsegments );
429 extern char *wg_strgmov( char *dest, const char *src, const char *destlimit );
430 extern char *wg_trim( char *dest, const char *src );
436 --- misc/libtextcat-2.2/src/constants.h Thu May 22 13:32:43 2003
437 +++ misc/build/libtextcat-2.2/src/constants.h Mon Mar 31 11:29:14 2008
444 #define DESCRIPTION "out of place"
446 /* Reported matches are those fingerprints with a score less than best
448 /* Maximum number of n-grams in a fingerprint */
449 #define MAXNGRAMS 400
451 -/* Maximum size of an n-gram? */
452 -#define MAXNGRAMSIZE 5
453 +/* Maximum number of character of an n-gram? */
454 +#define MAXNGRAMSYMBOL 5
456 +/* Maximum size of the string representing an n-gram (must be greater than number of symbol) */
458 +#define MAXNGRAMSIZE 20
460 +#define MAXNGRAMSIZE MAXNGRAMSYMBOL
463 /* Which characters are not acceptable in n-grams? */
464 -#define INVALID(c) (isspace((int)c) || isdigit((int)c))
465 +#define INVALID(c) (isspace((unsigned char)c) || isdigit((unsigned char)c))
467 /* Minimum size (in characters) for accepting a document */
468 -#define MINDOCSIZE 25
469 +#define MINDOCSIZE 6
471 /* Maximum penalty for missing an n-gram in fingerprint */
472 #define MAXOUTOFPLACE 400
476 #define MAXSCORE INT_MAX
478 +/* where the fingerprints files are stored */
479 +#define DEFAULT_FINGERPRINTS_PATH ""
482 --- misc/libtextcat-2.2/src/fingerprint.c Thu May 22 13:32:43 2003
483 +++ misc/build/libtextcat-2.2/src/fingerprint.c Mon Mar 31 11:29:14 2008
485 * All rights reserved.
490 * Redistribution and use in source and binary forms, with or without
491 * modification, are permitted provided that the following conditions
495 * - Redistributions of source code must retain the above copyright
496 * notice, this list of conditions and the following disclaimer.
499 * - Redistributions in binary form must reproduce the above copyright
500 * notice, this list of conditions and the following disclaimer in the
501 * documentation and/or other materials provided with the
505 * - Neither the name of the WiseGuys Internet B.V. nor the names of
506 * its contributors may be used to endorse or promote products derived
507 * from this software without specific prior written permission.
510 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
511 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
512 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
514 * The reason why we go through the trouble of doing a partial
515 * (heap)sort is that a full quicksort behaves horribly on the data:
516 * most n-grams have a very low count, resulting in a data set in
517 - * nearly-sorted order. This causes quicksort to behave very badly.
518 + * nearly-sorted order. This causes quicksort to behave very badly.
519 * Heapsort, on the other hand, behaves handsomely: worst case is
520 * Mlog(N) for M n-grams filtered through a N-sized heap.
523 * - put table/heap datastructure in a separate file.
534 #include "wg_mempool.h"
535 #include "constants.h"
537 +#include "utf8misc.h"
539 #define TABLESIZE (1<<TABLEPOW)
540 #define TABLEMASK ((TABLESIZE)-1)
554 typedef struct entry_s {
555 @@ -105,13 +111,13 @@
556 struct entry_s *next;
559 -typedef struct table_s {
560 +typedef struct table_s {
565 struct table_s *next;
572 * fast and furious little hash function
574 * (Note that we could use some kind of rolling checksum, and update it
575 - * during n-gram construction)
576 + * during n-gram construction)
578 static uint4 simplehash( const char *p, int len )
580 @@ -134,29 +140,14 @@
584 -/* checks if n-gram lex is a prefix of key and of length len */
585 -inline int issame( char *lex, char *key, int len )
588 - for (i=0; i<len; i++) {
589 - if ( key[i] != lex[i] ) {
593 - if ( lex[i] != 0 ) {
600 /* increases frequency of ngram(p,len) */
601 -static inline int increasefreq( table_t *t, char *p, int len )
603 - uint4 hash = simplehash( p, len ) & TABLEMASK;
604 +static int increasefreq( table_t *t, char *p, int len )
606 + uint4 hash = simplehash( p, len ) & TABLEMASK;
607 entry_t *entry = t->table[ hash ];
612 if ( issame( entry->str, p, len ) ) {
618 /*** Not found, so create ***/
619 - entry = wgmempool_alloc( t->pool, sizeof(entry_t) );
620 + entry = (entry_t*)(wgmempool_alloc( t->pool, sizeof(entry_t) ));
621 strcpy( entry->str, p );
624 @@ -181,12 +172,12 @@
627 /* looks up ngram(p,len) */
628 -static entry_t *findfreq( table_t *t, char *p, int len )
630 - uint4 hash = simplehash( p, len ) & TABLEMASK;
631 +static entry_t *findfreq( table_t *t, char *p, int len )
633 + uint4 hash = simplehash( p, len ) & TABLEMASK;
634 entry_t *entry = t->table[ hash ];
639 if ( issame( entry->str, p, len ) ) {
643 #define GREATER(x,y) ((x).cnt > (y).cnt)
644 #define LESS(x,y) ((x).cnt < (y).cnt)
646 -inline static void siftup( table_t *t, unsigned int child )
647 +static void siftup( table_t *t, unsigned int child )
649 entry_t *heap = t->heap;
650 unsigned int parent = (child-1) >> 1;
655 -inline static void siftdown( table_t *t, unsigned int heapsize, uint4 parent )
656 +static void siftdown( table_t *t, unsigned int heapsize, uint4 parent )
658 entry_t *heap = t->heap;
659 unsigned int child = parent*2 + 1;
661 if (t->size < t->heapsize) {
662 memcpy( &(heap[t->size]), item, sizeof(entry_t));
663 siftup( t, t->size );
669 @@ -316,18 +307,18 @@
671 /*** Fill result heap ***/
672 for (i=0; i<TABLESIZE; i++) {
673 - entry_t *p = t->table[i];
674 + entry_t *p = t->table[i];
685 static table_t *inittable(uint4 maxngrams)
688 table_t *result = (table_t *)wg_zalloc( sizeof(table_t) );
689 result->table = (entry_t **)wg_zalloc( sizeof(entry_t*) * TABLESIZE );
690 result->pool = wgmempool_Init( 10000, 10 );
691 @@ -347,14 +338,14 @@
692 wgmempool_Done(t->pool);
700 extern void *fp_Init(const char *name)
702 fp_t *h = (fp_t *)wg_zalloc( sizeof(fp_t) );
706 h->name = wg_strdup(name);
708 @@ -458,21 +449,27 @@
714 +* this function extract all n-gram from past buffer and put them into the table "t"
715 +* [modified] by Jocelyn Merand to accept utf-8 multi-character symbols to be used in OpenOffice
717 static void createngramtable( table_t *t, const char *buf )
719 char n[MAXNGRAMSIZE+1];
724 /*** Get all n-grams where 1<=n<=MAXNGRAMSIZE. Allow underscores only at borders. ***/
729 + const char *q = &p[pointer]; /*[modified] previously p++ above (for(;;p++)) now, it's pointer wich is increased so we have to get the new pointer on the buffer*/
732 /*** First char may be an underscore ***/
734 + int decay = charcopy(q, m); /*[modified] previously *q++ = *m++*/
735 + q = &(p[pointer+decay]); /*[modified] the old copying method do not manage multi-character symbols*/
736 + m += decay; /*[modified]*/
739 increasefreq( t, n, 1 );
740 @@ -482,19 +479,22 @@
743 /*** Let the compiler unroll this ***/
744 - for ( i=2; i<=MAXNGRAMSIZE; i++) {
745 + for ( i=2; i<=MAXNGRAMSYMBOL; i++) {
748 + decay = charcopy(q, m); /*[modified] like above*/
752 increasefreq( t, n, i );
754 if ( *q == '_' ) break;
762 + pointer = nextcharstart(p,pointer); /*[modified] p[pointer] must point on the next start of symbol, but whith utf next start is not surely next char*/
768 ngram_t *x = (ngram_t *)a;
769 ngram_t *y = (ngram_t *)b;
772 return mystrcmp( x->str, y->str );
775 @@ -522,12 +522,12 @@
777 ngram_t *x = (ngram_t *)a;
778 ngram_t *y = (ngram_t *)b;
781 return x->rank - y->rank;
785 - * Create a fingerprint:
786 + * Create a fingerprint:
787 * - record the frequency of each unique n-gram in a hash table
788 * - take the most frequent n-grams
789 * - sort them alphabetically, recording their relative rank
790 @@ -544,20 +544,21 @@
793 /*** Throw out all invalid chars ***/
794 - tmp = prepbuffer( buffer, bufsize );
795 + tmp = prepbuffer( buffer, bufsize );
796 + /*printf("Cleaned buffer : %s\n",tmp);*/
802 t = inittable(maxngrams);
803 + /*printf("Table initialized\n");*/
805 /*** Create a hash table containing n-gram counts ***/
806 createngramtable(t, tmp);
808 + /*printf("Table created\n");*/
809 /*** Take the top N n-grams and add them to the profile ***/
811 - maxngrams = WGMIN( maxngrams, t->size );
813 + maxngrams = WGMIN( maxngrams, t->size );
815 h->fprint = (ngram_t *)wg_malloc( sizeof(ngram_t) * maxngrams );
820 heapextract(t, &tmp2);
823 /*** the string and its rank is all we need ***/
824 strcpy( h->fprint[i].str, tmp2.str );
825 h->fprint[i].rank = i;
829 /*** Sort n-grams alphabetically, for easy comparison ***/
830 - qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str );
831 + qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str );
841 h->fprint = (ngram_t *)wg_malloc(maxngrams * sizeof(ngram_t));
843 while (cnt < maxngrams && wg_getline(line,1024,fp)) {
847 /*** Sort n-grams, for easy comparison later on ***/
848 - qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str );
849 + qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str );
853 @@ -648,14 +649,15 @@
856 fp_t *h = (fp_t *)handle;
857 - ngram_t *tmp = wg_malloc( sizeof(ngram_t) * h->size );
859 + ngram_t *tmp = (ngram_t*)wg_malloc( sizeof(ngram_t) * h->size );
861 /*** Make a temporary and sort it on rank ***/
862 memcpy( tmp, h->fprint, h->size * sizeof(ngram_t) );
863 - qsort( tmp, h->size, sizeof(ngram_t), ngramcmp_rank );
864 + qsort( tmp, h->size, sizeof(ngram_t), ngramcmp_rank );
866 for (i=0; i<h->size; i++) {
867 - fprintf( fp, "%s\n", tmp[i].str );
868 + /*fprintf( fp, "%s\t%i\n", tmp[i].str, tmp[i].rank );*/
869 + fprintf( fp, "%s\n", tmp[i].str);
879 /*** Compare the profiles in mergesort fashion ***/
880 while ( i < c->size && j < u->size ) {
891 --- misc/libtextcat-2.2/src/fingerprint.h Mon May 19 14:16:31 2003
892 +++ misc/build/libtextcat-2.2/src/fingerprint.h Mon Mar 31 11:29:14 2008
894 extern int fp_Read( void *handle, const char *fname, int maxngrams );
895 extern sint4 fp_Compare( void *cat, void *unknown, int cutoff );
896 extern void fp_Show( void *handle );
900 extern const char *fp_Name( void *handle );
904 extern void fp_Print( void *handle, FILE *fp );
907 --- misc/libtextcat-2.2/src/libtextcat.map Mon Mar 31 11:30:06 2008
908 +++ misc/build/libtextcat-2.2/src/libtextcat.map Mon Mar 31 11:29:14 2008
923 + special_textcat_Init
951 --- misc/libtextcat-2.2/src/makefile.mk Mon Mar 31 11:30:06 2008
952 +++ misc/build/libtextcat-2.2/src/makefile.mk Mon Mar 31 11:29:42 2008
955 +#*************************************************************************
957 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
959 +# Copyright 2000, 2010 Oracle and/or its affiliates.
961 +# OpenOffice.org - a multi-platform office productivity suite
963 +# This file is part of OpenOffice.org.
965 +# OpenOffice.org is free software: you can redistribute it and/or modify
966 +# it under the terms of the GNU Lesser General Public License version 3
967 +# only, as published by the Free Software Foundation.
969 +# OpenOffice.org is distributed in the hope that it will be useful,
970 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
971 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
972 +# GNU Lesser General Public License version 3 for more details
973 +# (a copy is included in the LICENSE file that accompanied this code).
975 +# You should have received a copy of the GNU Lesser General Public License
976 +# version 3 along with OpenOffice.org. If not, see
977 +# <http://www.openoffice.org/license.html>
978 +# for a copy of the LGPLv3 License.
980 +#*************************************************************************
982 +PRJ = ..$/..$/..$/..$/..
984 +PRJNAME = libtextcat
989 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
992 +.INCLUDE : settings.mk
994 +# --- Files --------------------------------------------------------
996 +# !! not to be compiled because those belong to a stand alone programs: !!
997 +# $(SLO)$/createfp.obj\
998 +# $(SLO)$/testtextcat.obj
1001 + $(SLO)$/common.obj\
1002 + $(SLO)$/fingerprint.obj\
1003 + $(SLO)$/textcat.obj\
1004 + $(SLO)$/wg_mempool.obj\
1005 + $(SLO)$/utf8misc.obj
1007 +#SHL1TARGET= $(TARGET)$(UPD)$(DLLPOSTFIX)
1008 +SHL1TARGET= $(TARGET)
1013 +SHL1LIBS= $(SLB)$/$(TARGET).lib
1014 +SHL1IMPLIB= i$(TARGET)
1015 +SHL1DEPN= $(SHL1LIBS)
1016 +SHL1DEF= $(MISC)$/$(SHL1TARGET).def
1019 +DEF1NAME= $(SHL1TARGET)
1020 +DEF1DEPN=$(MISC)$/$(SHL1TARGET).flt
1022 +SHL1VERSIONMAP= libtextcat.map
1024 +# --- Targets ------------------------------------------------------
1026 +.INCLUDE : target.mk
1028 +# copy hand supplied configuration file for Win32 builds to the file
1029 +# which is included in the source code
1030 +$(SLOFILES) : config.h
1032 + $(GNUCOPY) $(OUT)$/misc$/build$/libtextcat-2.2$/src$/win32_config.h $(OUT)$/misc$/build$/libtextcat-2.2$/src$/config.h
1035 +$(MISC)$/$(SHL1TARGET).flt: makefile.mk
1036 + @echo ------------------------------
1042 --- misc/libtextcat-2.2/src/textcat.c Thu May 22 13:32:43 2003
1043 +++ misc/build/libtextcat-2.2/src/textcat.c Mon Mar 31 11:29:14 2008
1045 * Copyright (C) 2003 WiseGuys Internet B.V.
1050 * Redistribution and use in source and binary forms, with or without
1051 * modification, are permitted provided that the following conditions
1055 * - Redistributions of source code must retain the above copyright
1056 * notice, this list of conditions and the following disclaimer.
1059 * - Redistributions in binary form must reproduce the above copyright
1060 * notice, this list of conditions and the following disclaimer in the
1061 * documentation and/or other materials provided with the
1065 * - Neither the name of the WiseGuys Internet B.V. nor the names of
1066 * its contributors may be used to endorse or promote products derived
1067 * from this software without specific prior written permission.
1070 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1071 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1072 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1077 + char *fprint_disable;
1081 @@ -112,11 +113,21 @@
1082 fp_Done( h->fprint[i] );
1084 wg_free( h->fprint );
1085 + wg_free( h->fprint_disable );
1090 -extern void *textcat_Init( const char *conffile )
1091 +/** Replaces older function */
1092 +extern void *textcat_Init( const char *conffile ){
1093 + return special_textcat_Init( conffile, DEFAULT_FINGERPRINTS_PATH );
1097 + * Originaly this function had only one parameter (conffile) it has been modified since OOo use
1098 + * Basicaly prefix is the directory path where fingerprints are stored
1100 +extern void *special_textcat_Init( const char *conffile, const char *prefix )
1104 @@ -134,11 +145,13 @@
1107 h->fprint = (void **)wg_malloc( sizeof(void*) * h->maxsize );
1108 + h->fprint_disable = (char *)wg_malloc( sizeof(char*) * h->maxsize ); /*added to store the state of languages*/
1110 while ( wg_getline( line, 1024, fp ) ) {
1114 + char finger_print_file_name[512];
1117 /*** Skip comments ***/
1119 @@ -156,17 +169,23 @@
1120 /*** Ensure enough space ***/
1121 if ( h->size == h->maxsize ) {
1123 - h->fprint = (void *)wg_realloc( h->fprint, sizeof(void*) * h->maxsize );
1124 + h->fprint = (void **)wg_realloc( h->fprint, sizeof(void*) * h->maxsize );
1125 + h->fprint_disable = (char *)wg_realloc( h->fprint_disable, sizeof(char*) * h->maxsize );
1129 if ((h->fprint[ h->size ] = fp_Init( segment[1] ))==NULL) {
1132 - if ( fp_Read( h->fprint[h->size], segment[0], 400 ) == 0 ) {
1133 + finger_print_file_name[0] = '\0';
1134 + strcat(finger_print_file_name, prefix);
1135 + strcat(finger_print_file_name, segment[0]);
1137 + if ( fp_Read( h->fprint[h->size], finger_print_file_name, 400 ) == 0 ) {
1142 + h->fprint_disable[h->size] = 0xF0; /*0xF0 is the code for enabled languages, 0x0F is for disabled*/
1146 @@ -203,11 +222,18 @@
1147 result = _TEXTCAT_RESULT_SHORT;
1152 /*** Calculate the score for each category. ***/
1153 for (i=0; i<h->size; i++) {
1154 - int score = fp_Compare( h->fprint[i], unknown, threshold );
1155 - candidates[i].score = score;
1157 + if(h->fprint_disable[i] & 0x0F){ /*if this language is disabled*/
1161 + score = fp_Compare( h->fprint[i], unknown, threshold );
1162 + /*printf("Score for %s : %i\n", fp_Name(h->fprint[i]), score);*/
1164 + candidates[i].score = score;
1165 candidates[i].name = fp_Name( h->fprint[i] );
1166 if ( score < minscore ) {
1169 /*** Find the best performers ***/
1170 for (i=0; i<h->size; i++) {
1171 if ( candidates[i].score < threshold ) {
1173 if ( ++cnt == MAXCANDIDATES+1 ) {
1179 char *plimit = result+MAXOUTPUTSIZE;
1182 qsort( candidates, cnt, sizeof(candidate_t), cmpcandidates );
1194 --- misc/libtextcat-2.2/src/textcat.h Mon May 19 14:16:31 2003
1195 +++ misc/build/libtextcat-2.2/src/textcat.h Mon Mar 31 11:29:14 2008
1197 #define _TEXTCAT_RESULT_UNKOWN "UNKNOWN"
1198 #define _TEXTCAT_RESULT_SHORT "SHORT"
1205 * textcat_Init() - Initialize the text classifier. The textfile
1207 * Returns: handle on success, NULL on error. (At the moment, the
1208 * only way errors can occur, is when the library cannot read the
1209 * conffile, or one of the fingerprint files listed in it.)
1211 + * Replace older function (and has exacly the same behaviour)
1214 extern void *textcat_Init( const char *conffile );
1217 + * Originaly this function had only one parameter (conffile) it has been modified since OOo must be able to load alternativ DB
1218 + * Basicaly prefix is the directory path where fingerprints are stored
1220 +extern void *special_textcat_Init( const char *conffile, const char *prefix );
1223 * textcat_Done() - Free up resources for handle
1225 extern void textcat_Done( void *handle );
1227 * textcat_Version() - Returns a string describing the version of this classifier.
1229 extern char *textcat_Version();
1235 --- misc/libtextcat-2.2/src/utf8misc.c Mon Mar 31 11:30:06 2008
1236 +++ misc/build/libtextcat-2.2/src/utf8misc.c Mon Mar 31 11:29:14 2008
1239 +/***************************************************************************
1240 + * Copyright (C) 2006 by Jocelyn Merand *
1241 + * joc.mer@gmail.com *
1245 + * Redistribution and use in source and binary forms, with or without
1246 + * modification, are permitted provided that the following conditions
1249 + * - Redistributions of source code must retain the above copyright
1250 + * notice, this list of conditions and the following disclaimer.
1252 + * - Redistributions in binary form must reproduce the above copyright
1253 + * notice, this list of conditions and the following disclaimer in the
1254 + * documentation and/or other materials provided with the
1257 + * - Neither the name of the WiseGuys Internet B.V. nor the names of
1258 + * its contributors may be used to endorse or promote products derived
1259 + * from this software without specific prior written permission.
1261 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1262 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1263 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1264 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1265 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1266 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1267 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1268 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1269 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1270 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1271 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1272 + ***************************************************************************/
1274 +#ifndef _UTF8_MISC_H_
1275 +#include "utf8misc.h"
1279 +int nextcharstart(const char *str, int position){
1280 + int pointer = position;
1282 + if(str[pointer] & ESCAPE_MASK){ /*if the first bit of the current char is 1*/
1284 + /*then str[pointer] is an escape character*/
1286 + char escape_char = ((str[pointer] & WEIGHT_MASK) << 1); /*and we use it to count (by bit translation) following characters (only the weightest part)*/
1288 + while(escape_char & ESCAPE_MASK && str[pointer]){/*every step, we move the byte of 1 bit left, when first bit is 0, it's finished*/
1289 + escape_char = escape_char <<1;
1293 + if(str[pointer]){ /*finaly, if we are not on the \0 character, we jump to the next character*/
1300 +int charcopy(const char *str, char *dest){
1303 + if(str[pointer] & ESCAPE_MASK){ /*if the first bit of the current char is 1*/
1305 + /*then str[pointer] is an escape character*/
1307 + char escape_char = ((str[pointer] & WEIGHT_MASK) << 1); /*and we use it to count following characters (only the weightest part)*/
1309 + while(escape_char & ESCAPE_MASK && str[pointer]){ /*every step, we move the byte of 1 bit left, when first bit is 0, it's finished*/
1310 + dest[pointer] = str[pointer];
1311 + escape_char = escape_char <<1;
1316 + dest[pointer] = str[pointer];
1324 +int issame( char *lex, char *key, int len )
1326 + /*printf("[%s] prefix of [%s] with length %i", lex, key, len);*/
1327 + int char_counter = 0;
1329 + while(char_counter < len) {
1331 + if(key[pointer] & ESCAPE_MASK){ /*if the first bit of the current char is 1*/
1333 + /*then key[pointer] is an escap character*/
1335 + char escape_char = ((key[pointer] & WEIGHT_MASK) << 1); /*and we use it to count (only the weightest part)*/
1337 + while(escape_char & ESCAPE_MASK && key[pointer] == lex[pointer] ){
1338 + escape_char = escape_char <<1;
1342 + ++char_counter; /*and we are on a new utf8 character*/
1343 + if ( key[pointer] != lex[pointer] ) {
1345 + /*printf(" NO\n", lex, key, len);*/
1349 + if ( lex[pointer] != '\0' ) {
1351 + /*printf(" NO\n");*/
1354 + /*printf(" YES\n");*/
1360 +extern int utfstrlen(const char* str){
1361 + int char_counter = 0;
1363 + while(str[pointer]) {
1364 + pointer = nextcharstart(str, pointer);
1366 + ++char_counter; /*and we are on a new utf8 character*/
1368 + return char_counter;
1371 --- misc/libtextcat-2.2/src/utf8misc.h Mon Mar 31 11:30:06 2008
1372 +++ misc/build/libtextcat-2.2/src/utf8misc.h Mon Mar 31 11:29:14 2008
1375 +/***************************************************************************
1376 + * Copyright (C) 2006 by Jocelyn Merand *
1377 + * joc.mer@gmail.com *
1381 + * Redistribution and use in source and binary forms, with or without
1382 + * modification, are permitted provided that the following conditions
1385 + * - Redistributions of source code must retain the above copyright
1386 + * notice, this list of conditions and the following disclaimer.
1388 + * - Redistributions in binary form must reproduce the above copyright
1389 + * notice, this list of conditions and the following disclaimer in the
1390 + * documentation and/or other materials provided with the
1393 + * - Neither the name of the WiseGuys Internet B.V. nor the names of
1394 + * its contributors may be used to endorse or promote products derived
1395 + * from this software without specific prior written permission.
1397 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1398 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1399 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1400 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1401 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1402 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1403 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1404 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1405 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1406 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1407 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1408 + ***************************************************************************/
1410 +#ifndef _UTF8_MISC_H_
1411 +#define _UTF8_MISC_H_
1414 + * These variables are used in character processing functions
1415 + * These have been added to manage utf-8 symbols, particularly escape chars
1418 +#define ESCAPE_MASK 0x80
1419 +#define WEIGHT_MASK 0xF0
1421 +#define ESCAPE_MASK 0xFF
1422 +#define WEIGHT_MASK 0x00
1427 + * Is used to jump to the next start of char
1428 + * of course it's only usefull when encoding is utf-8
1429 + * This function have been added by Jocelyn Merand to use libtextcat in OOo
1431 +int nextcharstart(const char *str, int position);
1434 +/*Copy the char in str to dest
1435 + * of course it's only usefull when encoding is utf8 and the symbol is encoded with more than 1 char
1436 + * return the number of char jumped
1437 + * This function have been added by Jocelyn Merand to use libtextcat in OOo
1439 +int charcopy(const char *str, char *dest);
1442 +/* checks if n-gram lex is a prefix of key and of length len
1443 +* if _UTF8_ is defined, it uses escap characters and len is not realy the length of lex
1444 +* in this case, len is the number of utf-8 char strlen("€") == 3 but len == 1
1446 +int issame( char *lex, char *key, int len );
1449 +/* Counts the number of characters
1450 +* if _UTF8_ is defined, it uses escap characters and the result is not realy the length of str
1451 +* in this case, the result is the number of utf-8 char strlen("€") == 3 but utfstrlen("€") == 1
1456 +extern int utfstrlen(const char* str);
1463 --- misc/libtextcat-2.2/src/win32_config.h Mon Mar 31 11:30:06 2008
1464 +++ misc/build/libtextcat-2.2/src/win32_config.h Mon Mar 31 11:29:14 2008
1467 +/* src/config.h. Generated by configure. */
1468 +/* src/config.h.in. Generated from configure.ac by autoheader. */
1470 +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
1471 + systems. This function is required for `alloca.c' support on those systems.
1473 +/* #undef CRAY_STACKSEG_END */
1475 +/* Define to 1 if using `alloca.c'. */
1476 +/* #undef C_ALLOCA */
1478 +/* Define to 1 if you have `alloca', as a function or macro. */
1479 +/* #undef HAVE_ALLOCA */
1481 +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
1483 +/* #undef HAVE_ALLOCA_H */
1485 +/* Define to 1 if you have the <dlfcn.h> header file. */
1486 +#define HAVE_DLFCN_H 1
1488 +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
1489 +/* #undef HAVE_DOPRNT */
1491 +/* Define to 1 if you have the `gettimeofday' function. */
1492 +/* #undef HAVE_GETTIMEOFDAY */
1494 +/* Define to 1 if you have the <inttypes.h> header file. */
1495 +/* #undef HAVE_INTTYPES_H */
1497 +/* Define to 1 if you have the <limits.h> header file. */
1498 +#define HAVE_LIMITS_H 1
1500 +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
1501 + to 0 otherwise. */
1502 +#define HAVE_MALLOC 1
1504 +/* Define to 1 if you have the <memory.h> header file. */
1505 +#define HAVE_MEMORY_H 1
1507 +/* Define to 1 if you have the `memset' function. */
1508 +#define HAVE_MEMSET 1
1510 +/* Define to 1 if your system has a GNU libc compatible `realloc' function,
1511 + and to 0 otherwise. */
1512 +#define HAVE_REALLOC 1
1514 +/* Define to 1 if you have the <stdint.h> header file. */
1515 +/* #undef HAVE_STDINT_H */
1517 +/* Define to 1 if you have the <stdlib.h> header file. */
1518 +#define HAVE_STDLIB_H 1
1520 +/* Define to 1 if you have the `strchr' function. */
1521 +#define HAVE_STRCHR 1
1523 +/* Define to 1 if you have the `strdup' function. */
1524 +#define HAVE_STRDUP 1
1526 +/* Define to 1 if you have the <strings.h> header file. */
1527 +/* #undef HAVE_STRINGS_H */
1529 +/* Define to 1 if you have the <string.h> header file. */
1530 +#define HAVE_STRING_H 1
1532 +/* Define to 1 if you have the `strpbrk' function. */
1533 +#define HAVE_STRPBRK 1
1535 +/* Define to 1 if you have the <sys/stat.h> header file. */
1536 +#define HAVE_SYS_STAT_H 1
1538 +/* Define to 1 if you have the <sys/time.h> header file. */
1539 +/* #undef HAVE_SYS_TIME_H */
1541 +/* Define to 1 if you have the <sys/types.h> header file. */
1542 +#define HAVE_SYS_TYPES_H 1
1544 +/* Define to 1 if you have the <unistd.h> header file. */
1545 +#define HAVE_UNISTD_H 1
1547 +/* Define to 1 if you have the `vprintf' function. */
1548 +#define HAVE_VPRINTF 1
1550 +/* Name of package */
1551 +#define PACKAGE "libtextcat"
1553 +/* Define to the address where bug reports for this package should be sent. */
1554 +#define PACKAGE_BUGREPORT ""
1556 +/* Define to the full name of this package. */
1557 +#define PACKAGE_NAME "libtextcat"
1559 +/* Define to the full name and version of this package. */
1560 +#define PACKAGE_STRING "libtextcat 2.2"
1562 +/* Define to the one symbol short name of this package. */
1563 +#define PACKAGE_TARNAME "libtextcat"
1565 +/* Define to the version of this package. */
1566 +#define PACKAGE_VERSION "2.2"
1568 +/* If using the C implementation of alloca, define if you know the
1569 + direction of stack growth for your system; otherwise it will be
1570 + automatically deduced at run-time.
1571 + STACK_DIRECTION > 0 => grows toward higher addresses
1572 + STACK_DIRECTION < 0 => grows toward lower addresses
1573 + STACK_DIRECTION = 0 => direction of growth unknown */
1574 +/* #undef STACK_DIRECTION */
1576 +/* Define to 1 if you have the ANSI C header files. */
1577 +#define STDC_HEADERS 1
1579 +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
1580 +#define TIME_WITH_SYS_TIME 1
1582 +/* Define to 1 if your <sys/time.h> declares `struct tm'. */
1583 +/* #undef TM_IN_SYS_TIME */
1585 +/* Version number of package */
1586 +#define VERSION "2.2"
1588 +/* Define to empty if `const' does not conform to ANSI C. */
1591 +/* Define as `__inline' if that's what the C compiler calls it, or to nothing
1592 + if it is not supported. */
1593 +/* #undef inline */
1595 +/* Define to rpl_malloc if the replacement function should be used. */
1596 +/* #undef malloc */
1598 +/* Define to rpl_realloc if the replacement function should be used. */
1599 +/* #undef realloc */
1601 +/* Define to `unsigned' if <sys/types.h> does not define. */
1602 +/* #undef size_t */
1603 --- misc/libtextcat-2.2/config.guess 2010-04-15 09:20:04.000000000 +0000
1604 +++ misc/build/libtextcat-2.2/config.guess 2010-04-15 09:20:41.000000000 +0000
1607 # Attempt to guess a canonical system name.
1608 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1609 -# 2000, 2001, 2002 Free Software Foundation, Inc.
1610 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1611 +# Free Software Foundation, Inc.
1613 -timestamp='2002-10-21'
1614 +timestamp='2009-12-30'
1616 # This file is free software; you can redistribute it and/or modify it
1617 # under the terms of the GNU General Public License as published by
1620 # You should have received a copy of the GNU General Public License
1621 # along with this program; if not, write to the Free Software
1622 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1623 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
1626 # As a special exception to the GNU General Public License, if you
1627 # distribute this file as part of a program that contains a
1628 # configuration script generated by Autoconf, you may include it under
1629 # the same distribution terms that you use for the rest of that program.
1631 -# Originally written by Per Bothner <per@bothner.com>.
1632 -# Please send patches to <config-patches@gnu.org>. Submit a context
1633 -# diff and a properly formatted ChangeLog entry.
1635 +# Originally written by Per Bothner. Please send patches (context
1636 +# diff format) to <config-patches@gnu.org> and include a ChangeLog
1639 # This script attempts to guess a canonical system name similar to
1640 # config.sub. If it succeeds, it prints the system name on stdout, and
1641 # exits with 0. Otherwise, it exits with 1.
1643 -# The plan is that this can be called by configure scripts if you
1644 -# don't specify an explicit build system type.
1645 +# You can get the latest version of this script from:
1646 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1648 me=`echo "$0" | sed -e 's,.*/,,'`
1651 GNU config.guess ($timestamp)
1653 Originally written by Per Bothner.
1654 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
1655 -Free Software Foundation, Inc.
1656 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
1657 +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
1658 +Software Foundation, Inc.
1660 This is free software; see the source for copying conditions. There is NO
1661 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
1663 while test $# -gt 0 ; do
1665 --time-stamp | --time* | -t )
1666 - echo "$timestamp" ; exit 0 ;;
1667 + echo "$timestamp" ; exit ;;
1669 - echo "$version" ; exit 0 ;;
1670 + echo "$version" ; exit ;;
1671 --help | --h* | -h )
1672 - echo "$usage"; exit 0 ;;
1673 + echo "$usage"; exit ;;
1674 -- ) # Stop option processing
1676 - ) # Use stdin as input.
1677 @@ -98,14 +102,18 @@
1678 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
1679 # use `HOST_CC' if defined, but it is deprecated.
1681 -# This shell variable is my proudest work .. or something. --bje
1682 +# Portable tmp directory creation inspired by the Autoconf team.
1684 -set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
1685 -(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
1686 - || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
1687 -dummy=$tmpdir/dummy ;
1688 -files="$dummy.c $dummy.o $dummy.rel $dummy" ;
1689 -trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
1691 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
1692 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
1694 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
1695 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
1696 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
1697 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
1699 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
1700 case $CC_FOR_BUILD,$HOST_CC,$CC in
1701 ,,) echo "int x;" > $dummy.c ;
1702 for c in cc gcc c89 c99 ; do
1703 @@ -113,15 +121,13 @@
1704 CC_FOR_BUILD="$c"; break ;
1708 if test x"$CC_FOR_BUILD" = x ; then
1709 CC_FOR_BUILD=no_compiler_found ;
1712 ,,*) CC_FOR_BUILD=$CC ;;
1713 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
1716 +esac ; set_cc_for_build= ;'
1718 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
1719 # (ghazi@noc.rutgers.edu 1994-08-24)
1721 arm*) machine=arm-unknown ;;
1722 sh3el) machine=shl-unknown ;;
1723 sh3eb) machine=sh-unknown ;;
1724 + sh5el) machine=sh5le-unknown ;;
1725 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
1727 # The Operating System including object format, if it has switched
1729 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
1730 eval $set_cc_for_build
1731 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
1732 - | grep __ELF__ >/dev/null
1735 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
1736 # Return netbsd for either. FIX?
1737 @@ -178,144 +185,128 @@
1741 - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1742 + # Debian GNU/NetBSD machines have a different userland, and
1743 + # thus, need a distinct triplet. However, they do not need
1744 + # kernel version information, so it can be replaced with a
1745 + # suitable tag, in the style of linux-gnu.
1746 + case "${UNAME_VERSION}" in
1751 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1754 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
1755 # contains redundant information, the shorter form:
1756 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
1757 echo "${machine}-${os}${release}"
1759 - amiga:OpenBSD:*:*)
1760 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1763 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
1765 - hp300:OpenBSD:*:*)
1766 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1768 - mac68k:OpenBSD:*:*)
1769 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1771 - macppc:OpenBSD:*:*)
1772 - echo powerpc-unknown-openbsd${UNAME_RELEASE}
1774 - mvme68k:OpenBSD:*:*)
1775 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1777 - mvme88k:OpenBSD:*:*)
1778 - echo m88k-unknown-openbsd${UNAME_RELEASE}
1780 - mvmeppc:OpenBSD:*:*)
1781 - echo powerpc-unknown-openbsd${UNAME_RELEASE}
1784 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
1787 - echo mipseb-unknown-openbsd${UNAME_RELEASE}
1790 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1792 - wgrisc:OpenBSD:*:*)
1793 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
1797 - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
1799 + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
1800 + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
1803 + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
1806 + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
1808 + macppc:MirBSD:*:*)
1809 + echo powerpc-unknown-mirbsd${UNAME_RELEASE}
1812 + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
1815 - if test $UNAME_RELEASE = "V4.0"; then
1816 + case $UNAME_RELEASE in
1818 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
1822 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
1825 + # According to Compaq, /usr/sbin/psrinfo has been available on
1826 + # OSF/1 and Tru64 systems produced since 1995. I hope that
1827 + # covers most systems running today. This code pipes the CPU
1828 + # types through head -n 1, so we only detect the type of CPU 0.
1829 + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
1830 + case "$ALPHA_CPU_TYPE" in
1832 + UNAME_MACHINE="alpha" ;;
1834 + UNAME_MACHINE="alpha" ;;
1835 + "LCA4 (21066/21068)")
1836 + UNAME_MACHINE="alpha" ;;
1838 + UNAME_MACHINE="alphaev5" ;;
1840 + UNAME_MACHINE="alphaev56" ;;
1841 + "EV5.6 (21164PC)")
1842 + UNAME_MACHINE="alphapca56" ;;
1843 + "EV5.7 (21164PC)")
1844 + UNAME_MACHINE="alphapca57" ;;
1846 + UNAME_MACHINE="alphaev6" ;;
1848 + UNAME_MACHINE="alphaev67" ;;
1849 + "EV6.8CB (21264C)")
1850 + UNAME_MACHINE="alphaev68" ;;
1851 + "EV6.8AL (21264B)")
1852 + UNAME_MACHINE="alphaev68" ;;
1853 + "EV6.8CX (21264D)")
1854 + UNAME_MACHINE="alphaev68" ;;
1855 + "EV6.9A (21264/EV69A)")
1856 + UNAME_MACHINE="alphaev69" ;;
1858 + UNAME_MACHINE="alphaev7" ;;
1860 + UNAME_MACHINE="alphaev79" ;;
1862 + # A Pn.n version is a patched version.
1863 # A Vn.n version is a released version.
1864 # A Tn.n version is a released field test version.
1865 # A Xn.n version is an unreleased experimental baselevel.
1866 # 1.2 uses "1.2" for uname -r.
1867 - eval $set_cc_for_build
1868 - cat <<EOF >$dummy.s
1871 - .byte 37,100,45,37,120,10,0 # "%d-%x\n"
1878 - .frame \$30,16,\$26,0
1881 - .long 0x47e03d80 # implver \$0
1883 - .long 0x47e20c21 # amask \$2,\$1
1884 - lda \$16,\$Lformat
1893 - $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
1894 - if test "$?" = 0 ; then
1897 - UNAME_MACHINE="alpha"
1900 - UNAME_MACHINE="alphaev5"
1903 - UNAME_MACHINE="alphaev56"
1906 - UNAME_MACHINE="alphapca56"
1909 - UNAME_MACHINE="alphaev6"
1912 - UNAME_MACHINE="alphaev67"
1915 - UNAME_MACHINE="alphaev68"
1918 - UNAME_MACHINE="alphaev7"
1922 - rm -f $dummy.s $dummy && rmdir $tmpdir
1923 - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1925 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1927 Alpha\ *:Windows_NT*:*)
1928 # How do we know it's Interix rather than the generic POSIX subsystem?
1929 # Should we change UNAME_MACHINE based on the output of uname instead
1930 # of the specific Alpha model?
1931 echo alpha-pc-interix
1934 21064:Windows_NT:50:3)
1935 echo alpha-dec-winnt3.5
1938 Amiga*:UNIX_System_V:4.0:*)
1939 echo m68k-unknown-sysv4
1942 *:[Aa]miga[Oo][Ss]:*:*)
1943 echo ${UNAME_MACHINE}-unknown-amigaos
1946 *:[Mm]orph[Oo][Ss]:*:*)
1947 echo ${UNAME_MACHINE}-unknown-morphos
1951 echo i370-ibm-openedition
1955 + echo s390-ibm-zvmoe
1958 + echo powerpc-ibm-os400
1960 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
1961 echo arm-acorn-riscix${UNAME_RELEASE}
1964 + arm:riscos:*:*|arm:RISCOS:*:*)
1965 + echo arm-unknown-riscos
1967 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
1968 echo hppa1.1-hitachi-hiuxmpp
1971 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
1972 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
1973 if test "`(/bin/universe) 2>/dev/null`" = att ; then
1974 @@ -323,29 +314,51 @@
1976 echo pyramid-pyramid-bsd
1981 echo pyramid-pyramid-svr4
1983 - DRS?6000:UNIX_SV:4.2*:7*)
1985 + DRS?6000:unix:4.0:6*)
1986 + echo sparc-icl-nx6
1988 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
1989 case `/usr/bin/uname -p` in
1990 - sparc) echo sparc-icl-nx7 && exit 0 ;;
1991 + sparc) echo sparc-icl-nx7; exit ;;
1994 + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1997 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
2000 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
2001 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
2003 - i86pc:SunOS:5.*:*)
2004 - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
2007 + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
2008 + echo i386-pc-auroraux${UNAME_RELEASE}
2010 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
2011 + eval $set_cc_for_build
2013 + # If there is a compiler, see if it is configured for 64-bit objects.
2014 + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
2015 + # This test works for both compilers.
2016 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
2017 + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
2018 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
2019 + grep IS_64BIT_ARCH >/dev/null
2024 + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
2027 # According to config.sub, this is the proper way to canonicalize
2028 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
2029 # it's likely to be more like Solaris than SunOS4.
2030 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
2034 case "`/usr/bin/arch -k`" in
2036 @@ -354,10 +367,10 @@
2038 # Japanese Language versions have a version number like `4.1.3-JL'.
2039 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
2043 echo m68k-sun-sunos${UNAME_RELEASE}
2047 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
2048 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
2049 @@ -369,10 +382,10 @@
2050 echo sparc-sun-sunos${UNAME_RELEASE}
2056 echo sparc-auspex-sunos${UNAME_RELEASE}
2059 # The situation for MiNT is a little confusing. The machine name
2060 # can be virtually everything (everything which is not
2061 # "atarist" or "atariste" at least should have a processor
2062 @@ -383,37 +396,40 @@
2064 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
2065 echo m68k-atari-mint${UNAME_RELEASE}
2068 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
2069 echo m68k-atari-mint${UNAME_RELEASE}
2072 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
2073 echo m68k-atari-mint${UNAME_RELEASE}
2076 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
2077 echo m68k-milan-mint${UNAME_RELEASE}
2080 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
2081 echo m68k-hades-mint${UNAME_RELEASE}
2084 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
2085 echo m68k-unknown-mint${UNAME_RELEASE}
2089 + echo m68k-apple-machten${UNAME_RELEASE}
2091 powerpc:machten:*:*)
2092 echo powerpc-apple-machten${UNAME_RELEASE}
2096 echo mips-dec-mach_bsd4.3
2100 echo mips-dec-ultrix${UNAME_RELEASE}
2104 echo vax-dec-ultrix${UNAME_RELEASE}
2107 2020:CLIX:*:* | 2430:CLIX:*:*)
2108 echo clipper-intergraph-clix${UNAME_RELEASE}
2111 mips:*:*:UMIPS | mips:*:*:RISCos)
2112 eval $set_cc_for_build
2113 sed 's/^ //' << EOF >$dummy.c
2114 @@ -437,33 +453,33 @@
2118 - $CC_FOR_BUILD -o $dummy $dummy.c \
2119 - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
2120 - && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
2121 - rm -f $dummy.c $dummy && rmdir $tmpdir
2122 + $CC_FOR_BUILD -o $dummy $dummy.c &&
2123 + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
2124 + SYSTEM_NAME=`$dummy $dummyarg` &&
2125 + { echo "$SYSTEM_NAME"; exit; }
2126 echo mips-mips-riscos${UNAME_RELEASE}
2129 Motorola:PowerMAX_OS:*:*)
2130 echo powerpc-motorola-powermax
2133 Motorola:*:4.3:PL8-*)
2134 echo powerpc-harris-powermax
2136 - Night_Hawk:*:*:PowerMAX_OS)
2138 + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
2139 echo powerpc-harris-powermax
2142 Night_Hawk:Power_UNIX:*:*)
2143 echo powerpc-harris-powerunix
2147 echo m88k-harris-cxux7
2151 echo m88k-motorola-sysv4
2155 echo m88k-motorola-sysv3
2159 # DG/UX returns AViiON for all architectures
2160 UNAME_PROCESSOR=`/usr/bin/uname -p`
2161 @@ -479,29 +495,29 @@
2163 echo i586-dg-dgux${UNAME_RELEASE}
2167 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
2168 echo m88k-dolphin-sysv3
2172 # Delta 88k system running SVR3
2173 echo m88k-motorola-sysv3
2176 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
2177 echo m88k-tektronix-sysv3
2180 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
2181 echo m68k-tektronix-bsd
2185 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
2188 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
2189 - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
2190 - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
2191 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
2192 + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
2198 if [ -x /usr/bin/oslevel ] ; then
2199 IBM_REV=`/usr/bin/oslevel`
2201 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
2203 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
2207 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
2208 eval $set_cc_for_build
2209 @@ -524,16 +540,19 @@
2213 - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
2214 - rm -f $dummy.c $dummy && rmdir $tmpdir
2215 - echo rs6000-ibm-aix3.2.5
2216 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
2218 + echo "$SYSTEM_NAME"
2220 + echo rs6000-ibm-aix3.2.5
2222 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
2223 echo rs6000-ibm-aix3.2.4
2225 echo rs6000-ibm-aix3.2
2231 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
2232 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
2234 @@ -546,28 +565,28 @@
2235 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
2237 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
2244 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
2245 echo romp-ibm-bsd4.4
2248 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
2249 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
2250 - exit 0 ;; # report: romp-ibm BSD 4.3
2251 + exit ;; # report: romp-ibm BSD 4.3
2253 echo rs6000-bull-bosx
2256 DPX/2?00:B.O.S.:*:*)
2257 echo m68k-bull-sysv3
2260 9000/[34]??:4.3bsd:1.*:*)
2264 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
2268 9000/[34678]??:HP-UX:*:*)
2269 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
2270 case "${UNAME_MACHINE}" in
2271 @@ -624,16 +643,36 @@
2274 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
2275 - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
2276 - rm -f $dummy.c $dummy && rmdir $tmpdir
2277 + test -z "$HP_ARCH" && HP_ARCH=hppa
2280 + if [ ${HP_ARCH} = "hppa2.0w" ]
2282 + eval $set_cc_for_build
2284 + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
2285 + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
2286 + # generating 64-bit code. GNU and HP use different nomenclature:
2288 + # $ CC_FOR_BUILD=cc ./config.guess
2289 + # => hppa2.0w-hp-hpux11.23
2290 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
2291 + # => hppa64-hp-hpux11.23
2293 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
2296 + HP_ARCH="hppa2.0w"
2301 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
2305 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
2306 echo ia64-hp-hpux${HPUX_REV}
2310 eval $set_cc_for_build
2311 sed 's/^ //' << EOF >$dummy.c
2312 @@ -661,186 +700,248 @@
2316 - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
2317 - rm -f $dummy.c $dummy && rmdir $tmpdir
2318 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
2319 + { echo "$SYSTEM_NAME"; exit; }
2320 echo unknown-hitachi-hiuxwe2
2323 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
2327 9000/8??:4.3bsd:*:*)
2331 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
2332 echo hppa1.0-hp-mpeix
2335 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
2344 if [ -x /usr/sbin/sysversion ] ; then
2345 echo ${UNAME_MACHINE}-unknown-osf1mk
2347 echo ${UNAME_MACHINE}-unknown-osf1
2352 echo hppa1.1-hp-lites
2355 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
2359 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
2360 if getsysinfo -f scalar_acc
2361 then echo c32-convex-bsd
2362 else echo c2-convex-bsd
2366 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
2370 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
2374 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
2379 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
2383 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
2384 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
2385 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
2390 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
2393 - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
2397 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
2401 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
2405 + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
2407 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
2408 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
2409 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
2410 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
2411 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
2414 + 5000:UNIX_System_V:4.*:*)
2415 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
2416 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
2417 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
2419 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
2420 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
2424 echo sparc-unknown-bsdi${UNAME_RELEASE}
2428 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
2432 - # Determine whether the default compiler uses glibc.
2433 - eval $set_cc_for_build
2434 - sed 's/^ //' << EOF >$dummy.c
2435 - #include <features.h>
2436 - #if __GLIBC__ >= 2
2442 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
2443 - rm -f $dummy.c && rmdir $tmpdir
2444 - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
2446 + case ${UNAME_MACHINE} in
2448 + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
2450 + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
2452 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
2456 echo ${UNAME_MACHINE}-pc-cygwin
2461 echo ${UNAME_MACHINE}-pc-mingw32
2465 + # uname -m includes "-pc" on this system.
2466 + echo ${UNAME_MACHINE}-mingw32
2469 echo ${UNAME_MACHINE}-pc-pw32
2472 - echo i386-pc-interix3
2476 + case ${UNAME_MACHINE} in
2478 + echo i586-pc-interix${UNAME_RELEASE}
2480 + authenticamd | genuineintel | EM64T)
2481 + echo x86_64-unknown-interix${UNAME_RELEASE}
2484 + echo ia64-unknown-interix${UNAME_RELEASE}
2487 + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
2488 + echo i${UNAME_MACHINE}-pc-mks
2490 + 8664:Windows_NT:*)
2491 + echo x86_64-pc-mks
2493 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
2494 # How do we know it's Interix rather than the generic POSIX subsystem?
2495 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
2496 # UNAME_MACHINE based on the output of uname instead of i386?
2497 - echo i386-pc-interix
2499 + echo i586-pc-interix
2502 echo ${UNAME_MACHINE}-pc-uwin
2505 + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
2506 + echo x86_64-unknown-cygwin
2509 echo powerpcle-unknown-cygwin
2513 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
2518 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
2522 + # other systems with GNU libc and userland
2523 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
2526 echo ${UNAME_MACHINE}-pc-minix
2530 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
2531 + EV5) UNAME_MACHINE=alphaev5 ;;
2532 + EV56) UNAME_MACHINE=alphaev56 ;;
2533 + PCA56) UNAME_MACHINE=alphapca56 ;;
2534 + PCA57) UNAME_MACHINE=alphapca56 ;;
2535 + EV6) UNAME_MACHINE=alphaev6 ;;
2536 + EV67) UNAME_MACHINE=alphaev67 ;;
2537 + EV68*) UNAME_MACHINE=alphaev68 ;;
2539 + objdump --private-headers /bin/sh | grep -q ld.so.1
2540 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
2541 + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
2544 + eval $set_cc_for_build
2545 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
2546 + | grep -q __ARM_EABI__
2548 + echo ${UNAME_MACHINE}-unknown-linux-gnu
2550 + echo ${UNAME_MACHINE}-unknown-linux-gnueabi
2554 echo ${UNAME_MACHINE}-unknown-linux-gnu
2558 + echo cris-axis-linux-gnu
2560 + crisv32:Linux:*:*)
2561 + echo crisv32-axis-linux-gnu
2564 + echo frv-unknown-linux-gnu
2568 + eval $set_cc_for_build
2569 + sed 's/^ //' << EOF >$dummy.c
2570 + #ifdef __dietlibc__
2574 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
2575 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
2578 echo ${UNAME_MACHINE}-unknown-linux-gnu
2582 + echo ${UNAME_MACHINE}-unknown-linux-gnu
2585 echo ${UNAME_MACHINE}-unknown-linux-gnu
2589 + mips:Linux:*:* | mips64:Linux:*:*)
2590 eval $set_cc_for_build
2591 sed 's/^ //' << EOF >$dummy.c
2595 + #undef ${UNAME_MACHINE}
2596 + #undef ${UNAME_MACHINE}el
2597 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
2599 + CPU=${UNAME_MACHINE}el
2601 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
2603 + CPU=${UNAME_MACHINE}
2609 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
2610 - rm -f $dummy.c && rmdir $tmpdir
2611 - test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
2612 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
2613 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
2616 - echo powerpc-unknown-linux-gnu
2619 - echo powerpc64-unknown-linux-gnu
2622 - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
2623 - EV5) UNAME_MACHINE=alphaev5 ;;
2624 - EV56) UNAME_MACHINE=alphaev56 ;;
2625 - PCA56) UNAME_MACHINE=alphapca56 ;;
2626 - PCA57) UNAME_MACHINE=alphapca56 ;;
2627 - EV6) UNAME_MACHINE=alphaev6 ;;
2628 - EV67) UNAME_MACHINE=alphaev67 ;;
2629 - EV68*) UNAME_MACHINE=alphaev68 ;;
2631 - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
2632 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
2633 - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
2636 + echo or32-unknown-linux-gnu
2639 + echo sparc-unknown-linux-gnu
2641 + parisc64:Linux:*:* | hppa64:Linux:*:*)
2642 + echo hppa64-unknown-linux-gnu
2644 parisc:Linux:*:* | hppa:Linux:*:*)
2645 # Look for CPU level
2646 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
2647 @@ -848,82 +949,40 @@
2648 PA8*) echo hppa2.0-unknown-linux-gnu ;;
2649 *) echo hppa-unknown-linux-gnu ;;
2652 - parisc64:Linux:*:* | hppa64:Linux:*:*)
2653 - echo hppa64-unknown-linux-gnu
2657 + echo powerpc64-unknown-linux-gnu
2660 + echo powerpc-unknown-linux-gnu
2662 s390:Linux:*:* | s390x:Linux:*:*)
2663 echo ${UNAME_MACHINE}-ibm-linux
2667 + echo ${UNAME_MACHINE}-unknown-linux-gnu
2670 echo ${UNAME_MACHINE}-unknown-linux-gnu
2673 sparc:Linux:*:* | sparc64:Linux:*:*)
2674 echo ${UNAME_MACHINE}-unknown-linux-gnu
2678 + echo ${UNAME_MACHINE}-dec-linux-gnu
2681 echo x86_64-unknown-linux-gnu
2684 - # The BFD linker knows what the default object file format is, so
2685 - # first see if it will tell us. cd to the root directory to prevent
2686 - # problems with other programs or directories called `ld' in the path.
2687 - # Set LC_ALL=C to ensure ld outputs messages in English.
2688 - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
2689 - | sed -ne '/supported targets:/!d
2691 - s/.*supported targets: *//
2694 - case "$ld_supported_targets" in
2696 - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
2699 - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
2702 - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
2705 - # Either a pre-BFD a.out linker (linux-gnuoldld) or
2706 - # one that does not give us useful --help.
2707 - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
2710 - # Determine whether the default compiler is a.out or elf
2711 - eval $set_cc_for_build
2712 - sed 's/^ //' << EOF >$dummy.c
2713 - #include <features.h>
2716 - # if __GLIBC__ >= 2
2725 - #ifdef __INTEL_COMPILER
2732 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
2733 - rm -f $dummy.c && rmdir $tmpdir
2734 - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
2735 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
2738 + xtensa*:Linux:*:*)
2739 + echo ${UNAME_MACHINE}-unknown-linux-gnu
2741 i*86:DYNIX/ptx:4*:*)
2742 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
2743 # earlier versions are messed up and put the nodename in both
2744 # sysname and nodename.
2745 echo i386-sequent-sysv4
2748 i*86:UNIX_SV:4.2MP:2.*)
2749 # Unixware is an offshoot of SVR4, but it has its own version
2750 # number series starting with 2...
2751 @@ -931,7 +990,27 @@
2752 # I just have to hope. -- rms.
2753 # Use sysv4.2uw... so that sysv4* matches it.
2754 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
2758 + # If we were able to find `uname', then EMX Unix compatibility
2759 + # is probably installed.
2760 + echo ${UNAME_MACHINE}-pc-os2-emx
2762 + i*86:XTS-300:*:STOP)
2763 + echo ${UNAME_MACHINE}-unknown-stop
2766 + echo ${UNAME_MACHINE}-unknown-atheos
2768 + i*86:syllable:*:*)
2769 + echo ${UNAME_MACHINE}-pc-syllable
2771 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
2772 + echo i386-unknown-lynxos${UNAME_RELEASE}
2775 + echo ${UNAME_MACHINE}-pc-msdosdjgpp
2777 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
2778 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
2779 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
2780 @@ -939,15 +1018,16 @@
2782 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
2788 + # UnixWare 7.x, OpenUNIX and OpenServer 6.
2789 case `/bin/uname -X | grep "^Machine"` in
2790 *486*) UNAME_MACHINE=i486 ;;
2791 *Pentium) UNAME_MACHINE=i586 ;;
2792 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
2794 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
2798 if test -f /usr/options/cb.name; then
2799 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
2800 @@ -965,76 +1045,86 @@
2802 echo ${UNAME_MACHINE}-pc-sysv32
2806 - echo ${UNAME_MACHINE}-pc-msdosdjgpp
2810 # Left here for compatibility:
2811 # uname -m prints for DJGPP always 'pc', but it prints nothing about
2812 - # the processor, so we play safe by assuming i386.
2813 - echo i386-pc-msdosdjgpp
2815 + # the processor, so we play safe by assuming i586.
2816 + # Note: whatever this is, it MUST be the same as what config.sub
2817 + # prints for the "djgpp" host, or else GDB configury will decide that
2818 + # this is a cross-build.
2819 + echo i586-pc-msdosdjgpp
2826 echo i860-intel-osf1
2829 i860:*:4.*:*) # i860-SVR4
2830 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
2831 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
2832 else # Add other i860-SVR4 vendors below as they are discovered.
2833 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
2839 echo m68010-convergent-sysv
2842 mc68k:UNIX:SYSTEM5:3.51m)
2843 echo m68k-convergent-sysv
2845 - M68*:*:R3V[567]*:*)
2846 - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
2847 - 3[34]??:*: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)
2849 + M680?0:D-NIX:5.3:*)
2850 + echo m68k-diab-dnix
2852 + M68*:*:R3V[5678]*:*)
2853 + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
2854 + 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)
2856 test -r /etc/.relid \
2857 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
2858 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
2859 - && echo i486-ncr-sysv4.3${OS_REL} && exit 0
2860 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
2861 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
2862 - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
2863 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
2864 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
2865 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
2866 - && echo i486-ncr-sysv4 && exit 0 ;;
2867 + && { echo i486-ncr-sysv4; exit; } ;;
2868 + NCR*:*:4.2:* | MPRAS*:*:4.2:*)
2870 + test -r /etc/.relid \
2871 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
2872 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
2873 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
2874 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
2875 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
2876 + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
2877 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
2878 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
2879 echo m68k-unknown-lynxos${UNAME_RELEASE}
2882 mc68030:UNIX_System_V:4.*:*)
2883 echo m68k-atari-sysv4
2885 - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
2886 - echo i386-unknown-lynxos${UNAME_RELEASE}
2889 TSUNAMI:LynxOS:2.*:*)
2890 echo sparc-unknown-lynxos${UNAME_RELEASE}
2893 rs6000:LynxOS:2.*:*)
2894 echo rs6000-unknown-lynxos${UNAME_RELEASE}
2896 - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
2898 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
2899 echo powerpc-unknown-lynxos${UNAME_RELEASE}
2902 SM[BE]S:UNIX_SV:*:*)
2903 echo mips-dde-sysv${UNAME_RELEASE}
2906 RM*:ReliantUNIX-*:*:*)
2915 if uname -p 2>/dev/null >/dev/null ; then
2916 UNAME_MACHINE=`(uname -p) 2>/dev/null`
2917 @@ -1042,64 +1132,94 @@
2923 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
2924 # says <Richard.M.Bartel@ccMail.Census.GOV>
2925 echo i586-unisys-sysv4
2928 *:UNIX_System_V:4*:FTX*)
2929 # From Gerald Hewes <hewes@openmarket.com>.
2930 # How about differentiating between stratus architectures? -djm
2931 echo hppa1.1-stratus-sysv4
2935 # From seanf@swdc.stratus.com.
2936 echo i860-stratus-sysv4
2940 + # From Paul.Green@stratus.com.
2941 + echo ${UNAME_MACHINE}-stratus-vos
2944 # From Paul.Green@stratus.com.
2945 echo hppa1.1-stratus-vos
2949 echo m68k-apple-aux${UNAME_RELEASE}
2953 echo mips-sony-newsos6
2956 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
2957 if [ -d /usr/nec ]; then
2958 echo mips-nec-sysv${UNAME_RELEASE}
2960 echo mips-unknown-sysv${UNAME_RELEASE}
2964 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
2965 echo powerpc-be-beos
2968 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
2969 echo powerpc-apple-beos
2972 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
2976 + BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
2977 + echo i586-pc-haiku
2980 echo sx4-nec-superux${UNAME_RELEASE}
2984 echo sx5-nec-superux${UNAME_RELEASE}
2988 echo sx6-nec-superux${UNAME_RELEASE}
2991 + SX-7:SUPER-UX:*:*)
2992 + echo sx7-nec-superux${UNAME_RELEASE}
2994 + SX-8:SUPER-UX:*:*)
2995 + echo sx8-nec-superux${UNAME_RELEASE}
2997 + SX-8R:SUPER-UX:*:*)
2998 + echo sx8r-nec-superux${UNAME_RELEASE}
3000 Power*:Rhapsody:*:*)
3001 echo powerpc-apple-rhapsody${UNAME_RELEASE}
3005 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
3009 - echo `uname -p`-apple-darwin${UNAME_RELEASE}
3011 + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
3012 + case $UNAME_PROCESSOR in
3014 + eval $set_cc_for_build
3015 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
3016 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
3017 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
3018 + grep IS_64BIT_ARCH >/dev/null
3020 + UNAME_PROCESSOR="x86_64"
3023 + unknown) UNAME_PROCESSOR=powerpc ;;
3025 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
3027 *:procnto*:*:* | *:QNX:[0123456789]*:*)
3028 UNAME_PROCESSOR=`uname -p`
3029 if test "$UNAME_PROCESSOR" = "x86"; then
3030 @@ -1107,22 +1227,25 @@
3033 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
3039 - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
3041 + NSE-?:NONSTOP_KERNEL:*:*)
3042 + echo nse-tandem-nsk${UNAME_RELEASE}
3044 + NSR-?:NONSTOP_KERNEL:*:*)
3045 echo nsr-tandem-nsk${UNAME_RELEASE}
3049 echo mips-compaq-nonstopux
3053 echo bs2000-siemens-sysv
3056 DS/*:UNIX_System_V:*:*)
3057 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
3061 # "uname -m" is not consistent, so use $cputype instead. 386
3062 # is converted to i386 for consistency with other x86
3063 @@ -1133,36 +1256,50 @@
3064 UNAME_MACHINE="$cputype"
3066 echo ${UNAME_MACHINE}-unknown-plan9
3069 - # If we were able to find `uname', then EMX Unix compatibility
3070 - # is probably installed.
3071 - echo ${UNAME_MACHINE}-pc-os2-emx
3075 echo pdp10-unknown-tops10
3079 echo pdp10-unknown-tenex
3082 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
3083 echo pdp10-dec-tops20
3086 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
3087 echo pdp10-xkl-tops20
3091 echo pdp10-unknown-tops20
3095 echo pdp10-unknown-its
3097 - i*86:XTS-300:*:STOP)
3098 - echo ${UNAME_MACHINE}-unknown-stop
3101 - echo ${UNAME_MACHINE}-unknown-atheos
3105 + echo mips-sei-seiux${UNAME_RELEASE}
3108 + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
3111 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
3112 + case "${UNAME_MACHINE}" in
3113 + A*) echo alpha-dec-vms ; exit ;;
3114 + I*) echo ia64-dec-vms ; exit ;;
3115 + V*) echo vax-dec-vms ; exit ;;
3118 + echo i386-pc-xenix
3121 + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
3124 + echo ${UNAME_MACHINE}-pc-rdos
3127 + echo ${UNAME_MACHINE}-pc-aros
3131 #echo '(No uname command or uname output not recognized.)' 1>&2
3132 @@ -1194,7 +1331,7 @@
3135 #if defined (__arm) && defined (__acorn) && defined (__unix)
3136 - printf ("arm-acorn-riscix"); exit (0);
3137 + printf ("arm-acorn-riscix\n"); exit (0);
3140 #if defined (hp300) && !defined (hpux)
3141 @@ -1283,12 +1420,12 @@
3145 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
3146 -rm -f $dummy.c $dummy && rmdir $tmpdir
3147 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
3148 + { echo "$SYSTEM_NAME"; exit; }
3150 # Apollos put the system type in the environment.
3152 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
3153 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
3155 # Convex versions that predate uname can use getsysinfo(1)
3157 @@ -1297,22 +1434,22 @@
3158 case `getsysinfo -f cpu_type` in
3164 if getsysinfo -f scalar_acc
3165 then echo c32-convex-bsd
3166 else echo c2-convex-bsd
3185 @@ -1323,7 +1460,9 @@
3186 the operating system you are using. It is advised that you
3187 download the most up to date version of the config scripts from
3189 - ftp://ftp.gnu.org/pub/gnu/config/
3190 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3192 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
3194 If the version you run ($0) is already up to date, please
3195 send the following data and any information you think might be
3196 --- misc/libtextcat-2.2/config.sub 2010-04-15 09:20:04.000000000 +0000
3197 +++ misc/build/libtextcat-2.2/config.sub 2010-04-15 09:20:41.000000000 +0000
3200 # Configuration validation subroutine script.
3201 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3202 -# 2000, 2001, 2002 Free Software Foundation, Inc.
3203 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3204 +# Free Software Foundation, Inc.
3206 -timestamp='2002-09-05'
3207 +timestamp='2010-01-22'
3209 # This file is (in principle) common to ALL GNU software.
3210 # The presence of a machine in this file suggests that SOME GNU software
3213 # You should have received a copy of the GNU General Public License
3214 # along with this program; if not, write to the Free Software
3215 -# Foundation, Inc., 59 Temple Place - Suite 330,
3216 -# Boston, MA 02111-1307, USA.
3218 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
3221 # As a special exception to the GNU General Public License, if you
3222 # distribute this file as part of a program that contains a
3223 # configuration script generated by Autoconf, you may include it under
3224 # the same distribution terms that you use for the rest of that program.
3227 # Please send patches to <config-patches@gnu.org>. Submit a context
3228 -# diff and a properly formatted ChangeLog entry.
3229 +# diff and a properly formatted GNU ChangeLog entry.
3231 # Configuration subroutine to validate and canonicalize a configuration type.
3232 # Supply the specified configuration type as an argument.
3233 # If it is invalid, we print an error message on stderr and exit with code 1.
3234 # Otherwise, we print the canonical config type on stdout and succeed.
3236 +# You can get the latest version of this script from:
3237 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
3239 # This file is supposed to be the same for all GNU packages
3240 # and recognize all the CPU types, system types and aliases
3241 # that are meaningful with *any* GNU software.
3244 GNU config.sub ($timestamp)
3246 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
3247 -Free Software Foundation, Inc.
3248 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3249 +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
3250 +Software Foundation, Inc.
3252 This is free software; see the source for copying conditions. There is NO
3253 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
3255 while test $# -gt 0 ; do
3257 --time-stamp | --time* | -t )
3258 - echo "$timestamp" ; exit 0 ;;
3259 + echo "$timestamp" ; exit ;;
3261 - echo "$version" ; exit 0 ;;
3262 + echo "$version" ; exit ;;
3263 --help | --h* | -h )
3264 - echo "$usage"; exit 0 ;;
3265 + echo "$usage"; exit ;;
3266 -- ) # Stop option processing
3268 - ) # Use stdin as input.
3271 # First pass through any local machine types.
3278 @@ -118,7 +124,10 @@
3279 # Here we must recognize all the valid KERNEL-OS combinations.
3280 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
3282 - nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
3283 + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
3284 + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
3285 + kopensolaris*-gnu* | \
3286 + storm-chaos* | os2-emx* | rtmk-nova*)
3288 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
3290 @@ -144,10 +153,13 @@
3291 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
3292 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
3293 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
3295 + -apple | -axis | -knuth | -cray | -microblaze)
3302 -sim | -cisco | -oki | -wec | -winbond)
3305 @@ -169,6 +181,10 @@
3311 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
3315 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
3316 @@ -185,6 +201,10 @@
3317 # Don't forget version if it is 3.2v4 or newer.
3318 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
3321 + # Don't forget version if it is 3.2v4 or newer.
3322 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
3326 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
3327 @@ -228,51 +248,71 @@
3329 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
3330 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
3331 - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
3334 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
3337 | d10v | d30v | dlx | dsp16xx \
3339 + | fido | fr30 | frv \
3340 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
3341 | i370 | i860 | i960 | ia64 \
3343 - | m32r | m68000 | m68k | m88k | mcore \
3346 + | m32c | m32r | m32rle | m68000 | m68k | m88k \
3347 + | maxq | mb | microblaze | mcore | mep | metag \
3348 | mips | mipsbe | mipseb | mipsel | mipsle \
3350 | mips64 | mips64el \
3351 - | mips64vr | mips64vrel \
3352 + | mips64octeon | mips64octeonel \
3353 | mips64orion | mips64orionel \
3354 + | mips64r5900 | mips64r5900el \
3355 + | mips64vr | mips64vrel \
3356 | mips64vr4100 | mips64vr4100el \
3357 | mips64vr4300 | mips64vr4300el \
3358 | mips64vr5000 | mips64vr5000el \
3359 + | mips64vr5900 | mips64vr5900el \
3360 | mipsisa32 | mipsisa32el \
3361 + | mipsisa32r2 | mipsisa32r2el \
3362 | mipsisa64 | mipsisa64el \
3363 + | mipsisa64r2 | mipsisa64r2el \
3364 | mipsisa64sb1 | mipsisa64sb1el \
3365 | mipsisa64sr71k | mipsisa64sr71kel \
3366 | mipstx39 | mipstx39el \
3367 | mn10200 | mn10300 \
3373 - | openrisc | or32 \
3375 | pdp10 | pdp11 | pj | pjl \
3376 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
3378 - | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
3381 + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
3383 - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
3385 - | tahoe | thumb | tic80 | tron \
3386 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
3387 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
3388 + | spu | strongarm \
3389 + | tahoe | thumb | tic4x | tic80 | tron \
3393 - | x86 | xscale | xstormy16 | xtensa \
3395 + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
3397 basic_machine=$basic_machine-unknown
3399 - m6811 | m68hc11 | m6812 | m68hc12)
3400 + m6811 | m68hc11 | m6812 | m68hc12 | picochip)
3401 # Motorola 68HC11/12.
3402 basic_machine=$basic_machine-unknown
3405 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
3408 + basic_machine=mt-unknown
3411 # We use `pc' rather than `unknown'
3412 # because (1) that's what they normally are, and
3413 @@ -292,50 +332,69 @@
3414 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
3415 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
3416 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
3419 - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
3420 - | clipper-* | cydra-* \
3421 + | avr-* | avr32-* \
3422 + | bfin-* | bs2000-* \
3423 + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
3424 + | clipper-* | craynv-* | cydra-* \
3425 | d10v-* | d30v-* | dlx-* \
3427 - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
3428 + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
3429 | h8300-* | h8500-* \
3430 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
3431 | i*86-* | i860-* | i960-* | ia64-* \
3434 + | ip2k-* | iq2000-* \
3436 + | m32c-* | m32r-* | m32rle-* \
3437 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
3438 - | m88110-* | m88k-* | mcore-* \
3439 + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
3440 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
3442 | mips64-* | mips64el-* \
3443 - | mips64vr-* | mips64vrel-* \
3444 + | mips64octeon-* | mips64octeonel-* \
3445 | mips64orion-* | mips64orionel-* \
3446 + | mips64r5900-* | mips64r5900el-* \
3447 + | mips64vr-* | mips64vrel-* \
3448 | mips64vr4100-* | mips64vr4100el-* \
3449 | mips64vr4300-* | mips64vr4300el-* \
3450 | mips64vr5000-* | mips64vr5000el-* \
3451 + | mips64vr5900-* | mips64vr5900el-* \
3452 | mipsisa32-* | mipsisa32el-* \
3453 + | mipsisa32r2-* | mipsisa32r2el-* \
3454 | mipsisa64-* | mipsisa64el-* \
3455 + | mipsisa64r2-* | mipsisa64r2el-* \
3456 | mipsisa64sb1-* | mipsisa64sb1el-* \
3457 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
3458 - | mipstx39 | mipstx39el \
3459 + | mipstx39-* | mipstx39el-* \
3463 + | nios-* | nios2-* \
3464 | none-* | np1-* | ns16k-* | ns32k-* \
3466 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
3467 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
3469 - | romp-* | rs6000-* \
3470 - | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
3471 + | romp-* | rs6000-* | rx-* \
3472 + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
3473 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
3474 - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
3475 - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
3476 - | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
3477 + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
3479 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
3480 + | tahoe-* | thumb-* \
3481 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
3482 + | tile-* | tilegx-* \
3485 | v850-* | v850e-* | vax-* \
3487 - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
3489 + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
3490 + | xstormy16-* | xtensa*-* \
3495 + # Recognize the basic CPU types without company name, with glob match.
3497 + basic_machine=$basic_machine-unknown
3499 # Recognize the various machine names and aliases which stand
3500 # for a CPU type and a company and sometimes even an OS.
3502 basic_machine=a29k-amd
3506 + basic_machine=abacus-unknown
3509 basic_machine=m68010-adobe
3511 @@ -367,6 +429,12 @@
3512 basic_machine=a29k-none
3516 + basic_machine=x86_64-pc
3519 + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
3522 basic_machine=580-amdahl
3524 @@ -390,6 +458,10 @@
3525 basic_machine=m68k-apollo
3529 + basic_machine=i386-pc
3533 basic_machine=m68k-apple
3535 @@ -398,10 +470,26 @@
3536 basic_machine=ns32k-sequent
3540 + basic_machine=bfin-unknown
3544 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
3548 + basic_machine=powerpc-ibm
3552 basic_machine=c90-cray
3556 + basic_machine=arm-unknown
3560 basic_machine=c1-convex
3562 @@ -426,12 +514,27 @@
3563 basic_machine=j90-cray
3567 + basic_machine=craynv-cray
3571 + basic_machine=cr16-unknown
3575 basic_machine=m68k-crds
3577 + crisv32 | crisv32-* | etraxfs*)
3578 + basic_machine=crisv32-axis
3580 cris | cris-* | etrax*)
3581 basic_machine=cris-axis
3584 + basic_machine=crx-unknown
3588 basic_machine=m68k-da30
3590 @@ -454,6 +557,14 @@
3591 basic_machine=m88k-motorola
3595 + basic_machine=i686-pc
3599 + basic_machine=i586-pc
3603 basic_machine=rs6000-bull
3605 @@ -604,6 +715,14 @@
3606 basic_machine=m68k-isi
3610 + basic_machine=m68k-unknown
3614 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
3618 basic_machine=m88k-omron
3620 @@ -615,10 +734,17 @@
3621 basic_machine=ns32k-utek
3625 + basic_machine=microblaze-xilinx
3628 basic_machine=i386-pc
3632 + basic_machine=arm-unknown
3636 basic_machine=m68000-convergent
3638 @@ -632,10 +758,6 @@
3640 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
3643 - basic_machine=mmix-knuth
3647 basic_machine=m68k-rom68k
3650 basic_machine=i386-pc
3654 + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
3657 basic_machine=i370-ibm
3659 @@ -723,9 +848,12 @@
3660 basic_machine=hppa1.1-oki
3664 + openrisc | openrisc-*)
3665 basic_machine=or32-unknown
3669 + basic_machine=powerpc-ibm
3672 OSE68000 | ose68000)
3673 basic_machine=m68000-ericsson
3674 @@ -743,6 +871,14 @@
3675 basic_machine=i860-intel
3679 + basic_machine=hppa-unknown
3683 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
3687 basic_machine=sparc-tti
3689 @@ -752,24 +888,36 @@
3691 basic_machine=ns32k-pc532
3694 + basic_machine=i386-pc
3697 + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
3699 pentium | p5 | k5 | k6 | nexgen | viac3)
3700 basic_machine=i586-pc
3702 pentiumpro | p6 | 6x86 | athlon | athlon_*)
3703 basic_machine=i686-pc
3705 - pentiumii | pentium2)
3706 + pentiumii | pentium2 | pentiumiii | pentium3)
3707 basic_machine=i686-pc
3710 + basic_machine=i786-pc
3712 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
3713 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
3715 pentiumpro-* | p6-* | 6x86-* | athlon-*)
3716 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
3718 - pentiumii-* | pentium2-*)
3719 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
3720 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
3723 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
3726 basic_machine=pn-gould
3728 @@ -802,6 +950,10 @@
3729 basic_machine=i586-unknown
3733 + basic_machine=i386-pc
3737 basic_machine=m68k-rom68k
3739 @@ -828,6 +980,14 @@
3741 basic_machine=mipsisa64sb1el-unknown
3744 + basic_machine=mipsisa32-sde
3748 + basic_machine=mips-sei
3752 basic_machine=i386-sequent
3754 @@ -835,6 +995,12 @@
3755 basic_machine=sh-hitachi
3759 + basic_machine=sh5le-unknown
3762 + basic_machine=sh64-unknown
3764 sparclite-wrs | simso-wrs)
3765 basic_machine=sparclite-wrs
3767 @@ -901,10 +1067,6 @@
3768 basic_machine=i386-sequent
3772 - basic_machine=alpha-cray
3776 basic_machine=alphaev5-cray
3778 @@ -913,14 +1075,27 @@
3779 basic_machine=t90-cray
3783 - basic_machine=tic4x-unknown
3787 basic_machine=tic54x-unknown
3791 + basic_machine=tic55x-unknown
3795 + basic_machine=tic6x-unknown
3798 + # This must be matched before tile*.
3800 + basic_machine=tilegx-unknown
3804 + basic_machine=tile-unknown
3808 basic_machine=mipstx39-unknown
3810 @@ -934,6 +1109,10 @@
3812 basic_machine=m68k-ncr
3815 + basic_machine=s390x-ibm
3819 basic_machine=a29k-amd
3821 @@ -977,9 +1156,9 @@
3822 basic_machine=hppa1.1-winbond
3826 - basic_machine=i386-pc
3827 - os=-windows32-msvcrt
3829 + basic_machine=i686-pc
3833 basic_machine=xps100-honeywell
3834 @@ -992,6 +1171,10 @@
3835 basic_machine=z8k-unknown
3839 + basic_machine=z80-unknown
3843 basic_machine=none-none
3845 @@ -1011,6 +1194,9 @@
3847 basic_machine=romp-ibm
3850 + basic_machine=mmix-knuth
3853 basic_machine=rs6000-ibm
3855 @@ -1027,13 +1213,10 @@
3857 basic_machine=we32k-att
3859 - sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
3860 + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
3861 basic_machine=sh-unknown
3864 - basic_machine=sh64-unknown
3866 - sparc | sparcv9 | sparcv9b)
3867 + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
3868 basic_machine=sparc-sun
3871 @@ -1080,6 +1263,9 @@
3872 # First match some system type aliases
3873 # that might get confused with valid system types.
3874 # -solaris* is a basic system type, with this one exception.
3878 -solaris1 | -solaris1.*)
3879 os=`echo $os | sed -e 's|solaris1|sunos4|'`
3881 @@ -1100,24 +1286,30 @@
3882 # Each alternative MUST END IN A *, to match a version number.
3883 # -sysv* is not here because it comes later, after sysvr4.
3884 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
3885 - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
3886 - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
3887 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
3888 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
3889 + | -sym* | -kopensolaris* \
3890 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
3892 + | -aos* | -aros* \
3893 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
3894 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
3895 - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
3896 - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
3897 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
3898 + | -openbsd* | -solidbsd* \
3899 + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
3900 + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
3901 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
3902 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
3903 - | -chorusos* | -chorusrdb* \
3904 + | -chorusos* | -chorusrdb* | -cegcc* \
3905 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
3906 - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
3907 - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
3908 + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
3909 + | -uxpv* | -beos* | -mpeix* | -udk* \
3910 + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
3911 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
3912 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
3913 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
3914 - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
3915 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
3916 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
3917 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
3918 # Remember, each alternative MUST END IN *, to match a version number.
3921 @@ -1129,16 +1321,21 @@
3929 + os=`echo $os | sed -e 's|nto|nto-qnx|'`
3931 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
3932 - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
3933 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
3934 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
3937 os=`echo $os | sed -e 's|mac|macos|'`
3940 + os=-linux-dietlibc
3943 os=`echo $os | sed -e 's|linux|linux-gnu|'`
3945 @@ -1151,6 +1348,9 @@
3955 @@ -1172,6 +1372,9 @@
3965 @@ -1194,6 +1397,9 @@
3975 @@ -1224,6 +1430,20 @@
3976 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
3996 @@ -1246,6 +1466,12 @@
3997 # system, and we'll never get to this point.
3999 case $basic_machine in
4009 @@ -1255,6 +1481,9 @@
4016 # This must come before the *-dec entry.
4019 @@ -1280,6 +1509,9 @@
4029 @@ -1298,9 +1530,15 @@
4045 @@ -1403,7 +1641,7 @@
4054 @@ -1433,9 +1671,15 @@
4067 -vxsim* | -vxworks* | -windiss*)
4070 @@ -1460,7 +1704,7 @@
4073 echo $basic_machine$os
4078 # eval: (add-hook 'write-file-hooks 'time-stamp)