Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7 in downloads for libtool


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

=

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libtool

    r5 r7  
    55# NOTE: Changes made to this file will be lost: look at ltmain.sh.
    66#
    7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
     7# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
    88# Free Software Foundation, Inc.
    99#
     
    4545# ### BEGIN LIBTOOL CONFIG
    4646
    47 # Libtool was configured on host tardis-d04:
     47# Libtool was configured on host tardis-b15:
    4848
    4949# Shell to use when invoking shell scripts.
     
    8585LTCC="gcc"
    8686
     87# LTCC compiler flags.
     88LTCFLAGS="-g -O2"
     89
    8790# A language-specific compiler.
    8891CC="gcc"
     
    145148
    146149# What is the maximum length of a command?
    147 max_cmd_len=32768
     150max_cmd_len=98304
    148151
    149152# Does compiler simultaneously support -c and -o options?
     
    198201# Commands used to build and install an old-style archive.
    199202RANLIB="ranlib"
    200 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
    201 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
     203old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
     204old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
    202205old_postuninstall_cmds=""
    203206
     
    317320# Variables whose values should be saved in libtool wrapper scripts and
    318321# restored at relink time.
    319 variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
     322variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
    320323
    321324# Whether libtool must link a program against all its dependency libraries.
     
    323326
    324327# Compile-time system search path for libraries
    325 sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.5/ /usr/lib/gcc/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../ /lib/i486-linux/3.3.5/ /lib/ /usr/lib/i486-linux/3.3.5/ /usr/lib/"
     328sys_lib_search_path_spec="/usr/lib/gcc-lib/i486-linux/3.3.5 /usr/lib /lib"
    326329
    327330# Run-time system search path for libraries
     
    351354# NOTE: Changing this file will not affect anything until you rerun configure.
    352355#
    353 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
    354 # Free Software Foundation, Inc.
     356# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
     357# 2007  Free Software Foundation, Inc.
    355358# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    356359#
     
    393396PROGRAM=ltmain.sh
    394397PACKAGE=libtool
    395 VERSION=1.5.20
    396 TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
    397 
    398 # See if we are running on zsh, and set the options which allow our
    399 # commands through without removal of \ escapes.
    400 if test -n "${ZSH_VERSION+set}" ; then
     398VERSION=1.5.24
     399TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)"
     400
     401# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
     402if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
     403  emulate sh
     404  NULLCMD=:
     405  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     406  # is contrary to our usage.  Disable this feature.
     407  alias -g '${1+"$@"}'='"$@"'
    401408  setopt NO_GLOB_SUBST
     409else
     410  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
    402411fi
     412BIN_SH=xpg4; export BIN_SH # for Tru64
     413DUALCASE=1; export DUALCASE # for MKS sh
    403414
    404415# Check that we have a working $echo.
     
    455466# e.g. LANG=C (notably SCO).
    456467# We save the old values to restore during execute mode.
    457 if test "${LC_ALL+set}" = set; then
    458   save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
    459 fi
    460 if test "${LANG+set}" = set; then
    461   save_LANG="$LANG"; LANG=C; export LANG
    462 fi
     468for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
     469do
     470  eval "if test \"\${$lt_var+set}\" = set; then
     471          save_$lt_var=\$$lt_var
     472          $lt_var=C
     473          export $lt_var
     474        fi"
     475done
    463476
    464477# Make sure IFS has a sensible default
     
    482495show_help=
    483496execute_dlfiles=
     497duplicate_deps=no
     498preserve_args=
    484499lo2o="s/\\.lo\$/.${objext}/"
    485500o2lo="s/\\.${objext}\$/.lo/"
     501extracted_archives=
     502extracted_serial=0
    486503
    487504#####################################
    488505# Shell function definitions:
    489506# This seems to be the best place for them
     507
     508# func_mktempdir [string]
     509# Make a temporary directory that won't clash with other running
     510# libtool processes, and avoids race conditions if possible.  If
     511# given, STRING is the basename for that directory.
     512func_mktempdir ()
     513{
     514    my_template="${TMPDIR-/tmp}/${1-$progname}"
     515
     516    if test "$run" = ":"; then
     517      # Return a directory name, but don't create it in dry-run mode
     518      my_tmpdir="${my_template}-$$"
     519    else
     520
     521      # If mktemp works, use that first and foremost
     522      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
     523
     524      if test ! -d "$my_tmpdir"; then
     525        # Failing that, at least try and use $RANDOM to avoid a race
     526        my_tmpdir="${my_template}-${RANDOM-0}$$"
     527
     528        save_mktempdir_umask=`umask`
     529        umask 0077
     530        $mkdir "$my_tmpdir"
     531        umask $save_mktempdir_umask
     532      fi
     533
     534      # If we're not in dry-run mode, bomb out on failure
     535      test -d "$my_tmpdir" || {
     536        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
     537        exit $EXIT_FAILURE
     538      }
     539    fi
     540
     541    $echo "X$my_tmpdir" | $Xsed
     542}
     543
    490544
    491545# func_win32_libid arg
     
    507561      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
    508562      win32_nmres=`eval $NM -f posix -A $1 | \
    509         sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
    510       if test "X$win32_nmres" = "Ximport" ; then
    511         win32_libid_type="x86 archive import"
    512       else
    513         win32_libid_type="x86 archive static"
    514       fi
     563        $SED -n -e '1,100{
     564                / I /{
     565                        s,.*,import,
     566                        p
     567                        q
     568                        }
     569                }'`
     570      case $win32_nmres in
     571      import*)  win32_libid_type="x86 archive import";;
     572      *)        win32_libid_type="x86 archive static";;
     573      esac
    515574    fi
    516575    ;;
     
    639698      esac
    640699      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
    641       my_xdir="$my_gentop/$my_xlib"
     700      my_xlib_u=$my_xlib
     701      while :; do
     702        case " $extracted_archives " in
     703        *" $my_xlib_u "*)
     704          extracted_serial=`expr $extracted_serial + 1`
     705          my_xlib_u=lt$extracted_serial-$my_xlib ;;
     706        *) break ;;
     707        esac
     708      done
     709      extracted_archives="$extracted_archives $my_xlib_u"
     710      my_xdir="$my_gentop/$my_xlib_u"
    642711
    643712      $show "${rm}r $my_xdir"
     
    645714      $show "$mkdir $my_xdir"
    646715      $run $mkdir "$my_xdir"
    647       status=$?
    648       if test "$status" -ne 0 && test ! -d "$my_xdir"; then
    649         exit $status
     716      exit_status=$?
     717      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
     718        exit $exit_status
    650719      fi
    651720      case $host in
     
    702771eval std_shrext=\"$shrext_cmds\"
    703772
     773disable_libs=no
     774
    704775# Parse our command line options once, thoroughly.
    705776while test "$#" -gt 0
     
    764835
    765836  --version)
    766     $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
    767     $echo
    768     $echo "Copyright (C) 2005  Free Software Foundation, Inc."
    769     $echo "This is free software; see the source for copying conditions.  There is NO"
    770     $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     837    echo "\
     838$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
     839
     840Copyright (C) 2007  Free Software Foundation, Inc.
     841This is free software; see the source for copying conditions.  There is NO
     842warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    771843    exit $?
    772844    ;;
     
    818890    ;;
    819891
    820   --tag) prevopt="--tag" prev=tag ;;
     892  --tag)
     893    prevopt="--tag"
     894    prev=tag
     895    preserve_args="$preserve_args --tag"
     896    ;;
    821897  --tag=*)
    822898    set tag "$optarg" ${1+"$@"}
     
    849925  exit $EXIT_FAILURE
    850926fi
     927
     928case $disable_libs in
     929no)
     930  ;;
     931shared)
     932  build_libtool_libs=no
     933  build_old_libs=yes
     934  ;;
     935static)
     936  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
     937  ;;
     938esac
    851939
    852940# If this variable is set in any of the actions, the command in it
     
    10491137    *.cpp) xform=cpp ;;
    10501138    *.cxx) xform=cxx ;;
    1051     *.f90) xform=f90 ;;
     1139    *.[fF][09]?) xform=[fF][09]. ;;
    10521140    *.for) xform=for ;;
    10531141    *.java) xform=java ;;
     1142    *.obj) xform=obj ;;
    10541143    esac
    10551144
     
    12061295        $show "$mkdir ${xdir}$objdir"
    12071296        $run $mkdir ${xdir}$objdir
    1208         status=$?
    1209         if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
    1210           exit $status
     1297        exit_status=$?
     1298        if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
     1299          exit $exit_status
    12111300        fi
    12121301      fi
     
    14111500    objs=
    14121501    non_pic_objects=
     1502    notinst_path= # paths that contain not-installed libtool libraries
    14131503    precious_files_regex=
    14141504    prefer_static_libs=no
     
    14311521    do
    14321522      case $arg in
    1433       -all-static | -static)
    1434         if test "X$arg" = "X-all-static"; then
     1523      -all-static | -static | -static-libtool-libs)
     1524        case $arg in
     1525        -all-static)
    14351526          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
    14361527            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
     
    14391530            dlopen_self=$dlopen_self_static
    14401531          fi
    1441         else
     1532          prefer_static_libs=yes
     1533          ;;
     1534        -static)
    14421535          if test -z "$pic_flag" && test -n "$link_static_flag"; then
    14431536            dlopen_self=$dlopen_self_static
    14441537          fi
    1445         fi
     1538          prefer_static_libs=built
     1539          ;;
     1540        -static-libtool-libs)
     1541          if test -z "$pic_flag" && test -n "$link_static_flag"; then
     1542            dlopen_self=$dlopen_self_static
     1543          fi
     1544          prefer_static_libs=yes
     1545          ;;
     1546        esac
    14461547        build_libtool_libs=no
    14471548        build_old_libs=yes
    1448         prefer_static_libs=yes
    14491549        break
    14501550        ;;
     
    16211721                    arg="$non_pic_object"
    16221722                  fi
     1723                else
     1724                  # If the PIC object exists, use it instead.
     1725                  # $xdir was prepended to $pic_object above.
     1726                  non_pic_object="$pic_object"
     1727                  non_pic_objects="$non_pic_objects $non_pic_object"
    16231728                fi
    16241729              else
     
    17041809          continue
    17051810          ;;
    1706         darwin_framework)
    1707           compiler_flags="$compiler_flags $arg"
     1811        darwin_framework|darwin_framework_skip)
     1812          test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
    17081813          compile_command="$compile_command $arg"
    17091814          finalize_command="$finalize_command $arg"
     
    17691874        ;;
    17701875
    1771       -framework|-arch)
    1772         prev=darwin_framework
    1773         compiler_flags="$compiler_flags $arg"
     1876      -framework|-arch|-isysroot)
     1877        case " $CC " in
     1878          *" ${arg} ${1} "* | *" ${arg} ${1} "*)
     1879                prev=darwin_framework_skip ;;
     1880          *) compiler_flags="$compiler_flags $arg"
     1881             prev=darwin_framework ;;
     1882        esac
    17741883        compile_command="$compile_command $arg"
    17751884        finalize_command="$finalize_command $arg"
    1776         continue
    1777         ;;
     1885        continue
     1886        ;;
    17781887
    17791888      -inst-prefix-dir)
     
    18031912          if test -z "$absdir"; then
    18041913            $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
    1805             exit $EXIT_FAILURE
     1914            absdir="$dir"
     1915            notinst_path="$notinst_path $dir"
    18061916          fi
    18071917          dir="$absdir"
     
    18171927        case $host in
    18181928        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
     1929          testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
    18191930          case :$dllsearchpath: in
    18201931          *":$dir:"*) ;;
    18211932          *) dllsearchpath="$dllsearchpath:$dir";;
     1933          esac
     1934          case :$dllsearchpath: in
     1935          *":$testbindir:"*) ;;
     1936          *) dllsearchpath="$dllsearchpath:$testbindir";;
    18221937          esac
    18231938          ;;
     
    18291944        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
    18301945          case $host in
    1831           *-*-cygwin* | *-*-pw32* | *-*-beos*)
     1946          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
    18321947            # These systems don't actually have a C or math library (as such)
    18331948            continue
    18341949            ;;
    1835           *-*-mingw* | *-*-os2*)
     1950          *-*-os2*)
    18361951            # These systems don't actually have a C library (as such)
    18371952            test "X$arg" = "X-lc" && continue
     
    18451960            deplibs="$deplibs -framework System"
    18461961            continue
     1962            ;;
     1963          *-*-sco3.2v5* | *-*-sco5v6*)
     1964            # Causes problems with __ctype
     1965            test "X$arg" = "X-lc" && continue
     1966            ;;
     1967          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
     1968            # Compiler inserts libc in the correct place for threads to work
     1969            test "X$arg" = "X-lc" && continue
     1970            ;;
    18471971          esac
    18481972        elif test "X$arg" = "X-lc_r"; then
     
    18681992        ;;
    18691993
    1870      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
     1994     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
    18711995        compiler_flags="$compiler_flags $arg"
    18721996        compile_command="$compile_command $arg"
     
    18862010      # -q* pass through compiler args for the IBM compiler
    18872011      # -m* pass through architecture-specific compiler args for GCC
    1888       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
     2012      # -m*, -t[45]*, -txscale* pass through architecture-specific
     2013      # compiler args for GCC
     2014      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
     2015      # -F/path gives path to uninstalled frameworks, gcc on darwin
     2016      # @file GCC response files
     2017      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
     2018      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
    18892019
    18902020        # Unknown arguments in both finalize_command and compile_command need
     
    18982028        compile_command="$compile_command $arg"
    18992029        finalize_command="$finalize_command $arg"
    1900         if test "$with_gcc" = "yes" ; then
    1901           compiler_flags="$compiler_flags $arg"
    1902         fi
     2030        compiler_flags="$compiler_flags $arg"
    19032031        continue
    19042032        ;;
     
    19162044      -no-install)
    19172045        case $host in
    1918         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
     2046        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
    19192047          # The PATH hackery in wrapper scripts is required on Windows
    1920           # in order for the loader to find any dlls it needs.
     2048          # and Darwin in order for the loader to find any dlls it needs.
    19212049          $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
    19222050          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
     
    19772105        ;;
    19782106
    1979       -static)
     2107      -static | -static-libtool-libs)
    19802108        # The effects of -static are defined in a previous loop.
    19812109        # We used to do the same as -all-static on platforms that
     
    21382266              arg="$non_pic_object"
    21392267            fi
     2268          else
     2269            # If the PIC object exists, use it instead.
     2270            # $xdir was prepended to $pic_object above.
     2271            non_pic_object="$pic_object"
     2272            non_pic_objects="$non_pic_objects $non_pic_object"
    21402273          fi
    21412274        else
     
    22432376      $show "$mkdir $output_objdir"
    22442377      $run $mkdir $output_objdir
    2245       status=$?
    2246       if test "$status" -ne 0 && test ! -d "$output_objdir"; then
    2247         exit $status
     2378      exit_status=$?
     2379      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
     2380        exit $exit_status
    22482381      fi
    22492382    fi
     
    23082441    need_relink=no # whether we're linking any uninstalled libtool libraries
    23092442    notinst_deplibs= # not-installed libtool libraries
    2310     notinst_path= # paths that contain not-installed libtool libraries
    23112443    case $linkmode in
    23122444    lib)
     
    23552487        found=no
    23562488        case $deplib in
    2357         -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
     2489        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
    23582490          if test "$linkmode,$pass" = "prog,link"; then
    23592491            compile_deplibs="$deplib $compile_deplibs"
     
    25442676        if test "$found" = yes || test -f "$lib"; then :
    25452677        else
    2546           $echo "$modename: cannot find the library \`$lib'" 1>&2
     2678          $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
    25472679          exit $EXIT_FAILURE
    25482680        fi
     
    27512883        if test "$linkmode,$pass" = "prog,link"; then
    27522884          if test -n "$library_names" &&
    2753              { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
     2885             { { test "$prefer_static_libs" = no ||
     2886                 test "$prefer_static_libs,$installed" = "built,yes"; } ||
     2887               test -z "$old_library"; }; then
    27542888            # We need to hardcode the library path
    27552889            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
     
    27952929
    27962930        link_static=no # Whether the deplib will be linked statically
     2931        use_static_libs=$prefer_static_libs
     2932        if test "$use_static_libs" = built && test "$installed" = yes ; then
     2933          use_static_libs=no
     2934        fi
    27972935        if test -n "$library_names" &&
    2798            { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
     2936           { test "$use_static_libs" = no || test -z "$old_library"; }; then
    27992937          if test "$installed" = no; then
    28002938            notinst_deplibs="$notinst_deplibs $lib"
     
    29093047                add="$dir/$linklib"
    29103048                case $host in
    2911                   *-*-sco3.2v5* ) add_dir="-L$dir" ;;
     3049                  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
     3050                  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
     3051                  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
     3052                    *-*-unixware7*) add_dir="-L$dir" ;;
    29123053                  *-*-darwin* )
    29133054                    # if the lib is a module then we can not link against
    29143055                    # it, someone is ignoring the new warnings I added
    2915                     if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
     3056                    if /usr/bin/file -L $add 2> /dev/null |
     3057                      $EGREP ": [^:]* bundle" >/dev/null ; then
    29163058                      $echo "** Warning, lib $linklib is a module, not a shared library"
    29173059                      if test -z "$old_library" ; then
     
    34393581          #
    34403582          case $version_type in
    3441           darwin|linux|osf|windows)
     3583          darwin|linux|osf|windows|none)
    34423584            current=`expr $number_major + $number_minor`
    34433585            age="$number_minor"
     
    34503592            ;;
    34513593          irix|nonstopux)
    3452             current=`expr $number_major + $number_minor - 1`
     3594            current=`expr $number_major + $number_minor`
    34533595            age="$number_minor"
    34543596            revision="$number_minor"
     3597            lt_irix_increment=no
    34553598            ;;
    34563599          esac
     
    35113654          # Darwin ld doesn't like 0 for these options...
    35123655          minor_current=`expr $current + 1`
    3513           verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
     3656          xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
     3657          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
    35143658          ;;
    35153659
     
    35253669
    35263670        irix | nonstopux)
    3527           major=`expr $current - $age + 1`
    3528 
     3671          if test "X$lt_irix_increment" = "Xno"; then
     3672            major=`expr $current - $age`
     3673          else
     3674            major=`expr $current - $age + 1`
     3675          fi
    35293676          case $version_type in
    35303677            nonstopux) verstring_prefix=nonstopux ;;
     
    36633810
    36643811      # Eliminate all temporary directories.
    3665       for path in $notinst_path; do
    3666         lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
    3667         deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
    3668         dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
    3669       done
     3812      #for path in $notinst_path; do
     3813      # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
     3814      # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
     3815      # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
     3816      #done
    36703817
    36713818      if test -n "$xrpath"; then
     
    37193866          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
    37203867            # Do not include libc due to us having libc/libc_r.
    3721             test "X$arg" = "X-lc" && continue
     3868            ;;
     3869          *-*-sco3.2v5* | *-*-sco5v6*)
     3870            # Causes problems with __ctype
     3871            ;;
     3872          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
     3873            # Compiler inserts libc in the correct place for threads to work
    37223874            ;;
    37233875          *)
     
    37633915EOF
    37643916          $rm conftest
    3765           $LTCC -o conftest conftest.c $deplibs
    3766           if test "$?" -eq 0 ; then
     3917          if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
    37673918            ldd_output=`ldd conftest`
    37683919            for i in $deplibs; do
    37693920              name=`expr $i : '-l\(.*\)'`
    37703921              # If $name is empty we are operating on a -L argument.
    3771               if test "$name" != "" && test "$name" -ne "0"; then
     3922              if test "$name" != "" && test "$name" != "0"; then
    37723923                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
    37733924                  case " $predeps $postdeps " in
     
    38083959              if test "$name" != "" && test "$name" != "0"; then
    38093960                $rm conftest
    3810                 $LTCC -o conftest conftest.c $i
    3811                 # Did it work?
    3812                 if test "$?" -eq 0 ; then
     3961                if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
    38133962                  ldd_output=`ldd conftest`
    38143963                  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
     
    38423991                  $echo
    38433992                  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
    3844                   $echo "***  make it link in!  You will probably need to install it or some"
     3993                  $echo "*** make it link in!  You will probably need to install it or some"
    38453994                  $echo "*** library that it depends on before this library will be fully"
    38463995                  $echo "*** functional.  Installing it before continuing would be even better."
     
    40554204      fi
    40564205
     4206
     4207      # move library search paths that coincide with paths to not yet
     4208      # installed libraries to the beginning of the library search list
     4209      new_libs=
     4210      for path in $notinst_path; do
     4211        case " $new_libs " in
     4212        *" -L$path/$objdir "*) ;;
     4213        *)
     4214          case " $deplibs " in
     4215          *" -L$path/$objdir "*)
     4216            new_libs="$new_libs -L$path/$objdir" ;;
     4217          esac
     4218          ;;
     4219        esac
     4220      done
     4221      for deplib in $deplibs; do
     4222        case $deplib in
     4223        -L*)
     4224          case " $new_libs " in
     4225          *" $deplib "*) ;;
     4226          *) new_libs="$new_libs $deplib" ;;
     4227          esac
     4228          ;;
     4229        *) new_libs="$new_libs $deplib" ;;
     4230        esac
     4231      done
     4232      deplibs="$new_libs"
     4233
     4234
    40574235      # All the library-specific variables (install_libdir is set above).
    40584236      library_names=
     
    40994277            libdir="$hardcode_libdirs"
    41004278            if test -n "$hardcode_libdir_flag_spec_ld"; then
    4101               eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
     4279              case $archive_cmds in
     4280              *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
     4281              *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
     4282              esac
    41024283            else
    41034284              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
     
    41384319
    41394320        lib="$output_objdir/$realname"
     4321        linknames=
    41404322        for link
    41414323        do
     
    44574639      gentop=
    44584640      # reload_cmds runs $LD directly, so let us get rid of
    4459       # -Wl from whole_archive_flag_spec
     4641      # -Wl from whole_archive_flag_spec and hope we can get by with
     4642      # turning comma into space..
    44604643      wl=
    44614644
    44624645      if test -n "$convenience"; then
    44634646        if test -n "$whole_archive_flag_spec"; then
    4464           eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
     4647          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
     4648          reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
    44654649        else
    44664650          gentop="$output_objdir/${obj}x"
     
    45684752        ;;
    45694753      esac
     4754
     4755
     4756      # move library search paths that coincide with paths to not yet
     4757      # installed libraries to the beginning of the library search list
     4758      new_libs=
     4759      for path in $notinst_path; do
     4760        case " $new_libs " in
     4761        *" -L$path/$objdir "*) ;;
     4762        *)
     4763          case " $compile_deplibs " in
     4764          *" -L$path/$objdir "*)
     4765            new_libs="$new_libs -L$path/$objdir" ;;
     4766          esac
     4767          ;;
     4768        esac
     4769      done
     4770      for deplib in $compile_deplibs; do
     4771        case $deplib in
     4772        -L*)
     4773          case " $new_libs " in
     4774          *" $deplib "*) ;;
     4775          *) new_libs="$new_libs $deplib" ;;
     4776          esac
     4777          ;;
     4778        *) new_libs="$new_libs $deplib" ;;
     4779        esac
     4780      done
     4781      compile_deplibs="$new_libs"
     4782
    45704783
    45714784      compile_command="$compile_command $compile_deplibs"
     
    46134826        case $host in
    46144827        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
     4828          testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
    46154829          case :$dllsearchpath: in
    46164830          *":$libdir:"*) ;;
    46174831          *) dllsearchpath="$dllsearchpath:$libdir";;
     4832          esac
     4833          case :$dllsearchpath: in
     4834          *":$testbindir:"*) ;;
     4835          *) dllsearchpath="$dllsearchpath:$testbindir";;
    46184836          esac
    46194837          ;;
     
    47334951              $run $rm $export_symbols
    47344952              $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
     4953              case $host in
     4954              *cygwin* | *mingw* )
     4955                $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
     4956                $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
     4957                ;;
     4958              esac
    47354959            else
    4736               $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
     4960              $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
    47374961              $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
    47384962              $run eval 'mv "$nlist"T "$nlist"'
     4963              case $host in
     4964              *cygwin* | *mingw* )
     4965                $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
     4966                $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
     4967                ;;
     4968              esac
    47394969            fi
    47404970          fi
     
    48535083
    48545084          # Now compile the dynamic symbol file.
    4855           $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
    4856           $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
     5085          $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
     5086          $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
    48575087
    48585088          # Clean up the generated files.
     
    48615091
    48625092          # Transform the symbol file into the correct name.
    4863           compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
    4864           finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
     5093          case $host in
     5094          *cygwin* | *mingw* )
     5095            if test -f "$output_objdir/${outputname}.def" ; then
     5096              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
     5097              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
     5098            else
     5099              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     5100              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     5101             fi
     5102            ;;
     5103          * )
     5104            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     5105            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
     5106            ;;
     5107          esac
    48655108          ;;
    48665109        *)
     
    48755118
    48765119        # Nullify the symbol file.
    4877         compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
    4878         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
     5120        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
     5121        finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
    48795122      fi
    48805123
    48815124      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
    48825125        # Replace the output file specification.
    4883         compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
     5126        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
    48845127        link_command="$compile_command$compile_rpath"
    48855128
     
    48875130        $show "$link_command"
    48885131        $run eval "$link_command"
    4889         status=$?
     5132        exit_status=$?
    48905133
    48915134        # Delete the generated files.
     
    48955138        fi
    48965139
    4897         exit $status
     5140        exit $exit_status
    48985141      fi
    48995142
     
    49685211          link_command="$finalize_var$compile_command$finalize_rpath"
    49695212          if test "$fast_install" = yes; then
    4970             relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
     5213            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
    49715214          else
    49725215            # fast_install is set to needless
     
    50055248        done
    50065249        relink_command="(cd `pwd`; $relink_command)"
    5007         relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
     5250        relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
    50085251      fi
    50095252
     
    50355278        case $host in
    50365279          *cygwin* | *mingw* )
    5037             cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
    5038             cwrapper=`$echo ${output}.exe`
    5039             $rm $cwrappersource $cwrapper
    5040             trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
     5280            output_name=`basename $output`
     5281            output_path=`dirname $output`
     5282            cwrappersource="$output_path/$objdir/lt-$output_name.c"
     5283            cwrapper="$output_path/$output_name.exe"
     5284            $rm $cwrappersource $cwrapper
     5285            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
    50415286
    50425287            cat > $cwrappersource <<EOF
     
    50635308#include <stdarg.h>
    50645309#include <assert.h>
     5310#include <string.h>
     5311#include <ctype.h>
     5312#include <sys/stat.h>
    50655313
    50665314#if defined(PATH_MAX)
     
    50735321
    50745322#ifndef DIR_SEPARATOR
    5075 #define DIR_SEPARATOR '/'
     5323# define DIR_SEPARATOR '/'
     5324# define PATH_SEPARATOR ':'
    50765325#endif
    50775326
    50785327#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
    50795328  defined (__OS2__)
    5080 #define HAVE_DOS_BASED_FILE_SYSTEM
    5081 #ifndef DIR_SEPARATOR_2
    5082 #define DIR_SEPARATOR_2 '\\'
    5083 #endif
     5329# define HAVE_DOS_BASED_FILE_SYSTEM
     5330# ifndef DIR_SEPARATOR_2
     5331#  define DIR_SEPARATOR_2 '\\'
     5332# endif
     5333# ifndef PATH_SEPARATOR_2
     5334#  define PATH_SEPARATOR_2 ';'
     5335# endif
    50845336#endif
    50855337
     
    50915343#endif /* DIR_SEPARATOR_2 */
    50925344
     5345#ifndef PATH_SEPARATOR_2
     5346# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
     5347#else /* PATH_SEPARATOR_2 */
     5348# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
     5349#endif /* PATH_SEPARATOR_2 */
     5350
    50935351#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
    50945352#define XFREE(stale) do { \
     
    50965354} while (0)
    50975355
     5356/* -DDEBUG is fairly common in CFLAGS.  */
     5357#undef DEBUG
     5358#if defined DEBUGWRAPPER
     5359# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
     5360#else
     5361# define DEBUG(format, ...)
     5362#endif
     5363
    50985364const char *program_name = NULL;
    50995365
    51005366void * xmalloc (size_t num);
    51015367char * xstrdup (const char *string);
    5102 char * basename (const char *name);
    5103 char * fnqualify(const char *path);
     5368const char * base_name (const char *name);
     5369char * find_executable(const char *wrapper);
     5370int    check_executable(const char *path);
    51045371char * strendzap(char *str, const char *pat);
    51055372void lt_fatal (const char *message, ...);
     
    51115378  int i;
    51125379
    5113   program_name = (char *) xstrdup ((char *) basename (argv[0]));
     5380  program_name = (char *) xstrdup (base_name (argv[0]));
     5381  DEBUG("(main) argv[0]      : %s\n",argv[0]);
     5382  DEBUG("(main) program_name : %s\n",program_name);
    51145383  newargz = XMALLOC(char *, argc+2);
    51155384EOF
    51165385
    5117             cat >> $cwrappersource <<EOF
    5118   newargz[0] = "$SHELL";
     5386            cat >> $cwrappersource <<EOF
     5387  newargz[0] = (char *) xstrdup("$SHELL");
    51195388EOF
    51205389
    5121             cat >> $cwrappersource <<"EOF"
    5122   newargz[1] = fnqualify(argv[0]);
     5390            cat >> $cwrappersource <<"EOF"
     5391  newargz[1] = find_executable(argv[0]);
     5392  if (newargz[1] == NULL)
     5393    lt_fatal("Couldn't find %s", argv[0]);
     5394  DEBUG("(main) found exe at : %s\n",newargz[1]);
    51235395  /* we know the script has the same name, without the .exe */
    51245396  /* so make sure newargz[1] doesn't end in .exe */
     
    51275399    newargz[i+1] = xstrdup(argv[i]);
    51285400  newargz[argc+1] = NULL;
     5401
     5402  for (i=0; i<argc+1; i++)
     5403  {
     5404    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
     5405    ;
     5406  }
     5407
    51295408EOF
    51305409
    5131             cat >> $cwrappersource <<EOF
     5410            case $host_os in
     5411              mingw*)
     5412                cat >> $cwrappersource <<EOF
     5413  execv("$SHELL",(char const **)newargz);
     5414EOF
     5415              ;;
     5416              *)
     5417                cat >> $cwrappersource <<EOF
    51325418  execv("$SHELL",newargz);
    51335419EOF
    5134 
    5135             cat >> $cwrappersource <<"EOF"
     5420              ;;
     5421            esac
     5422
     5423            cat >> $cwrappersource <<"EOF"
    51365424  return 127;
    51375425}
     
    51545442}
    51555443
    5156 char *
    5157 basename (const char *name)
     5444const char *
     5445base_name (const char *name)
    51585446{
    51595447  const char *base;
     
    51615449#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    51625450  /* Skip over the disk name in MSDOS pathnames. */
    5163   if (isalpha (name[0]) && name[1] == ':')
     5451  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
    51645452    name += 2;
    51655453#endif
     
    51685456    if (IS_DIR_SEPARATOR (*name))
    51695457      base = name + 1;
    5170   return (char *) base;
     5458  return base;
    51715459}
    51725460
     5461int
     5462check_executable(const char * path)
     5463{
     5464  struct stat st;
     5465
     5466  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
     5467  if ((!path) || (!*path))
     5468    return 0;
     5469
     5470  if ((stat (path, &st) >= 0) &&
     5471      (
     5472        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
     5473#if defined (S_IXOTH)
     5474       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
     5475#endif
     5476#if defined (S_IXGRP)
     5477       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
     5478#endif
     5479       ((st.st_mode & S_IXUSR) == S_IXUSR))
     5480      )
     5481    return 1;
     5482  else
     5483    return 0;
     5484}
     5485
     5486/* Searches for the full path of the wrapper.  Returns
     5487   newly allocated full path name if found, NULL otherwise */
    51735488char *
    5174 fnqualify(const char *path)
     5489find_executable (const char* wrapper)
    51755490{
    5176   size_t size;
    5177   char *p;
     5491  int has_slash = 0;
     5492  const char* p;
     5493  const char* p_next;
     5494  /* static buffer for getcwd */
    51785495  char tmp[LT_PATHMAX + 1];
    5179 
    5180   assert(path != NULL);
    5181 
    5182   /* Is it qualified already? */
     5496  int tmp_len;
     5497  char* concat_name;
     5498
     5499  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
     5500
     5501  if ((wrapper == NULL) || (*wrapper == '\0'))
     5502    return NULL;
     5503
     5504  /* Absolute path? */
    51835505#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    5184   if (isalpha (path[0]) && path[1] == ':')
    5185     return xstrdup (path);
     5506  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
     5507  {
     5508    concat_name = xstrdup (wrapper);
     5509    if (check_executable(concat_name))
     5510      return concat_name;
     5511    XFREE(concat_name);
     5512  }
     5513  else
     5514  {
    51865515#endif
    5187   if (IS_DIR_SEPARATOR (path[0]))
    5188     return xstrdup (path);
    5189 
    5190   /* prepend the current directory */
    5191   /* doesn't handle '~' */
     5516    if (IS_DIR_SEPARATOR (wrapper[0]))
     5517    {
     5518      concat_name = xstrdup (wrapper);
     5519      if (check_executable(concat_name))
     5520        return concat_name;
     5521      XFREE(concat_name);
     5522    }
     5523#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
     5524  }
     5525#endif
     5526
     5527  for (p = wrapper; *p; p++)
     5528    if (*p == '/')
     5529    {
     5530      has_slash = 1;
     5531      break;
     5532    }
     5533  if (!has_slash)
     5534  {
     5535    /* no slashes; search PATH */
     5536    const char* path = getenv ("PATH");
     5537    if (path != NULL)
     5538    {
     5539      for (p = path; *p; p = p_next)
     5540      {
     5541        const char* q;
     5542        size_t p_len;
     5543        for (q = p; *q; q++)
     5544          if (IS_PATH_SEPARATOR(*q))
     5545            break;
     5546        p_len = q - p;
     5547        p_next = (*q == '\0' ? q : q + 1);
     5548        if (p_len == 0)
     5549        {
     5550          /* empty path: current directory */
     5551          if (getcwd (tmp, LT_PATHMAX) == NULL)
     5552            lt_fatal ("getcwd failed");
     5553          tmp_len = strlen(tmp);
     5554          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
     5555          memcpy (concat_name, tmp, tmp_len);
     5556          concat_name[tmp_len] = '/';
     5557          strcpy (concat_name + tmp_len + 1, wrapper);
     5558        }
     5559        else
     5560        {
     5561          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
     5562          memcpy (concat_name, p, p_len);
     5563          concat_name[p_len] = '/';
     5564          strcpy (concat_name + p_len + 1, wrapper);
     5565        }
     5566        if (check_executable(concat_name))
     5567          return concat_name;
     5568        XFREE(concat_name);
     5569      }
     5570    }
     5571    /* not found in PATH; assume curdir */
     5572  }
     5573  /* Relative path | not found in path: prepend cwd */
    51925574  if (getcwd (tmp, LT_PATHMAX) == NULL)
    51935575    lt_fatal ("getcwd failed");
    5194   size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
    5195   p = XMALLOC(char, size);
    5196   sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
    5197   return p;
     5576  tmp_len = strlen(tmp);
     5577  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
     5578  memcpy (concat_name, tmp, tmp_len);
     5579  concat_name[tmp_len] = '/';
     5580  strcpy (concat_name + tmp_len + 1, wrapper);
     5581
     5582  if (check_executable(concat_name))
     5583    return concat_name;
     5584  XFREE(concat_name);
     5585  return NULL;
    51985586}
    51995587
     
    52395627}
    52405628EOF
    5241           # we should really use a build-platform specific compiler
    5242           # here, but OTOH, the wrappers (shell script and this C one)
    5243           # are only useful if you want to execute the "real" binary.
    5244           # Since the "real" binary is built for $host, then this
    5245           # wrapper might as well be built for $host, too.
    5246           $run $LTCC -s -o $cwrapper $cwrappersource
    5247           ;;
    5248         esac
    5249         $rm $output
    5250         trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
     5629          # we should really use a build-platform specific compiler
     5630          # here, but OTOH, the wrappers (shell script and this C one)
     5631          # are only useful if you want to execute the "real" binary.
     5632          # Since the "real" binary is built for $host, then this
     5633          # wrapper might as well be built for $host, too.
     5634          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
     5635          ;;
     5636        esac
     5637        $rm $output
     5638        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
    52515639
    52525640        $echo > $output "\
     
    52665654Xsed='${SED} -e 1s/^X//'
    52675655sed_quote_subst='$sed_quote_subst'
     5656
     5657# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
     5658if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
     5659  emulate sh
     5660  NULLCMD=:
     5661  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
     5662  # is contrary to our usage.  Disable this feature.
     5663  alias -g '\${1+\"\$@\"}'='\"\$@\"'
     5664  setopt NO_GLOB_SUBST
     5665else
     5666  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
     5667fi
     5668BIN_SH=xpg4; export BIN_SH # for Tru64
     5669DUALCASE=1; export DUALCASE # for MKS sh
    52685670
    52695671# The HP-UX ksh and POSIX shell print the target directory to stdout
     
    54095811        esac
    54105812        $echo >> $output "\
    5411       \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
     5813      \$echo \"\$0: cannot exec \$program \$*\"
    54125814      exit $EXIT_FAILURE
    54135815    fi
     
    54785880            $show "$mkdir $gentop"
    54795881            $run $mkdir "$gentop"
    5480             status=$?
    5481             if test "$status" -ne 0 && test ! -d "$gentop"; then
    5482               exit $status
     5882            exit_status=$?
     5883            if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
     5884              exit $exit_status
    54835885            fi
    54845886          fi
     
    55955997      # Quote the link command for shipping.
    55965998      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
    5597       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
     5999      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
    55986000      if test "$hardcode_automatic" = yes ; then
    55996001        relink_command=
     
    59406342          if test -n "$inst_prefix_dir"; then
    59416343            # Stick the inst_prefix_dir data into the link command.
    5942             relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
     6344            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
    59436345          else
    5944             relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
     6346            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
    59456347          fi
    59466348
     
    61476549          if test "$fast_install" = no && test -n "$relink_command"; then
    61486550            if test "$finalize" = yes && test -z "$run"; then
    6149               tmpdir="/tmp"
    6150               test -n "$TMPDIR" && tmpdir="$TMPDIR"
    6151               tmpdir="$tmpdir/libtool-$$"
    6152               save_umask=`umask`
    6153               umask 0077
    6154               if $mkdir "$tmpdir"; then
    6155                 umask $save_umask
    6156               else
    6157                 umask $save_umask
    6158                 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
    6159                 continue
    6160               fi
     6551              tmpdir=`func_mktempdir`
    61616552              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
    61626553              outputname="$tmpdir/$file"
    61636554              # Replace the output file specification.
    6164               relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
     6555              relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
    61656556
    61666557              $show "$relink_command"
     
    62826673    test "$show" = : && exit $EXIT_SUCCESS
    62836674
    6284     $echo "----------------------------------------------------------------------"
     6675    $echo "X----------------------------------------------------------------------" | $Xsed
    62856676    $echo "Libraries have been installed in:"
    62866677    for libdir in $libdirs; do
     
    63156706    $echo "See any operating system documentation about shared libraries for"
    63166707    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
    6317     $echo "----------------------------------------------------------------------"
     6708    $echo "X----------------------------------------------------------------------" | $Xsed
    63186709    exit $EXIT_SUCCESS
    63196710    ;;
     
    63736764          dir="$dir/$objdir"
    63746765        else
    6375           $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
    6376           exit $EXIT_FAILURE
     6766          if test ! -f "$dir/$dlname"; then
     6767            $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
     6768            exit $EXIT_FAILURE
     6769          fi
    63776770        fi
    63786771        ;;
     
    64386831
    64396832      # Restore saved environment variables
    6440       if test "${save_LC_ALL+set}" = set; then
    6441         LC_ALL="$save_LC_ALL"; export LC_ALL
    6442       fi
    6443       if test "${save_LANG+set}" = set; then
    6444         LANG="$save_LANG"; export LANG
    6445       fi
     6833      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
     6834      do
     6835        eval "if test \"\${save_$lt_var+set}\" = set; then
     6836                $lt_var=\$save_$lt_var; export $lt_var
     6837              fi"
     6838      done
    64466839
    64476840      # Now prepare to actually exec the command.
     
    65326925          done
    65336926          test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
    6534           test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
    6535 
    6536           if test "$mode" = uninstall; then
     6927
     6928          case "$mode" in
     6929          clean)
     6930            case "  $library_names " in
     6931            # "  " in the beginning catches empty $dlname
     6932            *" $dlname "*) ;;
     6933            *) rmfiles="$rmfiles $objdir/$dlname" ;;
     6934            esac
     6935             test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
     6936            ;;
     6937          uninstall)
    65376938            if test -n "$library_names"; then
    65386939              # Do each command in the postuninstall commands.
     
    65676968            fi
    65686969            # FIXME: should reinstall the best remaining shared library.
    6569           fi
     6970            ;;
     6971          esac
    65706972        fi
    65716973        ;;
     
    67917193  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
    67927194  -export-symbols SYMFILE
    6793                     try to export only the symbols listed in SYMFILE
     7195                    try to export only the symbols listed in SYMFILE
    67947196  -export-symbols-regex REGEX
    6795                     try to export only the symbols matching REGEX
     7197                    try to export only the symbols matching REGEX
    67967198  -LLIBDIR          search LIBDIR for required installed libraries
    67977199  -lNAME            OUTPUT-FILE requires the installed library libNAME
     
    68077209  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
    68087210  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
    6809   -static           do not do any dynamic linking of libtool libraries
     7211  -static           do not do any dynamic linking of uninstalled libtool libraries
     7212  -static-libtool-libs
     7213                    do not do any dynamic linking of libtool libraries
    68107214  -version-info CURRENT[:REVISION[:AGE]]
    6811                     specify library version info [each variable defaults to 0]
     7215                    specify library version info [each variable defaults to 0]
    68127216
    68137217All other options (arguments beginning with \`-') are ignored.
     
    68667270
    68677271# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
    6868 build_libtool_libs=no
    6869 build_old_libs=yes
     7272disable_libs=shared
    68707273# ### END LIBTOOL TAG CONFIG: disable-shared
    68717274
    68727275# ### BEGIN LIBTOOL TAG CONFIG: disable-static
    6873 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
     7276disable_libs=static
    68747277# ### END LIBTOOL TAG CONFIG: disable-static
    68757278
     
    68807283# ### BEGIN LIBTOOL TAG CONFIG: CXX
    68817284
    6882 # Libtool was configured on host tardis-d04:
     7285# Libtool was configured on host tardis-b15:
    68837286
    68847287# Shell to use when invoking shell scripts.
     
    69207323LTCC="gcc"
    69217324
     7325# LTCC compiler flags.
     7326LTCFLAGS="-g -O2"
     7327
    69227328# A language-specific compiler.
    69237329CC="g++"
     
    69807386
    69817387# What is the maximum length of a command?
    6982 max_cmd_len=32768
     7388max_cmd_len=98304
    69837389
    69847390# Does compiler simultaneously support -c and -o options?
     
    70337439# Commands used to build and install an old-style archive.
    70347440RANLIB="ranlib"
    7035 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
    7036 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
     7441old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
     7442old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
    70377443old_postuninstall_cmds=""
    70387444
     
    71417547# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
    71427548# the resulting binary.
    7143 hardcode_shlibpath_var=
     7549hardcode_shlibpath_var=unsupported
    71447550
    71457551# Set to yes if building a shared library automatically hardcodes DIR into the library
     
    71557561
    71567562# Compile-time system search path for libraries
    7157 sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.5/ /usr/lib/gcc/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../ /lib/i486-linux/3.3.5/ /lib/ /usr/lib/i486-linux/3.3.5/ /usr/lib/"
     7563sys_lib_search_path_spec="/usr/lib/gcc-lib/i486-linux/3.3.5 /usr/lib /lib"
    71587564
    71597565# Run-time system search path for libraries
     
    71827588# ### BEGIN LIBTOOL TAG CONFIG: F77
    71837589
    7184 # Libtool was configured on host tardis-d04:
     7590# Libtool was configured on host tardis-b15:
    71857591
    71867592# Shell to use when invoking shell scripts.
     
    72227628LTCC="gcc"
    72237629
     7630# LTCC compiler flags.
     7631LTCFLAGS="-g -O2"
     7632
    72247633# A language-specific compiler.
    72257634CC="g77"
     
    72827691
    72837692# What is the maximum length of a command?
    7284 max_cmd_len=32768
     7693max_cmd_len=98304
    72857694
    72867695# Does compiler simultaneously support -c and -o options?
     
    73357744# Commands used to build and install an old-style archive.
    73367745RANLIB="ranlib"
    7337 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
    7338 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
     7746old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
     7747old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
    73397748old_postuninstall_cmds=""
    73407749
     
    74607869
    74617870# Compile-time system search path for libraries
    7462 sys_lib_search_path_spec=" /usr/pack/gcc-3.3.5-mo/i686-debian-linux3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/ /usr/lib/gcc/i686-pc-linux-gnu/3.3.5/ /usr/pack/gcc-3.3.5-mo/i686-debian-linux3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.5/ /usr/pack/gcc-3.3.5-mo/i686-debian-linux3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/lib/ /usr/pack/gcc-3.3.5-mo/i686-debian-linux3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../i686-pc-linux-gnu/3.3.5/ /usr/pack/gcc-3.3.5-mo/i686-debian-linux3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../ /lib/i686-pc-linux-gnu/3.3.5/ /lib/ /usr/lib/i686-pc-linux-gnu/3.3.5/ /usr/lib/"
     7871sys_lib_search_path_spec="/usr/lib/gcc-lib/i486-linux/3.3.5 /usr/lib /lib"
    74637872
    74647873# Run-time system search path for libraries
     
    74877896# ### BEGIN LIBTOOL TAG CONFIG: F77
    74887897
    7489 # Libtool was configured on host tardis-d04:
     7898# Libtool was configured on host tardis-b15:
    74907899
    74917900# Shell to use when invoking shell scripts.
     
    75277936LTCC="gcc"
    75287937
     7938# LTCC compiler flags.
     7939LTCFLAGS="-g -O2"
     7940
    75297941# A language-specific compiler.
    75307942CC="g++"
     
    75877999
    75888000# What is the maximum length of a command?
    7589 max_cmd_len=32768
     8001max_cmd_len=98304
    75908002
    75918003# Does compiler simultaneously support -c and -o options?
     
    76408052# Commands used to build and install an old-style archive.
    76418053RANLIB="ranlib"
    7642 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
    7643 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
     8054old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
     8055old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
    76448056old_postuninstall_cmds=""
    76458057
     
    77488160# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
    77498161# the resulting binary.
    7750 hardcode_shlibpath_var=
     8162hardcode_shlibpath_var=unsupported
    77518163
    77528164# Set to yes if building a shared library automatically hardcodes DIR into the library
     
    77628174
    77638175# Compile-time system search path for libraries
    7764 sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.5/ /usr/lib/gcc/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../ /lib/i486-linux/3.3.5/ /lib/ /usr/lib/i486-linux/3.3.5/ /usr/lib/"
     8176sys_lib_search_path_spec="/usr/lib/gcc-lib/i486-linux/3.3.5 /usr/lib /lib"
    77658177
    77668178# Run-time system search path for libraries
Note: See TracChangeset for help on using the changeset viewer.