~ubuntu-branches/ubuntu/maverick/myodbc/maverick

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2005-06-28 16:07:14 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050628160714-bbrx5607325j9rqt
Tags: 3.51.11-4
Doesn't build cleanly with REAL_64_BIT_MODE: fix some conflicting
types in MyODBC so that they're 64-bittable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
# Constants.
56
56
PROGRAM=ltmain.sh
57
57
PACKAGE=libtool
58
 
VERSION=1.5.0a
59
 
TIMESTAMP=" (1.1220.2.35 2003/11/12 18:51:58) Debian$Rev: 179 $"
 
58
VERSION=1.5.2
 
59
TIMESTAMP=" (1.1220.2.60 2004/01/25 12:25:08)"
60
60
 
61
61
default_mode=
62
62
help="Try \`$progname --help' for more information."
890
890
    no_install=no
891
891
    objs=
892
892
    non_pic_objects=
 
893
    precious_files_regex=
893
894
    prefer_static_libs=no
894
895
    preload=no
895
896
    prev=
1053
1054
          prev=
1054
1055
          continue
1055
1056
          ;;
 
1057
        precious_regex)
 
1058
          precious_files_regex="$arg"
 
1059
          prev=
 
1060
          continue
 
1061
          ;;
1056
1062
        release)
1057
1063
          release="-$arg"
1058
1064
          prev=
1419
1425
 
1420
1426
      -o) prev=output ;;
1421
1427
 
 
1428
      -precious-files-regex)
 
1429
        prev=precious_regex
 
1430
        continue
 
1431
        ;;
 
1432
 
1422
1433
      -release)
1423
1434
        prev=release
1424
1435
        continue
2321
2332
            else
2322
2333
              $show "extracting exported symbol list from \`$soname'"
2323
2334
              save_ifs="$IFS"; IFS='~'
2324
 
              eval cmds=\"$extract_expsyms_cmds\"
 
2335
              cmds=$extract_expsyms_cmds
2325
2336
              for cmd in $cmds; do
2326
2337
                IFS="$save_ifs"
 
2338
                eval cmd=\"$cmd\"
2327
2339
                $show "$cmd"
2328
2340
                $run eval "$cmd" || exit $?
2329
2341
              done
2334
2346
            if test -f "$output_objdir/$newlib"; then :; else
2335
2347
              $show "generating import library for \`$soname'"
2336
2348
              save_ifs="$IFS"; IFS='~'
2337
 
              eval cmds=\"$old_archive_from_expsyms_cmds\"
 
2349
              cmds=$old_archive_from_expsyms_cmds
2338
2350
              for cmd in $cmds; do
2339
2351
                IFS="$save_ifs"
 
2352
                eval cmd=\"$cmd\"
2340
2353
                $show "$cmd"
2341
2354
                $run eval "$cmd" || exit $?
2342
2355
              done
2615
2628
                    *" $path "*) ;;
2616
2629
                    *) newlib_search_path="$newlib_search_path $path";;
2617
2630
                    esac
2618
 
                    path=""
2619
2631
                  fi
 
2632
                  path=""
2620
2633
                  ;;
2621
2634
                *)
2622
2635
                path="-L$path"
3084
3097
            *.$objext)
3085
3098
               ;;
3086
3099
            $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
 
3100
               if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
 
3101
               then
 
3102
                 continue
 
3103
               fi
3087
3104
               removelist="$removelist $p"
3088
3105
               ;;
3089
3106
            *) ;;
3593
3610
            $show "generating symbol list for \`$libname.la'"
3594
3611
            export_symbols="$output_objdir/$libname.exp"
3595
3612
            $run $rm $export_symbols
3596
 
            eval cmds=\"$export_symbols_cmds\"
 
3613
            cmds=$export_symbols_cmds
3597
3614
            save_ifs="$IFS"; IFS='~'
3598
3615
            for cmd in $cmds; do
3599
3616
              IFS="$save_ifs"
 
3617
              eval cmd=\"$cmd\"
3600
3618
              if len=`expr "X$cmd" : ".*"` &&
3601
3619
               test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3602
3620
                $show "$cmd"
3713
3731
        # Do each of the archive commands.
3714
3732
        if test "$module" = yes && test -n "$module_cmds" ; then
3715
3733
          if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
3716
 
            eval cmds=\"$module_expsym_cmds\"
 
3734
            eval test_cmds=\"$module_expsym_cmds\"
 
3735
            cmds=$module_expsym_cmds
3717
3736
          else
3718
 
            eval cmds=\"$module_cmds\"
 
3737
            eval test_cmds=\"$module_cmds\"
 
3738
            cmds=$module_cmds
3719
3739
          fi
3720
3740
        else
3721
3741
        if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3722
 
          eval cmds=\"$archive_expsym_cmds\"
 
3742
          eval test_cmds=\"$archive_expsym_cmds\"
 
