~ubuntu-branches/ubuntu/precise/libxfont/precise-security

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2007-07-18 16:46:59 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070718164659-h894n91b3dynfwi2
Tags: 1:1.3.0-0ubuntu1
* New upstream release.
* debian/control:
  - Maintainer field updated
* debian/copyright:
  - Added packaging copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
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
 
# 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
 
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+"$@"}'='"$@"'
52
56
  setopt NO_GLOB_SUBST
 
57
else
 
58
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
53
59
fi
54
60
 
55
61
# Check that we have a working $echo.
105
111
# These must not be set unconditionally because not all systems understand
106
112
# e.g. LANG=C (notably SCO).
107
113
# We save the old values to restore during execute mode.
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
 
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
114
122
 
115
123
# Make sure IFS has a sensible default
116
124
lt_nl='
136
144
preserve_args=
137
145
lo2o="s/\\.lo\$/.${objext}/"
138
146
o2lo="s/\\.${objext}\$/.lo/"
 
147
extracted_archives=
 
148
extracted_serial=0
139
149
 
140
150
#####################################
141
151
# Shell function definitions:
327
337
        *) my_xabs=`pwd`"/$my_xlib" ;;
328
338
      esac
329
339
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
330
 
      my_xdir="$my_gentop/$my_xlib"
 
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"
331
351
 
332
352
      $show "${rm}r $my_xdir"
333
353
      $run ${rm}r "$my_xdir"
758
778
    *.f90) xform=f90 ;;
759
779
    *.for) xform=for ;;
760
780
    *.java) xform=java ;;
 
781
    *.obj) xform=obj ;;
761
782
    esac
762
783
 
763
784
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1138
1159
    for arg
1139
1160
    do
1140
1161
      case $arg in
1141
 
      -all-static | -static)
1142
 
        if test "X$arg" = "X-all-static"; then
 
1162
      -all-static | -static | -static-libtool-libs)
 
1163
    case $arg in
 
1164
    -all-static)
1143
1165
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1144
1166
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1145
1167
          fi
1147
1169
            dlopen_self=$dlopen_self_static
1148
1170
          fi
1149
1171
          prefer_static_libs=yes
1150
 
        else
 
1172
          ;;
 
1173
    -static)
1151
1174
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
1152
1175
            dlopen_self=$dlopen_self_static
1153
1176
          fi
1154
1177
          prefer_static_libs=built
1155
 
        fi
 
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
1156
1186
        build_libtool_libs=no
1157
1187
        build_old_libs=yes
1158
1188
        break
1712
1742
        continue
1713
1743
        ;;
1714
1744
 
1715
 
      -static)
 
1745
      -static | -static-libtool-libs)
1716
1746
        # The effects of -static are defined in a previous loop.
1717
1747
        # We used to do the same as -all-static on platforms that
1718
1748
        # didn't have a PIC flag, but the assumption that the effects
2493
2523
 
2494
2524
        if test "$linkmode,$pass" = "prog,link"; then
2495
2525
          if test -n "$library_names" &&
2496
 
             { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 
2526
         { { test "$prefer_static_libs" = no ||
 
2527
             test "$prefer_static_libs,$installed" = "built,yes"; } ||
 
2528
           test -z "$old_library"; }; then
2497
2529
            # We need to hardcode the library path
2498
2530
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2499
2531
              # Make sure the rpath contains only unique directories.
3189
3221
          # which has an extra 1 added just for fun
3190
3222
          #
3191
3223
          case $version_type in
3192
 
          darwin|linux|osf|windows)
 
3224
          darwin|linux|osf|windows|none)
3193
3225
            current=`expr $number_major + $number_minor`
3194
3226
            age="$number_minor"
3195
3227
            revision="$number_revision"
3418
3450
      fi
3419
3451
 
3420
3452
      # Eliminate all temporary directories.
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
 
3453
#      for path in $notinst_path; do
 
3454
#       lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
 
3455
#       deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
 
3456
#       dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
 
3457
#      done
3426
3458
 
3427
3459
      if test -n "$xrpath"; then
3428
3460
        # If the user specified any rpath flags, then add them.
3523
3555
          int main() { return 0; }
3524
3556
EOF
3525
3557
          $rm conftest
3526
 
          $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3527
 
          if test "$?" -eq 0 ; then
 
3558
      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3528
3559
            ldd_output=`ldd conftest`
3529
3560
            for i in $deplibs; do
3530
3561
              name=`expr $i : '-l\(.*\)'`
3531
3562
              # If $name is empty we are operating on a -L argument.
3532
 
              if test "$name" != "" && test "$name" -ne "0"; then
 
3563
              if test "$name" != "" && test "$name" != "0"; then
3533
3564
                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3534
3565
                  case " $predeps $postdeps " in
3535
3566
                  *" $i "*)
3568
3599
              # If $name is empty we are operating on a -L argument.
3569
3600
              if test "$name" != "" && test "$name" != "0"; then
3570
3601
                $rm conftest
3571
 
                $LTCC $LTCFLAGS -o conftest conftest.c $i
3572
 
                # Did it work?
3573
 
                if test "$?" -eq 0 ; then
 
3602
                if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3574
3603
                  ldd_output=`ldd conftest`
3575
3604
                  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3576
3605
                    case " $predeps $postdeps " in
3602
3631
                  droppeddeps=yes
3603
3632
                  $echo
3604
3633
                  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
3605
 
                  $echo "***  make it link in!  You will probably need to install it or some"
 
3634
                  $echo "*** make it link in!  You will probably need to install it or some"
3606
3635
                  $echo "*** library that it depends on before this library will be fully"
3607
3636
                  $echo "*** functional.  Installing it before continuing would be even better."
3608
3637
                fi
4247
4276
      reload_conv_objs=
