~ubuntu-branches/ubuntu/oneiric/suphp/oneiric

« back to all changes in this revision

Viewing changes to config/ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Emmanuel Lacour
  • Date: 2009-08-03 15:15:38 UTC
  • mfrom: (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090803151538-pv7yhe6w1mqmceas
Tags: 0.7.1-1
* New upstream release (closes: #528379, #520182) 
* debian/NEWS: add information about AddHandler -> AddType change introduced
  in 0.6.2-2 (closes: #517805)
* debian/conf/suphp.conf, debian/patches/01_debian.dpatch: switch from
  application/x-httpd-php to application/x-httpd-suphp to allow
  simultaneous use of mod_suphp and mod_php (closes: #519005, #514725)

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, 2008  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.26 Debian 1.5.26-1ubuntu1"
 
47
TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
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
 
116
lt_env=
 
117
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 
118
do
 
119
  eval "if test \"\${$lt_var+set}\" = set; then
 
120
          save_$lt_var=\$$lt_var
 
121
          lt_env=\"$lt_var=\$$lt_var \$lt_env\"
 
122
          $lt_var=C
 
123
          export $lt_var
 
124
        fi"
 
125
done
 
126
 
 
127
if test -n "$lt_env"; then
 
128
  lt_env="env $lt_env"
123
129
fi
124
130
 
125
131
# Make sure IFS has a sensible default
146
152
preserve_args=
147
153
lo2o="s/\\.lo\$/.${objext}/"
148
154
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
 
155
extracted_archives=
 
156
extracted_serial=0
173
157
 
174
158
#####################################
175
159
# Shell function definitions:
230
214
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
231
215
      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
232
216
      win32_nmres=`eval $NM -f posix -A $1 | \
233
 
        $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
 
217
        $SED -n -e '1,100{
 
218
                / I /{
 
219
                        s,.*,import,
 
220
                        p
 
221
                        q
 
222
                        }
 
223
                }'`
234
224
      case $win32_nmres in
235
225
      import*)  win32_libid_type="x86 archive import";;
236
226
      *)        win32_libid_type="x86 archive static";;
291
281
            esac
292
282
            CC_quoted="$CC_quoted $arg"
293
283
          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
284
            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
285
              " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
310
286
              # The compiler in the base compile command matches
311
287
              # the one in the tagged configuration.
375
351
        *) my_xabs=`pwd`"/$my_xlib" ;;
376
352
      esac
377
353
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
378
 
      my_xdir="$my_gentop/$my_xlib"
 
354
      my_xlib_u=$my_xlib
 
355
      while :; do
 
356
        case " $extracted_archives " in
 
357
        *" $my_xlib_u "*)
 
358
          extracted_serial=`expr $extracted_serial + 1`
 
359
          my_xlib_u=lt$extracted_serial-$my_xlib ;;
 
360
        *) break ;;
 
361
        esac
 
362
      done
 
363
      extracted_archives="$extracted_archives $my_xlib_u"
 
364
      my_xdir="$my_gentop/$my_xlib_u"
379
365
 
380
366
      $show "${rm}r $my_xdir"
381
367
      $run ${rm}r "$my_xdir"
502
488
    ;;
503
489
 
504
490
  --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."
 
491
    echo "\
 
492
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
 
493
 
 
494
Copyright (C) 2008  Free Software Foundation, Inc.
 
495
This is free software; see the source for copying conditions.  There is NO
 
496
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
510
497
    exit $?
511
498
    ;;
512
499
 
803
790
    *.class) xform=class ;;
804
791
    *.cpp) xform=cpp ;;
805
792
    *.cxx) xform=cxx ;;
806
 
    *.f90) xform=f90 ;;
 
793
    *.[fF][09]?) xform=[fF][09]. ;;
807
794
    *.for) xform=for ;;
808
795
    *.java) xform=java ;;
 
796
    *.obj) xform=obj ;;
 
797
    *.sx) xform=sx ;;
809
798
    esac
810
799
 
811
800
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
899
888
    # Lock this critical section if it is needed
900
889
    # We use this script file to make the link, it avoids creating a new file
901
890
    if test "$need_locks" = yes; then
902
 
      until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
 
891
      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
903
892
        $show "Waiting for $lockfile to be removed"
904
893
        sleep 2
905
894
      done
974
963
      $run $rm "$lobj" "$output_obj"
975
964
 
976
965
      $show "$command"
977
 
      if $run eval "$command"; then :
 
966
      if $run eval $lt_env "$command"; then :
978
967
      else
979
968
        test -n "$output_obj" && $run $rm $removelist
980
969
        exit $EXIT_FAILURE
