~ubuntu-branches/ubuntu/jaunty/transmission/jaunty-security

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Philipp Benner
  • Date: 2007-11-22 12:37:14 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122123714-b0xi4zxhgk5qwbmc
Tags: 0.93.dfsg-2
* Added missing build-dependency (python).
* debian/control: switching to Homepage, Vcs-Browser and Vcs-Svn official
  fields (Leo "costela" Antunes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# ltmain.sh - Provide generalized library-building support services.
2
2
# NOTE: Changing this file will not affect anything until you rerun configure.
3
3
#
4
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 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.
6
6
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
7
#
8
8
# This program is free software; you can redistribute it and/or modify
43
43
 
44
44
PROGRAM=ltmain.sh
45
45
PACKAGE=libtool
46
 
VERSION=1.5.22
47
 
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
 
46
VERSION=1.5.24
 
47
TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
48
48
 
49
49
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
50
50
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
57
57
else
58
58
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
59
59
fi
 
60
BIN_SH=xpg4; export BIN_SH # for Tru64
 
61
DUALCASE=1; export DUALCASE # for MKS sh
60
62
 
61
63
# Check that we have a working $echo.
62
64
if test "X$1" = X--no-reexec; then
114
116
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
115
117
do
116
118
  eval "if test \"\${$lt_var+set}\" = set; then
117
 
         save_$lt_var=\$$lt_var
118
 
         $lt_var=C
119
 
         export $lt_var
120
 
       fi"
 
119
          save_$lt_var=\$$lt_var
 
120
          $lt_var=C
 
121
          export $lt_var
 
122
        fi"
121
123
done
122
124
 
123
125
# Make sure IFS has a sensible default
206
208
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
207
209
      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
208
210
      win32_nmres=`eval $NM -f posix -A $1 | \
209
 
        $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
 
211
        $SED -n -e '1,100{
 
212
                / I /{
 
213
                        s,.*,import,
 
214
                        p
 
215
                        q
 
216
                        }
 
217
                }'`
210
218
      case $win32_nmres in
211
219
      import*)  win32_libid_type="x86 archive import";;
212
220
      *)        win32_libid_type="x86 archive static";;
340
348
      my_xlib_u=$my_xlib
341
349
      while :; do
342
350
        case " $extracted_archives " in
343
 
       *" $my_xlib_u "*)
344
 
         extracted_serial=`expr $extracted_serial + 1`
345
 
         my_xlib_u=lt$extracted_serial-$my_xlib ;;
346
 
       *) break ;;
347
 
       esac
 
351
        *" $my_xlib_u "*)
 
352
          extracted_serial=`expr $extracted_serial + 1`
 
353
          my_xlib_u=lt$extracted_serial-$my_xlib ;;
 
354
        *) break ;;
 
355
        esac
348
356
      done
349
357
      extracted_archives="$extracted_archives $my_xlib_u"
350
358
      my_xdir="$my_gentop/$my_xlib_u"
474
482
    ;;
475
483
 
476
484
  --version)
477
 
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
478
 
    $echo
479
 
    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
480
 
    $echo "This is free software; see the source for copying conditions.  There is NO"
481
 
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 
485
    echo "\
 
486
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
 
487
 
 
488
Copyright (C) 2007  Free Software Foundation, Inc.
 
489
This is free software; see the source for copying conditions.  There is NO
 
490
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
482
491
    exit $?
483
492
    ;;
484
493
 
775
784
    *.class) xform=class ;;
776
785
    *.cpp) xform=cpp ;;
777
786
    *.cxx) xform=cxx ;;
778
 
    *.f90) xform=f90 ;;
 
787
    *.[fF][09]?) xform=[fF][09]. ;;
779
788
    *.for) xform=for ;;
780
789
    *.java) xform=java ;;
781
790
    *.obj) xform=obj ;;
1160
1169
    do
1161
1170
      case $arg in
1162
1171
      -all-static | -static | -static-libtool-libs)
1163
 
    case $arg in
1164
 
    -all-static)
 
1172
        case $arg in
 
1173
        -all-static)
1165
1174
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1166
1175
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1167
1176
          fi
1170
1179
          fi
1171
1180
          prefer_static_libs=yes
1172
1181
          ;;
1173
 
    -static)
 
1182
        -static)
1174
1183
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
1175
1184
            dlopen_self=$dlopen_self_static
1176
1185
          fi
1177
1186
          prefer_static_libs=built
1178
1187
          ;;
1179
 
    -static-libtool-libs)
1180
 
      if test -z "$pic_flag" && test -n "$link_static_flag"; then
1181
 
        dlopen_self=$dlopen_self_static
1182
 
      fi
1183
 
      prefer_static_libs=yes
1184
 
      ;;
1185
 
    esac
 
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
1186
1195
        build_libtool_libs=no
1187
1196
        build_old_libs=yes
1188
1197
        break
1630
1639
        continue
1631
1640
        ;;
1632
1641
 
1633
 
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 
1642
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1634
1643
        compiler_flags="$compiler_flags $arg"
1635
1644
        compile_command="$compile_command $arg"
1636
1645
        finalize_command="$finalize_command $arg"
1650
1659
      # -m* pass through architecture-specific compiler args for GCC
1651
1660
      # -m*, -t[45]*, -txscale* pass through architecture-specific
1652
1661
      # compiler args for GCC
