~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-08-23 11:12:43 UTC
  • mfrom: (1.3.3)
  • mto: (2.5.2 sid) (1.4.2)
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: package-import@ubuntu.com-20120823111243-0hjp8cv5xn2jr6jc
ImportĀ upstreamĀ versionĀ 2.34.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
 
# libtool (GNU libtool) 2.4
 
2
# libtool (GNU libtool) 2.4.2
3
3
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4
4
 
5
5
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
6
 
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
6
# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
7
7
# This is free software; see the source for copying conditions.  There is NO
8
8
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
9
 
41
41
#       --quiet, --silent    don't print informational messages
42
42
#       --no-quiet, --no-silent
43
43
#                            print informational messages (default)
 
44
#       --no-warn            don't display warning messages
44
45
#       --tag=TAG            use configuration variables from tag TAG
45
46
#   -v, --verbose            print more informational messages than default
46
47
#       --no-verbose         don't print the extra informational messages
69
70
#         compiler:             $LTCC
70
71
#         compiler flags:               $LTCFLAGS
71
72
#         linker:               $LD (gnu? $with_gnu_ld)
72
 
#         $progname:    (GNU libtool) 2.4
 
73
#         $progname:    (GNU libtool) 2.4.2
73
74
#         automake:     $automake_version
74
75
#         autoconf:     $autoconf_version
75
76
#
79
80
 
80
81
PROGRAM=libtool
81
82
PACKAGE=libtool
82
 
VERSION=2.4
 
83
VERSION=2.4.2
83
84
TIMESTAMP=""
84
 
package_revision=1.3293
85
 
 
86
 
# define SED for historic ltconfig's generated by Libtool 1.3
87
 
test -z "$SED" && SED=sed
 
85
package_revision=1.3337
88
86
 
89
87
# Be Bourne compatible
90
88
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
139
137
 
140
138
: ${CP="cp -f"}
141
139
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
142
 
: ${EGREP="/bin/grep -E"}
143
 
: ${FGREP="/bin/grep -F"}
144
 
: ${GREP="/bin/grep"}
145
 
: ${LN_S="ln -s"}
146
140
: ${MAKE="make"}
147
141
: ${MKDIR="mkdir"}
148
142
: ${MV="mv -f"}
149
143
: ${RM="rm -f"}
150
 
: ${SED="/bin/sed"}
151
144
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
152
145
: ${Xsed="$SED -e 1s/^X//"}
153
146
 
390
383
     ;;
391
384
  *)
392
385
     save_IFS="$IFS"
393
 
     IFS=:
 
386
     IFS=${PATH_SEPARATOR-:}
394
387
     for progdir in $PATH; do
395
388
       IFS="$save_IFS"
396
389
       test -x "$progdir/$progname" && break
774
767
        s*\$LTCFLAGS*'"$LTCFLAGS"'*
775
768
        s*\$LD*'"$LD"'*
776
769
        s/\$with_gnu_ld/'"$with_gnu_ld"'/
777
 
        s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
778
 
        s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
 
770
        s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
 
771
        s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
779
772
        p
780
773
        d
781
774
     }
1055
1048
opt_help=false
1056
1049
opt_help_all=false
1057
1050
opt_silent=:
 
1051
opt_warning=:
1058
1052
opt_verbose=:
1059
1053
opt_silent=false
1060
1054
opt_verbose=false
1123
1117
                        opt_silent=false
1124
1118
func_append preserve_args " $opt"
1125
1119
                        ;;
 
1120
      --no-warning|--no-warn)
 
1121
                        opt_warning=false
 
1122
func_append preserve_args " $opt"
 
1123
                        ;;
1126
1124
      --no-verbose)
1127
1125
                        opt_verbose=false
1128
1126
func_append preserve_args " $opt"
2062
2060
    *.[cCFSifmso] | \
2063
2061
    *.ada | *.adb | *.ads | *.asm | \
2064
2062
    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
2065
 
    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
 
2063
    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
2066
2064
      func_xform "$libobj"
2067
2065
      libobj=$func_xform_result
2068
2066
      ;;
3204
3202
 
3205
3203
      # Set up the ranlib parameters.
3206
3204
      oldlib="$destdir/$name"
 
