~ubuntu-branches/ubuntu/hardy/sqlite3/hardy

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2007-07-28 08:51:35 UTC
  • Revision ID: james.westby@ubuntu.com-20070728085135-nt22wv0171wqn1qk
Tags: 3.4.1-1
New upstream release (closes: #436165).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# ltmain.sh - Provide generalized library-building support services.
2
2
# NOTE: Changing this file will not affect anything until you rerun configure.
3
3
#
4
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5
 
# Free Software Foundation, Inc.
 
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
 
5
# 2007  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
33
33
# function.
34
34
progpath="$0"
35
35
 
36
 
# define SED for historic ltconfig's generated by Libtool 1.3
37
 
test -z "$SED" && SED=sed
38
 
 
39
36
# The name of this program:
40
37
progname=`echo "$progpath" | $SED $basename`
41
38
modename="$progname"
46
43
 
47
44
PROGRAM=ltmain.sh
48
45
PACKAGE=libtool
49
 
VERSION=1.5.22
50
 
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
 
46
VERSION="1.5.24 Debian 1.5.24-1"
 
47
TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
51
48
 
52
 
# See if we are running on zsh, and set the options which allow our
53
 
# commands through without removal of \ escapes.
54
 
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+"$@"}'='"$@"'
55
56
  setopt NO_GLOB_SUBST
56
 
fi
57
 
# Same for EGREP, and just to be sure, do LTCC as well
58
 
if test "X$EGREP" = X ; then
59
 
    EGREP=egrep
60
 
fi
61
 
if test "X$LTCC" = X ; then
62
 
    LTCC=${CC-gcc}
63
 
fi
 
57
else
 
58
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 
59
fi
 
60
BIN_SH=xpg4; export BIN_SH # for Tru64
 
61
DUALCASE=1; export DUALCASE # for MKS sh
64
62
 
65
63
# Check that we have a working $echo.
66
64
if test "X$1" = X--no-reexec; then
115
113
# These must not be set unconditionally because not all systems understand
116
114
# e.g. LANG=C (notably SCO).
117
115
# We save the old values to restore during execute mode.
118
 
if test "${LC_ALL+set}" = set; then
119
 
  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
120
 
fi
121
 
if test "${LANG+set}" = set; then
122
 
  save_LANG="$LANG"; LANG=C; export LANG
123
 
fi
 
116
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 
117
do
 
118
  eval "if test \"\${$lt_var+set}\" = set; then
 
119
          save_$lt_var=\$$lt_var
 
120
          $lt_var=C
 
121
          export $lt_var
 
122
        fi"
 
123
done
124
124
 
125
125
# Make sure IFS has a sensible default
126
126
lt_nl='
146
146
preserve_args=
147
147
lo2o="s/\\.lo\$/.${objext}/"
148
148
o2lo="s/\\.${objext}\$/.lo/"
149
 
 
150
 
if test -z "$max_cmd_len"; then
151
 
  i=0
152
 
  testring="ABCD"
153
 
  new_result=
154
 
  
155
 
  # If test is not a shell built-in, we'll probably end up computing a
156
 
  # maximum length that is only half of the actual maximum length, but
157
 
  # we can't tell.
158
 
  while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
159
 
             = "XX$testring") >/dev/null 2>&1 &&
160
 
          new_result=`expr "X$testring" : ".*" 2>&1` &&
161
 
          max_cmd_len="$new_result" &&
162
 
          test "$i" != 17 # 1/2 MB should be enough
163
 
  do
164
 
    i=`expr $i + 1`
165
 
    testring="$testring$testring"
166
 
  done
167
 
  testring=
168
 
  # Add a significant safety factor because C++ compilers can tack on massive
169
 
  # amounts of additional arguments before passing them to the linker.
170
 
  # It appears as though 1/2 is a usable value.
171
 
  max_cmd_len=`expr $max_cmd_len \/ 2`
172
 
fi
 
149
extracted_archives=
 
150
extracted_serial=0
173
151
 
174
152
#####################################
175
153
# Shell function definitions:
230
208
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
231
209
      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
232
210
      win32_nmres=`eval $NM -f posix -A $1 | \
233
 
        $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
 
211
        $SED -n -e '1,100{
 
212
                / I /{
 
213
                        s,.*,import,
 
214
                        p
 
215
                        q
 
216
                        }
 
217
                }'`
234
218
      case $win32_nmres in