1046
1035
      command="$command$suppress_output"
1047
1036
      $run $rm "$obj" "$output_obj"
1048
1037
      $show "$command"
1049
 
      if $run eval "$command"; then :
 
1038
      if $run eval $lt_env "$command"; then :
1050
1039
      else
1051
1040
        $run $rm $removelist
1052
1041
        exit $EXIT_FAILURE
1179
1168
    thread_safe=no
1180
1169
    vinfo=
1181
1170
    vinfo_number=no
 
1171
    single_module="${wl}-single_module"
1182
1172
 
1183
1173
    func_infer_tag $base_compile
1184
1174
 
1186
1176
    for arg
1187
1177
    do
1188
1178
      case $arg in
1189
 
      -all-static | -static)
1190
 
        if test "X$arg" = "X-all-static"; then
 
1179
      -all-static | -static | -static-libtool-libs)
 
1180
        case $arg in
 
1181
        -all-static)
1191
1182
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1192
1183
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1193
1184
          fi
1195
1186
            dlopen_self=$dlopen_self_static
1196
1187
          fi
1197
1188
          prefer_static_libs=yes
1198
 
        else
 
1189
          ;;
 
1190
        -static)
1199
1191
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
1200
1192
            dlopen_self=$dlopen_self_static
1201
1193
          fi
1202
1194
          prefer_static_libs=built
1203
 
        fi
 
1195
          ;;
 
1196
        -static-libtool-libs)
 
1197
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
 
1198
            dlopen_self=$dlopen_self_static
 
1199
          fi
 
1200
          prefer_static_libs=yes
 
1201
          ;;
 
1202
        esac
1204
1203
        build_libtool_libs=no
1205
1204
        build_old_libs=yes
1206
1205
        break
1648
1647
        continue
1649
1648
        ;;
1650
1649
 
1651
 
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 
1650
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1652
1651
        compiler_flags="$compiler_flags $arg"
1653
1652
        compile_command="$compile_command $arg"
1654
1653
        finalize_command="$finalize_command $arg"
1655
1654
        continue
1656
1655
        ;;
1657
1656
 
 
1657
      -multi_module)
 
1658
        single_module="${wl}-multi_module"
 
1659
        continue
 
1660
        ;;
 
1661
 
1658
1662
      -module)
1659
1663
        module=yes
1660
1664
        continue
1668
1672
      # -m* pass through architecture-specific compiler args for GCC
1669
1673
      # -m*, -t[45]*, -txscale* pass through architecture-specific
1670
1674
      # compiler args for GCC
1671
 
      # -pg pass through profiling flag for GCC
 
1675
      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
 
1676
      # -F/path gives path to uninstalled frameworks, gcc on darwin
1672
1677
      # @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*|@*)
 
1678
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
 
1679
      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1675
1680
 
1676
1681
        # Unknown arguments in both finalize_command and compile_command need
1677
1682
        # to be aesthetically quoted because they are evaled later.
1699
1704
 
1700
1705
      -no-install)
1701
1706
        case $host in
1702
 
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 
1707
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1703
1708
          # The PATH hackery in wrapper scripts is required on Windows
1704
 
          # in order for the loader to find any dlls it needs.
 
1709
          # and Darwin in order for the loader to find any dlls it needs.
1705
1710
          $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1706
1711
          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1707
1712
          fast_install=no
1760
1765
        continue
1761
1766
        ;;
1762
1767
 
1763
 
      -static)
 
1768
      -static | -static-libtool-libs)
1764
1769
        # The effects of -static are defined in a previous loop.
1765
1770
        # We used to do the same as -all-static on platforms that
1766
1771
        # didn't have a PIC flag, but the assumption that the effects
2130
2135
        case $pass in
2131
2136
        dlopen) libs="$dlfiles" ;;
2132
2137
        dlpreopen) libs="$dlprefiles" ;;
2133
 
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 
2138
        link)
 
2139
          libs="$deplibs %DEPLIBS%"
 
2140
          test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
 
2141
          ;;
2134
2142
        esac
2135
2143
      fi
2136
2144
      if test "$pass" = dlopen; then
2142
2150
        lib=
2143
2151
        found=no
2144
2152
        case $deplib in
2145
 
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
 
2153
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2146
2154
          if test "$linkmode,$pass" = "prog,link"; then
2147
2155
            compile_deplibs="$deplib $compile_deplibs"
2148
2156
            finalize_deplibs="$deplib $finalize_deplibs"
2157
2165
            continue
2158
2166
          fi
2159
2167
          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2160
 
          for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
 
2168
          if test "$linkmode" = lib; then
 
2169
            searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
 
2170
          else
 