1653
 
      # -pg pass through profiling flag for GCC
 
1662
      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
 
1663
      # -F/path gives path to uninstalled frameworks, gcc on darwin
1654
1664
      # @file GCC response files
1655
 
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
1656
 
      -t[45]*|-txscale*|@*)
 
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*|@*)
1657
1667
 
1658
1668
        # Unknown arguments in both finalize_command and compile_command need
1659
1669
        # to be aesthetically quoted because they are evaled later.
1681
1691
 
1682
1692
      -no-install)
1683
1693
        case $host in
1684
 
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 
1694
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1685
1695
          # The PATH hackery in wrapper scripts is required on Windows
1686
 
          # 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.
1687
1697
          $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1688
1698
          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1689
1699
          fast_install=no
2124
2134
        lib=
2125
2135
        found=no
2126
2136
        case $deplib in
2127
 
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 
2137
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2128
2138
          if test "$linkmode,$pass" = "prog,link"; then
2129
2139
            compile_deplibs="$deplib $compile_deplibs"
2130
2140
            finalize_deplibs="$deplib $finalize_deplibs"
2520
2530
 
2521
2531
        if test "$linkmode,$pass" = "prog,link"; then
2522
2532
          if test -n "$library_names" &&
2523
 
         { { test "$prefer_static_libs" = no ||
2524
 
             test "$prefer_static_libs,$installed" = "built,yes"; } ||
2525
 
           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
2526
2536
            # We need to hardcode the library path
2527
2537
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2528
2538
              # Make sure the rpath contains only unique directories.
3229
3239
            age="0"
3230
3240
            ;;
3231
3241
          irix|nonstopux)
3232
 
            current=`expr $number_major + $number_minor - 1`
 
3242
            current=`expr $number_major + $number_minor`
3233
3243
            age="$number_minor"
3234
3244
            revision="$number_minor"
 
3245
            lt_irix_increment=no
3235
3246
            ;;
3236
3247
          esac
3237
3248
          ;;
3290
3301
          versuffix="$major.$age.$revision"
3291
3302
          # Darwin ld doesn't like 0 for these options...
3292
3303
          minor_current=`expr $current + 1`
3293
 
          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"
3294
3306
          ;;
3295
3307
 
3296
3308
        freebsd-aout)
3304
3316
          ;;
3305
3317
 
3306
3318
        irix | nonstopux)
3307
 
          major=`expr $current - $age + 1`
3308
 
 
 
3319
          if test "X$lt_irix_increment" = "Xno"; then
 
3320
            major=`expr $current - $age`
 
3321
          else
 
3322
            major=`expr $current - $age + 1`
 
3323
          fi
3309
3324
          case $version_type in
3310
3325
            nonstopux) verstring_prefix=nonstopux ;;
3311
3326
            *)         verstring_prefix=sgi ;;
3442
3457
      fi
3443
3458
 
3444
3459
      # Eliminate all temporary directories.
3445
 
#      for path in $notinst_path; do
3446
 
#       lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3447
 
#       deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3448
 
#       dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3449
 
#      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
3450
3465
 
3451
3466
      if test -n "$xrpath"; then
3452
3467
        # If the user specified any rpath flags, then add them.
3547
3562
          int main() { return 0; }
3548
3563
EOF
3549
3564
          $rm conftest
3550
 
      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
 
3565
          if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3551
3566
            ldd_output=`ldd conftest`
3552
3567
            for i in $deplibs; do
3553
3568
              name=`expr $i : '-l\(.*\)'`
3909
3924
             test -n "$hardcode_libdirs"; then
3910
3925
            libdir="$hardcode_libdirs"
3911
3926
            if test -n "$hardcode_libdir_flag_spec_ld"; then
3912
 
              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
3913
3931
            else
3914
3932
              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3915
3933
            fi
4275
4293
      if test -n "$convenience"; then
4276
4294
        if test -n "$whole_archive_flag_spec"; then
4277
4295
          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4278
 
      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
 
4296
          reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4279
4297
        else
4280
4298
          gentop="$output_objdir/${obj}x"
4281
4299
          generated="$generated $gentop"
5295
5313
else
5296
5314
  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5297
5315
fi
 
5316
BIN_SH=xpg4; export BIN_SH # for Tru64
 
5317
DUALCASE=1; export DUALCASE # for MKS sh
5298
5318
 
5299
5319
# The HP-UX ksh and POSIX shell print the target directory to stdout
5300
5320
# if CDPATH is set.
6391
6411
        if test -f "$dir/$objdir/$dlname"; then
6392
6412
          dir="$dir/$objdir"
6393
6413
        else
6394
 
          $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6395
 
          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
6396
6418
        fi
6397
6419
        ;;
6398
6420
 
6458
6480
      # Restore saved environment variables
6459
6481
      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6460
6482
      do
6461
 
       eval "if test \"\${save_$lt_var+set}\" = set; then
6462
 
               $lt_var=\$save_$lt_var; export $lt_var
6463
 
             fi"
 
6483
        eval "if test \"\${save_$lt_var+set}\" = set; then
 
6484
                $lt_var=\$save_$lt_var; export $lt_var
 
6485
              fi"
6464
6486
      done
6465
6487
 
6466
 
 
6467
6488
      # Now prepare to actually exec the command.
6468
6489
      exec_cmd="\$cmd$args"
6469
6490
    else