Check-in [2eca7c583b]
Overview
Comment:Updated to remove PRINTERR and PRINTERR_D (Mac OS X's c preprocessor doesn't handle variadic macros) Updated strtoull.c to work. Added config.guess/config.sub (needed for determining SHLIBEXT) A few misc changes. libconfig 0.0.7
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | 0.0.7
Files: files | file ages | folders
SHA1: 2eca7c583bfe0736b5ffe1c5c2788d9939a73578
User & Date: rkeene on 2004-10-29 03:01:26
Other Links: manifest | tags
Context
2004-10-29
03:10
Fixed some warnings. libconfig 0.0.8 check-in: 58c3554ca1 user: rkeene tags: trunk, 0.0.8
03:01
Updated to remove PRINTERR and PRINTERR_D (Mac OS X's c preprocessor doesn't handle variadic macros) Updated strtoull.c to work. Added config.guess/config.sub (needed for determining SHLIBEXT) A few misc changes. libconfig 0.0.7 check-in: 2eca7c583b user: rkeene tags: trunk, 0.0.7
01:41
Fixed typo. check-in: f0685dfb27 user: rkeene tags: trunk
Changes

Modified Makefile.in from [d6d1be3de1] to [63e7c50530].

     8      8   LDFLAGS = @LDFLAGS@ @LIBS@
     9      9   INSTALL = @INSTALL@
    10     10   EXEEXT = @EXEEXT@
    11     11   OBJEXT = @OBJEXT@
    12     12   PATH_SEPARATOR = @PATH_SEPARATOR@
    13     13   SHOBJFLAGS = @SHOBJFLAGS@
    14     14   SHOBJLDFLAGS = @SHOBJLDFLAGS@
    15         -SHOBJEXT = so
           15  +SHOBJEXT = @SHOBJEXT@
    16     16   ARFLAGS = # @ARFLAGS@
    17         -AREXT = a
           17  +AREXT = @AREXT@
    18     18   PKGVERS = @PACKAGE_VERSION@
    19     19   PKGVERSMAJOR = `echo $(PKGVERS) | cut -f 1 -d .`
    20     20   
    21     21   prefix = @prefix@
    22     22   mandir = @mandir@
    23     23   sysconfdir = @sysconfdir@
    24     24   datadir = @datadir@

