~ubuntu-branches/ubuntu/jaunty/xserver-xorg-video-vesa/jaunty

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2007-11-07 20:32:58 UTC
  • mfrom: (0.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20071107203258-ce9sel2extj6wuv7
Tags: 1:1.3.0-4ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/patches:
    100-fedora-vesa-1.3.0-mode-heuristics.patch
    - Fix mode selection.
    101-fedora-vesa-1.2.1-randr-crash.patch
    - Fix a crash when changing the resolution
  + Change the maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
PROGRAM=ltmain.sh
45
45
PACKAGE=libtool
46
 
VERSION=1.5.22
 
46
VERSION="1.5.22 Debian 1.5.22-4"
47
47
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
48
48
 
49
 
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
50
 
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
51
 
  emulate sh
52
 
  NULLCMD=:
53
 
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
54
 
  # is contrary to our usage.  Disable this feature.
55
 
  alias -g '${1+"$@"}'='"$@"'
 
49
# See if we are running on zsh, and set the options which allow our
 
50
# commands through without removal of \ escapes.
 
51
if test -n "${ZSH_VERSION+set}" ; then
56
52
  setopt NO_GLOB_SUBST
57
 
else
58
 
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
59
53
fi
60
54
 
61
55
# Check that we have a working $echo.
111
105
# These must not be set unconditionally because not all systems understand
112
106
# e.g. LANG=C (notably SCO).
113
107
# We save the old values to restore during execute mode.
114
 
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
115
 
do
116
 
  eval "if test \"\${$lt_var+set}\" = set; then
117
 
         save_$lt_var=\$$lt_var
118
 
         $lt_var=C
119
 
         export $lt_var
120
 
       fi"
121
 
done
 
108
if test "${LC_ALL+set}" = set; then
 
109
  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
 
110
fi
 
111
if test "${LANG+set}" = set; then
 
112
  save_LANG="$LANG"; LANG=C; export LANG
 
113
fi
122
114
 
123
115
# Make sure IFS has a sensible default
124
116
lt_nl='
144
136
preserve_args=
145
137
lo2o="s/\\.lo\$/.${objext}/"
146
138
o2lo="s/\\.${objext}\$/.lo/"
147
 
extracted_archives=
148
 
extracted_serial=0
149
139
 
150
140
#####################################
151
141
# Shell function definitions:
337
327
        *) my_xabs=`pwd`"/$my_xlib" ;;
338
328
      esac
339
329
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
340
 
      my_xlib_u=$my_xlib
341
 
      while :; do
342
 
        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
348
 
      done
349
 
      extracted_archives="$extracted_archives $my_xlib_u"
350
 
      my_xdir="$my_gentop/$my_xlib_u"
 
330
      my_xdir="$my_gentop/$my_xlib"
351
331
 
352
332
      $show "${rm}r $my_xdir"
353
333
      $run ${rm}r "$my_xdir"
778
758
    *.f90) xform=f90 ;;
779
759
    *.for) xform=for ;;
780
760
    *.java) xform=java ;;
781
 
    *.obj) xform=obj ;;
782
761
    esac
783
762
 
784
763
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1159
1138
    for arg
1160
1139
    do
1161
1140
      case $arg in
1162
 
      -all-static | -static | -static-libtool-libs)
1163
 
    case $arg in
1164
 
    -all-static)
 
1141
      -all-static | -static)
 
1142
        if test "X$arg" = "X-all-static"; then
1165
1143
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1166
1144
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1167
1145
          fi
1169
1147
            dlopen_self=$dlopen_self_static
1170
1148
          fi
1171
1149
          prefer_static_libs=yes
1172
 
          ;;
1173
 
    -static)
 
1150
        else
1174
1151
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
1175
1152
            dlopen_self=$dlopen_self_static
1176
1153
          fi
1177
1154
          prefer_static_libs=built
1178
 
          ;;
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
 
1155
        fi
1186
1156
        build_libtool_libs=no
1187
1157
        build_old_libs=yes
1188
1158
        break
1742
1712
        continue
1743
1713
        ;;
1744
1714
 
1745
 
      -static | -static-libtool-libs)
 
1715
      -static)
1746
1716
        # The effects of -static are defined in a previous loop.
1747
1717
        # We used to do the same as -all-static on platforms that
1748
1718
        # didn't have a PIC flag, but the assumption that the effects
2112
2082
        case $pass in
2113
2083
        dlopen) libs="$dlfiles" ;;
2114
2084
        dlpreopen) libs="$dlprefiles" ;;
2115
 
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 
2085
        link)
 
2086
          libs="$deplibs %DEPLIBS%"
 
2087
          test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
 