235
219
      import*)  win32_libid_type="x86 archive import";;
236
220
      *)        win32_libid_type="x86 archive static";;
291
275
            esac
292
276
            CC_quoted="$CC_quoted $arg"
293
277
          done
294
 
            # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
295
 
            trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
296
 
            # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
297
 
            extendcc=${host}-${CC}
298
 
            # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc  
299
 
            # (Gentoo-specific hack because we always export $CHOST)
300
 
            mungedcc=${CHOST-${host}}-${trimedcc}
301
278
            case "$@ " in
302
 
              "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
303
 
              "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
304
 
              tagname=CC
305
 
              break ;;
306
 
              "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
307
 
              "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
308
 
              "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
309
279
              " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
310
280
              # The compiler in the base compile command matches
311
281
              # the one in the tagged configuration.
375
345
        *) my_xabs=`pwd`"/$my_xlib" ;;
376
346
      esac
377
347
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
378
 
      my_xdir="$my_gentop/$my_xlib"
 
348
      my_xlib_u=$my_xlib
 
349
      while :; do
 
350
        case " $extracted_archives " in
 
351
        *" $my_xlib_u "*)
 
352
          extracted_serial=`expr $extracted_serial + 1`
 
353
          my_xlib_u=lt$extracted_serial-$my_xlib ;;
 
354
        *) break ;;
 
355
        esac
 
356
      done
 
357
      extracted_archives="$extracted_archives $my_xlib_u"
 
358
      my_xdir="$my_gentop/$my_xlib_u"
379
359
 
380
360
      $show "${rm}r $my_xdir"
381
361
      $run ${rm}r "$my_xdir"
502
482
    ;;
503
483
 
504
484
  --version)
505
 
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
506
 
    $echo
507
 
    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
508
 
    $echo "This is free software; see the source for copying conditions.  There is NO"
509
 
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 
485
    echo "\
 
486
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
 
487
 
 
488
Copyright (C) 2007  Free Software Foundation, Inc.
 
489
This is free software; see the source for copying conditions.  There is NO
 
490
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
510
491
    exit $?
511
492
    ;;
512
493
 
803
784
    *.class) xform=class ;;
804
785
    *.cpp) xform=cpp ;;
805
786
    *.cxx) xform=cxx ;;
806
 
    *.f90) xform=f90 ;;
 
787
    *.[fF][09]?) xform=[fF][09]. ;;
807
788
    *.for) xform=for ;;
808
789
    *.java) xform=java ;;
 
790
    *.obj) xform=obj ;;
809
791
    esac
810
792
 
811
793
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
899
881
    # Lock this critical section if it is needed
900
882
    # We use this script file to make the link, it avoids creating a new file
901
883
    if test "$need_locks" = yes; then
902
 
      until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
 
884
      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
903
885
        $show "Waiting for $lockfile to be removed"
904
886
        sleep 2
905
887
      done
1186
1168
    for arg
1187
1169
    do
1188
1170
      case $arg in
1189
 
      -all-static | -static)
1190
 
        if test "X$arg" = "X-all-static"; then
 
1171
      -all-static | -static | -static-libtool-libs)
 
1172
        case $arg in
 
1173
        -all-static)
1191
1174
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1192
1175
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1193
1176
          fi
1195
1178
            dlopen_self=$dlopen_self_static
1196
1179
          fi
1197
1180
          prefer_static_libs=yes
1198
 
        else
 
1181
          ;;
 
1182
        -static)
1199
1183
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
1200
1184
            dlopen_self=$dlopen_self_static
1201
1185
          fi
1202
1186
          prefer_static_libs=built
1203
 
        fi
 
1187
          ;;
 
1188
        -static-libtool-libs)
 
1189
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
 
1190
            dlopen_self=$dlopen_self_static
 
1191
          fi
 
1192
          prefer_static_libs=yes
 
1193
          ;;
 
1194
        esac
1204
1195
        build_libtool_libs=no
1205
1196
        build_old_libs=yes
1206
1197
        break
1648
1639
        continue
1649
1640
        ;;
1650
1641
 
1651
 
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 
1642
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1652
1643
        compiler_flags="$compiler_flags $arg"
1653
1644
        compile_command="$compile_command $arg"
1654
1645
        finalize_command="$finalize_command $arg"
1668
1659
      # -m* pass through architecture-specific compiler args for GCC
1669
1660
      # -m*, -t[45]*, -txscale* pass through architecture-specific