2171
            searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
 
2172
          fi
 
2173
          for searchdir in $searchdirs; do
2161
2174
            for search_ext in .la $std_shrext .so .a; do
2162
2175
              # Search the libtool library
2163
2176
              lib="$searchdir/lib${name}${search_ext}"
2538
2551
 
2539
2552
        if test "$linkmode,$pass" = "prog,link"; then
2540
2553
          if test -n "$library_names" &&
2541
 
             { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 
2554
             { { test "$prefer_static_libs" = no ||
 
2555
                 test "$prefer_static_libs,$installed" = "built,yes"; } ||
 
2556
               test -z "$old_library"; }; then
2542
2557
            # We need to hardcode the library path
2543
2558
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2544
2559
              # Make sure the rpath contains only unique directories.
2951
2966
                  # we do not want to link against static libs,
2952
2967
                  # but need to link against shared
2953
2968
                  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
 
2969
                  eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2954
2970
                  if test -n "$deplibrary_names" ; then
2955
2971
                    for tmp in $deplibrary_names ; do
2956
2972
                      depdepl=$tmp
2957
2973
                    done
2958
 
                    if test -f "$path/$depdepl" ; then
 
2974
                    if test -f "$deplibdir/$depdepl" ; then
 
2975
                      depdepl="$deplibdir/$depdepl"
 
2976
                    elif test -f "$path/$depdepl" ; then
2959
2977
                      depdepl="$path/$depdepl"
 
2978
                    else
 
2979
                      # Can't find it, oh well...
 
2980
                      depdepl=
2960
2981
                    fi
2961
2982
                    # do not add paths which are already there
2962
2983
                    case " $newlib_search_path " in
3104
3125
 
3105
3126
    case $linkmode in
3106
3127
    oldlib)
3107
 
      if test -n "$deplibs"; then
3108
 
        $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3109
 
      fi
 
3128
      case " $deplibs" in
 
3129
      *\ -l* | *\ -L*)
 
3130
        $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
 
3131
      esac
3110
3132
 
3111
3133
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3112
3134
        $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3234
3256
          # which has an extra 1 added just for fun
3235
3257
          #
3236
3258
          case $version_type in
3237
 
          darwin|linux|osf|windows)
 
3259
          darwin|linux|osf|windows|none)
3238
3260
            current=`expr $number_major + $number_minor`
3239
3261
            age="$number_minor"
3240
3262
            revision="$number_revision"
3245
3267
            age="0"
3246
3268
            ;;
3247
3269
          irix|nonstopux)
3248
 
            current=`expr $number_major + $number_minor - 1`
 
3270
            current=`expr $number_major + $number_minor`
3249
3271
            age="$number_minor"
3250
3272
            revision="$number_minor"
 
3273
            lt_irix_increment=no
 
3274
            ;;
 
3275
          *)
 
3276
            $echo "$modename: unknown library version type \`$version_type'" 1>&2
 
3277
            $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
 
3278
            exit $EXIT_FAILURE
3251
3279
            ;;
3252
3280
          esac
3253
3281
          ;;
3306
3334
          versuffix="$major.$age.$revision"
3307
3335
          # Darwin ld doesn't like 0 for these options...
3308
3336
          minor_current=`expr $current + 1`
3309
 
          verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 
3337
          xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 
3338
          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3310
3339
          ;;
3311
3340
 
3312
3341
        freebsd-aout)
3320
3349
          ;;
3321
3350
 
3322
3351
        irix | nonstopux)
3323
 
          major=`expr $current - $age + 1`
3324
 
 
 
3352
          if test "X$lt_irix_increment" = "Xno"; then
 
3353
            major=`expr $current - $age`
 
3354
          else
 
3355
            major=`expr $current - $age + 1`
 
3356
          fi
3325
3357
          case $version_type in
3326
3358
            nonstopux) verstring_prefix=nonstopux ;;
3327
3359
            *)         verstring_prefix=sgi ;;
3458
3490
      fi
3459
3491
 
3460
3492
      # 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
 
3493
      #for path in $notinst_path; do
 
3494
      # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
 
3495
      # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
 
3496
      # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
 
3497
      #done
3466
3498
 
3467
3499
      if test -n "$xrpath"; then
3468
3500
        # If the user specified any rpath flags, then add them.
3563
3595
          int main() { return 0; }
3564
3596
EOF
3565
3597
          $rm conftest
3566
 
          $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3567
 
          if test "$?" -eq 0 ; then
 
3598
          if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3568
3599
            ldd_output=`ldd conftest`
3569
3600
            for i in $deplibs; do
3570
3601
              name=`expr $i : '-l\(.*\)'`