Modified aclocal.m4 from [6da8d567eb] to [edadcf43b7].

    57     57   AC_DEFUN(DC_GET_SHOBJFLAGS, [
    58     58     AC_SUBST(SHLIBOBJS)
    59     59   
    60     60     AC_MSG_CHECKING(how to create shared objects)
    61     61   
    62     62     DC_TEST_SHOBJFLAGS([-shared -fPIC], [-rdynamic], [
    63     63       DC_TEST_SHOBJFLAGS([-shared -fPIC], [], [
    64         -      DC_TEST_SHOBJFLAGS([-shared -fPIC], [-rdynamic -Wl,-G,-z,textoff], [
    65         -        DC_TEST_SHOBJFLAGS([-shared -fPIC], [-Wl,-G,-z,textoff], [
    66         -          AC_MSG_ERROR(cant)
           64  +      DC_TEST_SHOBJFLAGS([-shared -fPIC], [-rdynamic -mimpure-text], [
           65  +        DC_TEST_SHOBJFLAGS([-shared -fPIC], [-mimpure-text], [
           66  +          DC_TEST_SHOBJFLAGS([-shared -fPIC], [-rdynamic -Wl,-G,-z,textoff], [
           67  +            DC_TEST_SHOBJFLAGS([-shared -fPIC], [-Wl,-G,-z,textoff], [
           68  +              DC_TEST_SHOBJFLAGS([-shared -fPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
           69  +                DC_TEST_SHOBJFLAGS([-fPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
           70  +                  AC_MSG_ERROR(cant)
           71  +                ])
           72  +              ])
           73  +            ])
           74  +          ])
    67     75           ])
    68     76         ])
    69     77       ])
    70     78     ])
    71     79   
    72     80     for obj in $LIB@&t@OBJS; do
    73     81       SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
    74     82     done
    75     83   
    76     84     AC_MSG_RESULT($SHOBJLDFLAGS $SHOBJFLAGS)
    77     85   ])
           86  +
           87  +
           88  +AC_DEFUN(DC_CHK_OS_INFO, [
           89  +	AC_CANONICAL_HOST
           90  +	AC_SUBST(SHOBJEXT)
           91  +	AC_SUBST(AREXT)
           92  +
           93  +        AC_MSG_CHECKING(host operating system)
           94  +        AC_MSG_RESULT($host_os)
           95  +
           96  +	SHOBJEXT="so"
           97  +	AREXT="a"
           98  +
           99  +        case $host_os in
          100  +                darwin*)
          101  +			SHOBJEXT="dylib"
          102  +                        ;;
          103  +		hpux*)
          104  +			SHOBJEXT="sl"
          105  +			;;
          106  +	esac
          107  +])
          108  +

Modified compat.h from [893879d77c] to [18e2a49265].

     8      8   #include "win32.h"
     9      9   #endif
    10     10   
    11     11   #ifndef LC_LINEBUF_LEN
    12     12   #define LC_LINEBUF_LEN 1024
    13     13   #endif
    14     14   
           15  +#ifndef HAVE_STRTOULL
           16  +#include "strtoull.h"
           17  +#endif
    15     18   #ifndef HAVE_STRSEP
    16     19   #include "strsep.h"
    17     20   #endif
    18     21   #ifdef HAVE_INTTYPES_H
    19     22   #include <inttypes.h>
    20     23   #endif
    21     24   #ifdef HAVE_MEMORY_H
................................................................................
    73     76   #ifdef HAVE_SYS_TIME_H
    74     77   #include <sys/time.h>
    75     78   #else
    76     79   #include <time.h>
    77     80   #endif
    78     81   #endif
    79     82   
    80         -#ifdef DEBUG
    81         -#define PRINT_LINE fprintf(stderr, "%lu:%s:%i:%s(): ", (unsigned long) time(NULL), __FILE__, __LINE__, __func__); 
    82         -#define PRINTERR_D(x...) { PRINT_LINE; fprintf(stderr, x); fprintf(stderr, "\n"); fflush(stderr); }
    83         -#define PERROR(x) { PRINT_LINE; perror(x); fflush(stderr); }
    84         -#define DPERROR(x) PERROR(x)
    85         -#else
    86         -#define PRINT_LINE /**/
    87         -#define PRINTERR_D(x...) /**/
    88         -#define PERROR(x) perror(x);
    89         -#define DPERROR(x) /**/
    90         -#endif
    91         -#define CHECKPOINT PRINTERR_D("*** CHECKPOINT REACHED ***")
    92         -#define SPOTVAR_LLX(x) PRINTERR_D(#x " = %llx", x)
    93         -#define SPOTVAR_LLU(x) PRINTERR_D(#x " = %llu", x)
    94         -#define SPOTVAR_LL(x) PRINTERR_D(#x " = %lli", x)
    95         -#define SPOTVAR_LU(x) PRINTERR_D(#x " = %lu", x)
    96         -#define SPOTVAR_D(x) PRINTERR_D(#x " = %lf", x)
    97         -#define SPOTVAR_X(x) PRINTERR_D(#x " = 0x%x", x)
    98         -#define SPOTVAR_I(x) PRINTERR_D(#x " = %i", x)
    99         -#define SPOTVAR_P(x) PRINTERR_D(#x " = %p", x)
   100         -#define SPOTVAR_S(x) PRINTERR_D(#x " = \"%s\"", x)
   101         -#define SPOTVAR_C(x) PRINTERR_D(#x " = \'%c\'", x)
   102         -#define PRINTERR(x...) { PRINT_LINE; fprintf(stderr, x); fprintf(stderr, "\n"); fflush(stderr); }
   103         -#define LOG(x...) { PRINT_LINE; fprintf(stderr, "LOG: " x); fprintf(stderr, "\n"); }
   104         -
   105     83   #endif

Modified conf_apache.c from [7fcfcb69c1] to [1a96ee97b6].

   118    118   			break;
   119    119   		}
   120    120   
   121    121   		/* Remove trailing crap (but not spaces). */
   122    122   		linebuf_ptr = &linebuf[strlen(linebuf) - 1];
   123    123   		while (*linebuf_ptr < ' ' && linebuf_ptr >= linebuf) {
   124    124   			*linebuf_ptr = '\0';
   125         -			*linebuf_ptr--;
          125  +			linebuf_ptr--;
   126    126   		}
   127    127   
   128    128   		/* Remove leading spaces. */
   129    129   		linebuf_ptr = &linebuf[0];
   130    130   		while (*linebuf_ptr == ' ' || *linebuf_ptr == '\t') {
   131         -			*linebuf_ptr++;
          131  +			linebuf_ptr++;
   132    132   		}
   133    133   
   134    134   		/* Handle section header. */
   135    135   		if (linebuf_ptr[0] == '<' && linebuf_ptr[strlen(linebuf_ptr) - 1] == '>') {
   136    136   			/* Remove < and > from around the data. */
   137    137   			linebuf_ptr[strlen(linebuf_ptr) - 1] = '\0';
   138         -			*linebuf_ptr++;
          138  +			linebuf_ptr++;
   139    139   
   140    140   			/* Lowercase the command part of the section. */
   141    141   			tmp_ptr = linebuf_ptr;
   142    142   			while (*tmp_ptr != '\0' && *tmp_ptr != ' ') {
   143    143   				*tmp_ptr = tolower(*tmp_ptr);
   144         -				*tmp_ptr++;
          144  +				tmp_ptr++;
   145    145   			}
   146    146   
   147    147   			/* If this is a close section command, handle it */
   148    148   			if (linebuf_ptr[0] == '/') {
   149         -				*linebuf_ptr++;
          149  +				linebuf_ptr++;
   150    150   				cmd = linebuf_ptr; 
   151    151   
   152    152   				/* Find the last section closed. */
   153    153   				tmp_ptr = strrchr(qualifbuf, '.');
   154    154   				if (tmp_ptr == NULL) {
   155    155   					lastsection = qualifbuf;
   156    156   					tmp_ptr = qualifbuf;
   157    157   				} else {
   158    158   					lastsection = tmp_ptr + 1;
   159    159   				}
   160    160   
   161    161   				if (strcmp(cmd, lastsection) != 0) {
   162         -					PRINTERR_D("Section closing does not match last opened section.");
   163         -					PRINTERR_D("Last opened = \"%s\", Closing = \"%s\"", lastsection, cmd);
          162  +#ifdef DEBUG
          163  +					fprintf(stderr, "Section closing does not match last opened section.\n");
          164  +					fprintf(stderr, "Last opened = \"%s\", Closing = \"%s\"\n", lastsection, cmd);
          165  +#endif
   164    166   					retval = -1;
   165    167   					lc_errno = LC_ERR_BADFORMAT;
   166    168   
   167    169   					/* For this error, we abort immediately. */
   168    170   					break;
   169    171   				}
   170    172   
   171    173   				lcpvret = lc_process_var(qualifbuf, NULL, NULL, LC_FLAGS_SECTIONEND);
   172    174   				if (lcpvret < 0) {
   173         -					PRINTERR_D("Invalid section terminating: \"%s\"", qualifbuf);
          175  +#ifdef DEBUG
          176  +					fprintf(stderr, "Invalid section terminating: \"%s\"\n", qualifbuf);
          177  +#endif
   174    178   				}
   175    179   
   176    180   				/* Remove the "lastsection" part.. */
   177    181   				*tmp_ptr = '\0';
   178    182   
   179    183   				/* We just sucessfully closed the last section opened,
   180    184   				   we must be in a valid section now since we only open
................................................................................
   193    197   
   194    198   			/* Parse out any argument passed. */
   195    199   			sep = strpbrk(linebuf_ptr, " \t");
   196    200   
   197    201   			if (sep != NULL) {
   198    202   				cmdend = sep;
   199    203   				/* Delete space at the end of the command. */
   200         -				*cmdend--; /* It currently derefs to the seperator.. */
          204  +				cmdend--; /* It currently derefs to the seperator.. */
   201    205   				while (*cmdend <= ' ') {
   202    206   					*cmdend = '\0';
   203         -					*cmdend--;
          207  +					cmdend--;
   204    208   				}
   205    209   
   206    210   				/* Delete the seperator char and any leading space. */
   207    211   				*sep = '\0';
   208         -				*sep++;
          212  +				sep++;
   209    213   				while (*sep == ' ' || *sep == '\t') {
   210         -					*sep++;
          214  +					sep++;
   211    215   				}
   212    216   				value = sep;
   213    217   			} else {
   214    218   				/* XXX: should this be "" or NULL ? */
   215    219   				value = "";
   216    220   			}
   217    221   
................................................................................
   220    224   			if (qualifbuf[0] != '\0') {
   221    225   				strncat(qualifbuf, ".", sizeof(qualifbuf) - strlen(qualifbuf) - 1);
   222    226   			}
   223    227   			strncat(qualifbuf, cmd, sizeof(qualifbuf) - strlen(qualifbuf) - 1);
   224    228   
   225    229   			lcpvret = lc_process_var(qualifbuf, value, NULL, LC_FLAGS_SECTIONSTART);
   226    230   			if (lcpvret < 0) {
   227         -				PRINTERR_D("Invalid section: \"%s\"", qualifbuf);
          231  +#ifdef DEBUG
          232  +				fprintf(stderr, "Invalid section: \"%s\"\n", qualifbuf);
          233  +#endif
   228    234   				invalid_section = 1;
   229    235   				lc_errno = LC_ERR_INVSECTION;
   230    236   				retval = -1;
   231    237   			}
   232    238   			if (lcpvret == LC_CBRET_IGNORESECTION) {
   233    239   				ignore_section = 1;
   234    240   			}
................................................................................
   238    244   		/* Drop comments and blank lines. */
   239    245   		if (*linebuf_ptr == '#' || *linebuf_ptr == '\0') {
   240    246   			continue;
   241    247   		}
   242    248   
   243    249   		/* Don't handle things for a section that doesn't exist. */
   244    250   		if (invalid_section == 1) {
   245         -			PRINTERR_D("Ignoring line (because invalid section): %s", linebuf);
          251  +#ifdef DEBUG
          252  +			fprintf(stderr, "Ignoring line (because invalid section): %s\n", linebuf);
          253  +#endif
   246    254   			continue;
   247    255   		}
   248    256   		if (ignore_section == 1) {
   249         -			PRINTERR_D("Ignoring line (because ignored section): %s", linebuf);
          257  +#ifdef DEBUG
          258  +			fprintf(stderr, "Ignoring line (because ignored section): %s\n", linebuf);
          259  +#endif
   250    260   			continue;
   251    261   		}
   252    262   
   253    263   		/* Find the command and the data in the line. */
   254    264   		sep = strpbrk(linebuf_ptr, " \t");
   255    265   		if (sep != NULL) {
   256    266   			cmdend = sep;
   257    267   
   258    268   			/* Delete space at the end of the command. */
   259         -			*cmdend--; /* It currently derefs to the seperator.. */
          269  +			cmdend--; /* It currently derefs to the seperator.. */
   260    270   			while (*cmdend <= ' ') {
   261    271   				*cmdend = '\0';
   262         -				*cmdend--;
          272  +				cmdend--;
   263    273   			}
   264    274   
   265    275   			/* Delete the seperator char and any leading space. */
   266    276   			*sep = '\0';
   267         -			*sep++;
          277  +			sep++;
   268    278   			while (*sep == ' ' || *sep == '\t') {
   269         -				*sep++;
          279  +				sep++;
   270    280   			}
   271    281   			value = sep;
   272    282   		} else {
   273    283   			value = NULL;
   274    284   		}
   275    285   
   276    286   		cmd = linebuf_ptr;
   277    287   
   278    288   		/* Handle special commands. */
   279    289   		if (strcasecmp(cmd, "include") == 0) {
   280    290   			if (value == NULL) {
   281    291   				lc_errno = LC_ERR_BADFORMAT;
   282    292   				retval = -1;
   283         -				PRINTERR_D("Invalid include command.");
          293  +#ifdef DEBUG
          294  +				fprintf(stderr, "Invalid include command.\n");
          295  +#endif
   284    296   				continue;
   285    297   			}
   286    298   
   287    299   			lpcafret = lc_process_conf_apache_include(value, qualifbuf);
   288    300   			if (lpcafret < 0) {
   289         -				PRINTERR_D("Error in included file.");
          301  +#ifdef DEBUG
          302  +				fprintf(stderr, "Error in included file.\n");
          303  +#endif
   290    304   				retval = -1;
   291    305   			}
   292    306   			continue;
   293    307   		}
   294    308   
   295    309   		/* Create the fully qualified variable name. */
   296    310   		if (qualifbuf[0] != '\0') {
................................................................................
   300    314   
   301    315   		/* Call the parent and tell them we have data. */
   302    316   		save_lc_errno = lc_errno;
   303    317   		lc_errno = LC_ERR_NONE;
   304    318   		lcpvret = lc_process_var(qualifbuf, NULL, value, LC_FLAGS_VAR);
   305    319   		if (lcpvret < 0) {
   306    320   			if (lc_errno == LC_ERR_NONE) {
   307         -				PRINTERR_D("Invalid command: \"%s\"", cmd);
          321  +#ifdef DEBUG
          322  +				fprintf(stderr, "Invalid command: \"%s\"\n", cmd);
          323  +#endif
   308    324   				lc_errno = LC_ERR_INVCMD;
   309    325   			} else {
   310         -				PRINTERR_D("Error processing command (command was valid, but an error occured, errno was set)");
          326  +#ifdef DEBUG
          327  +				fprintf(stderr, "Error processing command (command was valid, but an error occured, errno was set)\n");
          328  +#endif
   311    329   			}
   312    330   			retval = -1;
   313    331   		} else {
   314    332   			lc_errno = save_lc_errno;
   315    333   		}
   316    334   
   317    335   		/* Remove the "cmd" part of the buffer. */

Modified conf_section.c from [0c4194df01] to [719f9fb6ad].

    44     44   			break;
    45     45   		}
    46     46   
    47     47   		/* Remove trailing crap (but not spaces). */
    48     48   		linebuf_ptr = &linebuf[strlen(linebuf) - 1];
    49     49   		while (*linebuf_ptr < ' ' && linebuf_ptr >= linebuf) {
    50     50   			*linebuf_ptr = '\0';
    51         -			*linebuf_ptr--;
           51  +			linebuf_ptr--;
    52     52   		}
    53     53   
    54     54   		/* Handle section header. */
    55     55   		if (linebuf[0] == '[' && linebuf[strlen(linebuf) - 1] == ']') {
    56     56   			linebuf[strlen(linebuf) - 1] = '\0';
    57     57   			linebuf_ptr = &linebuf[1];
    58     58   
    59     59   			/* If a section was open, close it. */
    60     60   			if (currsection != NULL) {
    61     61   				lcpvret = lc_process_var(currsection, NULL, NULL, LC_FLAGS_SECTIONEND);
    62     62   				if (lcpvret < 0) {
    63         -					PRINTERR_D("Invalid section terminating: \"%s\"", currsection);
           63  +#ifdef DEBUG
           64  +					fprintf(stderr, "Invalid section terminating: \"%s\"\n", currsection);
           65  +#endif
    64     66   				}
    65     67   				free(currsection);
    66     68   			}
    67     69   
    68     70   			/* Open new section. */
    69     71   			currsection = strdup(linebuf_ptr);
    70     72   			lcpvret = lc_process_var(currsection, NULL, NULL, LC_FLAGS_SECTIONSTART);
    71     73   			if (lcpvret < 0) {
    72         -				PRINTERR_D("Invalid section: \"%s\"", currsection);
           74  +#ifdef DEBUG
           75  +				fprintf(stderr, "Invalid section: \"%s\"\n", currsection);
           76  +#endif
    73     77   				invalid_section = 1;
    74     78   				lc_errno = LC_ERR_INVSECTION;
    75     79   				retval = -1;
    76     80   			} else {
    77     81   				invalid_section = 0;
    78     82   				ignore_section = 0;
    79     83   			}
................................................................................
    83     87   			}
    84     88   			continue;
    85     89   		}
    86     90   
    87     91   		/* Remove leading spaces. */
    88     92   		linebuf_ptr = &linebuf[0];
    89     93   		while (*linebuf_ptr == ' ') {
    90         -			*linebuf_ptr++;
           94  +			linebuf_ptr++;
    91     95   		}
    92     96   
    93     97   		/* Drop comments and blank lines. */
    94     98   		if (*linebuf_ptr == ';' || *linebuf_ptr == '\0') {
    95     99   			continue;
    96    100   		}
    97    101   
    98    102   		/* Don't handle things for a section that doesn't exist. */
    99    103   		if (invalid_section == 1) {
   100         -			PRINTERR_D("Ignoring line (because invalid section): %s", linebuf);
          104  +#ifdef DEBUG
          105  +			fprintf(stderr, "Ignoring line (because invalid section): %s\n", linebuf);
          106  +#endif
   101    107   			continue;
   102    108   		}
   103    109   
   104    110   		/* Don't process commands if this section is specifically ignored. */
   105    111   		if (ignore_section == 1) {
   106         -			PRINTERR_D("Ignoring line (because ignored section): %s", linebuf);
          112  +#ifdef DEBUG
          113  +			fprintf(stderr, "Ignoring line (because ignored section): %s\n", linebuf);
          114  +#endif
   107    115   			continue;
   108    116   		}
   109    117   
   110    118   		/* Find the command and the data in the line. */
   111    119   		cmdend = sep = strpbrk(linebuf_ptr, "=");
   112    120   		if (sep == NULL) {
   113         -			PRINTERR_D("Invalid line: \"%s\"", linebuf);
          121  +#ifdef DEBUG
          122  +			fprintf(stderr, "Invalid line: \"%s\"\n", linebuf);
          123  +#endif
   114    124   			continue;
   115    125   		}
   116    126   
   117    127   		/* Delete space at the end of the command. */
   118         -		*cmdend--; /* It currently derefs to the seperator.. */
          128  +		cmdend--; /* It currently derefs to the seperator.. */
   119    129   		while (*cmdend <= ' ') {
   120    130   			*cmdend = '\0';
   121         -			*cmdend--;
          131  +			cmdend--;
   122    132   		}
   123    133   
   124    134   		cmd = linebuf_ptr;
   125    135   
   126    136   		/* Delete the seperator char and any leading space. */
   127    137   		*sep = '\0';
   128         -		*sep++;
          138  +		sep++;
   129    139   		while (*sep == ' ' || *sep == '\t') {
   130         -			*sep++;
          140  +			sep++;
   131    141   		}
   132    142   		value = sep;
   133    143   
   134    144   		/* Create the fully qualified variable name. */
   135    145   		if (currsection == NULL) {
   136    146   			strncpy(qualifbuf, cmd, sizeof(qualifbuf) - 1);
   137    147   		} else {
................................................................................
   140    150   
   141    151   		/* Call the parent and tell them we have data. */
   142    152   		save_lc_errno = lc_errno;
   143    153   		lc_errno = LC_ERR_NONE;
   144    154   		lcpvret = lc_process_var(qualifbuf, NULL, value, LC_FLAGS_VAR);
   145    155   		if (lcpvret < 0) {
   146    156   			if (lc_errno == LC_ERR_NONE) {
   147         -				PRINTERR_D("Invalid command: \"%s\"", cmd);
          157  +#ifdef DEBUG
          158  +				fprintf(stderr, "Invalid command: \"%s\"\n", cmd);
          159  +#endif
   148    160   				lc_errno = LC_ERR_INVCMD;
   149    161   			} else {
   150         -				PRINTERR_D("Error processing command (command was valid, but an error occured, errno was set)");
          162  +#ifdef DEBUG
          163  +				fprintf(stderr, "Error processing command (command was valid, but an error occured, errno was set)\n");
          164  +#endif
   151    165   			}
   152    166   			retval = -1;
   153    167   		} else {
   154    168   			lc_errno = save_lc_errno;
   155    169   		}
   156    170   	}
   157    171   
   158    172   	/* Close any open section, and clean-up. */
   159    173   	if (currsection != NULL) {
   160    174   		lcpvret = lc_process_var(currsection, NULL, NULL, LC_FLAGS_SECTIONEND);
   161    175   		if (lcpvret < 0) {
   162         -			PRINTERR_D("Invalid section terminating: \"%s\"", currsection);
          176  +#ifdef DEBUG
          177  +			fprintf(stderr, "Invalid section terminating: \"%s\"\n", currsection);
          178  +#endif
   163    179   		}
   164    180   		free(currsection);
   165    181   	}
   166    182   
   167    183   	fclose(configfp);
   168    184   
   169    185   	return(retval);
   170    186   }

Modified conf_space.c from [0b6ba09a53] to [4b812787ea].

    40     40   		if (feof(configfp)) {
    41     41   			break;
    42     42   		}
    43     43   
    44     44   		linebuf_ptr = &linebuf[strlen(linebuf) - 1];
    45     45   		while (*linebuf_ptr < ' ' && linebuf_ptr >= linebuf) {
    46     46   			*linebuf_ptr = '\0';
    47         -			*linebuf_ptr--;
           47  +			linebuf_ptr--;
    48     48   		}
    49     49   
    50     50   		linebuf_ptr = &linebuf[0];
    51     51   		while (*linebuf_ptr == ' ') {
    52         -			*linebuf_ptr++;
           52  +			linebuf_ptr++;
    53     53   		}
    54     54   
    55     55   		if (*linebuf_ptr == '#' || *linebuf_ptr == '\0') {
    56     56   			continue;
    57     57   		}
    58     58   
    59     59   
    60     60   		sep = strpbrk(linebuf_ptr, " \t");
    61     61   		cmd = linebuf_ptr;
    62     62   		if (sep != NULL) {
    63     63   			*sep = '\0';
    64         -			*sep++;
           64  +			sep++;
    65     65   			while (*sep == ' ' || *sep == '\t') {
    66         -				*sep++;
           66  +				sep++;
    67     67   			}
    68     68   			value = sep;
    69     69   		} else {
    70     70   			value = NULL;
    71     71   		}
    72     72   
    73     73   		save_lc_errno = lc_errno;
    74     74   		lc_errno = LC_ERR_NONE;
    75     75   		lcpvret = lc_process_var(cmd, NULL, value, LC_FLAGS_VAR);
    76     76   		if (lcpvret < 0) {
    77     77   			if (lc_errno == LC_ERR_NONE) {
    78         -				PRINTERR_D("Invalid command: \"%s\"", cmd);
           78  +#ifdef DEBUG
           79  +				fprintf(stderr, "Invalid command: \"%s\"\n", cmd);
           80  +#endif
    79     81   				lc_errno = LC_ERR_INVCMD;
    80     82   			} else {
    81         -				PRINTERR_D("Error processing command (command was valid, but an error occured, errno was set)");
           83  +#ifdef DEBUG
           84  +				fprintf(stderr, "Error processing command (command was valid, but an error occured, errno was set)\n");
           85  +#endif
    82     86   			}
    83     87   			retval = -1;
    84     88   		} else {
    85     89   			lc_errno = save_lc_errno;
    86     90   		}
    87     91   	}
    88     92   
    89     93   	fclose(configfp);
    90     94   
    91     95   	return(retval);
    92     96   }

