/ Check-in [20ac0f36]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:regenerate (CVS 3648)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 20ac0f364059feba5ad95dbe82db30a9aa86be78
User & Date: vapier 2007-02-17 14:46:31
Context
2007-02-17
14:59
merge the second portion of the cross-compile cleanup (CVS 3649) check-in: 309f2de6 user: vapier tags: trunk
14:46
regenerate (CVS 3648) check-in: 20ac0f36 user: vapier tags: trunk
14:31
punt custom handling of cross-compile logic and move towards the standard autotool way of things (CVS 3647) check-in: 9817b433 user: vapier tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

    22     22   #
    23     23   BCC = @BUILD_CC@ @BUILD_CFLAGS@
    24     24   
    25     25   # C Compile and options for use in building executables that 
    26     26   # will run on the target platform.  (BCC and TCC are usually the
    27     27   # same unless your are cross-compiling.)
    28     28   #
    29         -TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src
           29  +TCC = @CC@ @CFLAGS@ -I. -I${TOP}/src
    30     30   
    31     31   # Define -DNDEBUG to compile without debugging (i.e., for production usage)
    32     32   # Omitting the define will cause extra debugging code to be inserted and
    33     33   # includes extra comments when "EXPLAIN stmt" is used.
    34     34   #
    35     35   TCC += @TARGET_DEBUG@ @XTHREADCONNECT@
    36     36   
................................................................................
    59     59   LIBPTHREAD=@TARGET_THREAD_LIB@
    60     60   
    61     61   # Do threads override each others locks by default (1), or do we test (-1)
    62     62   #
    63     63   TCC += -DSQLITE_THREAD_OVERRIDE_LOCK=@THREADSOVERRIDELOCKS@
    64     64   
    65     65   # The fdatasync library
    66         -TLIBS = @TARGET_LIBS@
           66  +TLIBS = @LIBS@
    67     67   
    68     68   # Flags controlling use of the in memory btree implementation
    69     69   #
    70     70   # TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
    71     71   # default to file, 2 to default to memory, and 3 to force temporary
    72     72   # tables to always be in memory.
    73     73   #
................................................................................
   103    103   exec_prefix = @exec_prefix@
   104    104   libdir = @libdir@
   105    105   INSTALL = @INSTALL@
   106    106   LIBTOOL = ./libtool
   107    107   ALLOWRELEASE = @ALLOWRELEASE@
   108    108   
   109    109   # libtool compile/link/install
   110         -LTCOMPILE = $(LIBTOOL) --mode=compile $(TCC)
          110  +LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC)
   111    111   LTLINK = $(LIBTOOL) --mode=link $(TCC)
   112    112   LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
   113    113   
   114    114   # nawk compatible awk.
   115    115   NAWK = @AWK@
   116    116   
   117    117   # You should not have to change anything below this line

Changes to aclocal.m4.

     1         -# generated automatically by aclocal 1.8.2 -*- Autoconf -*-
            1  +# generated automatically by aclocal 1.10 -*- Autoconf -*-
     2      2   
     3         -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     4         -# Free Software Foundation, Inc.
            3  +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
            4  +# 2005, 2006  Free Software Foundation, Inc.
     5      5   # This file is free software; the Free Software Foundation
     6      6   # gives unlimited permission to copy and/or distribute it,
     7      7   # with or without modifications, as long as this notice is preserved.
     8      8   
     9      9   # This program is distributed in the hope that it will be useful,
    10     10   # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
    11     11   # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    12     12   # PARTICULAR PURPOSE.
    13     13   
    14     14   # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
    15     15   
    16         -# serial 47 AC_PROG_LIBTOOL
    17         -# Debian $Rev: 192 $
           16  +# serial 48 AC_PROG_LIBTOOL
    18     17   
    19     18   
    20     19   # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
    21     20   # -----------------------------------------------------------
    22     21   # If this macro is not defined by Autoconf, define it here.
    23     22   m4_ifdef([AC_PROVIDE_IFELSE],
    24     23            [],
................................................................................
   120    119       export COLLECT_NAMES
   121    120     fi
   122    121     ;;
   123    122   esac
   124    123   
   125    124   # Sed substitution that helps us do robust quoting.  It backslashifies
   126    125   # metacharacters that are still active within double-quoted strings.
   127         -Xsed='sed -e s/^X//'
          126  +Xsed='sed -e 1s/^X//'
   128    127   [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
   129    128   
   130    129   # Same as above, but do not quote variable references.
   131    130   [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
   132    131   
   133    132   # Sed substitution to delay expansion of an escaped shell variable in a
   134    133   # double_quote_subst'ed string.
................................................................................
   140    139   # Constants:
   141    140   rm="rm -f"
   142    141   
   143    142   # Global variables:
   144    143   default_ofile=libtool
   145    144   can_build_shared=yes
   146    145   
   147         -# All known linkers require a `.a' archive for static linking (except M$VC,
          146  +# All known linkers require a `.a' archive for static linking (except MSVC,
   148    147   # which needs '.lib').
   149    148   libext=a
   150    149   ltmain="$ac_aux_dir/ltmain.sh"
   151    150   ofile="$default_ofile"
   152    151   with_gnu_ld="$lt_cv_prog_gnu_ld"
   153    152   
   154         -AC_CHECK_TOOL(AR, ar, AC_CHECK_TOOL(AR, emxomfar, false))
          153  +AC_CHECK_TOOL(AR, ar, false)
   155    154   AC_CHECK_TOOL(RANLIB, ranlib, :)
   156    155   AC_CHECK_TOOL(STRIP, strip, :)
   157    156   
   158    157   old_CC="$CC"
   159    158   old_CFLAGS="$CFLAGS"
   160    159   
   161    160   # Set sane defaults for various variables
   162    161   test -z "$AR" && AR=ar
   163    162   test -z "$AR_FLAGS" && AR_FLAGS=cru
   164    163   test -z "$AS" && AS=as
   165    164   test -z "$CC" && CC=cc
   166    165   test -z "$LTCC" && LTCC=$CC
          166  +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
   167    167   test -z "$DLLTOOL" && DLLTOOL=dlltool
   168    168   test -z "$LD" && LD=ld
   169    169   test -z "$LN_S" && LN_S="ln -s"
   170    170   test -z "$MAGIC_CMD" && MAGIC_CMD=file
   171    171   test -z "$NM" && NM=nm
   172    172   test -z "$SED" && SED=sed
   173    173   test -z "$OBJDUMP" && OBJDUMP=objdump
................................................................................
   179    179   old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
   180    180   old_postinstall_cmds='chmod 644 $oldlib'
   181    181   old_postuninstall_cmds=
   182    182   
   183    183   if test -n "$RANLIB"; then
   184    184     case $host_os in
   185    185     openbsd*)
   186         -    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
          186  +    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
   187    187       ;;
   188    188     *)
   189         -    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
          189  +    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
   190    190       ;;
   191    191     esac
   192    192     old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
   193    193   fi
          194  +
          195  +_LT_CC_BASENAME([$compiler])
   194    196   
   195    197   # Only perform the check for file, if the check method requires it
   196    198   case $deplibs_check_method in
   197    199   file_magic*)
   198    200     if test "$file_magic_cmd" = '$MAGIC_CMD'; then
   199    201       AC_PATH_MAGIC
   200    202     fi
................................................................................
   212    214   
   213    215   AC_ARG_WITH([pic],
   214    216       [AC_HELP_STRING([--with-pic],
   215    217   	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
   216    218       [pic_mode="$withval"],
   217    219       [pic_mode=default])
   218    220   test -z "$pic_mode" && pic_mode=default
          221  +
          222  +# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
          223  +#
          224  +# Note:  This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
          225  +#        We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
          226  +#        calls AC_LIBTOOL_CONFIG and creates libtool.
          227  +#
          228  +_LT_VERSION_CHECK
   219    229   
   220    230   # Use C for the default configuration in the libtool script
   221    231   tagname=
   222    232   AC_LIBTOOL_LANG_C_CONFIG
   223    233   _LT_AC_TAGCONFIG
   224    234   ])# AC_LIBTOOL_SETUP
   225    235   
          236  +
          237  +# _LT_VERSION_CHECK
          238  +# -----------------
          239  +AC_DEFUN([_LT_VERSION_CHECK],
          240  +[AC_MSG_CHECKING([for correct ltmain.sh version])
          241  +if test "x$ltmain" = "x" ; then
          242  +  AC_MSG_RESULT(no)
          243  +  AC_MSG_ERROR([
          244  +
          245  +*** @<:@Gentoo@:>@ sanity check failed! ***
          246  +*** \$ltmain is not defined, please check the patch for consistency! ***
          247  +])
          248  +fi
          249  +gentoo_lt_version="1.5.22"
          250  +gentoo_ltmain_version=`sed -n '/^[[ 	]]*VERSION=/{s/^[[ 	]]*VERSION=//;p;q;}' "$ltmain"`
          251  +if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
          252  +  AC_MSG_RESULT(no)
          253  +  AC_MSG_ERROR([
          254  +
          255  +*** @<:@Gentoo@:>@ sanity check failed! ***
          256  +*** libtool.m4 and ltmain.sh have a version mismatch! ***
          257  +*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
          258  +
          259  +Please run:
          260  +
          261  +  libtoolize --copy --force
          262  +
          263  +if appropriate, please contact the maintainer of this
          264  +package (or your distribution) for help.
          265  +])
          266  +else
          267  +  AC_MSG_RESULT(yes)
          268  +fi
          269  +])# _LT_VERSION_CHECK
          270  +
   226    271   
   227    272   # _LT_AC_SYS_COMPILER
   228    273   # -------------------
   229    274   AC_DEFUN([_LT_AC_SYS_COMPILER],
   230    275   [AC_REQUIRE([AC_PROG_CC])dnl
   231    276   
   232    277   # If no C compiler was specified, use CC.
   233    278   LTCC=${LTCC-"$CC"}
          279  +
          280  +# If no C compiler flags were specified, use CFLAGS.
          281  +LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
   234    282   
   235    283   # Allow CC to be a program name with arguments.
   236    284   compiler=$CC
   237    285   ])# _LT_AC_SYS_COMPILER
   238    286   
          287  +
          288  +# _LT_CC_BASENAME(CC)
          289  +# -------------------
          290  +# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
          291  +AC_DEFUN([_LT_CC_BASENAME],
          292  +[for cc_temp in $1""; do
          293  +  case $cc_temp in
          294  +    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
          295  +    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
          296  +    \-*) ;;
          297  +    *) break;;
          298  +  esac
          299  +done
          300  +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
          301  +])
          302  +
          303  +
          304  +# _LT_COMPILER_BOILERPLATE
          305  +# ------------------------
          306  +# Check for compiler boilerplate output or warnings with
          307  +# the simple compiler test code.
          308  +AC_DEFUN([_LT_COMPILER_BOILERPLATE],
          309  +[ac_outfile=conftest.$ac_objext
          310  +printf "$lt_simple_compile_test_code" >conftest.$ac_ext
          311  +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
          312  +_lt_compiler_boilerplate=`cat conftest.err`
          313  +$rm conftest*
          314  +])# _LT_COMPILER_BOILERPLATE
          315  +
          316  +
          317  +# _LT_LINKER_BOILERPLATE
          318  +# ----------------------
          319  +# Check for linker boilerplate output or warnings with
          320  +# the simple link test code.
          321  +AC_DEFUN([_LT_LINKER_BOILERPLATE],
          322  +[ac_outfile=conftest.$ac_objext
          323  +printf "$lt_simple_link_test_code" >conftest.$ac_ext
          324  +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
          325  +_lt_linker_boilerplate=`cat conftest.err`
          326  +$rm conftest*
          327  +])# _LT_LINKER_BOILERPLATE
          328  +
   239    329   
   240    330   # _LT_AC_SYS_LIBPATH_AIX
   241    331   # ----------------------
   242    332   # Links a minimal program and checks the executable
   243    333   # for the system default hardcoded library path. In most cases,
   244    334   # this is /usr/lib:/lib, but when the MPI compilers are used
   245    335   # the location of the communication and MPI libs are included too.
................................................................................
   305    395   [$]*
   306    396   EOF
   307    397     exit 0
   308    398   fi
   309    399   
   310    400   # The HP-UX ksh and POSIX shell print the target directory to stdout
   311    401   # if CDPATH is set.
   312         -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
          402  +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
   313    403   
   314    404   if test -z "$ECHO"; then
   315    405   if test "X${echo_test_string+set}" != Xset; then
   316    406   # find a string as large as possible, as long as the shell can cope with it
   317    407     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
   318    408       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
   319         -    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
   320         -       echo_test_string="`eval $cmd`" &&
          409  +    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
          410  +       echo_test_string=`eval $cmd` &&
   321    411          (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
   322    412       then
   323    413         break
   324    414       fi
   325    415     done
   326    416   fi
   327    417   
................................................................................
   482    572     rm -rf conftest*
   483    573     ;;
   484    574   
   485    575   x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
   486    576     # Find out which ABI we are using.
   487    577     echo 'int i;' > conftest.$ac_ext
   488    578     if AC_TRY_EVAL(ac_compile); then
   489         -    case "`/usr/bin/file conftest.o`" in
          579  +    case `/usr/bin/file conftest.o` in
   490    580       *32-bit*)
   491    581         case $host in
   492    582           x86_64-*linux*)
   493    583             LD="${LD-ld} -m elf_i386"
   494    584             ;;
   495    585           ppc64-*linux*|powerpc64-*linux*)
   496    586             LD="${LD-ld} -m elf32ppclinux"
................................................................................
   533    623        AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
   534    624        AC_LANG_POP])
   535    625     if test x"$lt_cv_cc_needs_belf" != x"yes"; then
   536    626       # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
   537    627       CFLAGS="$SAVE_CFLAGS"
   538    628     fi
   539    629     ;;
          630  +sparc*-*solaris*)
          631  +  # Find out which ABI we are using.
          632  +  echo 'int i;' > conftest.$ac_ext
          633  +  if AC_TRY_EVAL(ac_compile); then
          634  +    case `/usr/bin/file conftest.o` in
          635  +    *64-bit*)
          636  +      case $lt_cv_prog_gnu_ld in
          637  +      yes*) LD="${LD-ld} -m elf64_sparc" ;;
          638  +      *)    LD="${LD-ld} -64" ;;
          639  +      esac
          640  +      ;;
          641  +    esac
          642  +  fi
          643  +  rm -rf conftest*
          644  +  ;;
          645  +
   540    646   AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
   541    647   [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
   542    648     AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   543    649     AC_CHECK_TOOL(AS, as, false)
   544    650     AC_CHECK_TOOL(OBJDUMP, objdump, false)
   545    651     ;;
   546    652     ])
................................................................................
   564    670      lt_compiler_flag="$3"
   565    671      # Insert the option either (1) after the last *FLAGS variable, or
   566    672      # (2) before a word containing "conftest.", or (3) at the end.
   567    673      # Note that $ac_compile itself does not contain backslashes and begins
   568    674      # with a dollar sign (not a hyphen), so the echo should work correctly.
   569    675      # The option is referenced via a variable to avoid confusing sed.
   570    676      lt_compile=`echo "$ac_compile" | $SED \
   571         -   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
          677  +   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   572    678      -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
   573    679      -e 's:$: $lt_compiler_flag:'`
   574    680      (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
   575    681      (eval "$lt_compile" 2>conftest.err)
   576    682      ac_status=$?
   577    683      cat conftest.err >&AS_MESSAGE_LOG_FD
   578    684      echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
   579    685      if (exit $ac_status) && test -s "$ac_outfile"; then
   580    686        # The compiler can only warn and ignore the option if not recognized
   581         -     # So say no if there are warnings
   582         -     if test ! -s conftest.err; then
          687  +     # So say no if there are warnings other than the usual output.
          688  +     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
          689  +     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
          690  +     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
   583    691          $2=yes
   584    692        fi
   585    693      fi
   586    694      $rm conftest*
   587    695   ])
   588    696   
   589    697   if test x"[$]$2" = xyes; then
................................................................................
   601    709   AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
   602    710   [AC_CACHE_CHECK([$1], [$2],
   603    711     [$2=no
   604    712      save_LDFLAGS="$LDFLAGS"
   605    713      LDFLAGS="$LDFLAGS $3"
   606    714      printf "$lt_simple_link_test_code" > conftest.$ac_ext
   607    715      if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
   608         -     # The compiler can only warn and ignore the option if not recognized
          716  +     # The linker can only warn and ignore the option if not recognized
   609    717        # So say no if there are warnings
   610    718        if test -s conftest.err; then
   611    719          # Append any errors to the config.log.
   612    720          cat conftest.err 1>&AS_MESSAGE_LOG_FD
          721  +       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
          722  +       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
          723  +       if diff conftest.exp conftest.er2 >/dev/null; then
          724  +         $2=yes
          725  +       fi
   613    726        else
   614    727          $2=yes
   615    728        fi
   616    729      fi
   617    730      $rm conftest*
   618    731      LDFLAGS="$save_LDFLAGS"
   619    732   ])
................................................................................
   629    742   # AC_LIBTOOL_SYS_MAX_CMD_LEN
   630    743   # --------------------------
   631    744   AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
   632    745   [# find the maximum length of command line arguments
   633    746   AC_MSG_CHECKING([the maximum length of command line arguments])
   634    747   AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   635    748     i=0
   636         -  testring="ABCD"
          749  +  teststring="ABCD"
   637    750   
   638    751     case $build_os in
   639    752     msdosdjgpp*)
   640    753       # On DJGPP, this test can blow up pretty badly due to problems in libc
   641    754       # (any single argument exceeding 2000 bytes causes a buffer overrun
   642    755       # during glob expansion).  Even if it were fixed, the result of this
   643    756       # check would be larger than it should be.
................................................................................
   664    777   
   665    778     amigaos*)
   666    779       # On AmigaOS with pdksh, this test takes hours, literally.
   667    780       # So we just punt and use a minimum line length of 8192.
   668    781       lt_cv_sys_max_cmd_len=8192;
   669    782       ;;
   670    783   
   671         - *)
          784  +  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
          785  +    # This has been around since 386BSD, at least.  Likely further.
          786  +    if test -x /sbin/sysctl; then
          787  +      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
          788  +    elif test -x /usr/sbin/sysctl; then
          789  +      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
          790  +    else
          791  +      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
          792  +    fi
          793  +    # And add a safety zone
          794  +    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
          795  +    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
          796  +    ;;
          797  +
          798  +  interix*)
          799  +    # We know the value 262144 and hardcode it with a safety zone (like BSD)
          800  +    lt_cv_sys_max_cmd_len=196608
          801  +    ;;
          802  +
          803  +  osf*)
          804  +    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
          805  +    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
          806  +    # nice to cause kernel panics so lets avoid the loop below.
          807  +    # First set a reasonable default.
          808  +    lt_cv_sys_max_cmd_len=16384
          809  +    #
          810  +    if test -x /sbin/sysconfig; then
          811  +      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
          812  +        *1*) lt_cv_sys_max_cmd_len=-1 ;;
          813  +      esac
          814  +    fi
          815  +    ;;
          816  +  sco3.2v5*)
          817  +    lt_cv_sys_max_cmd_len=102400
          818  +    ;;
          819  +  sysv5* | sco5v6* | sysv4.2uw2*)
          820  +    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
          821  +    if test -n "$kargmax"; then
          822  +      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
          823  +    else
          824  +      lt_cv_sys_max_cmd_len=32768
          825  +    fi
          826  +    ;;
          827  +  *)
   672    828       # If test is not a shell built-in, we'll probably end up computing a
   673    829       # maximum length that is only half of the actual maximum length, but
   674    830       # we can't tell.
   675         -    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
   676         -	       = "XX$testring") >/dev/null 2>&1 &&
   677         -	    new_result=`expr "X$testring" : ".*" 2>&1` &&
          831  +    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
          832  +    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
          833  +	       = "XX$teststring") >/dev/null 2>&1 &&
          834  +	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
   678    835   	    lt_cv_sys_max_cmd_len=$new_result &&
   679    836   	    test $i != 17 # 1/2 MB should be enough
   680    837       do
   681    838         i=`expr $i + 1`
   682         -      testring=$testring$testring
          839  +      teststring=$teststring$teststring
   683    840       done
   684         -    testring=
          841  +    teststring=
   685    842       # Add a significant safety factor because C++ compilers can tack on massive
   686    843       # amounts of additional arguments before passing them to the linker.
   687    844       # It appears as though 1/2 is a usable value.
   688    845       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
   689    846       ;;
   690    847     esac
   691    848   ])
................................................................................
   694    851   else
   695    852     AC_MSG_RESULT(none)
   696    853   fi
   697    854   ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
   698    855   
   699    856   
   700    857   # _LT_AC_CHECK_DLFCN
   701         -# --------------------
          858  +# ------------------
   702    859   AC_DEFUN([_LT_AC_CHECK_DLFCN],
   703    860   [AC_CHECK_HEADERS(dlfcn.h)dnl
   704    861   ])# _LT_AC_CHECK_DLFCN
   705    862   
   706    863   
   707    864   # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
   708    865   #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
   709         -# ------------------------------------------------------------------
          866  +# ---------------------------------------------------------------------
   710    867   AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
   711    868   [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
   712    869   if test "$cross_compiling" = yes; then :
   713    870     [$4]
   714    871   else
   715    872     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   716    873     lt_status=$lt_dlunknown
................................................................................
   768    925   
   769    926     if (self)
   770    927       {
   771    928         if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
   772    929         else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
   773    930         /* dlclose (self); */
   774    931       }
          932  +  else
          933  +    puts (dlerror ());
   775    934   
   776    935       exit (status);
   777    936   }]
   778    937   EOF
   779    938     if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
   780         -    (./conftest; exit; ) 2>/dev/null
          939  +    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
   781    940       lt_status=$?
   782    941       case x$lt_status in
   783    942         x$lt_dlno_uscore) $1 ;;
   784    943         x$lt_dlneed_uscore) $2 ;;
   785         -      x$lt_unknown|x*) $3 ;;
          944  +      x$lt_dlunknown|x*) $3 ;;
   786    945       esac
   787    946     else :
   788    947       # compilation failed
   789    948       $3
   790    949     fi
   791    950   fi
   792    951   rm -fr conftest*
   793    952   ])# _LT_AC_TRY_DLOPEN_SELF
   794    953   
   795    954   
   796    955   # AC_LIBTOOL_DLOPEN_SELF
   797         -# -------------------
          956  +# ----------------------
   798    957   AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
   799    958   [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
   800    959   if test "x$enable_dlopen" != xyes; then
   801    960     enable_dlopen=unknown
   802    961     enable_dlopen_self=unknown
   803    962     enable_dlopen_self_static=unknown
   804    963   else
................................................................................
   861   1020   
   862   1021     case $lt_cv_dlopen in
   863   1022     dlopen)
   864   1023       save_CPPFLAGS="$CPPFLAGS"
   865   1024       test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
   866   1025   
   867   1026       save_LDFLAGS="$LDFLAGS"
   868         -    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
         1027  +    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
   869   1028   
   870   1029       save_LIBS="$LIBS"
   871   1030       LIBS="$lt_cv_dlopen_libs $LIBS"
   872   1031   
   873   1032       AC_CACHE_CHECK([whether a program can dlopen itself],
   874   1033   	  lt_cv_dlopen_self, [dnl
   875   1034   	  _LT_AC_TRY_DLOPEN_SELF(
   876   1035   	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
   877   1036   	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
   878   1037       ])
   879   1038   
   880   1039       if test "x$lt_cv_dlopen_self" = xyes; then
   881         -      LDFLAGS="$LDFLAGS $link_static_flag"
         1040  +      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
   882   1041         AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
   883   1042       	  lt_cv_dlopen_self_static, [dnl
   884   1043   	  _LT_AC_TRY_DLOPEN_SELF(
   885   1044   	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
   886   1045   	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
   887   1046         ])
   888   1047       fi
................................................................................
   922   1081   
   923   1082      lt_compiler_flag="-o out/conftest2.$ac_objext"
   924   1083      # Insert the option either (1) after the last *FLAGS variable, or
   925   1084      # (2) before a word containing "conftest.", or (3) at the end.
   926   1085      # Note that $ac_compile itself does not contain backslashes and begins
   927   1086      # with a dollar sign (not a hyphen), so the echo should work correctly.
   928   1087      lt_compile=`echo "$ac_compile" | $SED \
   929         -   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
         1088  +   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   930   1089      -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
   931   1090      -e 's:$: $lt_compiler_flag:'`
   932   1091      (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
   933   1092      (eval "$lt_compile" 2>out/conftest.err)
   934   1093      ac_status=$?
   935   1094      cat out/conftest.err >&AS_MESSAGE_LOG_FD
   936   1095      echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
   937   1096      if (exit $ac_status) && test -s out/conftest2.$ac_objext
   938   1097      then
   939   1098        # The compiler can only warn and ignore the option if not recognized
   940   1099        # So say no if there are warnings
   941         -     if test ! -s out/conftest.err; then
         1100  +     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
         1101  +     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
         1102  +     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
   942   1103          _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
   943   1104        fi
   944   1105      fi
   945         -   chmod u+w .
         1106  +   chmod u+w . 2>&AS_MESSAGE_LOG_FD
   946   1107      $rm conftest*
   947   1108      # SGI C++ compiler will create directory out/ii_files/ for
   948   1109      # template instantiation
   949   1110      test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
   950   1111      $rm out/* && rmdir out
   951   1112      cd ..
   952   1113      rmdir conftest
................................................................................
  1002   1163   # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  1003   1164   # ----------------------------------------------
  1004   1165   # Check hardcoding attributes.
  1005   1166   AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  1006   1167   [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1007   1168   _LT_AC_TAGVAR(hardcode_action, $1)=
  1008   1169   if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  1009         -   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
  1010         -   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
         1170  +   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
         1171  +   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1011   1172   
  1012   1173     # We can hardcode non-existant directories.
  1013   1174     if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  1014   1175        # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1015   1176        # have to relink, otherwise we might link with an installed library
  1016   1177        # when we should be linking with a yet-to-be-installed one
  1017   1178        ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
................................................................................
  1073   1234   # -----------------------------
  1074   1235   # PORTME Fill in your ld.so characteristics
  1075   1236   AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1076   1237   [AC_MSG_CHECKING([dynamic linker characteristics])
  1077   1238   library_names_spec=
  1078   1239   libname_spec='lib$name'
  1079   1240   soname_spec=
  1080         -shrext=".so"
         1241  +shrext_cmds=".so"
  1081   1242   postinstall_cmds=
  1082   1243   postuninstall_cmds=
  1083   1244   finish_cmds=
  1084   1245   finish_eval=
  1085   1246   shlibpath_var=
  1086   1247   shlibpath_overrides_runpath=unknown
  1087   1248   version_type=none
................................................................................
  1170   1331   
  1171   1332   beos*)
  1172   1333     library_names_spec='${libname}${shared_ext}'
  1173   1334     dynamic_linker="$host_os ld.so"
  1174   1335     shlibpath_var=LIBRARY_PATH
  1175   1336     ;;
  1176   1337   
  1177         -bsdi4*)
         1338  +bsdi[[45]]*)
  1178   1339     version_type=linux
  1179   1340     need_version=no
  1180   1341     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1181   1342     soname_spec='${libname}${release}${shared_ext}$major'
  1182   1343     finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1183   1344     shlibpath_var=LD_LIBRARY_PATH
  1184   1345     sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
................................................................................
  1186   1347     # the default ld.so.conf also contains /usr/contrib/lib and
  1187   1348     # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1188   1349     # libtool to hard-code these into programs
  1189   1350     ;;
  1190   1351   
  1191   1352   cygwin* | mingw* | pw32*)
  1192   1353     version_type=windows
  1193         -  shrext=".dll"
         1354  +  shrext_cmds=".dll"
  1194   1355     need_version=no
  1195   1356     need_lib_prefix=no
  1196   1357   
  1197   1358     case $GCC,$host_os in
  1198   1359     yes,cygwin* | yes,mingw* | yes,pw32*)
  1199   1360       library_names_spec='$libname.dll.a'
  1200   1361       # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1201   1362       postinstall_cmds='base_file=`basename \${file}`~
  1202   1363         dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1203   1364         dldir=$destdir/`dirname \$dlpath`~
  1204   1365         test -d \$dldir || mkdir -p \$dldir~
  1205         -      $install_prog $dir/$dlname \$dldir/$dlname'
         1366  +      $install_prog $dir/$dlname \$dldir/$dlname~
         1367  +      chmod a+x \$dldir/$dlname'
  1206   1368       postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1207   1369         dlpath=$dir/\$dldll~
  1208   1370          $rm \$dlpath'
  1209   1371       shlibpath_overrides_runpath=yes
  1210   1372   
  1211   1373       case $host_os in
  1212   1374       cygwin*)
................................................................................
  1228   1390           sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1229   1391         else
  1230   1392           sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
  1231   1393         fi
  1232   1394         ;;
  1233   1395       pw32*)
  1234   1396         # pw32 DLLs use 'pw' prefix rather than 'lib'
  1235         -      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
         1397  +      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1236   1398         ;;
  1237   1399       esac
  1238   1400       ;;
         1401  +
         1402  +  linux*)
         1403  +    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
         1404  +      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
         1405  +      supports_anon_versioning=no
         1406  +      case `$LD -v 2>/dev/null` in
         1407  +        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
         1408  +        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
         1409  +        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
         1410  +        *\ 2.11.*) ;; # other 2.11 versions
         1411  +        *) supports_anon_versioning=yes ;;
         1412  +      esac
         1413  +      if test $supports_anon_versioning = yes; then
         1414  +        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
         1415  +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
         1416  +$echo "local: *; };" >> $output_objdir/$libname.ver~
         1417  +        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
         1418  +      else
         1419  +        $archive_expsym_cmds="$archive_cmds"
         1420  +      fi
         1421  +    else
         1422  +      ld_shlibs=no
         1423  +    fi
         1424  +    ;;
  1239   1425   
  1240   1426     *)
  1241   1427       library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1242   1428       ;;
  1243   1429     esac
  1244   1430     dynamic_linker='Win32 ld.exe'
  1245   1431     # FIXME: first we should search . and the directory the executable is in
................................................................................
  1251   1437     version_type=darwin
  1252   1438     need_lib_prefix=no
  1253   1439     need_version=no
  1254   1440     library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1255   1441     soname_spec='${libname}${release}${major}$shared_ext'
  1256   1442     shlibpath_overrides_runpath=yes
  1257   1443     shlibpath_var=DYLD_LIBRARY_PATH
  1258         -  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
         1444  +  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  1259   1445     # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  1260   1446     if test "$GCC" = yes; then
  1261   1447       sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  1262   1448     else
  1263   1449       sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  1264   1450     fi
  1265   1451     sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
................................................................................
  1286   1472     soname_spec='${libname}${release}${shared_ext}$major'
  1287   1473     shlibpath_var=LD_LIBRARY_PATH
  1288   1474     shlibpath_overrides_runpath=no
  1289   1475     hardcode_into_libs=yes
  1290   1476     dynamic_linker='GNU ld.so'
  1291   1477     ;;
  1292   1478   
  1293         -freebsd*)
  1294         -  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1295         -  version_type=freebsd-$objformat
         1479  +freebsd* | dragonfly*)
         1480  +  # DragonFly does not have aout.  When/if they implement a new
         1481  +  # versioning mechanism, adjust this.
         1482  +  if test -x /usr/bin/objformat; then
         1483  +    objformat=`/usr/bin/objformat`
         1484  +  else
         1485  +    case $host_os in
         1486  +    freebsd[[123]]*) objformat=aout ;;
         1487  +    *) objformat=elf ;;
         1488  +    esac
         1489  +  fi
         1490  +  # Handle Gentoo/FreeBSD as it was Linux
         1491  +  case $host_vendor in
         1492  +    gentoo)
         1493  +      version_type=linux ;;
         1494  +    *)
         1495  +      version_type=freebsd-$objformat ;;
         1496  +  esac
         1497  +
  1296   1498     case $version_type in
  1297   1499       freebsd-elf*)
  1298   1500         library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1299   1501         need_version=no
  1300   1502         need_lib_prefix=no
  1301   1503         ;;
  1302   1504       freebsd-*)
  1303   1505         library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1304   1506         need_version=yes
  1305   1507         ;;
         1508  +    linux)
         1509  +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
         1510  +      soname_spec='${libname}${release}${shared_ext}$major'
         1511  +      need_lib_prefix=no
         1512  +      need_version=no
         1513  +      ;;
  1306   1514     esac
  1307   1515     shlibpath_var=LD_LIBRARY_PATH
  1308   1516     case $host_os in
  1309   1517     freebsd2*)
  1310   1518       shlibpath_overrides_runpath=yes
  1311   1519       ;;
  1312         -  freebsd3.[01]* | freebsdelf3.[01]*)
         1520  +  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  1313   1521       shlibpath_overrides_runpath=yes
  1314   1522       hardcode_into_libs=yes
  1315   1523       ;;
  1316         -  *) # from 3.2 on
         1524  +  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
         1525  +  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  1317   1526       shlibpath_overrides_runpath=no
  1318   1527       hardcode_into_libs=yes
  1319   1528       ;;
         1529  +  freebsd*) # from 4.6 on
         1530  +    shlibpath_overrides_runpath=yes
         1531  +    hardcode_into_libs=yes
         1532  +    ;;
  1320   1533     esac
  1321   1534     ;;
  1322   1535   
  1323   1536   gnu*)
  1324   1537     version_type=linux
  1325   1538     need_lib_prefix=no
  1326   1539     need_version=no
................................................................................
  1332   1545   
  1333   1546   hpux9* | hpux10* | hpux11*)
  1334   1547     # Give a soname corresponding to the major version so that dld.sl refuses to
  1335   1548     # link against other versions.
  1336   1549     version_type=sunos
  1337   1550     need_lib_prefix=no
  1338   1551     need_version=no
  1339         -  case "$host_cpu" in
         1552  +  case $host_cpu in
  1340   1553     ia64*)
  1341         -    shrext='.so'
         1554  +    shrext_cmds='.so'
  1342   1555       hardcode_into_libs=yes
  1343   1556       dynamic_linker="$host_os dld.so"
  1344   1557       shlibpath_var=LD_LIBRARY_PATH
  1345   1558       shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1346   1559       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1347   1560       soname_spec='${libname}${release}${shared_ext}$major'
  1348   1561       if test "X$HPUX_IA64_MODE" = X32; then
................................................................................
  1349   1562         sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1350   1563       else
  1351   1564         sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1352   1565       fi
  1353   1566       sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1354   1567       ;;
  1355   1568      hppa*64*)
  1356         -     shrext='.sl'
         1569  +     shrext_cmds='.sl'
  1357   1570        hardcode_into_libs=yes
  1358   1571        dynamic_linker="$host_os dld.sl"
  1359   1572        shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1360   1573        shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1361   1574        library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1362   1575        soname_spec='${libname}${release}${shared_ext}$major'
  1363   1576        sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1364   1577        sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1365   1578        ;;
  1366   1579      *)
  1367         -    shrext='.sl'
         1580  +    shrext_cmds='.sl'
  1368   1581       dynamic_linker="$host_os dld.sl"
  1369   1582       shlibpath_var=SHLIB_PATH
  1370   1583       shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1371   1584       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1372   1585       soname_spec='${libname}${release}${shared_ext}$major'
  1373   1586       ;;
  1374   1587     esac
  1375   1588     # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1376   1589     postinstall_cmds='chmod 555 $lib'
  1377   1590     ;;
         1591  +
         1592  +interix3*)
         1593  +  version_type=linux
         1594  +  need_lib_prefix=no
         1595  +  need_version=no
         1596  +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
         1597  +  soname_spec='${libname}${release}${shared_ext}$major'
         1598  +  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
         1599  +  shlibpath_var=LD_LIBRARY_PATH
         1600  +  shlibpath_overrides_runpath=no
         1601  +  hardcode_into_libs=yes
         1602  +  ;;
  1378   1603   
  1379   1604   irix5* | irix6* | nonstopux*)
  1380   1605     case $host_os in
  1381   1606       nonstopux*) version_type=nonstopux ;;
  1382   1607       *)
  1383   1608   	if test "$lt_cv_prog_gnu_ld" = yes; then
  1384   1609   		version_type=linux
................................................................................
  1431   1656     # This implies no fast_install, which is unacceptable.
  1432   1657     # Some rework will be needed to allow for fast_install
  1433   1658     # before this can be enabled.
  1434   1659     hardcode_into_libs=yes
  1435   1660   
  1436   1661     # Append ld.so.conf contents to the search path
  1437   1662     if test -f /etc/ld.so.conf; then
  1438         -    ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf`
  1439         -    sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
         1663  +    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
         1664  +    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  1440   1665     fi
  1441   1666   
  1442   1667     # We used to test for /lib/ld.so.1 and disable shared libraries on
  1443   1668     # powerpc, because MkLinux only supported shared libraries with the
  1444   1669     # GNU dynamic linker.  Since this was broken with cross compilers,
  1445   1670     # most powerpc-linux boxes support dynamic linking these days and
  1446   1671     # people can always --disable-shared, the test was removed, and we
................................................................................
  1493   1718     soname_spec='${libname}${release}${shared_ext}$major'
  1494   1719     shlibpath_var=LD_LIBRARY_PATH
  1495   1720     shlibpath_overrides_runpath=yes
  1496   1721     ;;
  1497   1722   
  1498   1723   openbsd*)
  1499   1724     version_type=sunos
         1725  +  sys_lib_dlsearch_path_spec="/usr/lib"
  1500   1726     need_lib_prefix=no
  1501         -  need_version=yes
         1727  +  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
         1728  +  case $host_os in
         1729  +    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
         1730  +    *)                         need_version=no  ;;
         1731  +  esac
  1502   1732     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1503   1733     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1504   1734     shlibpath_var=LD_LIBRARY_PATH
  1505   1735     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1506   1736       case $host_os in
  1507   1737         openbsd2.[[89]] | openbsd2.[[89]].*)
  1508   1738   	shlibpath_overrides_runpath=no
................................................................................
  1514   1744     else
  1515   1745       shlibpath_overrides_runpath=yes
  1516   1746     fi
  1517   1747     ;;
  1518   1748   
  1519   1749   os2*)
  1520   1750     libname_spec='$name'
  1521         -  shrext=".dll"
         1751  +  shrext_cmds=".dll"
  1522   1752     need_lib_prefix=no
  1523   1753     library_names_spec='$libname${shared_ext} $libname.a'
  1524   1754     dynamic_linker='OS/2 ld.exe'
  1525   1755     shlibpath_var=LIBPATH
  1526   1756     ;;
  1527   1757   
  1528   1758   osf3* | osf4* | osf5*)
................................................................................
  1532   1762     soname_spec='${libname}${release}${shared_ext}$major'
  1533   1763     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1534   1764     shlibpath_var=LD_LIBRARY_PATH
  1535   1765     sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1536   1766     sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1537   1767     ;;
  1538   1768   
  1539         -sco3.2v5*)
  1540         -  version_type=osf
  1541         -  soname_spec='${libname}${release}${shared_ext}$major'
  1542         -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1543         -  shlibpath_var=LD_LIBRARY_PATH
  1544         -  ;;
  1545         -
  1546   1769   solaris*)
  1547   1770     version_type=linux
  1548   1771     need_lib_prefix=no
  1549   1772     need_version=no
  1550   1773     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1551   1774     soname_spec='${libname}${release}${shared_ext}$major'
  1552   1775     shlibpath_var=LD_LIBRARY_PATH
................................................................................
  1564   1787     shlibpath_overrides_runpath=yes
  1565   1788     if test "$with_gnu_ld" = yes; then
  1566   1789       need_lib_prefix=no
  1567   1790     fi
  1568   1791     need_version=yes
  1569   1792     ;;
  1570   1793   
  1571         -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
         1794  +sysv4 | sysv4.3*)
  1572   1795     version_type=linux
  1573   1796     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1574   1797     soname_spec='${libname}${release}${shared_ext}$major'
  1575   1798     shlibpath_var=LD_LIBRARY_PATH
  1576   1799     case $host_vendor in
  1577   1800       sni)
  1578   1801         shlibpath_overrides_runpath=no
................................................................................
  1596   1819     if test -d /usr/nec ;then
  1597   1820       version_type=linux
  1598   1821       library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  1599   1822       soname_spec='$libname${shared_ext}.$major'
  1600   1823       shlibpath_var=LD_LIBRARY_PATH
  1601   1824     fi
  1602   1825     ;;
         1826  +
         1827  +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
         1828  +  version_type=freebsd-elf
         1829  +  need_lib_prefix=no
         1830  +  need_version=no
         1831  +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
         1832  +  soname_spec='${libname}${release}${shared_ext}$major'
         1833  +  shlibpath_var=LD_LIBRARY_PATH
         1834  +  hardcode_into_libs=yes
         1835  +  if test "$with_gnu_ld" = yes; then
         1836  +    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
         1837  +    shlibpath_overrides_runpath=no
         1838  +  else
         1839  +    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
         1840  +    shlibpath_overrides_runpath=yes
         1841  +    case $host_os in
         1842  +      sco3.2v5*)
         1843  +        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
         1844  +	;;
         1845  +    esac
         1846  +  fi
         1847  +  sys_lib_dlsearch_path_spec='/usr/lib'
         1848  +  ;;
  1603   1849   
  1604   1850   uts4*)
  1605   1851     version_type=linux
  1606   1852     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1607   1853     soname_spec='${libname}${release}${shared_ext}$major'
  1608   1854     shlibpath_var=LD_LIBRARY_PATH
  1609   1855     ;;
................................................................................
  1610   1856   
  1611   1857   *)
  1612   1858     dynamic_linker=no
  1613   1859     ;;
  1614   1860   esac
  1615   1861   AC_MSG_RESULT([$dynamic_linker])
  1616   1862   test "$dynamic_linker" = no && can_build_shared=no
         1863  +
         1864  +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
         1865  +if test "$GCC" = yes; then
         1866  +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
         1867  +fi
  1617   1868   ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1618   1869   
  1619   1870   
  1620   1871   # _LT_AC_TAGCONFIG
  1621   1872   # ----------------
  1622   1873   AC_DEFUN([_LT_AC_TAGCONFIG],
  1623   1874   [AC_ARG_WITH([tags],
................................................................................
  1634   1885       eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  1635   1886       if test -z "$LTCC"; then
  1636   1887         AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  1637   1888       else
  1638   1889         AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  1639   1890       fi
  1640   1891     fi
         1892  +  if test -z "$LTCFLAGS"; then
         1893  +    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
         1894  +  fi
  1641   1895   
  1642   1896     # Extract list of available tagged configurations in $ofile.
  1643   1897     # Note that this assumes the entire list is on one line.
  1644   1898     available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  1645   1899   
  1646   1900     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1647   1901     for tagname in $tagnames; do
................................................................................
  1660   1914   
  1661   1915       # Update the list of available tags.
  1662   1916       if test -n "$tagname"; then
  1663   1917         echo appending configuration tag \"$tagname\" to $ofile
  1664   1918   
  1665   1919         case $tagname in
  1666   1920         CXX)
  1667         -	if test -n "$CXX" && test "X$CXX" != "Xno"; then
         1921  +	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
         1922  +	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
         1923  +	    (test "X$CXX" != "Xg++"))) ; then
  1668   1924   	  AC_LIBTOOL_LANG_CXX_CONFIG
  1669   1925   	else
  1670   1926   	  tagname=""
  1671   1927   	fi
  1672   1928   	;;
  1673   1929   
  1674   1930         F77)
................................................................................
  1722   1978   AC_DEFUN([AC_LIBTOOL_DLOPEN],
  1723   1979    [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  1724   1980   ])# AC_LIBTOOL_DLOPEN
  1725   1981   
  1726   1982   
  1727   1983   # AC_LIBTOOL_WIN32_DLL
  1728   1984   # --------------------
  1729         -# declare package support for building win32 dll's
         1985  +# declare package support for building win32 DLLs
  1730   1986   AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  1731   1987   [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  1732   1988   ])# AC_LIBTOOL_WIN32_DLL
  1733   1989   
  1734   1990   
  1735   1991   # AC_ENABLE_SHARED([DEFAULT])
  1736   1992   # ---------------------------
................................................................................
  1760   2016       esac],
  1761   2017       [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  1762   2018   ])# AC_ENABLE_SHARED
  1763   2019   
  1764   2020   
  1765   2021   # AC_DISABLE_SHARED
  1766   2022   # -----------------
  1767         -#- set the default shared flag to --disable-shared
         2023  +# set the default shared flag to --disable-shared
  1768   2024   AC_DEFUN([AC_DISABLE_SHARED],
  1769   2025   [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1770   2026   AC_ENABLE_SHARED(no)
  1771   2027   ])# AC_DISABLE_SHARED
  1772   2028   
  1773   2029   
  1774   2030   # AC_ENABLE_STATIC([DEFAULT])
................................................................................
  1896   2152       IFS="$lt_save_ifs"
  1897   2153       test -z "$ac_dir" && ac_dir=.
  1898   2154       if test -f $ac_dir/$1; then
  1899   2155         lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  1900   2156         if test -n "$file_magic_test_file"; then
  1901   2157   	case $deplibs_check_method in
  1902   2158   	"file_magic "*)
  1903         -	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
         2159  +	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  1904   2160   	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1905   2161   	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1906   2162   	    $EGREP "$file_magic_regex" > /dev/null; then
  1907   2163   	    :
  1908   2164   	  else
  1909   2165   	    cat <<EOF 1>&2
  1910   2166   
................................................................................
  2006   2262     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2007   2263     for ac_dir in $PATH; do
  2008   2264       IFS="$lt_save_ifs"
  2009   2265       test -z "$ac_dir" && ac_dir=.
  2010   2266       if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2011   2267         lt_cv_path_LD="$ac_dir/$ac_prog"
  2012   2268         # Check to see if the program is GNU ld.  I'd rather use --version,
  2013         -      # but apparently some GNU ld's only accept -v.
         2269  +      # but apparently some variants of GNU ld only accept -v.
  2014   2270         # Break only if it was the GNU/non-GNU ld that we prefer.
  2015   2271         case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2016   2272         *GNU* | *'with BFD'*)
  2017   2273   	test "$with_gnu_ld" != no && break
  2018   2274   	;;
  2019   2275         *)
  2020   2276   	test "$with_gnu_ld" != yes && break
................................................................................
  2038   2294   
  2039   2295   
  2040   2296   # AC_PROG_LD_GNU
  2041   2297   # --------------
  2042   2298   AC_DEFUN([AC_PROG_LD_GNU],
  2043   2299   [AC_REQUIRE([AC_PROG_EGREP])dnl
  2044   2300   AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2045         -[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
         2301  +[# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2046   2302   case `$LD -v 2>&1 </dev/null` in
  2047   2303   *GNU* | *'with BFD'*)
  2048   2304     lt_cv_prog_gnu_ld=yes
  2049   2305     ;;
  2050   2306   *)
  2051   2307     lt_cv_prog_gnu_ld=no
  2052   2308     ;;
................................................................................
  2065   2321     [lt_cv_ld_reload_flag='-r'])
  2066   2322   reload_flag=$lt_cv_ld_reload_flag
  2067   2323   case $reload_flag in
  2068   2324   "" | " "*) ;;
  2069   2325   *) reload_flag=" $reload_flag" ;;
  2070   2326   esac
  2071   2327   reload_cmds='$LD$reload_flag -o $output$reload_objs'
         2328  +case $host_os in
         2329  +  darwin*)
         2330  +    if test "$GCC" = yes; then
         2331  +      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
         2332  +    else
         2333  +      reload_cmds='$LD$reload_flag -o $output$reload_objs'
         2334  +    fi
         2335  +    ;;
         2336  +esac
  2072   2337   ])# AC_PROG_LD_RELOAD_FLAG
  2073   2338   
  2074   2339   
  2075   2340   # AC_DEPLIBS_CHECK_METHOD
  2076   2341   # -----------------------
  2077   2342   # how to check for library dependencies
  2078   2343   #  -- PORTME fill in with the dynamic library characteristics
................................................................................
  2098   2363     lt_cv_deplibs_check_method=pass_all
  2099   2364     ;;
  2100   2365   
  2101   2366   beos*)
  2102   2367     lt_cv_deplibs_check_method=pass_all
  2103   2368     ;;
  2104   2369   
  2105         -bsdi4*)
         2370  +bsdi[[45]]*)
  2106   2371     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2107   2372     lt_cv_file_magic_cmd='/usr/bin/file -L'
  2108   2373     lt_cv_file_magic_test_file=/shlib/libc.so
  2109   2374     ;;
  2110   2375   
  2111   2376   cygwin*)
  2112         -  # win32_libid is a shell function defined in ltmain.sh
         2377  +  # func_win32_libid is a shell function defined in ltmain.sh
  2113   2378     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2114         -  lt_cv_file_magic_cmd='win32_libid'
         2379  +  lt_cv_file_magic_cmd='func_win32_libid'
  2115   2380     ;;
  2116   2381   
  2117   2382   mingw* | pw32*)
  2118   2383     # Base MSYS/MinGW do not provide the 'file' command needed by
  2119         -  # win32_libid shell function, so use a weaker test based on 'objdump'.
         2384  +  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
  2120   2385     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2121   2386     lt_cv_file_magic_cmd='$OBJDUMP -f'
  2122   2387     ;;
  2123   2388   
  2124   2389   darwin* | rhapsody*)
  2125   2390     lt_cv_deplibs_check_method=pass_all
  2126   2391     ;;
  2127   2392   
  2128         -freebsd* | kfreebsd*-gnu)
         2393  +freebsd* | kfreebsd*-gnu | dragonfly*)
  2129   2394     if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2130   2395       case $host_cpu in
  2131   2396       i*86 )
  2132   2397         # Not sure whether the presence of OpenBSD here was a mistake.
  2133   2398         # Let's accept both of them until this is cleared up.
  2134         -      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
         2399  +      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2135   2400         lt_cv_file_magic_cmd=/usr/bin/file
  2136   2401         lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2137   2402         ;;
  2138   2403       esac
  2139   2404     else
  2140   2405       lt_cv_deplibs_check_method=pass_all
  2141   2406     fi
................................................................................
  2143   2408   
  2144   2409   gnu*)
  2145   2410     lt_cv_deplibs_check_method=pass_all
  2146   2411     ;;
  2147   2412   
  2148   2413   hpux10.20* | hpux11*)
  2149   2414     lt_cv_file_magic_cmd=/usr/bin/file
  2150         -  case "$host_cpu" in
         2415  +  case $host_cpu in
  2151   2416     ia64*)
  2152   2417       lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2153   2418       lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2154   2419       ;;
  2155   2420     hppa*64*)
  2156   2421       [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
  2157   2422       lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
................................................................................
  2158   2423       ;;
  2159   2424     *)
  2160   2425       lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2161   2426       lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2162   2427       ;;
  2163   2428     esac
  2164   2429     ;;
         2430  +
         2431  +interix3*)
         2432  +  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
         2433  +  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
         2434  +  ;;
  2165   2435   
  2166   2436   irix5* | irix6* | nonstopux*)
  2167   2437     case $LD in
  2168   2438     *-32|*"-32 ") libmagic=32-bit;;
  2169   2439     *-n32|*"-n32 ") libmagic=N32;;
  2170   2440     *-64|*"-64 ") libmagic=64-bit;;
  2171   2441     *) libmagic=never-match;;
................................................................................
  2174   2444     ;;
  2175   2445   
  2176   2446   # This must be Linux ELF.
  2177   2447   linux*)
  2178   2448     lt_cv_deplibs_check_method=pass_all
  2179   2449     ;;
  2180   2450   
  2181         -netbsd* | knetbsd*-gnu)
         2451  +netbsd*)
  2182   2452     if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2183   2453       lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2184   2454     else
  2185   2455       lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2186   2456     fi
  2187   2457     ;;
  2188   2458   
................................................................................
  2193   2463     ;;
  2194   2464   
  2195   2465   nto-qnx*)
  2196   2466     lt_cv_deplibs_check_method=unknown
  2197   2467     ;;
  2198   2468   
  2199   2469   openbsd*)
  2200         -  lt_cv_file_magic_cmd=/usr/bin/file
  2201         -  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2202   2470     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2203         -    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
         2471  +    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2204   2472     else
  2205         -    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
         2473  +    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2206   2474     fi
  2207   2475     ;;
  2208   2476   
  2209   2477   osf3* | osf4* | osf5*)
  2210   2478     lt_cv_deplibs_check_method=pass_all
  2211   2479     ;;
  2212   2480   
  2213         -sco3.2v5*)
  2214         -  lt_cv_deplibs_check_method=pass_all
  2215         -  ;;
  2216         -
  2217   2481   solaris*)
  2218   2482     lt_cv_deplibs_check_method=pass_all
  2219   2483     ;;
  2220   2484   
  2221         -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
         2485  +sysv4 | sysv4.3*)
  2222   2486     case $host_vendor in
  2223   2487     motorola)
  2224   2488       lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
  2225   2489       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2226   2490       ;;
  2227   2491     ncr)
  2228   2492       lt_cv_deplibs_check_method=pass_all
................................................................................
  2235   2499       lt_cv_file_magic_cmd='/bin/file'
  2236   2500       lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2237   2501       lt_cv_file_magic_test_file=/lib/libc.so
  2238   2502       ;;
  2239   2503     siemens)
  2240   2504       lt_cv_deplibs_check_method=pass_all
  2241   2505       ;;
         2506  +  pc)
         2507  +    lt_cv_deplibs_check_method=pass_all
         2508  +    ;;
  2242   2509     esac
  2243   2510     ;;
  2244   2511   
  2245         -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
         2512  +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2246   2513     lt_cv_deplibs_check_method=pass_all
  2247   2514     ;;
  2248   2515   esac
  2249   2516   ])
  2250   2517   file_magic_cmd=$lt_cv_file_magic_cmd
  2251   2518   deplibs_check_method=$lt_cv_deplibs_check_method
  2252   2519   test -z "$deplibs_check_method" && deplibs_check_method=unknown
................................................................................
  2258   2525   # find the pathname to a BSD-compatible name lister
  2259   2526   AC_DEFUN([AC_PROG_NM],
  2260   2527   [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  2261   2528   [if test -n "$NM"; then
  2262   2529     # Let the user override the test.
  2263   2530     lt_cv_path_NM="$NM"
  2264   2531   else
  2265         -  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2266         -  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  2267         -    IFS="$lt_save_ifs"
  2268         -    test -z "$ac_dir" && ac_dir=.
  2269         -    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
  2270         -    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2271         -      # Check to see if the nm accepts a BSD-compat flag.
  2272         -      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2273         -      #   nm: unknown option "B" ignored
  2274         -      # Tru64's nm complains that /dev/null is an invalid object file
  2275         -      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2276         -      */dev/null* | *'Invalid file or object type'*)
  2277         -	lt_cv_path_NM="$tmp_nm -B"
  2278         -	break
  2279         -        ;;
  2280         -      *)
  2281         -	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2282         -	*/dev/null*)
  2283         -	  lt_cv_path_NM="$tmp_nm -p"
         2532  +  lt_nm_to_check="${ac_tool_prefix}nm"
         2533  +  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
         2534  +    lt_nm_to_check="$lt_nm_to_check nm"
         2535  +  fi
         2536  +  for lt_tmp_nm in $lt_nm_to_check; do
         2537  +    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
         2538  +    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
         2539  +      IFS="$lt_save_ifs"
         2540  +      test -z "$ac_dir" && ac_dir=.
         2541  +      tmp_nm="$ac_dir/$lt_tmp_nm"
         2542  +      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
         2543  +	# Check to see if the nm accepts a BSD-compat flag.
         2544  +	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
         2545  +	#   nm: unknown option "B" ignored
         2546  +	# Tru64's nm complains that /dev/null is an invalid object file
         2547  +	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
         2548  +	*/dev/null* | *'Invalid file or object type'*)
         2549  +	  lt_cv_path_NM="$tmp_nm -B"
  2284   2550   	  break
  2285   2551   	  ;;
  2286   2552   	*)
  2287         -	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2288         -	  continue # so that we can try to find one that supports BSD flags
         2553  +	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
         2554  +	  */dev/null*)
         2555  +	    lt_cv_path_NM="$tmp_nm -p"
         2556  +	    break
         2557  +	    ;;
         2558  +	  *)
         2559  +	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
         2560  +	    continue # so that we can try to find one that supports BSD flags
         2561  +	    ;;
         2562  +	  esac
  2289   2563   	  ;;
  2290   2564   	esac
  2291         -      esac
  2292         -    fi
         2565  +      fi
         2566  +    done
         2567  +    IFS="$lt_save_ifs"
  2293   2568     done
  2294         -  IFS="$lt_save_ifs"
  2295   2569     test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  2296   2570   fi])
  2297   2571   NM="$lt_cv_path_NM"
  2298   2572   ])# AC_PROG_NM
  2299   2573   
  2300   2574   
  2301   2575   # AC_CHECK_LIBM
................................................................................
  2319   2593   ])# AC_CHECK_LIBM
  2320   2594   
  2321   2595   
  2322   2596   # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  2323   2597   # -----------------------------------
  2324   2598   # sets LIBLTDL to the link flags for the libltdl convenience library and
  2325   2599   # LTDLINCL to the include flags for the libltdl header and adds
  2326         -# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
  2327         -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
  2328         -# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
  2329         -# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
  2330         -# '${top_srcdir}/' (note the single quotes!).  If your package is not
  2331         -# flat and you're not using automake, define top_builddir and
  2332         -# top_srcdir appropriately in the Makefiles.
         2600  +# --enable-ltdl-convenience to the configure arguments.  Note that
         2601  +# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
         2602  +# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
         2603  +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
         2604  +# (note the single quotes!).  If your package is not flat and you're not
         2605  +# using automake, define top_builddir and top_srcdir appropriately in
         2606  +# the Makefiles.
  2333   2607   AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  2334   2608   [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2335   2609     case $enable_ltdl_convenience in
  2336   2610     no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  2337   2611     "") enable_ltdl_convenience=yes
  2338   2612         ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  2339   2613     esac
................................................................................
  2344   2618   ])# AC_LIBLTDL_CONVENIENCE
  2345   2619   
  2346   2620   
  2347   2621   # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  2348   2622   # -----------------------------------
  2349   2623   # sets LIBLTDL to the link flags for the libltdl installable library and
  2350   2624   # LTDLINCL to the include flags for the libltdl header and adds
  2351         -# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
  2352         -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
  2353         -# DIRECTORY is not provided and an installed libltdl is not found, it is
  2354         -# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
  2355         -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
  2356         -# quotes!).  If your package is not flat and you're not using automake,
  2357         -# define top_builddir and top_srcdir appropriately in the Makefiles.
         2625  +# --enable-ltdl-install to the configure arguments.  Note that
         2626  +# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
         2627  +# and an installed libltdl is not found, it is assumed to be `libltdl'.
         2628  +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
         2629  +# '${top_srcdir}/' (note the single quotes!).  If your package is not
         2630  +# flat and you're not using automake, define top_builddir and top_srcdir
         2631  +# appropriately in the Makefiles.
  2358   2632   # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  2359   2633   AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  2360   2634   [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2361   2635     AC_CHECK_LIB(ltdl, lt_dlinit,
  2362   2636     [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  2363   2637     [if test x"$enable_ltdl_install" = xno; then
  2364   2638        AC_MSG_WARN([libltdl not installed, but installation disabled])
................................................................................
  2388   2662   ])# AC_LIBTOOL_CXX
  2389   2663   
  2390   2664   
  2391   2665   # _LT_AC_LANG_CXX
  2392   2666   # ---------------
  2393   2667   AC_DEFUN([_LT_AC_LANG_CXX],
  2394   2668   [AC_REQUIRE([AC_PROG_CXX])
  2395         -AC_REQUIRE([AC_PROG_CXXCPP])
         2669  +AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2396   2670   _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  2397   2671   ])# _LT_AC_LANG_CXX
  2398   2672   
         2673  +# _LT_AC_PROG_CXXCPP
         2674  +# ------------------
         2675  +AC_DEFUN([_LT_AC_PROG_CXXCPP],
         2676  +[
         2677  +AC_REQUIRE([AC_PROG_CXX])
         2678  +if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
         2679  +    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
         2680  +    (test "X$CXX" != "Xg++"))) ; then
         2681  +  AC_PROG_CXXCPP
         2682  +fi
         2683  +])# _LT_AC_PROG_CXXCPP
  2399   2684   
  2400   2685   # AC_LIBTOOL_F77
  2401   2686   # --------------
  2402   2687   # enable support for Fortran 77 libraries
  2403   2688   AC_DEFUN([AC_LIBTOOL_F77],
  2404   2689   [AC_REQUIRE([_LT_AC_LANG_F77])
  2405   2690   ])# AC_LIBTOOL_F77
................................................................................
  2431   2716   	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  2432   2717   	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  2433   2718   _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  2434   2719   ])# _LT_AC_LANG_GCJ
  2435   2720   
  2436   2721   
  2437   2722   # AC_LIBTOOL_RC
  2438         -# --------------
         2723  +# -------------
  2439   2724   # enable support for Windows resource files
  2440   2725   AC_DEFUN([AC_LIBTOOL_RC],
  2441   2726   [AC_REQUIRE([LT_AC_PROG_RC])
  2442   2727   _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  2443   2728   ])# AC_LIBTOOL_RC
  2444   2729   
  2445   2730   
................................................................................
  2464   2749   lt_simple_compile_test_code="int some_variable = 0;\n"
  2465   2750   
  2466   2751   # Code to be used in simple link tests
  2467   2752   lt_simple_link_test_code='int main(){return(0);}\n'
  2468   2753   
  2469   2754   _LT_AC_SYS_COMPILER
  2470   2755   
  2471         -#
  2472         -# Check for any special shared library compilation flags.
  2473         -#
  2474         -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
  2475         -if test "$GCC" = no; then
  2476         -  case $host_os in
  2477         -  sco3.2v5*)
  2478         -    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
  2479         -    ;;
  2480         -  esac
  2481         -fi
  2482         -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
  2483         -  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
  2484         -  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
  2485         -  else
  2486         -    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
  2487         -    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
  2488         -  fi
  2489         -fi
  2490         -
  2491         -
  2492         -#
  2493         -# Check to make sure the static flag actually works.
  2494         -#
  2495         -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
  2496         -  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  2497         -  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
  2498         -  [],
  2499         -  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  2500         -
         2756  +# save warnings/boilerplate of simple test code
         2757  +_LT_COMPILER_BOILERPLATE
         2758  +_LT_LINKER_BOILERPLATE
  2501   2759   
  2502   2760   AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  2503   2761   AC_LIBTOOL_PROG_COMPILER_PIC($1)
  2504   2762   AC_LIBTOOL_PROG_CC_C_O($1)
  2505   2763   AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  2506   2764   AC_LIBTOOL_PROG_LD_SHLIBS($1)
  2507   2765   AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  2508   2766   AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  2509   2767   AC_LIBTOOL_SYS_LIB_STRIP
  2510         -AC_LIBTOOL_DLOPEN_SELF($1)
         2768  +AC_LIBTOOL_DLOPEN_SELF
  2511   2769   
  2512         -# Report which librarie types wil actually be built
         2770  +# Report which library types will actually be built
  2513   2771   AC_MSG_CHECKING([if libtool supports shared libraries])
  2514   2772   AC_MSG_RESULT([$can_build_shared])
  2515   2773   
  2516   2774   AC_MSG_CHECKING([whether to build shared libraries])
  2517   2775   test "$can_build_shared" = "no" && enable_shared=no
  2518   2776   
  2519   2777   # On AIX, shared libraries and static libraries use the same namespace, and
  2520   2778   # are all built from PIC.
  2521         -case "$host_os" in
         2779  +case $host_os in
  2522   2780   aix3*)
  2523   2781     test "$enable_shared" = yes && enable_static=no
  2524   2782     if test -n "$RANLIB"; then
  2525   2783       archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2526   2784       postinstall_cmds='$RANLIB $lib'
  2527   2785     fi
  2528   2786     ;;
  2529   2787   
  2530         -aix4*)
         2788  +aix4* | aix5*)
  2531   2789     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2532   2790       test "$enable_shared" = yes && enable_static=no
  2533   2791     fi
  2534         -  ;;
  2535         -  darwin* | rhapsody*)
  2536         -  if test "$GCC" = yes; then
  2537         -    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2538         -    case "$host_os" in
  2539         -    rhapsody* | darwin1.[[012]])
  2540         -      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  2541         -      ;;
  2542         -    *) # Darwin 1.3 on
  2543         -      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2544         -      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2545         -      else
  2546         -        case ${MACOSX_DEPLOYMENT_TARGET} in
  2547         -          10.[[012]])
  2548         -            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2549         -            ;;
  2550         -          10.*)
  2551         -            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  2552         -            ;;
  2553         -        esac
  2554         -      fi
  2555         -      ;;
  2556         -    esac
  2557         -    output_verbose_link_cmd='echo'
  2558         -    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
  2559         -    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2560         -    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2561         -    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2562         -    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2563         -    _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2564         -    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2565         -    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2566         -    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  2567         -    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2568         -  else
  2569         -    _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2570         -  fi
  2571   2792       ;;
  2572   2793   esac
  2573   2794   AC_MSG_RESULT([$enable_shared])
  2574   2795   
  2575   2796   AC_MSG_CHECKING([whether to build static libraries])
  2576   2797   # Make sure either enable_shared or enable_static is yes.
  2577   2798   test "$enable_shared" = yes || enable_static=yes
................................................................................
  2589   2810   # Ensure that the configuration vars for the C compiler are
  2590   2811   # suitably defined.  Those variables are subsequently used by
  2591   2812   # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2592   2813   AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  2593   2814   AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  2594   2815   [AC_LANG_PUSH(C++)
  2595   2816   AC_REQUIRE([AC_PROG_CXX])
  2596         -AC_REQUIRE([AC_PROG_CXXCPP])
         2817  +AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2597   2818   
  2598   2819   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2599   2820   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  2600   2821   _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2601   2822   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  2602   2823   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  2603   2824   _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2604   2825   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  2605   2826   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  2606   2827   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2607   2828   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
         2829  +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2608   2830   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  2609   2831   _LT_AC_TAGVAR(module_cmds, $1)=
  2610   2832   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  2611   2833   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  2612   2834   _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  2613   2835   _LT_AC_TAGVAR(no_undefined_flag, $1)=
  2614   2836   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
................................................................................
  2618   2840   _LT_AC_TAGVAR(predep_objects, $1)=
  2619   2841   _LT_AC_TAGVAR(postdep_objects, $1)=
  2620   2842   _LT_AC_TAGVAR(predeps, $1)=
  2621   2843   _LT_AC_TAGVAR(postdeps, $1)=
  2622   2844   _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  2623   2845   
  2624   2846   # Source file extension for C++ test sources.
  2625         -ac_ext=cc
         2847  +ac_ext=cpp
  2626   2848   
  2627   2849   # Object file extension for compiled C++ test sources.
  2628   2850   objext=o
  2629   2851   _LT_AC_TAGVAR(objext, $1)=$objext
  2630   2852   
  2631   2853   # Code to be used in simple compile tests
  2632   2854   lt_simple_compile_test_code="int some_variable = 0;\n"
  2633   2855   
  2634   2856   # Code to be used in simple link tests
  2635         -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
         2857  +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
  2636   2858   
  2637   2859   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  2638   2860   _LT_AC_SYS_COMPILER
         2861  +
         2862  +# save warnings/boilerplate of simple test code
         2863  +_LT_COMPILER_BOILERPLATE
         2864  +_LT_LINKER_BOILERPLATE
  2639   2865   
  2640   2866   # Allow CC to be a program name with arguments.
  2641   2867   lt_save_CC=$CC
  2642   2868   lt_save_LD=$LD
  2643   2869   lt_save_GCC=$GCC
  2644   2870   GCC=$GXX
  2645   2871   lt_save_with_gnu_ld=$with_gnu_ld
  2646   2872   lt_save_path_LD=$lt_cv_path_LD
  2647   2873   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  2648   2874     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  2649   2875   else
  2650         -  unset lt_cv_prog_gnu_ld
         2876  +  $as_unset lt_cv_prog_gnu_ld
  2651   2877   fi
  2652   2878   if test -n "${lt_cv_path_LDCXX+set}"; then
  2653   2879     lt_cv_path_LD=$lt_cv_path_LDCXX
  2654   2880   else
  2655         -  unset lt_cv_path_LD
         2881  +  $as_unset lt_cv_path_LD
  2656   2882   fi
  2657   2883   test -z "${LDCXX+set}" || LD=$LDCXX
  2658   2884   CC=${CXX-"c++"}
  2659   2885   compiler=$CC
  2660   2886   _LT_AC_TAGVAR(compiler, $1)=$CC
  2661         -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
         2887  +_LT_CC_BASENAME([$compiler])
  2662   2888   
  2663   2889   # We don't want -fno-exception wen compiling C++ code, so set the
  2664   2890   # no_builtin_flag separately
  2665   2891   if test "$GXX" = yes; then
  2666   2892     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2667   2893   else
  2668   2894     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
................................................................................
  2743   2969   	  case $ld_flag in
  2744   2970   	  *-brtl*)
  2745   2971   	    aix_use_runtimelinking=yes
  2746   2972   	    break
  2747   2973   	    ;;
  2748   2974   	  esac
  2749   2975   	done
         2976  +	;;
  2750   2977         esac
  2751   2978   
  2752   2979         exp_sym_flag='-bexport'
  2753   2980         no_entry_flag='-bnoentry'
  2754   2981       fi
  2755   2982   
  2756   2983       # When large executables or shared objects are built, AIX ld can
................................................................................
  2761   2988   
  2762   2989       _LT_AC_TAGVAR(archive_cmds, $1)=''
  2763   2990       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2764   2991       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  2765   2992       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2766   2993   
  2767   2994       if test "$GXX" = yes; then
  2768         -      case $host_os in aix4.[012]|aix4.[012].*)
         2995  +      case $host_os in aix4.[[012]]|aix4.[[012]].*)
  2769   2996         # We only want to do this on AIX 4.2 and lower, the check
  2770   2997         # below for broken collect2 doesn't work under 4.3+
  2771   2998   	collect2name=`${CC} -print-prog-name=collect2`
  2772   2999   	if test -f "$collect2name" && \
  2773   3000   	   strings "$collect2name" | grep resolve_lib_name >/dev/null
  2774   3001   	then
  2775   3002   	  # We have reworked collect2
................................................................................
  2780   3007   	  # It fails to find uninstalled libraries when the uninstalled
  2781   3008   	  # path is not listed in the libpath.  Setting hardcode_minus_L
  2782   3009   	  # to unsupported forces relinking
  2783   3010   	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2784   3011   	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2785   3012   	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2786   3013   	fi
         3014  +	;;
  2787   3015         esac
  2788   3016         shared_flag='-shared'
         3017  +      if test "$aix_use_runtimelinking" = yes; then
         3018  +	shared_flag="$shared_flag "'${wl}-G'
         3019  +      fi
  2789   3020       else
  2790   3021         # not using gcc
  2791   3022         if test "$host_cpu" = ia64; then
  2792   3023   	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  2793   3024   	# chokes on -Wl,-G. The following line is correct:
  2794   3025   	shared_flag='-G'
  2795   3026         else
................................................................................
  2808   3039         # Warning - without using the other runtime loading flags (-brtl),
  2809   3040         # -berok will link without error, but may produce a broken library.
  2810   3041         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  2811   3042         # Determine the default libpath from the value encoded in an empty executable.
  2812   3043         _LT_AC_SYS_LIBPATH_AIX
  2813   3044         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2814   3045   
  2815         -      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
         3046  +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  2816   3047        else
  2817   3048         if test "$host_cpu" = ia64; then
  2818   3049   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  2819   3050   	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  2820         -	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
         3051  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  2821   3052         else
  2822   3053   	# Determine the default libpath from the value encoded in an empty executable.
  2823   3054   	_LT_AC_SYS_LIBPATH_AIX
  2824   3055   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2825   3056   	# Warning - without using the other run time loading flags,
  2826   3057   	# -berok will link without error, but may produce a broken library.
  2827   3058   	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  2828   3059   	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  2829         -	# -bexpall does not export symbols beginning with underscore (_)
  2830         -	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2831   3060   	# Exported symbols can be pulled into shared objects from archives
  2832         -	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
         3061  +	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  2833   3062   	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2834         -	# This is similar to how AIX traditionally builds it's shared libraries.
  2835         -	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
         3063  +	# This is similar to how AIX traditionally builds its shared libraries.
         3064  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  2836   3065         fi
  2837   3066       fi
  2838   3067       ;;
         3068  +
         3069  +  beos*)
         3070  +    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
         3071  +      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
         3072  +      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
         3073  +      # support --undefined.  This deserves some investigation.  FIXME
         3074  +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
         3075  +    else
         3076  +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
         3077  +    fi
         3078  +    ;;
................................................................................
         3079  +
  2839   3080     chorus*)
  2840   3081       case $cc_basename in
  2841   3082         *)
  2842   3083   	# FIXME: insert proper C++ library support
  2843   3084   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  2844   3085   	;;
  2845   3086       esac
................................................................................
  2850   3091       # as there is no search path for DLLs.
  2851   3092       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2852   3093       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2853   3094       _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2854   3095       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  2855   3096   
  2856   3097       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  2857         -      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
         3098  +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  2858   3099         # If the export-symbols file already is a .def file (1st line
  2859   3100         # is EXPORTS), use it as is; otherwise, prepend...
  2860   3101         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  2861   3102   	cp $export_symbols $output_objdir/$soname.def;
  2862   3103         else
  2863   3104   	echo EXPORTS > $output_objdir/$soname.def;
  2864   3105   	cat $export_symbols >> $output_objdir/$soname.def;
  2865   3106         fi~
  2866         -      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
         3107  +      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  2867   3108       else
  2868   3109         _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2869   3110       fi
  2870   3111     ;;
  2871         -
  2872         -  darwin* | rhapsody*)
  2873         -  if test "$GXX" = yes; then
  2874         -    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2875         -    case "$host_os" in
  2876         -    rhapsody* | darwin1.[[012]])
  2877         -      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  2878         -      ;;
  2879         -    *) # Darwin 1.3 on
  2880         -      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2881         -      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2882         -      else
  2883         -        case ${MACOSX_DEPLOYMENT_TARGET} in
  2884         -          10.[[012]])
  2885         -            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2886         -            ;;
  2887         -          10.*)
  2888         -            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  2889         -            ;;
         3112  +      darwin* | rhapsody*)
         3113  +        case $host_os in
         3114  +        rhapsody* | darwin1.[[012]])
         3115  +         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
         3116  +         ;;
         3117  +       *) # Darwin 1.3 on
         3118  +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
         3119  +           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
         3120  +         else
         3121  +           case ${MACOSX_DEPLOYMENT_TARGET} in
         3122  +             10.[[012]])
         3123  +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
         3124  +               ;;
         3125  +             10.*)
         3126  +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
         3127  +               ;;
         3128  +           esac
         3129  +         fi
         3130  +         ;;
  2890   3131           esac
  2891         -      fi
  2892         -      ;;
  2893         -    esac
  2894         -    lt_int_apple_cc_single_mod=no
  2895         -    output_verbose_link_cmd='echo'
  2896         -    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  2897         -      lt_int_apple_cc_single_mod=yes
  2898         -    fi
  2899         -    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2900         -      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  2901         -    else
  2902         -      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  2903         -    fi
  2904         -    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2905         -
  2906         -    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2907         -    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2908         -      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2909         -    else
  2910         -      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2911         -    fi
  2912         -    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2913         -    _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2914         -    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2915         -    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2916         -    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  2917         -    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2918         -  else
  2919         -    _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2920         -  fi
  2921         -    ;;
         3132  +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
         3133  +      _LT_AC_TAGVAR(hardcode_direct, $1)=no
         3134  +      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
         3135  +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
         3136  +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
         3137  +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
         3138  +
         3139  +    if test "$GXX" = yes ; then
         3140  +      lt_int_apple_cc_single_mod=no
         3141  +      output_verbose_link_cmd='echo'
         3142  +      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
         3143  +       lt_int_apple_cc_single_mod=yes
         3144  +      fi
         3145  +      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
         3146  +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
         3147  +      else
         3148  +          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
         3149  +        fi
         3150  +        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         3151  +        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
         3152  +          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
         3153  +            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         3154  +          else
         3155  +            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         3156  +          fi
         3157  +            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         3158  +      else
         3159  +      case $cc_basename in
         3160  +        xlc*)
         3161  +         output_verbose_link_cmd='echo'
         3162  +          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
         3163  +          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         3164  +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
         3165  +          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         3166  +          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         3167  +          ;;
         3168  +       *)
         3169  +         _LT_AC_TAGVAR(ld_shlibs, $1)=no
         3170  +          ;;
         3171  +      esac
         3172  +      fi
         3173  +        ;;
  2922   3174   
  2923   3175     dgux*)
  2924   3176       case $cc_basename in
  2925         -      ec++)
         3177  +      ec++*)
  2926   3178   	# FIXME: insert proper C++ library support
  2927   3179   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  2928   3180   	;;
  2929         -      ghcx)
         3181  +      ghcx*)
  2930   3182   	# Green Hills C++ Compiler
  2931   3183   	# FIXME: insert proper C++ library support
  2932   3184   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  2933   3185   	;;
  2934   3186         *)
  2935   3187   	# FIXME: insert proper C++ library support
  2936   3188   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  2937   3189   	;;
  2938   3190       esac
  2939   3191       ;;
  2940         -  freebsd[12]*)
         3192  +  freebsd[[12]]*)
  2941   3193       # C++ shared libraries reported to be fairly broken before switch to ELF
  2942   3194       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2943   3195       ;;
  2944   3196     freebsd-elf*)
  2945   3197       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2946   3198       ;;
  2947         -  freebsd* | kfreebsd*-gnu)
         3199  +  freebsd* | kfreebsd*-gnu | dragonfly*)
  2948   3200       # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  2949   3201       # conventions
  2950   3202       _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2951   3203       ;;
  2952   3204     gnu*)
  2953   3205       ;;
  2954   3206     hpux9*)
................................................................................
  2957   3209       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2958   3210       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2959   3211       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2960   3212   				# but as the default
  2961   3213   				# location of the library.
  2962   3214   
  2963   3215       case $cc_basename in
  2964         -    CC)
         3216  +    CC*)
  2965   3217         # FIXME: insert proper C++ library support
  2966   3218         _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2967   3219         ;;
  2968         -    aCC)
         3220  +    aCC*)
  2969   3221         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2970   3222         # Commands to make compiler produce verbose output that lists
  2971   3223         # what "hidden" libraries, object files and flags are used when
  2972   3224         # linking a shared library.
  2973   3225         #
  2974   3226         # There doesn't appear to be a way to prevent this compiler from
  2975   3227         # explicitly linking system object files so we need to strip them
  2976   3228         # from the output so that they don't get included in the library
  2977   3229         # dependencies.
  2978         -      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
         3230  +      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2979   3231         ;;
  2980   3232       *)
  2981   3233         if test "$GXX" = yes; then
  2982   3234           _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2983   3235         else
  2984   3236           # FIXME: insert proper C++ library support
  2985   3237           _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2986   3238         fi
  2987   3239         ;;
  2988   3240       esac
  2989   3241       ;;
  2990   3242     hpux10*|hpux11*)
  2991   3243       if test $with_gnu_ld = no; then
  2992         -      case "$host_cpu" in
  2993         -      hppa*64*)
  2994         -	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         3244  +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         3245  +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
         3246  +
         3247  +      case $host_cpu in
         3248  +      hppa*64*|ia64*)
  2995   3249   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  2996         -	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2997         -        ;;
  2998         -      ia64*)
  2999         -	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3000   3250           ;;
  3001   3251         *)
  3002         -	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  3003         -	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3004   3252   	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3005   3253           ;;
  3006   3254         esac
  3007   3255       fi
  3008         -    case "$host_cpu" in
  3009         -    hppa*64*)
         3256  +    case $host_cpu in
         3257  +    hppa*64*|ia64*)
  3010   3258         _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3011   3259         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3012   3260         ;;
  3013         -    ia64*)
  3014         -      _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3015         -      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3016         -      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  3017         -					      # but as the default
  3018         -					      # location of the library.
  3019         -      ;;
  3020   3261       *)
  3021   3262         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3022   3263         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  3023   3264   					      # but as the default
  3024   3265   					      # location of the library.
  3025   3266         ;;
  3026   3267       esac
  3027   3268   
  3028   3269       case $cc_basename in
  3029         -      CC)
         3270  +      CC*)
  3030   3271   	# FIXME: insert proper C++ library support
  3031   3272   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3032   3273   	;;
  3033         -      aCC)
  3034         -	case "$host_cpu" in
  3035         -	hppa*64*|ia64*)
  3036         -	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
         3274  +      aCC*)
         3275  +	case $host_cpu in
         3276  +	hppa*64*)
         3277  +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
         3278  +	  ;;
         3279  +	ia64*)
         3280  +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3037   3281   	  ;;
  3038   3282   	*)
  3039   3283   	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3040   3284   	  ;;
  3041   3285   	esac
  3042   3286   	# Commands to make compiler produce verbose output that lists
  3043   3287   	# what "hidden" libraries, object files and flags are used when
................................................................................
  3048   3292   	# from the output so that they don't get included in the library
  3049   3293   	# dependencies.
  3050   3294   	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  3051   3295   	;;
  3052   3296         *)
  3053   3297   	if test "$GXX" = yes; then
  3054   3298   	  if test $with_gnu_ld = no; then
  3055         -	    case "$host_cpu" in
  3056         -	    ia64*|hppa*64*)
  3057         -	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
         3299  +	    case $host_cpu in
         3300  +	    hppa*64*)
         3301  +	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
         3302  +	      ;;
         3303  +	    ia64*)
         3304  +	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3058   3305   	      ;;
  3059   3306   	    *)
  3060   3307   	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3061   3308   	      ;;
  3062   3309   	    esac
  3063   3310   	  fi
  3064   3311   	else
  3065   3312   	  # FIXME: insert proper C++ library support
  3066   3313   	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3067   3314   	fi
  3068   3315   	;;
  3069   3316       esac
  3070   3317       ;;
         3318  +  interix3*)
         3319  +    _LT_AC_TAGVAR(hardcode_direct, $1)=no
         3320  +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
         3321  +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
         3322  +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
         3323  +    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
         3324  +    # Instead, shared libraries are loaded at an image base (0x10000000 by
         3325  +    # default) and relocated if they conflict, which is a slow very memory
         3326  +    # consuming and fragmenting process.  To avoid this, we pick a random,
         3327  +    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
         3328  +    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
         3329  +    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
         3330  +    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
         3331  +    ;;
  3071   3332     irix5* | irix6*)
  3072   3333       case $cc_basename in
  3073         -      CC)
         3334  +      CC*)
  3074   3335   	# SGI C++
  3075         -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
         3336  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3076   3337   
  3077   3338   	# Archives containing C++ object files must be created using
  3078   3339   	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
  3079   3340   	# necessary to make sure instantiated templates are included
  3080   3341   	# in the archive.
  3081   3342   	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  3082   3343   	;;
  3083   3344         *)
  3084   3345   	if test "$GXX" = yes; then
  3085   3346   	  if test "$with_gnu_ld" = no; then
  3086         -	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
         3347  +	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3087   3348   	  else
  3088   3349   	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  3089   3350   	  fi
  3090   3351   	fi
  3091   3352   	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3092   3353   	;;
  3093   3354       esac
  3094   3355       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3095   3356       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3096   3357       ;;
  3097   3358     linux*)
  3098   3359       case $cc_basename in
  3099         -      KCC)
         3360  +      KCC*)
  3100   3361   	# Kuck and Associates, Inc. (KAI) C++ Compiler
  3101   3362   
  3102   3363   	# KCC will only create a shared library if the output file
  3103   3364   	# ends with ".so" (or ".sl" for HP-UX), so rename the library
  3104   3365   	# to its proper name (with version) after linking.
  3105   3366   	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  3106   3367   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
................................................................................
  3117   3378   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  3118   3379   	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3119   3380   
  3120   3381   	# Archives containing C++ object files must be created using
  3121   3382   	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3122   3383   	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3123   3384   	;;
  3124         -      icpc)
         3385  +      icpc*)
  3125   3386   	# Intel C++
  3126   3387   	with_gnu_ld=yes
         3388  +	# version 8.0 and above of icpc choke on multiply defined symbols
         3389  +	# if we add $predep_objects and $postdep_objects, however 7.1 and
         3390  +	# earlier do not add the objects themselves.
         3391  +	case `$CC -V 2>&1` in
         3392  +	*"Version 7."*)
         3393  +  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
         3394  +  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
         3395  +	  ;;
         3396  +	*)  # Version 8.0 or newer
         3397  +	  tmp_idyn=
         3398  +	  case $host_cpu in
         3399  +	    ia64*) tmp_idyn=' -i_dynamic';;
         3400  +	  esac
         3401  +  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
         3402  +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
         3403  +	  ;;
         3404  +	esac
  3127   3405   	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3128         -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3129         -	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  3130   3406   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3131   3407   	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3132   3408   	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  3133   3409   	;;
  3134         -      cxx)
         3410  +      pgCC*)
         3411  +        # Portland Group C++ compiler
         3412  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
         3413  +  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
         3414  +
         3415  +	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
         3416  +	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
         3417  +	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
         3418  +        ;;
         3419  +      cxx*)
  3135   3420   	# Compaq C++
  3136   3421   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3137   3422   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  3138   3423   
  3139   3424   	runpath_var=LD_RUN_PATH
  3140   3425   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3141   3426   	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
................................................................................
  3158   3443       ;;
  3159   3444     m88k*)
  3160   3445       # FIXME: insert proper C++ library support
  3161   3446       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3162   3447       ;;
  3163   3448     mvs*)
  3164   3449       case $cc_basename in
  3165         -      cxx)
         3450  +      cxx*)
  3166   3451   	# FIXME: insert proper C++ library support
  3167   3452   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3168   3453   	;;
  3169   3454         *)
  3170   3455   	# FIXME: insert proper C++ library support
  3171   3456   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3172   3457   	;;
  3173   3458       esac
  3174   3459       ;;
  3175         -  netbsd* | knetbsd*-gnu)
         3460  +  netbsd*)
  3176   3461       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  3177   3462         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  3178   3463         wlarc=
  3179   3464         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3180   3465         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3181   3466         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3182   3467       fi
  3183   3468       # Workaround some broken pre-1.5 toolchains
  3184   3469       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  3185   3470       ;;
         3471  +  openbsd2*)
         3472  +    # C++ shared libraries are fairly broken
         3473  +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
         3474  +    ;;
         3475  +  openbsd*)
         3476  +    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
         3477  +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
         3478  +    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
         3479  +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
         3480  +    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
         3481  +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
         3482  +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
         3483  +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
         3484  +    fi
         3485  +    output_verbose_link_cmd='echo'
         3486  +    ;;
  3186   3487     osf3*)
  3187   3488       case $cc_basename in
  3188         -      KCC)
         3489  +      KCC*)
  3189   3490   	# Kuck and Associates, Inc. (KAI) C++ Compiler
  3190   3491   
  3191   3492   	# KCC will only create a shared library if the output file
  3192   3493   	# ends with ".so" (or ".sl" for HP-UX), so rename the library
  3193   3494   	# to its proper name (with version) after linking.
  3194   3495   	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  3195   3496   
................................................................................
  3197   3498   	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3198   3499   
  3199   3500   	# Archives containing C++ object files must be created using
  3200   3501   	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3201   3502   	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3202   3503   
  3203   3504   	;;
  3204         -      RCC)
         3505  +      RCC*)
  3205   3506   	# Rational C++ 2.4.1
  3206   3507   	# FIXME: insert proper C++ library support
  3207   3508   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3208   3509   	;;
  3209         -      cxx)
         3510  +      cxx*)
  3210   3511   	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3211         -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
         3512  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3212   3513   
  3213   3514   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3214   3515   	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3215   3516   
  3216   3517   	# Commands to make compiler produce verbose output that lists
  3217   3518   	# what "hidden" libraries, object files and flags are used when
  3218   3519   	# linking a shared library.
................................................................................
  3222   3523   	# from the output so that they don't get included in the library
  3223   3524   	# dependencies.
  3224   3525   	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  3225   3526   	;;
  3226   3527         *)
  3227   3528   	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3228   3529   	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3229         -	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
         3530  +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3230   3531   
  3231   3532   	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3232   3533   	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3233   3534   
  3234   3535   	  # Commands to make compiler produce verbose output that lists
  3235   3536   	  # what "hidden" libraries, object files and flags are used when
  3236   3537   	  # linking a shared library.
................................................................................
  3241   3542   	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3242   3543   	fi
  3243   3544   	;;
  3244   3545       esac
  3245   3546       ;;
  3246   3547     osf4* | osf5*)
  3247   3548       case $cc_basename in
  3248         -      KCC)
         3549  +      KCC*)
  3249   3550   	# Kuck and Associates, Inc. (KAI) C++ Compiler
  3250   3551   
  3251   3552   	# KCC will only create a shared library if the output file
  3252   3553   	# ends with ".so" (or ".sl" for HP-UX), so rename the library
  3253   3554   	# to its proper name (with version) after linking.
  3254   3555   	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  3255   3556   
................................................................................
  3256   3557   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3257   3558   	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3258   3559   
  3259   3560   	# Archives containing C++ object files must be created using
  3260   3561   	# the KAI C++ compiler.
  3261   3562   	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  3262   3563   	;;
  3263         -      RCC)
         3564  +      RCC*)
  3264   3565   	# Rational C++ 2.4.1
  3265   3566   	# FIXME: insert proper C++ library support
  3266   3567   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3267   3568   	;;
  3268         -      cxx)
         3569  +      cxx*)
  3269   3570   	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  3270         -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
         3571  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3271   3572   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  3272   3573   	  echo "-hidden">> $lib.exp~
  3273         -	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
         3574  +	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
  3274   3575   	  $rm $lib.exp'
  3275   3576   
  3276   3577   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3277   3578   	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3278   3579   
  3279   3580   	# Commands to make compiler produce verbose output that lists
  3280   3581   	# what "hidden" libraries, object files and flags are used when
................................................................................
  3285   3586   	# from the output so that they don't get included in the library
  3286   3587   	# dependencies.
  3287   3588   	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  3288   3589   	;;
  3289   3590         *)
  3290   3591   	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3291   3592   	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3292         -	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
         3593  +	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3293   3594   
  3294   3595   	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3295   3596   	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3296   3597   
  3297   3598   	  # Commands to make compiler produce verbose output that lists
  3298   3599   	  # what "hidden" libraries, object files and flags are used when
  3299   3600   	  # linking a shared library.
................................................................................
  3306   3607   	;;
  3307   3608       esac
  3308   3609       ;;
  3309   3610     psos*)
  3310   3611       # FIXME: insert proper C++ library support
  3311   3612       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3312   3613       ;;
  3313         -  sco*)
  3314         -    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3315         -    case $cc_basename in
  3316         -      CC)
  3317         -	# FIXME: insert proper C++ library support
  3318         -	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3319         -	;;
  3320         -      *)
  3321         -	# FIXME: insert proper C++ library support
  3322         -	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3323         -	;;
  3324         -    esac
  3325         -    ;;
  3326   3614     sunos4*)
  3327   3615       case $cc_basename in
  3328         -      CC)
         3616  +      CC*)
  3329   3617   	# Sun C++ 4.x
  3330   3618   	# FIXME: insert proper C++ library support
  3331   3619   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3332   3620   	;;
  3333         -      lcc)
         3621  +      lcc*)
  3334   3622   	# Lucid
  3335   3623   	# FIXME: insert proper C++ library support
  3336   3624   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3337   3625   	;;
  3338   3626         *)
  3339   3627   	# FIXME: insert proper C++ library support
  3340   3628   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3341   3629   	;;
  3342   3630       esac
  3343   3631       ;;
  3344   3632     solaris*)
  3345   3633       case $cc_basename in
  3346         -      CC)
         3634  +      CC*)
  3347   3635   	# Sun C++ 4.2, 5.x and Centerline C++
         3636  +        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
  3348   3637   	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3349         -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
         3638  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3350   3639   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3351         -	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
         3640  +	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3352   3641   
  3353   3642   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3354   3643   	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3355   3644   	case $host_os in
  3356         -	  solaris2.[0-5] | solaris2.[0-5].*) ;;
         3645  +	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  3357   3646   	  *)
  3358   3647   	    # The C++ compiler is used as linker so we must use $wl
  3359   3648   	    # flag to pass the commands to the underlying system
  3360         -	    # linker.
         3649  +	    # linker. We must also pass each convience library through
         3650  +	    # to the system linker between allextract/defaultextract.
         3651  +	    # The C++ compiler will combine linker options so we
         3652  +	    # cannot just pass the convience library names through
         3653  +	    # without $wl.
  3361   3654   	    # Supported since Solaris 2.6 (maybe 2.5.1?)
  3362         -	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
         3655  +	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
  3363   3656   	    ;;
  3364   3657   	esac
  3365   3658   	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3366   3659   
  3367         -	# Commands to make compiler produce verbose output that lists
  3368         -	# what "hidden" libraries, object files and flags are used when
  3369         -	# linking a shared library.
  3370         -	#
  3371         -	# There doesn't appear to be a way to prevent this compiler from
  3372         -	# explicitly linking system object files so we need to strip them
  3373         -	# from the output so that they don't get included in the library
  3374         -	# dependencies.
  3375         -	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
         3660  +	output_verbose_link_cmd='echo'
  3376   3661   
  3377   3662   	# Archives containing C++ object files must be created using
  3378   3663   	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
  3379   3664   	# necessary to make sure instantiated templates are included
  3380   3665   	# in the archive.
  3381   3666   	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3382   3667   	;;
  3383         -      gcx)
         3668  +      gcx*)
  3384   3669   	# Green Hills C++ Compiler
  3385   3670   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3386   3671   
  3387   3672   	# The C++ compiler must be used to create the archive.
  3388   3673   	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  3389   3674   	;;
  3390   3675         *)
................................................................................
  3414   3699   	  fi
  3415   3700   
  3416   3701   	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  3417   3702   	fi
  3418   3703   	;;
  3419   3704       esac
  3420   3705       ;;
  3421         -  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
         3706  +  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
         3707  +    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
         3708  +    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
         3709  +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
         3710  +    runpath_var='LD_RUN_PATH'
         3711  +
         3712  +    case $cc_basename in
         3713  +      CC*)
         3714  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
         3715  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
         3716  +	;;
         3717  +      *)
         3718  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
         3719  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
         3720  +	;;
         3721  +    esac
         3722  +    ;;
         3723  +  sysv5* | sco3.2v5* | sco5v6*)
         3724  +    # Note: We can NOT use -z defs as we might desire, because we do not
         3725  +    # link with -lc, and that would cause any symbols used from libc to
         3726  +    # always be unresolved, which means just about no library would
         3727  +    # ever link correctly.  If we're not using GNU ld we use -z text
         3728  +    # though, which does catch some bad symbols but isn't as heavy-handed
         3729  +    # as -z defs.
         3730  +    # For security reasons, it is highly recommended that you always
         3731  +    # use absolute paths for naming shared libraries, and exclude the
         3732  +    # DT_RUNPATH tag from executables and libraries.  But doing so
         3733  +    # requires that you compile everything twice, which is a pain.
         3734  +    # So that behaviour is only enabled if SCOABSPATH is set to a
         3735  +    # non-empty value in the environment.  Most likely only useful for
         3736  +    # creating official distributions of packages.
         3737  +    # This is a hack until libtool officially supports absolute path
         3738  +    # names for shared libraries.
         3739  +    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
         3740  +    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  3422   3741       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
         3742  +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
         3743  +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
         3744  +    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
         3745  +    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
         3746  +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
         3747  +    runpath_var='LD_RUN_PATH'
         3748  +
         3749  +    case $cc_basename in
         3750  +      CC*)
         3751  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         3752  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         3753  +	;;
         3754  +      *)
         3755  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         3756  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         3757  +	;;
         3758  +    esac
  3423   3759       ;;
  3424   3760     tandem*)
  3425   3761       case $cc_basename in
  3426         -      NCC)
         3762  +      NCC*)
  3427   3763   	# NonStop-UX NCC 3.20
  3428   3764   	# FIXME: insert proper C++ library support
  3429   3765   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  3430   3766   	;;
  3431   3767         *)
  3432   3768   	# FIXME: insert proper C++ library support
  3433   3769   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
................................................................................
  3452   3788   AC_LIBTOOL_POSTDEP_PREDEP($1)
  3453   3789   AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3454   3790   AC_LIBTOOL_PROG_CC_C_O($1)
  3455   3791   AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3456   3792   AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3457   3793   AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3458   3794   AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3459         -AC_LIBTOOL_SYS_LIB_STRIP
  3460         -AC_LIBTOOL_DLOPEN_SELF($1)
  3461   3795   
  3462   3796   AC_LIBTOOL_CONFIG($1)
  3463   3797   
  3464   3798   AC_LANG_POP
  3465   3799   CC=$lt_save_CC
  3466   3800   LDCXX=$LD
  3467   3801   LD=$lt_save_LD
................................................................................
  3471   3805   lt_cv_path_LDCXX=$lt_cv_path_LD
  3472   3806   lt_cv_path_LD=$lt_save_path_LD
  3473   3807   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  3474   3808   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  3475   3809   ])# AC_LIBTOOL_LANG_CXX_CONFIG
  3476   3810   
  3477   3811   # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  3478         -# ------------------------
         3812  +# ------------------------------------
  3479   3813   # Figure out "hidden" library dependencies from verbose
  3480   3814   # compiler output when linking a shared library.
  3481   3815   # Parse the compiler output and extract the necessary
  3482   3816   # objects, libraries and library flags.
  3483   3817   AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  3484   3818   dnl we can't use the lt_simple_compile_test_code here,
  3485   3819   dnl because it contains code intended for an executable,
................................................................................
  3525   3859     # Sentinel used to keep track of whether or not we are before
  3526   3860     # the conftest object file.
  3527   3861     pre_test_object_deps_done=no
  3528   3862   
  3529   3863     # The `*' in the case matches for architectures that use `case' in
  3530   3864     # $output_verbose_cmd can trigger glob expansion during the loop
  3531   3865     # eval without this substitution.
  3532         -  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
         3866  +  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
  3533   3867   
  3534   3868     for p in `eval $output_verbose_link_cmd`; do
  3535   3869       case $p in
  3536   3870   
  3537   3871       -L* | -R* | -l*)
  3538   3872          # Some compilers place space between "-{L,R}" and the path.
  3539   3873          # Remove the space.
................................................................................
  3600   3934     # Clean up.
  3601   3935     rm -f a.out a.exe
  3602   3936   else
  3603   3937     echo "libtool.m4: error: problem compiling $1 test program"
  3604   3938   fi
  3605   3939   
  3606   3940   $rm -f confest.$objext
         3941  +
         3942  +# PORTME: override above test on systems where it is broken
         3943  +ifelse([$1],[CXX],
         3944  +[case $host_os in
         3945  +interix3*)
         3946  +  # Interix 3.5 installs completely hosed .la files for C++, so rather than
         3947  +  # hack all around it, let's just trust "g++" to DTRT.
         3948  +  _LT_AC_TAGVAR(predep_objects,$1)=
         3949  +  _LT_AC_TAGVAR(postdep_objects,$1)=
         3950  +  _LT_AC_TAGVAR(postdeps,$1)=
         3951  +  ;;
         3952  +
         3953  +solaris*)
         3954  +  case $cc_basename in
         3955  +  CC*)
         3956  +    # Adding this requires a known-good setup of shared libraries for
         3957  +    # Sun compiler versions before 5.6, else PIC objects from an old
         3958  +    # archive will be linked into the output, leading to subtle bugs.
         3959  +    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
         3960  +    ;;
         3961  +  esac
         3962  +  ;;
         3963  +esac
         3964  +])
  3607   3965   
  3608   3966   case " $_LT_AC_TAGVAR(postdeps, $1) " in
  3609   3967   *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  3610   3968   esac
  3611   3969   ])# AC_LIBTOOL_POSTDEP_PREDEP
  3612   3970   
  3613   3971   # AC_LIBTOOL_LANG_F77_CONFIG
  3614         -# ------------------------
         3972  +# --------------------------
  3615   3973   # Ensure that the configuration vars for the C compiler are
  3616   3974   # suitably defined.  Those variables are subsequently used by
  3617   3975   # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3618   3976   AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  3619   3977   AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  3620   3978   [AC_REQUIRE([AC_PROG_F77])
  3621   3979   AC_LANG_PUSH(Fortran 77)
................................................................................
  3650   4008   lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
  3651   4009   
  3652   4010   # Code to be used in simple link tests
  3653   4011   lt_simple_link_test_code="      program t\n      end\n"
  3654   4012   
  3655   4013   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3656   4014   _LT_AC_SYS_COMPILER
         4015  +
         4016  +# save warnings/boilerplate of simple test code
         4017  +_LT_COMPILER_BOILERPLATE
         4018  +_LT_LINKER_BOILERPLATE
  3657   4019   
  3658   4020   # Allow CC to be a program name with arguments.
  3659   4021   lt_save_CC="$CC"
  3660   4022   CC=${F77-"f77"}
  3661   4023   compiler=$CC
  3662   4024   _LT_AC_TAGVAR(compiler, $1)=$CC
  3663         -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
         4025  +_LT_CC_BASENAME([$compiler])
  3664   4026   
  3665   4027   AC_MSG_CHECKING([if libtool supports shared libraries])
  3666   4028   AC_MSG_RESULT([$can_build_shared])
  3667   4029   
  3668   4030   AC_MSG_CHECKING([whether to build shared libraries])
  3669   4031   test "$can_build_shared" = "no" && enable_shared=no
  3670   4032   
  3671   4033   # On AIX, shared libraries and static libraries use the same namespace, and
  3672   4034   # are all built from PIC.
  3673         -case "$host_os" in
         4035  +case $host_os in
  3674   4036   aix3*)
  3675   4037     test "$enable_shared" = yes && enable_static=no
  3676   4038     if test -n "$RANLIB"; then
  3677   4039       archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3678   4040       postinstall_cmds='$RANLIB $lib'
  3679   4041     fi
  3680   4042     ;;
  3681         -aix4*)
  3682         -  test "$enable_shared" = yes && enable_static=no
         4043  +aix4* | aix5*)
         4044  +  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
         4045  +    test "$enable_shared" = yes && enable_static=no
         4046  +  fi
  3683   4047     ;;
  3684   4048   esac
  3685   4049   AC_MSG_RESULT([$enable_shared])
  3686   4050   
  3687   4051   AC_MSG_CHECKING([whether to build static libraries])
  3688   4052   # Make sure either enable_shared or enable_static is yes.
  3689   4053   test "$enable_shared" = yes || enable_static=yes
  3690   4054   AC_MSG_RESULT([$enable_static])
  3691   4055   
  3692         -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3693         -
  3694   4056   _LT_AC_TAGVAR(GCC, $1)="$G77"
  3695   4057   _LT_AC_TAGVAR(LD, $1)="$LD"
  3696   4058   
  3697   4059   AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3698   4060   AC_LIBTOOL_PROG_CC_C_O($1)
  3699   4061   AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3700   4062   AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3701   4063   AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3702   4064   AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3703         -AC_LIBTOOL_SYS_LIB_STRIP
  3704         -
  3705   4065   
  3706   4066   AC_LIBTOOL_CONFIG($1)
  3707   4067   
  3708   4068   AC_LANG_POP
  3709   4069   CC="$lt_save_CC"
  3710   4070   ])# AC_LIBTOOL_LANG_F77_CONFIG
  3711   4071   
................................................................................
  3726   4086   objext=o
  3727   4087   _LT_AC_TAGVAR(objext, $1)=$objext
  3728   4088   
  3729   4089   # Code to be used in simple compile tests
  3730   4090   lt_simple_compile_test_code="class foo {}\n"
  3731   4091   
  3732   4092   # Code to be used in simple link tests
  3733         -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
         4093  +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
  3734   4094   
  3735   4095   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3736   4096   _LT_AC_SYS_COMPILER
         4097  +
         4098  +# save warnings/boilerplate of simple test code
         4099  +_LT_COMPILER_BOILERPLATE
         4100  +_LT_LINKER_BOILERPLATE
  3737   4101   
  3738   4102   # Allow CC to be a program name with arguments.
  3739   4103   lt_save_CC="$CC"
  3740   4104   CC=${GCJ-"gcj"}
  3741   4105   compiler=$CC
  3742   4106   _LT_AC_TAGVAR(compiler, $1)=$CC
         4107  +_LT_CC_BASENAME([$compiler])
  3743   4108   
  3744   4109   # GCJ did not exist at the time GCC didn't implicitly link libc in.
  3745   4110   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
         4111  +
         4112  +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3746   4113   
  3747   4114   AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  3748   4115   AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3749   4116   AC_LIBTOOL_PROG_CC_C_O($1)
  3750   4117   AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3751   4118   AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3752   4119   AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3753   4120   AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3754         -AC_LIBTOOL_SYS_LIB_STRIP
  3755         -AC_LIBTOOL_DLOPEN_SELF($1)
  3756   4121   
  3757   4122   AC_LIBTOOL_CONFIG($1)
  3758   4123   
  3759   4124   AC_LANG_RESTORE
  3760   4125   CC="$lt_save_CC"
  3761   4126   ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  3762   4127   
  3763   4128   
  3764   4129   # AC_LIBTOOL_LANG_RC_CONFIG
  3765         -# --------------------------
         4130  +# -------------------------
  3766   4131   # Ensure that the configuration vars for the Windows resource compiler are
  3767   4132   # suitably defined.  Those variables are subsequently used by
  3768   4133   # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3769   4134   AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  3770   4135   AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  3771   4136   [AC_LANG_SAVE
  3772   4137   
................................................................................
  3781   4146   lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
  3782   4147   
  3783   4148   # Code to be used in simple link tests
  3784   4149   lt_simple_link_test_code="$lt_simple_compile_test_code"
  3785   4150   
  3786   4151   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3787   4152   _LT_AC_SYS_COMPILER
         4153  +
         4154  +# save warnings/boilerplate of simple test code
         4155  +_LT_COMPILER_BOILERPLATE
         4156  +_LT_LINKER_BOILERPLATE
  3788   4157   
  3789   4158   # Allow CC to be a program name with arguments.
  3790   4159   lt_save_CC="$CC"
  3791   4160   CC=${RC-"windres"}
  3792   4161   compiler=$CC
  3793   4162   _LT_AC_TAGVAR(compiler, $1)=$CC
         4163  +_LT_CC_BASENAME([$compiler])
  3794   4164   _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3795   4165   
  3796   4166   AC_LIBTOOL_CONFIG($1)
  3797   4167   
  3798   4168   AC_LANG_RESTORE
  3799   4169   CC="$lt_save_CC"
  3800   4170   ])# AC_LIBTOOL_LANG_RC_CONFIG
................................................................................
  3816   4186     # without removal of \ escapes.
  3817   4187     if test -n "${ZSH_VERSION+set}" ; then
  3818   4188       setopt NO_GLOB_SUBST
  3819   4189     fi
  3820   4190     # Now quote all the things that may contain metacharacters while being
  3821   4191     # careful not to overquote the AC_SUBSTed values.  We take copies of the
  3822   4192     # variables and quote the copies for generation of the libtool script.
  3823         -  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
         4193  +  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
  3824   4194       SED SHELL STRIP \
  3825   4195       libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  3826   4196       old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  3827   4197       deplibs_check_method reload_flag reload_cmds need_locks \
  3828   4198       lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  3829   4199       lt_cv_sys_global_symbol_to_c_name_address \
  3830   4200       sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
................................................................................
  3922   4292   # This program is distributed in the hope that it will be useful, but
  3923   4293   # WITHOUT ANY WARRANTY; without even the implied warranty of
  3924   4294   # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3925   4295   # General Public License for more details.
  3926   4296   #
  3927   4297   # You should have received a copy of the GNU General Public License
  3928   4298   # along with this program; if not, write to the Free Software
  3929         -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
         4299  +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  3930   4300   #
  3931   4301   # As a special exception to the GNU General Public License, if you
  3932   4302   # distribute this file as part of a program that contains a
  3933   4303   # configuration script generated by Autoconf, you may include it under
  3934   4304   # the same distribution terms that you use for the rest of that program.
  3935   4305   
  3936   4306   # A sed program that does not truncate output.
  3937   4307   SED=$lt_SED
  3938   4308   
  3939   4309   # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  3940         -Xsed="$SED -e s/^X//"
         4310  +Xsed="$SED -e 1s/^X//"
  3941   4311   
  3942   4312   # The HP-UX ksh and POSIX shell print the target directory to stdout
  3943   4313   # if CDPATH is set.
  3944         -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
         4314  +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3945   4315   
  3946   4316   # The names of the tagged configurations supported by this script.
  3947   4317   available_tags=
  3948   4318   
  3949   4319   # ### BEGIN LIBTOOL CONFIG],
  3950   4320   [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  3951   4321   
................................................................................
  3968   4338   
  3969   4339   # Whether or not to optimize for fast installation.
  3970   4340   fast_install=$enable_fast_install
  3971   4341   
  3972   4342   # The host system.
  3973   4343   host_alias=$host_alias
  3974   4344   host=$host
         4345  +host_os=$host_os
         4346  +
         4347  +# The build system.
         4348  +build_alias=$build_alias
         4349  +build=$build
         4350  +build_os=$build_os
  3975   4351   
  3976   4352   # An echo program that does not interpret backslashes.
  3977   4353   echo=$lt_echo
  3978   4354   
  3979   4355   # The archiver.
  3980   4356   AR=$lt_AR
  3981   4357   AR_FLAGS=$lt_AR_FLAGS
  3982   4358   
  3983   4359   # A C compiler.
  3984   4360   LTCC=$lt_LTCC
         4361  +
         4362  +# LTCC compiler flags.
         4363  +LTCFLAGS=$lt_LTCFLAGS
  3985   4364   
  3986   4365   # A language-specific compiler.
  3987   4366   CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  3988   4367   
  3989   4368   # Is the compiler the GNU C compiler?
  3990   4369   with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  3991   4370   
................................................................................
  4029   4408   # Object file suffix (normally "o").
  4030   4409   objext="$ac_objext"
  4031   4410   
  4032   4411   # Old archive suffix (normally "a").
  4033   4412   libext="$libext"
  4034   4413   
  4035   4414   # Shared library suffix (normally ".so").
  4036         -shrext='$shrext'
         4415  +shrext_cmds='$shrext_cmds'
  4037   4416   
  4038   4417   # Executable file suffix (normally "").
  4039   4418   exeext="$exeext"
  4040   4419   
  4041   4420   # Additional compiler flags for building library objects.
  4042   4421   pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  4043   4422   pic_mode=$pic_mode
................................................................................
  4044   4423   
  4045   4424   # What is the maximum length of a command?
  4046   4425   max_cmd_len=$lt_cv_sys_max_cmd_len
  4047   4426   
  4048   4427   # Does compiler simultaneously support -c and -o options?
  4049   4428   compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  4050   4429   
  4051         -# Must we lock files when doing compilation ?
         4430  +# Must we lock files when doing compilation?
  4052   4431   need_locks=$lt_need_locks
  4053   4432   
  4054   4433   # Do we need the lib prefix for modules?
  4055   4434   need_lib_prefix=$need_lib_prefix
  4056   4435   
  4057   4436   # Do we need a version for libraries?
  4058   4437   need_version=$need_version
................................................................................
  4318   4697   
  4319   4698   # Character class describing NM global symbol codes.
  4320   4699   symcode='[[BCDEGRST]]'
  4321   4700   
  4322   4701   # Regexp to match symbols that can be accessed directly from C.
  4323   4702   sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  4324   4703   
  4325         -# Transform the above into a raw symbol and a C symbol.
  4326         -symxfrm='\1 \2\3 \3'
  4327         -
  4328   4704   # Transform an extracted symbol line into a proper C declaration
  4329   4705   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  4330   4706   
  4331   4707   # Transform an extracted symbol line into symbol name and symbol address
  4332   4708   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
  4333   4709   
  4334   4710   # Define system-specific variables.
................................................................................
  4341   4717     ;;
  4342   4718   hpux*) # Its linker distinguishes data from code symbols
  4343   4719     if test "$host_cpu" = ia64; then
  4344   4720       symcode='[[ABCDEGRST]]'
  4345   4721     fi
  4346   4722     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4347   4723     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
         4724  +  ;;
         4725  +linux*)
         4726  +  if test "$host_cpu" = ia64; then
         4727  +    symcode='[[ABCDGIRSTW]]'
         4728  +    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
         4729  +    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
         4730  +  fi
  4348   4731     ;;
  4349   4732   irix* | nonstopux*)
  4350   4733     symcode='[[BCDEGRST]]'
  4351   4734     ;;
  4352   4735   osf*)
  4353   4736     symcode='[[BCDEGQRST]]'
  4354   4737     ;;
  4355         -solaris* | sysv5*)
         4738  +solaris*)
  4356   4739     symcode='[[BDRT]]'
  4357   4740     ;;
         4741  +sco3.2v5*)
         4742  +  symcode='[[DT]]'
         4743  +  ;;
         4744  +sysv4.2uw2*)
         4745  +  symcode='[[DT]]'
         4746  +  ;;
         4747  +sysv5* | sco5v6* | unixware* | OpenUNIX*)
         4748  +  symcode='[[ABDT]]'
         4749  +  ;;
  4358   4750   sysv4)
  4359   4751     symcode='[[DFNSTU]]'
  4360   4752     ;;
  4361   4753   esac
  4362   4754   
  4363   4755   # Handle CRLF in mingw tool chain
  4364   4756   opt_cr=
................................................................................
  4372   4764   case `$NM -V 2>&1` in
  4373   4765   *GNU* | *'with BFD'*)
  4374   4766     symcode='[[ABCDGIRSTW]]' ;;
  4375   4767   esac
  4376   4768   
  4377   4769   # Try without a prefix undercore, then with it.
  4378   4770   for ac_symprfx in "" "_"; do
         4771  +
         4772  +  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
         4773  +  symxfrm="\\1 $ac_symprfx\\2 \\2"
  4379   4774   
  4380   4775     # Write the raw and C identifiers.
  4381         -  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
         4776  +  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4382   4777   
  4383   4778     # Check to see that the pipe works correctly.
  4384   4779     pipe_works=no
  4385   4780   
  4386   4781     rm -f conftest*
  4387   4782     cat > conftest.$ac_ext <<EOF
  4388   4783   #ifdef __cplusplus
................................................................................
  4530   4925         # Common symbols not allowed in MH_DYLIB files
  4531   4926         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4532   4927         ;;
  4533   4928       *djgpp*)
  4534   4929         # DJGPP does not support shared libraries at all
  4535   4930         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4536   4931         ;;
         4932  +    interix3*)
         4933  +      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
         4934  +      # Instead, we relocate shared libraries at runtime.
         4935  +      ;;
  4537   4936       sysv4*MP*)
  4538   4937         if test -d /usr/nec; then
  4539   4938   	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4540   4939         fi
  4541   4940         ;;
  4542   4941       hpux*)
  4543   4942         # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4544   4943         # not for PA HP-UX.
  4545         -      case "$host_cpu" in
         4944  +      case $host_cpu in
  4546   4945         hppa*64*|ia64*)
  4547   4946   	;;
  4548   4947         *)
  4549   4948   	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4550   4949   	;;
  4551   4950         esac
  4552   4951         ;;
................................................................................
  4563   4962   	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4564   4963   	else
  4565   4964   	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4566   4965   	fi
  4567   4966   	;;
  4568   4967         chorus*)
  4569   4968   	case $cc_basename in
  4570         -	cxch68)
         4969  +	cxch68*)
  4571   4970   	  # Green Hills C++ Compiler
  4572   4971   	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  4573   4972   	  ;;
  4574   4973   	esac
  4575   4974   	;;
         4975  +       darwin*)
         4976  +         # PIC is the default on this platform
         4977  +         # Common symbols not allowed in MH_DYLIB files
         4978  +         case $cc_basename in
         4979  +           xlc*)
         4980  +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
         4981  +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         4982  +           ;;
         4983  +         esac
         4984  +       ;;
  4576   4985         dgux*)
  4577   4986   	case $cc_basename in
  4578         -	  ec++)
         4987  +	  ec++*)
  4579   4988   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4580   4989   	    ;;
  4581         -	  ghcx)
         4990  +	  ghcx*)
  4582   4991   	    # Green Hills C++ Compiler
  4583   4992   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4584   4993   	    ;;
  4585   4994   	  *)
  4586   4995   	    ;;
  4587   4996   	esac
  4588   4997   	;;
  4589         -      freebsd* | kfreebsd*-gnu)
         4998  +      freebsd* | kfreebsd*-gnu | dragonfly*)
  4590   4999   	# FreeBSD uses GNU C++
  4591   5000   	;;
  4592   5001         hpux9* | hpux10* | hpux11*)
  4593   5002   	case $cc_basename in
  4594         -	  CC)
         5003  +	  CC*)
  4595   5004   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4596         -	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
         5005  +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4597   5006   	    if test "$host_cpu" != ia64; then
  4598   5007   	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4599   5008   	    fi
  4600   5009   	    ;;
  4601         -	  aCC)
         5010  +	  aCC*)
  4602   5011   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4603         -	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  4604         -	    case "$host_cpu" in
         5012  +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
         5013  +	    case $host_cpu in
  4605   5014   	    hppa*64*|ia64*)
  4606   5015   	      # +Z the default
  4607   5016   	      ;;
  4608   5017   	    *)
  4609   5018   	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4610   5019   	      ;;
  4611   5020   	    esac
  4612   5021   	    ;;
  4613   5022   	  *)
  4614   5023   	    ;;
  4615   5024   	esac
  4616   5025   	;;
         5026  +      interix*)
         5027  +	# This is c89, which is MS Visual C++ (no shared libs)
         5028  +	# Anyone wants to do a port?
         5029  +	;;
  4617   5030         irix5* | irix6* | nonstopux*)
  4618   5031   	case $cc_basename in
  4619         -	  CC)
         5032  +	  CC*)
  4620   5033   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4621   5034   	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4622   5035   	    # CC pic flag -KPIC is the default.
  4623   5036   	    ;;
  4624   5037   	  *)
  4625   5038   	    ;;
  4626   5039   	esac
  4627   5040   	;;
  4628   5041         linux*)
  4629   5042   	case $cc_basename in
  4630         -	  KCC)
         5043  +	  KCC*)
  4631   5044   	    # KAI C++ Compiler
  4632   5045   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4633   5046   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4634   5047   	    ;;
  4635         -	  icpc)
         5048  +	  icpc* | ecpc*)
  4636   5049   	    # Intel C++
  4637   5050   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4638   5051   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4639   5052   	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4640   5053   	    ;;
  4641         -	  cxx)
         5054  +	  pgCC*)
         5055  +	    # Portland Group C++ compiler.
         5056  +	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         5057  +	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
         5058  +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
         5059  +	    ;;
         5060  +	  cxx*)
  4642   5061   	    # Compaq C++
  4643   5062   	    # Make sure the PIC flag is empty.  It appears that all Alpha
  4644   5063   	    # Linux and Compaq Tru64 Unix objects are PIC.
  4645   5064   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4646   5065   	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4647   5066   	    ;;
  4648   5067   	  *)
................................................................................
  4651   5070   	;;
  4652   5071         lynxos*)
  4653   5072   	;;
  4654   5073         m88k*)
  4655   5074   	;;
  4656   5075         mvs*)
  4657   5076   	case $cc_basename in
  4658         -	  cxx)
         5077  +	  cxx*)
  4659   5078   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4660   5079   	    ;;
  4661   5080   	  *)
  4662   5081   	    ;;
  4663   5082   	esac
  4664   5083   	;;
  4665         -      netbsd* | knetbsd*-gnu)
         5084  +      netbsd*)
  4666   5085   	;;
  4667   5086         osf3* | osf4* | osf5*)
  4668   5087   	case $cc_basename in
  4669         -	  KCC)
         5088  +	  KCC*)
  4670   5089   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4671   5090   	    ;;
  4672         -	  RCC)
         5091  +	  RCC*)
  4673   5092   	    # Rational C++ 2.4.1
  4674   5093   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4675   5094   	    ;;
  4676         -	  cxx)
         5095  +	  cxx*)
  4677   5096   	    # Digital/Compaq C++
  4678   5097   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4679   5098   	    # Make sure the PIC flag is empty.  It appears that all Alpha
  4680   5099   	    # Linux and Compaq Tru64 Unix objects are PIC.
  4681   5100   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4682   5101   	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4683   5102   	    ;;
  4684   5103   	  *)
  4685   5104   	    ;;
  4686   5105   	esac
  4687   5106   	;;
  4688   5107         psos*)
  4689   5108   	;;
  4690         -      sco*)
  4691         -	case $cc_basename in
  4692         -	  CC)
  4693         -	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4694         -	    ;;
  4695         -	  *)
  4696         -	    ;;
  4697         -	esac
  4698         -	;;
  4699   5109         solaris*)
  4700   5110   	case $cc_basename in
  4701         -	  CC)
         5111  +	  CC*)
  4702   5112   	    # Sun C++ 4.2, 5.x and Centerline C++
  4703   5113   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4704   5114   	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4705   5115   	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4706   5116   	    ;;
  4707         -	  gcx)
         5117  +	  gcx*)
  4708   5118   	    # Green Hills C++ Compiler
  4709   5119   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4710   5120   	    ;;
  4711   5121   	  *)
  4712   5122   	    ;;
  4713   5123   	esac
  4714   5124   	;;
  4715   5125         sunos4*)
  4716   5126   	case $cc_basename in
  4717         -	  CC)
         5127  +	  CC*)
  4718   5128   	    # Sun C++ 4.x
  4719   5129   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4720   5130   	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4721   5131   	    ;;
  4722         -	  lcc)
         5132  +	  lcc*)
  4723   5133   	    # Lucid
  4724   5134   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4725   5135   	    ;;
  4726   5136   	  *)
  4727   5137   	    ;;
  4728   5138   	esac
  4729   5139   	;;
  4730   5140         tandem*)
  4731   5141   	case $cc_basename in
  4732         -	  NCC)
         5142  +	  NCC*)
  4733   5143   	    # NonStop-UX NCC 3.20
  4734   5144   	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4735   5145   	    ;;
  4736   5146   	  *)
  4737   5147   	    ;;
  4738   5148   	esac
  4739   5149   	;;
  4740         -      unixware*)
         5150  +      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
         5151  +	case $cc_basename in
         5152  +	  CC*)
         5153  +	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         5154  +	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
         5155  +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
         5156  +	    ;;
         5157  +	esac
  4741   5158   	;;
  4742   5159         vxworks*)
  4743   5160   	;;
  4744   5161         *)
  4745   5162   	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4746   5163   	;;
  4747   5164       esac
................................................................................
  4779   5196         ;;
  4780   5197   
  4781   5198       darwin* | rhapsody*)
  4782   5199         # PIC is the default on this platform
  4783   5200         # Common symbols not allowed in MH_DYLIB files
  4784   5201         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4785   5202         ;;
         5203  +
         5204  +    interix3*)
         5205  +      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
         5206  +      # Instead, we relocate shared libraries at runtime.
         5207  +      ;;
  4786   5208   
  4787   5209       msdosdjgpp*)
  4788   5210         # Just because we use GCC doesn't mean we suddenly get shared libraries
  4789   5211         # on systems that don't support them.
  4790   5212         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4791   5213         enable_shared=no
  4792   5214         ;;
................................................................................
  4796   5218   	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4797   5219         fi
  4798   5220         ;;
  4799   5221   
  4800   5222       hpux*)
  4801   5223         # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4802   5224         # not for PA HP-UX.
  4803         -      case "$host_cpu" in
         5225  +      case $host_cpu in
  4804   5226         hppa*64*|ia64*)
  4805   5227   	# +Z the default
  4806   5228   	;;
  4807   5229         *)
  4808   5230   	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4809   5231   	;;
  4810   5232         esac
................................................................................
  4822   5244         if test "$host_cpu" = ia64; then
  4823   5245   	# AIX 5 now supports IA64 processor
  4824   5246   	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4825   5247         else
  4826   5248   	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4827   5249         fi
  4828   5250         ;;
         5251  +      darwin*)
         5252  +        # PIC is the default on this platform
         5253  +        # Common symbols not allowed in MH_DYLIB files
         5254  +       case $cc_basename in
         5255  +         xlc*)
         5256  +         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
         5257  +         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         5258  +         ;;
         5259  +       esac
         5260  +       ;;
  4829   5261   
  4830   5262       mingw* | pw32* | os2*)
  4831   5263         # This hack is so that the source file can tell whether it is being
  4832   5264         # built for inclusion in a dll (and should export symbols for example).
  4833   5265         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4834   5266         ;;
  4835   5267   
  4836   5268       hpux9* | hpux10* | hpux11*)
  4837   5269         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4838   5270         # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4839   5271         # not for PA HP-UX.
  4840         -      case "$host_cpu" in
         5272  +      case $host_cpu in
  4841   5273         hppa*64*|ia64*)
  4842   5274   	# +Z the default
  4843   5275   	;;
  4844   5276         *)
  4845   5277   	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4846   5278   	;;
  4847   5279         esac
................................................................................
  4857   5289   
  4858   5290       newsos6)
  4859   5291         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4860   5292         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4861   5293         ;;
  4862   5294   
  4863   5295       linux*)
  4864         -      case $CC in
         5296  +      case $cc_basename in
  4865   5297         icc* | ecc*)
  4866   5298   	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4867   5299   	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4868   5300   	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4869   5301           ;;
         5302  +      pgcc* | pgf77* | pgf90* | pgf95*)
         5303  +        # Portland Group compilers (*not* the Pentium gcc compiler,
         5304  +	# which looks to be a dead project)
         5305  +	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         5306  +	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
         5307  +	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
         5308  +        ;;
  4870   5309         ccc*)
  4871   5310           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4872   5311           # All Alpha code is PIC.
  4873   5312           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4874   5313           ;;
  4875   5314         esac
  4876   5315         ;;
................................................................................
  4877   5316   
  4878   5317       osf3* | osf4* | osf5*)
  4879   5318         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4880   5319         # All OSF/1 code is PIC.
  4881   5320         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4882   5321         ;;
  4883   5322   
  4884         -    sco3.2v5*)
  4885         -      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  4886         -      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  4887         -      ;;
  4888         -
  4889   5323       solaris*)
  4890         -      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4891   5324         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4892   5325         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
         5326  +      case $cc_basename in
         5327  +      f77* | f90* | f95*)
         5328  +	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
         5329  +      *)
         5330  +	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
         5331  +      esac
  4893   5332         ;;
  4894   5333   
  4895   5334       sunos4*)
  4896   5335         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4897   5336         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4898   5337         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4899   5338         ;;
  4900   5339   
  4901         -    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
         5340  +    sysv4 | sysv4.2uw2* | sysv4.3*)
  4902   5341         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4903   5342         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4904   5343         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4905   5344         ;;
  4906   5345   
  4907   5346       sysv4*MP*)
  4908   5347         if test -d /usr/nec ;then
  4909   5348   	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4910   5349   	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4911   5350         fi
  4912   5351         ;;
         5352  +
         5353  +    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
         5354  +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         5355  +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
         5356  +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
         5357  +      ;;
         5358  +
         5359  +    unicos*)
         5360  +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         5361  +      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
         5362  +      ;;
  4913   5363   
  4914   5364       uts4*)
  4915   5365         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4916   5366         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4917   5367         ;;
  4918   5368   
  4919   5369       *)
................................................................................
  4934   5384       [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  4935   5385        "" | " "*) ;;
  4936   5386        *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4937   5387        esac],
  4938   5388       [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4939   5389        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4940   5390   fi
  4941         -case "$host_os" in
         5391  +case $host_os in
  4942   5392     # For platforms which do not support PIC, -DPIC is meaningless:
  4943   5393     *djgpp*)
  4944   5394       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4945   5395       ;;
  4946   5396     *)
  4947   5397       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  4948   5398       ;;
  4949   5399   esac
         5400  +
         5401  +#
         5402  +# Check to make sure the static flag actually works.
         5403  +#
         5404  +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
         5405  +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
         5406  +  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
         5407  +  $lt_tmp_static_flag,
         5408  +  [],
         5409  +  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  4950   5410   ])
  4951   5411   
  4952   5412   
  4953   5413   # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  4954   5414   # ------------------------------------
  4955   5415   # See if the linker supports building shared libraries.
  4956   5416   AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
................................................................................
  4967   5427         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4968   5428       fi
  4969   5429       ;;
  4970   5430     pw32*)
  4971   5431       _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4972   5432     ;;
  4973   5433     cygwin* | mingw*)
  4974         -    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
         5434  +    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  4975   5435     ;;
  4976   5436     *)
  4977   5437       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4978   5438     ;;
  4979   5439     esac
  4980   5440   ],[
  4981   5441     runpath_var=
................................................................................
  5010   5470     _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  5011   5471     # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  5012   5472     # platforms (ab)use it in PIC code, but their linkers get confused if
  5013   5473     # the symbol is explicitly referenced.  Since portable code cannot
  5014   5474     # rely on this symbol name, it's probably fine to never include it in
  5015   5475     # preloaded symbol tables.
  5016   5476     extract_expsyms_cmds=
  5017         -
         5477  +  # Just being paranoid about ensuring that cc_basename is set.
         5478  +  _LT_CC_BASENAME([$compiler])
  5018   5479     case $host_os in
  5019   5480     cygwin* | mingw* | pw32*)
  5020   5481       # FIXME: the MSVC++ port hasn't been tested in a loooong time
  5021   5482       # When not using gcc, we currently assume that we are using
  5022   5483       # Microsoft Visual C++.
  5023   5484       if test "$GCC" != yes; then
  5024   5485         with_gnu_ld=no
  5025   5486       fi
  5026   5487       ;;
         5488  +  interix*)
         5489  +    # we just hope/assume this is gcc and not c89 (= MSVC++)
         5490  +    with_gnu_ld=yes
         5491  +    ;;
  5027   5492     openbsd*)
  5028   5493       with_gnu_ld=no
  5029   5494       ;;
  5030   5495     esac
  5031   5496   
  5032   5497     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5033   5498     if test "$with_gnu_ld" = yes; then
  5034   5499       # If archive_cmds runs LD, not CC, wlarc should be empty
  5035   5500       wlarc='${wl}'
         5501  +
         5502  +    # Set some defaults for GNU ld with shared library support. These
         5503  +    # are reset later if shared libraries are not supported. Putting them
         5504  +    # here allows them to be overridden if necessary.
         5505  +    runpath_var=LD_RUN_PATH
         5506  +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
         5507  +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
         5508  +    # ancient GNU ld didn't support --whole-archive et. al.
         5509  +    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
         5510  +	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
         5511  +      else
         5512  +  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
         5513  +    fi
         5514  +    supports_anon_versioning=no
         5515  +    case `$LD -v 2>/dev/null` in
         5516  +      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
         5517  +      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
         5518  +      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
         5519  +      *\ 2.11.*) ;; # other 2.11 versions
         5520  +      *) supports_anon_versioning=yes ;;
         5521  +    esac
  5036   5522   
  5037   5523       # See if GNU ld supports shared libraries.
  5038   5524       case $host_os in
  5039   5525       aix3* | aix4* | aix5*)
  5040   5526         # On AIX/PPC, the GNU linker is very broken
  5041   5527         if test "$host_cpu" != ia64; then
  5042   5528   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
................................................................................
  5080   5566       cygwin* | mingw* | pw32*)
  5081   5567         # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5082   5568         # as there is no search path for DLLs.
  5083   5569         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5084   5570         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5085   5571         _LT_AC_TAGVAR(always_export_symbols, $1)=no
  5086   5572         _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5087         -      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
         5573  +      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  5088   5574   
  5089   5575         if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  5090         -        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
         5576  +        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5091   5577   	# If the export-symbols file already is a .def file (1st line
  5092   5578   	# is EXPORTS), use it as is; otherwise, prepend...
  5093   5579   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5094   5580   	  cp $export_symbols $output_objdir/$soname.def;
  5095   5581   	else
  5096   5582   	  echo EXPORTS > $output_objdir/$soname.def;
  5097   5583   	  cat $export_symbols >> $output_objdir/$soname.def;
  5098   5584   	fi~
  5099         -	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
         5585  +	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5100   5586         else
  5101         -	ld_shlibs=no
         5587  +	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  5102   5588         fi
  5103   5589         ;;
  5104   5590   
  5105         -    netbsd* | knetbsd*-gnu)
         5591  +    interix3*)
         5592  +      _LT_AC_TAGVAR(hardcode_direct, $1)=no
         5593  +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
         5594  +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
         5595  +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
         5596  +      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
         5597  +      # Instead, shared libraries are loaded at an image base (0x10000000 by
         5598  +      # default) and relocated if they conflict, which is a slow very memory
         5599  +      # consuming and fragmenting process.  To avoid this, we pick a random,
         5600  +      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
         5601  +      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
         5602  +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
         5603  +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
         5604  +      ;;
         5605  +
         5606  +    linux*)
         5607  +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
         5608  +	tmp_addflag=
         5609  +	case $cc_basename,$host_cpu in
         5610  +	pgcc*)				# Portland Group C compiler
         5611  +	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
         5612  +	  tmp_addflag=' $pic_flag'
         5613  +	  ;;
         5614  +	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
         5615  +	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
         5616  +	  tmp_addflag=' $pic_flag -Mnomain' ;;
         5617  +	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
         5618  +	  tmp_addflag=' -i_dynamic' ;;
         5619  +	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
         5620  +	  tmp_addflag=' -i_dynamic -nofor_main' ;;
         5621  +	ifc* | ifort*)			# Intel Fortran compiler
         5622  +	  tmp_addflag=' -nofor_main' ;;
         5623  +	esac
         5624  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
         5625  +
         5626  +	if test $supports_anon_versioning = yes; then
         5627  +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
         5628  +  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
         5629  +  $echo "local: *; };" >> $output_objdir/$libname.ver~
         5630  +	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
         5631  +	fi
         5632  +      else
         5633  +	_LT_AC_TAGVAR(ld_shlibs, $1)=no
         5634  +      fi
         5635  +      ;;
         5636  +
         5637  +    netbsd*)
  5106   5638         if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5107   5639   	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  5108   5640   	wlarc=
  5109   5641         else
  5110   5642   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5111   5643   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5112   5644         fi
  5113   5645         ;;
  5114   5646   
  5115         -    solaris* | sysv5*)
         5647  +    solaris*)
  5116   5648         if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  5117   5649   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  5118   5650   	cat <<EOF 1>&2
  5119   5651   
  5120   5652   *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  5121   5653   *** create shared libraries on Solaris systems.  Therefore, libtool
  5122   5654   *** is disabling shared libraries support.  We urge you to upgrade GNU
................................................................................
  5128   5660         elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5129   5661   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5130   5662   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5131   5663         else
  5132   5664   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  5133   5665         fi
  5134   5666         ;;
         5667  +
         5668  +    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
         5669  +      case `$LD -v 2>&1` in
         5670  +        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
         5671  +	_LT_AC_TAGVAR(ld_shlibs, $1)=no
         5672  +	cat <<_LT_EOF 1>&2
         5673  +
         5674  +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
         5675  +*** reliably create shared libraries on SCO systems.  Therefore, libtool
         5676  +*** is disabling shared libraries support.  We urge you to upgrade GNU
         5677  +*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
         5678  +*** your PATH or compiler configuration so that the native linker is
         5679  +*** used, and then restart.
         5680  +
         5681  +_LT_EOF
         5682  +	;;
         5683  +	*)
         5684  +	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
         5685  +	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
         5686  +	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
         5687  +	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
         5688  +	  else
         5689  +	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
         5690  +	  fi
         5691  +	;;
         5692  +      esac
         5693  +      ;;
  5135   5694   
  5136   5695       sunos4*)
  5137   5696         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5138   5697         wlarc=
  5139   5698         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5140   5699         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5141   5700         ;;
  5142   5701   
  5143         -  linux*)
  5144         -    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  5145         -        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5146         -	_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
  5147         -      supports_anon_versioning=no
  5148         -      case `$LD -v 2>/dev/null` in
  5149         -        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  5150         -        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  5151         -        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  5152         -        *\ 2.11.*) ;; # other 2.11 versions
  5153         -        *) supports_anon_versioning=yes ;;
  5154         -      esac
  5155         -      if test $supports_anon_versioning = yes; then
  5156         -        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  5157         -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5158         -$echo "local: *; };" >> $output_objdir/$libname.ver~
  5159         -        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5160         -      else
  5161         -        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
  5162         -      fi
  5163         -    else
  5164         -      _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5165         -    fi
  5166         -    ;;
  5167         -
  5168   5702       *)
  5169   5703         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5170   5704   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5171   5705   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5172   5706         else
  5173   5707   	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  5174   5708         fi
  5175   5709         ;;
  5176   5710       esac
  5177   5711   
  5178         -    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
  5179         -      runpath_var=LD_RUN_PATH
  5180         -      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5181         -      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5182         -      # ancient GNU ld didn't support --whole-archive et. al.
  5183         -      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  5184         - 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5185         -      else
  5186         -  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5187         -      fi
         5712  +    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
         5713  +      runpath_var=
         5714  +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
         5715  +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
         5716  +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5188   5717       fi
  5189   5718     else
  5190   5719       # PORTME fill in a description of your system's linker (not GNU ld)
  5191   5720       case $host_os in
  5192   5721       aix3*)
  5193   5722         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5194   5723         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5195   5724         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  5196   5725         # Note: this linker hardcodes the directories in LIBPATH if there
  5197   5726         # are no directories specified by -L.
  5198   5727         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5199         -      if test "$GCC" = yes && test -z "$link_static_flag"; then
         5728  +      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  5200   5729   	# Neither direct hardcoding nor static linking is supported with a
  5201   5730   	# broken collect2.
  5202   5731   	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5203   5732         fi
  5204   5733         ;;
  5205   5734   
  5206   5735       aix4* | aix5*)
................................................................................
  5226   5755   	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  5227   5756   	  for ld_flag in $LDFLAGS; do
  5228   5757     	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  5229   5758     	    aix_use_runtimelinking=yes
  5230   5759     	    break
  5231   5760     	  fi
  5232   5761   	  done
         5762  +	  ;;
  5233   5763   	esac
  5234   5764   
  5235   5765   	exp_sym_flag='-bexport'
  5236   5766   	no_entry_flag='-bnoentry'
  5237   5767         fi
  5238   5768   
  5239   5769         # When large executables or shared objects are built, AIX ld can
................................................................................
  5244   5774   
  5245   5775         _LT_AC_TAGVAR(archive_cmds, $1)=''
  5246   5776         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5247   5777         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  5248   5778         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5249   5779   
  5250   5780         if test "$GCC" = yes; then
  5251         -	case $host_os in aix4.[012]|aix4.[012].*)
         5781  +	case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5252   5782   	# We only want to do this on AIX 4.2 and lower, the check
  5253   5783   	# below for broken collect2 doesn't work under 4.3+
  5254   5784   	  collect2name=`${CC} -print-prog-name=collect2`
  5255   5785   	  if test -f "$collect2name" && \
  5256   5786     	   strings "$collect2name" | grep resolve_lib_name >/dev/null
  5257   5787   	  then
  5258   5788     	  # We have reworked collect2
................................................................................
  5263   5793     	  # It fails to find uninstalled libraries when the uninstalled
  5264   5794     	  # path is not listed in the libpath.  Setting hardcode_minus_L
  5265   5795     	  # to unsupported forces relinking
  5266   5796     	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5267   5797     	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5268   5798     	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5269   5799   	  fi
         5800  +	  ;;
  5270   5801   	esac
  5271   5802   	shared_flag='-shared'
         5803  +	if test "$aix_use_runtimelinking" = yes; then
         5804  +	  shared_flag="$shared_flag "'${wl}-G'
         5805  +	fi
  5272   5806         else
  5273   5807   	# not using gcc
  5274   5808   	if test "$host_cpu" = ia64; then
  5275   5809     	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5276   5810     	# chokes on -Wl,-G. The following line is correct:
  5277   5811   	  shared_flag='-G'
  5278   5812   	else
  5279         -  	if test "$aix_use_runtimelinking" = yes; then
         5813  +	  if test "$aix_use_runtimelinking" = yes; then
  5280   5814   	    shared_flag='${wl}-G'
  5281   5815   	  else
  5282   5816   	    shared_flag='${wl}-bM:SRE'
  5283         -  	fi
         5817  +	  fi
  5284   5818   	fi
  5285   5819         fi
  5286   5820   
  5287   5821         # It seems that -bexpall does not export symbols beginning with
  5288   5822         # underscore (_), so it is better to generate a list of symbols to export.
  5289   5823         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5290   5824         if test "$aix_use_runtimelinking" = yes; then
  5291   5825   	# Warning - without using the other runtime loading flags (-brtl),
  5292   5826   	# -berok will link without error, but may produce a broken library.
  5293   5827   	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  5294   5828          # Determine the default libpath from the value encoded in an empty executable.
  5295   5829          _LT_AC_SYS_LIBPATH_AIX
  5296   5830          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5297         -	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
         5831  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5298   5832          else
  5299   5833   	if test "$host_cpu" = ia64; then
  5300   5834   	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5301   5835   	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5302         -	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
         5836  +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  5303   5837   	else
  5304   5838   	 # Determine the default libpath from the value encoded in an empty executable.
  5305   5839   	 _LT_AC_SYS_LIBPATH_AIX
  5306   5840   	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5307   5841   	  # Warning - without using the other run time loading flags,
  5308   5842   	  # -berok will link without error, but may produce a broken library.
  5309   5843   	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5310   5844   	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5311         -	  # -bexpall does not export symbols beginning with underscore (_)
  5312         -	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5313   5845   	  # Exported symbols can be pulled into shared objects from archives
  5314         -	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
         5846  +	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5315   5847   	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5316         -	  # This is similar to how AIX traditionally builds it's shared libraries.
  5317         -	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
         5848  +	  # This is similar to how AIX traditionally builds its shared libraries.
         5849  +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5318   5850   	fi
  5319   5851         fi
  5320   5852         ;;
  5321   5853   
  5322   5854       amigaos*)
  5323   5855         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  5324   5856         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5325   5857         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5326   5858         # see comment about different semantics on the GNU ld section
  5327   5859         _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5328   5860         ;;
  5329   5861   
  5330         -    bsdi4*)
         5862  +    bsdi[[45]]*)
  5331   5863         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5332   5864         ;;
  5333   5865   
  5334   5866       cygwin* | mingw* | pw32*)
  5335   5867         # When not using gcc, we currently assume that we are using
  5336   5868         # Microsoft Visual C++.
  5337   5869         # hardcode_libdir_flag_spec is actually meaningless, as there is
  5338   5870         # no search path for DLLs.
  5339   5871         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5340   5872         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5341   5873         # Tell ltmain to make .lib files, not .a files.
  5342   5874         libext=lib
  5343   5875         # Tell ltmain to make .dll files, not .so files.
  5344         -      shrext=".dll"
         5876  +      shrext_cmds=".dll"
  5345   5877         # FIXME: Setting linknames here is a bad hack.
  5346   5878         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  5347   5879         # The linker will automatically build a .lib file if we build a DLL.
  5348   5880         _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  5349   5881         # FIXME: Should let the user specify the lib program.
  5350   5882         _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  5351         -      fix_srcfile_path='`cygpath -w "$srcfile"`'
         5883  +      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  5352   5884         _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5353   5885         ;;
  5354   5886   
  5355   5887       darwin* | rhapsody*)
  5356         -    if test "$GXX" = yes ; then
  5357         -      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5358         -      case "$host_os" in
  5359         -      rhapsody* | darwin1.[[012]])
  5360         -	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  5361         -	;;
  5362         -      *) # Darwin 1.3 on
  5363         -      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  5364         -      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  5365         -      else
  5366         -        case ${MACOSX_DEPLOYMENT_TARGET} in
  5367         -          10.[[012]])
  5368         -            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  5369         -            ;;
  5370         -          10.*)
  5371         -            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  5372         -            ;;
  5373         -        esac
  5374         -      fi
  5375         -	;;
         5888  +      case $host_os in
         5889  +        rhapsody* | darwin1.[[012]])
         5890  +         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
         5891  +         ;;
         5892  +       *) # Darwin 1.3 on
         5893  +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
         5894  +           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
         5895  +         else
         5896  +           case ${MACOSX_DEPLOYMENT_TARGET} in
         5897  +             10.[[012]])
         5898  +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
         5899  +               ;;
         5900  +             10.*)
         5901  +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
         5902  +               ;;
         5903  +           esac
         5904  +         fi
         5905  +         ;;
  5376   5906         esac
  5377         -    	lt_int_apple_cc_single_mod=no
  5378         -    	output_verbose_link_cmd='echo'
  5379         -    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  5380         -    	  lt_int_apple_cc_single_mod=yes
  5381         -    	fi
  5382         -    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  5383         -    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  5384         -    	else
  5385         -        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  5386         -      fi
  5387         -      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5388         -      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  5389         -        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  5390         -          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5391         -        else
  5392         -          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5393         -        fi
  5394         -          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         5907  +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5395   5908         _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5396   5909         _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  5397   5910         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5398         -      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
         5911  +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  5399   5912         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
         5913  +    if test "$GCC" = yes ; then
         5914  +    	output_verbose_link_cmd='echo'
         5915  +        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
         5916  +      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         5917  +      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
         5918  +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         5919  +      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5400   5920       else
  5401         -      _LT_AC_TAGVAR(ld_shlibs, $1)=no
         5921  +      case $cc_basename in
         5922  +        xlc*)
         5923  +         output_verbose_link_cmd='echo'
         5924  +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
         5925  +         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         5926  +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
         5927  +         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         5928  +          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         5929  +          ;;
         5930  +       *)
         5931  +         _LT_AC_TAGVAR(ld_shlibs, $1)=no
         5932  +          ;;
         5933  +      esac
  5402   5934       fi
  5403   5935         ;;
  5404   5936   
  5405   5937       dgux*)
  5406   5938         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5407   5939         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5408   5940         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
................................................................................
  5428   5960         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5429   5961         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5430   5962         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5431   5963         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5432   5964         ;;
  5433   5965   
  5434   5966       # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5435         -    freebsd* | kfreebsd*-gnu)
         5967  +    freebsd* | kfreebsd*-gnu | dragonfly*)
  5436   5968         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  5437   5969         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5438   5970         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5439   5971         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5440   5972         ;;
  5441   5973   
  5442   5974       hpux9*)
................................................................................
  5451   5983   
  5452   5984         # hardcode_minus_L: Not really in the search PATH,
  5453   5985         # but as the default location of the library.
  5454   5986         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5455   5987         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5456   5988         ;;
  5457   5989   
  5458         -    hpux10* | hpux11*)
         5990  +    hpux10*)
         5991  +      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
         5992  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
         5993  +      else
         5994  +	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
         5995  +      fi
         5996  +      if test "$with_gnu_ld" = no; then
         5997  +	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         5998  +	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
         5999  +
         6000  +	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
         6001  +	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
         6002  +
         6003  +	# hardcode_minus_L: Not really in the search PATH,
         6004  +	# but as the default location of the library.
         6005  +	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
         6006  +      fi
         6007  +      ;;
         6008  +
         6009  +    hpux11*)
  5459   6010         if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5460         -	case "$host_cpu" in
  5461         -	hppa*64*|ia64*)
         6011  +	case $host_cpu in
         6012  +	hppa*64*)
  5462   6013   	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5463   6014   	  ;;
         6015  +	ia64*)
         6016  +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
         6017  +	  ;;
  5464   6018   	*)
  5465   6019   	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5466   6020   	  ;;
  5467   6021   	esac
  5468   6022         else
  5469         -	case "$host_cpu" in
  5470         -	hppa*64*|ia64*)
  5471         -	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
         6023  +	case $host_cpu in
         6024  +	hppa*64*)
         6025  +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
         6026  +	  ;;
         6027  +	ia64*)
         6028  +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5472   6029   	  ;;
  5473   6030   	*)
  5474         -	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
         6031  +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5475   6032   	  ;;
  5476   6033   	esac
  5477   6034         fi
  5478   6035         if test "$with_gnu_ld" = no; then
  5479         -	case "$host_cpu" in
  5480         -	hppa*64*)
  5481         -	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         6036  +	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         6037  +	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
         6038  +
         6039  +	case $host_cpu in
         6040  +	hppa*64*|ia64*)
  5482   6041   	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  5483         -	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5484   6042   	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5485   6043   	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5486   6044   	  ;;
  5487         -	ia64*)
  5488         -	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5489         -	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5490         -	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5491         -
  5492         -	  # hardcode_minus_L: Not really in the search PATH,
  5493         -	  # but as the default location of the library.
  5494         -	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5495         -	  ;;
  5496   6045   	*)
  5497         -	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5498         -	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5499   6046   	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5500   6047   	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5501   6048   
  5502   6049   	  # hardcode_minus_L: Not really in the search PATH,
  5503   6050   	  # but as the default location of the library.
  5504   6051   	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5505   6052   	  ;;
................................................................................
  5515   6062   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  5516   6063         fi
  5517   6064         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5518   6065         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5519   6066         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5520   6067         ;;
  5521   6068   
  5522         -    netbsd* | knetbsd*-gnu)
         6069  +    netbsd*)
  5523   6070         if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5524   6071   	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
  5525   6072         else
  5526   6073   	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
  5527   6074         fi
  5528   6075         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5529   6076         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
................................................................................
  5539   6086         ;;
  5540   6087   
  5541   6088       openbsd*)
  5542   6089         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5543   6090         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5544   6091         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5545   6092   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
         6093  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5546   6094   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5547   6095   	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5548   6096         else
  5549   6097          case $host_os in
  5550   6098   	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5551   6099   	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5552   6100   	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
................................................................................
  5584   6132   	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5585   6133   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5586   6134   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5587   6135         else
  5588   6136   	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5589   6137   	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5590   6138   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  5591         -	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
         6139  +	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  5592   6140   
  5593   6141   	# Both c and cxx compiler support -rpath directly
  5594   6142   	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5595   6143         fi
  5596   6144         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5597   6145         ;;
  5598   6146   
  5599         -    sco3.2v5*)
  5600         -      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5601         -      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5602         -      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5603         -      runpath_var=LD_RUN_PATH
  5604         -      hardcode_runpath_var=yes
  5605         -      ;;
  5606         -
  5607   6147       solaris*)
  5608   6148         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5609   6149         if test "$GCC" = yes; then
         6150  +	wlarc='${wl}'
  5610   6151   	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5611   6152   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5612   6153   	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  5613   6154         else
         6155  +	wlarc=''
  5614   6156   	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5615   6157   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5616   6158     	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5617   6159         fi
  5618   6160         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5619   6161         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5620   6162         case $host_os in
  5621   6163         solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5622         -      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  5623         -	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
         6164  +      *)
         6165  + 	# The compiler driver will combine linker options so we
         6166  + 	# cannot just pass the convience library names through
         6167  + 	# without $wl, iff we do not link with $LD.
         6168  + 	# Luckily, gcc supports the same syntax we need for Sun Studio.
         6169  + 	# Supported since Solaris 2.6 (maybe 2.5.1?)
         6170  + 	case $wlarc in
         6171  + 	'')
         6172  + 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
         6173  + 	*)
         6174  + 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
         6175  + 	esac ;;
  5624   6176         esac
  5625   6177         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5626   6178         ;;
  5627   6179   
  5628   6180       sunos4*)
  5629   6181         if test "x$host_vendor" = xsequent; then
  5630   6182   	# Use $CC to link under sequent, because it throws in some extra .o
................................................................................
  5673   6225   	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5674   6226   	runpath_var=LD_RUN_PATH
  5675   6227   	hardcode_runpath_var=yes
  5676   6228   	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5677   6229         fi
  5678   6230         ;;
  5679   6231   
  5680         -    sysv4.2uw2*)
  5681         -      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5682         -      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5683         -      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
         6232  +    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
         6233  +      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
         6234  +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5684   6235         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5685         -      hardcode_runpath_var=yes
  5686         -      runpath_var=LD_RUN_PATH
  5687         -      ;;
         6236  +      runpath_var='LD_RUN_PATH'
  5688   6237   
  5689         -   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
  5690         -      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
  5691   6238         if test "$GCC" = yes; then
  5692         -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
         6239  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
         6240  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5693   6241         else
  5694         -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
         6242  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
         6243  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5695   6244         fi
  5696         -      runpath_var='LD_RUN_PATH'
  5697         -      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5698   6245         ;;
  5699   6246   
  5700         -    sysv5*)
  5701         -      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5702         -      # $CC -shared without GNU ld will not create a library from C++
  5703         -      # object files and a static libstdc++, better avoid it by now
  5704         -      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5705         -      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5706         -  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5707         -      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
         6247  +    sysv5* | sco3.2v5* | sco5v6*)
         6248  +      # Note: We can NOT use -z defs as we might desire, because we do not
         6249  +      # link with -lc, and that would cause any symbols used from libc to
         6250  +      # always be unresolved, which means just about no library would
         6251  +      # ever link correctly.  If we're not using GNU ld we use -z text
         6252  +      # though, which does catch some bad symbols but isn't as heavy-handed
         6253  +      # as -z defs.
         6254  +      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
         6255  +      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
         6256  +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5708   6257         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
         6258  +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
         6259  +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
         6260  +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
         6261  +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5709   6262         runpath_var='LD_RUN_PATH'
         6263  +
         6264  +      if test "$GCC" = yes; then
         6265  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         6266  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         6267  +      else
         6268  +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         6269  +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
         6270  +      fi
  5710   6271         ;;
  5711   6272   
  5712   6273       uts4*)
  5713   6274         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5714   6275         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5715   6276         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5716   6277         ;;
................................................................................
  5720   6281         ;;
  5721   6282       esac
  5722   6283     fi
  5723   6284   ])
  5724   6285   AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  5725   6286   test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5726   6287   
  5727         -variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  5728         -if test "$GCC" = yes; then
  5729         -  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  5730         -fi
  5731         -
  5732   6288   #
  5733   6289   # Do we need to explicitly link libc?
  5734   6290   #
  5735   6291   case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  5736   6292   x|xyes)
  5737   6293     # Assume -lc should be added
  5738   6294     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
................................................................................
  5752   6308   
  5753   6309         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5754   6310           soname=conftest
  5755   6311           lib=conftest
  5756   6312           libobjs=conftest.$ac_objext
  5757   6313           deplibs=
  5758   6314           wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
         6315  +	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  5759   6316           compiler_flags=-v
  5760   6317           linker_flags=-v
  5761   6318           verstring=
  5762   6319           output_objdir=.
  5763   6320           libname=conftest
  5764   6321           lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  5765   6322           _LT_AC_TAGVAR(allow_undefined_flag, $1)=
................................................................................
  5877   6434     done
  5878   6435   done
  5879   6436   lt_ac_max=0
  5880   6437   lt_ac_count=0
  5881   6438   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  5882   6439   # along with /bin/sed that truncates output.
  5883   6440   for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  5884         -  test ! -f $lt_ac_sed && break
         6441  +  test ! -f $lt_ac_sed && continue
  5885   6442     cat /dev/null > conftest.in
  5886   6443     lt_ac_count=0
  5887   6444     echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  5888   6445     # Check for GNU sed and select it if it is found.
  5889   6446     if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  5890   6447       lt_cv_path_SED=$lt_ac_sed
  5891   6448       break
................................................................................
  5902   6459       lt_ac_count=`expr $lt_ac_count + 1`
  5903   6460       if test $lt_ac_count -gt $lt_ac_max; then
  5904   6461         lt_ac_max=$lt_ac_count
  5905   6462         lt_cv_path_SED=$lt_ac_sed
  5906   6463       fi
  5907   6464     done
  5908   6465   done
  5909         -SED=$lt_cv_path_SED
  5910   6466   ])
         6467  +SED=$lt_cv_path_SED
  5911   6468   AC_MSG_RESULT([$SED])
  5912   6469   ])
  5913   6470   

Changes to config.guess.

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

Changes to config.sub.

     1      1   #! /bin/sh
     2      2   # Configuration validation subroutine script.
     3      3   #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4         -#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
            4  +#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
            5  +#   Inc.
     5      6   
     6         -timestamp='2004-01-05'
            7  +timestamp='2007-01-18'
     7      8   
     8      9   # This file is (in principle) common to ALL GNU software.
     9     10   # The presence of a machine in this file suggests that SOME GNU software
    10     11   # can handle that machine.  It does not imply ALL GNU software can.
    11     12   #
    12     13   # This file is free software; you can redistribute it and/or modify
    13     14   # it under the terms of the GNU General Public License as published by
................................................................................
    17     18   # This program is distributed in the hope that it will be useful,
    18     19   # but WITHOUT ANY WARRANTY; without even the implied warranty of
    19     20   # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    20     21   # GNU General Public License for more details.
    21     22   #
    22     23   # You should have received a copy of the GNU General Public License
    23     24   # along with this program; if not, write to the Free Software
    24         -# Foundation, Inc., 59 Temple Place - Suite 330,
    25         -# Boston, MA 02111-1307, USA.
    26         -
           25  +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
           26  +# 02110-1301, USA.
           27  +#
    27     28   # As a special exception to the GNU General Public License, if you
    28     29   # distribute this file as part of a program that contains a
    29     30   # configuration script generated by Autoconf, you may include it under
    30     31   # the same distribution terms that you use for the rest of that program.
           32  +
    31     33   
    32     34   # Please send patches to <config-patches@gnu.org>.  Submit a context
    33     35   # diff and a properly formatted ChangeLog entry.
    34     36   #
    35     37   # Configuration subroutine to validate and canonicalize a configuration type.
    36     38   # Supply the specified configuration type as an argument.
    37     39   # If it is invalid, we print an error message on stderr and exit with code 1.
................................................................................
    66     68     -v, --version      print version number, then exit
    67     69   
    68     70   Report bugs and patches to <config-patches@gnu.org>."
    69     71   
    70     72   version="\
    71     73   GNU config.sub ($timestamp)
    72     74   
    73         -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
           75  +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    74     76   Free Software Foundation, Inc.
    75     77   
    76     78   This is free software; see the source for copying conditions.  There is NO
    77     79   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    78     80   
    79     81   help="
    80     82   Try \`$me --help' for more information."
    81     83   
    82     84   # Parse command line
    83     85   while test $# -gt 0 ; do
    84     86     case $1 in
    85     87       --time-stamp | --time* | -t )
    86         -       echo "$timestamp" ; exit 0 ;;
           88  +       echo "$timestamp" ; exit ;;
    87     89       --version | -v )
    88         -       echo "$version" ; exit 0 ;;
           90  +       echo "$version" ; exit ;;
    89     91       --help | --h* | -h )
    90         -       echo "$usage"; exit 0 ;;
           92  +       echo "$usage"; exit ;;
    91     93       -- )     # Stop option processing
    92     94          shift; break ;;
    93     95       - )	# Use stdin as input.
    94     96          break ;;
    95     97       -* )
    96     98          echo "$me: invalid option $1$help"
    97     99          exit 1 ;;
    98    100   
    99    101       *local*)
   100    102          # First pass through any local machine types.
   101    103          echo $1
   102         -       exit 0;;
          104  +       exit ;;
   103    105   
   104    106       * )
   105    107          break ;;
   106    108     esac
   107    109   done
   108    110   
   109    111   case $# in
................................................................................
   114    116       exit 1;;
   115    117   esac
   116    118   
   117    119   # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
   118    120   # Here we must recognize all the valid KERNEL-OS combinations.
   119    121   maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
   120    122   case $maybe_os in
   121         -  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
   122         -  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
          123  +  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
          124  +  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
          125  +  storm-chaos* | os2-emx* | rtmk-nova*)
   123    126       os=-$maybe_os
   124    127       basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
   125    128       ;;
   126    129     *)
   127    130       basic_machine=`echo $1 | sed 's/-[^-]*$//'`
   128    131       if [ $basic_machine != $1 ]
   129    132       then os=`echo $1 | sed 's/.*-/-/'`
................................................................................
   141    144   		;;
   142    145   	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
   143    146   	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
   144    147   	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
   145    148   	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   146    149   	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   147    150   	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
   148         -	-apple | -axis)
          151  +	-apple | -axis | -knuth | -cray)
   149    152   		os=
   150    153   		basic_machine=$1
   151    154   		;;
   152    155   	-sim | -cisco | -oki | -wec | -winbond)
   153    156   		os=
   154    157   		basic_machine=$1
   155    158   		;;
................................................................................
   166    169    	-chorusrdb)
   167    170    		os=-chorusrdb
   168    171   		basic_machine=$1
   169    172    		;;
   170    173   	-hiux*)
   171    174   		os=-hiuxwe2
   172    175   		;;
          176  +	-sco6)
          177  +		os=-sco5v6
          178  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          179  +		;;
   173    180   	-sco5)
   174    181   		os=-sco3.2v5
   175    182   		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
   176    183   		;;
   177    184   	-sco4)
   178    185   		os=-sco3.2v4
   179    186   		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
   180    187   		;;
   181    188   	-sco3.2.[4-9]*)
   182    189   		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
   183    190   		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
   184    191   		;;
   185    192   	-sco3.2v[4-9]*)
          193  +		# Don't forget version if it is 3.2v4 or newer.
          194  +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
          195  +		;;
          196  +	-sco5v6*)
   186    197   		# Don't forget version if it is 3.2v4 or newer.
   187    198   		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
   188    199   		;;
   189    200   	-sco*)
   190    201   		os=-sco3.2v2
   191    202   		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
   192    203   		;;
................................................................................
   226    237   	# Recognize the basic CPU types without company name.
   227    238   	# Some are omitted here because they have special meanings below.
   228    239   	1750a | 580 \
   229    240   	| a29k \
   230    241   	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
   231    242   	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
   232    243   	| am33_2.0 \
   233         -	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
          244  +	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
          245  +	| bfin \
   234    246   	| c4x | clipper \
   235         -	| d10v | d30v | dlx | dsp16xx \
   236         -	| fr30 | frv \
          247  +	| d10v | d30v | dlx | dsp16xx | dvp \
          248  +	| fido | fr30 | frv \
   237    249   	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
   238    250   	| i370 | i860 | i960 | ia64 \
   239    251   	| ip2k | iq2000 \
   240         -	| m32r | m68000 | m68k | m88k | mcore \
          252  +	| m32c | m32r | m32rle | m68000 | m68k | m88k \
          253  +	| maxq | mb | microblaze | mcore | mep \
   241    254   	| mips | mipsbe | mipseb | mipsel | mipsle \
   242    255   	| mips16 \
   243    256   	| mips64 | mips64el \
   244    257   	| mips64vr | mips64vrel \
   245    258   	| mips64orion | mips64orionel \
   246    259   	| mips64vr4100 | mips64vr4100el \
   247    260   	| mips64vr4300 | mips64vr4300el \
   248    261   	| mips64vr5000 | mips64vr5000el \
          262  +	| mips64vr5900 | mips64vr5900el \
   249    263   	| mipsisa32 | mipsisa32el \
   250    264   	| mipsisa32r2 | mipsisa32r2el \
   251    265   	| mipsisa64 | mipsisa64el \
   252    266   	| mipsisa64r2 | mipsisa64r2el \
   253    267   	| mipsisa64sb1 | mipsisa64sb1el \
   254    268   	| mipsisa64sr71k | mipsisa64sr71kel \
   255    269   	| mipstx39 | mipstx39el \
   256    270   	| mn10200 | mn10300 \
          271  +	| mt \
   257    272   	| msp430 \
          273  +	| nios | nios2 \
   258    274   	| ns16k | ns32k \
   259         -	| openrisc | or32 \
          275  +	| or32 \
   260    276   	| pdp10 | pdp11 | pj | pjl \
   261    277   	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
   262    278   	| pyramid \
   263         -	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
          279  +	| score \
          280  +	| sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   264    281   	| sh64 | sh64le \
   265         -	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
   266         -	| strongarm \
          282  +	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
          283  +	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
          284  +	| spu | strongarm \
   267    285   	| tahoe | thumb | tic4x | tic80 | tron \
   268    286   	| v850 | v850e \
   269    287   	| we32k \
   270         -	| x86 | xscale | xstormy16 | xtensa \
          288  +	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
   271    289   	| z8k)
   272    290   		basic_machine=$basic_machine-unknown
   273    291   		;;
   274    292   	m6811 | m68hc11 | m6812 | m68hc12)
   275    293   		# Motorola 68HC11/12.
   276    294   		basic_machine=$basic_machine-unknown
   277    295   		os=-none
   278    296   		;;
   279    297   	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
   280    298   		;;
          299  +	ms1)
          300  +		basic_machine=mt-unknown
          301  +		;;
   281    302   
   282    303   	# We use `pc' rather than `unknown'
   283    304   	# because (1) that's what they normally are, and
   284    305   	# (2) the word "unknown" tends to confuse beginning users.
   285    306   	i*86 | x86_64)
   286    307   	  basic_machine=$basic_machine-pc
   287    308   	  ;;
................................................................................
   293    314   	# Recognize the basic CPU types with company name.
   294    315   	580-* \
   295    316   	| a29k-* \
   296    317   	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   297    318   	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   298    319   	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
   299    320   	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   300         -	| avr-* \
   301         -	| bs2000-* \
          321  +	| avr-* | avr32-* \
          322  +	| bfin-* | bs2000-* \
   302    323   	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
   303         -	| clipper-* | cydra-* \
          324  +	| clipper-* | craynv-* | cydra-* \
   304    325   	| d10v-* | d30v-* | dlx-* \
   305    326   	| elxsi-* \
   306         -	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
          327  +	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
   307    328   	| h8300-* | h8500-* \
   308    329   	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   309    330   	| i*86-* | i860-* | i960-* | ia64-* \
   310    331   	| ip2k-* | iq2000-* \
   311         -	| m32r-* \
          332  +	| m32c-* | m32r-* | m32rle-* \
   312    333   	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   313         -	| m88110-* | m88k-* | mcore-* \
          334  +	| m88110-* | m88k-* | maxq-* | mcore-* \
   314    335   	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   315    336   	| mips16-* \
   316    337   	| mips64-* | mips64el-* \
   317    338   	| mips64vr-* | mips64vrel-* \
   318    339   	| mips64orion-* | mips64orionel-* \
   319    340   	| mips64vr4100-* | mips64vr4100el-* \
   320    341   	| mips64vr4300-* | mips64vr4300el-* \
   321    342   	| mips64vr5000-* | mips64vr5000el-* \
          343  +	| mips64vr5900-* | mips64vr5900el-* \
   322    344   	| mipsisa32-* | mipsisa32el-* \
   323    345   	| mipsisa32r2-* | mipsisa32r2el-* \
   324    346   	| mipsisa64-* | mipsisa64el-* \
   325    347   	| mipsisa64r2-* | mipsisa64r2el-* \
   326    348   	| mipsisa64sb1-* | mipsisa64sb1el-* \
   327    349   	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
   328    350   	| mipstx39-* | mipstx39el-* \
          351  +	| mmix-* \
          352  +	| mt-* \
   329    353   	| msp430-* \
   330         -	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
          354  +	| nios-* | nios2-* \
          355  +	| none-* | np1-* | ns16k-* | ns32k-* \
   331    356   	| orion-* \
   332    357   	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   333    358   	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
   334    359   	| pyramid-* \
   335    360   	| romp-* | rs6000-* \
   336         -	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
          361  +	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
   337    362   	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   338         -	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
   339         -	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
          363  +	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
          364  +	| sparclite-* \
          365  +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
   340    366   	| tahoe-* | thumb-* \
   341    367   	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
   342    368   	| tron-* \
   343    369   	| v850-* | v850e-* | vax-* \
   344    370   	| we32k-* \
   345         -	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
   346         -	| xtensa-* \
          371  +	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
          372  +	| xstormy16-* | xtensa-* \
   347    373   	| ymp-* \
   348    374   	| z8k-*)
   349    375   		;;
   350    376   	# Recognize the various machine names and aliases which stand
   351    377   	# for a CPU type and a company and sometimes even an OS.
   352    378   	386bsd)
   353    379   		basic_machine=i386-unknown
................................................................................
   359    385   	3b*)
   360    386   		basic_machine=we32k-att
   361    387   		;;
   362    388   	a29khif)
   363    389   		basic_machine=a29k-amd
   364    390   		os=-udi
   365    391   		;;
          392  +    	abacus)
          393  +		basic_machine=abacus-unknown
          394  +		;;
   366    395   	adobe68k)
   367    396   		basic_machine=m68010-adobe
   368    397   		os=-scout
   369    398   		;;
   370    399   	alliant | fx80)
   371    400   		basic_machine=fx80-alliant
   372    401   		;;
................................................................................
   438    467   		basic_machine=c38-convex
   439    468   		os=-bsd
   440    469   		;;
   441    470   	cray | j90)
   442    471   		basic_machine=j90-cray
   443    472   		os=-unicos
   444    473   		;;
          474  +	craynv)
          475  +		basic_machine=craynv-cray
          476  +		os=-unicosmp
          477  +		;;
          478  +	cr16c)
          479  +		basic_machine=cr16c-unknown
          480  +		os=-elf
          481  +		;;
   445    482   	crds | unos)
   446    483   		basic_machine=m68k-crds
   447    484   		;;
          485  +	crisv32 | crisv32-* | etraxfs*)
          486  +		basic_machine=crisv32-axis
          487  +		;;
   448    488   	cris | cris-* | etrax*)
   449    489   		basic_machine=cris-axis
   450    490   		;;
          491  +	crx)
          492  +		basic_machine=crx-unknown
          493  +		os=-elf
          494  +		;;
   451    495   	da30 | da30-*)
   452    496   		basic_machine=m68k-da30
   453    497   		;;
   454    498   	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
   455    499   		basic_machine=mips-dec
   456    500   		;;
   457    501   	decsystem10* | dec10*)
................................................................................
   466    510   	      | 3300-motorola | delta-motorola)
   467    511   		basic_machine=m68k-motorola
   468    512   		;;
   469    513   	delta88)
   470    514   		basic_machine=m88k-motorola
   471    515   		os=-sysv3
   472    516   		;;
          517  +	djgpp)
          518  +		basic_machine=i586-pc
          519  +		os=-msdosdjgpp
          520  +		;;
   473    521   	dpx20 | dpx20-*)
   474    522   		basic_machine=rs6000-bull
   475    523   		os=-bosx
   476    524   		;;
   477    525   	dpx2* | dpx2*-bull)
   478    526   		basic_machine=m68k-bull
   479    527   		os=-sysv3
................................................................................
   637    685   		;;
   638    686   	miniframe)
   639    687   		basic_machine=m68000-convergent
   640    688   		;;
   641    689   	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
   642    690   		basic_machine=m68k-atari
   643    691   		os=-mint
          692  +		;;
          693  +	mipsEE* | ee | ps2)
          694  +		basic_machine=mips64r5900el-scei
          695  +		case $os in
          696  +		    -linux*)
          697  +			;;
          698  +		    *)
          699  +			os=-elf
          700  +			;;
          701  +		esac
          702  +		;;
          703  +	iop)
          704  +		basic_machine=mipsel-scei
          705  +		os=-irx
          706  +		;;
          707  +	dvp)
          708  +		basic_machine=dvp-scei
          709  +		os=-elf
   644    710   		;;
   645    711   	mips3*-*)
   646    712   		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
   647    713   		;;
   648    714   	mips3*)
   649    715   		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
   650    716   		;;
   651         -	mmix*)
   652         -		basic_machine=mmix-knuth
   653         -		os=-mmixware
   654         -		;;
   655    717   	monitor)
   656    718   		basic_machine=m68k-rom68k
   657    719   		os=-coff
   658    720   		;;
   659    721   	morphos)
   660    722   		basic_machine=powerpc-unknown
   661    723   		os=-morphos
   662    724   		;;
   663    725   	msdos)
   664    726   		basic_machine=i386-pc
   665    727   		os=-msdos
   666    728   		;;
          729  +	ms1-*)
          730  +		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
          731  +		;;
   667    732   	mvs)
   668    733   		basic_machine=i370-ibm
   669    734   		os=-mvs
   670    735   		;;
   671    736   	ncr3000)
   672    737   		basic_machine=i486-ncr
   673    738   		os=-sysv4
................................................................................
   728    793   	nonstopux)
   729    794   		basic_machine=mips-compaq
   730    795   		os=-nonstopux
   731    796   		;;
   732    797   	np1)
   733    798   		basic_machine=np1-gould
   734    799   		;;
   735         -	nv1)
   736         -		basic_machine=nv1-cray
   737         -		os=-unicosmp
   738         -		;;
   739    800   	nsr-tandem)
   740    801   		basic_machine=nsr-tandem
   741    802   		;;
   742    803   	op50n-* | op60c-*)
   743    804   		basic_machine=hppa1.1-oki
   744    805   		os=-proelf
   745    806   		;;
   746         -	or32 | or32-*)
          807  +	openrisc | openrisc-*)
   747    808   		basic_machine=or32-unknown
   748         -		os=-coff
   749    809   		;;
   750    810   	os400)
   751    811   		basic_machine=powerpc-ibm
   752    812   		os=-os400
   753    813   		;;
   754    814   	OSE68000 | ose68000)
   755    815   		basic_machine=m68000-ericsson
................................................................................
   772    832   		;;
   773    833   	pbb)
   774    834   		basic_machine=m68k-tti
   775    835   		;;
   776    836   	pc532 | pc532-*)
   777    837   		basic_machine=ns32k-pc532
   778    838   		;;
          839  +	pc98)
          840  +		basic_machine=i386-pc
          841  +		;;
          842  +	pc98-*)
          843  +		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
          844  +		;;
   779    845   	pentium | p5 | k5 | k6 | nexgen | viac3)
   780    846   		basic_machine=i586-pc
   781    847   		;;
   782    848   	pentiumpro | p6 | 6x86 | athlon | athlon_*)
   783    849   		basic_machine=i686-pc
   784    850   		;;
   785    851   	pentiumii | pentium2 | pentiumiii | pentium3)
................................................................................
   828    894   	ps2)
   829    895   		basic_machine=i386-ibm
   830    896   		;;
   831    897   	pw32)
   832    898   		basic_machine=i586-unknown
   833    899   		os=-pw32
   834    900   		;;
          901  +	rdos)
          902  +		basic_machine=i386-pc
          903  +		os=-rdos
          904  +		;;
   835    905   	rom68k)
   836    906   		basic_machine=m68k-rom68k
   837    907   		os=-coff
   838    908   		;;
   839    909   	rm[46]00)
   840    910   		basic_machine=mips-siemens
   841    911   		;;
................................................................................
   854    924   		;;
   855    925   	sb1)
   856    926   		basic_machine=mipsisa64sb1-unknown
   857    927   		;;
   858    928   	sb1el)
   859    929   		basic_machine=mipsisa64sb1el-unknown
   860    930   		;;
          931  +	sde)
          932  +		basic_machine=mipsisa32-sde
          933  +		os=-elf
          934  +		;;
   861    935   	sei)
   862    936   		basic_machine=mips-sei
   863    937   		os=-seiux
   864    938   		;;
   865    939   	sequent)
   866    940   		basic_machine=i386-sequent
   867    941   		;;
   868    942   	sh)
   869    943   		basic_machine=sh-hitachi
   870    944   		os=-hms
   871    945   		;;
          946  +	sh5el)
          947  +		basic_machine=sh5le-unknown
          948  +		;;
   872    949   	sh64)
   873    950   		basic_machine=sh64-unknown
   874    951   		;;
   875    952   	sparclite-wrs | simso-wrs)
   876    953   		basic_machine=sparclite-wrs
   877    954   		os=-vxworks
   878    955   		;;
................................................................................
  1014   1091   		basic_machine=w65-wdc
  1015   1092   		os=-none
  1016   1093   		;;
  1017   1094   	w89k-*)
  1018   1095   		basic_machine=hppa1.1-winbond
  1019   1096   		os=-proelf
  1020   1097   		;;
         1098  +	xbox)
         1099  +		basic_machine=i686-pc
         1100  +		os=-mingw32
         1101  +		;;
  1021   1102   	xps | xps100)
  1022   1103   		basic_machine=xps100-honeywell
  1023   1104   		;;
  1024   1105   	ymp)
  1025   1106   		basic_machine=ymp-cray
  1026   1107   		os=-unicos
  1027   1108   		;;
................................................................................
  1044   1125   		;;
  1045   1126   	op60c)
  1046   1127   		basic_machine=hppa1.1-oki
  1047   1128   		;;
  1048   1129   	romp)
  1049   1130   		basic_machine=romp-ibm
  1050   1131   		;;
         1132  +	mmix)
         1133  +		basic_machine=mmix-knuth
         1134  +		;;
  1051   1135   	rs6000)
  1052   1136   		basic_machine=rs6000-ibm
  1053   1137   		;;
  1054   1138   	vax)
  1055   1139   		basic_machine=vax-dec
  1056   1140   		;;
  1057   1141   	pdp10)
................................................................................
  1060   1144   		;;
  1061   1145   	pdp11)
  1062   1146   		basic_machine=pdp11-dec
  1063   1147   		;;
  1064   1148   	we32k)
  1065   1149   		basic_machine=we32k-att
  1066   1150   		;;
  1067         -	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
         1151  +	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
  1068   1152   		basic_machine=sh-unknown
  1069   1153   		;;
  1070         -	sh64)
  1071         -		basic_machine=sh64-unknown
  1072         -		;;
  1073         -	sparc | sparcv9 | sparcv9b)
         1154  +	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
  1074   1155   		basic_machine=sparc-sun
  1075   1156   		;;
  1076   1157   	cydra)
  1077   1158   		basic_machine=cydra-cydrome
  1078   1159   		;;
  1079   1160   	orion)
  1080   1161   		basic_machine=orion-highlevel
................................................................................
  1139   1220   	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1140   1221   	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  1141   1222   	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  1142   1223   	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1143   1224   	      | -aos* \
  1144   1225   	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1145   1226   	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1146         -	      | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
  1147         -	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
         1227  +	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
         1228  +	      | -openbsd* | -solidbsd* \
         1229  +	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
         1230  +	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1148   1231   	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1149   1232   	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1150   1233   	      | -chorusos* | -chorusrdb* \
  1151   1234   	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1152         -	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
         1235  +	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
         1236  +	      | -uxpv* | -beos* | -mpeix* | -udk* \
  1153   1237   	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1154   1238   	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1155   1239   	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1156   1240   	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1157   1241   	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1158         -	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
         1242  +	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
         1243  +	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
  1159   1244   	# Remember, each alternative MUST END IN *, to match a version number.
  1160   1245   		;;
  1161   1246   	-qnx*)
  1162   1247   		case $basic_machine in
  1163   1248   		    x86-* | i*86-*)
  1164   1249   			;;
  1165   1250   		    *)
................................................................................
  1169   1254   		;;
  1170   1255   	-nto-qnx*)
  1171   1256   		;;
  1172   1257   	-nto*)
  1173   1258   		os=`echo $os | sed -e 's|nto|nto-qnx|'`
  1174   1259   		;;
  1175   1260   	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1176         -	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
         1261  +	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
  1177   1262   	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1178   1263   		;;
  1179   1264   	-mac*)
  1180   1265   		os=`echo $os | sed -e 's|mac|macos|'`
  1181   1266   		;;
  1182   1267   	-linux-dietlibc)
  1183   1268   		os=-linux-dietlibc
................................................................................
  1278   1363   		;;
  1279   1364   	-aros*)
  1280   1365   		os=-aros
  1281   1366   		;;
  1282   1367   	-kaos*)
  1283   1368   		os=-kaos
  1284   1369   		;;
         1370  +	-zvmoe)
         1371  +		os=-zvmoe
         1372  +		;;
  1285   1373   	-none)
  1286   1374   		;;
  1287   1375   	*)
  1288   1376   		# Get rid of the `-' at the beginning of $os.
  1289   1377   		os=`echo $os | sed 's/[^-]*-//'`
  1290   1378   		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1291   1379   		exit 1
................................................................................
  1300   1388   # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1301   1389   # "-sun"), then you have to tell the case statement up towards the top
  1302   1390   # that MANUFACTURER isn't an operating system.  Otherwise, code above
  1303   1391   # will signal an error saying that MANUFACTURER isn't an operating
  1304   1392   # system, and we'll never get to this point.
  1305   1393   
  1306   1394   case $basic_machine in
         1395  +        score-*)
         1396  +		os=-elf
         1397  +		;;
         1398  +        spu-*)
         1399  +		os=-elf
         1400  +		;;
  1307   1401   	*-acorn)
  1308   1402   		os=-riscix1.2
  1309   1403   		;;
  1310   1404   	arm*-rebel)
  1311   1405   		os=-linux
  1312   1406   		;;
  1313   1407   	arm*-semi)
  1314   1408   		os=-aout
  1315   1409   		;;
  1316         -    c4x-* | tic4x-*)
  1317         -        os=-coff
  1318         -        ;;
         1410  +        c4x-* | tic4x-*)
         1411  +        	os=-coff
         1412  +		;;
  1319   1413   	# This must come before the *-dec entry.
  1320   1414   	pdp10-*)
  1321   1415   		os=-tops20
  1322   1416   		;;
  1323   1417   	pdp11-*)
  1324   1418   		os=-none
  1325   1419   		;;
................................................................................
  1336   1430   		os=-sunos3
  1337   1431   		# This also exists in the configure program, but was not the
  1338   1432   		# default.
  1339   1433   		# os=-sunos4
  1340   1434   		;;
  1341   1435   	m68*-cisco)
  1342   1436   		os=-aout
         1437  +		;;
         1438  +        mep-*)
         1439  +		os=-elf
  1343   1440   		;;
  1344   1441   	mips*-cisco)
  1345   1442   		os=-elf
  1346   1443   		;;
  1347   1444   	mips*-*)
  1348   1445   		os=-elf
  1349   1446   		;;
................................................................................
  1355   1452   		;;
  1356   1453   	sparc-* | *-sun)
  1357   1454   		os=-sunos4.1.1
  1358   1455   		;;
  1359   1456   	*-be)
  1360   1457   		os=-beos
  1361   1458   		;;
         1459  +	*-haiku)
         1460  +		os=-haiku
         1461  +		;;
  1362   1462   	*-ibm)
  1363   1463   		os=-aix
  1364   1464   		;;
         1465  +    	*-knuth)
         1466  +		os=-mmixware
         1467  +		;;
  1365   1468   	*-wec)
  1366   1469   		os=-proelf
  1367   1470   		;;
  1368   1471   	*-winbond)
  1369   1472   		os=-proelf
  1370   1473   		;;
  1371   1474   	*-oki)
................................................................................
  1523   1626   				;;
  1524   1627   		esac
  1525   1628   		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1526   1629   		;;
  1527   1630   esac
  1528   1631   
  1529   1632   echo $basic_machine$os
  1530         -exit 0
         1633  +exit
  1531   1634   
  1532   1635   # Local variables:
  1533   1636   # eval: (add-hook 'write-file-hooks 'time-stamp)
  1534   1637   # time-stamp-start: "timestamp='"
  1535   1638   # time-stamp-format: "%:y-%02m-%02d"
  1536   1639   # time-stamp-end: "'"
  1537   1640   # End:

Changes to configure.

more than 10,000 changes

Changes to ltmain.sh.

     1      1   # ltmain.sh - Provide generalized library-building support services.
     2      2   # NOTE: Changing this file will not affect anything until you rerun configure.
     3      3   #
     4         -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
            4  +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
     5      5   # Free Software Foundation, Inc.
     6      6   # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
     7      7   #
     8      8   # This program is free software; you can redistribute it and/or modify
     9      9   # it under the terms of the GNU General Public License as published by
    10     10   # the Free Software Foundation; either version 2 of the License, or
    11     11   # (at your option) any later version.
................................................................................
    13     13   # This program is distributed in the hope that it will be useful, but
    14     14   # WITHOUT ANY WARRANTY; without even the implied warranty of
    15     15   # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    16     16   # General Public License for more details.
    17     17   #
    18     18   # You should have received a copy of the GNU General Public License
    19     19   # along with this program; if not, write to the Free Software
    20         -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
           20  +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    21     21   #
    22     22   # As a special exception to the GNU General Public License, if you
    23     23   # distribute this file as part of a program that contains a
    24     24   # configuration script generated by Autoconf, you may include it under
    25     25   # the same distribution terms that you use for the rest of that program.
           26  +
           27  +basename="s,^.*/,,g"
           28  +
           29  +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
           30  +# is ksh but when the shell is invoked as "sh" and the current value of
           31  +# the _XPG environment variable is not equal to 1 (one), the special
           32  +# positional parameter $0, within a function call, is the name of the
           33  +# function.
           34  +progpath="$0"
           35  +
           36  +# define SED for historic ltconfig's generated by Libtool 1.3
           37  +test -z "$SED" && SED=sed
           38  +
           39  +# The name of this program:
           40  +progname=`echo "$progpath" | $SED $basename`
           41  +modename="$progname"
           42  +
           43  +# Global variables:
           44  +EXIT_SUCCESS=0
           45  +EXIT_FAILURE=1
           46  +
           47  +PROGRAM=ltmain.sh
           48  +PACKAGE=libtool
           49  +VERSION=1.5.22
           50  +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
           51  +
           52  +# See if we are running on zsh, and set the options which allow our
           53  +# commands through without removal of \ escapes.
           54  +if test -n "${ZSH_VERSION+set}" ; then
           55  +  setopt NO_GLOB_SUBST
           56  +fi
           57  +# Same for EGREP, and just to be sure, do LTCC as well
           58  +if test "X$EGREP" = X ; then
           59  +    EGREP=egrep
           60  +fi
           61  +if test "X$LTCC" = X ; then
           62  +    LTCC=${CC-gcc}
           63  +fi
    26     64   
    27     65   # Check that we have a working $echo.
    28     66   if test "X$1" = X--no-reexec; then
    29     67     # Discard the --no-reexec flag, and continue.
    30     68     shift
    31     69   elif test "X$1" = X--fallback-echo; then
    32     70     # Avoid inline document here, it may be left over
    33     71     :
    34     72   elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
    35     73     # Yippee, $echo works!
    36     74     :
    37     75   else
    38     76     # Restart under the correct shell, and then maybe $echo will work.
    39         -  exec $SHELL "$0" --no-reexec ${1+"$@"}
           77  +  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
    40     78   fi
    41     79   
    42     80   if test "X$1" = X--fallback-echo; then
    43     81     # used as fallback echo
    44     82     shift
    45     83     cat <<EOF
    46     84   $*
    47     85   EOF
    48         -  exit 0
           86  +  exit $EXIT_SUCCESS
    49     87   fi
    50     88   
    51         -# The name of this program.
    52         -progname=`$echo "$0" | ${SED} 's%^.*/%%'`
    53         -modename="$progname"
    54         -
    55         -# Constants.
    56         -PROGRAM=ltmain.sh
    57         -PACKAGE=libtool
    58         -VERSION=1.5.2
    59         -TIMESTAMP=" (1.1220.2.60 2004/01/25 12:25:08) Debian$Rev: 192 $"
    60         -
    61     89   default_mode=
    62     90   help="Try \`$progname --help' for more information."
    63     91   magic="%%%MAGIC variable%%%"
    64     92   mkdir="mkdir"
    65     93   mv="mv -f"
    66     94   rm="rm -f"
    67     95   
    68     96   # Sed substitution that helps us do robust quoting.  It backslashifies
    69     97   # metacharacters that are still active within double-quoted strings.
    70     98   Xsed="${SED}"' -e 1s/^X//'
    71     99   sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
    72    100   # test EBCDIC or ASCII
    73         -case `echo A|tr A '\301'` in
    74         - A) # EBCDIC based system
    75         -  SP2NL="tr '\100' '\n'"
    76         -  NL2SP="tr '\r\n' '\100\100'"
          101  +case `echo X|tr X '\101'` in
          102  + A) # ASCII based system
          103  +    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
          104  +  SP2NL='tr \040 \012'
          105  +  NL2SP='tr \015\012 \040\040'
    77    106     ;;
    78         - *) # Assume ASCII based system
    79         -  SP2NL="tr '\040' '\012'"
    80         -  NL2SP="tr '\015\012' '\040\040'"
          107  + *) # EBCDIC based system
          108  +  SP2NL='tr \100 \n'
          109  +  NL2SP='tr \r\n \100\100'
    81    110     ;;
    82    111   esac
    83    112   
    84    113   # NLS nuisances.
    85    114   # Only set LANG and LC_ALL to C if already set.
    86    115   # These must not be set unconditionally because not all systems understand
    87    116   # e.g. LANG=C (notably SCO).
................................................................................
    90    119     save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
    91    120   fi
    92    121   if test "${LANG+set}" = set; then
    93    122     save_LANG="$LANG"; LANG=C; export LANG
    94    123   fi
    95    124   
    96    125   # Make sure IFS has a sensible default
    97         -: ${IFS=" 	
    98         -"}
          126  +lt_nl='
          127  +'
          128  +IFS=" 	$lt_nl"
    99    129   
   100    130   if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
   101    131     $echo "$modename: not configured to build any kind of library" 1>&2
   102    132     $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
   103         -  exit 1
          133  +  exit $EXIT_FAILURE
   104    134   fi
   105    135   
   106    136   # Global variables.
   107    137   mode=$default_mode
   108    138   nonopt=
   109    139   prev=
   110    140   prevopt=
   111    141   run=
   112    142   show="$echo"
   113    143   show_help=
   114    144   execute_dlfiles=
          145  +duplicate_deps=no
          146  +preserve_args=
   115    147   lo2o="s/\\.lo\$/.${objext}/"
   116    148   o2lo="s/\\.${objext}\$/.lo/"
          149  +
          150  +if test -z "$max_cmd_len"; then
          151  +  i=0
          152  +  testring="ABCD"
          153  +  new_result=
          154  +  
          155  +  # If test is not a shell built-in, we'll probably end up computing a
          156  +  # maximum length that is only half of the actual maximum length, but
          157  +  # we can't tell.
          158  +  while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
          159  +             = "XX$testring") >/dev/null 2>&1 &&
          160  +          new_result=`expr "X$testring" : ".*" 2>&1` &&
          161  +          max_cmd_len="$new_result" &&
          162  +          test "$i" != 17 # 1/2 MB should be enough
          163  +  do
          164  +    i=`expr $i + 1`
          165  +    testring="$testring$testring"
          166  +  done
          167  +  testring=
          168  +  # Add a significant safety factor because C++ compilers can tack on massive
          169  +  # amounts of additional arguments before passing them to the linker.
          170  +  # It appears as though 1/2 is a usable value.
          171  +  max_cmd_len=`expr $max_cmd_len \/ 2`
          172  +fi
   117    173   
   118    174   #####################################
   119    175   # Shell function definitions:
   120    176   # This seems to be the best place for them
   121    177   
          178  +# func_mktempdir [string]
          179  +# Make a temporary directory that won't clash with other running
          180  +# libtool processes, and avoids race conditions if possible.  If
          181  +# given, STRING is the basename for that directory.
          182  +func_mktempdir ()
          183  +{
          184  +    my_template="${TMPDIR-/tmp}/${1-$progname}"
          185  +
          186  +    if test "$run" = ":"; then
          187  +      # Return a directory name, but don't create it in dry-run mode
          188  +      my_tmpdir="${my_template}-$$"
          189  +    else
          190  +
          191  +      # If mktemp works, use that first and foremost
          192  +      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
          193  +
          194  +      if test ! -d "$my_tmpdir"; then
          195  +	# Failing that, at least try and use $RANDOM to avoid a race
          196  +	my_tmpdir="${my_template}-${RANDOM-0}$$"
          197  +
          198  +	save_mktempdir_umask=`umask`
          199  +	umask 0077
          200  +	$mkdir "$my_tmpdir"
          201  +	umask $save_mktempdir_umask
          202  +      fi
          203  +
          204  +      # If we're not in dry-run mode, bomb out on failure
          205  +      test -d "$my_tmpdir" || {
          206  +        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
          207  +	exit $EXIT_FAILURE
          208  +      }
          209  +    fi
          210  +
          211  +    $echo "X$my_tmpdir" | $Xsed
          212  +}
          213  +
          214  +
          215  +# func_win32_libid arg
          216  +# return the library type of file 'arg'
          217  +#
   122    218   # Need a lot of goo to handle *both* DLLs and import libs
   123    219   # Has to be a shell function in order to 'eat' the argument
   124    220   # that is supplied when $file_magic_command is called.
   125         -win32_libid () {
          221  +func_win32_libid ()
          222  +{
   126    223     win32_libid_type="unknown"
   127    224     win32_fileres=`file -L $1 2>/dev/null`
   128    225     case $win32_fileres in
   129    226     *ar\ archive\ import\ library*) # definitely import
   130    227       win32_libid_type="x86 archive import"
   131    228       ;;
   132    229     *ar\ archive*) # could be an import, or static
   133    230       if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
   134         -      grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
          231  +      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
   135    232         win32_nmres=`eval $NM -f posix -A $1 | \
   136         -	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
   137         -      if test "X$win32_nmres" = "Ximport" ; then
   138         -        win32_libid_type="x86 archive import"
   139         -      else
   140         -        win32_libid_type="x86 archive static"
   141         -      fi
          233  +	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
          234  +      case $win32_nmres in
          235  +      import*)  win32_libid_type="x86 archive import";;
          236  +      *)        win32_libid_type="x86 archive static";;
          237  +      esac
   142    238       fi
   143    239       ;;
   144         -  *DLL*) 
          240  +  *DLL*)
   145    241       win32_libid_type="x86 DLL"
   146    242       ;;
   147    243     *executable*) # but shell scripts are "executable" too...
   148    244       case $win32_fileres in
   149    245       *MS\ Windows\ PE\ Intel*)
   150    246         win32_libid_type="x86 DLL"
   151    247         ;;
   152    248       esac
   153    249       ;;
   154    250     esac
   155    251     $echo $win32_libid_type
   156    252   }
   157    253   
          254  +
          255  +# func_infer_tag arg
          256  +# Infer tagged configuration to use if any are available and
          257  +# if one wasn't chosen via the "--tag" command line option.
          258  +# Only attempt this if the compiler in the base compile
          259  +# command doesn't match the default compiler.
          260  +# arg is usually of the form 'gcc ...'
          261  +func_infer_tag ()
          262  +{
          263  +    if test -n "$available_tags" && test -z "$tagname"; then
          264  +      CC_quoted=
          265  +      for arg in $CC; do
          266  +	case $arg in
          267  +	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
          268  +	  arg="\"$arg\""
          269  +	  ;;
          270  +	esac
          271  +	CC_quoted="$CC_quoted $arg"
          272  +      done
          273  +      case $@ in
          274  +      # Blanks in the command may have been stripped by the calling shell,
          275  +      # but not from the CC environment variable when configure was run.
          276  +      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
          277  +      # Blanks at the start of $base_compile will cause this to fail
          278  +      # if we don't check for them as well.
          279  +      *)
          280  +	for z in $available_tags; do
          281  +	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
          282  +	    # Evaluate the configuration.
          283  +	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
          284  +	    CC_quoted=
          285  +	    for arg in $CC; do
          286  +	    # Double-quote args containing other shell metacharacters.
          287  +	    case $arg in
          288  +	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
          289  +	      arg="\"$arg\""
          290  +	      ;;
          291  +	    esac
          292  +	    CC_quoted="$CC_quoted $arg"
          293  +	  done
          294  +	    # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
          295  +	    trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
          296  +	    # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
          297  +	    extendcc=${host}-${CC}
          298  +	    # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc  
          299  +	    # (Gentoo-specific hack because we always export $CHOST)
          300  +	    mungedcc=${CHOST-${host}}-${trimedcc}
          301  +	    case "$@ " in
          302  +	      "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
          303  +	      "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
          304  +	      tagname=CC
          305  +	      break ;;
          306  +	      "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
          307  +	      "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
          308  +	      "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
          309  +	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
          310  +	      # The compiler in the base compile command matches
          311  +	      # the one in the tagged configuration.
          312  +	      # Assume this is the tagged configuration we want.
          313  +	      tagname=$z
          314  +	      break
          315  +	      ;;
          316  +	    esac
          317  +	  fi
          318  +	done
          319  +	# If $tagname still isn't set, then no tagged configuration
          320  +	# was found and let the user know that the "--tag" command
          321  +	# line option must be used.
          322  +	if test -z "$tagname"; then
          323  +	  $echo "$modename: unable to infer tagged configuration"
          324  +	  $echo "$modename: specify a tag with \`--tag'" 1>&2
          325  +	  exit $EXIT_FAILURE
          326  +#        else
          327  +#          $echo "$modename: using $tagname tagged configuration"
          328  +	fi
          329  +	;;
          330  +      esac
          331  +    fi
          332  +}
          333  +
          334  +
          335  +# func_extract_an_archive dir oldlib
          336  +func_extract_an_archive ()
          337  +{
          338  +    f_ex_an_ar_dir="$1"; shift
          339  +    f_ex_an_ar_oldlib="$1"
          340  +
          341  +    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
          342  +    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
          343  +    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
          344  +     :
          345  +    else
          346  +      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
          347  +      exit $EXIT_FAILURE
          348  +    fi
          349  +}
          350  +
          351  +# func_extract_archives gentop oldlib ...
          352  +func_extract_archives ()
          353  +{
          354  +    my_gentop="$1"; shift
          355  +    my_oldlibs=${1+"$@"}
          356  +    my_oldobjs=""
          357  +    my_xlib=""
          358  +    my_xabs=""
          359  +    my_xdir=""
          360  +    my_status=""
          361  +
          362  +    $show "${rm}r $my_gentop"
          363  +    $run ${rm}r "$my_gentop"
          364  +    $show "$mkdir $my_gentop"
          365  +    $run $mkdir "$my_gentop"
          366  +    my_status=$?
          367  +    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
          368  +      exit $my_status
          369  +    fi
          370  +
          371  +    for my_xlib in $my_oldlibs; do
          372  +      # Extract the objects.
          373  +      case $my_xlib in
          374  +	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
          375  +	*) my_xabs=`pwd`"/$my_xlib" ;;
          376  +      esac
          377  +      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
          378  +      my_xdir="$my_gentop/$my_xlib"
          379  +
          380  +      $show "${rm}r $my_xdir"
          381  +      $run ${rm}r "$my_xdir"
          382  +      $show "$mkdir $my_xdir"
          383  +      $run $mkdir "$my_xdir"
          384  +      exit_status=$?
          385  +      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
          386  +	exit $exit_status
          387  +      fi
          388  +      case $host in
          389  +      *-darwin*)
          390  +	$show "Extracting $my_xabs"
          391  +	# Do not bother doing anything if just a dry run
          392  +	if test -z "$run"; then
          393  +	  darwin_orig_dir=`pwd`
          394  +	  cd $my_xdir || exit $?
          395  +	  darwin_archive=$my_xabs
          396  +	  darwin_curdir=`pwd`
          397  +	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
          398  +	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
          399  +	  if test -n "$darwin_arches"; then 
          400  +	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
          401  +	    darwin_arch=
          402  +	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
          403  +	    for darwin_arch in  $darwin_arches ; do
          404  +	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
          405  +	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
          406  +	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
          407  +	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
          408  +	      cd "$darwin_curdir"
          409  +	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
          410  +	    done # $darwin_arches
          411  +      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
          412  +	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
          413  +	    darwin_file=
          414  +	    darwin_files=
          415  +	    for darwin_file in $darwin_filelist; do
          416  +	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
          417  +	      lipo -create -output "$darwin_file" $darwin_files
          418  +	    done # $darwin_filelist
          419  +	    ${rm}r unfat-$$
          420  +	    cd "$darwin_orig_dir"
          421  +	  else
          422  +	    cd "$darwin_orig_dir"
          423  + 	    func_extract_an_archive "$my_xdir" "$my_xabs"
          424  +	  fi # $darwin_arches
          425  +	fi # $run
          426  +	;;
          427  +      *)
          428  +        func_extract_an_archive "$my_xdir" "$my_xabs"
          429  +        ;;
          430  +      esac
          431  +      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
          432  +    done
          433  +    func_extract_archives_result="$my_oldobjs"
          434  +}
   158    435   # End of Shell function definitions
   159    436   #####################################
   160    437   
          438  +# Darwin sucks
          439  +eval std_shrext=\"$shrext_cmds\"
          440  +
          441  +disable_libs=no
          442  +
   161    443   # Parse our command line options once, thoroughly.
   162    444   while test "$#" -gt 0
   163    445   do
   164    446     arg="$1"
   165    447     shift
   166    448   
   167    449     case $arg in
................................................................................
   179    461         tagname="$arg"
   180    462         preserve_args="${preserve_args}=$arg"
   181    463   
   182    464         # Check whether tagname contains only valid characters
   183    465         case $tagname in
   184    466         *[!-_A-Za-z0-9,/]*)
   185    467   	$echo "$progname: invalid tag name: $tagname" 1>&2
   186         -	exit 1
          468  +	exit $EXIT_FAILURE
   187    469   	;;
   188    470         esac
   189    471   
   190    472         case $tagname in
   191    473         CC)
   192    474   	# Don't test for the "default" C tag, as we know, it's there, but
   193    475   	# not specially marked.
   194    476   	;;
   195    477         *)
   196         -	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
          478  +	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
   197    479   	  taglist="$taglist $tagname"
   198    480   	  # Evaluate the configuration.
   199         -	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
          481  +	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
   200    482   	else
   201    483   	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
   202    484   	fi
   203    485   	;;
   204    486         esac
   205    487         ;;
   206    488       *)
................................................................................
   218    500     --help)
   219    501       show_help=yes
   220    502       ;;
   221    503   
   222    504     --version)
   223    505       $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
   224    506       $echo
   225         -    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
          507  +    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
   226    508       $echo "This is free software; see the source for copying conditions.  There is NO"
   227    509       $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
   228         -    exit 0
          510  +    exit $?
   229    511       ;;
   230    512   
   231    513     --config)
   232         -    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
          514  +    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
   233    515       # Now print the configurations for the tags.
   234    516       for tagname in $taglist; do
   235         -      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
          517  +      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
   236    518       done
   237         -    exit 0
          519  +    exit $?
   238    520       ;;
   239    521   
   240    522     --debug)
   241    523       $echo "$progname: enabling shell trace mode"
   242    524       set -x
   243    525       preserve_args="$preserve_args $arg"
   244    526       ;;
................................................................................
   255    537         $echo "disable shared libraries"
   256    538       fi
   257    539       if test "$build_old_libs" = yes; then
   258    540         $echo "enable static libraries"
   259    541       else
   260    542         $echo "disable static libraries"
   261    543       fi
   262         -    exit 0
          544  +    exit $?
   263    545       ;;
   264    546   
   265    547     --finish) mode="finish" ;;
   266    548   
   267    549     --mode) prevopt="--mode" prev=mode ;;
   268    550     --mode=*) mode="$optarg" ;;
   269    551   
................................................................................
   270    552     --preserve-dup-deps) duplicate_deps="yes" ;;
   271    553   
   272    554     --quiet | --silent)
   273    555       show=:
   274    556       preserve_args="$preserve_args $arg"
   275    557       ;;
   276    558   
   277         -  --tag) prevopt="--tag" prev=tag ;;
          559  +  --tag)
          560  +    prevopt="--tag"
          561  +    prev=tag
          562  +    preserve_args="$preserve_args --tag"
          563  +    ;;
   278    564     --tag=*)
   279    565       set tag "$optarg" ${1+"$@"}
   280    566       shift
   281    567       prev=tag
   282    568       preserve_args="$preserve_args --tag"
   283    569       ;;
   284    570   
................................................................................
   286    572       prevopt="-dlopen"
   287    573       prev=execute_dlfiles
   288    574       ;;
   289    575   
   290    576     -*)
   291    577       $echo "$modename: unrecognized option \`$arg'" 1>&2
   292    578       $echo "$help" 1>&2
   293         -    exit 1
          579  +    exit $EXIT_FAILURE
   294    580       ;;
   295    581   
   296    582     *)
   297    583       nonopt="$arg"
   298    584       break
   299    585       ;;
   300    586     esac
   301    587   done
   302    588   
   303    589   if test -n "$prevopt"; then
   304    590     $echo "$modename: option \`$prevopt' requires an argument" 1>&2
   305    591     $echo "$help" 1>&2
   306         -  exit 1
          592  +  exit $EXIT_FAILURE
   307    593   fi
          594  +
          595  +case $disable_libs in
          596  +no) 
          597  +  ;;
          598  +shared)
          599  +  build_libtool_libs=no
          600  +  build_old_libs=yes
          601  +  ;;
          602  +static)
          603  +  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
          604  +  ;;
          605  +esac
   308    606   
   309    607   # If this variable is set in any of the actions, the command in it
   310    608   # will be execed at the end.  This prevents here-documents from being
   311    609   # left over by shells.
   312    610   exec_cmd=
   313    611   
   314    612   if test -z "$show_help"; then
   315    613   
   316    614     # Infer the operation mode.
   317    615     if test -z "$mode"; then
   318    616       $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
   319         -    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
          617  +    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
   320    618       case $nonopt in
   321    619       *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
   322    620         mode=link
   323    621         for arg
   324    622         do
   325    623   	case $arg in
   326    624   	-c)
................................................................................
   355    653       esac
   356    654     fi
   357    655   
   358    656     # Only execute mode is allowed to have -dlopen flags.
   359    657     if test -n "$execute_dlfiles" && test "$mode" != execute; then
   360    658       $echo "$modename: unrecognized option \`-dlopen'" 1>&2
   361    659       $echo "$help" 1>&2
   362         -    exit 1
          660  +    exit $EXIT_FAILURE
   363    661     fi
   364    662   
   365    663     # Change the help message to a mode-specific one.
   366    664     generic_help="$help"
   367    665     help="Try \`$modename --help --mode=$mode' for more information."
   368    666   
   369    667     # These modes are in order of execution frequency so that they run quickly.
................................................................................
   378    676       suppress_output=
   379    677       arg_mode=normal
   380    678       libobj=
   381    679       later=
   382    680   
   383    681       for arg
   384    682       do
   385         -      case "$arg_mode" in
          683  +      case $arg_mode in
   386    684         arg  )
   387    685   	# do not "continue".  Instead, add this to base_compile
   388    686   	lastarg="$arg"
   389    687   	arg_mode=normal
   390    688   	;;
   391    689   
   392    690         target )
................................................................................
   397    695   
   398    696         normal )
   399    697   	# Accept any command-line options.
   400    698   	case $arg in
   401    699   	-o)
   402    700   	  if test -n "$libobj" ; then
   403    701   	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
   404         -	    exit 1
          702  +	    exit $EXIT_FAILURE
   405    703   	  fi
   406    704   	  arg_mode=target
   407    705   	  continue
   408    706   	  ;;
   409    707   
   410    708   	-static | -prefer-pic | -prefer-non-pic)
   411    709   	  later="$later $arg"
................................................................................
   422    720   	  continue      #  The current "srcfile" will either be retained or
   423    721   	  ;;            #  replaced later.  I would guess that would be a bug.
   424    722   
   425    723   	-Wc,*)
   426    724   	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
   427    725   	  lastarg=
   428    726   	  save_ifs="$IFS"; IFS=','
   429         -	  for arg in $args; do
          727  + 	  for arg in $args; do
   430    728   	    IFS="$save_ifs"
   431    729   
   432    730   	    # Double-quote args containing other shell metacharacters.
   433    731   	    # Many Bourne shells cannot handle close brackets correctly
   434    732   	    # in scan sets, so we specify it separately.
   435    733   	    case $arg in
   436    734   	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
................................................................................
   460    758   
   461    759         # Aesthetically quote the previous argument.
   462    760         lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
   463    761   
   464    762         case $lastarg in
   465    763         # Double-quote args containing other shell metacharacters.
   466    764         # Many Bourne shells cannot handle close brackets correctly
   467         -      # in scan sets, so we specify it separately.
          765  +      # in scan sets, and some SunOS ksh mistreat backslash-escaping
          766  +      # in scan sets (worked around with variable expansion),
          767  +      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
          768  +      # at all, so we specify them separately.
   468    769         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   469    770   	lastarg="\"$lastarg\""
   470    771   	;;
   471    772         esac
   472    773   
   473    774         base_compile="$base_compile $lastarg"
   474    775       done # for arg
   475    776   
   476    777       case $arg_mode in
   477    778       arg)
   478    779         $echo "$modename: you must specify an argument for -Xcompile"
   479         -      exit 1
          780  +      exit $EXIT_FAILURE
   480    781         ;;
   481    782       target)
   482    783         $echo "$modename: you must specify a target with \`-o'" 1>&2
   483         -      exit 1
          784  +      exit $EXIT_FAILURE
   484    785         ;;
   485    786       *)
   486    787         # Get the name of the library object.
   487    788         [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
   488    789         ;;
   489    790       esac
   490    791   
................................................................................
   509    810   
   510    811       libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
   511    812   
   512    813       case $libobj in
   513    814       *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
   514    815       *)
   515    816         $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
   516         -      exit 1
          817  +      exit $EXIT_FAILURE
   517    818         ;;
   518    819       esac
   519    820   
   520         -    # Infer tagged configuration to use if any are available and
   521         -    # if one wasn't chosen via the "--tag" command line option.
   522         -    # Only attempt this if the compiler in the base compile
   523         -    # command doesn't match the default compiler.
   524         -    if test -n "$available_tags" && test -z "$tagname"; then
   525         -      case $base_compile in
   526         -      # Blanks in the command may have been stripped by the calling shell,
   527         -      # but not from the CC environment variable when configure was run.
   528         -      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
   529         -      # Blanks at the start of $base_compile will cause this to fail
   530         -      # if we don't check for them as well.
   531         -      *)
   532         -	for z in $available_tags; do
   533         -	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
   534         -	    # Evaluate the configuration.
   535         -	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
   536         -	    case "$base_compile " in
   537         -	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
   538         -	      # The compiler in the base compile command matches
   539         -	      # the one in the tagged configuration.
   540         -	      # Assume this is the tagged configuration we want.
   541         -	      tagname=$z
   542         -	      break
   543         -	      ;;
   544         -	    esac
   545         -	  fi
   546         -	done
   547         -	# If $tagname still isn't set, then no tagged configuration
   548         -	# was found and let the user know that the "--tag" command
   549         -	# line option must be used.
   550         -	if test -z "$tagname"; then
   551         -	  $echo "$modename: unable to infer tagged configuration"
   552         -	  $echo "$modename: specify a tag with \`--tag'" 1>&2
   553         -	  exit 1
   554         -#        else
   555         -#          $echo "$modename: using $tagname tagged configuration"
   556         -	fi
   557         -	;;
   558         -      esac
   559         -    fi
          821  +    func_infer_tag $base_compile
   560    822   
   561    823       for arg in $later; do
   562    824         case $arg in
   563    825         -static)
   564    826   	build_old_libs=yes
   565    827   	continue
   566    828   	;;
................................................................................
   573    835         -prefer-non-pic)
   574    836   	pic_mode=no
   575    837   	continue
   576    838   	;;
   577    839         esac
   578    840       done
   579    841   
          842  +    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
          843  +    case $qlibobj in
          844  +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
          845  +	qlibobj="\"$qlibobj\"" ;;
          846  +    esac
          847  +    test "X$libobj" != "X$qlibobj" \
          848  +	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
          849  +	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
   580    850       objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
   581    851       xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
   582    852       if test "X$xdir" = "X$obj"; then
   583    853         xdir=
   584    854       else
   585    855         xdir=$xdir/
   586    856       fi
   587    857       lobj=${xdir}$objdir/$objname
   588    858   
   589    859       if test -z "$base_compile"; then
   590    860         $echo "$modename: you must specify a compilation command" 1>&2
   591    861         $echo "$help" 1>&2
   592         -      exit 1
          862  +      exit $EXIT_FAILURE
   593    863       fi
   594    864   
   595    865       # Delete any leftover library objects.
   596    866       if test "$build_old_libs" = yes; then
   597    867         removelist="$obj $lobj $libobj ${libobj}T"
   598    868       else
   599    869         removelist="$lobj $libobj ${libobj}T"
   600    870       fi
   601    871   
   602    872       $run $rm $removelist
   603         -    trap "$run $rm $removelist; exit 1" 1 2 15
          873  +    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
   604    874   
   605    875       # On Cygwin there's no "real" PIC flag so we must build both object types
   606    876       case $host_os in
   607    877       cygwin* | mingw* | pw32* | os2*)
   608    878         pic_mode=default
   609    879         ;;
   610    880       esac
................................................................................
   615    885   
   616    886       # Calculate the filename of the output object if compiler does
   617    887       # not support -o with -c
   618    888       if test "$compiler_c_o" = no; then
   619    889         output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
   620    890         lockfile="$output_obj.lock"
   621    891         removelist="$removelist $output_obj $lockfile"
   622         -      trap "$run $rm $removelist; exit 1" 1 2 15
          892  +      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
   623    893       else
   624    894         output_obj=
   625    895         need_locks=no
   626    896         lockfile=
   627    897       fi
   628    898   
   629    899       # Lock this critical section if it is needed
   630    900       # We use this script file to make the link, it avoids creating a new file
   631    901       if test "$need_locks" = yes; then
   632         -      until $run ln "$0" "$lockfile" 2>/dev/null; do
          902  +      until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
   633    903   	$show "Waiting for $lockfile to be removed"
   634    904   	sleep 2
   635    905         done
   636    906       elif test "$need_locks" = warn; then
   637    907         if test -f "$lockfile"; then
   638    908   	$echo "\
   639    909   *** ERROR, $lockfile exists and contains:
................................................................................
   643    913   temporary object file, and libtool could not work around it because
   644    914   your compiler does not support \`-c' and \`-o' together.  If you
   645    915   repeat this compilation, it may succeed, by chance, but you had better
   646    916   avoid parallel builds (make -j) in this platform, or get a better
   647    917   compiler."
   648    918   
   649    919   	$run $rm $removelist
   650         -	exit 1
          920  +	exit $EXIT_FAILURE
   651    921         fi
   652         -      $echo $srcfile > "$lockfile"
          922  +      $echo "$srcfile" > "$lockfile"
   653    923       fi
   654    924   
   655    925       if test -n "$fix_srcfile_path"; then
   656    926         eval srcfile=\"$fix_srcfile_path\"
   657    927       fi
          928  +    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
          929  +    case $qsrcfile in
          930  +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
          931  +      qsrcfile="\"$qsrcfile\"" ;;
          932  +    esac
   658    933   
   659    934       $run $rm "$libobj" "${libobj}T"
   660    935   
   661    936       # Create a libtool object file (analogous to a ".la" file),
   662    937       # but don't create it if we're doing a dry run.
   663    938       test -z "$run" && cat > ${libobj}T <<EOF
   664    939   # $libobj - a libtool object file
................................................................................
   672    947   
   673    948       # Only build a PIC object if we are building libtool libraries.
   674    949       if test "$build_libtool_libs" = yes; then
   675    950         # Without this assignment, base_compile gets emptied.
   676    951         fbsd_hideous_sh_bug=$base_compile
   677    952   
   678    953         if test "$pic_mode" != no; then
   679         -	command="$base_compile $srcfile $pic_flag"
          954  +	command="$base_compile $qsrcfile $pic_flag"
   680    955         else
   681    956   	# Don't build PIC code
   682         -	command="$base_compile $srcfile"
          957  +	command="$base_compile $qsrcfile"
   683    958         fi
   684    959   
   685    960         if test ! -d "${xdir}$objdir"; then
   686    961   	$show "$mkdir ${xdir}$objdir"
   687    962   	$run $mkdir ${xdir}$objdir
   688         -	status=$?
   689         -	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
   690         -	  exit $status
          963  +	exit_status=$?
          964  +	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
          965  +	  exit $exit_status
   691    966   	fi
   692    967         fi
   693    968   
   694    969         if test -z "$output_obj"; then
   695    970   	# Place PIC objects in $objdir
   696    971   	command="$command -o $lobj"
   697    972         fi
................................................................................
   698    973   
   699    974         $run $rm "$lobj" "$output_obj"
   700    975   
   701    976         $show "$command"
   702    977         if $run eval "$command"; then :
   703    978         else
   704    979   	test -n "$output_obj" && $run $rm $removelist
   705         -	exit 1
          980  +	exit $EXIT_FAILURE
   706    981         fi
   707    982   
   708    983         if test "$need_locks" = warn &&
   709    984   	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
   710    985   	$echo "\
   711    986   *** ERROR, $lockfile contains:
   712    987   `cat $lockfile 2>/dev/null`
................................................................................
   718    993   temporary object file, and libtool could not work around it because
   719    994   your compiler does not support \`-c' and \`-o' together.  If you
   720    995   repeat this compilation, it may succeed, by chance, but you had better
   721    996   avoid parallel builds (make -j) in this platform, or get a better
   722    997   compiler."
   723    998   
   724    999   	$run $rm $removelist
   725         -	exit 1
         1000  +	exit $EXIT_FAILURE
   726   1001         fi
   727   1002   
   728   1003         # Just move the object if needed, then go on to compile the next one
   729   1004         if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
   730   1005   	$show "$mv $output_obj $lobj"
   731   1006   	if $run $mv $output_obj $lobj; then :
   732   1007   	else
................................................................................
   755   1030   EOF
   756   1031       fi
   757   1032   
   758   1033       # Only build a position-dependent object if we build old libraries.
   759   1034       if test "$build_old_libs" = yes; then
   760   1035         if test "$pic_mode" != yes; then
   761   1036   	# Don't build PIC code
   762         -	command="$base_compile $srcfile"
         1037  +	command="$base_compile $qsrcfile"
   763   1038         else
   764         -	command="$base_compile $srcfile $pic_flag"
         1039  +	command="$base_compile $qsrcfile $pic_flag"
   765   1040         fi
   766   1041         if test "$compiler_c_o" = yes; then
   767   1042   	command="$command -o $obj"
   768   1043         fi
   769   1044   
   770   1045         # Suppress compiler output if we already did a PIC compilation.
   771   1046         command="$command$suppress_output"
   772   1047         $run $rm "$obj" "$output_obj"
   773   1048         $show "$command"
   774   1049         if $run eval "$command"; then :
   775   1050         else
   776   1051   	$run $rm $removelist
   777         -	exit 1
         1052  +	exit $EXIT_FAILURE
   778   1053         fi
   779   1054   
   780   1055         if test "$need_locks" = warn &&
   781   1056   	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
   782   1057   	$echo "\
   783   1058   *** ERROR, $lockfile contains:
   784   1059   `cat $lockfile 2>/dev/null`
................................................................................
   790   1065   temporary object file, and libtool could not work around it because
   791   1066   your compiler does not support \`-c' and \`-o' together.  If you
   792   1067   repeat this compilation, it may succeed, by chance, but you had better
   793   1068   avoid parallel builds (make -j) in this platform, or get a better
   794   1069   compiler."
   795   1070   
   796   1071   	$run $rm $removelist
   797         -	exit 1
         1072  +	exit $EXIT_FAILURE
   798   1073         fi
   799   1074   
   800   1075         # Just move the object if needed
   801   1076         if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
   802   1077   	$show "$mv $output_obj $obj"
   803   1078   	if $run $mv $output_obj $obj; then :
   804   1079   	else
................................................................................
   828   1103       $run $mv "${libobj}T" "${libobj}"
   829   1104   
   830   1105       # Unlock the critical section if it was locked
   831   1106       if test "$need_locks" != no; then
   832   1107         $run $rm "$lockfile"
   833   1108       fi
   834   1109   
   835         -    exit 0
         1110  +    exit $EXIT_SUCCESS
   836   1111       ;;
   837   1112   
   838   1113     # libtool link mode
   839   1114     link | relink)
   840   1115       modename="$modename: link"
   841   1116       case $host in
   842   1117       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
................................................................................
   886   1161       generated=
   887   1162       libobjs=
   888   1163       ltlibs=
   889   1164       module=no
   890   1165       no_install=no
   891   1166       objs=
   892   1167       non_pic_objects=
         1168  +    notinst_path= # paths that contain not-installed libtool libraries
   893   1169       precious_files_regex=
   894   1170       prefer_static_libs=no
   895   1171       preload=no
   896   1172       prev=
   897   1173       prevarg=
   898   1174       release=
   899   1175       rpath=
................................................................................
   900   1176       xrpath=
   901   1177       perm_rpath=
   902   1178       temp_rpath=
   903   1179       thread_safe=no
   904   1180       vinfo=
   905   1181       vinfo_number=no
   906   1182   
   907         -    # Infer tagged configuration to use if any are available and
   908         -    # if one wasn't chosen via the "--tag" command line option.
   909         -    # Only attempt this if the compiler in the base link
   910         -    # command doesn't match the default compiler.
   911         -    if test -n "$available_tags" && test -z "$tagname"; then
   912         -      case $base_compile in
   913         -      # Blanks in the command may have been stripped by the calling shell,
   914         -      # but not from the CC environment variable when configure was run.
   915         -      "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
   916         -      # Blanks at the start of $base_compile will cause this to fail
   917         -      # if we don't check for them as well.
   918         -      *)
   919         -	for z in $available_tags; do
   920         -	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
   921         -	    # Evaluate the configuration.
   922         -	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
   923         -	    case $base_compile in
   924         -	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
   925         -	      # The compiler in $compile_command matches
   926         -	      # the one in the tagged configuration.
   927         -	      # Assume this is the tagged configuration we want.
   928         -	      tagname=$z
   929         -	      break
   930         -	      ;;
   931         -	    esac
   932         -	  fi
   933         -	done
   934         -	# If $tagname still isn't set, then no tagged configuration
   935         -	# was found and let the user know that the "--tag" command
   936         -	# line option must be used.
   937         -	if test -z "$tagname"; then
   938         -	  $echo "$modename: unable to infer tagged configuration"
   939         -	  $echo "$modename: specify a tag with \`--tag'" 1>&2
   940         -	  exit 1
   941         -#       else
   942         -#         $echo "$modename: using $tagname tagged configuration"
   943         -	fi
   944         -	;;
   945         -      esac
   946         -    fi
         1183  +    func_infer_tag $base_compile
   947   1184   
   948   1185       # We need to know -static, to get the right output filenames.
   949   1186       for arg
   950   1187       do
   951   1188         case $arg in
   952   1189         -all-static | -static)
   953   1190   	if test "X$arg" = "X-all-static"; then
   954   1191   	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
   955   1192   	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
   956   1193   	  fi
   957   1194   	  if test -n "$link_static_flag"; then
   958   1195   	    dlopen_self=$dlopen_self_static
   959   1196   	  fi
         1197  +	  prefer_static_libs=yes
   960   1198   	else
   961   1199   	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
   962   1200   	    dlopen_self=$dlopen_self_static
   963   1201   	  fi
         1202  +	  prefer_static_libs=built
   964   1203   	fi
   965   1204   	build_libtool_libs=no
   966   1205   	build_old_libs=yes
   967         -	prefer_static_libs=yes
   968   1206   	break
   969   1207   	;;
   970   1208         esac
   971   1209       done
   972   1210   
   973   1211       # See if our shared archives depend on static archives.
   974   1212       test -n "$old_archive_from_new_cmds" && build_old_libs=yes
................................................................................
  1035   1273   	    ;;
  1036   1274   	  esac
  1037   1275   	  ;;
  1038   1276   	expsyms)
  1039   1277   	  export_symbols="$arg"
  1040   1278   	  if test ! -f "$arg"; then
  1041   1279   	    $echo "$modename: symbol file \`$arg' does not exist"
  1042         -	    exit 1
         1280  +	    exit $EXIT_FAILURE
  1043   1281   	  fi
  1044   1282   	  prev=
  1045   1283   	  continue
  1046   1284   	  ;;
  1047   1285   	expsyms_regex)
  1048   1286   	  export_symbols_regex="$arg"
  1049   1287   	  prev=
................................................................................
  1087   1325   		esac
  1088   1326   
  1089   1327   		if test -z "$pic_object" || \
  1090   1328   		   test -z "$non_pic_object" ||
  1091   1329   		   test "$pic_object" = none && \
  1092   1330   		   test "$non_pic_object" = none; then
  1093   1331   		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  1094         -		  exit 1
         1332  +		  exit $EXIT_FAILURE
  1095   1333   		fi
  1096   1334   
  1097   1335   		# Extract subdirectory from the argument.
  1098   1336   		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1099   1337   		if test "X$xdir" = "X$arg"; then
  1100   1338   		  xdir=
  1101   1339   		else
................................................................................
  1135   1373   		  non_pic_object="$xdir$non_pic_object"
  1136   1374   
  1137   1375   		  # A standard non-PIC object
  1138   1376   		  non_pic_objects="$non_pic_objects $non_pic_object"
  1139   1377   		  if test -z "$pic_object" || test "$pic_object" = none ; then
  1140   1378   		    arg="$non_pic_object"
  1141   1379   		  fi
         1380  +		else
         1381  +		  # If the PIC object exists, use it instead.
         1382  +		  # $xdir was prepended to $pic_object above.
         1383  +		  non_pic_object="$pic_object"
         1384  +		  non_pic_objects="$non_pic_objects $non_pic_object"
  1142   1385   		fi
  1143   1386   	      else
  1144   1387   		# Only an error if not doing a dry-run.
  1145   1388   		if test -z "$run"; then
  1146   1389   		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  1147         -		  exit 1
         1390  +		  exit $EXIT_FAILURE
  1148   1391   		else
  1149   1392   		  # Dry-run case.
  1150   1393   
  1151   1394   		  # Extract subdirectory from the argument.
  1152   1395   		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1153   1396   		  if test "X$xdir" = "X$arg"; then
  1154   1397   		    xdir=
................................................................................
  1161   1404   		  libobjs="$libobjs $pic_object"
  1162   1405   		  non_pic_objects="$non_pic_objects $non_pic_object"
  1163   1406   		fi
  1164   1407   	      fi
  1165   1408   	    done
  1166   1409   	  else
  1167   1410   	    $echo "$modename: link input file \`$save_arg' does not exist"
  1168         -	    exit 1
         1411  +	    exit $EXIT_FAILURE
  1169   1412   	  fi
  1170   1413   	  arg=$save_arg
  1171   1414   	  prev=
  1172   1415   	  continue
  1173   1416   	  ;;
  1174   1417   	rpath | xrpath)
  1175   1418   	  # We need an absolute path.
  1176   1419   	  case $arg in
  1177   1420   	  [\\/]* | [A-Za-z]:[\\/]*) ;;
  1178   1421   	  *)
  1179   1422   	    $echo "$modename: only absolute run-paths are allowed" 1>&2
  1180         -	    exit 1
         1423  +	    exit $EXIT_FAILURE
  1181   1424   	    ;;
  1182   1425   	  esac
  1183   1426   	  if test "$prev" = rpath; then
  1184   1427   	    case "$rpath " in
  1185   1428   	    *" $arg "*) ;;
  1186   1429   	    *) rpath="$rpath $arg" ;;
  1187   1430   	    esac
................................................................................
  1213   1456   	  linker_flags="$linker_flags $qarg"
  1214   1457   	  compiler_flags="$compiler_flags $qarg"
  1215   1458   	  prev=
  1216   1459   	  compile_command="$compile_command $qarg"
  1217   1460   	  finalize_command="$finalize_command $qarg"
  1218   1461   	  continue
  1219   1462   	  ;;
         1463  +	shrext)
         1464  +  	  shrext_cmds="$arg"
         1465  +	  prev=
         1466  +	  continue
         1467  +	  ;;
         1468  +	darwin_framework|darwin_framework_skip)
         1469  +	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
         1470  +	  compile_command="$compile_command $arg"
         1471  +	  finalize_command="$finalize_command $arg"
         1472  +	  prev=
         1473  +	  continue
         1474  +	  ;;
  1220   1475   	*)
  1221   1476   	  eval "$prev=\"\$arg\""
  1222   1477   	  prev=
  1223   1478   	  continue
  1224   1479   	  ;;
  1225   1480   	esac
  1226   1481         fi # test -n "$prev"
................................................................................
  1261   1516   	export_dynamic=yes
  1262   1517   	continue
  1263   1518   	;;
  1264   1519   
  1265   1520         -export-symbols | -export-symbols-regex)
  1266   1521   	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  1267   1522   	  $echo "$modename: more than one -exported-symbols argument is not allowed"
  1268         -	  exit 1
         1523  +	  exit $EXIT_FAILURE
  1269   1524   	fi
  1270   1525   	if test "X$arg" = "X-export-symbols"; then
  1271   1526   	  prev=expsyms
  1272   1527   	else
  1273   1528   	  prev=expsyms_regex
  1274   1529   	fi
  1275   1530   	continue
  1276   1531   	;;
         1532  +
         1533  +      -framework|-arch|-isysroot)
         1534  +	case " $CC " in
         1535  +	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
         1536  +		prev=darwin_framework_skip ;;
         1537  +	  *) compiler_flags="$compiler_flags $arg"
         1538  +	     prev=darwin_framework ;;
         1539  +	esac
         1540  +	compile_command="$compile_command $arg"
         1541  +	finalize_command="$finalize_command $arg"
         1542  +	continue
         1543  +	;;
  1277   1544   
  1278   1545         -inst-prefix-dir)
  1279   1546   	prev=inst_prefix
  1280   1547   	continue
  1281   1548   	;;
  1282   1549   
  1283   1550         # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
................................................................................
  1297   1564   	# We need an absolute path.
  1298   1565   	case $dir in
  1299   1566   	[\\/]* | [A-Za-z]:[\\/]*) ;;
  1300   1567   	*)
  1301   1568   	  absdir=`cd "$dir" && pwd`
  1302   1569   	  if test -z "$absdir"; then
  1303   1570   	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
  1304         -	    exit 1
         1571  +	    absdir="$dir"
         1572  +	    notinst_path="$notinst_path $dir"
  1305   1573   	  fi
  1306   1574   	  dir="$absdir"
  1307   1575   	  ;;
  1308   1576   	esac
  1309   1577   	case "$deplibs " in
  1310   1578   	*" -L$dir "*) ;;
  1311   1579   	*)
  1312   1580   	  deplibs="$deplibs -L$dir"
  1313   1581   	  lib_search_path="$lib_search_path $dir"
  1314   1582   	  ;;
  1315   1583   	esac
  1316   1584   	case $host in
  1317   1585   	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
         1586  +	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
  1318   1587   	  case :$dllsearchpath: in
  1319   1588   	  *":$dir:"*) ;;
  1320   1589   	  *) dllsearchpath="$dllsearchpath:$dir";;
  1321   1590   	  esac
         1591  +	  case :$dllsearchpath: in
         1592  +	  *":$testbindir:"*) ;;
         1593  +	  *) dllsearchpath="$dllsearchpath:$testbindir";;
         1594  +	  esac
  1322   1595   	  ;;
  1323   1596   	esac
  1324   1597   	continue
  1325   1598   	;;
  1326   1599   
  1327   1600         -l*)
  1328   1601   	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
  1329   1602   	  case $host in
  1330         -	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
         1603  +	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
  1331   1604   	    # These systems don't actually have a C or math library (as such)
  1332   1605   	    continue
  1333   1606   	    ;;
  1334         -	  *-*-mingw* | *-*-os2*)
         1607  +	  *-*-os2*)
  1335   1608   	    # These systems don't actually have a C library (as such)
  1336   1609   	    test "X$arg" = "X-lc" && continue
  1337   1610   	    ;;
  1338         -	  *-*-openbsd* | *-*-freebsd*)
         1611  +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  1339   1612   	    # Do not include libc due to us having libc/libc_r.
  1340   1613   	    test "X$arg" = "X-lc" && continue
  1341   1614   	    ;;
  1342   1615   	  *-*-rhapsody* | *-*-darwin1.[012])
  1343   1616   	    # Rhapsody C and math libraries are in the System framework
  1344   1617   	    deplibs="$deplibs -framework System"
  1345   1618   	    continue
         1619  +	    ;;
         1620  +	  *-*-sco3.2v5* | *-*-sco5v6*)
         1621  +	    # Causes problems with __ctype
         1622  +	    test "X$arg" = "X-lc" && continue
         1623  +	    ;;
         1624  +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
         1625  +	    # Compiler inserts libc in the correct place for threads to work
         1626  +	    test "X$arg" = "X-lc" && continue
         1627  +	    ;;
  1346   1628   	  esac
  1347   1629   	elif test "X$arg" = "X-lc_r"; then
  1348   1630   	 case $host in
  1349         -	 *-*-openbsd* | *-*-freebsd*)
         1631  +	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  1350   1632   	   # Do not include libc_r directly, use -pthread flag.
  1351   1633   	   continue
  1352   1634   	   ;;
  1353   1635   	 esac
  1354   1636   	fi
  1355   1637   	deplibs="$deplibs $arg"
  1356   1638   	continue
  1357   1639   	;;
         1640  +
         1641  +      # Tru64 UNIX uses -model [arg] to determine the layout of C++
         1642  +      # classes, name mangling, and exception handling.
         1643  +      -model)
         1644  +	compile_command="$compile_command $arg"
         1645  +	compiler_flags="$compiler_flags $arg"
         1646  +	finalize_command="$finalize_command $arg"
         1647  +	prev=xcompiler
         1648  +	continue
         1649  +	;;
  1358   1650   
  1359   1651        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
  1360         -	deplibs="$deplibs $arg"
         1652  +	compiler_flags="$compiler_flags $arg"
         1653  +	compile_command="$compile_command $arg"
         1654  +	finalize_command="$finalize_command $arg"
  1361   1655   	continue
  1362   1656   	;;
  1363   1657   
  1364   1658         -module)
  1365   1659   	module=yes
  1366   1660   	continue
  1367   1661   	;;
  1368   1662   
  1369         -      # gcc -m* arguments should be passed to the linker via $compiler_flags
  1370         -      # in order to pass architecture information to the linker
  1371         -      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
  1372         -      # but this is not reliable with gcc because gcc may use -mfoo to
  1373         -      # select a different linker, different libraries, etc, while
  1374         -      # -Wl,-mfoo simply passes -mfoo to the linker.
  1375         -      -m*)
         1663  +      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
         1664  +      # -r[0-9][0-9]* specifies the processor on the SGI compiler
         1665  +      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
         1666  +      # +DA*, +DD* enable 64-bit mode on the HP compiler
         1667  +      # -q* pass through compiler args for the IBM compiler
         1668  +      # -m* pass through architecture-specific compiler args for GCC
         1669  +      # -m*, -t[45]*, -txscale* pass through architecture-specific
         1670  +      # compiler args for GCC
         1671  +      # -pg pass through profiling flag for GCC
         1672  +      # @file GCC response files
         1673  +      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
         1674  +      -t[45]*|-txscale*|@*)
         1675  +
  1376   1676   	# Unknown arguments in both finalize_command and compile_command need
  1377   1677   	# to be aesthetically quoted because they are evaled later.
  1378   1678   	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1379   1679   	case $arg in
  1380   1680   	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1381   1681   	  arg="\"$arg\""
  1382   1682   	  ;;
  1383   1683   	esac
  1384   1684           compile_command="$compile_command $arg"
  1385   1685           finalize_command="$finalize_command $arg"
  1386         -        if test "$with_gcc" = "yes" ; then
  1387         -          compiler_flags="$compiler_flags $arg"
  1388         -        fi
         1686  +        compiler_flags="$compiler_flags $arg"
  1389   1687           continue
  1390   1688           ;;
  1391   1689   
  1392   1690         -shrext)
  1393   1691   	prev=shrext
  1394   1692   	continue
  1395   1693   	;;
................................................................................
  1448   1746         -R*)
  1449   1747   	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  1450   1748   	# We need an absolute path.
  1451   1749   	case $dir in
  1452   1750   	[\\/]* | [A-Za-z]:[\\/]*) ;;
  1453   1751   	*)
  1454   1752   	  $echo "$modename: only absolute run-paths are allowed" 1>&2
  1455         -	  exit 1
         1753  +	  exit $EXIT_FAILURE
  1456   1754   	  ;;
  1457   1755   	esac
  1458   1756   	case "$xrpath " in
  1459   1757   	*" $dir "*) ;;
  1460   1758   	*) xrpath="$xrpath $dir" ;;
  1461   1759   	esac
  1462   1760   	continue
................................................................................
  1571   1869   	  esac
  1572   1870   
  1573   1871   	  if test -z "$pic_object" || \
  1574   1872   	     test -z "$non_pic_object" ||
  1575   1873   	     test "$pic_object" = none && \
  1576   1874   	     test "$non_pic_object" = none; then
  1577   1875   	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  1578         -	    exit 1
         1876  +	    exit $EXIT_FAILURE
  1579   1877   	  fi
  1580   1878   
  1581   1879   	  # Extract subdirectory from the argument.
  1582   1880   	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1583   1881   	  if test "X$xdir" = "X$arg"; then
  1584   1882   	    xdir=
  1585   1883    	  else
................................................................................
  1619   1917   	    non_pic_object="$xdir$non_pic_object"
  1620   1918   
  1621   1919   	    # A standard non-PIC object
  1622   1920   	    non_pic_objects="$non_pic_objects $non_pic_object"
  1623   1921   	    if test -z "$pic_object" || test "$pic_object" = none ; then
  1624   1922   	      arg="$non_pic_object"
  1625   1923   	    fi
         1924  +	  else
         1925  +	    # If the PIC object exists, use it instead.
         1926  +	    # $xdir was prepended to $pic_object above.
         1927  +	    non_pic_object="$pic_object"
         1928  +	    non_pic_objects="$non_pic_objects $non_pic_object"
  1626   1929   	  fi
  1627   1930   	else
  1628   1931   	  # Only an error if not doing a dry-run.
  1629   1932   	  if test -z "$run"; then
  1630   1933   	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  1631         -	    exit 1
         1934  +	    exit $EXIT_FAILURE
  1632   1935   	  else
  1633   1936   	    # Dry-run case.
  1634   1937   
  1635   1938   	    # Extract subdirectory from the argument.
  1636   1939   	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1637   1940   	    if test "X$xdir" = "X$arg"; then
  1638   1941   	      xdir=
................................................................................
  1691   1994   	finalize_command="$finalize_command $arg"
  1692   1995         fi
  1693   1996       done # argument parsing loop
  1694   1997   
  1695   1998       if test -n "$prev"; then
  1696   1999         $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
  1697   2000         $echo "$help" 1>&2
  1698         -      exit 1
         2001  +      exit $EXIT_FAILURE
  1699   2002       fi
  1700   2003   
  1701   2004       if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  1702   2005         eval arg=\"$export_dynamic_flag_spec\"
  1703   2006         compile_command="$compile_command $arg"
  1704   2007         finalize_command="$finalize_command $arg"
  1705   2008       fi
................................................................................
  1724   2027       else
  1725   2028         output_objdir="$output_objdir/$objdir"
  1726   2029       fi
  1727   2030       # Create the object directory.
  1728   2031       if test ! -d "$output_objdir"; then
  1729   2032         $show "$mkdir $output_objdir"
  1730   2033         $run $mkdir $output_objdir
  1731         -      status=$?
  1732         -      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
  1733         -	exit $status
         2034  +      exit_status=$?
         2035  +      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
         2036  +	exit $exit_status
  1734   2037         fi
  1735   2038       fi
  1736   2039   
  1737   2040       # Determine the type of output
  1738   2041       case $output in
  1739   2042       "")
  1740   2043         $echo "$modename: you must specify an output file" 1>&2
  1741   2044         $echo "$help" 1>&2
  1742         -      exit 1
         2045  +      exit $EXIT_FAILURE
  1743   2046         ;;
  1744   2047       *.$libext) linkmode=oldlib ;;
  1745   2048       *.lo | *.$objext) linkmode=obj ;;
  1746   2049       *.la) linkmode=lib ;;
  1747   2050       *) linkmode=prog ;; # Anything else should be a program.
  1748   2051       esac
  1749   2052   
  1750   2053       case $host in
  1751   2054       *cygwin* | *mingw* | *pw32*)
  1752         -      # don't eliminate duplcations in $postdeps and $predeps
         2055  +      # don't eliminate duplications in $postdeps and $predeps
  1753   2056         duplicate_compiler_generated_deps=yes
  1754   2057         ;;
  1755   2058       *)
  1756   2059         duplicate_compiler_generated_deps=$duplicate_deps
  1757   2060         ;;
  1758   2061       esac
  1759   2062       specialdeplibs=
................................................................................
  1789   2092       fi
  1790   2093   
  1791   2094       deplibs=
  1792   2095       newdependency_libs=
  1793   2096       newlib_search_path=
  1794   2097       need_relink=no # whether we're linking any uninstalled libtool libraries
  1795   2098       notinst_deplibs= # not-installed libtool libraries
  1796         -    notinst_path= # paths that contain not-installed libtool libraries
  1797   2099       case $linkmode in
  1798   2100       lib)
  1799   2101   	passes="conv link"
  1800   2102   	for file in $dlfiles $dlprefiles; do
  1801   2103   	  case $file in
  1802   2104   	  *.la) ;;
  1803   2105   	  *)
  1804   2106   	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
  1805         -	    exit 1
         2107  +	    exit $EXIT_FAILURE
  1806   2108   	    ;;
  1807   2109   	  esac
  1808   2110   	done
  1809   2111   	;;
  1810   2112       prog)
  1811   2113   	compile_deplibs=
  1812   2114   	finalize_deplibs=
................................................................................
  1841   2143   	found=no
  1842   2144   	case $deplib in
  1843   2145   	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
  1844   2146   	  if test "$linkmode,$pass" = "prog,link"; then
  1845   2147   	    compile_deplibs="$deplib $compile_deplibs"
  1846   2148   	    finalize_deplibs="$deplib $finalize_deplibs"
  1847   2149   	  else
  1848         -	    deplibs="$deplib $deplibs"
         2150  +	    compiler_flags="$compiler_flags $deplib"
  1849   2151   	  fi
  1850   2152   	  continue
  1851   2153   	  ;;
  1852   2154   	-l*)
  1853   2155   	  if test "$linkmode" != lib && test "$linkmode" != prog; then
  1854   2156   	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
  1855   2157   	    continue
  1856   2158   	  fi
  1857         -	  if test "$pass" = conv; then
  1858         -	    deplibs="$deplib $deplibs"
  1859         -	    continue
  1860         -	  fi
  1861   2159   	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
  1862   2160   	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
  1863         -	    for search_ext in .la $shrext .so .a; do
         2161  +	    for search_ext in .la $std_shrext .so .a; do
  1864   2162   	      # Search the libtool library
  1865   2163   	      lib="$searchdir/lib${name}${search_ext}"
  1866   2164   	      if test -f "$lib"; then
  1867   2165   		if test "$search_ext" = ".la"; then
  1868   2166   		  found=yes
  1869   2167   		else
  1870   2168   		  found=no
................................................................................
  1932   2230   	  prog)
  1933   2231   	    if test "$pass" = conv; then
  1934   2232   	      deplibs="$deplib $deplibs"
  1935   2233   	      continue
  1936   2234   	    fi
  1937   2235   	    if test "$pass" = scan; then
  1938   2236   	      deplibs="$deplib $deplibs"
  1939         -	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  1940   2237   	    else
  1941   2238   	      compile_deplibs="$deplib $compile_deplibs"
  1942   2239   	      finalize_deplibs="$deplib $finalize_deplibs"
  1943   2240   	    fi
         2241  +	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  1944   2242   	    ;;
  1945   2243   	  *)
  1946   2244   	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
  1947   2245   	    ;;
  1948   2246   	  esac # linkmode
  1949   2247   	  continue
  1950   2248   	  ;; # -L
................................................................................
  1964   2262   	*.$libext)
  1965   2263   	  if test "$pass" = conv; then
  1966   2264   	    deplibs="$deplib $deplibs"
  1967   2265   	    continue
  1968   2266   	  fi
  1969   2267   	  case $linkmode in
  1970   2268   	  lib)
  1971         -	    if test "$deplibs_check_method" != pass_all; then
         2269  +	    valid_a_lib=no
         2270  +	    case $deplibs_check_method in
         2271  +	      match_pattern*)
         2272  +		set dummy $deplibs_check_method
         2273  +	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
         2274  +		if eval $echo \"$deplib\" 2>/dev/null \
         2275  +		    | $SED 10q \
         2276  +		    | $EGREP "$match_pattern_regex" > /dev/null; then
         2277  +		  valid_a_lib=yes
         2278  +		fi
         2279  +		;;
         2280  +	      pass_all)
         2281  +		valid_a_lib=yes
         2282  +		;;
         2283  +            esac
         2284  +	    if test "$valid_a_lib" != yes; then
  1972   2285   	      $echo
  1973   2286   	      $echo "*** Warning: Trying to link with static lib archive $deplib."
  1974   2287   	      $echo "*** I have the capability to make that library automatically link in when"
  1975   2288   	      $echo "*** you link to this library.  But I can only do this if you have a"
  1976   2289   	      $echo "*** shared version of the library, which you do not appear to have"
  1977   2290   	      $echo "*** because the file extensions .$libext of this argument makes me believe"
  1978   2291   	      $echo "*** that it is just a static archive that I should not used here."
................................................................................
  2014   2327   	%DEPLIBS%)
  2015   2328   	  alldeplibs=yes
  2016   2329   	  continue
  2017   2330   	  ;;
  2018   2331   	esac # case $deplib
  2019   2332   	if test "$found" = yes || test -f "$lib"; then :
  2020   2333   	else
  2021         -	  $echo "$modename: cannot find the library \`$lib'" 1>&2
  2022         -	  exit 1
         2334  +	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
         2335  +	  exit $EXIT_FAILURE
  2023   2336   	fi
  2024   2337   
  2025   2338   	# Check to see that this really is a libtool archive.
  2026   2339   	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  2027   2340   	else
  2028   2341   	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  2029         -	  exit 1
         2342  +	  exit $EXIT_FAILURE
  2030   2343   	fi
  2031   2344   
  2032   2345   	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
  2033   2346   	test "X$ladir" = "X$lib" && ladir="."
  2034   2347   
  2035   2348   	dlname=
  2036   2349   	dlopen=
................................................................................
  2038   2351   	libdir=
  2039   2352   	library_names=
  2040   2353   	old_library=
  2041   2354   	# If the library was installed with an old release of libtool,
  2042   2355   	# it will not redefine variables installed, or shouldnotlink
  2043   2356   	installed=yes
  2044   2357   	shouldnotlink=no
         2358  +	avoidtemprpath=
         2359  +
  2045   2360   
  2046   2361   	# Read the .la file
  2047   2362   	case $lib in
  2048   2363   	*/* | *\\*) . $lib ;;
  2049   2364   	*) . ./$lib ;;
  2050   2365   	esac
  2051   2366   
................................................................................
  2058   2373   
  2059   2374   	if test "$pass" = conv; then
  2060   2375   	  # Only check for convenience libraries
  2061   2376   	  deplibs="$lib $deplibs"
  2062   2377   	  if test -z "$libdir"; then
  2063   2378   	    if test -z "$old_library"; then
  2064   2379   	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  2065         -	      exit 1
         2380  +	      exit $EXIT_FAILURE
  2066   2381   	    fi
  2067   2382   	    # It is a libtool convenience library, so add in its objects.
  2068   2383   	    convenience="$convenience $ladir/$objdir/$old_library"
  2069   2384   	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
  2070   2385   	    tmp_libs=
  2071   2386   	    for deplib in $dependency_libs; do
  2072   2387   	      deplibs="$deplib $deplibs"
................................................................................
  2075   2390   	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  2076   2391   	        esac
  2077   2392                 fi
  2078   2393   	      tmp_libs="$tmp_libs $deplib"
  2079   2394   	    done
  2080   2395   	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
  2081   2396   	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
  2082         -	    exit 1
         2397  +	    exit $EXIT_FAILURE
  2083   2398   	  fi
  2084   2399   	  continue
  2085   2400   	fi # $pass = conv
  2086   2401   
  2087         -    
         2402  +
  2088   2403   	# Get the name of the library we link against.
  2089   2404   	linklib=
  2090   2405   	for l in $old_library $library_names; do
  2091   2406   	  linklib="$l"
  2092   2407   	done
  2093   2408   	if test -z "$linklib"; then
  2094   2409   	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  2095         -	  exit 1
         2410  +	  exit $EXIT_FAILURE
  2096   2411   	fi
  2097   2412   
  2098   2413   	# This library was specified with -dlopen.
  2099   2414   	if test "$pass" = dlopen; then
  2100   2415   	  if test -z "$libdir"; then
  2101   2416   	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
  2102         -	    exit 1
         2417  +	    exit $EXIT_FAILURE
  2103   2418   	  fi
  2104         -	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
         2419  +	  if test -z "$dlname" ||
         2420  +	     test "$dlopen_support" != yes ||
         2421  +	     test "$build_libtool_libs" = no; then
  2105   2422   	    # If there is no dlname, no dlopen support or we're linking
  2106   2423   	    # statically, we need to preload.  We also need to preload any
  2107   2424   	    # dependent libraries so libltdl's deplib preloader doesn't
  2108   2425   	    # bomb out in the load deplibs phase.
  2109   2426   	    dlprefiles="$dlprefiles $lib $dependency_libs"
  2110   2427   	  else
  2111   2428   	    newdlfiles="$newdlfiles $lib"
................................................................................
  2134   2451   	    dir="$ladir"
  2135   2452   	    absdir="$abs_ladir"
  2136   2453   	    libdir="$abs_ladir"
  2137   2454   	  else
  2138   2455   	    dir="$libdir"
  2139   2456   	    absdir="$libdir"
  2140   2457   	  fi
         2458  +	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  2141   2459   	else
  2142         -	  dir="$ladir/$objdir"
  2143         -	  absdir="$abs_ladir/$objdir"
  2144         -	  # Remove this search path later
  2145         -	  notinst_path="$notinst_path $abs_ladir"
         2460  +	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
         2461  +	    dir="$ladir"
         2462  +	    absdir="$abs_ladir"
         2463  +	    # Remove this search path later
         2464  +	    notinst_path="$notinst_path $abs_ladir"
         2465  +	  else
         2466  +	    dir="$ladir/$objdir"
         2467  +	    absdir="$abs_ladir/$objdir"
         2468  +	    # Remove this search path later
         2469  +	    notinst_path="$notinst_path $abs_ladir"
         2470  +	  fi
  2146   2471   	fi # $installed = yes
  2147   2472   	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  2148   2473   
  2149   2474   	# This library was specified with -dlpreopen.
  2150   2475   	if test "$pass" = dlpreopen; then
  2151   2476   	  if test -z "$libdir"; then
  2152   2477   	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
  2153         -	    exit 1
         2478  +	    exit $EXIT_FAILURE
  2154   2479   	  fi
  2155   2480   	  # Prefer using a static library (so that no silly _DYNAMIC symbols
  2156   2481   	  # are required to link).
  2157   2482   	  if test -n "$old_library"; then
  2158   2483   	    newdlprefiles="$newdlprefiles $dir/$old_library"
  2159   2484   	  # Otherwise, use the dlname, so that lt_dlopen finds it.
  2160   2485   	  elif test -n "$dlname"; then
................................................................................
  2173   2498   	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
  2174   2499   	  else
  2175   2500   	    deplibs="$lib $deplibs" # used for prog,scan pass
  2176   2501   	  fi
  2177   2502   	  continue
  2178   2503   	fi
  2179   2504   
  2180         -    
         2505  +
  2181   2506   	if test "$linkmode" = prog && test "$pass" != link; then
  2182   2507   	  newlib_search_path="$newlib_search_path $ladir"
  2183   2508   	  deplibs="$lib $deplibs"
  2184   2509   
  2185   2510   	  linkalldeplibs=no
  2186   2511   	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
  2187   2512   	     test "$build_libtool_libs" = no; then
................................................................................
  2211   2536   	  continue
  2212   2537   	fi # $linkmode = prog...
  2213   2538   
  2214   2539   	if test "$linkmode,$pass" = "prog,link"; then
  2215   2540   	  if test -n "$library_names" &&
  2216   2541   	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2217   2542   	    # We need to hardcode the library path
  2218         -	    if test -n "$shlibpath_var"; then
         2543  +	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
  2219   2544   	      # Make sure the rpath contains only unique directories.
  2220   2545   	      case "$temp_rpath " in
  2221   2546   	      *" $dir "*) ;;
  2222   2547   	      *" $absdir "*) ;;
  2223         -	      *) temp_rpath="$temp_rpath $dir" ;;
         2548  +	      *) temp_rpath="$temp_rpath $absdir" ;;
  2224   2549   	      esac
  2225   2550   	    fi
  2226   2551   
  2227   2552   	    # Hardcode the library path.
  2228   2553   	    # Skip directories that are in the system default run-time
  2229   2554   	    # search path.
  2230   2555   	    case " $sys_lib_dlsearch_path " in
................................................................................
  2253   2578   		 test -n "$library_names"; }; }; then
  2254   2579   	    # We only need to search for static libraries
  2255   2580   	    continue
  2256   2581   	  fi
  2257   2582   	fi
  2258   2583   
  2259   2584   	link_static=no # Whether the deplib will be linked statically
         2585  +	use_static_libs=$prefer_static_libs
         2586  +	if test "$use_static_libs" = built && test "$installed" = yes ; then
         2587  +	  use_static_libs=no
         2588  +	fi
  2260   2589   	if test -n "$library_names" &&
  2261         -	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
         2590  +	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
  2262   2591   	  if test "$installed" = no; then
  2263   2592   	    notinst_deplibs="$notinst_deplibs $lib"
  2264   2593   	    need_relink=yes
  2265   2594   	  fi
  2266   2595   	  # This is a shared library
  2267         -	
  2268         -      # Warn about portability, can't link against -module's on some systems (darwin)
  2269         -      if test "$shouldnotlink" = yes && test "$pass" = link ; then
         2596  +
         2597  +	  # Warn about portability, can't link against -module's on
         2598  +	  # some systems (darwin)
         2599  +	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
  2270   2600   	    $echo
  2271   2601   	    if test "$linkmode" = prog; then
  2272   2602   	      $echo "*** Warning: Linking the executable $output against the loadable module"
  2273   2603   	    else
  2274   2604   	      $echo "*** Warning: Linking the shared library $output against the loadable module"
  2275   2605   	    fi
  2276         -	    $echo "*** $linklib is not portable!"    
  2277         -      fi	  
         2606  +	    $echo "*** $linklib is not portable!"
         2607  +	  fi
  2278   2608   	  if test "$linkmode" = lib &&
  2279   2609   	     test "$hardcode_into_libs" = yes; then
  2280   2610   	    # Hardcode the library path.
  2281   2611   	    # Skip directories that are in the system default run-time
  2282   2612   	    # search path.
  2283   2613   	    case " $sys_lib_dlsearch_path " in
  2284   2614   	    *" $absdir "*) ;;
................................................................................
  2366   2696   	    add=
  2367   2697   	    lib_linked=yes
  2368   2698   	    case $hardcode_action in
  2369   2699   	    immediate | unsupported)
  2370   2700   	      if test "$hardcode_direct" = no; then
  2371   2701   		add="$dir/$linklib"
  2372   2702   		case $host in
  2373         -		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
         2703  +		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
         2704  +		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
         2705  +		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
         2706  +		    *-*-unixware7*) add_dir="-L$dir" ;;
  2374   2707   		  *-*-darwin* )
  2375         -		    # if the lib is a module then we can not link against it, someone
  2376         -		    # is ignoring the new warnings I added
  2377         -		    if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
         2708  +		    # if the lib is a module then we can not link against
         2709  +		    # it, someone is ignoring the new warnings I added
         2710  +		    if /usr/bin/file -L $add 2> /dev/null |
         2711  +                      $EGREP ": [^:]* bundle" >/dev/null ; then
  2378   2712   		      $echo "** Warning, lib $linklib is a module, not a shared library"
  2379   2713   		      if test -z "$old_library" ; then
  2380   2714   		        $echo
  2381   2715   		        $echo "** And there doesn't seem to be a static archive available"
  2382   2716   		        $echo "** The link will probably fail, sorry"
  2383   2717   		      else
  2384   2718   		        add="$dir/$old_library"
  2385         -		      fi 
         2719  +		      fi
  2386   2720   		    fi
  2387   2721   		esac
  2388   2722   	      elif test "$hardcode_minus_L" = no; then
  2389   2723   		case $host in
  2390   2724   		*-*-sunos*) add_shlibpath="$dir" ;;
  2391   2725   		esac
  2392   2726   		add_dir="-L$dir"
................................................................................
  2401   2735   	    relink)
  2402   2736   	      if test "$hardcode_direct" = yes; then
  2403   2737   		add="$dir/$linklib"
  2404   2738   	      elif test "$hardcode_minus_L" = yes; then
  2405   2739   		add_dir="-L$dir"
  2406   2740   		# Try looking first in the location we're being installed to.
  2407   2741   		if test -n "$inst_prefix_dir"; then
  2408         -		  case "$libdir" in
         2742  +		  case $libdir in
  2409   2743   		    [\\/]*)
  2410   2744   		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
  2411   2745   		      ;;
  2412   2746   		  esac
  2413   2747   		fi
  2414   2748   		add="-l$name"
  2415   2749   	      elif test "$hardcode_shlibpath_var" = yes; then
................................................................................
  2420   2754   	      fi
  2421   2755   	      ;;
  2422   2756   	    *) lib_linked=no ;;
  2423   2757   	    esac
  2424   2758   
  2425   2759   	    if test "$lib_linked" != yes; then
  2426   2760   	      $echo "$modename: configuration error: unsupported hardcode properties"
  2427         -	      exit 1
         2761  +	      exit $EXIT_FAILURE
  2428   2762   	    fi
  2429   2763   
  2430   2764   	    if test -n "$add_shlibpath"; then
  2431   2765   	      case :$compile_shlibpath: in
  2432   2766   	      *":$add_shlibpath:"*) ;;
  2433   2767   	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
  2434   2768   	      esac
................................................................................
  2463   2797   	    elif test "$hardcode_shlibpath_var" = yes; then
  2464   2798   	      case :$finalize_shlibpath: in
  2465   2799   	      *":$libdir:"*) ;;
  2466   2800   	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  2467   2801   	      esac
  2468   2802   	      add="-l$name"
  2469   2803   	    elif test "$hardcode_automatic" = yes; then
  2470         -	      if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
         2804  +	      if test -n "$inst_prefix_dir" &&
         2805  +		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
  2471   2806   	        add="$inst_prefix_dir$libdir/$linklib"
  2472   2807   	      else
  2473   2808   	        add="$libdir/$linklib"
  2474   2809   	      fi
  2475   2810   	    else
  2476   2811   	      # We cannot seem to hardcode it, guess we'll fake it.
  2477   2812   	      add_dir="-L$libdir"
  2478   2813   	      # Try looking first in the location we're being installed to.
  2479   2814   	      if test -n "$inst_prefix_dir"; then
  2480         -		case "$libdir" in
         2815  +		case $libdir in
  2481   2816   		  [\\/]*)
  2482   2817   		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
  2483   2818   		    ;;
  2484   2819   		esac
  2485   2820   	      fi
  2486   2821   	      add="-l$name"
  2487   2822   	    fi
................................................................................
  2534   2869   		build_libtool_libs=module
  2535   2870   		build_old_libs=yes
  2536   2871   	      else
  2537   2872   		build_libtool_libs=no
  2538   2873   	      fi
  2539   2874   	    fi
  2540   2875   	  else
  2541         -	    convenience="$convenience $dir/$old_library"
  2542         -	    old_convenience="$old_convenience $dir/$old_library"
  2543   2876   	    deplibs="$dir/$old_library $deplibs"
  2544   2877   	    link_static=yes
  2545   2878   	  fi
  2546   2879   	fi # link shared/static library?
  2547   2880   
  2548   2881   	if test "$linkmode" = lib; then
  2549   2882   	  if test -n "$dependency_libs" &&
  2550         -	     { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
         2883  +	     { test "$hardcode_into_libs" != yes ||
         2884  +	       test "$build_old_libs" = yes ||
  2551   2885   	       test "$link_static" = yes; }; then
  2552   2886   	    # Extract -R from dependency_libs
  2553   2887   	    temp_deplibs=
  2554   2888   	    for libdir in $dependency_libs; do
  2555   2889   	      case $libdir in
  2556   2890   	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
  2557   2891   		   case " $xrpath " in
................................................................................
  2600   2934   		esac
  2601   2935   		if grep "^installed=no" $deplib > /dev/null; then
  2602   2936   		  path="$absdir/$objdir"
  2603   2937   		else
  2604   2938   		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  2605   2939   		  if test -z "$libdir"; then
  2606   2940   		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  2607         -		    exit 1
         2941  +		    exit $EXIT_FAILURE
  2608   2942   		  fi
  2609   2943   		  if test "$absdir" != "$libdir"; then
  2610   2944   		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
  2611   2945   		  fi
  2612   2946   		  path="$absdir"
  2613   2947   		fi
  2614   2948   		depdepl=
  2615   2949   		case $host in
  2616   2950   		*-*-darwin*)
  2617         -		  # we do not want to link against static libs, but need to link against shared
         2951  +		  # we do not want to link against static libs,
         2952  +		  # but need to link against shared
  2618   2953   		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
  2619   2954   		  if test -n "$deplibrary_names" ; then
  2620   2955   		    for tmp in $deplibrary_names ; do
  2621   2956   		      depdepl=$tmp
  2622   2957   		    done
  2623   2958   		    if test -f "$path/$depdepl" ; then
  2624   2959   		      depdepl="$path/$depdepl"
  2625         -		   fi
         2960  +		    fi
  2626   2961   		    # do not add paths which are already there
  2627   2962   		    case " $newlib_search_path " in
  2628   2963   		    *" $path "*) ;;
  2629   2964   		    *) newlib_search_path="$newlib_search_path $path";;
  2630   2965   		    esac
  2631   2966   		  fi
  2632   2967   		  path=""
  2633   2968   		  ;;
  2634   2969   		*)
  2635         -		path="-L$path"
  2636         -		;;
  2637         -		esac 
  2638         -		
         2970  +		  path="-L$path"
         2971  +		  ;;
         2972  +		esac
  2639   2973   		;;
  2640         -		  -l*)
         2974  +	      -l*)
  2641   2975   		case $host in
  2642   2976   		*-*-darwin*)
  2643         -		 # Again, we only want to link against shared libraries
  2644         -		 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
  2645         -		 for tmp in $newlib_search_path ; do
  2646         -		     if test -f "$tmp/lib$tmp_libs.dylib" ; then
  2647         -		       eval depdepl="$tmp/lib$tmp_libs.dylib"
  2648         -		       break
  2649         -		     fi  
  2650         -         done
  2651         -         path=""
         2977  +		  # Again, we only want to link against shared libraries
         2978  +		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
         2979  +		  for tmp in $newlib_search_path ; do
         2980  +		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
         2981  +		      eval depdepl="$tmp/lib$tmp_libs.dylib"
         2982  +		      break
         2983  +		    fi
         2984  +		  done
         2985  +		  path=""
  2652   2986   		  ;;
  2653   2987   		*) continue ;;
  2654         -		esac  		  
         2988  +		esac
  2655   2989   		;;
  2656   2990   	      *) continue ;;
  2657   2991   	      esac
  2658   2992   	      case " $deplibs " in
  2659         -	      *" $depdepl "*) ;;
  2660         -	      *) deplibs="$deplibs $depdepl" ;;
  2661         -	      esac	      
         2993  +	      *" $path "*) ;;
         2994  +	      *) deplibs="$path $deplibs" ;;
         2995  +	      esac
  2662   2996   	      case " $deplibs " in
  2663         -	      *" $path "*) ;;
  2664         -	      *) deplibs="$deplibs $path" ;;
         2997  +	      *" $depdepl "*) ;;
         2998  +	      *) deplibs="$depdepl $deplibs" ;;
  2665   2999   	      esac
  2666   3000   	    done
  2667   3001   	  fi # link_all_deplibs != no
  2668   3002   	fi # linkmode = lib
  2669   3003         done # for deplib in $libs
  2670   3004         dependency_libs="$newdependency_libs"
  2671   3005         if test "$pass" = dlpreopen; then
................................................................................
  2744   3078   	      ;;
  2745   3079   	    *) tmp_libs="$tmp_libs $deplib" ;;
  2746   3080   	    esac
  2747   3081   	  done
  2748   3082   	  eval $var=\"$tmp_libs\"
  2749   3083   	done # for var
  2750   3084         fi
  2751         -      # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
         3085  +      # Last step: remove runtime libs from dependency_libs
         3086  +      # (they stay in deplibs)
  2752   3087         tmp_libs=
  2753   3088         for i in $dependency_libs ; do
  2754   3089   	case " $predeps $postdeps $compiler_lib_search_path " in
  2755   3090   	*" $i "*)
  2756   3091   	  i=""
  2757   3092   	  ;;
  2758   3093   	esac
................................................................................
  2804   3139         ;;
  2805   3140   
  2806   3141       lib)
  2807   3142         # Make sure we only generate libraries of the form `libNAME.la'.
  2808   3143         case $outputname in
  2809   3144         lib*)
  2810   3145   	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  2811         -	eval shared_ext=\"$shrext\"
         3146  +	eval shared_ext=\"$shrext_cmds\"
  2812   3147   	eval libname=\"$libname_spec\"
  2813   3148   	;;
  2814   3149         *)
  2815   3150   	if test "$module" = no; then
  2816   3151   	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
  2817   3152   	  $echo "$help" 1>&2
  2818         -	  exit 1
         3153  +	  exit $EXIT_FAILURE
  2819   3154   	fi
  2820   3155   	if test "$need_lib_prefix" != no; then
  2821   3156   	  # Add the "lib" prefix for modules if required
  2822   3157   	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  2823         -	  eval shared_ext=\"$shrext\"
         3158  +	  eval shared_ext=\"$shrext_cmds\"
  2824   3159   	  eval libname=\"$libname_spec\"
  2825   3160   	else
  2826   3161   	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  2827   3162   	fi
  2828   3163   	;;
  2829   3164         esac
  2830   3165   
  2831   3166         if test -n "$objs"; then
  2832   3167   	if test "$deplibs_check_method" != pass_all; then
  2833   3168   	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
  2834         -	  exit 1
         3169  +	  exit $EXIT_FAILURE
  2835   3170   	else
  2836   3171   	  $echo
  2837   3172   	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
  2838   3173   	  $echo "*** objects $objs is not portable!"
  2839   3174   	  libobjs="$libobjs $objs"
  2840   3175   	fi
  2841   3176         fi
................................................................................
  2875   3210   	save_ifs="$IFS"; IFS=':'
  2876   3211   	set dummy $vinfo 0 0 0
  2877   3212   	IFS="$save_ifs"
  2878   3213   
  2879   3214   	if test -n "$8"; then
  2880   3215   	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
  2881   3216   	  $echo "$help" 1>&2
  2882         -	  exit 1
         3217  +	  exit $EXIT_FAILURE
  2883   3218   	fi
  2884   3219   
  2885   3220   	# convert absolute version numbers to libtool ages
  2886   3221   	# this retains compatibility with .la files and attempts
  2887   3222   	# to make the code below a bit more comprehensible
  2888         -	
         3223  +
  2889   3224   	case $vinfo_number in
  2890   3225   	yes)
  2891   3226   	  number_major="$2"
  2892   3227   	  number_minor="$3"
  2893   3228   	  number_revision="$4"
  2894   3229   	  #
  2895   3230   	  # There are really only two kinds -- those that
................................................................................
  2921   3256   	  revision="$3"
  2922   3257   	  age="$4"
  2923   3258   	  ;;
  2924   3259   	esac
  2925   3260   
  2926   3261   	# Check that each of the things are valid numbers.
  2927   3262   	case $current in
  2928         -	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
         3263  +	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]) ;;
  2929   3264   	*)
  2930         -	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
         3265  +	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
  2931   3266   	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2932         -	  exit 1
         3267  +	  exit $EXIT_FAILURE
  2933   3268   	  ;;
  2934   3269   	esac
  2935   3270   
  2936   3271   	case $revision in
  2937         -	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
         3272  +	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]) ;;
  2938   3273   	*)
  2939         -	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
         3274  +	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
  2940   3275   	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2941         -	  exit 1
         3276  +	  exit $EXIT_FAILURE
  2942   3277   	  ;;
  2943   3278   	esac
  2944   3279   
  2945   3280   	case $age in
  2946         -	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
         3281  +	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]) ;;
  2947   3282   	*)
  2948         -	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
         3283  +	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
  2949   3284   	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2950         -	  exit 1
         3285  +	  exit $EXIT_FAILURE
  2951   3286   	  ;;
  2952   3287   	esac
  2953   3288   
  2954   3289   	if test "$age" -gt "$current"; then
  2955   3290   	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
  2956   3291   	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2957         -	  exit 1
         3292  +	  exit $EXIT_FAILURE
  2958   3293   	fi
  2959   3294   
  2960   3295   	# Calculate the version variables.
  2961   3296   	major=
  2962   3297   	versuffix=
  2963   3298   	verstring=
  2964   3299   	case $version_type in
................................................................................
  2967   3302   	darwin)
  2968   3303   	  # Like Linux, but with the current version available in
  2969   3304   	  # verstring for coding it into the library header
  2970   3305   	  major=.`expr $current - $age`
  2971   3306   	  versuffix="$major.$age.$revision"
  2972   3307   	  # Darwin ld doesn't like 0 for these options...
  2973   3308   	  minor_current=`expr $current + 1`
  2974         -	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
         3309  +	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
  2975   3310   	  ;;
  2976   3311   
  2977   3312   	freebsd-aout)
  2978   3313   	  major=".$current"
  2979   3314   	  versuffix=".$current.$revision";
  2980   3315   	  ;;
  2981   3316   
................................................................................
  3039   3374   	  major=`expr $current - $age`
  3040   3375   	  versuffix="-$major"
  3041   3376   	  ;;
  3042   3377   
  3043   3378   	*)
  3044   3379   	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
  3045   3380   	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  3046         -	  exit 1
         3381  +	  exit $EXIT_FAILURE
  3047   3382   	  ;;
  3048   3383   	esac
  3049   3384   
  3050   3385   	# Clear the version info if we defaulted, and they specified a release.
  3051   3386   	if test -z "$vinfo" && test -n "$release"; then
  3052   3387   	  major=
  3053   3388   	  case $version_type in
................................................................................
  3093   3428   	removelist=
  3094   3429   	tempremovelist=`$echo "$output_objdir/*"`
  3095   3430   	for p in $tempremovelist; do
  3096   3431   	  case $p in
  3097   3432   	    *.$objext)
  3098   3433   	       ;;
  3099   3434   	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
  3100         -	       if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
  3101         -	       then
  3102         -		 continue
         3435  +	       if test "X$precious_files_regex" != "X"; then
         3436  +	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
         3437  +	         then
         3438  +		   continue
         3439  +		 fi
  3103   3440   	       fi
  3104   3441   	       removelist="$removelist $p"
  3105   3442   	       ;;
  3106   3443   	    *) ;;
  3107   3444   	  esac
  3108   3445   	done
  3109   3446   	if test -n "$removelist"; then
................................................................................
  3118   3455   
  3119   3456   	# Transform .lo files to .o files.
  3120   3457   	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
  3121   3458         fi
  3122   3459   
  3123   3460         # Eliminate all temporary directories.
  3124   3461         for path in $notinst_path; do
  3125         -	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
  3126         -	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
  3127         -	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
         3462  +	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
         3463  +	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
         3464  +	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
  3128   3465         done
  3129   3466   
  3130   3467         if test -n "$xrpath"; then
  3131   3468   	# If the user specified any rpath flags, then add them.
  3132   3469   	temp_xrpath=
  3133   3470   	for libdir in $xrpath; do
  3134   3471   	  temp_xrpath="$temp_xrpath -R$libdir"
................................................................................
  3171   3508   	  *-*-rhapsody* | *-*-darwin1.[012])
  3172   3509   	    # Rhapsody C library is in the System framework
  3173   3510   	    deplibs="$deplibs -framework System"
  3174   3511   	    ;;
  3175   3512   	  *-*-netbsd*)
  3176   3513   	    # Don't link with libc until the a.out ld.so is fixed.
  3177   3514   	    ;;
  3178         -	  *-*-openbsd* | *-*-freebsd*)
         3515  +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  3179   3516   	    # Do not include libc due to us having libc/libc_r.
  3180         -	    test "X$arg" = "X-lc" && continue
         3517  +	    ;;
         3518  +	  *-*-sco3.2v5* | *-*-sco5v6*)
         3519  +	    # Causes problems with __ctype
         3520  +	    ;;
         3521  +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
         3522  +	    # Compiler inserts libc in the correct place for threads to work
  3181   3523   	    ;;
  3182   3524    	  *)
  3183   3525   	    # Add libc to deplibs on all other systems if necessary.
  3184   3526   	    if test "$build_libtool_need_lc" = "yes"; then
  3185   3527   	      deplibs="$deplibs -lc"
  3186   3528   	    fi
  3187   3529   	    ;;
................................................................................
  3217   3559   	  # against the deplibs as a proxy for the library.  Then we can check
  3218   3560   	  # whether they linked in statically or dynamically with ldd.
  3219   3561   	  $rm conftest.c
  3220   3562   	  cat > conftest.c <<EOF
  3221   3563   	  int main() { return 0; }
  3222   3564   EOF
  3223   3565   	  $rm conftest
  3224         -	  $LTCC -o conftest conftest.c $deplibs
         3566  +	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
  3225   3567   	  if test "$?" -eq 0 ; then
  3226   3568   	    ldd_output=`ldd conftest`
  3227   3569   	    for i in $deplibs; do
  3228         -	      name="`expr $i : '-l\(.*\)'`"
         3570  +	      name=`expr $i : '-l\(.*\)'`
  3229   3571   	      # If $name is empty we are operating on a -L argument.
  3230   3572                 if test "$name" != "" && test "$name" -ne "0"; then
  3231   3573   		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3232   3574   		  case " $predeps $postdeps " in
  3233   3575   		  *" $i "*)
  3234   3576   		    newdeplibs="$newdeplibs $i"
  3235   3577   		    i=""
................................................................................
  3258   3600   		newdeplibs="$newdeplibs $i"
  3259   3601   	      fi
  3260   3602   	    done
  3261   3603   	  else
  3262   3604   	    # Error occurred in the first compile.  Let's try to salvage
  3263   3605   	    # the situation: Compile a separate program for each library.
  3264   3606   	    for i in $deplibs; do
  3265         -	      name="`expr $i : '-l\(.*\)'`"
         3607  +	      name=`expr $i : '-l\(.*\)'`
  3266   3608   	      # If $name is empty we are operating on a -L argument.
  3267   3609                 if test "$name" != "" && test "$name" != "0"; then
  3268   3610   		$rm conftest
  3269         -		$LTCC -o conftest conftest.c $i
         3611  +		$LTCC $LTCFLAGS -o conftest conftest.c $i
  3270   3612   		# Did it work?
  3271   3613   		if test "$?" -eq 0 ; then
  3272   3614   		  ldd_output=`ldd conftest`
  3273   3615   		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3274   3616   		    case " $predeps $postdeps " in
  3275   3617   		    *" $i "*)
  3276   3618   		      newdeplibs="$newdeplibs $i"
................................................................................
  3310   3652   	    done
  3311   3653   	  fi
  3312   3654   	  ;;
  3313   3655   	file_magic*)
  3314   3656   	  set dummy $deplibs_check_method
  3315   3657   	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  3316   3658   	  for a_deplib in $deplibs; do
  3317         -	    name="`expr $a_deplib : '-l\(.*\)'`"
         3659  +	    name=`expr $a_deplib : '-l\(.*\)'`
  3318   3660   	    # If $name is empty we are operating on a -L argument.
  3319   3661               if test "$name" != "" && test  "$name" != "0"; then
  3320   3662   	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3321   3663   		case " $predeps $postdeps " in
  3322   3664   		*" $a_deplib "*)
  3323   3665   		  newdeplibs="$newdeplibs $a_deplib"
  3324   3666   		  a_deplib=""
................................................................................
  3344   3686   		      while test -h "$potlib" 2>/dev/null; do
  3345   3687   			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
  3346   3688   			case $potliblink in
  3347   3689   			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  3348   3690   			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  3349   3691   			esac
  3350   3692   		      done
         3693  +		      # It is ok to link against an archive when
         3694  +		      # building a shared library.
         3695  +		      if $AR -t $potlib > /dev/null 2>&1; then
         3696  +		        newdeplibs="$newdeplibs $a_deplib"
         3697  +		        a_deplib=""
         3698  +		        break 2
         3699  +		      fi
  3351   3700   		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  3352   3701   			 | ${SED} 10q \
  3353   3702   			 | $EGREP "$file_magic_regex" > /dev/null; then
  3354   3703   			newdeplibs="$newdeplibs $a_deplib"
  3355   3704   			a_deplib=""
  3356   3705   			break 2
  3357   3706   		      fi
................................................................................
  3379   3728   	    fi
  3380   3729   	  done # Gone through all deplibs.
  3381   3730   	  ;;
  3382   3731   	match_pattern*)
  3383   3732   	  set dummy $deplibs_check_method
  3384   3733   	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  3385   3734   	  for a_deplib in $deplibs; do
  3386         -	    name="`expr $a_deplib : '-l\(.*\)'`"
         3735  +	    name=`expr $a_deplib : '-l\(.*\)'`
  3387   3736   	    # If $name is empty we are operating on a -L argument.
  3388   3737   	    if test -n "$name" && test "$name" != "0"; then
  3389   3738   	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3390   3739   		case " $predeps $postdeps " in
  3391   3740   		*" $a_deplib "*)
  3392   3741   		  newdeplibs="$newdeplibs $a_deplib"
  3393   3742   		  a_deplib=""
................................................................................
  3508   3857   	      fi
  3509   3858   	    fi
  3510   3859   	  fi
  3511   3860   	fi
  3512   3861   	# Done checking deplibs!
  3513   3862   	deplibs=$newdeplibs
  3514   3863         fi
         3864  +
         3865  +
         3866  +      # move library search paths that coincide with paths to not yet
         3867  +      # installed libraries to the beginning of the library search list
         3868  +      new_libs=
         3869  +      for path in $notinst_path; do
         3870  +	case " $new_libs " in
         3871  +	*" -L$path/$objdir "*) ;;
         3872  +	*)
         3873  +	  case " $deplibs " in
         3874  +	  *" -L$path/$objdir "*)
         3875  +	    new_libs="$new_libs -L$path/$objdir" ;;
         3876  +	  esac
         3877  +	  ;;
         3878  +	esac
         3879  +      done
         3880  +      for deplib in $deplibs; do
         3881  +	case $deplib in
         3882  +	-L*)
         3883  +	  case " $new_libs " in
         3884  +	  *" $deplib "*) ;;
         3885  +	  *) new_libs="$new_libs $deplib" ;;
         3886  +	  esac
         3887  +	  ;;
         3888  +	*) new_libs="$new_libs $deplib" ;;
         3889  +	esac
         3890  +      done
         3891  +      deplibs="$new_libs"
         3892  +
  3515   3893   
  3516   3894         # All the library-specific variables (install_libdir is set above).
  3517   3895         library_names=
  3518   3896         old_library=
  3519   3897         dlname=
  3520   3898   
  3521   3899         # Test again, we may have decided not to build it any more
................................................................................
  3576   3954   	shlibpath="$finalize_shlibpath"
  3577   3955   	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
  3578   3956   	if test -n "$shlibpath"; then
  3579   3957   	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
  3580   3958   	fi
  3581   3959   
  3582   3960   	# Get the real and link names of the library.
  3583         -	eval shared_ext=\"$shrext\"
         3961  +	eval shared_ext=\"$shrext_cmds\"
  3584   3962   	eval library_names=\"$library_names_spec\"
  3585   3963   	set dummy $library_names
  3586   3964   	realname="$2"
  3587   3965   	shift; shift
  3588   3966   
  3589   3967   	if test -n "$soname_spec"; then
  3590   3968   	  eval soname=\"$soname_spec\"
................................................................................
  3592   3970   	  soname="$realname"
  3593   3971   	fi
  3594   3972   	if test -z "$dlname"; then
  3595   3973   	  dlname=$soname
  3596   3974   	fi
  3597   3975   
  3598   3976   	lib="$output_objdir/$realname"
         3977  +	linknames=
  3599   3978   	for link
  3600   3979   	do
  3601   3980   	  linknames="$linknames $link"
  3602   3981   	done
  3603   3982   
  3604   3983   	# Use standard objects if they are pic
  3605   3984   	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
................................................................................
  3620   3999   	        $show "$cmd"
  3621   4000   	        $run eval "$cmd" || exit $?
  3622   4001   	        skipped_export=false
  3623   4002   	      else
  3624   4003   	        # The command line is too long to execute in one step.
  3625   4004   	        $show "using reloadable object file for export list..."
  3626   4005   	        skipped_export=:
         4006  +		# Break out early, otherwise skipped_export may be
         4007  +		# set to false by a later but shorter cmd.
         4008  +		break
  3627   4009   	      fi
  3628   4010   	    done
  3629   4011   	    IFS="$save_ifs"
  3630   4012   	    if test -n "$export_symbols_regex"; then
  3631   4013   	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
  3632   4014   	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
  3633   4015   	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
................................................................................
  3640   4022   	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
  3641   4023   	fi
  3642   4024   
  3643   4025   	tmp_deplibs=
  3644   4026   	for test_deplib in $deplibs; do
  3645   4027   		case " $convenience " in
  3646   4028   		*" $test_deplib "*) ;;
  3647         -		*) 
         4029  +		*)
  3648   4030   			tmp_deplibs="$tmp_deplibs $test_deplib"
  3649   4031   			;;
  3650   4032   		esac
  3651   4033   	done
  3652         -	deplibs="$tmp_deplibs" 
         4034  +	deplibs="$tmp_deplibs"
  3653   4035   
  3654   4036   	if test -n "$convenience"; then
  3655   4037   	  if test -n "$whole_archive_flag_spec"; then
  3656   4038   	    save_libobjs=$libobjs
  3657   4039   	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  3658   4040   	  else
  3659   4041   	    gentop="$output_objdir/${outputname}x"
  3660         -	    $show "${rm}r $gentop"
  3661         -	    $run ${rm}r "$gentop"
  3662         -	    $show "$mkdir $gentop"
  3663         -	    $run $mkdir "$gentop"
  3664         -	    status=$?
  3665         -	    if test "$status" -ne 0 && test ! -d "$gentop"; then
  3666         -	      exit $status
  3667         -	    fi
  3668   4042   	    generated="$generated $gentop"
  3669   4043   
  3670         -	    for xlib in $convenience; do
  3671         -	      # Extract the objects.
  3672         -	      case $xlib in
  3673         -	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  3674         -	      *) xabs=`pwd`"/$xlib" ;;
  3675         -	      esac
  3676         -	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  3677         -	      xdir="$gentop/$xlib"
  3678         -
  3679         -	      $show "${rm}r $xdir"
  3680         -	      $run ${rm}r "$xdir"
  3681         -	      $show "$mkdir $xdir"
  3682         -	      $run $mkdir "$xdir"
  3683         -	      status=$?
  3684         -	      if test "$status" -ne 0 && test ! -d "$xdir"; then
  3685         -		exit $status
  3686         -	      fi
  3687         -	      # We will extract separately just the conflicting names and we will no
  3688         -	      # longer touch any unique names. It is faster to leave these extract
  3689         -	      # automatically by $AR in one run.
  3690         -	      $show "(cd $xdir && $AR x $xabs)"
  3691         -	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  3692         -	      if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
  3693         -		:
  3694         -	      else
  3695         -		$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
  3696         -		$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
  3697         -		$AR t "$xabs" | sort | uniq -cd | while read -r count name
  3698         -		do
  3699         -		  i=1
  3700         -		  while test "$i" -le "$count"
  3701         -		  do
  3702         -		   # Put our $i before any first dot (extension)
  3703         -		   # Never overwrite any file
  3704         -		   name_to="$name"
  3705         -		   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
  3706         -		   do
  3707         -		     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
  3708         -		   done
  3709         -		   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
  3710         -		   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
  3711         -		   i=`expr $i + 1`
  3712         -		  done
  3713         -		done
  3714         -	      fi
  3715         -
  3716         -	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
  3717         -	    done
         4044  +	    func_extract_archives $gentop $convenience
         4045  +	    libobjs="$libobjs $func_extract_archives_result"
  3718   4046   	  fi
  3719   4047   	fi
  3720         -
         4048  +	
  3721   4049   	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  3722   4050   	  eval flag=\"$thread_safe_flag_spec\"
  3723   4051   	  linker_flags="$linker_flags $flag"
  3724   4052   	fi
  3725   4053   
  3726   4054   	# Make a backup of the uninstalled library when relinking
  3727   4055   	if test "$mode" = relink; then
................................................................................
  3743   4071   	  cmds=$archive_expsym_cmds
  3744   4072   	else
  3745   4073   	  eval test_cmds=\"$archive_cmds\"
  3746   4074   	  cmds=$archive_cmds
  3747   4075   	  fi
  3748   4076   	fi
  3749   4077   
  3750         -	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
         4078  +	if test "X$skipped_export" != "X:" &&
         4079  +	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  3751   4080   	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  3752   4081   	  :
  3753   4082   	else
  3754   4083   	  # The command line is too long to link in one step, link piecewise.
  3755   4084   	  $echo "creating reloadable object files..."
  3756   4085   
  3757   4086   	  # Save the value of $output and $libobjs because we want to
................................................................................
  3762   4091   	  # This may have to be revisited, in case too many
  3763   4092   	  # convenience libraries get linked in and end up exceeding
  3764   4093   	  # the spec.
  3765   4094   	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
  3766   4095   	    save_libobjs=$libobjs
  3767   4096   	  fi
  3768   4097   	  save_output=$output
         4098  +	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
  3769   4099   
  3770   4100   	  # Clear the reloadable object creation command queue and
  3771   4101   	  # initialize k to one.
  3772   4102   	  test_cmds=
  3773   4103   	  concat_cmds=
  3774   4104   	  objlist=
  3775   4105   	  delfiles=
  3776   4106   	  last_robj=
  3777   4107   	  k=1
  3778         -	  output=$output_objdir/$save_output-${k}.$objext
         4108  +	  output=$output_objdir/$output_la-${k}.$objext
  3779   4109   	  # Loop over the list of objects to be linked.
  3780   4110   	  for obj in $save_libobjs
  3781   4111   	  do
  3782   4112   	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
  3783   4113   	    if test "X$objlist" = X ||
  3784         -	       { len=`expr "X$test_cmds" : ".*"` &&
         4114  +	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  3785   4115   		 test "$len" -le "$max_cmd_len"; }; then
  3786   4116   	      objlist="$objlist $obj"
  3787   4117   	    else
  3788   4118   	      # The command $test_cmds is almost too long, add a
  3789   4119   	      # command to the queue.
  3790   4120   	      if test "$k" -eq 1 ; then
  3791   4121   		# The first file doesn't have a previous command to add.
  3792   4122   		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
  3793   4123   	      else
  3794   4124   		# All subsequent reloadable object files will link in
  3795   4125   		# the last one created.
  3796   4126   		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
  3797   4127   	      fi
  3798         -	      last_robj=$output_objdir/$save_output-${k}.$objext
         4128  +	      last_robj=$output_objdir/$output_la-${k}.$objext
  3799   4129   	      k=`expr $k + 1`
  3800         -	      output=$output_objdir/$save_output-${k}.$objext
         4130  +	      output=$output_objdir/$output_la-${k}.$objext
  3801   4131   	      objlist=$obj
  3802   4132   	      len=1
  3803   4133   	    fi
  3804   4134   	  done
  3805   4135   	  # Handle the remaining objects by creating one last
  3806   4136   	  # reloadable object file.  All subsequent reloadable object
  3807   4137   	  # files will link in the last one created.
................................................................................
  3813   4143   	    export_symbols="$output_objdir/$libname.exp"
  3814   4144   	    $run $rm $export_symbols
  3815   4145   	    libobjs=$output
  3816   4146   	    # Append the command to create the export file.
  3817   4147   	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
  3818   4148             fi
  3819   4149   
  3820         -	  # Set up a command to remove the reloadale object files
         4150  +	  # Set up a command to remove the reloadable object files
  3821   4151   	  # after they are used.
  3822   4152   	  i=0
  3823   4153   	  while test "$i" -lt "$k"
  3824   4154   	  do
  3825   4155   	    i=`expr $i + 1`
  3826         -	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
         4156  +	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
  3827   4157   	  done
  3828   4158   
  3829   4159   	  $echo "creating a temporary reloadable object file: $output"
  3830   4160   
  3831   4161   	  # Loop through the commands generated above and execute them.
  3832   4162   	  save_ifs="$IFS"; IFS='~'
  3833   4163   	  for cmd in $concat_cmds; do
  3834   4164   	    IFS="$save_ifs"
  3835         -	    eval cmd=\"$cmd\"
  3836   4165   	    $show "$cmd"
  3837   4166   	    $run eval "$cmd" || exit $?
  3838   4167   	  done
  3839   4168   	  IFS="$save_ifs"
  3840   4169   
  3841   4170   	  libobjs=$output
  3842   4171   	  # Restore the value of output.
................................................................................
  3868   4197   	  eval cmds=\"\$cmds~\$rm $delfiles\"
  3869   4198   	fi
  3870   4199   	save_ifs="$IFS"; IFS='~'
  3871   4200   	for cmd in $cmds; do
  3872   4201   	  IFS="$save_ifs"
  3873   4202   	  eval cmd=\"$cmd\"
  3874   4203   	  $show "$cmd"
  3875         -	  $run eval "$cmd" || exit $?
         4204  +	  $run eval "$cmd" || {
         4205  +	    lt_exit=$?
         4206  +
         4207  +	    # Restore the uninstalled library and exit
         4208  +	    if test "$mode" = relink; then
         4209  +	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
         4210  +	    fi
         4211  +
         4212  +	    exit $lt_exit
         4213  +	  }
  3876   4214   	done
  3877   4215   	IFS="$save_ifs"
  3878   4216   
  3879   4217   	# Restore the uninstalled library and exit
  3880   4218   	if test "$mode" = relink; then
  3881   4219   	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
  3882         -	  exit 0
         4220  +
         4221  +	  if test -n "$convenience"; then
         4222  +	    if test -z "$whole_archive_flag_spec"; then
         4223  +	      $show "${rm}r $gentop"
         4224  +	      $run ${rm}r "$gentop"
         4225  +	    fi
         4226  +	  fi
         4227  +
         4228  +	  exit $EXIT_SUCCESS
  3883   4229   	fi
  3884   4230   
  3885   4231   	# Create links to the real library.
  3886   4232   	for linkname in $linknames; do
  3887   4233   	  if test "$realname" != "$linkname"; then
  3888   4234   	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
  3889   4235   	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
................................................................................
  3923   4269   	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
  3924   4270         fi
  3925   4271   
  3926   4272         case $output in
  3927   4273         *.lo)
  3928   4274   	if test -n "$objs$old_deplibs"; then
  3929   4275   	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
  3930         -	  exit 1
         4276  +	  exit $EXIT_FAILURE
  3931   4277   	fi
  3932   4278   	libobj="$output"
  3933   4279   	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
  3934   4280   	;;
  3935   4281         *)
  3936   4282   	libobj=
  3937   4283   	obj="$output"
................................................................................
  3952   4298         wl=
  3953   4299   
  3954   4300         if test -n "$convenience"; then
  3955   4301   	if test -n "$whole_archive_flag_spec"; then
  3956   4302   	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
  3957   4303   	else
  3958   4304   	  gentop="$output_objdir/${obj}x"
  3959         -	  $show "${rm}r $gentop"
  3960         -	  $run ${rm}r "$gentop"
  3961         -	  $show "$mkdir $gentop"
  3962         -	  $run $mkdir "$gentop"
  3963         -	  status=$?
  3964         -	  if test "$status" -ne 0 && test ! -d "$gentop"; then
  3965         -	    exit $status
  3966         -	  fi
  3967   4305   	  generated="$generated $gentop"
  3968   4306   
  3969         -	  for xlib in $convenience; do
  3970         -	    # Extract the objects.
  3971         -	    case $xlib in
  3972         -	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  3973         -	    *) xabs=`pwd`"/$xlib" ;;
  3974         -	    esac
  3975         -	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  3976         -	    xdir="$gentop/$xlib"
  3977         -
  3978         -	    $show "${rm}r $xdir"
  3979         -	    $run ${rm}r "$xdir"
  3980         -	    $show "$mkdir $xdir"
  3981         -	    $run $mkdir "$xdir"
  3982         -	    status=$?
  3983         -	    if test "$status" -ne 0 && test ! -d "$xdir"; then
  3984         -	      exit $status
  3985         -	    fi
  3986         -	    # We will extract separately just the conflicting names and we will no
  3987         -	    # longer touch any unique names. It is faster to leave these extract
  3988         -	    # automatically by $AR in one run.
  3989         -	    $show "(cd $xdir && $AR x $xabs)"
  3990         -	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  3991         -	    if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
  3992         -	      :
  3993         -	    else
  3994         -	      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
  3995         -	      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
  3996         -	      $AR t "$xabs" | sort | uniq -cd | while read -r count name
  3997         -	      do
  3998         -		i=1
  3999         -		while test "$i" -le "$count"
  4000         -		do
  4001         -		 # Put our $i before any first dot (extension)
  4002         -		 # Never overwrite any file
  4003         -		 name_to="$name"
  4004         -		 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
  4005         -		 do
  4006         -		   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
  4007         -		 done
  4008         -		 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
  4009         -		 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
  4010         -		 i=`expr $i + 1`
  4011         -		done
  4012         -	      done
  4013         -	    fi
  4014         -
  4015         -	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
  4016         -	  done
         4307  +	  func_extract_archives $gentop $convenience
         4308  +	  reload_conv_objs="$reload_objs $func_extract_archives_result"
  4017   4309   	fi
  4018   4310         fi
  4019   4311   
  4020   4312         # Create the old-style object.
  4021   4313         reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
  4022   4314   
  4023   4315         output="$obj"
................................................................................
  4034   4326         # Exit if we aren't doing a library object file.
  4035   4327         if test -z "$libobj"; then
  4036   4328   	if test -n "$gentop"; then
  4037   4329   	  $show "${rm}r $gentop"
  4038   4330   	  $run ${rm}r $gentop
  4039   4331   	fi
  4040   4332   
  4041         -	exit 0
         4333  +	exit $EXIT_SUCCESS
  4042   4334         fi
  4043   4335   
  4044   4336         if test "$build_libtool_libs" != yes; then
  4045   4337   	if test -n "$gentop"; then
  4046   4338   	  $show "${rm}r $gentop"
  4047   4339   	  $run ${rm}r $gentop
  4048   4340   	fi
  4049   4341   
  4050   4342   	# Create an invalid libtool object if no PIC, so that we don't
  4051   4343   	# accidentally link it into a program.
  4052   4344   	# $show "echo timestamp > $libobj"
  4053   4345   	# $run eval "echo timestamp > $libobj" || exit $?
  4054         -	exit 0
         4346  +	exit $EXIT_SUCCESS
  4055   4347         fi
  4056   4348   
  4057   4349         if test -n "$pic_flag" || test "$pic_mode" != default; then
  4058   4350   	# Only do commands if we really have different PIC objects.
  4059   4351   	reload_objs="$libobjs $reload_conv_objs"
  4060   4352   	output="$libobj"
  4061   4353   	cmds=$reload_cmds
................................................................................
  4070   4362         fi
  4071   4363   
  4072   4364         if test -n "$gentop"; then
  4073   4365   	$show "${rm}r $gentop"
  4074   4366   	$run ${rm}r $gentop
  4075   4367         fi
  4076   4368   
  4077         -      exit 0
         4369  +      exit $EXIT_SUCCESS
  4078   4370         ;;
  4079   4371   
  4080   4372       prog)
  4081   4373         case $host in
  4082   4374   	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
  4083   4375         esac
  4084   4376         if test -n "$vinfo"; then
................................................................................
  4109   4401           # Don't allow lazy linking, it breaks C++ global constructors
  4110   4402           if test "$tagname" = CXX ; then
  4111   4403           compile_command="$compile_command ${wl}-bind_at_load"
  4112   4404           finalize_command="$finalize_command ${wl}-bind_at_load"
  4113   4405           fi
  4114   4406           ;;
  4115   4407         esac
         4408  +
         4409  +
         4410  +      # move library search paths that coincide with paths to not yet
         4411  +      # installed libraries to the beginning of the library search list
         4412  +      new_libs=
         4413  +      for path in $notinst_path; do
         4414  +	case " $new_libs " in
         4415  +	*" -L$path/$objdir "*) ;;
         4416  +	*)
         4417  +	  case " $compile_deplibs " in
         4418  +	  *" -L$path/$objdir "*)
         4419  +	    new_libs="$new_libs -L$path/$objdir" ;;
         4420  +	  esac
         4421  +	  ;;
         4422  +	esac
         4423  +      done
         4424  +      for deplib in $compile_deplibs; do
         4425  +	case $deplib in
         4426  +	-L*)
         4427  +	  case " $new_libs " in
         4428  +	  *" $deplib "*) ;;
         4429  +	  *) new_libs="$new_libs $deplib" ;;
         4430  +	  esac
         4431  +	  ;;
         4432  +	*) new_libs="$new_libs $deplib" ;;
         4433  +	esac
         4434  +      done
         4435  +      compile_deplibs="$new_libs"
         4436  +
  4116   4437   
  4117   4438         compile_command="$compile_command $compile_deplibs"
  4118   4439         finalize_command="$finalize_command $finalize_deplibs"
  4119   4440   
  4120   4441         if test -n "$rpath$xrpath"; then
  4121   4442   	# If the user specified any rpath flags, then add them.
  4122   4443   	for libdir in $rpath $xrpath; do
................................................................................
  4154   4475   	  case "$perm_rpath " in
  4155   4476   	  *" $libdir "*) ;;
  4156   4477   	  *) perm_rpath="$perm_rpath $libdir" ;;
  4157   4478   	  esac
  4158   4479   	fi
  4159   4480   	case $host in
  4160   4481   	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
         4482  +	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
  4161   4483   	  case :$dllsearchpath: in
  4162   4484   	  *":$libdir:"*) ;;
  4163   4485   	  *) dllsearchpath="$dllsearchpath:$libdir";;
  4164   4486   	  esac
         4487  +	  case :$dllsearchpath: in
         4488  +	  *":$testbindir:"*) ;;
         4489  +	  *) dllsearchpath="$dllsearchpath:$testbindir";;
         4490  +	  esac
  4165   4491   	  ;;
  4166   4492   	esac
  4167   4493         done
  4168   4494         # Substitute the hardcoded libdirs into the rpath.
  4169   4495         if test -n "$hardcode_libdir_separator" &&
  4170   4496   	 test -n "$hardcode_libdirs"; then
  4171   4497   	libdir="$hardcode_libdirs"
................................................................................
  4271   4597   	    if test -n "$export_symbols_regex"; then
  4272   4598   	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
  4273   4599   	      $run eval '$mv "$nlist"T "$nlist"'
  4274   4600   	    fi
  4275   4601   
  4276   4602   	    # Prepare the list of exported symbols
  4277   4603   	    if test -z "$export_symbols"; then
  4278         -	      export_symbols="$output_objdir/$output.exp"
         4604  +	      export_symbols="$output_objdir/$outputname.exp"
  4279   4605   	      $run $rm $export_symbols
  4280         -	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
         4606  +	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
         4607  +              case $host in
         4608  +              *cygwin* | *mingw* )
         4609  +	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
         4610  +		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
         4611  +                ;;
         4612  +              esac
  4281   4613   	    else
  4282         -	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
  4283         -	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
         4614  +	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
         4615  +	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
  4284   4616   	      $run eval 'mv "$nlist"T "$nlist"'
         4617  +              case $host in
         4618  +              *cygwin* | *mingw* )
         4619  +	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
         4620  +		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
         4621  +                ;;
         4622  +              esac
  4285   4623   	    fi
  4286   4624   	  fi
  4287   4625   
  4288   4626   	  for arg in $dlprefiles; do
  4289   4627   	    $show "extracting global C symbols from \`$arg'"
  4290   4628   	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
  4291   4629   	    $run eval '$echo ": $name " >> "$nlist"'
................................................................................
  4328   4666   # define lt_ptr void *
  4329   4667   #else
  4330   4668   # define lt_ptr char *
  4331   4669   # define const
  4332   4670   #endif
  4333   4671   
  4334   4672   /* The mapping between symbol names and symbols. */
         4673  +"
         4674  +
         4675  +	    case $host in
         4676  +	    *cygwin* | *mingw* )
         4677  +	  $echo >> "$output_objdir/$dlsyms" "\
         4678  +/* DATA imports from DLLs on WIN32 can't be const, because
         4679  +   runtime relocations are performed -- see ld's documentation
         4680  +   on pseudo-relocs */
         4681  +struct {
         4682  +"
         4683  +	      ;;
         4684  +	    * )
         4685  +	  $echo >> "$output_objdir/$dlsyms" "\
  4335   4686   const struct {
         4687  +"
         4688  +	      ;;
         4689  +	    esac
         4690  +
         4691  +
         4692  +	  $echo >> "$output_objdir/$dlsyms" "\
  4336   4693     const char *name;
  4337   4694     lt_ptr address;
  4338   4695   }
  4339   4696   lt_preloaded_symbols[] =
  4340   4697   {\
  4341   4698   "
  4342   4699   
................................................................................
  4375   4732   	    case "$compile_command " in
  4376   4733   	    *" -static "*) ;;
  4377   4734   	    *) pic_flag_for_symtable=" $pic_flag";;
  4378   4735   	    esac
  4379   4736   	  esac
  4380   4737   
  4381   4738   	  # Now compile the dynamic symbol file.
  4382         -	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  4383         -	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
         4739  +	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
         4740  +	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  4384   4741   
  4385   4742   	  # Clean up the generated files.
  4386   4743   	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  4387   4744   	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  4388   4745   
  4389   4746   	  # Transform the symbol file into the correct name.
  4390         -	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  4391         -	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
         4747  +          case $host in
         4748  +          *cygwin* | *mingw* )
         4749  +            if test -f "$output_objdir/${outputname}.def" ; then
         4750  +              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
         4751  +              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
         4752  +            else
         4753  +              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
         4754  +              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
         4755  +             fi
         4756  +            ;;
         4757  +          * )
         4758  +            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
         4759  +            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
         4760  +            ;;
         4761  +          esac
  4392   4762   	  ;;
  4393   4763   	*)
  4394   4764   	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  4395         -	  exit 1
         4765  +	  exit $EXIT_FAILURE
  4396   4766   	  ;;
  4397   4767   	esac
  4398   4768         else
  4399   4769   	# We keep going just in case the user didn't refer to
  4400   4770   	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
  4401   4771   	# really was required.
  4402   4772   
................................................................................
  4409   4779   	# Replace the output file specification.
  4410   4780   	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  4411   4781   	link_command="$compile_command$compile_rpath"
  4412   4782   
  4413   4783   	# We have no uninstalled library dependencies, so finalize right now.
  4414   4784   	$show "$link_command"
  4415   4785   	$run eval "$link_command"
  4416         -	status=$?
         4786  +	exit_status=$?
  4417   4787   
  4418   4788   	# Delete the generated files.
  4419   4789   	if test -n "$dlsyms"; then
  4420   4790   	  $show "$rm $output_objdir/${outputname}S.${objext}"
  4421   4791   	  $run $rm "$output_objdir/${outputname}S.${objext}"
  4422   4792   	fi
  4423   4793   
  4424         -	exit $status
         4794  +	exit $exit_status
  4425   4795         fi
  4426   4796   
  4427   4797         if test -n "$shlibpath_var"; then
  4428   4798   	# We should set the shlibpath_var
  4429   4799   	rpath=
  4430   4800   	for dir in $temp_rpath; do
  4431   4801   	  case $dir in
................................................................................
  4476   4846   	# Replace the output file specification.
  4477   4847   	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  4478   4848   	# Delete the old output file.
  4479   4849   	$run $rm $output
  4480   4850   	# Link the executable and exit
  4481   4851   	$show "$link_command"
  4482   4852   	$run eval "$link_command" || exit $?
  4483         -	exit 0
         4853  +	exit $EXIT_SUCCESS
  4484   4854         fi
  4485   4855   
  4486   4856         if test "$hardcode_action" = relink; then
  4487   4857   	# Fast installation is not supported
  4488   4858   	link_command="$compile_var$compile_command$compile_rpath"
  4489   4859   	relink_command="$finalize_var$finalize_command$finalize_rpath"
  4490   4860   
................................................................................
  4531   4901   	  fi
  4532   4902   	done
  4533   4903   	relink_command="(cd `pwd`; $relink_command)"
  4534   4904   	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  4535   4905         fi
  4536   4906   
  4537   4907         # Quote $echo for shipping.
  4538         -      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
  4539         -	case $0 in
  4540         -	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
  4541         -	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
         4908  +      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
         4909  +	case $progpath in
         4910  +	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
         4911  +	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
  4542   4912   	esac
  4543   4913   	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  4544   4914         else
  4545   4915   	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
  4546   4916         fi
  4547   4917   
  4548   4918         # Only actually do things if our run command is non-null.
................................................................................
  4557   4927   	  *cygwin*)
  4558   4928   	    exeext=.exe
  4559   4929   	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
  4560   4930   	  *) exeext= ;;
  4561   4931   	esac
  4562   4932   	case $host in
  4563   4933   	  *cygwin* | *mingw* )
  4564         -	    cwrappersource=`$echo ${objdir}/lt-${output}.c`
  4565         -	    cwrapper=`$echo ${output}.exe`
  4566         -	    $rm $cwrappersource $cwrapper
  4567         -	    trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
         4934  +            output_name=`basename $output`
         4935  +            output_path=`dirname $output`
         4936  +            cwrappersource="$output_path/$objdir/lt-$output_name.c"
         4937  +            cwrapper="$output_path/$output_name.exe"
         4938  +            $rm $cwrappersource $cwrapper
         4939  +            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
  4568   4940   
  4569   4941   	    cat > $cwrappersource <<EOF
  4570   4942   
  4571   4943   /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
  4572   4944      Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  4573   4945   
  4574   4946      The $output program cannot be directly executed until all the libtool
  4575   4947      libraries that it depends on are installed.
  4576         -   
         4948  +
  4577   4949      This wrapper executable should never be moved out of the build directory.
  4578   4950      If it is, it will not operate correctly.
  4579   4951   
  4580   4952      Currently, it simply execs the wrapper *script* "/bin/sh $output",
  4581   4953      but could eventually absorb all of the scripts functionality and
  4582   4954      exec $objdir/$outputname directly.
  4583   4955   */
................................................................................
  4585   4957   	    cat >> $cwrappersource<<"EOF"
  4586   4958   #include <stdio.h>
  4587   4959   #include <stdlib.h>
  4588   4960   #include <unistd.h>
  4589   4961   #include <malloc.h>
  4590   4962   #include <stdarg.h>
  4591   4963   #include <assert.h>
         4964  +#include <string.h>
         4965  +#include <ctype.h>
         4966  +#include <sys/stat.h>
  4592   4967   
  4593   4968   #if defined(PATH_MAX)
  4594   4969   # define LT_PATHMAX PATH_MAX
  4595   4970   #elif defined(MAXPATHLEN)
  4596   4971   # define LT_PATHMAX MAXPATHLEN
  4597   4972   #else
  4598   4973   # define LT_PATHMAX 1024
  4599   4974   #endif
  4600   4975   
  4601   4976   #ifndef DIR_SEPARATOR
  4602         -#define DIR_SEPARATOR '/'
         4977  +# define DIR_SEPARATOR '/'
         4978  +# define PATH_SEPARATOR ':'
  4603   4979   #endif
  4604   4980   
  4605   4981   #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
  4606   4982     defined (__OS2__)
  4607         -#define HAVE_DOS_BASED_FILE_SYSTEM
  4608         -#ifndef DIR_SEPARATOR_2 
  4609         -#define DIR_SEPARATOR_2 '\\'
  4610         -#endif
         4983  +# define HAVE_DOS_BASED_FILE_SYSTEM
         4984  +# ifndef DIR_SEPARATOR_2
         4985  +#  define DIR_SEPARATOR_2 '\\'
         4986  +# endif
         4987  +# ifndef PATH_SEPARATOR_2
         4988  +#  define PATH_SEPARATOR_2 ';'
         4989  +# endif
  4611   4990   #endif
  4612   4991   
  4613   4992   #ifndef DIR_SEPARATOR_2
  4614   4993   # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
  4615   4994   #else /* DIR_SEPARATOR_2 */
  4616   4995   # define IS_DIR_SEPARATOR(ch) \
  4617   4996           (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
  4618   4997   #endif /* DIR_SEPARATOR_2 */
  4619   4998   
         4999  +#ifndef PATH_SEPARATOR_2
         5000  +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
         5001  +#else /* PATH_SEPARATOR_2 */
         5002  +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
         5003  +#endif /* PATH_SEPARATOR_2 */
         5004  +
  4620   5005   #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
  4621   5006   #define XFREE(stale) do { \
  4622   5007     if (stale) { free ((void *) stale); stale = 0; } \
  4623   5008   } while (0)
         5009  +
         5010  +/* -DDEBUG is fairly common in CFLAGS.  */
         5011  +#undef DEBUG
         5012  +#if defined DEBUGWRAPPER
         5013  +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
         5014  +#else
         5015  +# define DEBUG(format, ...)
         5016  +#endif
  4624   5017   
  4625   5018   const char *program_name = NULL;
  4626   5019   
  4627   5020   void * xmalloc (size_t num);
  4628   5021   char * xstrdup (const char *string);
  4629         -char * basename (const char *name);
  4630         -char * fnqualify(const char *path);
         5022  +const char * base_name (const char *name);
         5023  +char * find_executable(const char *wrapper);
         5024  +int    check_executable(const char *path);
  4631   5025   char * strendzap(char *str, const char *pat);
  4632   5026   void lt_fatal (const char *message, ...);
  4633   5027   
  4634   5028   int
  4635   5029   main (int argc, char *argv[])
  4636   5030   {
  4637   5031     char **newargz;
  4638   5032     int i;
  4639         -  
  4640         -  program_name = (char *) xstrdup ((char *) basename (argv[0]));
         5033  +
         5034  +  program_name = (char *) xstrdup (base_name (argv[0]));
         5035  +  DEBUG("(main) argv[0]      : %s\n",argv[0]);
         5036  +  DEBUG("(main) program_name : %s\n",program_name);
  4641   5037     newargz = XMALLOC(char *, argc+2);
  4642   5038   EOF
  4643   5039   
  4644         -	    cat >> $cwrappersource <<EOF
  4645         -  newargz[0] = "$SHELL";
         5040  +            cat >> $cwrappersource <<EOF
         5041  +  newargz[0] = (char *) xstrdup("$SHELL");
  4646   5042   EOF
  4647   5043   
  4648         -	    cat >> $cwrappersource <<"EOF"
  4649         -  newargz[1] = fnqualify(argv[0]);
         5044  +            cat >> $cwrappersource <<"EOF"
         5045  +  newargz[1] = find_executable(argv[0]);
         5046  +  if (newargz[1] == NULL)
         5047  +    lt_fatal("Couldn't find %s", argv[0]);
         5048  +  DEBUG("(main) found exe at : %s\n",newargz[1]);
  4650   5049     /* we know the script has the same name, without the .exe */
  4651   5050     /* so make sure newargz[1] doesn't end in .exe */
  4652         -  strendzap(newargz[1],".exe"); 
         5051  +  strendzap(newargz[1],".exe");
  4653   5052     for (i = 1; i < argc; i++)
  4654   5053       newargz[i+1] = xstrdup(argv[i]);
  4655   5054     newargz[argc+1] = NULL;
         5055  +
         5056  +  for (i=0; i<argc+1; i++)
         5057  +  {
         5058  +    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
         5059  +    ;
         5060  +  }
         5061  +
         5062  +EOF
         5063  +
         5064  +            case $host_os in
         5065  +              mingw*)
         5066  +                cat >> $cwrappersource <<EOF
         5067  +  execv("$SHELL",(char const **)newargz);
  4656   5068   EOF
  4657         -
  4658         -	    cat >> $cwrappersource <<EOF
         5069  +              ;;
         5070  +              *)
         5071  +                cat >> $cwrappersource <<EOF
  4659   5072     execv("$SHELL",newargz);
  4660   5073   EOF
         5074  +              ;;
         5075  +            esac
  4661   5076   
  4662         -	    cat >> $cwrappersource <<"EOF"
         5077  +            cat >> $cwrappersource <<"EOF"
         5078  +  return 127;
  4663   5079   }
  4664   5080   
  4665   5081   void *
  4666   5082   xmalloc (size_t num)
  4667   5083   {
  4668   5084     void * p = (void *) malloc (num);
  4669   5085     if (!p)
  4670   5086       lt_fatal ("Memory exhausted");
  4671   5087   
  4672   5088     return p;
  4673   5089   }
  4674   5090   
  4675         -char * 
         5091  +char *
  4676   5092   xstrdup (const char *string)
  4677   5093   {
  4678   5094     return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
  4679   5095   ;
  4680   5096   }
  4681   5097   
  4682         -char *
  4683         -basename (const char *name)
         5098  +const char *
         5099  +base_name (const char *name)
  4684   5100   {
  4685   5101     const char *base;
  4686   5102   
  4687   5103   #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  4688   5104     /* Skip over the disk name in MSDOS pathnames. */
  4689         -  if (isalpha (name[0]) && name[1] == ':') 
         5105  +  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
  4690   5106       name += 2;
  4691   5107   #endif
  4692   5108   
  4693   5109     for (base = name; *name; name++)
  4694   5110       if (IS_DIR_SEPARATOR (*name))
  4695   5111         base = name + 1;
  4696         -  return (char *) base;
         5112  +  return base;
         5113  +}
         5114  +
         5115  +int
         5116  +check_executable(const char * path)
         5117  +{
         5118  +  struct stat st;
         5119  +
         5120  +  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
         5121  +  if ((!path) || (!*path))
         5122  +    return 0;
         5123  +
         5124  +  if ((stat (path, &st) >= 0) &&
         5125  +      (
         5126  +        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
         5127  +#if defined (S_IXOTH)
         5128  +       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
         5129  +#endif
         5130  +#if defined (S_IXGRP)
         5131  +       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
         5132  +#endif
         5133  +       ((st.st_mode & S_IXUSR) == S_IXUSR))
         5134  +      )
         5135  +    return 1;
         5136  +  else
         5137  +    return 0;
  4697   5138   }
  4698   5139   
  4699         -char * 
  4700         -fnqualify(const char *path)
         5140  +/* Searches for the full path of the wrapper.  Returns
         5141  +   newly allocated full path name if found, NULL otherwise */
         5142  +char *
         5143  +find_executable (const char* wrapper)
  4701   5144   {
  4702         -  size_t size;
  4703         -  char *p;
         5145  +  int has_slash = 0;
         5146  +  const char* p;
         5147  +  const char* p_next;
         5148  +  /* static buffer for getcwd */
  4704   5149     char tmp[LT_PATHMAX + 1];
         5150  +  int tmp_len;
         5151  +  char* concat_name;
  4705   5152   
  4706         -  assert(path != NULL);
         5153  +  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
  4707   5154   
  4708         -  /* Is it qualified already? */
         5155  +  if ((wrapper == NULL) || (*wrapper == '\0'))
         5156  +    return NULL;
         5157  +
         5158  +  /* Absolute path? */
         5159  +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
         5160  +  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
         5161  +  {
         5162  +    concat_name = xstrdup (wrapper);
         5163  +    if (check_executable(concat_name))
         5164  +      return concat_name;
         5165  +    XFREE(concat_name);
         5166  +  }
         5167  +  else
         5168  +  {
         5169  +#endif
         5170  +    if (IS_DIR_SEPARATOR (wrapper[0]))
         5171  +    {
         5172  +      concat_name = xstrdup (wrapper);
         5173  +      if (check_executable(concat_name))
         5174  +        return concat_name;
         5175  +      XFREE(concat_name);
         5176  +    }
  4709   5177   #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  4710         -  if (isalpha (path[0]) && path[1] == ':')
  4711         -    return xstrdup (path);
         5178  +  }
  4712   5179   #endif
  4713         -  if (IS_DIR_SEPARATOR (path[0]))
  4714         -    return xstrdup (path);
  4715   5180   
  4716         -  /* prepend the current directory */
  4717         -  /* doesn't handle '~' */
         5181  +  for (p = wrapper; *p; p++)
         5182  +    if (*p == '/')
         5183  +    {
         5184  +      has_slash = 1;
         5185  +      break;
         5186  +    }
         5187  +  if (!has_slash)
         5188  +  {
         5189  +    /* no slashes; search PATH */
         5190  +    const char* path = getenv ("PATH");
         5191  +    if (path != NULL)
         5192  +    {
         5193  +      for (p = path; *p; p = p_next)
         5194  +      {
         5195  +        const char* q;
         5196  +        size_t p_len;
         5197  +        for (q = p; *q; q++)
         5198  +          if (IS_PATH_SEPARATOR(*q))
         5199  +            break;
         5200  +        p_len = q - p;
         5201  +        p_next = (*q == '\0' ? q : q + 1);
         5202  +        if (p_len == 0)
         5203  +        {
         5204  +          /* empty path: current directory */
         5205  +          if (getcwd (tmp, LT_PATHMAX) == NULL)
         5206  +            lt_fatal ("getcwd failed");
         5207  +          tmp_len = strlen(tmp);
         5208  +          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
         5209  +          memcpy (concat_name, tmp, tmp_len);
         5210  +          concat_name[tmp_len] = '/';
         5211  +          strcpy (concat_name + tmp_len + 1, wrapper);
         5212  +        }
         5213  +        else
         5214  +        {
         5215  +          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
         5216  +          memcpy (concat_name, p, p_len);
         5217  +          concat_name[p_len] = '/';
         5218  +          strcpy (concat_name + p_len + 1, wrapper);
         5219  +        }
         5220  +        if (check_executable(concat_name))
         5221  +          return concat_name;
         5222  +        XFREE(concat_name);
         5223  +      }
         5224  +    }
         5225  +    /* not found in PATH; assume curdir */
         5226  +  }
         5227  +  /* Relative path | not found in path: prepend cwd */
  4718   5228     if (getcwd (tmp, LT_PATHMAX) == NULL)
  4719   5229       lt_fatal ("getcwd failed");
  4720         -  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
  4721         -  p = XMALLOC(char, size);
  4722         -  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
  4723         -  return p;
         5230  +  tmp_len = strlen(tmp);
         5231  +  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
         5232  +  memcpy (concat_name, tmp, tmp_len);
         5233  +  concat_name[tmp_len] = '/';
         5234  +  strcpy (concat_name + tmp_len + 1, wrapper);
         5235  +
         5236  +  if (check_executable(concat_name))
         5237  +    return concat_name;
         5238  +  XFREE(concat_name);
         5239  +  return NULL;
  4724   5240   }
  4725   5241   
  4726   5242   char *
  4727         -strendzap(char *str, const char *pat) 
         5243  +strendzap(char *str, const char *pat)
  4728   5244   {
  4729   5245     size_t len, patlen;
  4730   5246   
  4731   5247     assert(str != NULL);
  4732   5248     assert(pat != NULL);
  4733   5249   
  4734   5250     len = strlen(str);
................................................................................
  4740   5256       if (strcmp(str, pat) == 0)
  4741   5257         *str = '\0';
  4742   5258     }
  4743   5259     return str;
  4744   5260   }
  4745   5261   
  4746   5262   static void
  4747         -lt_error_core (int exit_status, const char * mode, 
         5263  +lt_error_core (int exit_status, const char * mode,
  4748   5264             const char * message, va_list ap)
  4749   5265   {
  4750   5266     fprintf (stderr, "%s: %s: ", program_name, mode);
  4751   5267     vfprintf (stderr, message, ap);
  4752   5268     fprintf (stderr, ".\n");
  4753   5269   
  4754   5270     if (exit_status >= 0)
................................................................................
  4760   5276   {
  4761   5277     va_list ap;
  4762   5278     va_start (ap, message);
  4763   5279     lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
  4764   5280     va_end (ap);
  4765   5281   }
  4766   5282   EOF
  4767         -	  # we should really use a build-platform specific compiler
  4768         -	  # here, but OTOH, the wrappers (shell script and this C one)
  4769         -	  # are only useful if you want to execute the "real" binary.
  4770         -	  # Since the "real" binary is built for $host, then this
  4771         -	  # wrapper might as well be built for $host, too.
  4772         -	  $run $LTCC -s -o $cwrapper $cwrappersource
  4773         -	  ;;
  4774         -	esac
  4775         -	$rm $output
  4776         -	trap "$rm $output; exit 1" 1 2 15
         5283  +          # we should really use a build-platform specific compiler
         5284  +          # here, but OTOH, the wrappers (shell script and this C one)
         5285  +          # are only useful if you want to execute the "real" binary.
         5286  +          # Since the "real" binary is built for $host, then this
         5287  +          # wrapper might as well be built for $host, too.
         5288  +          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
         5289  +          ;;
         5290  +        esac
         5291  +        $rm $output
         5292  +        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
  4777   5293   
  4778   5294   	$echo > $output "\
  4779   5295   #! $SHELL
  4780   5296   
  4781   5297   # $output - temporary wrapper script for $objdir/$outputname
  4782   5298   # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  4783   5299   #
................................................................................
  4790   5306   # Sed substitution that helps us do robust quoting.  It backslashifies
  4791   5307   # metacharacters that are still active within double-quoted strings.
  4792   5308   Xsed='${SED} -e 1s/^X//'
  4793   5309   sed_quote_subst='$sed_quote_subst'
  4794   5310   
  4795   5311   # The HP-UX ksh and POSIX shell print the target directory to stdout
  4796   5312   # if CDPATH is set.
  4797         -if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
         5313  +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  4798   5314   
  4799   5315   relink_command=\"$relink_command\"
  4800   5316   
  4801   5317   # This environment variable determines our operation mode.
  4802   5318   if test \"\$libtool_install_magic\" = \"$magic\"; then
  4803   5319     # install mode needs the following variable:
  4804   5320     notinst_deplibs='$notinst_deplibs'
................................................................................
  4869   5385   
  4870   5386       # relink executable if necessary
  4871   5387       if test -n \"\$relink_command\"; then
  4872   5388         if relink_command_output=\`eval \$relink_command 2>&1\`; then :
  4873   5389         else
  4874   5390   	$echo \"\$relink_command_output\" >&2
  4875   5391   	$rm \"\$progdir/\$file\"
  4876         -	exit 1
         5392  +	exit $EXIT_FAILURE
  4877   5393         fi
  4878   5394       fi
  4879   5395   
  4880   5396       $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
  4881   5397       { $rm \"\$progdir/\$program\";
  4882   5398         $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
  4883   5399       $rm \"\$progdir/\$file\"
................................................................................
  4914   5430       PATH=$dllsearchpath:\$PATH
  4915   5431   "
  4916   5432   	fi
  4917   5433   
  4918   5434   	$echo >> $output "\
  4919   5435       if test \"\$libtool_execute_magic\" != \"$magic\"; then
  4920   5436         # Run the actual program with our arguments.
         5437  +
         5438  +      # Make sure env LD_LIBRARY_PATH does not mess us up
         5439  +      if test -n \"\${LD_LIBRARY_PATH+set}\"; then
         5440  +        export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
         5441  +      fi
  4921   5442   "
  4922   5443   	case $host in
  4923   5444   	# Backslashes separate directories on plain windows
  4924   5445   	*-*-mingw | *-*-os2*)
  4925   5446   	  $echo >> $output "\
  4926         -      exec \$progdir\\\\\$program \${1+\"\$@\"}
         5447  +      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
  4927   5448   "
  4928   5449   	  ;;
  4929   5450   
  4930   5451   	*)
  4931   5452   	  $echo >> $output "\
  4932         -      exec \$progdir/\$program \${1+\"\$@\"}
         5453  +      exec \"\$progdir/\$program\" \${1+\"\$@\"}
  4933   5454   "
  4934   5455   	  ;;
  4935   5456   	esac
  4936   5457   	$echo >> $output "\
  4937   5458         \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
  4938         -      exit 1
         5459  +      exit $EXIT_FAILURE
  4939   5460       fi
  4940   5461     else
  4941   5462       # The program doesn't exist.
  4942         -    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
         5463  +    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
  4943   5464       \$echo \"This script is just a wrapper for \$program.\" 1>&2
  4944   5465       $echo \"See the $PACKAGE documentation for more information.\" 1>&2
  4945         -    exit 1
         5466  +    exit $EXIT_FAILURE
  4946   5467     fi
  4947   5468   fi\
  4948   5469   "
  4949   5470   	chmod +x $output
  4950   5471         fi
  4951         -      exit 0
         5472  +      exit $EXIT_SUCCESS
  4952   5473         ;;
  4953   5474       esac
  4954   5475   
  4955   5476       # See if we need to build an old-fashioned archive.
  4956   5477       for oldlib in $oldlibs; do
  4957   5478   
  4958   5479         if test "$build_libtool_libs" = convenience; then
................................................................................
  4967   5488   	  oldobjs="$old_deplibs $non_pic_objects"
  4968   5489   	fi
  4969   5490   	addlibs="$old_convenience"
  4970   5491         fi
  4971   5492   
  4972   5493         if test -n "$addlibs"; then
  4973   5494   	gentop="$output_objdir/${outputname}x"
  4974         -	$show "${rm}r $gentop"
  4975         -	$run ${rm}r "$gentop"
  4976         -	$show "$mkdir $gentop"
  4977         -	$run $mkdir "$gentop"
  4978         -	status=$?
  4979         -	if test "$status" -ne 0 && test ! -d "$gentop"; then
  4980         -	  exit $status
  4981         -	fi
  4982   5495   	generated="$generated $gentop"
  4983   5496   
  4984         -	# Add in members from convenience archives.
  4985         -	for xlib in $addlibs; do
  4986         -	  # Extract the objects.
  4987         -	  case $xlib in
  4988         -	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  4989         -	  *) xabs=`pwd`"/$xlib" ;;
  4990         -	  esac
  4991         -	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  4992         -	  xdir="$gentop/$xlib"
  4993         -
  4994         -	  $show "${rm}r $xdir"
  4995         -	  $run ${rm}r "$xdir"
  4996         -	  $show "$mkdir $xdir"
  4997         -	  $run $mkdir "$xdir"
  4998         -	  status=$?
  4999         -	  if test "$status" -ne 0 && test ! -d "$xdir"; then
  5000         -	    exit $status
  5001         -	  fi
  5002         -	  # We will extract separately just the conflicting names and we will no
  5003         -	  # longer touch any unique names. It is faster to leave these extract
  5004         -	  # automatically by $AR in one run.
  5005         -	  $show "(cd $xdir && $AR x $xabs)"
  5006         -	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  5007         -	  if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
  5008         -	    :
  5009         -	  else
  5010         -	    $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
  5011         -	    $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
  5012         -	    $AR t "$xabs" | sort | uniq -cd | while read -r count name
  5013         -	    do
  5014         -	      i=1
  5015         -	      while test "$i" -le "$count"
  5016         -	      do
  5017         -	       # Put our $i before any first dot (extension)
  5018         -	       # Never overwrite any file
  5019         -	       name_to="$name"
  5020         -	       while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
  5021         -	       do
  5022         -		 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
  5023         -	       done
  5024         -	       $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
  5025         -	       $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
  5026         -	       i=`expr $i + 1`
  5027         -	      done
  5028         -	    done
  5029         -	  fi
  5030         -
  5031         -	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
  5032         -	done
         5497  +	func_extract_archives $gentop $addlibs
         5498  +	oldobjs="$oldobjs $func_extract_archives_result"
  5033   5499         fi
  5034   5500   
  5035   5501         # Do each command in the archive commands.
  5036   5502         if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  5037   5503          cmds=$old_archive_from_new_cmds
  5038   5504         else
         5505  +	# POSIX demands no paths to be encoded in archives.  We have
         5506  +	# to avoid creating archives with duplicate basenames if we
         5507  +	# might have to extract them afterwards, e.g., when creating a
         5508  +	# static archive out of a convenience library, or when linking
         5509  +	# the entirety of a libtool archive into another (currently
         5510  +	# not supported by libtool).
         5511  +	if (for obj in $oldobjs
         5512  +	    do
         5513  +	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
         5514  +	    done | sort | sort -uc >/dev/null 2>&1); then
         5515  +	  :
         5516  +	else
         5517  +	  $echo "copying selected object files to avoid basename conflicts..."
         5518  +
         5519  +	  if test -z "$gentop"; then
         5520  +	    gentop="$output_objdir/${outputname}x"
         5521  +	    generated="$generated $gentop"
         5522  +
         5523  +	    $show "${rm}r $gentop"
         5524  +	    $run ${rm}r "$gentop"
         5525  +	    $show "$mkdir $gentop"
         5526  +	    $run $mkdir "$gentop"
         5527  +	    exit_status=$?
         5528  +	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
         5529  +	      exit $exit_status
         5530  +	    fi
         5531  +	  fi
         5532  +
         5533  +	  save_oldobjs=$oldobjs
         5534  +	  oldobjs=
         5535  +	  counter=1
         5536  +	  for obj in $save_oldobjs
         5537  +	  do
         5538  +	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
         5539  +	    case " $oldobjs " in
         5540  +	    " ") oldobjs=$obj ;;
         5541  +	    *[\ /]"$objbase "*)
         5542  +	      while :; do
         5543  +		# Make sure we don't pick an alternate name that also
         5544  +		# overlaps.
         5545  +		newobj=lt$counter-$objbase
         5546  +		counter=`expr $counter + 1`
         5547  +		case " $oldobjs " in
         5548  +		*[\ /]"$newobj "*) ;;
         5549  +		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
         5550  +		esac
         5551  +	      done
         5552  +	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
         5553  +	      $run ln "$obj" "$gentop/$newobj" ||
         5554  +	      $run cp "$obj" "$gentop/$newobj"
         5555  +	      oldobjs="$oldobjs $gentop/$newobj"
         5556  +	      ;;
         5557  +	    *) oldobjs="$oldobjs $obj" ;;
         5558  +	    esac
         5559  +	  done
         5560  +	fi
         5561  +
  5039   5562   	eval cmds=\"$old_archive_cmds\"
  5040   5563   
  5041   5564   	if len=`expr "X$cmds" : ".*"` &&
  5042   5565   	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  5043   5566   	  cmds=$old_archive_cmds
  5044   5567   	else
  5045   5568   	  # the command line is too long to link in one step, link in parts
  5046   5569   	  $echo "using piecewise archive linking..."
  5047   5570   	  save_RANLIB=$RANLIB
  5048   5571   	  RANLIB=:
  5049   5572   	  objlist=
  5050   5573   	  concat_cmds=
  5051   5574   	  save_oldobjs=$oldobjs
  5052         -	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
  5053         -	  # encoded into archives.  This makes 'ar r' malfunction in
  5054         -	  # this piecewise linking case whenever conflicting object
  5055         -	  # names appear in distinct ar calls; check, warn and compensate.
  5056         -	    if (for obj in $save_oldobjs
  5057         -	    do
  5058         -	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
  5059         -	    done | sort | sort -uc >/dev/null 2>&1); then
  5060         -	    :
  5061         -	  else
  5062         -	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
  5063         -	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
  5064         -	    AR_FLAGS=cq
  5065         -	  fi
         5575  +
  5066   5576   	  # Is there a better way of finding the last object in the list?
  5067   5577   	  for obj in $save_oldobjs
  5068   5578   	  do
  5069   5579   	    last_oldobj=$obj
  5070         -	  done  
         5580  +	  done
  5071   5581   	  for obj in $save_oldobjs
  5072   5582   	  do
  5073   5583   	    oldobjs="$objlist $obj"
  5074   5584   	    objlist="$objlist $obj"
  5075   5585   	    eval test_cmds=\"$old_archive_cmds\"
  5076         -	    if len=`expr "X$test_cmds" : ".*"` &&
         5586  +	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  5077   5587   	       test "$len" -le "$max_cmd_len"; then
  5078   5588   	      :
  5079   5589   	    else
  5080   5590   	      # the above command should be used before it gets too long
  5081   5591   	      oldobjs=$objlist
  5082   5592   	      if test "$obj" = "$last_oldobj" ; then
  5083   5593   	        RANLIB=$save_RANLIB
  5084         -	      fi  
         5594  +	      fi
  5085   5595   	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  5086   5596   	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
  5087   5597   	      objlist=
  5088   5598   	    fi
  5089   5599   	  done
  5090   5600   	  RANLIB=$save_RANLIB
  5091   5601   	  oldobjs=$objlist
................................................................................
  5126   5636   	  relink_command="$var=; export $var; $relink_command"
  5127   5637   	else
  5128   5638   	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
  5129   5639   	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
  5130   5640   	fi
  5131   5641         done
  5132   5642         # Quote the link command for shipping.
  5133         -      relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
         5643  +      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
  5134   5644         relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  5135   5645         if test "$hardcode_automatic" = yes ; then
  5136         -        relink_command=
  5137         -      fi  
         5646  +	relink_command=
         5647  +      fi
         5648  +
         5649  +
  5138   5650         # Only create the output if not a dry run.
  5139   5651         if test -z "$run"; then
  5140   5652   	for installed in no yes; do
  5141   5653   	  if test "$installed" = yes; then
  5142   5654   	    if test -z "$install_libdir"; then
  5143   5655   	      break
  5144   5656   	    fi
................................................................................
  5148   5660   	    for deplib in $dependency_libs; do
  5149   5661   	      case $deplib in
  5150   5662   	      *.la)
  5151   5663   		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
  5152   5664   		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  5153   5665   		if test -z "$libdir"; then
  5154   5666   		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  5155         -		  exit 1
         5667  +		  exit $EXIT_FAILURE
         5668  +		fi
         5669  +		if test "X$EGREP" = X ; then
         5670  +			EGREP=egrep
         5671  +		fi
         5672  +		# We do not want portage's install root ($D) present.  Check only for
         5673  +		# this if the .la is being installed.
         5674  +		if test "$installed" = yes && test "$D"; then
         5675  +		  eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
         5676  +		else
         5677  +		  mynewdependency_lib="$libdir/$name"
  5156   5678   		fi
  5157         -		newdependency_libs="$newdependency_libs $libdir/$name"
         5679  +		# Do not add duplicates
         5680  +		if test "$mynewdependency_lib"; then
         5681  +		  my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
         5682  +		  if test -z "$my_little_ninja_foo_1"; then
         5683  +		    newdependency_libs="$newdependency_libs $mynewdependency_lib"
         5684  +		  fi
         5685  +		fi
  5158   5686   		;;
  5159         -	      *) newdependency_libs="$newdependency_libs $deplib" ;;
         5687  +		  *)
         5688  +		if test "$installed" = yes; then
         5689  +		  # Rather use S=WORKDIR if our version of portage supports it.
         5690  +		  # This is because some ebuild (gcc) do not use $S as buildroot.
         5691  +		  if test "$PWORKDIR"; then
         5692  +		    S="$PWORKDIR"
         5693  +		  fi
         5694  +		  # We do not want portage's build root ($S) present.
         5695  +		  my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
         5696  +		  # We do not want portage's install root ($D) present.
         5697  +		  my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
         5698  +		  if test -n "$my_little_ninja_foo_2" && test "$S"; then
         5699  +		    mynewdependency_lib=""
         5700  +		  elif test -n "$my_little_ninja_foo_3" && test "$D"; then
         5701  +		    eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
         5702  +		  else
         5703  +		    mynewdependency_lib="$deplib"
         5704  +		  fi
         5705  +		else
         5706  +		  mynewdependency_lib="$deplib"
         5707  +		fi
         5708  +		# Do not add duplicates
         5709  +		if test "$mynewdependency_lib"; then
         5710  +		  my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
         5711  +		  if test -z "$my_little_ninja_foo_4"; then
         5712  +			newdependency_libs="$newdependency_libs $mynewdependency_lib"
         5713  +		  fi
         5714  +		fi
         5715  +		;;
  5160   5716   	      esac
  5161   5717   	    done
  5162   5718   	    dependency_libs="$newdependency_libs"
  5163   5719   	    newdlfiles=
  5164   5720   	    for lib in $dlfiles; do
  5165   5721   	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  5166   5722   	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  5167   5723   	      if test -z "$libdir"; then
  5168   5724   		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  5169         -		exit 1
         5725  +		exit $EXIT_FAILURE
  5170   5726   	      fi
  5171   5727   	      newdlfiles="$newdlfiles $libdir/$name"
  5172   5728   	    done
  5173   5729   	    dlfiles="$newdlfiles"
  5174   5730   	    newdlprefiles=
  5175   5731   	    for lib in $dlprefiles; do
  5176   5732   	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  5177   5733   	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  5178   5734   	      if test -z "$libdir"; then
  5179   5735   		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  5180         -		exit 1
         5736  +		exit $EXIT_FAILURE
  5181   5737   	      fi
  5182   5738   	      newdlprefiles="$newdlprefiles $libdir/$name"
  5183   5739   	    done
  5184   5740   	    dlprefiles="$newdlprefiles"
  5185   5741   	  else
  5186   5742   	    newdlfiles=
  5187   5743   	    for lib in $dlfiles; do
  5188         -	      case $lib in 
         5744  +	      case $lib in
  5189   5745   		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  5190   5746   		*) abs=`pwd`"/$lib" ;;
  5191   5747   	      esac
  5192   5748   	      newdlfiles="$newdlfiles $abs"
  5193   5749   	    done
  5194   5750   	    dlfiles="$newdlfiles"
  5195   5751   	    newdlprefiles=
  5196   5752   	    for lib in $dlprefiles; do
  5197         -	      case $lib in 
         5753  +	      case $lib in
  5198   5754   		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  5199   5755   		*) abs=`pwd`"/$lib" ;;
  5200   5756   	      esac
  5201   5757   	      newdlprefiles="$newdlprefiles $abs"
  5202   5758   	    done
  5203   5759   	    dlprefiles="$newdlprefiles"
  5204   5760   	  fi
  5205   5761   	  $rm $output
  5206   5762   	  # place dlname in correct position for cygwin
  5207   5763   	  tdlname=$dlname
  5208   5764   	  case $host,$output,$installed,$module,$dlname in
  5209   5765   	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
  5210   5766   	  esac
         5767  +	  # Do not add duplicates
         5768  +	  if test "$installed" = yes && test "$D"; then
         5769  +	    install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
         5770  +	  fi
  5211   5771   	  $echo > $output "\
  5212   5772   # $outputname - a libtool library file
  5213   5773   # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  5214   5774   #
  5215   5775   # Please DO NOT delete this file!
  5216   5776   # It is necessary for linking the library.
  5217   5777   
................................................................................
  5253   5813   
  5254   5814         # Do a symbolic link so that the libtool archive can be found in
  5255   5815         # LD_LIBRARY_PATH before the program is installed.
  5256   5816         $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
  5257   5817         $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
  5258   5818         ;;
  5259   5819       esac
  5260         -    exit 0
         5820  +    exit $EXIT_SUCCESS
  5261   5821       ;;
  5262   5822   
  5263   5823     # libtool install mode
  5264   5824     install)
  5265   5825       modename="$modename: install"
  5266   5826   
  5267   5827       # There may be an optional sh(1) argument at the beginning of
  5268   5828       # install_prog (especially on Windows NT).
  5269   5829       if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
  5270   5830          # Allow the use of GNU shtool's install command.
  5271         -       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
         5831  +       $echo "X$nonopt" | grep shtool > /dev/null; then
  5272   5832         # Aesthetically quote it.
  5273   5833         arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
  5274   5834         case $arg in
  5275         -      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
         5835  +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  5276   5836   	arg="\"$arg\""
  5277   5837   	;;
  5278   5838         esac
  5279   5839         install_prog="$arg "
  5280   5840         arg="$1"
  5281   5841         shift
  5282   5842       else
  5283   5843         install_prog=
  5284         -      arg="$nonopt"
         5844  +      arg=$nonopt
  5285   5845       fi
  5286   5846   
  5287   5847       # The real first argument should be the name of the installation program.
  5288   5848       # Aesthetically quote it.
  5289   5849       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  5290   5850       case $arg in
  5291         -    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
         5851  +    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  5292   5852         arg="\"$arg\""
  5293   5853         ;;
  5294   5854       esac
  5295   5855       install_prog="$install_prog$arg"
  5296   5856   
  5297   5857       # We need to accept at least all the BSD install flags.
  5298   5858       dest=
................................................................................
  5302   5862       install_type=
  5303   5863       isdir=no
  5304   5864       stripme=
  5305   5865       for arg
  5306   5866       do
  5307   5867         if test -n "$dest"; then
  5308   5868   	files="$files $dest"
  5309         -	dest="$arg"
         5869  +	dest=$arg
  5310   5870   	continue
  5311   5871         fi
  5312   5872   
  5313   5873         case $arg in
  5314   5874         -d) isdir=yes ;;
  5315         -      -f) prev="-f" ;;
  5316         -      -g) prev="-g" ;;
  5317         -      -m) prev="-m" ;;
  5318         -      -o) prev="-o" ;;
         5875  +      -f) 
         5876  +      	case " $install_prog " in
         5877  +	*[\\\ /]cp\ *) ;;
         5878  +	*) prev=$arg ;;
         5879  +	esac
         5880  +	;;
         5881  +      -g | -m | -o) prev=$arg ;;
  5319   5882         -s)
  5320   5883   	stripme=" -s"
  5321   5884   	continue
  5322   5885   	;;
  5323         -      -*) ;;
  5324         -
         5886  +      -*)
         5887  +	;;
  5325   5888         *)
  5326   5889   	# If the previous option needed an argument, then skip it.
  5327   5890   	if test -n "$prev"; then
  5328   5891   	  prev=
  5329   5892   	else
  5330         -	  dest="$arg"
         5893  +	  dest=$arg
  5331   5894   	  continue
  5332   5895   	fi
  5333   5896   	;;
  5334   5897         esac
  5335   5898   
  5336   5899         # Aesthetically quote the argument.
  5337   5900         arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  5338   5901         case $arg in
  5339         -      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
         5902  +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  5340   5903   	arg="\"$arg\""
  5341   5904   	;;
  5342   5905         esac
  5343   5906         install_prog="$install_prog $arg"
  5344   5907       done
  5345   5908   
  5346   5909       if test -z "$install_prog"; then
  5347   5910         $echo "$modename: you must specify an install program" 1>&2
  5348   5911         $echo "$help" 1>&2
  5349         -      exit 1
         5912  +      exit $EXIT_FAILURE
  5350   5913       fi
  5351   5914   
  5352   5915       if test -n "$prev"; then
  5353   5916         $echo "$modename: the \`$prev' option requires an argument" 1>&2
  5354   5917         $echo "$help" 1>&2
  5355         -      exit 1
         5918  +      exit $EXIT_FAILURE
  5356   5919       fi
  5357   5920   
  5358   5921       if test -z "$files"; then
  5359   5922         if test -z "$dest"; then
  5360   5923   	$echo "$modename: no file or destination specified" 1>&2
  5361   5924         else
  5362   5925   	$echo "$modename: you must specify a destination" 1>&2
  5363   5926         fi
  5364   5927         $echo "$help" 1>&2
  5365         -      exit 1
         5928  +      exit $EXIT_FAILURE
  5366   5929       fi
  5367   5930   
  5368   5931       # Strip any trailing slash from the destination.
  5369   5932       dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
  5370   5933   
  5371   5934       # Check to see that the destination is a directory.
  5372   5935       test -d "$dest" && isdir=yes
................................................................................
  5379   5942         destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
  5380   5943   
  5381   5944         # Not a directory, so check to see that there is only one file specified.
  5382   5945         set dummy $files
  5383   5946         if test "$#" -gt 2; then
  5384   5947   	$echo "$modename: \`$dest' is not a directory" 1>&2
  5385   5948   	$echo "$help" 1>&2
  5386         -	exit 1
         5949  +	exit $EXIT_FAILURE
  5387   5950         fi
  5388   5951       fi
  5389   5952       case $destdir in
  5390   5953       [\\/]* | [A-Za-z]:[\\/]*) ;;
  5391   5954       *)
  5392   5955         for file in $files; do
  5393   5956   	case $file in
  5394   5957   	*.lo) ;;
  5395   5958   	*)
  5396   5959   	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
  5397   5960   	  $echo "$help" 1>&2
  5398         -	  exit 1
         5961  +	  exit $EXIT_FAILURE
  5399   5962   	  ;;
  5400   5963   	esac
  5401   5964         done
  5402   5965         ;;
  5403   5966       esac
  5404   5967   
  5405   5968       # This variable tells wrapper scripts just to set variables rather
................................................................................
  5420   5983   
  5421   5984         *.la)
  5422   5985   	# Check to see that this really is a libtool archive.
  5423   5986   	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  5424   5987   	else
  5425   5988   	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
  5426   5989   	  $echo "$help" 1>&2
  5427         -	  exit 1
         5990  +	  exit $EXIT_FAILURE
  5428   5991   	fi
  5429   5992   
  5430   5993   	library_names=
  5431   5994   	old_library=
  5432   5995   	relink_command=
  5433   5996   	# If there is no directory component, then add one.
  5434   5997   	case $file in
................................................................................
  5462   6025   	  # location b/c this prevents finding dependent libraries that
  5463   6026   	  # are installed to the same prefix.
  5464   6027   	  # At present, this check doesn't affect windows .dll's that
  5465   6028   	  # are installed into $libdir/../bin (currently, that works fine)
  5466   6029   	  # but it's something to keep an eye on.
  5467   6030   	  if test "$inst_prefix_dir" = "$destdir"; then
  5468   6031   	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  5469         -	    exit 1
         6032  +	    exit $EXIT_FAILURE
  5470   6033   	  fi
  5471   6034   
  5472   6035   	  if test -n "$inst_prefix_dir"; then
  5473   6036   	    # Stick the inst_prefix_dir data into the link command.
  5474   6037   	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
  5475   6038   	  else
  5476   6039   	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
................................................................................
  5477   6040   	  fi
  5478   6041   
  5479   6042   	  $echo "$modename: warning: relinking \`$file'" 1>&2
  5480   6043   	  $show "$relink_command"
  5481   6044   	  if $run eval "$relink_command"; then :
  5482   6045   	  else
  5483   6046   	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  5484         -	    exit 1
         6047  +	    exit $EXIT_FAILURE
  5485   6048   	  fi
  5486   6049   	fi
  5487   6050   
  5488   6051   	# See the names of the shared library.
  5489   6052   	set dummy $library_names
  5490   6053   	if test -n "$2"; then
  5491   6054   	  realname="$2"
................................................................................
  5501   6064   	  if test -n "$stripme" && test -n "$striplib"; then
  5502   6065   	    $show "$striplib $destdir/$realname"
  5503   6066   	    $run eval "$striplib $destdir/$realname" || exit $?
  5504   6067   	  fi
  5505   6068   
  5506   6069   	  if test "$#" -gt 0; then
  5507   6070   	    # Delete the old symlinks, and create new ones.
         6071  +	    # Try `ln -sf' first, because the `ln' binary might depend on
         6072  +	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
         6073  +	    # so we also need to try rm && ln -s.
  5508   6074   	    for linkname
  5509   6075   	    do
  5510   6076   	      if test "$linkname" != "$realname"; then
  5511         -		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
  5512         -		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
         6077  +                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
         6078  +                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
  5513   6079   	      fi
  5514   6080   	    done
  5515   6081   	  fi
  5516   6082   
  5517   6083   	  # Do each command in the postinstall commands.
  5518   6084   	  lib="$destdir/$realname"
  5519   6085   	  cmds=$postinstall_cmds
  5520   6086   	  save_ifs="$IFS"; IFS='~'
  5521   6087   	  for cmd in $cmds; do
  5522   6088   	    IFS="$save_ifs"
  5523   6089   	    eval cmd=\"$cmd\"
  5524   6090   	    $show "$cmd"
  5525         -	    $run eval "$cmd" || exit $?
         6091  +	    $run eval "$cmd" || {</