Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6 in downloads for ltmain.sh


Ignore:
Timestamp:
Oct 9, 2007, 10:16:21 PM (17 years ago)
Author:
anonymous
Message:

=…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ltmain.sh

    r5 r6  
    22# NOTE: Changing this file will not affect anything until you rerun configure.
    33#
    4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
    5 # Free Software Foundation, Inc.
     4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
     5# 2007  Free Software Foundation, Inc.
    66# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    77#
     
    4444PROGRAM=ltmain.sh
    4545PACKAGE=libtool
    46 VERSION=1.5.20
    47 TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
    48 
    49 # See if we are running on zsh, and set the options which allow our
    50 # commands through without removal of \ escapes.
    51 if test -n "${ZSH_VERSION+set}" ; then
     46VERSION=1.5.24
     47TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)"
     48
     49# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
     50if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
     51  emulate sh
     52  NULLCMD=:
     53  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     54  # is contrary to our usage.  Disable this feature.
     55  alias -g '${1+"$@"}'='"$@"'
    5256  setopt NO_GLOB_SUBST
     57else
     58  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
    5359fi
     60BIN_SH=xpg4; export BIN_SH # for Tru64
     61DUALCASE=1; export DUALCASE # for MKS sh
    5462
    5563# Check that we have a working $echo.
     
    106114# e.g. LANG=C (notably SCO).
    107115# We save the old values to restore during execute mode.
    108 if test "${LC_ALL+set}" = set; then
    109   save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
    110 fi
    111 if test "${LANG+set}" = set; then
    112   save_LANG="$LANG"; LANG=C; export LANG
    113 fi
     116for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
     117do
     118  eval "if test \"\${$lt_var+set}\" = set; then
     119          save_$lt_var=\$$lt_var
     120          $lt_var=C
     121          export $lt_var
     122        fi"
     123done
    114124
    115125# Make sure IFS has a sensible default
     
    133143show_help=
    134144execute_dlfiles=
     145duplicate_deps=no
     146preserve_args=
    135147lo2o="s/\\.lo\$/.${objext}/"
    136148o2lo="s/\\.${objext}\$/.lo/"
     149extracted_archives=
     150extracted_serial=0
    137151
    138152#####################################
    139153# Shell function definitions:
    140154# This seems to be the best place for them
     155
     156# func_mktempdir [string]
     157# Make a temporary directory that won't clash with other running
     158# libtool processes, and avoids race conditions if possible.  If
     159# given, STRING is the basename for that directory.
     160func_mktempdir ()
     161{
     162    my_template="${TMPDIR-/tmp}/${1-$progname}"
     163
     164    if test "$run" = ":"; then
     165      # Return a directory name, but don't create it in dry-run mode
     166      my_tmpdir="${my_template}-$$"
     167    else
     168
     169      # If mktemp works, use that first and foremost
     170      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
     171
     172      if test ! -d "$my_tmpdir"; then
     173        # Failing that, at least try and use $RANDOM to avoid a race
     174        my_tmpdir="${my_template}-${RANDOM-0}$$"
     175
     176        save_mktempdir_umask=`umask`
     177        umask 0077
     178        $mkdir "$my_tmpdir"
     179        umask $save_mktempdir_umask
     180      fi
     181
     182      # If we're not in dry-run mode, bomb out on failure
     183      test -d "$my_tmpdir" || {
     184        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
     185        exit $EXIT_FAILURE
     186      }
     187    fi
     188
     189    $echo "X$my_tmpdir" | $Xsed
     190}
     191
    141192
    142193# func_win32_libid arg
     
    158209      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
    159210      win32_nmres=`eval $NM -f posix -A $1 | \
    160         sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
    161       if test "X$win32_nmres" = "Ximport" ; then
    162         win32_libid_type="x86 archive import"
    163       else
    164         win32_libid_type="x86 archive static"
    165       fi
     211        $SED -n -e '1,100{
     212                / I /{
     213                        s,.*,import,
     214                        p
     215                        q
     216                        }
     217                }'`
     218      case $win32_nmres in
     219      import*)  win32_libid_type="x86 archive import";;
     220      *)        win32_libid_type="x86 archive static";;
     221      esac
    166222    fi
    167223    ;;
     
    290346      esac
    291347      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
    292       my_xdir="$my_gentop/$my_xlib"
     348      my_xlib_u=$my_xlib
     349      while :; do
     350        case " $extracted_archives " in
     351        *" $my_xlib_u "*)
     352          extracted_serial=`expr $extracted_serial + 1`
     353          my_xlib_u=lt$extracted_serial-$my_xlib ;;
     354        *) break ;;
     355        esac
     356      done
     357      extracted_archives="$extracted_archives $my_xlib_u"
     358      my_xdir="$my_gentop/$my_xlib_u"
    293359
    294360      $show "${rm}r $my_xdir"
     
    296362      $show "$mkdir $my_xdir"
    297363      $run $mkdir "$my_xdir"
    298       status=$?
    299       if test "$status" -ne 0 && test ! -d "$my_xdir"; then
    300         exit $status
     364      exit_status=$?
     365      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
     366        exit $exit_status
    301367      fi
    302368      case $host in
     
    353419eval std_shrext=\"$shrext_cmds\"
    354420
     421disable_libs=no
     422
    355423# Parse our command line options once, thoroughly.
    356424while test "$#" -gt 0
     
    415483
    416484  --version)
    417     $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
    418     $echo
    419     $echo "Copyright (C) 2005  Free Software Foundation, Inc."
    420     $echo "This is free software; see the source for copying conditions.  There is NO"
    421     $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     485    echo "\
     486$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
     487
     488Copyright (C) 2007  Free Software Foundation, Inc.
     489This is free software; see the source for copying conditions.  There is NO
     490warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    422491    exit $?
    423492    ;;
     
    469538    ;;
    470539
    471   --tag) prevopt="--tag" prev=tag ;;
     540  --tag)
     541    prevopt="--tag"
     542    prev=tag
     543    preserve_args="$preserve_args --tag"
     544    ;;
    472545  --tag=*)
    473546    set tag "$optarg" ${1+"$@"}
     
    500573  exit $EXIT_FAILURE
    501574fi
     575
     576case $disable_libs in
     577no)
     578  ;;
     579shared)
     580  build_libtool_libs=no
     581  build_old_libs=yes
     582  ;;
     583static)
     584  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
     585  ;;
     586esac
    502587
    503588# If this variable is set in any of the actions, the command in it
     
    700785    *.cpp) xform=cpp ;;
    701786    *.cxx) xform=cxx ;;
    702     *.f90) xform=f90 ;;
     787    *.[fF][09]?) xform=[fF][09]. ;;
    703788    *.for) xform=for ;;
    704789    *.java) xform=java ;;
     790    *.obj) xform=obj ;;
    705791    esac
    706792
     
    857943        $show "$mkdir ${xdir}$objdir"
    858944        $run $mkdir ${xdir}$objdir
    859         status=$?
    860         if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
    861           exit $status
     945        exit_status=$?
     946        if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
     947          exit $exit_status
    862948        fi
    863949      fi
     
    10621148    objs=
    10631149    non_pic_objects=
     1150    notinst_path= # paths that contain not-installed libtool libraries
    10641151    precious_files_regex=
    10651152    prefer_static_libs=no
     
    10821169    do
    10831170      case $arg in
    1084       -all-static | -static)
    1085         if test "X$arg" = "X-all-static"; then
     1171      -all-static | -static | -static-libtool-libs)
     1172        case $arg in
     1173        -all-static)
    10861174          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
    10871175            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
     
    10901178            dlopen_self=$dlopen_self_static
    10911179          fi
    1092         else
     1180          prefer_static_libs=yes
     1181          ;;
     1182        -static)
    10931183          if test -z "$pic_flag" && test -n "$link_static_flag"; then
    10941184            dlopen_self=$dlopen_self_static
    10951185          fi
    1096         fi
     1186          prefer_static_libs=built
     1187          ;;
     1188        -static-libtool-libs)
     1189          if test -z "$pic_flag" && test -n "$link_static_flag"; then
     1190            dlopen_self=$dlopen_self_static
     1191          fi
     1192          prefer_static_libs=yes
     1193          ;;
     1194        esac
    10971195        build_libtool_libs=no
    10981196        build_old_libs=yes
    1099         prefer_static_libs=yes
    11001197        break
    11011198        ;;
     
    12721369                    arg="$non_pic_object"
    12731370                  fi
     1371                else
     1372                  # If the PIC object exists, use it instead.
     1373                  # $xdir was prepended to $pic_object above.
     1374                  non_pic_object="$pic_object"
     1375                  non_pic_objects="$non_pic_objects $non_pic_object"
    12741376                fi
    12751377              else
     
    13551457          continue
    13561458          ;;
    1357         darwin_framework)
    1358           compiler_flags="$compiler_flags $arg"
     1459        darwin_framework|darwin_framework_skip)
     1460          test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
    13591461          compile_command="$compile_command $arg"
    13601462          finalize_command="$finalize_command $arg"
     
    14201522        ;;
    14211523
    1422       -framework|-arch)
    1423         prev=darwin_framework
    1424         compiler_flags="$compiler_flags $arg"
     1524      -framework|-arch|-isysroot)
     1525        case " $CC " in
     1526          *" ${arg} ${1} "* | *" ${arg} ${1} "*)
     1527                prev=darwin_framework_skip ;;
     1528          *) compiler_flags="$compiler_flags $arg"
     1529             prev=darwin_framework ;;
     1530        esac
    14251531        compile_command="$compile_command $arg"
    14261532        finalize_command="$finalize_command $arg"
    1427         continue
    1428         ;;
     1533        continue
     1534        ;;
    14291535
    14301536      -inst-prefix-dir)
     
    14541560          if test -z "$absdir"; then
    14551561            $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
    1456             exit $EXIT_FAILURE
     1562            absdir="$dir"
     1563            notinst_path="$notinst_path $dir"
    14571564          fi
    14581565          dir="$absdir"
     
    14681575        case $host in
    14691576        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
     1577          testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
    14701578          case :$dllsearchpath: in
    14711579          *":$dir:"*) ;;
    14721580          *) dllsearchpath="$dllsearchpath:$dir";;
    14731581          esac
     1582          case :$dllsearchpath: in
     1583          *":$testbindir:"*) ;;
     1584          *) dllsearchpath="$dllsearchpath:$testbindir";;
     1585          esac
    14741586          ;;
    14751587        esac
     
    14801592        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
    14811593          case $host in
    1482           *-*-cygwin* | *-*-pw32* | *-*-beos*)
     1594          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
    14831595            # These systems don't actually have a C or math library (as such)
    14841596            continue
    14851597            ;;
    1486           *-*-mingw* | *-*-os2*)
     1598          *-*-os2*)
    14871599            # These systems don't actually have a C library (as such)
    14881600            test "X$arg" = "X-lc" && continue
     
    14961608            deplibs="$deplibs -framework System"
    14971609            continue
     1610            ;;
     1611          *-*-sco3.2v5* | *-*-sco5v6*)
     1612            # Causes problems with __ctype
     1613            test "X$arg" = "X-lc" && continue
     1614            ;;
     1615          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
     1616            # Compiler inserts libc in the correct place for threads to work
     1617            test "X$arg" = "X-lc" && continue
     1618            ;;
    14981619          esac
    14991620        elif test "X$arg" = "X-lc_r"; then
     
    15191640        ;;
    15201641
    1521      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
     1642     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
    15221643        compiler_flags="$compiler_flags $arg"
    15231644        compile_command="$compile_command $arg"
     
    15371658      # -q* pass through compiler args for the IBM compiler
    15381659      # -m* pass through architecture-specific compiler args for GCC
    1539       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
     1660      # -m*, -t[45]*, -txscale* pass through architecture-specific
     1661      # compiler args for GCC
     1662      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
     1663      # -F/path gives path to uninstalled frameworks, gcc on darwin
     1664      # @file GCC response files
     1665      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
     1666      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
    15401667
    15411668        # Unknown arguments in both finalize_command and compile_command need
     
    15491676        compile_command="$compile_command $arg"
    15501677        finalize_command="$finalize_command $arg"
    1551         if test "$with_gcc" = "yes" ; then
    1552           compiler_flags="$compiler_flags $arg"
    1553         fi
     1678        compiler_flags="$compiler_flags $arg"
    15541679        continue
    15551680        ;;
     
    15671692      -no-install)
    15681693        case $host in
    1569         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
     1694        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
    15701695          # The PATH hackery in wrapper scripts is required on Windows
    1571           # in order for the loader to find any dlls it needs.
     1696          # and Darwin in order for the loader to find any dlls it needs.
    15721697          $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
    15731698          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
     
    16281753        ;;
    16291754
    1630       -static)
     1755      -static | -static-libtool-libs)
    16311756        # The effects of -static are defined in a previous loop.
    16321757        # We used to do the same as -all-static on platforms that
     
    17891914              arg="$non_pic_object"
    17901915            fi
     1916          else
     1917            # If the PIC object exists, use it instead.
     1918            # $xdir was prepended to $pic_object above.
     1919            non_pic_object="$pic_object"
     1920            non_pic_objects="$non_pic_objects $non_pic_object"
    17911921          fi
    17921922        else
     
    18942024      $show "$mkdir $output_objdir"
    18952025      $run $mkdir $output_objdir
    1896       status=$?
    1897       if test "$status" -ne 0 && test ! -d "$output_objdir"; then
    1898         exit $status
     2026      exit_status=$?
     2027      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
     2028        exit $exit_status
    18992029      fi
    19002030    fi
     
    19592089    need_relink=no # whether we're linking any uninstalled libtool libraries
    19602090    notinst_deplibs= # not-installed libtool libraries
    1961     notinst_path= # paths that contain not-installed libtool libraries
    19622091    case $linkmode in
    19632092    lib)
     
    20062135        found=no
    20072136        case $deplib in
    2008         -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
     2137        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
    20092138          if test "$linkmode,$pass" = "prog,link"; then
    20102139            compile_deplibs="$deplib $compile_deplibs"
     
    21952324        if test "$found" = yes || test -f "$lib"; then :
    21962325        else
    2197           $echo "$modename: cannot find the library \`$lib'" 1>&2
     2326          $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
    21982327          exit $EXIT_FAILURE
    21992328        fi
     
    24022531        if test "$linkmode,$pass" = "prog,link"; then
    24032532          if test -n "$library_names" &&
    2404              { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
     2533             { { test "$prefer_static_libs" = no ||
     2534                 test "$prefer_static_libs,$installed" = "built,yes"; } ||
     2535               test -z "$old_library"; }; then
    24052536            # We need to hardcode the library path
    24062537            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
     
    24462577
    24472578        link_static=no # Whether the deplib will be linked statically
     2579        use_static_libs=$prefer_static_libs
     2580        if test "$use_static_libs" = built && test "$installed" = yes ; then
     2581          use_static_libs=no
     2582        fi
    24482583        if test -n "$library_names" &&
    2449            { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
     2584           { test "$use_static_libs" = no || test -z "$old_library"; }; then
    24502585          if test "$installed" = no; then
    24512586            notinst_deplibs="$notinst_deplibs $lib"
     
    25602695                add="$dir/$linklib"
    25612696                case $host in
    2562                   *-*-sco3.2v5* ) add_dir="-L$dir" ;;
     2697                  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
     2698                  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
     2699                  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
     2700                    *-*-unixware7*) add_dir="-L$dir" ;;
    25632701                  *-*-darwin* )
    25642702                    # if the lib is a module then we can not link against
    25652703                    # it, someone is ignoring the new warnings I added
    2566                     if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
     2704                    if /usr/bin/file -L $add 2> /dev/null |
     2705                      $EGREP ": [^:]* bundle" >/dev/null ; then
    25672706                      $echo "** Warning, lib $linklib is a module, not a shared library"
    25682707                      if test -z "$old_library" ; then
     
    30903229          #
    30913230          case $version_type in
    3092           darwin|linux|osf|windows)
     3231          darwin|linux|osf|windows|none)
    30933232            current=`expr $number_major + $number_minor`
    30943233            age="$number_minor"
     
    31013240            ;;
    31023241          irix|nonstopux)
    3103             current=`expr $number_major + $number_minor - 1`
     3242            current=`expr $number_major + $number_minor`
    31043243            age="$number_minor"
    31053244            revision="$number_minor"
     3245            lt_irix_increment=no
    31063246            ;;
    31073247          esac
     
    31623302          # Darwin ld doesn't like 0 for these options...
    31633303          minor_current=`expr $current + 1`
    3164           verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
     3304          xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
     3305          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
    31653306          ;;
    31663307
     
    31763317
    31773318        irix | nonstopux)
    3178           major=`expr $current - $age + 1`
    3179 
     3319          if test "X$lt_irix_increment" = "Xno"; then
     3320            major=`expr $current - $age`
     3321          else
     3322            major=`expr $current - $age + 1`
     3323          fi
    31803324          case $version_type in
    31813325            nonstopux) verstring_prefix=nonstopux ;;
     
    33143458
    33153459      # Eliminate all temporary directories.
    3316       for path in $notinst_path; do
    3317         lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
    3318         deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
    3319         dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
    3320       done
     3460      #for path in $notinst_path; do
     3461      # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
     3462      # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
     3463      # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
     3464      #done
    33213465
    33223466      if test -n "$xrpath"; then
     
    33703514          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
    33713515            # Do not include libc due to us having libc/libc_r.
    3372             test "X$arg" = "X-lc" && continue
     3516            ;;
     3517          *-*-sco3.2v5* | *-*-sco5v6*)
     3518            # Causes problems with __ctype
     3519            ;;
     3520          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
     3521            # Compiler inserts libc in the correct place for threads to work
    33733522            ;;
    33743523          *)
     
    34143563EOF
    34153564          $rm conftest
    3416           $LTCC -o conftest conftest.c $deplibs
    3417           if test "$?" -eq 0 ; then
     3565          if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
    34183566            ldd_output=`ldd conftest`
    34193567            for i in $deplibs; do
    34203568              name=`expr $i : '-l\(.*\)'`
    34213569              # If $name is empty we are operating on a -L argument.
    3422               if test "$name" != "" && test "$name" -ne "0"; then
     3570              if test "$name" != "" && test "$name" != "0"; then
    34233571                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
    34243572                  case " $predeps $postdeps " in
     
    34593607              if test "$name" != "" && test "$name" != "0"; then
    34603608                $rm conftest
    3461                 $LTCC -o conftest conftest.c $i
    3462                 # Did it work?
    3463                 if test "$?" -eq 0 ; then
     3609                if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
    34643610                  ldd_output=`ldd conftest`
    34653611                  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
     
    34933639                  $echo
    34943640                  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
    3495                   $echo "***  make it link in!  You will probably need to install it or some"
     3641                  $echo "*** make it link in!  You will probably need to install it or some"
    34963642                  $echo "*** library that it depends on before this library will be fully"
    34973643                  $echo "*** functional.  Installing it before continuing would be even better."
     
    37063852      fi
    37073853
     3854
     3855      # move library search paths that coincide with paths to not yet
     3856      # installed libraries to the beginning of the library search list
     3857      new_libs=
     3858      for path in $notinst_path; do
     3859        case " $new_libs " in
     3860        *" -L$path/$objdir "*) ;;
     3861        *)
     3862          case " $deplibs " in
     3863          *" -L$path/$objdir "*)
     3864            new_libs="$new_libs -L$path/$objdir" ;;
     3865          esac
     3866          ;;
     3867        esac
     3868      done
     3869      for deplib in $deplibs; do
     3870        case $deplib in
     3871        -L*)
     3872          case " $new_libs " in
     3873          *" $deplib "*) ;;
     3874          *) new_libs="$new_libs $deplib" ;;
     3875          esac
     3876          ;;
     3877        *) new_libs="$new_libs $deplib" ;;
     3878        esac
     3879      done
     3880      deplibs="$new_libs"
     3881
     3882
    37083883      # All the library-specific variables (install_libdir is set above).
    37093884      library_names=
     
    37503925            libdir="$hardcode_libdirs"
    37513926            if test -n "$hardcode_libdir_flag_spec_ld"; then
    3752               eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
     3927              case $archive_cmds in
     3928              *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
     3929              *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
     3930              esac
    37533931            else
    37543932              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
     
    37893967
    37903968        lib="$output_objdir/$realname"
     3969        linknames=
    37913970        for link
    37923971        do
     
    41084287      gentop=
    41094288      # reload_cmds runs $LD directly, so let us get rid of
    4110       # -Wl from whole_archive_flag_spec
     4289      # -Wl from whole_archive_flag_spec and hope we can get by with
     4290      # turning comma into space..
    41114291      wl=
    41124292
    41134293      if test -n "$convenience"; then
    41144294        if test -n "$whole_archive_flag_spec"; then
    4115           eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
     4295          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
     4296          reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
    41164297        else
    41174298          gentop="$output_objdir/${obj}x"
     
    42194400        ;;
    42204401      esac
     4402
     4403
     4404      # move library search paths that coincide with paths to not yet
     4405      # installed libraries to the beginning of the library search list
     4406      new_libs=
     4407      for path in $notinst_path; do
     4408        case " $new_libs " in
     4409        *" -L$path/$objdir "*) ;;
     4410        *)
     4411          case " $compile_deplibs " in
     4412          *" -L$path/$objdir "*)
     4413            new_libs="$new_libs -L$path/$objdir" ;;
     4414          esac
     4415          ;;
     4416        esac
     4417      done
     4418      for deplib in $compile_deplibs; do
     4419        case $deplib in
     4420        -L*)
     4421          case " $new_libs " in
     4422          *" $deplib "*) ;;
     4423          *) new_libs="$new_libs $deplib" ;;
     4424          esac
     4425          ;;
     4426        *) new_libs="$new_libs $deplib" ;;
     4427        esac
     4428      done
     4429      compile_deplibs="$new_libs"
     4430
    42214431
    42224432      compile_command="$compile_command $compile_deplibs"
     
    42644474        case $host in
    42654475        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
     4476          testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
    42664477          case :$dllsearchpath: in
    42674478          *":$libdir:"*) ;;
    42684479          *) dllsearchpath="$dllsearchpath:$libdir";;
     4480          esac
     4481          case :$dllsearchpath: in
     4482          *":$testbindir:"*) ;;
     4483          *) dllsearchpath="$dllsearchpath:$testbindir";;
    42694484          esac
    42704485          ;;
     
    43844599              $run $rm $export_symbols
    43854600              $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
     4601              case $host in
     4602              *cygwin* | *mingw* )
     4603                $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
     4604                $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
     4605                ;;
     4606              esac
    43864607            else
    4387               $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
     4608              $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
    43884609              $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
    43894610              $run eval 'mv "$nlist"T "$nlist"'
     4611              case $host in
     4612              *cygwin* | *mingw* )
     4613                $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
     4614                $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
     4615                ;;
     4616              esac
    43904617            fi
    43914618          fi
     
    45044731
    45054732          # Now compile the dynamic symbol file.
    4506           $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
    4507           $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
     4733          $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
     4734          $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
    45084735
    45094736          # Clean up the generated files.
     
    45124739
    45134740          # Transform the symbol file into the correct name.
    4514           compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
    4515           finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
     4741          case $host in
     4742          *cygwin* | *mingw* )
     4743            if test -f "$output_objdir/${outputname}.def" ; then
     4744              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
     4745              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
     4746            else
     4747              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     4748              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     4749             fi
     4750            ;;
     4751          * )
     4752            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     4753            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     4754            ;;
     4755          esac
    45164756          ;;
    45174757        *)
     
    45264766
    45274767        # Nullify the symbol file.
    4528         compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
    4529         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
     4768        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
     4769        finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
    45304770      fi
    45314771
    45324772      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
    45334773        # Replace the output file specification.
    4534         compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
     4774        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
    45354775        link_command="$compile_command$compile_rpath"
    45364776
     
    45384778        $show "$link_command"
    45394779        $run eval "$link_command"
    4540         status=$?
     4780        exit_status=$?
    45414781
    45424782        # Delete the generated files.
     
    45464786        fi
    45474787
    4548         exit $status
     4788        exit $exit_status
    45494789      fi
    45504790
     
    46194859          link_command="$finalize_var$compile_command$finalize_rpath"
    46204860          if test "$fast_install" = yes; then
    4621             relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
     4861            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
    46224862          else
    46234863            # fast_install is set to needless
     
    46564896        done
    46574897        relink_command="(cd `pwd`; $relink_command)"
    4658         relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
     4898        relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
    46594899      fi
    46604900
     
    46864926        case $host in
    46874927          *cygwin* | *mingw* )
    4688             cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
    4689             cwrapper=`$echo ${output}.exe`
    4690             $rm $cwrappersource $cwrapper
    4691             trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
     4928            output_name=`basename $output`
     4929            output_path=`dirname $output`
     4930            cwrappersource="$output_path/$objdir/lt-$output_name.c"
     4931            cwrapper="$output_path/$output_name.exe"
     4932            $rm $cwrappersource $cwrapper
     4933            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
    46924934
    46934935            cat > $cwrappersource <<EOF
     
    47144956#include <stdarg.h>
    47154957#include <assert.h>
     4958#include <string.h>
     4959#include <ctype.h>
     4960#include <sys/stat.h>
    47164961
    47174962#if defined(PATH_MAX)
     
    47244969
    47254970#ifndef DIR_SEPARATOR
    4726 #define DIR_SEPARATOR '/'
     4971# define DIR_SEPARATOR '/'
     4972# define PATH_SEPARATOR ':'
    47274973#endif
    47284974
    47294975#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
    47304976  defined (__OS2__)
    4731 #define HAVE_DOS_BASED_FILE_SYSTEM
    4732 #ifndef DIR_SEPARATOR_2
    4733 #define DIR_SEPARATOR_2 '\\'
    4734 #endif
     4977# define HAVE_DOS_BASED_FILE_SYSTEM
     4978# ifndef DIR_SEPARATOR_2
     4979#  define DIR_SEPARATOR_2 '\\'
     4980# endif
     4981# ifndef PATH_SEPARATOR_2
     4982#  define PATH_SEPARATOR_2 ';'
     4983# endif
    47354984#endif
    47364985
     
    47424991#endif /* DIR_SEPARATOR_2 */
    47434992
     4993#ifndef PATH_SEPARATOR_2
     4994# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
     4995#else /* PATH_SEPARATOR_2 */
     4996# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
     4997#endif /* PATH_SEPARATOR_2 */
     4998
    47444999#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
    47455000#define XFREE(stale) do { \
     
    47475002} while (0)
    47485003
     5004/* -DDEBUG is fairly common in CFLAGS.  */
     5005#undef DEBUG
     5006#if defined DEBUGWRAPPER
     5007# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
     5008#else
     5009# define DEBUG(format, ...)
     5010#endif
     5011
    47495012const char *program_name = NULL;
    47505013
    47515014void * xmalloc (size_t num);
    47525015char * xstrdup (const char *string);
    4753 char * basename (const char *name);
    4754 char * fnqualify(const char *path);
     5016const char * base_name (const char *name);
     5017char * find_executable(const char *wrapper);
     5018int    check_executable(const char *path);
    47555019char * strendzap(char *str, const char *pat);
    47565020void lt_fatal (const char *message, ...);
     
    47625026  int i;
    47635027
    4764   program_name = (char *) xstrdup ((char *) basename (argv[0]));
     5028  program_name = (char *) xstrdup (base_name (argv[0]));
     5029  DEBUG("(main) argv[0]      : %s\n",argv[0]);
     5030  DEBUG("(main) program_name : %s\n",program_name);
    47655031  newargz = XMALLOC(char *, argc+2);
    47665032EOF
    47675033
    4768             cat >> $cwrappersource <<EOF
    4769   newargz[0] = "$SHELL";
     5034            cat >> $cwrappersource <<EOF
     5035  newargz[0] = (char *) xstrdup("$SHELL");
    47705036EOF
    47715037
    4772             cat >> $cwrappersource <<"EOF"
    4773   newargz[1] = fnqualify(argv[0]);
     5038            cat >> $cwrappersource <<"EOF"
     5039  newargz[1] = find_executable(argv[0]);
     5040  if (newargz[1] == NULL)
     5041    lt_fatal("Couldn't find %s", argv[0]);
     5042  DEBUG("(main) found exe at : %s\n",newargz[1]);
    47745043  /* we know the script has the same name, without the .exe */
    47755044  /* so make sure newargz[1] doesn't end in .exe */
     
    47785047    newargz[i+1] = xstrdup(argv[i]);
    47795048  newargz[argc+1] = NULL;
     5049
     5050  for (i=0; i<argc+1; i++)
     5051  {
     5052    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
     5053    ;
     5054  }
     5055
    47805056EOF
    47815057
    4782             cat >> $cwrappersource <<EOF
     5058            case $host_os in
     5059              mingw*)
     5060                cat >> $cwrappersource <<EOF
     5061  execv("$SHELL",(char const **)newargz);
     5062EOF
     5063              ;;
     5064              *)
     5065                cat >> $cwrappersource <<EOF
    47835066  execv("$SHELL",newargz);
    47845067EOF
    4785 
    4786             cat >> $cwrappersource <<"EOF"
     5068              ;;
     5069            esac
     5070
     5071            cat >> $cwrappersource <<"EOF"
    47875072  return 127;
    47885073}
     
    48055090}
    48065091
    4807 char *
    4808 basename (const char *name)
     5092const char *
     5093base_name (const char *name)
    48095094{
    48105095  const char *base;
     
    48125097#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    48135098  /* Skip over the disk name in MSDOS pathnames. */
    4814   if (isalpha (name[0]) && name[1] == ':')
     5099  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
    48155100    name += 2;
    48165101#endif
     
    48195104    if (IS_DIR_SEPARATOR (*name))
    48205105      base = name + 1;
    4821   return (char *) base;
     5106  return base;
    48225107}
    48235108
     5109int
     5110check_executable(const char * path)
     5111{
     5112  struct stat st;
     5113
     5114  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
     5115  if ((!path) || (!*path))
     5116    return 0;
     5117
     5118  if ((stat (path, &st) >= 0) &&
     5119      (
     5120        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
     5121#if defined (S_IXOTH)
     5122       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
     5123#endif
     5124#if defined (S_IXGRP)
     5125       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
     5126#endif
     5127       ((st.st_mode & S_IXUSR) == S_IXUSR))
     5128      )
     5129    return 1;
     5130  else
     5131    return 0;
     5132}
     5133
     5134/* Searches for the full path of the wrapper.  Returns
     5135   newly allocated full path name if found, NULL otherwise */
    48245136char *
    4825 fnqualify(const char *path)
     5137find_executable (const char* wrapper)
    48265138{
    4827   size_t size;
    4828   char *p;
     5139  int has_slash = 0;
     5140  const char* p;
     5141  const char* p_next;
     5142  /* static buffer for getcwd */
    48295143  char tmp[LT_PATHMAX + 1];
    4830 
    4831   assert(path != NULL);
    4832 
    4833   /* Is it qualified already? */
     5144  int tmp_len;
     5145  char* concat_name;
     5146
     5147  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
     5148
     5149  if ((wrapper == NULL) || (*wrapper == '\0'))
     5150    return NULL;
     5151
     5152  /* Absolute path? */
    48345153#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    4835   if (isalpha (path[0]) && path[1] == ':')
    4836     return xstrdup (path);
     5154  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
     5155  {
     5156    concat_name = xstrdup (wrapper);
     5157    if (check_executable(concat_name))
     5158      return concat_name;
     5159    XFREE(concat_name);
     5160  }
     5161  else
     5162  {
    48375163#endif
    4838   if (IS_DIR_SEPARATOR (path[0]))
    4839     return xstrdup (path);
    4840 
    4841   /* prepend the current directory */
    4842   /* doesn't handle '~' */
     5164    if (IS_DIR_SEPARATOR (wrapper[0]))
     5165    {
     5166      concat_name = xstrdup (wrapper);
     5167      if (check_executable(concat_name))
     5168        return concat_name;
     5169      XFREE(concat_name);
     5170    }
     5171#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
     5172  }
     5173#endif
     5174
     5175  for (p = wrapper; *p; p++)
     5176    if (*p == '/')
     5177    {
     5178      has_slash = 1;
     5179      break;
     5180    }
     5181  if (!has_slash)
     5182  {
     5183    /* no slashes; search PATH */
     5184    const char* path = getenv ("PATH");
     5185    if (path != NULL)
     5186    {
     5187      for (p = path; *p; p = p_next)
     5188      {
     5189        const char* q;
     5190        size_t p_len;
     5191        for (q = p; *q; q++)
     5192          if (IS_PATH_SEPARATOR(*q))
     5193            break;
     5194        p_len = q - p;
     5195        p_next = (*q == '\0' ? q : q + 1);
     5196        if (p_len == 0)
     5197        {
     5198          /* empty path: current directory */
     5199          if (getcwd (tmp, LT_PATHMAX) == NULL)
     5200            lt_fatal ("getcwd failed");
     5201          tmp_len = strlen(tmp);
     5202          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
     5203          memcpy (concat_name, tmp, tmp_len);
     5204          concat_name[tmp_len] = '/';
     5205          strcpy (concat_name + tmp_len + 1, wrapper);
     5206        }
     5207        else
     5208        {
     5209          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
     5210          memcpy (concat_name, p, p_len);
     5211          concat_name[p_len] = '/';
     5212          strcpy (concat_name + p_len + 1, wrapper);
     5213        }
     5214        if (check_executable(concat_name))
     5215          return concat_name;
     5216        XFREE(concat_name);
     5217      }
     5218    }
     5219    /* not found in PATH; assume curdir */
     5220  }
     5221  /* Relative path | not found in path: prepend cwd */
    48435222  if (getcwd (tmp, LT_PATHMAX) == NULL)
    48445223    lt_fatal ("getcwd failed");
    4845   size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
    4846   p = XMALLOC(char, size);
    4847   sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
    4848   return p;
     5224  tmp_len = strlen(tmp);
     5225  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
     5226  memcpy (concat_name, tmp, tmp_len);
     5227  concat_name[tmp_len] = '/';
     5228  strcpy (concat_name + tmp_len + 1, wrapper);
     5229
     5230  if (check_executable(concat_name))
     5231    return concat_name;
     5232  XFREE(concat_name);
     5233  return NULL;
    48495234}
    48505235
     
    48905275}
    48915276EOF
    4892           # we should really use a build-platform specific compiler
    4893           # here, but OTOH, the wrappers (shell script and this C one)
    4894           # are only useful if you want to execute the "real" binary.
    4895           # Since the "real" binary is built for $host, then this
    4896           # wrapper might as well be built for $host, too.
    4897           $run $LTCC -s -o $cwrapper $cwrappersource
    4898           ;;
    4899         esac
    4900         $rm $output
    4901         trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
     5277          # we should really use a build-platform specific compiler
     5278          # here, but OTOH, the wrappers (shell script and this C one)
     5279          # are only useful if you want to execute the "real" binary.
     5280          # Since the "real" binary is built for $host, then this
     5281          # wrapper might as well be built for $host, too.
     5282          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
     5283          ;;
     5284        esac
     5285        $rm $output
     5286        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
    49025287
    49035288        $echo > $output "\
     
    49175302Xsed='${SED} -e 1s/^X//'
    49185303sed_quote_subst='$sed_quote_subst'
     5304
     5305# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
     5306if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
     5307  emulate sh
     5308  NULLCMD=:
     5309  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
     5310  # is contrary to our usage.  Disable this feature.
     5311  alias -g '\${1+\"\$@\"}'='\"\$@\"'
     5312  setopt NO_GLOB_SUBST
     5313else
     5314  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
     5315fi
     5316BIN_SH=xpg4; export BIN_SH # for Tru64
     5317DUALCASE=1; export DUALCASE # for MKS sh
    49195318
    49205319# The HP-UX ksh and POSIX shell print the target directory to stdout
     
    50605459        esac
    50615460        $echo >> $output "\
    5062       \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
     5461      \$echo \"\$0: cannot exec \$program \$*\"
    50635462      exit $EXIT_FAILURE
    50645463    fi
     
    51295528            $show "$mkdir $gentop"
    51305529            $run $mkdir "$gentop"
    5131             status=$?
    5132             if test "$status" -ne 0 && test ! -d "$gentop"; then
    5133               exit $status
     5530            exit_status=$?
     5531            if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
     5532              exit $exit_status
    51345533            fi
    51355534          fi
     
    52465645      # Quote the link command for shipping.
    52475646      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
    5248       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
     5647      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
    52495648      if test "$hardcode_automatic" = yes ; then
    52505649        relink_command=
     
    55915990          if test -n "$inst_prefix_dir"; then
    55925991            # Stick the inst_prefix_dir data into the link command.
    5593             relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
     5992            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
    55945993          else
    5595             relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
     5994            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
    55965995          fi
    55975996
     
    57986197          if test "$fast_install" = no && test -n "$relink_command"; then
    57996198            if test "$finalize" = yes && test -z "$run"; then
    5800               tmpdir="/tmp"
    5801               test -n "$TMPDIR" && tmpdir="$TMPDIR"
    5802               tmpdir="$tmpdir/libtool-$$"
    5803               save_umask=`umask`
    5804               umask 0077
    5805               if $mkdir "$tmpdir"; then
    5806                 umask $save_umask
    5807               else
    5808                 umask $save_umask
    5809                 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
    5810                 continue
    5811               fi
     6199              tmpdir=`func_mktempdir`
    58126200              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
    58136201              outputname="$tmpdir/$file"
    58146202              # Replace the output file specification.
    5815               relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
     6203              relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
    58166204
    58176205              $show "$relink_command"
     
    59336321    test "$show" = : && exit $EXIT_SUCCESS
    59346322
    5935     $echo "----------------------------------------------------------------------"
     6323    $echo "X----------------------------------------------------------------------" | $Xsed
    59366324    $echo "Libraries have been installed in:"
    59376325    for libdir in $libdirs; do
     
    59666354    $echo "See any operating system documentation about shared libraries for"
    59676355    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
    5968     $echo "----------------------------------------------------------------------"
     6356    $echo "X----------------------------------------------------------------------" | $Xsed
    59696357    exit $EXIT_SUCCESS
    59706358    ;;
     
    60246412          dir="$dir/$objdir"
    60256413        else
    6026           $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
    6027           exit $EXIT_FAILURE
     6414          if test ! -f "$dir/$dlname"; then
     6415            $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
     6416            exit $EXIT_FAILURE
     6417          fi
    60286418        fi
    60296419        ;;
     
    60896479
    60906480      # Restore saved environment variables
    6091       if test "${save_LC_ALL+set}" = set; then
    6092         LC_ALL="$save_LC_ALL"; export LC_ALL
    6093       fi
    6094       if test "${save_LANG+set}" = set; then
    6095         LANG="$save_LANG"; export LANG
    6096       fi
     6481      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
     6482      do
     6483        eval "if test \"\${save_$lt_var+set}\" = set; then
     6484                $lt_var=\$save_$lt_var; export $lt_var
     6485              fi"
     6486      done
    60976487
    60986488      # Now prepare to actually exec the command.
     
    61836573          done
    61846574          test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
    6185           test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
    6186 
    6187           if test "$mode" = uninstall; then
     6575
     6576          case "$mode" in
     6577          clean)
     6578            case "  $library_names " in
     6579            # "  " in the beginning catches empty $dlname
     6580            *" $dlname "*) ;;
     6581            *) rmfiles="$rmfiles $objdir/$dlname" ;;
     6582            esac
     6583             test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
     6584            ;;
     6585          uninstall)
    61886586            if test -n "$library_names"; then
    61896587              # Do each command in the postuninstall commands.
     
    62186616            fi
    62196617            # FIXME: should reinstall the best remaining shared library.
    6220           fi
     6618            ;;
     6619          esac
    62216620        fi
    62226621        ;;
     
    64426841  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
    64436842  -export-symbols SYMFILE
    6444                     try to export only the symbols listed in SYMFILE
     6843                    try to export only the symbols listed in SYMFILE
    64456844  -export-symbols-regex REGEX
    6446                     try to export only the symbols matching REGEX
     6845                    try to export only the symbols matching REGEX
    64476846  -LLIBDIR          search LIBDIR for required installed libraries
    64486847  -lNAME            OUTPUT-FILE requires the installed library libNAME
     
    64586857  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
    64596858  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
    6460   -static           do not do any dynamic linking of libtool libraries
     6859  -static           do not do any dynamic linking of uninstalled libtool libraries
     6860  -static-libtool-libs
     6861                    do not do any dynamic linking of libtool libraries
    64616862  -version-info CURRENT[:REVISION[:AGE]]
    6462                     specify library version info [each variable defaults to 0]
     6863                    specify library version info [each variable defaults to 0]
    64636864
    64646865All other options (arguments beginning with \`-') are ignored.
     
    65176918
    65186919# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
    6519 build_libtool_libs=no
    6520 build_old_libs=yes
     6920disable_libs=shared
    65216921# ### END LIBTOOL TAG CONFIG: disable-shared
    65226922
    65236923# ### BEGIN LIBTOOL TAG CONFIG: disable-static
    6524 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
     6924disable_libs=static
    65256925# ### END LIBTOOL TAG CONFIG: disable-static
    65266926
Note: See TracChangeset for help on using the changeset viewer.