Added config.guess version [41d5d5ee2e].

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

Modified config.h.in from [543f408fb5] to [0a6cb3c796].

    31     31   #undef HAVE_STRINGS_H
    32     32   
    33     33   /* Define to 1 if you have the <string.h> header file. */
    34     34   #undef HAVE_STRING_H
    35     35   
    36     36   /* Define to 1 if you have the `strsep' function. */
    37     37   #undef HAVE_STRSEP
           38  +
           39  +/* Define to 1 if you have the `strtoull' function. */
           40  +#undef HAVE_STRTOULL
    38     41   
    39     42   /* Define to 1 if you have the <sys/stat.h> header file. */
    40     43   #undef HAVE_SYS_STAT_H
    41     44   
    42     45   /* Define to 1 if you have the <sys/time.h> header file. */
    43     46   #undef HAVE_SYS_TIME_H
    44     47   
................................................................................
    93     96   /* Define to 1 if on AIX 3.
    94     97      System headers sometimes define this.
    95     98      We just want to avoid a redefinition error message.  */
    96     99   #ifndef _ALL_SOURCE
    97    100   # undef _ALL_SOURCE
    98    101   #endif
    99    102   
   100         -/* Enable GNU extensions on systems that have them.  */
   101         -#ifndef _GNU_SOURCE
   102         -# undef _GNU_SOURCE
   103         -#endif
   104         -
   105    103   /* Define to `__inline__' or `__inline' if that's what the C compiler
   106    104      calls it, or to nothing if 'inline' is not supported under any name.  */
   107    105   #ifndef __cplusplus
   108    106   #undef inline
   109    107   #endif
   110    108   
   111    109   /* Define to `signed short' if <sys/types.h> does not define. */