4248
4277
      gentop=
4249
4278
      # reload_cmds runs $LD directly, so let us get rid of
4250
 
      # -Wl from whole_archive_flag_spec
 
4279
      # -Wl from whole_archive_flag_spec and hope we can get by with
 
4280
      # turning comma into space..
4251
4281
      wl=
4252
4282
 
4253
4283
      if test -n "$convenience"; then
4254
4284
        if test -n "$whole_archive_flag_spec"; then
4255
 
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
 
4285
          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
 
4286
      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4256
4287
        else
4257
4288
          gentop="$output_objdir/${obj}x"
4258
4289
          generated="$generated $gentop"
4700
4731
          case $host in
4701
4732
          *cygwin* | *mingw* )
4702
4733
            if test -f "$output_objdir/${outputname}.def" ; then
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}%"`
 
4734
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4735
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4705
4736
            else
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}%"`
 
4737
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4738
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4708
4739
             fi
4709
4740
            ;;
4710
4741
          * )
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}%"`
 
4742
            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4743
            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4713
4744
            ;;
4714
4745
          esac
4715
4746
          ;;
4724
4755
        # really was required.
4725
4756
 
4726
4757
        # Nullify the symbol file.
4727
 
        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4728
 
        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
 
4758
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
 
4759
        finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4729
4760
      fi
4730
4761
 
4731
4762
      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4732
4763
        # Replace the output file specification.
4733
 
        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
 
4764
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
4734
4765
        link_command="$compile_command$compile_rpath"
4735
4766
 
4736
4767
        # We have no uninstalled library dependencies, so finalize right now.
4817
4848
        if test "$fast_install" != no; then
4818
4849
          link_command="$finalize_var$compile_command$finalize_rpath"
4819
4850
          if test "$fast_install" = yes; then
4820
 
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
 
4851
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4821
4852
          else
4822
4853
            # fast_install is set to needless
4823
4854
            relink_command=
4854
4885
          fi
4855
4886
        done
4856
4887
        relink_command="(cd `pwd`; $relink_command)"
4857
 
        relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
 
4888
        relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
4858
4889
      fi
4859
4890
 
4860
4891
      # Quote $echo for shipping.
5261
5292
Xsed='${SED} -e 1s/^X//'
5262
5293
sed_quote_subst='$sed_quote_subst'
5263
5294
 
 
5295
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
 
5296
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
 
5297
  emulate sh
 
5298
  NULLCMD=:
 
5299
  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
 
5300
  # is contrary to our usage.  Disable this feature.
 
5301
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
 
5302
  setopt NO_GLOB_SUBST
 
5303
else
 
5304
  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
 
5305
fi
 
5306
 
5264
5307
# The HP-UX ksh and POSIX shell print the target directory to stdout
5265
5308
# if CDPATH is set.
5266
5309
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5403
5446
          ;;
5404
5447
        esac
5405
5448
        $echo >> $output "\
5406
 
      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
 
5449
      \$echo \"\$0: cannot exec \$program \$*\"
5407
5450
      exit $EXIT_FAILURE
5408
5451
    fi
5409
5452
  else
5589
5632
      done
5590
5633
      # Quote the link command for shipping.
5591
5634
      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5592
 
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
 
5635
      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5593
5636
      if test "$hardcode_automatic" = yes ; then
5594
5637
        relink_command=
5595
5638
      fi
5934
5977
 
5935
5978
          if test -n "$inst_prefix_dir"; then
5936
5979
            # Stick the inst_prefix_dir data into the link command.
5937
 
            relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
 
5980
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
5938
5981
          else
5939
 
            relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 
5982
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
5940
5983
          fi
5941
5984
 
5942
5985
          $echo "$modename: warning: relinking \`$file'" 1>&2
6145
6188
              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6146
6189
              outputname="$tmpdir/$file"
6147
6190
              # Replace the output file specification.
6148
 
              relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
 
6191
              relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6149
6192
 
6150
6193
              $show "$relink_command"
6151
6194
              if $run eval "$relink_command"; then :
6421
6464
      fi
6422
6465
 
6423
6466
      # Restore saved environment variables
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
 
6467
      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 
6468
      do
 
6469
       eval "if test \"\${save_$lt_var+set}\" = set; then
 
6470
               $lt_var=\$save_$lt_var; export $lt_var
 
6471
             fi"
 
6472
      done
 
6473
 
6430
6474
 
6431
6475
      # Now prepare to actually exec the command.
6432
6476
      exec_cmd="\$cmd$args"
6783
6827
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
6784
6828
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6785
6829
  -export-symbols SYMFILE
6786
 
                    try to export only the symbols listed in SYMFILE
 
6830
                    try to export only the symbols listed in SYMFILE
6787
6831
  -export-symbols-regex REGEX
6788
 
                    try to export only the symbols matching REGEX
 
6832
                    try to export only the symbols matching REGEX
6789
6833
  -LLIBDIR          search LIBDIR for required installed libraries
6790
6834
  -lNAME            OUTPUT-FILE requires the installed library libNAME
6791
6835
  -module           build a library that can dlopened
6799
6843
  -release RELEASE  specify package release information
6800
6844
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6801
6845
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
6802
 
  -static           do not do any dynamic linking of libtool libraries
 
6846
  -static           do not do any dynamic linking of uninstalled libtool libraries
 
6847
  -static-libtool-libs
 
6848
                    do not do any dynamic linking of libtool libraries
6803
6849
  -version-info CURRENT[:REVISION[:AGE]]
6804
 
                    specify library version info [each variable defaults to 0]
 
6850
                    specify library version info [each variable defaults to 0]
6805
6851
 
6806
6852
All other options (arguments beginning with \`-') are ignored.
6807
6853