Removed automake dependency, to allow Universal binaries on Mac OS X
authorSam Lantinga <slouken@libsdl.org>
Sun, 30 Apr 2006 20:27:33 +0000
changeset 29458eb208474e0
parent 293 1082d4e97241
child 295 fbbfdea441f5
Removed automake dependency, to allow Universal binaries on Mac OS X
CHANGES
Makefile-EXE.wat
Makefile.am
Makefile.wat
SDLMIXER.lnk
Watcom-EXE.mif
Watcom-OS2.zip
Watcom.mif
autogen.sh
build-scripts/config.guess
build-scripts/config.sub
build-scripts/install-sh
build-scripts/ltmain.sh
build-scripts/makedep.sh
build-scripts/mkinstalldirs
config.guess
config.sub
configure.in
ltmain.sh
mikmod/Makefile.am
music_cmd.c
music_cmd.h
native_midi/Makefile.am
native_midi/native_midi_common.c
native_midi/native_midi_mac.c
native_midi/native_midi_win32.c
native_midi_gpl/Makefile.am
playmus.lnk
playwave.lnk
timidity/Makefile.am
timidity/config.h
timidity/instrum.c
timidity/output.h
     1.1 --- a/CHANGES	Sun Apr 30 08:56:00 2006 +0000
     1.2 +++ b/CHANGES	Sun Apr 30 20:27:33 2006 +0000
     1.3 @@ -1,4 +1,7 @@
     1.4  1.2.7:
     1.5 +Sam Lantinga - Sun Apr 30 09:01:44 PDT 2006
     1.6 + * Removed automake dependency, to allow Universal binaries on Mac OS X
     1.7 + * Added gcc-fat.sh for generating Universal binaries on Mac OS X
     1.8  Sam Lantinga - Sun Apr 30 01:48:40 PDT 2006
     1.9   * Updated libtool support to version 1.5.22
    1.10  Patrice Mandin - Sat Jul 16 16:43:24 UTC 2005
     2.1 --- a/Makefile-EXE.wat	Sun Apr 30 08:56:00 2006 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,33 +0,0 @@
     2.4 -#=============================================================================
     2.5 -#          This is a Watcom makefile to build SDLMIXER.DLL for OS/2
     2.6 -#
     2.7 -#
     2.8 -#=============================================================================
     2.9 -
    2.10 -object_files= playwave.obj playmus.obj
    2.11 -
    2.12 -# Extra stuffs to pass to C compiler:
    2.13 -ExtraCFlags=
    2.14 -
    2.15 -#
    2.16 -#==============================================================================
    2.17 -#
    2.18 -!include Watcom-EXE.mif
    2.19 -
    2.20 -.before
    2.21 -    @set include=$(%os2tk)\h;$(%include);$(%sdlhome)\include;.\;
    2.22 -
    2.23 -all : playwave.exe playmus.exe
    2.24 -
    2.25 -playwave.exe: $(object_files)
    2.26 -    wlink @playwave.lnk
    2.27 -
    2.28 -playmus.exe: $(object_files)
    2.29 -    wlink @playmus.lnk
    2.30 -
    2.31 -clean : .SYMBOLIC
    2.32 -    @if exist *.exe del *.exe
    2.33 -    @if exist *.obj del *.obj
    2.34 -    @if exist *.map del *.map
    2.35 -    @if exist *.res del *.res
    2.36 -    @if exist *.lst del *.lst
     3.1 --- a/Makefile.am	Sun Apr 30 08:56:00 2006 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,80 +0,0 @@
     3.4 -# Makefile.am for the SDL sample mixer library and players
     3.5 -
     3.6 -lib_LTLIBRARIES = libSDL_mixer.la
     3.7 -
     3.8 -SUBDIRS = @MUSIC_SUBDIRS@
     3.9 -DIST_SUBDIRS = mikmod timidity native_midi native_midi_gpl
    3.10 -
    3.11 -libSDL_mixerincludedir = $(includedir)/SDL
    3.12 -libSDL_mixerinclude_HEADERS =	\
    3.13 -	SDL_mixer.h
    3.14 -
    3.15 -libSDL_mixer_la_SOURCES =	\
    3.16 -	load_aiff.c		\
    3.17 -	load_aiff.h		\
    3.18 -	load_voc.c		\
    3.19 -	load_voc.h		\
    3.20 -	load_ogg.c		\
    3.21 -	load_ogg.h		\
    3.22 -	mixer.c			\
    3.23 -	music.c			\
    3.24 -	music_cmd.c		\
    3.25 -	music_cmd.h		\
    3.26 -	music_ogg.c		\
    3.27 -	music_ogg.h		\
    3.28 -	wavestream.c		\
    3.29 -	wavestream.h		\
    3.30 -	effect_position.c	\
    3.31 -	effect_stereoreverse.c	\
    3.32 -	effects_internal.c	\
    3.33 -	effects_internal.h
    3.34 -
    3.35 -if USE_MIKMOD
    3.36 -MIKMOD_LIB = mikmod/libmikmod.la
    3.37 -else
    3.38 -MIKMOD_LIB =
    3.39 -endif
    3.40 -if USE_TIMIDITY
    3.41 -TIMIDITY_LIB = timidity/libtimidity.la
    3.42 -else
    3.43 -TIMIDITY_LIB =
    3.44 -endif
    3.45 -if USE_NATIVE_MIDI
    3.46 -if USE_NATIVE_MIDI_GPL
    3.47 -NATIVE_MIDI_LIB = native_midi_gpl/libnativemidi_gpl.la
    3.48 -else
    3.49 -NATIVE_MIDI_LIB = native_midi/libnativemidi.la
    3.50 -endif
    3.51 -else
    3.52 -NATIVE_MIDI_LIB =
    3.53 -endif
    3.54 -
    3.55 -EXTRA_DIST =			\
    3.56 -	CHANGES			\
    3.57 -	VisualC.zip		\
    3.58 -	Xcode.tar.gz		\
    3.59 -	MPWmake.sea.bin		\
    3.60 -	CWProjects.sea.bin	\
    3.61 -	SDL_mixer.spec		\
    3.62 -	SDL_mixer.spec.in	\
    3.63 -	autogen.sh
    3.64 -
    3.65 -libSDL_mixer_la_LDFLAGS = 	\
    3.66 -	-no-undefined		\
    3.67 -	-release $(LT_RELEASE)	\
    3.68 -	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
    3.69 -	-export-symbols-regex Mix_.*
    3.70 -libSDL_mixer_la_LIBADD = $(MIKMOD_LIB) $(TIMIDITY_LIB) $(NATIVE_MIDI_LIB) @SYSTEM_LIBS@ @SDL_LIBS@
    3.71 -
    3.72 -noinst_PROGRAMS = playwave playmus
    3.73 -
    3.74 -playwave_LDADD = libSDL_mixer.la @SDL_LIBS@
    3.75 -playmus_LDADD = libSDL_mixer.la @SDL_LIBS@
    3.76 -
    3.77 -# Rule to build tar-gzipped distribution package
    3.78 -$(PACKAGE)-$(VERSION).tar.gz: distcheck
    3.79 -
    3.80 -# Rule to build RPM distribution package
    3.81 -rpm: $(PACKAGE)-$(VERSION).tar.gz
    3.82 -	rpm -ta $(PACKAGE)-$(VERSION).tar.gz
    3.83 -
     4.1 --- a/Makefile.wat	Sun Apr 30 08:56:00 2006 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,75 +0,0 @@
     4.4 -#=============================================================================
     4.5 -#          This is a Watcom makefile to build SDLMIXER.DLL for OS/2
     4.6 -#
     4.7 -#
     4.8 -#=============================================================================
     4.9 -
    4.10 -dllname=SDLMIXER
    4.11 -
    4.12 -mainobjs = effects_internal.obj effect_position.obj effect_stereoreverse.obj load_aiff.obj load_ogg.obj load_voc.obj mixer.obj music.obj music_cmd.obj music_ogg.obj wavestream.obj
    4.13 -mikmodobjs = mikmod\drv_nos.obj mikmod\drv_sdl.obj mikmod\load_it.obj mikmod\load_mod.obj mikmod\load_s3m.obj mikmod\load_xm.obj mikmod\mdreg.obj mikmod\mdriver.obj mikmod\mloader.obj mikmod\mlreg.obj mikmod\mlutil.obj mikmod\mmalloc.obj mikmod\mmerror.obj mikmod\mmio.obj mikmod\mplayer.obj mikmod\munitrk.obj mikmod\mwav.obj mikmod\npertab.obj mikmod\sloader.obj mikmod\virtch.obj mikmod\virtch2.obj mikmod\virtch_common.obj
    4.14 -timidityobjs = timidity\common.obj timidity\controls.obj timidity\filter.obj timidity\instrum.obj timidity\mix.obj timidity\output.obj timidity\playmidi.obj timidity\readmidi.obj timidity\resample.obj timidity\sdl_a.obj timidity\sdl_c.obj timidity\tables.obj timidity\timidity.obj
    4.15 -oggidecobjs = oggidec\bitwise.obj oggidec\block.obj oggidec\codebook.obj oggidec\floor0.obj oggidec\floor1.obj oggidec\framing.obj oggidec\info.obj oggidec\mapping0.obj oggidec\mdct.obj oggidec\registry.obj oggidec\res012.obj oggidec\sharedbook.obj oggidec\synthesis.obj oggidec\vorbisfile.obj oggidec\window.obj
    4.16 -oggobjs = libogg-1.0\src\bitwise.obj libogg-1.0\src\framing.obj
    4.17 -vorbisobjs = libvorbis-1.0\lib\analysis.obj &
    4.18 -             libvorbis-1.0\lib\bitrate.obj &
    4.19 -             libvorbis-1.0\lib\block.obj &
    4.20 -             libvorbis-1.0\lib\codebook.obj &
    4.21 -             libvorbis-1.0\lib\envelope.obj &
    4.22 -             libvorbis-1.0\lib\floor0.obj &
    4.23 -             libvorbis-1.0\lib\floor1.obj &
    4.24 -             libvorbis-1.0\lib\info.obj &
    4.25 -             libvorbis-1.0\lib\lookup.obj &
    4.26 -             libvorbis-1.0\lib\lpc.obj &
    4.27 -             libvorbis-1.0\lib\lsp.obj &
    4.28 -             libvorbis-1.0\lib\mapping0.obj &
    4.29 -             libvorbis-1.0\lib\mdct.obj &
    4.30 -             libvorbis-1.0\lib\psy.obj &
    4.31 -             libvorbis-1.0\lib\registry.obj &
    4.32 -             libvorbis-1.0\lib\res0.obj &
    4.33 -             libvorbis-1.0\lib\sharedbook.obj &
    4.34 -             libvorbis-1.0\lib\smallft.obj &
    4.35 -             libvorbis-1.0\lib\synthesis.obj &
    4.36 -             libvorbis-1.0\lib\vorbisenc.obj &
    4.37 -             libvorbis-1.0\lib\vorbisfile.obj &
    4.38 -             libvorbis-1.0\lib\window.obj
    4.39 -
    4.40 -
    4.41 -object_files= $(mainobjs) $(mikmodobjs) $(timidityobjs) $(oggidecobjs)
    4.42 -
    4.43 -# Extra stuffs to pass to C compiler:
    4.44 -ExtraCFlags=
    4.45 -
    4.46 -#
    4.47 -#==============================================================================
    4.48 -#
    4.49 -!include Watcom.mif
    4.50 -
    4.51 -.before
    4.52 -    @set include=$(%os2tk)\h;$(%include);$(%sdlhome)\include;.\timidity;.\mikmod;.\oggidec;
    4.53 -    @cd mikmod
    4.54 -    @wmake -h -f Makefile.wat
    4.55 -    @cd ..\timidity
    4.56 -    @wmake -h -f Makefile.wat
    4.57 -    @cd ..
    4.58 -
    4.59 -all : $(dllname).dll $(dllname).lib
    4.60 -
    4.61 -$(dllname).dll : $(object_files)
    4.62 -    wlink @$(dllname)
    4.63 -
    4.64 -$(dllname).lib : $(dllname).dll
    4.65 -    implib $(dllname).lib $(dllname).dll
    4.66 -
    4.67 -clean : .SYMBOLIC
    4.68 -    @if exist *.dll del *.dll
    4.69 -    @if exist *.lib del *.lib
    4.70 -    @if exist *.obj del *.obj
    4.71 -    @if exist *.map del *.map
    4.72 -    @if exist *.res del *.res
    4.73 -    @if exist *.lst del *.lst
    4.74 -    @cd mikmod
    4.75 -    @wmake -h -f Makefile.wat clean
    4.76 -    @cd ..\timidity
    4.77 -    @wmake -h -f Makefile.wat clean
    4.78 -    @cd ..
     5.1 --- a/SDLMIXER.lnk	Sun Apr 30 08:56:00 2006 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,91 +0,0 @@
     5.4 -#=============================================================================
     5.5 -#           This is a linker file to build SDLMIXER.DLL for OS/2
     5.6 -#
     5.7 -#
     5.8 -#=============================================================================
     5.9 -
    5.10 -system 386 LX DLL INITINSTANCE TERMINSTANCE
    5.11 -name SDLMIXER
    5.12 -
    5.13 -# Object files from \.
    5.14 -
    5.15 -file effects_internal
    5.16 -file effect_position
    5.17 -file effect_stereoreverse
    5.18 -file load_aiff
    5.19 -file load_ogg
    5.20 -file load_voc
    5.21 -file mixer
    5.22 -file music
    5.23 -file music_cmd
    5.24 -file music_ogg
    5.25 -file wavestream
    5.26 -
    5.27 -# Object files from \mikmod
    5.28 -
    5.29 -file mikmod\drv_nos 
    5.30 -file mikmod\drv_sdl
    5.31 -file mikmod\load_it
    5.32 -file mikmod\load_mod
    5.33 -file mikmod\load_s3m
    5.34 -file mikmod\load_xm
    5.35 -file mikmod\mdreg
    5.36 -file mikmod\mdriver
    5.37 -file mikmod\mloader
    5.38 -file mikmod\mlreg
    5.39 -file mikmod\mlutil
    5.40 -file mikmod\mmalloc
    5.41 -file mikmod\mmerror
    5.42 -file mikmod\mmio
    5.43 -file mikmod\mplayer
    5.44 -file mikmod\munitrk
    5.45 -file mikmod\mwav
    5.46 -file mikmod\npertab
    5.47 -file mikmod\sloader
    5.48 -file mikmod\virtch
    5.49 -file mikmod\virtch2
    5.50 -file mikmod\virtch_common
    5.51 -
    5.52 -# Object files from \timidity
    5.53 -
    5.54 -file timidity\common
    5.55 -file timidity\controls
    5.56 -file timidity\filter
    5.57 -file timidity\instrum
    5.58 -file timidity\mix
    5.59 -file timidity\output
    5.60 -file timidity\playmidi
    5.61 -file timidity\readmidi
    5.62 -file timidity\resample
    5.63 -file timidity\sdl_a
    5.64 -file timidity\sdl_c
    5.65 -file timidity\tables
    5.66 -file timidity\timidity
    5.67 -
    5.68 -# Object files from \oggidec
    5.69 -
    5.70 -file oggidec\bitwise.obj
    5.71 -file oggidec\block.obj
    5.72 -file oggidec\codebook.obj
    5.73 -file oggidec\floor0.obj
    5.74 -file oggidec\floor1.obj
    5.75 -file oggidec\framing.obj
    5.76 -file oggidec\info.obj
    5.77 -file oggidec\mapping0.obj
    5.78 -file oggidec\mdct.obj
    5.79 -file oggidec\registry.obj
    5.80 -file oggidec\res012.obj
    5.81 -file oggidec\sharedbook.obj
    5.82 -file oggidec\synthesis.obj
    5.83 -file oggidec\vorbisfile.obj
    5.84 -file oggidec\window.obj
    5.85 -
    5.86 -OPTION MAP=SDLMIXER
    5.87 -OPTION DESCRIPTION 'Simple DirectMedia Layer Mixer v1.2.5'
    5.88 -OPTION ELIMINATE
    5.89 -OPTION MANYAUTODATA
    5.90 -OPTION OSNAME='OS/2 and eComStation'
    5.91 -OPTION SHOWDEAD
    5.92 -LIBPATH %os2tk%\lib
    5.93 -LIBPATH %sdlhome%\src
    5.94 -lib sdl
     6.1 --- a/Watcom-EXE.mif	Sun Apr 30 08:56:00 2006 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,30 +0,0 @@
     6.4 -#=============================================================================
     6.5 -#             This file contains the common includes for the
     6.6 -#           Watcom makefiles to build EXE applications for OS/2
     6.7 -#
     6.8 -#
     6.9 -#=============================================================================
    6.10 -
    6.11 -# Create debug build or not?
    6.12 -debug_build=defined
    6.13 -
    6.14 -#
    6.15 -#==============================================================================
    6.16 -#
    6.17 -
    6.18 -!ifdef debug_build
    6.19 -debugflags = -d2 -dDEBUG_BUILD
    6.20 -!else
    6.21 -debugflags =
    6.22 -!endif
    6.23 -
    6.24 -cflags = -zq $(debugflags) -bm -bt=OS2 -5s -fpi -sg -otexan -wx -ei $(ExtraCFlags)
    6.25 -
    6.26 -.extensions:
    6.27 -.extensions: .lib .dll .obj .c .cpp .exe
    6.28 -
    6.29 -.c.obj : .AUTODEPEND
    6.30 -    wcc386 $[* $(cflags)
    6.31 -
    6.32 -.cpp.obj : .AUTODEPEND
    6.33 -    wpp386 $[* $(cflags)
     7.1 Binary file Watcom-OS2.zip has changed
     8.1 --- a/Watcom.mif	Sun Apr 30 08:56:00 2006 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,34 +0,0 @@
     8.4 -#=============================================================================
     8.5 -#             This file contains the common includes for the
     8.6 -#             Watcom makefiles to build SDLMIXER.DLL for OS/2
     8.7 -#
     8.8 -#
     8.9 -#=============================================================================
    8.10 -
    8.11 -# Create debug build or not?
    8.12 -#debug_build=defined
    8.13 -
    8.14 -SDLMixerFlags=-DBUILD_SDL -DWAV_MUSIC -DMOD_MUSIC -DMID_MUSIC -DUSE_TIMIDITY_MIDI -DOGG_MUSIC
    8.15 -# ToDO:
    8.16 -# -DOGG_MUSIC -DMP3_MUSIC
    8.17 -
    8.18 -#
    8.19 -#==============================================================================
    8.20 -#
    8.21 -
    8.22 -!ifdef debug_build
    8.23 -debugflags = -d2 -dDEBUG_BUILD
    8.24 -!else
    8.25 -debugflags =
    8.26 -!endif
    8.27 -
    8.28 -cflags = -zq $(debugflags) -bd -bm -bt=OS2 -5s -fpi -sg -otexan -wx -ei $(SDLMixerFlags) $(ExtraCFlags)
    8.29 -
    8.30 -.extensions:
    8.31 -.extensions: .lib .dll .obj .c .cpp
    8.32 -
    8.33 -.c.obj : .AUTODEPEND
    8.34 -    wcc386 $[* $(cflags)
    8.35 -
    8.36 -.cpp.obj : .AUTODEPEND
    8.37 -    wpp386 $[* $(cflags)
     9.1 --- a/autogen.sh	Sun Apr 30 08:56:00 2006 +0000
     9.2 +++ b/autogen.sh	Sun Apr 30 20:27:33 2006 +0000
     9.3 @@ -1,8 +1,18 @@
     9.4  #!/bin/sh
     9.5  #
     9.6 -aclocal
     9.7 -automake --foreign --include-deps --add-missing --copy
     9.8 -autoconf
     9.9 +echo "Generating build information using autoconf"
    9.10 +echo "This may take a while ..."
    9.11  
    9.12 -#./configure $*
    9.13 +# Regenerate configuration files
    9.14 +cp acinclude.m4 aclocal.m4
    9.15 +found=false
    9.16 +for autoconf in autoconf autoconf259
    9.17 +do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
    9.18 +done
    9.19 +if test x$found = xfalse; then
    9.20 +    echo "Couldn't find autoconf, aborting"
    9.21 +    exit 1
    9.22 +fi
    9.23 +
    9.24 +# Run configure for this platform
    9.25  echo "Now you are ready to run ./configure"
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/build-scripts/config.guess	Sun Apr 30 20:27:33 2006 +0000
    10.3 @@ -0,0 +1,1479 @@
    10.4 +#! /bin/sh
    10.5 +# Attempt to guess a canonical system name.
    10.6 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    10.7 +#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    10.8 +
    10.9 +timestamp='2006-01-02'
   10.10 +
   10.11 +# This file is free software; you can redistribute it and/or modify it
   10.12 +# under the terms of the GNU General Public License as published by
   10.13 +# the Free Software Foundation; either version 2 of the License, or
   10.14 +# (at your option) any later version.
   10.15 +#
   10.16 +# This program is distributed in the hope that it will be useful, but
   10.17 +# WITHOUT ANY WARRANTY; without even the implied warranty of
   10.18 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   10.19 +# General Public License for more details.
   10.20 +#
   10.21 +# You should have received a copy of the GNU General Public License
   10.22 +# along with this program; if not, write to the Free Software
   10.23 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
   10.24 +# 02110-1301, USA.
   10.25 +#
   10.26 +# As a special exception to the GNU General Public License, if you
   10.27 +# distribute this file as part of a program that contains a
   10.28 +# configuration script generated by Autoconf, you may include it under
   10.29 +# the same distribution terms that you use for the rest of that program.
   10.30 +
   10.31 +
   10.32 +# Originally written by Per Bothner <per@bothner.com>.
   10.33 +# Please send patches to <config-patches@gnu.org>.  Submit a context
   10.34 +# diff and a properly formatted ChangeLog entry.
   10.35 +#
   10.36 +# This script attempts to guess a canonical system name similar to
   10.37 +# config.sub.  If it succeeds, it prints the system name on stdout, and
   10.38 +# exits with 0.  Otherwise, it exits with 1.
   10.39 +#
   10.40 +# The plan is that this can be called by configure scripts if you
   10.41 +# don't specify an explicit build system type.
   10.42 +
   10.43 +me=`echo "$0" | sed -e 's,.*/,,'`
   10.44 +
   10.45 +usage="\
   10.46 +Usage: $0 [OPTION]
   10.47 +
   10.48 +Output the configuration name of the system \`$me' is run on.
   10.49 +
   10.50 +Operation modes:
   10.51 +  -h, --help         print this help, then exit
   10.52 +  -t, --time-stamp   print date of last modification, then exit
   10.53 +  -v, --version      print version number, then exit
   10.54 +
   10.55 +Report bugs and patches to <config-patches@gnu.org>."
   10.56 +
   10.57 +version="\
   10.58 +GNU config.guess ($timestamp)
   10.59 +
   10.60 +Originally written by Per Bothner.
   10.61 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
   10.62 +Free Software Foundation, Inc.
   10.63 +
   10.64 +This is free software; see the source for copying conditions.  There is NO
   10.65 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
   10.66 +
   10.67 +help="
   10.68 +Try \`$me --help' for more information."
   10.69 +
   10.70 +# Parse command line
   10.71 +while test $# -gt 0 ; do
   10.72 +  case $1 in
   10.73 +    --time-stamp | --time* | -t )
   10.74 +       echo "$timestamp" ; exit ;;
   10.75 +    --version | -v )
   10.76 +       echo "$version" ; exit ;;
   10.77 +    --help | --h* | -h )
   10.78 +       echo "$usage"; exit ;;
   10.79 +    -- )     # Stop option processing
   10.80 +       shift; break ;;
   10.81 +    - )	# Use stdin as input.
   10.82 +       break ;;
   10.83 +    -* )
   10.84 +       echo "$me: invalid option $1$help" >&2
   10.85 +       exit 1 ;;
   10.86 +    * )
   10.87 +       break ;;
   10.88 +  esac
   10.89 +done
   10.90 +
   10.91 +if test $# != 0; then
   10.92 +  echo "$me: too many arguments$help" >&2
   10.93 +  exit 1
   10.94 +fi
   10.95 +
   10.96 +trap 'exit 1' 1 2 15
   10.97 +
   10.98 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
   10.99 +# compiler to aid in system detection is discouraged as it requires
  10.100 +# temporary files to be created and, as you can see below, it is a
  10.101 +# headache to deal with in a portable fashion.
  10.102 +
  10.103 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
  10.104 +# use `HOST_CC' if defined, but it is deprecated.
  10.105 +
  10.106 +# Portable tmp directory creation inspired by the Autoconf team.
  10.107 +
  10.108 +set_cc_for_build='
  10.109 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
  10.110 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
  10.111 +: ${TMPDIR=/tmp} ;
  10.112 + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  10.113 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  10.114 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  10.115 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
  10.116 +dummy=$tmp/dummy ;
  10.117 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
  10.118 +case $CC_FOR_BUILD,$HOST_CC,$CC in
  10.119 + ,,)    echo "int x;" > $dummy.c ;
  10.120 +	for c in cc gcc c89 c99 ; do
  10.121 +	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
  10.122 +	     CC_FOR_BUILD="$c"; break ;
  10.123 +	  fi ;
  10.124 +	done ;
  10.125 +	if test x"$CC_FOR_BUILD" = x ; then
  10.126 +	  CC_FOR_BUILD=no_compiler_found ;
  10.127 +	fi
  10.128 +	;;
  10.129 + ,,*)   CC_FOR_BUILD=$CC ;;
  10.130 + ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
  10.131 +esac ; set_cc_for_build= ;'
  10.132 +
  10.133 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  10.134 +# (ghazi@noc.rutgers.edu 1994-08-24)
  10.135 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
  10.136 +	PATH=$PATH:/.attbin ; export PATH
  10.137 +fi
  10.138 +
  10.139 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  10.140 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  10.141 +UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
  10.142 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  10.143 +
  10.144 +# Note: order is significant - the case branches are not exclusive.
  10.145 +
  10.146 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  10.147 +    *:NetBSD:*:*)
  10.148 +	# NetBSD (nbsd) targets should (where applicable) match one or
  10.149 +	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  10.150 +	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
  10.151 +	# switched to ELF, *-*-netbsd* would select the old
  10.152 +	# object file format.  This provides both forward
  10.153 +	# compatibility and a consistent mechanism for selecting the
  10.154 +	# object file format.
  10.155 +	#
  10.156 +	# Note: NetBSD doesn't particularly care about the vendor
  10.157 +	# portion of the name.  We always set it to "unknown".
  10.158 +	sysctl="sysctl -n hw.machine_arch"
  10.159 +	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
  10.160 +	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
  10.161 +	case "${UNAME_MACHINE_ARCH}" in
  10.162 +	    armeb) machine=armeb-unknown ;;
  10.163 +	    arm*) machine=arm-unknown ;;
  10.164 +	    sh3el) machine=shl-unknown ;;
  10.165 +	    sh3eb) machine=sh-unknown ;;
  10.166 +	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
  10.167 +	esac
  10.168 +	# The Operating System including object format, if it has switched
  10.169 +	# to ELF recently, or will in the future.
  10.170 +	case "${UNAME_MACHINE_ARCH}" in
  10.171 +	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  10.172 +		eval $set_cc_for_build
  10.173 +		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  10.174 +			| grep __ELF__ >/dev/null
  10.175 +		then
  10.176 +		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  10.177 +		    # Return netbsd for either.  FIX?
  10.178 +		    os=netbsd
  10.179 +		else
  10.180 +		    os=netbsdelf
  10.181 +		fi
  10.182 +		;;
  10.183 +	    *)
  10.184 +	        os=netbsd
  10.185 +		;;
  10.186 +	esac
  10.187 +	# The OS release
  10.188 +	# Debian GNU/NetBSD machines have a different userland, and
  10.189 +	# thus, need a distinct triplet. However, they do not need
  10.190 +	# kernel version information, so it can be replaced with a
  10.191 +	# suitable tag, in the style of linux-gnu.
  10.192 +	case "${UNAME_VERSION}" in
  10.193 +	    Debian*)
  10.194 +		release='-gnu'
  10.195 +		;;
  10.196 +	    *)
  10.197 +		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  10.198 +		;;
  10.199 +	esac
  10.200 +	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
  10.201 +	# contains redundant information, the shorter form:
  10.202 +	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  10.203 +	echo "${machine}-${os}${release}"
  10.204 +	exit ;;
  10.205 +    *:OpenBSD:*:*)
  10.206 +	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  10.207 +	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  10.208 +	exit ;;
  10.209 +    *:ekkoBSD:*:*)
  10.210 +	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
  10.211 +	exit ;;
  10.212 +    *:SolidBSD:*:*)
  10.213 +	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
  10.214 +	exit ;;
  10.215 +    macppc:MirBSD:*:*)
  10.216 +	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
  10.217 +	exit ;;
  10.218 +    *:MirBSD:*:*)
  10.219 +	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
  10.220 +	exit ;;
  10.221 +    alpha:OSF1:*:*)
  10.222 +	case $UNAME_RELEASE in
  10.223 +	*4.0)
  10.224 +		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  10.225 +		;;
  10.226 +	*5.*)
  10.227 +	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  10.228 +		;;
  10.229 +	esac
  10.230 +	# According to Compaq, /usr/sbin/psrinfo has been available on
  10.231 +	# OSF/1 and Tru64 systems produced since 1995.  I hope that
  10.232 +	# covers most systems running today.  This code pipes the CPU
  10.233 +	# types through head -n 1, so we only detect the type of CPU 0.
  10.234 +	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
  10.235 +	case "$ALPHA_CPU_TYPE" in
  10.236 +	    "EV4 (21064)")
  10.237 +		UNAME_MACHINE="alpha" ;;
  10.238 +	    "EV4.5 (21064)")
  10.239 +		UNAME_MACHINE="alpha" ;;
  10.240 +	    "LCA4 (21066/21068)")
  10.241 +		UNAME_MACHINE="alpha" ;;
  10.242 +	    "EV5 (21164)")
  10.243 +		UNAME_MACHINE="alphaev5" ;;
  10.244 +	    "EV5.6 (21164A)")
  10.245 +		UNAME_MACHINE="alphaev56" ;;
  10.246 +	    "EV5.6 (21164PC)")
  10.247 +		UNAME_MACHINE="alphapca56" ;;
  10.248 +	    "EV5.7 (21164PC)")
  10.249 +		UNAME_MACHINE="alphapca57" ;;
  10.250 +	    "EV6 (21264)")
  10.251 +		UNAME_MACHINE="alphaev6" ;;
  10.252 +	    "EV6.7 (21264A)")
  10.253 +		UNAME_MACHINE="alphaev67" ;;
  10.254 +	    "EV6.8CB (21264C)")
  10.255 +		UNAME_MACHINE="alphaev68" ;;
  10.256 +	    "EV6.8AL (21264B)")
  10.257 +		UNAME_MACHINE="alphaev68" ;;
  10.258 +	    "EV6.8CX (21264D)")
  10.259 +		UNAME_MACHINE="alphaev68" ;;
  10.260 +	    "EV6.9A (21264/EV69A)")
  10.261 +		UNAME_MACHINE="alphaev69" ;;
  10.262 +	    "EV7 (21364)")
  10.263 +		UNAME_MACHINE="alphaev7" ;;
  10.264 +	    "EV7.9 (21364A)")
  10.265 +		UNAME_MACHINE="alphaev79" ;;
  10.266 +	esac
  10.267 +	# A Pn.n version is a patched version.
  10.268 +	# A Vn.n version is a released version.
  10.269 +	# A Tn.n version is a released field test version.
  10.270 +	# A Xn.n version is an unreleased experimental baselevel.
  10.271 +	# 1.2 uses "1.2" for uname -r.
  10.272 +	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  10.273 +	exit ;;
  10.274 +    Alpha\ *:Windows_NT*:*)
  10.275 +	# How do we know it's Interix rather than the generic POSIX subsystem?
  10.276 +	# Should we change UNAME_MACHINE based on the output of uname instead
  10.277 +	# of the specific Alpha model?
  10.278 +	echo alpha-pc-interix
  10.279 +	exit ;;
  10.280 +    21064:Windows_NT:50:3)
  10.281 +	echo alpha-dec-winnt3.5
  10.282 +	exit ;;
  10.283 +    Amiga*:UNIX_System_V:4.0:*)
  10.284 +	echo m68k-unknown-sysv4
  10.285 +	exit ;;
  10.286 +    *:[Aa]miga[Oo][Ss]:*:*)
  10.287 +	echo ${UNAME_MACHINE}-unknown-amigaos
  10.288 +	exit ;;
  10.289 +    *:[Mm]orph[Oo][Ss]:*:*)
  10.290 +	echo ${UNAME_MACHINE}-unknown-morphos
  10.291 +	exit ;;
  10.292 +    *:OS/390:*:*)
  10.293 +	echo i370-ibm-openedition
  10.294 +	exit ;;
  10.295 +    *:z/VM:*:*)
  10.296 +	echo s390-ibm-zvmoe
  10.297 +	exit ;;
  10.298 +    *:OS400:*:*)
  10.299 +        echo powerpc-ibm-os400
  10.300 +	exit ;;
  10.301 +    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  10.302 +	echo arm-acorn-riscix${UNAME_RELEASE}
  10.303 +	exit ;;
  10.304 +    arm:riscos:*:*|arm:RISCOS:*:*)
  10.305 +	echo arm-unknown-riscos
  10.306 +	exit ;;
  10.307 +    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  10.308 +	echo hppa1.1-hitachi-hiuxmpp
  10.309 +	exit ;;
  10.310 +    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  10.311 +	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
  10.312 +	if test "`(/bin/universe) 2>/dev/null`" = att ; then
  10.313 +		echo pyramid-pyramid-sysv3
  10.314 +	else
  10.315 +		echo pyramid-pyramid-bsd
  10.316 +	fi
  10.317 +	exit ;;
  10.318 +    NILE*:*:*:dcosx)
  10.319 +	echo pyramid-pyramid-svr4
  10.320 +	exit ;;
  10.321 +    DRS?6000:unix:4.0:6*)
  10.322 +	echo sparc-icl-nx6
  10.323 +	exit ;;
  10.324 +    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
  10.325 +	case `/usr/bin/uname -p` in
  10.326 +	    sparc) echo sparc-icl-nx7; exit ;;
  10.327 +	esac ;;
  10.328 +    sun4H:SunOS:5.*:*)
  10.329 +	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  10.330 +	exit ;;
  10.331 +    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  10.332 +	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  10.333 +	exit ;;
  10.334 +    i86pc:SunOS:5.*:*)
  10.335 +	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  10.336 +	exit ;;
  10.337 +    sun4*:SunOS:6*:*)
  10.338 +	# According to config.sub, this is the proper way to canonicalize
  10.339 +	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
  10.340 +	# it's likely to be more like Solaris than SunOS4.
  10.341 +	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  10.342 +	exit ;;
  10.343 +    sun4*:SunOS:*:*)
  10.344 +	case "`/usr/bin/arch -k`" in
  10.345 +	    Series*|S4*)
  10.346 +		UNAME_RELEASE=`uname -v`
  10.347 +		;;
  10.348 +	esac
  10.349 +	# Japanese Language versions have a version number like `4.1.3-JL'.
  10.350 +	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  10.351 +	exit ;;
  10.352 +    sun3*:SunOS:*:*)
  10.353 +	echo m68k-sun-sunos${UNAME_RELEASE}
  10.354 +	exit ;;
  10.355 +    sun*:*:4.2BSD:*)
  10.356 +	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  10.357 +	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  10.358 +	case "`/bin/arch`" in
  10.359 +	    sun3)
  10.360 +		echo m68k-sun-sunos${UNAME_RELEASE}
  10.361 +		;;
  10.362 +	    sun4)
  10.363 +		echo sparc-sun-sunos${UNAME_RELEASE}
  10.364 +		;;
  10.365 +	esac
  10.366 +	exit ;;
  10.367 +    aushp:SunOS:*:*)
  10.368 +	echo sparc-auspex-sunos${UNAME_RELEASE}
  10.369 +	exit ;;
  10.370 +    # The situation for MiNT is a little confusing.  The machine name
  10.371 +    # can be virtually everything (everything which is not
  10.372 +    # "atarist" or "atariste" at least should have a processor
  10.373 +    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
  10.374 +    # to the lowercase version "mint" (or "freemint").  Finally
  10.375 +    # the system name "TOS" denotes a system which is actually not
  10.376 +    # MiNT.  But MiNT is downward compatible to TOS, so this should
  10.377 +    # be no problem.
  10.378 +    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  10.379 +        echo m68k-atari-mint${UNAME_RELEASE}
  10.380 +	exit ;;
  10.381 +    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  10.382 +	echo m68k-atari-mint${UNAME_RELEASE}
  10.383 +        exit ;;
  10.384 +    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  10.385 +        echo m68k-atari-mint${UNAME_RELEASE}
  10.386 +	exit ;;
  10.387 +    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  10.388 +        echo m68k-milan-mint${UNAME_RELEASE}
  10.389 +        exit ;;
  10.390 +    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  10.391 +        echo m68k-hades-mint${UNAME_RELEASE}
  10.392 +        exit ;;
  10.393 +    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  10.394 +        echo m68k-unknown-mint${UNAME_RELEASE}
  10.395 +        exit ;;
  10.396 +    m68k:machten:*:*)
  10.397 +	echo m68k-apple-machten${UNAME_RELEASE}
  10.398 +	exit ;;
  10.399 +    powerpc:machten:*:*)
  10.400 +	echo powerpc-apple-machten${UNAME_RELEASE}
  10.401 +	exit ;;
  10.402 +    RISC*:Mach:*:*)
  10.403 +	echo mips-dec-mach_bsd4.3
  10.404 +	exit ;;
  10.405 +    RISC*:ULTRIX:*:*)
  10.406 +	echo mips-dec-ultrix${UNAME_RELEASE}
  10.407 +	exit ;;
  10.408 +    VAX*:ULTRIX*:*:*)
  10.409 +	echo vax-dec-ultrix${UNAME_RELEASE}
  10.410 +	exit ;;
  10.411 +    2020:CLIX:*:* | 2430:CLIX:*:*)
  10.412 +	echo clipper-intergraph-clix${UNAME_RELEASE}
  10.413 +	exit ;;
  10.414 +    mips:*:*:UMIPS | mips:*:*:RISCos)
  10.415 +	eval $set_cc_for_build
  10.416 +	sed 's/^	//' << EOF >$dummy.c
  10.417 +#ifdef __cplusplus
  10.418 +#include <stdio.h>  /* for printf() prototype */
  10.419 +	int main (int argc, char *argv[]) {
  10.420 +#else
  10.421 +	int main (argc, argv) int argc; char *argv[]; {
  10.422 +#endif
  10.423 +	#if defined (host_mips) && defined (MIPSEB)
  10.424 +	#if defined (SYSTYPE_SYSV)
  10.425 +	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
  10.426 +	#endif
  10.427 +	#if defined (SYSTYPE_SVR4)
  10.428 +	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
  10.429 +	#endif
  10.430 +	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
  10.431 +	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
  10.432 +	#endif
  10.433 +	#endif
  10.434 +	  exit (-1);
  10.435 +	}
  10.436 +EOF
  10.437 +	$CC_FOR_BUILD -o $dummy $dummy.c &&
  10.438 +	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
  10.439 +	  SYSTEM_NAME=`$dummy $dummyarg` &&
  10.440 +	    { echo "$SYSTEM_NAME"; exit; }
  10.441 +	echo mips-mips-riscos${UNAME_RELEASE}
  10.442 +	exit ;;
  10.443 +    Motorola:PowerMAX_OS:*:*)
  10.444 +	echo powerpc-motorola-powermax
  10.445 +	exit ;;
  10.446 +    Motorola:*:4.3:PL8-*)
  10.447 +	echo powerpc-harris-powermax
  10.448 +	exit ;;
  10.449 +    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
  10.450 +	echo powerpc-harris-powermax
  10.451 +	exit ;;
  10.452 +    Night_Hawk:Power_UNIX:*:*)
  10.453 +	echo powerpc-harris-powerunix
  10.454 +	exit ;;
  10.455 +    m88k:CX/UX:7*:*)
  10.456 +	echo m88k-harris-cxux7
  10.457 +	exit ;;
  10.458 +    m88k:*:4*:R4*)
  10.459 +	echo m88k-motorola-sysv4
  10.460 +	exit ;;
  10.461 +    m88k:*:3*:R3*)
  10.462 +	echo m88k-motorola-sysv3
  10.463 +	exit ;;
  10.464 +    AViiON:dgux:*:*)
  10.465 +        # DG/UX returns AViiON for all architectures
  10.466 +        UNAME_PROCESSOR=`/usr/bin/uname -p`
  10.467 +	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  10.468 +	then
  10.469 +	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  10.470 +	       [ ${TARGET_BINARY_INTERFACE}x = x ]
  10.471 +	    then
  10.472 +		echo m88k-dg-dgux${UNAME_RELEASE}
  10.473 +	    else
  10.474 +		echo m88k-dg-dguxbcs${UNAME_RELEASE}
  10.475 +	    fi
  10.476 +	else
  10.477 +	    echo i586-dg-dgux${UNAME_RELEASE}
  10.478 +	fi
  10.479 + 	exit ;;
  10.480 +    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
  10.481 +	echo m88k-dolphin-sysv3
  10.482 +	exit ;;
  10.483 +    M88*:*:R3*:*)
  10.484 +	# Delta 88k system running SVR3
  10.485 +	echo m88k-motorola-sysv3
  10.486 +	exit ;;
  10.487 +    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  10.488 +	echo m88k-tektronix-sysv3
  10.489 +	exit ;;
  10.490 +    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  10.491 +	echo m68k-tektronix-bsd
  10.492 +	exit ;;
  10.493 +    *:IRIX*:*:*)
  10.494 +	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
  10.495 +	exit ;;
  10.496 +    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  10.497 +	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
  10.498 +	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
  10.499 +    i*86:AIX:*:*)
  10.500 +	echo i386-ibm-aix
  10.501 +	exit ;;
  10.502 +    ia64:AIX:*:*)
  10.503 +	if [ -x /usr/bin/oslevel ] ; then
  10.504 +		IBM_REV=`/usr/bin/oslevel`
  10.505 +	else
  10.506 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  10.507 +	fi
  10.508 +	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
  10.509 +	exit ;;
  10.510 +    *:AIX:2:3)
  10.511 +	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  10.512 +		eval $set_cc_for_build
  10.513 +		sed 's/^		//' << EOF >$dummy.c
  10.514 +		#include <sys/systemcfg.h>
  10.515 +
  10.516 +		main()
  10.517 +			{
  10.518 +			if (!__power_pc())
  10.519 +				exit(1);
  10.520 +			puts("powerpc-ibm-aix3.2.5");
  10.521 +			exit(0);
  10.522 +			}
  10.523 +EOF
  10.524 +		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
  10.525 +		then
  10.526 +			echo "$SYSTEM_NAME"
  10.527 +		else
  10.528 +			echo rs6000-ibm-aix3.2.5
  10.529 +		fi
  10.530 +	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  10.531 +		echo rs6000-ibm-aix3.2.4
  10.532 +	else
  10.533 +		echo rs6000-ibm-aix3.2
  10.534 +	fi
  10.535 +	exit ;;
  10.536 +    *:AIX:*:[45])
  10.537 +	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  10.538 +	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  10.539 +		IBM_ARCH=rs6000
  10.540 +	else
  10.541 +		IBM_ARCH=powerpc
  10.542 +	fi
  10.543 +	if [ -x /usr/bin/oslevel ] ; then
  10.544 +		IBM_REV=`/usr/bin/oslevel`
  10.545 +	else
  10.546 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  10.547 +	fi
  10.548 +	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  10.549 +	exit ;;
  10.550 +    *:AIX:*:*)
  10.551 +	echo rs6000-ibm-aix
  10.552 +	exit ;;
  10.553 +    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
  10.554 +	echo romp-ibm-bsd4.4
  10.555 +	exit ;;
  10.556 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
  10.557 +	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
  10.558 +	exit ;;                             # report: romp-ibm BSD 4.3
  10.559 +    *:BOSX:*:*)
  10.560 +	echo rs6000-bull-bosx
  10.561 +	exit ;;
  10.562 +    DPX/2?00:B.O.S.:*:*)
  10.563 +	echo m68k-bull-sysv3
  10.564 +	exit ;;
  10.565 +    9000/[34]??:4.3bsd:1.*:*)
  10.566 +	echo m68k-hp-bsd
  10.567 +	exit ;;
  10.568 +    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  10.569 +	echo m68k-hp-bsd4.4
  10.570 +	exit ;;
  10.571 +    9000/[34678]??:HP-UX:*:*)
  10.572 +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  10.573 +	case "${UNAME_MACHINE}" in
  10.574 +	    9000/31? )            HP_ARCH=m68000 ;;
  10.575 +	    9000/[34]?? )         HP_ARCH=m68k ;;
  10.576 +	    9000/[678][0-9][0-9])
  10.577 +		if [ -x /usr/bin/getconf ]; then
  10.578 +		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  10.579 +                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  10.580 +                    case "${sc_cpu_version}" in
  10.581 +                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  10.582 +                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  10.583 +                      532)                      # CPU_PA_RISC2_0
  10.584 +                        case "${sc_kernel_bits}" in
  10.585 +                          32) HP_ARCH="hppa2.0n" ;;
  10.586 +                          64) HP_ARCH="hppa2.0w" ;;
  10.587 +			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
  10.588 +                        esac ;;
  10.589 +                    esac
  10.590 +		fi
  10.591 +		if [ "${HP_ARCH}" = "" ]; then
  10.592 +		    eval $set_cc_for_build
  10.593 +		    sed 's/^              //' << EOF >$dummy.c
  10.594 +
  10.595 +              #define _HPUX_SOURCE
  10.596 +              #include <stdlib.h>
  10.597 +              #include <unistd.h>
  10.598 +
  10.599 +              int main ()
  10.600 +              {
  10.601 +              #if defined(_SC_KERNEL_BITS)
  10.602 +                  long bits = sysconf(_SC_KERNEL_BITS);
  10.603 +              #endif
  10.604 +                  long cpu  = sysconf (_SC_CPU_VERSION);
  10.605 +
  10.606 +                  switch (cpu)
  10.607 +              	{
  10.608 +              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  10.609 +              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  10.610 +              	case CPU_PA_RISC2_0:
  10.611 +              #if defined(_SC_KERNEL_BITS)
  10.612 +              	    switch (bits)
  10.613 +              		{
  10.614 +              		case 64: puts ("hppa2.0w"); break;
  10.615 +              		case 32: puts ("hppa2.0n"); break;
  10.616 +              		default: puts ("hppa2.0"); break;
  10.617 +              		} break;
  10.618 +              #else  /* !defined(_SC_KERNEL_BITS) */
  10.619 +              	    puts ("hppa2.0"); break;
  10.620 +              #endif
  10.621 +              	default: puts ("hppa1.0"); break;
  10.622 +              	}
  10.623 +                  exit (0);
  10.624 +              }
  10.625 +EOF
  10.626 +		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  10.627 +		    test -z "$HP_ARCH" && HP_ARCH=hppa
  10.628 +		fi ;;
  10.629 +	esac
  10.630 +	if [ ${HP_ARCH} = "hppa2.0w" ]
  10.631 +	then
  10.632 +	    eval $set_cc_for_build
  10.633 +
  10.634 +	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
  10.635 +	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
  10.636 +	    # generating 64-bit code.  GNU and HP use different nomenclature:
  10.637 +	    #
  10.638 +	    # $ CC_FOR_BUILD=cc ./config.guess
  10.639 +	    # => hppa2.0w-hp-hpux11.23
  10.640 +	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
  10.641 +	    # => hppa64-hp-hpux11.23
  10.642 +
  10.643 +	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
  10.644 +		grep __LP64__ >/dev/null
  10.645 +	    then
  10.646 +		HP_ARCH="hppa2.0w"
  10.647 +	    else
  10.648 +		HP_ARCH="hppa64"
  10.649 +	    fi
  10.650 +	fi
  10.651 +	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  10.652 +	exit ;;
  10.653 +    ia64:HP-UX:*:*)
  10.654 +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  10.655 +	echo ia64-hp-hpux${HPUX_REV}
  10.656 +	exit ;;
  10.657 +    3050*:HI-UX:*:*)
  10.658 +	eval $set_cc_for_build
  10.659 +	sed 's/^	//' << EOF >$dummy.c
  10.660 +	#include <unistd.h>
  10.661 +	int
  10.662 +	main ()
  10.663 +	{
  10.664 +	  long cpu = sysconf (_SC_CPU_VERSION);
  10.665 +	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  10.666 +	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
  10.667 +	     results, however.  */
  10.668 +	  if (CPU_IS_PA_RISC (cpu))
  10.669 +	    {
  10.670 +	      switch (cpu)
  10.671 +		{
  10.672 +		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  10.673 +		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  10.674 +		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  10.675 +		  default: puts ("hppa-hitachi-hiuxwe2"); break;
  10.676 +		}
  10.677 +	    }
  10.678 +	  else if (CPU_IS_HP_MC68K (cpu))
  10.679 +	    puts ("m68k-hitachi-hiuxwe2");
  10.680 +	  else puts ("unknown-hitachi-hiuxwe2");
  10.681 +	  exit (0);
  10.682 +	}
  10.683 +EOF
  10.684 +	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
  10.685 +		{ echo "$SYSTEM_NAME"; exit; }
  10.686 +	echo unknown-hitachi-hiuxwe2
  10.687 +	exit ;;
  10.688 +    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
  10.689 +	echo hppa1.1-hp-bsd
  10.690 +	exit ;;
  10.691 +    9000/8??:4.3bsd:*:*)
  10.692 +	echo hppa1.0-hp-bsd
  10.693 +	exit ;;
  10.694 +    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
  10.695 +	echo hppa1.0-hp-mpeix
  10.696 +	exit ;;
  10.697 +    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
  10.698 +	echo hppa1.1-hp-osf
  10.699 +	exit ;;
  10.700 +    hp8??:OSF1:*:*)
  10.701 +	echo hppa1.0-hp-osf
  10.702 +	exit ;;
  10.703 +    i*86:OSF1:*:*)
  10.704 +	if [ -x /usr/sbin/sysversion ] ; then
  10.705 +	    echo ${UNAME_MACHINE}-unknown-osf1mk
  10.706 +	else
  10.707 +	    echo ${UNAME_MACHINE}-unknown-osf1
  10.708 +	fi
  10.709 +	exit ;;
  10.710 +    parisc*:Lites*:*:*)
  10.711 +	echo hppa1.1-hp-lites
  10.712 +	exit ;;
  10.713 +    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  10.714 +	echo c1-convex-bsd
  10.715 +        exit ;;
  10.716 +    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  10.717 +	if getsysinfo -f scalar_acc
  10.718 +	then echo c32-convex-bsd
  10.719 +	else echo c2-convex-bsd
  10.720 +	fi
  10.721 +        exit ;;
  10.722 +    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  10.723 +	echo c34-convex-bsd
  10.724 +        exit ;;
  10.725 +    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  10.726 +	echo c38-convex-bsd
  10.727 +        exit ;;
  10.728 +    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  10.729 +	echo c4-convex-bsd
  10.730 +        exit ;;
  10.731 +    CRAY*Y-MP:*:*:*)
  10.732 +	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  10.733 +	exit ;;
  10.734 +    CRAY*[A-Z]90:*:*:*)
  10.735 +	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
  10.736 +	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  10.737 +	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
  10.738 +	      -e 's/\.[^.]*$/.X/'
  10.739 +	exit ;;
  10.740 +    CRAY*TS:*:*:*)
  10.741 +	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  10.742 +	exit ;;
  10.743 +    CRAY*T3E:*:*:*)
  10.744 +	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  10.745 +	exit ;;
  10.746 +    CRAY*SV1:*:*:*)
  10.747 +	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  10.748 +	exit ;;
  10.749 +    *:UNICOS/mp:*:*)
  10.750 +	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  10.751 +	exit ;;
  10.752 +    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  10.753 +	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  10.754 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  10.755 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  10.756 +        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  10.757 +        exit ;;
  10.758 +    5000:UNIX_System_V:4.*:*)
  10.759 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  10.760 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  10.761 +        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  10.762 +	exit ;;
  10.763 +    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  10.764 +	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  10.765 +	exit ;;
  10.766 +    sparc*:BSD/OS:*:*)
  10.767 +	echo sparc-unknown-bsdi${UNAME_RELEASE}
  10.768 +	exit ;;
  10.769 +    *:BSD/OS:*:*)
  10.770 +	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  10.771 +	exit ;;
  10.772 +    *:FreeBSD:*:*)
  10.773 +	case ${UNAME_MACHINE} in
  10.774 +	    pc98)
  10.775 +		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  10.776 +	    *)
  10.777 +		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  10.778 +	esac
  10.779 +	exit ;;
  10.780 +    i*:CYGWIN*:*)
  10.781 +	echo ${UNAME_MACHINE}-pc-cygwin
  10.782 +	exit ;;
  10.783 +    i*:MINGW*:*)
  10.784 +	echo ${UNAME_MACHINE}-pc-mingw32
  10.785 +	exit ;;
  10.786 +    i*:windows32*:*)
  10.787 +    	# uname -m includes "-pc" on this system.
  10.788 +    	echo ${UNAME_MACHINE}-mingw32
  10.789 +	exit ;;
  10.790 +    i*:PW*:*)
  10.791 +	echo ${UNAME_MACHINE}-pc-pw32
  10.792 +	exit ;;
  10.793 +    x86:Interix*:[345]*)
  10.794 +	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
  10.795 +	exit ;;
  10.796 +    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  10.797 +	echo i${UNAME_MACHINE}-pc-mks
  10.798 +	exit ;;
  10.799 +    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  10.800 +	# How do we know it's Interix rather than the generic POSIX subsystem?
  10.801 +	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  10.802 +	# UNAME_MACHINE based on the output of uname instead of i386?
  10.803 +	echo i586-pc-interix
  10.804 +	exit ;;
  10.805 +    i*:UWIN*:*)
  10.806 +	echo ${UNAME_MACHINE}-pc-uwin
  10.807 +	exit ;;
  10.808 +    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
  10.809 +	echo x86_64-unknown-cygwin
  10.810 +	exit ;;
  10.811 +    p*:CYGWIN*:*)
  10.812 +	echo powerpcle-unknown-cygwin
  10.813 +	exit ;;
  10.814 +    prep*:SunOS:5.*:*)
  10.815 +	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  10.816 +	exit ;;
  10.817 +    *:GNU:*:*)
  10.818 +	# the GNU system
  10.819 +	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  10.820 +	exit ;;
  10.821 +    *:GNU/*:*:*)
  10.822 +	# other systems with GNU libc and userland
  10.823 +	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  10.824 +	exit ;;
  10.825 +    i*86:Minix:*:*)
  10.826 +	echo ${UNAME_MACHINE}-pc-minix
  10.827 +	exit ;;
  10.828 +    arm*:Linux:*:*)
  10.829 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
  10.830 +	exit ;;
  10.831 +    cris:Linux:*:*)
  10.832 +	echo cris-axis-linux-gnu
  10.833 +	exit ;;
  10.834 +    crisv32:Linux:*:*)
  10.835 +	echo crisv32-axis-linux-gnu
  10.836 +	exit ;;
  10.837 +    frv:Linux:*:*)
  10.838 +    	echo frv-unknown-linux-gnu
  10.839 +	exit ;;
  10.840 +    ia64:Linux:*:*)
  10.841 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
  10.842 +	exit ;;
  10.843 +    m32r*:Linux:*:*)
  10.844 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
  10.845 +	exit ;;
  10.846 +    m68*:Linux:*:*)
  10.847 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
  10.848 +	exit ;;
  10.849 +    mips:Linux:*:*)
  10.850 +	eval $set_cc_for_build
  10.851 +	sed 's/^	//' << EOF >$dummy.c
  10.852 +	#undef CPU
  10.853 +	#undef mips
  10.854 +	#undef mipsel
  10.855 +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  10.856 +	CPU=mipsel
  10.857 +	#else
  10.858 +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  10.859 +	CPU=mips
  10.860 +	#else
  10.861 +	CPU=
  10.862 +	#endif
  10.863 +	#endif
  10.864 +EOF
  10.865 +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
  10.866 +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  10.867 +	;;
  10.868 +    mips64:Linux:*:*)
  10.869 +	eval $set_cc_for_build
  10.870 +	sed 's/^	//' << EOF >$dummy.c
  10.871 +	#undef CPU
  10.872 +	#undef mips64
  10.873 +	#undef mips64el
  10.874 +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  10.875 +	CPU=mips64el
  10.876 +	#else
  10.877 +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  10.878 +	CPU=mips64
  10.879 +	#else
  10.880 +	CPU=
  10.881 +	#endif
  10.882 +	#endif
  10.883 +EOF
  10.884 +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
  10.885 +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  10.886 +	;;
  10.887 +    or32:Linux:*:*)
  10.888 +	echo or32-unknown-linux-gnu
  10.889 +	exit ;;
  10.890 +    ppc:Linux:*:*)
  10.891 +	echo powerpc-unknown-linux-gnu
  10.892 +	exit ;;
  10.893 +    ppc64:Linux:*:*)
  10.894 +	echo powerpc64-unknown-linux-gnu
  10.895 +	exit ;;
  10.896 +    alpha:Linux:*:*)
  10.897 +	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  10.898 +	  EV5)   UNAME_MACHINE=alphaev5 ;;
  10.899 +	  EV56)  UNAME_MACHINE=alphaev56 ;;
  10.900 +	  PCA56) UNAME_MACHINE=alphapca56 ;;
  10.901 +	  PCA57) UNAME_MACHINE=alphapca56 ;;
  10.902 +	  EV6)   UNAME_MACHINE=alphaev6 ;;
  10.903 +	  EV67)  UNAME_MACHINE=alphaev67 ;;
  10.904 +	  EV68*) UNAME_MACHINE=alphaev68 ;;
  10.905 +        esac
  10.906 +	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
  10.907 +	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  10.908 +	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  10.909 +	exit ;;
  10.910 +    parisc:Linux:*:* | hppa:Linux:*:*)
  10.911 +	# Look for CPU level
  10.912 +	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  10.913 +	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
  10.914 +	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
  10.915 +	  *)    echo hppa-unknown-linux-gnu ;;
  10.916 +	esac
  10.917 +	exit ;;
  10.918 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
  10.919 +	echo hppa64-unknown-linux-gnu
  10.920 +	exit ;;
  10.921 +    s390:Linux:*:* | s390x:Linux:*:*)
  10.922 +	echo ${UNAME_MACHINE}-ibm-linux
  10.923 +	exit ;;
  10.924 +    sh64*:Linux:*:*)
  10.925 +    	echo ${UNAME_MACHINE}-unknown-linux-gnu
  10.926 +	exit ;;
  10.927 +    sh*:Linux:*:*)
  10.928 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
  10.929 +	exit ;;
  10.930 +    sparc:Linux:*:* | sparc64:Linux:*:*)
  10.931 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
  10.932 +	exit ;;
  10.933 +    vax:Linux:*:*)
  10.934 +	echo ${UNAME_MACHINE}-dec-linux-gnu
  10.935 +	exit ;;
  10.936 +    x86_64:Linux:*:*)
  10.937 +	echo x86_64-unknown-linux-gnu
  10.938 +	exit ;;
  10.939 +    i*86:Linux:*:*)
  10.940 +	# The BFD linker knows what the default object file format is, so
  10.941 +	# first see if it will tell us. cd to the root directory to prevent
  10.942 +	# problems with other programs or directories called `ld' in the path.
  10.943 +	# Set LC_ALL=C to ensure ld outputs messages in English.
  10.944 +	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
  10.945 +			 | sed -ne '/supported targets:/!d
  10.946 +				    s/[ 	][ 	]*/ /g
  10.947 +				    s/.*supported targets: *//
  10.948 +				    s/ .*//
  10.949 +				    p'`
  10.950 +        case "$ld_supported_targets" in
  10.951 +	  elf32-i386)
  10.952 +		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
  10.953 +		;;
  10.954 +	  a.out-i386-linux)
  10.955 +		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
  10.956 +		exit ;;
  10.957 +	  coff-i386)
  10.958 +		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
  10.959 +		exit ;;
  10.960 +	  "")
  10.961 +		# Either a pre-BFD a.out linker (linux-gnuoldld) or
  10.962 +		# one that does not give us useful --help.
  10.963 +		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
  10.964 +		exit ;;
  10.965 +	esac
  10.966 +	# Determine whether the default compiler is a.out or elf
  10.967 +	eval $set_cc_for_build
  10.968 +	sed 's/^	//' << EOF >$dummy.c
  10.969 +	#include <features.h>
  10.970 +	#ifdef __ELF__
  10.971 +	# ifdef __GLIBC__
  10.972 +	#  if __GLIBC__ >= 2
  10.973 +	LIBC=gnu
  10.974 +	#  else
  10.975 +	LIBC=gnulibc1
  10.976 +	#  endif
  10.977 +	# else
  10.978 +	LIBC=gnulibc1
  10.979 +	# endif
  10.980 +	#else
  10.981 +	#if defined(__INTEL_COMPILER) || defined(__PGI)
  10.982 +	LIBC=gnu
  10.983 +	#else
  10.984 +	LIBC=gnuaout
  10.985 +	#endif
  10.986 +	#endif
  10.987 +	#ifdef __dietlibc__
  10.988 +	LIBC=dietlibc
  10.989 +	#endif
  10.990 +EOF
  10.991 +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
  10.992 +	test x"${LIBC}" != x && {
  10.993 +		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  10.994 +		exit
  10.995 +	}
  10.996 +	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
  10.997 +	;;
  10.998 +    i*86:DYNIX/ptx:4*:*)
  10.999 +	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 10.1000 +	# earlier versions are messed up and put the nodename in both
 10.1001 +	# sysname and nodename.
 10.1002 +	echo i386-sequent-sysv4
 10.1003 +	exit ;;
 10.1004 +    i*86:UNIX_SV:4.2MP:2.*)
 10.1005 +        # Unixware is an offshoot of SVR4, but it has its own version
 10.1006 +        # number series starting with 2...
 10.1007 +        # I am not positive that other SVR4 systems won't match this,
 10.1008 +	# I just have to hope.  -- rms.
 10.1009 +        # Use sysv4.2uw... so that sysv4* matches it.
 10.1010 +	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 10.1011 +	exit ;;
 10.1012 +    i*86:OS/2:*:*)
 10.1013 +	# If we were able to find `uname', then EMX Unix compatibility
 10.1014 +	# is probably installed.
 10.1015 +	echo ${UNAME_MACHINE}-pc-os2-emx
 10.1016 +	exit ;;
 10.1017 +    i*86:XTS-300:*:STOP)
 10.1018 +	echo ${UNAME_MACHINE}-unknown-stop
 10.1019 +	exit ;;
 10.1020 +    i*86:atheos:*:*)
 10.1021 +	echo ${UNAME_MACHINE}-unknown-atheos
 10.1022 +	exit ;;
 10.1023 +    i*86:syllable:*:*)
 10.1024 +	echo ${UNAME_MACHINE}-pc-syllable
 10.1025 +	exit ;;
 10.1026 +    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 10.1027 +	echo i386-unknown-lynxos${UNAME_RELEASE}
 10.1028 +	exit ;;
 10.1029 +    i*86:*DOS:*:*)
 10.1030 +	echo ${UNAME_MACHINE}-pc-msdosdjgpp
 10.1031 +	exit ;;
 10.1032 +    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 10.1033 +	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 10.1034 +	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
 10.1035 +		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
 10.1036 +	else
 10.1037 +		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 10.1038 +	fi
 10.1039 +	exit ;;
 10.1040 +    i*86:*:5:[678]*)
 10.1041 +    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 10.1042 +	case `/bin/uname -X | grep "^Machine"` in
 10.1043 +	    *486*)	     UNAME_MACHINE=i486 ;;
 10.1044 +	    *Pentium)	     UNAME_MACHINE=i586 ;;
 10.1045 +	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 10.1046 +	esac
 10.1047 +	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
 10.1048 +	exit ;;
 10.1049 +    i*86:*:3.2:*)
 10.1050 +	if test -f /usr/options/cb.name; then
 10.1051 +		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
 10.1052 +		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
 10.1053 +	elif /bin/uname -X 2>/dev/null >/dev/null ; then
 10.1054 +		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 10.1055 +		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
 10.1056 +		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
 10.1057 +			&& UNAME_MACHINE=i586
 10.1058 +		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
 10.1059 +			&& UNAME_MACHINE=i686
 10.1060 +		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 10.1061 +			&& UNAME_MACHINE=i686
 10.1062 +		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
 10.1063 +	else
 10.1064 +		echo ${UNAME_MACHINE}-pc-sysv32
 10.1065 +	fi
 10.1066 +	exit ;;
 10.1067 +    pc:*:*:*)
 10.1068 +	# Left here for compatibility:
 10.1069 +        # uname -m prints for DJGPP always 'pc', but it prints nothing about
 10.1070 +        # the processor, so we play safe by assuming i386.
 10.1071 +	echo i386-pc-msdosdjgpp
 10.1072 +        exit ;;
 10.1073 +    Intel:Mach:3*:*)
 10.1074 +	echo i386-pc-mach3
 10.1075 +	exit ;;
 10.1076 +    paragon:*:*:*)
 10.1077 +	echo i860-intel-osf1
 10.1078 +	exit ;;
 10.1079 +    i860:*:4.*:*) # i860-SVR4
 10.1080 +	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
 10.1081 +	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
 10.1082 +	else # Add other i860-SVR4 vendors below as they are discovered.
 10.1083 +	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 10.1084 +	fi
 10.1085 +	exit ;;
 10.1086 +    mini*:CTIX:SYS*5:*)
 10.1087 +	# "miniframe"
 10.1088 +	echo m68010-convergent-sysv
 10.1089 +	exit ;;
 10.1090 +    mc68k:UNIX:SYSTEM5:3.51m)
 10.1091 +	echo m68k-convergent-sysv
 10.1092 +	exit ;;
 10.1093 +    M680?0:D-NIX:5.3:*)
 10.1094 +	echo m68k-diab-dnix
 10.1095 +	exit ;;
 10.1096 +    M68*:*:R3V[5678]*:*)
 10.1097 +	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
 10.1098 +    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
 10.1099 +	OS_REL=''
 10.1100 +	test -r /etc/.relid \
 10.1101 +	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 10.1102 +	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 10.1103 +	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 10.1104 +	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 10.1105 +	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
 10.1106 +    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
 10.1107 +        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 10.1108 +          && { echo i486-ncr-sysv4; exit; } ;;
 10.1109 +    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 10.1110 +	echo m68k-unknown-lynxos${UNAME_RELEASE}
 10.1111 +	exit ;;
 10.1112 +    mc68030:UNIX_System_V:4.*:*)
 10.1113 +	echo m68k-atari-sysv4
 10.1114 +	exit ;;
 10.1115 +    TSUNAMI:LynxOS:2.*:*)
 10.1116 +	echo sparc-unknown-lynxos${UNAME_RELEASE}
 10.1117 +	exit ;;
 10.1118 +    rs6000:LynxOS:2.*:*)
 10.1119 +	echo rs6000-unknown-lynxos${UNAME_RELEASE}
 10.1120 +	exit ;;
 10.1121 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 10.1122 +	echo powerpc-unknown-lynxos${UNAME_RELEASE}
 10.1123 +	exit ;;
 10.1124 +    SM[BE]S:UNIX_SV:*:*)
 10.1125 +	echo mips-dde-sysv${UNAME_RELEASE}
 10.1126 +	exit ;;
 10.1127 +    RM*:ReliantUNIX-*:*:*)
 10.1128 +	echo mips-sni-sysv4
 10.1129 +	exit ;;
 10.1130 +    RM*:SINIX-*:*:*)
 10.1131 +	echo mips-sni-sysv4
 10.1132 +	exit ;;
 10.1133 +    *:SINIX-*:*:*)
 10.1134 +	if uname -p 2>/dev/null >/dev/null ; then
 10.1135 +		UNAME_MACHINE=`(uname -p) 2>/dev/null`
 10.1136 +		echo ${UNAME_MACHINE}-sni-sysv4
 10.1137 +	else
 10.1138 +		echo ns32k-sni-sysv
 10.1139 +	fi
 10.1140 +	exit ;;
 10.1141 +    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
 10.1142 +                      # says <Richard.M.Bartel@ccMail.Census.GOV>
 10.1143 +        echo i586-unisys-sysv4
 10.1144 +        exit ;;
 10.1145 +    *:UNIX_System_V:4*:FTX*)
 10.1146 +	# From Gerald Hewes <hewes@openmarket.com>.
 10.1147 +	# How about differentiating between stratus architectures? -djm
 10.1148 +	echo hppa1.1-stratus-sysv4
 10.1149 +	exit ;;
 10.1150 +    *:*:*:FTX*)
 10.1151 +	# From seanf@swdc.stratus.com.
 10.1152 +	echo i860-stratus-sysv4
 10.1153 +	exit ;;
 10.1154 +    i*86:VOS:*:*)
 10.1155 +	# From Paul.Green@stratus.com.
 10.1156 +	echo ${UNAME_MACHINE}-stratus-vos
 10.1157 +	exit ;;
 10.1158 +    *:VOS:*:*)
 10.1159 +	# From Paul.Green@stratus.com.
 10.1160 +	echo hppa1.1-stratus-vos
 10.1161 +	exit ;;
 10.1162 +    mc68*:A/UX:*:*)
 10.1163 +	echo m68k-apple-aux${UNAME_RELEASE}
 10.1164 +	exit ;;
 10.1165 +    news*:NEWS-OS:6*:*)
 10.1166 +	echo mips-sony-newsos6
 10.1167 +	exit ;;
 10.1168 +    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 10.1169 +	if [ -d /usr/nec ]; then
 10.1170 +	        echo mips-nec-sysv${UNAME_RELEASE}
 10.1171 +	else
 10.1172 +	        echo mips-unknown-sysv${UNAME_RELEASE}
 10.1173 +	fi
 10.1174 +        exit ;;
 10.1175 +    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 10.1176 +	echo powerpc-be-beos
 10.1177 +	exit ;;
 10.1178 +    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 10.1179 +	echo powerpc-apple-beos
 10.1180 +	exit ;;
 10.1181 +    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 10.1182 +	echo i586-pc-beos
 10.1183 +	exit ;;
 10.1184 +    SX-4:SUPER-UX:*:*)
 10.1185 +	echo sx4-nec-superux${UNAME_RELEASE}
 10.1186 +	exit ;;
 10.1187 +    SX-5:SUPER-UX:*:*)
 10.1188 +	echo sx5-nec-superux${UNAME_RELEASE}
 10.1189 +	exit ;;
 10.1190 +    SX-6:SUPER-UX:*:*)
 10.1191 +	echo sx6-nec-superux${UNAME_RELEASE}
 10.1192 +	exit ;;
 10.1193 +    Power*:Rhapsody:*:*)
 10.1194 +	echo powerpc-apple-rhapsody${UNAME_RELEASE}
 10.1195 +	exit ;;
 10.1196 +    *:Rhapsody:*:*)
 10.1197 +	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
 10.1198 +	exit ;;
 10.1199 +    *:Darwin:*:*)
 10.1200 +	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 10.1201 +	case $UNAME_PROCESSOR in
 10.1202 +	    unknown) UNAME_PROCESSOR=powerpc ;;
 10.1203 +	esac
 10.1204 +	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 10.1205 +	exit ;;
 10.1206 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
 10.1207 +	UNAME_PROCESSOR=`uname -p`
 10.1208 +	if test "$UNAME_PROCESSOR" = "x86"; then
 10.1209 +		UNAME_PROCESSOR=i386
 10.1210 +		UNAME_MACHINE=pc
 10.1211 +	fi
 10.1212 +	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
 10.1213 +	exit ;;
 10.1214 +    *:QNX:*:4*)
 10.1215 +	echo i386-pc-qnx
 10.1216 +	exit ;;
 10.1217 +    NSE-?:NONSTOP_KERNEL:*:*)
 10.1218 +	echo nse-tandem-nsk${UNAME_RELEASE}
 10.1219 +	exit ;;
 10.1220 +    NSR-?:NONSTOP_KERNEL:*:*)
 10.1221 +	echo nsr-tandem-nsk${UNAME_RELEASE}
 10.1222 +	exit ;;
 10.1223 +    *:NonStop-UX:*:*)
 10.1224 +	echo mips-compaq-nonstopux
 10.1225 +	exit ;;
 10.1226 +    BS2000:POSIX*:*:*)
 10.1227 +	echo bs2000-siemens-sysv
 10.1228 +	exit ;;
 10.1229 +    DS/*:UNIX_System_V:*:*)
 10.1230 +	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
 10.1231 +	exit ;;
 10.1232 +    *:Plan9:*:*)
 10.1233 +	# "uname -m" is not consistent, so use $cputype instead. 386
 10.1234 +	# is converted to i386 for consistency with other x86
 10.1235 +	# operating systems.
 10.1236 +	if test "$cputype" = "386"; then
 10.1237 +	    UNAME_MACHINE=i386
 10.1238 +	else
 10.1239 +	    UNAME_MACHINE="$cputype"
 10.1240 +	fi
 10.1241 +	echo ${UNAME_MACHINE}-unknown-plan9
 10.1242 +	exit ;;
 10.1243 +    *:TOPS-10:*:*)
 10.1244 +	echo pdp10-unknown-tops10
 10.1245 +	exit ;;
 10.1246 +    *:TENEX:*:*)
 10.1247 +	echo pdp10-unknown-tenex
 10.1248 +	exit ;;
 10.1249 +    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 10.1250 +	echo pdp10-dec-tops20
 10.1251 +	exit ;;
 10.1252 +    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 10.1253 +	echo pdp10-xkl-tops20
 10.1254 +	exit ;;
 10.1255 +    *:TOPS-20:*:*)
 10.1256 +	echo pdp10-unknown-tops20
 10.1257 +	exit ;;
 10.1258 +    *:ITS:*:*)
 10.1259 +	echo pdp10-unknown-its
 10.1260 +	exit ;;
 10.1261 +    SEI:*:*:SEIUX)
 10.1262 +        echo mips-sei-seiux${UNAME_RELEASE}
 10.1263 +	exit ;;
 10.1264 +    *:DragonFly:*:*)
 10.1265 +	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 10.1266 +	exit ;;
 10.1267 +    *:*VMS:*:*)
 10.1268 +    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 10.1269 +	case "${UNAME_MACHINE}" in
 10.1270 +	    A*) echo alpha-dec-vms ; exit ;;
 10.1271 +	    I*) echo ia64-dec-vms ; exit ;;
 10.1272 +	    V*) echo vax-dec-vms ; exit ;;
 10.1273 +	esac ;;
 10.1274 +    *:XENIX:*:SysV)
 10.1275 +	echo i386-pc-xenix
 10.1276 +	exit ;;
 10.1277 +    i*86:skyos:*:*)
 10.1278 +	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
 10.1279 +	exit ;;
 10.1280 +    i*86:rdos:*:*)
 10.1281 +	echo ${UNAME_MACHINE}-pc-rdos
 10.1282 +	exit ;;
 10.1283 +esac
 10.1284 +
 10.1285 +#echo '(No uname command or uname output not recognized.)' 1>&2
 10.1286 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 10.1287 +
 10.1288 +eval $set_cc_for_build
 10.1289 +cat >$dummy.c <<EOF
 10.1290 +#ifdef _SEQUENT_
 10.1291 +# include <sys/types.h>
 10.1292 +# include <sys/utsname.h>
 10.1293 +#endif
 10.1294 +main ()
 10.1295 +{
 10.1296 +#if defined (sony)
 10.1297 +#if defined (MIPSEB)
 10.1298 +  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
 10.1299 +     I don't know....  */
 10.1300 +  printf ("mips-sony-bsd\n"); exit (0);
 10.1301 +#else
 10.1302 +#include <sys/param.h>
 10.1303 +  printf ("m68k-sony-newsos%s\n",
 10.1304 +#ifdef NEWSOS4
 10.1305 +          "4"
 10.1306 +#else
 10.1307 +	  ""
 10.1308 +#endif
 10.1309 +         ); exit (0);
 10.1310 +#endif
 10.1311 +#endif
 10.1312 +
 10.1313 +#if defined (__arm) && defined (__acorn) && defined (__unix)
 10.1314 +  printf ("arm-acorn-riscix\n"); exit (0);
 10.1315 +#endif
 10.1316 +
 10.1317 +#if defined (hp300) && !defined (hpux)
 10.1318 +  printf ("m68k-hp-bsd\n"); exit (0);
 10.1319 +#endif
 10.1320 +
 10.1321 +#if defined (NeXT)
 10.1322 +#if !defined (__ARCHITECTURE__)
 10.1323 +#define __ARCHITECTURE__ "m68k"
 10.1324 +#endif
 10.1325 +  int version;
 10.1326 +  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
 10.1327 +  if (version < 4)
 10.1328 +    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
 10.1329 +  else
 10.1330 +    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
 10.1331 +  exit (0);
 10.1332 +#endif
 10.1333 +
 10.1334 +#if defined (MULTIMAX) || defined (n16)
 10.1335 +#if defined (UMAXV)
 10.1336 +  printf ("ns32k-encore-sysv\n"); exit (0);
 10.1337 +#else
 10.1338 +#if defined (CMU)
 10.1339 +  printf ("ns32k-encore-mach\n"); exit (0);
 10.1340 +#else
 10.1341 +  printf ("ns32k-encore-bsd\n"); exit (0);
 10.1342 +#endif
 10.1343 +#endif
 10.1344 +#endif
 10.1345 +
 10.1346 +#if defined (__386BSD__)
 10.1347 +  printf ("i386-pc-bsd\n"); exit (0);
 10.1348 +#endif
 10.1349 +
 10.1350 +#if defined (sequent)
 10.1351 +#if defined (i386)
 10.1352 +  printf ("i386-sequent-dynix\n"); exit (0);
 10.1353 +#endif
 10.1354 +#if defined (ns32000)
 10.1355 +  printf ("ns32k-sequent-dynix\n"); exit (0);
 10.1356 +#endif
 10.1357 +#endif
 10.1358 +
 10.1359 +#if defined (_SEQUENT_)
 10.1360 +    struct utsname un;
 10.1361 +
 10.1362 +    uname(&un);
 10.1363 +
 10.1364 +    if (strncmp(un.version, "V2", 2) == 0) {
 10.1365 +	printf ("i386-sequent-ptx2\n"); exit (0);
 10.1366 +    }
 10.1367 +    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
 10.1368 +	printf ("i386-sequent-ptx1\n"); exit (0);
 10.1369 +    }
 10.1370 +    printf ("i386-sequent-ptx\n"); exit (0);
 10.1371 +
 10.1372 +#endif
 10.1373 +
 10.1374 +#if defined (vax)
 10.1375 +# if !defined (ultrix)
 10.1376 +#  include <sys/param.h>
 10.1377 +#  if defined (BSD)
 10.1378 +#   if BSD == 43
 10.1379 +      printf ("vax-dec-bsd4.3\n"); exit (0);
 10.1380 +#   else
 10.1381 +#    if BSD == 199006
 10.1382 +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
 10.1383 +#    else
 10.1384 +      printf ("vax-dec-bsd\n"); exit (0);
 10.1385 +#    endif
 10.1386 +#   endif
 10.1387 +#  else
 10.1388 +    printf ("vax-dec-bsd\n"); exit (0);
 10.1389 +#  endif
 10.1390 +# else
 10.1391 +    printf ("vax-dec-ultrix\n"); exit (0);
 10.1392 +# endif
 10.1393 +#endif
 10.1394 +
 10.1395 +#if defined (alliant) && defined (i860)
 10.1396 +  printf ("i860-alliant-bsd\n"); exit (0);
 10.1397 +#endif
 10.1398 +
 10.1399 +  exit (1);
 10.1400 +}
 10.1401 +EOF
 10.1402 +
 10.1403 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
 10.1404 +	{ echo "$SYSTEM_NAME"; exit; }
 10.1405 +
 10.1406 +# Apollos put the system type in the environment.
 10.1407 +
 10.1408 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 10.1409 +
 10.1410 +# Convex versions that predate uname can use getsysinfo(1)
 10.1411 +
 10.1412 +if [ -x /usr/convex/getsysinfo ]
 10.1413 +then
 10.1414 +    case `getsysinfo -f cpu_type` in
 10.1415 +    c1*)
 10.1416 +	echo c1-convex-bsd
 10.1417 +	exit ;;
 10.1418 +    c2*)
 10.1419 +	if getsysinfo -f scalar_acc
 10.1420 +	then echo c32-convex-bsd
 10.1421 +	else echo c2-convex-bsd
 10.1422 +	fi
 10.1423 +	exit ;;
 10.1424 +    c34*)
 10.1425 +	echo c34-convex-bsd
 10.1426 +	exit ;;
 10.1427 +    c38*)
 10.1428 +	echo c38-convex-bsd
 10.1429 +	exit ;;
 10.1430 +    c4*)
 10.1431 +	echo c4-convex-bsd
 10.1432 +	exit ;;
 10.1433 +    esac
 10.1434 +fi
 10.1435 +
 10.1436 +cat >&2 <<EOF
 10.1437 +$0: unable to guess system type
 10.1438 +
 10.1439 +This script, last modified $timestamp, has failed to recognize
 10.1440 +the operating system you are using. It is advised that you
 10.1441 +download the most up to date version of the config scripts from
 10.1442 +
 10.1443 +  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
 10.1444 +and
 10.1445 +  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 10.1446 +
 10.1447 +If the version you run ($0) is already up to date, please
 10.1448 +send the following data and any information you think might be
 10.1449 +pertinent to <config-patches@gnu.org> in order to provide the needed
 10.1450 +information to handle your system.
 10.1451 +
 10.1452 +config.guess timestamp = $timestamp
 10.1453 +
 10.1454 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
 10.1455 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
 10.1456 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
 10.1457 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
 10.1458 +
 10.1459 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
 10.1460 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
 10.1461 +
 10.1462 +hostinfo               = `(hostinfo) 2>/dev/null`
 10.1463 +/bin/universe          = `(/bin/universe) 2>/dev/null`
 10.1464 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
 10.1465 +/bin/arch              = `(/bin/arch) 2>/dev/null`
 10.1466 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
 10.1467 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
 10.1468 +
 10.1469 +UNAME_MACHINE = ${UNAME_MACHINE}
 10.1470 +UNAME_RELEASE = ${UNAME_RELEASE}
 10.1471 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
 10.1472 +UNAME_VERSION = ${UNAME_VERSION}
 10.1473 +EOF
 10.1474 +
 10.1475 +exit 1
 10.1476 +
 10.1477 +# Local variables:
 10.1478 +# eval: (add-hook 'write-file-hooks 'time-stamp)
 10.1479 +# time-stamp-start: "timestamp='"
 10.1480 +# time-stamp-format: "%:y-%02m-%02d"
 10.1481 +# time-stamp-end: "'"
 10.1482 +# End:
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/build-scripts/config.sub	Sun Apr 30 20:27:33 2006 +0000
    11.3 @@ -0,0 +1,1606 @@
    11.4 +#! /bin/sh
    11.5 +# Configuration validation subroutine script.
    11.6 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    11.7 +#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    11.8 +
    11.9 +timestamp='2006-01-02'
   11.10 +
   11.11 +# This file is (in principle) common to ALL GNU software.
   11.12 +# The presence of a machine in this file suggests that SOME GNU software
   11.13 +# can handle that machine.  It does not imply ALL GNU software can.
   11.14 +#
   11.15 +# This file is free software; you can redistribute it and/or modify
   11.16 +# it under the terms of the GNU General Public License as published by
   11.17 +# the Free Software Foundation; either version 2 of the License, or
   11.18 +# (at your option) any later version.
   11.19 +#
   11.20 +# This program is distributed in the hope that it will be useful,
   11.21 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.22 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11.23 +# GNU General Public License for more details.
   11.24 +#
   11.25 +# You should have received a copy of the GNU General Public License
   11.26 +# along with this program; if not, write to the Free Software
   11.27 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
   11.28 +# 02110-1301, USA.
   11.29 +#
   11.30 +# As a special exception to the GNU General Public License, if you
   11.31 +# distribute this file as part of a program that contains a
   11.32 +# configuration script generated by Autoconf, you may include it under
   11.33 +# the same distribution terms that you use for the rest of that program.
   11.34 +
   11.35 +
   11.36 +# Please send patches to <config-patches@gnu.org>.  Submit a context
   11.37 +# diff and a properly formatted ChangeLog entry.
   11.38 +#
   11.39 +# Configuration subroutine to validate and canonicalize a configuration type.
   11.40 +# Supply the specified configuration type as an argument.
   11.41 +# If it is invalid, we print an error message on stderr and exit with code 1.
   11.42 +# Otherwise, we print the canonical config type on stdout and succeed.
   11.43 +
   11.44 +# This file is supposed to be the same for all GNU packages
   11.45 +# and recognize all the CPU types, system types and aliases
   11.46 +# that are meaningful with *any* GNU software.
   11.47 +# Each package is responsible for reporting which valid configurations
   11.48 +# it does not support.  The user should be able to distinguish
   11.49 +# a failure to support a valid configuration from a meaningless
   11.50 +# configuration.
   11.51 +
   11.52 +# The goal of this file is to map all the various variations of a given
   11.53 +# machine specification into a single specification in the form:
   11.54 +#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
   11.55 +# or in some cases, the newer four-part form:
   11.56 +#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
   11.57 +# It is wrong to echo any other type of specification.
   11.58 +
   11.59 +me=`echo "$0" | sed -e 's,.*/,,'`
   11.60 +
   11.61 +usage="\
   11.62 +Usage: $0 [OPTION] CPU-MFR-OPSYS
   11.63 +       $0 [OPTION] ALIAS
   11.64 +
   11.65 +Canonicalize a configuration name.
   11.66 +
   11.67 +Operation modes:
   11.68 +  -h, --help         print this help, then exit
   11.69 +  -t, --time-stamp   print date of last modification, then exit
   11.70 +  -v, --version      print version number, then exit
   11.71 +
   11.72 +Report bugs and patches to <config-patches@gnu.org>."
   11.73 +
   11.74 +version="\
   11.75 +GNU config.sub ($timestamp)
   11.76 +
   11.77 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
   11.78 +Free Software Foundation, Inc.
   11.79 +
   11.80 +This is free software; see the source for copying conditions.  There is NO
   11.81 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
   11.82 +
   11.83 +help="
   11.84 +Try \`$me --help' for more information."
   11.85 +
   11.86 +# Parse command line
   11.87 +while test $# -gt 0 ; do
   11.88 +  case $1 in
   11.89 +    --time-stamp | --time* | -t )
   11.90 +       echo "$timestamp" ; exit ;;
   11.91 +    --version | -v )
   11.92 +       echo "$version" ; exit ;;
   11.93 +    --help | --h* | -h )
   11.94 +       echo "$usage"; exit ;;
   11.95 +    -- )     # Stop option processing
   11.96 +       shift; break ;;
   11.97 +    - )	# Use stdin as input.
   11.98 +       break ;;
   11.99 +    -* )
  11.100 +       echo "$me: invalid option $1$help"
  11.101 +       exit 1 ;;
  11.102 +
  11.103 +    *local*)
  11.104 +       # First pass through any local machine types.
  11.105 +       echo $1
  11.106 +       exit ;;
  11.107 +
  11.108 +    * )
  11.109 +       break ;;
  11.110 +  esac
  11.111 +done
  11.112 +
  11.113 +case $# in
  11.114 + 0) echo "$me: missing argument$help" >&2
  11.115 +    exit 1;;
  11.116 + 1) ;;
  11.117 + *) echo "$me: too many arguments$help" >&2
  11.118 +    exit 1;;
  11.119 +esac
  11.120 +
  11.121 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  11.122 +# Here we must recognize all the valid KERNEL-OS combinations.
  11.123 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  11.124 +case $maybe_os in
  11.125 +  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
  11.126 +  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
  11.127 +  storm-chaos* | os2-emx* | rtmk-nova*)
  11.128 +    os=-$maybe_os
  11.129 +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  11.130 +    ;;
  11.131 +  *)
  11.132 +    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  11.133 +    if [ $basic_machine != $1 ]
  11.134 +    then os=`echo $1 | sed 's/.*-/-/'`
  11.135 +    else os=; fi
  11.136 +    ;;
  11.137 +esac
  11.138 +
  11.139 +### Let's recognize common machines as not being operating systems so
  11.140 +### that things like config.sub decstation-3100 work.  We also
  11.141 +### recognize some manufacturers as not being operating systems, so we
  11.142 +### can provide default operating systems below.
  11.143 +case $os in
  11.144 +	-sun*os*)
  11.145 +		# Prevent following clause from handling this invalid input.
  11.146 +		;;
  11.147 +	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  11.148 +	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  11.149 +	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  11.150 +	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  11.151 +	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  11.152 +	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  11.153 +	-apple | -axis | -knuth | -cray)
  11.154 +		os=
  11.155 +		basic_machine=$1
  11.156 +		;;
  11.157 +	-sim | -cisco | -oki | -wec | -winbond)
  11.158 +		os=
  11.159 +		basic_machine=$1
  11.160 +		;;
  11.161 +	-scout)
  11.162 +		;;
  11.163 +	-wrs)
  11.164 +		os=-vxworks
  11.165 +		basic_machine=$1
  11.166 +		;;
  11.167 +	-chorusos*)
  11.168 +		os=-chorusos
  11.169 +		basic_machine=$1
  11.170 +		;;
  11.171 + 	-chorusrdb)
  11.172 + 		os=-chorusrdb
  11.173 +		basic_machine=$1
  11.174 + 		;;
  11.175 +	-hiux*)
  11.176 +		os=-hiuxwe2
  11.177 +		;;
  11.178 +	-sco6)
  11.179 +		os=-sco5v6
  11.180 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.181 +		;;
  11.182 +	-sco5)
  11.183 +		os=-sco3.2v5
  11.184 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.185 +		;;
  11.186 +	-sco4)
  11.187 +		os=-sco3.2v4
  11.188 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.189 +		;;
  11.190 +	-sco3.2.[4-9]*)
  11.191 +		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  11.192 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.193 +		;;
  11.194 +	-sco3.2v[4-9]*)
  11.195 +		# Don't forget version if it is 3.2v4 or newer.
  11.196 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.197 +		;;
  11.198 +	-sco5v6*)
  11.199 +		# Don't forget version if it is 3.2v4 or newer.
  11.200 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.201 +		;;
  11.202 +	-sco*)
  11.203 +		os=-sco3.2v2
  11.204 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.205 +		;;
  11.206 +	-udk*)
  11.207 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.208 +		;;
  11.209 +	-isc)
  11.210 +		os=-isc2.2
  11.211 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.212 +		;;
  11.213 +	-clix*)
  11.214 +		basic_machine=clipper-intergraph
  11.215 +		;;
  11.216 +	-isc*)
  11.217 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  11.218 +		;;
  11.219 +	-lynx*)
  11.220 +		os=-lynxos
  11.221 +		;;
  11.222 +	-ptx*)
  11.223 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  11.224 +		;;
  11.225 +	-windowsnt*)
  11.226 +		os=`echo $os | sed -e 's/windowsnt/winnt/'`
  11.227 +		;;
  11.228 +	-psos*)
  11.229 +		os=-psos
  11.230 +		;;
  11.231 +	-mint | -mint[0-9]*)
  11.232 +		basic_machine=m68k-atari
  11.233 +		os=-mint
  11.234 +		;;
  11.235 +esac
  11.236 +
  11.237 +# Decode aliases for certain CPU-COMPANY combinations.
  11.238 +case $basic_machine in
  11.239 +	# Recognize the basic CPU types without company name.
  11.240 +	# Some are omitted here because they have special meanings below.
  11.241 +	1750a | 580 \
  11.242 +	| a29k \
  11.243 +	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
  11.244 +	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
  11.245 +	| am33_2.0 \
  11.246 +	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
  11.247 +	| bfin \
  11.248 +	| c4x | clipper \
  11.249 +	| d10v | d30v | dlx | dsp16xx \
  11.250 +	| fr30 | frv \
  11.251 +	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  11.252 +	| i370 | i860 | i960 | ia64 \
  11.253 +	| ip2k | iq2000 \
  11.254 +	| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
  11.255 +	| mips | mipsbe | mipseb | mipsel | mipsle \
  11.256 +	| mips16 \
  11.257 +	| mips64 | mips64el \
  11.258 +	| mips64vr | mips64vrel \
  11.259 +	| mips64orion | mips64orionel \
  11.260 +	| mips64vr4100 | mips64vr4100el \
  11.261 +	| mips64vr4300 | mips64vr4300el \
  11.262 +	| mips64vr5000 | mips64vr5000el \
  11.263 +	| mips64vr5900 | mips64vr5900el \
  11.264 +	| mipsisa32 | mipsisa32el \
  11.265 +	| mipsisa32r2 | mipsisa32r2el \
  11.266 +	| mipsisa64 | mipsisa64el \
  11.267 +	| mipsisa64r2 | mipsisa64r2el \
  11.268 +	| mipsisa64sb1 | mipsisa64sb1el \
  11.269 +	| mipsisa64sr71k | mipsisa64sr71kel \
  11.270 +	| mipstx39 | mipstx39el \
  11.271 +	| mn10200 | mn10300 \
  11.272 +	| mt \
  11.273 +	| msp430 \
  11.274 +	| ns16k | ns32k \
  11.275 +	| or32 \
  11.276 +	| pdp10 | pdp11 | pj | pjl \
  11.277 +	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
  11.278 +	| pyramid \
  11.279 +	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
  11.280 +	| sh64 | sh64le \
  11.281 +	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
  11.282 +	| sparcv8 | sparcv9 | sparcv9b \
  11.283 +	| strongarm \
  11.284 +	| tahoe | thumb | tic4x | tic80 | tron \
  11.285 +	| v850 | v850e \
  11.286 +	| we32k \
  11.287 +	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
  11.288 +	| z8k)
  11.289 +		basic_machine=$basic_machine-unknown
  11.290 +		;;
  11.291 +	m32c)
  11.292 +		basic_machine=$basic_machine-unknown
  11.293 +		;;
  11.294 +	m6811 | m68hc11 | m6812 | m68hc12)
  11.295 +		# Motorola 68HC11/12.
  11.296 +		basic_machine=$basic_machine-unknown
  11.297 +		os=-none
  11.298 +		;;
  11.299 +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
  11.300 +		;;
  11.301 +	ms1)
  11.302 +		basic_machine=mt-unknown
  11.303 +		;;
  11.304 +
  11.305 +	# We use `pc' rather than `unknown'
  11.306 +	# because (1) that's what they normally are, and
  11.307 +	# (2) the word "unknown" tends to confuse beginning users.
  11.308 +	i*86 | x86_64)
  11.309 +	  basic_machine=$basic_machine-pc
  11.310 +	  ;;
  11.311 +	# Object if more than one company name word.
  11.312 +	*-*-*)
  11.313 +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  11.314 +		exit 1
  11.315 +		;;
  11.316 +	# Recognize the basic CPU types with company name.
  11.317 +	580-* \
  11.318 +	| a29k-* \
  11.319 +	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
  11.320 +	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
  11.321 +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
  11.322 +	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
  11.323 +	| avr-* \
  11.324 +	| bfin-* | bs2000-* \
  11.325 +	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
  11.326 +	| clipper-* | craynv-* | cydra-* \
  11.327 +	| d10v-* | d30v-* | dlx-* \
  11.328 +	| elxsi-* \
  11.329 +	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
  11.330 +	| h8300-* | h8500-* \
  11.331 +	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
  11.332 +	| i*86-* | i860-* | i960-* | ia64-* \
  11.333 +	| ip2k-* | iq2000-* \
  11.334 +	| m32r-* | m32rle-* \
  11.335 +	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
  11.336 +	| m88110-* | m88k-* | maxq-* | mcore-* \
  11.337 +	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
  11.338 +	| mips16-* \
  11.339 +	| mips64-* | mips64el-* \
  11.340 +	| mips64vr-* | mips64vrel-* \
  11.341 +	| mips64orion-* | mips64orionel-* \
  11.342 +	| mips64vr4100-* | mips64vr4100el-* \
  11.343 +	| mips64vr4300-* | mips64vr4300el-* \
  11.344 +	| mips64vr5000-* | mips64vr5000el-* \
  11.345 +	| mips64vr5900-* | mips64vr5900el-* \
  11.346 +	| mipsisa32-* | mipsisa32el-* \
  11.347 +	| mipsisa32r2-* | mipsisa32r2el-* \
  11.348 +	| mipsisa64-* | mipsisa64el-* \
  11.349 +	| mipsisa64r2-* | mipsisa64r2el-* \
  11.350 +	| mipsisa64sb1-* | mipsisa64sb1el-* \
  11.351 +	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
  11.352 +	| mipstx39-* | mipstx39el-* \
  11.353 +	| mmix-* \
  11.354 +	| mt-* \
  11.355 +	| msp430-* \
  11.356 +	| none-* | np1-* | ns16k-* | ns32k-* \
  11.357 +	| orion-* \
  11.358 +	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
  11.359 +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
  11.360 +	| pyramid-* \
  11.361 +	| romp-* | rs6000-* \
  11.362 +	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
  11.363 +	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
  11.364 +	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
  11.365 +	| sparclite-* \
  11.366 +	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
  11.367 +	| tahoe-* | thumb-* \
  11.368 +	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
  11.369 +	| tron-* \
  11.370 +	| v850-* | v850e-* | vax-* \
  11.371 +	| we32k-* \
  11.372 +	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
  11.373 +	| xstormy16-* | xtensa-* \
  11.374 +	| ymp-* \
  11.375 +	| z8k-*)
  11.376 +		;;
  11.377 +	m32c-*)
  11.378 +		;;
  11.379 +	# Recognize the various machine names and aliases which stand
  11.380 +	# for a CPU type and a company and sometimes even an OS.
  11.381 +	386bsd)
  11.382 +		basic_machine=i386-unknown
  11.383 +		os=-bsd
  11.384 +		;;
  11.385 +	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  11.386 +		basic_machine=m68000-att
  11.387 +		;;
  11.388 +	3b*)
  11.389 +		basic_machine=we32k-att
  11.390 +		;;
  11.391 +	a29khif)
  11.392 +		basic_machine=a29k-amd
  11.393 +		os=-udi
  11.394 +		;;
  11.395 +    	abacus)
  11.396 +		basic_machine=abacus-unknown
  11.397 +		;;
  11.398 +	adobe68k)
  11.399 +		basic_machine=m68010-adobe
  11.400 +		os=-scout
  11.401 +		;;
  11.402 +	alliant | fx80)
  11.403 +		basic_machine=fx80-alliant
  11.404 +		;;
  11.405 +	altos | altos3068)
  11.406 +		basic_machine=m68k-altos
  11.407 +		;;
  11.408 +	am29k)
  11.409 +		basic_machine=a29k-none
  11.410 +		os=-bsd
  11.411 +		;;
  11.412 +	amd64)
  11.413 +		basic_machine=x86_64-pc
  11.414 +		;;
  11.415 +	amd64-*)
  11.416 +		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.417 +		;;
  11.418 +	amdahl)
  11.419 +		basic_machine=580-amdahl
  11.420 +		os=-sysv
  11.421 +		;;
  11.422 +	amiga | amiga-*)
  11.423 +		basic_machine=m68k-unknown
  11.424 +		;;
  11.425 +	amigaos | amigados)
  11.426 +		basic_machine=m68k-unknown
  11.427 +		os=-amigaos
  11.428 +		;;
  11.429 +	amigaunix | amix)
  11.430 +		basic_machine=m68k-unknown
  11.431 +		os=-sysv4
  11.432 +		;;
  11.433 +	apollo68)
  11.434 +		basic_machine=m68k-apollo
  11.435 +		os=-sysv
  11.436 +		;;
  11.437 +	apollo68bsd)
  11.438 +		basic_machine=m68k-apollo
  11.439 +		os=-bsd
  11.440 +		;;
  11.441 +	aux)
  11.442 +		basic_machine=m68k-apple
  11.443 +		os=-aux
  11.444 +		;;
  11.445 +	balance)
  11.446 +		basic_machine=ns32k-sequent
  11.447 +		os=-dynix
  11.448 +		;;
  11.449 +	c90)
  11.450 +		basic_machine=c90-cray
  11.451 +		os=-unicos
  11.452 +		;;
  11.453 +	convex-c1)
  11.454 +		basic_machine=c1-convex
  11.455 +		os=-bsd
  11.456 +		;;
  11.457 +	convex-c2)
  11.458 +		basic_machine=c2-convex
  11.459 +		os=-bsd
  11.460 +		;;
  11.461 +	convex-c32)
  11.462 +		basic_machine=c32-convex
  11.463 +		os=-bsd
  11.464 +		;;
  11.465 +	convex-c34)
  11.466 +		basic_machine=c34-convex
  11.467 +		os=-bsd
  11.468 +		;;
  11.469 +	convex-c38)
  11.470 +		basic_machine=c38-convex
  11.471 +		os=-bsd
  11.472 +		;;
  11.473 +	cray | j90)
  11.474 +		basic_machine=j90-cray
  11.475 +		os=-unicos
  11.476 +		;;
  11.477 +	craynv)
  11.478 +		basic_machine=craynv-cray
  11.479 +		os=-unicosmp
  11.480 +		;;
  11.481 +	cr16c)
  11.482 +		basic_machine=cr16c-unknown
  11.483 +		os=-elf
  11.484 +		;;
  11.485 +	crds | unos)
  11.486 +		basic_machine=m68k-crds
  11.487 +		;;
  11.488 +	crisv32 | crisv32-* | etraxfs*)
  11.489 +		basic_machine=crisv32-axis
  11.490 +		;;
  11.491 +	cris | cris-* | etrax*)
  11.492 +		basic_machine=cris-axis
  11.493 +		;;
  11.494 +	crx)
  11.495 +		basic_machine=crx-unknown
  11.496 +		os=-elf
  11.497 +		;;
  11.498 +	da30 | da30-*)
  11.499 +		basic_machine=m68k-da30
  11.500 +		;;
  11.501 +	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  11.502 +		basic_machine=mips-dec
  11.503 +		;;
  11.504 +	decsystem10* | dec10*)
  11.505 +		basic_machine=pdp10-dec
  11.506 +		os=-tops10
  11.507 +		;;
  11.508 +	decsystem20* | dec20*)
  11.509 +		basic_machine=pdp10-dec
  11.510 +		os=-tops20
  11.511 +		;;
  11.512 +	delta | 3300 | motorola-3300 | motorola-delta \
  11.513 +	      | 3300-motorola | delta-motorola)
  11.514 +		basic_machine=m68k-motorola
  11.515 +		;;
  11.516 +	delta88)
  11.517 +		basic_machine=m88k-motorola
  11.518 +		os=-sysv3
  11.519 +		;;
  11.520 +	djgpp)
  11.521 +		basic_machine=i586-pc
  11.522 +		os=-msdosdjgpp
  11.523 +		;;
  11.524 +	dpx20 | dpx20-*)
  11.525 +		basic_machine=rs6000-bull
  11.526 +		os=-bosx
  11.527 +		;;
  11.528 +	dpx2* | dpx2*-bull)
  11.529 +		basic_machine=m68k-bull
  11.530 +		os=-sysv3
  11.531 +		;;
  11.532 +	ebmon29k)
  11.533 +		basic_machine=a29k-amd
  11.534 +		os=-ebmon
  11.535 +		;;
  11.536 +	elxsi)
  11.537 +		basic_machine=elxsi-elxsi
  11.538 +		os=-bsd
  11.539 +		;;
  11.540 +	encore | umax | mmax)
  11.541 +		basic_machine=ns32k-encore
  11.542 +		;;
  11.543 +	es1800 | OSE68k | ose68k | ose | OSE)
  11.544 +		basic_machine=m68k-ericsson
  11.545 +		os=-ose
  11.546 +		;;
  11.547 +	fx2800)
  11.548 +		basic_machine=i860-alliant
  11.549 +		;;
  11.550 +	genix)
  11.551 +		basic_machine=ns32k-ns
  11.552 +		;;
  11.553 +	gmicro)
  11.554 +		basic_machine=tron-gmicro
  11.555 +		os=-sysv
  11.556 +		;;
  11.557 +	go32)
  11.558 +		basic_machine=i386-pc
  11.559 +		os=-go32
  11.560 +		;;
  11.561 +	h3050r* | hiux*)
  11.562 +		basic_machine=hppa1.1-hitachi
  11.563 +		os=-hiuxwe2
  11.564 +		;;
  11.565 +	h8300hms)
  11.566 +		basic_machine=h8300-hitachi
  11.567 +		os=-hms
  11.568 +		;;
  11.569 +	h8300xray)
  11.570 +		basic_machine=h8300-hitachi
  11.571 +		os=-xray
  11.572 +		;;
  11.573 +	h8500hms)
  11.574 +		basic_machine=h8500-hitachi
  11.575 +		os=-hms
  11.576 +		;;
  11.577 +	harris)
  11.578 +		basic_machine=m88k-harris
  11.579 +		os=-sysv3
  11.580 +		;;
  11.581 +	hp300-*)
  11.582 +		basic_machine=m68k-hp
  11.583 +		;;
  11.584 +	hp300bsd)
  11.585 +		basic_machine=m68k-hp
  11.586 +		os=-bsd
  11.587 +		;;
  11.588 +	hp300hpux)
  11.589 +		basic_machine=m68k-hp
  11.590 +		os=-hpux
  11.591 +		;;
  11.592 +	hp3k9[0-9][0-9] | hp9[0-9][0-9])
  11.593 +		basic_machine=hppa1.0-hp
  11.594 +		;;
  11.595 +	hp9k2[0-9][0-9] | hp9k31[0-9])
  11.596 +		basic_machine=m68000-hp
  11.597 +		;;
  11.598 +	hp9k3[2-9][0-9])
  11.599 +		basic_machine=m68k-hp
  11.600 +		;;
  11.601 +	hp9k6[0-9][0-9] | hp6[0-9][0-9])
  11.602 +		basic_machine=hppa1.0-hp
  11.603 +		;;
  11.604 +	hp9k7[0-79][0-9] | hp7[0-79][0-9])
  11.605 +		basic_machine=hppa1.1-hp
  11.606 +		;;
  11.607 +	hp9k78[0-9] | hp78[0-9])
  11.608 +		# FIXME: really hppa2.0-hp
  11.609 +		basic_machine=hppa1.1-hp
  11.610 +		;;
  11.611 +	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  11.612 +		# FIXME: really hppa2.0-hp
  11.613 +		basic_machine=hppa1.1-hp
  11.614 +		;;
  11.615 +	hp9k8[0-9][13679] | hp8[0-9][13679])
  11.616 +		basic_machine=hppa1.1-hp
  11.617 +		;;
  11.618 +	hp9k8[0-9][0-9] | hp8[0-9][0-9])
  11.619 +		basic_machine=hppa1.0-hp
  11.620 +		;;
  11.621 +	hppa-next)
  11.622 +		os=-nextstep3
  11.623 +		;;
  11.624 +	hppaosf)
  11.625 +		basic_machine=hppa1.1-hp
  11.626 +		os=-osf
  11.627 +		;;
  11.628 +	hppro)
  11.629 +		basic_machine=hppa1.1-hp
  11.630 +		os=-proelf
  11.631 +		;;
  11.632 +	i370-ibm* | ibm*)
  11.633 +		basic_machine=i370-ibm
  11.634 +		;;
  11.635 +# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
  11.636 +	i*86v32)
  11.637 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  11.638 +		os=-sysv32
  11.639 +		;;
  11.640 +	i*86v4*)
  11.641 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  11.642 +		os=-sysv4
  11.643 +		;;
  11.644 +	i*86v)
  11.645 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  11.646 +		os=-sysv
  11.647 +		;;
  11.648 +	i*86sol2)
  11.649 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  11.650 +		os=-solaris2
  11.651 +		;;
  11.652 +	i386mach)
  11.653 +		basic_machine=i386-mach
  11.654 +		os=-mach
  11.655 +		;;
  11.656 +	i386-vsta | vsta)
  11.657 +		basic_machine=i386-unknown
  11.658 +		os=-vsta
  11.659 +		;;
  11.660 +	iris | iris4d)
  11.661 +		basic_machine=mips-sgi
  11.662 +		case $os in
  11.663 +		    -irix*)
  11.664 +			;;
  11.665 +		    *)
  11.666 +			os=-irix4
  11.667 +			;;
  11.668 +		esac
  11.669 +		;;
  11.670 +	isi68 | isi)
  11.671 +		basic_machine=m68k-isi
  11.672 +		os=-sysv
  11.673 +		;;
  11.674 +	m88k-omron*)
  11.675 +		basic_machine=m88k-omron
  11.676 +		;;
  11.677 +	magnum | m3230)
  11.678 +		basic_machine=mips-mips
  11.679 +		os=-sysv
  11.680 +		;;
  11.681 +	merlin)
  11.682 +		basic_machine=ns32k-utek
  11.683 +		os=-sysv
  11.684 +		;;
  11.685 +	mingw32)
  11.686 +		basic_machine=i386-pc
  11.687 +		os=-mingw32
  11.688 +		;;
  11.689 +	miniframe)
  11.690 +		basic_machine=m68000-convergent
  11.691 +		;;
  11.692 +	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  11.693 +		basic_machine=m68k-atari
  11.694 +		os=-mint
  11.695 +		;;
  11.696 +	mips3*-*)
  11.697 +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  11.698 +		;;
  11.699 +	mips3*)
  11.700 +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  11.701 +		;;
  11.702 +	monitor)
  11.703 +		basic_machine=m68k-rom68k
  11.704 +		os=-coff
  11.705 +		;;
  11.706 +	morphos)
  11.707 +		basic_machine=powerpc-unknown
  11.708 +		os=-morphos
  11.709 +		;;
  11.710 +	msdos)
  11.711 +		basic_machine=i386-pc
  11.712 +		os=-msdos
  11.713 +		;;
  11.714 +	ms1-*)
  11.715 +		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  11.716 +		;;
  11.717 +	mvs)
  11.718 +		basic_machine=i370-ibm
  11.719 +		os=-mvs
  11.720 +		;;
  11.721 +	ncr3000)
  11.722 +		basic_machine=i486-ncr
  11.723 +		os=-sysv4
  11.724 +		;;
  11.725 +	netbsd386)
  11.726 +		basic_machine=i386-unknown
  11.727 +		os=-netbsd
  11.728 +		;;
  11.729 +	netwinder)
  11.730 +		basic_machine=armv4l-rebel
  11.731 +		os=-linux
  11.732 +		;;
  11.733 +	news | news700 | news800 | news900)
  11.734 +		basic_machine=m68k-sony
  11.735 +		os=-newsos
  11.736 +		;;
  11.737 +	news1000)
  11.738 +		basic_machine=m68030-sony
  11.739 +		os=-newsos
  11.740 +		;;
  11.741 +	news-3600 | risc-news)
  11.742 +		basic_machine=mips-sony
  11.743 +		os=-newsos
  11.744 +		;;
  11.745 +	necv70)
  11.746 +		basic_machine=v70-nec
  11.747 +		os=-sysv
  11.748 +		;;
  11.749 +	next | m*-next )
  11.750 +		basic_machine=m68k-next
  11.751 +		case $os in
  11.752 +		    -nextstep* )
  11.753 +			;;
  11.754 +		    -ns2*)
  11.755 +		      os=-nextstep2
  11.756 +			;;
  11.757 +		    *)
  11.758 +		      os=-nextstep3
  11.759 +			;;
  11.760 +		esac
  11.761 +		;;
  11.762 +	nh3000)
  11.763 +		basic_machine=m68k-harris
  11.764 +		os=-cxux
  11.765 +		;;
  11.766 +	nh[45]000)
  11.767 +		basic_machine=m88k-harris
  11.768 +		os=-cxux
  11.769 +		;;
  11.770 +	nindy960)
  11.771 +		basic_machine=i960-intel
  11.772 +		os=-nindy
  11.773 +		;;
  11.774 +	mon960)
  11.775 +		basic_machine=i960-intel
  11.776 +		os=-mon960
  11.777 +		;;
  11.778 +	nonstopux)
  11.779 +		basic_machine=mips-compaq
  11.780 +		os=-nonstopux
  11.781 +		;;
  11.782 +	np1)
  11.783 +		basic_machine=np1-gould
  11.784 +		;;
  11.785 +	nsr-tandem)
  11.786 +		basic_machine=nsr-tandem
  11.787 +		;;
  11.788 +	op50n-* | op60c-*)
  11.789 +		basic_machine=hppa1.1-oki
  11.790 +		os=-proelf
  11.791 +		;;
  11.792 +	openrisc | openrisc-*)
  11.793 +		basic_machine=or32-unknown
  11.794 +		;;
  11.795 +	os400)
  11.796 +		basic_machine=powerpc-ibm
  11.797 +		os=-os400
  11.798 +		;;
  11.799 +	OSE68000 | ose68000)
  11.800 +		basic_machine=m68000-ericsson
  11.801 +		os=-ose
  11.802 +		;;
  11.803 +	os68k)
  11.804 +		basic_machine=m68k-none
  11.805 +		os=-os68k
  11.806 +		;;
  11.807 +	pa-hitachi)
  11.808 +		basic_machine=hppa1.1-hitachi
  11.809 +		os=-hiuxwe2
  11.810 +		;;
  11.811 +	paragon)
  11.812 +		basic_machine=i860-intel
  11.813 +		os=-osf
  11.814 +		;;
  11.815 +	pbd)
  11.816 +		basic_machine=sparc-tti
  11.817 +		;;
  11.818 +	pbb)
  11.819 +		basic_machine=m68k-tti
  11.820 +		;;
  11.821 +	pc532 | pc532-*)
  11.822 +		basic_machine=ns32k-pc532
  11.823 +		;;
  11.824 +	pc98)
  11.825 +		basic_machine=i386-pc
  11.826 +		;;
  11.827 +	pc98-*)
  11.828 +		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.829 +		;;
  11.830 +	pentium | p5 | k5 | k6 | nexgen | viac3)
  11.831 +		basic_machine=i586-pc
  11.832 +		;;
  11.833 +	pentiumpro | p6 | 6x86 | athlon | athlon_*)
  11.834 +		basic_machine=i686-pc
  11.835 +		;;
  11.836 +	pentiumii | pentium2 | pentiumiii | pentium3)
  11.837 +		basic_machine=i686-pc
  11.838 +		;;
  11.839 +	pentium4)
  11.840 +		basic_machine=i786-pc
  11.841 +		;;
  11.842 +	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  11.843 +		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.844 +		;;
  11.845 +	pentiumpro-* | p6-* | 6x86-* | athlon-*)
  11.846 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.847 +		;;
  11.848 +	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  11.849 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.850 +		;;
  11.851 +	pentium4-*)
  11.852 +		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.853 +		;;
  11.854 +	pn)
  11.855 +		basic_machine=pn-gould
  11.856 +		;;
  11.857 +	power)	basic_machine=power-ibm
  11.858 +		;;
  11.859 +	ppc)	basic_machine=powerpc-unknown
  11.860 +		;;
  11.861 +	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.862 +		;;
  11.863 +	ppcle | powerpclittle | ppc-le | powerpc-little)
  11.864 +		basic_machine=powerpcle-unknown
  11.865 +		;;
  11.866 +	ppcle-* | powerpclittle-*)
  11.867 +		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.868 +		;;
  11.869 +	ppc64)	basic_machine=powerpc64-unknown
  11.870 +		;;
  11.871 +	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.872 +		;;
  11.873 +	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
  11.874 +		basic_machine=powerpc64le-unknown
  11.875 +		;;
  11.876 +	ppc64le-* | powerpc64little-*)
  11.877 +		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  11.878 +		;;
  11.879 +	ps2)
  11.880 +		basic_machine=i386-ibm
  11.881 +		;;
  11.882 +	pw32)
  11.883 +		basic_machine=i586-unknown
  11.884 +		os=-pw32
  11.885 +		;;
  11.886 +	rdos)
  11.887 +		basic_machine=i386-pc
  11.888 +		os=-rdos
  11.889 +		;;
  11.890 +	rom68k)
  11.891 +		basic_machine=m68k-rom68k
  11.892 +		os=-coff
  11.893 +		;;
  11.894 +	rm[46]00)
  11.895 +		basic_machine=mips-siemens
  11.896 +		;;
  11.897 +	rtpc | rtpc-*)
  11.898 +		basic_machine=romp-ibm
  11.899 +		;;
  11.900 +	s390 | s390-*)
  11.901 +		basic_machine=s390-ibm
  11.902 +		;;
  11.903 +	s390x | s390x-*)
  11.904 +		basic_machine=s390x-ibm
  11.905 +		;;
  11.906 +	sa29200)
  11.907 +		basic_machine=a29k-amd
  11.908 +		os=-udi
  11.909 +		;;
  11.910 +	sb1)
  11.911 +		basic_machine=mipsisa64sb1-unknown
  11.912 +		;;
  11.913 +	sb1el)
  11.914 +		basic_machine=mipsisa64sb1el-unknown
  11.915 +		;;
  11.916 +	sei)
  11.917 +		basic_machine=mips-sei
  11.918 +		os=-seiux
  11.919 +		;;
  11.920 +	sequent)
  11.921 +		basic_machine=i386-sequent
  11.922 +		;;
  11.923 +	sh)
  11.924 +		basic_machine=sh-hitachi
  11.925 +		os=-hms
  11.926 +		;;
  11.927 +	sh64)
  11.928 +		basic_machine=sh64-unknown
  11.929 +		;;
  11.930 +	sparclite-wrs | simso-wrs)
  11.931 +		basic_machine=sparclite-wrs
  11.932 +		os=-vxworks
  11.933 +		;;
  11.934 +	sps7)
  11.935 +		basic_machine=m68k-bull
  11.936 +		os=-sysv2
  11.937 +		;;
  11.938 +	spur)
  11.939 +		basic_machine=spur-unknown
  11.940 +		;;
  11.941 +	st2000)
  11.942 +		basic_machine=m68k-tandem
  11.943 +		;;
  11.944 +	stratus)
  11.945 +		basic_machine=i860-stratus
  11.946 +		os=-sysv4
  11.947 +		;;
  11.948 +	sun2)
  11.949 +		basic_machine=m68000-sun
  11.950 +		;;
  11.951 +	sun2os3)
  11.952 +		basic_machine=m68000-sun
  11.953 +		os=-sunos3
  11.954 +		;;
  11.955 +	sun2os4)
  11.956 +		basic_machine=m68000-sun
  11.957 +		os=-sunos4
  11.958 +		;;
  11.959 +	sun3os3)
  11.960 +		basic_machine=m68k-sun
  11.961 +		os=-sunos3
  11.962 +		;;
  11.963 +	sun3os4)
  11.964 +		basic_machine=m68k-sun
  11.965 +		os=-sunos4
  11.966 +		;;
  11.967 +	sun4os3)
  11.968 +		basic_machine=sparc-sun
  11.969 +		os=-sunos3
  11.970 +		;;
  11.971 +	sun4os4)
  11.972 +		basic_machine=sparc-sun
  11.973 +		os=-sunos4
  11.974 +		;;
  11.975 +	sun4sol2)
  11.976 +		basic_machine=sparc-sun
  11.977 +		os=-solaris2
  11.978 +		;;
  11.979 +	sun3 | sun3-*)
  11.980 +		basic_machine=m68k-sun
  11.981 +		;;
  11.982 +	sun4)
  11.983 +		basic_machine=sparc-sun
  11.984 +		;;
  11.985 +	sun386 | sun386i | roadrunner)
  11.986 +		basic_machine=i386-sun
  11.987 +		;;
  11.988 +	sv1)
  11.989 +		basic_machine=sv1-cray
  11.990 +		os=-unicos
  11.991 +		;;
  11.992 +	symmetry)
  11.993 +		basic_machine=i386-sequent
  11.994 +		os=-dynix
  11.995 +		;;
  11.996 +	t3e)
  11.997 +		basic_machine=alphaev5-cray
  11.998 +		os=-unicos
  11.999 +		;;
 11.1000 +	t90)
 11.1001 +		basic_machine=t90-cray
 11.1002 +		os=-unicos
 11.1003 +		;;
 11.1004 +	tic54x | c54x*)
 11.1005 +		basic_machine=tic54x-unknown
 11.1006 +		os=-coff
 11.1007 +		;;
 11.1008 +	tic55x | c55x*)
 11.1009 +		basic_machine=tic55x-unknown
 11.1010 +		os=-coff
 11.1011 +		;;
 11.1012 +	tic6x | c6x*)
 11.1013 +		basic_machine=tic6x-unknown
 11.1014 +		os=-coff
 11.1015 +		;;
 11.1016 +	tx39)
 11.1017 +		basic_machine=mipstx39-unknown
 11.1018 +		;;
 11.1019 +	tx39el)
 11.1020 +		basic_machine=mipstx39el-unknown
 11.1021 +		;;
 11.1022 +	toad1)
 11.1023 +		basic_machine=pdp10-xkl
 11.1024 +		os=-tops20
 11.1025 +		;;
 11.1026 +	tower | tower-32)
 11.1027 +		basic_machine=m68k-ncr
 11.1028 +		;;
 11.1029 +	tpf)
 11.1030 +		basic_machine=s390x-ibm
 11.1031 +		os=-tpf
 11.1032 +		;;
 11.1033 +	udi29k)
 11.1034 +		basic_machine=a29k-amd
 11.1035 +		os=-udi
 11.1036 +		;;
 11.1037 +	ultra3)
 11.1038 +		basic_machine=a29k-nyu
 11.1039 +		os=-sym1
 11.1040 +		;;
 11.1041 +	v810 | necv810)
 11.1042 +		basic_machine=v810-nec
 11.1043 +		os=-none
 11.1044 +		;;
 11.1045 +	vaxv)
 11.1046 +		basic_machine=vax-dec
 11.1047 +		os=-sysv
 11.1048 +		;;
 11.1049 +	vms)
 11.1050 +		basic_machine=vax-dec
 11.1051 +		os=-vms
 11.1052 +		;;
 11.1053 +	vpp*|vx|vx-*)
 11.1054 +		basic_machine=f301-fujitsu
 11.1055 +		;;
 11.1056 +	vxworks960)
 11.1057 +		basic_machine=i960-wrs
 11.1058 +		os=-vxworks
 11.1059 +		;;
 11.1060 +	vxworks68)
 11.1061 +		basic_machine=m68k-wrs
 11.1062 +		os=-vxworks
 11.1063 +		;;
 11.1064 +	vxworks29k)
 11.1065 +		basic_machine=a29k-wrs
 11.1066 +		os=-vxworks
 11.1067 +		;;
 11.1068 +	w65*)
 11.1069 +		basic_machine=w65-wdc
 11.1070 +		os=-none
 11.1071 +		;;
 11.1072 +	w89k-*)
 11.1073 +		basic_machine=hppa1.1-winbond
 11.1074 +		os=-proelf
 11.1075 +		;;
 11.1076 +	xbox)
 11.1077 +		basic_machine=i686-pc
 11.1078 +		os=-mingw32
 11.1079 +		;;
 11.1080 +	xps | xps100)
 11.1081 +		basic_machine=xps100-honeywell
 11.1082 +		;;
 11.1083 +	ymp)
 11.1084 +		basic_machine=ymp-cray
 11.1085 +		os=-unicos
 11.1086 +		;;
 11.1087 +	z8k-*-coff)
 11.1088 +		basic_machine=z8k-unknown
 11.1089 +		os=-sim
 11.1090 +		;;
 11.1091 +	none)
 11.1092 +		basic_machine=none-none
 11.1093 +		os=-none
 11.1094 +		;;
 11.1095 +
 11.1096 +# Here we handle the default manufacturer of certain CPU types.  It is in
 11.1097 +# some cases the only manufacturer, in others, it is the most popular.
 11.1098 +	w89k)
 11.1099 +		basic_machine=hppa1.1-winbond
 11.1100 +		;;
 11.1101 +	op50n)
 11.1102 +		basic_machine=hppa1.1-oki
 11.1103 +		;;
 11.1104 +	op60c)
 11.1105 +		basic_machine=hppa1.1-oki
 11.1106 +		;;
 11.1107 +	romp)
 11.1108 +		basic_machine=romp-ibm
 11.1109 +		;;
 11.1110 +	mmix)
 11.1111 +		basic_machine=mmix-knuth
 11.1112 +		;;
 11.1113 +	rs6000)
 11.1114 +		basic_machine=rs6000-ibm
 11.1115 +		;;
 11.1116 +	vax)
 11.1117 +		basic_machine=vax-dec
 11.1118 +		;;
 11.1119 +	pdp10)
 11.1120 +		# there are many clones, so DEC is not a safe bet
 11.1121 +		basic_machine=pdp10-unknown
 11.1122 +		;;
 11.1123 +	pdp11)
 11.1124 +		basic_machine=pdp11-dec
 11.1125 +		;;
 11.1126 +	we32k)
 11.1127 +		basic_machine=we32k-att
 11.1128 +		;;
 11.1129 +	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
 11.1130 +		basic_machine=sh-unknown
 11.1131 +		;;
 11.1132 +	sparc | sparcv8 | sparcv9 | sparcv9b)
 11.1133 +		basic_machine=sparc-sun
 11.1134 +		;;
 11.1135 +	cydra)
 11.1136 +		basic_machine=cydra-cydrome
 11.1137 +		;;
 11.1138 +	orion)
 11.1139 +		basic_machine=orion-highlevel
 11.1140 +		;;
 11.1141 +	orion105)
 11.1142 +		basic_machine=clipper-highlevel
 11.1143 +		;;
 11.1144 +	mac | mpw | mac-mpw)
 11.1145 +		basic_machine=m68k-apple
 11.1146 +		;;
 11.1147 +	pmac | pmac-mpw)
 11.1148 +		basic_machine=powerpc-apple
 11.1149 +		;;
 11.1150 +	*-unknown)
 11.1151 +		# Make sure to match an already-canonicalized machine name.
 11.1152 +		;;
 11.1153 +	*)
 11.1154 +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 11.1155 +		exit 1
 11.1156 +		;;
 11.1157 +esac
 11.1158 +
 11.1159 +# Here we canonicalize certain aliases for manufacturers.
 11.1160 +case $basic_machine in
 11.1161 +	*-digital*)
 11.1162 +		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
 11.1163 +		;;
 11.1164 +	*-commodore*)
 11.1165 +		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
 11.1166 +		;;
 11.1167 +	*)
 11.1168 +		;;
 11.1169 +esac
 11.1170 +
 11.1171 +# Decode manufacturer-specific aliases for certain operating systems.
 11.1172 +
 11.1173 +if [ x"$os" != x"" ]
 11.1174 +then
 11.1175 +case $os in
 11.1176 +        # First match some system type aliases
 11.1177 +        # that might get confused with valid system types.
 11.1178 +	# -solaris* is a basic system type, with this one exception.
 11.1179 +	-solaris1 | -solaris1.*)
 11.1180 +		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 11.1181 +		;;
 11.1182 +	-solaris)
 11.1183 +		os=-solaris2
 11.1184 +		;;
 11.1185 +	-svr4*)
 11.1186 +		os=-sysv4
 11.1187 +		;;
 11.1188 +	-unixware*)
 11.1189 +		os=-sysv4.2uw
 11.1190 +		;;
 11.1191 +	-gnu/linux*)
 11.1192 +		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
 11.1193 +		;;
 11.1194 +	# First accept the basic system types.
 11.1195 +	# The portable systems comes first.
 11.1196 +	# Each alternative MUST END IN A *, to match a version number.
 11.1197 +	# -sysv* is not here because it comes later, after sysvr4.
 11.1198 +	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 11.1199 +	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
 11.1200 +	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
 11.1201 +	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
 11.1202 +	      | -aos* \
 11.1203 +	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 11.1204 +	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 11.1205 +	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
 11.1206 +	      | -openbsd* | -solidbsd* \
 11.1207 +	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 11.1208 +	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 11.1209 +	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 11.1210 +	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 11.1211 +	      | -chorusos* | -chorusrdb* \
 11.1212 +	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 11.1213 +	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
 11.1214 +	      | -uxpv* | -beos* | -mpeix* | -udk* \
 11.1215 +	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 11.1216 +	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 11.1217 +	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 11.1218 +	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 11.1219 +	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 11.1220 +	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
 11.1221 +	      | -skyos* | -haiku* | -rdos*)
 11.1222 +	# Remember, each alternative MUST END IN *, to match a version number.
 11.1223 +		;;
 11.1224 +	-qnx*)
 11.1225 +		case $basic_machine in
 11.1226 +		    x86-* | i*86-*)
 11.1227 +			;;
 11.1228 +		    *)
 11.1229 +			os=-nto$os
 11.1230 +			;;
 11.1231 +		esac
 11.1232 +		;;
 11.1233 +	-nto-qnx*)
 11.1234 +		;;
 11.1235 +	-nto*)
 11.1236 +		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 11.1237 +		;;
 11.1238 +	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 11.1239 +	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 11.1240 +	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 11.1241 +		;;
 11.1242 +	-mac*)
 11.1243 +		os=`echo $os | sed -e 's|mac|macos|'`
 11.1244 +		;;
 11.1245 +	-linux-dietlibc)
 11.1246 +		os=-linux-dietlibc
 11.1247 +		;;
 11.1248 +	-linux*)
 11.1249 +		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 11.1250 +		;;
 11.1251 +	-sunos5*)
 11.1252 +		os=`echo $os | sed -e 's|sunos5|solaris2|'`
 11.1253 +		;;
 11.1254 +	-sunos6*)
 11.1255 +		os=`echo $os | sed -e 's|sunos6|solaris3|'`
 11.1256 +		;;
 11.1257 +	-opened*)
 11.1258 +		os=-openedition
 11.1259 +		;;
 11.1260 +        -os400*)
 11.1261 +		os=-os400
 11.1262 +		;;
 11.1263 +	-wince*)
 11.1264 +		os=-wince
 11.1265 +		;;
 11.1266 +	-osfrose*)
 11.1267 +		os=-osfrose
 11.1268 +		;;
 11.1269 +	-osf*)
 11.1270 +		os=-osf
 11.1271 +		;;
 11.1272 +	-utek*)
 11.1273 +		os=-bsd
 11.1274 +		;;
 11.1275 +	-dynix*)
 11.1276 +		os=-bsd
 11.1277 +		;;
 11.1278 +	-acis*)
 11.1279 +		os=-aos
 11.1280 +		;;
 11.1281 +	-atheos*)
 11.1282 +		os=-atheos
 11.1283 +		;;
 11.1284 +	-syllable*)
 11.1285 +		os=-syllable
 11.1286 +		;;
 11.1287 +	-386bsd)
 11.1288 +		os=-bsd
 11.1289 +		;;
 11.1290 +	-ctix* | -uts*)
 11.1291 +		os=-sysv
 11.1292 +		;;
 11.1293 +	-nova*)
 11.1294 +		os=-rtmk-nova
 11.1295 +		;;
 11.1296 +	-ns2 )
 11.1297 +		os=-nextstep2
 11.1298 +		;;
 11.1299 +	-nsk*)
 11.1300 +		os=-nsk
 11.1301 +		;;
 11.1302 +	# Preserve the version number of sinix5.
 11.1303 +	-sinix5.*)
 11.1304 +		os=`echo $os | sed -e 's|sinix|sysv|'`
 11.1305 +		;;
 11.1306 +	-sinix*)
 11.1307 +		os=-sysv4
 11.1308 +		;;
 11.1309 +        -tpf*)
 11.1310 +		os=-tpf
 11.1311 +		;;
 11.1312 +	-triton*)
 11.1313 +		os=-sysv3
 11.1314 +		;;
 11.1315 +	-oss*)
 11.1316 +		os=-sysv3
 11.1317 +		;;
 11.1318 +	-svr4)
 11.1319 +		os=-sysv4
 11.1320 +		;;
 11.1321 +	-svr3)
 11.1322 +		os=-sysv3
 11.1323 +		;;
 11.1324 +	-sysvr4)
 11.1325 +		os=-sysv4
 11.1326 +		;;
 11.1327 +	# This must come after -sysvr4.
 11.1328 +	-sysv*)
 11.1329 +		;;
 11.1330 +	-ose*)
 11.1331 +		os=-ose
 11.1332 +		;;
 11.1333 +	-es1800*)
 11.1334 +		os=-ose
 11.1335 +		;;
 11.1336 +	-xenix)
 11.1337 +		os=-xenix
 11.1338 +		;;
 11.1339 +	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 11.1340 +		os=-mint
 11.1341 +		;;
 11.1342 +	-aros*)
 11.1343 +		os=-aros
 11.1344 +		;;
 11.1345 +	-kaos*)
 11.1346 +		os=-kaos
 11.1347 +		;;
 11.1348 +	-zvmoe)
 11.1349 +		os=-zvmoe
 11.1350 +		;;
 11.1351 +	-none)
 11.1352 +		;;
 11.1353 +	*)
 11.1354 +		# Get rid of the `-' at the beginning of $os.
 11.1355 +		os=`echo $os | sed 's/[^-]*-//'`
 11.1356 +		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
 11.1357 +		exit 1
 11.1358 +		;;
 11.1359 +esac
 11.1360 +else
 11.1361 +
 11.1362 +# Here we handle the default operating systems that come with various machines.
 11.1363 +# The value should be what the vendor currently ships out the door with their
 11.1364 +# machine or put another way, the most popular os provided with the machine.
 11.1365 +
 11.1366 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
 11.1367 +# "-sun"), then you have to tell the case statement up towards the top
 11.1368 +# that MANUFACTURER isn't an operating system.  Otherwise, code above
 11.1369 +# will signal an error saying that MANUFACTURER isn't an operating
 11.1370 +# system, and we'll never get to this point.
 11.1371 +
 11.1372 +case $basic_machine in
 11.1373 +	*-acorn)
 11.1374 +		os=-riscix1.2
 11.1375 +		;;
 11.1376 +	arm*-rebel)
 11.1377 +		os=-linux
 11.1378 +		;;
 11.1379 +	arm*-semi)
 11.1380 +		os=-aout
 11.1381 +		;;
 11.1382 +    c4x-* | tic4x-*)
 11.1383 +        os=-coff
 11.1384 +        ;;
 11.1385 +	# This must come before the *-dec entry.
 11.1386 +	pdp10-*)
 11.1387 +		os=-tops20
 11.1388 +		;;
 11.1389 +	pdp11-*)
 11.1390 +		os=-none
 11.1391 +		;;
 11.1392 +	*-dec | vax-*)
 11.1393 +		os=-ultrix4.2
 11.1394 +		;;
 11.1395 +	m68*-apollo)
 11.1396 +		os=-domain
 11.1397 +		;;
 11.1398 +	i386-sun)
 11.1399 +		os=-sunos4.0.2
 11.1400 +		;;
 11.1401 +	m68000-sun)
 11.1402 +		os=-sunos3
 11.1403 +		# This also exists in the configure program, but was not the
 11.1404 +		# default.
 11.1405 +		# os=-sunos4
 11.1406 +		;;
 11.1407 +	m68*-cisco)
 11.1408 +		os=-aout
 11.1409 +		;;
 11.1410 +	mips*-cisco)
 11.1411 +		os=-elf
 11.1412 +		;;
 11.1413 +	mips*-*)
 11.1414 +		os=-elf
 11.1415 +		;;
 11.1416 +	or32-*)
 11.1417 +		os=-coff
 11.1418 +		;;
 11.1419 +	*-tti)	# must be before sparc entry or we get the wrong os.
 11.1420 +		os=-sysv3
 11.1421 +		;;
 11.1422 +	sparc-* | *-sun)
 11.1423 +		os=-sunos4.1.1
 11.1424 +		;;
 11.1425 +	*-be)
 11.1426 +		os=-beos
 11.1427 +		;;
 11.1428 +	*-haiku)
 11.1429 +		os=-haiku
 11.1430 +		;;
 11.1431 +	*-ibm)
 11.1432 +		os=-aix
 11.1433 +		;;
 11.1434 +    	*-knuth)
 11.1435 +		os=-mmixware
 11.1436 +		;;
 11.1437 +	*-wec)
 11.1438 +		os=-proelf
 11.1439 +		;;
 11.1440 +	*-winbond)
 11.1441 +		os=-proelf
 11.1442 +		;;
 11.1443 +	*-oki)
 11.1444 +		os=-proelf
 11.1445 +		;;
 11.1446 +	*-hp)
 11.1447 +		os=-hpux
 11.1448 +		;;
 11.1449 +	*-hitachi)
 11.1450 +		os=-hiux
 11.1451 +		;;
 11.1452 +	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
 11.1453 +		os=-sysv
 11.1454 +		;;
 11.1455 +	*-cbm)
 11.1456 +		os=-amigaos
 11.1457 +		;;
 11.1458 +	*-dg)
 11.1459 +		os=-dgux
 11.1460 +		;;
 11.1461 +	*-dolphin)
 11.1462 +		os=-sysv3
 11.1463 +		;;
 11.1464 +	m68k-ccur)
 11.1465 +		os=-rtu
 11.1466 +		;;
 11.1467 +	m88k-omron*)
 11.1468 +		os=-luna
 11.1469 +		;;
 11.1470 +	*-next )
 11.1471 +		os=-nextstep
 11.1472 +		;;
 11.1473 +	*-sequent)
 11.1474 +		os=-ptx
 11.1475 +		;;
 11.1476 +	*-crds)
 11.1477 +		os=-unos
 11.1478 +		;;
 11.1479 +	*-ns)
 11.1480 +		os=-genix
 11.1481 +		;;
 11.1482 +	i370-*)
 11.1483 +		os=-mvs
 11.1484 +		;;
 11.1485 +	*-next)
 11.1486 +		os=-nextstep3
 11.1487 +		;;
 11.1488 +	*-gould)
 11.1489 +		os=-sysv
 11.1490 +		;;
 11.1491 +	*-highlevel)
 11.1492 +		os=-bsd
 11.1493 +		;;
 11.1494 +	*-encore)
 11.1495 +		os=-bsd
 11.1496 +		;;
 11.1497 +	*-sgi)
 11.1498 +		os=-irix
 11.1499 +		;;
 11.1500 +	*-siemens)
 11.1501 +		os=-sysv4
 11.1502 +		;;
 11.1503 +	*-masscomp)
 11.1504 +		os=-rtu
 11.1505 +		;;
 11.1506 +	f30[01]-fujitsu | f700-fujitsu)
 11.1507 +		os=-uxpv
 11.1508 +		;;
 11.1509 +	*-rom68k)
 11.1510 +		os=-coff
 11.1511 +		;;
 11.1512 +	*-*bug)
 11.1513 +		os=-coff
 11.1514 +		;;
 11.1515 +	*-apple)
 11.1516 +		os=-macos
 11.1517 +		;;
 11.1518 +	*-atari*)
 11.1519 +		os=-mint
 11.1520 +		;;
 11.1521 +	*)
 11.1522 +		os=-none
 11.1523 +		;;
 11.1524 +esac
 11.1525 +fi
 11.1526 +
 11.1527 +# Here we handle the case where we know the os, and the CPU type, but not the
 11.1528 +# manufacturer.  We pick the logical manufacturer.
 11.1529 +vendor=unknown
 11.1530 +case $basic_machine in
 11.1531 +	*-unknown)
 11.1532 +		case $os in
 11.1533 +			-riscix*)
 11.1534 +				vendor=acorn
 11.1535 +				;;
 11.1536 +			-sunos*)
 11.1537 +				vendor=sun
 11.1538 +				;;
 11.1539 +			-aix*)
 11.1540 +				vendor=ibm
 11.1541 +				;;
 11.1542 +			-beos*)
 11.1543 +				vendor=be
 11.1544 +				;;
 11.1545 +			-hpux*)
 11.1546 +				vendor=hp
 11.1547 +				;;
 11.1548 +			-mpeix*)
 11.1549 +				vendor=hp
 11.1550 +				;;
 11.1551 +			-hiux*)
 11.1552 +				vendor=hitachi
 11.1553 +				;;
 11.1554 +			-unos*)
 11.1555 +				vendor=crds
 11.1556 +				;;
 11.1557 +			-dgux*)
 11.1558 +				vendor=dg
 11.1559 +				;;
 11.1560 +			-luna*)
 11.1561 +				vendor=omron
 11.1562 +				;;
 11.1563 +			-genix*)
 11.1564 +				vendor=ns
 11.1565 +				;;
 11.1566 +			-mvs* | -opened*)
 11.1567 +				vendor=ibm
 11.1568 +				;;
 11.1569 +			-os400*)
 11.1570 +				vendor=ibm
 11.1571 +				;;
 11.1572 +			-ptx*)
 11.1573 +				vendor=sequent
 11.1574 +				;;
 11.1575 +			-tpf*)
 11.1576 +				vendor=ibm
 11.1577 +				;;
 11.1578 +			-vxsim* | -vxworks* | -windiss*)
 11.1579 +				vendor=wrs
 11.1580 +				;;
 11.1581 +			-aux*)
 11.1582 +				vendor=apple
 11.1583 +				;;
 11.1584 +			-hms*)
 11.1585 +				vendor=hitachi
 11.1586 +				;;
 11.1587 +			-mpw* | -macos*)
 11.1588 +				vendor=apple
 11.1589 +				;;
 11.1590 +			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 11.1591 +				vendor=atari
 11.1592 +				;;
 11.1593 +			-vos*)
 11.1594 +				vendor=stratus
 11.1595 +				;;
 11.1596 +		esac
 11.1597 +		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 11.1598 +		;;
 11.1599 +esac
 11.1600 +
 11.1601 +echo $basic_machine$os
 11.1602 +exit
 11.1603 +
 11.1604 +# Local variables:
 11.1605 +# eval: (add-hook 'write-file-hooks 'time-stamp)
 11.1606 +# time-stamp-start: "timestamp='"
 11.1607 +# time-stamp-format: "%:y-%02m-%02d"
 11.1608 +# time-stamp-end: "'"
 11.1609 +# End:
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/build-scripts/install-sh	Sun Apr 30 20:27:33 2006 +0000
    12.3 @@ -0,0 +1,323 @@
    12.4 +#!/bin/sh
    12.5 +# install - install a program, script, or datafile
    12.6 +
    12.7 +scriptversion=2005-02-02.21
    12.8 +
    12.9 +# This originates from X11R5 (mit/util/scripts/install.sh), which was
   12.10 +# later released in X11R6 (xc/config/util/install.sh) with the
   12.11 +# following copyright and license.
   12.12 +#
   12.13 +# Copyright (C) 1994 X Consortium
   12.14 +#
   12.15 +# Permission is hereby granted, free of charge, to any person obtaining a copy
   12.16 +# of this software and associated documentation files (the "Software"), to
   12.17 +# deal in the Software without restriction, including without limitation the
   12.18 +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
   12.19 +# sell copies of the Software, and to permit persons to whom the Software is
   12.20 +# furnished to do so, subject to the following conditions:
   12.21 +#
   12.22 +# The above copyright notice and this permission notice shall be included in
   12.23 +# all copies or substantial portions of the Software.
   12.24 +#
   12.25 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   12.26 +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   12.27 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
   12.28 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
   12.29 +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
   12.30 +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   12.31 +#
   12.32 +# Except as contained in this notice, the name of the X Consortium shall not
   12.33 +# be used in advertising or otherwise to promote the sale, use or other deal-
   12.34 +# ings in this Software without prior written authorization from the X Consor-
   12.35 +# tium.
   12.36 +#
   12.37 +#
   12.38 +# FSF changes to this file are in the public domain.
   12.39 +#
   12.40 +# Calling this script install-sh is preferred over install.sh, to prevent
   12.41 +# `make' implicit rules from creating a file called install from it
   12.42 +# when there is no Makefile.
   12.43 +#
   12.44 +# This script is compatible with the BSD install script, but was written
   12.45 +# from scratch.  It can only install one file at a time, a restriction
   12.46 +# shared with many OS's install programs.
   12.47 +
   12.48 +# set DOITPROG to echo to test this script
   12.49 +
   12.50 +# Don't use :- since 4.3BSD and earlier shells don't like it.
   12.51 +doit="${DOITPROG-}"
   12.52 +
   12.53 +# put in absolute paths if you don't have them in your path; or use env. vars.
   12.54 +
   12.55 +mvprog="${MVPROG-mv}"
   12.56 +cpprog="${CPPROG-cp}"
   12.57 +chmodprog="${CHMODPROG-chmod}"
   12.58 +chownprog="${CHOWNPROG-chown}"
   12.59 +chgrpprog="${CHGRPPROG-chgrp}"
   12.60 +stripprog="${STRIPPROG-strip}"
   12.61 +rmprog="${RMPROG-rm}"
   12.62 +mkdirprog="${MKDIRPROG-mkdir}"
   12.63 +
   12.64 +chmodcmd="$chmodprog 0755"
   12.65 +chowncmd=
   12.66 +chgrpcmd=
   12.67 +stripcmd=
   12.68 +rmcmd="$rmprog -f"
   12.69 +mvcmd="$mvprog"
   12.70 +src=
   12.71 +dst=
   12.72 +dir_arg=
   12.73 +dstarg=
   12.74 +no_target_directory=
   12.75 +
   12.76 +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
   12.77 +   or: $0 [OPTION]... SRCFILES... DIRECTORY
   12.78 +   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
   12.79 +   or: $0 [OPTION]... -d DIRECTORIES...
   12.80 +
   12.81 +In the 1st form, copy SRCFILE to DSTFILE.
   12.82 +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
   12.83 +In the 4th, create DIRECTORIES.
   12.84 +
   12.85 +Options:
   12.86 +-c         (ignored)
   12.87 +-d         create directories instead of installing files.
   12.88 +-g GROUP   $chgrpprog installed files to GROUP.
   12.89 +-m MODE    $chmodprog installed files to MODE.
   12.90 +-o USER    $chownprog installed files to USER.
   12.91 +-s         $stripprog installed files.
   12.92 +-t DIRECTORY  install into DIRECTORY.
   12.93 +-T         report an error if DSTFILE is a directory.
   12.94 +--help     display this help and exit.
   12.95 +--version  display version info and exit.
   12.96 +
   12.97 +Environment variables override the default commands:
   12.98 +  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
   12.99 +"
  12.100 +
  12.101 +while test -n "$1"; do
  12.102 +  case $1 in
  12.103 +    -c) shift
  12.104 +        continue;;
  12.105 +
  12.106 +    -d) dir_arg=true
  12.107 +        shift
  12.108 +        continue;;
  12.109 +
  12.110 +    -g) chgrpcmd="$chgrpprog $2"
  12.111 +        shift
  12.112 +        shift
  12.113 +        continue;;
  12.114 +
  12.115 +    --help) echo "$usage"; exit $?;;
  12.116 +
  12.117 +    -m) chmodcmd="$chmodprog $2"
  12.118 +        shift
  12.119 +        shift
  12.120 +        continue;;
  12.121 +
  12.122 +    -o) chowncmd="$chownprog $2"
  12.123 +        shift
  12.124 +        shift
  12.125 +        continue;;
  12.126 +
  12.127 +    -s) stripcmd=$stripprog
  12.128 +        shift
  12.129 +        continue;;
  12.130 +
  12.131 +    -t) dstarg=$2
  12.132 +	shift
  12.133 +	shift
  12.134 +	continue;;
  12.135 +
  12.136 +    -T) no_target_directory=true
  12.137 +	shift
  12.138 +	continue;;
  12.139 +
  12.140 +    --version) echo "$0 $scriptversion"; exit $?;;
  12.141 +
  12.142 +    *)  # When -d is used, all remaining arguments are directories to create.
  12.143 +	# When -t is used, the destination is already specified.
  12.144 +	test -n "$dir_arg$dstarg" && break
  12.145 +        # Otherwise, the last argument is the destination.  Remove it from $@.
  12.146 +	for arg
  12.147 +	do
  12.148 +          if test -n "$dstarg"; then
  12.149 +	    # $@ is not empty: it contains at least $arg.
  12.150 +	    set fnord "$@" "$dstarg"
  12.151 +	    shift # fnord
  12.152 +	  fi
  12.153 +	  shift # arg
  12.154 +	  dstarg=$arg
  12.155 +	done
  12.156 +	break;;
  12.157 +  esac
  12.158 +done
  12.159 +
  12.160 +if test -z "$1"; then
  12.161 +  if test -z "$dir_arg"; then
  12.162 +    echo "$0: no input file specified." >&2
  12.163 +    exit 1
  12.164 +  fi
  12.165 +  # It's OK to call `install-sh -d' without argument.
  12.166 +  # This can happen when creating conditional directories.
  12.167 +  exit 0
  12.168 +fi
  12.169 +
  12.170 +for src
  12.171 +do
  12.172 +  # Protect names starting with `-'.
  12.173 +  case $src in
  12.174 +    -*) src=./$src ;;
  12.175 +  esac
  12.176 +
  12.177 +  if test -n "$dir_arg"; then
  12.178 +    dst=$src
  12.179 +    src=
  12.180 +
  12.181 +    if test -d "$dst"; then
  12.182 +      mkdircmd=:
  12.183 +      chmodcmd=
  12.184 +    else
  12.185 +      mkdircmd=$mkdirprog
  12.186 +    fi
  12.187 +  else
  12.188 +    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
  12.189 +    # might cause directories to be created, which would be especially bad
  12.190 +    # if $src (and thus $dsttmp) contains '*'.
  12.191 +    if test ! -f "$src" && test ! -d "$src"; then
  12.192 +      echo "$0: $src does not exist." >&2
  12.193 +      exit 1
  12.194 +    fi
  12.195 +
  12.196 +    if test -z "$dstarg"; then
  12.197 +      echo "$0: no destination specified." >&2
  12.198 +      exit 1
  12.199 +    fi
  12.200 +
  12.201 +    dst=$dstarg
  12.202 +    # Protect names starting with `-'.
  12.203 +    case $dst in
  12.204 +      -*) dst=./$dst ;;
  12.205 +    esac
  12.206 +
  12.207 +    # If destination is a directory, append the input filename; won't work
  12.208 +    # if double slashes aren't ignored.
  12.209 +    if test -d "$dst"; then
  12.210 +      if test -n "$no_target_directory"; then
  12.211 +	echo "$0: $dstarg: Is a directory" >&2
  12.212 +	exit 1
  12.213 +      fi
  12.214 +      dst=$dst/`basename "$src"`
  12.215 +    fi
  12.216 +  fi
  12.217 +
  12.218 +  # This sed command emulates the dirname command.
  12.219 +  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
  12.220 +
  12.221 +  # Make sure that the destination directory exists.
  12.222 +
  12.223 +  # Skip lots of stat calls in the usual case.
  12.224 +  if test ! -d "$dstdir"; then
  12.225 +    defaultIFS='
  12.226 +	 '
  12.227 +    IFS="${IFS-$defaultIFS}"
  12.228 +
  12.229 +    oIFS=$IFS
  12.230 +    # Some sh's can't handle IFS=/ for some reason.
  12.231 +    IFS='%'
  12.232 +    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
  12.233 +    shift
  12.234 +    IFS=$oIFS
  12.235 +
  12.236 +    pathcomp=
  12.237 +
  12.238 +    while test $# -ne 0 ; do
  12.239 +      pathcomp=$pathcomp$1
  12.240 +      shift
  12.241 +      if test ! -d "$pathcomp"; then
  12.242 +        $mkdirprog "$pathcomp"
  12.243 +	# mkdir can fail with a `File exist' error in case several
  12.244 +	# install-sh are creating the directory concurrently.  This
  12.245 +	# is OK.
  12.246 +	test -d "$pathcomp" || exit
  12.247 +      fi
  12.248 +      pathcomp=$pathcomp/
  12.249 +    done
  12.250 +  fi
  12.251 +
  12.252 +  if test -n "$dir_arg"; then
  12.253 +    $doit $mkdircmd "$dst" \
  12.254 +      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
  12.255 +      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
  12.256 +      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
  12.257 +      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
  12.258 +
  12.259 +  else
  12.260 +    dstfile=`basename "$dst"`
  12.261 +
  12.262 +    # Make a couple of temp file names in the proper directory.
  12.263 +    dsttmp=$dstdir/_inst.$$_
  12.264 +    rmtmp=$dstdir/_rm.$$_
  12.265 +
  12.266 +    # Trap to clean up those temp files at exit.
  12.267 +    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
  12.268 +    trap '(exit $?); exit' 1 2 13 15
  12.269 +
  12.270 +    # Copy the file name to the temp name.
  12.271 +    $doit $cpprog "$src" "$dsttmp" &&
  12.272 +
  12.273 +    # and set any options; do chmod last to preserve setuid bits.
  12.274 +    #
  12.275 +    # If any of these fail, we abort the whole thing.  If we want to
  12.276 +    # ignore errors from any of these, just make sure not to ignore
  12.277 +    # errors from the above "$doit $cpprog $src $dsttmp" command.
  12.278 +    #
  12.279 +    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
  12.280 +      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
  12.281 +      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
  12.282 +      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
  12.283 +
  12.284 +    # Now rename the file to the real destination.
  12.285 +    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
  12.286 +      || {
  12.287 +	   # The rename failed, perhaps because mv can't rename something else
  12.288 +	   # to itself, or perhaps because mv is so ancient that it does not
  12.289 +	   # support -f.
  12.290 +
  12.291 +	   # Now remove or move aside any old file at destination location.
  12.292 +	   # We try this two ways since rm can't unlink itself on some
  12.293 +	   # systems and the destination file might be busy for other
  12.294 +	   # reasons.  In this case, the final cleanup might fail but the new
  12.295 +	   # file should still install successfully.
  12.296 +	   {
  12.297 +	     if test -f "$dstdir/$dstfile"; then
  12.298 +	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
  12.299 +	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
  12.300 +	       || {
  12.301 +		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
  12.302 +		 (exit 1); exit 1
  12.303 +	       }
  12.304 +	     else
  12.305 +	       :
  12.306 +	     fi
  12.307 +	   } &&
  12.308 +
  12.309 +	   # Now rename the file to the real destination.
  12.310 +	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
  12.311 +	 }
  12.312 +    }
  12.313 +  fi || { (exit 1); exit 1; }
  12.314 +done
  12.315 +
  12.316 +# The final little trick to "correctly" pass the exit status to the exit trap.
  12.317 +{
  12.318 +  (exit 0); exit 0
  12.319 +}
  12.320 +
  12.321 +# Local variables:
  12.322 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  12.323 +# time-stamp-start: "scriptversion="
  12.324 +# time-stamp-format: "%:y-%02m-%02d.%02H"
  12.325 +# time-stamp-end: "$"
  12.326 +# End:
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/build-scripts/ltmain.sh	Sun Apr 30 20:27:33 2006 +0000
    13.3 @@ -0,0 +1,6864 @@
    13.4 +# Based on libtool-1.5.22
    13.5 +# ltmain.sh - Provide generalized library-building support services.
    13.6 +# NOTE: Changing this file will not affect anything until you rerun configure.
    13.7 +#
    13.8 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
    13.9 +# Free Software Foundation, Inc.
   13.10 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
   13.11 +#
   13.12 +# This program is free software; you can redistribute it and/or modify
   13.13 +# it under the terms of the GNU General Public License as published by
   13.14 +# the Free Software Foundation; either version 2 of the License, or
   13.15 +# (at your option) any later version.
   13.16 +#
   13.17 +# This program is distributed in the hope that it will be useful, but
   13.18 +# WITHOUT ANY WARRANTY; without even the implied warranty of
   13.19 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13.20 +# General Public License for more details.
   13.21 +#
   13.22 +# You should have received a copy of the GNU General Public License
   13.23 +# along with this program; if not, write to the Free Software
   13.24 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
   13.25 +#
   13.26 +# As a special exception to the GNU General Public License, if you
   13.27 +# distribute this file as part of a program that contains a
   13.28 +# configuration script generated by Autoconf, you may include it under
   13.29 +# the same distribution terms that you use for the rest of that program.
   13.30 +
   13.31 +basename="s,^.*/,,g"
   13.32 +
   13.33 +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
   13.34 +# is ksh but when the shell is invoked as "sh" and the current value of
   13.35 +# the _XPG environment variable is not equal to 1 (one), the special
   13.36 +# positional parameter $0, within a function call, is the name of the
   13.37 +# function.
   13.38 +progpath="$0"
   13.39 +
   13.40 +# The name of this program:
   13.41 +progname=`echo "$progpath" | $SED $basename`
   13.42 +modename="$progname"
   13.43 +
   13.44 +# Global variables:
   13.45 +EXIT_SUCCESS=0
   13.46 +EXIT_FAILURE=1
   13.47 +
   13.48 +PROGRAM=ltmain.sh
   13.49 +PACKAGE=libtool
   13.50 +VERSION=1.5.22
   13.51 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
   13.52 +
   13.53 +# See if we are running on zsh, and set the options which allow our
   13.54 +# commands through without removal of \ escapes.
   13.55 +if test -n "${ZSH_VERSION+set}" ; then
   13.56 +  setopt NO_GLOB_SUBST
   13.57 +fi
   13.58 +
   13.59 +# Check that we have a working $echo.
   13.60 +if test "X$1" = X--no-reexec; then
   13.61 +  # Discard the --no-reexec flag, and continue.
   13.62 +  shift
   13.63 +elif test "X$1" = X--fallback-echo; then
   13.64 +  # Avoid inline document here, it may be left over
   13.65 +  :
   13.66 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
   13.67 +  # Yippee, $echo works!
   13.68 +  :
   13.69 +else
   13.70 +  # Restart under the correct shell, and then maybe $echo will work.
   13.71 +  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
   13.72 +fi
   13.73 +
   13.74 +if test "X$1" = X--fallback-echo; then
   13.75 +  # used as fallback echo
   13.76 +  shift
   13.77 +  cat <<EOF
   13.78 +$*
   13.79 +EOF
   13.80 +  exit $EXIT_SUCCESS
   13.81 +fi
   13.82 +
   13.83 +default_mode=
   13.84 +help="Try \`$progname --help' for more information."
   13.85 +magic="%%%MAGIC variable%%%"
   13.86 +mkdir="mkdir"
   13.87 +mv="mv -f"
   13.88 +rm="rm -f"
   13.89 +
   13.90 +# Sed substitution that helps us do robust quoting.  It backslashifies
   13.91 +# metacharacters that are still active within double-quoted strings.
   13.92 +Xsed="${SED}"' -e 1s/^X//'
   13.93 +sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
   13.94 +# test EBCDIC or ASCII
   13.95 +case `echo X|tr X '\101'` in
   13.96 + A) # ASCII based system
   13.97 +    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
   13.98 +  SP2NL='tr \040 \012'
   13.99 +  NL2SP='tr \015\012 \040\040'
  13.100 +  ;;
  13.101 + *) # EBCDIC based system
  13.102 +  SP2NL='tr \100 \n'
  13.103 +  NL2SP='tr \r\n \100\100'
  13.104 +  ;;
  13.105 +esac
  13.106 +
  13.107 +# NLS nuisances.
  13.108 +# Only set LANG and LC_ALL to C if already set.
  13.109 +# These must not be set unconditionally because not all systems understand
  13.110 +# e.g. LANG=C (notably SCO).
  13.111 +# We save the old values to restore during execute mode.
  13.112 +if test "${LC_ALL+set}" = set; then
  13.113 +  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
  13.114 +fi
  13.115 +if test "${LANG+set}" = set; then
  13.116 +  save_LANG="$LANG"; LANG=C; export LANG
  13.117 +fi
  13.118 +
  13.119 +# Make sure IFS has a sensible default
  13.120 +lt_nl='
  13.121 +'
  13.122 +IFS=" 	$lt_nl"
  13.123 +
  13.124 +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
  13.125 +  $echo "$modename: not configured to build any kind of library" 1>&2
  13.126 +  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  13.127 +  exit $EXIT_FAILURE
  13.128 +fi
  13.129 +
  13.130 +# Global variables.
  13.131 +mode=$default_mode
  13.132 +nonopt=
  13.133 +prev=
  13.134 +prevopt=
  13.135 +run=
  13.136 +show="$echo"
  13.137 +show_help=
  13.138 +execute_dlfiles=
  13.139 +duplicate_deps=no
  13.140 +preserve_args=
  13.141 +lo2o="s/\\.lo\$/.${objext}/"
  13.142 +o2lo="s/\\.${objext}\$/.lo/"
  13.143 +
  13.144 +#####################################
  13.145 +# Shell function definitions:
  13.146 +# This seems to be the best place for them
  13.147 +
  13.148 +# func_mktempdir [string]
  13.149 +# Make a temporary directory that won't clash with other running
  13.150 +# libtool processes, and avoids race conditions if possible.  If
  13.151 +# given, STRING is the basename for that directory.
  13.152 +func_mktempdir ()
  13.153 +{
  13.154 +    my_template="${TMPDIR-/tmp}/${1-$progname}"
  13.155 +
  13.156 +    if test "$run" = ":"; then
  13.157 +      # Return a directory name, but don't create it in dry-run mode
  13.158 +      my_tmpdir="${my_template}-$$"
  13.159 +    else
  13.160 +
  13.161 +      # If mktemp works, use that first and foremost
  13.162 +      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
  13.163 +
  13.164 +      if test ! -d "$my_tmpdir"; then
  13.165 +	# Failing that, at least try and use $RANDOM to avoid a race
  13.166 +	my_tmpdir="${my_template}-${RANDOM-0}$$"
  13.167 +
  13.168 +	save_mktempdir_umask=`umask`
  13.169 +	umask 0077
  13.170 +	$mkdir "$my_tmpdir"
  13.171 +	umask $save_mktempdir_umask
  13.172 +      fi
  13.173 +
  13.174 +      # If we're not in dry-run mode, bomb out on failure
  13.175 +      test -d "$my_tmpdir" || {
  13.176 +        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
  13.177 +	exit $EXIT_FAILURE
  13.178 +      }
  13.179 +    fi
  13.180 +
  13.181 +    $echo "X$my_tmpdir" | $Xsed
  13.182 +}
  13.183 +
  13.184 +
  13.185 +# func_win32_libid arg
  13.186 +# return the library type of file 'arg'
  13.187 +#
  13.188 +# Need a lot of goo to handle *both* DLLs and import libs
  13.189 +# Has to be a shell function in order to 'eat' the argument
  13.190 +# that is supplied when $file_magic_command is called.
  13.191 +func_win32_libid ()
  13.192 +{
  13.193 +  win32_libid_type="unknown"
  13.194 +  win32_fileres=`file -L $1 2>/dev/null`
  13.195 +  case $win32_fileres in
  13.196 +  *ar\ archive\ import\ library*) # definitely import
  13.197 +    win32_libid_type="x86 archive import"
  13.198 +    ;;
  13.199 +  *ar\ archive*) # could be an import, or static
  13.200 +    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
  13.201 +      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
  13.202 +      win32_nmres=`eval $NM -f posix -A $1 | \
  13.203 +	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
  13.204 +      case $win32_nmres in
  13.205 +      import*)  win32_libid_type="x86 archive import";;
  13.206 +      *)        win32_libid_type="x86 archive static";;
  13.207 +      esac
  13.208 +    fi
  13.209 +    ;;
  13.210 +  *DLL*)
  13.211 +    win32_libid_type="x86 DLL"
  13.212 +    ;;
  13.213 +  *executable*) # but shell scripts are "executable" too...
  13.214 +    case $win32_fileres in
  13.215 +    *MS\ Windows\ PE\ Intel*)
  13.216 +      win32_libid_type="x86 DLL"
  13.217 +      ;;
  13.218 +    esac
  13.219 +    ;;
  13.220 +  esac
  13.221 +  $echo $win32_libid_type
  13.222 +}
  13.223 +
  13.224 +
  13.225 +# func_infer_tag arg
  13.226 +# Infer tagged configuration to use if any are available and
  13.227 +# if one wasn't chosen via the "--tag" command line option.
  13.228 +# Only attempt this if the compiler in the base compile
  13.229 +# command doesn't match the default compiler.
  13.230 +# arg is usually of the form 'gcc ...'
  13.231 +func_infer_tag ()
  13.232 +{
  13.233 +    if test -n "$available_tags" && test -z "$tagname"; then
  13.234 +      CC_quoted=
  13.235 +      for arg in $CC; do
  13.236 +	case $arg in
  13.237 +	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  13.238 +	  arg="\"$arg\""
  13.239 +	  ;;
  13.240 +	esac
  13.241 +	CC_quoted="$CC_quoted $arg"
  13.242 +      done
  13.243 +      case $@ in
  13.244 +      # Blanks in the command may have been stripped by the calling shell,
  13.245 +      # but not from the CC environment variable when configure was run.
  13.246 +      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
  13.247 +      # Blanks at the start of $base_compile will cause this to fail
  13.248 +      # if we don't check for them as well.
  13.249 +      *)
  13.250 +	for z in $available_tags; do
  13.251 +	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
  13.252 +	    # Evaluate the configuration.
  13.253 +	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
  13.254 +	    CC_quoted=
  13.255 +	    for arg in $CC; do
  13.256 +	    # Double-quote args containing other shell metacharacters.
  13.257 +	    case $arg in
  13.258 +	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  13.259 +	      arg="\"$arg\""
  13.260 +	      ;;
  13.261 +	    esac
  13.262 +	    CC_quoted="$CC_quoted $arg"
  13.263 +	  done
  13.264 +	    case "$@ " in
  13.265 +	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
  13.266 +	      # The compiler in the base compile command matches
  13.267 +	      # the one in the tagged configuration.
  13.268 +	      # Assume this is the tagged configuration we want.
  13.269 +	      tagname=$z
  13.270 +	      break
  13.271 +	      ;;
  13.272 +	    esac
  13.273 +	  fi
  13.274 +	done
  13.275 +	# If $tagname still isn't set, then no tagged configuration
  13.276 +	# was found and let the user know that the "--tag" command
  13.277 +	# line option must be used.
  13.278 +	if test -z "$tagname"; then
  13.279 +	  $echo "$modename: unable to infer tagged configuration"
  13.280 +	  $echo "$modename: specify a tag with \`--tag'" 1>&2
  13.281 +	  exit $EXIT_FAILURE
  13.282 +#        else
  13.283 +#          $echo "$modename: using $tagname tagged configuration"
  13.284 +	fi
  13.285 +	;;
  13.286 +      esac
  13.287 +    fi
  13.288 +}
  13.289 +
  13.290 +
  13.291 +# func_extract_an_archive dir oldlib
  13.292 +func_extract_an_archive ()
  13.293 +{
  13.294 +    f_ex_an_ar_dir="$1"; shift
  13.295 +    f_ex_an_ar_oldlib="$1"
  13.296 +
  13.297 +    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
  13.298 +    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
  13.299 +    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
  13.300 +     :
  13.301 +    else
  13.302 +      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
  13.303 +      exit $EXIT_FAILURE
  13.304 +    fi
  13.305 +}
  13.306 +
  13.307 +# func_extract_archives gentop oldlib ...
  13.308 +func_extract_archives ()
  13.309 +{
  13.310 +    my_gentop="$1"; shift
  13.311 +    my_oldlibs=${1+"$@"}
  13.312 +    my_oldobjs=""
  13.313 +    my_xlib=""
  13.314 +    my_xabs=""
  13.315 +    my_xdir=""
  13.316 +    my_status=""
  13.317 +
  13.318 +    $show "${rm}r $my_gentop"
  13.319 +    $run ${rm}r "$my_gentop"
  13.320 +    $show "$mkdir $my_gentop"
  13.321 +    $run $mkdir "$my_gentop"
  13.322 +    my_status=$?
  13.323 +    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
  13.324 +      exit $my_status
  13.325 +    fi
  13.326 +
  13.327 +    for my_xlib in $my_oldlibs; do
  13.328 +      # Extract the objects.
  13.329 +      case $my_xlib in
  13.330 +	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
  13.331 +	*) my_xabs=`pwd`"/$my_xlib" ;;
  13.332 +      esac
  13.333 +      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
  13.334 +      my_xdir="$my_gentop/$my_xlib"
  13.335 +
  13.336 +      $show "${rm}r $my_xdir"
  13.337 +      $run ${rm}r "$my_xdir"
  13.338 +      $show "$mkdir $my_xdir"
  13.339 +      $run $mkdir "$my_xdir"
  13.340 +      exit_status=$?
  13.341 +      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
  13.342 +	exit $exit_status
  13.343 +      fi
  13.344 +      case $host in
  13.345 +      *-darwin*)
  13.346 +	$show "Extracting $my_xabs"
  13.347 +	# Do not bother doing anything if just a dry run
  13.348 +	if test -z "$run"; then
  13.349 +	  darwin_orig_dir=`pwd`
  13.350 +	  cd $my_xdir || exit $?
  13.351 +	  darwin_archive=$my_xabs
  13.352 +	  darwin_curdir=`pwd`
  13.353 +	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
  13.354 +	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
  13.355 +	  if test -n "$darwin_arches"; then 
  13.356 +	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
  13.357 +	    darwin_arch=
  13.358 +	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
  13.359 +	    for darwin_arch in  $darwin_arches ; do
  13.360 +	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
  13.361 +	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
  13.362 +	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
  13.363 +	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
  13.364 +	      cd "$darwin_curdir"
  13.365 +	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
  13.366 +	    done # $darwin_arches
  13.367 +      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
  13.368 +	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
  13.369 +	    darwin_file=
  13.370 +	    darwin_files=
  13.371 +	    for darwin_file in $darwin_filelist; do
  13.372 +	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
  13.373 +	      lipo -create -output "$darwin_file" $darwin_files
  13.374 +	    done # $darwin_filelist
  13.375 +	    ${rm}r unfat-$$
  13.376 +	    cd "$darwin_orig_dir"
  13.377 +	  else
  13.378 +	    cd "$darwin_orig_dir"
  13.379 + 	    func_extract_an_archive "$my_xdir" "$my_xabs"
  13.380 +	  fi # $darwin_arches
  13.381 +	fi # $run
  13.382 +	;;
  13.383 +      *)
  13.384 +        func_extract_an_archive "$my_xdir" "$my_xabs"
  13.385 +        ;;
  13.386 +      esac
  13.387 +      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
  13.388 +    done
  13.389 +    func_extract_archives_result="$my_oldobjs"
  13.390 +}
  13.391 +# End of Shell function definitions
  13.392 +#####################################
  13.393 +
  13.394 +# Darwin sucks
  13.395 +eval std_shrext=\"$shrext_cmds\"
  13.396 +
  13.397 +disable_libs=no
  13.398 +
  13.399 +# Parse our command line options once, thoroughly.
  13.400 +while test "$#" -gt 0
  13.401 +do
  13.402 +  arg="$1"
  13.403 +  shift
  13.404 +
  13.405 +  case $arg in
  13.406 +  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
  13.407 +  *) optarg= ;;
  13.408 +  esac
  13.409 +
  13.410 +  # If the previous option needs an argument, assign it.
  13.411 +  if test -n "$prev"; then
  13.412 +    case $prev in
  13.413 +    execute_dlfiles)
  13.414 +      execute_dlfiles="$execute_dlfiles $arg"
  13.415 +      ;;
  13.416 +    tag)
  13.417 +      tagname="$arg"
  13.418 +      preserve_args="${preserve_args}=$arg"
  13.419 +
  13.420 +      # Check whether tagname contains only valid characters
  13.421 +      case $tagname in
  13.422 +      *[!-_A-Za-z0-9,/]*)
  13.423 +	$echo "$progname: invalid tag name: $tagname" 1>&2
  13.424 +	exit $EXIT_FAILURE
  13.425 +	;;
  13.426 +      esac
  13.427 +
  13.428 +      case $tagname in
  13.429 +      CC)
  13.430 +	# Don't test for the "default" C tag, as we know, it's there, but
  13.431 +	# not specially marked.
  13.432 +	;;
  13.433 +      *)
  13.434 +	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
  13.435 +	  taglist="$taglist $tagname"
  13.436 +	  # Evaluate the configuration.
  13.437 +	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
  13.438 +	else
  13.439 +	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
  13.440 +	fi
  13.441 +	;;
  13.442 +      esac
  13.443 +      ;;
  13.444 +    *)
  13.445 +      eval "$prev=\$arg"
  13.446 +      ;;
  13.447 +    esac
  13.448 +
  13.449 +    prev=
  13.450 +    prevopt=
  13.451 +    continue
  13.452 +  fi
  13.453 +
  13.454 +  # Have we seen a non-optional argument yet?
  13.455 +  case $arg in
  13.456 +  --help)
  13.457 +    show_help=yes
  13.458 +    ;;
  13.459 +
  13.460 +  --version)
  13.461 +    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
  13.462 +    $echo
  13.463 +    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
  13.464 +    $echo "This is free software; see the source for copying conditions.  There is NO"
  13.465 +    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  13.466 +    exit $?
  13.467 +    ;;
  13.468 +
  13.469 +  --config)
  13.470 +    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
  13.471 +    # Now print the configurations for the tags.
  13.472 +    for tagname in $taglist; do
  13.473 +      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
  13.474 +    done
  13.475 +    exit $?
  13.476 +    ;;
  13.477 +
  13.478 +  --debug)
  13.479 +    $echo "$progname: enabling shell trace mode"
  13.480 +    set -x
  13.481 +    preserve_args="$preserve_args $arg"
  13.482 +    ;;
  13.483 +
  13.484 +  --dry-run | -n)
  13.485 +    run=:
  13.486 +    ;;
  13.487 +
  13.488 +  --features)
  13.489 +    $echo "host: $host"
  13.490 +    if test "$build_libtool_libs" = yes; then
  13.491 +      $echo "enable shared libraries"
  13.492 +    else
  13.493 +      $echo "disable shared libraries"
  13.494 +    fi
  13.495 +    if test "$build_old_libs" = yes; then
  13.496 +      $echo "enable static libraries"
  13.497 +    else
  13.498 +      $echo "disable static libraries"
  13.499 +    fi
  13.500 +    exit $?
  13.501 +    ;;
  13.502 +
  13.503 +  --finish) mode="finish" ;;
  13.504 +
  13.505 +  --mode) prevopt="--mode" prev=mode ;;
  13.506 +  --mode=*) mode="$optarg" ;;
  13.507 +
  13.508 +  --preserve-dup-deps) duplicate_deps="yes" ;;
  13.509 +
  13.510 +  --quiet | --silent)
  13.511 +    show=:
  13.512 +    preserve_args="$preserve_args $arg"
  13.513 +    ;;
  13.514 +
  13.515 +  --tag)
  13.516 +    prevopt="--tag"
  13.517 +    prev=tag
  13.518 +    preserve_args="$preserve_args --tag"
  13.519 +    ;;
  13.520 +  --tag=*)
  13.521 +    set tag "$optarg" ${1+"$@"}
  13.522 +    shift
  13.523 +    prev=tag
  13.524 +    preserve_args="$preserve_args --tag"
  13.525 +    ;;
  13.526 +
  13.527 +  -dlopen)
  13.528 +    prevopt="-dlopen"
  13.529 +    prev=execute_dlfiles
  13.530 +    ;;
  13.531 +
  13.532 +  -*)
  13.533 +    $echo "$modename: unrecognized option \`$arg'" 1>&2
  13.534 +    $echo "$help" 1>&2
  13.535 +    exit $EXIT_FAILURE
  13.536 +    ;;
  13.537 +
  13.538 +  *)
  13.539 +    nonopt="$arg"
  13.540 +    break
  13.541 +    ;;
  13.542 +  esac
  13.543 +done
  13.544 +
  13.545 +if test -n "$prevopt"; then
  13.546 +  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
  13.547 +  $echo "$help" 1>&2
  13.548 +  exit $EXIT_FAILURE
  13.549 +fi
  13.550 +
  13.551 +case $disable_libs in
  13.552 +no) 
  13.553 +  ;;
  13.554 +shared)
  13.555 +  build_libtool_libs=no
  13.556 +  build_old_libs=yes
  13.557 +  ;;
  13.558 +static)
  13.559 +  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
  13.560 +  ;;
  13.561 +esac
  13.562 +
  13.563 +# If this variable is set in any of the actions, the command in it
  13.564 +# will be execed at the end.  This prevents here-documents from being
  13.565 +# left over by shells.
  13.566 +exec_cmd=
  13.567 +
  13.568 +if test -z "$show_help"; then
  13.569 +
  13.570 +  # Infer the operation mode.
  13.571 +  if test -z "$mode"; then
  13.572 +    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
  13.573 +    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
  13.574 +    case $nonopt in
  13.575 +    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
  13.576 +      mode=link
  13.577 +      for arg
  13.578 +      do
  13.579 +	case $arg in
  13.580 +	-c)
  13.581 +	   mode=compile
  13.582 +	   break
  13.583 +	   ;;
  13.584 +	esac
  13.585 +      done
  13.586 +      ;;
  13.587 +    *db | *dbx | *strace | *truss)
  13.588 +      mode=execute
  13.589 +      ;;
  13.590 +    *install*|cp|mv)
  13.591 +      mode=install
  13.592 +      ;;
  13.593 +    *rm)
  13.594 +      mode=uninstall
  13.595 +      ;;
  13.596 +    *)
  13.597 +      # If we have no mode, but dlfiles were specified, then do execute mode.
  13.598 +      test -n "$execute_dlfiles" && mode=execute
  13.599 +
  13.600 +      # Just use the default operation mode.
  13.601 +      if test -z "$mode"; then
  13.602 +	if test -n "$nonopt"; then
  13.603 +	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
  13.604 +	else
  13.605 +	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
  13.606 +	fi
  13.607 +      fi
  13.608 +      ;;
  13.609 +    esac
  13.610 +  fi
  13.611 +
  13.612 +  # Only execute mode is allowed to have -dlopen flags.
  13.613 +  if test -n "$execute_dlfiles" && test "$mode" != execute; then
  13.614 +    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
  13.615 +    $echo "$help" 1>&2
  13.616 +    exit $EXIT_FAILURE
  13.617 +  fi
  13.618 +
  13.619 +  # Change the help message to a mode-specific one.
  13.620 +  generic_help="$help"
  13.621 +  help="Try \`$modename --help --mode=$mode' for more information."
  13.622 +
  13.623 +  # These modes are in order of execution frequency so that they run quickly.
  13.624 +  case $mode in
  13.625 +  # libtool compile mode
  13.626 +  compile)
  13.627 +    modename="$modename: compile"
  13.628 +    # Get the compilation command and the source file.
  13.629 +    base_compile=
  13.630 +    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
  13.631 +    suppress_opt=yes
  13.632 +    suppress_output=
  13.633 +    arg_mode=normal
  13.634 +    libobj=
  13.635 +    later=
  13.636 +
  13.637 +    for arg
  13.638 +    do
  13.639 +      case $arg_mode in
  13.640 +      arg  )
  13.641 +	# do not "continue".  Instead, add this to base_compile
  13.642 +	lastarg="$arg"
  13.643 +	arg_mode=normal
  13.644 +	;;
  13.645 +
  13.646 +      target )
  13.647 +	libobj="$arg"
  13.648 +	arg_mode=normal
  13.649 +	continue
  13.650 +	;;
  13.651 +
  13.652 +      normal )
  13.653 +	# Accept any command-line options.
  13.654 +	case $arg in
  13.655 +	-o)
  13.656 +	  if test -n "$libobj" ; then
  13.657 +	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
  13.658 +	    exit $EXIT_FAILURE
  13.659 +	  fi
  13.660 +	  arg_mode=target
  13.661 +	  continue
  13.662 +	  ;;
  13.663 +
  13.664 +	-static | -prefer-pic | -prefer-non-pic)
  13.665 +	  later="$later $arg"
  13.666 +	  continue
  13.667 +	  ;;
  13.668 +
  13.669 +	-no-suppress)
  13.670 +	  suppress_opt=no
  13.671 +	  continue
  13.672 +	  ;;
  13.673 +
  13.674 +	-Xcompiler)
  13.675 +	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
  13.676 +	  continue      #  The current "srcfile" will either be retained or
  13.677 +	  ;;            #  replaced later.  I would guess that would be a bug.
  13.678 +
  13.679 +	-Wc,*)
  13.680 +	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
  13.681 +	  lastarg=
  13.682 +	  save_ifs="$IFS"; IFS=','
  13.683 + 	  for arg in $args; do
  13.684 +	    IFS="$save_ifs"
  13.685 +
  13.686 +	    # Double-quote args containing other shell metacharacters.
  13.687 +	    # Many Bourne shells cannot handle close brackets correctly
  13.688 +	    # in scan sets, so we specify it separately.
  13.689 +	    case $arg in
  13.690 +	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  13.691 +	      arg="\"$arg\""
  13.692 +	      ;;
  13.693 +	    esac
  13.694 +	    lastarg="$lastarg $arg"
  13.695 +	  done
  13.696 +	  IFS="$save_ifs"
  13.697 +	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
  13.698 +
  13.699 +	  # Add the arguments to base_compile.
  13.700 +	  base_compile="$base_compile $lastarg"
  13.701 +	  continue
  13.702 +	  ;;
  13.703 +
  13.704 +	* )
  13.705 +	  # Accept the current argument as the source file.
  13.706 +	  # The previous "srcfile" becomes the current argument.
  13.707 +	  #
  13.708 +	  lastarg="$srcfile"
  13.709 +	  srcfile="$arg"
  13.710 +	  ;;
  13.711 +	esac  #  case $arg
  13.712 +	;;
  13.713 +      esac    #  case $arg_mode
  13.714 +
  13.715 +      # Aesthetically quote the previous argument.
  13.716 +      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
  13.717 +
  13.718 +      case $lastarg in
  13.719 +      # Double-quote args containing other shell metacharacters.
  13.720 +      # Many Bourne shells cannot handle close brackets correctly
  13.721 +      # in scan sets, and some SunOS ksh mistreat backslash-escaping
  13.722 +      # in scan sets (worked around with variable expansion),
  13.723 +      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
  13.724 +      # at all, so we specify them separately.
  13.725 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  13.726 +	lastarg="\"$lastarg\""
  13.727 +	;;
  13.728 +      esac
  13.729 +
  13.730 +      base_compile="$base_compile $lastarg"
  13.731 +    done # for arg
  13.732 +
  13.733 +    case $arg_mode in
  13.734 +    arg)
  13.735 +      $echo "$modename: you must specify an argument for -Xcompile"
  13.736 +      exit $EXIT_FAILURE
  13.737 +      ;;
  13.738 +    target)
  13.739 +      $echo "$modename: you must specify a target with \`-o'" 1>&2
  13.740 +      exit $EXIT_FAILURE
  13.741 +      ;;
  13.742 +    *)
  13.743 +      # Get the name of the library object.
  13.744 +      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
  13.745 +      ;;
  13.746 +    esac
  13.747 +
  13.748 +    # Recognize several different file suffixes.
  13.749 +    # If the user specifies -o file.o, it is replaced with file.lo
  13.750 +    xform='[cCFSifmso]'
  13.751 +    case $libobj in
  13.752 +    *.ada) xform=ada ;;
  13.753 +    *.adb) xform=adb ;;
  13.754 +    *.ads) xform=ads ;;
  13.755 +    *.asm) xform=asm ;;
  13.756 +    *.c++) xform=c++ ;;
  13.757 +    *.cc) xform=cc ;;
  13.758 +    *.ii) xform=ii ;;
  13.759 +    *.class) xform=class ;;
  13.760 +    *.cpp) xform=cpp ;;
  13.761 +    *.cxx) xform=cxx ;;
  13.762 +    *.f90) xform=f90 ;;
  13.763 +    *.for) xform=for ;;
  13.764 +    *.java) xform=java ;;
  13.765 +    esac
  13.766 +
  13.767 +    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
  13.768 +
  13.769 +    case $libobj in
  13.770 +    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
  13.771 +    *)
  13.772 +      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
  13.773 +      exit $EXIT_FAILURE
  13.774 +      ;;
  13.775 +    esac
  13.776 +
  13.777 +    func_infer_tag $base_compile
  13.778 +
  13.779 +    for arg in $later; do
  13.780 +      case $arg in
  13.781 +      -static)
  13.782 +	build_old_libs=yes
  13.783 +	continue
  13.784 +	;;
  13.785 +
  13.786 +      -prefer-pic)
  13.787 +	pic_mode=yes
  13.788 +	continue
  13.789 +	;;
  13.790 +
  13.791 +      -prefer-non-pic)
  13.792 +	pic_mode=no
  13.793 +	continue
  13.794 +	;;
  13.795 +      esac
  13.796 +    done
  13.797 +
  13.798 +    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
  13.799 +    case $qlibobj in
  13.800 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  13.801 +	qlibobj="\"$qlibobj\"" ;;
  13.802 +    esac
  13.803 +    test "X$libobj" != "X$qlibobj" \
  13.804 +	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
  13.805 +	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
  13.806 +    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  13.807 +    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
  13.808 +    if test "X$xdir" = "X$obj"; then
  13.809 +      xdir=
  13.810 +    else
  13.811 +      xdir=$xdir/
  13.812 +    fi
  13.813 +    lobj=${xdir}$objdir/$objname
  13.814 +
  13.815 +    if test -z "$base_compile"; then
  13.816 +      $echo "$modename: you must specify a compilation command" 1>&2
  13.817 +      $echo "$help" 1>&2
  13.818 +      exit $EXIT_FAILURE
  13.819 +    fi
  13.820 +
  13.821 +    # Delete any leftover library objects.
  13.822 +    if test "$build_old_libs" = yes; then
  13.823 +      removelist="$obj $lobj $libobj ${libobj}T"
  13.824 +    else
  13.825 +      removelist="$lobj $libobj ${libobj}T"
  13.826 +    fi
  13.827 +
  13.828 +    $run $rm $removelist
  13.829 +    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
  13.830 +
  13.831 +    # On Cygwin there's no "real" PIC flag so we must build both object types
  13.832 +    case $host_os in
  13.833 +    cygwin* | mingw* | pw32* | os2*)
  13.834 +      pic_mode=default
  13.835 +      ;;
  13.836 +    esac
  13.837 +    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
  13.838 +      # non-PIC code in shared libraries is not supported
  13.839 +      pic_mode=default
  13.840 +    fi
  13.841 +
  13.842 +    # Calculate the filename of the output object if compiler does
  13.843 +    # not support -o with -c
  13.844 +    if test "$compiler_c_o" = no; then
  13.845 +      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
  13.846 +      lockfile="$output_obj.lock"
  13.847 +      removelist="$removelist $output_obj $lockfile"
  13.848 +      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
  13.849 +    else
  13.850 +      output_obj=
  13.851 +      need_locks=no
  13.852 +      lockfile=
  13.853 +    fi
  13.854 +
  13.855 +    # Lock this critical section if it is needed
  13.856 +    # We use this script file to make the link, it avoids creating a new file
  13.857 +    if test "$need_locks" = yes; then
  13.858 +      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
  13.859 +	$show "Waiting for $lockfile to be removed"
  13.860 +	sleep 2
  13.861 +      done
  13.862 +    elif test "$need_locks" = warn; then
  13.863 +      if test -f "$lockfile"; then
  13.864 +	$echo "\
  13.865 +*** ERROR, $lockfile exists and contains:
  13.866 +`cat $lockfile 2>/dev/null`
  13.867 +
  13.868 +This indicates that another process is trying to use the same
  13.869 +temporary object file, and libtool could not work around it because
  13.870 +your compiler does not support \`-c' and \`-o' together.  If you
  13.871 +repeat this compilation, it may succeed, by chance, but you had better
  13.872 +avoid parallel builds (make -j) in this platform, or get a better
  13.873 +compiler."
  13.874 +
  13.875 +	$run $rm $removelist
  13.876 +	exit $EXIT_FAILURE
  13.877 +      fi
  13.878 +      $echo "$srcfile" > "$lockfile"
  13.879 +    fi
  13.880 +
  13.881 +    if test -n "$fix_srcfile_path"; then
  13.882 +      eval srcfile=\"$fix_srcfile_path\"
  13.883 +    fi
  13.884 +    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
  13.885 +    case $qsrcfile in
  13.886 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  13.887 +      qsrcfile="\"$qsrcfile\"" ;;
  13.888 +    esac
  13.889 +
  13.890 +    $run $rm "$libobj" "${libobj}T"
  13.891 +
  13.892 +    # Create a libtool object file (analogous to a ".la" file),
  13.893 +    # but don't create it if we're doing a dry run.
  13.894 +    test -z "$run" && cat > ${libobj}T <<EOF
  13.895 +# $libobj - a libtool object file
  13.896 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  13.897 +#
  13.898 +# Please DO NOT delete this file!
  13.899 +# It is necessary for linking the library.
  13.900 +
  13.901 +# Name of the PIC object.
  13.902 +EOF
  13.903 +
  13.904 +    # Only build a PIC object if we are building libtool libraries.
  13.905 +    if test "$build_libtool_libs" = yes; then
  13.906 +      # Without this assignment, base_compile gets emptied.
  13.907 +      fbsd_hideous_sh_bug=$base_compile
  13.908 +
  13.909 +      if test "$pic_mode" != no; then
  13.910 +	command="$base_compile $qsrcfile $pic_flag"
  13.911 +      else
  13.912 +	# Don't build PIC code
  13.913 +	command="$base_compile $qsrcfile"
  13.914 +      fi
  13.915 +
  13.916 +      if test ! -d "${xdir}$objdir"; then
  13.917 +	$show "$mkdir ${xdir}$objdir"
  13.918 +	$run $mkdir ${xdir}$objdir
  13.919 +	exit_status=$?
  13.920 +	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
  13.921 +	  exit $exit_status
  13.922 +	fi
  13.923 +      fi
  13.924 +
  13.925 +      if test -z "$output_obj"; then
  13.926 +	# Place PIC objects in $objdir
  13.927 +	command="$command -o $lobj"
  13.928 +      fi
  13.929 +
  13.930 +      $run $rm "$lobj" "$output_obj"
  13.931 +
  13.932 +      $show "$command"
  13.933 +      if $run eval "$command"; then :
  13.934 +      else
  13.935 +	test -n "$output_obj" && $run $rm $removelist
  13.936 +	exit $EXIT_FAILURE
  13.937 +      fi
  13.938 +
  13.939 +      if test "$need_locks" = warn &&
  13.940 +	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
  13.941 +	$echo "\
  13.942 +*** ERROR, $lockfile contains:
  13.943 +`cat $lockfile 2>/dev/null`
  13.944 +
  13.945 +but it should contain:
  13.946 +$srcfile
  13.947 +
  13.948 +This indicates that another process is trying to use the same
  13.949 +temporary object file, and libtool could not work around it because
  13.950 +your compiler does not support \`-c' and \`-o' together.  If you
  13.951 +repeat this compilation, it may succeed, by chance, but you had better
  13.952 +avoid parallel builds (make -j) in this platform, or get a better
  13.953 +compiler."
  13.954 +
  13.955 +	$run $rm $removelist
  13.956 +	exit $EXIT_FAILURE
  13.957 +      fi
  13.958 +
  13.959 +      # Just move the object if needed, then go on to compile the next one
  13.960 +      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
  13.961 +	$show "$mv $output_obj $lobj"
  13.962 +	if $run $mv $output_obj $lobj; then :
  13.963 +	else
  13.964 +	  error=$?
  13.965 +	  $run $rm $removelist
  13.966 +	  exit $error
  13.967 +	fi
  13.968 +      fi
  13.969 +
  13.970 +      # Append the name of the PIC object to the libtool object file.
  13.971 +      test -z "$run" && cat >> ${libobj}T <<EOF
  13.972 +pic_object='$objdir/$objname'
  13.973 +
  13.974 +EOF
  13.975 +
  13.976 +      # Allow error messages only from the first compilation.
  13.977 +      if test "$suppress_opt" = yes; then
  13.978 +        suppress_output=' >/dev/null 2>&1'
  13.979 +      fi
  13.980 +    else
  13.981 +      # No PIC object so indicate it doesn't exist in the libtool
  13.982 +      # object file.
  13.983 +      test -z "$run" && cat >> ${libobj}T <<EOF
  13.984 +pic_object=none
  13.985 +
  13.986 +EOF
  13.987 +    fi
  13.988 +
  13.989 +    # Only build a position-dependent object if we build old libraries.
  13.990 +    if test "$build_old_libs" = yes; then
  13.991 +      if test "$pic_mode" != yes; then
  13.992 +	# Don't build PIC code
  13.993 +	command="$base_compile $qsrcfile"
  13.994 +      else
  13.995 +	command="$base_compile $qsrcfile $pic_flag"
  13.996 +      fi
  13.997 +      if test "$compiler_c_o" = yes; then
  13.998 +	command="$command -o $obj"
  13.999 +      fi
 13.1000 +
 13.1001 +      # Suppress compiler output if we already did a PIC compilation.
 13.1002 +      command="$command$suppress_output"
 13.1003 +      $run $rm "$obj" "$output_obj"
 13.1004 +      $show "$command"
 13.1005 +      if $run eval "$command"; then :
 13.1006 +      else
 13.1007 +	$run $rm $removelist
 13.1008 +	exit $EXIT_FAILURE
 13.1009 +      fi
 13.1010 +
 13.1011 +      if test "$need_locks" = warn &&
 13.1012 +	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
 13.1013 +	$echo "\
 13.1014 +*** ERROR, $lockfile contains:
 13.1015 +`cat $lockfile 2>/dev/null`
 13.1016 +
 13.1017 +but it should contain:
 13.1018 +$srcfile
 13.1019 +
 13.1020 +This indicates that another process is trying to use the same
 13.1021 +temporary object file, and libtool could not work around it because
 13.1022 +your compiler does not support \`-c' and \`-o' together.  If you
 13.1023 +repeat this compilation, it may succeed, by chance, but you had better
 13.1024 +avoid parallel builds (make -j) in this platform, or get a better
 13.1025 +compiler."
 13.1026 +
 13.1027 +	$run $rm $removelist
 13.1028 +	exit $EXIT_FAILURE
 13.1029 +      fi
 13.1030 +
 13.1031 +      # Just move the object if needed
 13.1032 +      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
 13.1033 +	$show "$mv $output_obj $obj"
 13.1034 +	if $run $mv $output_obj $obj; then :
 13.1035 +	else
 13.1036 +	  error=$?
 13.1037 +	  $run $rm $removelist
 13.1038 +	  exit $error
 13.1039 +	fi
 13.1040 +      fi
 13.1041 +
 13.1042 +      # Append the name of the non-PIC object the libtool object file.
 13.1043 +      # Only append if the libtool object file exists.
 13.1044 +      test -z "$run" && cat >> ${libobj}T <<EOF
 13.1045 +# Name of the non-PIC object.
 13.1046 +non_pic_object='$objname'
 13.1047 +
 13.1048 +EOF
 13.1049 +    else
 13.1050 +      # Append the name of the non-PIC object the libtool object file.
 13.1051 +      # Only append if the libtool object file exists.
 13.1052 +      test -z "$run" && cat >> ${libobj}T <<EOF
 13.1053 +# Name of the non-PIC object.
 13.1054 +non_pic_object=none
 13.1055 +
 13.1056 +EOF
 13.1057 +    fi
 13.1058 +
 13.1059 +    $run $mv "${libobj}T" "${libobj}"
 13.1060 +
 13.1061 +    # Unlock the critical section if it was locked
 13.1062 +    if test "$need_locks" != no; then
 13.1063 +      $run $rm "$lockfile"
 13.1064 +    fi
 13.1065 +
 13.1066 +    exit $EXIT_SUCCESS
 13.1067 +    ;;
 13.1068 +
 13.1069 +  # libtool link mode
 13.1070 +  link | relink)
 13.1071 +    modename="$modename: link"
 13.1072 +    case $host in
 13.1073 +    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 13.1074 +      # It is impossible to link a dll without this setting, and
 13.1075 +      # we shouldn't force the makefile maintainer to figure out
 13.1076 +      # which system we are compiling for in order to pass an extra
 13.1077 +      # flag for every libtool invocation.
 13.1078 +      # allow_undefined=no
 13.1079 +
 13.1080 +      # FIXME: Unfortunately, there are problems with the above when trying
 13.1081 +      # to make a dll which has undefined symbols, in which case not
 13.1082 +      # even a static library is built.  For now, we need to specify
 13.1083 +      # -no-undefined on the libtool link line when we can be certain
 13.1084 +      # that all symbols are satisfied, otherwise we get a static library.
 13.1085 +      allow_undefined=yes
 13.1086 +      ;;
 13.1087 +    *)
 13.1088 +      allow_undefined=yes
 13.1089 +      ;;
 13.1090 +    esac
 13.1091 +    libtool_args="$nonopt"
 13.1092 +    base_compile="$nonopt $@"
 13.1093 +    compile_command="$nonopt"
 13.1094 +    finalize_command="$nonopt"
 13.1095 +
 13.1096 +    compile_rpath=
 13.1097 +    finalize_rpath=
 13.1098 +    compile_shlibpath=
 13.1099 +    finalize_shlibpath=
 13.1100 +    convenience=
 13.1101 +    old_convenience=
 13.1102 +    deplibs=
 13.1103 +    old_deplibs=
 13.1104 +    compiler_flags=
 13.1105 +    linker_flags=
 13.1106 +    dllsearchpath=
 13.1107 +    lib_search_path=`pwd`
 13.1108 +    inst_prefix_dir=
 13.1109 +
 13.1110 +    avoid_version=no
 13.1111 +    dlfiles=
 13.1112 +    dlprefiles=
 13.1113 +    dlself=no
 13.1114 +    export_dynamic=no
 13.1115 +    export_symbols=
 13.1116 +    export_symbols_regex=
 13.1117 +    generated=
 13.1118 +    libobjs=
 13.1119 +    ltlibs=
 13.1120 +    module=no
 13.1121 +    no_install=no
 13.1122 +    objs=
 13.1123 +    non_pic_objects=
 13.1124 +    notinst_path= # paths that contain not-installed libtool libraries
 13.1125 +    precious_files_regex=
 13.1126 +    prefer_static_libs=no
 13.1127 +    preload=no
 13.1128 +    prev=
 13.1129 +    prevarg=
 13.1130 +    release=
 13.1131 +    rpath=
 13.1132 +    xrpath=
 13.1133 +    perm_rpath=
 13.1134 +    temp_rpath=
 13.1135 +    thread_safe=no
 13.1136 +    vinfo=
 13.1137 +    vinfo_number=no
 13.1138 +
 13.1139 +    func_infer_tag $base_compile
 13.1140 +
 13.1141 +    # We need to know -static, to get the right output filenames.
 13.1142 +    for arg
 13.1143 +    do
 13.1144 +      case $arg in
 13.1145 +      -all-static | -static)
 13.1146 +	if test "X$arg" = "X-all-static"; then
 13.1147 +	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
 13.1148 +	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
 13.1149 +	  fi
 13.1150 +	  if test -n "$link_static_flag"; then
 13.1151 +	    dlopen_self=$dlopen_self_static
 13.1152 +	  fi
 13.1153 +	  prefer_static_libs=yes
 13.1154 +	else
 13.1155 +	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
 13.1156 +	    dlopen_self=$dlopen_self_static
 13.1157 +	  fi
 13.1158 +	  prefer_static_libs=built
 13.1159 +	fi
 13.1160 +	build_libtool_libs=no
 13.1161 +	build_old_libs=yes
 13.1162 +	break
 13.1163 +	;;
 13.1164 +      esac
 13.1165 +    done
 13.1166 +
 13.1167 +    # See if our shared archives depend on static archives.
 13.1168 +    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
 13.1169 +
 13.1170 +    # Go through the arguments, transforming them on the way.
 13.1171 +    while test "$#" -gt 0; do
 13.1172 +      arg="$1"
 13.1173 +      shift
 13.1174 +      case $arg in
 13.1175 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 13.1176 +	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
 13.1177 +	;;
 13.1178 +      *) qarg=$arg ;;
 13.1179 +      esac
 13.1180 +      libtool_args="$libtool_args $qarg"
 13.1181 +
 13.1182 +      # If the previous option needs an argument, assign it.
 13.1183 +      if test -n "$prev"; then
 13.1184 +	case $prev in
 13.1185 +	output)
 13.1186 +	  compile_command="$compile_command @OUTPUT@"
 13.1187 +	  finalize_command="$finalize_command @OUTPUT@"
 13.1188 +	  ;;
 13.1189 +	esac
 13.1190 +
 13.1191 +	case $prev in
 13.1192 +	dlfiles|dlprefiles)
 13.1193 +	  if test "$preload" = no; then
 13.1194 +	    # Add the symbol object into the linking commands.
 13.1195 +	    compile_command="$compile_command @SYMFILE@"
 13.1196 +	    finalize_command="$finalize_command @SYMFILE@"
 13.1197 +	    preload=yes
 13.1198 +	  fi
 13.1199 +	  case $arg in
 13.1200 +	  *.la | *.lo) ;;  # We handle these cases below.
 13.1201 +	  force)
 13.1202 +	    if test "$dlself" = no; then
 13.1203 +	      dlself=needless
 13.1204 +	      export_dynamic=yes
 13.1205 +	    fi
 13.1206 +	    prev=
 13.1207 +	    continue
 13.1208 +	    ;;
 13.1209 +	  self)
 13.1210 +	    if test "$prev" = dlprefiles; then
 13.1211 +	      dlself=yes
 13.1212 +	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
 13.1213 +	      dlself=yes
 13.1214 +	    else
 13.1215 +	      dlself=needless
 13.1216 +	      export_dynamic=yes
 13.1217 +	    fi
 13.1218 +	    prev=
 13.1219 +	    continue
 13.1220 +	    ;;
 13.1221 +	  *)
 13.1222 +	    if test "$prev" = dlfiles; then
 13.1223 +	      dlfiles="$dlfiles $arg"
 13.1224 +	    else
 13.1225 +	      dlprefiles="$dlprefiles $arg"
 13.1226 +	    fi
 13.1227 +	    prev=
 13.1228 +	    continue
 13.1229 +	    ;;
 13.1230 +	  esac
 13.1231 +	  ;;
 13.1232 +	expsyms)
 13.1233 +	  export_symbols="$arg"
 13.1234 +	  if test ! -f "$arg"; then
 13.1235 +	    $echo "$modename: symbol file \`$arg' does not exist"
 13.1236 +	    exit $EXIT_FAILURE
 13.1237 +	  fi
 13.1238 +	  prev=
 13.1239 +	  continue
 13.1240 +	  ;;
 13.1241 +	expsyms_regex)
 13.1242 +	  export_symbols_regex="$arg"
 13.1243 +	  prev=
 13.1244 +	  continue
 13.1245 +	  ;;
 13.1246 +	inst_prefix)
 13.1247 +	  inst_prefix_dir="$arg"
 13.1248 +	  prev=
 13.1249 +	  continue
 13.1250 +	  ;;
 13.1251 +	precious_regex)
 13.1252 +	  precious_files_regex="$arg"
 13.1253 +	  prev=
 13.1254 +	  continue
 13.1255 +	  ;;
 13.1256 +	release)
 13.1257 +	  release="-$arg"
 13.1258 +	  prev=
 13.1259 +	  continue
 13.1260 +	  ;;
 13.1261 +	objectlist)
 13.1262 +	  if test -f "$arg"; then
 13.1263 +	    save_arg=$arg
 13.1264 +	    moreargs=
 13.1265 +	    for fil in `cat $save_arg`
 13.1266 +	    do
 13.1267 +#	      moreargs="$moreargs $fil"
 13.1268 +	      arg=$fil
 13.1269 +	      # A libtool-controlled object.
 13.1270 +
 13.1271 +	      # Check to see that this really is a libtool object.
 13.1272 +	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 13.1273 +		pic_object=
 13.1274 +		non_pic_object=
 13.1275 +
 13.1276 +		# Read the .lo file
 13.1277 +		# If there is no directory component, then add one.
 13.1278 +		case $arg in
 13.1279 +		*/* | *\\*) . $arg ;;
 13.1280 +		*) . ./$arg ;;
 13.1281 +		esac
 13.1282 +
 13.1283 +		if test -z "$pic_object" || \
 13.1284 +		   test -z "$non_pic_object" ||
 13.1285 +		   test "$pic_object" = none && \
 13.1286 +		   test "$non_pic_object" = none; then
 13.1287 +		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
 13.1288 +		  exit $EXIT_FAILURE
 13.1289 +		fi
 13.1290 +
 13.1291 +		# Extract subdirectory from the argument.
 13.1292 +		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
 13.1293 +		if test "X$xdir" = "X$arg"; then
 13.1294 +		  xdir=
 13.1295 +		else
 13.1296 +		  xdir="$xdir/"
 13.1297 +		fi
 13.1298 +
 13.1299 +		if test "$pic_object" != none; then
 13.1300 +		  # Prepend the subdirectory the object is found in.
 13.1301 +		  pic_object="$xdir$pic_object"
 13.1302 +
 13.1303 +		  if test "$prev" = dlfiles; then
 13.1304 +		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
 13.1305 +		      dlfiles="$dlfiles $pic_object"
 13.1306 +		      prev=
 13.1307 +		      continue
 13.1308 +		    else
 13.1309 +		      # If libtool objects are unsupported, then we need to preload.
 13.1310 +		      prev=dlprefiles
 13.1311 +		    fi
 13.1312 +		  fi
 13.1313 +
 13.1314 +		  # CHECK ME:  I think I busted this.  -Ossama
 13.1315 +		  if test "$prev" = dlprefiles; then
 13.1316 +		    # Preload the old-style object.
 13.1317 +		    dlprefiles="$dlprefiles $pic_object"
 13.1318 +		    prev=
 13.1319 +		  fi
 13.1320 +
 13.1321 +		  # A PIC object.
 13.1322 +		  libobjs="$libobjs $pic_object"
 13.1323 +		  arg="$pic_object"
 13.1324 +		fi
 13.1325 +
 13.1326 +		# Non-PIC object.
 13.1327 +		if test "$non_pic_object" != none; then
 13.1328 +		  # Prepend the subdirectory the object is found in.
 13.1329 +		  non_pic_object="$xdir$non_pic_object"
 13.1330 +
 13.1331 +		  # A standard non-PIC object
 13.1332 +		  non_pic_objects="$non_pic_objects $non_pic_object"
 13.1333 +		  if test -z "$pic_object" || test "$pic_object" = none ; then
 13.1334 +		    arg="$non_pic_object"
 13.1335 +		  fi
 13.1336 +		else
 13.1337 +		  # If the PIC object exists, use it instead.
 13.1338 +		  # $xdir was prepended to $pic_object above.
 13.1339 +		  non_pic_object="$pic_object"
 13.1340 +		  non_pic_objects="$non_pic_objects $non_pic_object"
 13.1341 +		fi
 13.1342 +	      else
 13.1343 +		# Only an error if not doing a dry-run.
 13.1344 +		if test -z "$run"; then
 13.1345 +		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
 13.1346 +		  exit $EXIT_FAILURE
 13.1347 +		else
 13.1348 +		  # Dry-run case.
 13.1349 +
 13.1350 +		  # Extract subdirectory from the argument.
 13.1351 +		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
 13.1352 +		  if test "X$xdir" = "X$arg"; then
 13.1353 +		    xdir=
 13.1354 +		  else
 13.1355 +		    xdir="$xdir/"
 13.1356 +		  fi
 13.1357 +
 13.1358 +		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
 13.1359 +		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
 13.1360 +		  libobjs="$libobjs $pic_object"
 13.1361 +		  non_pic_objects="$non_pic_objects $non_pic_object"
 13.1362 +		fi
 13.1363 +	      fi
 13.1364 +	    done
 13.1365 +	  else
 13.1366 +	    $echo "$modename: link input file \`$save_arg' does not exist"
 13.1367 +	    exit $EXIT_FAILURE
 13.1368 +	  fi
 13.1369 +	  arg=$save_arg
 13.1370 +	  prev=
 13.1371 +	  continue
 13.1372 +	  ;;
 13.1373 +	rpath | xrpath)
 13.1374 +	  # We need an absolute path.
 13.1375 +	  case $arg in
 13.1376 +	  [\\/]* | [A-Za-z]:[\\/]*) ;;
 13.1377 +	  *)
 13.1378 +	    $echo "$modename: only absolute run-paths are allowed" 1>&2
 13.1379 +	    exit $EXIT_FAILURE
 13.1380 +	    ;;
 13.1381 +	  esac
 13.1382 +	  if test "$prev" = rpath; then
 13.1383 +	    case "$rpath " in
 13.1384 +	    *" $arg "*) ;;
 13.1385 +	    *) rpath="$rpath $arg" ;;
 13.1386 +	    esac
 13.1387 +	  else
 13.1388 +	    case "$xrpath " in
 13.1389 +	    *" $arg "*) ;;
 13.1390 +	    *) xrpath="$xrpath $arg" ;;
 13.1391 +	    esac
 13.1392 +	  fi
 13.1393 +	  prev=
 13.1394 +	  continue
 13.1395 +	  ;;
 13.1396 +	xcompiler)
 13.1397 +	  compiler_flags="$compiler_flags $qarg"
 13.1398 +	  prev=
 13.1399 +	  compile_command="$compile_command $qarg"
 13.1400 +	  finalize_command="$finalize_command $qarg"
 13.1401 +	  continue
 13.1402 +	  ;;
 13.1403 +	xlinker)
 13.1404 +	  linker_flags="$linker_flags $qarg"
 13.1405 +	  compiler_flags="$compiler_flags $wl$qarg"
 13.1406 +	  prev=
 13.1407 +	  compile_command="$compile_command $wl$qarg"
 13.1408 +	  finalize_command="$finalize_command $wl$qarg"
 13.1409 +	  continue
 13.1410 +	  ;;
 13.1411 +	xcclinker)
 13.1412 +	  linker_flags="$linker_flags $qarg"
 13.1413 +	  compiler_flags="$compiler_flags $qarg"
 13.1414 +	  prev=
 13.1415 +	  compile_command="$compile_command $qarg"
 13.1416 +	  finalize_command="$finalize_command $qarg"
 13.1417 +	  continue
 13.1418 +	  ;;
 13.1419 +	shrext)
 13.1420 +  	  shrext_cmds="$arg"
 13.1421 +	  prev=
 13.1422 +	  continue
 13.1423 +	  ;;
 13.1424 +	darwin_framework|darwin_framework_skip)
 13.1425 +	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
 13.1426 +	  compile_command="$compile_command $arg"
 13.1427 +	  finalize_command="$finalize_command $arg"
 13.1428 +	  prev=
 13.1429 +	  continue
 13.1430 +	  ;;
 13.1431 +	*)
 13.1432 +	  eval "$prev=\"\$arg\""
 13.1433 +	  prev=
 13.1434 +	  continue
 13.1435 +	  ;;
 13.1436 +	esac
 13.1437 +      fi # test -n "$prev"
 13.1438 +
 13.1439 +      prevarg="$arg"
 13.1440 +
 13.1441 +      case $arg in
 13.1442 +      -all-static)
 13.1443 +	if test -n "$link_static_flag"; then
 13.1444 +	  compile_command="$compile_command $link_static_flag"
 13.1445 +	  finalize_command="$finalize_command $link_static_flag"
 13.1446 +	fi
 13.1447 +	continue
 13.1448 +	;;
 13.1449 +
 13.1450 +      -allow-undefined)
 13.1451 +	# FIXME: remove this flag sometime in the future.
 13.1452 +	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
 13.1453 +	continue
 13.1454 +	;;
 13.1455 +
 13.1456 +      -avoid-version)
 13.1457 +	avoid_version=yes
 13.1458 +	continue
 13.1459 +	;;
 13.1460 +
 13.1461 +      -dlopen)
 13.1462 +	prev=dlfiles
 13.1463 +	continue
 13.1464 +	;;
 13.1465 +
 13.1466 +      -dlpreopen)
 13.1467 +	prev=dlprefiles
 13.1468 +	continue
 13.1469 +	;;
 13.1470 +
 13.1471 +      -export-dynamic)
 13.1472 +	export_dynamic=yes
 13.1473 +	continue
 13.1474 +	;;
 13.1475 +
 13.1476 +      -export-symbols | -export-symbols-regex)
 13.1477 +	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
 13.1478 +	  $echo "$modename: more than one -exported-symbols argument is not allowed"
 13.1479 +	  exit $EXIT_FAILURE
 13.1480 +	fi
 13.1481 +	if test "X$arg" = "X-export-symbols"; then
 13.1482 +	  prev=expsyms
 13.1483 +	else
 13.1484 +	  prev=expsyms_regex
 13.1485 +	fi
 13.1486 +	continue
 13.1487 +	;;
 13.1488 +
 13.1489 +      -framework|-arch|-isysroot)
 13.1490 +	case " $CC " in
 13.1491 +	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
 13.1492 +		prev=darwin_framework_skip ;;
 13.1493 +	  *) compiler_flags="$compiler_flags $arg"
 13.1494 +	     prev=darwin_framework ;;
 13.1495 +	esac
 13.1496 +	compile_command="$compile_command $arg"
 13.1497 +	finalize_command="$finalize_command $arg"
 13.1498 +	continue
 13.1499 +	;;
 13.1500 +
 13.1501 +      -inst-prefix-dir)
 13.1502 +	prev=inst_prefix
 13.1503 +	continue
 13.1504 +	;;
 13.1505 +
 13.1506 +      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
 13.1507 +      # so, if we see these flags be careful not to treat them like -L
 13.1508 +      -L[A-Z][A-Z]*:*)
 13.1509 +	case $with_gcc/$host in
 13.1510 +	no/*-*-irix* | /*-*-irix*)
 13.1511 +	  compile_command="$compile_command $arg"
 13.1512 +	  finalize_command="$finalize_command $arg"
 13.1513 +	  ;;
 13.1514 +	esac
 13.1515 +	continue
 13.1516 +	;;
 13.1517 +
 13.1518 +      -L*)
 13.1519 +	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
 13.1520 +	# We need an absolute path.
 13.1521 +	case $dir in
 13.1522 +	[\\/]* | [A-Za-z]:[\\/]*) ;;
 13.1523 +	*)
 13.1524 +	  absdir=`cd "$dir" && pwd`
 13.1525 +	  if test -z "$absdir"; then
 13.1526 +	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
 13.1527 +	    absdir="$dir"
 13.1528 +	    notinst_path="$notinst_path $dir"
 13.1529 +	  fi
 13.1530 +	  dir="$absdir"
 13.1531 +	  ;;
 13.1532 +	esac
 13.1533 +	case "$deplibs " in
 13.1534 +	*" -L$dir "*) ;;
 13.1535 +	*)
 13.1536 +	  deplibs="$deplibs -L$dir"
 13.1537 +	  lib_search_path="$lib_search_path $dir"
 13.1538 +	  ;;
 13.1539 +	esac
 13.1540 +	case $host in
 13.1541 +	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 13.1542 +	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
 13.1543 +	  case :$dllsearchpath: in
 13.1544 +	  *":$dir:"*) ;;
 13.1545 +	  *) dllsearchpath="$dllsearchpath:$dir";;
 13.1546 +	  esac
 13.1547 +	  case :$dllsearchpath: in
 13.1548 +	  *":$testbindir:"*) ;;
 13.1549 +	  *) dllsearchpath="$dllsearchpath:$testbindir";;
 13.1550 +	  esac
 13.1551 +	  ;;
 13.1552 +	esac
 13.1553 +	continue
 13.1554 +	;;
 13.1555 +
 13.1556 +      -l*)
 13.1557 +	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
 13.1558 +	  case $host in
 13.1559 +	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
 13.1560 +	    # These systems don't actually have a C or math library (as such)
 13.1561 +	    continue
 13.1562 +	    ;;
 13.1563 +	  *-*-os2*)
 13.1564 +	    # These systems don't actually have a C library (as such)
 13.1565 +	    test "X$arg" = "X-lc" && continue
 13.1566 +	    ;;
 13.1567 +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 13.1568 +	    # Do not include libc due to us having libc/libc_r.
 13.1569 +	    test "X$arg" = "X-lc" && continue
 13.1570 +	    ;;
 13.1571 +	  *-*-rhapsody* | *-*-darwin1.[012])
 13.1572 +	    # Rhapsody C and math libraries are in the System framework
 13.1573 +	    deplibs="$deplibs -framework System"
 13.1574 +	    continue
 13.1575 +	    ;;
 13.1576 +	  *-*-sco3.2v5* | *-*-sco5v6*)
 13.1577 +	    # Causes problems with __ctype
 13.1578 +	    test "X$arg" = "X-lc" && continue
 13.1579 +	    ;;
 13.1580 +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
 13.1581 +	    # Compiler inserts libc in the correct place for threads to work
 13.1582 +	    test "X$arg" = "X-lc" && continue
 13.1583 +	    ;;
 13.1584 +	  esac
 13.1585 +	elif test "X$arg" = "X-lc_r"; then
 13.1586 +	 case $host in
 13.1587 +	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 13.1588 +	   # Do not include libc_r directly, use -pthread flag.
 13.1589 +	   continue
 13.1590 +	   ;;
 13.1591 +	 esac
 13.1592 +	fi
 13.1593 +	deplibs="$deplibs $arg"
 13.1594 +	continue
 13.1595 +	;;
 13.1596 +
 13.1597 +      # Tru64 UNIX uses -model [arg] to determine the layout of C++
 13.1598 +      # classes, name mangling, and exception handling.
 13.1599 +      -model)
 13.1600 +	compile_command="$compile_command $arg"
 13.1601 +	compiler_flags="$compiler_flags $arg"
 13.1602 +	finalize_command="$finalize_command $arg"
 13.1603 +	prev=xcompiler
 13.1604 +	continue
 13.1605 +	;;
 13.1606 +
 13.1607 +     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 13.1608 +	compiler_flags="$compiler_flags $arg"
 13.1609 +	compile_command="$compile_command $arg"
 13.1610 +	finalize_command="$finalize_command $arg"
 13.1611 +	continue
 13.1612 +	;;
 13.1613 +
 13.1614 +      -module)
 13.1615 +	module=yes
 13.1616 +	continue
 13.1617 +	;;
 13.1618 +
 13.1619 +      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
 13.1620 +      # -r[0-9][0-9]* specifies the processor on the SGI compiler
 13.1621 +      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
 13.1622 +      # +DA*, +DD* enable 64-bit mode on the HP compiler
 13.1623 +      # -q* pass through compiler args for the IBM compiler
 13.1624 +      # -m* pass through architecture-specific compiler args for GCC
 13.1625 +      # -m*, -t[45]*, -txscale* pass through architecture-specific
 13.1626 +      # compiler args for GCC
 13.1627 +      # -pg pass through profiling flag for GCC
 13.1628 +      # @file GCC response files
 13.1629 +      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
 13.1630 +      -t[45]*|-txscale*|@*)
 13.1631 +
 13.1632 +	# Unknown arguments in both finalize_command and compile_command need
 13.1633 +	# to be aesthetically quoted because they are evaled later.
 13.1634 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
 13.1635 +	case $arg in
 13.1636 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 13.1637 +	  arg="\"$arg\""
 13.1638 +	  ;;
 13.1639 +	esac
 13.1640 +        compile_command="$compile_command $arg"
 13.1641 +        finalize_command="$finalize_command $arg"
 13.1642 +        compiler_flags="$compiler_flags $arg"
 13.1643 +        continue
 13.1644 +        ;;
 13.1645 +
 13.1646 +      -shrext)
 13.1647 +	prev=shrext
 13.1648 +	continue
 13.1649 +	;;
 13.1650 +
 13.1651 +      -no-fast-install)
 13.1652 +	fast_install=no
 13.1653 +	continue
 13.1654 +	;;
 13.1655 +
 13.1656 +      -no-install)
 13.1657 +	case $host in
 13.1658 +	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 13.1659 +	  # The PATH hackery in wrapper scripts is required on Windows
 13.1660 +	  # in order for the loader to find any dlls it needs.
 13.1661 +	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
 13.1662 +	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
 13.1663 +	  fast_install=no
 13.1664 +	  ;;
 13.1665 +	*) no_install=yes ;;
 13.1666 +	esac
 13.1667 +	continue
 13.1668 +	;;
 13.1669 +
 13.1670 +      -no-undefined)
 13.1671 +	allow_undefined=no
 13.1672 +	continue
 13.1673 +	;;
 13.1674 +
 13.1675 +      -objectlist)
 13.1676 +	prev=objectlist
 13.1677 +	continue
 13.1678 +	;;
 13.1679 +
 13.1680 +      -o) prev=output ;;
 13.1681 +
 13.1682 +      -precious-files-regex)
 13.1683 +	prev=precious_regex
 13.1684 +	continue
 13.1685 +	;;
 13.1686 +
 13.1687 +      -release)
 13.1688 +	prev=release
 13.1689 +	continue
 13.1690 +	;;
 13.1691 +
 13.1692 +      -rpath)
 13.1693 +	prev=rpath
 13.1694 +	continue
 13.1695 +	;;
 13.1696 +
 13.1697 +      -R)
 13.1698 +	prev=xrpath
 13.1699 +	continue
 13.1700 +	;;
 13.1701 +
 13.1702 +      -R*)
 13.1703 +	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
 13.1704 +	# We need an absolute path.
 13.1705 +	case $dir in
 13.1706 +	[\\/]* | [A-Za-z]:[\\/]*) ;;
 13.1707 +	*)
 13.1708 +	  $echo "$modename: only absolute run-paths are allowed" 1>&2
 13.1709 +	  exit $EXIT_FAILURE
 13.1710 +	  ;;
 13.1711 +	esac
 13.1712 +	case "$xrpath " in
 13.1713 +	*" $dir "*) ;;
 13.1714 +	*) xrpath="$xrpath $dir" ;;
 13.1715 +	esac
 13.1716 +	continue
 13.1717 +	;;
 13.1718 +
 13.1719 +      -static)
 13.1720 +	# The effects of -static are defined in a previous loop.
 13.1721 +	# We used to do the same as -all-static on platforms that
 13.1722 +	# didn't have a PIC flag, but the assumption that the effects
 13.1723 +	# would be equivalent was wrong.  It would break on at least
 13.1724 +	# Digital Unix and AIX.
 13.1725 +	continue
 13.1726 +	;;
 13.1727 +
 13.1728 +      -thread-safe)
 13.1729 +	thread_safe=yes
 13.1730 +	continue
 13.1731 +	;;
 13.1732 +
 13.1733 +      -version-info)
 13.1734 +	prev=vinfo
 13.1735 +	continue
 13.1736 +	;;
 13.1737 +      -version-number)
 13.1738 +	prev=vinfo
 13.1739 +	vinfo_number=yes
 13.1740 +	continue
 13.1741 +	;;
 13.1742 +
 13.1743 +      -Wc,*)
 13.1744 +	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
 13.1745 +	arg=
 13.1746 +	save_ifs="$IFS"; IFS=','
 13.1747 +	for flag in $args; do
 13.1748 +	  IFS="$save_ifs"
 13.1749 +	  case $flag in
 13.1750 +	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 13.1751 +	    flag="\"$flag\""
 13.1752 +	    ;;
 13.1753 +	  esac
 13.1754 +	  arg="$arg $wl$flag"
 13.1755 +	  compiler_flags="$compiler_flags $flag"
 13.1756 +	done
 13.1757 +	IFS="$save_ifs"
 13.1758 +	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
 13.1759 +	;;
 13.1760 +
 13.1761 +      -Wl,*)
 13.1762 +	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
 13.1763 +	arg=
 13.1764 +	save_ifs="$IFS"; IFS=','
 13.1765 +	for flag in $args; do
 13.1766 +	  IFS="$save_ifs"
 13.1767 +	  case $flag in
 13.1768 +	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 13.1769 +	    flag="\"$flag\""
 13.1770 +	    ;;
 13.1771 +	  esac
 13.1772 +	  arg="$arg $wl$flag"
 13.1773 +	  compiler_flags="$compiler_flags $wl$flag"
 13.1774 +	  linker_flags="$linker_flags $flag"
 13.1775 +	done
 13.1776 +	IFS="$save_ifs"
 13.1777 +	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
 13.1778 +	;;
 13.1779 +
 13.1780 +      -Xcompiler)
 13.1781 +	prev=xcompiler
 13.1782 +	continue
 13.1783 +	;;
 13.1784 +
 13.1785 +      -Xlinker)
 13.1786 +	prev=xlinker
 13.1787 +	continue
 13.1788 +	;;
 13.1789 +
 13.1790 +      -XCClinker)
 13.1791 +	prev=xcclinker
 13.1792 +	continue
 13.1793 +	;;
 13.1794 +
 13.1795 +      # Some other compiler flag.
 13.1796 +      -* | +*)
 13.1797 +	# Unknown arguments in both finalize_command and compile_command need
 13.1798 +	# to be aesthetically quoted because they are evaled later.
 13.1799 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
 13.1800 +	case $arg in
 13.1801 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 13.1802 +	  arg="\"$arg\""
 13.1803 +	  ;;
 13.1804 +	esac
 13.1805 +	;;
 13.1806 +
 13.1807 +      *.$objext)
 13.1808 +	# A standard object.
 13.1809 +	objs="$objs $arg"
 13.1810 +	;;
 13.1811 +
 13.1812 +      *.lo)
 13.1813 +	# A libtool-controlled object.
 13.1814 +
 13.1815 +	# Check to see that this really is a libtool object.
 13.1816 +	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 13.1817 +	  pic_object=
 13.1818 +	  non_pic_object=
 13.1819 +
 13.1820 +	  # Read the .lo file
 13.1821 +	  # If there is no directory component, then add one.
 13.1822 +	  case $arg in
 13.1823 +	  */* | *\\*) . $arg ;;
 13.1824 +	  *) . ./$arg ;;
 13.1825 +	  esac
 13.1826 +
 13.1827 +	  if test -z "$pic_object" || \
 13.1828 +	     test -z "$non_pic_object" ||
 13.1829 +	     test "$pic_object" = none && \
 13.1830 +	     test "$non_pic_object" = none; then
 13.1831 +	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
 13.1832 +	    exit $EXIT_FAILURE
 13.1833 +	  fi
 13.1834 +
 13.1835 +	  # Extract subdirectory from the argument.
 13.1836 +	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
 13.1837 +	  if test "X$xdir" = "X$arg"; then
 13.1838 +	    xdir=
 13.1839 + 	  else
 13.1840 +	    xdir="$xdir/"
 13.1841 +	  fi
 13.1842 +
 13.1843 +	  if test "$pic_object" != none; then
 13.1844 +	    # Prepend the subdirectory the object is found in.
 13.1845 +	    pic_object="$xdir$pic_object"
 13.1846 +
 13.1847 +	    if test "$prev" = dlfiles; then
 13.1848 +	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
 13.1849 +		dlfiles="$dlfiles $pic_object"
 13.1850 +		prev=
 13.1851 +		continue
 13.1852 +	      else
 13.1853 +		# If libtool objects are unsupported, then we need to preload.
 13.1854 +		prev=dlprefiles
 13.1855 +	      fi
 13.1856 +	    fi
 13.1857 +
 13.1858 +	    # CHECK ME:  I think I busted this.  -Ossama
 13.1859 +	    if test "$prev" = dlprefiles; then
 13.1860 +	      # Preload the old-style object.
 13.1861 +	      dlprefiles="$dlprefiles $pic_object"
 13.1862 +	      prev=
 13.1863 +	    fi
 13.1864 +
 13.1865 +	    # A PIC object.
 13.1866 +	    libobjs="$libobjs $pic_object"
 13.1867 +	    arg="$pic_object"
 13.1868 +	  fi
 13.1869 +
 13.1870 +	  # Non-PIC object.
 13.1871 +	  if test "$non_pic_object" != none; then
 13.1872 +	    # Prepend the subdirectory the object is found in.
 13.1873 +	    non_pic_object="$xdir$non_pic_object"
 13.1874 +
 13.1875 +	    # A standard non-PIC object
 13.1876 +	    non_pic_objects="$non_pic_objects $non_pic_object"
 13.1877 +	    if test -z "$pic_object" || test "$pic_object" = none ; then
 13.1878 +	      arg="$non_pic_object"
 13.1879 +	    fi
 13.1880 +	  else
 13.1881 +	    # If the PIC object exists, use it instead.
 13.1882 +	    # $xdir was prepended to $pic_object above.
 13.1883 +	    non_pic_object="$pic_object"
 13.1884 +	    non_pic_objects="$non_pic_objects $non_pic_object"
 13.1885 +	  fi
 13.1886 +	else
 13.1887 +	  # Only an error if not doing a dry-run.
 13.1888 +	  if test -z "$run"; then
 13.1889 +	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
 13.1890 +	    exit $EXIT_FAILURE
 13.1891 +	  else
 13.1892 +	    # Dry-run case.
 13.1893 +
 13.1894 +	    # Extract subdirectory from the argument.
 13.1895 +	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
 13.1896 +	    if test "X$xdir" = "X$arg"; then
 13.1897 +	      xdir=
 13.1898 +	    else
 13.1899 +	      xdir="$xdir/"
 13.1900 +	    fi
 13.1901 +
 13.1902 +	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
 13.1903 +	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
 13.1904 +	    libobjs="$libobjs $pic_object"
 13.1905 +	    non_pic_objects="$non_pic_objects $non_pic_object"
 13.1906 +	  fi
 13.1907 +	fi
 13.1908 +	;;
 13.1909 +
 13.1910 +      *.$libext)
 13.1911 +	# An archive.
 13.1912 +	deplibs="$deplibs $arg"
 13.1913 +	old_deplibs="$old_deplibs $arg"
 13.1914 +	continue
 13.1915 +	;;
 13.1916 +
 13.1917 +      *.la)
 13.1918 +	# A libtool-controlled library.
 13.1919 +
 13.1920 +	if test "$prev" = dlfiles; then
 13.1921 +	  # This library was specified with -dlopen.
 13.1922 +	  dlfiles="$dlfiles $arg"
 13.1923 +	  prev=
 13.1924 +	elif test "$prev" = dlprefiles; then
 13.1925 +	  # The library was specified with -dlpreopen.
 13.1926 +	  dlprefiles="$dlprefiles $arg"
 13.1927 +	  prev=
 13.1928 +	else
 13.1929 +	  deplibs="$deplibs $arg"
 13.1930 +	fi
 13.1931 +	continue
 13.1932 +	;;
 13.1933 +
 13.1934 +      # Some other compiler argument.
 13.1935 +      *)
 13.1936 +	# Unknown arguments in both finalize_command and compile_command need
 13.1937 +	# to be aesthetically quoted because they are evaled later.
 13.1938 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
 13.1939 +	case $arg in
 13.1940 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 13.1941 +	  arg="\"$arg\""
 13.1942 +	  ;;
 13.1943 +	esac
 13.1944 +	;;
 13.1945 +      esac # arg
 13.1946 +
 13.1947 +      # Now actually substitute the argument into the commands.
 13.1948 +      if test -n "$arg"; then
 13.1949 +	compile_command="$compile_command $arg"
 13.1950 +	finalize_command="$finalize_command $arg"
 13.1951 +      fi
 13.1952 +    done # argument parsing loop
 13.1953 +
 13.1954 +    if test -n "$prev"; then
 13.1955 +      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
 13.1956 +      $echo "$help" 1>&2
 13.1957 +      exit $EXIT_FAILURE
 13.1958 +    fi
 13.1959 +
 13.1960 +    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
 13.1961 +      eval arg=\"$export_dynamic_flag_spec\"
 13.1962 +      compile_command="$compile_command $arg"
 13.1963 +      finalize_command="$finalize_command $arg"
 13.1964 +    fi
 13.1965 +
 13.1966 +    oldlibs=
 13.1967 +    # calculate the name of the file, without its directory
 13.1968 +    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
 13.1969 +    libobjs_save="$libobjs"
 13.1970 +
 13.1971 +    if test -n "$shlibpath_var"; then
 13.1972 +      # get the directories listed in $shlibpath_var
 13.1973 +      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
 13.1974 +    else
 13.1975 +      shlib_search_path=
 13.1976 +    fi
 13.1977 +    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
 13.1978 +    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
 13.1979 +
 13.1980 +    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
 13.1981 +    if test "X$output_objdir" = "X$output"; then
 13.1982 +      output_objdir="$objdir"
 13.1983 +    else
 13.1984 +      output_objdir="$output_objdir/$objdir"
 13.1985 +    fi
 13.1986 +    # Create the object directory.
 13.1987 +    if test ! -d "$output_objdir"; then
 13.1988 +      $show "$mkdir $output_objdir"
 13.1989 +      $run $mkdir $output_objdir
 13.1990 +      exit_status=$?
 13.1991 +      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
 13.1992 +	exit $exit_status
 13.1993 +      fi
 13.1994 +    fi
 13.1995 +
 13.1996 +    # Determine the type of output
 13.1997 +    case $output in
 13.1998 +    "")
 13.1999 +      $echo "$modename: you must specify an output file" 1>&2
 13.2000 +      $echo "$help" 1>&2
 13.2001 +      exit $EXIT_FAILURE
 13.2002 +      ;;
 13.2003 +    *.$libext) linkmode=oldlib ;;
 13.2004 +    *.lo | *.$objext) linkmode=obj ;;
 13.2005 +    *.la) linkmode=lib ;;
 13.2006 +    *) linkmode=prog ;; # Anything else should be a program.
 13.2007 +    esac
 13.2008 +
 13.2009 +    case $host in
 13.2010 +    *cygwin* | *mingw* | *pw32*)
 13.2011 +      # don't eliminate duplications in $postdeps and $predeps
 13.2012 +      duplicate_compiler_generated_deps=yes
 13.2013 +      ;;
 13.2014 +    *)
 13.2015 +      duplicate_compiler_generated_deps=$duplicate_deps
 13.2016 +      ;;
 13.2017 +    esac
 13.2018 +    specialdeplibs=
 13.2019 +
 13.2020 +    libs=
 13.2021 +    # Find all interdependent deplibs by searching for libraries
 13.2022 +    # that are linked more than once (e.g. -la -lb -la)
 13.2023 +    for deplib in $deplibs; do
 13.2024 +      if test "X$duplicate_deps" = "Xyes" ; then
 13.2025 +	case "$libs " in
 13.2026 +	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
 13.2027 +	esac
 13.2028 +      fi
 13.2029 +      libs="$libs $deplib"
 13.2030 +    done
 13.2031 +
 13.2032 +    if test "$linkmode" = lib; then
 13.2033 +      libs="$predeps $libs $compiler_lib_search_path $postdeps"
 13.2034 +
 13.2035 +      # Compute libraries that are listed more than once in $predeps
 13.2036 +      # $postdeps and mark them as special (i.e., whose duplicates are
 13.2037 +      # not to be eliminated).
 13.2038 +      pre_post_deps=
 13.2039 +      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
 13.2040 +	for pre_post_dep in $predeps $postdeps; do
 13.2041 +	  case "$pre_post_deps " in
 13.2042 +	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
 13.2043 +	  esac
 13.2044 +	  pre_post_deps="$pre_post_deps $pre_post_dep"
 13.2045 +	done
 13.2046 +      fi
 13.2047 +      pre_post_deps=
 13.2048 +    fi
 13.2049 +
 13.2050 +    deplibs=
 13.2051 +    newdependency_libs=
 13.2052 +    newlib_search_path=
 13.2053 +    need_relink=no # whether we're linking any uninstalled libtool libraries
 13.2054 +    notinst_deplibs= # not-installed libtool libraries
 13.2055 +    case $linkmode in
 13.2056 +    lib)
 13.2057 +	passes="conv link"
 13.2058 +	for file in $dlfiles $dlprefiles; do
 13.2059 +	  case $file in
 13.2060 +	  *.la) ;;
 13.2061 +	  *)
 13.2062 +	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
 13.2063 +	    exit $EXIT_FAILURE
 13.2064 +	    ;;
 13.2065 +	  esac
 13.2066 +	done
 13.2067 +	;;
 13.2068 +    prog)
 13.2069 +	compile_deplibs=
 13.2070 +	finalize_deplibs=
 13.2071 +	alldeplibs=no
 13.2072 +	newdlfiles=
 13.2073 +	newdlprefiles=
 13.2074 +	passes="conv scan dlopen dlpreopen link"
 13.2075 +	;;
 13.2076 +    *)  passes="conv"
 13.2077 +	;;
 13.2078 +    esac
 13.2079 +    for pass in $passes; do
 13.2080 +      if test "$linkmode,$pass" = "lib,link" ||
 13.2081 +	 test "$linkmode,$pass" = "prog,scan"; then
 13.2082 +	libs="$deplibs"
 13.2083 +	deplibs=
 13.2084 +      fi
 13.2085 +      if test "$linkmode" = prog; then
 13.2086 +	case $pass in
 13.2087 +	dlopen) libs="$dlfiles" ;;
 13.2088 +	dlpreopen) libs="$dlprefiles" ;;
 13.2089 +	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 13.2090 +	esac
 13.2091 +      fi
 13.2092 +      if test "$pass" = dlopen; then
 13.2093 +	# Collect dlpreopened libraries
 13.2094 +	save_deplibs="$deplibs"
 13.2095 +	deplibs=
 13.2096 +      fi
 13.2097 +      for deplib in $libs; do
 13.2098 +	lib=
 13.2099 +	found=no
 13.2100 +	case $deplib in
 13.2101 +	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 13.2102 +	  if test "$linkmode,$pass" = "prog,link"; then
 13.2103 +	    compile_deplibs="$deplib $compile_deplibs"
 13.2104 +	    finalize_deplibs="$deplib $finalize_deplibs"
 13.2105 +	  else
 13.2106 +	    compiler_flags="$compiler_flags $deplib"
 13.2107 +	  fi
 13.2108 +	  continue
 13.2109 +	  ;;
 13.2110 +	-l*)
 13.2111 +	  if test "$linkmode" != lib && test "$linkmode" != prog; then
 13.2112 +	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
 13.2113 +	    continue
 13.2114 +	  fi
 13.2115 +	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
 13.2116 +	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
 13.2117 +	    for search_ext in .la $std_shrext .so .a; do
 13.2118 +	      # Search the libtool library
 13.2119 +	      lib="$searchdir/lib${name}${search_ext}"
 13.2120 +	      if test -f "$lib"; then
 13.2121 +		if test "$search_ext" = ".la"; then
 13.2122 +		  found=yes
 13.2123 +		else
 13.2124 +		  found=no
 13.2125 +		fi
 13.2126 +		break 2
 13.2127 +	      fi
 13.2128 +	    done
 13.2129 +	  done
 13.2130 +	  if test "$found" != yes; then
 13.2131 +	    # deplib doesn't seem to be a libtool library
 13.2132 +	    if test "$linkmode,$pass" = "prog,link"; then
 13.2133 +	      compile_deplibs="$deplib $compile_deplibs"
 13.2134 +	      finalize_deplibs="$deplib $finalize_deplibs"
 13.2135 +	    else
 13.2136 +	      deplibs="$deplib $deplibs"
 13.2137 +	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
 13.2138 +	    fi
 13.2139 +	    continue
 13.2140 +	  else # deplib is a libtool library
 13.2141 +	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
 13.2142 +	    # We need to do some special things here, and not later.
 13.2143 +	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 13.2144 +	      case " $predeps $postdeps " in
 13.2145 +	      *" $deplib "*)
 13.2146 +		if (${SED} -e '2q' $lib |
 13.2147 +                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 13.2148 +		  library_names=
 13.2149 +		  old_library=
 13.2150 +		  case $lib in
 13.2151 +		  */* | *\\*) . $lib ;;
 13.2152 +		  *) . ./$lib ;;
 13.2153 +		  esac
 13.2154 +		  for l in $old_library $library_names; do
 13.2155 +		    ll="$l"
 13.2156 +		  done
 13.2157 +		  if test "X$ll" = "X$old_library" ; then # only static version available
 13.2158 +		    found=no
 13.2159 +		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
 13.2160 +		    test "X$ladir" = "X$lib" && ladir="."
 13.2161 +		    lib=$ladir/$old_library
 13.2162 +		    if test "$linkmode,$pass" = "prog,link"; then
 13.2163 +		      compile_deplibs="$deplib $compile_deplibs"
 13.2164 +		      finalize_deplibs="$deplib $finalize_deplibs"
 13.2165 +		    else
 13.2166 +		      deplibs="$deplib $deplibs"
 13.2167 +		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
 13.2168 +		    fi
 13.2169 +		    continue
 13.2170 +		  fi
 13.2171 +		fi
 13.2172 +	        ;;
 13.2173 +	      *) ;;
 13.2174 +	      esac
 13.2175 +	    fi
 13.2176 +	  fi
 13.2177 +	  ;; # -l
 13.2178 +	-L*)
 13.2179 +	  case $linkmode in
 13.2180 +	  lib)
 13.2181 +	    deplibs="$deplib $deplibs"
 13.2182 +	    test "$pass" = conv && continue
 13.2183 +	    newdependency_libs="$deplib $newdependency_libs"
 13.2184 +	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
 13.2185 +	    ;;
 13.2186 +	  prog)
 13.2187 +	    if test "$pass" = conv; then
 13.2188 +	      deplibs="$deplib $deplibs"
 13.2189 +	      continue
 13.2190 +	    fi
 13.2191 +	    if test "$pass" = scan; then
 13.2192 +	      deplibs="$deplib $deplibs"
 13.2193 +	    else
 13.2194 +	      compile_deplibs="$deplib $compile_deplibs"
 13.2195 +	      finalize_deplibs="$deplib $finalize_deplibs"
 13.2196 +	    fi
 13.2197 +	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
 13.2198 +	    ;;
 13.2199 +	  *)
 13.2200 +	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
 13.2201 +	    ;;
 13.2202 +	  esac # linkmode
 13.2203 +	  continue
 13.2204 +	  ;; # -L
 13.2205 +	-R*)
 13.2206 +	  if test "$pass" = link; then
 13.2207 +	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
 13.2208 +	    # Make sure the xrpath contains only unique directories.
 13.2209 +	    case "$xrpath " in
 13.2210 +	    *" $dir "*) ;;
 13.2211 +	    *) xrpath="$xrpath $dir" ;;
 13.2212 +	    esac
 13.2213 +	  fi
 13.2214 +	  deplibs="$deplib $deplibs"
 13.2215 +	  continue
 13.2216 +	  ;;
 13.2217 +	*.la) lib="$deplib" ;;
 13.2218 +	*.$libext)
 13.2219 +	  if test "$pass" = conv; then
 13.2220 +	    deplibs="$deplib $deplibs"
 13.2221 +	    continue
 13.2222 +	  fi
 13.2223 +	  case $linkmode in
 13.2224 +	  lib)
 13.2225 +	    valid_a_lib=no
 13.2226 +	    case $deplibs_check_method in
 13.2227 +	      match_pattern*)
 13.2228 +		set dummy $deplibs_check_method
 13.2229 +	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
 13.2230 +		if eval $echo \"$deplib\" 2>/dev/null \
 13.2231 +		    | $SED 10q \
 13.2232 +		    | $EGREP "$match_pattern_regex" > /dev/null; then
 13.2233 +		  valid_a_lib=yes
 13.2234 +		fi
 13.2235 +		;;
 13.2236 +	      pass_all)
 13.2237 +		valid_a_lib=yes
 13.2238 +		;;
 13.2239 +            esac
 13.2240 +	    if test "$valid_a_lib" != yes; then
 13.2241 +	      $echo
 13.2242 +	      $echo "*** Warning: Trying to link with static lib archive $deplib."
 13.2243 +	      $echo "*** I have the capability to make that library automatically link in when"
 13.2244 +	      $echo "*** you link to this library.  But I can only do this if you have a"
 13.2245 +	      $echo "*** shared version of the library, which you do not appear to have"
 13.2246 +	      $echo "*** because the file extensions .$libext of this argument makes me believe"
 13.2247 +	      $echo "*** that it is just a static archive that I should not used here."
 13.2248 +	    else
 13.2249 +	      $echo
 13.2250 +	      $echo "*** Warning: Linking the shared library $output against the"
 13.2251 +	      $echo "*** static library $deplib is not portable!"
 13.2252 +	      deplibs="$deplib $deplibs"
 13.2253 +	    fi
 13.2254 +	    continue
 13.2255 +	    ;;
 13.2256 +	  prog)
 13.2257 +	    if test "$pass" != link; then
 13.2258 +	      deplibs="$deplib $deplibs"
 13.2259 +	    else
 13.2260 +	      compile_deplibs="$deplib $compile_deplibs"
 13.2261 +	      finalize_deplibs="$deplib $finalize_deplibs"
 13.2262 +	    fi
 13.2263 +	    continue
 13.2264 +	    ;;
 13.2265 +	  esac # linkmode
 13.2266 +	  ;; # *.$libext
 13.2267 +	*.lo | *.$objext)
 13.2268 +	  if test "$pass" = conv; then
 13.2269 +	    deplibs="$deplib $deplibs"
 13.2270 +	  elif test "$linkmode" = prog; then
 13.2271 +	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
 13.2272 +	      # If there is no dlopen support or we're linking statically,
 13.2273 +	      # we need to preload.
 13.2274 +	      newdlprefiles="$newdlprefiles $deplib"
 13.2275 +	      compile_deplibs="$deplib $compile_deplibs"
 13.2276 +	      finalize_deplibs="$deplib $finalize_deplibs"
 13.2277 +	    else
 13.2278 +	      newdlfiles="$newdlfiles $deplib"
 13.2279 +	    fi
 13.2280 +	  fi
 13.2281 +	  continue
 13.2282 +	  ;;
 13.2283 +	%DEPLIBS%)
 13.2284 +	  alldeplibs=yes
 13.2285 +	  continue
 13.2286 +	  ;;
 13.2287 +	esac # case $deplib
 13.2288 +	if test "$found" = yes || test -f "$lib"; then :
 13.2289 +	else
 13.2290 +	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
 13.2291 +	  exit $EXIT_FAILURE
 13.2292 +	fi
 13.2293 +
 13.2294 +	# Check to see that this really is a libtool archive.
 13.2295 +	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
 13.2296 +	else
 13.2297 +	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
 13.2298 +	  exit $EXIT_FAILURE
 13.2299 +	fi
 13.2300 +
 13.2301 +	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
 13.2302 +	test "X$ladir" = "X$lib" && ladir="."
 13.2303 +
 13.2304 +	dlname=
 13.2305 +	dlopen=
 13.2306 +	dlpreopen=
 13.2307 +	libdir=
 13.2308 +	library_names=
 13.2309 +	old_library=
 13.2310 +	# If the library was installed with an old release of libtool,
 13.2311 +	# it will not redefine variables installed, or shouldnotlink
 13.2312 +	installed=yes
 13.2313 +	shouldnotlink=no
 13.2314 +	avoidtemprpath=
 13.2315 +
 13.2316 +
 13.2317 +	# Read the .la file
 13.2318 +	case $lib in
 13.2319 +	*/* | *\\*) . $lib ;;
 13.2320 +	*) . ./$lib ;;
 13.2321 +	esac
 13.2322 +
 13.2323 +	if test "$linkmode,$pass" = "lib,link" ||
 13.2324 +	   test "$linkmode,$pass" = "prog,scan" ||
 13.2325 +	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
 13.2326 +	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
 13.2327 +	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
 13.2328 +	fi
 13.2329 +
 13.2330 +	if test "$pass" = conv; then
 13.2331 +	  # Only check for convenience libraries
 13.2332 +	  deplibs="$lib $deplibs"
 13.2333 +	  if test -z "$libdir"; then
 13.2334 +	    if test -z "$old_library"; then
 13.2335 +	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
 13.2336 +	      exit $EXIT_FAILURE
 13.2337 +	    fi
 13.2338 +	    # It is a libtool convenience library, so add in its objects.
 13.2339 +	    convenience="$convenience $ladir/$objdir/$old_library"
 13.2340 +	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
 13.2341 +	    tmp_libs=
 13.2342 +	    for deplib in $dependency_libs; do
 13.2343 +	      deplibs="$deplib $deplibs"
 13.2344 +              if test "X$duplicate_deps" = "Xyes" ; then
 13.2345 +	        case "$tmp_libs " in
 13.2346 +	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
 13.2347 +	        esac
 13.2348 +              fi
 13.2349 +	      tmp_libs="$tmp_libs $deplib"
 13.2350 +	    done
 13.2351 +	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
 13.2352 +	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
 13.2353 +	    exit $EXIT_FAILURE
 13.2354 +	  fi
 13.2355 +	  continue
 13.2356 +	fi # $pass = conv
 13.2357 +
 13.2358 +
 13.2359 +	# Get the name of the library we link against.
 13.2360 +	linklib=
 13.2361 +	for l in $old_library $library_names; do
 13.2362 +	  linklib="$l"
 13.2363 +	done
 13.2364 +	if test -z "$linklib"; then
 13.2365 +	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
 13.2366 +	  exit $EXIT_FAILURE
 13.2367 +	fi
 13.2368 +
 13.2369 +	# This library was specified with -dlopen.
 13.2370 +	if test "$pass" = dlopen; then
 13.2371 +	  if test -z "$libdir"; then
 13.2372 +	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
 13.2373 +	    exit $EXIT_FAILURE
 13.2374 +	  fi
 13.2375 +	  if test -z "$dlname" ||
 13.2376 +	     test "$dlopen_support" != yes ||
 13.2377 +	     test "$build_libtool_libs" = no; then
 13.2378 +	    # If there is no dlname, no dlopen support or we're linking
 13.2379 +	    # statically, we need to preload.  We also need to preload any
 13.2380 +	    # dependent libraries so libltdl's deplib preloader doesn't
 13.2381 +	    # bomb out in the load deplibs phase.
 13.2382 +	    dlprefiles="$dlprefiles $lib $dependency_libs"
 13.2383 +	  else
 13.2384 +	    newdlfiles="$newdlfiles $lib"
 13.2385 +	  fi
 13.2386 +	  continue
 13.2387 +	fi # $pass = dlopen
 13.2388 +
 13.2389 +	# We need an absolute path.
 13.2390 +	case $ladir in
 13.2391 +	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
 13.2392 +	*)
 13.2393 +	  abs_ladir=`cd "$ladir" && pwd`
 13.2394 +	  if test -z "$abs_ladir"; then
 13.2395 +	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
 13.2396 +	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
 13.2397 +	    abs_ladir="$ladir"
 13.2398 +	  fi
 13.2399 +	  ;;
 13.2400 +	esac
 13.2401 +	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
 13.2402 +
 13.2403 +	# Find the relevant object directory and library name.
 13.2404 +	if test "X$installed" = Xyes; then
 13.2405 +	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
 13.2406 +	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
 13.2407 +	    dir="$ladir"
 13.2408 +	    absdir="$abs_ladir"
 13.2409 +	    libdir="$abs_ladir"
 13.2410 +	  else
 13.2411 +	    dir="$libdir"
 13.2412 +	    absdir="$libdir"
 13.2413 +	  fi
 13.2414 +	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 13.2415 +	else
 13.2416 +	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
 13.2417 +	    dir="$ladir"
 13.2418 +	    absdir="$abs_ladir"
 13.2419 +	    # Remove this search path later
 13.2420 +	    notinst_path="$notinst_path $abs_ladir"
 13.2421 +	  else
 13.2422 +	    dir="$ladir/$objdir"
 13.2423 +	    absdir="$abs_ladir/$objdir"
 13.2424 +	    # Remove this search path later
 13.2425 +	    notinst_path="$notinst_path $abs_ladir"
 13.2426 +	  fi
 13.2427 +	fi # $installed = yes
 13.2428 +	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
 13.2429 +
 13.2430 +	# This library was specified with -dlpreopen.
 13.2431 +	if test "$pass" = dlpreopen; then
 13.2432 +	  if test -z "$libdir"; then
 13.2433 +	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
 13.2434 +	    exit $EXIT_FAILURE
 13.2435 +	  fi
 13.2436 +	  # Prefer using a static library (so that no silly _DYNAMIC symbols
 13.2437 +	  # are required to link).
 13.2438 +	  if test -n "$old_library"; then
 13.2439 +	    newdlprefiles="$newdlprefiles $dir/$old_library"
 13.2440 +	  # Otherwise, use the dlname, so that lt_dlopen finds it.
 13.2441 +	  elif test -n "$dlname"; then
 13.2442 +	    newdlprefiles="$newdlprefiles $dir/$dlname"
 13.2443 +	  else
 13.2444 +	    newdlprefiles="$newdlprefiles $dir/$linklib"
 13.2445 +	  fi
 13.2446 +	fi # $pass = dlpreopen
 13.2447 +
 13.2448 +	if test -z "$libdir"; then
 13.2449 +	  # Link the convenience library
 13.2450 +	  if test "$linkmode" = lib; then
 13.2451 +	    deplibs="$dir/$old_library $deplibs"
 13.2452 +	  elif test "$linkmode,$pass" = "prog,link"; then
 13.2453 +	    compile_deplibs="$dir/$old_library $compile_deplibs"
 13.2454 +	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
 13.2455 +	  else
 13.2456 +	    deplibs="$lib $deplibs" # used for prog,scan pass
 13.2457 +	  fi
 13.2458 +	  continue
 13.2459 +	fi
 13.2460 +
 13.2461 +
 13.2462 +	if test "$linkmode" = prog && test "$pass" != link; then
 13.2463 +	  newlib_search_path="$newlib_search_path $ladir"
 13.2464 +	  deplibs="$lib $deplibs"
 13.2465 +
 13.2466 +	  linkalldeplibs=no
 13.2467 +	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
 13.2468 +	     test "$build_libtool_libs" = no; then
 13.2469 +	    linkalldeplibs=yes
 13.2470 +	  fi
 13.2471 +
 13.2472 +	  tmp_libs=
 13.2473 +	  for deplib in $dependency_libs; do
 13.2474 +	    case $deplib in
 13.2475 +	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
 13.2476 +	    esac
 13.2477 +	    # Need to link against all dependency_libs?
 13.2478 +	    if test "$linkalldeplibs" = yes; then
 13.2479 +	      deplibs="$deplib $deplibs"
 13.2480 +	    else
 13.2481 +	      # Need to hardcode shared library paths
 13.2482 +	      # or/and link against static libraries
 13.2483 +	      newdependency_libs="$deplib $newdependency_libs"
 13.2484 +	    fi
 13.2485 +	    if test "X$duplicate_deps" = "Xyes" ; then
 13.2486 +	      case "$tmp_libs " in
 13.2487 +	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
 13.2488 +	      esac
 13.2489 +	    fi
 13.2490 +	    tmp_libs="$tmp_libs $deplib"
 13.2491 +	  done # for deplib
 13.2492 +	  continue
 13.2493 +	fi # $linkmode = prog...
 13.2494 +
 13.2495 +	if test "$linkmode,$pass" = "prog,link"; then
 13.2496 +	  if test -n "$library_names" &&
 13.2497 +	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 13.2498 +	    # We need to hardcode the library path
 13.2499 +	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
 13.2500 +	      # Make sure the rpath contains only unique directories.
 13.2501 +	      case "$temp_rpath " in
 13.2502 +	      *" $dir "*) ;;
 13.2503 +	      *" $absdir "*) ;;
 13.2504 +	      *) temp_rpath="$temp_rpath $absdir" ;;
 13.2505 +	      esac
 13.2506 +	    fi
 13.2507 +
 13.2508 +	    # Hardcode the library path.
 13.2509 +	    # Skip directories that are in the system default run-time
 13.2510 +	    # search path.
 13.2511 +	    case " $sys_lib_dlsearch_path " in
 13.2512 +	    *" $absdir "*) ;;
 13.2513 +	    *)
 13.2514 +	      case "$compile_rpath " in
 13.2515 +	      *" $absdir "*) ;;
 13.2516 +	      *) compile_rpath="$compile_rpath $absdir"
 13.2517 +	      esac
 13.2518 +	      ;;
 13.2519 +	    esac
 13.2520 +	    case " $sys_lib_dlsearch_path " in
 13.2521 +	    *" $libdir "*) ;;
 13.2522 +	    *)
 13.2523 +	      case "$finalize_rpath " in
 13.2524 +	      *" $libdir "*) ;;
 13.2525 +	      *) finalize_rpath="$finalize_rpath $libdir"
 13.2526 +	      esac
 13.2527 +	      ;;
 13.2528 +	    esac
 13.2529 +	  fi # $linkmode,$pass = prog,link...
 13.2530 +
 13.2531 +	  if test "$alldeplibs" = yes &&
 13.2532 +	     { test "$deplibs_check_method" = pass_all ||
 13.2533 +	       { test "$build_libtool_libs" = yes &&
 13.2534 +		 test -n "$library_names"; }; }; then
 13.2535 +	    # We only need to search for static libraries
 13.2536 +	    continue
 13.2537 +	  fi
 13.2538 +	fi
 13.2539 +
 13.2540 +	link_static=no # Whether the deplib will be linked statically
 13.2541 +	use_static_libs=$prefer_static_libs
 13.2542 +	if test "$use_static_libs" = built && test "$installed" = yes ; then
 13.2543 +	  use_static_libs=no
 13.2544 +	fi
 13.2545 +	if test -n "$library_names" &&
 13.2546 +	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
 13.2547 +	  if test "$installed" = no; then
 13.2548 +	    notinst_deplibs="$notinst_deplibs $lib"
 13.2549 +	    need_relink=yes
 13.2550 +	  fi
 13.2551 +	  # This is a shared library
 13.2552 +
 13.2553 +	  # Warn about portability, can't link against -module's on
 13.2554 +	  # some systems (darwin)
 13.2555 +	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
 13.2556 +	    $echo
 13.2557 +	    if test "$linkmode" = prog; then
 13.2558 +	      $echo "*** Warning: Linking the executable $output against the loadable module"
 13.2559 +	    else
 13.2560 +	      $echo "*** Warning: Linking the shared library $output against the loadable module"
 13.2561 +	    fi
 13.2562 +	    $echo "*** $linklib is not portable!"
 13.2563 +	  fi
 13.2564 +	  if test "$linkmode" = lib &&
 13.2565 +	     test "$hardcode_into_libs" = yes; then
 13.2566 +	    # Hardcode the library path.
 13.2567 +	    # Skip directories that are in the system default run-time
 13.2568 +	    # search path.
 13.2569 +	    case " $sys_lib_dlsearch_path " in
 13.2570 +	    *" $absdir "*) ;;
 13.2571 +	    *)
 13.2572 +	      case "$compile_rpath " in
 13.2573 +	      *" $absdir "*) ;;
 13.2574 +	      *) compile_rpath="$compile_rpath $absdir"
 13.2575 +	      esac
 13.2576 +	      ;;
 13.2577 +	    esac
 13.2578 +	    case " $sys_lib_dlsearch_path " in
 13.2579 +	    *" $libdir "*) ;;
 13.2580 +	    *)
 13.2581 +	      case "$finalize_rpath " in
 13.2582 +	      *" $libdir "*) ;;
 13.2583 +	      *) finalize_rpath="$finalize_rpath $libdir"
 13.2584 +	      esac
 13.2585 +	      ;;
 13.2586 +	    esac
 13.2587 +	  fi
 13.2588 +
 13.2589 +	  if test -n "$old_archive_from_expsyms_cmds"; then
 13.2590 +	    # figure out the soname
 13.2591 +	    set dummy $library_names
 13.2592 +	    realname="$2"
 13.2593 +	    shift; shift
 13.2594 +	    libname=`eval \\$echo \"$libname_spec\"`
 13.2595 +	    # use dlname if we got it. it's perfectly good, no?
 13.2596 +	    if test -n "$dlname"; then
 13.2597 +	      soname="$dlname"
 13.2598 +	    elif test -n "$soname_spec"; then
 13.2599 +	      # bleh windows
 13.2600 +	      case $host in
 13.2601 +	      *cygwin* | mingw*)
 13.2602 +		major=`expr $current - $age`
 13.2603 +		versuffix="-$major"
 13.2604 +		;;
 13.2605 +	      esac
 13.2606 +	      eval soname=\"$soname_spec\"
 13.2607 +	    else
 13.2608 +	      soname="$realname"
 13.2609 +	    fi
 13.2610 +
 13.2611 +	    # Make a new name for the extract_expsyms_cmds to use
 13.2612 +	    soroot="$soname"
 13.2613 +	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
 13.2614 +	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
 13.2615 +
 13.2616 +	    # If the library has no export list, then create one now
 13.2617 +	    if test -f "$output_objdir/$soname-def"; then :
 13.2618 +	    else
 13.2619 +	      $show "extracting exported symbol list from \`$soname'"
 13.2620 +	      save_ifs="$IFS"; IFS='~'
 13.2621 +	      cmds=$extract_expsyms_cmds
 13.2622 +	      for cmd in $cmds; do
 13.2623 +		IFS="$save_ifs"
 13.2624 +		eval cmd=\"$cmd\"
 13.2625 +		$show "$cmd"
 13.2626 +		$run eval "$cmd" || exit $?
 13.2627 +	      done
 13.2628 +	      IFS="$save_ifs"
 13.2629 +	    fi
 13.2630 +
 13.2631 +	    # Create $newlib
 13.2632 +	    if test -f "$output_objdir/$newlib"; then :; else
 13.2633 +	      $show "generating import library for \`$soname'"
 13.2634 +	      save_ifs="$IFS"; IFS='~'
 13.2635 +	      cmds=$old_archive_from_expsyms_cmds
 13.2636 +	      for cmd in $cmds; do
 13.2637 +		IFS="$save_ifs"
 13.2638 +		eval cmd=\"$cmd\"
 13.2639 +		$show "$cmd"
 13.2640 +		$run eval "$cmd" || exit $?
 13.2641 +	      done
 13.2642 +	      IFS="$save_ifs"
 13.2643 +	    fi
 13.2644 +	    # make sure the library variables are pointing to the new library
 13.2645 +	    dir=$output_objdir
 13.2646 +	    linklib=$newlib
 13.2647 +	  fi # test -n "$old_archive_from_expsyms_cmds"
 13.2648 +
 13.2649 +	  if test "$linkmode" = prog || test "$mode" != relink; then
 13.2650 +	    add_shlibpath=
 13.2651 +	    add_dir=
 13.2652 +	    add=
 13.2653 +	    lib_linked=yes
 13.2654 +	    case $hardcode_action in
 13.2655 +	    immediate | unsupported)
 13.2656 +	      if test "$hardcode_direct" = no; then
 13.2657 +		add="$dir/$linklib"
 13.2658 +		case $host in
 13.2659 +		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
 13.2660 +		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
 13.2661 +		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
 13.2662 +		    *-*-unixware7*) add_dir="-L$dir" ;;
 13.2663 +		  *-*-darwin* )
 13.2664 +		    # if the lib is a module then we can not link against
 13.2665 +		    # it, someone is ignoring the new warnings I added
 13.2666 +		    if /usr/bin/file -L $add 2> /dev/null |
 13.2667 +                      $EGREP ": [^:]* bundle" >/dev/null ; then
 13.2668 +		      $echo "** Warning, lib $linklib is a module, not a shared library"
 13.2669 +		      if test -z "$old_library" ; then
 13.2670 +		        $echo
 13.2671 +		        $echo "** And there doesn't seem to be a static archive available"
 13.2672 +		        $echo "** The link will probably fail, sorry"
 13.2673 +		      else
 13.2674 +		        add="$dir/$old_library"
 13.2675 +		      fi
 13.2676 +		    fi
 13.2677 +		esac
 13.2678 +	      elif test "$hardcode_minus_L" = no; then
 13.2679 +		case $host in
 13.2680 +		*-*-sunos*) add_shlibpath="$dir" ;;
 13.2681 +		esac
 13.2682 +		add_dir="-L$dir"
 13.2683 +		add="-l$name"
 13.2684 +	      elif test "$hardcode_shlibpath_var" = no; then
 13.2685 +		add_shlibpath="$dir"
 13.2686 +		add="-l$name"
 13.2687 +	      else
 13.2688 +		lib_linked=no
 13.2689 +	      fi
 13.2690 +	      ;;
 13.2691 +	    relink)
 13.2692 +	      if test "$hardcode_direct" = yes; then
 13.2693 +		add="$dir/$linklib"
 13.2694 +	      elif test "$hardcode_minus_L" = yes; then
 13.2695 +		add_dir="-L$dir"
 13.2696 +		# Try looking first in the location we're being installed to.
 13.2697 +		if test -n "$inst_prefix_dir"; then
 13.2698 +		  case $libdir in
 13.2699 +		    [\\/]*)
 13.2700 +		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
 13.2701 +		      ;;
 13.2702 +		  esac
 13.2703 +		fi
 13.2704 +		add="-l$name"
 13.2705 +	      elif test "$hardcode_shlibpath_var" = yes; then
 13.2706 +		add_shlibpath="$dir"
 13.2707 +		add="-l$name"
 13.2708 +	      else
 13.2709 +		lib_linked=no
 13.2710 +	      fi
 13.2711 +	      ;;
 13.2712 +	    *) lib_linked=no ;;
 13.2713 +	    esac
 13.2714 +
 13.2715 +	    if test "$lib_linked" != yes; then
 13.2716 +	      $echo "$modename: configuration error: unsupported hardcode properties"
 13.2717 +	      exit $EXIT_FAILURE
 13.2718 +	    fi
 13.2719 +
 13.2720 +	    if test -n "$add_shlibpath"; then
 13.2721 +	      case :$compile_shlibpath: in
 13.2722 +	      *":$add_shlibpath:"*) ;;
 13.2723 +	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
 13.2724 +	      esac
 13.2725 +	    fi
 13.2726 +	    if test "$linkmode" = prog; then
 13.2727 +	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
 13.2728 +	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
 13.2729 +	    else
 13.2730 +	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
 13.2731 +	      test -n "$add" && deplibs="$add $deplibs"
 13.2732 +	      if test "$hardcode_direct" != yes && \
 13.2733 +		 test "$hardcode_minus_L" != yes && \
 13.2734 +		 test "$hardcode_shlibpath_var" = yes; then
 13.2735 +		case :$finalize_shlibpath: in
 13.2736 +		*":$libdir:"*) ;;
 13.2737 +		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
 13.2738 +		esac
 13.2739 +	      fi
 13.2740 +	    fi
 13.2741 +	  fi
 13.2742 +
 13.2743 +	  if test "$linkmode" = prog || test "$mode" = relink; then
 13.2744 +	    add_shlibpath=
 13.2745 +	    add_dir=
 13.2746 +	    add=
 13.2747 +	    # Finalize command for both is simple: just hardcode it.
 13.2748 +	    if test "$hardcode_direct" = yes; then
 13.2749 +	      add="$libdir/$linklib"
 13.2750 +	    elif test "$hardcode_minus_L" = yes; then
 13.2751 +	      add_dir="-L$libdir"
 13.2752 +	      add="-l$name"
 13.2753 +	    elif test "$hardcode_shlibpath_var" = yes; then
 13.2754 +	      case :$finalize_shlibpath: in
 13.2755 +	      *":$libdir:"*) ;;
 13.2756 +	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
 13.2757 +	      esac
 13.2758 +	      add="-l$name"
 13.2759 +	    elif test "$hardcode_automatic" = yes; then
 13.2760 +	      if test -n "$inst_prefix_dir" &&
 13.2761 +		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
 13.2762 +	        add="$inst_prefix_dir$libdir/$linklib"
 13.2763 +	      else
 13.2764 +	        add="$libdir/$linklib"
 13.2765 +	      fi
 13.2766 +	    else
 13.2767 +	      # We cannot seem to hardcode it, guess we'll fake it.
 13.2768 +	      add_dir="-L$libdir"
 13.2769 +	      # Try looking first in the location we're being installed to.
 13.2770 +	      if test -n "$inst_prefix_dir"; then
 13.2771 +		case $libdir in
 13.2772 +		  [\\/]*)
 13.2773 +		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
 13.2774 +		    ;;
 13.2775 +		esac
 13.2776 +	      fi
 13.2777 +	      add="-l$name"
 13.2778 +	    fi
 13.2779 +
 13.2780 +	    if test "$linkmode" = prog; then
 13.2781 +	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
 13.2782 +	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
 13.2783 +	    else
 13.2784 +	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
 13.2785 +	      test -n "$add" && deplibs="$add $deplibs"
 13.2786 +	    fi
 13.2787 +	  fi
 13.2788 +	elif test "$linkmode" = prog; then
 13.2789 +	  # Here we assume that one of hardcode_direct or hardcode_minus_L
 13.2790 +	  # is not unsupported.  This is valid on all known static and
 13.2791 +	  # shared platforms.
 13.2792 +	  if test "$hardcode_direct" != unsupported; then
 13.2793 +	    test -n "$old_library" && linklib="$old_library"
 13.2794 +	    compile_deplibs="$dir/$linklib $compile_deplibs"
 13.2795 +	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
 13.2796 +	  else
 13.2797 +	    compile_deplibs="-l$name -L$dir $compile_deplibs"
 13.2798 +	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
 13.2799 +	  fi
 13.2800 +	elif test "$build_libtool_libs" = yes; then
 13.2801 +	  # Not a shared library
 13.2802 +	  if test "$deplibs_check_method" != pass_all; then
 13.2803 +	    # We're trying link a shared library against a static one
 13.2804 +	    # but the system doesn't support it.
 13.2805 +
 13.2806 +	    # Just print a warning and add the library to dependency_libs so
 13.2807 +	    # that the program can be linked against the static library.
 13.2808 +	    $echo
 13.2809 +	    $echo "*** Warning: This system can not link to static lib archive $lib."
 13.2810 +	    $echo "*** I have the capability to make that library automatically link in when"
 13.2811 +	    $echo "*** you link to this library.  But I can only do this if you have a"
 13.2812 +	    $echo "*** shared version of the library, which you do not appear to have."
 13.2813 +	    if test "$module" = yes; then
 13.2814 +	      $echo "*** But as you try to build a module library, libtool will still create "
 13.2815 +	      $echo "*** a static module, that should work as long as the dlopening application"
 13.2816 +	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
 13.2817 +	      if test -z "$global_symbol_pipe"; then
 13.2818 +		$echo
 13.2819 +		$echo "*** However, this would only work if libtool was able to extract symbol"
 13.2820 +		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
 13.2821 +		$echo "*** not find such a program.  So, this module is probably useless."
 13.2822 +		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
 13.2823 +	      fi
 13.2824 +	      if test "$build_old_libs" = no; then
 13.2825 +		build_libtool_libs=module
 13.2826 +		build_old_libs=yes
 13.2827 +	      else
 13.2828 +		build_libtool_libs=no
 13.2829 +	      fi
 13.2830 +	    fi
 13.2831 +	  else
 13.2832 +	    deplibs="$dir/$old_library $deplibs"
 13.2833 +	    link_static=yes
 13.2834 +	  fi
 13.2835 +	fi # link shared/static library?
 13.2836 +
 13.2837 +	if test "$linkmode" = lib; then
 13.2838 +	  if test -n "$dependency_libs" &&
 13.2839 +	     { test "$hardcode_into_libs" != yes ||
 13.2840 +	       test "$build_old_libs" = yes ||
 13.2841 +	       test "$link_static" = yes; }; then
 13.2842 +	    # Extract -R from dependency_libs
 13.2843 +	    temp_deplibs=
 13.2844 +	    for libdir in $dependency_libs; do
 13.2845 +	      case $libdir in
 13.2846 +	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
 13.2847 +		   case " $xrpath " in
 13.2848 +		   *" $temp_xrpath "*) ;;
 13.2849 +		   *) xrpath="$xrpath $temp_xrpath";;
 13.2850 +		   esac;;
 13.2851 +	      *) temp_deplibs="$temp_deplibs $libdir";;
 13.2852 +	      esac
 13.2853 +	    done
 13.2854 +	    dependency_libs="$temp_deplibs"
 13.2855 +	  fi
 13.2856 +
 13.2857 +	  newlib_search_path="$newlib_search_path $absdir"
 13.2858 +	  # Link against this library
 13.2859 +	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
 13.2860 +	  # ... and its dependency_libs
 13.2861 +	  tmp_libs=
 13.2862 +	  for deplib in $dependency_libs; do
 13.2863 +	    newdependency_libs="$deplib $newdependency_libs"
 13.2864 +	    if test "X$duplicate_deps" = "Xyes" ; then
 13.2865 +	      case "$tmp_libs " in
 13.2866 +	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
 13.2867 +	      esac
 13.2868 +	    fi
 13.2869 +	    tmp_libs="$tmp_libs $deplib"
 13.2870 +	  done
 13.2871 +
 13.2872 +	  if test "$link_all_deplibs" != no; then
 13.2873 +	    # Add the search paths of all dependency libraries
 13.2874 +	    for deplib in $dependency_libs; do
 13.2875 +	      case $deplib in
 13.2876 +	      -L*) path="$deplib" ;;
 13.2877 +	      *.la)
 13.2878 +		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
 13.2879 +		test "X$dir" = "X$deplib" && dir="."
 13.2880 +		# We need an absolute path.
 13.2881 +		case $dir in
 13.2882 +		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
 13.2883 +		*)
 13.2884 +		  absdir=`cd "$dir" && pwd`
 13.2885 +		  if test -z "$absdir"; then
 13.2886 +		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
 13.2887 +		    absdir="$dir"
 13.2888 +		  fi
 13.2889 +		  ;;
 13.2890 +		esac
 13.2891 +		if grep "^installed=no" $deplib > /dev/null; then
 13.2892 +		  path="$absdir/$objdir"
 13.2893 +		else
 13.2894 +		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 13.2895 +		  if test -z "$libdir"; then
 13.2896 +		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
 13.2897 +		    exit $EXIT_FAILURE
 13.2898 +		  fi
 13.2899 +		  if test "$absdir" != "$libdir"; then
 13.2900 +		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
 13.2901 +		  fi
 13.2902 +		  path="$absdir"
 13.2903 +		fi
 13.2904 +		depdepl=
 13.2905 +		case $host in
 13.2906 +		*-*-darwin*)
 13.2907 +		  # we do not want to link against static libs,
 13.2908 +		  # but need to link against shared
 13.2909 +		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
 13.2910 +		  if test -n "$deplibrary_names" ; then
 13.2911 +		    for tmp in $deplibrary_names ; do
 13.2912 +		      depdepl=$tmp
 13.2913 +		    done
 13.2914 +		    if test -f "$path/$depdepl" ; then
 13.2915 +		      depdepl="$path/$depdepl"
 13.2916 +		    fi
 13.2917 +		    # do not add paths which are already there
 13.2918 +		    case " $newlib_search_path " in
 13.2919 +		    *" $path "*) ;;
 13.2920 +		    *) newlib_search_path="$newlib_search_path $path";;
 13.2921 +		    esac
 13.2922 +		  fi
 13.2923 +		  path=""
 13.2924 +		  ;;
 13.2925 +		*)
 13.2926 +		  path="-L$path"
 13.2927 +		  ;;
 13.2928 +		esac
 13.2929 +		;;
 13.2930 +	      -l*)
 13.2931 +		case $host in
 13.2932 +		*-*-darwin*)
 13.2933 +		  # Again, we only want to link against shared libraries
 13.2934 +		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
 13.2935 +		  for tmp in $newlib_search_path ; do
 13.2936 +		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
 13.2937 +		      eval depdepl="$tmp/lib$tmp_libs.dylib"
 13.2938 +		      break
 13.2939 +		    fi
 13.2940 +		  done
 13.2941 +		  path=""
 13.2942 +		  ;;
 13.2943 +		*) continue ;;
 13.2944 +		esac
 13.2945 +		;;
 13.2946 +	      *) continue ;;
 13.2947 +	      esac
 13.2948 +	      case " $deplibs " in
 13.2949 +	      *" $path "*) ;;
 13.2950 +	      *) deplibs="$path $deplibs" ;;
 13.2951 +	      esac
 13.2952 +	      case " $deplibs " in
 13.2953 +	      *" $depdepl "*) ;;
 13.2954 +	      *) deplibs="$depdepl $deplibs" ;;
 13.2955 +	      esac
 13.2956 +	    done
 13.2957 +	  fi # link_all_deplibs != no
 13.2958 +	fi # linkmode = lib
 13.2959 +      done # for deplib in $libs
 13.2960 +      dependency_libs="$newdependency_libs"
 13.2961 +      if test "$pass" = dlpreopen; then
 13.2962 +	# Link the dlpreopened libraries before other libraries
 13.2963 +	for deplib in $save_deplibs; do
 13.2964 +	  deplibs="$deplib $deplibs"
 13.2965 +	done
 13.2966 +      fi
 13.2967 +      if test "$pass" != dlopen; then
 13.2968 +	if test "$pass" != conv; then
 13.2969 +	  # Make sure lib_search_path contains only unique directories.
 13.2970 +	  lib_search_path=
 13.2971 +	  for dir in $newlib_search_path; do
 13.2972 +	    case "$lib_search_path " in
 13.2973 +	    *" $dir "*) ;;
 13.2974 +	    *) lib_search_path="$lib_search_path $dir" ;;
 13.2975 +	    esac
 13.2976 +	  done
 13.2977 +	  newlib_search_path=
 13.2978 +	fi
 13.2979 +
 13.2980 +	if test "$linkmode,$pass" != "prog,link"; then
 13.2981 +	  vars="deplibs"
 13.2982 +	else
 13.2983 +	  vars="compile_deplibs finalize_deplibs"
 13.2984 +	fi
 13.2985 +	for var in $vars dependency_libs; do
 13.2986 +	  # Add libraries to $var in reverse order
 13.2987 +	  eval tmp_libs=\"\$$var\"
 13.2988 +	  new_libs=
 13.2989 +	  for deplib in $tmp_libs; do
 13.2990 +	    # FIXME: Pedantically, this is the right thing to do, so
 13.2991 +	    #        that some nasty dependency loop isn't accidentally
 13.2992 +	    #        broken:
 13.2993 +	    #new_libs="$deplib $new_libs"
 13.2994 +	    # Pragmatically, this seems to cause very few problems in
 13.2995 +	    # practice:
 13.2996 +	    case $deplib in
 13.2997 +	    -L*) new_libs="$deplib $new_libs" ;;
 13.2998 +	    -R*) ;;
 13.2999 +	    *)
 13.3000 +	      # And here is the reason: when a library appears more
 13.3001 +	      # than once as an explicit dependence of a library, or
 13.3002 +	      # is implicitly linked in more than once by the
 13.3003 +	      # compiler, it is considered special, and multiple
 13.3004 +	      # occurrences thereof are not removed.  Compare this
 13.3005 +	      # with having the same library being listed as a
 13.3006 +	      # dependency of multiple other libraries: in this case,
 13.3007 +	      # we know (pedantically, we assume) the library does not
 13.3008 +	      # need to be listed more than once, so we keep only the
 13.3009 +	      # last copy.  This is not always right, but it is rare
 13.3010 +	      # enough that we require users that really mean to play
 13.3011 +	      # such unportable linking tricks to link the library
 13.3012 +	      # using -Wl,-lname, so that libtool does not consider it
 13.3013 +	      # for duplicate removal.
 13.3014 +	      case " $specialdeplibs " in
 13.3015 +	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
 13.3016 +	      *)
 13.3017 +		case " $new_libs " in
 13.3018 +		*" $deplib "*) ;;
 13.3019 +		*) new_libs="$deplib $new_libs" ;;
 13.3020 +		esac
 13.3021 +		;;
 13.3022 +	      esac
 13.3023 +	      ;;
 13.3024 +	    esac
 13.3025 +	  done
 13.3026 +	  tmp_libs=
 13.3027 +	  for deplib in $new_libs; do
 13.3028 +	    case $deplib in
 13.3029 +	    -L*)
 13.3030 +	      case " $tmp_libs " in
 13.3031 +	      *" $deplib "*) ;;
 13.3032 +	      *) tmp_libs="$tmp_libs $deplib" ;;
 13.3033 +	      esac
 13.3034 +	      ;;
 13.3035 +	    *) tmp_libs="$tmp_libs $deplib" ;;
 13.3036 +	    esac
 13.3037 +	  done
 13.3038 +	  eval $var=\"$tmp_libs\"
 13.3039 +	done # for var
 13.3040 +      fi
 13.3041 +      # Last step: remove runtime libs from dependency_libs
 13.3042 +      # (they stay in deplibs)
 13.3043 +      tmp_libs=
 13.3044 +      for i in $dependency_libs ; do
 13.3045 +	case " $predeps $postdeps $compiler_lib_search_path " in
 13.3046 +	*" $i "*)
 13.3047 +	  i=""
 13.3048 +	  ;;
 13.3049 +	esac
 13.3050 +	if test -n "$i" ; then
 13.3051 +	  tmp_libs="$tmp_libs $i"
 13.3052 +	fi
 13.3053 +      done
 13.3054 +      dependency_libs=$tmp_libs
 13.3055 +    done # for pass
 13.3056 +    if test "$linkmode" = prog; then
 13.3057 +      dlfiles="$newdlfiles"
 13.3058 +      dlprefiles="$newdlprefiles"
 13.3059 +    fi
 13.3060 +
 13.3061 +    case $linkmode in
 13.3062 +    oldlib)
 13.3063 +      if test -n "$deplibs"; then
 13.3064 +	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
 13.3065 +      fi
 13.3066 +
 13.3067 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
 13.3068 +	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
 13.3069 +      fi
 13.3070 +
 13.3071 +      if test -n "$rpath"; then
 13.3072 +	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
 13.3073 +      fi
 13.3074 +
 13.3075 +      if test -n "$xrpath"; then
 13.3076 +	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
 13.3077 +      fi
 13.3078 +
 13.3079 +      if test -n "$vinfo"; then
 13.3080 +	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
 13.3081 +      fi
 13.3082 +
 13.3083 +      if test -n "$release"; then
 13.3084 +	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
 13.3085 +      fi
 13.3086 +
 13.3087 +      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
 13.3088 +	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
 13.3089 +      fi
 13.3090 +
 13.3091 +      # Now set the variables for building old libraries.
 13.3092 +      build_libtool_libs=no
 13.3093 +      oldlibs="$output"
 13.3094 +      objs="$objs$old_deplibs"
 13.3095 +      ;;
 13.3096 +
 13.3097 +    lib)
 13.3098 +      # Make sure we only generate libraries of the form `libNAME.la'.
 13.3099 +      case $outputname in
 13.3100 +      lib*)
 13.3101 +	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
 13.3102 +	eval shared_ext=\"$shrext_cmds\"
 13.3103 +	eval libname=\"$libname_spec\"
 13.3104 +	;;
 13.3105 +      *)
 13.3106 +	if test "$module" = no; then
 13.3107 +	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
 13.3108 +	  $echo "$help" 1>&2
 13.3109 +	  exit $EXIT_FAILURE
 13.3110 +	fi
 13.3111 +	if test "$need_lib_prefix" != no; then
 13.3112 +	  # Add the "lib" prefix for modules if required
 13.3113 +	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
 13.3114 +	  eval shared_ext=\"$shrext_cmds\"
 13.3115 +	  eval libname=\"$libname_spec\"
 13.3116 +	else
 13.3117 +	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
 13.3118 +	fi
 13.3119 +	;;
 13.3120 +      esac
 13.3121 +
 13.3122 +      if test -n "$objs"; then
 13.3123 +	if test "$deplibs_check_method" != pass_all; then
 13.3124 +	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
 13.3125 +	  exit $EXIT_FAILURE
 13.3126 +	else
 13.3127 +	  $echo
 13.3128 +	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
 13.3129 +	  $echo "*** objects $objs is not portable!"
 13.3130 +	  libobjs="$libobjs $objs"
 13.3131 +	fi
 13.3132 +      fi
 13.3133 +
 13.3134 +      if test "$dlself" != no; then
 13.3135 +	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
 13.3136 +      fi
 13.3137 +
 13.3138 +      set dummy $rpath
 13.3139 +      if test "$#" -gt 2; then
 13.3140 +	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
 13.3141 +      fi
 13.3142 +      install_libdir="$2"
 13.3143 +
 13.3144 +      oldlibs=
 13.3145 +      if test -z "$rpath"; then
 13.3146 +	if test "$build_libtool_libs" = yes; then
 13.3147 +	  # Building a libtool convenience library.
 13.3148 +	  # Some compilers have problems with a `.al' extension so
 13.3149 +	  # convenience libraries should have the same extension an
 13.3150 +	  # archive normally would.
 13.3151 +	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
 13.3152 +	  build_libtool_libs=convenience
 13.3153 +	  build_old_libs=yes
 13.3154 +	fi
 13.3155 +
 13.3156 +	if test -n "$vinfo"; then
 13.3157 +	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
 13.3158 +	fi
 13.3159 +
 13.3160 +	if test -n "$release"; then
 13.3161 +	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
 13.3162 +	fi
 13.3163 +      else
 13.3164 +
 13.3165 +	# Parse the version information argument.
 13.3166 +	save_ifs="$IFS"; IFS=':'
 13.3167 +	set dummy $vinfo 0 0 0
 13.3168 +	IFS="$save_ifs"
 13.3169 +
 13.3170 +	if test -n "$8"; then
 13.3171 +	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
 13.3172 +	  $echo "$help" 1>&2
 13.3173 +	  exit $EXIT_FAILURE
 13.3174 +	fi
 13.3175 +
 13.3176 +	# convert absolute version numbers to libtool ages
 13.3177 +	# this retains compatibility with .la files and attempts
 13.3178 +	# to make the code below a bit more comprehensible
 13.3179 +
 13.3180 +	case $vinfo_number in
 13.3181 +	yes)
 13.3182 +	  number_major="$2"
 13.3183 +	  number_minor="$3"
 13.3184 +	  number_revision="$4"
 13.3185 +	  #
 13.3186 +	  # There are really only two kinds -- those that
 13.3187 +	  # use the current revision as the major version
 13.3188 +	  # and those that subtract age and use age as
 13.3189 +	  # a minor version.  But, then there is irix
 13.3190 +	  # which has an extra 1 added just for fun
 13.3191 +	  #
 13.3192 +	  case $version_type in
 13.3193 +	  darwin|linux|osf|windows)
 13.3194 +	    current=`expr $number_major + $number_minor`
 13.3195 +	    age="$number_minor"
 13.3196 +	    revision="$number_revision"
 13.3197 +	    ;;
 13.3198 +	  freebsd-aout|freebsd-elf|sunos)
 13.3199 +	    current="$number_major"
 13.3200 +	    revision="$number_minor"
 13.3201 +	    age="0"
 13.3202 +	    ;;
 13.3203 +	  irix|nonstopux)
 13.3204 +	    current=`expr $number_major + $number_minor - 1`
 13.3205 +	    age="$number_minor"
 13.3206 +	    revision="$number_minor"
 13.3207 +	    ;;
 13.3208 +	  esac
 13.3209 +	  ;;
 13.3210 +	no)
 13.3211 +	  current="$2"
 13.3212 +	  revision="$3"
 13.3213 +	  age="$4"
 13.3214 +	  ;;
 13.3215 +	esac
 13.3216 +
 13.3217 +	# Check that each of the things are valid numbers.
 13.3218 +	case $current in
 13.3219 +	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 13.3220 +	*)
 13.3221 +	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
 13.3222 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
 13.3223 +	  exit $EXIT_FAILURE
 13.3224 +	  ;;
 13.3225 +	esac
 13.3226 +
 13.3227 +	case $revision in
 13.3228 +	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 13.3229 +	*)
 13.3230 +	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
 13.3231 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
 13.3232 +	  exit $EXIT_FAILURE
 13.3233 +	  ;;
 13.3234 +	esac
 13.3235 +
 13.3236 +	case $age in
 13.3237 +	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 13.3238 +	*)
 13.3239 +	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
 13.3240 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
 13.3241 +	  exit $EXIT_FAILURE
 13.3242 +	  ;;
 13.3243 +	esac
 13.3244 +
 13.3245 +	if test "$age" -gt "$current"; then
 13.3246 +	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
 13.3247 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
 13.3248 +	  exit $EXIT_FAILURE
 13.3249 +	fi
 13.3250 +
 13.3251 +	# Calculate the version variables.
 13.3252 +	major=
 13.3253 +	versuffix=
 13.3254 +	verstring=
 13.3255 +	case $version_type in
 13.3256 +	none) ;;
 13.3257 +
 13.3258 +	darwin)
 13.3259 +	  # Like Linux, but with the current version available in
 13.3260 +	  # verstring for coding it into the library header
 13.3261 +	  major=.`expr $current - $age`
 13.3262 +	  versuffix="$major.$age.$revision"
 13.3263 +	  # Darwin ld doesn't like 0 for these options...
 13.3264 +	  minor_current=`expr $current + 1`
 13.3265 +	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 13.3266 +	  ;;
 13.3267 +
 13.3268 +	freebsd-aout)
 13.3269 +	  major=".$current"
 13.3270 +	  versuffix=".$current.$revision";
 13.3271 +	  ;;
 13.3272 +
 13.3273 +	freebsd-elf)
 13.3274 +	  major=".$current"
 13.3275 +	  versuffix=".$current";
 13.3276 +	  ;;
 13.3277 +
 13.3278 +	irix | nonstopux)
 13.3279 +	  major=`expr $current - $age + 1`
 13.3280 +
 13.3281 +	  case $version_type in
 13.3282 +	    nonstopux) verstring_prefix=nonstopux ;;
 13.3283 +	    *)         verstring_prefix=sgi ;;
 13.3284 +	  esac
 13.3285 +	  verstring="$verstring_prefix$major.$revision"
 13.3286 +
 13.3287 +	  # Add in all the interfaces that we are compatible with.
 13.3288 +	  loop=$revision
 13.3289 +	  while test "$loop" -ne 0; do
 13.3290 +	    iface=`expr $revision - $loop`
 13.3291 +	    loop=`expr $loop - 1`
 13.3292 +	    verstring="$verstring_prefix$major.$iface:$verstring"
 13.3293 +	  done
 13.3294 +
 13.3295 +	  # Before this point, $major must not contain `.'.
 13.3296 +	  major=.$major
 13.3297 +	  versuffix="$major.$revision"
 13.3298 +	  ;;
 13.3299 +
 13.3300 +	linux)
 13.3301 +	  major=.`expr $current - $age`
 13.3302 +	  versuffix="$major.$age.$revision"
 13.3303 +	  ;;
 13.3304 +
 13.3305 +	osf)
 13.3306 +	  major=.`expr $current - $age`
 13.3307 +	  versuffix=".$current.$age.$revision"
 13.3308 +	  verstring="$current.$age.$revision"
 13.3309 +
 13.3310 +	  # Add in all the interfaces that we are compatible with.
 13.3311 +	  loop=$age
 13.3312 +	  while test "$loop" -ne 0; do
 13.3313 +	    iface=`expr $current - $loop`
 13.3314 +	    loop=`expr $loop - 1`
 13.3315 +	    verstring="$verstring:${iface}.0"
 13.3316 +	  done
 13.3317 +
 13.3318 +	  # Make executables depend on our current version.
 13.3319 +	  verstring="$verstring:${current}.0"
 13.3320 +	  ;;
 13.3321 +
 13.3322 +	sunos)
 13.3323 +	  major=".$current"
 13.3324 +	  versuffix=".$current.$revision"
 13.3325 +	  ;;
 13.3326 +
 13.3327 +	windows)
 13.3328 +	  # Use '-' rather than '.', since we only want one
 13.3329 +	  # extension on DOS 8.3 filesystems.
 13.3330 +	  major=`expr $current - $age`
 13.3331 +	  versuffix="-$major"
 13.3332 +	  ;;
 13.3333 +
 13.3334 +	*)
 13.3335 +	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
 13.3336 +	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
 13.3337 +	  exit $EXIT_FAILURE
 13.3338 +	  ;;
 13.3339 +	esac
 13.3340 +
 13.3341 +	# Clear the version info if we defaulted, and they specified a release.
 13.3342 +	if test -z "$vinfo" && test -n "$release"; then
 13.3343 +	  major=
 13.3344 +	  case $version_type in
 13.3345 +	  darwin)
 13.3346 +	    # we can't check for "0.0" in archive_cmds due to quoting
 13.3347 +	    # problems, so we reset it completely
 13.3348 +	    verstring=
 13.3349 +	    ;;
 13.3350 +	  *)
 13.3351 +	    verstring="0.0"
 13.3352 +	    ;;
 13.3353 +	  esac
 13.3354 +	  if test "$need_version" = no; then
 13.3355 +	    versuffix=
 13.3356 +	  else
 13.3357 +	    versuffix=".0.0"
 13.3358 +	  fi
 13.3359 +	fi
 13.3360 +
 13.3361 +	# Remove version info from name if versioning should be avoided
 13.3362 +	if test "$avoid_version" = yes && test "$need_version" = no; then
 13.3363 +	  major=
 13.3364 +	  versuffix=
 13.3365 +	  verstring=""
 13.3366 +	fi
 13.3367 +
 13.3368 +	# Check to see if the archive will have undefined symbols.
 13.3369 +	if test "$allow_undefined" = yes; then
 13.3370 +	  if test "$allow_undefined_flag" = unsupported; then
 13.3371 +	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
 13.3372 +	    build_libtool_libs=no
 13.3373 +	    build_old_libs=yes
 13.3374 +	  fi
 13.3375 +	else
 13.3376 +	  # Don't allow undefined symbols.
 13.3377 +	  allow_undefined_flag="$no_undefined_flag"
 13.3378 +	fi
 13.3379 +      fi
 13.3380 +
 13.3381 +      if test "$mode" != relink; then
 13.3382 +	# Remove our outputs, but don't remove object files since they
 13.3383 +	# may have been created when compiling PIC objects.
 13.3384 +	removelist=
 13.3385 +	tempremovelist=`$echo "$output_objdir/*"`
 13.3386 +	for p in $tempremovelist; do
 13.3387 +	  case $p in
 13.3388 +	    *.$objext)
 13.3389 +	       ;;
 13.3390 +	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
 13.3391 +	       if test "X$precious_files_regex" != "X"; then
 13.3392 +	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
 13.3393 +	         then
 13.3394 +		   continue
 13.3395 +		 fi
 13.3396 +	       fi
 13.3397 +	       removelist="$removelist $p"
 13.3398 +	       ;;
 13.3399 +	    *) ;;
 13.3400 +	  esac
 13.3401 +	done
 13.3402 +	if test -n "$removelist"; then
 13.3403 +	  $show "${rm}r $removelist"
 13.3404 +	  $run ${rm}r $removelist
 13.3405 +	fi
 13.3406 +      fi
 13.3407 +
 13.3408 +      # Now set the variables for building old libraries.
 13.3409 +      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
 13.3410 +	oldlibs="$oldlibs $output_objdir/$libname.$libext"
 13.3411 +
 13.3412 +	# Transform .lo files to .o files.
 13.3413 +	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
 13.3414 +      fi
 13.3415 +
 13.3416 +      # Eliminate all temporary directories.
 13.3417 +      for path in $notinst_path; do
 13.3418 +	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
 13.3419 +	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
 13.3420 +	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
 13.3421 +      done
 13.3422 +
 13.3423 +      if test -n "$xrpath"; then
 13.3424 +	# If the user specified any rpath flags, then add them.
 13.3425 +	temp_xrpath=
 13.3426 +	for libdir in $xrpath; do
 13.3427 +	  temp_xrpath="$temp_xrpath -R$libdir"
 13.3428 +	  case "$finalize_rpath " in
 13.3429 +	  *" $libdir "*) ;;
 13.3430 +	  *) finalize_rpath="$finalize_rpath $libdir" ;;
 13.3431 +	  esac
 13.3432 +	done
 13.3433 +	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
 13.3434 +	  dependency_libs="$temp_xrpath $dependency_libs"
 13.3435 +	fi
 13.3436 +      fi
 13.3437 +
 13.3438 +      # Make sure dlfiles contains only unique files that won't be dlpreopened
 13.3439 +      old_dlfiles="$dlfiles"
 13.3440 +      dlfiles=
 13.3441 +      for lib in $old_dlfiles; do
 13.3442 +	case " $dlprefiles $dlfiles " in
 13.3443 +	*" $lib "*) ;;
 13.3444 +	*) dlfiles="$dlfiles $lib" ;;
 13.3445 +	esac
 13.3446 +      done
 13.3447 +
 13.3448 +      # Make sure dlprefiles contains only unique files
 13.3449 +      old_dlprefiles="$dlprefiles"
 13.3450 +      dlprefiles=
 13.3451 +      for lib in $old_dlprefiles; do
 13.3452 +	case "$dlprefiles " in
 13.3453 +	*" $lib "*) ;;
 13.3454 +	*) dlprefiles="$dlprefiles $lib" ;;
 13.3455 +	esac
 13.3456 +      done
 13.3457 +
 13.3458 +      if test "$build_libtool_libs" = yes; then
 13.3459 +	if test -n "$rpath"; then
 13.3460 +	  case $host in
 13.3461 +	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
 13.3462 +	    # these systems don't actually have a c library (as such)!
 13.3463 +	    ;;
 13.3464 +	  *-*-rhapsody* | *-*-darwin1.[012])
 13.3465 +	    # Rhapsody C library is in the System framework
 13.3466 +	    deplibs="$deplibs -framework System"
 13.3467 +	    ;;
 13.3468 +	  *-*-netbsd*)
 13.3469 +	    # Don't link with libc until the a.out ld.so is fixed.
 13.3470 +	    ;;
 13.3471 +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 13.3472 +	    # Do not include libc due to us having libc/libc_r.
 13.3473 +	    ;;
 13.3474 +	  *-*-sco3.2v5* | *-*-sco5v6*)
 13.3475 +	    # Causes problems with __ctype
 13.3476 +	    ;;
 13.3477 +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
 13.3478 +	    # Compiler inserts libc in the correct place for threads to work
 13.3479 +	    ;;
 13.3480 + 	  *)
 13.3481 +	    # Add libc to deplibs on all other systems if necessary.
 13.3482 +	    if test "$build_libtool_need_lc" = "yes"; then
 13.3483 +	      deplibs="$deplibs -lc"
 13.3484 +	    fi
 13.3485 +	    ;;
 13.3486 +	  esac
 13.3487 +	fi
 13.3488 +
 13.3489 +	# Transform deplibs into only deplibs that can be linked in shared.
 13.3490 +	name_save=$name
 13.3491 +	libname_save=$libname
 13.3492 +	release_save=$release
 13.3493 +	versuffix_save=$versuffix
 13.3494 +	major_save=$major
 13.3495 +	# I'm not sure if I'm treating the release correctly.  I think
 13.3496 +	# release should show up in the -l (ie -lgmp5) so we don't want to
 13.3497 +	# add it in twice.  Is that correct?
 13.3498 +	release=""
 13.3499 +	versuffix=""
 13.3500 +	major=""
 13.3501 +	newdeplibs=
 13.3502 +	droppeddeps=no
 13.3503 +	case $deplibs_check_method in
 13.3504 +	pass_all)
 13.3505 +	  # Don't check for shared/static.  Everything works.
 13.3506 +	  # This might be a little naive.  We might want to check
 13.3507 +	  # whether the library exists or not.  But this is on
 13.3508 +	  # osf3 & osf4 and I'm not really sure... Just
 13.3509 +	  # implementing what was already the behavior.
 13.3510 +	  newdeplibs=$deplibs
 13.3511 +	  ;;
 13.3512 +	test_compile)
 13.3513 +	  # This code stresses the "libraries are programs" paradigm to its
 13.3514 +	  # limits. Maybe even breaks it.  We compile a program, linking it
 13.3515 +	  # against the deplibs as a proxy for the library.  Then we can check
 13.3516 +	  # whether they linked in statically or dynamically with ldd.
 13.3517 +	  $rm conftest.c
 13.3518 +	  cat > conftest.c <<EOF
 13.3519 +	  int main() { return 0; }
 13.3520 +EOF
 13.3521 +	  $rm conftest
 13.3522 +	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
 13.3523 +	  if test "$?" -eq 0 ; then
 13.3524 +	    ldd_output=`ldd conftest`
 13.3525 +	    for i in $deplibs; do
 13.3526 +	      name=`expr $i : '-l\(.*\)'`
 13.3527 +	      # If $name is empty we are operating on a -L argument.
 13.3528 +              if test "$name" != "" && test "$name" -ne "0"; then
 13.3529 +		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 13.3530 +		  case " $predeps $postdeps " in
 13.3531 +		  *" $i "*)
 13.3532 +		    newdeplibs="$newdeplibs $i"
 13.3533 +		    i=""
 13.3534 +		    ;;
 13.3535 +		  esac
 13.3536 +	        fi
 13.3537 +		if test -n "$i" ; then
 13.3538 +		  libname=`eval \\$echo \"$libname_spec\"`
 13.3539 +		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
 13.3540 +		  set dummy $deplib_matches
 13.3541 +		  deplib_match=$2
 13.3542 +		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
 13.3543 +		    newdeplibs="$newdeplibs $i"
 13.3544 +		  else
 13.3545 +		    droppeddeps=yes
 13.3546 +		    $echo
 13.3547 +		    $echo "*** Warning: dynamic linker does not accept needed library $i."
 13.3548 +		    $echo "*** I have the capability to make that library automatically link in when"
 13.3549 +		    $echo "*** you link to this library.  But I can only do this if you have a"
 13.3550 +		    $echo "*** shared version of the library, which I believe you do not have"
 13.3551 +		    $echo "*** because a test_compile did reveal that the linker did not use it for"
 13.3552 +		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
 13.3553 +		  fi
 13.3554 +		fi
 13.3555 +	      else
 13.3556 +		newdeplibs="$newdeplibs $i"
 13.3557 +	      fi
 13.3558 +	    done
 13.3559 +	  else
 13.3560 +	    # Error occurred in the first compile.  Let's try to salvage
 13.3561 +	    # the situation: Compile a separate program for each library.
 13.3562 +	    for i in $deplibs; do
 13.3563 +	      name=`expr $i : '-l\(.*\)'`
 13.3564 +	      # If $name is empty we are operating on a -L argument.
 13.3565 +              if test "$name" != "" && test "$name" != "0"; then
 13.3566 +		$rm conftest
 13.3567 +		$LTCC $LTCFLAGS -o conftest conftest.c $i
 13.3568 +		# Did it work?
 13.3569 +		if test "$?" -eq 0 ; then
 13.3570 +		  ldd_output=`ldd conftest`
 13.3571 +		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 13.3572 +		    case " $predeps $postdeps " in
 13.3573 +		    *" $i "*)
 13.3574 +		      newdeplibs="$newdeplibs $i"
 13.3575 +		      i=""
 13.3576 +		      ;;
 13.3577 +		    esac
 13.3578 +		  fi
 13.3579 +		  if test -n "$i" ; then
 13.3580 +		    libname=`eval \\$echo \"$libname_spec\"`
 13.3581 +		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
 13.3582 +		    set dummy $deplib_matches
 13.3583 +		    deplib_match=$2
 13.3584 +		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
 13.3585 +		      newdeplibs="$newdeplibs $i"
 13.3586 +		    else
 13.3587 +		      droppeddeps=yes
 13.3588 +		      $echo
 13.3589 +		      $echo "*** Warning: dynamic linker does not accept needed library $i."
 13.3590 +		      $echo "*** I have the capability to make that library automatically link in when"
 13.3591 +		      $echo "*** you link to this library.  But I can only do this if you have a"
 13.3592 +		      $echo "*** shared version of the library, which you do not appear to have"
 13.3593 +		      $echo "*** because a test_compile did reveal that the linker did not use this one"
 13.3594 +		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
 13.3595 +		    fi
 13.3596 +		  fi
 13.3597 +		else
 13.3598 +		  droppeddeps=yes
 13.3599 +		  $echo
 13.3600 +		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
 13.3601 +		  $echo "***  make it link in!  You will probably need to install it or some"
 13.3602 +		  $echo "*** library that it depends on before this library will be fully"
 13.3603 +		  $echo "*** functional.  Installing it before continuing would be even better."
 13.3604 +		fi
 13.3605 +	      else
 13.3606 +		newdeplibs="$newdeplibs $i"
 13.3607 +	      fi
 13.3608 +	    done
 13.3609 +	  fi
 13.3610 +	  ;;
 13.3611 +	file_magic*)
 13.3612 +	  set dummy $deplibs_check_method
 13.3613 +	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
 13.3614 +	  for a_deplib in $deplibs; do
 13.3615 +	    name=`expr $a_deplib : '-l\(.*\)'`
 13.3616 +	    # If $name is empty we are operating on a -L argument.
 13.3617 +            if test "$name" != "" && test  "$name" != "0"; then
 13.3618 +	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 13.3619 +		case " $predeps $postdeps " in
 13.3620 +		*" $a_deplib "*)
 13.3621 +		  newdeplibs="$newdeplibs $a_deplib"
 13.3622 +		  a_deplib=""
 13.3623 +		  ;;
 13.3624 +		esac
 13.3625 +	      fi
 13.3626 +	      if test -n "$a_deplib" ; then
 13.3627 +		libname=`eval \\$echo \"$libname_spec\"`
 13.3628 +		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
 13.3629 +		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
 13.3630 +		  for potent_lib in $potential_libs; do
 13.3631 +		      # Follow soft links.
 13.3632 +		      if ls -lLd "$potent_lib" 2>/dev/null \
 13.3633 +			 | grep " -> " >/dev/null; then
 13.3634 +			continue
 13.3635 +		      fi
 13.3636 +		      # The statement above tries to avoid entering an
 13.3637 +		      # endless loop below, in case of cyclic links.
 13.3638 +		      # We might still enter an endless loop, since a link
 13.3639 +		      # loop can be closed while we follow links,
 13.3640 +		      # but so what?
 13.3641 +		      potlib="$potent_lib"
 13.3642 +		      while test -h "$potlib" 2>/dev/null; do
 13.3643 +			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
 13.3644 +			case $potliblink in
 13.3645 +			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
 13.3646 +			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
 13.3647 +			esac
 13.3648 +		      done
 13.3649 +		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
 13.3650 +			 | ${SED} 10q \
 13.3651 +			 | $EGREP "$file_magic_regex" > /dev/null; then
 13.3652 +			newdeplibs="$newdeplibs $a_deplib"
 13.3653 +			a_deplib=""
 13.3654 +			break 2
 13.3655 +		      fi
 13.3656 +		  done
 13.3657 +		done
 13.3658 +	      fi
 13.3659 +	      if test -n "$a_deplib" ; then
 13.3660 +		droppeddeps=yes
 13.3661 +		$echo
 13.3662 +		$echo "*** Warning: linker path does not have real file for library $a_deplib."
 13.3663 +		$echo "*** I have the capability to make that library automatically link in when"
 13.3664 +		$echo "*** you link to this library.  But I can only do this if you have a"
 13.3665 +		$echo "*** shared version of the library, which you do not appear to have"
 13.3666 +		$echo "*** because I did check the linker path looking for a file starting"
 13.3667 +		if test -z "$potlib" ; then
 13.3668 +		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
 13.3669 +		else
 13.3670 +		  $echo "*** with $libname and none of the candidates passed a file format test"
 13.3671 +		  $echo "*** using a file magic. Last file checked: $potlib"
 13.3672 +		fi
 13.3673 +	      fi
 13.3674 +	    else
 13.3675 +	      # Add a -L argument.
 13.3676 +	      newdeplibs="$newdeplibs $a_deplib"
 13.3677 +	    fi
 13.3678 +	  done # Gone through all deplibs.
 13.3679 +	  ;;
 13.3680 +	match_pattern*)
 13.3681 +	  set dummy $deplibs_check_method
 13.3682 +	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
 13.3683 +	  for a_deplib in $deplibs; do
 13.3684 +	    name=`expr $a_deplib : '-l\(.*\)'`
 13.3685 +	    # If $name is empty we are operating on a -L argument.
 13.3686 +	    if test -n "$name" && test "$name" != "0"; then
 13.3687 +	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 13.3688 +		case " $predeps $postdeps " in
 13.3689 +		*" $a_deplib "*)
 13.3690 +		  newdeplibs="$newdeplibs $a_deplib"
 13.3691 +		  a_deplib=""
 13.3692 +		  ;;
 13.3693 +		esac
 13.3694 +	      fi
 13.3695 +	      if test -n "$a_deplib" ; then
 13.3696 +		libname=`eval \\$echo \"$libname_spec\"`
 13.3697 +		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
 13.3698 +		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
 13.3699 +		  for potent_lib in $potential_libs; do
 13.3700 +		    potlib="$potent_lib" # see symlink-check above in file_magic test
 13.3701 +		    if eval $echo \"$potent_lib\" 2>/dev/null \
 13.3702 +		        | ${SED} 10q \
 13.3703 +		        | $EGREP "$match_pattern_regex" > /dev/null; then
 13.3704 +		      newdeplibs="$newdeplibs $a_deplib"
 13.3705 +		      a_deplib=""
 13.3706 +		      break 2
 13.3707 +		    fi
 13.3708 +		  done
 13.3709 +		done
 13.3710 +	      fi
 13.3711 +	      if test -n "$a_deplib" ; then
 13.3712 +		droppeddeps=yes
 13.3713 +		$echo
 13.3714 +		$echo "*** Warning: linker path does not have real file for library $a_deplib."
 13.3715 +		$echo "*** I have the capability to make that library automatically link in when"
 13.3716 +		$echo "*** you link to this library.  But I can only do this if you have a"
 13.3717 +		$echo "*** shared version of the library, which you do not appear to have"
 13.3718 +		$echo "*** because I did check the linker path looking for a file starting"
 13.3719 +		if test -z "$potlib" ; then
 13.3720 +		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
 13.3721 +		else
 13.3722 +		  $echo "*** with $libname and none of the candidates passed a file format test"
 13.3723 +		  $echo "*** using a regex pattern. Last file checked: $potlib"
 13.3724 +		fi
 13.3725 +	      fi
 13.3726 +	    else
 13.3727 +	      # Add a -L argument.
 13.3728 +	      newdeplibs="$newdeplibs $a_deplib"
 13.3729 +	    fi
 13.3730 +	  done # Gone through all deplibs.
 13.3731 +	  ;;
 13.3732 +	none | unknown | *)
 13.3733 +	  newdeplibs=""
 13.3734 +	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
 13.3735 +	    -e 's/ -[LR][^ ]*//g'`
 13.3736 +	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 13.3737 +	    for i in $predeps $postdeps ; do
 13.3738 +	      # can't use Xsed below, because $i might contain '/'
 13.3739 +	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
 13.3740 +	    done
 13.3741 +	  fi
 13.3742 +	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
 13.3743 +	    | grep . >/dev/null; then
 13.3744 +	    $echo
 13.3745 +	    if test "X$deplibs_check_method" = "Xnone"; then
 13.3746 +	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
 13.3747 +	    else
 13.3748 +	      $echo "*** Warning: inter-library dependencies are not known to be supported."
 13.3749 +	    fi
 13.3750 +	    $echo "*** All declared inter-library dependencies are being dropped."
 13.3751 +	    droppeddeps=yes
 13.3752 +	  fi
 13.3753 +	  ;;
 13.3754 +	esac
 13.3755 +	versuffix=$versuffix_save
 13.3756 +	major=$major_save
 13.3757 +	release=$release_save
 13.3758 +	libname=$libname_save
 13.3759 +	name=$name_save
 13.3760 +
 13.3761 +	case $host in
 13.3762 +	*-*-rhapsody* | *-*-darwin1.[012])
 13.3763 +	  # On Rhapsody replace the C library is the System framework
 13.3764 +	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
 13.3765 +	  ;;
 13.3766 +	esac
 13.3767 +
 13.3768 +	if test "$droppeddeps" = yes; then
 13.3769 +	  if test "$module" = yes; then
 13.3770 +	    $echo
 13.3771 +	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
 13.3772 +	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
 13.3773 +	    $echo "*** a static module, that should work as long as the dlopening"
 13.3774 +	    $echo "*** application is linked with the -dlopen flag."
 13.3775 +	    if test -z "$global_symbol_pipe"; then
 13.3776 +	      $echo
 13.3777 +	      $echo "*** However, this would only work if libtool was able to extract symbol"
 13.3778 +	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
 13.3779 +	      $echo "*** not find such a program.  So, this module is probably useless."
 13.3780 +	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
 13.3781 +	    fi
 13.3782 +	    if test "$build_old_libs" = no; then
 13.3783 +	      oldlibs="$output_objdir/$libname.$libext"
 13.3784 +	      build_libtool_libs=module
 13.3785 +	      build_old_libs=yes
 13.3786 +	    else
 13.3787 +	      build_libtool_libs=no
 13.3788 +	    fi
 13.3789 +	  else
 13.3790 +	    $echo "*** The inter-library dependencies that have been dropped here will be"
 13.3791 +	    $echo "*** automatically added whenever a program is linked with this library"
 13.3792 +	    $echo "*** or is declared to -dlopen it."
 13.3793 +
 13.3794 +	    if test "$allow_undefined" = no; then
 13.3795 +	      $echo
 13.3796 +	      $echo "*** Since this library must not contain undefined symbols,"
 13.3797 +	      $echo "*** because either the platform does not support them or"
 13.3798 +	      $echo "*** it was explicitly requested with -no-undefined,"
 13.3799 +	      $echo "*** libtool will only create a static version of it."
 13.3800 +	      if test "$build_old_libs" = no; then
 13.3801 +		oldlibs="$output_objdir/$libname.$libext"
 13.3802 +		build_libtool_libs=module
 13.3803 +		build_old_libs=yes
 13.3804 +	      else
 13.3805 +		build_libtool_libs=no
 13.3806 +	      fi
 13.3807 +	    fi
 13.3808 +	  fi
 13.3809 +	fi
 13.3810 +	# Done checking deplibs!
 13.3811 +	deplibs=$newdeplibs
 13.3812 +      fi
 13.3813 +
 13.3814 +
 13.3815 +      # move library search paths that coincide with paths to not yet
 13.3816 +      # installed libraries to the beginning of the library search list
 13.3817 +      new_libs=
 13.3818 +      for path in $notinst_path; do
 13.3819 +	case " $new_libs " in
 13.3820 +	*" -L$path/$objdir "*) ;;
 13.3821 +	*)
 13.3822 +	  case " $deplibs " in
 13.3823 +	  *" -L$path/$objdir "*)
 13.3824 +	    new_libs="$new_libs -L$path/$objdir" ;;
 13.3825 +	  esac
 13.3826 +	  ;;
 13.3827 +	esac
 13.3828 +      done
 13.3829 +      for deplib in $deplibs; do
 13.3830 +	case $deplib in
 13.3831 +	-L*)
 13.3832 +	  case " $new_libs " in
 13.3833 +	  *" $deplib "*) ;;
 13.3834 +	  *) new_libs="$new_libs $deplib" ;;
 13.3835 +	  esac
 13.3836 +	  ;;
 13.3837 +	*) new_libs="$new_libs $deplib" ;;
 13.3838 +	esac
 13.3839 +      done
 13.3840 +      deplibs="$new_libs"
 13.3841 +
 13.3842 +
 13.3843 +      # All the library-specific variables (install_libdir is set above).
 13.3844 +      library_names=
 13.3845 +      old_library=
 13.3846 +      dlname=
 13.3847 +
 13.3848 +      # Test again, we may have decided not to build it any more
 13.3849 +      if test "$build_libtool_libs" = yes; then
 13.3850 +	if test "$hardcode_into_libs" = yes; then
 13.3851 +	  # Hardcode the library paths
 13.3852 +	  hardcode_libdirs=
 13.3853 +	  dep_rpath=
 13.3854 +	  rpath="$finalize_rpath"
 13.3855 +	  test "$mode" != relink && rpath="$compile_rpath$rpath"
 13.3856 +	  for libdir in $rpath; do
 13.3857 +	    if test -n "$hardcode_libdir_flag_spec"; then
 13.3858 +	      if test -n "$hardcode_libdir_separator"; then
 13.3859 +		if test -z "$hardcode_libdirs"; then
 13.3860 +		  hardcode_libdirs="$libdir"
 13.3861 +		else
 13.3862 +		  # Just accumulate the unique libdirs.
 13.3863 +		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
 13.3864 +		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 13.3865 +		    ;;
 13.3866 +		  *)
 13.3867 +		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
 13.3868 +		    ;;
 13.3869 +		  esac
 13.3870 +		fi
 13.3871 +	      else
 13.3872 +		eval flag=\"$hardcode_libdir_flag_spec\"
 13.3873 +		dep_rpath="$dep_rpath $flag"
 13.3874 +	      fi
 13.3875 +	    elif test -n "$runpath_var"; then
 13.3876 +	      case "$perm_rpath " in
 13.3877 +	      *" $libdir "*) ;;
 13.3878 +	      *) perm_rpath="$perm_rpath $libdir" ;;
 13.3879 +	      esac
 13.3880 +	    fi
 13.3881 +	  done
 13.3882 +	  # Substitute the hardcoded libdirs into the rpath.
 13.3883 +	  if test -n "$hardcode_libdir_separator" &&
 13.3884 +	     test -n "$hardcode_libdirs"; then
 13.3885 +	    libdir="$hardcode_libdirs"
 13.3886 +	    if test -n "$hardcode_libdir_flag_spec_ld"; then
 13.3887 +	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
 13.3888 +	    else
 13.3889 +	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
 13.3890 +	    fi
 13.3891 +	  fi
 13.3892 +	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
 13.3893 +	    # We should set the runpath_var.
 13.3894 +	    rpath=
 13.3895 +	    for dir in $perm_rpath; do
 13.3896 +	      rpath="$rpath$dir:"
 13.3897 +	    done
 13.3898 +	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
 13.3899 +	  fi
 13.3900 +	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
 13.3901 +	fi
 13.3902 +
 13.3903 +	shlibpath="$finalize_shlibpath"
 13.3904 +	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
 13.3905 +	if test -n "$shlibpath"; then
 13.3906 +	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
 13.3907 +	fi
 13.3908 +
 13.3909 +	# Get the real and link names of the library.
 13.3910 +	eval shared_ext=\"$shrext_cmds\"
 13.3911 +	eval library_names=\"$library_names_spec\"
 13.3912 +	set dummy $library_names
 13.3913 +	realname="$2"
 13.3914 +	shift; shift
 13.3915 +
 13.3916 +	if test -n "$soname_spec"; then
 13.3917 +	  eval soname=\"$soname_spec\"
 13.3918 +	else
 13.3919 +	  soname="$realname"
 13.3920 +	fi
 13.3921 +	if test -z "$dlname"; then
 13.3922 +	  dlname=$soname
 13.3923 +	fi
 13.3924 +
 13.3925 +	lib="$output_objdir/$realname"
 13.3926 +	linknames=
 13.3927 +	for link
 13.3928 +	do
 13.3929 +	  linknames="$linknames $link"
 13.3930 +	done
 13.3931 +
 13.3932 +	# Use standard objects if they are pic
 13.3933 +	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
 13.3934 +
 13.3935 +	# Prepare the list of exported symbols
 13.3936 +	if test -z "$export_symbols"; then
 13.3937 +	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
 13.3938 +	    $show "generating symbol list for \`$libname.la'"
 13.3939 +	    export_symbols="$output_objdir/$libname.exp"
 13.3940 +	    $run $rm $export_symbols
 13.3941 +	    cmds=$export_symbols_cmds
 13.3942 +	    save_ifs="$IFS"; IFS='~'
 13.3943 +	    for cmd in $cmds; do
 13.3944 +	      IFS="$save_ifs"
 13.3945 +	      eval cmd=\"$cmd\"
 13.3946 +	      if len=`expr "X$cmd" : ".*"` &&
 13.3947 +	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
 13.3948 +	        $show "$cmd"
 13.3949 +	        $run eval "$cmd" || exit $?
 13.3950 +	        skipped_export=false
 13.3951 +	      else
 13.3952 +	        # The command line is too long to execute in one step.
 13.3953 +	        $show "using reloadable object file for export list..."
 13.3954 +	        skipped_export=:
 13.3955 +		# Break out early, otherwise skipped_export may be
 13.3956 +		# set to false by a later but shorter cmd.
 13.3957 +		break
 13.3958 +	      fi
 13.3959 +	    done
 13.3960 +	    IFS="$save_ifs"
 13.3961 +	    if test -n "$export_symbols_regex"; then
 13.3962 +	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
 13.3963 +	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
 13.3964 +	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
 13.3965 +	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
 13.3966 +	    fi
 13.3967 +	  fi
 13.3968 +	fi
 13.3969 +
 13.3970 +	if test -n "$export_symbols" && test -n "$include_expsyms"; then
 13.3971 +	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
 13.3972 +	fi
 13.3973 +
 13.3974 +	tmp_deplibs=
 13.3975 +	for test_deplib in $deplibs; do
 13.3976 +		case " $convenience " in
 13.3977 +		*" $test_deplib "*) ;;
 13.3978 +		*)
 13.3979 +			tmp_deplibs="$tmp_deplibs $test_deplib"
 13.3980 +			;;
 13.3981 +		esac
 13.3982 +	done
 13.3983 +	deplibs="$tmp_deplibs"
 13.3984 +
 13.3985 +	if test -n "$convenience"; then
 13.3986 +	  if test -n "$whole_archive_flag_spec"; then
 13.3987 +	    save_libobjs=$libobjs
 13.3988 +	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 13.3989 +	  else
 13.3990 +	    gentop="$output_objdir/${outputname}x"
 13.3991 +	    generated="$generated $gentop"
 13.3992 +
 13.3993 +	    func_extract_archives $gentop $convenience
 13.3994 +	    libobjs="$libobjs $func_extract_archives_result"
 13.3995 +	  fi
 13.3996 +	fi
 13.3997 +	
 13.3998 +	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
 13.3999 +	  eval flag=\"$thread_safe_flag_spec\"
 13.4000 +	  linker_flags="$linker_flags $flag"
 13.4001 +	fi
 13.4002 +
 13.4003 +	# Make a backup of the uninstalled library when relinking
 13.4004 +	if test "$mode" = relink; then
 13.4005 +	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
 13.4006 +	fi
 13.4007 +
 13.4008 +	# Do each of the archive commands.
 13.4009 +	if test "$module" = yes && test -n "$module_cmds" ; then
 13.4010 +	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 13.4011 +	    eval test_cmds=\"$module_expsym_cmds\"
 13.4012 +	    cmds=$module_expsym_cmds
 13.4013 +	  else
 13.4014 +	    eval test_cmds=\"$module_cmds\"
 13.4015 +	    cmds=$module_cmds
 13.4016 +	  fi
 13.4017 +	else
 13.4018 +	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 13.4019 +	  eval test_cmds=\"$archive_expsym_cmds\"
 13.4020 +	  cmds=$archive_expsym_cmds
 13.4021 +	else
 13.4022 +	  eval test_cmds=\"$archive_cmds\"
 13.4023 +	  cmds=$archive_cmds
 13.4024 +	  fi
 13.4025 +	fi
 13.4026 +
 13.4027 +	if test "X$skipped_export" != "X:" &&
 13.4028 +	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
 13.4029 +	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
 13.4030 +	  :
 13.4031 +	else
 13.4032 +	  # The command line is too long to link in one step, link piecewise.
 13.4033 +	  $echo "creating reloadable object files..."
 13.4034 +
 13.4035 +	  # Save the value of $output and $libobjs because we want to
 13.4036 +	  # use them later.  If we have whole_archive_flag_spec, we
 13.4037 +	  # want to use save_libobjs as it was before
 13.4038 +	  # whole_archive_flag_spec was expanded, because we can't
 13.4039 +	  # assume the linker understands whole_archive_flag_spec.
 13.4040 +	  # This may have to be revisited, in case too many
 13.4041 +	  # convenience libraries get linked in and end up exceeding
 13.4042 +	  # the spec.
 13.4043 +	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
 13.4044 +	    save_libobjs=$libobjs
 13.4045 +	  fi
 13.4046 +	  save_output=$output
 13.4047 +	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
 13.4048 +
 13.4049 +	  # Clear the reloadable object creation command queue and
 13.4050 +	  # initialize k to one.
 13.4051 +	  test_cmds=
 13.4052 +	  concat_cmds=
 13.4053 +	  objlist=
 13.4054 +	  delfiles=
 13.4055 +	  last_robj=
 13.4056 +	  k=1
 13.4057 +	  output=$output_objdir/$output_la-${k}.$objext
 13.4058 +	  # Loop over the list of objects to be linked.
 13.4059 +	  for obj in $save_libobjs
 13.4060 +	  do
 13.4061 +	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
 13.4062 +	    if test "X$objlist" = X ||
 13.4063 +	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
 13.4064 +		 test "$len" -le "$max_cmd_len"; }; then
 13.4065 +	      objlist="$objlist $obj"
 13.4066 +	    else
 13.4067 +	      # The command $test_cmds is almost too long, add a
 13.4068 +	      # command to the queue.
 13.4069 +	      if test "$k" -eq 1 ; then
 13.4070 +		# The first file doesn't have a previous command to add.
 13.4071 +		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
 13.4072 +	      else
 13.4073 +		# All subsequent reloadable object files will link in
 13.4074 +		# the last one created.
 13.4075 +		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
 13.4076 +	      fi
 13.4077 +	      last_robj=$output_objdir/$output_la-${k}.$objext
 13.4078 +	      k=`expr $k + 1`
 13.4079 +	      output=$output_objdir/$output_la-${k}.$objext
 13.4080 +	      objlist=$obj
 13.4081 +	      len=1
 13.4082 +	    fi
 13.4083 +	  done
 13.4084 +	  # Handle the remaining objects by creating one last
 13.4085 +	  # reloadable object file.  All subsequent reloadable object
 13.4086 +	  # files will link in the last one created.
 13.4087 +	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
 13.4088 +	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
 13.4089 +
 13.4090 +	  if ${skipped_export-false}; then
 13.4091 +	    $show "generating symbol list for \`$libname.la'"
 13.4092 +	    export_symbols="$output_objdir/$libname.exp"
 13.4093 +	    $run $rm $export_symbols
 13.4094 +	    libobjs=$output
 13.4095 +	    # Append the command to create the export file.
 13.4096 +	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
 13.4097 +          fi
 13.4098 +
 13.4099 +	  # Set up a command to remove the reloadable object files
 13.4100 +	  # after they are used.
 13.4101 +	  i=0
 13.4102 +	  while test "$i" -lt "$k"
 13.4103 +	  do
 13.4104 +	    i=`expr $i + 1`
 13.4105 +	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
 13.4106 +	  done
 13.4107 +
 13.4108 +	  $echo "creating a temporary reloadable object file: $output"
 13.4109 +
 13.4110 +	  # Loop through the commands generated above and execute them.
 13.4111 +	  save_ifs="$IFS"; IFS='~'
 13.4112 +	  for cmd in $concat_cmds; do
 13.4113 +	    IFS="$save_ifs"
 13.4114 +	    $show "$cmd"
 13.4115 +	    $run eval "$cmd" || exit $?
 13.4116 +	  done
 13.4117 +	  IFS="$save_ifs"
 13.4118 +
 13.4119 +	  libobjs=$output
 13.4120 +	  # Restore the value of output.
 13.4121 +	  output=$save_output
 13.4122 +
 13.4123 +	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
 13.4124 +	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 13.4125 +	  fi
 13.4126 +	  # Expand the library linking commands again to reset the
 13.4127 +	  # value of $libobjs for piecewise linking.
 13.4128 +
 13.4129 +	  # Do each of the archive commands.
 13.4130 +	  if test "$module" = yes && test -n "$module_cmds" ; then
 13.4131 +	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 13.4132 +	      cmds=$module_expsym_cmds
 13.4133 +	    else
 13.4134 +	      cmds=$module_cmds
 13.4135 +	    fi
 13.4136 +	  else
 13.4137 +	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 13.4138 +	    cmds=$archive_expsym_cmds
 13.4139 +	  else
 13.4140 +	    cmds=$archive_cmds
 13.4141 +	    fi
 13.4142 +	  fi
 13.4143 +
 13.4144 +	  # Append the command to remove the reloadable object files
 13.4145 +	  # to the just-reset $cmds.
 13.4146 +	  eval cmds=\"\$cmds~\$rm $delfiles\"
 13.4147 +	fi
 13.4148 +	save_ifs="$IFS"; IFS='~'
 13.4149 +	for cmd in $cmds; do
 13.4150 +	  IFS="$save_ifs"
 13.4151 +	  eval cmd=\"$cmd\"
 13.4152 +	  $show "$cmd"
 13.4153 +	  $run eval "$cmd" || {
 13.4154 +	    lt_exit=$?
 13.4155 +
 13.4156 +	    # Restore the uninstalled library and exit
 13.4157 +	    if test "$mode" = relink; then
 13.4158 +	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
 13.4159 +	    fi
 13.4160 +
 13.4161 +	    exit $lt_exit
 13.4162 +	  }
 13.4163 +	done
 13.4164 +	IFS="$save_ifs"
 13.4165 +
 13.4166 +	# Restore the uninstalled library and exit
 13.4167 +	if test "$mode" = relink; then
 13.4168 +	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
 13.4169 +
 13.4170 +	  if test -n "$convenience"; then
 13.4171 +	    if test -z "$whole_archive_flag_spec"; then
 13.4172 +	      $show "${rm}r $gentop"
 13.4173 +	      $run ${rm}r "$gentop"
 13.4174 +	    fi
 13.4175 +	  fi
 13.4176 +
 13.4177 +	  exit $EXIT_SUCCESS
 13.4178 +	fi
 13.4179 +
 13.4180 +	# Create links to the real library.
 13.4181 +	for linkname in $linknames; do
 13.4182 +	  if test "$realname" != "$linkname"; then
 13.4183 +	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
 13.4184 +	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
 13.4185 +	  fi
 13.4186 +	done
 13.4187 +
 13.4188 +	# If -module or -export-dynamic was specified, set the dlname.
 13.4189 +	if test "$module" = yes || test "$export_dynamic" = yes; then
 13.4190 +	  # On all known operating systems, these are identical.
 13.4191 +	  dlname="$soname"
 13.4192 +	fi
 13.4193 +      fi
 13.4194 +      ;;
 13.4195 +
 13.4196 +    obj)
 13.4197 +      if test -n "$deplibs"; then
 13.4198 +	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
 13.4199 +      fi
 13.4200 +
 13.4201 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
 13.4202 +	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
 13.4203 +      fi
 13.4204 +
 13.4205 +      if test -n "$rpath"; then
 13.4206 +	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
 13.4207 +      fi
 13.4208 +
 13.4209 +      if test -n "$xrpath"; then
 13.4210 +	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
 13.4211 +      fi
 13.4212 +
 13.4213 +      if test -n "$vinfo"; then
 13.4214 +	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
 13.4215 +      fi
 13.4216 +
 13.4217 +      if test -n "$release"; then
 13.4218 +	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
 13.4219 +      fi
 13.4220 +
 13.4221 +      case $output in
 13.4222 +      *.lo)
 13.4223 +	if test -n "$objs$old_deplibs"; then
 13.4224 +	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
 13.4225 +	  exit $EXIT_FAILURE
 13.4226 +	fi
 13.4227 +	libobj="$output"
 13.4228 +	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
 13.4229 +	;;
 13.4230 +      *)
 13.4231 +	libobj=
 13.4232 +	obj="$output"
 13.4233 +	;;
 13.4234 +      esac
 13.4235 +
 13.4236 +      # Delete the old objects.
 13.4237 +      $run $rm $obj $libobj
 13.4238 +
 13.4239 +      # Objects from convenience libraries.  This assumes
 13.4240 +      # single-version convenience libraries.  Whenever we create
 13.4241 +      # different ones for PIC/non-PIC, this we'll have to duplicate
 13.4242 +      # the extraction.
 13.4243 +      reload_conv_objs=
 13.4244 +      gentop=
 13.4245 +      # reload_cmds runs $LD directly, so let us get rid of
 13.4246 +      # -Wl from whole_archive_flag_spec
 13.4247 +      wl=
 13.4248 +
 13.4249 +      if test -n "$convenience"; then
 13.4250 +	if test -n "$whole_archive_flag_spec"; then
 13.4251 +	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
 13.4252 +	else
 13.4253 +	  gentop="$output_objdir/${obj}x"
 13.4254 +	  generated="$generated $gentop"
 13.4255 +
 13.4256 +	  func_extract_archives $gentop $convenience
 13.4257 +	  reload_conv_objs="$reload_objs $func_extract_archives_result"
 13.4258 +	fi
 13.4259 +      fi