1670
1661
      # compiler args for GCC
1671
 
      # -pg pass through profiling flag for GCC
 
1662
      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
 
1663
      # -F/path gives path to uninstalled frameworks, gcc on darwin
1672
1664
      # @file GCC response files
1673
 
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
1674
 
      -t[45]*|-txscale*|@*)
 
1665
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
 
1666
      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1675
1667
 
1676
1668
        # Unknown arguments in both finalize_command and compile_command need
1677
1669
        # to be aesthetically quoted because they are evaled later.
1699
1691
 
1700
1692
      -no-install)
1701
1693
        case $host in
1702
 
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 
1694
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1703
1695
          # The PATH hackery in wrapper scripts is required on Windows
1704
 
          # in order for the loader to find any dlls it needs.
 
1696
          # and Darwin in order for the loader to find any dlls it needs.
1705
1697
          $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1706
1698
          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1707
1699
          fast_install=no
1760
1752
        continue
1761
1753
        ;;
1762
1754
 
1763
 
      -static)
 
1755
      -static | -static-libtool-libs)
1764
1756
        # The effects of -static are defined in a previous loop.
1765
1757
        # We used to do the same as -all-static on platforms that
1766
1758
        # didn't have a PIC flag, but the assumption that the effects
2130
2122
        case $pass in
2131
2123
        dlopen) libs="$dlfiles" ;;
2132
2124
        dlpreopen) libs="$dlprefiles" ;;
2133
 
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 
2125
        link)
 
2126
          libs="$deplibs %DEPLIBS%"
 
2127
          test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
 
2128
          ;;
2134
2129
        esac
2135
2130
      fi
2136
2131
      if test "$pass" = dlopen; then
2142
2137
        lib=
2143
2138
        found=no
2144
2139
        case $deplib in
2145
 
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 
2140
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2146
2141
          if test "$linkmode,$pass" = "prog,link"; then
2147
2142
            compile_deplibs="$deplib $compile_deplibs"
2148
2143
            finalize_deplibs="$deplib $finalize_deplibs"
2538
2533
 
2539
2534
        if test "$linkmode,$pass" = "prog,link"; then
2540
2535
          if test -n "$library_names" &&
2541
 
             { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 
2536
             { { test "$prefer_static_libs" = no ||
 
2537
                 test "$prefer_static_libs,$installed" = "built,yes"; } ||
 
2538
               test -z "$old_library"; }; then
2542
2539
            # We need to hardcode the library path
2543
2540
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2544
2541
              # Make sure the rpath contains only unique directories.
3234
3231
          # which has an extra 1 added just for fun
3235
3232
          #
3236
3233
          case $version_type in
3237
 
          darwin|linux|osf|windows)
 
3234
          darwin|linux|osf|windows|none)
3238
3235
            current=`expr $number_major + $number_minor`
3239
3236
            age="$number_minor"
3240
3237
            revision="$number_revision"
3245
3242
            age="0"
3246
3243
            ;;
3247
3244
          irix|nonstopux)
3248
 
            current=`expr $number_major + $number_minor - 1`
 
3245
            current=`expr $number_major + $number_minor`
3249
3246
            age="$number_minor"
3250
3247
            revision="$number_minor"
 
3248
            lt_irix_increment=no
 
3249
            ;;
 
3250
          *)
 
3251
            $echo "$modename: unknown library version type \`$version_type'" 1>&2
 
3252
            $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
 
3253
            exit $EXIT_FAILURE
3251
3254
            ;;
3252
3255
          esac
3253
3256
          ;;
3306
3309
          versuffix="$major.$age.$revision"
3307
3310
          # Darwin ld doesn't like 0 for these options...
3308
3311
          minor_current=`expr $current + 1`
3309
 
          verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 
3312
          xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 
3313
          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3310
3314
          ;;
3311
3315
 
3312
3316
        freebsd-aout)
3320
3324
          ;;
3321
3325
 
3322
3326
        irix | nonstopux)
3323
 
          major=`expr $current - $age + 1`
3324
 
 
 
3327
          if test "X$lt_irix_increment" = "Xno"; then
 
3328
            major=`expr $current - $age`
 
3329
          else
 
3330
            major=`expr $current - $age + 1`
 
3331
          fi
3325
3332
          case $version_type in
3326
3333
            nonstopux) verstring_prefix=nonstopux ;;
3327
3334
            *)         verstring_prefix=sgi ;;
