source: scripts/untested/blfs-patches/freeglut-2.2.0-update_ltmain-1.patch@ 662fbfc

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 662fbfc was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100644
File size: 45.9 KB
  • freeglut-2.2.

    diff -uNr freeglut-2.2.0-orig/ltmain.sh freeglut-2.2.0/ltmain.sh
    old new  
    4848  exit 0
    4949fi
    5050
    51 # define SED for historic ltconfig's generated by Libtool 1.3
    52 test -z "$SED" && SED=sed
    53 
    5451# The name of this program.
    55 progname=`$echo "$0" | ${SED} 's%^.*/%%'`
     52progname=`$echo "$0" | sed 's%^.*/%%'`
    5653modename="$progname"
    5754
    5855# Constants.
    5956PROGRAM=ltmain.sh
    6057PACKAGE=libtool
    61 VERSION=1.4.3
    62 TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)"
     58VERSION=1.4.2
     59TIMESTAMP=" (1.922.2.54 2001/09/11 03:33:37)"
    6360
    6461default_mode=
    6562help="Try \`$progname --help' for more information."
     
    7067
    7168# Sed substitution that helps us do robust quoting.  It backslashifies
    7269# metacharacters that are still active within double-quoted strings.
    73 Xsed="${SED}"' -e 1s/^X//'
     70Xsed='sed -e 1s/^X//'
    7471sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
    75 # test EBCDIC or ASCII                                                         
    76 case `echo A|od -x` in                                                         
    77  *[Cc]1*) # EBCDIC based system                                               
    78   SP2NL="tr '\100' '\n'"                                                       
    79   NL2SP="tr '\r\n' '\100\100'"                                                 
    80   ;;                                                                           
    81  *) # Assume ASCII based system                                               
    82   SP2NL="tr '\040' '\012'"                                                     
    83   NL2SP="tr '\015\012' '\040\040'"                                             
    84   ;;                                                                           
    85 esac                                                                           
     72SP2NL='tr \040 \012'
     73NL2SP='tr \015\012 \040\040'
    8674
    8775# NLS nuisances.
    8876# Only set LANG and LC_ALL to C if already set.
     
    156144    ;;
    157145
    158146  --config)
    159     ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
     147    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
    160148    exit 0
    161149    ;;
    162150
     
    219207  exit 1
    220208fi
    221209
    222 # Mandrake: (gc) It's bad to link C++ code with GCC, so we need to use the compiler name if provided
    223 if test "$mode" = link && test -n "$archive_cmds" && test -x "/usr/bin/perl"; then
    224     case $nonopt in
    225     *cc | *++ | gcc* | *-gcc* | egcs*)
    226             archive_cmds=`echo $archive_cmds | perl -pe 's/^\S+\s+//'`
    227             archive_cmds="$nonopt $archive_cmds"
    228             archive_expsym_cmds=`echo $archive_expsym_cmds | perl -pe 's/^\S+\s+//'`
    229             archive_expsym_cmds="$nonopt $archive_expsym_cmds"
    230     esac
    231 fi
    232 
    233210# If this variable is set in any of the actions, the command in it
    234211# will be execed at the end.  This prevents here-documents from being
    235212# left over by shells.
     
    240217  # Infer the operation mode.
    241218  if test -z "$mode"; then
    242219    case $nonopt in
    243     *cc | *++ | gcc* | *-gcc* | xlc*)
     220    *cc | *++ | gcc* | *-gcc*)
    244221      mode=link
    245222      for arg
    246223      do
     
    782759    linker_flags=
    783760    dllsearchpath=
    784761    lib_search_path=`pwd`
     762    inst_prefix_dir=
    785763
    786764    avoid_version=no
    787765    dlfiles=
     
    912890          prev=
    913891          continue
    914892          ;;
     893        inst_prefix)
     894          inst_prefix_dir="$arg"
     895          prev=
     896          continue
     897          ;;
    915898        release)
    916899          release="-$arg"
    917900          prev=
     
    1013996        continue
    1014997        ;;
    1015998
     999      -inst-prefix-dir)
     1000        prev=inst_prefix
     1001        continue
     1002        ;;
     1003
    10161004      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
    10171005      # so, if we see these flags be careful not to treat them like -L
    10181006      -L[A-Z][A-Z]*:*)
    10191007        case $with_gcc/$host in
    1020         no/*-*-irix* | no/*-*-nonstopux*)
     1008        no/*-*-irix*)
    10211009          compile_command="$compile_command $arg"
    10221010          finalize_command="$finalize_command $arg"
    10231011          ;;
     
    10681056            # These systems don't actually have a C library (as such)
    10691057            test "X$arg" = "X-lc" && continue
    10701058            ;;
    1071           *-*-openbsd* | *-*-freebsd*)
     1059          *-*-openbsd*)
    10721060            # Do not include libc due to us having libc/libc_r.
    10731061            test "X$arg" = "X-lc" && continue
    10741062            ;;
    10751063          esac
    10761064         elif test "X$arg" = "X-lc_r"; then
    10771065          case $host in
    1078          *-*-openbsd* | *-*-freebsd*)
     1066          *-*-openbsd*)
    10791067            # Do not include libc_r directly, use -pthread flag.
    10801068            continue
    10811069            ;;
     
    13281316      output_objdir="$output_objdir/$objdir"
    13291317    fi
    13301318    # Create the object directory.
    1331     if test ! -d $output_objdir; then
     1319    if test ! -d "$output_objdir"; then
    13321320      $show "$mkdir $output_objdir"
    13331321      $run $mkdir $output_objdir
    13341322      status=$?
    1335       if test $status -ne 0 && test ! -d $output_objdir; then
     1323      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
    13361324        exit $status
    13371325      fi
    13381326    fi
     
    13621350      fi
    13631351      libs="$libs $deplib"
    13641352    done
     1353
     1354    if test "$linkmode" = lib; then
     1355      libs="$predeps $libs $compiler_lib_search_path $postdeps"
     1356
     1357      # Compute libraries that are listed more than once in $predeps
     1358      # $postdeps and mark them as special (i.e., whose duplicates are
     1359      # not to be eliminated).
     1360      pre_post_deps=
     1361      if test "X$duplicate_deps" = "Xyes" ; then
     1362        for pre_post_dep in $predeps $postdeps; do
     1363          case "$pre_post_deps " in
     1364          *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
     1365          esac
     1366          pre_post_deps="$pre_post_deps $pre_post_dep"
     1367        done
     1368      fi
     1369      pre_post_deps=
     1370    fi
     1371
    13651372    deplibs=
    13661373    newdependency_libs=
    13671374    newlib_search_path=
     
    13931400        ;;
    13941401    esac
    13951402    for pass in $passes; do
    1396       if test $linkmode = prog; then
     1403      if test "$linkmode" = prog; then
    13971404        # Determine which files to process
    13981405        case $pass in
    13991406        dlopen)
     
    14101417        found=no
    14111418        case $deplib in
    14121419        -l*)
    1413           if test $linkmode = oldlib && test $linkmode = obj; then
     1420          if test "$linkmode" = oldlib && test "$linkmode" = obj; then
    14141421            $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
    14151422            continue
    14161423          fi
    1417           if test $pass = conv; then
     1424          if test "$pass" = conv; then
    14181425            deplibs="$deplib $deplibs"
    14191426            continue
    14201427          fi
     
    14341441              finalize_deplibs="$deplib $finalize_deplibs"
    14351442            else
    14361443              deplibs="$deplib $deplibs"
    1437               test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
     1444              test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
    14381445            fi
    14391446            continue
    14401447          fi
     
    14431450          case $linkmode in
    14441451          lib)
    14451452            deplibs="$deplib $deplibs"
    1446             test $pass = conv && continue
     1453            test "$pass" = conv && continue
    14471454            newdependency_libs="$deplib $newdependency_libs"
    14481455            newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
    14491456            ;;
    14501457          prog)
    1451             if test $pass = conv; then
     1458            if test "$pass" = conv; then
    14521459              deplibs="$deplib $deplibs"
    14531460              continue
    14541461            fi
    1455             if test $pass = scan; then
     1462            if test "$pass" = scan; then
    14561463              deplibs="$deplib $deplibs"
    14571464              newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
    14581465            else
     
    14671474          continue
    14681475          ;; # -L
    14691476        -R*)
    1470           if test $pass = link; then
     1477          if test "$pass" = link; then
    14711478            dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
    14721479            # Make sure the xrpath contains only unique directories.
    14731480            case "$xrpath " in
     
    14801487          ;;
    14811488        *.la) lib="$deplib" ;;
    14821489        *.$libext)
    1483           if test $pass = conv; then
     1490          if test "$pass" = conv; then
    14841491            deplibs="$deplib $deplibs"
    14851492            continue
    14861493          fi
     
    14881495          lib)
    14891496            if test "$deplibs_check_method" != pass_all; then
    14901497              echo
    1491               echo "*** Warning: Trying to link with static lib archive $deplib."
     1498              echo "*** Warning: This library needs some functionality provided by $deplib."
    14921499              echo "*** I have the capability to make that library automatically link in when"
    14931500              echo "*** you link to this library.  But I can only do this if you have a"
    1494               echo "*** shared version of the library, which you do not appear to have"
    1495               echo "*** because the file extensions .$libext of this argument makes me believe"
    1496               echo "*** that it is just a static archive that I should not used here."
     1501              echo "*** shared version of the library, which you do not appear to have."
    14971502            else
    14981503              echo
    14991504              echo "*** Warning: Linking the shared library $output against the"
     
    15031508            continue
    15041509            ;;
    15051510          prog)
    1506             if test $pass != link; then
     1511            if test "$pass" != link; then
    15071512              deplibs="$deplib $deplibs"
    15081513            else
    15091514              compile_deplibs="$deplib $compile_deplibs"
     
    15141519          esac # linkmode
    15151520          ;; # *.$libext
    15161521        *.lo | *.$objext)
    1517           if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
     1522          if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
    15181523            # If there is no dlopen support or we're linking statically,
    15191524            # we need to preload.
    15201525            newdlprefiles="$newdlprefiles $deplib"
     
    15301535          continue
    15311536          ;;
    15321537        esac # case $deplib
    1533         if test $found = yes || test -f "$lib"; then :
     1538        if test "$found" = yes || test -f "$lib"; then :
    15341539        else
    15351540          $echo "$modename: cannot find the library \`$lib'" 1>&2
    15361541          exit 1
    15371542        fi
    15381543
    15391544        # Check to see that this really is a libtool archive.
    1540         if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
     1545        if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
    15411546        else
    15421547          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    15431548          exit 1
     
    15641569
    15651570        if test "$linkmode,$pass" = "lib,link" ||
    15661571           test "$linkmode,$pass" = "prog,scan" ||
    1567            { test $linkmode = oldlib && test $linkmode = obj; }; then
     1572           { test "$linkmode" = oldlib && test "$linkmode" = obj; }; then
    15681573           # Add dl[pre]opened files of deplib
    15691574          test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
    15701575          test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
    15711576        fi
    15721577
    1573         if test $pass = conv; then
     1578        if test "$pass" = conv; then
    15741579          # Only check for convenience libraries
    15751580          deplibs="$lib $deplibs"
    15761581          if test -z "$libdir"; then
     
    15911596              fi
    15921597              tmp_libs="$tmp_libs $deplib"
    15931598            done
    1594           elif test $linkmode != prog && test $linkmode != lib; then
     1599          elif test "$linkmode" != prog && test "$linkmode" != lib; then
    15951600            $echo "$modename: \`$lib' is not a convenience library" 1>&2
    15961601            exit 1
    15971602          fi
     
    16091614        fi
    16101615
    16111616        # This library was specified with -dlopen.
    1612         if test $pass = dlopen; then
     1617        if test "$pass" = dlopen; then
    16131618          if test -z "$libdir"; then
    16141619            $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
    16151620            exit 1
     
    16581663        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
    16591664
    16601665        # This library was specified with -dlpreopen.
    1661         if test $pass = dlpreopen; then
     1666        if test "$pass" = dlpreopen; then
    16621667          if test -z "$libdir"; then
    16631668            $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
    16641669            exit 1
     
    16771682
    16781683        if test -z "$libdir"; then
    16791684          # Link the convenience library
    1680           if test $linkmode = lib; then
     1685          if test "$linkmode" = lib; then
    16811686            deplibs="$dir/$old_library $deplibs"
    16821687          elif test "$linkmode,$pass" = "prog,link"; then
    16831688            compile_deplibs="$dir/$old_library $compile_deplibs"
     
    16881693          continue
    16891694        fi
    16901695
    1691         if test $linkmode = prog && test $pass != link; then
     1696        if test "$linkmode" = prog && test "$pass" != link; then
    16921697          newlib_search_path="$newlib_search_path $ladir"
    16931698          deplibs="$lib $deplibs"
    16941699
     
    17041709            -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
    17051710            esac
    17061711            # Need to link against all dependency_libs?
    1707             if test $linkalldeplibs = yes; then
     1712            if test "$linkalldeplibs" = yes; then
    17081713              deplibs="$deplib $deplibs"
    17091714            else
    17101715              # Need to hardcode shared library paths
     
    17271732          # Link against this shared library
    17281733
    17291734          if test "$linkmode,$pass" = "prog,link" ||
    1730            { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
     1735           { test "$linkmode" = lib && test "$hardcode_into_libs" = yes; }; then
    17311736            # Hardcode the library path.
    17321737            # Skip directories that are in the system default run-time
    17331738            # search path.
     
    17491754              esac
    17501755              ;;
    17511756            esac
    1752             if test $linkmode = prog; then
     1757            if test "$linkmode" = prog; then
    17531758              # We need to hardcode the library path
    17541759              if test -n "$shlibpath_var"; then
    17551760                # Make sure the rpath contains only unique directories.
     
    17991804
    18001805            # Make a new name for the extract_expsyms_cmds to use
    18011806            soroot="$soname"
    1802             soname=`echo $soroot | ${SED} -e 's/^.*\///'`
    1803             newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
     1807            soname=`echo $soroot | sed -e 's/^.*\///'`
     1808            newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
    18041809
    18051810            # If the library has no export list, then create one now
    18061811            if test -f "$output_objdir/$soname-def"; then :
     
    18311836            # make sure the library variables are pointing to the new library
    18321837            dir=$output_objdir
    18331838            linklib=$newlib
    1834           fi # test -n $old_archive_from_expsyms_cmds
     1839          fi # test -n "$old_archive_from_expsyms_cmds"
    18351840
    1836           if test $linkmode = prog || test "$mode" != relink; then
     1841          if test "$linkmode" = prog || test "$mode" != relink; then
    18371842            add_shlibpath=
    18381843            add_dir=
    18391844            add=
     
    18821887              *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
    18831888              esac
    18841889            fi
    1885             if test $linkmode = prog; then
     1890            if test "$linkmode" = prog; then
    18861891              test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
    18871892              test -n "$add" && compile_deplibs="$add $compile_deplibs"
    18881893            else
     
    18991904            fi
    19001905          fi
    19011906
    1902           if test $linkmode = prog || test "$mode" = relink; then
     1907          if test "$linkmode" = prog || test "$mode" = relink; then
    19031908            add_shlibpath=
    19041909            add_dir=
    19051910            add=
     
    19071912            if test "$hardcode_direct" = yes; then
    19081913              add="$libdir/$linklib"
    19091914            elif test "$hardcode_minus_L" = yes; then
    1910               add_dir="-L$libdir"
     1915              # Try looking first in the location we're being installed to.
     1916              add_dir=
     1917              if test -n "$inst_prefix_dir"; then
     1918                case "$libdir" in
     1919                [\\/]*)
     1920                  add_dir="-L$inst_prefix_dir$libdir"
     1921                  ;;
     1922                esac
     1923              fi
     1924              add_dir="$add_dir -L$libdir"
    19111925              add="-l$name"
    19121926            elif test "$hardcode_shlibpath_var" = yes; then
    19131927              case :$finalize_shlibpath: in
     
    19171931              add="-l$name"
    19181932            else
    19191933              # We cannot seem to hardcode it, guess we'll fake it.
    1920               add_dir="-L$libdir"
     1934              # Try looking first in the location we're being installed to.
     1935              add_dir=
     1936              if test -n "$inst_prefix_dir"; then
     1937                case "$libdir" in
     1938                [\\/]*)
     1939                  add_dir="-L$inst_prefix_dir$libdir"
     1940                  ;;
     1941                esac
     1942              fi
     1943              add_dir="$add_dir -L$libdir"
    19211944              add="-l$name"
    19221945            fi
    19231946
    1924             if test $linkmode = prog; then
     1947            if test "$linkmode" = prog; then
    19251948              test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
    19261949              test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
    19271950            else
     
    19291952              test -n "$add" && deplibs="$add $deplibs"
    19301953            fi
    19311954          fi
    1932         elif test $linkmode = prog; then
     1955        elif test "$linkmode" = prog; then
    19331956          if test "$alldeplibs" = yes &&
    19341957             { test "$deplibs_check_method" = pass_all ||
    19351958               { test "$build_libtool_libs" = yes &&
     
    19591982            # Just print a warning and add the library to dependency_libs so
    19601983            # that the program can be linked against the static library.
    19611984            echo
    1962             echo "*** Warning: This system can not link to static lib archive $lib."
     1985            echo "*** Warning: This library needs some functionality provided by $lib."
    19631986            echo "*** I have the capability to make that library automatically link in when"
    19641987            echo "*** you link to this library.  But I can only do this if you have a"
    19651988            echo "*** shared version of the library, which you do not appear to have."
    19661989            if test "$module" = yes; then
    1967               echo "*** But as you try to build a module library, libtool will still create "
    1968               echo "*** a static module, that should work as long as the dlopening application"
    1969               echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
     1990              echo "*** Therefore, libtool will create a static module, that should work "
     1991              echo "*** as long as the dlopening application is linked with the -dlopen flag."
    19701992              if test -z "$global_symbol_pipe"; then
    19711993                echo
    19721994                echo "*** However, this would only work if libtool was able to extract symbol"
     
    19892011          fi
    19902012        fi # link shared/static library?
    19912013
    1992         if test $linkmode = lib; then
     2014        if test "$linkmode" = lib; then
    19932015          if test -n "$dependency_libs" &&
    1994              { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
    1995                test $link_static = yes; }; then
     2016             { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
     2017               test "$link_static" = yes; }; then
    19962018            # Extract -R from dependency_libs
    19972019            temp_deplibs=
    19982020            for libdir in $dependency_libs; do
     
    20232045            tmp_libs="$tmp_libs $deplib"
    20242046          done
    20252047
    2026           if test $link_all_deplibs != no; then
     2048          if test "$link_all_deplibs" != no; then
    20272049            # Add the search paths of all dependency libraries
    20282050            for deplib in $dependency_libs; do
    20292051              case $deplib in
     
    20452067                if grep "^installed=no" $deplib > /dev/null; then
    20462068                  path="-L$absdir/$objdir"
    20472069                else
    2048                   eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
     2070                  eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
    20492071                  if test -z "$libdir"; then
    20502072                    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
    20512073                    exit 1
     
    20662088          fi # link_all_deplibs != no
    20672089        fi # linkmode = lib
    20682090      done # for deplib in $libs
    2069       if test $pass = dlpreopen; then
     2091      if test "$pass" = dlpreopen; then
    20702092        # Link the dlpreopened libraries before other libraries
    20712093        for deplib in $save_deplibs; do
    20722094          deplibs="$deplib $deplibs"
    20732095        done
    20742096      fi
    2075       if test $pass != dlopen; then
    2076         test $pass != scan && dependency_libs="$newdependency_libs"
    2077         if test $pass != conv; then
     2097      if test "$pass" != dlopen; then
     2098        test "$pass" != scan && dependency_libs="$newdependency_libs"
     2099        if test "$pass" != conv; then
    20782100          # Make sure lib_search_path contains only unique directories.
    20792101          lib_search_path=
    20802102          for dir in $newlib_search_path; do
     
    21322154        deplibs=
    21332155      fi
    21342156    done # for pass
    2135     if test $linkmode = prog; then
     2157    if test "$linkmode" = prog; then
    21362158      dlfiles="$newdlfiles"
    21372159      dlprefiles="$newdlprefiles"
    21382160    fi
     
    22092231      fi
    22102232
    22112233      set dummy $rpath
    2212       if test $# -gt 2; then
     2234      if test "$#" -gt 2; then
    22132235        $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
    22142236      fi
    22152237      install_libdir="$2"
     
    22502272
    22512273        # Check that each of the things are valid numbers.
    22522274        case $current in
    2253         0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
     2275        [0-9]*) ;;
    22542276        *)
    22552277          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
    22562278          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
     
    22592281        esac
    22602282
    22612283        case $revision in
    2262         0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
     2284        [0-9]*) ;;
    22632285        *)
    22642286          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
    22652287          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
     
    22682290        esac
    22692291
    22702292        case $age in
    2271         0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
     2293        [0-9]*) ;;
    22722294        *)
    22732295          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
    22742296          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
     
    22762298          ;;
    22772299        esac
    22782300
    2279         if test $age -gt $current; then
     2301        if test "$age" -gt "$current"; then
    22802302          $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
    22812303          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    22822304          exit 1
     
    23092331          versuffix=".$current";
    23102332          ;;
    23112333
    2312         irix | nonstopux)
     2334        irix)
    23132335          major=`expr $current - $age + 1`
    2314 
    2315           case $version_type in
    2316             nonstopux) verstring_prefix=nonstopux ;;
    2317             *)         verstring_prefix=sgi ;;
    2318           esac
    2319           verstring="$verstring_prefix$major.$revision"
     2336          verstring="sgi$major.$revision"
    23202337
    23212338          # Add in all the interfaces that we are compatible with.
    23222339          loop=$revision
    2323           while test $loop != 0; do
     2340          while test "$loop" -ne 0; do
    23242341            iface=`expr $revision - $loop`
    23252342            loop=`expr $loop - 1`
    2326             verstring="$verstring_prefix$major.$iface:$verstring"
     2343            verstring="sgi$major.$iface:$verstring"
    23272344          done
    23282345
    23292346          # Before this point, $major must not contain `.'.
     
    23372354          ;;
    23382355
    23392356        osf)
    2340           major=.`expr $current - $age`
     2357          major=`expr $current - $age`
    23412358          versuffix=".$current.$age.$revision"
    23422359          verstring="$current.$age.$revision"
    23432360
    23442361          # Add in all the interfaces that we are compatible with.
    23452362          loop=$age
    2346           while test $loop != 0; do
     2363          while test "$loop" -ne 0; do
    23472364            iface=`expr $current - $loop`
    23482365            loop=`expr $loop - 1`
    23492366            verstring="$verstring:${iface}.0"
     
    24292446
    24302447      # Eliminate all temporary directories.
    24312448      for path in $notinst_path; do
    2432         lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
    2433         deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
    2434         dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
     2449        lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
     2450        deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
     2451        dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
    24352452      done
    24362453
    24372454      if test -n "$xrpath"; then
     
    24442461          *) finalize_rpath="$finalize_rpath $libdir" ;;
    24452462          esac
    24462463        done
    2447         if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
     2464        if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
    24482465          dependency_libs="$temp_xrpath $dependency_libs"
    24492466        fi
    24502467      fi
     
    24822499          *-*-netbsd*)
    24832500            # Don't link with libc until the a.out ld.so is fixed.
    24842501            ;;
    2485           *-*-openbsd* | *-*-freebsd*)
     2502          *-*-openbsd*)
    24862503            # Do not include libc due to us having libc/libc_r.
    24872504            ;;
    24882505          *)
    24892506            # Add libc to deplibs on all other systems if necessary.
    2490             if test $build_libtool_need_lc = "yes"; then
     2507            if test "$build_libtool_need_lc" = "yes"; then
    24912508              deplibs="$deplibs -lc"
    24922509            fi
    24932510            ;;
     
    25282545EOF
    25292546          $rm conftest
    25302547          $CC -o conftest conftest.c $deplibs
    2531           if test $? -eq 0 ; then
     2548          if test "$?" -eq 0 ; then
    25322549            ldd_output=`ldd conftest`
    25332550            for i in $deplibs; do
    25342551              name="`expr $i : '-l\(.*\)'`"
     
    25432560                else
    25442561                  droppeddeps=yes
    25452562                  echo
    2546                   echo "*** Warning: dynamic linker does not accept needed library $i."
     2563                  echo "*** Warning: This library needs some functionality provided by $i."
    25472564                  echo "*** I have the capability to make that library automatically link in when"
    25482565                  echo "*** you link to this library.  But I can only do this if you have a"
    2549                   echo "*** shared version of the library, which I believe you do not have"
    2550                   echo "*** because a test_compile did reveal that the linker did not use it for"
    2551                   echo "*** its dynamic dependency list that programs get resolved with at runtime."
     2566                  echo "*** shared version of the library, which you do not appear to have."
    25522567                fi
    25532568              else
    25542569                newdeplibs="$newdeplibs $i"
    25552570              fi
    25562571            done
    25572572          else
    2558             # Error occured in the first compile.  Let's try to salvage
    2559             # the situation: Compile a separate program for each library.
     2573            # Error occured in the first compile.  Let's try to salvage the situation:
     2574            # Compile a seperate program for each library.
    25602575            for i in $deplibs; do
    25612576              name="`expr $i : '-l\(.*\)'`"
    25622577             # If $name is empty we are operating on a -L argument.
     
    25642579                $rm conftest
    25652580                $CC -o conftest conftest.c $i
    25662581                # Did it work?
    2567                 if test $? -eq 0 ; then
     2582                if test "$?" -eq 0 ; then
    25682583                  ldd_output=`ldd conftest`
    25692584                  libname=`eval \\$echo \"$libname_spec\"`
    25702585                  deplib_matches=`eval \\$echo \"$library_names_spec\"`
     
    25752590                  else
    25762591                    droppeddeps=yes
    25772592                    echo
    2578                     echo "*** Warning: dynamic linker does not accept needed library $i."
     2593                    echo "*** Warning: This library needs some functionality provided by $i."
    25792594                    echo "*** I have the capability to make that library automatically link in when"
    25802595                    echo "*** you link to this library.  But I can only do this if you have a"
    2581                     echo "*** shared version of the library, which you do not appear to have"
    2582                     echo "*** because a test_compile did reveal that the linker did not use this one"
    2583                     echo "*** as a dynamic dependency that programs can get resolved with at runtime."
     2596                    echo "*** shared version of the library, which you do not appear to have."
    25842597                  fi
    25852598                else
    25862599                  droppeddeps=yes
     
    26192632                      # but so what?
    26202633                      potlib="$potent_lib"
    26212634                      while test -h "$potlib" 2>/dev/null; do
    2622                         potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
     2635                        potliblink=`ls -ld $potlib | sed 's/.* -> //'`
    26232636                        case $potliblink in
    26242637                        [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
    26252638                        *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
    26262639                        esac
    26272640                      done
    2628                       # It is ok to link against an archive when
    2629                       # building a shared library.
    2630                       if $AR -t $potlib > /dev/null 2>&1; then
    2631                         newdeplibs="$newdeplibs $a_deplib"
    2632                         a_deplib=""
    2633                         break 2
    2634                       fi
    26352641                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
    2636                          | ${SED} 10q \
     2642                         | sed 10q \
    26372643                         | egrep "$file_magic_regex" > /dev/null; then
    26382644                        newdeplibs="$newdeplibs $a_deplib"
    26392645                        a_deplib=""
     
    26442650              if test -n "$a_deplib" ; then
    26452651                droppeddeps=yes
    26462652                echo
    2647                 echo "*** Warning: linker path does not have real file for library $a_deplib."
     2653                echo "*** Warning: This library needs some functionality provided by $a_deplib."
    26482654                echo "*** I have the capability to make that library automatically link in when"
    26492655                echo "*** you link to this library.  But I can only do this if you have a"
    2650                 echo "*** shared version of the library, which you do not appear to have"
    2651                 echo "*** because I did check the linker path looking for a file starting"
    2652                 if test -z "$potlib" ; then
    2653                   echo "*** with $libname but no candidates were found. (...for file magic test)"
    2654                 else
    2655                   echo "*** with $libname and none of the candidates passed a file format test"
    2656                   echo "*** using a file magic. Last file checked: $potlib"
    2657                 fi
     2656                echo "*** shared version of the library, which you do not appear to have."
    26582657              fi
    26592658            else
    26602659              # Add a -L argument.
     
    26732672              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
    26742673                potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
    26752674                for potent_lib in $potential_libs; do
    2676                   potlib="$potent_lib" # see symlink-check below in file_magic test
    26772675                  if eval echo \"$potent_lib\" 2>/dev/null \
    2678                       | ${SED} 10q \
     2676                      | sed 10q \
    26792677                      | egrep "$match_pattern_regex" > /dev/null; then
    26802678                    newdeplibs="$newdeplibs $a_deplib"
    26812679                    a_deplib=""
     
    26862684              if test -n "$a_deplib" ; then
    26872685                droppeddeps=yes
    26882686                echo
    2689                 echo "*** Warning: linker path does not have real file for library $a_deplib."
     2687                echo "*** Warning: This library needs some functionality provided by $a_deplib."
    26902688                echo "*** I have the capability to make that library automatically link in when"
    26912689                echo "*** you link to this library.  But I can only do this if you have a"
    2692                 echo "*** shared version of the library, which you do not appear to have"
    2693                 echo "*** because I did check the linker path looking for a file starting"
    2694                 if test -z "$potlib" ; then
    2695                   echo "*** with $libname but no candidates were found. (...for regex pattern test)"
    2696                 else
    2697                   echo "*** with $libname and none of the candidates passed a file format test"
    2698                   echo "*** using a regex pattern. Last file checked: $potlib"
    2699                 fi
     2690                echo "*** shared version of the library, which you do not appear to have."
    27002691              fi
    27012692            else
    27022693              # Add a -L argument.
     
    27592750            echo "*** automatically added whenever a program is linked with this library"
    27602751            echo "*** or is declared to -dlopen it."
    27612752
    2762             if test $allow_undefined = no; then
     2753            if test "$allow_undefined" = no; then
    27632754              echo
    27642755              echo "*** Since this library must not contain undefined symbols,"
    27652756              echo "*** because either the platform does not support them or"
     
    27862777
    27872778      # Test again, we may have decided not to build it any more
    27882779      if test "$build_libtool_libs" = yes; then
    2789         if test $hardcode_into_libs = yes; then
     2780        if test "$hardcode_into_libs" = yes; then
    27902781          # Hardcode the library paths
    27912782          hardcode_libdirs=
    27922783          dep_rpath=
     
    29172908            $show "mkdir $gentop"
    29182909            $run mkdir "$gentop"
    29192910            status=$?
    2920             if test $status -ne 0 && test ! -d "$gentop"; then
     2911            if test "$status" -ne 0 && test ! -d "$gentop"; then
    29212912              exit $status
    29222913            fi
    29232914            generated="$generated $gentop"
     
    29362927              $show "mkdir $xdir"
    29372928              $run mkdir "$xdir"
    29382929              status=$?
    2939               if test $status -ne 0 && test ! -d "$xdir"; then
     2930              if test "$status" -ne 0 && test ! -d "$xdir"; then
    29402931                exit $status
    29412932              fi
    29422933              $show "(cd $xdir && $AR x $xabs)"
     
    29612952        if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
    29622953          eval cmds=\"$archive_expsym_cmds\"
    29632954        else
    2964           save_deplibs="$deplibs"
    2965           for conv in $convenience; do
    2966             tmp_deplibs=
    2967             for test_deplib in $deplibs; do
    2968               if test "$test_deplib" != "$conv"; then
    2969                 tmp_deplibs="$tmp_deplibs $test_deplib"
    2970               fi
    2971             done
    2972             deplibs="$tmp_deplibs"
    2973           done
    29742955          eval cmds=\"$archive_cmds\"
    2975           deplibs="$save_deplibs"
    29762956        fi
    29772957        save_ifs="$IFS"; IFS='~'
    29782958        for cmd in $cmds; do
     
    30673047          $show "mkdir $gentop"
    30683048          $run mkdir "$gentop"
    30693049          status=$?
    3070           if test $status -ne 0 && test ! -d "$gentop"; then
     3050          if test "$status" -ne 0 && test ! -d "$gentop"; then
    30713051            exit $status
    30723052          fi
    30733053          generated="$generated $gentop"
     
    30863066            $show "mkdir $xdir"
    30873067            $run mkdir "$xdir"
    30883068            status=$?
    3089             if test $status -ne 0 && test ! -d "$xdir"; then
     3069            if test "$status" -ne 0 && test ! -d "$xdir"; then
    30903070              exit $status
    30913071            fi
    30923072            $show "(cd $xdir && $AR x $xabs)"
     
    31713151
    31723152    prog)
    31733153      case $host in
    3174         *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
     3154        *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
    31753155      esac
    31763156      if test -n "$vinfo"; then
    31773157        $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
     
    31933173        # On Rhapsody replace the C library is the System framework
    31943174        compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
    31953175        finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
    3196         case $host in
    3197         *darwin*)
    3198           # Don't allow lazy linking, it breaks C++ global constructors
    3199           compile_command="$compile_command ${wl}-bind_at_load"
    3200           finalize_command="$finalize_command ${wl}-bind_at_load"
    3201           ;;
    3202         esac
    32033176        ;;
    32043177      esac
    32053178
     
    33663339            if test -z "$export_symbols"; then
    33673340              export_symbols="$output_objdir/$output.exp"
    33683341              $run $rm $export_symbols
    3369               $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
     3342              $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
    33703343            else
    3371               $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
     3344              $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
    33723345              $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
    33733346              $run eval 'mv "$nlist"T "$nlist"'
    33743347            fi
     
    33763349
    33773350          for arg in $dlprefiles; do
    33783351            $show "extracting global C symbols from \`$arg'"
    3379             name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
     3352            name=`echo "$arg" | sed -e 's%^.*/%%'`
    33803353            $run eval 'echo ": $name " >> "$nlist"'
    33813354            $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
    33823355          done
     
    33913364            fi
    33923365
    33933366            # Try sorting and uniquifying the output.
    3394             if grep -v "^: " < "$nlist" |
    3395                 if sort -k 3 </dev/null >/dev/null 2>&1; then
    3396                   sort -k 3
    3397                 else
    3398                   sort +2
    3399                 fi |
    3400                 uniq > "$nlist"S; then
     3367            if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
    34013368              :
    34023369            else
    34033370              grep -v "^: " < "$nlist" > "$nlist"S
     
    34943461        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
    34953462      fi
    34963463
    3497       if test $need_relink = no || test "$build_libtool_libs" != yes; then
     3464      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
    34983465        # Replace the output file specification.
    34993466        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
    35003467        link_command="$compile_command$compile_rpath"
     
    36393606        # win32 will think the script is a binary if it has
    36403607        # a .exe suffix, so we strip it off here.
    36413608        case $output in
    3642           *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
     3609          *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
    36433610        esac
    36443611        # test for cygwin because mv fails w/o .exe extensions
    36453612        case $host in
     
    36633630
    36643631# Sed substitution that helps us do robust quoting.  It backslashifies
    36653632# metacharacters that are still active within double-quoted strings.
    3666 Xsed="${SED}"' -e 1s/^X//'
     3633Xsed='sed -e 1s/^X//'
    36673634sed_quote_subst='$sed_quote_subst'
    36683635
    36693636# The HP-UX ksh and POSIX shell print the target directory to stdout
     
    37013668  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
    37023669
    37033670  # Follow symbolic links until we get to the real thisdir.
    3704   file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
     3671  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
    37053672  while test -n \"\$file\"; do
    37063673    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
    37073674
     
    37143681    fi
    37153682
    37163683    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
    3717     file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
     3684    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
    37183685  done
    37193686
    37203687  # Try to get the absolute directory name.
     
    37283695  progdir=\"\$thisdir/$objdir\"
    37293696
    37303697  if test ! -f \"\$progdir/\$program\" || \\
    3731      { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
     3698     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
    37323699       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
    37333700
    37343701    file=\"\$\$-\$program\"
     
    37743741    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
    37753742
    37763743    # Some systems cannot cope with colon-terminated $shlibpath_var
    3777     # The second colon is a workaround for a bug in BeOS R4 ${SED}
     3744    # The second colon is a workaround for a bug in BeOS R4 sed
    37783745    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
    37793746
    37803747    export $shlibpath_var
     
    38623829        $show "mkdir $gentop"
    38633830        $run mkdir "$gentop"
    38643831        status=$?
    3865         if test $status -ne 0 && test ! -d "$gentop"; then
     3832        if test "$status" -ne 0 && test ! -d "$gentop"; then
    38663833          exit $status
    38673834        fi
    38683835        generated="$generated $gentop"
     
    38823849          $show "mkdir $xdir"
    38833850          $run mkdir "$xdir"
    38843851          status=$?
    3885           if test $status -ne 0 && test ! -d "$xdir"; then
     3852          if test "$status" -ne 0 && test ! -d "$xdir"; then
    38863853            exit $status
    38873854          fi
    38883855          $show "(cd $xdir && $AR x $xabs)"
     
    39493916        fi
    39503917      done
    39513918      # Quote the link command for shipping.
    3952       relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
     3919      relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
    39533920      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
    39543921
    39553922      # Only create the output if not a dry run.
     
    39663933              case $deplib in
    39673934              *.la)
    39683935                name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
    3969                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
     3936                eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
    39703937                if test -z "$libdir"; then
    39713938                  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
    39723939                  exit 1
    39733940                fi
    3974                 # We do not want portage's install root ($D) present.  Check only for
    3975                 # this if the .la is being installed.
    3976                 if test "$installed" = yes && test "$D"; then
    3977                   eval mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`"
    3978                 else
    3979                   mynewdependency_lib="$libdir/$name"
    3980                 fi
    3981                 # Do not add duplicates
    3982                 if test "$mynewdependency_lib"; then
    3983                   if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
    3984                     newdependency_libs="$newdependency_libs $mynewdependency_lib"
    3985                   fi
    3986                 fi
    3987                 ;;
    3988                   *)
    3989                 if test "$installed" = yes; then
    3990           # Rather use S=WORKDIR if our version of portage supports it.
    3991           # This is because some ebuild (gcc) do not use $S as buildroot.
    3992                   if test "$PWORKDIR"; then
    3993                     S="$PWORKDIR"
    3994                   fi
    3995                   # We do not want portage's build root ($S) present.
    3996                   if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then
    3997                     mynewdependency_lib=""
    3998                   # We do not want portage's install root ($D) present.
    3999                   elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then
    4000                     eval mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`"
    4001                   else
    4002                     mynewdependency_lib="$deplib"
    4003                   fi
    4004                 else
    4005                   mynewdependency_lib="$deplib"
    4006                 fi
    4007                 # Do not add duplicates
    4008                 if test "$mynewdependency_lib"; then
    4009                   if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
    4010                         newdependency_libs="$newdependency_libs $mynewdependency_lib"
    4011                   fi
    4012                 fi
     3941                newdependency_libs="$newdependency_libs $libdir/$name"
    40133942                ;;
     3943              *) newdependency_libs="$newdependency_libs $deplib" ;;
    40143944              esac
    40153945            done
    40163946            dependency_libs="$newdependency_libs"
    40173947            newdlfiles=
    40183948            for lib in $dlfiles; do
    40193949              name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
    4020               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
     3950              eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
    40213951              if test -z "$libdir"; then
    40223952                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    40233953                exit 1
     
    40283958            newdlprefiles=
    40293959            for lib in $dlprefiles; do
    40303960              name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
    4031               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
     3961              eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
    40323962              if test -z "$libdir"; then
    40333963                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    40343964                exit 1
     
    40433973          case $host,$output,$installed,$module,$dlname in
    40443974            *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
    40453975          esac
    4046           # Do not add duplicates
    4047           if test "$installed" = yes && test "$D"; then
    4048             install_libdir="`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'`"
    4049           fi
    40503976          $echo > $output "\
    40513977# $outputname - a libtool library file
    40523978# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
     
    40804006
    40814007# Directory that this library needs to be installed in:
    40824008libdir='$install_libdir'"
    4083           if test "$installed" = no && test $need_relink = yes; then
     4009          if test "$installed" = no && test "$need_relink" = yes; then
    40844010            $echo >> $output "\
    40854011relink_command=\"$relink_command\""
    40864012          fi
     
    42164142
    42174143      # Not a directory, so check to see that there is only one file specified.
    42184144      set dummy $files
    4219       if test $# -gt 2; then
     4145      if test "$#" -gt 2; then
    42204146        $echo "$modename: \`$dest' is not a directory" 1>&2
    42214147        $echo "$help" 1>&2
    42224148        exit 1
     
    42564182
    42574183      *.la)
    42584184        # Check to see that this really is a libtool archive.
    4259         if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
     4185        if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
    42604186        else
    42614187          $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
    42624188          $echo "$help" 1>&2
     
    42914217        dir="$dir$objdir"
    42924218
    42934219        if test -n "$relink_command"; then
     4220          # Determine the prefix the user has applied to our future dir.
     4221          inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
     4222
     4223          # Don't allow the user to place us outside of our expected
     4224          # location b/c this prevents finding dependent libraries that
     4225          # are installed to the same prefix.
     4226          if test "$inst_prefix_dir" = "$destdir"; then
     4227            $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
     4228            exit 1
     4229          fi
     4230
     4231          if test -n "$inst_prefix_dir"; then
     4232            # Stick the inst_prefix_dir data into the link command.
     4233            relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
     4234          else
     4235            relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
     4236          fi
     4237
    42944238          $echo "$modename: warning: relinking \`$file'" 1>&2
    42954239          $show "$relink_command"
    42964240          if $run eval "$relink_command"; then :
    42974241          else
    42984242            $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
    4299             continue
     4243            exit 1
    43004244          fi
    43014245        fi
    43024246
     
    43184262            $run eval "$striplib $destdir/$realname" || exit $?
    43194263          fi
    43204264
    4321           if test $# -gt 0; then
     4265          if test "$#" -gt 0; then
    43224266            # Delete the old symlinks, and create new ones.
    43234267            for linkname
    43244268            do
     
    44054349        fi
    44064350
    44074351        # Do a test to see if this is really a libtool program.
    4408         case $host in
    4409         *cygwin*|*mingw*)
    4410             wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
    4411             ;;
    4412         *)
    4413             wrapper=$file
    4414             ;;
    4415         esac
    4416         if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
     4352        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    44174353          notinst_deplibs=
    44184354          relink_command=
    44194355
    44204356          # If there is no directory component, then add one.
    44214357          case $file in
    4422           */* | *\\*) . $wrapper ;;
    4423           *) . ./$wrapper ;;
     4358          */* | *\\*) . $file ;;
     4359          *) . ./$file ;;
    44244360          esac
    44254361
    44264362          # Check the variables that should have been set.
    44274363          if test -z "$notinst_deplibs"; then
    4428             $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
     4364            $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
    44294365            exit 1
    44304366          fi
    44314367
     
    44504386          relink_command=
    44514387          # If there is no directory component, then add one.
    44524388          case $file in
    4453           */* | *\\*) . $wrapper ;;
    4454           *) . ./$wrapper ;;
     4389          */* | *\\*) . $file ;;
     4390          *) . ./$file ;;
    44554391          esac
    44564392
    44574393          outputname=
     
    44594395            if test "$finalize" = yes && test -z "$run"; then
    44604396              tmpdir="/tmp"
    44614397              test -n "$TMPDIR" && tmpdir="$TMPDIR"
    4462               tmpdir="$tmpdir/libtool-$$"
     4398              tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`
     4399              if test $? = 0 ; then :
     4400              else
     4401                tmpdir="$tmpdir/libtool-$$"
     4402              fi
    44634403              if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
    44644404              else
    44654405                $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
     
    44994439            destfile=$destfile.exe
    45004440            ;;
    45014441          *:*.exe)
    4502             destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
     4442            destfile=`echo $destfile | sed -e 's,.exe$,,'`
    45034443            ;;
    45044444          esac
    45054445          ;;
     
    45844524    fi
    45854525
    45864526    # Exit here if they wanted silent mode.
    4587     test "$show" = ":" && exit 0
     4527    test "$show" = : && exit 0
    45884528
    45894529    echo "----------------------------------------------------------------------"
    45904530    echo "Libraries have been installed in:"
     
    46474587      case $file in
    46484588      *.la)
    46494589        # Check to see that this really is a libtool archive.
    4650         if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
     4590        if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
    46514591        else
    46524592          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    46534593          $echo "$help" 1>&2
     
    47184658      -*) ;;
    47194659      *)
    47204660        # Do a test to see if this is really a libtool program.
    4721         if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
     4661        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    47224662          # If there is no directory component, then add one.
    47234663          case $file in
    47244664          */* | *\\*) . $file ;;
     
    48004740        objdir="$dir/$objdir"
    48014741      fi
    48024742      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
    4803       test $mode = uninstall && objdir="$dir"
     4743      test "$mode" = uninstall && objdir="$dir"
    48044744
    48054745      # Remember objdir for removal later, being careful to avoid duplicates
    4806       if test $mode = clean; then
     4746      if test "$mode" = clean; then
    48074747        case " $rmdirs " in
    48084748          *" $objdir "*) ;;
    48094749          *) rmdirs="$rmdirs $objdir" ;;
     
    48274767      case $name in
    48284768      *.la)
    48294769        # Possibly a libtool archive, so verify it.
    4830         if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
     4770        if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    48314771          . $dir/$name
    48324772
    48334773          # Delete the libtool libraries and symlinks.
     
    48354775            rmfiles="$rmfiles $objdir/$n"
    48364776          done
    48374777          test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
    4838           test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
     4778          test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
    48394779
    4840           if test $mode = uninstall; then
     4780          if test "$mode" = uninstall; then
    48414781            if test -n "$library_names"; then
    48424782              # Do each command in the postuninstall commands.
    48434783              eval cmds=\"$postuninstall_cmds\"
     
    48464786                IFS="$save_ifs"
    48474787                $show "$cmd"
    48484788                $run eval "$cmd"
    4849                 if test $? != 0 && test "$rmforce" != yes; then
     4789                if test "$?" -ne 0 && test "$rmforce" != yes; then
    48504790                  exit_status=1
    48514791                fi
    48524792              done
     
    48614801                IFS="$save_ifs"
    48624802                $show "$cmd"
    48634803                $run eval "$cmd"
    4864                 if test $? != 0 && test "$rmforce" != yes; then
     4804                if test "$?" -ne 0 && test "$rmforce" != yes; then
    48654805                  exit_status=1
    48664806                fi
    48674807              done
     
    48814821
    48824822      *)
    48834823        # Do a test to see if this is a libtool program.
    4884         if test $mode = clean &&
    4885            (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
     4824        if test "$mode" = clean &&
     4825           (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    48864826          relink_command=
    48874827          . $dir/$file
    48884828
Note: See TracBrowser for help on using the repository browser.