~ubuntu-branches/ubuntu/maverick/xmedcon/maverick

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Roland Marcus Rutschmann
  • Date: 2008-03-20 16:30:00 UTC
  • mfrom: (1.1.11 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080320163000-tvridqxpeahbkax8
Tags: 0.10.4-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# NOTE: Changing this file will not affect anything until you rerun configure.
3
3
#
4
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5
 
# 2007  Free Software Foundation, Inc.
 
5
# 2007, 2008  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.24
47
 
TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
 
46
VERSION=1.5.26
 
47
TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
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
113
113
# These must not be set unconditionally because not all systems understand
114
114
# e.g. LANG=C (notably SCO).
115
115
# We save the old values to restore during execute mode.
116
 
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 
116
lt_env=
 
117
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
117
118
do
118
119
  eval "if test \"\${$lt_var+set}\" = set; then
119
120
          save_$lt_var=\$$lt_var
 
121
          lt_env=\"$lt_var=\$$lt_var \$lt_env\"
120
122
          $lt_var=C
121
123
          export $lt_var
122
124
        fi"
123
125
done
124
126
 
 
127
if test -n "$lt_env"; then
 
128
  lt_env="env $lt_env"
 
129
fi
 
130
 
125
131
# Make sure IFS has a sensible default
126
132
lt_nl='
127
133
'
499
505
    echo "\
500
506
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
501
507
 
502
 
Copyright (C) 2007  Free Software Foundation, Inc.
 
508
Copyright (C) 2008  Free Software Foundation, Inc.
503
509
This is free software; see the source for copying conditions.  There is NO
504
510
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
505
511
    exit $?
802
808
    *.for) xform=for ;;
803
809
    *.java) xform=java ;;
804
810
    *.obj) xform=obj ;;
 
811
    *.sx) xform=sx ;;
805
812
    esac
806
813
 
807
814
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
970
977
      $run $rm "$lobj" "$output_obj"
971
978
 
972
979
      $show "$command"
973
 
      if $run eval "$command"; then :
 
980
      if $run eval $lt_env "$command"; then :
974
981
      else
975
982
        test -n "$output_obj" && $run $rm $removelist
976
983
        exit $EXIT_FAILURE
1042
1049
      command="$command$suppress_output"
1043
1050
      $run $rm "$obj" "$output_obj"
1044
1051
      $show "$command"
1045
 
      if $run eval "$command"; then :
 
1052
      if $run eval $lt_env "$command"; then :
1046
1053
      else
1047
1054
        $run $rm $removelist
1048
1055
        exit $EXIT_FAILURE
1175
1182
    thread_safe=no
1176
1183
    vinfo=
1177
1184
    vinfo_number=no
 
1185
    single_module="${wl}-single_module"
1178
1186
 
1179
1187
    func_infer_tag $base_compile
1180
1188
 
1660
1668
        continue
1661
1669
        ;;
1662
1670
 
 
1671
      -multi_module)
 
1672
        single_module="${wl}-multi_module"
 
1673
        continue
 
1674
        ;;
 
1675
 
1663
1676
      -module)
1664
1677
        module=yes
1665
1678
        continue
2163
2176
            continue
2164
2177
          fi
2165
2178
          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2166
 
          for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
 
2179
          if test "$linkmode" = lib; then
 
2180
            searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
 
2181
          else
 
2182
            searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
 
2183
          fi
 
2184
          for searchdir in $searchdirs; do
2167
2185
            for search_ext in .la $std_shrext .so .a; do
2168
2186
              # Search the libtool library
2169
2187
              lib="$searchdir/lib${name}${search_ext}"
2959
2977
                  # we do not want to link against static libs,
2960
2978
                  # but need to link against shared
2961
2979
                  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
 
2980
                  eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2962
2981
                  if test -n "$deplibrary_names" ; then
2963
2982
                    for tmp in $deplibrary_names ; do
2964
2983
                      depdepl=$tmp
2965
2984
                    done
2966
 
                    if test -f "$path/$depdepl" ; then
 
2985
                    if test -f "$deplibdir/$depdepl" ; then
 
2986
                      depdepl="$deplibdir/$depdepl"
 
2987
                    elif test -f "$path/$depdepl" ; then
