~ubuntu-branches/ubuntu/lucid/xtables-addons/lucid

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2009-09-10 21:42:05 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090910214205-neqgwq7y5nctaty7
Tags: 1.18-1
* New Upstream Version
  This version has support for 2.6.31 (Closes: #545542)
* Bump standards version (no changes)
* Depend on quilt (Closes: #533653)

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
: ${MKDIR="mkdir"}
125
125
: ${MV="mv -f"}
126
126
: ${RM="rm -f"}
127
 
: ${SED="/usr/bin/sed"}
 
127
: ${SED="/opt/local/bin/gsed"}
128
128
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
129
129
: ${Xsed="$SED -e 1s/^X//"}
130
130
 
1558
1558
 
1559
1559
  -all-static       do not do any dynamic linking at all
1560
1560
  -avoid-version    do not add a version suffix if possible
1561
 
  -Bstatic          prefer static linking for following libraries
1562
 
  -Bdynamic         prefer dynamic linking for following libraries
1563
1561
  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
1564
1562
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
1565
1563
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
4087
4085
    no_install=no
4088
4086
    objs=
4089
4087
    non_pic_objects=
4090
 
    per_deplib_static=no
4091
4088
    precious_files_regex=
4092
4089
    prefer_static_libs=no
4093
 
    prefer_static_mode=default
4094
4090
    preload=no
4095
4091
    prev=
4096
4092
    prevarg=
4144
4140
        build_old_libs=yes
4145
4141
        break
4146
4142
        ;;
4147
 
      -Bstatic | -Bdynamic)
4148
 
        per_deplib_static=yes
4149
 
        ;;
4150
4143
      esac
4151
4144
    done
4152
4145
 
4416
4409
      -all-static)
4417
4410
        if test -n "$link_static_flag"; then
4418
4411
          # See comment for -static flag below, for more details.
4419
 
                if test "$per_deplib_static" = yes; then
4420
 
                  func_fatal_error "cannot have \`-all-static' together with per-deplib \`-Bstatic' flag."
4421
 
                fi
4422
4412
          func_append compile_command " $link_static_flag"
4423
4413
          func_append finalize_command " $link_static_flag"
4424
4414
        fi
4435
4425
        continue
4436
4426
        ;;
4437
4427
 
4438
 
      -Bstatic | -Bdynamic)
4439
 
        # deplibs=$deplibs\ `$ECHO "X$arg" | $Xsed -e "s^/$wl//"`
4440
 
        deplibs="$deplibs $arg"
4441
 
        continue
4442
 
        ;;
4443
 
 
4444
4428
      -dlopen)
4445
4429
        prev=dlfiles
4446
4430
        continue
4972
4956
    for deplib in $deplibs; do
4973
4957
      if $opt_duplicate_deps ; then
4974
4958
        case "$libs " in
4975
 
        "-Bstatic " | "-Bdynamic ") ;;
4976
4959
        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4977
4960
        esac
4978
4961
      fi
5084
5067
        lib=
5085
5068
        found=no
5086
5069
        case $deplib in
5087
 
        -Bstatic|-Bdynamic)
5088
 
          if test "$linkmode,$pass" = "prog,link"; then
5089
 
            compile_deplibs="$deplib $compile_deplibs"
5090
 
            finalize_deplibs="$deplib $finalize_deplibs"
5091
 
          else
5092
 
            deplibs="$deplib $deplibs"
5093
 
          fi
5094
 
          prefer_static_mode=$deplib
5095
 
          continue
5096
 
          ;;
5097
5070
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5098
5071
          if test "$linkmode,$pass" = "prog,link"; then
5099
5072
            compile_deplibs="$deplib $compile_deplibs"
5122
5095
            searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
5123
5096
          fi
5124
5097
          for searchdir in $searchdirs; do
5125
 
            case $prefer_static_mode in
5126
 
            -Bstatic) search_exts=".la .a" ;;
5127
 
            *)        search_exts=".la $std_shrext .so .a" ;;
5128
 
            esac
5129
 
            for search_ext in $search_exts; do
 
5098
            for search_ext in .la $std_shrext .so .a; do
5130
5099
              # Search the libtool library
5131
5100
              lib="$searchdir/lib${name}${search_ext}"
5132
5101
              if test -f "$lib"; then
5535
5504
 
5536
5505
        if test "$linkmode,$pass" = "prog,link"; then
5537
5506
          if test -n "$library_names" &&
5538
 
             { { { test "$prefer_static_libs" = no ||
5539
 
                   test "$prefer_static_libs,$installed" = "built,yes"; } &&
5540
 
                 test "$prefer_static_mode" != "-Bstatic"; } ||
 
5507
             { { test "$prefer_static_libs" = no ||
 
5508
                 test "$prefer_static_libs,$installed" = "built,yes"; } ||
5541
5509
               test -z "$old_library"; }; then
5542
5510
            # We need to hardcode the library path
5543
5511
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
5585
5553
        if test "$use_static_libs" = built && test "$installed" = yes; then
5586
5554
          use_static_libs=no
5587
5555
        fi
5588
 
        if test "$prefer_static_mode" = "-Bstatic"; then
5589
 
          use_static_libs=yes
5590
 
        fi
5591
5556
        if test -n "$library_names" &&
5592
5557
           { test "$use_static_libs" = no || test -z "$old_library"; }; then
5593
5558
          case $host in
6033
5998
            # Pragmatically, this seems to cause very few problems in
6034
5999
            # practice:
6035
6000
            case $deplib in
6036
 
            -L*|-Bstatic|-Bdynamic) new_libs="$deplib $new_libs" ;;
 
6001
            -L*) new_libs="$deplib $new_libs" ;;
6037
6002
            -R*) ;;
6038
6003
            *)
6039
6004
              # And here is the reason: when a library appears more
7591
7556
      done
7592
7557
      compile_deplibs="$new_libs"
7593
7558
 
7594
 
      # substitute per-deplib flags; make sure `$wl' is expanded in shell wrapper.
7595
 
      if test "$per_deplib_static" = yes; then
7596
 
        eval per_deplib_static_flag=`$ECHO "X$per_deplib_static_flag" | $Xsed`
7597
 
        eval per_deplib_dynamic_flag=`$ECHO "X$per_deplib_dynamic_flag" | $Xsed`
7598
 
        compile_deplibs=`$ECHO "X $compile_deplibs " | $Xsed -e "\
7599
 
            s% -Bstatic % $per_deplib_static_flag %g
7600
 
            s% -Bdynamic % $per_deplib_dynamic_flag %g"`
7601
 
        finalize_deplibs=`$ECHO "X $finalize_deplibs " | $Xsed -e "\
7602
 
            s% -Bstatic % $per_deplib_static_flag %g
7603
 
            s% -Bdynamic % $per_deplib_dynamic_flag %g"`
7604
 
      fi
7605
7559
 
7606
7560
      compile_command="$compile_command $compile_deplibs"
7607
7561
      finalize_command="$finalize_command $finalize_deplibs"