3205
      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
 
3206
      tool_oldlib=$func_to_tool_file_result
3207
3207
 
3208
3208
      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
3209
3209
 
3210
3210
      if test -n "$stripme" && test -n "$old_striplib"; then
3211
 
        func_show_eval "$old_striplib $oldlib" 'exit $?'
 
3211
        func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
3212
3212
      fi
3213
3213
 
3214
3214
      # Do each command in the postinstall commands.
3473
3473
          # linked before any other PIC object.  But we must not use
3474
3474
          # pic_flag when linking with -static.  The problem exists in
3475
3475
          # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3476
 
          *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
 
3476
          *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3477
3477
            pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
3478
3478
          *-*-hpux*)
3479
3479
            pic_flag_for_symtable=" $pic_flag"  ;;
3985
3985
# launches target application with the remaining arguments.
3986
3986
func_exec_program ()
3987
3987
{
3988
 
  for lt_wr_arg
3989
 
  do
3990
 
    case \$lt_wr_arg in
3991
 
    --lt-*) ;;
3992
 
    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3993
 
    esac
3994
 
    shift
3995
 
  done
 
3988
  case \" \$* \" in
 
3989
  *\\ --lt-*)
 
3990
    for lt_wr_arg
 
3991
    do
 
3992
      case \$lt_wr_arg in
 
3993
      --lt-*) ;;
 
3994
      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
 
3995
      esac
 
3996
      shift
 
3997
    done ;;
 
3998
  esac
3996
3999
  func_exec_program_core \${1+\"\$@\"}
3997
4000
}
3998
4001
 
5060
5063
{
5061
5064
EOF
5062
5065
            func_emit_wrapper yes |
5063
 
              $SED -e 's/\([\\"]\)/\\\1/g' \
5064
 
                   -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
5065
 
 
 
5066
              $SED -n -e '
 
5067
s/^\(.\{79\}\)\(..*\)/\1\
 
5068
\2/
 
5069
h
 
5070
s/\([\\"]\)/\\\1/g
 
5071
s/$/\\n/
 
5072
s/\([^\n]*\).*/  fputs ("\1", f);/p
 
5073
g
 
5074
D'
5066
5075
            cat <<"EOF"
5067
5076
}
5068
5077
EOF
5646
5655
        continue
5647
5656
        ;;
5648
5657
 
5649
 
      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
 
5658
      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
 
5659
      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5650
5660
        func_append compiler_flags " $arg"
5651
5661
        func_append compile_command " $arg"
5652
5662
        func_append finalize_command " $arg"
5987
5997
      fi
5988
5998
    done # argument parsing loop
5989
5999
 
5990
 
    if test "$module" = yes ; then
5991
 
      # [Mandriva] dropping ld option "--no-undefined" which is wrong for plugins
5992
 
      linker_flags=`$ECHO "X $linker_flags" | $Xsed -e 's/ --no-undefined//'`
5993
 
      compiler_flags=`$ECHO "X $compiler_flags" | $Xsed -e 's/ -Wl,--no-undefined//'`
5994
 
    fi
5995
 
 
5996
6000
    test -n "$prev" && \
5997
6001
      func_fatal_help "the \`$prevarg' option requires an argument"
5998
6002
 
6120
6124
        case $pass in
6121
6125
        dlopen) libs="$dlfiles" ;;
6122
6126
        dlpreopen) libs="$dlprefiles" ;;
6123
 
        link)
6124
 
          libs="$deplibs %DEPLIBS%"
6125
 
          test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
6126
 
          ;;
 
6127
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
6127
6128
        esac
6128
6129
      fi
6129
6130
      if test "$linkmode,$pass" = "lib,dlpreopen"; then
6159
6160
        lib=
6160
6161
        found=no
6161
6162
        case $deplib in
6162
 
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
 
6163
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
 
6164
        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
6163
6165
          if test "$linkmode,$pass" = "prog,link"; then
6164
6166
            compile_deplibs="$deplib $compile_deplibs"
6165
6167
            finalize_deplibs="$deplib $finalize_deplibs"
6843
6845
                 test "$hardcode_direct_absolute" = no; then
6844
6846
                add="$dir/$linklib"