3571
3602
              # If $name is empty we are operating on a -L argument.
3572
 
              if test "$name" != "" && test "$name" -ne "0"; then
 
3603
              if test "$name" != "" && test "$name" != "0"; then
3573
3604
                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3574
3605
                  case " $predeps $postdeps " in
3575
3606
                  *" $i "*)
3608
3639
              # If $name is empty we are operating on a -L argument.
3609
3640
              if test "$name" != "" && test "$name" != "0"; then
3610
3641
                $rm conftest
3611
 
                $LTCC $LTCFLAGS -o conftest conftest.c $i
3612
 
                # Did it work?
3613
 
                if test "$?" -eq 0 ; then
 
3642
                if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3614
3643
                  ldd_output=`ldd conftest`
3615
3644
                  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3616
3645
                    case " $predeps $postdeps " in
3642
3671
                  droppeddeps=yes
3643
3672
                  $echo
3644
3673
                  $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"
 
3674
                  $echo "*** make it link in!  You will probably need to install it or some"
3646
3675
                  $echo "*** library that it depends on before this library will be fully"
3647
3676
                  $echo "*** functional.  Installing it before continuing would be even better."
3648
3677
                fi
3690
3719
                        *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3691
3720
                        esac
3692
3721
                      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
3722
                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3701
3723
                         | ${SED} 10q \
3702
3724
                         | $EGREP "$file_magic_regex" > /dev/null; then
3935
3957
             test -n "$hardcode_libdirs"; then
3936
3958
            libdir="$hardcode_libdirs"
3937
3959
            if test -n "$hardcode_libdir_flag_spec_ld"; then
3938
 
              eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
 
3960
              case $archive_cmds in
 
3961
              *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
 
3962
              *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
 
3963
              esac
3939
3964
            else
3940
3965
              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3941
3966
            fi
4245
4270
      ;;
4246
4271
 
4247
4272
    obj)
4248
 
      if test -n "$deplibs"; then
4249
 
        $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4250
 
      fi
 
4273
      case " $deplibs" in
 
4274
      *\ -l* | *\ -L*)
 
4275
        $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
 
4276
      esac
4251
4277
 
4252
4278
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4253
4279
        $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4294
4320
      reload_conv_objs=
4295
4321
      gentop=
4296
4322
      # reload_cmds runs $LD directly, so let us get rid of
4297
 
      # -Wl from whole_archive_flag_spec
 
4323
      # -Wl from whole_archive_flag_spec and hope we can get by with
 
4324
      # turning comma into space..
4298
4325
      wl=
4299
4326
 
4300
4327
      if test -n "$convenience"; then
4301
4328
        if test -n "$whole_archive_flag_spec"; then
4302
 
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
 
4329
          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
 
4330
          reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4303
4331
        else
4304
4332
          gentop="$output_objdir/${obj}x"
4305
4333
          generated="$generated $gentop"
4747
4775
          case $host in
4748
4776
          *cygwin* | *mingw* )
4749
4777
            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}%"`
 
4778
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4779
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4752
4780
            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}%"`
 
4781
              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4782
              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4755
4783
             fi
4756
4784
            ;;
4757
4785
          * )
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}%"`
 
4786
            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
 
4787
            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4760
4788
            ;;
4761
4789
          esac
4762
4790
          ;;
4771
4799
        # really was required.
4772
4800
 
4773
4801
        # 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@%%"`
 
4802
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
 
4803
        finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4776
4804
      fi
4777
4805
 
4778
4806
      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4779
4807
        # Replace the output file specification.
4780
 
        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
 
4808
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
4781
4809
        link_command="$compile_command$compile_rpath"
4782
4810
 
4783
4811
        # We have no uninstalled library dependencies, so finalize right now.
4864
4892
        if test "$fast_install" != no; then
4865
4893
          link_command="$finalize_var$compile_command$finalize_rpath"
4866
4894
          if test "$fast_install" = yes; then
4867
 
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
 
4895
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4868
4896
          else
4869
4897
            # fast_install is set to needless
4870
4898
            relink_command=
4901
4929
          fi
4902
4930
        done
4903
4931
        relink_command="(cd `pwd`; $relink_command)"
4904
 
        relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
 
4932
        relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
4905
4933
      fi
4906
4934
 
4907
4935
      # Quote $echo for shipping.
5308
5336
Xsed='${SED} -e 1s/^X//'
5309
5337
sed_quote_subst='$sed_quote_subst'
5310
5338
 
 
5339
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
 
5340
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
 
5341
  emulate sh
 
5342
  NULLCMD=:
 
5343
  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
 