Added config.sub version [79c8d62205].

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

Modified configure from [b23cf47211] to [21d0f9a3db].

     1      1   #! /bin/sh
     2      2   # From configure.in Revision .
     3      3   # Guess values for system-dependent variables and create Makefiles.
     4         -# Generated by GNU Autoconf 2.59 for libconfig 0.0.5.
            4  +# Generated by GNU Autoconf 2.59 for libconfig 0.0.6.
     5      5   #
     6      6   # Copyright (C) 2003 Free Software Foundation, Inc.
     7      7   # This configure script is free software; the Free Software Foundation
     8      8   # gives unlimited permission to copy, distribute and modify it.
     9      9   ## --------------------- ##
    10     10   ## M4sh Initialization.  ##
    11     11   ## --------------------- ##
................................................................................
   264    264   # This variable seems obsolete.  It should probably be removed, and
   265    265   # only ac_max_sed_lines should be used.
   266    266   : ${ac_max_here_lines=38}
   267    267   
   268    268   # Identity of this package.
   269    269   PACKAGE_NAME='libconfig'
   270    270   PACKAGE_TARNAME='libconfig'
   271         -PACKAGE_VERSION='0.0.5'
   272         -PACKAGE_STRING='libconfig 0.0.5'
          271  +PACKAGE_VERSION='0.0.6'
          272  +PACKAGE_STRING='libconfig 0.0.6'
   273    273   PACKAGE_BUGREPORT=''
   274    274   
   275    275   # Factoring default headers for most tests.
   276    276   ac_includes_default="\
   277    277   #include <stdio.h>
   278    278   #if HAVE_SYS_TYPES_H
   279    279   # include <sys/types.h>
................................................................................
   305    305   #  include <stdint.h>
   306    306   # endif
   307    307   #endif
   308    308   #if HAVE_UNISTD_H
   309    309   # include <unistd.h>
   310    310   #endif"
   311    311   
   312         -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB CPP EGREP AR ac_ct_AR LIBOBJS SHLIBOBJS SHOBJFLAGS SHOBJLDFLAGS LTLIBOBJS'
          312  +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SHOBJEXT AREXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB CPP EGREP AR ac_ct_AR LIBOBJS SHLIBOBJS SHOBJFLAGS SHOBJLDFLAGS LTLIBOBJS'
   313    313   ac_subst_files=''
   314    314   
   315    315   # Initialize some variables set by options.
   316    316   ac_init_help=
   317    317   ac_init_version=false
   318    318   # The variables have the same names as the options, with
   319    319   # dashes changed to underlines.