3743
          cmds=$archive_expsym_cmds
3723
3744
        else
3724
 
          eval cmds=\"$archive_cmds\"
 
3745
          eval test_cmds=\"$archive_cmds\"
 
3746
          cmds=$archive_cmds
3725
3747
          fi
3726
3748
        fi
3727
3749
 
3728
 
        if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` &&
 
3750
        if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
3729
3751
           test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3730
3752
          :
3731
3753
        else
3810
3832
          save_ifs="$IFS"; IFS='~'
3811
3833
          for cmd in $concat_cmds; do
3812
3834
            IFS="$save_ifs"
 
3835
            eval cmd=\"$cmd\"
3813
3836
            $show "$cmd"
3814
3837
            $run eval "$cmd" || exit $?
3815
3838
          done
3826
3849
          # value of $libobjs for piecewise linking.
3827
3850
 
3828
3851
          # Do each of the archive commands.
 
3852
          if test "$module" = yes && test -n "$module_cmds" ; then
 
3853
            if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 
3854
              cmds=$module_expsym_cmds
 
3855
            else
 
3856
              cmds=$module_cmds
 
3857
            fi
 
3858
          else
3829
3859
          if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3830
 
            eval cmds=\"$archive_expsym_cmds\"
 
3860
            cmds=$archive_expsym_cmds
3831
3861
          else
3832
 
            eval cmds=\"$archive_cmds\"
 
3862
            cmds=$archive_cmds
 
3863
            fi
3833
3864
          fi
3834
3865
 
3835
3866
          # Append the command to remove the reloadable object files
3836
3867
          # to the just-reset $cmds.
3837
 
          eval cmds=\"\$cmds~$rm $delfiles\"
 
3868
          eval cmds=\"\$cmds~\$rm $delfiles\"
3838
3869
        fi
3839
3870
        save_ifs="$IFS"; IFS='~'
3840
3871
        for cmd in $cmds; do
3841
3872
          IFS="$save_ifs"
 
3873
          eval cmd=\"$cmd\"
3842
3874
          $show "$cmd"
3843
3875
          $run eval "$cmd" || exit $?
3844
3876
        done
3989
4021
      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
3990
4022
 
3991
4023
      output="$obj"
3992
 
      eval cmds=\"$reload_cmds\"
 
4024
      cmds=$reload_cmds
3993
4025
      save_ifs="$IFS"; IFS='~'
3994
4026
      for cmd in $cmds; do
3995
4027
        IFS="$save_ifs"
 
4028
        eval cmd=\"$cmd\"
3996
4029
        $show "$cmd"
3997
4030
        $run eval "$cmd" || exit $?
3998
4031
      done
4025
4058
        # Only do commands if we really have different PIC objects.
4026
4059
        reload_objs="$libobjs $reload_conv_objs"
4027
4060
        output="$libobj"
4028
 
        eval cmds=\"$reload_cmds\"
 
4061
        cmds=$reload_cmds
4029
4062
        save_ifs="$IFS"; IFS='~'
4030
4063
        for cmd in $cmds; do
4031
4064
          IFS="$save_ifs"
 
4065
          eval cmd=\"$cmd\"
4032
4066
          $show "$cmd"
4033
4067
          $run eval "$cmd" || exit $?
4034
4068
        done
5000
5034
 
5001
5035
      # Do each command in the archive commands.
5002
5036
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5003
 
        eval cmds=\"$old_archive_from_new_cmds\"
 
5037
       cmds=$old_archive_from_new_cmds
5004
5038
      else
5005
5039
        eval cmds=\"$old_archive_cmds\"
5006
5040
 
5007
5041
        if len=`expr "X$cmds" : ".*"` &&
5008
5042
             test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5009
 
          :
 
5043
          cmds=$old_archive_cmds
5010
5044
        else
5011
5045
          # the command line is too long to link in one step, link in parts
5012
5046
          $echo "using piecewise archive linking..."
5058
5092
          if test "X$oldobjs" = "X" ; then
5059
5093
            eval cmds=\"\$concat_cmds\"
5060
5094
          else
5061
 
            eval cmds=\"\$concat_cmds~$old_archive_cmds\"
 
5095
            eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5062
5096
          fi
5063
5097
        fi
5064
5098
      fi
5065
5099
      save_ifs="$IFS"; IFS='~'
5066
5100
      for cmd in $cmds; do
 
5101
        eval cmd=\"$cmd\"
5067
5102
        IFS="$save_ifs"
5068
5103
        $show "$cmd"
5069
5104
        $run eval "$cmd" || exit $?
5481
5516
 
5482
5517
          # Do each command in the postinstall commands.
5483
5518
          lib="$destdir/$realname"
5484
 
          eval cmds=\"$postinstall_cmds\"
 
5519
          cmds=$postinstall_cmds
5485
5520
          save_ifs="$IFS"; IFS='~'
5486
5521
          for cmd in $cmds; do
5487
5522
            IFS="$save_ifs"
 
5523
            eval cmd=\"$cmd\"
5488
5524
            $show "$cmd"
5489
5525
            $run eval "$cmd" || exit $?
5490
5526
          done
5636
5672
            if test "$finalize" = yes && test -z "$run"; then
5637
5673
              tmpdir="/tmp"
5638
5674
              test -n "$TMPDIR" && tmpdir="$TMPDIR"
5639
 
              tmpdir="$tmpdir/libtool-$$"
5640
 
              if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
 
5675
              if tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`; then :