5344
  # is contrary to our usage.  Disable this feature.
 
5345
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
 
5346
  setopt NO_GLOB_SUBST
 
5347
else
 
5348
  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
 
5349
fi
 
5350
BIN_SH=xpg4; export BIN_SH # for Tru64
 
5351
DUALCASE=1; export DUALCASE # for MKS sh
 
5352
 
5311
5353
# The HP-UX ksh and POSIX shell print the target directory to stdout
5312
5354
# if CDPATH is set.
5313
5355
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5434
5476
        $echo >> $output "\
5435
5477
    if test \"\$libtool_execute_magic\" != \"$magic\"; then
5436
5478
      # 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
5479
"
5443
5480
        case $host in
5444
5481
        # Backslashes separate directories on plain windows
5455
5492
          ;;
5456
5493
        esac
5457
5494
        $echo >> $output "\
5458
 
      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
 
5495
      \$echo \"\$0: cannot exec \$program \$*\"
5459
5496
      exit $EXIT_FAILURE
5460
5497
    fi
5461
5498
  else
5641
5678
      done
5642
5679
      # Quote the link command for shipping.
5643
5680
      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"`
 
5681
      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5645
5682
      if test "$hardcode_automatic" = yes ; then
5646
5683
        relink_command=
5647
5684
      fi
5666
5703
                  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5667
5704
                  exit $EXIT_FAILURE
5668
5705
                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
 
                ;;
 
5706
                newdependency_libs="$newdependency_libs $libdir/$name"
 
5707
                ;;
 
5708
              *) newdependency_libs="$newdependency_libs $deplib" ;;
5716
5709
              esac
5717
5710
            done
5718
5711
            dependency_libs="$newdependency_libs"
5764
5757
          case $host,$output,$installed,$module,$dlname in
5765
5758
            *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5766
5759
          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
5760
          $echo > $output "\
5772
5761
# $outputname - a libtool library file
5773
5762
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6034
6023
 
6035
6024
          if test -n "$inst_prefix_dir"; then
6036
6025
            # 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%"`
 
6026
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6038
6027
          else
6039
 
            relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 
6028
            relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6040
6029
          fi
6041
6030
 
6042
6031
          $echo "$modename: warning: relinking \`$file'" 1>&2
6245
6234
              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6246
6235
              outputname="$tmpdir/$file"
6247
6236
              # Replace the output file specification.
6248
 
              relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
 
6237
              relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6249
6238
 
6250
6239
              $show "$relink_command"
6251
6240
              if $run eval "$relink_command"; then :
6456
6445
        if test -f "$dir/$objdir/$dlname"; then
6457
6446
          dir="$dir/$objdir"
6458
6447
        else
6459
 
          $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6460
 
          exit $EXIT_FAILURE
 
6448
          if test ! -f "$dir/$dlname"; then
 
6449
            $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
 
6450
            exit $EXIT_FAILURE
 
6451
          fi
6461
6452
        fi
6462
6453
        ;;
6463
6454
 
6521
6512
      fi
6522
6513
 
6523
6514
      # 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
 
6515
      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 
6516
      do
 
6517
        eval "if test \"\${save_$lt_var+set}\" = set; then
 
6518
                $lt_var=\$save_$lt_var; export $lt_var
 
6519
              fi"
 
6520
      done
6530
6521
 
6531
6522
      # Now prepare to actually exec the command.
6532
6523
      exec_cmd="\$cmd$args"
6883
6874
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
6884
6875
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6885
6876
  -export-symbols SYMFILE
6886
 
                    try to export only the symbols listed in SYMFILE
 
6877
                    try to export only the symbols listed in SYMFILE
6887
6878
  -export-symbols-regex REGEX
6888
 
                    try to export only the symbols matching REGEX
 
6879
                    try to export only the symbols matching REGEX
6889
6880
  -LLIBDIR          search LIBDIR for required installed libraries
6890
6881
  -lNAME            OUTPUT-FILE requires the installed library libNAME
6891
6882
  -module           build a library that can dlopened
6899
6890
  -release RELEASE  specify package release information
6900
6891
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6901
6892
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
6902
 
  -static           do not do any dynamic linking of libtool libraries
 
6893
  -static           do not do any dynamic linking of uninstalled libtool libraries
 
6894
  -static-libtool-libs
 
6895
                    do not do any dynamic linking of libtool libraries
6903
6896
  -version-info CURRENT[:REVISION[:AGE]]
6904
 
                    specify library version info [each variable defaults to 0]
 
6897
                    specify library version info [each variable defaults to 0]
6905
6898
 
6906
6899
All other options (arguments beginning with \`-') are ignored.
6907
6900