................................................................................
   774    774   #
   775    775   # Report the --help message.
   776    776   #
   777    777   if test "$ac_init_help" = "long"; then
   778    778     # Omit some internal or obsolete options to make the list less imposing.
   779    779     # This message is too long to be a string in the A/UX 3.1 sh.
   780    780     cat <<_ACEOF
   781         -\`configure' configures libconfig 0.0.5 to adapt to many kinds of systems.
          781  +\`configure' configures libconfig 0.0.6 to adapt to many kinds of systems.
   782    782   
   783    783   Usage: $0 [OPTION]... [VAR=VALUE]...
   784    784   
   785    785   To assign environment variables (e.g., CC, CFLAGS...), specify them as
   786    786   VAR=VALUE.  See below for descriptions of some of the useful variables.
   787    787   
   788    788   Defaults for the options are specified in brackets.
................................................................................
   826    826     --includedir=DIR       C header files [PREFIX/include]
   827    827     --oldincludedir=DIR    C header files for non-gcc [/usr/include]
   828    828     --infodir=DIR          info documentation [PREFIX/info]
   829    829     --mandir=DIR           man documentation [PREFIX/man]
   830    830   _ACEOF
   831    831   
   832    832     cat <<\_ACEOF
          833  +
          834  +System types:
          835  +  --build=BUILD     configure for building on BUILD [guessed]
          836  +  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
   833    837   _ACEOF
   834    838   fi
   835    839   
   836    840   if test -n "$ac_init_help"; then
   837    841     case $ac_init_help in
   838         -     short | recursive ) echo "Configuration of libconfig 0.0.5:";;
          842  +     short | recursive ) echo "Configuration of libconfig 0.0.6:";;
   839    843      esac
   840    844     cat <<\_ACEOF
   841    845   
   842    846   Some influential environment variables:
   843    847     CC          C compiler command
   844    848     CFLAGS      C compiler flags
   845    849     LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
................................................................................
   942    946       cd $ac_popdir
   943    947     done
   944    948   fi
   945    949   
   946    950   test -n "$ac_init_help" && exit 0
   947    951   if $ac_init_version; then
   948    952     cat <<\_ACEOF
   949         -libconfig configure 0.0.5
          953  +libconfig configure 0.0.6
   950    954   generated by GNU Autoconf 2.59
   951    955   
   952    956   Copyright (C) 2003 Free Software Foundation, Inc.
   953    957   This configure script is free software; the Free Software Foundation
   954    958   gives unlimited permission to copy, distribute and modify it.
   955    959   _ACEOF
   956    960     exit 0
   957    961   fi
   958    962   exec 5>config.log
   959    963   cat >&5 <<_ACEOF
   960    964   This file contains any messages produced by compilers while
   961    965   running configure, to aid debugging if configure makes a mistake.
   962    966   
   963         -It was created by libconfig $as_me 0.0.5, which was
          967  +It was created by libconfig $as_me 0.0.6, which was
   964    968   generated by GNU Autoconf 2.59.  Invocation command line was
   965    969   
   966    970     $ $0 $@
   967    971   
   968    972   _ACEOF
   969    973   {
   970    974   cat <<_ASUNAME
................................................................................
  1294   1298   
  1295   1299   
  1296   1300   
  1297   1301   
  1298   1302   
  1299   1303             ac_config_headers="$ac_config_headers config.h"
  1300   1304   
         1305  +
         1306  +ac_aux_dir=
         1307  +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
         1308  +  if test -f $ac_dir/install-sh; then
         1309  +    ac_aux_dir=$ac_dir
         1310  +    ac_install_sh="$ac_aux_dir/install-sh -c"
         1311  +    break
         1312  +  elif test -f $ac_dir/install.sh; then
         1313  +    ac_aux_dir=$ac_dir
         1314  +    ac_install_sh="$ac_aux_dir/install.sh -c"
         1315  +    break
         1316  +  elif test -f $ac_dir/shtool; then
         1317  +    ac_aux_dir=$ac_dir
         1318  +    ac_install_sh="$ac_aux_dir/shtool install -c"
         1319  +    break
         1320  +  fi
         1321  +done
         1322  +if test -z "$ac_aux_dir"; then
         1323  +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
         1324  +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
         1325  +   { (exit 1); exit 1; }; }
         1326  +fi
         1327  +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
         1328  +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
         1329  +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
         1330  +
         1331  +# Make sure we can run config.sub.
         1332  +$ac_config_sub sun4 >/dev/null 2>&1 ||
         1333  +  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
         1334  +echo "$as_me: error: cannot run $ac_config_sub" >&2;}
         1335  +   { (exit 1); exit 1; }; }
         1336  +
         1337  +echo "$as_me:$LINENO: checking build system type" >&5
         1338  +echo $ECHO_N "checking build system type... $ECHO_C" >&6
         1339  +if test "${ac_cv_build+set}" = set; then
         1340  +  echo $ECHO_N "(cached) $ECHO_C" >&6
         1341  +else
         1342  +  ac_cv_build_alias=$build_alias
         1343  +test -z "$ac_cv_build_alias" &&
         1344  +  ac_cv_build_alias=`$ac_config_guess`
         1345  +test -z "$ac_cv_build_alias" &&
         1346  +  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
         1347  +echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
         1348  +   { (exit 1); exit 1; }; }
         1349  +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
         1350  +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
         1351  +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
         1352  +   { (exit 1); exit 1; }; }
         1353  +
         1354  +fi
         1355  +echo "$as_me:$LINENO: result: $ac_cv_build" >&5
         1356  +echo "${ECHO_T}$ac_cv_build" >&6
         1357  +build=$ac_cv_build
         1358  +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
         1359  +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
         1360  +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
         1361  +
         1362  +
         1363  +
         1364  +	echo "$as_me:$LINENO: checking host system type" >&5
         1365  +echo $ECHO_N "checking host system type... $ECHO_C" >&6
         1366  +if test "${ac_cv_host+set}" = set; then
         1367  +  echo $ECHO_N "(cached) $ECHO_C" >&6
         1368  +else
         1369  +  ac_cv_host_alias=$host_alias
         1370  +test -z "$ac_cv_host_alias" &&
         1371  +  ac_cv_host_alias=$ac_cv_build_alias
         1372  +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
         1373  +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
         1374  +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
         1375  +   { (exit 1); exit 1; }; }
         1376  +
         1377  +fi
         1378  +echo "$as_me:$LINENO: result: $ac_cv_host" >&5
         1379  +echo "${ECHO_T}$ac_cv_host" >&6
         1380  +host=$ac_cv_host
         1381  +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
         1382  +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
         1383  +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
         1384  +
         1385  +
         1386  +
         1387  +
         1388  +
         1389  +        echo "$as_me:$LINENO: checking host operating system" >&5
         1390  +echo $ECHO_N "checking host operating system... $ECHO_C" >&6
         1391  +        echo "$as_me:$LINENO: result: $host_os" >&5
         1392  +echo "${ECHO_T}$host_os" >&6
         1393  +
         1394  +	SHOBJEXT="so"
         1395  +	AREXT="a"
         1396  +
         1397  +        case $host_os in
         1398  +                darwin*)
         1399  +			SHOBJEXT="dylib"
         1400  +                        ;;
         1401  +		hpux*)
         1402  +			SHOBJEXT="sl"
         1403  +			;;
         1404  +	esac
         1405  +
  1301   1406   
  1302   1407   ac_ext=c
  1303   1408   ac_cpp='$CPP $CPPFLAGS'
  1304   1409   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1305   1410   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1306   1411   ac_compiler_gnu=$ac_cv_c_compiler_gnu
  1307   1412   if test -n "$ac_tool_prefix"; then
................................................................................
  2254   2359     SET_MAKE=
  2255   2360   else
  2256   2361     echo "$as_me:$LINENO: result: no" >&5
  2257   2362   echo "${ECHO_T}no" >&6
  2258   2363     SET_MAKE="MAKE=${MAKE-make}"
  2259   2364   fi
  2260   2365   
  2261         -ac_aux_dir=
  2262         -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  2263         -  if test -f $ac_dir/install-sh; then
  2264         -    ac_aux_dir=$ac_dir
  2265         -    ac_install_sh="$ac_aux_dir/install-sh -c"
  2266         -    break
  2267         -  elif test -f $ac_dir/install.sh; then
  2268         -    ac_aux_dir=$ac_dir
  2269         -    ac_install_sh="$ac_aux_dir/install.sh -c"
  2270         -    break
  2271         -  elif test -f $ac_dir/shtool; then
  2272         -    ac_aux_dir=$ac_dir
  2273         -    ac_install_sh="$ac_aux_dir/shtool install -c"
  2274         -    break
  2275         -  fi
  2276         -done
  2277         -if test -z "$ac_aux_dir"; then
  2278         -  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
  2279         -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
  2280         -   { (exit 1); exit 1; }; }
  2281         -fi
  2282         -ac_config_guess="$SHELL $ac_aux_dir/config.guess"
  2283         -ac_config_sub="$SHELL $ac_aux_dir/config.sub"
  2284         -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
  2285         -
  2286   2366   # Find a good install program.  We prefer a C program (faster),
  2287   2367   # so one script is as good as another.  But avoid the broken or
  2288   2368   # incompatible versions:
  2289   2369   # SysV /etc/install, /usr/sbin/install
  2290   2370   # SunOS /usr/etc/install
  2291   2371   # IRIX /sbin/install
  2292   2372   # AIX /bin/install
................................................................................
  2808   2888   echo "${ECHO_T}no" >&6
  2809   2889   fi
  2810   2890   
  2811   2891     AR=$ac_ct_AR
  2812   2892   else
  2813   2893     AR="$ac_cv_prog_AR"
  2814   2894   fi
  2815         -
  2816         -
  2817         -cat >>confdefs.h <<\_ACEOF
  2818         -#define _GNU_SOURCE 1
  2819         -_ACEOF
  2820         -
  2821   2895   
  2822   2896   
  2823   2897   echo "$as_me:$LINENO: checking for ANSI C header files" >&5
  2824   2898   echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
  2825   2899   if test "${ac_cv_header_stdc+set}" = set; then
  2826   2900     echo $ECHO_N "(cached) $ECHO_C" >&6
  2827   2901   else
................................................................................
 15354  15428   			FOUND=1
 15355  15429   			break
 15356  15430   		fi
 15357  15431   	done
 15358  15432   
 15359  15433   
 15360  15434   
 15361         -for ac_func in strsep
        15435  +
        15436  +for ac_func in strsep strtoull
 15362  15437   do
 15363  15438   as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 15364  15439   echo "$as_me:$LINENO: checking for $ac_func" >&5
 15365  15440   echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 15366  15441   if eval "test \"\${$as_ac_var+set}\" = set"; then
 15367  15442     echo $ECHO_N "(cached) $ECHO_C" >&6
 15368  15443   else
................................................................................
 15844  15919   
 15845  15920   
 15846  15921   
 15847  15922   
 15848  15923   
 15849  15924     OLD_LDFLAGS="$LDFLAGS"
 15850  15925     SHOBJFLAGS=""
        15926  +
        15927  +  LDFLAGS="$OLD_LDFLAGS -shared -fPIC -rdynamic -mimpure-text"
        15928  +
        15929  +  cat >conftest.$ac_ext <<_ACEOF
        15930  +/* confdefs.h.  */
        15931  +_ACEOF
        15932  +cat confdefs.h >>conftest.$ac_ext
        15933  +cat >>conftest.$ac_ext <<_ACEOF
        15934  +/* end confdefs.h.  */
        15935  +#include <stdio.h>
        15936  +int unrestst(void);
        15937  +int
        15938  +main ()
        15939  +{
        15940  + printf("okay\n"); unrestst(); return(0);
        15941  +  ;
        15942  +  return 0;
        15943  +}
        15944  +_ACEOF
        15945  +rm -f conftest.$ac_objext conftest$ac_exeext
        15946  +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
        15947  +  (eval $ac_link) 2>conftest.er1
        15948  +  ac_status=$?
        15949  +  grep -v '^ *+' conftest.er1 >conftest.err
        15950  +  rm -f conftest.er1
        15951  +  cat conftest.err >&5
        15952  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        15953  +  (exit $ac_status); } &&
        15954  +	 { ac_try='test -z "$ac_c_werror_flag"
        15955  +			 || test ! -s conftest.err'
        15956  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        15957  +  (eval $ac_try) 2>&5
        15958  +  ac_status=$?
        15959  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        15960  +  (exit $ac_status); }; } &&
        15961  +	 { ac_try='test -s conftest$ac_exeext'
        15962  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        15963  +  (eval $ac_try) 2>&5
        15964  +  ac_status=$?
        15965  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        15966  +  (exit $ac_status); }; }; then
        15967  +   SHOBJFLAGS="-shared -fPIC"; SHOBJLDFLAGS="-rdynamic -mimpure-text"
        15968  +else
        15969  +  echo "$as_me: failed program was:" >&5
        15970  +sed 's/^/| /' conftest.$ac_ext >&5
        15971  +
        15972  +
        15973  +  LDFLAGS="$OLD_LDFLAGS"
        15974  +
        15975  +
        15976  +
        15977  +
        15978  +
        15979  +  OLD_LDFLAGS="$LDFLAGS"
        15980  +  SHOBJFLAGS=""
        15981  +
        15982  +  LDFLAGS="$OLD_LDFLAGS -shared -fPIC -mimpure-text"
        15983  +
        15984  +  cat >conftest.$ac_ext <<_ACEOF
        15985  +/* confdefs.h.  */
        15986  +_ACEOF
        15987  +cat confdefs.h >>conftest.$ac_ext
        15988  +cat >>conftest.$ac_ext <<_ACEOF
        15989  +/* end confdefs.h.  */
        15990  +#include <stdio.h>
        15991  +int unrestst(void);
        15992  +int
        15993  +main ()
        15994  +{
        15995  + printf("okay\n"); unrestst(); return(0);
        15996  +  ;
        15997  +  return 0;
        15998  +}
        15999  +_ACEOF
        16000  +rm -f conftest.$ac_objext conftest$ac_exeext
        16001  +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
        16002  +  (eval $ac_link) 2>conftest.er1
        16003  +  ac_status=$?
        16004  +  grep -v '^ *+' conftest.er1 >conftest.err
        16005  +  rm -f conftest.er1
        16006  +  cat conftest.err >&5
        16007  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16008  +  (exit $ac_status); } &&
        16009  +	 { ac_try='test -z "$ac_c_werror_flag"
        16010  +			 || test ! -s conftest.err'
        16011  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        16012  +  (eval $ac_try) 2>&5
        16013  +  ac_status=$?
        16014  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16015  +  (exit $ac_status); }; } &&
        16016  +	 { ac_try='test -s conftest$ac_exeext'
        16017  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        16018  +  (eval $ac_try) 2>&5
        16019  +  ac_status=$?
        16020  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16021  +  (exit $ac_status); }; }; then
        16022  +   SHOBJFLAGS="-shared -fPIC"; SHOBJLDFLAGS="-mimpure-text"
        16023  +else
        16024  +  echo "$as_me: failed program was:" >&5
        16025  +sed 's/^/| /' conftest.$ac_ext >&5
        16026  +
        16027  +
        16028  +  LDFLAGS="$OLD_LDFLAGS"
        16029  +
        16030  +
        16031  +
        16032  +
        16033  +
        16034  +  OLD_LDFLAGS="$LDFLAGS"
        16035  +  SHOBJFLAGS=""
 15851  16036   
 15852  16037     LDFLAGS="$OLD_LDFLAGS -shared -fPIC -rdynamic -Wl,-G,-z,textoff"
 15853  16038   
 15854  16039     cat >conftest.$ac_ext <<_ACEOF
 15855  16040   /* confdefs.h.  */
 15856  16041   _ACEOF
 15857  16042   cat confdefs.h >>conftest.$ac_ext
................................................................................
 15948  16133   else
 15949  16134     echo "$as_me: failed program was:" >&5
 15950  16135   sed 's/^/| /' conftest.$ac_ext >&5
 15951  16136   
 15952  16137   
 15953  16138     LDFLAGS="$OLD_LDFLAGS"
 15954  16139   
 15955         -          { { echo "$as_me:$LINENO: error: cant" >&5
        16140  +
        16141  +
        16142  +
        16143  +
        16144  +  OLD_LDFLAGS="$LDFLAGS"
        16145  +  SHOBJFLAGS=""
        16146  +
        16147  +  LDFLAGS="$OLD_LDFLAGS -shared -fPIC -dynamiclib -flat_namespace -undefined suppress -bind_at_load"
        16148  +
        16149  +  cat >conftest.$ac_ext <<_ACEOF
        16150  +/* confdefs.h.  */
        16151  +_ACEOF
        16152  +cat confdefs.h >>conftest.$ac_ext
        16153  +cat >>conftest.$ac_ext <<_ACEOF
        16154  +/* end confdefs.h.  */
        16155  +#include <stdio.h>
        16156  +int unrestst(void);
        16157  +int
        16158  +main ()
        16159  +{
        16160  + printf("okay\n"); unrestst(); return(0);
        16161  +  ;
        16162  +  return 0;
        16163  +}
        16164  +_ACEOF
        16165  +rm -f conftest.$ac_objext conftest$ac_exeext
        16166  +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
        16167  +  (eval $ac_link) 2>conftest.er1
        16168  +  ac_status=$?
        16169  +  grep -v '^ *+' conftest.er1 >conftest.err
        16170  +  rm -f conftest.er1
        16171  +  cat conftest.err >&5
        16172  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16173  +  (exit $ac_status); } &&
        16174  +	 { ac_try='test -z "$ac_c_werror_flag"
        16175  +			 || test ! -s conftest.err'
        16176  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        16177  +  (eval $ac_try) 2>&5
        16178  +  ac_status=$?
        16179  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16180  +  (exit $ac_status); }; } &&
        16181  +	 { ac_try='test -s conftest$ac_exeext'
        16182  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        16183  +  (eval $ac_try) 2>&5
        16184  +  ac_status=$?
        16185  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16186  +  (exit $ac_status); }; }; then
        16187  +   SHOBJFLAGS="-shared -fPIC"; SHOBJLDFLAGS="-dynamiclib -flat_namespace -undefined suppress -bind_at_load"
        16188  +else
        16189  +  echo "$as_me: failed program was:" >&5
        16190  +sed 's/^/| /' conftest.$ac_ext >&5
        16191  +
        16192  +
        16193  +  LDFLAGS="$OLD_LDFLAGS"
        16194  +
        16195  +
        16196  +
        16197  +
        16198  +
        16199  +  OLD_LDFLAGS="$LDFLAGS"
        16200  +  SHOBJFLAGS=""
        16201  +
        16202  +  LDFLAGS="$OLD_LDFLAGS -fPIC -dynamiclib -flat_namespace -undefined suppress -bind_at_load"
        16203  +
        16204  +  cat >conftest.$ac_ext <<_ACEOF
        16205  +/* confdefs.h.  */
        16206  +_ACEOF
        16207  +cat confdefs.h >>conftest.$ac_ext
        16208  +cat >>conftest.$ac_ext <<_ACEOF
        16209  +/* end confdefs.h.  */
        16210  +#include <stdio.h>
        16211  +int unrestst(void);
        16212  +int
        16213  +main ()
        16214  +{
        16215  + printf("okay\n"); unrestst(); return(0);
        16216  +  ;
        16217  +  return 0;
        16218  +}
        16219  +_ACEOF
        16220  +rm -f conftest.$ac_objext conftest$ac_exeext
        16221  +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
        16222  +  (eval $ac_link) 2>conftest.er1
        16223  +  ac_status=$?
        16224  +  grep -v '^ *+' conftest.er1 >conftest.err
        16225  +  rm -f conftest.er1
        16226  +  cat conftest.err >&5
        16227  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16228  +  (exit $ac_status); } &&
        16229  +	 { ac_try='test -z "$ac_c_werror_flag"
        16230  +			 || test ! -s conftest.err'
        16231  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        16232  +  (eval $ac_try) 2>&5
        16233  +  ac_status=$?
        16234  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16235  +  (exit $ac_status); }; } &&
        16236  +	 { ac_try='test -s conftest$ac_exeext'
        16237  +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
        16238  +  (eval $ac_try) 2>&5
        16239  +  ac_status=$?
        16240  +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
        16241  +  (exit $ac_status); }; }; then
        16242  +   SHOBJFLAGS="-fPIC"; SHOBJLDFLAGS="-dynamiclib -flat_namespace -undefined suppress -bind_at_load"
        16243  +else
        16244  +  echo "$as_me: failed program was:" >&5
        16245  +sed 's/^/| /' conftest.$ac_ext >&5
        16246  +
        16247  +
        16248  +  LDFLAGS="$OLD_LDFLAGS"
        16249  +
        16250  +                  { { echo "$as_me:$LINENO: error: cant" >&5
 15956  16251   echo "$as_me: error: cant" >&2;}
 15957  16252      { (exit 1); exit 1; }; }
        16253  +
        16254  +
        16255  +fi
        16256  +rm -f conftest.err conftest.$ac_objext \
        16257  +      conftest$ac_exeext conftest.$ac_ext
        16258  +
        16259  +  LDFLAGS="$OLD_LDFLAGS"
        16260  +
        16261  +
        16262  +
        16263  +fi
        16264  +rm -f conftest.err conftest.$ac_objext \
        16265  +      conftest$ac_exeext conftest.$ac_ext
        16266  +
        16267  +  LDFLAGS="$OLD_LDFLAGS"
        16268  +
        16269  +
        16270  +
        16271  +fi
        16272  +rm -f conftest.err conftest.$ac_objext \
        16273  +      conftest$ac_exeext conftest.$ac_ext
        16274  +
        16275  +  LDFLAGS="$OLD_LDFLAGS"
        16276  +
        16277  +
        16278  +
        16279  +fi
        16280  +rm -f conftest.err conftest.$ac_objext \
        16281  +      conftest$ac_exeext conftest.$ac_ext
        16282  +
        16283  +  LDFLAGS="$OLD_LDFLAGS"
        16284  +
 15958  16285   
 15959  16286   
 15960  16287   fi
 15961  16288   rm -f conftest.err conftest.$ac_objext \
 15962  16289         conftest$ac_exeext conftest.$ac_ext
 15963  16290   
 15964  16291     LDFLAGS="$OLD_LDFLAGS"
................................................................................
 16355  16682     echo
 16356  16683     sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 16357  16684   ## Running $as_me. ##
 16358  16685   _ASBOX
 16359  16686   } >&5
 16360  16687   cat >&5 <<_CSEOF
 16361  16688   
 16362         -This file was extended by libconfig $as_me 0.0.5, which was
        16689  +This file was extended by libconfig $as_me 0.0.6, which was
 16363  16690   generated by GNU Autoconf 2.59.  Invocation command line was
 16364  16691   
 16365  16692     CONFIG_FILES    = $CONFIG_FILES
 16366  16693     CONFIG_HEADERS  = $CONFIG_HEADERS
 16367  16694     CONFIG_LINKS    = $CONFIG_LINKS
 16368  16695     CONFIG_COMMANDS = $CONFIG_COMMANDS
 16369  16696     $ $0 $@
................................................................................
 16415  16742   $config_headers
 16416  16743   
 16417  16744   Report bugs to <bug-autoconf@gnu.org>."
 16418  16745   _ACEOF
 16419  16746   
 16420  16747   cat >>$CONFIG_STATUS <<_ACEOF
 16421  16748   ac_cs_version="\\
 16422         -libconfig config.status 0.0.5
        16749  +libconfig config.status 0.0.6
 16423  16750   configured by $0, generated by GNU Autoconf 2.59,
 16424  16751     with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 16425  16752   
 16426  16753   Copyright (C) 2003 Free Software Foundation, Inc.
 16427  16754   This config.status script is free software; the Free Software Foundation
 16428  16755   gives unlimited permission to copy, distribute and modify it."
 16429  16756   srcdir=$srcdir
................................................................................
 16609  16936   s,@host_alias@,$host_alias,;t t
 16610  16937   s,@target_alias@,$target_alias,;t t
 16611  16938   s,@DEFS@,$DEFS,;t t
 16612  16939   s,@ECHO_C@,$ECHO_C,;t t
 16613  16940   s,@ECHO_N@,$ECHO_N,;t t
 16614  16941   s,@ECHO_T@,$ECHO_T,;t t
 16615  16942   s,@LIBS@,$LIBS,;t t
        16943  +s,@build@,$build,;t t
        16944  +s,@build_cpu@,$build_cpu,;t t
        16945  +s,@build_vendor@,$build_vendor,;t t
        16946  +s,@build_os@,$build_os,;t t
        16947  +s,@host@,$host,;t t
        16948  +s,@host_cpu@,$host_cpu,;t t
        16949  +s,@host_vendor@,$host_vendor,;t t
        16950  +s,@host_os@,$host_os,;t t
        16951  +s,@SHOBJEXT@,$SHOBJEXT,;t t
        16952  +s,@AREXT@,$AREXT,;t t
 16616  16953   s,@CC@,$CC,;t t
 16617  16954   s,@CFLAGS@,$CFLAGS,;t t
 16618  16955   s,@LDFLAGS@,$LDFLAGS,;t t
 16619  16956   s,@CPPFLAGS@,$CPPFLAGS,;t t
 16620  16957   s,@ac_ct_CC@,$ac_ct_CC,;t t
 16621  16958   s,@EXEEXT@,$EXEEXT,;t t
 16622  16959   s,@OBJEXT@,$OBJEXT,;t t

Modified configure.in from [0d863a453e] to [018d009afd].

     1      1   AC_REVISION($Revision $)
     2         -AC_INIT(libconfig, 0.0.5)
            2  +AC_INIT(libconfig, 0.0.8)
     3      3   AC_CONFIG_HEADER(config.h)
            4  +
            5  +dnl Find out about the host OS
            6  +DC_CHK_OS_INFO
     4      7   
     5      8   dnl Checks for programs.
     6      9   AC_PROG_CC
     7     10   AC_PROG_MAKE_SET
     8     11   AC_PROG_INSTALL
     9     12   AC_PROG_LN_S
    10     13   AC_PROG_RANLIB
    11     14   AC_AIX
    12     15   AC_CHECK_TOOL(AR, ar, true)
    13         -AC_GNU_SOURCE
    14     16   
    15     17   AC_CHECK_HEADERS(ctype.h dirent.h pwd.h stdio.h stdlib.h string.h sys/stat.h sys/time.h sys/types.h time.h unistd.h)
    16     18   AC_HEADER_TIME
    17     19   
    18     20   DC_DO_TYPE(uint64_t, unsigned, 8)
    19     21   DC_DO_TYPE(int64_t, signed, 8)
    20     22   DC_DO_TYPE(uint32_t, unsigned, 4)
    21     23   DC_DO_TYPE(int32_t, signed, 4)
    22     24   DC_DO_TYPE(uint16_t, unsigned, 2)
    23     25   DC_DO_TYPE(int16_t, signed, 2)
    24     26   
    25         -AC_REPLACE_FUNCS(strsep)
           27  +AC_REPLACE_FUNCS(strsep strtoull)
    26     28   AC_CHECK_FUNCS(getpwuid)
    27     29   
    28     30   dnl Checks for Win32 specific things.
    29     31   DC_DO_WIN32
    30     32   
    31     33   dnl This must be last.
    32     34   DC_GET_SHOBJFLAGS
    33     35   
    34     36   AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3)

Modified libconfig.c from [263f038910] to [ce1c286cb1].

   227    227   		case LC_VAR_BOOL_BY_EXISTANCE:
   228    228   			return(lc_process_var_bool_byexistance(data, value));
   229    229   			break;
   230    230   		case LC_VAR_TIME:
   231    231   		case LC_VAR_DATE:
   232    232   		case LC_VAR_FILENAME:
   233    233   		case LC_VAR_DIRECTORY:
   234         -			PRINTERR_D("Not implemented yet!");
          234  +#ifdef DEBUG
          235  +			fprintf(stderr, "Not implemented yet!\n");
          236  +#endif
   235    237   			return(-1);
   236    238   		case LC_VAR_NONE:
   237    239   		case LC_VAR_UNKNOWN:
   238    240   		case LC_VAR_SECTION:
   239    241   		case LC_VAR_SECTIONSTART:
   240    242   		case LC_VAR_SECTIONEND:
   241    243   			return(0);
................................................................................
   250    252   	int retval;
   251    253   
   252    254   	if (var != NULL) {
   253    255   		localvar = strrchr(var, '.');
   254    256   		if (localvar == NULL) {
   255    257   			localvar = var;
   256    258   		} else {
   257         -			*localvar++;
          259  +			localvar++;
   258    260   		}
   259    261   	} else {
   260    262   		localvar = NULL;
   261    263   	}
   262    264   
   263    265   	switch (handler->mode) {
   264    266   		case LC_MODE_CALLBACK:
................................................................................
   296    298   
   297    299   	/* Allocate and create our uppercase appname. */
   298    300   	ucase_appname = strdup(appname);
   299    301   	if (ucase_appname == NULL) {
   300    302   		lc_errno = LC_ERR_ENOMEM;
   301    303   		return(-1);
   302    304   	}
   303         -	for (ucase_appname_itr = ucase_appname; *ucase_appname_itr != '\0'; *ucase_appname_itr++) {
          305  +	for (ucase_appname_itr = ucase_appname; *ucase_appname_itr != '\0'; ucase_appname_itr++) {
   304    306   		*ucase_appname_itr = toupper(*ucase_appname_itr);
   305    307   	}
   306    308   
   307    309   	appnamelen = strlen(ucase_appname);
   308    310   
   309         -	for (currvar = environ; *currvar != NULL; *currvar++) {
          311  +	for (currvar = environ; *currvar != NULL; currvar++) {
   310    312   		/* If it doesn't begin with our appname ignore it completely. */
   311    313   		if (strncmp(*currvar, ucase_appname, appnamelen) != 0) {
   312    314   			continue;
   313    315   		}
   314    316   
   315    317   		/* Find our seperator. */
   316    318   		sep = strchr(*currvar, '=');
................................................................................
   365    367   			/* Find the last part of the variable and compare it with 
   366    368   			   the option being processed, if a wildcard is given. */
   367    369   			if (handler->var[0] == '*' && handler->var[1] == '.') {
   368    370   				lastcomponent_handler = strrchr(handler->var, '.');
   369    371   				if (lastcomponent_handler == NULL) {
   370    372   					lastcomponent_handler = handler->var;
   371    373   				} else {
   372         -					*lastcomponent_handler++;
          374  +					lastcomponent_handler++;
   373    375   				}
   374    376   			} else {
   375    377   				lastcomponent_handler = handler->var;
   376    378   			}
   377    379   
   378    380   			/* Ignore this handler if they don't match. */
   379    381   			if (strcasecmp(lastcomponent_handler, cmd) != 0) {
................................................................................
   442    444   		}
   443    445   
   444    446   		/* Setup a pointer in the new array for the actual argument. */
   445    447   		newargv[newargvidx++] = cmdarg;
   446    448   		usedargv[cmdargidx] = 1;
   447    449   
   448    450   		/* Then shift the argument past the '-' so we can ignore it. */
   449         -		*cmdarg++;
          451  +		cmdarg++;
   450    452   
   451    453   		/* Handle long options. */
   452    454   		if (cmdarg[0] == '-') {
   453         -			*cmdarg++;
          455  +			cmdarg++;
   454    456   
   455    457   			/* Don't process arguments after the '--' option. */
   456    458   			if (cmdarg[0] == '\0') {
   457    459   				break;
   458    460   			}
   459    461   
   460    462   			/* Look for a variable name that matches */
................................................................................
   475    477   				/* Find the last part of the variable and compare it with 
   476    478   				   the option being processed, if a wildcard is given. */
   477    479   				if (handler->var[0] == '*' && handler->var[1] == '.') {
   478    480   					lastcomponent_handler = strrchr(handler->var, '.');
   479    481   					if (lastcomponent_handler == NULL) {
   480    482   						lastcomponent_handler = handler->var;
   481    483   					} else {
   482         -						*lastcomponent_handler++;
          484  +						lastcomponent_handler++;
   483    485   					}
   484    486   				} else {
   485    487   					/* Disallow use of the fully qualified name
   486    488   					   since there was no sectionstart portion
   487    489   					   we cannot allow it to handle children of it. */
   488    490   					if (strchr(cmdarg, '.') != NULL) {
   489    491   						continue;
................................................................................
   497    499   				}
   498    500   
   499    501   				if (handler->type == LC_VAR_NONE || handler->type == LC_VAR_BOOL_BY_EXISTANCE) {
   500    502   					cmdoptarg = NULL;
   501    503   				} else {
   502    504   					cmdargidx++;
   503    505   					if (cmdargidx >= argc) {
   504         -						PRINTERR("Argument required.");
          506  +						fprintf(stderr, "Argument required.\n");
   505    507   						lc_errno = LC_ERR_BADFORMAT;
   506    508   						free(usedargv);
   507    509   						free(newargv);
   508    510   						return(-1);
   509    511   					}
   510    512   					cmdoptarg = argv[cmdargidx];
   511    513   					newargv[newargvidx++] = cmdoptarg;
................................................................................
   517    519   					retval = -1;
   518    520   				}
   519    521   
   520    522   				break;
   521    523   			}
   522    524   
   523    525   			if (handler == NULL) {
   524         -				PRINTERR("Unknown option: --%s", cmdarg);
          526  +				fprintf(stderr, "Unknown option: --%s\n", cmdarg);
   525    527   				lc_errno = LC_ERR_INVCMD;
   526    528   				free(usedargv);
   527    529   				free(newargv);
   528    530   				return(-1);
   529    531   			}
   530    532   		} else {
   531         -			for (; *cmdarg != '\0'; *cmdarg++) {
          533  +			for (; *cmdarg != '\0'; cmdarg++) {
   532    534   				ch = *cmdarg;
   533    535   
   534    536   				for (handler = varhandlers; handler != NULL; handler = handler->_next) {
   535    537   					if (handler->opt != ch || handler->opt == '\0') {
   536    538   						continue;
   537    539   					}
   538    540   					/* Skip handlers which don't agree with being
................................................................................
   545    547   					}
   546    548   
   547    549   					if (handler->type == LC_VAR_NONE || handler->type == LC_VAR_BOOL_BY_EXISTANCE) {
   548    550   						cmdoptarg = NULL;
   549    551   					} else {
   550    552   						cmdargidx++;
   551    553   						if (cmdargidx >= argc) {
   552         -							PRINTERR("Argument required.");
          554  +							fprintf(stderr, "Argument required.\n");
   553    555   							lc_errno = LC_ERR_BADFORMAT;
   554    556   							free(usedargv);
   555    557   							free(newargv);
   556    558   							return(-1);
   557    559   						}
   558    560   						cmdoptarg = argv[cmdargidx];
   559    561   						newargv[newargvidx++] = cmdoptarg;
................................................................................
   565    567   						retval = -1;
   566    568   					}
   567    569   
   568    570   					break;
   569    571   				}
   570    572   
   571    573   				if (handler == NULL) {
   572         -					PRINTERR("Unknown option: -%c", ch);
          574  +					fprintf(stderr, "Unknown option: -%c\n", ch);
   573    575   					lc_errno = LC_ERR_INVCMD;
   574    576   					free(usedargv);
   575    577   					free(newargv);
   576    578   					return(-1);
   577    579   				}
   578    580   			}
   579    581   		}
................................................................................
   606    608   	struct lc_varhandler_st *handler = NULL;
   607    609   	const char *lastcomponent_handler = NULL, *lastcomponent_var = NULL;
   608    610   
   609    611   	lastcomponent_var = strrchr(var, '.');
   610    612   	if (lastcomponent_var == NULL) {
   611    613   		lastcomponent_var = var;
   612    614   	} else {
   613         -		*lastcomponent_var++;
          615  +		lastcomponent_var++;
   614    616   	}
   615    617   
   616    618   	for (handler = varhandlers; handler != NULL; handler = handler->_next) {
   617    619   		/* If either handler->var or var is NULL, skip, unless both are NULL. */
   618    620   		if (handler->var != var && (handler->var == NULL || var == NULL)) {
   619    621   			continue;
   620    622   		}

Added strtoull.c version [f78330ce18].

            1  +#include <sys/types.h>
            2  +#include <stdlib.h>
            3  +#include <limits.h>
            4  +#include <ctype.h>
            5  +#include <stdio.h>
            6  +
            7  +/* We only handle base 10. */
            8  +unsigned long long int strtoull(char *nptr, char **endptr, int base) {
            9  +	unsigned long long int retval = 0;
           10  +	char *idx = NULL;
           11  +
           12  +	for (idx = nptr; *idx != '\0' && isdigit(*idx); idx++) {
           13  +		retval *= 10;
           14  +		retval += (*idx - '0');
           15  +	}
           16  +
           17  +	if (endptr != NULL) {
           18  +		*endptr = idx;
           19  +	}
           20  +
           21  +	return(retval);
           22  +}

Added strtoull.h version [d844e2c6b9].

            1  +#ifndef _RSK_STRTOULL_H
            2  +#define _RSK_STRTOULL_H
            3  +
            4  +unsigned long long int strtoull(char *nptr, char **endptr, int base);
            5  +
            6  +#endif

Modified test-lc.c from [3e4ac1b9da] to [d4be221f35].

     4      4   int help_cmd(const char *partarg, const char *arg, const char *argarg, const char *val, lc_flags_t flags, void *extra) {
     5      5   	printf("Usage info goes here\n");
     6      6   	printf("\n");
     7      7   
     8      8   	exit(EXIT_FAILURE);
     9      9   }
    10     10   int sally_cmd(const char *partarg, const char *arg, const char *argarg, const char *val, lc_flags_t flags, void *extra) {
    11         -	PRINTERR("%s sets value: \"%s\" (flags=%i)", arg, val, flags);
           11  +	fprintf(stderr, "%s sets value: \"%s\" (flags=%i)\n", arg, val, flags);
    12     12   	return(0);
    13     13   }
    14     14   
    15     15   int cmd_ifmodule(const char *partarg, const char *arg, const char *argarg, const char *val, lc_flags_t flags, void *extra) {
    16     16   	if (flags == LC_FLAGS_SECTIONEND) {
    17     17   		return(LC_CBRET_OKAY);
    18     18   	}
    19     19   	if (flags != LC_FLAGS_SECTIONSTART) {
    20         -		PRINTERR("IfModule can only be used as a section.");
           20  +		fprintf(stderr, "IfModule can only be used as a section.\n");
    21     21   		return(LC_CBRET_ERROR);
    22     22   	}
    23     23   	if (argarg == NULL) {
    24         -		PRINTERR("You must specify an argument to IfModule.");
           24  +		fprintf(stderr, "You must specify an argument to IfModule.\n");
    25     25   		return(LC_CBRET_ERROR);
    26     26   	}
    27     27   
    28         -	PRINTERR("IfModule (%s)", argarg);
           28  +	fprintf(stderr, "IfModule (%s)\n", argarg);
    29     29   	return(LC_CBRET_IGNORESECTION);
    30     30   }
    31     31   
    32     32   int main(int argc, char **argv) {
    33     33   	char *joeval = NULL;
    34     34   	long long xval = -1;
    35     35   	int onoff = -1;
................................................................................
    45     45   	lc_register_var("Somesection.Free", LC_VAR_BOOL, &onoff, 0);
    46     46   	lc_register_var("long", LC_VAR_BOOL_BY_EXISTANCE, &onoff2, 'l');
    47     47   	lc_register_callback("sally", 0, LC_VAR_STRING, sally_cmd, NULL);
    48     48   	lc_register_callback("HELP", 'h', LC_VAR_NONE, help_cmd, NULL);
    49     49   	lc_register_callback("*.ifmodule", 0, LC_VAR_NONE, cmd_ifmodule, NULL);
    50     50   	lcpret = lc_process(argc, argv, "testapp", LC_CONF_APACHE, "test.cfg");
    51     51   	if (lcpret < 0) {
    52         -		PRINTERR("Error processing config file: %s", lc_geterrstr());
           52  +		fprintf(stderr, "Error processing config file: %s\n", lc_geterrstr());
    53     53   		return(EXIT_FAILURE);
    54     54   	}
    55     55   
    56     56   	if (joeval != NULL) {
    57         -		PRINTERR("joeval = \"%s\"", joeval);
           57  +		fprintf(stderr, "joeval = \"%s\"\n", joeval);
    58     58   	} else {
    59         -		PRINTERR("joeval = \"(null)\"");
           59  +		fprintf(stderr, "joeval = \"(null)\"\n");
    60     60   	}
    61         -	PRINTERR("xval = %lli", xval);
    62         -	PRINTERR("onoff = %i", onoff);
    63         -	PRINTERR("long = %i", onoff2);
           61  +	fprintf(stderr, "xval = %lli\n", xval);
           62  +	fprintf(stderr, "onoff = %i\n", onoff);
           63  +	fprintf(stderr, "long = %i\n", onoff2);
    64     64   	for (i = lc_optind; i < argc; i++) {
    65         -		PRINTERR("argv[%i] = \"%s\"", i, argv[i]);
           65  +		fprintf(stderr, "argv[%i] = \"%s\"\n", i, argv[i]);
    66     66   	}
    67     67   
    68     68   	return(0);
    69     69   }