2088
          ;;
2116
2089
        esac
2117
2090
      fi
2118
2091
      if test "$pass" = dlopen; then
2520
2493
 
2521
2494
        if test "$linkmode,$pass" = "prog,link"; then
2522
2495
          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
 
2496
             { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2526
2497
            # We need to hardcode the library path
2527
2498
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2528
2499
              # Make sure the rpath contains only unique directories.
3218
3189
          # which has an extra 1 added just for fun
3219
3190
          #
3220
3191
          case $version_type in
3221
 
          darwin|linux|osf|windows|none)
 
3192
          darwin|linux|osf|windows)
3222
3193
            current=`expr $number_major + $number_minor`
3223
3194
            age="$number_minor"
3224
3195
            revision="$number_revision"
3233
3204
            age="$number_minor"
3234
3205
            revision="$number_minor"
3235
3206
            ;;
 
3207
          *)
 
3208
            $echo "$modename: unknown library version type \`$version_type'" 1>&2
 
3209
            $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
 
3210
            exit $EXIT_FAILURE
 
3211
            ;;
3236
3212
          esac
3237
3213
          ;;
3238
3214
        no)
3442
3418
      fi
3443
3419
 
3444
3420
      # 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
 
3421
      for path in $notinst_path; do
 
3422
        lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
 
3423
        deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
 
3424
        dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
 
3425
      done
3450
3426
 
3451
3427
      if test -n "$xrpath"; then
3452
3428
        # If the user specified any rpath flags, then add them.
3547
3523
          int main() { return 0; }
3548
3524
EOF
3549
3525
          $rm conftest
3550
 
      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
 
3526
          $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
 
3527
          if test "$?" -eq 0 ; then
3551
3528
            ldd_output=`ldd conftest`
3552
3529
            for i in $deplibs; do
3553
3530
              name=`expr $i : '-l\(.*\)'`
3554
3531
              # If $name is empty we are operating on a -L argument.
3555
 
              if test "$name" != "" && test "$name" != "0"; then
 
3532
              if test "$name" != "" && test "$name" -ne "0"; then
3556
3533
                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3557
3534
                  case " $predeps $postdeps " in
3558
3535
                  *" $i "*)
3591
3568
              # If $name is empty we are operating on a -L argument.
3592
3569
              if test "$name" != "" && test "$name" != "0"; then
3593
3570
                $rm conftest
3594
 
                if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
 
3571
                $LTCC $LTCFLAGS -o conftest conftest.c $i
 
3572
                # Did it work?
 
3573
                if test "$?" -eq 0 ; then
3595
3574
                  ldd_output=`ldd conftest`
3596
3575
                  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3597
3576
                    case " $predeps $postdeps " in
3623
3602
                  droppeddeps=yes
3624
3603
                  $echo
3625
3604
                  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
3626
 
                  $echo "*** make it link in!  You will probably need to install it or some"
 
3605
                  $echo "***  make it link in!  You will probably need to install it or some"
3627
3606
                  $echo "*** library that it depends on before this library will be fully"
3628
3607
                  $echo "*** functional.  Installing it before continuing would be even better."
3629
3608
                fi
4268
4247
      reload_conv_objs=
4269
4248
      gentop=
4270
4249
      # reload_cmds runs $LD directly, so let us get rid of
4271
 
      # -Wl from whole_archive_flag_spec and hope we can get by with
4272
 
      # turning comma into space..
 
4250
      # -Wl from whole_archive_flag_spec
4273
4251
      wl=
4274
4252
 
4275
4253
      if test -n "$convenience"; then
4276
4254
        if test -n "$whole_archive_flag_spec"; then
4277
 
          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'`
 
4255
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4279
4256
        else
4280
4257
          gentop="$output_objdir/${obj}x"
4281
4258
          generated="$generated $gentop"
4723
4700
          case $host in
4724
4701
          *cygwin* | *mingw* )
4725
4702
            if test -f "$output_objdir/${outputname}.def" ; then
4726
 
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4727
 
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4703
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
 
4704
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4728
4705
            else
4729
 
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4730
 
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4706
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
4707
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4731
4708
             fi
4732
4709
            ;;
4733
4710
          * )
4734
 
            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4735
 
            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4711
            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
4712
            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4736
4713
            ;;
4737
4714
          esac
4738
4715
          ;;
4747
4724
        # really was required.
4748
4725
 
4749
4726
        # Nullify the symbol file.
4750
 
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4751
 
        finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
 
4727
        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
 
4728
        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4752
4729
      fi
4753
4730
 
4754
4731
      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4755
4732
        # Replace the output file specification.
4756
 
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
 
4733
        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4757