5641
5676
              else
5642
 
                $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
5643
 
                continue
 
5677
                tmpdir="$tmpdir/libtool-$$"
 
5678
                if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
 
5679
                else
 
5680
                  $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
 
5681
                  continue
 
5682
                fi
5644
5683
              fi
5645
5684
              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
5646
5685
              outputname="$tmpdir/$file"
5697
5736
      $show "$install_prog $file $oldlib"
5698
5737
      $run eval "$install_prog \$file \$oldlib" || exit $?
5699
5738
 
5700
 
      if test -n "$stripme" && test -n "$striplib"; then
 
5739
      if test -n "$stripme" && test -n "$old_striplib"; then
5701
5740
        $show "$old_striplib $oldlib"
5702
5741
        $run eval "$old_striplib $oldlib" || exit $?
5703
5742
      fi
5704
5743
 
5705
5744
      # Do each command in the postinstall commands.
5706
 
      eval cmds=\"$old_postinstall_cmds\"
 
5745
      cmds=$old_postinstall_cmds
5707
5746
      save_ifs="$IFS"; IFS='~'
5708
5747
      for cmd in $cmds; do
5709
5748
        IFS="$save_ifs"
 
5749
        eval cmd=\"$cmd\"
5710
5750
        $show "$cmd"
5711
5751
        $run eval "$cmd" || exit $?
5712
5752
      done
5741
5781
      for libdir in $libdirs; do
5742
5782
        if test -n "$finish_cmds"; then
5743
5783
          # Do each command in the finish commands.
5744
 
          eval cmds=\"$finish_cmds\"
 
5784
          cmds=$finish_cmds
5745
5785
          save_ifs="$IFS"; IFS='~'
5746
5786
          for cmd in $cmds; do
5747
5787
            IFS="$save_ifs"
 
5788
            eval cmd=\"$cmd\"
5748
5789
            $show "$cmd"
5749
5790
            $run eval "$cmd" || admincmds="$admincmds
5750
5791
       $cmd"
5927
5968
      fi
5928
5969
 
5929
5970
      # Now prepare to actually exec the command.
5930
 
      exec_cmd="\$cmd$args"
 
5971
      exec_cmd="\"\$cmd\"$args"
5931
5972
    else
5932
5973
      # Display what would be done.
5933
5974
      if test -n "$shlibpath_var"; then
5934
5975
        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
5935
5976
        $echo "export $shlibpath_var"
5936
5977
      fi
5937
 
      $echo "$cmd$args"
 
5978
      eval \$echo \"\$cmd\"$args
5938
5979
      exit 0
5939
5980
    fi
5940
5981
    ;;
6018
6059
          if test "$mode" = uninstall; then
6019
6060
            if test -n "$library_names"; then
6020
6061
              # Do each command in the postuninstall commands.
6021
 
              eval cmds=\"$postuninstall_cmds\"
 
6062
              cmds=$postuninstall_cmds
6022
6063
              save_ifs="$IFS"; IFS='~'
6023
6064
              for cmd in $cmds; do
6024
6065
                IFS="$save_ifs"
 
6066
                eval cmd=\"$cmd\"
6025
6067
                $show "$cmd"
6026
6068
                $run eval "$cmd"
6027
6069
                if test "$?" -ne 0 && test "$rmforce" != yes; then
6033
6075
 
6034
6076
            if test -n "$old_library"; then
6035
6077
              # Do each command in the old_postuninstall commands.
6036
 
              eval cmds=\"$old_postuninstall_cmds\"
 
6078
              cmds=$old_postuninstall_cmds
6037
6079
              save_ifs="$IFS"; IFS='~'
6038
6080
              for cmd in $cmds; do
6039
6081
                IFS="$save_ifs"
 
6082
                eval cmd=\"$cmd\"
6040
6083
                $show "$cmd"
6041
6084
                $run eval "$cmd"
6042
6085
                if test "$?" -ne 0 && test "$rmforce" != yes; then
6281
6324
  -no-undefined     declare that a library does not refer to external symbols
6282
6325
  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
6283
6326
  -objectlist FILE  Use a list of object files found in FILE to specify objects
 
6327
  -precious-files-regex REGEX
 
6328
                    don't remove output files matching REGEX
6284
6329
  -release RELEASE  specify package release information
6285
6330
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6286
6331
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries