Check-in [5e72879d0d]
Overview
Comment:Updated to use individual m4 files from upstream repo, and many other cleanups
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5e72879d0da2536258c52d3e099c77c334dc02dc
User & Date: rkeene on 2014-11-24 18:21:05
Other Links: manifest | tags
Context
2014-11-24
18:22
Removed extraneous check check-in: f92dcf40fe user: rkeene tags: trunk
18:21
Updated to use individual m4 files from upstream repo, and many other cleanups check-in: 5e72879d0d user: rkeene tags: trunk
18:11
Updated to not randomly have libconfig.h passed through the C preprocessor check-in: 269106f456 user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [168a13de83] to [1dd559b6be].

     1      1   .*.swp
     2         -.*.swp/*
     3      2   Makefile
     4         -Makefile/*
            3  +aclocal.m4
            4  +config.guess
     5      5   config.h
     6      6   config.h.in
     7         -config.h.in/*
     8         -config.h/*
     9      7   config.log
    10         -config.log/*
    11      8   config.status
    12         -config.status/*
            9  +config.sub
    13     10   configure
    14         -configure/*
           11  +install-sh
    15     12   lc_cleanup.3
    16         -lc_cleanup.3/*
    17     13   lc_geterrno.3
    18         -lc_geterrno.3/*
    19     14   lc_geterrstr.3
    20         -lc_geterrstr.3/*
    21     15   lc_handle_type.3
    22         -lc_handle_type.3/*
    23     16   lc_process.3
    24         -lc_process.3/*
    25     17   lc_process_file.3
    26         -lc_process_file.3/*
    27     18   lc_register_callback.3
    28         -lc_register_callback.3/*
    29     19   lc_register_var.3
    30         -lc_register_var.3/*
    31     20   lc_seterrstr.3
    32         -lc_seterrstr.3/*
    33     21   libconfig.3
    34         -libconfig.3/*
    35     22   libconfig.a
    36         -libconfig.a/*
    37     23   libconfig.dll
    38     24   libconfig.dll.a
    39         -libconfig.dll.a/*
    40     25   libconfig.dll.def
    41         -libconfig.dll.def/*
    42         -libconfig.dll/*
    43     26   libconfig.so
    44         -libconfig.so/*
    45     27   test-lc
    46     28   test-lc.exe
    47         -test-lc.exe/*
    48         -test-lc/*
    49     29   test.cfg
    50         -test.cfg/*

Modified Makefile.in from [8809f1c079] to [804405b696].

    51     51   
    52     52   %.o: $(srcdir)/%.c
    53     53   	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ "$(filter %.c, $^)"
    54     54   
    55     55   test-lc$(EXEEXT): $(LIBS) $(srcdir)/test-lc.c
    56     56   	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig
    57     57   
    58         -clean:
    59         -	rm -f *.o $(BINS) $(LIBS) *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll
    60         -
    61         -distclean: clean
    62         -	rm -f Makefile config.h config.status config.log lc_geterrno.3 lc_process.3 lc_cleanup.3 lc_process_file.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3
    63         -
    64     58   install: all libconfig.h
    65     59   	-$(INSTALL) -d "$(mandir)"
    66     60   	-$(INSTALL) -d "$(mandir)/man3"
    67     61   	-$(INSTALL) -d "$(libdir)"
    68     62   	-$(INSTALL) -d "$(includedir)"
    69     63   	-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).def "$(libdir)/libconfig.$(SHOBJEXT).def"
    70     64   	-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).a "$(libdir)/libconfig.$(SHOBJEXT).a"
................................................................................
    80     74   	$(INSTALL) -m 644 lc_process.3 "$(mandir)/man3/lc_process.3"
    81     75   	$(INSTALL) -m 644 lc_cleanup.3 "$(mandir)/man3/lc_cleanup.3"
    82     76   	$(INSTALL) -m 644 libconfig.3 "$(mandir)/man3/libconfig.3"
    83     77   	$(INSTALL) -m 644 libconfig.h "$(includedir)/libconfig.h"
    84     78   	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
    85     79   	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )
    86     80   
           81  +clean:
           82  +	rm -f *.o $(BINS) $(LIBS) *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll
           83  +
           84  +distclean: clean
           85  +	rm -f Makefile config.h config.status config.log lc_geterrno.3 lc_process.3 lc_cleanup.3 lc_process_file.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3
           86  +
           87  +mrproper: distclean
           88  +	rm -f aclocal.m4 config.guess config.sub install-sh configure
           89  +
    87     90   .PHONY: all clean distclean install

Modified aclocal/libconfig.m4 from [12931a90b0] to [d46c22e181].

    29     29   			fi
    30     30   			FOUND=1
    31     31   			break
    32     32   		fi
    33     33   	done
    34     34   ])
    35     35   
    36         -dnl Usage:
    37         -dnl    DC_TEST_SHOBJFLAGS(shobjflags, shobjldflags, action-if-not-found)
    38         -dnl
    39         -AC_DEFUN(DC_TEST_SHOBJFLAGS, [
    40         -  AC_SUBST(SHOBJFLAGS)
    41         -  AC_SUBST(SHOBJLDFLAGS)
    42         -
    43         -  OLD_LDFLAGS="$LDFLAGS"
    44         -  SHOBJFLAGS=""
    45         -
    46         -  LDFLAGS="$OLD_LDFLAGS $1 $2"
    47         -
    48         -  AC_TRY_LINK([#include <stdio.h>
    49         -int unrestst(void);], [ printf("okay\n"); unrestst(); return(0); ], [ SHOBJFLAGS="$1"; SHOBJLDFLAGS="$2" ], [
    50         -  LDFLAGS="$OLD_LDFLAGS"
    51         -  $3
    52         -])
    53         -
    54         -  LDFLAGS="$OLD_LDFLAGS"
    55         -])
    56         -
    57         -AC_DEFUN(DC_GET_SHOBJFLAGS, [
    58         -  AC_SUBST(SHOBJFLAGS)
    59         -  AC_SUBST(SHOBJLDFLAGS)
    60         -
    61         -  AC_MSG_CHECKING(how to create shared objects)
    62         -
    63         -  if test -z "$SHOBJFLAGS" -a -z "$SHOBJLDFLAGS"; then
    64         -    DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic], [
    65         -      DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared], [
    66         -	DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic -mimpure-text], [
    67         -	  DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -mimpure-text], [
    68         -	    DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic -Wl,-G,-z,textoff], [
    69         -	      DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -Wl,-G,-z,textoff], [
    70         -		DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
    71         -		  DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
    72         -		    DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-Wl,-dynamiclib -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-bind_at_load], [
    73         -		      DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib -flat_namespace -undefined suppress], [
    74         -		        DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib], [
    75         -		          AC_MSG_RESULT(cant)
    76         -		          AC_MSG_ERROR([We are unable to make shared objects.])
    77         -                        ])
    78         -		      ])
    79         -		    ])
    80         -		  ])
    81         -		])
    82         -	      ])
    83         -	    ])
    84         -	  ])
    85         -	])
    86         -      ])
    87         -    ])
    88         -  fi
    89         -
    90         -  AC_MSG_RESULT($SHOBJLDFLAGS $SHOBJFLAGS)
    91         -
    92         -  DC_SYNC_SHLIBOBJS
    93         -])
    94         -
    95         -AC_DEFUN(DC_SYNC_SHLIBOBJS, [
    96         -  AC_SUBST(SHLIBOBJS)
    97         -  SHLIBOBJS=""
    98         -  for obj in $LIB@&t@OBJS; do
    99         -    SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
   100         -  done
   101         -])
   102         -
   103         -AC_DEFUN(DC_CHK_OS_INFO, [
   104         -	AC_CANONICAL_HOST
   105         -	AC_SUBST(SHOBJEXT)
   106         -	AC_SUBST(SHOBJFLAGS)
   107         -	AC_SUBST(SHOBJLDFLAGS)
   108         -	AC_SUBST(CFLAGS)
   109         -	AC_SUBST(CPPFLAGS)
   110         -	AC_SUBST(AREXT)
   111         -
   112         -	AC_MSG_CHECKING(host operating system)
   113         -	AC_MSG_RESULT($host_os)
   114         -
   115         -	SHOBJEXT="so"
   116         -	AREXT="a"
   117         -
   118         -	case $host_os in
   119         -		darwin*)
   120         -			SHOBJEXT="dylib"
   121         -			;;
   122         -		hpux*)
   123         -			SHOBJEXT="sl"
   124         -			;;
   125         -		mingw32|mingw32msvc*)
   126         -			SHOBJEXT="dll"
   127         -			SHOBJFLAGS="-DPIC"
   128         -			CFLAGS="$CFLAGS -mms-bitfields"
   129         -			CPPFLAGS="$CPPFLAGS -mms-bitfields"
   130         -			SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
   131         -			;;
   132         -		cygwin*)
   133         -			SHOBJEXT="dll"
   134         -			SHOBJFLAGS="-fPIC -DPIC"
   135         -			CFLAGS="$CFLAGS -mms-bitfields"
   136         -			CPPFLAGS="$CPPFLAGS -mms-bitfields"
   137         -			SHOBJLDFLAGS='-shared -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
   138         -			;;
   139         -	esac
   140         -])
   141         -
   142         -
   143         -AC_DEFUN(DC_ASK_OPTLIB, [
   144         -  AC_ARG_WITH($5, [  --with-$5 $4], [
   145         -# Specified
   146         -    LIBSPEC=$withval
   147         -  ], [
   148         -# Not specified
   149         -    LIBSPECFLAGS=`pkg-config --libs $5 2>/dev/null`
   150         -    LIBSPECCFLAGS=`pkg-config --cflags $5 2>/dev/null`
   151         -    AC_CHECK_LIB($1, $2, [
   152         -      OLDCPPFLAGS="$CPPFLAGS"
   153         -      OLDCFLAGS="$CFLAGS"
   154         -      CPPFLAGS="$CPPFLAGS $LIBSPECCFLAGS"
   155         -      CFLAGS="$CFLAGS $LIBSPECCFLAGS"
   156         -      AC_CHECK_HEADER($3, [
   157         -	LIBSPEC=yes
   158         -      ], [
   159         -	LIBSPEC=no
   160         -      ])
   161         -      CPPFLAGS="$OLDCPPFLAGS"
   162         -      CFLAGS="$OLDCFLAGS"
   163         -    ], [
   164         -      LIBSPEC=no
   165         -      AC_MSG_WARN(Didn't find $5)
   166         -    ], $LIBSPECFLAGS)
   167         -  ])
   168         -  case $LIBSPEC in
   169         -  	no)
   170         -  		AC_MSG_WARN(Support for $5 disabled)
   171         -  		;;
   172         -  	*)
   173         -  		if test "${LIBSPEC}" = "yes"; then
   174         -			true
   175         -		else
   176         -			LIBSPECFLAGS="-L${LIBSPEC}/lib ${LIBSPECFLAGS}"
   177         -			LIBSPECCFLAGS="-I${LIBSPEC}/include ${LIBSPECCFLAGS}"
   178         -  		fi
   179         -		AC_CHECK_LIB($1, $2, [
   180         -		  OLDCFLAGS="$CFLAGS"
   181         -		  OLDCPPFLAGS="$CPPFLAGS"
   182         -		  CPPFLAGS="$CPPFLAGS ${LIBSPECCFLAGS}"
   183         -		  CFLAGS="$CFLAGS ${LIBSPECCFLAGS}"
   184         -  		  AC_CHECK_HEADER($3, [
   185         -		    if test -n "$7"; then
   186         -		      AC_DEFINE($7, [1], [Define to 1 if you have the <$3> header file.])
   187         -		    fi
   188         -		    if test -n "$6"; then
   189         -		      AC_DEFINE($6, [1], [Define to 1 if you have $2 from $5])
   190         -		    fi
   191         -		    LDFLAGS="$LDFLAGS $LIBSPECFLAGS"
   192         -		    LIBS="-l$1 $LIBS"
   193         -		  ], [
   194         -		    CFLAGS="$OLDCFLAGS"
   195         -		    CPPFLAGS="$OLDCPPFLAGS"
   196         -		    AC_MSG_ERROR(Could not find $3)
   197         -		  ])
   198         -		], [
   199         -		  AC_MSG_ERROR(Could not find $5)
   200         -		], $LIBSPECFLAGS)
   201         -  		;;
   202         -  esac
   203         -])
   204         -
   205     36   AC_DEFUN(DC_ASK_SMALL, [
   206     37   	SMALL=0
   207     38   	AC_ARG_ENABLE(small, AC_HELP_STRING([--enable-small], [Enable small build of libconfig. (disabled)]), [
   208     39   		case $enableval in
   209     40   			yes)            
   210     41   				SMALL=1
   211     42   				;;      

Added aclocal/optarg.m4 version [acf41c4916].

            1  +# Usage:
            2  +#  DC_ASK_OPTLIB(library, function, header, description, packagename, libdefine, headerdefine)
            3  +#  Only the last argument is optional, because they will only be defined if both the lib
            4  +#  and header are found
            5  +#  Example:
            6  +#    DC_ASK_OPTLIB(z, compress2, zlib.h, [            Support zlib], zlib, HAVE_LIBZ, HAVE_ZLIB_H)
            7  +AC_DEFUN(DC_ASK_OPTLIB, [
            8  +  AC_ARG_WITH($5, [  --with-$5 $4], [
            9  +# Specified
           10  +    LIBSPEC=$withval
           11  +  ], [
           12  +# Not specified
           13  +    LIBSPECFLAGS=`pkg-config --libs $5 2>/dev/null`
           14  +    LIBSPECCFLAGS=`pkg-config --cflags $5 2>/dev/null`
           15  +    AC_CHECK_LIB($1, $2, [
           16  +      OLDCPPFLAGS="$CPPFLAGS"
           17  +      OLDCFLAGS="$CFLAGS"
           18  +      CPPFLAGS="$CPPFLAGS $LIBSPECCFLAGS"
           19  +      CFLAGS="$CFLAGS $LIBSPECCFLAGS"
           20  +      AC_CHECK_HEADER($3, [
           21  +        LIBSPEC=yes
           22  +      ], [
           23  +        LIBSPEC=no
           24  +      ])
           25  +      CPPFLAGS="$OLDCPPFLAGS"
           26  +      CFLAGS="$OLDCFLAGS"
           27  +    ], [
           28  +      LIBSPEC=no
           29  +      AC_MSG_WARN(Didn't find $5)
           30  +    ], $LIBSPECFLAGS)
           31  +  ])
           32  +  case $LIBSPEC in
           33  +  	no)
           34  +  		AC_MSG_WARN(Support for $5 disabled)
           35  +  		;;
           36  +  	*)
           37  +  		if test "${LIBSPEC}" = "yes"; then
           38  +			true
           39  +		else
           40  +			LIBSPECFLAGS="-L${LIBSPEC}/lib ${LIBSPECFLAGS}"
           41  +			LIBSPECCFLAGS="-I${LIBSPEC}/include ${LIBSPECCFLAGS}"
           42  +  		fi
           43  +		AC_CHECK_LIB($1, $2, [
           44  +		  OLDCFLAGS="$CFLAGS"
           45  +		  OLDCPPFLAGS="$CPPFLAGS"
           46  +		  CPPFLAGS="$CPPFLAGS ${LIBSPECCFLAGS}"
           47  +		  CFLAGS="$CFLAGS ${LIBSPECCFLAGS}"
           48  +  		  AC_CHECK_HEADER($3, [
           49  +		    if test -n "$7"; then
           50  +		      AC_DEFINE($7, [1], [Define to 1 if you have the <$3> header file.])
           51  +		    fi
           52  +		    if test -n "$6"; then
           53  +		      AC_DEFINE($6, [1], [Define to 1 if you have $2 from $5])
           54  +		    fi
           55  +		    LDFLAGS="$LDFLAGS $LIBSPECFLAGS"
           56  +		    LIBS="$LIBS -l$1"
           57  +		  ], [
           58  +		    CFLAGS="$OLDCFLAGS"
           59  +		    CPPFLAGS="$OLDCPPFLAGS"
           60  +		    AC_MSG_ERROR(Could not find $3)
           61  +		  ])
           62  +		], [
           63  +		  AC_MSG_ERROR(Could not find $5)
           64  +		], $LIBSPECFLAGS)
           65  +  		;;
           66  +  esac
           67  +])

Added aclocal/shobj.m4 version [455eb6a4ce].

            1  +dnl Usage:
            2  +dnl    DC_TEST_SHOBJFLAGS(shobjflags, shobjldflags, action-if-not-found)
            3  +dnl
            4  +AC_DEFUN([DC_TEST_SHOBJFLAGS], [
            5  +  AC_SUBST(SHOBJFLAGS)
            6  +  AC_SUBST(SHOBJCPPFLAGS)
            7  +  AC_SUBST(SHOBJLDFLAGS)
            8  +
            9  +  OLD_LDFLAGS="$LDFLAGS"
           10  +  OLD_CFLAGS="$CFLAGS"
           11  +  OLD_CPPFLAGS="$CPPFLAGS"
           12  +
           13  +  SHOBJFLAGS=""
           14  +  SHOBJCPPFLAGS=""
           15  +  SHOBJLDFLAGS=""
           16  +
           17  +  CFLAGS="$OLD_CFLAGS $1"
           18  +  CPPFLAGS="$OLD_CPPFLAGS $2"
           19  +  LDFLAGS="$OLD_LDFLAGS $3"
           20  +
           21  +  AC_TRY_LINK([#include <stdio.h>
           22  +int unrestst(void);], [ printf("okay\n"); unrestst(); return(0); ], [ SHOBJFLAGS="$1"; SHOBJCPPFLAGS="$2"; SHOBJLDFLAGS="$3" ], [
           23  +    LDFLAGS="$OLD_LDFLAGS"
           24  +    CFLAGS="$OLD_CFLAGS"
           25  +    CPPFLAGS="$OLD_CPPFLAGS"
           26  +    $4
           27  +  ])
           28  +
           29  +  LDFLAGS="$OLD_LDFLAGS"
           30  +  CFLAGS="$OLD_CFLAGS"
           31  +  CPPFLAGS="$OLD_CPPFLAGS"
           32  +])
           33  +
           34  +AC_DEFUN([DC_GET_SHOBJFLAGS], [
           35  +  AC_SUBST(SHOBJFLAGS)
           36  +  AC_SUBST(SHOBJCPPFLAGS)
           37  +  AC_SUBST(SHOBJLDFLAGS)
           38  +
           39  +  DC_CHK_OS_INFO
           40  +
           41  +  AC_MSG_CHECKING(how to create shared objects)
           42  +
           43  +  if test -z "$SHOBJFLAGS" -a -z "$SHOBJLDFLAGS" -a -z "$SHOBJCPPFLAGS"; then
           44  +    DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic], [
           45  +      DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared], [
           46  +	DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic -mimpure-text], [
           47  +	  DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -mimpure-text], [
           48  +	    DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic -Wl,-G,-z,textoff], [
           49  +	      DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -Wl,-G], [
           50  +		DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
           51  +		  DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
           52  +		    DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-Wl,-dynamiclib -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-bind_at_load], [
           53  +		      DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress], [
           54  +		        DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib], [
           55  +		          AC_MSG_RESULT(cant)
           56  +		          AC_MSG_ERROR([We are unable to make shared objects.])
           57  +                        ])
           58  +		      ])
           59  +		    ])
           60  +		  ])
           61  +		])
           62  +	      ])
           63  +	    ])
           64  +	  ])
           65  +	])
           66  +      ])
           67  +    ])
           68  +  fi
           69  +
           70  +  AC_MSG_RESULT($SHOBJCPPFLAGS $SHOBJFLAGS $SHOBJLDFLAGS)
           71  +
           72  +  DC_SYNC_SHLIBOBJS
           73  +])
           74  +
           75  +AC_DEFUN([DC_SYNC_SHLIBOBJS], [
           76  +  AC_SUBST(SHLIBOBJS)
           77  +  SHLIBOBJS=""
           78  +  for obj in $LIB@&t@OBJS; do
           79  +    SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
           80  +  done
           81  +])
           82  +
           83  +AC_DEFUN([DC_SYNC_RPATH], [
           84  +  OLD_LDFLAGS="$LDFLAGS"
           85  +
           86  +  for tryrpath in "-Wl,-rpath" "-Wl,--rpath" "-Wl,-R"; do
           87  +    LDFLAGS="$OLD_LDFLAGS $tryrpath -Wl,/tmp"
           88  +    AC_LINK_IFELSE(AC_LANG_PROGRAM([], [ return(0); ]), [
           89  +      rpathldflags="$tryrpath"
           90  +      break
           91  +    ])
           92  +  done
           93  +  unset tryrpath
           94  +
           95  +  LDFLAGS="$OLD_LDFLAGS"
           96  +  unset OLD_LDFLAGS
           97  +
           98  +  ADDLDFLAGS=""
           99  +  for opt in $LDFLAGS; do
          100  +    if echo "$opt" | grep '^-L' >/dev/null; then
          101  +      rpathdir=`echo "$opt" | sed 's@^-L *@@'`
          102  +      ADDLDFLAGS="$ADDLDFLAGS $rpathldflags -Wl,$rpathdir"
          103  +    fi
          104  +  done
          105  +  unset opt rpathldflags
          106  +
          107  +  LDFLAGS="$LDFLAGS $ADDLDFLAGS"
          108  +
          109  +  unset ADDLDFLAGS
          110  +])
          111  +
          112  +AC_DEFUN([DC_CHK_OS_INFO], [
          113  +	AC_CANONICAL_HOST
          114  +	AC_SUBST(SHOBJEXT)
          115  +	AC_SUBST(SHOBJFLAGS)
          116  +	AC_SUBST(SHOBJCPPFLAGS)
          117  +	AC_SUBST(SHOBJLDFLAGS)
          118  +	AC_SUBST(CFLAGS)
          119  +	AC_SUBST(CPPFLAGS)
          120  +	AC_SUBST(AREXT)
          121  +
          122  +	if test "$dc_cv_dc_chk_os_info_called" != '1'; then
          123  +		dc_cv_dc_chk_os_info_called='1'
          124  +
          125  +		AC_MSG_CHECKING(host operating system)
          126  +		AC_MSG_RESULT($host_os)
          127  +
          128  +		SHOBJEXT="so"
          129  +		AREXT="a"
          130  +
          131  +		case $host_os in
          132  +			darwin*)
          133  +				SHOBJEXT="dylib"
          134  +				;;
          135  +			hpux*)
          136  +				case "$host_cpu" in
          137  +					ia64)
          138  +						SHOBJEXT="so"
          139  +						;;
          140  +					*)
          141  +						SHOBJEXT="sl"
          142  +						;;
          143  +				esac
          144  +				;;
          145  +			aix[0-9].*)
          146  +				SHOBJEXT="a"
          147  +				;;
          148  +			mingw32|mingw32msvc*)
          149  +				SHOBJEXT="dll"
          150  +				CFLAGS="$CFLAGS -mms-bitfields"
          151  +				CPPFLAGS="$CPPFLAGS -mms-bitfields"
          152  +				SHOBJCPPFLAGS="-DPIC"
          153  +				SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
          154  +				;;
          155  +			msvc)
          156  +				SHOBJEXT="dll"
          157  +				CFLAGS="$CFLAGS -nologo"
          158  +				SHOBJCPPFLAGS='-DPIC'
          159  +				SHOBJLDFLAGS='/LD /LINK /NODEFAULTLIB:MSVCRT'
          160  +				;;
          161  +			cygwin*)
          162  +				SHOBJEXT="dll"
          163  +				SHOBJFLAGS="-fPIC"
          164  +				SHOBJCPPFLAGS="-DPIC"
          165  +				CFLAGS="$CFLAGS -mms-bitfields"
          166  +				CPPFLAGS="$CPPFLAGS -mms-bitfields"
          167  +				SHOBJLDFLAGS='-shared -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
          168  +				;;
          169  +		esac
          170  +	fi
          171  +])

Added aclocal/versionscript.m4 version [68146d5f5a].

            1  +AC_DEFUN([DC_SETUP_STABLE_API], [
            2  +	VERSIONSCRIPT="$1"
            3  +	SYMFILE="$2"
            4  +
            5  +	DC_FIND_STRIP_AND_REMOVESYMS([$SYMFILE])
            6  +	DC_SETVERSIONSCRIPT([$VERSIONSCRIPT], [$SYMFILE])
            7  +])
            8  +
            9  +
           10  +AC_DEFUN([DC_SETVERSIONSCRIPT], [
           11  +	VERSIONSCRIPT="$1"
           12  +	SYMFILE="$2"
           13  +	TMPSYMFILE="${SYMFILE}.tmp"
           14  +	TMPVERSIONSCRIPT="${VERSIONSCRIPT}.tmp"
           15  +
           16  +	echo "${SYMPREFIX}Test_Symbol" > "${TMPSYMFILE}"
           17  +
           18  +	echo '{' > "${TMPVERSIONSCRIPT}"
           19  +	echo '	local:' >> "${TMPVERSIONSCRIPT}"
           20  +	echo "		${SYMPREFIX}Test_Symbol;" >> "${TMPVERSIONSCRIPT}"
           21  +	echo '};' >> "${TMPVERSIONSCRIPT}"
           22  +
           23  +	SAVE_LDFLAGS="${LDFLAGS}"
           24  +
           25  +	AC_MSG_CHECKING([for how to set version script])
           26  +
           27  +	for tryaddldflags in "-Wl,--version-script,${TMPVERSIONSCRIPT}" "-Wl,-exported_symbols_list,${TMPSYMFILE}"; do
           28  +		LDFLAGS="${SAVE_LDFLAGS} ${tryaddldflags}"
           29  +		AC_TRY_LINK([void Test_Symbol(void) { return; }], [], [
           30  +			addldflags="`echo "${tryaddldflags}" | sed 's/\.tmp$//'`"
           31  +
           32  +			break
           33  +		])
           34  +	done
           35  +
           36  +	rm -f "${TMPSYMFILE}"
           37  +	rm -f "${TMPVERSIONSCRIPT}"
           38  +
           39  +	if test -n "${addldflags}"; then
           40  +		LDFLAGS="${SAVE_LDFLAGS} ${addldflags}"
           41  +		AC_MSG_RESULT($addldflags)
           42  +	else
           43  +		LDFLAGS="${SAVE_LDFLAGS}"
           44  +		AC_MSG_RESULT([don't know])
           45  +	fi
           46  +])
           47  +
           48  +AC_DEFUN([DC_FIND_STRIP_AND_REMOVESYMS], [
           49  +	SYMFILE="$1"
           50  +
           51  +	dnl Determine how to strip executables
           52  +	AC_CHECK_TOOLS(OBJCOPY, objcopy gobjcopy, [false])
           53  +	AC_CHECK_TOOLS(STRIP, strip gstrip, [false])
           54  +
           55  +	if test "x${STRIP}" = "xfalse"; then
           56  +		STRIP="${OBJCOPY}"
           57  +	fi
           58  +
           59  +	WEAKENSYMS='true'
           60  +	REMOVESYMS='true'
           61  +	SYMPREFIX=''
           62  +
           63  +	case $host_os in
           64  +		darwin*)
           65  +			SYMPREFIX="_"
           66  +			REMOVESYMS="${STRIP} -u -x"
           67  +			;;
           68  +		*)
           69  +			if test "x${OBJCOPY}" != "xfalse"; then
           70  +				WEAKENSYMS="${OBJCOPY} --keep-global-symbols=${SYMFILE}"
           71  +				REMOVESYMS="${OBJCOPY} --discard-all"
           72  +			elif test "x${STRIP}" != "xfalse"; then
           73  +				REMOVESYMS="${STRIP} -x"
           74  +			fi
           75  +			;;
           76  +	esac
           77  +
           78  +	AC_SUBST(WEAKENSYMS)
           79  +	AC_SUBST(REMOVESYMS)
           80  +	AC_SUBST(SYMPREFIX)
           81  +])

Modified build/prep.sh from [3f4d67e154] to [be7bb3d1c2].

     1      1   #! /bin/sh
     2      2   
     3         -autoconf; autoheader
     4         -rm -rf autom4te.cache *~
            3  +# Download latest copy of autoconf macros
            4  +(
            5  +	mkdir aclocal >/dev/null 2>/dev/null
            6  +	cd aclocal || exit 1
            7  +
            8  +	for file in optarg.m4 shobj.m4 versionscript.m4; do
            9  +		rm -f "${file}"
           10  +
           11  +		wget -O "${file}.new" "http://rkeene.org/devel/autoconf/${file}" || continue
           12  +
           13  +		mv "${file}.new" "${file}"
           14  +	done
           15  +)
           16  +
           17  +for file in config.guess config.sub install-sh; do
           18  +	rm -f "${file}"
           19  +done
           20  +
           21  +aclocal -I aclocal
           22  +autoconf
           23  +automake -fca
           24  +
           25  +rm -rf autom4te.cache
           26  +
           27  +# Add Linux/MUSL support if missing
           28  +if ! grep '[-]musl' config.sub >/dev/null 2>/dev/null; then
           29  +	sed 's@\(-*\)linux-gnu\* @\1linux-musl | &@g' config.sub > config.sub.new
           30  +	cat config.sub.new > config.sub
           31  +	rm -f config.sub.new
           32  +fi

Deleted 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:

Deleted 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:

Deleted install-sh version [9d4de14ab9].

     1         -#!/bin/sh
     2         -#
     3         -# install - install a program, script, or datafile
     4         -# This comes from X11R5 (mit/util/scripts/install.sh).
     5         -#
     6         -# Copyright 1991 by the Massachusetts Institute of Technology
     7         -#
     8         -# Permission to use, copy, modify, distribute, and sell this software and its
     9         -# documentation for any purpose is hereby granted without fee, provided that
    10         -# the above copyright notice appear in all copies and that both that
    11         -# copyright notice and this permission notice appear in supporting
    12         -# documentation, and that the name of M.I.T. not be used in advertising or
    13         -# publicity pertaining to distribution of the software without specific,
    14         -# written prior permission.  M.I.T. makes no representations about the
    15         -# suitability of this software for any purpose.  It is provided "as is"
    16         -# without express or implied warranty.
    17         -#
    18         -# Calling this script install-sh is preferred over install.sh, to prevent
    19         -# `make' implicit rules from creating a file called install from it
    20         -# when there is no Makefile.
    21         -#
    22         -# This script is compatible with the BSD install script, but was written
    23         -# from scratch.  It can only install one file at a time, a restriction
    24         -# shared with many OS's install programs.
    25         -
    26         -
    27         -# set DOITPROG to echo to test this script
    28         -
    29         -# Don't use :- since 4.3BSD and earlier shells don't like it.
    30         -doit="${DOITPROG-}"
    31         -
    32         -
    33         -# put in absolute paths if you don't have them in your path; or use env. vars.
    34         -
    35         -mvprog="${MVPROG-mv}"
    36         -cpprog="${CPPROG-cp}"
    37         -chmodprog="${CHMODPROG-chmod}"
    38         -chownprog="${CHOWNPROG-chown}"
    39         -chgrpprog="${CHGRPPROG-chgrp}"
    40         -stripprog="${STRIPPROG-strip}"
    41         -rmprog="${RMPROG-rm}"
    42         -mkdirprog="${MKDIRPROG-mkdir}"
    43         -
    44         -transformbasename=""
    45         -transform_arg=""
    46         -instcmd="$mvprog"
    47         -chmodcmd="$chmodprog 0755"
    48         -chowncmd=""
    49         -chgrpcmd=""
    50         -stripcmd=""
    51         -rmcmd="$rmprog -f"
    52         -mvcmd="$mvprog"
    53         -src=""
    54         -dst=""
    55         -dir_arg=""
    56         -
    57         -while [ x"$1" != x ]; do
    58         -    case $1 in
    59         -	-c) instcmd="$cpprog"
    60         -	    shift
    61         -	    continue;;
    62         -
    63         -	-d) dir_arg=true
    64         -	    shift
    65         -	    continue;;
    66         -
    67         -	-m) chmodcmd="$chmodprog $2"
    68         -	    shift
    69         -	    shift
    70         -	    continue;;
    71         -
    72         -	-o) chowncmd="$chownprog $2"
    73         -	    shift
    74         -	    shift
    75         -	    continue;;
    76         -
    77         -	-g) chgrpcmd="$chgrpprog $2"
    78         -	    shift
    79         -	    shift
    80         -	    continue;;
    81         -
    82         -	-s) stripcmd="$stripprog"
    83         -	    shift
    84         -	    continue;;
    85         -
    86         -	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
    87         -	    shift
    88         -	    continue;;
    89         -
    90         -	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
    91         -	    shift
    92         -	    continue;;
    93         -
    94         -	*)  if [ x"$src" = x ]
    95         -	    then
    96         -		src=$1
    97         -	    else
    98         -		# this colon is to work around a 386BSD /bin/sh bug
    99         -		:
   100         -		dst=$1
   101         -	    fi
   102         -	    shift
   103         -	    continue;;
   104         -    esac
   105         -done
   106         -
   107         -if [ x"$src" = x ]
   108         -then
   109         -	echo "install:	no input file specified"
   110         -	exit 1
   111         -else
   112         -	true
   113         -fi
   114         -
   115         -if [ x"$dir_arg" != x ]; then
   116         -	dst=$src
   117         -	src=""
   118         -	
   119         -	if [ -d $dst ]; then
   120         -		instcmd=:
   121         -		chmodcmd=""
   122         -	else
   123         -		instcmd=mkdir
   124         -	fi
   125         -else
   126         -
   127         -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
   128         -# might cause directories to be created, which would be especially bad 
   129         -# if $src (and thus $dsttmp) contains '*'.
   130         -
   131         -	if [ -f $src -o -d $src ]
   132         -	then
   133         -		true
   134         -	else
   135         -		echo "install:  $src does not exist"
   136         -		exit 1
   137         -	fi
   138         -	
   139         -	if [ x"$dst" = x ]
   140         -	then
   141         -		echo "install:	no destination specified"
   142         -		exit 1
   143         -	else
   144         -		true
   145         -	fi
   146         -
   147         -# If destination is a directory, append the input filename; if your system
   148         -# does not like double slashes in filenames, you may need to add some logic
   149         -
   150         -	if [ -d $dst ]
   151         -	then
   152         -		dst="$dst"/`basename $src`
   153         -	else
   154         -		true
   155         -	fi
   156         -fi
   157         -
   158         -## this sed command emulates the dirname command
   159         -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
   160         -
   161         -# Make sure that the destination directory exists.
   162         -#  this part is taken from Noah Friedman's mkinstalldirs script
   163         -
   164         -# Skip lots of stat calls in the usual case.
   165         -if [ ! -d "$dstdir" ]; then
   166         -defaultIFS='	
   167         -'
   168         -IFS="${IFS-${defaultIFS}}"
   169         -
   170         -oIFS="${IFS}"
   171         -# Some sh's can't handle IFS=/ for some reason.
   172         -IFS='%'
   173         -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
   174         -IFS="${oIFS}"
   175         -
   176         -pathcomp=''
   177         -
   178         -while [ $# -ne 0 ] ; do
   179         -	pathcomp="${pathcomp}${1}"
   180         -	shift
   181         -
   182         -	if [ ! -d "${pathcomp}" ] ;
   183         -        then
   184         -		$mkdirprog "${pathcomp}"
   185         -	else
   186         -		true
   187         -	fi
   188         -
   189         -	pathcomp="${pathcomp}/"
   190         -done
   191         -fi
   192         -
   193         -if [ x"$dir_arg" != x ]
   194         -then
   195         -	$doit $instcmd $dst &&
   196         -
   197         -	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
   198         -	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
   199         -	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
   200         -	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
   201         -else
   202         -
   203         -# If we're going to rename the final executable, determine the name now.
   204         -
   205         -	if [ x"$transformarg" = x ] 
   206         -	then
   207         -		dstfile=`basename $dst`
   208         -	else
   209         -		dstfile=`basename $dst $transformbasename | 
   210         -			sed $transformarg`$transformbasename
   211         -	fi
   212         -
   213         -# don't allow the sed command to completely eliminate the filename
   214         -
   215         -	if [ x"$dstfile" = x ] 
   216         -	then
   217         -		dstfile=`basename $dst`
   218         -	else
   219         -		true
   220         -	fi
   221         -
   222         -# Make a temp file name in the proper directory.
   223         -
   224         -	dsttmp=$dstdir/#inst.$$#
   225         -
   226         -# Move or copy the file name to the temp name
   227         -
   228         -	$doit $instcmd $src $dsttmp &&
   229         -
   230         -	trap "rm -f ${dsttmp}" 0 &&
   231         -
   232         -# and set any options; do chmod last to preserve setuid bits
   233         -
   234         -# If any of these fail, we abort the whole thing.  If we want to
   235         -# ignore errors from any of these, just make sure not to ignore
   236         -# errors from the above "$doit $instcmd $src $dsttmp" command.
   237         -
   238         -	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
   239         -	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
   240         -	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
   241         -	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
   242         -
   243         -# Now rename the file to the real destination.
   244         -
   245         -	$doit $rmcmd -f $dstdir/$dstfile &&
   246         -	$doit $mvcmd $dsttmp $dstdir/$dstfile 
   247         -
   248         -fi &&
   249         -
   250         -
   251         -exit 0