4734
        link_command="$compile_command$compile_rpath"
4758
4735
 
4759
4736
        # We have no uninstalled library dependencies, so finalize right now.
4840
4817
        if test "$fast_install" != no; then
4841
4818
          link_command="$finalize_var$compile_command$finalize_rpath"
4842
4819
          if test "$fast_install" = yes; then
4843
 
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
 
4820
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4844
4821
          else
4845
4822
            # fast_install is set to needless
4846
4823
            relink_command=
4877
4854
          fi
4878
4855
        done
4879
4856
        relink_command="(cd `pwd`; $relink_command)"
4880
 
        relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
 
4857
        relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4881
4858
      fi
4882
4859
 
4883
4860
      # Quote $echo for shipping.
5284
5261
Xsed='${SED} -e 1s/^X//'
5285
5262
sed_quote_subst='$sed_quote_subst'
5286
5263
 
5287
 
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5288
 
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5289
 
  emulate sh
5290
 
  NULLCMD=:
5291
 
  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5292
 
  # is contrary to our usage.  Disable this feature.
5293
 
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
5294
 
  setopt NO_GLOB_SUBST
5295
 
else
5296
 
  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5297
 
fi
5298
 
 
5299
5264
# The HP-UX ksh and POSIX shell print the target directory to stdout
5300
5265
# if CDPATH is set.
5301
5266
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5438
5403
          ;;
5439
5404
        esac
5440
5405
        $echo >> $output "\
5441
 
      \$echo \"\$0: cannot exec \$program \$*\"
 
5406
      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5442
5407
      exit $EXIT_FAILURE
5443
5408
    fi
5444
5409
  else
5624
5589
      done
5625
5590
      # Quote the link command for shipping.
5626
5591
      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5627
 
      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
 
5592
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5628
5593
      if test "$hardcode_automatic" = yes ; then
5629
5594
        relink_command=
5630
5595
      fi
5969
5934
 
5970
5935
          if test -n "$inst_prefix_dir"; then
5971
5936
            # Stick the inst_prefix_dir data into the link command.
5972
 
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
 
5937
            relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5973
5938
          else
5974
 
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
 
5939
            relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5975
5940
          fi
5976
5941
 
5977
5942
          $echo "$modename: warning: relinking \`$file'" 1>&2
6180
6145
              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6181
6146
              outputname="$tmpdir/$file"
6182
6147
              # Replace the output file specification.
6183
 
              relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
 
6148
              relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6184
6149
 
6185
6150
              $show "$relink_command"
6186
6151
              if $run eval "$relink_command"; then :
6456
6421
      fi
6457
6422
 
6458
6423
      # Restore saved environment variables
6459
 
      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6460
 
      do
6461
 
       eval "if test \"\${save_$lt_var+set}\" = set; then
6462
 
               $lt_var=\$save_$lt_var; export $lt_var
6463
 
             else
6464
 
               $lt_unset $lt_var
6465
 
             fi"
6466
 
      done
6467
 
 
 
6424
      if test "${save_LC_ALL+set}" = set; then
 
6425
        LC_ALL="$save_LC_ALL"; export LC_ALL
 
6426
      fi
 
6427
      if test "${save_LANG+set}" = set; then
 
6428
        LANG="$save_LANG"; export LANG
 
6429
      fi
6468
6430
 
6469
6431
      # Now prepare to actually exec the command.
6470
6432
      exec_cmd="\$cmd$args"
6821
6783
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
6822
6784
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6823
6785
  -export-symbols SYMFILE
6824
 
                    try to export only the symbols listed in SYMFILE
 
6786
                    try to export only the symbols listed in SYMFILE
6825
6787
  -export-symbols-regex REGEX
6826
 
                    try to export only the symbols matching REGEX
 
6788
                    try to export only the symbols matching REGEX
6827
6789
  -LLIBDIR          search LIBDIR for required installed libraries
6828
6790
  -lNAME            OUTPUT-FILE requires the installed library libNAME
6829
6791
  -module           build a library that can dlopened
6837
6799
  -release RELEASE  specify package release information
6838
6800
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6839
6801
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
6840
 
  -static           do not do any dynamic linking of uninstalled libtool libraries
6841
 
  -static-libtool-libs
6842
 
                    do not do any dynamic linking of libtool libraries
 
6802
  -static           do not do any dynamic linking of libtool libraries
6843
6803
  -version-info CURRENT[:REVISION[:AGE]]
6844
 
                    specify library version info [each variable defaults to 0]
 
6804
                    specify library version info [each variable defaults to 0]
6845
6805
 
6846
6806
All other options (arguments beginning with \`-') are ignored.
6847
6807