1cdf0e10cSrcweir--- misc/libtextcat-2.2/configure Thu May 22 13:39:55 2003 2*76decbbcSPedro Giffuni+++ misc/build/libtextcat-2.2/configure Fri Sep 4 16:42:33 2015 3cdf0e10cSrcweir@@ -3451,7 +3451,7 @@ 4cdf0e10cSrcweir ;; 5cdf0e10cSrcweir 6cdf0e10cSrcweir # This must be Linux ELF. 7cdf0e10cSrcweir-linux-gnu*) 8cdf0e10cSrcweir+linux-gnu*|k*bsd*-gnu*) 9cdf0e10cSrcweir case $host_cpu in 10cdf0e10cSrcweir alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) 11cdf0e10cSrcweir lt_cv_deplibs_check_method=pass_all ;; 12cdf0e10cSrcweir@@ -5391,7 +5391,8 @@ 13cdf0e10cSrcweir allow_undefined_flag= 14cdf0e10cSrcweir no_undefined_flag= 15cdf0e10cSrcweir need_lib_prefix=unknown 16cdf0e10cSrcweir-need_version=unknown 17cdf0e10cSrcweir+#need_version=unknown 18cdf0e10cSrcweir+need_version=no 19cdf0e10cSrcweir # when you set need_version to no, make sure it does not cause -set_version 20cdf0e10cSrcweir # flags to be left without arguments 21cdf0e10cSrcweir archive_cmds= 22cdf0e10cSrcweir@@ -5785,7 +5786,7 @@ 23cdf0e10cSrcweir # cross-compilation, but unfortunately the echo tests do not 24cdf0e10cSrcweir # yet detect zsh echo's removal of \ escapes. Also zsh mangles 25cdf0e10cSrcweir # `"' quotes if we put them in here... so don't! 26cdf0e10cSrcweir- 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)' 27cdf0e10cSrcweir+ 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)' 28cdf0e10cSrcweir # We need to add '_' to the symbols in $export_symbols first 29cdf0e10cSrcweir #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' 30cdf0e10cSrcweir hardcode_direct=yes 31*76decbbcSPedro Giffuni@@ -5793,7 +5794,7 @@ 32*76decbbcSPedro Giffuni whole_archive_flag_spec='-all_load $convenience' 33*76decbbcSPedro Giffuni ;; 34*76decbbcSPedro Giffuni 35*76decbbcSPedro Giffuni- freebsd1*) 36*76decbbcSPedro Giffuni+ freebsd1.*) 37*76decbbcSPedro Giffuni ld_shlibs=no 38*76decbbcSPedro Giffuni ;; 39*76decbbcSPedro Giffuni 40*76decbbcSPedro Giffuni@@ -5809,7 +5810,7 @@ 41*76decbbcSPedro Giffuni ;; 42*76decbbcSPedro Giffuni 43*76decbbcSPedro Giffuni # Unfortunately, older versions of FreeBSD 2 do not have this feature. 44*76decbbcSPedro Giffuni- freebsd2*) 45*76decbbcSPedro Giffuni+ freebsd2.*) 46*76decbbcSPedro Giffuni archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 47*76decbbcSPedro Giffuni hardcode_direct=yes 48*76decbbcSPedro Giffuni hardcode_minus_L=yes 49*76decbbcSPedro Giffuni@@ -6275,12 +6276,12 @@ 50*76decbbcSPedro Giffuni shlibpath_var=DYLD_LIBRARY_PATH 51*76decbbcSPedro Giffuni ;; 52*76decbbcSPedro Giffuni 53*76decbbcSPedro Giffuni-freebsd1*) 54*76decbbcSPedro Giffuni+freebsd1.*) 55*76decbbcSPedro Giffuni dynamic_linker=no 56cdf0e10cSrcweir ;; 57cdf0e10cSrcweir 58cdf0e10cSrcweir freebsd*) 59cdf0e10cSrcweir- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 60cdf0e10cSrcweir+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 61cdf0e10cSrcweir version_type=freebsd-$objformat 62cdf0e10cSrcweir case $version_type in 63cdf0e10cSrcweir freebsd-elf*) 64*76decbbcSPedro Giffuni@@ -6295,7 +6296,7 @@ 65*76decbbcSPedro Giffuni esac 66*76decbbcSPedro Giffuni shlibpath_var=LD_LIBRARY_PATH 67*76decbbcSPedro Giffuni case $host_os in 68*76decbbcSPedro Giffuni- freebsd2*) 69*76decbbcSPedro Giffuni+ freebsd2.*) 70*76decbbcSPedro Giffuni shlibpath_overrides_runpath=yes 71*76decbbcSPedro Giffuni ;; 72*76decbbcSPedro Giffuni *) 73*76decbbcSPedro Giffuni@@ -6364,7 +6365,7 @@ 74cdf0e10cSrcweir ;; 75cdf0e10cSrcweir 76cdf0e10cSrcweir # This must be Linux ELF. 77cdf0e10cSrcweir-linux-gnu*) 78cdf0e10cSrcweir+linux-gnu*|k*bsd*-gnu*) 79cdf0e10cSrcweir version_type=linux 80cdf0e10cSrcweir need_lib_prefix=no 81cdf0e10cSrcweir need_version=no 82cdf0e10cSrcweir--- misc/libtextcat-2.2/src/Makefile.in Thu May 22 13:39:52 2003 83cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/Makefile.in Mon Mar 31 11:29:14 2008 84cdf0e10cSrcweir@@ -124,20 +124,20 @@ 85cdf0e10cSrcweir target_vendor = @target_vendor@ 86cdf0e10cSrcweir AUTOMAKE_OPTIONS = 1.4 foreign 87cdf0e10cSrcweir 88cdf0e10cSrcweir-WARNS = -W -Wall -Wshadow -Wpointer-arith 89cdf0e10cSrcweir-IFLAGS = 90cdf0e10cSrcweir-FLAGS = -g -O3 -funroll-loops -D_THREAD_SAFE -D_GNU_SOURCE 91cdf0e10cSrcweir+#WARNS = -W -Wall -Wshadow -Wpointer-arith 92cdf0e10cSrcweir+IFLAGS = 93cdf0e10cSrcweir+#FLAGS = -g -O3 -funroll-loops -D_THREAD_SAFE -D_GNU_SOURCE 94cdf0e10cSrcweir VERBOSE = -DVERBOSE 95cdf0e10cSrcweir AM_CFLAGS = $(IFLAGS) $(VERBOSE) $(WARNS) $(FLAGS) 96cdf0e10cSrcweir AM_LDFLAGS = -g 97cdf0e10cSrcweir 98cdf0e10cSrcweir noinst_HEADERS = \ 99cdf0e10cSrcweir- common.h constants.h fingerprint.h textcat.h wg_mempool.h 100cdf0e10cSrcweir+ common.h constants.h fingerprint.h textcat.h wg_mempool.h utf8misc.h 101cdf0e10cSrcweir 102cdf0e10cSrcweir 103cdf0e10cSrcweir lib_LTLIBRARIES = libtextcat.la 104cdf0e10cSrcweir libtextcat_la_SOURCES = \ 105cdf0e10cSrcweir- common.c fingerprint.c textcat.c wg_mempool.c 106cdf0e10cSrcweir+ common.c fingerprint.c textcat.c wg_mempool.c utf8misc.c 107cdf0e10cSrcweir 108cdf0e10cSrcweir 109cdf0e10cSrcweir bin_PROGRAMS = createfp 110cdf0e10cSrcweir@@ -156,7 +156,7 @@ 111cdf0e10cSrcweir libtextcat_la_LDFLAGS = 112cdf0e10cSrcweir libtextcat_la_LIBADD = 113cdf0e10cSrcweir am_libtextcat_la_OBJECTS = common.lo fingerprint.lo textcat.lo \ 114cdf0e10cSrcweir- wg_mempool.lo 115cdf0e10cSrcweir+ wg_mempool.lo utf8misc.lo 116cdf0e10cSrcweir libtextcat_la_OBJECTS = $(am_libtextcat_la_OBJECTS) 117cdf0e10cSrcweir bin_PROGRAMS = createfp$(EXEEXT) 118cdf0e10cSrcweir noinst_PROGRAMS = testtextcat$(EXEEXT) 119cdf0e10cSrcweir@@ -177,7 +177,8 @@ 120cdf0e10cSrcweir @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/common.Plo ./$(DEPDIR)/createfp.Po \ 121cdf0e10cSrcweir @AMDEP_TRUE@ ./$(DEPDIR)/fingerprint.Plo \ 122cdf0e10cSrcweir @AMDEP_TRUE@ ./$(DEPDIR)/testtextcat.Po ./$(DEPDIR)/textcat.Plo \ 123cdf0e10cSrcweir-@AMDEP_TRUE@ ./$(DEPDIR)/wg_mempool.Plo 124cdf0e10cSrcweir+@AMDEP_TRUE@ ./$(DEPDIR)/wg_mempool.Plo \ 125cdf0e10cSrcweir+@AMDEP_TRUE@ ./$(DEPDIR)/utf8misc.Plo 126cdf0e10cSrcweir COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 127cdf0e10cSrcweir $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 128cdf0e10cSrcweir LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ 129cdf0e10cSrcweir@@ -213,7 +214,7 @@ 130cdf0e10cSrcweir @rm -f stamp-h1 131cdf0e10cSrcweir cd $(top_builddir) && $(SHELL) ./config.status src/config.h 132cdf0e10cSrcweir 133cdf0e10cSrcweir-$(srcdir)/config.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) 134cdf0e10cSrcweir+$(srcdir)/config.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) 135cdf0e10cSrcweir cd $(top_srcdir) && $(AUTOHEADER) 136cdf0e10cSrcweir touch $(srcdir)/config.h.in 137cdf0e10cSrcweir 138cdf0e10cSrcweir@@ -247,8 +248,8 @@ 139cdf0e10cSrcweir echo "rm -f \"$${dir}/so_locations\""; \ 140cdf0e10cSrcweir rm -f "$${dir}/so_locations"; \ 141cdf0e10cSrcweir done 142cdf0e10cSrcweir-libtextcat.la: $(libtextcat_la_OBJECTS) $(libtextcat_la_DEPENDENCIES) 143cdf0e10cSrcweir- $(LINK) -rpath $(libdir) $(libtextcat_la_LDFLAGS) $(libtextcat_la_OBJECTS) $(libtextcat_la_LIBADD) $(LIBS) 144cdf0e10cSrcweir+libtextcat.la: $(libtextcat_la_OBJECTS) $(libtextcat_la_DEPENDENCIES) 145cdf0e10cSrcweir+ $(LINK) -avoid-version -rpath $(libdir) $(libtextcat_la_LDFLAGS) $(libtextcat_la_OBJECTS) $(libtextcat_la_LIBADD) $(LIBS) 146cdf0e10cSrcweir binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 147cdf0e10cSrcweir install-binPROGRAMS: $(bin_PROGRAMS) 148cdf0e10cSrcweir @$(NORMAL_INSTALL) 149cdf0e10cSrcweir@@ -285,10 +286,10 @@ 150cdf0e10cSrcweir echo " rm -f $$p $$f"; \ 151cdf0e10cSrcweir rm -f $$p $$f ; \ 152cdf0e10cSrcweir done 153cdf0e10cSrcweir-createfp$(EXEEXT): $(createfp_OBJECTS) $(createfp_DEPENDENCIES) 154cdf0e10cSrcweir+createfp$(EXEEXT): $(createfp_OBJECTS) $(createfp_DEPENDENCIES) 155cdf0e10cSrcweir @rm -f createfp$(EXEEXT) 156cdf0e10cSrcweir $(LINK) $(createfp_LDFLAGS) $(createfp_OBJECTS) $(createfp_LDADD) $(LIBS) 157cdf0e10cSrcweir-testtextcat$(EXEEXT): $(testtextcat_OBJECTS) $(testtextcat_DEPENDENCIES) 158cdf0e10cSrcweir+testtextcat$(EXEEXT): $(testtextcat_OBJECTS) $(testtextcat_DEPENDENCIES) 159cdf0e10cSrcweir @rm -f testtextcat$(EXEEXT) 160cdf0e10cSrcweir $(LINK) $(testtextcat_LDFLAGS) $(testtextcat_OBJECTS) $(testtextcat_LDADD) $(LIBS) 161cdf0e10cSrcweir 162cdf0e10cSrcweir@@ -304,6 +305,7 @@ 163cdf0e10cSrcweir @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtextcat.Po@am__quote@ 164cdf0e10cSrcweir @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textcat.Plo@am__quote@ 165cdf0e10cSrcweir @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wg_mempool.Plo@am__quote@ 166cdf0e10cSrcweir+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8misc.Plo@am__quote@ 167cdf0e10cSrcweir 168cdf0e10cSrcweir distclean-depend: 169cdf0e10cSrcweir -rm -rf ./$(DEPDIR) 170cdf0e10cSrcweir--- misc/libtextcat-2.2/src/common.c Thu May 22 13:32:43 2003 171cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/common.c Mon Mar 31 11:29:14 2008 172cdf0e10cSrcweir@@ -3,23 +3,23 @@ 173cdf0e10cSrcweir * 174cdf0e10cSrcweir * Copyright (c) 2003, WiseGuys Internet B.V. 175cdf0e10cSrcweir * All rights reserved. 176cdf0e10cSrcweir- * 177cdf0e10cSrcweir+ * 178cdf0e10cSrcweir * Redistribution and use in source and binary forms, with or without 179cdf0e10cSrcweir * modification, are permitted provided that the following conditions 180cdf0e10cSrcweir * are met: 181cdf0e10cSrcweir- * 182cdf0e10cSrcweir+ * 183cdf0e10cSrcweir * - Redistributions of source code must retain the above copyright 184cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer. 185cdf0e10cSrcweir- * 186cdf0e10cSrcweir+ * 187cdf0e10cSrcweir * - Redistributions in binary form must reproduce the above copyright 188cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer in the 189cdf0e10cSrcweir * documentation and/or other materials provided with the 190cdf0e10cSrcweir * distribution. 191cdf0e10cSrcweir- * 192cdf0e10cSrcweir+ * 193cdf0e10cSrcweir * - Neither the name of the WiseGuys Internet B.V. nor the names of 194cdf0e10cSrcweir * its contributors may be used to endorse or promote products derived 195cdf0e10cSrcweir * from this software without specific prior written permission. 196cdf0e10cSrcweir- * 197cdf0e10cSrcweir+ * 198cdf0e10cSrcweir * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 199cdf0e10cSrcweir * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 200cdf0e10cSrcweir * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 201cdf0e10cSrcweir@@ -114,11 +114,11 @@ 202cdf0e10cSrcweir wgmem_error( "Error while strduping %u bytes.\n", strlen(s) ); 203cdf0e10cSrcweir } 204cdf0e10cSrcweir 205cdf0e10cSrcweir- return( result ); 206cdf0e10cSrcweir+ return( result ); 207cdf0e10cSrcweir } 208cdf0e10cSrcweir 209cdf0e10cSrcweir-extern void* wg_realloc( void *ptr, size_t size ) 210cdf0e10cSrcweir-{ 211cdf0e10cSrcweir+extern void* wg_realloc( void *ptr, size_t size ) 212cdf0e10cSrcweir+{ 213cdf0e10cSrcweir void *result; 214cdf0e10cSrcweir 215cdf0e10cSrcweir if (!size) { 216cdf0e10cSrcweir@@ -131,7 +131,7 @@ 217cdf0e10cSrcweir wgmem_error( "Error while reallocing %u bytes.\n", size ); 218cdf0e10cSrcweir } 219cdf0e10cSrcweir 220cdf0e10cSrcweir- return( result ); 221cdf0e10cSrcweir+ return( result ); 222cdf0e10cSrcweir } 223cdf0e10cSrcweir 224cdf0e10cSrcweir extern void wg_free( void *mem ) 225cdf0e10cSrcweir@@ -148,12 +148,12 @@ 226cdf0e10cSrcweir if ( fgets(line, size, fp) == NULL ) { 227cdf0e10cSrcweir return NULL; 228cdf0e10cSrcweir } 229cdf0e10cSrcweir- 230cdf0e10cSrcweir+ 231cdf0e10cSrcweir /** kill term null **/ 232cdf0e10cSrcweir if ( (p = strpbrk( line, "\n\r" )) ) { 233cdf0e10cSrcweir *p = '\0'; 234cdf0e10cSrcweir- } 235cdf0e10cSrcweir- 236cdf0e10cSrcweir+ } 237cdf0e10cSrcweir+ 238cdf0e10cSrcweir return line; 239cdf0e10cSrcweir } 240cdf0e10cSrcweir 241cdf0e10cSrcweir@@ -164,39 +164,39 @@ 242cdf0e10cSrcweir * 243cdf0e10cSrcweir * ARGUMENTS: 244cdf0e10cSrcweir * - result: 245cdf0e10cSrcweir- * 246cdf0e10cSrcweir+ * 247cdf0e10cSrcweir * After the split, this array contains pointers to the start of each 248cdf0e10cSrcweir * detected segment. Must be preallocated and at least as large as 249cdf0e10cSrcweir * maxsegments. The pointers point into the dest buffer. 250cdf0e10cSrcweir- * 251cdf0e10cSrcweir- * - dest: 252cdf0e10cSrcweir- * 253cdf0e10cSrcweir+ * 254cdf0e10cSrcweir+ * - dest: 255cdf0e10cSrcweir+ * 256cdf0e10cSrcweir * String into which result points as an index. Must be preallocated, and 257cdf0e10cSrcweir * at least as big as src. You can use src as dest, but in that case src 258cdf0e10cSrcweir * is overwritten! 259cdf0e10cSrcweir- * 260cdf0e10cSrcweir- * - src: 261cdf0e10cSrcweir- * 262cdf0e10cSrcweir+ * 263cdf0e10cSrcweir+ * - src: 264cdf0e10cSrcweir+ * 265cdf0e10cSrcweir * The string to split. Sequences of whitespace are treated as separators, unless 266cdf0e10cSrcweir * escaped. There are two ways to escape: by using single quotes (anything 267cdf0e10cSrcweir * between single quotes is treated as one segment), or by using a backslash 268cdf0e10cSrcweir * to escape the next character. The backslash escape works inside quotation 269cdf0e10cSrcweir * as well. 270cdf0e10cSrcweir- * 271cdf0e10cSrcweir+ * 272cdf0e10cSrcweir * Example: 273cdf0e10cSrcweir- * 274cdf0e10cSrcweir+ * 275cdf0e10cSrcweir * "It\'s very\ easy 'to use WiseGuys\' wg_split()' function" is split into: 276cdf0e10cSrcweir- * 277cdf0e10cSrcweir+ * 278cdf0e10cSrcweir * "It's" 279cdf0e10cSrcweir * "very easy" 280cdf0e10cSrcweir * "to use WiseGuys' wg_split()" 281cdf0e10cSrcweir * "function" 282cdf0e10cSrcweir- * 283cdf0e10cSrcweir- * - maxsegments: 284cdf0e10cSrcweir- * 285cdf0e10cSrcweir+ * 286cdf0e10cSrcweir+ * - maxsegments: 287cdf0e10cSrcweir+ * 288cdf0e10cSrcweir * The maximum number of segments. If the splitter runs out of segments, 289cdf0e10cSrcweir * the remainder of the string is stored in the last segment. 290cdf0e10cSrcweir- * 291cdf0e10cSrcweir+ * 292cdf0e10cSrcweir * RETURN VALUE: 293cdf0e10cSrcweir * The number of segments found. 294cdf0e10cSrcweir */ 295cdf0e10cSrcweir@@ -218,12 +218,12 @@ 296cdf0e10cSrcweir switch (state) { 297cdf0e10cSrcweir case 0: 298cdf0e10cSrcweir /*** Skip spaces ***/ 299cdf0e10cSrcweir- while ( isspace((int) *p) ) { 300cdf0e10cSrcweir+ while ( isspace((unsigned char) *p) ) { 301cdf0e10cSrcweir p++; 302cdf0e10cSrcweir } 303cdf0e10cSrcweir state = 1; 304cdf0e10cSrcweir 305cdf0e10cSrcweir- case 1: 306cdf0e10cSrcweir+ case 1: 307cdf0e10cSrcweir /*** Start segment ***/ 308cdf0e10cSrcweir result[cnt] = w; 309cdf0e10cSrcweir cnt++; 310cdf0e10cSrcweir@@ -232,12 +232,12 @@ 311cdf0e10cSrcweir case 2: 312cdf0e10cSrcweir /*** Unquoted segment ***/ 313cdf0e10cSrcweir while (*p) { 314cdf0e10cSrcweir- if ( isspace((int) *p) ) { 315cdf0e10cSrcweir+ if ( isspace((unsigned char) *p) ) { 316cdf0e10cSrcweir *w++ = '\0'; 317cdf0e10cSrcweir p++; 318cdf0e10cSrcweir state = 0; 319cdf0e10cSrcweir break; 320cdf0e10cSrcweir- } 321cdf0e10cSrcweir+ } 322cdf0e10cSrcweir else if ( *p == '\'' ) { 323cdf0e10cSrcweir /*** Start quotation ***/ 324cdf0e10cSrcweir p++; 325cdf0e10cSrcweir@@ -292,17 +292,17 @@ 326cdf0e10cSrcweir } 327cdf0e10cSrcweir 328cdf0e10cSrcweir 329cdf0e10cSrcweir+#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */ 330cdf0e10cSrcweir extern void wg_timerstart(wgtimer_t *t) 331cdf0e10cSrcweir { 332cdf0e10cSrcweir-#ifdef HAVE_GETTIMEOFDAY 333cdf0e10cSrcweir gettimeofday( &(t->start), NULL ); 334cdf0e10cSrcweir-#endif 335cdf0e10cSrcweir } 336cdf0e10cSrcweir+#endif /* TL : no struct timeval under Win32 */ 337cdf0e10cSrcweir 338cdf0e10cSrcweir 339cdf0e10cSrcweir+#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */ 340cdf0e10cSrcweir extern uint4 wg_timerstop(wgtimer_t *t) 341cdf0e10cSrcweir { 342cdf0e10cSrcweir-#ifdef HAVE_GETTIMEOFDAY 343cdf0e10cSrcweir uint4 result; 344cdf0e10cSrcweir gettimeofday( &(t->stop), NULL ); 345cdf0e10cSrcweir result = (t->stop.tv_sec - t->start.tv_sec) * 1000000 + 346cdf0e10cSrcweir@@ -312,25 +312,23 @@ 347cdf0e10cSrcweir t->start.tv_usec = t->stop.tv_usec; 348cdf0e10cSrcweir 349cdf0e10cSrcweir return result; 350cdf0e10cSrcweir-#else 351cdf0e10cSrcweir- return 0; 352cdf0e10cSrcweir-#endif 353cdf0e10cSrcweir } 354cdf0e10cSrcweir+#endif /* TL : no struct timeval under Win32 */ 355cdf0e10cSrcweir 356cdf0e10cSrcweir 357cdf0e10cSrcweir /** 358cdf0e10cSrcweir * wg_strgmov -- a guarded strcpy() variation 359cdf0e10cSrcweir- * 360cdf0e10cSrcweir+ * 361cdf0e10cSrcweir * copies src to dest (including terminating zero), and returns 362cdf0e10cSrcweir * pointer to position of terminating zero in dest. The function is 363cdf0e10cSrcweir * guaranteed not to write past destlimit. If the copy couldn't be 364cdf0e10cSrcweir- * finished, the function returns NULL after restoring the first 365cdf0e10cSrcweir- * character in dest for your convenience (since this is usually a zero). 366cdf0e10cSrcweir+ * finished, the function returns NULL after restoring the first 367cdf0e10cSrcweir+ * character in dest for your convenience (since this is usually a zero). 368cdf0e10cSrcweir */ 369cdf0e10cSrcweir char *wg_strgmov( char *dest, const char *src, const char *destlimit ) 370cdf0e10cSrcweir { 371cdf0e10cSrcweir char tmp, *w; 372cdf0e10cSrcweir- 373cdf0e10cSrcweir+ 374cdf0e10cSrcweir if ( !dest || dest >= destlimit ) { 375cdf0e10cSrcweir return NULL; 376cdf0e10cSrcweir } 377cdf0e10cSrcweir@@ -355,7 +353,7 @@ 378cdf0e10cSrcweir } 379cdf0e10cSrcweir 380cdf0e10cSrcweir /* 381cdf0e10cSrcweir- * wg_trim() -- remove whitespace surrounding a string. 382cdf0e10cSrcweir+ * wg_trim() -- remove whitespace surrounding a string. 383cdf0e10cSrcweir * 384cdf0e10cSrcweir * Example: " bla bla bla " becomes "bla bla bla" after trimming. 385cdf0e10cSrcweir * 386cdf0e10cSrcweir@@ -373,12 +371,12 @@ 387cdf0e10cSrcweir char *lastnonspace = &dest[-1]; 388cdf0e10cSrcweir const char *p = src; 389cdf0e10cSrcweir char *w = dest; 390cdf0e10cSrcweir- 391cdf0e10cSrcweir- while ( isspace((int)*p) ) { 392cdf0e10cSrcweir+ 393cdf0e10cSrcweir+ while ( isspace((unsigned char)*p) ) { 394cdf0e10cSrcweir p++; 395cdf0e10cSrcweir } 396cdf0e10cSrcweir while (*p) { 397cdf0e10cSrcweir- if ( !isspace((int)*p) ) { 398cdf0e10cSrcweir+ if ( !isspace((unsigned char)*p) ) { 399cdf0e10cSrcweir lastnonspace = w; 400cdf0e10cSrcweir } 401cdf0e10cSrcweir *w++ = *p++; 402cdf0e10cSrcweir--- misc/libtextcat-2.2/src/common.h Thu May 22 15:02:29 2003 403cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/common.h Mon Mar 31 11:29:14 2008 404cdf0e10cSrcweir@@ -1,28 +1,28 @@ 405cdf0e10cSrcweir #ifndef _COMMON_H_ 406cdf0e10cSrcweir #define _COMMON_H_ 407cdf0e10cSrcweir /** 408cdf0e10cSrcweir- * common.h -- a mixed bag of helper functions 409cdf0e10cSrcweir+ * common.h -- a mixed bag of helper functions 410cdf0e10cSrcweir * 411cdf0e10cSrcweir * Copyright (C) 2003 WiseGuys Internet B.V. 412cdf0e10cSrcweir * 413cdf0e10cSrcweir * THE BSD LICENSE 414cdf0e10cSrcweir- * 415cdf0e10cSrcweir+ * 416cdf0e10cSrcweir * Redistribution and use in source and binary forms, with or without 417cdf0e10cSrcweir * modification, are permitted provided that the following conditions 418cdf0e10cSrcweir * are met: 419cdf0e10cSrcweir- * 420cdf0e10cSrcweir+ * 421cdf0e10cSrcweir * - Redistributions of source code must retain the above copyright 422cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer. 423cdf0e10cSrcweir- * 424cdf0e10cSrcweir+ * 425cdf0e10cSrcweir * - Redistributions in binary form must reproduce the above copyright 426cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer in the 427cdf0e10cSrcweir * documentation and/or other materials provided with the 428cdf0e10cSrcweir * distribution. 429cdf0e10cSrcweir- * 430cdf0e10cSrcweir+ * 431cdf0e10cSrcweir * - Neither the name of the WiseGuys Internet B.V. nor the names of 432cdf0e10cSrcweir * its contributors may be used to endorse or promote products derived 433cdf0e10cSrcweir * from this software without specific prior written permission. 434cdf0e10cSrcweir- * 435cdf0e10cSrcweir+ * 436cdf0e10cSrcweir * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 437cdf0e10cSrcweir * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 438cdf0e10cSrcweir * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 439cdf0e10cSrcweir@@ -86,10 +86,12 @@ 440cdf0e10cSrcweir typedef char boole; 441cdf0e10cSrcweir #endif 442cdf0e10cSrcweir 443cdf0e10cSrcweir+#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */ 444cdf0e10cSrcweir typedef struct wgtimer_s { 445cdf0e10cSrcweir struct timeval start; 446cdf0e10cSrcweir struct timeval stop; 447cdf0e10cSrcweir } wgtimer_t; 448cdf0e10cSrcweir+#endif /* TL : no struct timeval under Win32 */ 449cdf0e10cSrcweir 450cdf0e10cSrcweir 451cdf0e10cSrcweir extern void *wg_malloc( size_t size ); 452cdf0e10cSrcweir@@ -101,13 +103,15 @@ 453cdf0e10cSrcweir 454cdf0e10cSrcweir extern char *wg_getline( char *line, int size, FILE *fp ); 455cdf0e10cSrcweir 456cdf0e10cSrcweir+#ifdef HAVE_GETTIMEOFDAY /* TL : no struct timeval under Win32 */ 457cdf0e10cSrcweir extern void wg_timerstart(wgtimer_t *t); 458cdf0e10cSrcweir extern uint4 wg_timerstop(wgtimer_t *t); 459cdf0e10cSrcweir+#endif /* TL : no struct timeval under Win32 */ 460cdf0e10cSrcweir 461cdf0e10cSrcweir extern unsigned int wg_split( char **result, char *dest, char *src, int maxsegments ); 462cdf0e10cSrcweir extern char *wg_strgmov( char *dest, const char *src, const char *destlimit ); 463cdf0e10cSrcweir extern char *wg_trim( char *dest, const char *src ); 464cdf0e10cSrcweir 465cdf0e10cSrcweir- 466cdf0e10cSrcweir+ 467cdf0e10cSrcweir #endif 468cdf0e10cSrcweir 469cdf0e10cSrcweir--- misc/libtextcat-2.2/src/constants.h Thu May 22 13:32:43 2003 470cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/constants.h Mon Mar 31 11:29:14 2008 471cdf0e10cSrcweir@@ -39,6 +39,8 @@ 472cdf0e10cSrcweir */ 473cdf0e10cSrcweir #include <limits.h> 474cdf0e10cSrcweir 475cdf0e10cSrcweir+#define _UTF8_ 476cdf0e10cSrcweir+ 477cdf0e10cSrcweir #define DESCRIPTION "out of place" 478cdf0e10cSrcweir 479cdf0e10cSrcweir /* Reported matches are those fingerprints with a score less than best 480cdf0e10cSrcweir@@ -59,14 +61,21 @@ 481cdf0e10cSrcweir /* Maximum number of n-grams in a fingerprint */ 482cdf0e10cSrcweir #define MAXNGRAMS 400 483cdf0e10cSrcweir 484cdf0e10cSrcweir-/* Maximum size of an n-gram? */ 485cdf0e10cSrcweir-#define MAXNGRAMSIZE 5 486cdf0e10cSrcweir+/* Maximum number of character of an n-gram? */ 487cdf0e10cSrcweir+#define MAXNGRAMSYMBOL 5 488cdf0e10cSrcweir+ 489cdf0e10cSrcweir+/* Maximum size of the string representing an n-gram (must be greater than number of symbol) */ 490cdf0e10cSrcweir+#ifdef _UTF8_ 491cdf0e10cSrcweir+#define MAXNGRAMSIZE 20 492cdf0e10cSrcweir+#else 493cdf0e10cSrcweir+#define MAXNGRAMSIZE MAXNGRAMSYMBOL 494cdf0e10cSrcweir+#endif 495cdf0e10cSrcweir 496cdf0e10cSrcweir /* Which characters are not acceptable in n-grams? */ 497cdf0e10cSrcweir-#define INVALID(c) (isspace((int)c) || isdigit((int)c)) 498cdf0e10cSrcweir+#define INVALID(c) (isspace((unsigned char)c) || isdigit((unsigned char)c)) 499cdf0e10cSrcweir 500cdf0e10cSrcweir /* Minimum size (in characters) for accepting a document */ 501cdf0e10cSrcweir-#define MINDOCSIZE 25 502cdf0e10cSrcweir+#define MINDOCSIZE 6 503cdf0e10cSrcweir 504cdf0e10cSrcweir /* Maximum penalty for missing an n-gram in fingerprint */ 505cdf0e10cSrcweir #define MAXOUTOFPLACE 400 506cdf0e10cSrcweir@@ -75,5 +84,8 @@ 507cdf0e10cSrcweir #define TABLEPOW 13 508cdf0e10cSrcweir 509cdf0e10cSrcweir #define MAXSCORE INT_MAX 510cdf0e10cSrcweir+ 511cdf0e10cSrcweir+/* where the fingerprints files are stored */ 512cdf0e10cSrcweir+#define DEFAULT_FINGERPRINTS_PATH "" 513cdf0e10cSrcweir 514cdf0e10cSrcweir #endif 515cdf0e10cSrcweir--- misc/libtextcat-2.2/src/fingerprint.c Thu May 22 13:32:43 2003 516cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/fingerprint.c Mon Mar 31 11:29:14 2008 517cdf0e10cSrcweir@@ -6,23 +6,23 @@ 518cdf0e10cSrcweir * All rights reserved. 519cdf0e10cSrcweir * 520cdf0e10cSrcweir * THE BSD LICENSE 521cdf0e10cSrcweir- * 522cdf0e10cSrcweir+ * 523cdf0e10cSrcweir * Redistribution and use in source and binary forms, with or without 524cdf0e10cSrcweir * modification, are permitted provided that the following conditions 525cdf0e10cSrcweir * are met: 526cdf0e10cSrcweir- * 527cdf0e10cSrcweir+ * 528cdf0e10cSrcweir * - Redistributions of source code must retain the above copyright 529cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer. 530cdf0e10cSrcweir- * 531cdf0e10cSrcweir+ * 532cdf0e10cSrcweir * - Redistributions in binary form must reproduce the above copyright 533cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer in the 534cdf0e10cSrcweir * documentation and/or other materials provided with the 535cdf0e10cSrcweir * distribution. 536cdf0e10cSrcweir- * 537cdf0e10cSrcweir+ * 538cdf0e10cSrcweir * - Neither the name of the WiseGuys Internet B.V. nor the names of 539cdf0e10cSrcweir * its contributors may be used to endorse or promote products derived 540cdf0e10cSrcweir * from this software without specific prior written permission. 541cdf0e10cSrcweir- * 542cdf0e10cSrcweir+ * 543cdf0e10cSrcweir * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 544cdf0e10cSrcweir * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 545cdf0e10cSrcweir * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 546cdf0e10cSrcweir@@ -51,7 +51,7 @@ 547cdf0e10cSrcweir * The reason why we go through the trouble of doing a partial 548cdf0e10cSrcweir * (heap)sort is that a full quicksort behaves horribly on the data: 549cdf0e10cSrcweir * most n-grams have a very low count, resulting in a data set in 550cdf0e10cSrcweir- * nearly-sorted order. This causes quicksort to behave very badly. 551cdf0e10cSrcweir+ * nearly-sorted order. This causes quicksort to behave very badly. 552cdf0e10cSrcweir * Heapsort, on the other hand, behaves handsomely: worst case is 553cdf0e10cSrcweir * Mlog(N) for M n-grams filtered through a N-sized heap. 554cdf0e10cSrcweir * 555cdf0e10cSrcweir@@ -63,6 +63,10 @@ 556cdf0e10cSrcweir * - put table/heap datastructure in a separate file. 557cdf0e10cSrcweir */ 558cdf0e10cSrcweir 559cdf0e10cSrcweir+#ifndef _UTF8_ 560cdf0e10cSrcweir+#define _UTF8_ 561cdf0e10cSrcweir+#endif 562cdf0e10cSrcweir+ 563cdf0e10cSrcweir #include "config.h" 564cdf0e10cSrcweir #include <stdio.h> 565cdf0e10cSrcweir #ifdef HAVE_STDLIB_H 566cdf0e10cSrcweir@@ -80,10 +84,12 @@ 567cdf0e10cSrcweir #include "wg_mempool.h" 568cdf0e10cSrcweir #include "constants.h" 569cdf0e10cSrcweir 570cdf0e10cSrcweir+#include "utf8misc.h" 571cdf0e10cSrcweir 572cdf0e10cSrcweir #define TABLESIZE (1<<TABLEPOW) 573cdf0e10cSrcweir #define TABLEMASK ((TABLESIZE)-1) 574cdf0e10cSrcweir 575cdf0e10cSrcweir+ 576cdf0e10cSrcweir typedef struct { 577cdf0e10cSrcweir 578cdf0e10cSrcweir sint2 rank; 579cdf0e10cSrcweir@@ -96,7 +102,7 @@ 580cdf0e10cSrcweir const char *name; 581cdf0e10cSrcweir ngram_t *fprint; 582cdf0e10cSrcweir uint4 size; 583cdf0e10cSrcweir- 584cdf0e10cSrcweir+ 585cdf0e10cSrcweir } fp_t; 586cdf0e10cSrcweir 587cdf0e10cSrcweir typedef struct entry_s { 588cdf0e10cSrcweir@@ -105,13 +111,13 @@ 589cdf0e10cSrcweir struct entry_s *next; 590cdf0e10cSrcweir } entry_t; 591cdf0e10cSrcweir 592cdf0e10cSrcweir-typedef struct table_s { 593cdf0e10cSrcweir+typedef struct table_s { 594cdf0e10cSrcweir void *pool; 595cdf0e10cSrcweir entry_t **table; 596cdf0e10cSrcweir entry_t *heap; 597cdf0e10cSrcweir 598cdf0e10cSrcweir struct table_s *next; 599cdf0e10cSrcweir- 600cdf0e10cSrcweir+ 601cdf0e10cSrcweir uint4 heapsize; 602cdf0e10cSrcweir uint4 size; 603cdf0e10cSrcweir } table_t; 604cdf0e10cSrcweir@@ -122,7 +128,7 @@ 605cdf0e10cSrcweir * fast and furious little hash function 606cdf0e10cSrcweir * 607cdf0e10cSrcweir * (Note that we could use some kind of rolling checksum, and update it 608cdf0e10cSrcweir- * during n-gram construction) 609cdf0e10cSrcweir+ * during n-gram construction) 610cdf0e10cSrcweir */ 611cdf0e10cSrcweir static uint4 simplehash( const char *p, int len ) 612cdf0e10cSrcweir { 613cdf0e10cSrcweir@@ -134,29 +140,14 @@ 614cdf0e10cSrcweir } 615cdf0e10cSrcweir 616cdf0e10cSrcweir 617cdf0e10cSrcweir-/* checks if n-gram lex is a prefix of key and of length len */ 618cdf0e10cSrcweir-inline int issame( char *lex, char *key, int len ) 619cdf0e10cSrcweir-{ 620cdf0e10cSrcweir- int i; 621cdf0e10cSrcweir- for (i=0; i<len; i++) { 622cdf0e10cSrcweir- if ( key[i] != lex[i] ) { 623cdf0e10cSrcweir- return 0; 624cdf0e10cSrcweir- } 625cdf0e10cSrcweir- } 626cdf0e10cSrcweir- if ( lex[i] != 0 ) { 627cdf0e10cSrcweir- return 0; 628cdf0e10cSrcweir- } 629cdf0e10cSrcweir- return 1; 630cdf0e10cSrcweir-} 631cdf0e10cSrcweir- 632cdf0e10cSrcweir 633cdf0e10cSrcweir /* increases frequency of ngram(p,len) */ 634cdf0e10cSrcweir-static inline int increasefreq( table_t *t, char *p, int len ) 635cdf0e10cSrcweir-{ 636cdf0e10cSrcweir- uint4 hash = simplehash( p, len ) & TABLEMASK; 637cdf0e10cSrcweir+static int increasefreq( table_t *t, char *p, int len ) 638cdf0e10cSrcweir+{ 639cdf0e10cSrcweir+ uint4 hash = simplehash( p, len ) & TABLEMASK; 640cdf0e10cSrcweir entry_t *entry = t->table[ hash ]; 641cdf0e10cSrcweir- 642cdf0e10cSrcweir- while ( entry ) { 643cdf0e10cSrcweir+ 644cdf0e10cSrcweir+ while ( entry ) { 645cdf0e10cSrcweir if ( issame( entry->str, p, len ) ) { 646cdf0e10cSrcweir /*** Found it! ***/ 647cdf0e10cSrcweir entry->cnt++; 648cdf0e10cSrcweir@@ -168,7 +159,7 @@ 649cdf0e10cSrcweir } 650cdf0e10cSrcweir 651cdf0e10cSrcweir /*** Not found, so create ***/ 652cdf0e10cSrcweir- entry = wgmempool_alloc( t->pool, sizeof(entry_t) ); 653cdf0e10cSrcweir+ entry = (entry_t*)(wgmempool_alloc( t->pool, sizeof(entry_t) )); 654cdf0e10cSrcweir strcpy( entry->str, p ); 655cdf0e10cSrcweir entry->cnt = 1; 656cdf0e10cSrcweir 657cdf0e10cSrcweir@@ -181,12 +172,12 @@ 658cdf0e10cSrcweir #if 0 659cdf0e10cSrcweir 660cdf0e10cSrcweir /* looks up ngram(p,len) */ 661cdf0e10cSrcweir-static entry_t *findfreq( table_t *t, char *p, int len ) 662cdf0e10cSrcweir-{ 663cdf0e10cSrcweir- uint4 hash = simplehash( p, len ) & TABLEMASK; 664cdf0e10cSrcweir+static entry_t *findfreq( table_t *t, char *p, int len ) 665cdf0e10cSrcweir+{ 666cdf0e10cSrcweir+ uint4 hash = simplehash( p, len ) & TABLEMASK; 667cdf0e10cSrcweir entry_t *entry = t->table[ hash ]; 668cdf0e10cSrcweir- 669cdf0e10cSrcweir- while ( entry ) { 670cdf0e10cSrcweir+ 671cdf0e10cSrcweir+ while ( entry ) { 672cdf0e10cSrcweir if ( issame( entry->str, p, len ) ) { 673cdf0e10cSrcweir return entry; 674cdf0e10cSrcweir } 675cdf0e10cSrcweir@@ -219,7 +210,7 @@ 676cdf0e10cSrcweir #define GREATER(x,y) ((x).cnt > (y).cnt) 677cdf0e10cSrcweir #define LESS(x,y) ((x).cnt < (y).cnt) 678cdf0e10cSrcweir 679cdf0e10cSrcweir-inline static void siftup( table_t *t, unsigned int child ) 680cdf0e10cSrcweir+static void siftup( table_t *t, unsigned int child ) 681cdf0e10cSrcweir { 682cdf0e10cSrcweir entry_t *heap = t->heap; 683cdf0e10cSrcweir unsigned int parent = (child-1) >> 1; 684cdf0e10cSrcweir@@ -241,7 +232,7 @@ 685cdf0e10cSrcweir } 686cdf0e10cSrcweir 687cdf0e10cSrcweir 688cdf0e10cSrcweir-inline static void siftdown( table_t *t, unsigned int heapsize, uint4 parent ) 689cdf0e10cSrcweir+static void siftdown( table_t *t, unsigned int heapsize, uint4 parent ) 690cdf0e10cSrcweir { 691cdf0e10cSrcweir entry_t *heap = t->heap; 692cdf0e10cSrcweir unsigned int child = parent*2 + 1; 693cdf0e10cSrcweir@@ -273,7 +264,7 @@ 694cdf0e10cSrcweir if (t->size < t->heapsize) { 695cdf0e10cSrcweir memcpy( &(heap[t->size]), item, sizeof(entry_t)); 696cdf0e10cSrcweir siftup( t, t->size ); 697cdf0e10cSrcweir- t->size++; 698cdf0e10cSrcweir+ t->size++; 699cdf0e10cSrcweir return 0; 700cdf0e10cSrcweir } 701cdf0e10cSrcweir 702cdf0e10cSrcweir@@ -316,18 +307,18 @@ 703cdf0e10cSrcweir 704cdf0e10cSrcweir /*** Fill result heap ***/ 705cdf0e10cSrcweir for (i=0; i<TABLESIZE; i++) { 706cdf0e10cSrcweir- entry_t *p = t->table[i]; 707cdf0e10cSrcweir+ entry_t *p = t->table[i]; 708cdf0e10cSrcweir while (p) { 709cdf0e10cSrcweir heapinsert(t, p); 710cdf0e10cSrcweir p = p->next; 711cdf0e10cSrcweir } 712cdf0e10cSrcweir- } 713cdf0e10cSrcweir+ } 714cdf0e10cSrcweir return 1; 715cdf0e10cSrcweir } 716cdf0e10cSrcweir 717cdf0e10cSrcweir 718cdf0e10cSrcweir static table_t *inittable(uint4 maxngrams) 719cdf0e10cSrcweir-{ 720cdf0e10cSrcweir+{ 721cdf0e10cSrcweir table_t *result = (table_t *)wg_zalloc( sizeof(table_t) ); 722cdf0e10cSrcweir result->table = (entry_t **)wg_zalloc( sizeof(entry_t*) * TABLESIZE ); 723cdf0e10cSrcweir result->pool = wgmempool_Init( 10000, 10 ); 724cdf0e10cSrcweir@@ -347,14 +338,14 @@ 725cdf0e10cSrcweir wgmempool_Done(t->pool); 726cdf0e10cSrcweir wg_free(t->table); 727cdf0e10cSrcweir wg_free(t->heap); 728cdf0e10cSrcweir- wg_free(t); 729cdf0e10cSrcweir+ wg_free(t); 730cdf0e10cSrcweir } 731cdf0e10cSrcweir 732cdf0e10cSrcweir 733cdf0e10cSrcweir extern void *fp_Init(const char *name) 734cdf0e10cSrcweir { 735cdf0e10cSrcweir fp_t *h = (fp_t *)wg_zalloc( sizeof(fp_t) ); 736cdf0e10cSrcweir- 737cdf0e10cSrcweir+ 738cdf0e10cSrcweir if ( name ) { 739cdf0e10cSrcweir h->name = wg_strdup(name); 740cdf0e10cSrcweir } 741cdf0e10cSrcweir@@ -458,21 +449,27 @@ 742cdf0e10cSrcweir return dest; 743cdf0e10cSrcweir } 744cdf0e10cSrcweir 745cdf0e10cSrcweir- 746cdf0e10cSrcweir+/** 747cdf0e10cSrcweir+* this function extract all n-gram from past buffer and put them into the table "t" 748cdf0e10cSrcweir+* [modified] by Jocelyn Merand to accept utf-8 multi-character symbols to be used in OpenOffice 749cdf0e10cSrcweir+*/ 750cdf0e10cSrcweir static void createngramtable( table_t *t, const char *buf ) 751cdf0e10cSrcweir { 752cdf0e10cSrcweir char n[MAXNGRAMSIZE+1]; 753cdf0e10cSrcweir const char *p = buf; 754cdf0e10cSrcweir int i; 755cdf0e10cSrcweir+ int pointer = 0; 756cdf0e10cSrcweir 757cdf0e10cSrcweir /*** Get all n-grams where 1<=n<=MAXNGRAMSIZE. Allow underscores only at borders. ***/ 758cdf0e10cSrcweir- for (;;p++) { 759cdf0e10cSrcweir+ while(1) { 760cdf0e10cSrcweir 761cdf0e10cSrcweir- const char *q = p; 762a893be29SPedro Giffuni+ const char *q = &p[pointer]; /*[modified] previously p++ above (for(;;p++)) now, it's pointer which is increased so we have to get the new pointer on the buffer*/ 763cdf0e10cSrcweir char *m = n; 764cdf0e10cSrcweir 765cdf0e10cSrcweir /*** First char may be an underscore ***/ 766cdf0e10cSrcweir- *m++ = *q++; 767cdf0e10cSrcweir+ int decay = charcopy(q, m); /*[modified] previously *q++ = *m++*/ 768cdf0e10cSrcweir+ q = &(p[pointer+decay]); /*[modified] the old copying method do not manage multi-character symbols*/ 769cdf0e10cSrcweir+ m += decay; /*[modified]*/ 770cdf0e10cSrcweir *m = '\0'; 771cdf0e10cSrcweir 772cdf0e10cSrcweir increasefreq( t, n, 1 ); 773cdf0e10cSrcweir@@ -482,19 +479,22 @@ 774cdf0e10cSrcweir } 775cdf0e10cSrcweir 776cdf0e10cSrcweir /*** Let the compiler unroll this ***/ 777cdf0e10cSrcweir- for ( i=2; i<=MAXNGRAMSIZE; i++) { 778cdf0e10cSrcweir+ for ( i=2; i<=MAXNGRAMSYMBOL; i++) { 779cdf0e10cSrcweir 780cdf0e10cSrcweir- *m++ = *q; 781cdf0e10cSrcweir+ decay = charcopy(q, m); /*[modified] like above*/ 782cdf0e10cSrcweir+ m += decay; 783cdf0e10cSrcweir *m = '\0'; 784cdf0e10cSrcweir 785cdf0e10cSrcweir increasefreq( t, n, i ); 786cdf0e10cSrcweir 787cdf0e10cSrcweir if ( *q == '_' ) break; 788cdf0e10cSrcweir- q++; 789cdf0e10cSrcweir+ q += decay; 790cdf0e10cSrcweir if ( *q == '\0' ) { 791cdf0e10cSrcweir return; 792cdf0e10cSrcweir } 793cdf0e10cSrcweir } 794cdf0e10cSrcweir+ 795a893be29SPedro Giffuni+ pointer = nextcharstart(p,pointer); /*[modified] p[pointer] must point on the next start of symbol, but with utf next start is not surely next char*/ 796cdf0e10cSrcweir } 797cdf0e10cSrcweir return; 798cdf0e10cSrcweir } 799cdf0e10cSrcweir@@ -514,7 +514,7 @@ 800cdf0e10cSrcweir { 801cdf0e10cSrcweir ngram_t *x = (ngram_t *)a; 802cdf0e10cSrcweir ngram_t *y = (ngram_t *)b; 803cdf0e10cSrcweir- 804cdf0e10cSrcweir+ 805cdf0e10cSrcweir return mystrcmp( x->str, y->str ); 806cdf0e10cSrcweir } 807cdf0e10cSrcweir 808cdf0e10cSrcweir@@ -522,12 +522,12 @@ 809cdf0e10cSrcweir { 810cdf0e10cSrcweir ngram_t *x = (ngram_t *)a; 811cdf0e10cSrcweir ngram_t *y = (ngram_t *)b; 812cdf0e10cSrcweir- 813cdf0e10cSrcweir+ 814cdf0e10cSrcweir return x->rank - y->rank; 815cdf0e10cSrcweir } 816cdf0e10cSrcweir 817cdf0e10cSrcweir /** 818cdf0e10cSrcweir- * Create a fingerprint: 819cdf0e10cSrcweir+ * Create a fingerprint: 820cdf0e10cSrcweir * - record the frequency of each unique n-gram in a hash table 821cdf0e10cSrcweir * - take the most frequent n-grams 822cdf0e10cSrcweir * - sort them alphabetically, recording their relative rank 823cdf0e10cSrcweir@@ -544,20 +544,21 @@ 824cdf0e10cSrcweir } 825cdf0e10cSrcweir 826cdf0e10cSrcweir /*** Throw out all invalid chars ***/ 827cdf0e10cSrcweir- tmp = prepbuffer( buffer, bufsize ); 828cdf0e10cSrcweir+ tmp = prepbuffer( buffer, bufsize ); 829cdf0e10cSrcweir+ /*printf("Cleaned buffer : %s\n",tmp);*/ 830cdf0e10cSrcweir if ( tmp == NULL ) { 831cdf0e10cSrcweir return 0; 832cdf0e10cSrcweir } 833cdf0e10cSrcweir- 834cdf0e10cSrcweir h = (fp_t*)handle; 835cdf0e10cSrcweir t = inittable(maxngrams); 836cdf0e10cSrcweir+ /*printf("Table initialized\n");*/ 837cdf0e10cSrcweir 838cdf0e10cSrcweir /*** Create a hash table containing n-gram counts ***/ 839cdf0e10cSrcweir createngramtable(t, tmp); 840cdf0e10cSrcweir- 841cdf0e10cSrcweir+ /*printf("Table created\n");*/ 842cdf0e10cSrcweir /*** Take the top N n-grams and add them to the profile ***/ 843cdf0e10cSrcweir- table2heap(t); 844cdf0e10cSrcweir- maxngrams = WGMIN( maxngrams, t->size ); 845cdf0e10cSrcweir+ table2heap(t); 846cdf0e10cSrcweir+ maxngrams = WGMIN( maxngrams, t->size ); 847cdf0e10cSrcweir 848cdf0e10cSrcweir h->fprint = (ngram_t *)wg_malloc( sizeof(ngram_t) * maxngrams ); 849cdf0e10cSrcweir h->size = maxngrams; 850cdf0e10cSrcweir@@ -568,7 +569,7 @@ 851cdf0e10cSrcweir entry_t tmp2; 852cdf0e10cSrcweir 853cdf0e10cSrcweir heapextract(t, &tmp2); 854cdf0e10cSrcweir- 855cdf0e10cSrcweir+ 856cdf0e10cSrcweir /*** the string and its rank is all we need ***/ 857cdf0e10cSrcweir strcpy( h->fprint[i].str, tmp2.str ); 858cdf0e10cSrcweir h->fprint[i].rank = i; 859cdf0e10cSrcweir@@ -578,7 +579,7 @@ 860cdf0e10cSrcweir wg_free(tmp); 861cdf0e10cSrcweir 862cdf0e10cSrcweir /*** Sort n-grams alphabetically, for easy comparison ***/ 863cdf0e10cSrcweir- qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str ); 864cdf0e10cSrcweir+ qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str ); 865cdf0e10cSrcweir return 1; 866cdf0e10cSrcweir } 867cdf0e10cSrcweir 868cdf0e10cSrcweir@@ -608,7 +609,7 @@ 869cdf0e10cSrcweir #endif 870cdf0e10cSrcweir return 0; 871cdf0e10cSrcweir } 872cdf0e10cSrcweir- 873cdf0e10cSrcweir+ 874cdf0e10cSrcweir h->fprint = (ngram_t *)wg_malloc(maxngrams * sizeof(ngram_t)); 875cdf0e10cSrcweir 876cdf0e10cSrcweir while (cnt < maxngrams && wg_getline(line,1024,fp)) { 877cdf0e10cSrcweir@@ -635,7 +636,7 @@ 878cdf0e10cSrcweir h->size = cnt; 879cdf0e10cSrcweir 880cdf0e10cSrcweir /*** Sort n-grams, for easy comparison later on ***/ 881cdf0e10cSrcweir- qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str ); 882cdf0e10cSrcweir+ qsort( h->fprint, h->size, sizeof(ngram_t), ngramcmp_str ); 883cdf0e10cSrcweir 884cdf0e10cSrcweir fclose(fp); 885cdf0e10cSrcweir 886cdf0e10cSrcweir@@ -648,14 +649,15 @@ 887cdf0e10cSrcweir { 888cdf0e10cSrcweir uint4 i; 889cdf0e10cSrcweir fp_t *h = (fp_t *)handle; 890cdf0e10cSrcweir- ngram_t *tmp = wg_malloc( sizeof(ngram_t) * h->size ); 891cdf0e10cSrcweir- 892cdf0e10cSrcweir+ ngram_t *tmp = (ngram_t*)wg_malloc( sizeof(ngram_t) * h->size ); 893cdf0e10cSrcweir+ 894cdf0e10cSrcweir /*** Make a temporary and sort it on rank ***/ 895cdf0e10cSrcweir memcpy( tmp, h->fprint, h->size * sizeof(ngram_t) ); 896cdf0e10cSrcweir- qsort( tmp, h->size, sizeof(ngram_t), ngramcmp_rank ); 897cdf0e10cSrcweir+ qsort( tmp, h->size, sizeof(ngram_t), ngramcmp_rank ); 898cdf0e10cSrcweir 899cdf0e10cSrcweir for (i=0; i<h->size; i++) { 900cdf0e10cSrcweir- fprintf( fp, "%s\n", tmp[i].str ); 901cdf0e10cSrcweir+ /*fprintf( fp, "%s\t%i\n", tmp[i].str, tmp[i].rank );*/ 902cdf0e10cSrcweir+ fprintf( fp, "%s\n", tmp[i].str); 903cdf0e10cSrcweir } 904cdf0e10cSrcweir wg_free( tmp ); 905cdf0e10cSrcweir } 906cdf0e10cSrcweir@@ -669,7 +671,7 @@ 907cdf0e10cSrcweir uint4 i = 0; 908cdf0e10cSrcweir uint4 j = 0; 909cdf0e10cSrcweir sint4 sum = 0; 910cdf0e10cSrcweir- 911cdf0e10cSrcweir+ 912cdf0e10cSrcweir /*** Compare the profiles in mergesort fashion ***/ 913cdf0e10cSrcweir while ( i < c->size && j < u->size ) { 914cdf0e10cSrcweir 915cdf0e10cSrcweir@@ -705,7 +707,7 @@ 916cdf0e10cSrcweir } 917cdf0e10cSrcweir 918cdf0e10cSrcweir return sum; 919cdf0e10cSrcweir- 920cdf0e10cSrcweir+ 921cdf0e10cSrcweir } 922cdf0e10cSrcweir 923cdf0e10cSrcweir 924cdf0e10cSrcweir--- misc/libtextcat-2.2/src/fingerprint.h Mon May 19 14:16:31 2003 925cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/fingerprint.h Mon Mar 31 11:29:14 2008 926cdf0e10cSrcweir@@ -41,7 +41,13 @@ 927cdf0e10cSrcweir extern int fp_Read( void *handle, const char *fname, int maxngrams ); 928cdf0e10cSrcweir extern sint4 fp_Compare( void *cat, void *unknown, int cutoff ); 929cdf0e10cSrcweir extern void fp_Show( void *handle ); 930cdf0e10cSrcweir+#ifdef __cplusplus 931cdf0e10cSrcweir+extern "C" { 932cdf0e10cSrcweir+#endif 933cdf0e10cSrcweir extern const char *fp_Name( void *handle ); 934cdf0e10cSrcweir+#ifdef __cplusplus 935cdf0e10cSrcweir+} 936cdf0e10cSrcweir+#endif 937cdf0e10cSrcweir extern void fp_Print( void *handle, FILE *fp ); 938cdf0e10cSrcweir 939cdf0e10cSrcweir #endif 940cdf0e10cSrcweir--- misc/libtextcat-2.2/src/libtextcat.map Mon Mar 31 11:30:06 2008 941cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/libtextcat.map Mon Mar 31 11:29:14 2008 942cdf0e10cSrcweir@@ -1 +1,40 @@ 943cdf0e10cSrcweir-dummy 944cdf0e10cSrcweir+{ 945cdf0e10cSrcweir+ global: 946cdf0e10cSrcweir+ charcopy 947cdf0e10cSrcweir+ issame 948cdf0e10cSrcweir+ nextcharstart 949cdf0e10cSrcweir+ utfstrlen 950cdf0e10cSrcweir+ wgmempool_Done 951cdf0e10cSrcweir+ wgmempool_Init 952cdf0e10cSrcweir+ wgmempool_Reset 953cdf0e10cSrcweir+ wgmempool_alloc 954cdf0e10cSrcweir+ wgmempool_getline 955cdf0e10cSrcweir+ wgmempool_strdup 956cdf0e10cSrcweir+ special_textcat_Init 957cdf0e10cSrcweir+ textcat_Classify 958cdf0e10cSrcweir+ textcat_Done 959cdf0e10cSrcweir+ textcat_Init 960cdf0e10cSrcweir+ textcat_Version 961cdf0e10cSrcweir+ fp_Compare 962cdf0e10cSrcweir+ fp_Create 963cdf0e10cSrcweir+ fp_Debug 964cdf0e10cSrcweir+ fp_Done 965cdf0e10cSrcweir+ fp_Init 966cdf0e10cSrcweir+ fp_Name 967cdf0e10cSrcweir+ fp_Print 968cdf0e10cSrcweir+ fp_Read 969cdf0e10cSrcweir+ heapextract 970cdf0e10cSrcweir+ wg_calloc 971cdf0e10cSrcweir+ wg_free 972cdf0e10cSrcweir+ wg_getline 973cdf0e10cSrcweir+ wg_malloc 974cdf0e10cSrcweir+ wg_split 975cdf0e10cSrcweir+ wg_strdup 976cdf0e10cSrcweir+ wg_strgmov 977cdf0e10cSrcweir+ wg_trim 978cdf0e10cSrcweir+ wg_zalloc 979cdf0e10cSrcweir+ wgmem_error 980cdf0e10cSrcweir+ 981cdf0e10cSrcweir+ local: 982cdf0e10cSrcweir+ *; 983cdf0e10cSrcweir+} 984cdf0e10cSrcweir--- misc/libtextcat-2.2/src/makefile.mk Mon Mar 31 11:30:06 2008 985cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/makefile.mk Mon Mar 31 11:29:42 2008 986ddc94e00SAriel Constenla-Haile@@ -1 +1,81 @@ 987cdf0e10cSrcweir-dummy 988e76eebc6SAndrew Rist+#************************************************************** 989cdf0e10cSrcweir+# 990e76eebc6SAndrew Rist+# Licensed to the Apache Software Foundation (ASF) under one 991e76eebc6SAndrew Rist+# or more contributor license agreements. See the NOTICE file 992e76eebc6SAndrew Rist+# distributed with this work for additional information 993e76eebc6SAndrew Rist+# regarding copyright ownership. The ASF licenses this file 994e76eebc6SAndrew Rist+# to you under the Apache License, Version 2.0 (the 995e76eebc6SAndrew Rist+# "License"); you may not use this file except in compliance 996e76eebc6SAndrew Rist+# with the License. You may obtain a copy of the License at 997cdf0e10cSrcweir+# 998e76eebc6SAndrew Rist+# http://www.apache.org/licenses/LICENSE-2.0 999cdf0e10cSrcweir+# 1000e76eebc6SAndrew Rist+# Unless required by applicable law or agreed to in writing, 1001e76eebc6SAndrew Rist+# software distributed under the License is distributed on an 1002e76eebc6SAndrew Rist+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1003e76eebc6SAndrew Rist+# KIND, either express or implied. See the License for the 1004e76eebc6SAndrew Rist+# specific language governing permissions and limitations 1005e76eebc6SAndrew Rist+# under the License. 1006cdf0e10cSrcweir+# 1007e76eebc6SAndrew Rist+#************************************************************** 1008cdf0e10cSrcweir+ 1009cdf0e10cSrcweir+PRJ = ..$/..$/..$/..$/.. 1010cdf0e10cSrcweir+ 1011cdf0e10cSrcweir+PRJNAME = libtextcat 1012cdf0e10cSrcweir+TARGET = libtextcat 1013cdf0e10cSrcweir+CFLAGSCALL=gsd 1014cdf0e10cSrcweir+ 1015cdf0e10cSrcweir+USE_DEFFILE=TRUE 1016cdf0e10cSrcweir+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE 1017cdf0e10cSrcweir+UWINAPILIB= 1018cdf0e10cSrcweir+ 1019cdf0e10cSrcweir+.INCLUDE : settings.mk 1020cdf0e10cSrcweir+ 1021cdf0e10cSrcweir+# --- Files -------------------------------------------------------- 1022cdf0e10cSrcweir+ 1023cdf0e10cSrcweir+# !! not to be compiled because those belong to a stand alone programs: !! 1024cdf0e10cSrcweir+# $(SLO)$/createfp.obj\ 1025cdf0e10cSrcweir+# $(SLO)$/testtextcat.obj 1026cdf0e10cSrcweir+ 1027cdf0e10cSrcweir+SLOFILES= \ 1028cdf0e10cSrcweir+ $(SLO)$/common.obj\ 1029cdf0e10cSrcweir+ $(SLO)$/fingerprint.obj\ 1030cdf0e10cSrcweir+ $(SLO)$/textcat.obj\ 1031cdf0e10cSrcweir+ $(SLO)$/wg_mempool.obj\ 1032cdf0e10cSrcweir+ $(SLO)$/utf8misc.obj 1033cdf0e10cSrcweir+ 1034cdf0e10cSrcweir+#SHL1TARGET= $(TARGET)$(UPD)$(DLLPOSTFIX) 1035cdf0e10cSrcweir+SHL1TARGET= $(TARGET) 1036cdf0e10cSrcweir+ 1037cdf0e10cSrcweir+SHL1STDLIBS= 1038cdf0e10cSrcweir+ 1039cdf0e10cSrcweir+# build DLL 1040cdf0e10cSrcweir+SHL1LIBS= $(SLB)$/$(TARGET).lib 1041cdf0e10cSrcweir+SHL1IMPLIB= i$(TARGET) 1042cdf0e10cSrcweir+SHL1DEPN= $(SHL1LIBS) 1043cdf0e10cSrcweir+SHL1DEF= $(MISC)$/$(SHL1TARGET).def 1044cdf0e10cSrcweir+ 1045cdf0e10cSrcweir+# build DEF file 1046cdf0e10cSrcweir+DEF1NAME= $(SHL1TARGET) 1047cdf0e10cSrcweir+DEF1DEPN=$(MISC)$/$(SHL1TARGET).flt 1048cdf0e10cSrcweir+ 1049cdf0e10cSrcweir+SHL1VERSIONMAP= libtextcat.map 1050cdf0e10cSrcweir+ 1051cdf0e10cSrcweir+# --- Targets ------------------------------------------------------ 1052cdf0e10cSrcweir+ 1053cdf0e10cSrcweir+.INCLUDE : target.mk 1054cdf0e10cSrcweir+ 1055cdf0e10cSrcweir+# copy hand supplied configuration file for Win32 builds to the file 1056cdf0e10cSrcweir+# which is included in the source code 1057cdf0e10cSrcweir+$(SLOFILES) : config.h 1058cdf0e10cSrcweir+config.h : 1059cdf0e10cSrcweir+ $(GNUCOPY) $(OUT)$/misc$/build$/libtextcat-2.2$/src$/win32_config.h $(OUT)$/misc$/build$/libtextcat-2.2$/src$/config.h 1060cdf0e10cSrcweir+ 1061cdf0e10cSrcweir+ 1062cdf0e10cSrcweir+$(MISC)$/$(SHL1TARGET).flt: makefile.mk 1063cdf0e10cSrcweir+ @echo ------------------------------ 1064cdf0e10cSrcweir+ @echo Making: $@ 1065cdf0e10cSrcweir+ @echo Imp>$@ 1066cdf0e10cSrcweir+ @echo __CT>>$@ 1067cdf0e10cSrcweir+ @echo _real>>$@ 1068cdf0e10cSrcweir+ @echo unnamed>>$@ 1069cdf0e10cSrcweir--- misc/libtextcat-2.2/src/textcat.c Thu May 22 13:32:43 2003 1070cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/textcat.c Mon Mar 31 11:29:14 2008 1071cdf0e10cSrcweir@@ -4,23 +4,23 @@ 1072cdf0e10cSrcweir * Copyright (C) 2003 WiseGuys Internet B.V. 1073cdf0e10cSrcweir * 1074cdf0e10cSrcweir * THE BSD LICENSE 1075cdf0e10cSrcweir- * 1076cdf0e10cSrcweir+ * 1077cdf0e10cSrcweir * Redistribution and use in source and binary forms, with or without 1078cdf0e10cSrcweir * modification, are permitted provided that the following conditions 1079cdf0e10cSrcweir * are met: 1080cdf0e10cSrcweir- * 1081cdf0e10cSrcweir+ * 1082cdf0e10cSrcweir * - Redistributions of source code must retain the above copyright 1083cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer. 1084cdf0e10cSrcweir- * 1085cdf0e10cSrcweir+ * 1086cdf0e10cSrcweir * - Redistributions in binary form must reproduce the above copyright 1087cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer in the 1088cdf0e10cSrcweir * documentation and/or other materials provided with the 1089cdf0e10cSrcweir * distribution. 1090cdf0e10cSrcweir- * 1091cdf0e10cSrcweir+ * 1092cdf0e10cSrcweir * - Neither the name of the WiseGuys Internet B.V. nor the names of 1093cdf0e10cSrcweir * its contributors may be used to endorse or promote products derived 1094cdf0e10cSrcweir * from this software without specific prior written permission. 1095cdf0e10cSrcweir- * 1096cdf0e10cSrcweir+ * 1097cdf0e10cSrcweir * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1098cdf0e10cSrcweir * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1099cdf0e10cSrcweir * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1100cdf0e10cSrcweir@@ -74,6 +74,7 @@ 1101cdf0e10cSrcweir typedef struct { 1102cdf0e10cSrcweir 1103cdf0e10cSrcweir void **fprint; 1104cdf0e10cSrcweir+ char *fprint_disable; 1105cdf0e10cSrcweir uint4 size; 1106cdf0e10cSrcweir uint4 maxsize; 1107cdf0e10cSrcweir 1108cdf0e10cSrcweir@@ -112,11 +113,21 @@ 1109cdf0e10cSrcweir fp_Done( h->fprint[i] ); 1110cdf0e10cSrcweir } 1111cdf0e10cSrcweir wg_free( h->fprint ); 1112cdf0e10cSrcweir+ wg_free( h->fprint_disable ); 1113cdf0e10cSrcweir wg_free( h ); 1114cdf0e10cSrcweir 1115cdf0e10cSrcweir } 1116cdf0e10cSrcweir 1117cdf0e10cSrcweir-extern void *textcat_Init( const char *conffile ) 1118cdf0e10cSrcweir+/** Replaces older function */ 1119cdf0e10cSrcweir+extern void *textcat_Init( const char *conffile ){ 1120cdf0e10cSrcweir+ return special_textcat_Init( conffile, DEFAULT_FINGERPRINTS_PATH ); 1121cdf0e10cSrcweir+} 1122cdf0e10cSrcweir+ 1123cdf0e10cSrcweir+/** 1124a893be29SPedro Giffuni+ * Originally this function had only one parameter (conffile) it has been modified since OOo use 1125a893be29SPedro Giffuni+ * Basically prefix is the directory path where fingerprints are stored 1126cdf0e10cSrcweir+ */ 1127cdf0e10cSrcweir+extern void *special_textcat_Init( const char *conffile, const char *prefix ) 1128cdf0e10cSrcweir { 1129cdf0e10cSrcweir textcat_t *h; 1130cdf0e10cSrcweir char line[1024]; 1131cdf0e10cSrcweir@@ -134,11 +145,13 @@ 1132cdf0e10cSrcweir h->size = 0; 1133cdf0e10cSrcweir h->maxsize = 16; 1134cdf0e10cSrcweir h->fprint = (void **)wg_malloc( sizeof(void*) * h->maxsize ); 1135cdf0e10cSrcweir+ h->fprint_disable = (char *)wg_malloc( sizeof(char*) * h->maxsize ); /*added to store the state of languages*/ 1136cdf0e10cSrcweir 1137cdf0e10cSrcweir while ( wg_getline( line, 1024, fp ) ) { 1138cdf0e10cSrcweir char *p; 1139cdf0e10cSrcweir char *segment[4]; 1140cdf0e10cSrcweir- int res; 1141cdf0e10cSrcweir+ char finger_print_file_name[512]; 1142cdf0e10cSrcweir+ int res; 1143cdf0e10cSrcweir 1144cdf0e10cSrcweir /*** Skip comments ***/ 1145cdf0e10cSrcweir #ifdef HAVE_STRCHR 1146cdf0e10cSrcweir@@ -156,17 +169,23 @@ 1147cdf0e10cSrcweir /*** Ensure enough space ***/ 1148cdf0e10cSrcweir if ( h->size == h->maxsize ) { 1149cdf0e10cSrcweir h->maxsize *= 2; 1150cdf0e10cSrcweir- h->fprint = (void *)wg_realloc( h->fprint, sizeof(void*) * h->maxsize ); 1151cdf0e10cSrcweir+ h->fprint = (void **)wg_realloc( h->fprint, sizeof(void*) * h->maxsize ); 1152cdf0e10cSrcweir+ h->fprint_disable = (char *)wg_realloc( h->fprint_disable, sizeof(char*) * h->maxsize ); 1153cdf0e10cSrcweir } 1154cdf0e10cSrcweir 1155cdf0e10cSrcweir /*** Load data ***/ 1156cdf0e10cSrcweir if ((h->fprint[ h->size ] = fp_Init( segment[1] ))==NULL) { 1157cdf0e10cSrcweir goto ERROR; 1158cdf0e10cSrcweir } 1159cdf0e10cSrcweir- if ( fp_Read( h->fprint[h->size], segment[0], 400 ) == 0 ) { 1160cdf0e10cSrcweir+ finger_print_file_name[0] = '\0'; 1161cdf0e10cSrcweir+ strcat(finger_print_file_name, prefix); 1162cdf0e10cSrcweir+ strcat(finger_print_file_name, segment[0]); 1163cdf0e10cSrcweir+ 1164cdf0e10cSrcweir+ if ( fp_Read( h->fprint[h->size], finger_print_file_name, 400 ) == 0 ) { 1165cdf0e10cSrcweir textcat_Done(h); 1166cdf0e10cSrcweir goto ERROR; 1167cdf0e10cSrcweir- } 1168cdf0e10cSrcweir+ } 1169cdf0e10cSrcweir+ h->fprint_disable[h->size] = 0xF0; /*0xF0 is the code for enabled languages, 0x0F is for disabled*/ 1170cdf0e10cSrcweir h->size++; 1171cdf0e10cSrcweir } 1172cdf0e10cSrcweir 1173cdf0e10cSrcweir@@ -203,11 +222,18 @@ 1174cdf0e10cSrcweir result = _TEXTCAT_RESULT_SHORT; 1175cdf0e10cSrcweir goto READY; 1176cdf0e10cSrcweir } 1177cdf0e10cSrcweir- 1178cdf0e10cSrcweir+ 1179cdf0e10cSrcweir /*** Calculate the score for each category. ***/ 1180cdf0e10cSrcweir for (i=0; i<h->size; i++) { 1181cdf0e10cSrcweir- int score = fp_Compare( h->fprint[i], unknown, threshold ); 1182cdf0e10cSrcweir- candidates[i].score = score; 1183cdf0e10cSrcweir+ int score; 1184cdf0e10cSrcweir+ if(h->fprint_disable[i] & 0x0F){ /*if this language is disabled*/ 1185cdf0e10cSrcweir+ score = MAXSCORE; 1186cdf0e10cSrcweir+ } 1187cdf0e10cSrcweir+ else{ 1188cdf0e10cSrcweir+ score = fp_Compare( h->fprint[i], unknown, threshold ); 1189cdf0e10cSrcweir+ /*printf("Score for %s : %i\n", fp_Name(h->fprint[i]), score);*/ 1190cdf0e10cSrcweir+ } 1191cdf0e10cSrcweir+ candidates[i].score = score; 1192cdf0e10cSrcweir candidates[i].name = fp_Name( h->fprint[i] ); 1193cdf0e10cSrcweir if ( score < minscore ) { 1194cdf0e10cSrcweir minscore = score; 1195cdf0e10cSrcweir@@ -218,7 +244,6 @@ 1196cdf0e10cSrcweir /*** Find the best performers ***/ 1197cdf0e10cSrcweir for (i=0; i<h->size; i++) { 1198cdf0e10cSrcweir if ( candidates[i].score < threshold ) { 1199cdf0e10cSrcweir- 1200cdf0e10cSrcweir if ( ++cnt == MAXCANDIDATES+1 ) { 1201cdf0e10cSrcweir break; 1202cdf0e10cSrcweir } 1203cdf0e10cSrcweir@@ -235,7 +260,7 @@ 1204cdf0e10cSrcweir else { 1205cdf0e10cSrcweir char *p = result; 1206cdf0e10cSrcweir char *plimit = result+MAXOUTPUTSIZE; 1207cdf0e10cSrcweir- 1208cdf0e10cSrcweir+ 1209cdf0e10cSrcweir qsort( candidates, cnt, sizeof(candidate_t), cmpcandidates ); 1210cdf0e10cSrcweir 1211cdf0e10cSrcweir *p = '\0'; 1212cdf0e10cSrcweir@@ -247,7 +272,7 @@ 1213cdf0e10cSrcweir } 1214cdf0e10cSrcweir READY: 1215cdf0e10cSrcweir fp_Done(unknown); 1216cdf0e10cSrcweir-#ifdef SHOULD_FREE 1217cdf0e10cSrcweir+#ifdef SHOULD_FREE 1218cdf0e10cSrcweir free(candidates); 1219cdf0e10cSrcweir #undef SHOULD_FREE 1220cdf0e10cSrcweir #endif 1221cdf0e10cSrcweir--- misc/libtextcat-2.2/src/textcat.h Mon May 19 14:16:31 2003 1222cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/textcat.h Mon Mar 31 11:29:14 2008 1223cdf0e10cSrcweir@@ -40,6 +40,9 @@ 1224cdf0e10cSrcweir #define _TEXTCAT_RESULT_UNKOWN "UNKNOWN" 1225cdf0e10cSrcweir #define _TEXTCAT_RESULT_SHORT "SHORT" 1226cdf0e10cSrcweir 1227cdf0e10cSrcweir+#ifdef __cplusplus 1228cdf0e10cSrcweir+extern "C" { 1229cdf0e10cSrcweir+#endif 1230cdf0e10cSrcweir 1231cdf0e10cSrcweir /** 1232cdf0e10cSrcweir * textcat_Init() - Initialize the text classifier. The textfile 1233cdf0e10cSrcweir@@ -51,10 +54,19 @@ 1234cdf0e10cSrcweir * Returns: handle on success, NULL on error. (At the moment, the 1235cdf0e10cSrcweir * only way errors can occur, is when the library cannot read the 1236cdf0e10cSrcweir * conffile, or one of the fingerprint files listed in it.) 1237cdf0e10cSrcweir+ * 1238cdf0e10cSrcweir+ * Replace older function (and has exacly the same behaviour) 1239cdf0e10cSrcweir+ * see below 1240cdf0e10cSrcweir */ 1241cdf0e10cSrcweir extern void *textcat_Init( const char *conffile ); 1242cdf0e10cSrcweir 1243cdf0e10cSrcweir /** 1244a893be29SPedro Giffuni+ * Originally this function had only one parameter (conffile) it has been modified since OOo must be able to load alternativ DB 1245a893be29SPedro Giffuni+ * Basically prefix is the directory path where fingerprints are stored 1246cdf0e10cSrcweir+ */ 1247cdf0e10cSrcweir+extern void *special_textcat_Init( const char *conffile, const char *prefix ); 1248cdf0e10cSrcweir+ 1249cdf0e10cSrcweir+/** 1250cdf0e10cSrcweir * textcat_Done() - Free up resources for handle 1251cdf0e10cSrcweir */ 1252cdf0e10cSrcweir extern void textcat_Done( void *handle ); 1253cdf0e10cSrcweir@@ -77,4 +89,8 @@ 1254cdf0e10cSrcweir * textcat_Version() - Returns a string describing the version of this classifier. 1255cdf0e10cSrcweir */ 1256cdf0e10cSrcweir extern char *textcat_Version(); 1257cdf0e10cSrcweir+ 1258cdf0e10cSrcweir+#ifdef __cplusplus 1259cdf0e10cSrcweir+} 1260cdf0e10cSrcweir+#endif 1261cdf0e10cSrcweir #endif 1262cdf0e10cSrcweir--- misc/libtextcat-2.2/src/utf8misc.c Mon Mar 31 11:30:06 2008 1263cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/utf8misc.c Mon Mar 31 11:29:14 2008 1264cdf0e10cSrcweir@@ -1 +1,132 @@ 1265cdf0e10cSrcweir-dummy 1266cdf0e10cSrcweir+/*************************************************************************** 1267cdf0e10cSrcweir+ * Copyright (C) 2006 by Jocelyn Merand * 1268cdf0e10cSrcweir+ * joc.mer@gmail.com * 1269cdf0e10cSrcweir+ * * 1270cdf0e10cSrcweir+ * THE BSD LICENSE 1271cdf0e10cSrcweir+ * 1272cdf0e10cSrcweir+ * Redistribution and use in source and binary forms, with or without 1273cdf0e10cSrcweir+ * modification, are permitted provided that the following conditions 1274cdf0e10cSrcweir+ * are met: 1275cdf0e10cSrcweir+ * 1276cdf0e10cSrcweir+ * - Redistributions of source code must retain the above copyright 1277cdf0e10cSrcweir+ * notice, this list of conditions and the following disclaimer. 1278cdf0e10cSrcweir+ * 1279cdf0e10cSrcweir+ * - Redistributions in binary form must reproduce the above copyright 1280cdf0e10cSrcweir+ * notice, this list of conditions and the following disclaimer in the 1281cdf0e10cSrcweir+ * documentation and/or other materials provided with the 1282cdf0e10cSrcweir+ * distribution. 1283cdf0e10cSrcweir+ * 1284cdf0e10cSrcweir+ * - Neither the name of the WiseGuys Internet B.V. nor the names of 1285cdf0e10cSrcweir+ * its contributors may be used to endorse or promote products derived 1286cdf0e10cSrcweir+ * from this software without specific prior written permission. 1287cdf0e10cSrcweir+ * 1288cdf0e10cSrcweir+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1289cdf0e10cSrcweir+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1290cdf0e10cSrcweir+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1291cdf0e10cSrcweir+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1292cdf0e10cSrcweir+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1293cdf0e10cSrcweir+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1294cdf0e10cSrcweir+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1295cdf0e10cSrcweir+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1296cdf0e10cSrcweir+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1297cdf0e10cSrcweir+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1298cdf0e10cSrcweir+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1299cdf0e10cSrcweir+ ***************************************************************************/ 1300cdf0e10cSrcweir+ 1301cdf0e10cSrcweir+#ifndef _UTF8_MISC_H_ 1302cdf0e10cSrcweir+#include "utf8misc.h" 1303cdf0e10cSrcweir+#endif 1304cdf0e10cSrcweir+ 1305cdf0e10cSrcweir+ 1306cdf0e10cSrcweir+int nextcharstart(const char *str, int position){ 1307cdf0e10cSrcweir+ int pointer = position; 1308cdf0e10cSrcweir+ 1309cdf0e10cSrcweir+ if(str[pointer] & ESCAPE_MASK){ /*if the first bit of the current char is 1*/ 1310cdf0e10cSrcweir+ 1311cdf0e10cSrcweir+ /*then str[pointer] is an escape character*/ 1312cdf0e10cSrcweir+ 1313cdf0e10cSrcweir+ char escape_char = ((str[pointer] & WEIGHT_MASK) << 1); /*and we use it to count (by bit translation) following characters (only the weightest part)*/ 1314cdf0e10cSrcweir+ 1315cdf0e10cSrcweir+ 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*/ 1316cdf0e10cSrcweir+ escape_char = escape_char <<1; 1317cdf0e10cSrcweir+ ++pointer; 1318cdf0e10cSrcweir+ } 1319cdf0e10cSrcweir+ } 1320a893be29SPedro Giffuni+ if(str[pointer]){ /*finally, if we are not on the \0 character, we jump to the next character*/ 1321cdf0e10cSrcweir+ ++pointer; 1322cdf0e10cSrcweir+ } 1323cdf0e10cSrcweir+ return pointer; 1324cdf0e10cSrcweir+} 1325cdf0e10cSrcweir+ 1326cdf0e10cSrcweir+ 1327cdf0e10cSrcweir+int charcopy(const char *str, char *dest){ 1328cdf0e10cSrcweir+ 1329cdf0e10cSrcweir+ int pointer = 0; 1330cdf0e10cSrcweir+ if(str[pointer] & ESCAPE_MASK){ /*if the first bit of the current char is 1*/ 1331cdf0e10cSrcweir+ 1332cdf0e10cSrcweir+ /*then str[pointer] is an escape character*/ 1333cdf0e10cSrcweir+ 1334cdf0e10cSrcweir+ char escape_char = ((str[pointer] & WEIGHT_MASK) << 1); /*and we use it to count following characters (only the weightest part)*/ 1335cdf0e10cSrcweir+ 1336cdf0e10cSrcweir+ 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*/ 1337cdf0e10cSrcweir+ dest[pointer] = str[pointer]; 1338cdf0e10cSrcweir+ escape_char = escape_char <<1; 1339cdf0e10cSrcweir+ ++pointer; 1340cdf0e10cSrcweir+ } 1341cdf0e10cSrcweir+ } 1342cdf0e10cSrcweir+ if(str[pointer]){ 1343cdf0e10cSrcweir+ dest[pointer] = str[pointer]; 1344cdf0e10cSrcweir+ ++pointer; 1345cdf0e10cSrcweir+ } 1346cdf0e10cSrcweir+ 1347cdf0e10cSrcweir+ return pointer; 1348cdf0e10cSrcweir+} 1349cdf0e10cSrcweir+ 1350cdf0e10cSrcweir+ 1351cdf0e10cSrcweir+int issame( char *lex, char *key, int len ) 1352cdf0e10cSrcweir+{ 1353cdf0e10cSrcweir+ /*printf("[%s] prefix of [%s] with length %i", lex, key, len);*/ 1354cdf0e10cSrcweir+ int char_counter = 0; 1355cdf0e10cSrcweir+ int pointer = 0; 1356cdf0e10cSrcweir+ while(char_counter < len) { 1357cdf0e10cSrcweir+ 1358cdf0e10cSrcweir+ if(key[pointer] & ESCAPE_MASK){ /*if the first bit of the current char is 1*/ 1359cdf0e10cSrcweir+ 1360cdf0e10cSrcweir+ /*then key[pointer] is an escap character*/ 1361cdf0e10cSrcweir+ 1362cdf0e10cSrcweir+ char escape_char = ((key[pointer] & WEIGHT_MASK) << 1); /*and we use it to count (only the weightest part)*/ 1363cdf0e10cSrcweir+ 1364cdf0e10cSrcweir+ while(escape_char & ESCAPE_MASK && key[pointer] == lex[pointer] ){ 1365cdf0e10cSrcweir+ escape_char = escape_char <<1; 1366cdf0e10cSrcweir+ ++pointer; 1367cdf0e10cSrcweir+ } 1368cdf0e10cSrcweir+ } 1369cdf0e10cSrcweir+ ++char_counter; /*and we are on a new utf8 character*/ 1370cdf0e10cSrcweir+ if ( key[pointer] != lex[pointer] ) { 1371cdf0e10cSrcweir+ return 0; 1372cdf0e10cSrcweir+ /*printf(" NO\n", lex, key, len);*/ 1373cdf0e10cSrcweir+ } 1374cdf0e10cSrcweir+ ++pointer; 1375cdf0e10cSrcweir+ } 1376cdf0e10cSrcweir+ if ( lex[pointer] != '\0' ) { 1377cdf0e10cSrcweir+ return 0; 1378cdf0e10cSrcweir+ /*printf(" NO\n");*/ 1379cdf0e10cSrcweir+ } 1380cdf0e10cSrcweir+ 1381cdf0e10cSrcweir+ /*printf(" YES\n");*/ 1382cdf0e10cSrcweir+ 1383cdf0e10cSrcweir+ return 1; 1384cdf0e10cSrcweir+} 1385cdf0e10cSrcweir+ 1386cdf0e10cSrcweir+ 1387cdf0e10cSrcweir+extern int utfstrlen(const char* str){ 1388cdf0e10cSrcweir+ int char_counter = 0; 1389cdf0e10cSrcweir+ int pointer = 0; 1390cdf0e10cSrcweir+ while(str[pointer]) { 1391cdf0e10cSrcweir+ pointer = nextcharstart(str, pointer); 1392cdf0e10cSrcweir+ 1393cdf0e10cSrcweir+ ++char_counter; /*and we are on a new utf8 character*/ 1394cdf0e10cSrcweir+ } 1395cdf0e10cSrcweir+ return char_counter; 1396cdf0e10cSrcweir+} 1397cdf0e10cSrcweir+ 1398cdf0e10cSrcweir--- misc/libtextcat-2.2/src/utf8misc.h Mon Mar 31 11:30:06 2008 1399cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/utf8misc.h Mon Mar 31 11:29:14 2008 1400cdf0e10cSrcweir@@ -1 +1,88 @@ 1401cdf0e10cSrcweir-dummy 1402cdf0e10cSrcweir+/*************************************************************************** 1403cdf0e10cSrcweir+ * Copyright (C) 2006 by Jocelyn Merand * 1404cdf0e10cSrcweir+ * joc.mer@gmail.com * 1405cdf0e10cSrcweir+ * * 1406cdf0e10cSrcweir+ * THE BSD LICENSE 1407cdf0e10cSrcweir+ * 1408cdf0e10cSrcweir+ * Redistribution and use in source and binary forms, with or without 1409cdf0e10cSrcweir+ * modification, are permitted provided that the following conditions 1410cdf0e10cSrcweir+ * are met: 1411cdf0e10cSrcweir+ * 1412cdf0e10cSrcweir+ * - Redistributions of source code must retain the above copyright 1413cdf0e10cSrcweir+ * notice, this list of conditions and the following disclaimer. 1414cdf0e10cSrcweir+ * 1415cdf0e10cSrcweir+ * - Redistributions in binary form must reproduce the above copyright 1416cdf0e10cSrcweir+ * notice, this list of conditions and the following disclaimer in the 1417cdf0e10cSrcweir+ * documentation and/or other materials provided with the 1418cdf0e10cSrcweir+ * distribution. 1419cdf0e10cSrcweir+ * 1420cdf0e10cSrcweir+ * - Neither the name of the WiseGuys Internet B.V. nor the names of 1421cdf0e10cSrcweir+ * its contributors may be used to endorse or promote products derived 1422cdf0e10cSrcweir+ * from this software without specific prior written permission. 1423cdf0e10cSrcweir+ * 1424cdf0e10cSrcweir+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1425cdf0e10cSrcweir+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1426cdf0e10cSrcweir+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1427cdf0e10cSrcweir+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1428cdf0e10cSrcweir+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1429cdf0e10cSrcweir+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1430cdf0e10cSrcweir+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1431cdf0e10cSrcweir+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1432cdf0e10cSrcweir+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1433cdf0e10cSrcweir+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1434cdf0e10cSrcweir+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1435cdf0e10cSrcweir+ ***************************************************************************/ 1436cdf0e10cSrcweir+ 1437cdf0e10cSrcweir+#ifndef _UTF8_MISC_H_ 1438cdf0e10cSrcweir+#define _UTF8_MISC_H_ 1439cdf0e10cSrcweir+ 1440cdf0e10cSrcweir+/** 1441cdf0e10cSrcweir+ * These variables are used in character processing functions 1442cdf0e10cSrcweir+ * These have been added to manage utf-8 symbols, particularly escape chars 1443cdf0e10cSrcweir+ */ 1444cdf0e10cSrcweir+#ifdef _UTF8_ 1445cdf0e10cSrcweir+#define ESCAPE_MASK 0x80 1446cdf0e10cSrcweir+#define WEIGHT_MASK 0xF0 1447cdf0e10cSrcweir+#else 1448cdf0e10cSrcweir+#define ESCAPE_MASK 0xFF 1449cdf0e10cSrcweir+#define WEIGHT_MASK 0x00 1450cdf0e10cSrcweir+#endif 1451cdf0e10cSrcweir+ 1452cdf0e10cSrcweir+ 1453cdf0e10cSrcweir+/* 1454cdf0e10cSrcweir+ * Is used to jump to the next start of char 1455a893be29SPedro Giffuni+ * of course it's only useful when encoding is utf-8 1456cdf0e10cSrcweir+ * This function have been added by Jocelyn Merand to use libtextcat in OOo 1457cdf0e10cSrcweir+ */ 1458cdf0e10cSrcweir+int nextcharstart(const char *str, int position); 1459cdf0e10cSrcweir+ 1460cdf0e10cSrcweir+ 1461cdf0e10cSrcweir+/*Copy the char in str to dest 1462a893be29SPedro Giffuni+ * of course it's only useful when encoding is utf8 and the symbol is encoded with more than 1 char 1463cdf0e10cSrcweir+ * return the number of char jumped 1464cdf0e10cSrcweir+ * This function have been added by Jocelyn Merand to use libtextcat in OOo 1465cdf0e10cSrcweir+ */ 1466cdf0e10cSrcweir+int charcopy(const char *str, char *dest); 1467cdf0e10cSrcweir+ 1468cdf0e10cSrcweir+ 1469cdf0e10cSrcweir+/* checks if n-gram lex is a prefix of key and of length len 1470a893be29SPedro Giffuni+* if _UTF8_ is defined, it uses escap characters and len is not really the length of lex 1471cdf0e10cSrcweir+* in this case, len is the number of utf-8 char strlen("€") == 3 but len == 1 1472cdf0e10cSrcweir+*/ 1473cdf0e10cSrcweir+int issame( char *lex, char *key, int len ); 1474cdf0e10cSrcweir+ 1475cdf0e10cSrcweir+ 1476cdf0e10cSrcweir+/* Counts the number of characters 1477a893be29SPedro Giffuni+* if _UTF8_ is defined, it uses escap characters and the result is not really the length of str 1478cdf0e10cSrcweir+* in this case, the result is the number of utf-8 char strlen("€") == 3 but utfstrlen("€") == 1 1479cdf0e10cSrcweir+*/ 1480cdf0e10cSrcweir+#ifdef __cplusplus 1481cdf0e10cSrcweir+extern "C" { 1482cdf0e10cSrcweir+#endif 1483cdf0e10cSrcweir+extern int utfstrlen(const char* str); 1484cdf0e10cSrcweir+#ifdef __cplusplus 1485cdf0e10cSrcweir+} 1486cdf0e10cSrcweir+#endif 1487cdf0e10cSrcweir+ 1488cdf0e10cSrcweir+#endif 1489cdf0e10cSrcweir+ 1490cdf0e10cSrcweir--- misc/libtextcat-2.2/src/win32_config.h Mon Mar 31 11:30:06 2008 1491cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/src/win32_config.h Mon Mar 31 11:29:14 2008 1492cdf0e10cSrcweir@@ -1 +1,136 @@ 1493cdf0e10cSrcweir-dummy 1494cdf0e10cSrcweir+/* src/config.h. Generated by configure. */ 1495cdf0e10cSrcweir+/* src/config.h.in. Generated from configure.ac by autoheader. */ 1496cdf0e10cSrcweir+ 1497cdf0e10cSrcweir+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP 1498cdf0e10cSrcweir+ systems. This function is required for `alloca.c' support on those systems. 1499cdf0e10cSrcweir+ */ 1500cdf0e10cSrcweir+/* #undef CRAY_STACKSEG_END */ 1501cdf0e10cSrcweir+ 1502cdf0e10cSrcweir+/* Define to 1 if using `alloca.c'. */ 1503cdf0e10cSrcweir+/* #undef C_ALLOCA */ 1504cdf0e10cSrcweir+ 1505cdf0e10cSrcweir+/* Define to 1 if you have `alloca', as a function or macro. */ 1506cdf0e10cSrcweir+/* #undef HAVE_ALLOCA */ 1507cdf0e10cSrcweir+ 1508cdf0e10cSrcweir+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). 1509cdf0e10cSrcweir+ */ 1510cdf0e10cSrcweir+/* #undef HAVE_ALLOCA_H */ 1511cdf0e10cSrcweir+ 1512cdf0e10cSrcweir+/* Define to 1 if you have the <dlfcn.h> header file. */ 1513cdf0e10cSrcweir+#define HAVE_DLFCN_H 1 1514cdf0e10cSrcweir+ 1515cdf0e10cSrcweir+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ 1516cdf0e10cSrcweir+/* #undef HAVE_DOPRNT */ 1517cdf0e10cSrcweir+ 1518cdf0e10cSrcweir+/* Define to 1 if you have the `gettimeofday' function. */ 1519cdf0e10cSrcweir+/* #undef HAVE_GETTIMEOFDAY */ 1520cdf0e10cSrcweir+ 1521cdf0e10cSrcweir+/* Define to 1 if you have the <inttypes.h> header file. */ 1522cdf0e10cSrcweir+/* #undef HAVE_INTTYPES_H */ 1523cdf0e10cSrcweir+ 1524cdf0e10cSrcweir+/* Define to 1 if you have the <limits.h> header file. */ 1525cdf0e10cSrcweir+#define HAVE_LIMITS_H 1 1526cdf0e10cSrcweir+ 1527cdf0e10cSrcweir+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and 1528cdf0e10cSrcweir+ to 0 otherwise. */ 1529cdf0e10cSrcweir+#define HAVE_MALLOC 1 1530cdf0e10cSrcweir+ 1531cdf0e10cSrcweir+/* Define to 1 if you have the <memory.h> header file. */ 1532cdf0e10cSrcweir+#define HAVE_MEMORY_H 1 1533cdf0e10cSrcweir+ 1534cdf0e10cSrcweir+/* Define to 1 if you have the `memset' function. */ 1535cdf0e10cSrcweir+#define HAVE_MEMSET 1 1536cdf0e10cSrcweir+ 1537cdf0e10cSrcweir+/* Define to 1 if your system has a GNU libc compatible `realloc' function, 1538cdf0e10cSrcweir+ and to 0 otherwise. */ 1539cdf0e10cSrcweir+#define HAVE_REALLOC 1 1540cdf0e10cSrcweir+ 1541cdf0e10cSrcweir+/* Define to 1 if you have the <stdint.h> header file. */ 1542cdf0e10cSrcweir+/* #undef HAVE_STDINT_H */ 1543cdf0e10cSrcweir+ 1544cdf0e10cSrcweir+/* Define to 1 if you have the <stdlib.h> header file. */ 1545cdf0e10cSrcweir+#define HAVE_STDLIB_H 1 1546cdf0e10cSrcweir+ 1547cdf0e10cSrcweir+/* Define to 1 if you have the `strchr' function. */ 1548cdf0e10cSrcweir+#define HAVE_STRCHR 1 1549cdf0e10cSrcweir+ 1550cdf0e10cSrcweir+/* Define to 1 if you have the `strdup' function. */ 1551cdf0e10cSrcweir+#define HAVE_STRDUP 1 1552cdf0e10cSrcweir+ 1553cdf0e10cSrcweir+/* Define to 1 if you have the <strings.h> header file. */ 1554cdf0e10cSrcweir+/* #undef HAVE_STRINGS_H */ 1555cdf0e10cSrcweir+ 1556cdf0e10cSrcweir+/* Define to 1 if you have the <string.h> header file. */ 1557cdf0e10cSrcweir+#define HAVE_STRING_H 1 1558cdf0e10cSrcweir+ 1559cdf0e10cSrcweir+/* Define to 1 if you have the `strpbrk' function. */ 1560cdf0e10cSrcweir+#define HAVE_STRPBRK 1 1561cdf0e10cSrcweir+ 1562cdf0e10cSrcweir+/* Define to 1 if you have the <sys/stat.h> header file. */ 1563cdf0e10cSrcweir+#define HAVE_SYS_STAT_H 1 1564cdf0e10cSrcweir+ 1565cdf0e10cSrcweir+/* Define to 1 if you have the <sys/time.h> header file. */ 1566cdf0e10cSrcweir+/* #undef HAVE_SYS_TIME_H */ 1567cdf0e10cSrcweir+ 1568cdf0e10cSrcweir+/* Define to 1 if you have the <sys/types.h> header file. */ 1569cdf0e10cSrcweir+#define HAVE_SYS_TYPES_H 1 1570cdf0e10cSrcweir+ 1571cdf0e10cSrcweir+/* Define to 1 if you have the <unistd.h> header file. */ 1572cdf0e10cSrcweir+#define HAVE_UNISTD_H 1 1573cdf0e10cSrcweir+ 1574cdf0e10cSrcweir+/* Define to 1 if you have the `vprintf' function. */ 1575cdf0e10cSrcweir+#define HAVE_VPRINTF 1 1576cdf0e10cSrcweir+ 1577cdf0e10cSrcweir+/* Name of package */ 1578cdf0e10cSrcweir+#define PACKAGE "libtextcat" 1579cdf0e10cSrcweir+ 1580cdf0e10cSrcweir+/* Define to the address where bug reports for this package should be sent. */ 1581cdf0e10cSrcweir+#define PACKAGE_BUGREPORT "" 1582cdf0e10cSrcweir+ 1583cdf0e10cSrcweir+/* Define to the full name of this package. */ 1584cdf0e10cSrcweir+#define PACKAGE_NAME "libtextcat" 1585cdf0e10cSrcweir+ 1586cdf0e10cSrcweir+/* Define to the full name and version of this package. */ 1587cdf0e10cSrcweir+#define PACKAGE_STRING "libtextcat 2.2" 1588cdf0e10cSrcweir+ 1589cdf0e10cSrcweir+/* Define to the one symbol short name of this package. */ 1590cdf0e10cSrcweir+#define PACKAGE_TARNAME "libtextcat" 1591cdf0e10cSrcweir+ 1592cdf0e10cSrcweir+/* Define to the version of this package. */ 1593cdf0e10cSrcweir+#define PACKAGE_VERSION "2.2" 1594cdf0e10cSrcweir+ 1595cdf0e10cSrcweir+/* If using the C implementation of alloca, define if you know the 1596cdf0e10cSrcweir+ direction of stack growth for your system; otherwise it will be 1597cdf0e10cSrcweir+ automatically deduced at run-time. 1598cdf0e10cSrcweir+ STACK_DIRECTION > 0 => grows toward higher addresses 1599cdf0e10cSrcweir+ STACK_DIRECTION < 0 => grows toward lower addresses 1600cdf0e10cSrcweir+ STACK_DIRECTION = 0 => direction of growth unknown */ 1601cdf0e10cSrcweir+/* #undef STACK_DIRECTION */ 1602cdf0e10cSrcweir+ 1603cdf0e10cSrcweir+/* Define to 1 if you have the ANSI C header files. */ 1604cdf0e10cSrcweir+#define STDC_HEADERS 1 1605cdf0e10cSrcweir+ 1606cdf0e10cSrcweir+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ 1607cdf0e10cSrcweir+#define TIME_WITH_SYS_TIME 1 1608cdf0e10cSrcweir+ 1609cdf0e10cSrcweir+/* Define to 1 if your <sys/time.h> declares `struct tm'. */ 1610cdf0e10cSrcweir+/* #undef TM_IN_SYS_TIME */ 1611cdf0e10cSrcweir+ 1612cdf0e10cSrcweir+/* Version number of package */ 1613cdf0e10cSrcweir+#define VERSION "2.2" 1614cdf0e10cSrcweir+ 1615cdf0e10cSrcweir+/* Define to empty if `const' does not conform to ANSI C. */ 1616cdf0e10cSrcweir+/* #undef const */ 1617cdf0e10cSrcweir+ 1618cdf0e10cSrcweir+/* Define as `__inline' if that's what the C compiler calls it, or to nothing 1619cdf0e10cSrcweir+ if it is not supported. */ 1620cdf0e10cSrcweir+/* #undef inline */ 1621cdf0e10cSrcweir+ 1622cdf0e10cSrcweir+/* Define to rpl_malloc if the replacement function should be used. */ 1623cdf0e10cSrcweir+/* #undef malloc */ 1624cdf0e10cSrcweir+ 1625cdf0e10cSrcweir+/* Define to rpl_realloc if the replacement function should be used. */ 1626cdf0e10cSrcweir+/* #undef realloc */ 1627cdf0e10cSrcweir+ 1628cdf0e10cSrcweir+/* Define to `unsigned' if <sys/types.h> does not define. */ 1629cdf0e10cSrcweir+/* #undef size_t */ 1630cdf0e10cSrcweir--- misc/libtextcat-2.2/config.guess 2010-04-15 09:20:04.000000000 +0000 1631cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/config.guess 2010-04-15 09:20:41.000000000 +0000 1632cdf0e10cSrcweir@@ -1,9 +1,10 @@ 1633cdf0e10cSrcweir #! /bin/sh 1634cdf0e10cSrcweir # Attempt to guess a canonical system name. 1635cdf0e10cSrcweir # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 1636cdf0e10cSrcweir-# 2000, 2001, 2002 Free Software Foundation, Inc. 1637cdf0e10cSrcweir+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 1638cdf0e10cSrcweir+# Free Software Foundation, Inc. 1639cdf0e10cSrcweir 1640cdf0e10cSrcweir-timestamp='2002-10-21' 1641cdf0e10cSrcweir+timestamp='2009-12-30' 1642cdf0e10cSrcweir 1643cdf0e10cSrcweir # This file is free software; you can redistribute it and/or modify it 1644cdf0e10cSrcweir # under the terms of the GNU General Public License as published by 1645cdf0e10cSrcweir@@ -17,23 +18,25 @@ 1646cdf0e10cSrcweir # 1647cdf0e10cSrcweir # You should have received a copy of the GNU General Public License 1648cdf0e10cSrcweir # along with this program; if not, write to the Free Software 1649cdf0e10cSrcweir-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1650cdf0e10cSrcweir+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 1651cdf0e10cSrcweir+# 02110-1301, USA. 1652cdf0e10cSrcweir # 1653cdf0e10cSrcweir # As a special exception to the GNU General Public License, if you 1654cdf0e10cSrcweir # distribute this file as part of a program that contains a 1655cdf0e10cSrcweir # configuration script generated by Autoconf, you may include it under 1656cdf0e10cSrcweir # the same distribution terms that you use for the rest of that program. 1657cdf0e10cSrcweir 1658cdf0e10cSrcweir-# Originally written by Per Bothner <per@bothner.com>. 1659cdf0e10cSrcweir-# Please send patches to <config-patches@gnu.org>. Submit a context 1660cdf0e10cSrcweir-# diff and a properly formatted ChangeLog entry. 1661cdf0e10cSrcweir+ 1662cdf0e10cSrcweir+# Originally written by Per Bothner. Please send patches (context 1663cdf0e10cSrcweir+# diff format) to <config-patches@gnu.org> and include a ChangeLog 1664cdf0e10cSrcweir+# entry. 1665cdf0e10cSrcweir # 1666cdf0e10cSrcweir # This script attempts to guess a canonical system name similar to 1667cdf0e10cSrcweir # config.sub. If it succeeds, it prints the system name on stdout, and 1668cdf0e10cSrcweir # exits with 0. Otherwise, it exits with 1. 1669cdf0e10cSrcweir # 1670cdf0e10cSrcweir-# The plan is that this can be called by configure scripts if you 1671cdf0e10cSrcweir-# don't specify an explicit build system type. 1672cdf0e10cSrcweir+# You can get the latest version of this script from: 1673cdf0e10cSrcweir+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1674cdf0e10cSrcweir 1675cdf0e10cSrcweir me=`echo "$0" | sed -e 's,.*/,,'` 1676cdf0e10cSrcweir 1677cdf0e10cSrcweir@@ -53,8 +56,9 @@ 1678cdf0e10cSrcweir GNU config.guess ($timestamp) 1679cdf0e10cSrcweir 1680cdf0e10cSrcweir Originally written by Per Bothner. 1681cdf0e10cSrcweir-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 1682cdf0e10cSrcweir-Free Software Foundation, Inc. 1683cdf0e10cSrcweir+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 1684cdf0e10cSrcweir+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 1685cdf0e10cSrcweir+Software Foundation, Inc. 1686cdf0e10cSrcweir 1687cdf0e10cSrcweir This is free software; see the source for copying conditions. There is NO 1688cdf0e10cSrcweir warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 1689cdf0e10cSrcweir@@ -66,11 +70,11 @@ 1690cdf0e10cSrcweir while test $# -gt 0 ; do 1691cdf0e10cSrcweir case $1 in 1692cdf0e10cSrcweir --time-stamp | --time* | -t ) 1693cdf0e10cSrcweir- echo "$timestamp" ; exit 0 ;; 1694cdf0e10cSrcweir+ echo "$timestamp" ; exit ;; 1695cdf0e10cSrcweir --version | -v ) 1696cdf0e10cSrcweir- echo "$version" ; exit 0 ;; 1697cdf0e10cSrcweir+ echo "$version" ; exit ;; 1698cdf0e10cSrcweir --help | --h* | -h ) 1699cdf0e10cSrcweir- echo "$usage"; exit 0 ;; 1700cdf0e10cSrcweir+ echo "$usage"; exit ;; 1701cdf0e10cSrcweir -- ) # Stop option processing 1702cdf0e10cSrcweir shift; break ;; 1703cdf0e10cSrcweir - ) # Use stdin as input. 1704cdf0e10cSrcweir@@ -98,14 +102,18 @@ 1705cdf0e10cSrcweir # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 1706cdf0e10cSrcweir # use `HOST_CC' if defined, but it is deprecated. 1707cdf0e10cSrcweir 1708cdf0e10cSrcweir-# This shell variable is my proudest work .. or something. --bje 1709cdf0e10cSrcweir+# Portable tmp directory creation inspired by the Autoconf team. 1710cdf0e10cSrcweir 1711cdf0e10cSrcweir-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; 1712cdf0e10cSrcweir-(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) 1713cdf0e10cSrcweir- || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; 1714cdf0e10cSrcweir-dummy=$tmpdir/dummy ; 1715cdf0e10cSrcweir-files="$dummy.c $dummy.o $dummy.rel $dummy" ; 1716cdf0e10cSrcweir-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; 1717cdf0e10cSrcweir+set_cc_for_build=' 1718cdf0e10cSrcweir+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 1719cdf0e10cSrcweir+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 1720cdf0e10cSrcweir+: ${TMPDIR=/tmp} ; 1721cdf0e10cSrcweir+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 1722cdf0e10cSrcweir+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 1723cdf0e10cSrcweir+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 1724cdf0e10cSrcweir+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 1725cdf0e10cSrcweir+dummy=$tmp/dummy ; 1726cdf0e10cSrcweir+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 1727cdf0e10cSrcweir case $CC_FOR_BUILD,$HOST_CC,$CC in 1728cdf0e10cSrcweir ,,) echo "int x;" > $dummy.c ; 1729cdf0e10cSrcweir for c in cc gcc c89 c99 ; do 1730cdf0e10cSrcweir@@ -113,15 +121,13 @@ 1731cdf0e10cSrcweir CC_FOR_BUILD="$c"; break ; 1732cdf0e10cSrcweir fi ; 1733cdf0e10cSrcweir done ; 1734cdf0e10cSrcweir- rm -f $files ; 1735cdf0e10cSrcweir if test x"$CC_FOR_BUILD" = x ; then 1736cdf0e10cSrcweir CC_FOR_BUILD=no_compiler_found ; 1737cdf0e10cSrcweir fi 1738cdf0e10cSrcweir ;; 1739cdf0e10cSrcweir ,,*) CC_FOR_BUILD=$CC ;; 1740cdf0e10cSrcweir ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1741cdf0e10cSrcweir-esac ; 1742cdf0e10cSrcweir-unset files' 1743cdf0e10cSrcweir+esac ; set_cc_for_build= ;' 1744cdf0e10cSrcweir 1745cdf0e10cSrcweir # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 1746cdf0e10cSrcweir # (ghazi@noc.rutgers.edu 1994-08-24) 1747cdf0e10cSrcweir@@ -156,6 +162,7 @@ 1748cdf0e10cSrcweir arm*) machine=arm-unknown ;; 1749cdf0e10cSrcweir sh3el) machine=shl-unknown ;; 1750cdf0e10cSrcweir sh3eb) machine=sh-unknown ;; 1751cdf0e10cSrcweir+ sh5el) machine=sh5le-unknown ;; 1752cdf0e10cSrcweir *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 1753cdf0e10cSrcweir esac 1754cdf0e10cSrcweir # The Operating System including object format, if it has switched 1755cdf0e10cSrcweir@@ -164,7 +171,7 @@ 1756cdf0e10cSrcweir arm*|i386|m68k|ns32k|sh3*|sparc|vax) 1757cdf0e10cSrcweir eval $set_cc_for_build 1758cdf0e10cSrcweir if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1759cdf0e10cSrcweir- | grep __ELF__ >/dev/null 1760cdf0e10cSrcweir+ | grep -q __ELF__ 1761cdf0e10cSrcweir then 1762cdf0e10cSrcweir # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 1763cdf0e10cSrcweir # Return netbsd for either. FIX? 1764cdf0e10cSrcweir@@ -178,144 +185,128 @@ 1765cdf0e10cSrcweir ;; 1766cdf0e10cSrcweir esac 1767cdf0e10cSrcweir # The OS release 1768cdf0e10cSrcweir- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 1769cdf0e10cSrcweir+ # Debian GNU/NetBSD machines have a different userland, and 1770cdf0e10cSrcweir+ # thus, need a distinct triplet. However, they do not need 1771cdf0e10cSrcweir+ # kernel version information, so it can be replaced with a 1772cdf0e10cSrcweir+ # suitable tag, in the style of linux-gnu. 1773cdf0e10cSrcweir+ case "${UNAME_VERSION}" in 1774cdf0e10cSrcweir+ Debian*) 1775cdf0e10cSrcweir+ release='-gnu' 1776cdf0e10cSrcweir+ ;; 1777cdf0e10cSrcweir+ *) 1778cdf0e10cSrcweir+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 1779cdf0e10cSrcweir+ ;; 1780cdf0e10cSrcweir+ esac 1781cdf0e10cSrcweir # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 1782cdf0e10cSrcweir # contains redundant information, the shorter form: 1783cdf0e10cSrcweir # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 1784cdf0e10cSrcweir echo "${machine}-${os}${release}" 1785cdf0e10cSrcweir- exit 0 ;; 1786cdf0e10cSrcweir- amiga:OpenBSD:*:*) 1787cdf0e10cSrcweir- echo m68k-unknown-openbsd${UNAME_RELEASE} 1788cdf0e10cSrcweir- exit 0 ;; 1789cdf0e10cSrcweir- arc:OpenBSD:*:*) 1790cdf0e10cSrcweir- echo mipsel-unknown-openbsd${UNAME_RELEASE} 1791cdf0e10cSrcweir- exit 0 ;; 1792cdf0e10cSrcweir- hp300:OpenBSD:*:*) 1793cdf0e10cSrcweir- echo m68k-unknown-openbsd${UNAME_RELEASE} 1794cdf0e10cSrcweir- exit 0 ;; 1795cdf0e10cSrcweir- mac68k:OpenBSD:*:*) 1796cdf0e10cSrcweir- echo m68k-unknown-openbsd${UNAME_RELEASE} 1797cdf0e10cSrcweir- exit 0 ;; 1798cdf0e10cSrcweir- macppc:OpenBSD:*:*) 1799cdf0e10cSrcweir- echo powerpc-unknown-openbsd${UNAME_RELEASE} 1800cdf0e10cSrcweir- exit 0 ;; 1801cdf0e10cSrcweir- mvme68k:OpenBSD:*:*) 1802cdf0e10cSrcweir- echo m68k-unknown-openbsd${UNAME_RELEASE} 1803cdf0e10cSrcweir- exit 0 ;; 1804cdf0e10cSrcweir- mvme88k:OpenBSD:*:*) 1805cdf0e10cSrcweir- echo m88k-unknown-openbsd${UNAME_RELEASE} 1806cdf0e10cSrcweir- exit 0 ;; 1807cdf0e10cSrcweir- mvmeppc:OpenBSD:*:*) 1808cdf0e10cSrcweir- echo powerpc-unknown-openbsd${UNAME_RELEASE} 1809cdf0e10cSrcweir- exit 0 ;; 1810cdf0e10cSrcweir- pmax:OpenBSD:*:*) 1811cdf0e10cSrcweir- echo mipsel-unknown-openbsd${UNAME_RELEASE} 1812cdf0e10cSrcweir- exit 0 ;; 1813cdf0e10cSrcweir- sgi:OpenBSD:*:*) 1814cdf0e10cSrcweir- echo mipseb-unknown-openbsd${UNAME_RELEASE} 1815cdf0e10cSrcweir- exit 0 ;; 1816cdf0e10cSrcweir- sun3:OpenBSD:*:*) 1817cdf0e10cSrcweir- echo m68k-unknown-openbsd${UNAME_RELEASE} 1818cdf0e10cSrcweir- exit 0 ;; 1819cdf0e10cSrcweir- wgrisc:OpenBSD:*:*) 1820cdf0e10cSrcweir- echo mipsel-unknown-openbsd${UNAME_RELEASE} 1821cdf0e10cSrcweir- exit 0 ;; 1822cdf0e10cSrcweir+ exit ;; 1823cdf0e10cSrcweir *:OpenBSD:*:*) 1824cdf0e10cSrcweir- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 1825cdf0e10cSrcweir- exit 0 ;; 1826cdf0e10cSrcweir+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 1827cdf0e10cSrcweir+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 1828cdf0e10cSrcweir+ exit ;; 1829cdf0e10cSrcweir+ *:ekkoBSD:*:*) 1830cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 1831cdf0e10cSrcweir+ exit ;; 1832cdf0e10cSrcweir+ *:SolidBSD:*:*) 1833cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 1834cdf0e10cSrcweir+ exit ;; 1835cdf0e10cSrcweir+ macppc:MirBSD:*:*) 1836cdf0e10cSrcweir+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} 1837cdf0e10cSrcweir+ exit ;; 1838cdf0e10cSrcweir+ *:MirBSD:*:*) 1839cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 1840cdf0e10cSrcweir+ exit ;; 1841cdf0e10cSrcweir alpha:OSF1:*:*) 1842cdf0e10cSrcweir- if test $UNAME_RELEASE = "V4.0"; then 1843cdf0e10cSrcweir+ case $UNAME_RELEASE in 1844cdf0e10cSrcweir+ *4.0) 1845cdf0e10cSrcweir UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 1846cdf0e10cSrcweir- fi 1847cdf0e10cSrcweir+ ;; 1848cdf0e10cSrcweir+ *5.*) 1849cdf0e10cSrcweir+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 1850cdf0e10cSrcweir+ ;; 1851cdf0e10cSrcweir+ esac 1852cdf0e10cSrcweir+ # According to Compaq, /usr/sbin/psrinfo has been available on 1853cdf0e10cSrcweir+ # OSF/1 and Tru64 systems produced since 1995. I hope that 1854cdf0e10cSrcweir+ # covers most systems running today. This code pipes the CPU 1855cdf0e10cSrcweir+ # types through head -n 1, so we only detect the type of CPU 0. 1856cdf0e10cSrcweir+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 1857cdf0e10cSrcweir+ case "$ALPHA_CPU_TYPE" in 1858cdf0e10cSrcweir+ "EV4 (21064)") 1859cdf0e10cSrcweir+ UNAME_MACHINE="alpha" ;; 1860cdf0e10cSrcweir+ "EV4.5 (21064)") 1861cdf0e10cSrcweir+ UNAME_MACHINE="alpha" ;; 1862cdf0e10cSrcweir+ "LCA4 (21066/21068)") 1863cdf0e10cSrcweir+ UNAME_MACHINE="alpha" ;; 1864cdf0e10cSrcweir+ "EV5 (21164)") 1865cdf0e10cSrcweir+ UNAME_MACHINE="alphaev5" ;; 1866cdf0e10cSrcweir+ "EV5.6 (21164A)") 1867cdf0e10cSrcweir+ UNAME_MACHINE="alphaev56" ;; 1868cdf0e10cSrcweir+ "EV5.6 (21164PC)") 1869cdf0e10cSrcweir+ UNAME_MACHINE="alphapca56" ;; 1870cdf0e10cSrcweir+ "EV5.7 (21164PC)") 1871cdf0e10cSrcweir+ UNAME_MACHINE="alphapca57" ;; 1872cdf0e10cSrcweir+ "EV6 (21264)") 1873cdf0e10cSrcweir+ UNAME_MACHINE="alphaev6" ;; 1874cdf0e10cSrcweir+ "EV6.7 (21264A)") 1875cdf0e10cSrcweir+ UNAME_MACHINE="alphaev67" ;; 1876cdf0e10cSrcweir+ "EV6.8CB (21264C)") 1877cdf0e10cSrcweir+ UNAME_MACHINE="alphaev68" ;; 1878cdf0e10cSrcweir+ "EV6.8AL (21264B)") 1879cdf0e10cSrcweir+ UNAME_MACHINE="alphaev68" ;; 1880cdf0e10cSrcweir+ "EV6.8CX (21264D)") 1881cdf0e10cSrcweir+ UNAME_MACHINE="alphaev68" ;; 1882cdf0e10cSrcweir+ "EV6.9A (21264/EV69A)") 1883cdf0e10cSrcweir+ UNAME_MACHINE="alphaev69" ;; 1884cdf0e10cSrcweir+ "EV7 (21364)") 1885cdf0e10cSrcweir+ UNAME_MACHINE="alphaev7" ;; 1886cdf0e10cSrcweir+ "EV7.9 (21364A)") 1887cdf0e10cSrcweir+ UNAME_MACHINE="alphaev79" ;; 1888cdf0e10cSrcweir+ esac 1889cdf0e10cSrcweir+ # A Pn.n version is a patched version. 1890cdf0e10cSrcweir # A Vn.n version is a released version. 1891cdf0e10cSrcweir # A Tn.n version is a released field test version. 1892cdf0e10cSrcweir # A Xn.n version is an unreleased experimental baselevel. 1893cdf0e10cSrcweir # 1.2 uses "1.2" for uname -r. 1894cdf0e10cSrcweir- eval $set_cc_for_build 1895cdf0e10cSrcweir- cat <<EOF >$dummy.s 1896cdf0e10cSrcweir- .data 1897cdf0e10cSrcweir-\$Lformat: 1898cdf0e10cSrcweir- .byte 37,100,45,37,120,10,0 # "%d-%x\n" 1899cdf0e10cSrcweir- 1900cdf0e10cSrcweir- .text 1901cdf0e10cSrcweir- .globl main 1902cdf0e10cSrcweir- .align 4 1903cdf0e10cSrcweir- .ent main 1904cdf0e10cSrcweir-main: 1905cdf0e10cSrcweir- .frame \$30,16,\$26,0 1906cdf0e10cSrcweir- ldgp \$29,0(\$27) 1907cdf0e10cSrcweir- .prologue 1 1908cdf0e10cSrcweir- .long 0x47e03d80 # implver \$0 1909cdf0e10cSrcweir- lda \$2,-1 1910cdf0e10cSrcweir- .long 0x47e20c21 # amask \$2,\$1 1911cdf0e10cSrcweir- lda \$16,\$Lformat 1912cdf0e10cSrcweir- mov \$0,\$17 1913cdf0e10cSrcweir- not \$1,\$18 1914cdf0e10cSrcweir- jsr \$26,printf 1915cdf0e10cSrcweir- ldgp \$29,0(\$26) 1916cdf0e10cSrcweir- mov 0,\$16 1917cdf0e10cSrcweir- jsr \$26,exit 1918cdf0e10cSrcweir- .end main 1919cdf0e10cSrcweir-EOF 1920cdf0e10cSrcweir- $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null 1921cdf0e10cSrcweir- if test "$?" = 0 ; then 1922cdf0e10cSrcweir- case `$dummy` in 1923cdf0e10cSrcweir- 0-0) 1924cdf0e10cSrcweir- UNAME_MACHINE="alpha" 1925cdf0e10cSrcweir- ;; 1926cdf0e10cSrcweir- 1-0) 1927cdf0e10cSrcweir- UNAME_MACHINE="alphaev5" 1928cdf0e10cSrcweir- ;; 1929cdf0e10cSrcweir- 1-1) 1930cdf0e10cSrcweir- UNAME_MACHINE="alphaev56" 1931cdf0e10cSrcweir- ;; 1932cdf0e10cSrcweir- 1-101) 1933cdf0e10cSrcweir- UNAME_MACHINE="alphapca56" 1934cdf0e10cSrcweir- ;; 1935cdf0e10cSrcweir- 2-303) 1936cdf0e10cSrcweir- UNAME_MACHINE="alphaev6" 1937cdf0e10cSrcweir- ;; 1938cdf0e10cSrcweir- 2-307) 1939cdf0e10cSrcweir- UNAME_MACHINE="alphaev67" 1940cdf0e10cSrcweir- ;; 1941cdf0e10cSrcweir- 2-1307) 1942cdf0e10cSrcweir- UNAME_MACHINE="alphaev68" 1943cdf0e10cSrcweir- ;; 1944cdf0e10cSrcweir- 3-1307) 1945cdf0e10cSrcweir- UNAME_MACHINE="alphaev7" 1946cdf0e10cSrcweir- ;; 1947cdf0e10cSrcweir- esac 1948cdf0e10cSrcweir- fi 1949cdf0e10cSrcweir- rm -f $dummy.s $dummy && rmdir $tmpdir 1950cdf0e10cSrcweir- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 1951cdf0e10cSrcweir- exit 0 ;; 1952cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 1953cdf0e10cSrcweir+ exit ;; 1954cdf0e10cSrcweir Alpha\ *:Windows_NT*:*) 1955cdf0e10cSrcweir # How do we know it's Interix rather than the generic POSIX subsystem? 1956cdf0e10cSrcweir # Should we change UNAME_MACHINE based on the output of uname instead 1957cdf0e10cSrcweir # of the specific Alpha model? 1958cdf0e10cSrcweir echo alpha-pc-interix 1959cdf0e10cSrcweir- exit 0 ;; 1960cdf0e10cSrcweir+ exit ;; 1961cdf0e10cSrcweir 21064:Windows_NT:50:3) 1962cdf0e10cSrcweir echo alpha-dec-winnt3.5 1963cdf0e10cSrcweir- exit 0 ;; 1964cdf0e10cSrcweir+ exit ;; 1965cdf0e10cSrcweir Amiga*:UNIX_System_V:4.0:*) 1966cdf0e10cSrcweir echo m68k-unknown-sysv4 1967cdf0e10cSrcweir- exit 0;; 1968cdf0e10cSrcweir+ exit ;; 1969cdf0e10cSrcweir *:[Aa]miga[Oo][Ss]:*:*) 1970cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-amigaos 1971cdf0e10cSrcweir- exit 0 ;; 1972cdf0e10cSrcweir+ exit ;; 1973cdf0e10cSrcweir *:[Mm]orph[Oo][Ss]:*:*) 1974cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-morphos 1975cdf0e10cSrcweir- exit 0 ;; 1976cdf0e10cSrcweir+ exit ;; 1977cdf0e10cSrcweir *:OS/390:*:*) 1978cdf0e10cSrcweir echo i370-ibm-openedition 1979cdf0e10cSrcweir- exit 0 ;; 1980cdf0e10cSrcweir+ exit ;; 1981cdf0e10cSrcweir+ *:z/VM:*:*) 1982cdf0e10cSrcweir+ echo s390-ibm-zvmoe 1983cdf0e10cSrcweir+ exit ;; 1984cdf0e10cSrcweir+ *:OS400:*:*) 1985cdf0e10cSrcweir+ echo powerpc-ibm-os400 1986cdf0e10cSrcweir+ exit ;; 1987cdf0e10cSrcweir arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 1988cdf0e10cSrcweir echo arm-acorn-riscix${UNAME_RELEASE} 1989cdf0e10cSrcweir- exit 0;; 1990cdf0e10cSrcweir+ exit ;; 1991cdf0e10cSrcweir+ arm:riscos:*:*|arm:RISCOS:*:*) 1992cdf0e10cSrcweir+ echo arm-unknown-riscos 1993cdf0e10cSrcweir+ exit ;; 1994cdf0e10cSrcweir SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 1995cdf0e10cSrcweir echo hppa1.1-hitachi-hiuxmpp 1996cdf0e10cSrcweir- exit 0;; 1997cdf0e10cSrcweir+ exit ;; 1998cdf0e10cSrcweir Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 1999cdf0e10cSrcweir # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 2000cdf0e10cSrcweir if test "`(/bin/universe) 2>/dev/null`" = att ; then 2001cdf0e10cSrcweir@@ -323,29 +314,51 @@ 2002cdf0e10cSrcweir else 2003cdf0e10cSrcweir echo pyramid-pyramid-bsd 2004cdf0e10cSrcweir fi 2005cdf0e10cSrcweir- exit 0 ;; 2006cdf0e10cSrcweir+ exit ;; 2007cdf0e10cSrcweir NILE*:*:*:dcosx) 2008cdf0e10cSrcweir echo pyramid-pyramid-svr4 2009cdf0e10cSrcweir- exit 0 ;; 2010cdf0e10cSrcweir- DRS?6000:UNIX_SV:4.2*:7*) 2011cdf0e10cSrcweir+ exit ;; 2012cdf0e10cSrcweir+ DRS?6000:unix:4.0:6*) 2013cdf0e10cSrcweir+ echo sparc-icl-nx6 2014cdf0e10cSrcweir+ exit ;; 2015cdf0e10cSrcweir+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 2016cdf0e10cSrcweir case `/usr/bin/uname -p` in 2017cdf0e10cSrcweir- sparc) echo sparc-icl-nx7 && exit 0 ;; 2018cdf0e10cSrcweir+ sparc) echo sparc-icl-nx7; exit ;; 2019cdf0e10cSrcweir esac ;; 2020cdf0e10cSrcweir+ s390x:SunOS:*:*) 2021cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 2022cdf0e10cSrcweir+ exit ;; 2023cdf0e10cSrcweir sun4H:SunOS:5.*:*) 2024cdf0e10cSrcweir echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 2025cdf0e10cSrcweir- exit 0 ;; 2026cdf0e10cSrcweir+ exit ;; 2027cdf0e10cSrcweir sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 2028cdf0e10cSrcweir echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 2029cdf0e10cSrcweir- exit 0 ;; 2030cdf0e10cSrcweir- i86pc:SunOS:5.*:*) 2031cdf0e10cSrcweir- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 2032cdf0e10cSrcweir- exit 0 ;; 2033cdf0e10cSrcweir+ exit ;; 2034cdf0e10cSrcweir+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 2035cdf0e10cSrcweir+ echo i386-pc-auroraux${UNAME_RELEASE} 2036cdf0e10cSrcweir+ exit ;; 2037cdf0e10cSrcweir+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 2038cdf0e10cSrcweir+ eval $set_cc_for_build 2039cdf0e10cSrcweir+ SUN_ARCH="i386" 2040cdf0e10cSrcweir+ # If there is a compiler, see if it is configured for 64-bit objects. 2041cdf0e10cSrcweir+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 2042cdf0e10cSrcweir+ # This test works for both compilers. 2043cdf0e10cSrcweir+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 2044cdf0e10cSrcweir+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 2045cdf0e10cSrcweir+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 2046cdf0e10cSrcweir+ grep IS_64BIT_ARCH >/dev/null 2047cdf0e10cSrcweir+ then 2048cdf0e10cSrcweir+ SUN_ARCH="x86_64" 2049cdf0e10cSrcweir+ fi 2050cdf0e10cSrcweir+ fi 2051cdf0e10cSrcweir+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 2052cdf0e10cSrcweir+ exit ;; 2053cdf0e10cSrcweir sun4*:SunOS:6*:*) 2054cdf0e10cSrcweir # According to config.sub, this is the proper way to canonicalize 2055cdf0e10cSrcweir # SunOS6. Hard to guess exactly what SunOS6 will be like, but 2056cdf0e10cSrcweir # it's likely to be more like Solaris than SunOS4. 2057cdf0e10cSrcweir echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 2058cdf0e10cSrcweir- exit 0 ;; 2059cdf0e10cSrcweir+ exit ;; 2060cdf0e10cSrcweir sun4*:SunOS:*:*) 2061cdf0e10cSrcweir case "`/usr/bin/arch -k`" in 2062cdf0e10cSrcweir Series*|S4*) 2063cdf0e10cSrcweir@@ -354,10 +367,10 @@ 2064cdf0e10cSrcweir esac 2065cdf0e10cSrcweir # Japanese Language versions have a version number like `4.1.3-JL'. 2066cdf0e10cSrcweir echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 2067cdf0e10cSrcweir- exit 0 ;; 2068cdf0e10cSrcweir+ exit ;; 2069cdf0e10cSrcweir sun3*:SunOS:*:*) 2070cdf0e10cSrcweir echo m68k-sun-sunos${UNAME_RELEASE} 2071cdf0e10cSrcweir- exit 0 ;; 2072cdf0e10cSrcweir+ exit ;; 2073cdf0e10cSrcweir sun*:*:4.2BSD:*) 2074cdf0e10cSrcweir UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 2075cdf0e10cSrcweir test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 2076cdf0e10cSrcweir@@ -369,10 +382,10 @@ 2077cdf0e10cSrcweir echo sparc-sun-sunos${UNAME_RELEASE} 2078cdf0e10cSrcweir ;; 2079cdf0e10cSrcweir esac 2080cdf0e10cSrcweir- exit 0 ;; 2081cdf0e10cSrcweir+ exit ;; 2082cdf0e10cSrcweir aushp:SunOS:*:*) 2083cdf0e10cSrcweir echo sparc-auspex-sunos${UNAME_RELEASE} 2084cdf0e10cSrcweir- exit 0 ;; 2085cdf0e10cSrcweir+ exit ;; 2086cdf0e10cSrcweir # The situation for MiNT is a little confusing. The machine name 2087cdf0e10cSrcweir # can be virtually everything (everything which is not 2088cdf0e10cSrcweir # "atarist" or "atariste" at least should have a processor 2089cdf0e10cSrcweir@@ -383,37 +396,40 @@ 2090cdf0e10cSrcweir # be no problem. 2091cdf0e10cSrcweir atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 2092cdf0e10cSrcweir echo m68k-atari-mint${UNAME_RELEASE} 2093cdf0e10cSrcweir- exit 0 ;; 2094cdf0e10cSrcweir+ exit ;; 2095cdf0e10cSrcweir atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 2096cdf0e10cSrcweir echo m68k-atari-mint${UNAME_RELEASE} 2097cdf0e10cSrcweir- exit 0 ;; 2098cdf0e10cSrcweir+ exit ;; 2099cdf0e10cSrcweir *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 2100cdf0e10cSrcweir echo m68k-atari-mint${UNAME_RELEASE} 2101cdf0e10cSrcweir- exit 0 ;; 2102cdf0e10cSrcweir+ exit ;; 2103cdf0e10cSrcweir milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 2104cdf0e10cSrcweir echo m68k-milan-mint${UNAME_RELEASE} 2105cdf0e10cSrcweir- exit 0 ;; 2106cdf0e10cSrcweir+ exit ;; 2107cdf0e10cSrcweir hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 2108cdf0e10cSrcweir echo m68k-hades-mint${UNAME_RELEASE} 2109cdf0e10cSrcweir- exit 0 ;; 2110cdf0e10cSrcweir+ exit ;; 2111cdf0e10cSrcweir *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 2112cdf0e10cSrcweir echo m68k-unknown-mint${UNAME_RELEASE} 2113cdf0e10cSrcweir- exit 0 ;; 2114cdf0e10cSrcweir+ exit ;; 2115cdf0e10cSrcweir+ m68k:machten:*:*) 2116cdf0e10cSrcweir+ echo m68k-apple-machten${UNAME_RELEASE} 2117cdf0e10cSrcweir+ exit ;; 2118cdf0e10cSrcweir powerpc:machten:*:*) 2119cdf0e10cSrcweir echo powerpc-apple-machten${UNAME_RELEASE} 2120cdf0e10cSrcweir- exit 0 ;; 2121cdf0e10cSrcweir+ exit ;; 2122cdf0e10cSrcweir RISC*:Mach:*:*) 2123cdf0e10cSrcweir echo mips-dec-mach_bsd4.3 2124cdf0e10cSrcweir- exit 0 ;; 2125cdf0e10cSrcweir+ exit ;; 2126cdf0e10cSrcweir RISC*:ULTRIX:*:*) 2127cdf0e10cSrcweir echo mips-dec-ultrix${UNAME_RELEASE} 2128cdf0e10cSrcweir- exit 0 ;; 2129cdf0e10cSrcweir+ exit ;; 2130cdf0e10cSrcweir VAX*:ULTRIX*:*:*) 2131cdf0e10cSrcweir echo vax-dec-ultrix${UNAME_RELEASE} 2132cdf0e10cSrcweir- exit 0 ;; 2133cdf0e10cSrcweir+ exit ;; 2134cdf0e10cSrcweir 2020:CLIX:*:* | 2430:CLIX:*:*) 2135cdf0e10cSrcweir echo clipper-intergraph-clix${UNAME_RELEASE} 2136cdf0e10cSrcweir- exit 0 ;; 2137cdf0e10cSrcweir+ exit ;; 2138cdf0e10cSrcweir mips:*:*:UMIPS | mips:*:*:RISCos) 2139cdf0e10cSrcweir eval $set_cc_for_build 2140cdf0e10cSrcweir sed 's/^ //' << EOF >$dummy.c 2141cdf0e10cSrcweir@@ -437,33 +453,33 @@ 2142cdf0e10cSrcweir exit (-1); 2143cdf0e10cSrcweir } 2144cdf0e10cSrcweir EOF 2145cdf0e10cSrcweir- $CC_FOR_BUILD -o $dummy $dummy.c \ 2146cdf0e10cSrcweir- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 2147cdf0e10cSrcweir- && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 2148cdf0e10cSrcweir- rm -f $dummy.c $dummy && rmdir $tmpdir 2149cdf0e10cSrcweir+ $CC_FOR_BUILD -o $dummy $dummy.c && 2150cdf0e10cSrcweir+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 2151cdf0e10cSrcweir+ SYSTEM_NAME=`$dummy $dummyarg` && 2152cdf0e10cSrcweir+ { echo "$SYSTEM_NAME"; exit; } 2153cdf0e10cSrcweir echo mips-mips-riscos${UNAME_RELEASE} 2154cdf0e10cSrcweir- exit 0 ;; 2155cdf0e10cSrcweir+ exit ;; 2156cdf0e10cSrcweir Motorola:PowerMAX_OS:*:*) 2157cdf0e10cSrcweir echo powerpc-motorola-powermax 2158cdf0e10cSrcweir- exit 0 ;; 2159cdf0e10cSrcweir+ exit ;; 2160cdf0e10cSrcweir Motorola:*:4.3:PL8-*) 2161cdf0e10cSrcweir echo powerpc-harris-powermax 2162cdf0e10cSrcweir- exit 0 ;; 2163cdf0e10cSrcweir- Night_Hawk:*:*:PowerMAX_OS) 2164cdf0e10cSrcweir+ exit ;; 2165cdf0e10cSrcweir+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 2166cdf0e10cSrcweir echo powerpc-harris-powermax 2167cdf0e10cSrcweir- exit 0 ;; 2168cdf0e10cSrcweir+ exit ;; 2169cdf0e10cSrcweir Night_Hawk:Power_UNIX:*:*) 2170cdf0e10cSrcweir echo powerpc-harris-powerunix 2171cdf0e10cSrcweir- exit 0 ;; 2172cdf0e10cSrcweir+ exit ;; 2173cdf0e10cSrcweir m88k:CX/UX:7*:*) 2174cdf0e10cSrcweir echo m88k-harris-cxux7 2175cdf0e10cSrcweir- exit 0 ;; 2176cdf0e10cSrcweir+ exit ;; 2177cdf0e10cSrcweir m88k:*:4*:R4*) 2178cdf0e10cSrcweir echo m88k-motorola-sysv4 2179cdf0e10cSrcweir- exit 0 ;; 2180cdf0e10cSrcweir+ exit ;; 2181cdf0e10cSrcweir m88k:*:3*:R3*) 2182cdf0e10cSrcweir echo m88k-motorola-sysv3 2183cdf0e10cSrcweir- exit 0 ;; 2184cdf0e10cSrcweir+ exit ;; 2185cdf0e10cSrcweir AViiON:dgux:*:*) 2186cdf0e10cSrcweir # DG/UX returns AViiON for all architectures 2187cdf0e10cSrcweir UNAME_PROCESSOR=`/usr/bin/uname -p` 2188cdf0e10cSrcweir@@ -479,29 +495,29 @@ 2189cdf0e10cSrcweir else 2190cdf0e10cSrcweir echo i586-dg-dgux${UNAME_RELEASE} 2191cdf0e10cSrcweir fi 2192cdf0e10cSrcweir- exit 0 ;; 2193cdf0e10cSrcweir+ exit ;; 2194cdf0e10cSrcweir M88*:DolphinOS:*:*) # DolphinOS (SVR3) 2195cdf0e10cSrcweir echo m88k-dolphin-sysv3 2196cdf0e10cSrcweir- exit 0 ;; 2197cdf0e10cSrcweir+ exit ;; 2198cdf0e10cSrcweir M88*:*:R3*:*) 2199cdf0e10cSrcweir # Delta 88k system running SVR3 2200cdf0e10cSrcweir echo m88k-motorola-sysv3 2201cdf0e10cSrcweir- exit 0 ;; 2202cdf0e10cSrcweir+ exit ;; 2203cdf0e10cSrcweir XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 2204cdf0e10cSrcweir echo m88k-tektronix-sysv3 2205cdf0e10cSrcweir- exit 0 ;; 2206cdf0e10cSrcweir+ exit ;; 2207cdf0e10cSrcweir Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 2208cdf0e10cSrcweir echo m68k-tektronix-bsd 2209cdf0e10cSrcweir- exit 0 ;; 2210cdf0e10cSrcweir+ exit ;; 2211cdf0e10cSrcweir *:IRIX*:*:*) 2212cdf0e10cSrcweir echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 2213cdf0e10cSrcweir- exit 0 ;; 2214cdf0e10cSrcweir+ exit ;; 2215cdf0e10cSrcweir ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 2216cdf0e10cSrcweir- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 2217cdf0e10cSrcweir- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 2218cdf0e10cSrcweir+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 2219cdf0e10cSrcweir+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 2220cdf0e10cSrcweir i*86:AIX:*:*) 2221cdf0e10cSrcweir echo i386-ibm-aix 2222cdf0e10cSrcweir- exit 0 ;; 2223cdf0e10cSrcweir+ exit ;; 2224cdf0e10cSrcweir ia64:AIX:*:*) 2225cdf0e10cSrcweir if [ -x /usr/bin/oslevel ] ; then 2226cdf0e10cSrcweir IBM_REV=`/usr/bin/oslevel` 2227cdf0e10cSrcweir@@ -509,7 +525,7 @@ 2228cdf0e10cSrcweir IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 2229cdf0e10cSrcweir fi 2230cdf0e10cSrcweir echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 2231cdf0e10cSrcweir- exit 0 ;; 2232cdf0e10cSrcweir+ exit ;; 2233cdf0e10cSrcweir *:AIX:2:3) 2234cdf0e10cSrcweir if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 2235cdf0e10cSrcweir eval $set_cc_for_build 2236cdf0e10cSrcweir@@ -524,16 +540,19 @@ 2237cdf0e10cSrcweir exit(0); 2238cdf0e10cSrcweir } 2239cdf0e10cSrcweir EOF 2240cdf0e10cSrcweir- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 2241cdf0e10cSrcweir- rm -f $dummy.c $dummy && rmdir $tmpdir 2242cdf0e10cSrcweir- echo rs6000-ibm-aix3.2.5 2243cdf0e10cSrcweir+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 2244cdf0e10cSrcweir+ then 2245cdf0e10cSrcweir+ echo "$SYSTEM_NAME" 2246cdf0e10cSrcweir+ else 2247cdf0e10cSrcweir+ echo rs6000-ibm-aix3.2.5 2248cdf0e10cSrcweir+ fi 2249cdf0e10cSrcweir elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 2250cdf0e10cSrcweir echo rs6000-ibm-aix3.2.4 2251cdf0e10cSrcweir else 2252cdf0e10cSrcweir echo rs6000-ibm-aix3.2 2253cdf0e10cSrcweir fi 2254cdf0e10cSrcweir- exit 0 ;; 2255cdf0e10cSrcweir- *:AIX:*:[45]) 2256cdf0e10cSrcweir+ exit ;; 2257cdf0e10cSrcweir+ *:AIX:*:[456]) 2258cdf0e10cSrcweir IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 2259cdf0e10cSrcweir if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 2260cdf0e10cSrcweir IBM_ARCH=rs6000 2261cdf0e10cSrcweir@@ -546,28 +565,28 @@ 2262cdf0e10cSrcweir IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 2263cdf0e10cSrcweir fi 2264cdf0e10cSrcweir echo ${IBM_ARCH}-ibm-aix${IBM_REV} 2265cdf0e10cSrcweir- exit 0 ;; 2266cdf0e10cSrcweir+ exit ;; 2267cdf0e10cSrcweir *:AIX:*:*) 2268cdf0e10cSrcweir echo rs6000-ibm-aix 2269cdf0e10cSrcweir- exit 0 ;; 2270cdf0e10cSrcweir+ exit ;; 2271cdf0e10cSrcweir ibmrt:4.4BSD:*|romp-ibm:BSD:*) 2272cdf0e10cSrcweir echo romp-ibm-bsd4.4 2273cdf0e10cSrcweir- exit 0 ;; 2274cdf0e10cSrcweir+ exit ;; 2275cdf0e10cSrcweir ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 2276cdf0e10cSrcweir echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 2277cdf0e10cSrcweir- exit 0 ;; # report: romp-ibm BSD 4.3 2278cdf0e10cSrcweir+ exit ;; # report: romp-ibm BSD 4.3 2279cdf0e10cSrcweir *:BOSX:*:*) 2280cdf0e10cSrcweir echo rs6000-bull-bosx 2281cdf0e10cSrcweir- exit 0 ;; 2282cdf0e10cSrcweir+ exit ;; 2283cdf0e10cSrcweir DPX/2?00:B.O.S.:*:*) 2284cdf0e10cSrcweir echo m68k-bull-sysv3 2285cdf0e10cSrcweir- exit 0 ;; 2286cdf0e10cSrcweir+ exit ;; 2287cdf0e10cSrcweir 9000/[34]??:4.3bsd:1.*:*) 2288cdf0e10cSrcweir echo m68k-hp-bsd 2289cdf0e10cSrcweir- exit 0 ;; 2290cdf0e10cSrcweir+ exit ;; 2291cdf0e10cSrcweir hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 2292cdf0e10cSrcweir echo m68k-hp-bsd4.4 2293cdf0e10cSrcweir- exit 0 ;; 2294cdf0e10cSrcweir+ exit ;; 2295cdf0e10cSrcweir 9000/[34678]??:HP-UX:*:*) 2296cdf0e10cSrcweir HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 2297cdf0e10cSrcweir case "${UNAME_MACHINE}" in 2298cdf0e10cSrcweir@@ -624,16 +643,36 @@ 2299cdf0e10cSrcweir } 2300cdf0e10cSrcweir EOF 2301cdf0e10cSrcweir (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 2302cdf0e10cSrcweir- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 2303cdf0e10cSrcweir- rm -f $dummy.c $dummy && rmdir $tmpdir 2304cdf0e10cSrcweir+ test -z "$HP_ARCH" && HP_ARCH=hppa 2305cdf0e10cSrcweir fi ;; 2306cdf0e10cSrcweir esac 2307cdf0e10cSrcweir+ if [ ${HP_ARCH} = "hppa2.0w" ] 2308cdf0e10cSrcweir+ then 2309cdf0e10cSrcweir+ eval $set_cc_for_build 2310cdf0e10cSrcweir+ 2311cdf0e10cSrcweir+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 2312cdf0e10cSrcweir+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 2313cdf0e10cSrcweir+ # generating 64-bit code. GNU and HP use different nomenclature: 2314cdf0e10cSrcweir+ # 2315cdf0e10cSrcweir+ # $ CC_FOR_BUILD=cc ./config.guess 2316cdf0e10cSrcweir+ # => hppa2.0w-hp-hpux11.23 2317cdf0e10cSrcweir+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 2318cdf0e10cSrcweir+ # => hppa64-hp-hpux11.23 2319cdf0e10cSrcweir+ 2320cdf0e10cSrcweir+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 2321cdf0e10cSrcweir+ grep -q __LP64__ 2322cdf0e10cSrcweir+ then 2323cdf0e10cSrcweir+ HP_ARCH="hppa2.0w" 2324cdf0e10cSrcweir+ else 2325cdf0e10cSrcweir+ HP_ARCH="hppa64" 2326cdf0e10cSrcweir+ fi 2327cdf0e10cSrcweir+ fi 2328cdf0e10cSrcweir echo ${HP_ARCH}-hp-hpux${HPUX_REV} 2329cdf0e10cSrcweir- exit 0 ;; 2330cdf0e10cSrcweir+ exit ;; 2331cdf0e10cSrcweir ia64:HP-UX:*:*) 2332cdf0e10cSrcweir HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 2333cdf0e10cSrcweir echo ia64-hp-hpux${HPUX_REV} 2334cdf0e10cSrcweir- exit 0 ;; 2335cdf0e10cSrcweir+ exit ;; 2336cdf0e10cSrcweir 3050*:HI-UX:*:*) 2337cdf0e10cSrcweir eval $set_cc_for_build 2338cdf0e10cSrcweir sed 's/^ //' << EOF >$dummy.c 2339cdf0e10cSrcweir@@ -661,186 +700,248 @@ 2340cdf0e10cSrcweir exit (0); 2341cdf0e10cSrcweir } 2342cdf0e10cSrcweir EOF 2343cdf0e10cSrcweir- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 2344cdf0e10cSrcweir- rm -f $dummy.c $dummy && rmdir $tmpdir 2345cdf0e10cSrcweir+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 2346cdf0e10cSrcweir+ { echo "$SYSTEM_NAME"; exit; } 2347cdf0e10cSrcweir echo unknown-hitachi-hiuxwe2 2348cdf0e10cSrcweir- exit 0 ;; 2349cdf0e10cSrcweir+ exit ;; 2350cdf0e10cSrcweir 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 2351cdf0e10cSrcweir echo hppa1.1-hp-bsd 2352cdf0e10cSrcweir- exit 0 ;; 2353cdf0e10cSrcweir+ exit ;; 2354cdf0e10cSrcweir 9000/8??:4.3bsd:*:*) 2355cdf0e10cSrcweir echo hppa1.0-hp-bsd 2356cdf0e10cSrcweir- exit 0 ;; 2357cdf0e10cSrcweir+ exit ;; 2358cdf0e10cSrcweir *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 2359cdf0e10cSrcweir echo hppa1.0-hp-mpeix 2360cdf0e10cSrcweir- exit 0 ;; 2361cdf0e10cSrcweir+ exit ;; 2362cdf0e10cSrcweir hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 2363cdf0e10cSrcweir echo hppa1.1-hp-osf 2364cdf0e10cSrcweir- exit 0 ;; 2365cdf0e10cSrcweir+ exit ;; 2366cdf0e10cSrcweir hp8??:OSF1:*:*) 2367cdf0e10cSrcweir echo hppa1.0-hp-osf 2368cdf0e10cSrcweir- exit 0 ;; 2369cdf0e10cSrcweir+ exit ;; 2370cdf0e10cSrcweir i*86:OSF1:*:*) 2371cdf0e10cSrcweir if [ -x /usr/sbin/sysversion ] ; then 2372cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-osf1mk 2373cdf0e10cSrcweir else 2374cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-osf1 2375cdf0e10cSrcweir fi 2376cdf0e10cSrcweir- exit 0 ;; 2377cdf0e10cSrcweir+ exit ;; 2378cdf0e10cSrcweir parisc*:Lites*:*:*) 2379cdf0e10cSrcweir echo hppa1.1-hp-lites 2380cdf0e10cSrcweir- exit 0 ;; 2381cdf0e10cSrcweir+ exit ;; 2382cdf0e10cSrcweir C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 2383cdf0e10cSrcweir echo c1-convex-bsd 2384cdf0e10cSrcweir- exit 0 ;; 2385cdf0e10cSrcweir+ exit ;; 2386cdf0e10cSrcweir C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 2387cdf0e10cSrcweir if getsysinfo -f scalar_acc 2388cdf0e10cSrcweir then echo c32-convex-bsd 2389cdf0e10cSrcweir else echo c2-convex-bsd 2390cdf0e10cSrcweir fi 2391cdf0e10cSrcweir- exit 0 ;; 2392cdf0e10cSrcweir+ exit ;; 2393cdf0e10cSrcweir C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 2394cdf0e10cSrcweir echo c34-convex-bsd 2395cdf0e10cSrcweir- exit 0 ;; 2396cdf0e10cSrcweir+ exit ;; 2397cdf0e10cSrcweir C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 2398cdf0e10cSrcweir echo c38-convex-bsd 2399cdf0e10cSrcweir- exit 0 ;; 2400cdf0e10cSrcweir+ exit ;; 2401cdf0e10cSrcweir C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 2402cdf0e10cSrcweir echo c4-convex-bsd 2403cdf0e10cSrcweir- exit 0 ;; 2404cdf0e10cSrcweir+ exit ;; 2405cdf0e10cSrcweir CRAY*Y-MP:*:*:*) 2406cdf0e10cSrcweir echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 2407cdf0e10cSrcweir- exit 0 ;; 2408cdf0e10cSrcweir+ exit ;; 2409cdf0e10cSrcweir CRAY*[A-Z]90:*:*:*) 2410cdf0e10cSrcweir echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 2411cdf0e10cSrcweir | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 2412cdf0e10cSrcweir -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 2413cdf0e10cSrcweir -e 's/\.[^.]*$/.X/' 2414cdf0e10cSrcweir- exit 0 ;; 2415cdf0e10cSrcweir+ exit ;; 2416cdf0e10cSrcweir CRAY*TS:*:*:*) 2417cdf0e10cSrcweir echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 2418cdf0e10cSrcweir- exit 0 ;; 2419cdf0e10cSrcweir- CRAY*T3D:*:*:*) 2420cdf0e10cSrcweir- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 2421cdf0e10cSrcweir- exit 0 ;; 2422cdf0e10cSrcweir+ exit ;; 2423cdf0e10cSrcweir CRAY*T3E:*:*:*) 2424cdf0e10cSrcweir echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 2425cdf0e10cSrcweir- exit 0 ;; 2426cdf0e10cSrcweir+ exit ;; 2427cdf0e10cSrcweir CRAY*SV1:*:*:*) 2428cdf0e10cSrcweir echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 2429cdf0e10cSrcweir- exit 0 ;; 2430cdf0e10cSrcweir+ exit ;; 2431cdf0e10cSrcweir+ *:UNICOS/mp:*:*) 2432cdf0e10cSrcweir+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 2433cdf0e10cSrcweir+ exit ;; 2434cdf0e10cSrcweir F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 2435cdf0e10cSrcweir FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2436cdf0e10cSrcweir FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 2437cdf0e10cSrcweir FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 2438cdf0e10cSrcweir echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 2439cdf0e10cSrcweir- exit 0 ;; 2440cdf0e10cSrcweir+ exit ;; 2441cdf0e10cSrcweir+ 5000:UNIX_System_V:4.*:*) 2442cdf0e10cSrcweir+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 2443cdf0e10cSrcweir+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 2444cdf0e10cSrcweir+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 2445cdf0e10cSrcweir+ exit ;; 2446cdf0e10cSrcweir i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 2447cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 2448cdf0e10cSrcweir- exit 0 ;; 2449cdf0e10cSrcweir+ exit ;; 2450cdf0e10cSrcweir sparc*:BSD/OS:*:*) 2451cdf0e10cSrcweir echo sparc-unknown-bsdi${UNAME_RELEASE} 2452cdf0e10cSrcweir- exit 0 ;; 2453cdf0e10cSrcweir+ exit ;; 2454cdf0e10cSrcweir *:BSD/OS:*:*) 2455cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 2456cdf0e10cSrcweir- exit 0 ;; 2457cdf0e10cSrcweir+ exit ;; 2458cdf0e10cSrcweir *:FreeBSD:*:*) 2459cdf0e10cSrcweir- # Determine whether the default compiler uses glibc. 2460cdf0e10cSrcweir- eval $set_cc_for_build 2461cdf0e10cSrcweir- sed 's/^ //' << EOF >$dummy.c 2462cdf0e10cSrcweir- #include <features.h> 2463cdf0e10cSrcweir- #if __GLIBC__ >= 2 2464cdf0e10cSrcweir- LIBC=gnu 2465cdf0e10cSrcweir- #else 2466cdf0e10cSrcweir- LIBC= 2467cdf0e10cSrcweir- #endif 2468cdf0e10cSrcweir-EOF 2469cdf0e10cSrcweir- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 2470cdf0e10cSrcweir- rm -f $dummy.c && rmdir $tmpdir 2471cdf0e10cSrcweir- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 2472cdf0e10cSrcweir- exit 0 ;; 2473cdf0e10cSrcweir+ case ${UNAME_MACHINE} in 2474cdf0e10cSrcweir+ pc98) 2475cdf0e10cSrcweir+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 2476cdf0e10cSrcweir+ amd64) 2477cdf0e10cSrcweir+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 2478cdf0e10cSrcweir+ *) 2479cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 2480cdf0e10cSrcweir+ esac 2481cdf0e10cSrcweir+ exit ;; 2482cdf0e10cSrcweir i*:CYGWIN*:*) 2483cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-cygwin 2484cdf0e10cSrcweir- exit 0 ;; 2485cdf0e10cSrcweir- i*:MINGW*:*) 2486cdf0e10cSrcweir+ exit ;; 2487cdf0e10cSrcweir+ *:MINGW*:*) 2488cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-mingw32 2489cdf0e10cSrcweir- exit 0 ;; 2490cdf0e10cSrcweir+ exit ;; 2491cdf0e10cSrcweir+ i*:windows32*:*) 2492cdf0e10cSrcweir+ # uname -m includes "-pc" on this system. 2493cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-mingw32 2494cdf0e10cSrcweir+ exit ;; 2495cdf0e10cSrcweir i*:PW*:*) 2496cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-pw32 2497cdf0e10cSrcweir- exit 0 ;; 2498cdf0e10cSrcweir- x86:Interix*:3*) 2499cdf0e10cSrcweir- echo i386-pc-interix3 2500cdf0e10cSrcweir- exit 0 ;; 2501cdf0e10cSrcweir+ exit ;; 2502cdf0e10cSrcweir+ *:Interix*:*) 2503cdf0e10cSrcweir+ case ${UNAME_MACHINE} in 2504cdf0e10cSrcweir+ x86) 2505cdf0e10cSrcweir+ echo i586-pc-interix${UNAME_RELEASE} 2506cdf0e10cSrcweir+ exit ;; 2507cdf0e10cSrcweir+ authenticamd | genuineintel | EM64T) 2508cdf0e10cSrcweir+ echo x86_64-unknown-interix${UNAME_RELEASE} 2509cdf0e10cSrcweir+ exit ;; 2510cdf0e10cSrcweir+ IA64) 2511cdf0e10cSrcweir+ echo ia64-unknown-interix${UNAME_RELEASE} 2512cdf0e10cSrcweir+ exit ;; 2513cdf0e10cSrcweir+ esac ;; 2514cdf0e10cSrcweir+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 2515cdf0e10cSrcweir+ echo i${UNAME_MACHINE}-pc-mks 2516cdf0e10cSrcweir+ exit ;; 2517cdf0e10cSrcweir+ 8664:Windows_NT:*) 2518cdf0e10cSrcweir+ echo x86_64-pc-mks 2519cdf0e10cSrcweir+ exit ;; 2520cdf0e10cSrcweir i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 2521cdf0e10cSrcweir # How do we know it's Interix rather than the generic POSIX subsystem? 2522cdf0e10cSrcweir # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 2523cdf0e10cSrcweir # UNAME_MACHINE based on the output of uname instead of i386? 2524cdf0e10cSrcweir- echo i386-pc-interix 2525cdf0e10cSrcweir- exit 0 ;; 2526cdf0e10cSrcweir+ echo i586-pc-interix 2527cdf0e10cSrcweir+ exit ;; 2528cdf0e10cSrcweir i*:UWIN*:*) 2529cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-uwin 2530cdf0e10cSrcweir- exit 0 ;; 2531cdf0e10cSrcweir+ exit ;; 2532cdf0e10cSrcweir+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 2533cdf0e10cSrcweir+ echo x86_64-unknown-cygwin 2534cdf0e10cSrcweir+ exit ;; 2535cdf0e10cSrcweir p*:CYGWIN*:*) 2536cdf0e10cSrcweir echo powerpcle-unknown-cygwin 2537cdf0e10cSrcweir- exit 0 ;; 2538cdf0e10cSrcweir+ exit ;; 2539cdf0e10cSrcweir prep*:SunOS:5.*:*) 2540cdf0e10cSrcweir echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 2541cdf0e10cSrcweir- exit 0 ;; 2542cdf0e10cSrcweir+ exit ;; 2543cdf0e10cSrcweir *:GNU:*:*) 2544cdf0e10cSrcweir+ # the GNU system 2545cdf0e10cSrcweir echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 2546cdf0e10cSrcweir- exit 0 ;; 2547cdf0e10cSrcweir+ exit ;; 2548cdf0e10cSrcweir+ *:GNU/*:*:*) 2549cdf0e10cSrcweir+ # other systems with GNU libc and userland 2550cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 2551cdf0e10cSrcweir+ exit ;; 2552cdf0e10cSrcweir i*86:Minix:*:*) 2553cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-minix 2554cdf0e10cSrcweir- exit 0 ;; 2555cdf0e10cSrcweir+ exit ;; 2556cdf0e10cSrcweir+ alpha:Linux:*:*) 2557cdf0e10cSrcweir+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 2558cdf0e10cSrcweir+ EV5) UNAME_MACHINE=alphaev5 ;; 2559cdf0e10cSrcweir+ EV56) UNAME_MACHINE=alphaev56 ;; 2560cdf0e10cSrcweir+ PCA56) UNAME_MACHINE=alphapca56 ;; 2561cdf0e10cSrcweir+ PCA57) UNAME_MACHINE=alphapca56 ;; 2562cdf0e10cSrcweir+ EV6) UNAME_MACHINE=alphaev6 ;; 2563cdf0e10cSrcweir+ EV67) UNAME_MACHINE=alphaev67 ;; 2564cdf0e10cSrcweir+ EV68*) UNAME_MACHINE=alphaev68 ;; 2565cdf0e10cSrcweir+ esac 2566cdf0e10cSrcweir+ objdump --private-headers /bin/sh | grep -q ld.so.1 2567cdf0e10cSrcweir+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 2568cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 2569cdf0e10cSrcweir+ exit ;; 2570cdf0e10cSrcweir arm*:Linux:*:*) 2571cdf0e10cSrcweir+ eval $set_cc_for_build 2572cdf0e10cSrcweir+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 2573cdf0e10cSrcweir+ | grep -q __ARM_EABI__ 2574cdf0e10cSrcweir+ then 2575cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-linux-gnu 2576cdf0e10cSrcweir+ else 2577cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi 2578cdf0e10cSrcweir+ fi 2579cdf0e10cSrcweir+ exit ;; 2580cdf0e10cSrcweir+ avr32*:Linux:*:*) 2581cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-linux-gnu 2582cdf0e10cSrcweir- exit 0 ;; 2583cdf0e10cSrcweir+ exit ;; 2584cdf0e10cSrcweir+ cris:Linux:*:*) 2585cdf0e10cSrcweir+ echo cris-axis-linux-gnu 2586cdf0e10cSrcweir+ exit ;; 2587cdf0e10cSrcweir+ crisv32:Linux:*:*) 2588cdf0e10cSrcweir+ echo crisv32-axis-linux-gnu 2589cdf0e10cSrcweir+ exit ;; 2590cdf0e10cSrcweir+ frv:Linux:*:*) 2591cdf0e10cSrcweir+ echo frv-unknown-linux-gnu 2592cdf0e10cSrcweir+ exit ;; 2593cdf0e10cSrcweir+ i*86:Linux:*:*) 2594cdf0e10cSrcweir+ LIBC=gnu 2595cdf0e10cSrcweir+ eval $set_cc_for_build 2596cdf0e10cSrcweir+ sed 's/^ //' << EOF >$dummy.c 2597cdf0e10cSrcweir+ #ifdef __dietlibc__ 2598cdf0e10cSrcweir+ LIBC=dietlibc 2599cdf0e10cSrcweir+ #endif 2600cdf0e10cSrcweir+EOF 2601cdf0e10cSrcweir+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 2602cdf0e10cSrcweir+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 2603cdf0e10cSrcweir+ exit ;; 2604cdf0e10cSrcweir ia64:Linux:*:*) 2605cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-linux-gnu 2606cdf0e10cSrcweir- exit 0 ;; 2607cdf0e10cSrcweir+ exit ;; 2608cdf0e10cSrcweir+ m32r*:Linux:*:*) 2609cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-linux-gnu 2610cdf0e10cSrcweir+ exit ;; 2611cdf0e10cSrcweir m68*:Linux:*:*) 2612cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-linux-gnu 2613cdf0e10cSrcweir- exit 0 ;; 2614cdf0e10cSrcweir- mips:Linux:*:*) 2615cdf0e10cSrcweir+ exit ;; 2616cdf0e10cSrcweir+ mips:Linux:*:* | mips64:Linux:*:*) 2617cdf0e10cSrcweir eval $set_cc_for_build 2618cdf0e10cSrcweir sed 's/^ //' << EOF >$dummy.c 2619cdf0e10cSrcweir #undef CPU 2620cdf0e10cSrcweir- #undef mips 2621cdf0e10cSrcweir- #undef mipsel 2622cdf0e10cSrcweir+ #undef ${UNAME_MACHINE} 2623cdf0e10cSrcweir+ #undef ${UNAME_MACHINE}el 2624cdf0e10cSrcweir #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 2625cdf0e10cSrcweir- CPU=mipsel 2626cdf0e10cSrcweir+ CPU=${UNAME_MACHINE}el 2627cdf0e10cSrcweir #else 2628cdf0e10cSrcweir #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 2629cdf0e10cSrcweir- CPU=mips 2630cdf0e10cSrcweir+ CPU=${UNAME_MACHINE} 2631cdf0e10cSrcweir #else 2632cdf0e10cSrcweir CPU= 2633cdf0e10cSrcweir #endif 2634cdf0e10cSrcweir #endif 2635cdf0e10cSrcweir EOF 2636cdf0e10cSrcweir- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 2637cdf0e10cSrcweir- rm -f $dummy.c && rmdir $tmpdir 2638cdf0e10cSrcweir- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 2639cdf0e10cSrcweir+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 2640cdf0e10cSrcweir+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 2641cdf0e10cSrcweir ;; 2642cdf0e10cSrcweir- ppc:Linux:*:*) 2643cdf0e10cSrcweir- echo powerpc-unknown-linux-gnu 2644cdf0e10cSrcweir- exit 0 ;; 2645cdf0e10cSrcweir- ppc64:Linux:*:*) 2646cdf0e10cSrcweir- echo powerpc64-unknown-linux-gnu 2647cdf0e10cSrcweir- exit 0 ;; 2648cdf0e10cSrcweir- alpha:Linux:*:*) 2649cdf0e10cSrcweir- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 2650cdf0e10cSrcweir- EV5) UNAME_MACHINE=alphaev5 ;; 2651cdf0e10cSrcweir- EV56) UNAME_MACHINE=alphaev56 ;; 2652cdf0e10cSrcweir- PCA56) UNAME_MACHINE=alphapca56 ;; 2653cdf0e10cSrcweir- PCA57) UNAME_MACHINE=alphapca56 ;; 2654cdf0e10cSrcweir- EV6) UNAME_MACHINE=alphaev6 ;; 2655cdf0e10cSrcweir- EV67) UNAME_MACHINE=alphaev67 ;; 2656cdf0e10cSrcweir- EV68*) UNAME_MACHINE=alphaev68 ;; 2657cdf0e10cSrcweir- esac 2658cdf0e10cSrcweir- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 2659cdf0e10cSrcweir- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 2660cdf0e10cSrcweir- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 2661cdf0e10cSrcweir- exit 0 ;; 2662cdf0e10cSrcweir+ or32:Linux:*:*) 2663cdf0e10cSrcweir+ echo or32-unknown-linux-gnu 2664cdf0e10cSrcweir+ exit ;; 2665cdf0e10cSrcweir+ padre:Linux:*:*) 2666cdf0e10cSrcweir+ echo sparc-unknown-linux-gnu 2667cdf0e10cSrcweir+ exit ;; 2668cdf0e10cSrcweir+ parisc64:Linux:*:* | hppa64:Linux:*:*) 2669cdf0e10cSrcweir+ echo hppa64-unknown-linux-gnu 2670cdf0e10cSrcweir+ exit ;; 2671cdf0e10cSrcweir parisc:Linux:*:* | hppa:Linux:*:*) 2672cdf0e10cSrcweir # Look for CPU level 2673cdf0e10cSrcweir case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 2674cdf0e10cSrcweir@@ -848,82 +949,40 @@ 2675cdf0e10cSrcweir PA8*) echo hppa2.0-unknown-linux-gnu ;; 2676cdf0e10cSrcweir *) echo hppa-unknown-linux-gnu ;; 2677cdf0e10cSrcweir esac 2678cdf0e10cSrcweir- exit 0 ;; 2679cdf0e10cSrcweir- parisc64:Linux:*:* | hppa64:Linux:*:*) 2680cdf0e10cSrcweir- echo hppa64-unknown-linux-gnu 2681cdf0e10cSrcweir- exit 0 ;; 2682cdf0e10cSrcweir+ exit ;; 2683cdf0e10cSrcweir+ ppc64:Linux:*:*) 2684cdf0e10cSrcweir+ echo powerpc64-unknown-linux-gnu 2685cdf0e10cSrcweir+ exit ;; 2686cdf0e10cSrcweir+ ppc:Linux:*:*) 2687cdf0e10cSrcweir+ echo powerpc-unknown-linux-gnu 2688cdf0e10cSrcweir+ exit ;; 2689cdf0e10cSrcweir s390:Linux:*:* | s390x:Linux:*:*) 2690cdf0e10cSrcweir echo ${UNAME_MACHINE}-ibm-linux 2691cdf0e10cSrcweir- exit 0 ;; 2692cdf0e10cSrcweir+ exit ;; 2693cdf0e10cSrcweir+ sh64*:Linux:*:*) 2694cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-linux-gnu 2695cdf0e10cSrcweir+ exit ;; 2696cdf0e10cSrcweir sh*:Linux:*:*) 2697cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-linux-gnu 2698cdf0e10cSrcweir- exit 0 ;; 2699cdf0e10cSrcweir+ exit ;; 2700cdf0e10cSrcweir sparc:Linux:*:* | sparc64:Linux:*:*) 2701cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-linux-gnu 2702cdf0e10cSrcweir- exit 0 ;; 2703cdf0e10cSrcweir+ exit ;; 2704cdf0e10cSrcweir+ vax:Linux:*:*) 2705cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-dec-linux-gnu 2706cdf0e10cSrcweir+ exit ;; 2707cdf0e10cSrcweir x86_64:Linux:*:*) 2708cdf0e10cSrcweir echo x86_64-unknown-linux-gnu 2709cdf0e10cSrcweir- exit 0 ;; 2710cdf0e10cSrcweir- i*86:Linux:*:*) 2711cdf0e10cSrcweir- # The BFD linker knows what the default object file format is, so 2712cdf0e10cSrcweir- # first see if it will tell us. cd to the root directory to prevent 2713cdf0e10cSrcweir- # problems with other programs or directories called `ld' in the path. 2714cdf0e10cSrcweir- # Set LC_ALL=C to ensure ld outputs messages in English. 2715cdf0e10cSrcweir- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 2716cdf0e10cSrcweir- | sed -ne '/supported targets:/!d 2717cdf0e10cSrcweir- s/[ ][ ]*/ /g 2718cdf0e10cSrcweir- s/.*supported targets: *// 2719cdf0e10cSrcweir- s/ .*// 2720cdf0e10cSrcweir- p'` 2721cdf0e10cSrcweir- case "$ld_supported_targets" in 2722cdf0e10cSrcweir- elf32-i386) 2723cdf0e10cSrcweir- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 2724cdf0e10cSrcweir- ;; 2725cdf0e10cSrcweir- a.out-i386-linux) 2726cdf0e10cSrcweir- echo "${UNAME_MACHINE}-pc-linux-gnuaout" 2727cdf0e10cSrcweir- exit 0 ;; 2728cdf0e10cSrcweir- coff-i386) 2729cdf0e10cSrcweir- echo "${UNAME_MACHINE}-pc-linux-gnucoff" 2730cdf0e10cSrcweir- exit 0 ;; 2731cdf0e10cSrcweir- "") 2732cdf0e10cSrcweir- # Either a pre-BFD a.out linker (linux-gnuoldld) or 2733cdf0e10cSrcweir- # one that does not give us useful --help. 2734cdf0e10cSrcweir- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 2735cdf0e10cSrcweir- exit 0 ;; 2736cdf0e10cSrcweir- esac 2737cdf0e10cSrcweir- # Determine whether the default compiler is a.out or elf 2738cdf0e10cSrcweir- eval $set_cc_for_build 2739cdf0e10cSrcweir- sed 's/^ //' << EOF >$dummy.c 2740cdf0e10cSrcweir- #include <features.h> 2741cdf0e10cSrcweir- #ifdef __ELF__ 2742cdf0e10cSrcweir- # ifdef __GLIBC__ 2743cdf0e10cSrcweir- # if __GLIBC__ >= 2 2744cdf0e10cSrcweir- LIBC=gnu 2745cdf0e10cSrcweir- # else 2746cdf0e10cSrcweir- LIBC=gnulibc1 2747cdf0e10cSrcweir- # endif 2748cdf0e10cSrcweir- # else 2749cdf0e10cSrcweir- LIBC=gnulibc1 2750cdf0e10cSrcweir- # endif 2751cdf0e10cSrcweir- #else 2752cdf0e10cSrcweir- #ifdef __INTEL_COMPILER 2753cdf0e10cSrcweir- LIBC=gnu 2754cdf0e10cSrcweir- #else 2755cdf0e10cSrcweir- LIBC=gnuaout 2756cdf0e10cSrcweir- #endif 2757cdf0e10cSrcweir- #endif 2758cdf0e10cSrcweir-EOF 2759cdf0e10cSrcweir- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 2760cdf0e10cSrcweir- rm -f $dummy.c && rmdir $tmpdir 2761cdf0e10cSrcweir- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 2762cdf0e10cSrcweir- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 2763cdf0e10cSrcweir- ;; 2764cdf0e10cSrcweir+ exit ;; 2765cdf0e10cSrcweir+ xtensa*:Linux:*:*) 2766cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-linux-gnu 2767cdf0e10cSrcweir+ exit ;; 2768cdf0e10cSrcweir i*86:DYNIX/ptx:4*:*) 2769cdf0e10cSrcweir # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 2770cdf0e10cSrcweir # earlier versions are messed up and put the nodename in both 2771cdf0e10cSrcweir # sysname and nodename. 2772cdf0e10cSrcweir echo i386-sequent-sysv4 2773cdf0e10cSrcweir- exit 0 ;; 2774cdf0e10cSrcweir+ exit ;; 2775cdf0e10cSrcweir i*86:UNIX_SV:4.2MP:2.*) 2776cdf0e10cSrcweir # Unixware is an offshoot of SVR4, but it has its own version 2777cdf0e10cSrcweir # number series starting with 2... 2778cdf0e10cSrcweir@@ -931,7 +990,27 @@ 2779cdf0e10cSrcweir # I just have to hope. -- rms. 2780cdf0e10cSrcweir # Use sysv4.2uw... so that sysv4* matches it. 2781cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 2782cdf0e10cSrcweir- exit 0 ;; 2783cdf0e10cSrcweir+ exit ;; 2784cdf0e10cSrcweir+ i*86:OS/2:*:*) 2785cdf0e10cSrcweir+ # If we were able to find `uname', then EMX Unix compatibility 2786cdf0e10cSrcweir+ # is probably installed. 2787cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-pc-os2-emx 2788cdf0e10cSrcweir+ exit ;; 2789cdf0e10cSrcweir+ i*86:XTS-300:*:STOP) 2790cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-stop 2791cdf0e10cSrcweir+ exit ;; 2792cdf0e10cSrcweir+ i*86:atheos:*:*) 2793cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-atheos 2794cdf0e10cSrcweir+ exit ;; 2795cdf0e10cSrcweir+ i*86:syllable:*:*) 2796cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-pc-syllable 2797cdf0e10cSrcweir+ exit ;; 2798cdf0e10cSrcweir+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 2799cdf0e10cSrcweir+ echo i386-unknown-lynxos${UNAME_RELEASE} 2800cdf0e10cSrcweir+ exit ;; 2801cdf0e10cSrcweir+ i*86:*DOS:*:*) 2802cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-pc-msdosdjgpp 2803cdf0e10cSrcweir+ exit ;; 2804cdf0e10cSrcweir i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 2805cdf0e10cSrcweir UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 2806cdf0e10cSrcweir if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 2807cdf0e10cSrcweir@@ -939,15 +1018,16 @@ 2808cdf0e10cSrcweir else 2809cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 2810cdf0e10cSrcweir fi 2811cdf0e10cSrcweir- exit 0 ;; 2812cdf0e10cSrcweir- i*86:*:5:[78]*) 2813cdf0e10cSrcweir+ exit ;; 2814cdf0e10cSrcweir+ i*86:*:5:[678]*) 2815cdf0e10cSrcweir+ # UnixWare 7.x, OpenUNIX and OpenServer 6. 2816cdf0e10cSrcweir case `/bin/uname -X | grep "^Machine"` in 2817cdf0e10cSrcweir *486*) UNAME_MACHINE=i486 ;; 2818cdf0e10cSrcweir *Pentium) UNAME_MACHINE=i586 ;; 2819cdf0e10cSrcweir *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 2820cdf0e10cSrcweir esac 2821cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 2822cdf0e10cSrcweir- exit 0 ;; 2823cdf0e10cSrcweir+ exit ;; 2824cdf0e10cSrcweir i*86:*:3.2:*) 2825cdf0e10cSrcweir if test -f /usr/options/cb.name; then 2826cdf0e10cSrcweir UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 2827cdf0e10cSrcweir@@ -965,76 +1045,86 @@ 2828cdf0e10cSrcweir else 2829cdf0e10cSrcweir echo ${UNAME_MACHINE}-pc-sysv32 2830cdf0e10cSrcweir fi 2831cdf0e10cSrcweir- exit 0 ;; 2832cdf0e10cSrcweir- i*86:*DOS:*:*) 2833cdf0e10cSrcweir- echo ${UNAME_MACHINE}-pc-msdosdjgpp 2834cdf0e10cSrcweir- exit 0 ;; 2835cdf0e10cSrcweir+ exit ;; 2836cdf0e10cSrcweir pc:*:*:*) 2837cdf0e10cSrcweir # Left here for compatibility: 2838cdf0e10cSrcweir # uname -m prints for DJGPP always 'pc', but it prints nothing about 2839cdf0e10cSrcweir- # the processor, so we play safe by assuming i386. 2840cdf0e10cSrcweir- echo i386-pc-msdosdjgpp 2841cdf0e10cSrcweir- exit 0 ;; 2842cdf0e10cSrcweir+ # the processor, so we play safe by assuming i586. 2843cdf0e10cSrcweir+ # Note: whatever this is, it MUST be the same as what config.sub 2844cdf0e10cSrcweir+ # prints for the "djgpp" host, or else GDB configury will decide that 2845cdf0e10cSrcweir+ # this is a cross-build. 2846cdf0e10cSrcweir+ echo i586-pc-msdosdjgpp 2847cdf0e10cSrcweir+ exit ;; 2848cdf0e10cSrcweir Intel:Mach:3*:*) 2849cdf0e10cSrcweir echo i386-pc-mach3 2850cdf0e10cSrcweir- exit 0 ;; 2851cdf0e10cSrcweir+ exit ;; 2852cdf0e10cSrcweir paragon:*:*:*) 2853cdf0e10cSrcweir echo i860-intel-osf1 2854cdf0e10cSrcweir- exit 0 ;; 2855cdf0e10cSrcweir+ exit ;; 2856cdf0e10cSrcweir i860:*:4.*:*) # i860-SVR4 2857cdf0e10cSrcweir if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 2858cdf0e10cSrcweir echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 2859cdf0e10cSrcweir else # Add other i860-SVR4 vendors below as they are discovered. 2860cdf0e10cSrcweir echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 2861cdf0e10cSrcweir fi 2862cdf0e10cSrcweir- exit 0 ;; 2863cdf0e10cSrcweir+ exit ;; 2864cdf0e10cSrcweir mini*:CTIX:SYS*5:*) 2865cdf0e10cSrcweir # "miniframe" 2866cdf0e10cSrcweir echo m68010-convergent-sysv 2867cdf0e10cSrcweir- exit 0 ;; 2868cdf0e10cSrcweir+ exit ;; 2869cdf0e10cSrcweir mc68k:UNIX:SYSTEM5:3.51m) 2870cdf0e10cSrcweir echo m68k-convergent-sysv 2871cdf0e10cSrcweir- exit 0 ;; 2872cdf0e10cSrcweir- M68*:*:R3V[567]*:*) 2873cdf0e10cSrcweir- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 2874cdf0e10cSrcweir- 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) 2875cdf0e10cSrcweir+ exit ;; 2876cdf0e10cSrcweir+ M680?0:D-NIX:5.3:*) 2877cdf0e10cSrcweir+ echo m68k-diab-dnix 2878cdf0e10cSrcweir+ exit ;; 2879cdf0e10cSrcweir+ M68*:*:R3V[5678]*:*) 2880cdf0e10cSrcweir+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 2881cdf0e10cSrcweir+ 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) 2882cdf0e10cSrcweir OS_REL='' 2883cdf0e10cSrcweir test -r /etc/.relid \ 2884cdf0e10cSrcweir && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 2885cdf0e10cSrcweir /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 2886cdf0e10cSrcweir- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 2887cdf0e10cSrcweir+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 2888cdf0e10cSrcweir /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 2889cdf0e10cSrcweir- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 2890cdf0e10cSrcweir+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 2891cdf0e10cSrcweir 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 2892cdf0e10cSrcweir /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 2893cdf0e10cSrcweir- && echo i486-ncr-sysv4 && exit 0 ;; 2894cdf0e10cSrcweir+ && { echo i486-ncr-sysv4; exit; } ;; 2895cdf0e10cSrcweir+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) 2896cdf0e10cSrcweir+ OS_REL='.3' 2897cdf0e10cSrcweir+ test -r /etc/.relid \ 2898cdf0e10cSrcweir+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 2899cdf0e10cSrcweir+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 2900cdf0e10cSrcweir+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 2901cdf0e10cSrcweir+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 2902cdf0e10cSrcweir+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 2903cdf0e10cSrcweir+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 2904cdf0e10cSrcweir+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 2905cdf0e10cSrcweir m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 2906cdf0e10cSrcweir echo m68k-unknown-lynxos${UNAME_RELEASE} 2907cdf0e10cSrcweir- exit 0 ;; 2908cdf0e10cSrcweir+ exit ;; 2909cdf0e10cSrcweir mc68030:UNIX_System_V:4.*:*) 2910cdf0e10cSrcweir echo m68k-atari-sysv4 2911cdf0e10cSrcweir- exit 0 ;; 2912cdf0e10cSrcweir- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 2913cdf0e10cSrcweir- echo i386-unknown-lynxos${UNAME_RELEASE} 2914cdf0e10cSrcweir- exit 0 ;; 2915cdf0e10cSrcweir+ exit ;; 2916cdf0e10cSrcweir TSUNAMI:LynxOS:2.*:*) 2917cdf0e10cSrcweir echo sparc-unknown-lynxos${UNAME_RELEASE} 2918cdf0e10cSrcweir- exit 0 ;; 2919cdf0e10cSrcweir+ exit ;; 2920cdf0e10cSrcweir rs6000:LynxOS:2.*:*) 2921cdf0e10cSrcweir echo rs6000-unknown-lynxos${UNAME_RELEASE} 2922cdf0e10cSrcweir- exit 0 ;; 2923cdf0e10cSrcweir- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 2924cdf0e10cSrcweir+ exit ;; 2925cdf0e10cSrcweir+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 2926cdf0e10cSrcweir echo powerpc-unknown-lynxos${UNAME_RELEASE} 2927cdf0e10cSrcweir- exit 0 ;; 2928cdf0e10cSrcweir+ exit ;; 2929cdf0e10cSrcweir SM[BE]S:UNIX_SV:*:*) 2930cdf0e10cSrcweir echo mips-dde-sysv${UNAME_RELEASE} 2931cdf0e10cSrcweir- exit 0 ;; 2932cdf0e10cSrcweir+ exit ;; 2933cdf0e10cSrcweir RM*:ReliantUNIX-*:*:*) 2934cdf0e10cSrcweir echo mips-sni-sysv4 2935cdf0e10cSrcweir- exit 0 ;; 2936cdf0e10cSrcweir+ exit ;; 2937cdf0e10cSrcweir RM*:SINIX-*:*:*) 2938cdf0e10cSrcweir echo mips-sni-sysv4 2939cdf0e10cSrcweir- exit 0 ;; 2940cdf0e10cSrcweir+ exit ;; 2941cdf0e10cSrcweir *:SINIX-*:*:*) 2942cdf0e10cSrcweir if uname -p 2>/dev/null >/dev/null ; then 2943cdf0e10cSrcweir UNAME_MACHINE=`(uname -p) 2>/dev/null` 2944cdf0e10cSrcweir@@ -1042,64 +1132,94 @@ 2945cdf0e10cSrcweir else 2946cdf0e10cSrcweir echo ns32k-sni-sysv 2947cdf0e10cSrcweir fi 2948cdf0e10cSrcweir- exit 0 ;; 2949cdf0e10cSrcweir+ exit ;; 2950cdf0e10cSrcweir PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 2951cdf0e10cSrcweir # says <Richard.M.Bartel@ccMail.Census.GOV> 2952cdf0e10cSrcweir echo i586-unisys-sysv4 2953cdf0e10cSrcweir- exit 0 ;; 2954cdf0e10cSrcweir+ exit ;; 2955cdf0e10cSrcweir *:UNIX_System_V:4*:FTX*) 2956cdf0e10cSrcweir # From Gerald Hewes <hewes@openmarket.com>. 2957cdf0e10cSrcweir # How about differentiating between stratus architectures? -djm 2958cdf0e10cSrcweir echo hppa1.1-stratus-sysv4 2959cdf0e10cSrcweir- exit 0 ;; 2960cdf0e10cSrcweir+ exit ;; 2961cdf0e10cSrcweir *:*:*:FTX*) 2962cdf0e10cSrcweir # From seanf@swdc.stratus.com. 2963cdf0e10cSrcweir echo i860-stratus-sysv4 2964cdf0e10cSrcweir- exit 0 ;; 2965cdf0e10cSrcweir+ exit ;; 2966cdf0e10cSrcweir+ i*86:VOS:*:*) 2967cdf0e10cSrcweir+ # From Paul.Green@stratus.com. 2968cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-stratus-vos 2969cdf0e10cSrcweir+ exit ;; 2970cdf0e10cSrcweir *:VOS:*:*) 2971cdf0e10cSrcweir # From Paul.Green@stratus.com. 2972cdf0e10cSrcweir echo hppa1.1-stratus-vos 2973cdf0e10cSrcweir- exit 0 ;; 2974cdf0e10cSrcweir+ exit ;; 2975cdf0e10cSrcweir mc68*:A/UX:*:*) 2976cdf0e10cSrcweir echo m68k-apple-aux${UNAME_RELEASE} 2977cdf0e10cSrcweir- exit 0 ;; 2978cdf0e10cSrcweir+ exit ;; 2979cdf0e10cSrcweir news*:NEWS-OS:6*:*) 2980cdf0e10cSrcweir echo mips-sony-newsos6 2981cdf0e10cSrcweir- exit 0 ;; 2982cdf0e10cSrcweir+ exit ;; 2983cdf0e10cSrcweir R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 2984cdf0e10cSrcweir if [ -d /usr/nec ]; then 2985cdf0e10cSrcweir echo mips-nec-sysv${UNAME_RELEASE} 2986cdf0e10cSrcweir else 2987cdf0e10cSrcweir echo mips-unknown-sysv${UNAME_RELEASE} 2988cdf0e10cSrcweir fi 2989cdf0e10cSrcweir- exit 0 ;; 2990cdf0e10cSrcweir+ exit ;; 2991cdf0e10cSrcweir BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 2992cdf0e10cSrcweir echo powerpc-be-beos 2993cdf0e10cSrcweir- exit 0 ;; 2994cdf0e10cSrcweir+ exit ;; 2995cdf0e10cSrcweir BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 2996cdf0e10cSrcweir echo powerpc-apple-beos 2997cdf0e10cSrcweir- exit 0 ;; 2998cdf0e10cSrcweir+ exit ;; 2999cdf0e10cSrcweir BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 3000cdf0e10cSrcweir echo i586-pc-beos 3001cdf0e10cSrcweir- exit 0 ;; 3002cdf0e10cSrcweir+ exit ;; 3003cdf0e10cSrcweir+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 3004cdf0e10cSrcweir+ echo i586-pc-haiku 3005cdf0e10cSrcweir+ exit ;; 3006cdf0e10cSrcweir SX-4:SUPER-UX:*:*) 3007cdf0e10cSrcweir echo sx4-nec-superux${UNAME_RELEASE} 3008cdf0e10cSrcweir- exit 0 ;; 3009cdf0e10cSrcweir+ exit ;; 3010cdf0e10cSrcweir SX-5:SUPER-UX:*:*) 3011cdf0e10cSrcweir echo sx5-nec-superux${UNAME_RELEASE} 3012cdf0e10cSrcweir- exit 0 ;; 3013cdf0e10cSrcweir+ exit ;; 3014cdf0e10cSrcweir SX-6:SUPER-UX:*:*) 3015cdf0e10cSrcweir echo sx6-nec-superux${UNAME_RELEASE} 3016cdf0e10cSrcweir- exit 0 ;; 3017cdf0e10cSrcweir+ exit ;; 3018cdf0e10cSrcweir+ SX-7:SUPER-UX:*:*) 3019cdf0e10cSrcweir+ echo sx7-nec-superux${UNAME_RELEASE} 3020cdf0e10cSrcweir+ exit ;; 3021cdf0e10cSrcweir+ SX-8:SUPER-UX:*:*) 3022cdf0e10cSrcweir+ echo sx8-nec-superux${UNAME_RELEASE} 3023cdf0e10cSrcweir+ exit ;; 3024cdf0e10cSrcweir+ SX-8R:SUPER-UX:*:*) 3025cdf0e10cSrcweir+ echo sx8r-nec-superux${UNAME_RELEASE} 3026cdf0e10cSrcweir+ exit ;; 3027cdf0e10cSrcweir Power*:Rhapsody:*:*) 3028cdf0e10cSrcweir echo powerpc-apple-rhapsody${UNAME_RELEASE} 3029cdf0e10cSrcweir- exit 0 ;; 3030cdf0e10cSrcweir+ exit ;; 3031cdf0e10cSrcweir *:Rhapsody:*:*) 3032cdf0e10cSrcweir echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 3033cdf0e10cSrcweir- exit 0 ;; 3034cdf0e10cSrcweir+ exit ;; 3035cdf0e10cSrcweir *:Darwin:*:*) 3036cdf0e10cSrcweir- echo `uname -p`-apple-darwin${UNAME_RELEASE} 3037cdf0e10cSrcweir- exit 0 ;; 3038cdf0e10cSrcweir+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 3039cdf0e10cSrcweir+ case $UNAME_PROCESSOR in 3040cdf0e10cSrcweir+ i386) 3041cdf0e10cSrcweir+ eval $set_cc_for_build 3042cdf0e10cSrcweir+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 3043cdf0e10cSrcweir+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 3044cdf0e10cSrcweir+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 3045cdf0e10cSrcweir+ grep IS_64BIT_ARCH >/dev/null 3046cdf0e10cSrcweir+ then 3047cdf0e10cSrcweir+ UNAME_PROCESSOR="x86_64" 3048cdf0e10cSrcweir+ fi 3049cdf0e10cSrcweir+ fi ;; 3050cdf0e10cSrcweir+ unknown) UNAME_PROCESSOR=powerpc ;; 3051cdf0e10cSrcweir+ esac 3052cdf0e10cSrcweir+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 3053cdf0e10cSrcweir+ exit ;; 3054cdf0e10cSrcweir *:procnto*:*:* | *:QNX:[0123456789]*:*) 3055cdf0e10cSrcweir UNAME_PROCESSOR=`uname -p` 3056cdf0e10cSrcweir if test "$UNAME_PROCESSOR" = "x86"; then 3057cdf0e10cSrcweir@@ -1107,22 +1227,25 @@ 3058cdf0e10cSrcweir UNAME_MACHINE=pc 3059cdf0e10cSrcweir fi 3060cdf0e10cSrcweir echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 3061cdf0e10cSrcweir- exit 0 ;; 3062cdf0e10cSrcweir+ exit ;; 3063cdf0e10cSrcweir *:QNX:*:4*) 3064cdf0e10cSrcweir echo i386-pc-qnx 3065cdf0e10cSrcweir- exit 0 ;; 3066cdf0e10cSrcweir- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) 3067cdf0e10cSrcweir+ exit ;; 3068cdf0e10cSrcweir+ NSE-?:NONSTOP_KERNEL:*:*) 3069cdf0e10cSrcweir+ echo nse-tandem-nsk${UNAME_RELEASE} 3070cdf0e10cSrcweir+ exit ;; 3071cdf0e10cSrcweir+ NSR-?:NONSTOP_KERNEL:*:*) 3072cdf0e10cSrcweir echo nsr-tandem-nsk${UNAME_RELEASE} 3073cdf0e10cSrcweir- exit 0 ;; 3074cdf0e10cSrcweir+ exit ;; 3075cdf0e10cSrcweir *:NonStop-UX:*:*) 3076cdf0e10cSrcweir echo mips-compaq-nonstopux 3077cdf0e10cSrcweir- exit 0 ;; 3078cdf0e10cSrcweir+ exit ;; 3079cdf0e10cSrcweir BS2000:POSIX*:*:*) 3080cdf0e10cSrcweir echo bs2000-siemens-sysv 3081cdf0e10cSrcweir- exit 0 ;; 3082cdf0e10cSrcweir+ exit ;; 3083cdf0e10cSrcweir DS/*:UNIX_System_V:*:*) 3084cdf0e10cSrcweir echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 3085cdf0e10cSrcweir- exit 0 ;; 3086cdf0e10cSrcweir+ exit ;; 3087cdf0e10cSrcweir *:Plan9:*:*) 3088cdf0e10cSrcweir # "uname -m" is not consistent, so use $cputype instead. 386 3089cdf0e10cSrcweir # is converted to i386 for consistency with other x86 3090cdf0e10cSrcweir@@ -1133,36 +1256,50 @@ 3091cdf0e10cSrcweir UNAME_MACHINE="$cputype" 3092cdf0e10cSrcweir fi 3093cdf0e10cSrcweir echo ${UNAME_MACHINE}-unknown-plan9 3094cdf0e10cSrcweir- exit 0 ;; 3095cdf0e10cSrcweir- i*86:OS/2:*:*) 3096cdf0e10cSrcweir- # If we were able to find `uname', then EMX Unix compatibility 3097cdf0e10cSrcweir- # is probably installed. 3098cdf0e10cSrcweir- echo ${UNAME_MACHINE}-pc-os2-emx 3099cdf0e10cSrcweir- exit 0 ;; 3100cdf0e10cSrcweir+ exit ;; 3101cdf0e10cSrcweir *:TOPS-10:*:*) 3102cdf0e10cSrcweir echo pdp10-unknown-tops10 3103cdf0e10cSrcweir- exit 0 ;; 3104cdf0e10cSrcweir+ exit ;; 3105cdf0e10cSrcweir *:TENEX:*:*) 3106cdf0e10cSrcweir echo pdp10-unknown-tenex 3107cdf0e10cSrcweir- exit 0 ;; 3108cdf0e10cSrcweir+ exit ;; 3109cdf0e10cSrcweir KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 3110cdf0e10cSrcweir echo pdp10-dec-tops20 3111cdf0e10cSrcweir- exit 0 ;; 3112cdf0e10cSrcweir+ exit ;; 3113cdf0e10cSrcweir XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 3114cdf0e10cSrcweir echo pdp10-xkl-tops20 3115cdf0e10cSrcweir- exit 0 ;; 3116cdf0e10cSrcweir+ exit ;; 3117cdf0e10cSrcweir *:TOPS-20:*:*) 3118cdf0e10cSrcweir echo pdp10-unknown-tops20 3119cdf0e10cSrcweir- exit 0 ;; 3120cdf0e10cSrcweir+ exit ;; 3121cdf0e10cSrcweir *:ITS:*:*) 3122cdf0e10cSrcweir echo pdp10-unknown-its 3123cdf0e10cSrcweir- exit 0 ;; 3124cdf0e10cSrcweir- i*86:XTS-300:*:STOP) 3125cdf0e10cSrcweir- echo ${UNAME_MACHINE}-unknown-stop 3126cdf0e10cSrcweir- exit 0 ;; 3127cdf0e10cSrcweir- i*86:atheos:*:*) 3128cdf0e10cSrcweir- echo ${UNAME_MACHINE}-unknown-atheos 3129cdf0e10cSrcweir- exit 0 ;; 3130cdf0e10cSrcweir+ exit ;; 3131cdf0e10cSrcweir+ SEI:*:*:SEIUX) 3132cdf0e10cSrcweir+ echo mips-sei-seiux${UNAME_RELEASE} 3133cdf0e10cSrcweir+ exit ;; 3134cdf0e10cSrcweir+ *:DragonFly:*:*) 3135cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 3136cdf0e10cSrcweir+ exit ;; 3137cdf0e10cSrcweir+ *:*VMS:*:*) 3138cdf0e10cSrcweir+ UNAME_MACHINE=`(uname -p) 2>/dev/null` 3139cdf0e10cSrcweir+ case "${UNAME_MACHINE}" in 3140cdf0e10cSrcweir+ A*) echo alpha-dec-vms ; exit ;; 3141cdf0e10cSrcweir+ I*) echo ia64-dec-vms ; exit ;; 3142cdf0e10cSrcweir+ V*) echo vax-dec-vms ; exit ;; 3143cdf0e10cSrcweir+ esac ;; 3144cdf0e10cSrcweir+ *:XENIX:*:SysV) 3145cdf0e10cSrcweir+ echo i386-pc-xenix 3146cdf0e10cSrcweir+ exit ;; 3147cdf0e10cSrcweir+ i*86:skyos:*:*) 3148cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 3149cdf0e10cSrcweir+ exit ;; 3150cdf0e10cSrcweir+ i*86:rdos:*:*) 3151cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-pc-rdos 3152cdf0e10cSrcweir+ exit ;; 3153cdf0e10cSrcweir+ i*86:AROS:*:*) 3154cdf0e10cSrcweir+ echo ${UNAME_MACHINE}-pc-aros 3155cdf0e10cSrcweir+ exit ;; 3156cdf0e10cSrcweir esac 3157cdf0e10cSrcweir 3158cdf0e10cSrcweir #echo '(No uname command or uname output not recognized.)' 1>&2 3159cdf0e10cSrcweir@@ -1194,7 +1331,7 @@ 3160cdf0e10cSrcweir #endif 3161cdf0e10cSrcweir 3162cdf0e10cSrcweir #if defined (__arm) && defined (__acorn) && defined (__unix) 3163cdf0e10cSrcweir- printf ("arm-acorn-riscix"); exit (0); 3164cdf0e10cSrcweir+ printf ("arm-acorn-riscix\n"); exit (0); 3165cdf0e10cSrcweir #endif 3166cdf0e10cSrcweir 3167cdf0e10cSrcweir #if defined (hp300) && !defined (hpux) 3168cdf0e10cSrcweir@@ -1283,12 +1420,12 @@ 3169cdf0e10cSrcweir } 3170cdf0e10cSrcweir EOF 3171cdf0e10cSrcweir 3172cdf0e10cSrcweir-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 3173cdf0e10cSrcweir-rm -f $dummy.c $dummy && rmdir $tmpdir 3174cdf0e10cSrcweir+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 3175cdf0e10cSrcweir+ { echo "$SYSTEM_NAME"; exit; } 3176cdf0e10cSrcweir 3177cdf0e10cSrcweir # Apollos put the system type in the environment. 3178cdf0e10cSrcweir 3179cdf0e10cSrcweir-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 3180cdf0e10cSrcweir+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 3181cdf0e10cSrcweir 3182cdf0e10cSrcweir # Convex versions that predate uname can use getsysinfo(1) 3183cdf0e10cSrcweir 3184cdf0e10cSrcweir@@ -1297,22 +1434,22 @@ 3185cdf0e10cSrcweir case `getsysinfo -f cpu_type` in 3186cdf0e10cSrcweir c1*) 3187cdf0e10cSrcweir echo c1-convex-bsd 3188cdf0e10cSrcweir- exit 0 ;; 3189cdf0e10cSrcweir+ exit ;; 3190cdf0e10cSrcweir c2*) 3191cdf0e10cSrcweir if getsysinfo -f scalar_acc 3192cdf0e10cSrcweir then echo c32-convex-bsd 3193cdf0e10cSrcweir else echo c2-convex-bsd 3194cdf0e10cSrcweir fi 3195cdf0e10cSrcweir- exit 0 ;; 3196cdf0e10cSrcweir+ exit ;; 3197cdf0e10cSrcweir c34*) 3198cdf0e10cSrcweir echo c34-convex-bsd 3199cdf0e10cSrcweir- exit 0 ;; 3200cdf0e10cSrcweir+ exit ;; 3201cdf0e10cSrcweir c38*) 3202cdf0e10cSrcweir echo c38-convex-bsd 3203cdf0e10cSrcweir- exit 0 ;; 3204cdf0e10cSrcweir+ exit ;; 3205cdf0e10cSrcweir c4*) 3206cdf0e10cSrcweir echo c4-convex-bsd 3207cdf0e10cSrcweir- exit 0 ;; 3208cdf0e10cSrcweir+ exit ;; 3209cdf0e10cSrcweir esac 3210cdf0e10cSrcweir fi 3211cdf0e10cSrcweir 3212cdf0e10cSrcweir@@ -1323,7 +1460,9 @@ 3213cdf0e10cSrcweir the operating system you are using. It is advised that you 3214cdf0e10cSrcweir download the most up to date version of the config scripts from 3215cdf0e10cSrcweir 3216cdf0e10cSrcweir- ftp://ftp.gnu.org/pub/gnu/config/ 3217cdf0e10cSrcweir+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 3218cdf0e10cSrcweir+and 3219cdf0e10cSrcweir+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 3220cdf0e10cSrcweir 3221cdf0e10cSrcweir If the version you run ($0) is already up to date, please 3222cdf0e10cSrcweir send the following data and any information you think might be 3223cdf0e10cSrcweir--- misc/libtextcat-2.2/config.sub 2010-04-15 09:20:04.000000000 +0000 3224cdf0e10cSrcweir+++ misc/build/libtextcat-2.2/config.sub 2010-04-15 09:20:41.000000000 +0000 3225cdf0e10cSrcweir@@ -1,9 +1,10 @@ 3226cdf0e10cSrcweir #! /bin/sh 3227cdf0e10cSrcweir # Configuration validation subroutine script. 3228cdf0e10cSrcweir # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3229cdf0e10cSrcweir-# 2000, 2001, 2002 Free Software Foundation, Inc. 3230cdf0e10cSrcweir+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 3231cdf0e10cSrcweir+# Free Software Foundation, Inc. 3232cdf0e10cSrcweir 3233cdf0e10cSrcweir-timestamp='2002-09-05' 3234cdf0e10cSrcweir+timestamp='2010-01-22' 3235cdf0e10cSrcweir 3236cdf0e10cSrcweir # This file is (in principle) common to ALL GNU software. 3237cdf0e10cSrcweir # The presence of a machine in this file suggests that SOME GNU software 3238cdf0e10cSrcweir@@ -21,22 +22,26 @@ 3239cdf0e10cSrcweir # 3240cdf0e10cSrcweir # You should have received a copy of the GNU General Public License 3241cdf0e10cSrcweir # along with this program; if not, write to the Free Software 3242cdf0e10cSrcweir-# Foundation, Inc., 59 Temple Place - Suite 330, 3243cdf0e10cSrcweir-# Boston, MA 02111-1307, USA. 3244cdf0e10cSrcweir- 3245cdf0e10cSrcweir+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 3246cdf0e10cSrcweir+# 02110-1301, USA. 3247cdf0e10cSrcweir+# 3248cdf0e10cSrcweir # As a special exception to the GNU General Public License, if you 3249cdf0e10cSrcweir # distribute this file as part of a program that contains a 3250cdf0e10cSrcweir # configuration script generated by Autoconf, you may include it under 3251cdf0e10cSrcweir # the same distribution terms that you use for the rest of that program. 3252cdf0e10cSrcweir 3253cdf0e10cSrcweir+ 3254cdf0e10cSrcweir # Please send patches to <config-patches@gnu.org>. Submit a context 3255cdf0e10cSrcweir-# diff and a properly formatted ChangeLog entry. 3256cdf0e10cSrcweir+# diff and a properly formatted GNU ChangeLog entry. 3257cdf0e10cSrcweir # 3258cdf0e10cSrcweir # Configuration subroutine to validate and canonicalize a configuration type. 3259cdf0e10cSrcweir # Supply the specified configuration type as an argument. 3260cdf0e10cSrcweir # If it is invalid, we print an error message on stderr and exit with code 1. 3261cdf0e10cSrcweir # Otherwise, we print the canonical config type on stdout and succeed. 3262cdf0e10cSrcweir 3263cdf0e10cSrcweir+# You can get the latest version of this script from: 3264cdf0e10cSrcweir+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 3265cdf0e10cSrcweir+ 3266cdf0e10cSrcweir # This file is supposed to be the same for all GNU packages 3267cdf0e10cSrcweir # and recognize all the CPU types, system types and aliases 3268cdf0e10cSrcweir # that are meaningful with *any* GNU software. 3269cdf0e10cSrcweir@@ -70,8 +75,9 @@ 3270cdf0e10cSrcweir version="\ 3271cdf0e10cSrcweir GNU config.sub ($timestamp) 3272cdf0e10cSrcweir 3273cdf0e10cSrcweir-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 3274cdf0e10cSrcweir-Free Software Foundation, Inc. 3275cdf0e10cSrcweir+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 3276cdf0e10cSrcweir+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 3277cdf0e10cSrcweir+Software Foundation, Inc. 3278cdf0e10cSrcweir 3279cdf0e10cSrcweir This is free software; see the source for copying conditions. There is NO 3280cdf0e10cSrcweir warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 3281cdf0e10cSrcweir@@ -83,11 +89,11 @@ 3282cdf0e10cSrcweir while test $# -gt 0 ; do 3283cdf0e10cSrcweir case $1 in 3284cdf0e10cSrcweir --time-stamp | --time* | -t ) 3285cdf0e10cSrcweir- echo "$timestamp" ; exit 0 ;; 3286cdf0e10cSrcweir+ echo "$timestamp" ; exit ;; 3287cdf0e10cSrcweir --version | -v ) 3288cdf0e10cSrcweir- echo "$version" ; exit 0 ;; 3289cdf0e10cSrcweir+ echo "$version" ; exit ;; 3290cdf0e10cSrcweir --help | --h* | -h ) 3291cdf0e10cSrcweir- echo "$usage"; exit 0 ;; 3292cdf0e10cSrcweir+ echo "$usage"; exit ;; 3293cdf0e10cSrcweir -- ) # Stop option processing 3294cdf0e10cSrcweir shift; break ;; 3295cdf0e10cSrcweir - ) # Use stdin as input. 3296cdf0e10cSrcweir@@ -99,7 +105,7 @@ 3297cdf0e10cSrcweir *local*) 3298cdf0e10cSrcweir # First pass through any local machine types. 3299cdf0e10cSrcweir echo $1 3300cdf0e10cSrcweir- exit 0;; 3301cdf0e10cSrcweir+ exit ;; 3302cdf0e10cSrcweir 3303cdf0e10cSrcweir * ) 3304cdf0e10cSrcweir break ;; 3305cdf0e10cSrcweir@@ -118,7 +124,10 @@ 3306cdf0e10cSrcweir # Here we must recognize all the valid KERNEL-OS combinations. 3307cdf0e10cSrcweir maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 3308cdf0e10cSrcweir case $maybe_os in 3309cdf0e10cSrcweir- nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) 3310cdf0e10cSrcweir+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 3311cdf0e10cSrcweir+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 3312cdf0e10cSrcweir+ kopensolaris*-gnu* | \ 3313cdf0e10cSrcweir+ storm-chaos* | os2-emx* | rtmk-nova*) 3314cdf0e10cSrcweir os=-$maybe_os 3315cdf0e10cSrcweir basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 3316cdf0e10cSrcweir ;; 3317cdf0e10cSrcweir@@ -144,10 +153,13 @@ 3318cdf0e10cSrcweir -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 3319cdf0e10cSrcweir -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 3320cdf0e10cSrcweir -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 3321cdf0e10cSrcweir- -apple | -axis) 3322cdf0e10cSrcweir+ -apple | -axis | -knuth | -cray | -microblaze) 3323cdf0e10cSrcweir os= 3324cdf0e10cSrcweir basic_machine=$1 3325cdf0e10cSrcweir ;; 3326cdf0e10cSrcweir+ -bluegene*) 3327cdf0e10cSrcweir+ os=-cnk 3328cdf0e10cSrcweir+ ;; 3329cdf0e10cSrcweir -sim | -cisco | -oki | -wec | -winbond) 3330cdf0e10cSrcweir os= 3331cdf0e10cSrcweir basic_machine=$1 3332cdf0e10cSrcweir@@ -169,6 +181,10 @@ 3333cdf0e10cSrcweir -hiux*) 3334cdf0e10cSrcweir os=-hiuxwe2 3335cdf0e10cSrcweir ;; 3336cdf0e10cSrcweir+ -sco6) 3337cdf0e10cSrcweir+ os=-sco5v6 3338cdf0e10cSrcweir+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 3339cdf0e10cSrcweir+ ;; 3340cdf0e10cSrcweir -sco5) 3341cdf0e10cSrcweir os=-sco3.2v5 3342cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 3343cdf0e10cSrcweir@@ -185,6 +201,10 @@ 3344cdf0e10cSrcweir # Don't forget version if it is 3.2v4 or newer. 3345cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 3346cdf0e10cSrcweir ;; 3347cdf0e10cSrcweir+ -sco5v6*) 3348cdf0e10cSrcweir+ # Don't forget version if it is 3.2v4 or newer. 3349cdf0e10cSrcweir+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 3350cdf0e10cSrcweir+ ;; 3351cdf0e10cSrcweir -sco*) 3352cdf0e10cSrcweir os=-sco3.2v2 3353cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 3354cdf0e10cSrcweir@@ -228,51 +248,71 @@ 3355cdf0e10cSrcweir | a29k \ 3356cdf0e10cSrcweir | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 3357cdf0e10cSrcweir | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 3358cdf0e10cSrcweir- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 3359cdf0e10cSrcweir- | clipper \ 3360cdf0e10cSrcweir+ | am33_2.0 \ 3361cdf0e10cSrcweir+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 3362cdf0e10cSrcweir+ | bfin \ 3363cdf0e10cSrcweir+ | c4x | clipper \ 3364cdf0e10cSrcweir | d10v | d30v | dlx | dsp16xx \ 3365cdf0e10cSrcweir- | fr30 | frv \ 3366cdf0e10cSrcweir+ | fido | fr30 | frv \ 3367cdf0e10cSrcweir | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 3368cdf0e10cSrcweir | i370 | i860 | i960 | ia64 \ 3369cdf0e10cSrcweir- | ip2k \ 3370cdf0e10cSrcweir- | m32r | m68000 | m68k | m88k | mcore \ 3371cdf0e10cSrcweir+ | ip2k | iq2000 \ 3372cdf0e10cSrcweir+ | lm32 \ 3373cdf0e10cSrcweir+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ 3374cdf0e10cSrcweir+ | maxq | mb | microblaze | mcore | mep | metag \ 3375cdf0e10cSrcweir | mips | mipsbe | mipseb | mipsel | mipsle \ 3376cdf0e10cSrcweir | mips16 \ 3377cdf0e10cSrcweir | mips64 | mips64el \ 3378cdf0e10cSrcweir- | mips64vr | mips64vrel \ 3379cdf0e10cSrcweir+ | mips64octeon | mips64octeonel \ 3380cdf0e10cSrcweir | mips64orion | mips64orionel \ 3381cdf0e10cSrcweir+ | mips64r5900 | mips64r5900el \ 3382cdf0e10cSrcweir+ | mips64vr | mips64vrel \ 3383cdf0e10cSrcweir | mips64vr4100 | mips64vr4100el \ 3384cdf0e10cSrcweir | mips64vr4300 | mips64vr4300el \ 3385cdf0e10cSrcweir | mips64vr5000 | mips64vr5000el \ 3386cdf0e10cSrcweir+ | mips64vr5900 | mips64vr5900el \ 3387cdf0e10cSrcweir | mipsisa32 | mipsisa32el \ 3388cdf0e10cSrcweir+ | mipsisa32r2 | mipsisa32r2el \ 3389cdf0e10cSrcweir | mipsisa64 | mipsisa64el \ 3390cdf0e10cSrcweir+ | mipsisa64r2 | mipsisa64r2el \ 3391cdf0e10cSrcweir | mipsisa64sb1 | mipsisa64sb1el \ 3392cdf0e10cSrcweir | mipsisa64sr71k | mipsisa64sr71kel \ 3393cdf0e10cSrcweir | mipstx39 | mipstx39el \ 3394cdf0e10cSrcweir | mn10200 | mn10300 \ 3395cdf0e10cSrcweir+ | moxie \ 3396cdf0e10cSrcweir+ | mt \ 3397cdf0e10cSrcweir+ | msp430 \ 3398cdf0e10cSrcweir+ | nios | nios2 \ 3399cdf0e10cSrcweir | ns16k | ns32k \ 3400cdf0e10cSrcweir- | openrisc | or32 \ 3401cdf0e10cSrcweir+ | or32 \ 3402cdf0e10cSrcweir | pdp10 | pdp11 | pj | pjl \ 3403cdf0e10cSrcweir | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 3404cdf0e10cSrcweir | pyramid \ 3405cdf0e10cSrcweir- | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 3406cdf0e10cSrcweir+ | rx \ 3407cdf0e10cSrcweir+ | score \ 3408cdf0e10cSrcweir+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 3409cdf0e10cSrcweir | sh64 | sh64le \ 3410cdf0e10cSrcweir- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ 3411cdf0e10cSrcweir- | strongarm \ 3412cdf0e10cSrcweir- | tahoe | thumb | tic80 | tron \ 3413cdf0e10cSrcweir+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 3414cdf0e10cSrcweir+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 3415cdf0e10cSrcweir+ | spu | strongarm \ 3416cdf0e10cSrcweir+ | tahoe | thumb | tic4x | tic80 | tron \ 3417cdf0e10cSrcweir+ | ubicom32 \ 3418cdf0e10cSrcweir | v850 | v850e \ 3419cdf0e10cSrcweir | we32k \ 3420cdf0e10cSrcweir- | x86 | xscale | xstormy16 | xtensa \ 3421cdf0e10cSrcweir- | z8k) 3422cdf0e10cSrcweir+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 3423cdf0e10cSrcweir+ | z8k | z80) 3424cdf0e10cSrcweir basic_machine=$basic_machine-unknown 3425cdf0e10cSrcweir ;; 3426cdf0e10cSrcweir- m6811 | m68hc11 | m6812 | m68hc12) 3427cdf0e10cSrcweir+ m6811 | m68hc11 | m6812 | m68hc12 | picochip) 3428cdf0e10cSrcweir # Motorola 68HC11/12. 3429cdf0e10cSrcweir basic_machine=$basic_machine-unknown 3430cdf0e10cSrcweir os=-none 3431cdf0e10cSrcweir ;; 3432cdf0e10cSrcweir m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 3433cdf0e10cSrcweir ;; 3434cdf0e10cSrcweir+ ms1) 3435cdf0e10cSrcweir+ basic_machine=mt-unknown 3436cdf0e10cSrcweir+ ;; 3437cdf0e10cSrcweir 3438cdf0e10cSrcweir # We use `pc' rather than `unknown' 3439cdf0e10cSrcweir # because (1) that's what they normally are, and 3440cdf0e10cSrcweir@@ -292,50 +332,69 @@ 3441cdf0e10cSrcweir | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 3442cdf0e10cSrcweir | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 3443cdf0e10cSrcweir | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 3444cdf0e10cSrcweir- | avr-* \ 3445cdf0e10cSrcweir- | bs2000-* \ 3446cdf0e10cSrcweir- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ 3447cdf0e10cSrcweir- | clipper-* | cydra-* \ 3448cdf0e10cSrcweir+ | avr-* | avr32-* \ 3449cdf0e10cSrcweir+ | bfin-* | bs2000-* \ 3450cdf0e10cSrcweir+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 3451cdf0e10cSrcweir+ | clipper-* | craynv-* | cydra-* \ 3452cdf0e10cSrcweir | d10v-* | d30v-* | dlx-* \ 3453cdf0e10cSrcweir | elxsi-* \ 3454cdf0e10cSrcweir- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 3455cdf0e10cSrcweir+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 3456cdf0e10cSrcweir | h8300-* | h8500-* \ 3457cdf0e10cSrcweir | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 3458cdf0e10cSrcweir | i*86-* | i860-* | i960-* | ia64-* \ 3459cdf0e10cSrcweir- | ip2k-* \ 3460cdf0e10cSrcweir- | m32r-* \ 3461cdf0e10cSrcweir+ | ip2k-* | iq2000-* \ 3462cdf0e10cSrcweir+ | lm32-* \ 3463cdf0e10cSrcweir+ | m32c-* | m32r-* | m32rle-* \ 3464cdf0e10cSrcweir | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 3465cdf0e10cSrcweir- | m88110-* | m88k-* | mcore-* \ 3466cdf0e10cSrcweir+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ 3467cdf0e10cSrcweir | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 3468cdf0e10cSrcweir | mips16-* \ 3469cdf0e10cSrcweir | mips64-* | mips64el-* \ 3470cdf0e10cSrcweir- | mips64vr-* | mips64vrel-* \ 3471cdf0e10cSrcweir+ | mips64octeon-* | mips64octeonel-* \ 3472cdf0e10cSrcweir | mips64orion-* | mips64orionel-* \ 3473cdf0e10cSrcweir+ | mips64r5900-* | mips64r5900el-* \ 3474cdf0e10cSrcweir+ | mips64vr-* | mips64vrel-* \ 3475cdf0e10cSrcweir | mips64vr4100-* | mips64vr4100el-* \ 3476cdf0e10cSrcweir | mips64vr4300-* | mips64vr4300el-* \ 3477cdf0e10cSrcweir | mips64vr5000-* | mips64vr5000el-* \ 3478cdf0e10cSrcweir+ | mips64vr5900-* | mips64vr5900el-* \ 3479cdf0e10cSrcweir | mipsisa32-* | mipsisa32el-* \ 3480cdf0e10cSrcweir+ | mipsisa32r2-* | mipsisa32r2el-* \ 3481cdf0e10cSrcweir | mipsisa64-* | mipsisa64el-* \ 3482cdf0e10cSrcweir+ | mipsisa64r2-* | mipsisa64r2el-* \ 3483cdf0e10cSrcweir | mipsisa64sb1-* | mipsisa64sb1el-* \ 3484cdf0e10cSrcweir | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 3485cdf0e10cSrcweir- | mipstx39 | mipstx39el \ 3486cdf0e10cSrcweir+ | mipstx39-* | mipstx39el-* \ 3487cdf0e10cSrcweir+ | mmix-* \ 3488cdf0e10cSrcweir+ | mt-* \ 3489cdf0e10cSrcweir+ | msp430-* \ 3490cdf0e10cSrcweir+ | nios-* | nios2-* \ 3491cdf0e10cSrcweir | none-* | np1-* | ns16k-* | ns32k-* \ 3492cdf0e10cSrcweir | orion-* \ 3493cdf0e10cSrcweir | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 3494cdf0e10cSrcweir | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 3495cdf0e10cSrcweir | pyramid-* \ 3496cdf0e10cSrcweir- | romp-* | rs6000-* \ 3497cdf0e10cSrcweir- | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ 3498cdf0e10cSrcweir+ | romp-* | rs6000-* | rx-* \ 3499cdf0e10cSrcweir+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 3500cdf0e10cSrcweir | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 3501cdf0e10cSrcweir- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ 3502cdf0e10cSrcweir- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 3503cdf0e10cSrcweir- | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ 3504cdf0e10cSrcweir+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 3505cdf0e10cSrcweir+ | sparclite-* \ 3506cdf0e10cSrcweir+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 3507cdf0e10cSrcweir+ | tahoe-* | thumb-* \ 3508cdf0e10cSrcweir+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 3509cdf0e10cSrcweir+ | tile-* | tilegx-* \ 3510cdf0e10cSrcweir+ | tron-* \ 3511cdf0e10cSrcweir+ | ubicom32-* \ 3512cdf0e10cSrcweir | v850-* | v850e-* | vax-* \ 3513cdf0e10cSrcweir | we32k-* \ 3514cdf0e10cSrcweir- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ 3515cdf0e10cSrcweir- | xtensa-* \ 3516cdf0e10cSrcweir+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 3517cdf0e10cSrcweir+ | xstormy16-* | xtensa*-* \ 3518cdf0e10cSrcweir | ymp-* \ 3519cdf0e10cSrcweir- | z8k-*) 3520cdf0e10cSrcweir+ | z8k-* | z80-*) 3521cdf0e10cSrcweir+ ;; 3522cdf0e10cSrcweir+ # Recognize the basic CPU types without company name, with glob match. 3523cdf0e10cSrcweir+ xtensa*) 3524cdf0e10cSrcweir+ basic_machine=$basic_machine-unknown 3525cdf0e10cSrcweir ;; 3526cdf0e10cSrcweir # Recognize the various machine names and aliases which stand 3527cdf0e10cSrcweir # for a CPU type and a company and sometimes even an OS. 3528cdf0e10cSrcweir@@ -353,6 +412,9 @@ 3529cdf0e10cSrcweir basic_machine=a29k-amd 3530cdf0e10cSrcweir os=-udi 3531cdf0e10cSrcweir ;; 3532cdf0e10cSrcweir+ abacus) 3533cdf0e10cSrcweir+ basic_machine=abacus-unknown 3534cdf0e10cSrcweir+ ;; 3535cdf0e10cSrcweir adobe68k) 3536cdf0e10cSrcweir basic_machine=m68010-adobe 3537cdf0e10cSrcweir os=-scout 3538cdf0e10cSrcweir@@ -367,6 +429,12 @@ 3539cdf0e10cSrcweir basic_machine=a29k-none 3540cdf0e10cSrcweir os=-bsd 3541cdf0e10cSrcweir ;; 3542cdf0e10cSrcweir+ amd64) 3543cdf0e10cSrcweir+ basic_machine=x86_64-pc 3544cdf0e10cSrcweir+ ;; 3545cdf0e10cSrcweir+ amd64-*) 3546cdf0e10cSrcweir+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 3547cdf0e10cSrcweir+ ;; 3548cdf0e10cSrcweir amdahl) 3549cdf0e10cSrcweir basic_machine=580-amdahl 3550cdf0e10cSrcweir os=-sysv 3551cdf0e10cSrcweir@@ -390,6 +458,10 @@ 3552cdf0e10cSrcweir basic_machine=m68k-apollo 3553cdf0e10cSrcweir os=-bsd 3554cdf0e10cSrcweir ;; 3555cdf0e10cSrcweir+ aros) 3556cdf0e10cSrcweir+ basic_machine=i386-pc 3557cdf0e10cSrcweir+ os=-aros 3558cdf0e10cSrcweir+ ;; 3559cdf0e10cSrcweir aux) 3560cdf0e10cSrcweir basic_machine=m68k-apple 3561cdf0e10cSrcweir os=-aux 3562cdf0e10cSrcweir@@ -398,10 +470,26 @@ 3563cdf0e10cSrcweir basic_machine=ns32k-sequent 3564cdf0e10cSrcweir os=-dynix 3565cdf0e10cSrcweir ;; 3566cdf0e10cSrcweir+ blackfin) 3567cdf0e10cSrcweir+ basic_machine=bfin-unknown 3568cdf0e10cSrcweir+ os=-linux 3569cdf0e10cSrcweir+ ;; 3570cdf0e10cSrcweir+ blackfin-*) 3571cdf0e10cSrcweir+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 3572cdf0e10cSrcweir+ os=-linux 3573cdf0e10cSrcweir+ ;; 3574cdf0e10cSrcweir+ bluegene*) 3575cdf0e10cSrcweir+ basic_machine=powerpc-ibm 3576cdf0e10cSrcweir+ os=-cnk 3577cdf0e10cSrcweir+ ;; 3578cdf0e10cSrcweir c90) 3579cdf0e10cSrcweir basic_machine=c90-cray 3580cdf0e10cSrcweir os=-unicos 3581cdf0e10cSrcweir ;; 3582cdf0e10cSrcweir+ cegcc) 3583cdf0e10cSrcweir+ basic_machine=arm-unknown 3584cdf0e10cSrcweir+ os=-cegcc 3585cdf0e10cSrcweir+ ;; 3586cdf0e10cSrcweir convex-c1) 3587cdf0e10cSrcweir basic_machine=c1-convex 3588cdf0e10cSrcweir os=-bsd 3589cdf0e10cSrcweir@@ -426,12 +514,27 @@ 3590cdf0e10cSrcweir basic_machine=j90-cray 3591cdf0e10cSrcweir os=-unicos 3592cdf0e10cSrcweir ;; 3593cdf0e10cSrcweir+ craynv) 3594cdf0e10cSrcweir+ basic_machine=craynv-cray 3595cdf0e10cSrcweir+ os=-unicosmp 3596cdf0e10cSrcweir+ ;; 3597cdf0e10cSrcweir+ cr16) 3598cdf0e10cSrcweir+ basic_machine=cr16-unknown 3599cdf0e10cSrcweir+ os=-elf 3600cdf0e10cSrcweir+ ;; 3601cdf0e10cSrcweir crds | unos) 3602cdf0e10cSrcweir basic_machine=m68k-crds 3603cdf0e10cSrcweir ;; 3604cdf0e10cSrcweir+ crisv32 | crisv32-* | etraxfs*) 3605cdf0e10cSrcweir+ basic_machine=crisv32-axis 3606cdf0e10cSrcweir+ ;; 3607cdf0e10cSrcweir cris | cris-* | etrax*) 3608cdf0e10cSrcweir basic_machine=cris-axis 3609cdf0e10cSrcweir ;; 3610cdf0e10cSrcweir+ crx) 3611cdf0e10cSrcweir+ basic_machine=crx-unknown 3612cdf0e10cSrcweir+ os=-elf 3613cdf0e10cSrcweir+ ;; 3614cdf0e10cSrcweir da30 | da30-*) 3615cdf0e10cSrcweir basic_machine=m68k-da30 3616cdf0e10cSrcweir ;; 3617cdf0e10cSrcweir@@ -454,6 +557,14 @@ 3618cdf0e10cSrcweir basic_machine=m88k-motorola 3619cdf0e10cSrcweir os=-sysv3 3620cdf0e10cSrcweir ;; 3621cdf0e10cSrcweir+ dicos) 3622cdf0e10cSrcweir+ basic_machine=i686-pc 3623cdf0e10cSrcweir+ os=-dicos 3624cdf0e10cSrcweir+ ;; 3625cdf0e10cSrcweir+ djgpp) 3626cdf0e10cSrcweir+ basic_machine=i586-pc 3627cdf0e10cSrcweir+ os=-msdosdjgpp 3628cdf0e10cSrcweir+ ;; 3629cdf0e10cSrcweir dpx20 | dpx20-*) 3630cdf0e10cSrcweir basic_machine=rs6000-bull 3631cdf0e10cSrcweir os=-bosx 3632cdf0e10cSrcweir@@ -604,6 +715,14 @@ 3633cdf0e10cSrcweir basic_machine=m68k-isi 3634cdf0e10cSrcweir os=-sysv 3635cdf0e10cSrcweir ;; 3636cdf0e10cSrcweir+ m68knommu) 3637cdf0e10cSrcweir+ basic_machine=m68k-unknown 3638cdf0e10cSrcweir+ os=-linux 3639cdf0e10cSrcweir+ ;; 3640cdf0e10cSrcweir+ m68knommu-*) 3641cdf0e10cSrcweir+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 3642cdf0e10cSrcweir+ os=-linux 3643cdf0e10cSrcweir+ ;; 3644cdf0e10cSrcweir m88k-omron*) 3645cdf0e10cSrcweir basic_machine=m88k-omron 3646cdf0e10cSrcweir ;; 3647cdf0e10cSrcweir@@ -615,10 +734,17 @@ 3648cdf0e10cSrcweir basic_machine=ns32k-utek 3649cdf0e10cSrcweir os=-sysv 3650cdf0e10cSrcweir ;; 3651cdf0e10cSrcweir+ microblaze) 3652cdf0e10cSrcweir+ basic_machine=microblaze-xilinx 3653cdf0e10cSrcweir+ ;; 3654cdf0e10cSrcweir mingw32) 3655cdf0e10cSrcweir basic_machine=i386-pc 3656cdf0e10cSrcweir os=-mingw32 3657cdf0e10cSrcweir ;; 3658cdf0e10cSrcweir+ mingw32ce) 3659cdf0e10cSrcweir+ basic_machine=arm-unknown 3660cdf0e10cSrcweir+ os=-mingw32ce 3661cdf0e10cSrcweir+ ;; 3662cdf0e10cSrcweir miniframe) 3663cdf0e10cSrcweir basic_machine=m68000-convergent 3664cdf0e10cSrcweir ;; 3665cdf0e10cSrcweir@@ -632,10 +758,6 @@ 3666cdf0e10cSrcweir mips3*) 3667cdf0e10cSrcweir basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 3668cdf0e10cSrcweir ;; 3669cdf0e10cSrcweir- mmix*) 3670cdf0e10cSrcweir- basic_machine=mmix-knuth 3671cdf0e10cSrcweir- os=-mmixware 3672cdf0e10cSrcweir- ;; 3673cdf0e10cSrcweir monitor) 3674cdf0e10cSrcweir basic_machine=m68k-rom68k 3675cdf0e10cSrcweir os=-coff 3676cdf0e10cSrcweir@@ -648,6 +770,9 @@ 3677cdf0e10cSrcweir basic_machine=i386-pc 3678cdf0e10cSrcweir os=-msdos 3679cdf0e10cSrcweir ;; 3680cdf0e10cSrcweir+ ms1-*) 3681cdf0e10cSrcweir+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 3682cdf0e10cSrcweir+ ;; 3683cdf0e10cSrcweir mvs) 3684cdf0e10cSrcweir basic_machine=i370-ibm 3685cdf0e10cSrcweir os=-mvs 3686cdf0e10cSrcweir@@ -723,9 +848,12 @@ 3687cdf0e10cSrcweir basic_machine=hppa1.1-oki 3688cdf0e10cSrcweir os=-proelf 3689cdf0e10cSrcweir ;; 3690cdf0e10cSrcweir- or32 | or32-*) 3691cdf0e10cSrcweir+ openrisc | openrisc-*) 3692cdf0e10cSrcweir basic_machine=or32-unknown 3693cdf0e10cSrcweir- os=-coff 3694cdf0e10cSrcweir+ ;; 3695cdf0e10cSrcweir+ os400) 3696cdf0e10cSrcweir+ basic_machine=powerpc-ibm 3697cdf0e10cSrcweir+ os=-os400 3698cdf0e10cSrcweir ;; 3699cdf0e10cSrcweir OSE68000 | ose68000) 3700cdf0e10cSrcweir basic_machine=m68000-ericsson 3701cdf0e10cSrcweir@@ -743,6 +871,14 @@ 3702cdf0e10cSrcweir basic_machine=i860-intel 3703cdf0e10cSrcweir os=-osf 3704cdf0e10cSrcweir ;; 3705cdf0e10cSrcweir+ parisc) 3706cdf0e10cSrcweir+ basic_machine=hppa-unknown 3707cdf0e10cSrcweir+ os=-linux 3708cdf0e10cSrcweir+ ;; 3709cdf0e10cSrcweir+ parisc-*) 3710cdf0e10cSrcweir+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 3711cdf0e10cSrcweir+ os=-linux 3712cdf0e10cSrcweir+ ;; 3713cdf0e10cSrcweir pbd) 3714cdf0e10cSrcweir basic_machine=sparc-tti 3715cdf0e10cSrcweir ;; 3716cdf0e10cSrcweir@@ -752,24 +888,36 @@ 3717cdf0e10cSrcweir pc532 | pc532-*) 3718cdf0e10cSrcweir basic_machine=ns32k-pc532 3719cdf0e10cSrcweir ;; 3720cdf0e10cSrcweir+ pc98) 3721cdf0e10cSrcweir+ basic_machine=i386-pc 3722cdf0e10cSrcweir+ ;; 3723cdf0e10cSrcweir+ pc98-*) 3724cdf0e10cSrcweir+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 3725cdf0e10cSrcweir+ ;; 3726cdf0e10cSrcweir pentium | p5 | k5 | k6 | nexgen | viac3) 3727cdf0e10cSrcweir basic_machine=i586-pc 3728cdf0e10cSrcweir ;; 3729cdf0e10cSrcweir pentiumpro | p6 | 6x86 | athlon | athlon_*) 3730cdf0e10cSrcweir basic_machine=i686-pc 3731cdf0e10cSrcweir ;; 3732cdf0e10cSrcweir- pentiumii | pentium2) 3733cdf0e10cSrcweir+ pentiumii | pentium2 | pentiumiii | pentium3) 3734cdf0e10cSrcweir basic_machine=i686-pc 3735cdf0e10cSrcweir ;; 3736cdf0e10cSrcweir+ pentium4) 3737cdf0e10cSrcweir+ basic_machine=i786-pc 3738cdf0e10cSrcweir+ ;; 3739cdf0e10cSrcweir pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 3740cdf0e10cSrcweir basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 3741cdf0e10cSrcweir ;; 3742cdf0e10cSrcweir pentiumpro-* | p6-* | 6x86-* | athlon-*) 3743cdf0e10cSrcweir basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 3744cdf0e10cSrcweir ;; 3745cdf0e10cSrcweir- pentiumii-* | pentium2-*) 3746cdf0e10cSrcweir+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 3747cdf0e10cSrcweir basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 3748cdf0e10cSrcweir ;; 3749cdf0e10cSrcweir+ pentium4-*) 3750cdf0e10cSrcweir+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 3751cdf0e10cSrcweir+ ;; 3752cdf0e10cSrcweir pn) 3753cdf0e10cSrcweir basic_machine=pn-gould 3754cdf0e10cSrcweir ;; 3755cdf0e10cSrcweir@@ -802,6 +950,10 @@ 3756cdf0e10cSrcweir basic_machine=i586-unknown 3757cdf0e10cSrcweir os=-pw32 3758cdf0e10cSrcweir ;; 3759cdf0e10cSrcweir+ rdos) 3760cdf0e10cSrcweir+ basic_machine=i386-pc 3761cdf0e10cSrcweir+ os=-rdos 3762cdf0e10cSrcweir+ ;; 3763cdf0e10cSrcweir rom68k) 3764cdf0e10cSrcweir basic_machine=m68k-rom68k 3765cdf0e10cSrcweir os=-coff 3766cdf0e10cSrcweir@@ -828,6 +980,14 @@ 3767cdf0e10cSrcweir sb1el) 3768cdf0e10cSrcweir basic_machine=mipsisa64sb1el-unknown 3769cdf0e10cSrcweir ;; 3770cdf0e10cSrcweir+ sde) 3771cdf0e10cSrcweir+ basic_machine=mipsisa32-sde 3772cdf0e10cSrcweir+ os=-elf 3773cdf0e10cSrcweir+ ;; 3774cdf0e10cSrcweir+ sei) 3775cdf0e10cSrcweir+ basic_machine=mips-sei 3776cdf0e10cSrcweir+ os=-seiux 3777cdf0e10cSrcweir+ ;; 3778cdf0e10cSrcweir sequent) 3779cdf0e10cSrcweir basic_machine=i386-sequent 3780cdf0e10cSrcweir ;; 3781cdf0e10cSrcweir@@ -835,6 +995,12 @@ 3782cdf0e10cSrcweir basic_machine=sh-hitachi 3783cdf0e10cSrcweir os=-hms 3784cdf0e10cSrcweir ;; 3785cdf0e10cSrcweir+ sh5el) 3786cdf0e10cSrcweir+ basic_machine=sh5le-unknown 3787cdf0e10cSrcweir+ ;; 3788cdf0e10cSrcweir+ sh64) 3789cdf0e10cSrcweir+ basic_machine=sh64-unknown 3790cdf0e10cSrcweir+ ;; 3791cdf0e10cSrcweir sparclite-wrs | simso-wrs) 3792cdf0e10cSrcweir basic_machine=sparclite-wrs 3793cdf0e10cSrcweir os=-vxworks 3794cdf0e10cSrcweir@@ -901,10 +1067,6 @@ 3795cdf0e10cSrcweir basic_machine=i386-sequent 3796cdf0e10cSrcweir os=-dynix 3797cdf0e10cSrcweir ;; 3798cdf0e10cSrcweir- t3d) 3799cdf0e10cSrcweir- basic_machine=alpha-cray 3800cdf0e10cSrcweir- os=-unicos 3801cdf0e10cSrcweir- ;; 3802cdf0e10cSrcweir t3e) 3803cdf0e10cSrcweir basic_machine=alphaev5-cray 3804cdf0e10cSrcweir os=-unicos 3805cdf0e10cSrcweir@@ -913,14 +1075,27 @@ 3806cdf0e10cSrcweir basic_machine=t90-cray 3807cdf0e10cSrcweir os=-unicos 3808cdf0e10cSrcweir ;; 3809cdf0e10cSrcweir- tic4x | c4x*) 3810cdf0e10cSrcweir- basic_machine=tic4x-unknown 3811cdf0e10cSrcweir- os=-coff 3812cdf0e10cSrcweir- ;; 3813cdf0e10cSrcweir tic54x | c54x*) 3814cdf0e10cSrcweir basic_machine=tic54x-unknown 3815cdf0e10cSrcweir os=-coff 3816cdf0e10cSrcweir ;; 3817cdf0e10cSrcweir+ tic55x | c55x*) 3818cdf0e10cSrcweir+ basic_machine=tic55x-unknown 3819cdf0e10cSrcweir+ os=-coff 3820cdf0e10cSrcweir+ ;; 3821cdf0e10cSrcweir+ tic6x | c6x*) 3822cdf0e10cSrcweir+ basic_machine=tic6x-unknown 3823cdf0e10cSrcweir+ os=-coff 3824cdf0e10cSrcweir+ ;; 3825cdf0e10cSrcweir+ # This must be matched before tile*. 3826cdf0e10cSrcweir+ tilegx*) 3827cdf0e10cSrcweir+ basic_machine=tilegx-unknown 3828cdf0e10cSrcweir+ os=-linux-gnu 3829cdf0e10cSrcweir+ ;; 3830cdf0e10cSrcweir+ tile*) 3831cdf0e10cSrcweir+ basic_machine=tile-unknown 3832cdf0e10cSrcweir+ os=-linux-gnu 3833cdf0e10cSrcweir+ ;; 3834cdf0e10cSrcweir tx39) 3835cdf0e10cSrcweir basic_machine=mipstx39-unknown 3836cdf0e10cSrcweir ;; 3837cdf0e10cSrcweir@@ -934,6 +1109,10 @@ 3838cdf0e10cSrcweir tower | tower-32) 3839cdf0e10cSrcweir basic_machine=m68k-ncr 3840cdf0e10cSrcweir ;; 3841cdf0e10cSrcweir+ tpf) 3842cdf0e10cSrcweir+ basic_machine=s390x-ibm 3843cdf0e10cSrcweir+ os=-tpf 3844cdf0e10cSrcweir+ ;; 3845cdf0e10cSrcweir udi29k) 3846cdf0e10cSrcweir basic_machine=a29k-amd 3847cdf0e10cSrcweir os=-udi 3848cdf0e10cSrcweir@@ -977,9 +1156,9 @@ 3849cdf0e10cSrcweir basic_machine=hppa1.1-winbond 3850cdf0e10cSrcweir os=-proelf 3851cdf0e10cSrcweir ;; 3852cdf0e10cSrcweir- windows32) 3853cdf0e10cSrcweir- basic_machine=i386-pc 3854cdf0e10cSrcweir- os=-windows32-msvcrt 3855cdf0e10cSrcweir+ xbox) 3856cdf0e10cSrcweir+ basic_machine=i686-pc 3857cdf0e10cSrcweir+ os=-mingw32 3858cdf0e10cSrcweir ;; 3859cdf0e10cSrcweir xps | xps100) 3860cdf0e10cSrcweir basic_machine=xps100-honeywell 3861cdf0e10cSrcweir@@ -992,6 +1171,10 @@ 3862cdf0e10cSrcweir basic_machine=z8k-unknown 3863cdf0e10cSrcweir os=-sim 3864cdf0e10cSrcweir ;; 3865cdf0e10cSrcweir+ z80-*-coff) 3866cdf0e10cSrcweir+ basic_machine=z80-unknown 3867cdf0e10cSrcweir+ os=-sim 3868cdf0e10cSrcweir+ ;; 3869cdf0e10cSrcweir none) 3870cdf0e10cSrcweir basic_machine=none-none 3871cdf0e10cSrcweir os=-none 3872cdf0e10cSrcweir@@ -1011,6 +1194,9 @@ 3873cdf0e10cSrcweir romp) 3874cdf0e10cSrcweir basic_machine=romp-ibm 3875cdf0e10cSrcweir ;; 3876cdf0e10cSrcweir+ mmix) 3877cdf0e10cSrcweir+ basic_machine=mmix-knuth 3878cdf0e10cSrcweir+ ;; 3879cdf0e10cSrcweir rs6000) 3880cdf0e10cSrcweir basic_machine=rs6000-ibm 3881cdf0e10cSrcweir ;; 3882cdf0e10cSrcweir@@ -1027,13 +1213,10 @@ 3883cdf0e10cSrcweir we32k) 3884cdf0e10cSrcweir basic_machine=we32k-att 3885cdf0e10cSrcweir ;; 3886cdf0e10cSrcweir- sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) 3887cdf0e10cSrcweir+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 3888cdf0e10cSrcweir basic_machine=sh-unknown 3889cdf0e10cSrcweir ;; 3890cdf0e10cSrcweir- sh64) 3891cdf0e10cSrcweir- basic_machine=sh64-unknown 3892cdf0e10cSrcweir- ;; 3893cdf0e10cSrcweir- sparc | sparcv9 | sparcv9b) 3894cdf0e10cSrcweir+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 3895cdf0e10cSrcweir basic_machine=sparc-sun 3896cdf0e10cSrcweir ;; 3897cdf0e10cSrcweir cydra) 3898cdf0e10cSrcweir@@ -1080,6 +1263,9 @@ 3899cdf0e10cSrcweir # First match some system type aliases 3900cdf0e10cSrcweir # that might get confused with valid system types. 3901cdf0e10cSrcweir # -solaris* is a basic system type, with this one exception. 3902cdf0e10cSrcweir+ -auroraux) 3903cdf0e10cSrcweir+ os=-auroraux 3904cdf0e10cSrcweir+ ;; 3905cdf0e10cSrcweir -solaris1 | -solaris1.*) 3906cdf0e10cSrcweir os=`echo $os | sed -e 's|solaris1|sunos4|'` 3907cdf0e10cSrcweir ;; 3908cdf0e10cSrcweir@@ -1100,24 +1286,30 @@ 3909cdf0e10cSrcweir # Each alternative MUST END IN A *, to match a version number. 3910cdf0e10cSrcweir # -sysv* is not here because it comes later, after sysvr4. 3911cdf0e10cSrcweir -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 3912cdf0e10cSrcweir- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 3913cdf0e10cSrcweir- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 3914cdf0e10cSrcweir+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 3915cdf0e10cSrcweir+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 3916cdf0e10cSrcweir+ | -sym* | -kopensolaris* \ 3917cdf0e10cSrcweir | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 3918cdf0e10cSrcweir- | -aos* \ 3919cdf0e10cSrcweir+ | -aos* | -aros* \ 3920cdf0e10cSrcweir | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 3921cdf0e10cSrcweir | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 3922cdf0e10cSrcweir- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ 3923cdf0e10cSrcweir- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 3924cdf0e10cSrcweir+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 3925cdf0e10cSrcweir+ | -openbsd* | -solidbsd* \ 3926cdf0e10cSrcweir+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 3927cdf0e10cSrcweir+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 3928cdf0e10cSrcweir | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 3929cdf0e10cSrcweir | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 3930cdf0e10cSrcweir- | -chorusos* | -chorusrdb* \ 3931cdf0e10cSrcweir+ | -chorusos* | -chorusrdb* | -cegcc* \ 3932cdf0e10cSrcweir | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 3933cdf0e10cSrcweir- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 3934cdf0e10cSrcweir- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ 3935cdf0e10cSrcweir+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 3936cdf0e10cSrcweir+ | -uxpv* | -beos* | -mpeix* | -udk* \ 3937cdf0e10cSrcweir+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 3938cdf0e10cSrcweir | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 3939cdf0e10cSrcweir | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 3940cdf0e10cSrcweir | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 3941cdf0e10cSrcweir- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) 3942cdf0e10cSrcweir+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 3943cdf0e10cSrcweir+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 3944cdf0e10cSrcweir+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 3945cdf0e10cSrcweir # Remember, each alternative MUST END IN *, to match a version number. 3946cdf0e10cSrcweir ;; 3947cdf0e10cSrcweir -qnx*) 3948cdf0e10cSrcweir@@ -1129,16 +1321,21 @@ 3949cdf0e10cSrcweir ;; 3950cdf0e10cSrcweir esac 3951cdf0e10cSrcweir ;; 3952cdf0e10cSrcweir+ -nto-qnx*) 3953cdf0e10cSrcweir+ ;; 3954cdf0e10cSrcweir -nto*) 3955cdf0e10cSrcweir- os=-nto-qnx 3956cdf0e10cSrcweir+ os=`echo $os | sed -e 's|nto|nto-qnx|'` 3957cdf0e10cSrcweir ;; 3958cdf0e10cSrcweir -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 3959cdf0e10cSrcweir- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 3960cdf0e10cSrcweir+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 3961cdf0e10cSrcweir | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 3962cdf0e10cSrcweir ;; 3963cdf0e10cSrcweir -mac*) 3964cdf0e10cSrcweir os=`echo $os | sed -e 's|mac|macos|'` 3965cdf0e10cSrcweir ;; 3966cdf0e10cSrcweir+ -linux-dietlibc) 3967cdf0e10cSrcweir+ os=-linux-dietlibc 3968cdf0e10cSrcweir+ ;; 3969cdf0e10cSrcweir -linux*) 3970cdf0e10cSrcweir os=`echo $os | sed -e 's|linux|linux-gnu|'` 3971cdf0e10cSrcweir ;; 3972cdf0e10cSrcweir@@ -1151,6 +1348,9 @@ 3973cdf0e10cSrcweir -opened*) 3974cdf0e10cSrcweir os=-openedition 3975cdf0e10cSrcweir ;; 3976cdf0e10cSrcweir+ -os400*) 3977cdf0e10cSrcweir+ os=-os400 3978cdf0e10cSrcweir+ ;; 3979cdf0e10cSrcweir -wince*) 3980cdf0e10cSrcweir os=-wince 3981cdf0e10cSrcweir ;; 3982cdf0e10cSrcweir@@ -1172,6 +1372,9 @@ 3983cdf0e10cSrcweir -atheos*) 3984cdf0e10cSrcweir os=-atheos 3985cdf0e10cSrcweir ;; 3986cdf0e10cSrcweir+ -syllable*) 3987cdf0e10cSrcweir+ os=-syllable 3988cdf0e10cSrcweir+ ;; 3989cdf0e10cSrcweir -386bsd) 3990cdf0e10cSrcweir os=-bsd 3991cdf0e10cSrcweir ;; 3992cdf0e10cSrcweir@@ -1194,6 +1397,9 @@ 3993cdf0e10cSrcweir -sinix*) 3994cdf0e10cSrcweir os=-sysv4 3995cdf0e10cSrcweir ;; 3996cdf0e10cSrcweir+ -tpf*) 3997cdf0e10cSrcweir+ os=-tpf 3998cdf0e10cSrcweir+ ;; 3999cdf0e10cSrcweir -triton*) 4000cdf0e10cSrcweir os=-sysv3 4001cdf0e10cSrcweir ;; 4002cdf0e10cSrcweir@@ -1224,6 +1430,20 @@ 4003cdf0e10cSrcweir -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 4004cdf0e10cSrcweir os=-mint 4005cdf0e10cSrcweir ;; 4006cdf0e10cSrcweir+ -aros*) 4007cdf0e10cSrcweir+ os=-aros 4008cdf0e10cSrcweir+ ;; 4009cdf0e10cSrcweir+ -kaos*) 4010cdf0e10cSrcweir+ os=-kaos 4011cdf0e10cSrcweir+ ;; 4012cdf0e10cSrcweir+ -zvmoe) 4013cdf0e10cSrcweir+ os=-zvmoe 4014cdf0e10cSrcweir+ ;; 4015cdf0e10cSrcweir+ -dicos*) 4016cdf0e10cSrcweir+ os=-dicos 4017cdf0e10cSrcweir+ ;; 4018cdf0e10cSrcweir+ -nacl*) 4019cdf0e10cSrcweir+ ;; 4020cdf0e10cSrcweir -none) 4021cdf0e10cSrcweir ;; 4022cdf0e10cSrcweir *) 4023cdf0e10cSrcweir@@ -1246,6 +1466,12 @@ 4024cdf0e10cSrcweir # system, and we'll never get to this point. 4025cdf0e10cSrcweir 4026cdf0e10cSrcweir case $basic_machine in 4027cdf0e10cSrcweir+ score-*) 4028cdf0e10cSrcweir+ os=-elf 4029cdf0e10cSrcweir+ ;; 4030cdf0e10cSrcweir+ spu-*) 4031cdf0e10cSrcweir+ os=-elf 4032cdf0e10cSrcweir+ ;; 4033cdf0e10cSrcweir *-acorn) 4034cdf0e10cSrcweir os=-riscix1.2 4035cdf0e10cSrcweir ;; 4036cdf0e10cSrcweir@@ -1255,6 +1481,9 @@ 4037cdf0e10cSrcweir arm*-semi) 4038cdf0e10cSrcweir os=-aout 4039cdf0e10cSrcweir ;; 4040cdf0e10cSrcweir+ c4x-* | tic4x-*) 4041cdf0e10cSrcweir+ os=-coff 4042cdf0e10cSrcweir+ ;; 4043cdf0e10cSrcweir # This must come before the *-dec entry. 4044cdf0e10cSrcweir pdp10-*) 4045cdf0e10cSrcweir os=-tops20 4046cdf0e10cSrcweir@@ -1280,6 +1509,9 @@ 4047cdf0e10cSrcweir m68*-cisco) 4048cdf0e10cSrcweir os=-aout 4049cdf0e10cSrcweir ;; 4050cdf0e10cSrcweir+ mep-*) 4051cdf0e10cSrcweir+ os=-elf 4052cdf0e10cSrcweir+ ;; 4053cdf0e10cSrcweir mips*-cisco) 4054cdf0e10cSrcweir os=-elf 4055cdf0e10cSrcweir ;; 4056cdf0e10cSrcweir@@ -1298,9 +1530,15 @@ 4057cdf0e10cSrcweir *-be) 4058cdf0e10cSrcweir os=-beos 4059cdf0e10cSrcweir ;; 4060cdf0e10cSrcweir+ *-haiku) 4061cdf0e10cSrcweir+ os=-haiku 4062cdf0e10cSrcweir+ ;; 4063cdf0e10cSrcweir *-ibm) 4064cdf0e10cSrcweir os=-aix 4065cdf0e10cSrcweir ;; 4066cdf0e10cSrcweir+ *-knuth) 4067cdf0e10cSrcweir+ os=-mmixware 4068cdf0e10cSrcweir+ ;; 4069cdf0e10cSrcweir *-wec) 4070cdf0e10cSrcweir os=-proelf 4071cdf0e10cSrcweir ;; 4072cdf0e10cSrcweir@@ -1403,7 +1641,7 @@ 4073cdf0e10cSrcweir -sunos*) 4074cdf0e10cSrcweir vendor=sun 4075cdf0e10cSrcweir ;; 4076cdf0e10cSrcweir- -aix*) 4077cdf0e10cSrcweir+ -cnk*|-aix*) 4078cdf0e10cSrcweir vendor=ibm 4079cdf0e10cSrcweir ;; 4080cdf0e10cSrcweir -beos*) 4081cdf0e10cSrcweir@@ -1433,9 +1671,15 @@ 4082cdf0e10cSrcweir -mvs* | -opened*) 4083cdf0e10cSrcweir vendor=ibm 4084cdf0e10cSrcweir ;; 4085cdf0e10cSrcweir+ -os400*) 4086cdf0e10cSrcweir+ vendor=ibm 4087cdf0e10cSrcweir+ ;; 4088cdf0e10cSrcweir -ptx*) 4089cdf0e10cSrcweir vendor=sequent 4090cdf0e10cSrcweir ;; 4091cdf0e10cSrcweir+ -tpf*) 4092cdf0e10cSrcweir+ vendor=ibm 4093cdf0e10cSrcweir+ ;; 4094cdf0e10cSrcweir -vxsim* | -vxworks* | -windiss*) 4095cdf0e10cSrcweir vendor=wrs 4096cdf0e10cSrcweir ;; 4097cdf0e10cSrcweir@@ -1460,7 +1704,7 @@ 4098cdf0e10cSrcweir esac 4099cdf0e10cSrcweir 4100cdf0e10cSrcweir echo $basic_machine$os 4101cdf0e10cSrcweir-exit 0 4102cdf0e10cSrcweir+exit 4103cdf0e10cSrcweir 4104cdf0e10cSrcweir # Local variables: 4105cdf0e10cSrcweir # eval: (add-hook 'write-file-hooks 'time-stamp) 4106