3458
3465
      fi
3459
3466
 
3460
3467
      # Eliminate all temporary directories.
3461
 
      for path in $notinst_path; do
3462
 
        lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3463
 
        deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3464
 
        dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3465
 
      done
 
3468
      #for path in $notinst_path; do
 
3469
      # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
 
3470
      # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
 
3471
      # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
 
3472
      #done
3466
3473
 
3467
3474
      if test -n "$xrpath"; then
3468
3475
        # If the user specified any rpath flags, then add them.
3563
3570
          int main() { return 0; }
3564
3571
EOF
3565
3572
          $rm conftest
3566
 
          $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3567
 
          if test "$?" -eq 0 ; then
 
3573
          if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3568
3574
            ldd_output=`ldd conftest`
3569
3575
            for i in $deplibs; do
3570
3576
              name=`expr $i : '-l\(.*\)'`
3571
3577
              # If $name is empty we are operating on a -L argument.
3572
 
              if test "$name" != "" && test "$name" -ne "0"; then
 
3578
              if test "$name" != "" && test "$name" != "0"; then
3573
3579
                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3574
3580
                  case " $predeps $postdeps " in
3575
3581
                  *" $i "*)
3608
3614
              # If $name is empty we are operating on a -L argument.
3609
3615
              if test "$name" != "" && test "$name" != "0"; then
3610
3616
                $rm conftest
3611
 
                $LTCC $LTCFLAGS -o conftest conftest.c $i
3612
 
                # Did it work?
3613
 
                if test "$?" -eq 0 ; then
 
3617
                if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3614
3618
                  ldd_output=`ldd conftest`
3615
3619
                  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3616
3620
                    case " $predeps $postdeps " in
3642
3646
                  droppeddeps=yes
3643
3647
                  $echo
3644
3648
                  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
3645
 
                  $echo "***  make it link in!  You will probably need to install it or some"
 
3649
                  $echo "*** make it link in!  You will probably need to install it or some"
3646
3650
                  $echo "*** library that it depends on before this library will be fully"
3647
3651
                  $echo "*** functional.  Installing it before continuing would be even better."
3648
3652
                fi
3690
3694
                        *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3691
3695
                        esac
3692
3696
                      done
3693
 
                      # It is ok to link against an archive when
3694
 
                      # building a shared library.
3695
 
                      if $AR -t $potlib > /dev/null 2>&1; then
3696
 
                        newdeplibs="$newdeplibs $a_deplib"
3697
 
                        a_deplib=""
3698
 
                        break 2
3699
 
                      fi
3700
3697
                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3701
3698
                         | ${SED} 10q \
3702
3699
                         | $EGREP "$file_magic_regex" > /dev/null; then
3935
3932
             test -n "$hardcode_libdirs"; then
3936
3933
            libdir="$hardcode_libdirs"
3937
3934
            if test -n "$hardcode_libdir_flag_spec_ld"; then
3938
 
              eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
 
3935
              case $archive_cmds in
 
3936
              *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
 
3937
              *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
 
3938
              esac
3939
3939
            else
3940
3940
              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3941
3941
            fi
4294
4294
      reload_conv_objs=
4295
4295
      gentop=
4296
4296
      # reload_cmds runs $LD directly, so let us get rid of
4297
 
      # -Wl from whole_archive_flag_spec
 
4297
      # -Wl from whole_archive_flag_spec and hope we can get by with
 
4298
      # turning comma into space..
4298
4299
      wl=
4299
4300
 
4300
4301
      if test -n "$convenience"; then
4301
4302
        if test -n "$whole_archive_flag_spec"; then
4302
 
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
 
4303
          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
 
4304
          reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4303
4305
        else
4304
4306
          gentop="$output_objdir/${obj}x"
4305
4307
          generated="$generated $gentop"
4747
4749
          case $host in
4748
4750
          *cygwin* | *mingw* )
4749
4751
            if test -f "$output_objdir/${outputname}.def" ; then
4750
 
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4751
 
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
 
4752
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4753
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4752
4754
            else
4753
 
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4754
 
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
4755
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4756
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4755
4757
             fi
4756
4758
            ;;
4757
4759
          * )
4758
 
            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4759
 
            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
4760
            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4761
            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4760
4762
            ;;
4761
4763
          esac
4762
4764
          ;;
4771
4773
        # really was required.
4772
4774
 
4773
4775
        # Nullify the symbol file.
4774
 
        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4775
 
        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
 