2967
2988
                      depdepl="$path/$depdepl"
 
2989
                    else
 
2990
                      # Can't find it, oh well...
 
2991
                      depdepl=
2968
2992
                    fi
2969
2993
                    # do not add paths which are already there
2970
2994
                    case " $newlib_search_path " in
3112
3136
 
3113
3137
    case $linkmode in
3114
3138
    oldlib)
3115
 
      if test -n "$deplibs"; then
3116
 
        $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3117
 
      fi
 
3139
      case " $deplibs" in
 
3140
      *\ -l* | *\ -L*)
 
3141
        $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
 
3142
      esac
3118
3143
 
3119
3144
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3120
3145
        $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
4251
4276
      ;;
4252
4277
 
4253
4278
    obj)
4254
 
      if test -n "$deplibs"; then
4255
 
        $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4256
 
      fi
 
4279
      case " $deplibs" in
 
4280
      *\ -l* | *\ -L*)
 
4281
        $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
 
4282
      esac
4257
4283
 
4258
4284
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4259
4285
        $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
5688
5714
                  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5689
5715
                  exit $EXIT_FAILURE
5690
5716
                fi
5691
 
                if test "X$EGREP" = X ; then
5692
 
                        EGREP=egrep
5693
 
                fi
5694
 
                # We do not want portage's install root ($D) present.  Check only for
5695
 
                # this if the .la is being installed.
5696
 
                if test "$installed" = yes && test "$D"; then
5697
 
                  eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
5698
 
                else
5699
 
                  mynewdependency_lib="$libdir/$name"
5700
 
                fi
5701
 
                # Do not add duplicates
5702
 
                if test "$mynewdependency_lib"; then
5703
 
                  my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
5704
 
                  if test -z "$my_little_ninja_foo_1"; then
5705
 
                    newdependency_libs="$newdependency_libs $mynewdependency_lib"
5706
 
                  fi
5707
 
                fi
5708
 
                ;;
5709
 
                  *)
5710
 
                if test "$installed" = yes; then
5711
 
                  # Rather use S=WORKDIR if our version of portage supports it.
5712
 
                  # This is because some ebuild (gcc) do not use $S as buildroot.
5713
 
                  if test "$PWORKDIR"; then
5714
 
                    S="$PWORKDIR"
5715
 
                  fi
5716
 
                  # We do not want portage's build root ($S) present.
5717
 
                  my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
5718
 
                  # We do not want portage's install root ($D) present.
5719
 
                  my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
5720
 
                  if test -n "$my_little_ninja_foo_2" && test "$S"; then
5721
 
                    mynewdependency_lib=""
5722
 
                  elif test -n "$my_little_ninja_foo_3" && test "$D"; then
5723
 
                    eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
5724
 
                  else
5725
 
                    mynewdependency_lib="$deplib"
5726
 
                  fi
5727
 
                else
5728
 
                  mynewdependency_lib="$deplib"
5729
 
                fi
5730
 
                # Do not add duplicates
5731
 
                if test "$mynewdependency_lib"; then
5732
 
                  my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
5733
 
                  if test -z "$my_little_ninja_foo_4"; then
5734
 
                        newdependency_libs="$newdependency_libs $mynewdependency_lib"
5735
 
                  fi
5736
 
                fi
5737
 
                ;;
 
5717
                newdependency_libs="$newdependency_libs $libdir/$name"
 
5718
                ;;
 
5719
              *) newdependency_libs="$newdependency_libs $deplib" ;;
5738
5720
              esac
5739
5721
            done
5740
5722
            dependency_libs="$newdependency_libs"
5786
5768
          case $host,$output,$installed,$module,$dlname in
5787
5769
            *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5788
5770
          esac
5789
 
          # Do not add duplicates
5790
 
          if test "$installed" = yes && test "$D"; then
5791
 
            install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
5792
 
          fi
5793
5771
          $echo > $output "\
5794
5772
# $outputname - a libtool library file
5795
5773
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6545
6523
      fi
6546
6524
 
6547
6525
      # Restore saved environment variables
6548
 
      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 
6526
      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6549
6527
      do
6550
6528
        eval "if test \"\${save_$lt_var+set}\" = set; then
6551
6529
                $lt_var=\$save_$lt_var; export $lt_var