6845
6847
              elif test "$hardcode_minus_L" = yes; then
6846
 
                add_dir="-L$dir"
 
6848
                add_dir="-L$absdir"
6847
6849
                # Try looking first in the location we're being installed to.
6848
6850
                if test -n "$inst_prefix_dir"; then
6849
6851
                  case $libdir in
7328
7330
          # which has an extra 1 added just for fun
7329
7331
          #
7330
7332
          case $version_type in
 
7333
          # correct linux to gnu/linux during the next big refactor
7331
7334
          darwin|linux|osf|windows|none)
7332
7335
            func_arith $number_major + $number_minor
7333
7336
            current=$func_arith_result
7444
7447
          versuffix="$major.$revision"
7445
7448
          ;;
7446
7449
 
7447
 
        linux)
 
7450
        linux) # correct to gnu/linux during the next big refactor
7448
7451
          func_arith $current - $age
7449
7452
          major=.$func_arith_result
7450
7453
          versuffix="$major.$age.$revision"
8032
8035
 
8033
8036
      # Test again, we may have decided not to build it any more
8034
8037
      if test "$build_libtool_libs" = yes; then
 
8038
        # Remove ${wl} instances when linking with ld.
 
8039
        # FIXME: should test the right _cmds variable.
 
8040
        case $archive_cmds in
 
8041
          *\$LD\ *) wl= ;;
 
8042
        esac
8035
8043
        if test "$hardcode_into_libs" = yes; then
8036
8044
          # Hardcode the library paths
8037
8045
          hardcode_libdirs=
8062
8070
            elif test -n "$runpath_var"; then
8063
8071
              case "$perm_rpath " in
8064
8072
              *" $libdir "*) ;;
8065
 
              *) func_apped perm_rpath " $libdir" ;;
 
8073
              *) func_append perm_rpath " $libdir" ;;
8066
8074
              esac
8067
8075
            fi
8068
8076
          done
8070
8078
          if test -n "$hardcode_libdir_separator" &&
8071
8079
             test -n "$hardcode_libdirs"; then
8072
8080
            libdir="$hardcode_libdirs"
8073
 
            if test -n "$hardcode_libdir_flag_spec_ld"; then
8074
 
              eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
8075
 
            else
8076
 
              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
8077
 
            fi
 
8081
            eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
8078
8082
          fi
8079
8083
          if test -n "$runpath_var" && test -n "$perm_rpath"; then
8080
8084
            # We should set the runpath_var.
8234
8238
        fi
8235
8239
 
8236
8240
        tmp_deplibs=
8237
 
        inst_prefix_arg=
8238
8241
        for test_deplib in $deplibs; do
8239
8242
          case " $convenience " in
8240
8243
          *" $test_deplib "*) ;;
8241
8244
          *)
8242
 
            if test -n "$inst_prefix_dir" && test "$inst_prefix_dir" != "/" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then
8243
 
                func_append inst_prefix_arg " $test_deplib"
8244
 
            else
8245
 
                func_append tmp_deplibs " $test_deplib"
8246
 
            fi
 
8245
            func_append tmp_deplibs " $test_deplib"
8247
8246
            ;;
8248
8247
          esac
8249
8248
        done
8250
8249
        deplibs="$tmp_deplibs"
8251
 
        if test -n "$inst_prefix_arg"; then
8252
 
                deplibs="$inst_prefix_arg $deplibs"
8253
 
        fi
8254
8250
 
8255
8251
        if test -n "$convenience"; then
8256
8252
          if test -n "$whole_archive_flag_spec" &&
9172
9168
            esac
9173
9169
          done
9174
9170
        fi
 
9171
        func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
 
9172
        tool_oldlib=$func_to_tool_file_result
9175
9173
        eval cmds=\"$old_archive_cmds\"
9176
9174
 
9177
9175
        func_len " $cmds"
9281
9279
              *.la)
9282
9280
                func_basename "$deplib"
9283
9281
                name="$func_basename_result"
9284
 
                eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 
9282
                func_resolve_sysroot "$deplib"
 
9283
                eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
9285
9284
                test -z "$libdir" && \
9286
9285
                  func_fatal_error "\`$deplib' is not a valid libtool archive"
9287
9286
                func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"