4776
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
 
4777
        finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4776
4778
      fi
4777
4779
 
4778
4780
      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4779
4781
        # Replace the output file specification.
4780
 
        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
 
4782
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
4781
4783
        link_command="$compile_command$compile_rpath"
4782
4784
 
4783
4785
        # We have no uninstalled library dependencies, so finalize right now.
4864
4866
        if test "$fast_install" != no; then
4865
4867
          link_command="$finalize_var$compile_command$finalize_rpath"
4866
4868
          if test "$fast_install" = yes; then
4867
 
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
 
4869
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4868
4870
          else
4869
4871
            # fast_install is set to needless
4870
4872
            relink_command=
4901
4903
          fi
4902
4904
        done
4903
4905
        relink_command="(cd `pwd`; $relink_command)"
4904
 
        relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
 
4906
        relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
4905
4907
      fi
4906
4908
 
4907
4909
      # Quote $echo for shipping.
5308
5310
Xsed='${SED} -e 1s/^X//'
5309
5311
sed_quote_subst='$sed_quote_subst'
5310
5312
 
 
5313
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
 
5314
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
 
5315
  emulate sh
 
5316
  NULLCMD=:
 
5317
  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
 
5318
  # is contrary to our usage.  Disable this feature.
 
5319
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
 
5320
  setopt NO_GLOB_SUBST
 
5321
else
 
5322
  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
 
5323
fi
 
5324
BIN_SH=xpg4; export BIN_SH # for Tru64
 
5325
DUALCASE=1; export DUALCASE # for MKS sh
 
5326
 
5311
5327
# The HP-UX ksh and POSIX shell print the target directory to stdout
5312
5328
# if CDPATH is set.
5313
5329
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5434
5450
        $echo >> $output "\
5435
5451
    if test \"\$libtool_execute_magic\" != \"$magic\"; then
5436
5452
      # Run the actual program with our arguments.
5437
 
 
5438
 
      # Make sure env LD_LIBRARY_PATH does not mess us up
5439
 
      if test -n \"\${LD_LIBRARY_PATH+set}\"; then
5440
 
        export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
5441
 
      fi
5442
5453
"
5443
5454
        case $host in
5444
5455
        # Backslashes separate directories on plain windows
5455
5466
          ;;
5456
5467
        esac
5457
5468
        $echo >> $output "\
5458
 
      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
 
5469
      \$echo \"\$0: cannot exec \$program \$*\"
5459
5470
      exit $EXIT_FAILURE
5460
5471
    fi
5461
5472
  else
5641
5652
      done
5642
5653
      # Quote the link command for shipping.
5643
5654
      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5644
 
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
 
5655
      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5645
5656
      if test "$hardcode_automatic" = yes ; then
5646
5657
        relink_command=
5647
5658
      fi
5666
5677
                  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5667
5678
                  exit $EXIT_FAILURE
5668
5679
                fi
5669
 
                if test "X$EGREP" = X ; then
5670
 
                        EGREP=egrep
5671
 
                fi
5672
 
                # We do not want portage's install root ($D) present.  Check only for
5673
 
                # this if the .la is being installed.
5674
 
                if test "$installed" = yes && test "$D"; then
5675
 
                  eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
5676
 
                else
5677
 
                  mynewdependency_lib="$libdir/$name"
5678
 
                fi
5679
 
                # Do not add duplicates
5680
 
                if test "$mynewdependency_lib"; then
5681
 
                  my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
5682
 
                  if test -z "$my_little_ninja_foo_1"; then
5683
 
                    newdependency_libs="$newdependency_libs $mynewdependency_lib"
5684
 
                  fi
5685
 
                fi
5686
 
                ;;
5687
 
                  *)
5688
 
                if test "$installed" = yes; then
5689
 
                  # Rather use S=WORKDIR if our version of portage supports it.
5690
 
                  # This is because some ebuild (gcc) do not use $S as buildroot.
5691
 
                  if test "$PWORKDIR"; then
5692
 
                    S="$PWORKDIR"
5693
 
                  fi
5694
 
                  # We do not want portage's build root ($S) present.
5695
 
                  my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
5696
 
                  # We do not want portage's install root ($D) present.
5697
 
                  my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
5698
 
                  if test -n "$my_little_ninja_foo_2" && test "$S"; then
5699
 
                    mynewdependency_lib=""
5700
 
                  elif test -n "$my_little_ninja_foo_3" && test "$D"; then
