Ignore:
Timestamp:
Aug 16, 2003, 6:41:03 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/ltmain.sh

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    22# NOTE: Changing this file will not affect anything until you rerun ltconfig.
    33#
    4 # Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
     4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
     5# Free Software Foundation, Inc.
    56# Originally by Gordon Matzigkeit <[email protected]>, 1996
    67#
     
    5556PROGRAM=ltmain.sh
    5657PACKAGE=libtool
    57 VERSION=1.4a
    58 TIMESTAMP=" (1.641.2.122 2000/09/30 05:27:52)"
     58VERSION=1.4a
     59TIMESTAMP=" (1.641.2.)"
    5960
    6061default_mode=
     
    107108lo2o="s/\\.lo\$/.${objext}/"
    108109o2lo="s/\\.${objext}\$/.lo/"
     110
    109111
    110112# Parse our command line options once, thoroughly.
     
    114116  shift
    115117
    116   case "$arg" in
     118  case in
    117119  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
    118120  *) optarg= ;;
     
    121123  # If the previous option needs an argument, assign it.
    122124  if test -n "$prev"; then
    123     case "$prev" in
     125    case in
    124126    execute_dlfiles)
    125       eval "$prev=\"\$$prev \$arg\""
     127      e"
    126128      ;;
    127129    tag)
     
    129131
    130132      # Check whether tagname contains only valid characters
    131       case "$tagname" in
     133      case in
    132134      *[!-_A-Za-z0-9,/]*)
    133135        echo "$progname: invalid tag name: $tagname" 1>&2
     
    136138      esac
    137139
    138       if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
    139         taglist="$taglist $tagname"
    140         # Evaluate the configuration.
    141         eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
    142       else
    143         echo "$progname: ignoring unknown tag $tagname" 1>&2
    144       fi
     140      case $tagname in
     141      CC)
     142        # Don't test for the "default" C tag, as we know, it's there, but
     143        # not specially marked.
     144        taglist="$taglist $tagname"
     145        ;;
     146      *)
     147        if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
     148          taglist="$taglist $tagname"
     149          # Evaluate the configuration.
     150          eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
     151        else
     152          echo "$progname: ignoring unknown tag $tagname" 1>&2
     153        fi
     154        ;;
     155      esac
    145156      ;;
    146157    *)
     
    155166
    156167  # Have we seen a non-optional argument yet?
    157   case "$arg" in
     168  case in
    158169  --help)
    159170    show_help=yes
     
    238249fi
    239250
     251
     252
     253
     254
     255
    240256if test -z "$show_help"; then
    241257
    242258  # Infer the operation mode.
    243259  if test -z "$mode"; then
    244     case "$nonopt" in
     260    case in
    245261    *cc | *++ | gcc* | *-gcc*)
    246262      mode=link
    247263      for arg
    248264      do
    249         case "$arg" in
     265        case in
    250266        -c)
    251267           mode=compile
     
    292308
    293309  # These modes are in order of execution frequency so that they run quickly.
    294   case "$mode" in
     310  case in
    295311  # libtool compile mode
    296312  compile)
     
    306322    for arg
    307323    do
    308       case "$prev" in
     324      case in
    309325      "") ;;
    310326      xcompiler)
     
    313329        lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    314330
    315         case "$arg" in
     331        case in
    316332        # Double-quote args containing other shell metacharacters.
    317333        # Many Bourne shells cannot handle close brackets correctly
     
    333349
    334350      # Accept any command-line options.
    335       case "$arg" in
     351      case in
    336352      -o)
    337353        if test "$user_target" != "no"; then
     
    372388          # Many Bourne shells cannot handle close brackets correctly
    373389          # in scan sets, so we specify it separately.
    374           case "$arg" in
     390          case in
    375391            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
    376392            arg="\"$arg\""
     
    392408      esac
    393409
    394       case "$user_target" in
     410      case in
    395411      next)
    396412        # The next one is the -o target name
     
    420436      # Many Bourne shells cannot handle close brackets correctly
    421437      # in scan sets, so we specify it separately.
    422       case "$lastarg" in
     438      case in
    423439      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
    424440        lastarg="\"$lastarg\""
     
    434450    done
    435451
    436     case "$user_target" in
     452    case in
    437453    set)
    438454      ;;
     
    450466    # If the user specifies -o file.o, it is replaced with file.lo
    451467    xform='[cCFSfmso]'
    452     case "$libobj" in
     468    case in
    453469    *.ada) xform=ada ;;
    454470    *.adb) xform=adb ;;
     
    467483    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
    468484
    469     case "$libobj" in
     485    case in
    470486    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
    471487    *)
     
    545561
    546562    # On Cygwin there's no "real" PIC flag so we must build both object types
    547     case "$host_os" in
     563    case in
    548564    cygwin* | mingw* | pw32* | os2*)
    549565      pic_mode=default
     
    778794  link | relink)
    779795    modename="$modename: link"
    780     case "$host" in
     796    case in
    781797    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    782798      # It is impossible to link a dll without this setting, and
     
    844860    for arg
    845861    do
    846       case "$arg" in
     862      case in
    847863      -all-static | -static)
    848864        if test "X$arg" = "X-all-static"; then
     
    874890      base_compile="$base_compile $arg"
    875891      shift
    876       case "$arg" in
     892      case in
    877893      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
    878894        qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
     
    884900      # If the previous option needs an argument, assign it.
    885901      if test -n "$prev"; then
    886         case "$prev" in
     902        case in
    887903        output)
    888904          compile_command="$compile_command @OUTPUT@"
     
    891907        esac
    892908
    893         case "$prev" in
     909        case in
    894910        dlfiles|dlprefiles)
    895911          if test "$preload" = no; then
     
    899915            preload=yes
    900916          fi
    901           case "$arg" in
     917          case in
    902918          *.la | *.lo) ;;  # We handle these cases below.
    903919          force)
     
    951967          continue
    952968          ;;
     969
     970
     971
     972
     973
     974
     975
     976
     977
     978
     979
     980
     981
     982
     983
     984
     985
     986
     987
     988
     989
     990
     991
     992
     993
     994
     995
     996
     997
     998
     999
     1000
     1001
     1002
     1003
     1004
     1005
     1006
     1007
     1008
     1009
     1010
     1011
     1012
     1013
     1014
     1015
     1016
     1017
     1018
     1019
     1020
     1021
     1022
     1023
     1024
     1025
     1026
     1027
     1028
     1029
     1030
     1031
     1032
     1033
     1034
     1035
     1036
     1037
     1038
     1039
     1040
     1041
     1042
     1043
     1044
     1045
     1046
     1047
     1048
     1049
     1050
     1051
     1052
     1053
     1054
     1055
     1056
     1057
     1058
     1059
     1060
     1061
     1062
     1063
     1064
     1065
     1066
     1067
     1068
     1069
     1070
     1071
     1072
     1073
     1074
     1075
    9531076        rpath | xrpath)
    9541077          # We need an absolute path.
    955           case "$arg" in
     1078          case in
    9561079          [\\/]* | [A-Za-z]:[\\/]*) ;;
    9571080          *)
     
    9951118          ;;
    9961119        esac
    997       fi
     1120      fi
    9981121
    9991122      prevarg="$arg"
    10001123
    1001       case "$arg" in
     1124      case in
    10021125      -all-static)
    10031126        if test -n "$link_static_flag"; then
     
    10361159      -export-symbols | -export-symbols-regex)
    10371160        if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
    1038           $echo "$modename: not more than one -exported-symbols argument allowed"
     1161          $echo "$modename: t allowed"
    10391162          exit 1
    10401163        fi
     
    10581181        continue
    10591182        ;;
    1060        
     1183
    10611184      -L*)
    10621185        dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
    10631186        # We need an absolute path.
    1064         case "$dir" in
     1187        case in
    10651188        [\\/]* | [A-Za-z]:[\\/]*) ;;
    10661189        *)
     
    10801203          ;;
    10811204        esac
    1082         case "$host" in
     1205        case in
    10831206        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    1084           case ":$dllsearchpath:" in
     1207          case in
    10851208          *":$dir:"*) ;;
    10861209          *) dllsearchpath="$dllsearchpath:$dir";;
     
    10921215
    10931216      -l*)
    1094         if test "$arg" = "-lc"; then
    1095           case "$host" in
    1096           *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
    1097             # These systems don't actually have c library (as such)
     1217        if test ""; then
     1218          case in
     1219          *-*-cygwin* | *-*-2* | *-*-beos*)
     1220            # These systems don't actually have library (as such)
    10981221            continue
    10991222            ;;
    1100           esac
    1101         elif test "$arg" = "-lm"; then
    1102           case "$host" in
    1103           *-*-cygwin* | *-*-pw32* | *-*-beos*)
    1104             # These systems don't actually have math library (as such)
    1105             continue
     1223          *-*-mingw* | *-*-os2*)
     1224            # These systems don't actually have a C library (as such)
     1225            test "X$arg" = "X-lc" && continue
    11061226            ;;
    11071227          esac
     
    11221242
    11231243      -no-install)
    1124         case "$host" in
     1244        case in
    11251245        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    11261246          # The PATH hackery in wrapper scripts is required on Windows
     
    11301250          fast_install=no
    11311251          ;;
    1132         *-*-rhapsody*)
    1133           # rhapsody is a little odd...
    1134           deplibs="$deplibs -framework System"
    1135           ;;
    1136         *)
    1137           no_install=yes
    1138           ;;
     1252        *) no_install=yes ;;
    11391253        esac
    11401254        continue
     
    11461260        ;;
    11471261
     1262
     1263
     1264
     1265
     1266
    11481267      -o) prev=output ;;
    11491268
     
    11661285        dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
    11671286        # We need an absolute path.
    1168         case "$dir" in
     1287        case in
    11691288        [\\/]* | [A-Za-z]:[\\/]*) ;;
    11701289        *)
     
    11811300
    11821301      -static)
    1183         # The effects of -static are defined in a previous loop.
     1302# The effects of -static are defined in a previous loop.
    11841303        # We used to do the same as -all-static on platforms that
    11851304        # didn't have a PIC flag, but the assumption that the effects
     
    12051324        for flag in $args; do
    12061325          IFS="$save_ifs"
    1207           case "$flag" in
     1326          case in
    12081327            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
    12091328            flag="\"$flag\""
     
    12231342        for flag in $args; do
    12241343          IFS="$save_ifs"
    1225           case "$flag" in
     1344          case in
    12261345            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
    12271346            flag="\"$flag\""
     
    12511370        # to be aesthetically quoted because they are evaled later.
    12521371        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    1253         case "$arg" in
     1372        case in
    12541373        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
    12551374          arg="\"$arg\""
     
    12731392          # Read the .lo file
    12741393          # If there is no directory component, then add one.
    1275           case "$arg" in
     1394          case in
    12761395          */* | *\\*) . $arg ;;
    12771396          *) . ./$arg ;;
     
    13851504        # to be aesthetically quoted because they are evaled later.
    13861505        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    1387         case "$arg" in
     1506        case in
    13881507        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
    13891508          arg="\"$arg\""
     
    13911510        esac
    13921511        ;;
    1393       esac
     1512      esac
    13941513
    13951514      # Now actually substitute the argument into the commands.
     
    13981517        finalize_command="$finalize_command $arg"
    13991518      fi
    1400     done
     1519    done
    14011520
    14021521    if test -n "$prev"; then
     
    14561575    fi
    14571576
    1458     oldlibs=
    14591577    # calculate the name of the file, without its directory
    14601578    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
     
    14871605
    14881606    # Determine the type of output
    1489     case "$output" in
     1607    case in
    14901608    "")
    14911609      $echo "$modename: you must specify an output file" 1>&2
     
    15121630    if test $linkmode = lib; then
    15131631      libs="$predeps $libs $compiler_lib_search_path $postdeps"
     1632
     1633
     1634
     1635
     1636
     1637
     1638
     1639
     1640
     1641
     1642
     1643
    15141644    fi
    15151645
     
    15181648    newlib_search_path=
    15191649    need_relink=no # whether we're linking any uninstalled libtool libraries
    1520     uninst_deplibs= # uninstalled libtool libraries
    1521     uninst_path= # paths that contain uninstalled libtool libraries
     1650    installed libtool libraries
     1651    installed libtool libraries
    15221652    case $linkmode in
    15231653    lib)
    15241654        passes="conv link"
    15251655        for file in $dlfiles $dlprefiles; do
    1526           case "$file" in
     1656          case in
    15271657          *.la) ;;
    15281658          *)
     
    15411671        passes="conv scan dlopen dlpreopen link"
    15421672        ;;
    1543     *)  passes="conv"
     1673    *)passes="conv"
    15441674        ;;
    15451675    esac
    15461676    for pass in $passes; do
    1547       if test "$linkmode,$pass" = "lib,link" ||
    1548          test "$linkmode,$pass" = "prog,scan"; then
    1549         libs="$deplibs"
    1550         deplibs=
    1551       fi
    15521677      if test $linkmode = prog; then
     1678
    15531679        case $pass in
    1554         dlopen) libs="$dlfiles" ;;
     1680        dlopen)
     1681          libs="$dlfiles"
     1682          save_deplibs="$deplibs" # Collect dlpreopened libraries
     1683          deplibs=
     1684          ;;
    15551685        dlpreopen) libs="$dlprefiles" ;;
    15561686        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
    15571687        esac
    15581688      fi
    1559       if test $pass = dlopen; then
    1560         # Collect dlpreopened libraries
    1561         save_deplibs="$deplibs"
    1562         deplibs=
    1563       fi
    15641689      for deplib in $libs; do
    15651690        lib=
    15661691        found=no
    1567         case "$deplib" in
     1692        case in
    15681693        -l*)
    1569           if test $linkmode != lib && test $linkmode != prog; then
    1570             $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
     1694          if test $linkmode ; then
     1695            $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
    15711696            continue
    15721697          fi
     
    15851710          done
    15861711          if test "$found" != yes; then
     1712
    15871713            if test "$linkmode,$pass" = "prog,link"; then
    15881714              compile_deplibs="$deplib $compile_deplibs"
     
    15941720            continue
    15951721          fi
    1596           ;;
     1722          ;;
    15971723        -L*)
    15981724          case $linkmode in
     
    16171743            ;;
    16181744          *)
    1619             $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
     1745            $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
    16201746            ;;
    1621           esac
     1747          esac
    16221748          continue
    1623           ;;
     1749          ;;
    16241750        -R*)
    16251751          if test $pass = link; then
     
    16651791            continue
    16661792            ;;
    1667           esac
    1668           ;;
     1793          esac
     1794          ;;
    16691795        *.lo | *.$objext)
    1670           if test $pass = conv; then
    1671             deplibs="$deplib $deplibs"
    1672           elif test $linkmode = prog; then
    1673             if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
    1674               # If there is no dlopen support or we're linking statically,
    1675               # we need to preload.
    1676               newdlprefiles="$newdlprefiles $deplib"
    1677               compile_deplibs="$deplib $compile_deplibs"
    1678               finalize_deplibs="$deplib $finalize_deplibs"
    1679             else
    1680               newdlfiles="$newdlfiles $deplib"
    1681             fi
     1796          if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
     1797            # If there is no dlopen support or we're linking statically,
     1798            # we need to preload.
     1799            newdlprefiles="$newdlprefiles $deplib"
     1800            compile_deplibs="$deplib $compile_deplibs"
     1801            finalize_deplibs="$deplib $finalize_deplibs"
     1802          else
     1803            newdlfiles="$newdlfiles $deplib"
    16821804          fi
    16831805          continue
     
    16871809          continue
    16881810          ;;
    1689         esac
     1811        esac
    16901812        if test $found = yes || test -f "$lib"; then :
    16911813        else
     
    17151837
    17161838        # Read the .la file
    1717         case "$lib" in
     1839        case in
    17181840        */* | *\\*) . $lib ;;
    17191841        *) . ./$lib ;;
     
    17221844        if test "$linkmode,$pass" = "lib,link" ||
    17231845           test "$linkmode,$pass" = "prog,scan" ||
    1724            { test $linkmode != prog && test $linkmode != lib; }; then
     1846           { test $linkmode = oldlib && test $linkmode = obj; }; then
     1847           # Add dl[pre]opened files of deplib
    17251848          test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
    17261849          test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
     
    17281851
    17291852        if test $pass = conv; then
    1730           # only check for convenience libraries
     1853          # nly check for convenience libraries
    17311854          deplibs="$lib $deplibs"
    17321855          if test -z "$libdir"; then
     
    17511874          fi
    17521875          continue
    1753         fi
     1876        fi
    17541877
    17551878        # Get the name of the library we link against.
     
    17701893          fi
    17711894          if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
    1772             # If there is no dlname, no dlopen support or we're linking statically,
    1773             # we need to preload.
     1895            # If there is no dlname, no dlopen support or we're linking
     1896            # we need to preload.
    17741897            dlprefiles="$dlprefiles $lib"
    17751898          else
     
    17771900          fi
    17781901          continue
    1779         fi
     1902        fi
    17801903
    17811904        # We need an absolute path.
    1782         case "$ladir" in
     1905        case in
    17831906        [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
    17841907        *)
     
    18081931          absdir="$abs_ladir/$objdir"
    18091932          # Remove this search path later
    1810           uninst_path="$uninst_path $abs_ladir"
    1811         fi
     1933          inst_path $abs_ladir"
     1934        fi
    18121935        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
    18131936
     
    18281951            newdlprefiles="$newdlprefiles $dir/$linklib"
    18291952          fi
    1830         fi
     1953        fi
    18311954
    18321955        if test -z "$libdir"; then
    1833           # link the convenience library
     1956          # ink the convenience library
    18341957          if test $linkmode = lib; then
    18351958            deplibs="$dir/$old_library $deplibs"
     
    18381961            finalize_deplibs="$dir/$old_library $finalize_deplibs"
    18391962          else
    1840             deplibs="$lib $deplibs" # used for prog,scan pass
     1963            deplibs="$lib $deplibs"
    18411964          fi
    18421965          continue
     
    18551978          tmp_libs=
    18561979          for deplib in $dependency_libs; do
    1857             case "$deplib" in
     1980            case in
    18581981            -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
    18591982            esac
     
    18701993            esac
    18711994            tmp_libs="$tmp_libs $deplib"
    1872           done
     1995          done
    18731996          continue
    1874         fi
    1875 
    1876         if test "$linkmode,$pass" = "prog,link"; then
    1877           if test -n "$library_names" &&
    1878              { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
    1879             # We need to hardcode the library path
    1880             if test -n "$shlibpath_var"; then
    1881               # Make sure the rpath contains only unique directories.
    1882               case "$temp_rpath " in
    1883               *" $dir "*) ;;
    1884               *" $absdir "*) ;;
    1885               *) temp_rpath="$temp_rpath $dir" ;;
    1886               esac
    1887             fi
    1888 
    1889             # Hardcode the library path.
    1890             # Skip directories that are in the system default run-time
    1891             # search path.
    1892             case " $sys_lib_dlsearch_path " in
    1893             *" $absdir "*) ;;
    1894             *)
    1895               case "$compile_rpath " in
    1896               *" $absdir "*) ;;
    1897               *) compile_rpath="$compile_rpath $absdir"
    1898               esac
    1899               ;;
    1900             esac
    1901 
    1902             case " $sys_lib_dlsearch_path " in
    1903             *" $libdir "*) ;;
    1904             *)
    1905               case "$finalize_rpath " in
    1906               *" $libdir "*) ;;
    1907               *) finalize_rpath="$finalize_rpath $libdir"
    1908               esac
    1909               ;;
    1910             esac
    1911           fi
    1912 
    1913           if test "$alldeplibs" = yes &&
    1914              { test "$deplibs_check_method" = pass_all ||
    1915                { test "$build_libtool_libs" = yes &&
    1916                  test -n "$library_names"; }; }; then
    1917             # We only need to search for static libraries
    1918             continue
    1919           fi
    1920         fi
     1997        fi # $linkmode = prog...
    19211998
    19221999        link_static=no # Whether the deplib will be linked statically
    19232000        if test -n "$library_names" &&
    19242001           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
    1925           if test "$installed" = no; then
    1926             uninst_deplibs="$uninst_deplibs $lib"
    1927             need_relink=yes
    1928           fi
    1929           # This is a shared library
    1930           if test $linkmode = lib &&
    1931              test $hardcode_into_libs = yes; then
     2002          # Link against this shared library
     2003
     2004          if test "$linkmode,$pass" = "prog,link" ||
     2005           { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
    19322006            # Hardcode the library path.
    19332007            # Skip directories that are in the system default run-time
     
    19512025              ;;
    19522026            esac
     2027
     2028
     2029
     2030
     2031
     2032
     2033
     2034
     2035
     2036
     2037
     2038
     2039
     2040
     2041
     2042
     2043
     2044
     2045
     2046
     2047
     2048
     2049
     2050
    19532051          fi
    19542052
     
    19592057            shift; shift
    19602058            libname=`eval \\$echo \"$libname_spec\"`
    1961             if test -n "$soname_spec"; then
     2059            # use dlname if we got it. it's perfectly good, no?
     2060            if test -n "$dlname"; then
     2061              soname="$dlname"
     2062            elif test -n "$soname_spec"; then
     2063              # bleh windows
     2064              case $host in
     2065              *cygwin*)
     2066                major=`expr $current - $age`
     2067                versuffix="-$major"
     2068                ;;
     2069              esac
    19622070              eval soname=\"$soname_spec\"
    19632071            else
     
    19662074
    19672075            # Make a new name for the extract_expsyms_cmds to use
     2076
     2077
    19682078            newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
    19692079
     
    19972107            dir=$output_objdir
    19982108            linklib=$newlib
    1999           fi
     2109          fi
    20002110
    20012111          if test $linkmode = prog || test "$mode" != relink; then
     
    20042114            add=
    20052115            lib_linked=yes
    2006             case "$hardcode_action" in
     2116            case in
    20072117            immediate | unsupported)
    20082118              if test "$hardcode_direct" = no; then
    20092119                add="$dir/$linklib"
    20102120              elif test "$hardcode_minus_L" = no; then
    2011                 case "$host" in
     2121                case in
    20122122                *-*-sunos*) add_shlibpath="$dir" ;;
    20132123                esac
     
    20432153
    20442154            if test -n "$add_shlibpath"; then
    2045               case ":$compile_shlibpath:" in
     2155              case in
    20462156              *":$add_shlibpath:"*) ;;
    20472157              *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
     
    20572167                 test "$hardcode_minus_L" != yes && \
    20582168                 test "$hardcode_shlibpath_var" = yes; then
    2059                 case ":$finalize_shlibpath:" in
     2169                case in
    20602170                *":$libdir:"*) ;;
    20612171                *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
     
    20762186              add="-l$name"
    20772187            elif test "$hardcode_shlibpath_var" = yes; then
    2078               case ":$finalize_shlibpath:" in
     2188              case in
    20792189              *":$libdir:"*) ;;
    20802190              *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
     
    20962206          fi
    20972207        elif test $linkmode = prog; then
     2208
     2209
     2210
     2211
     2212
     2213
     2214
     2215
     2216
    20982217          # Here we assume that one of hardcode_direct or hardcode_minus_L
    20992218          # is not unsupported.  This is valid on all known static and
     
    21122231            # We're trying link a shared library against a static one
    21132232            # but the system doesn't support it.
     2233
    21142234            # Just print a warning and add the library to dependency_libs so
    21152235            # that the program can be linked against the static library.
     
    21192239            echo "*** you link to this library.  But I can only do this if you have a"
    21202240            echo "*** shared version of the library, which you do not appear to have."
     2241
     2242
     2243
     2244
     2245
     2246
     2247
     2248
     2249
     2250
     2251
     2252
     2253
     2254
     2255
     2256
     2257
    21212258          else
    21222259            convenience="$convenience $dir/$old_library"
     
    21252262            link_static=yes
    21262263          fi
    2127         fi
     2264        fi
    21282265
    21292266        if test $linkmode = lib; then
     
    21342271            temp_deplibs=
    21352272            for libdir in $dependency_libs; do
    2136               case "$libdir" in
     2273              case in
    21372274              -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
    21382275                   case " $xrpath " in
     
    21622299            # Add the search paths of all dependency libraries
    21632300            for deplib in $dependency_libs; do
    2164               case "$deplib" in
     2301              case in
    21652302              -L*) path="$deplib" ;;
    21662303              *.la)
     
    21682305                test "X$dir" = "X$deplib" && dir="."
    21692306                # We need an absolute path.
    2170                 case "$dir" in
     2307                case in
    21712308                [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
    21722309                *)
     
    21992336              esac
    22002337            done
    2201           fi
    2202         fi
    2203       done
    2204       dependency_libs="$newdependency_libs"
     2338          fi # link_all_deplibs != no
     2339        fi # linkmode = lib
     2340      done # for deplib in $libs
    22052341      if test $pass = dlpreopen; then
    22062342        # Link the dlpreopened libraries before other libraries
     
    22102346      fi
    22112347      if test $pass != dlopen; then
     2348
    22122349        if test $pass != conv; then
    22132350          # Make sure lib_search_path contains only unique directories.
     
    22282365        fi
    22292366        for var in $vars dependency_libs; do
    2230           # Make sure that $var contains only unique libraries
    2231           # and add them in reverse order
     2367          # Add libraries to $var in reverse order
    22322368          eval tmp_libs=\"\$$var\"
    22332369          new_libs=
    22342370          for deplib in $tmp_libs; do
    2235             case "$deplib" in
     2371            case in
    22362372            -L*) new_libs="$deplib $new_libs" ;;
    22372373            *)
     
    22502386          tmp_libs=
    22512387          for deplib in $new_libs; do
    2252             case "$deplib" in
     2388            case in
    22532389            -L*)
    22542390              case " $tmp_libs " in
     
    22612397          done
    22622398          eval $var=\"$tmp_libs\"
    2263         done
    2264       fi
    2265     done
     2399        done # for var
     2400      fi
     2401      if test "$pass" = "conv" &&
     2402       { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
     2403        libs="$deplibs" # reset libs
     2404        deplibs=
     2405      fi
     2406    done # for pass
    22662407    if test $linkmode = prog; then
    22672408      dlfiles="$newdlfiles"
     
    22712412    case $linkmode in
    22722413    oldlib)
    2273       if test -n "$deplibs"; then
    2274         $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
    2275       fi
    2276 
    22772414      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
    22782415        $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
     
    23072444    lib)
    23082445      # Make sure we only generate libraries of the form `libNAME.la'.
    2309       case "$outputname" in
     2446      case in
    23102447      lib*)
    23112448        name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
     
    23872524
    23882525        # Check that each of the things are valid numbers.
    2389         case "$current" in
    2390         0 | [1-9] | [1-9][0-9]*) ;;
     2526        case in
     2527        0 | [1-9] | [1-9][0-9]) ;;
    23912528        *)
    23922529          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
     
    23962533        esac
    23972534
    2398         case "$revision" in
    2399         0 | [1-9] | [1-9][0-9]*) ;;
     2535        case in
     2536        0 | [1-9] | [1-9][0-9]) ;;
    24002537        *)
    24012538          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
     
    24052542        esac
    24062543
    2407         case "$age" in
    2408         0 | [1-9] | [1-9][0-9]*) ;;
     2544        case in
     2545        0 | [1-9] | [1-9][0-9]) ;;
    24092546        *)
    24102547          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
     
    24242561        versuffix=
    24252562        verstring=
    2426         case "$version_type" in
     2563        case in
    24272564        none) ;;
     2565
     2566
     2567
     2568
     2569
     2570
     2571
     2572
     2573
     2574
     2575
     2576
     2577
     2578
     2579
     2580
     2581
     2582
     2583
     2584
    24282585
    24292586        irix)
     
    24692626          major=".$current"
    24702627          versuffix=".$current.$revision"
    2471           ;;
    2472 
    2473         freebsd-aout)
    2474           major=".$current"
    2475           versuffix=".$current.$revision";
    2476           ;;
    2477 
    2478         freebsd-elf)
    2479           major=".$current"
    2480           versuffix=".$current";
    24812628          ;;
    24822629
     
    25322679        tempremovelist=`echo "$output_objdir/*"`
    25332680        for p in $tempremovelist; do
    2534           case "$p" in
     2681          case in
    25352682            *.$objext)
    25362683               ;;
     
    25562703
    25572704      # Eliminate all temporary directories.
    2558       for path in $uninst_path; do
     2705      for path in $inst_path; do
    25592706        lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
    25602707        deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
     
    25992746      if test "$build_libtool_libs" = yes; then
    26002747        if test -n "$rpath"; then
    2601           case "$host" in
     2748          case in
    26022749          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
    26032750            # these systems don't actually have a c library (as such)!
    26042751            ;;
     2752
     2753
     2754
     2755
     2756
     2757
     2758
    26052759          *)
    2606             # Add libc to deplibs on all other systems if necessary.
    2607             if test $build_libtool_need_lc = "yes"; then
    2608               deplibs="$deplibs -lc"
    2609             fi
     2760            # Add libc to deplibs on all other systems if necessary.
     2761            if test $build_libtool_need_lc = "yes"; then
     2762              deplibs="$deplibs -lc"
     2763            fi
    26102764            ;;
    26112765          esac
     
    26262780        newdeplibs=
    26272781        droppeddeps=no
    2628         case "$deplibs_check_method" in
     2782        case in
    26292783        pass_all)
    26302784          # Don't check for shared/static.  Everything works.
     
    26512805              name="`expr $i : '-l\(.*\)'`"
    26522806              # If $name is empty we are operating on a -L argument.
    2653               if test "$name" != "" ; then
     2807              if test ; then
    26542808                libname=`eval \\$echo \"$libname_spec\"`
    26552809                deplib_matches=`eval \\$echo \"$library_names_spec\"`
     
    26762830              name="`expr $i : '-l\(.*\)'`"
    26772831             # If $name is empty we are operating on a -L argument.
    2678               if test "$name" != "" ; then
     2832              if test ; then
    26792833                $rm conftest
    26802834                $LTCC -o conftest conftest.c $i
     
    27162870            name="`expr $a_deplib : '-l\(.*\)'`"
    27172871            # If $name is empty we are operating on a -L argument.
    2718             if test "$name" != "" ; then
     2872            if test ; then
    27192873              libname=`eval \\$echo \"$libname_spec\"`
    27202874              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
     
    27342888                      while test -h "$potlib" 2>/dev/null; do
    27352889                        potliblink=`ls -ld $potlib | sed 's/.* -> //'`
    2736                         case "$potliblink" in
     2890                        case in
    27372891                        [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
    27382892                        *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
     
    27472901                      fi
    27482902                    done
     2903
     2904
     2905
     2906
     2907
     2908
     2909
     2910
     2911
     2912
     2913
     2914
     2915
     2916
     2917
     2918
     2919
     2920
     2921
     2922
     2923
     2924
     2925
     2926
     2927
     2928
     2929
     2930
     2931
     2932
     2933
     2934
     2935
     2936
    27492937              done
    27502938              if test -n "$a_deplib" ; then
     
    27842972        name=$name_save
    27852973
     2974
     2975
     2976
     2977
     2978
     2979
     2980
    27862981        if test "$droppeddeps" = yes; then
    27872982          if test "$module" = yes; then
     
    28093004            echo "*** automatically added whenever a program is linked with this library"
    28103005            echo "*** or is declared to -dlopen it."
     3006
     3007
     3008
     3009
     3010
     3011
     3012
     3013
     3014
     3015
     3016
     3017
     3018
     3019
     3020
    28113021          fi
    28123022        fi
     
    28353045                else
    28363046                  # Just accumulate the unique libdirs.
    2837                   case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
     3047                  case in
    28383048                  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
    28393049                    ;;
     
    28883098          soname="$realname"
    28893099        fi
     3100
    28903101
    28913102        lib="$output_objdir/$realname"
     
    29443155        if test -n "$convenience"; then
    29453156          if test -n "$whole_archive_flag_spec"; then
     3157
    29463158            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
    29473159          else
     
    29593171            for xlib in $convenience; do
    29603172              # Extract the objects.
    2961               case "$xlib" in
     3173              case in
    29623174              [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    29633175              *) xabs=`pwd`"/$xlib" ;;
     
    29983210          eval cmds=\"$archive_cmds\"
    29993211        fi
    3000         IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
    3001         for cmd in $cmds; do
    3002           IFS="$save_ifs"
    3003           $show "$cmd"
    3004           $run eval "$cmd" || exit $?
    3005         done
    3006         IFS="$save_ifs"
     3212        if len=`expr "X$cmds" : ".*"` &&
     3213           test $len -le $max_cmd_len; then
     3214          :
     3215        else
     3216          # The command line is too long to link in one step, link piecewise.
     3217          $echo "creating reloadable object files..."
     3218
     3219          # Save the value of $output and $libobjs because we want to
     3220          # use them later.  If we have whole_archive_flag_spec, we
     3221          # want to use save_libobjs as it was before
     3222          # whole_archive_flag_spec was expanded, because we can't
     3223          # assume the linker understands whole_archive_flag_spec.
     3224          # This may have to be revisited, in case too many
     3225          # convenience libraries get linked in and end up exceeding
     3226          # the spec.
     3227          if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
     3228            save_libobjs=$libobjs
     3229          fi
     3230          save_output=$output
     3231
     3232          # Clear the reloadable object creation command queue and
     3233          # initialize k to one.
     3234          test_cmds=
     3235          concat_cmds=
     3236          objlist=
     3237          delfiles=
     3238          last_robj=
     3239          k=1
     3240          output=$output_objdir/$save_output-${k}.$objext
     3241          # Loop over the list of objects to be linked.
     3242          for obj in $save_libobjs
     3243          do
     3244            eval test_cmds=\"$reload_cmds $objlist $last_robj\"
     3245            if test "X$objlist" = X ||
     3246               { len=`expr "X$test_cmds" : ".*"` &&
     3247                 test $len -le $max_cmd_len; }; then
     3248              objlist="$objlist $obj"
     3249            else
     3250              # The command $test_cmds is almost too long, add a
     3251              # command to the queue.
     3252              if test $k -eq 1 ; then
     3253                # The first file doesn't have a previous command to add.
     3254                eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
     3255              else
     3256                # All subsequent reloadable object files will link in
     3257                # the last one created.
     3258                eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
     3259              fi
     3260              last_robj=$output_objdir/$save_output-${k}.$objext
     3261              k=`expr $k + 1`
     3262              output=$output_objdir/$save_output-${k}.$objext
     3263              objlist=$obj
     3264              len=1
     3265            fi
     3266          done
     3267          # Handle the remaining objects by creating one last
     3268          # reloadable object file.  All subsequent reloadable object
     3269          # files will link in the last one created.
     3270          test -z "$concat_cmds" || concat_cmds=$concat_cmds~
     3271          eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
     3272
     3273          # Set up a command to remove the reloadale object files
     3274          # after they are used.
     3275          i=0
     3276          while test $i -lt $k
     3277          do
     3278            i=`expr $i + 1`
     3279            delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
     3280          done
     3281
     3282          $echo "creating a temporary reloadable object file: $output"
     3283
     3284          # Loop through the commands generated above and execute them.
     3285          IFS="${IFS=   }"; save_ifs="$IFS"; IFS='~'
     3286          for cmd in $concat_cmds; do
     3287            IFS="$save_ifs"
     3288            $show "$cmd"
     3289            $run eval "$cmd" || exit $?
     3290          done
     3291          IFS="$save_ifs"
     3292
     3293          libobjs=$output
     3294          # Restore the value of output.
     3295          output=$save_output
     3296
     3297          if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
     3298            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
     3299          fi
     3300          # Expand the library linking commands again to reset the
     3301          # value of $libobjs for piecewise linking.
     3302
     3303          # Do each of the archive commands.
     3304          if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
     3305            eval cmds=\"$archive_expsym_cmds\"
     3306          else
     3307            eval cmds=\"$archive_cmds\"
     3308          fi
     3309
     3310          # Append the command to remove the reloadable object files
     3311          # to the just-reset $cmds.
     3312          eval cmds=\"\$cmds~$rm $delfiles\"
     3313        fi
     3314        IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
     3315        for cmd in $cmds; do
     3316          IFS="$save_ifs"
     3317          $show "$cmd"
     3318          $run eval "$cmd" || exit $?
     3319        done
     3320        IFS="$save_ifs"
    30073321
    30083322        # Restore the uninstalled library and exit
     
    30533367      fi
    30543368
    3055       case "$output" in
     3369      case in
    30563370      *.lo)
    30573371        if test -n "$objs$old_deplibs"; then
     
    30983412          for xlib in $convenience; do
    30993413            # Extract the objects.
    3100             case "$xlib" in
     3414            case in
    31013415            [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    31023416            *) xabs=`pwd`"/$xlib" ;;
     
    31943508
    31953509    prog)
     3510
     3511
     3512
    31963513      if test -n "$vinfo"; then
    31973514        $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
     
    32083525        fi
    32093526      fi
     3527
     3528
     3529
     3530
     3531
     3532
     3533
     3534
    32103535
    32113536      compile_command="$compile_command $compile_deplibs"
     
    32333558            else
    32343559              # Just accumulate the unique libdirs.
    3235               case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
     3560              case in
    32363561              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
    32373562                ;;
     
    32513576          esac
    32523577        fi
    3253         case "$host" in
     3578        case in
    32543579        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    3255           case ":$dllsearchpath:" in
     3580          case in
    32563581          *":$libdir:"*) ;;
    32573582          *) dllsearchpath="$dllsearchpath:$libdir";;
     
    32773602            else
    32783603              # Just accumulate the unique libdirs.
    3279               case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
     3604              case in
    32803605              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
    32813606                ;;
     
    33143639
    33153640      if test -n "$dlsyms"; then
    3316         case "$dlsyms" in
     3641        case in
    33173642        "") ;;
    33183643        *.c)
     
    34453770
    34463771          pic_flag_for_symtable=
    3447           case "$host" in
     3772          case in
    34483773          # compiling the symbol table file with pic_flag works around
    34493774          # a FreeBSD bug that causes programs to crash when -lm is
     
    35133838        rpath=
    35143839        for dir in $temp_rpath; do
    3515           case "$dir" in
     3840          case in
    35163841          [\\/]* | [A-Za-z]:[\\/]*)
    35173842            # Absolute path.
     
    36213946      # Quote $echo for shipping.
    36223947      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
    3623         case "$0" in
     3948        case in
    36243949        [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
    36253950        *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
     
    36363961        case $output in
    36373962          *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
     3963
     3964
     3965
     3966
     3967
    36383968        esac
    36393969        $rm $output
     
    36663996if test \"\$libtool_install_magic\" = \"$magic\"; then
    36673997  # install mode needs the following variable:
    3668   uninst_deplibs='$uninst_deplibs'
     3998  inst_deplibs'
    36693999else
    36704000  # When we are sourced in execute mode, \$file and \$echo are already set.
     
    37154045        if test "$fast_install" = yes; then
    37164046          echo >> $output "\
    3717   program=lt-'$outputname'
     4047  program=lt-'$outputname'
    37184048  progdir=\"\$thisdir/$objdir\"
    37194049
     
    37344064    # relink executable if necessary
    37354065    if test -n \"\$relink_command\"; then
    3736       if (eval \$relink_command); then :
     4066      if ; then :
    37374067      else
     4068
    37384069        $rm \"\$progdir/\$file\"
    37394070        exit 1
     
    38604191        for xlib in $addlibs; do
    38614192          # Extract the objects.
    3862           case "$xlib" in
     4193          case in
    38634194          [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    38644195          *) xabs=`pwd`"/$xlib" ;;
     
    39044235#       done
    39054236
    3906         eval cmds=\"$old_archive_cmds\"
     4237        eval cmds=\"$old_archive_cmds\"
     4238
     4239        if len=`expr "X$cmds" : ".*"` &&
     4240             test $len -le $max_cmd_len; then
     4241          :
     4242        else
     4243          # the command line is too long to link in one step, link in parts
     4244          $echo "using piecewise archive linking..."
     4245          save_RANLIB=$RANLIB
     4246          RANLIB=:
     4247          objlist=
     4248          concat_cmds=
     4249          save_oldobjs=$oldobjs
     4250          for obj in $save_oldobjs
     4251          do
     4252            oldobjs="$objlist $obj"
     4253            objlist="$objlist $obj"
     4254            eval test_cmds=\"$old_archive_cmds\"
     4255            if len=`expr "X$test_cmds" : ".*"` &&
     4256               test $len -le $max_cmd_len; then
     4257              :
     4258            else
     4259              # the above command should be used before it gets too long
     4260              oldobjs=$objlist
     4261              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
     4262              eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
     4263              objlist=
     4264            fi
     4265          done
     4266          RANLIB=$save_RANLIB
     4267          oldobjs=$objlist
     4268          eval cmds=\"\$concat_cmds~$old_archive_cmds\"
     4269        fi
    39074270      fi
    39084271      IFS="${IFS=       }"; save_ifs="$IFS"; IFS='~'
     
    39214284
    39224285    # Now create the libtool archive.
    3923     case "$output" in
     4286    case in
    39244287    *.la)
    39254288      old_library=
     
    39394302      done
    39404303      # Quote the link command for shipping.
    3941       relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
     4304      tagopts=
     4305      for tag in $taglist; do
     4306        tagopts="$tagopts --tag $tag"
     4307      done
     4308      relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)"
    39424309      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
    39434310
     
    39534320            newdependency_libs=
    39544321            for deplib in $dependency_libs; do
    3955               case "$deplib" in
     4322              case in
    39564323              *.la)
    39574324                name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
     
    39914358          fi
    39924359          $rm $output
     4360
     4361
     4362
     4363
     4364
    39934365          $echo > $output "\
    39944366# $outputname - a libtool library file
     
    39994371
    40004372# The name that we can dlopen(3).
    4001 dlname='$dlname'
     4373dlname='$dlname'
    40024374
    40034375# Names of this library.
     
    40514423      # Aesthetically quote it.
    40524424      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
    4053       case "$arg" in
     4425      case in
    40544426      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
    40554427        arg="\"$arg\""
     
    40674439    # Aesthetically quote it.
    40684440    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    4069     case "$arg" in
     4441    case in
    40704442    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*)
    40714443      arg="\"$arg\""
     
    40904462      fi
    40914463
    4092       case "$arg" in
     4464      case in
    40934465      -d) isdir=yes ;;
    40944466      -f) prev="-f" ;;
     
    41154487      # Aesthetically quote the argument.
    41164488      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    4117       case "$arg" in
     4489      case in
    41184490      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
    41194491        arg="\"$arg\""
     
    41664538      fi
    41674539    fi
    4168     case "$destdir" in
     4540    case in
    41694541    [\\/]* | [A-Za-z]:[\\/]*) ;;
    41704542    *)
    41714543      for file in $files; do
    4172         case "$file" in
     4544        case in
    41734545        *.lo) ;;
    41744546        *)
     
    41924564
    41934565      # Do each installation.
    4194       case "$file" in
     4566      case in
    41954567      *.$libext)
    41964568        # Do the static libraries later.
     
    42114583        relink_command=
    42124584        # If there is no directory component, then add one.
    4213         case "$file" in
     4585        case in
    42144586        */* | *\\*) . $file ;;
    42154587        *) . ./$file ;;
     
    42404612          else
    42414613            $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
    4242             continue
     4614           
    42434615          fi
    42444616        fi
     
    43074679
    43084680        # Deduce the name of the destination old-style object file.
    4309         case "$destfile" in
     4681        case in
    43104682        *.lo)
    43114683          staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
     
    43504722        # Do a test to see if this is really a libtool program.
    43514723        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    4352           uninst_deplibs=
     4724          inst_deplibs=
    43534725          relink_command=
    43544726
    43554727          # If there is no directory component, then add one.
    4356           case "$file" in
     4728          case in
    43574729          */* | *\\*) . $file ;;
    43584730          *) . ./$file ;;
     
    43604732
    43614733          # Check the variables that should have been set.
    4362           if test -z "$uninst_deplibs"; then
     4734          if test -z "$inst_deplibs"; then
    43634735            $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
    43644736            exit 1
     
    43664738
    43674739          finalize=yes
    4368           for lib in $uninst_deplibs; do
     4740          for lib in $inst_deplibs; do
    43694741            # Check to see that each library is installed.
    43704742            libdir=
    43714743            if test -f "$lib"; then
    43724744              # If there is no directory component, then add one.
    4373               case "$lib" in
     4745              case in
    43744746              */* | *\\*) . $lib ;;
    43754747              *) . ./$lib ;;
     
    43854757          relink_command=
    43864758          # If there is no directory component, then add one.
    4387           case "$file" in
     4759          case in
    43884760          */* | *\\*) . $file ;;
    43894761          *) . ./$file ;;
     
    44234795        fi
    44244796
     4797
     4798
     4799
     4800
     4801
     4802
     4803
     4804
     4805
     4806
     4807
     4808
     4809
     4810
     4811
     4812
     4813
     4814
     4815
    44254816        $show "$install_prog$stripme $file $destfile"
    44264817        $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
     
    44624853      # Maybe just do a dry run.
    44634854      test -n "$run" && current_libdirs=" -n$current_libdirs"
    4464       exec $SHELL $0 --finish$current_libdirs
    4465       exit 1
     4855      exec_cmd='$SHELL $0 --finish$current_libdirs'
     4856    else
     4857      exit 0
    44664858    fi
    4467 
    4468     exit 0
    44694859    ;;
    44704860
     
    45044894
    45054895    # Exit here if they wanted silent mode.
    4506     test "$show" = : && exit 0
     4896    test "$show" = && exit 0
    45074897
    45084898    echo "----------------------------------------------------------------------"
     
    45144904    echo "If you ever happen to want to link against installed libraries"
    45154905    echo "in a given directory, LIBDIR, you must either use libtool, and"
    4516     echo "specify the full pathname of the library, or use \`-LLIBDIR'"
     4906    echo "specify the full pathname of the library, or use \`-LLIBDIR'"
    45174907    echo "flag during linking and do at least one of the following:"
    45184908    if test -n "$shlibpath_var"; then
     
    45644954
    45654955      dir=
    4566       case "$file" in
     4956      case in
    45674957      *.la)
    45684958        # Check to see that this really is a libtool archive.
     
    45794969
    45804970        # If there is no directory component, then add one.
    4581         case "$file" in
     4971        case in
    45824972        */* | *\\*) . $file ;;
    45834973        *) . ./$file ;;
     
    46345024    for file
    46355025    do
    4636       case "$file" in
     5026      case in
    46375027      -*) ;;
    46385028      *)
     
    46405030        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    46415031          # If there is no directory component, then add one.
    4642           case "$file" in
     5032          case in
    46435033          */* | *\\*) . $file ;;
    46445034          *) . ./$file ;;
     
    46695059      fi
    46705060
    4671       # Now actually exec the command.
    4672       eval "exec \$cmd$args"
    4673 
    4674       $echo "$modename: cannot exec \$cmd$args"
    4675       exit 1
     5061      # Now prepare to actually exec the command.
     5062      exec_cmd='"$cmd"$args'
    46765063    else
    46775064      # Display what would be done.
     
    46905077    rm="$nonopt"
    46915078    files=
     5079
     5080
    46925081
    46935082    # This variable tells wrapper scripts just to set variables rather
     
    46975086    for arg
    46985087    do
    4699       case "$arg" in
     5088      case $arg in
     5089      -f) rm="$rm $arg"; rmforce=yes ;;
    47005090      -*) rm="$rm $arg" ;;
    47015091      *) files="$files $arg" ;;
     
    47085098      exit 1
    47095099    fi
     5100
     5101
    47105102
    47115103    for file in $files; do
     
    47205112      test $mode = uninstall && objdir="$dir"
    47215113
     5114
     5115
     5116
     5117
     5118
     5119
     5120
     5121
     5122
     5123
     5124
     5125
     5126
     5127
     5128
     5129
     5130
     5131
     5132
     5133
    47225134      rmfiles="$file"
    47235135
    4724       case "$name" in
     5136      case in
    47255137      *.la)
    47265138        # Possibly a libtool archive, so verify it.
     
    47445156                $show "$cmd"
    47455157                $run eval "$cmd"
     5158
     5159
     5160
    47465161              done
    47475162              IFS="$save_ifs"
     
    47565171                $show "$cmd"
    47575172                $run eval "$cmd"
     5173
     5174
     5175
    47585176              done
    47595177              IFS="$save_ifs"
     
    47665184      *.lo)
    47675185        # Possibly a libtool object, so verify it.
    4768         if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
     5186        if (sed -e '2q' $ | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    47695187
    47705188          # Read the .lo file
    4771           . ./$file
     5189          . e
    47725190
    47735191          # Add PIC object to the list of files to remove.
     
    48005218      esac
    48015219      $show "$rm $rmfiles"
    4802       $run $rm $rmfiles
     5220      $run $rm $rmfiles
    48035221    done
    4804     exit 0
     5222
     5223    # Try to remove the ${objdir}s in the directories where we deleted files
     5224    for dir in $rmdirs; do
     5225      if test -d "$dir"; then
     5226        $show "rmdir $dir"
     5227        $run rmdir $dir >/dev/null 2>&1
     5228      fi
     5229    done
     5230
     5231    exit $exit_status
    48055232    ;;
    48065233
     
    48125239  esac
    48135240
    4814   $echo "$modename: invalid operation mode \`$mode'" 1>&2
    4815   $echo "$generic_help" 1>&2
     5241  if test -z "$exec_cmd"; then
     5242    $echo "$modename: invalid operation mode \`$mode'" 1>&2
     5243    $echo "$generic_help" 1>&2
     5244    exit 1
     5245  fi
     5246fi # test -z "$show_help"
     5247
     5248if test -n "$exec_cmd"; then
     5249  eval exec $exec_cmd
    48165250  exit 1
    4817 fi # test -z "$show_help"
     5251fi
    48185252
    48195253# We need to display help for each of the modes.
    4820 case "$mode" in
     5254case in
    48215255"") $echo \
    48225256"Usage: $modename [OPTION]... [MODE-ARG]...
     
    48745308
    48755309  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
     5310
     5311
    48765312  -static           always build a \`.o' file suitable for static linking
    48775313
     
    49575393  -no-undefined     declare that a library does not refer to external symbols
    49585394  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
     5395
    49595396  -release RELEASE  specify package release information
    49605397  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
Note: See TracChangeset for help on using the changeset viewer.