5701
 
                    eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
5702
 
                  else
5703
 
                    mynewdependency_lib="$deplib"
5704
 
                  fi
5705
 
                else
5706
 
                  mynewdependency_lib="$deplib"
5707
 
                fi
5708
 
                # Do not add duplicates
5709
 
                if test "$mynewdependency_lib"; then
5710
 
                  my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
5711
 
                  if test -z "$my_little_ninja_foo_4"; then
5712
 
                        newdependency_libs="$newdependency_libs $mynewdependency_lib"
5713
 
                  fi
5714
 
                fi
5715
 
                ;;
 
5680
                newdependency_libs="$newdependency_libs $libdir/$name"
 
5681
                ;;
 
5682
              *) newdependency_libs="$newdependency_libs $deplib" ;;
5716
5683
              esac
5717
5684
            done
5718
5685
            dependency_libs="$newdependency_libs"
5764
5731
          case $host,$output,$installed,$module,$dlname in
5765
5732
            *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5766
5733
          esac
5767
 
          # Do not add duplicates
5768
 
          if test "$installed" = yes && test "$D"; then
5769
 
            install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
5770
 
          fi
5771
5734
          $echo > $output "\
5772
5735
# $outputname - a libtool library file
5773
5736
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6034
5997
 
6035
5998
          if test -n "$inst_prefix_dir"; then
6036
5999
            # Stick the inst_prefix_dir data into the link command.
6037
 
            relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
 
6000
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6038
6001
          else
6039
 
            relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 
6002
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6040
6003
          fi
6041
6004
 
6042
6005
          $echo "$modename: warning: relinking \`$file'" 1>&2
6245
6208
              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6246
6209
              outputname="$tmpdir/$file"
6247
6210
              # Replace the output file specification.
6248
 
              relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
 
6211
              relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6249
6212
 
6250
6213
              $show "$relink_command"
6251
6214
              if $run eval "$relink_command"; then :
6456
6419
        if test -f "$dir/$objdir/$dlname"; then
6457
6420
          dir="$dir/$objdir"
6458
6421
        else
6459
 
          $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6460
 
          exit $EXIT_FAILURE
 
6422
          if test ! -f "$dir/$dlname"; then
 
6423
            $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
 
6424
            exit $EXIT_FAILURE
 
6425
          fi
6461
6426
        fi
6462
6427
        ;;
6463
6428
 
6521
6486
      fi
6522
6487
 
6523
6488
      # Restore saved environment variables
6524
 
      if test "${save_LC_ALL+set}" = set; then
6525
 
        LC_ALL="$save_LC_ALL"; export LC_ALL
6526
 
      fi
6527
 
      if test "${save_LANG+set}" = set; then
6528
 
        LANG="$save_LANG"; export LANG
6529
 
      fi
 
6489
      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 
6490
      do
 
6491
        eval "if test \"\${save_$lt_var+set}\" = set; then
 
6492
                $lt_var=\$save_$lt_var; export $lt_var
 
6493
              fi"
 
6494
      done
6530
6495
 
6531
6496
      # Now prepare to actually exec the command.
6532
6497
      exec_cmd="\$cmd$args"
6883
6848
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
6884
6849
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6885
6850
  -export-symbols SYMFILE
6886
 
                    try to export only the symbols listed in SYMFILE
 
6851
                    try to export only the symbols listed in SYMFILE
6887
6852
  -export-symbols-regex REGEX
6888
 
                    try to export only the symbols matching REGEX
 
6853
                    try to export only the symbols matching REGEX
6889
6854
  -LLIBDIR          search LIBDIR for required installed libraries
6890
6855
  -lNAME            OUTPUT-FILE requires the installed library libNAME
6891
6856
  -module           build a library that can dlopened
6899
6864
  -release RELEASE  specify package release information
6900
6865
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6901
6866
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
6902
 
  -static           do not do any dynamic linking of libtool libraries
 
6867
  -static           do not do any dynamic linking of uninstalled libtool libraries
 
6868
  -static-libtool-libs
 
6869
                    do not do any dynamic linking of libtool libraries
6903
6870
  -version-info CURRENT[:REVISION[:AGE]]
6904
 
                    specify library version info [each variable defaults to 0]
 
6871
                    specify library version info [each variable defaults to 0]
6905
6872
 
6906
6873
All other options (arguments beginning with \`-') are ignored.
6907
6874