~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/dist/libtool

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
 
3
 
# libtool - Provide generalized library-building support services.
4
 
# Generated automatically by  (GNU  )
5
 
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6
 
#
7
 
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
8
 
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9
 
#
10
 
# This program is free software; you can redistribute it and/or modify
11
 
# it under the terms of the GNU General Public License as published by
12
 
# the Free Software Foundation; either version 2 of the License, or
13
 
# (at your option) any later version.
14
 
#
15
 
# This program is distributed in the hope that it will be useful, but
16
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
 
# General Public License for more details.
19
 
#
20
 
# You should have received a copy of the GNU General Public License
21
 
# along with this program; if not, write to the Free Software
22
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
 
#
24
 
# As a special exception to the GNU General Public License, if you
25
 
# distribute this file as part of a program that contains a
26
 
# configuration script generated by Autoconf, you may include it under
27
 
# the same distribution terms that you use for the rest of that program.
28
 
 
29
 
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
30
 
Xsed="sed -e s/^X//"
31
 
 
32
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
33
 
# if CDPATH is set.
34
 
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
35
 
 
36
 
# ### BEGIN LIBTOOL CONFIG
37
 
 
38
 
# Libtool was configured on host linux-6tvq:
39
 
 
40
 
# Shell to use when invoking shell scripts.
41
 
SHELL="/bin/sh"
42
 
 
43
 
# Whether or not to build shared libraries.
44
 
build_libtool_libs=yes
45
 
 
46
 
# Whether or not to build static libraries.
47
 
build_old_libs=yes
48
 
 
49
 
# Whether or not to add -lc for building shared libraries.
50
 
build_libtool_need_lc=no
51
 
 
52
 
# Whether or not to optimize for fast installation.
53
 
fast_install=yes
54
 
 
55
 
# The host system.
56
 
host_alias=
57
 
host=x86_64-unknown-linux-gnu
58
 
 
59
 
# An echo program that does not interpret backslashes.
60
 
echo="echo"
61
 
 
62
 
# The archiver.
63
 
AR="ar"
64
 
AR_FLAGS="cru"
65
 
 
66
 
# The default C compiler.
67
 
CC="cc"
68
 
 
69
 
# Is the compiler the GNU C compiler?
70
 
with_gcc=yes
71
 
 
72
 
# The linker used to build libraries.
73
 
LD="/usr/x86_64-suse-linux/bin/ld"
74
 
 
75
 
# Whether we need hard or soft links.
76
 
LN_S="ln -s"
77
 
 
78
 
# A BSD-compatible nm program.
79
 
NM="/usr/bin/nm -B"
80
 
 
81
 
# A symbol stripping program
82
 
STRIP=strip
83
 
 
84
 
# Used to examine libraries when file_magic_cmd begins "file"
85
 
MAGIC_CMD=file
86
 
 
87
 
# Used on cygwin: DLL creation program.
88
 
DLLTOOL="dlltool"
89
 
 
90
 
# Used on cygwin: object dumper.
91
 
OBJDUMP="objdump"
92
 
 
93
 
# Used on cygwin: assembler.
94
 
AS="as"
95
 
 
96
 
# The name of the directory that contains temporary libtool files.
97
 
objdir=.libs
98
 
 
99
 
# How to create reloadable object files.
100
 
reload_flag=" -r"
101
 
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
102
 
 
103
 
# How to pass a linker flag through the compiler.
104
 
wl="-Wl,"
105
 
 
106
 
# Object file suffix (normally "o").
107
 
objext="o"
108
 
 
109
 
# Old archive suffix (normally "a").
110
 
libext="a"
111
 
 
112
 
# Executable file suffix (normally "").
113
 
exeext=""
114
 
 
115
 
# Additional compiler flags for building library objects.
116
 
pic_flag=" -fPIC"
117
 
pic_mode=default
118
 
 
119
 
# Does compiler simultaneously support -c and -o options?
120
 
compiler_c_o="yes"
121
 
 
122
 
# Can we write directly to a .lo ?
123
 
compiler_o_lo="yes"
124
 
 
125
 
# Must we lock files when doing compilation ?
126
 
need_locks="no"
127
 
 
128
 
# Do we need the lib prefix for modules?
129
 
need_lib_prefix=no
130
 
 
131
 
# Do we need a version for libraries?
132
 
need_version=no
133
 
 
134
 
# Whether dlopen is supported.
135
 
dlopen_support=unknown
136
 
 
137
 
# Whether dlopen of programs is supported.
138
 
dlopen_self=unknown
139
 
 
140
 
# Whether dlopen of statically linked programs is supported.
141
 
dlopen_self_static=unknown
142
 
 
143
 
# Compiler flag to prevent dynamic linking.
144
 
link_static_flag="-static"
145
 
 
146
 
# Compiler flag to turn off builtin functions.
147
 
no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions"
148
 
 
149
 
# Compiler flag to allow reflexive dlopens.
150
 
export_dynamic_flag_spec="\${wl}--export-dynamic"
151
 
 
152
 
# Compiler flag to generate shared objects directly from archives.
153
 
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
154
 
 
155
 
# Compiler flag to generate thread-safe objects.
156
 
thread_safe_flag_spec=""
157
 
 
158
 
# Library versioning type.
159
 
version_type=linux
160
 
 
161
 
# Format of library name prefix.
162
 
libname_spec="lib\$name"
163
 
 
164
 
# List of archive names.  First name is the real one, the rest are links.
165
 
# The last name is the one that the linker finds with -lNAME.
166
 
library_names_spec="\${libname}\${release}.so\$versuffix \${libname}\${release}.so\$major \$libname.so"
167
 
 
168
 
# The coded name of the library, if different from the real name.
169
 
soname_spec="\${libname}\${release}.so\$major"
170
 
 
171
 
# Commands used to build and install an old-style archive.
172
 
RANLIB="ranlib"
173
 
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
174
 
old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
175
 
old_postuninstall_cmds=""
176
 
 
177
 
# Create an old-style archive from a shared archive.
178
 
old_archive_from_new_cmds=""
179
 
 
180
 
# Create a temporary old-style archive to link instead of a shared archive.
181
 
old_archive_from_expsyms_cmds=""
182
 
 
183
 
# Commands used to build and install a shared archive.
184
 
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
185
 
archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
186
 
postinstall_cmds=""
187
 
postuninstall_cmds=""
188
 
 
189
 
# Commands to strip libraries.
190
 
old_striplib="strip --strip-debug"
191
 
striplib="strip --strip-unneeded"
192
 
 
193
 
# Method to check whether dependent libraries are shared objects.
194
 
deplibs_check_method="pass_all"
195
 
 
196
 
# Command to use when deplibs_check_method == file_magic.
197
 
file_magic_cmd="\$MAGIC_CMD"
198
 
 
199
 
# Flag that allows shared libraries with undefined symbols to be built.
200
 
allow_undefined_flag=""
201
 
 
202
 
# Flag that forces no undefined symbols.
203
 
no_undefined_flag=""
204
 
 
205
 
# Commands used to finish a libtool library installation in a directory.
206
 
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
207
 
 
208
 
# Same as above, but a single script fragment to be evaled but not shown.
209
 
finish_eval=""
210
 
 
211
 
# Take the output of nm and produce a listing of raw symbols and C names.
212
 
global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGISTW][ABCDGISTW]*\\)[         ][      ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
213
 
 
214
 
# Transform the output of nm in a proper C declaration
215
 
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern char \\1;/p'"
216
 
 
217
 
# Transform the output of nm in a C name address pair
218
 
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
219
 
 
220
 
# This is the shared library runtime path variable.
221
 
runpath_var=LD_RUN_PATH
222
 
 
223
 
# This is the shared library path variable.
224
 
shlibpath_var=LD_LIBRARY_PATH
225
 
 
226
 
# Is shlibpath searched before the hard-coded library search path?
227
 
shlibpath_overrides_runpath=no
228
 
 
229
 
# How to hardcode a shared library path into an executable.
230
 
hardcode_action=immediate
231
 
 
232
 
# Whether we should hardcode library paths into libraries.
233
 
hardcode_into_libs=yes
234
 
 
235
 
# Flag to hardcode $libdir into a binary during linking.
236
 
# This must work even if $libdir does not exist.
237
 
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
238
 
 
239
 
# Whether we need a single -rpath flag with a separated argument.
240
 
hardcode_libdir_separator=""
241
 
 
242
 
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
243
 
# resulting binary.
244
 
hardcode_direct=no
245
 
 
246
 
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
247
 
# resulting binary.
248
 
hardcode_minus_L=no
249
 
 
250
 
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
251
 
# the resulting binary.
252
 
hardcode_shlibpath_var=unsupported
253
 
 
254
 
# Variables whose values should be saved in libtool wrapper scripts and
255
 
# restored at relink time.
256
 
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
257
 
 
258
 
# Whether libtool must link a program against all its dependency libraries.
259
 
link_all_deplibs=unknown
260
 
 
261
 
# Compile-time system search path for libraries
262
 
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
263
 
 
264
 
# Run-time system search path for libraries
265
 
sys_lib_dlsearch_path_spec="/lib /usr/lib"
266
 
 
267
 
# Fix the shell variable $srcfile for the compiler.
268
 
fix_srcfile_path=""
269
 
 
270
 
# Set to yes if exported symbols are required.
271
 
always_export_symbols=no
272
 
 
273
 
# The commands to list exported symbols.
274
 
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | sed 's/.* //' | sort | uniq > \$export_symbols"
275
 
 
276
 
# The commands to extract the exported symbol list from a shared archive.
277
 
extract_expsyms_cmds=""
278
 
 
279
 
# Symbols that should not be listed in the preloaded symbols.
280
 
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
281
 
 
282
 
# Symbols that must always be exported.
283
 
include_expsyms=""
284
 
 
285
 
# ### END LIBTOOL CONFIG
286
 
 
287
 
# ltmain.sh - Provide generalized library-building support services.
288
 
# NOTE: Changing this file will not affect anything until you rerun configure.
289
 
#
290
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
291
 
# Free Software Foundation, Inc.
292
 
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
293
 
#
294
 
# This program is free software; you can redistribute it and/or modify
295
 
# it under the terms of the GNU General Public License as published by
296
 
# the Free Software Foundation; either version 2 of the License, or
297
 
# (at your option) any later version.
298
 
#
299
 
# This program is distributed in the hope that it will be useful, but
300
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
301
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
302
 
# General Public License for more details.
303
 
#
304
 
# You should have received a copy of the GNU General Public License
305
 
# along with this program; if not, write to the Free Software
306
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
307
 
#
308
 
# As a special exception to the GNU General Public License, if you
309
 
# distribute this file as part of a program that contains a
310
 
# configuration script generated by Autoconf, you may include it under
311
 
# the same distribution terms that you use for the rest of that program.
312
 
 
313
 
# Check that we have a working $echo.
314
 
if test "X$1" = X--no-reexec; then
315
 
  # Discard the --no-reexec flag, and continue.
316
 
  shift
317
 
elif test "X$1" = X--fallback-echo; then
318
 
  # Avoid inline document here, it may be left over
319
 
  :
320
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
321
 
  # Yippee, $echo works!
322
 
  :
323
 
else
324
 
  # Restart under the correct shell, and then maybe $echo will work.
325
 
  exec $SHELL "$0" --no-reexec ${1+"$@"}
326
 
fi
327
 
 
328
 
if test "X$1" = X--fallback-echo; then
329
 
  # used as fallback echo
330
 
  shift
331
 
  cat <<EOF
332
 
$*
333
 
EOF
334
 
  exit 0
335
 
fi
336
 
 
337
 
# The name of this program.
338
 
progname=`$echo "$0" | sed 's%^.*/%%'`
339
 
modename="$progname"
340
 
 
341
 
# Constants.
342
 
PROGRAM=ltmain.sh
343
 
PACKAGE=libtool
344
 
VERSION=1.4.2
345
 
TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
346
 
 
347
 
default_mode=
348
 
help="Try \`$progname --help' for more information."
349
 
magic="%%%MAGIC variable%%%"
350
 
mkdir="mkdir"
351
 
mv="mv -f"
352
 
rm="rm -f"
353
 
 
354
 
# Sed substitution that helps us do robust quoting.  It backslashifies
355
 
# metacharacters that are still active within double-quoted strings.
356
 
Xsed='sed -e 1s/^X//'
357
 
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
358
 
SP2NL='tr \040 \012'
359
 
NL2SP='tr \015\012 \040\040'
360
 
 
361
 
# NLS nuisances.
362
 
# Only set LANG and LC_ALL to C if already set.
363
 
# These must not be set unconditionally because not all systems understand
364
 
# e.g. LANG=C (notably SCO).
365
 
# We save the old values to restore during execute mode.
366
 
if test "${LC_ALL+set}" = set; then
367
 
  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
368
 
fi
369
 
if test "${LANG+set}" = set; then
370
 
  save_LANG="$LANG"; LANG=C; export LANG
371
 
fi
372
 
 
373
 
# Make sure IFS has a sensible default
374
 
: ${IFS="       "}
375
 
 
376
 
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
377
 
  echo "$modename: not configured to build any kind of library" 1>&2
378
 
  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
379
 
  exit 1
380
 
fi
381
 
 
382
 
# Global variables.
383
 
mode=$default_mode
384
 
nonopt=
385
 
prev=
386
 
prevopt=
387
 
run=
388
 
show="$echo"
389
 
show_help=
390
 
execute_dlfiles=
391
 
lo2o="s/\\.lo\$/.${objext}/"
392
 
o2lo="s/\\.${objext}\$/.lo/"
393
 
 
394
 
# Parse our command line options once, thoroughly.
395
 
while test $# -gt 0
396
 
do
397
 
  arg="$1"
398
 
  shift
399
 
 
400
 
  case $arg in
401
 
  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
402
 
  *) optarg= ;;
403
 
  esac
404
 
 
405
 
  # If the previous option needs an argument, assign it.
406
 
  if test -n "$prev"; then
407
 
    case $prev in
408
 
    execute_dlfiles)
409
 
      execute_dlfiles="$execute_dlfiles $arg"
410
 
      ;;
411
 
    *)
412
 
      eval "$prev=\$arg"
413
 
      ;;
414
 
    esac
415
 
 
416
 
    prev=
417
 
    prevopt=
418
 
    continue
419
 
  fi
420
 
 
421
 
  # Have we seen a non-optional argument yet?
422
 
  case $arg in
423
 
  --help)
424
 
    show_help=yes
425
 
    ;;
426
 
 
427
 
  --version)
428
 
    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
429
 
    exit 0
430
 
    ;;
431
 
 
432
 
  --config)
433
 
    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
434
 
    exit 0
435
 
    ;;
436
 
 
437
 
  --debug)
438
 
    echo "$progname: enabling shell trace mode"
439
 
    set -x
440
 
    ;;
441
 
 
442
 
  --dry-run | -n)
443
 
    run=:
444
 
    ;;
445
 
 
446
 
  --features)
447
 
    echo "host: $host"
448
 
    if test "$build_libtool_libs" = yes; then
449
 
      echo "enable shared libraries"
450
 
    else
451
 
      echo "disable shared libraries"
452
 
    fi
453
 
    if test "$build_old_libs" = yes; then
454
 
      echo "enable static libraries"
455
 
    else
456
 
      echo "disable static libraries"
457
 
    fi
458
 
    exit 0
459
 
    ;;
460
 
 
461
 
  --finish) mode="finish" ;;
462
 
 
463
 
  --mode) prevopt="--mode" prev=mode ;;
464
 
  --mode=*) mode="$optarg" ;;
465
 
 
466
 
  --quiet | --silent)
467
 
    show=:
468
 
    ;;
469
 
 
470
 
  -dlopen)
471
 
    prevopt="-dlopen"
472
 
    prev=execute_dlfiles
473
 
    ;;
474
 
 
475
 
  -*)
476
 
    $echo "$modename: unrecognized option \`$arg'" 1>&2
477
 
    $echo "$help" 1>&2
478
 
    exit 1
479
 
    ;;
480
 
 
481
 
  *)
482
 
    nonopt="$arg"
483
 
    break
484
 
    ;;
485
 
  esac
486
 
done
487
 
 
488
 
if test -n "$prevopt"; then
489
 
  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
490
 
  $echo "$help" 1>&2
491
 
  exit 1
492
 
fi
493
 
 
494
 
# If this variable is set in any of the actions, the command in it
495
 
# will be execed at the end.  This prevents here-documents from being
496
 
# left over by shells.
497
 
exec_cmd=
498
 
 
499
 
if test -z "$show_help"; then
500
 
 
501
 
  # Infer the operation mode.
502
 
  if test -z "$mode"; then
503
 
    case $nonopt in
504
 
    *cc | *++ | gcc* | *-gcc*)
505
 
      mode=link
506
 
      for arg
507
 
      do
508
 
        case $arg in
509
 
        -c)
510
 
           mode=compile
511
 
           break
512
 
           ;;
513
 
        esac
514
 
      done
515
 
      ;;
516
 
    *db | *dbx | *strace | *truss)
517
 
      mode=execute
518
 
      ;;
519
 
    *install*|cp|mv)
520
 
      mode=install
521
 
      ;;
522
 
    *rm)
523
 
      mode=uninstall
524
 
      ;;
525
 
    *)
526
 
      # If we have no mode, but dlfiles were specified, then do execute mode.
527
 
      test -n "$execute_dlfiles" && mode=execute
528
 
 
529
 
      # Just use the default operation mode.
530
 
      if test -z "$mode"; then
531
 
        if test -n "$nonopt"; then
532
 
          $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
533
 
        else
534
 
          $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
535
 
        fi
536
 
      fi
537
 
      ;;
538
 
    esac
539
 
  fi
540
 
 
541
 
  # Only execute mode is allowed to have -dlopen flags.
542
 
  if test -n "$execute_dlfiles" && test "$mode" != execute; then
543
 
    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
544
 
    $echo "$help" 1>&2
545
 
    exit 1
546
 
  fi
547
 
 
548
 
  # Change the help message to a mode-specific one.
549
 
  generic_help="$help"
550
 
  help="Try \`$modename --help --mode=$mode' for more information."
551
 
 
552
 
  # These modes are in order of execution frequency so that they run quickly.
553
 
  case $mode in
554
 
  # libtool compile mode
555
 
  compile)
556
 
    modename="$modename: compile"
557
 
    # Get the compilation command and the source file.
558
 
    base_compile=
559
 
    prev=
560
 
    lastarg=
561
 
    srcfile="$nonopt"
562
 
    suppress_output=
563
 
 
564
 
    user_target=no
565
 
    for arg
566
 
    do
567
 
      case $prev in
568
 
      "") ;;
569
 
      xcompiler)
570
 
        # Aesthetically quote the previous argument.
571
 
        prev=
572
 
        lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
573
 
 
574
 
        case $arg in
575
 
        # Double-quote args containing other shell metacharacters.
576
 
        # Many Bourne shells cannot handle close brackets correctly
577
 
        # in scan sets, so we specify it separately.
578
 
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
579
 
          arg="\"$arg\""
580
 
          ;;
581
 
        esac
582
 
 
583
 
        # Add the previous argument to base_compile.
584
 
        if test -z "$base_compile"; then
585
 
          base_compile="$lastarg"
586
 
        else
587
 
          base_compile="$base_compile $lastarg"
588
 
        fi
589
 
        continue
590
 
        ;;
591
 
      esac
592
 
 
593
 
      # Accept any command-line options.
594
 
      case $arg in
595
 
      -o)
596
 
        if test "$user_target" != "no"; then
597
 
          $echo "$modename: you cannot specify \`-o' more than once" 1>&2
598
 
          exit 1
599
 
        fi
600
 
        user_target=next
601
 
        ;;
602
 
 
603
 
      -static)
604
 
        build_old_libs=yes
605
 
        continue
606
 
        ;;
607
 
 
608
 
      -prefer-pic)
609
 
        pic_mode=yes
610
 
        continue
611
 
        ;;
612
 
 
613
 
      -prefer-non-pic)
614
 
        pic_mode=no
615
 
        continue
616
 
        ;;
617
 
 
618
 
      -Xcompiler)
619
 
        prev=xcompiler
620
 
        continue
621
 
        ;;
622
 
 
623
 
      -Wc,*)
624
 
        args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
625
 
        lastarg=
626
 
        save_ifs="$IFS"; IFS=','
627
 
        for arg in $args; do
628
 
          IFS="$save_ifs"
629
 
 
630
 
          # Double-quote args containing other shell metacharacters.
631
 
          # Many Bourne shells cannot handle close brackets correctly
632
 
          # in scan sets, so we specify it separately.
633
 
          case $arg in
634
 
            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
635
 
            arg="\"$arg\""
636
 
            ;;
637
 
          esac
638
 
          lastarg="$lastarg $arg"
639
 
        done
640
 
        IFS="$save_ifs"
641
 
        lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
642
 
 
643
 
        # Add the arguments to base_compile.
644
 
        if test -z "$base_compile"; then
645
 
          base_compile="$lastarg"
646
 
        else
647
 
          base_compile="$base_compile $lastarg"
648
 
        fi
649
 
        continue
650
 
        ;;
651
 
      esac
652
 
 
653
 
      case $user_target in
654
 
      next)
655
 
        # The next one is the -o target name
656
 
        user_target=yes
657
 
        continue
658
 
        ;;
659
 
      yes)
660
 
        # We got the output file
661
 
        user_target=set
662
 
        libobj="$arg"
663
 
        continue
664
 
        ;;
665
 
      esac
666
 
 
667
 
      # Accept the current argument as the source file.
668
 
      lastarg="$srcfile"
669
 
      srcfile="$arg"
670
 
 
671
 
      # Aesthetically quote the previous argument.
672
 
 
673
 
      # Backslashify any backslashes, double quotes, and dollar signs.
674
 
      # These are the only characters that are still specially
675
 
      # interpreted inside of double-quoted scrings.
676
 
      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
677
 
 
678
 
      # Double-quote args containing other shell metacharacters.
679
 
      # Many Bourne shells cannot handle close brackets correctly
680
 
      # in scan sets, so we specify it separately.
681
 
      case $lastarg in
682
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
683
 
        lastarg="\"$lastarg\""
684
 
        ;;
685
 
      esac
686
 
 
687
 
      # Add the previous argument to base_compile.
688
 
      if test -z "$base_compile"; then
689
 
        base_compile="$lastarg"
690
 
      else
691
 
        base_compile="$base_compile $lastarg"
692
 
      fi
693
 
    done
694
 
 
695
 
    case $user_target in
696
 
    set)
697
 
      ;;
698
 
    no)
699
 
      # Get the name of the library object.
700
 
      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
701
 
      ;;
702
 
    *)
703
 
      $echo "$modename: you must specify a target with \`-o'" 1>&2
704
 
      exit 1
705
 
      ;;
706
 
    esac
707
 
 
708
 
    # Recognize several different file suffixes.
709
 
    # If the user specifies -o file.o, it is replaced with file.lo
710
 
    xform='[cCFSfmso]'
711
 
    case $libobj in
712
 
    *.ada) xform=ada ;;
713
 
    *.adb) xform=adb ;;
714
 
    *.ads) xform=ads ;;
715
 
    *.asm) xform=asm ;;
716
 
    *.c++) xform=c++ ;;
717
 
    *.cc) xform=cc ;;
718
 
    *.cpp) xform=cpp ;;
719
 
    *.cxx) xform=cxx ;;
720
 
    *.f90) xform=f90 ;;
721
 
    *.for) xform=for ;;
722
 
    esac
723
 
 
724
 
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
725
 
 
726
 
    case $libobj in
727
 
    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
728
 
    *)
729
 
      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
730
 
      exit 1
731
 
      ;;
732
 
    esac
733
 
 
734
 
    if test -z "$base_compile"; then
735
 
      $echo "$modename: you must specify a compilation command" 1>&2
736
 
      $echo "$help" 1>&2
737
 
      exit 1
738
 
    fi
739
 
 
740
 
    # Delete any leftover library objects.
741
 
    if test "$build_old_libs" = yes; then
742
 
      removelist="$obj $libobj"
743
 
    else
744
 
      removelist="$libobj"
745
 
    fi
746
 
 
747
 
    $run $rm $removelist
748
 
    trap "$run $rm $removelist; exit 1" 1 2 15
749
 
 
750
 
    # On Cygwin there's no "real" PIC flag so we must build both object types
751
 
    case $host_os in
752
 
    cygwin* | mingw* | pw32* | os2*)
753
 
      pic_mode=default
754
 
      ;;
755
 
    esac
756
 
    if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
757
 
      # non-PIC code in shared libraries is not supported
758
 
      pic_mode=default
759
 
    fi
760
 
 
761
 
    # Calculate the filename of the output object if compiler does
762
 
    # not support -o with -c
763
 
    if test "$compiler_c_o" = no; then
764
 
      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
765
 
      lockfile="$output_obj.lock"
766
 
      removelist="$removelist $output_obj $lockfile"
767
 
      trap "$run $rm $removelist; exit 1" 1 2 15
768
 
    else
769
 
      need_locks=no
770
 
      lockfile=
771
 
    fi
772
 
 
773
 
    # Lock this critical section if it is needed
774
 
    # We use this script file to make the link, it avoids creating a new file
775
 
    if test "$need_locks" = yes; then
776
 
      until $run ln "$0" "$lockfile" 2>/dev/null; do
777
 
        $show "Waiting for $lockfile to be removed"
778
 
        sleep 2
779
 
      done
780
 
    elif test "$need_locks" = warn; then
781
 
      if test -f "$lockfile"; then
782
 
        echo "\
783
 
*** ERROR, $lockfile exists and contains:
784
 
`cat $lockfile 2>/dev/null`
785
 
 
786
 
This indicates that another process is trying to use the same
787
 
temporary object file, and libtool could not work around it because
788
 
your compiler does not support \`-c' and \`-o' together.  If you
789
 
repeat this compilation, it may succeed, by chance, but you had better
790
 
avoid parallel builds (make -j) in this platform, or get a better
791
 
compiler."
792
 
 
793
 
        $run $rm $removelist
794
 
        exit 1
795
 
      fi
796
 
      echo $srcfile > "$lockfile"
797
 
    fi
798
 
 
799
 
    if test -n "$fix_srcfile_path"; then
800
 
      eval srcfile=\"$fix_srcfile_path\"
801
 
    fi
802
 
 
803
 
    # Only build a PIC object if we are building libtool libraries.
804
 
    if test "$build_libtool_libs" = yes; then
805
 
      # Without this assignment, base_compile gets emptied.
806
 
      fbsd_hideous_sh_bug=$base_compile
807
 
 
808
 
      if test "$pic_mode" != no; then
809
 
        # All platforms use -DPIC, to notify preprocessed assembler code.
810
 
        command="$base_compile $srcfile $pic_flag -DPIC"
811
 
      else
812
 
        # Don't build PIC code
813
 
        command="$base_compile $srcfile"
814
 
      fi
815
 
      if test "$build_old_libs" = yes; then
816
 
        lo_libobj="$libobj"
817
 
        dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
818
 
        if test "X$dir" = "X$libobj"; then
819
 
          dir="$objdir"
820
 
        else
821
 
          dir="$dir/$objdir"
822
 
        fi
823
 
        libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
824
 
 
825
 
        if test -d "$dir"; then
826
 
          $show "$rm $libobj"
827
 
          $run $rm $libobj
828
 
        else
829
 
          $show "$mkdir $dir"
830
 
          $run $mkdir $dir
831
 
          status=$?
832
 
          if test $status -ne 0 && test ! -d $dir; then
833
 
            exit $status
834
 
          fi
835
 
        fi
836
 
      fi
837
 
      if test "$compiler_o_lo" = yes; then
838
 
        output_obj="$libobj"
839
 
        command="$command -o $output_obj"
840
 
      elif test "$compiler_c_o" = yes; then
841
 
        output_obj="$obj"
842
 
        command="$command -o $output_obj"
843
 
      fi
844
 
 
845
 
      $run $rm "$output_obj"
846
 
      $show "$command"
847
 
      if $run eval "$command"; then :
848
 
      else
849
 
        test -n "$output_obj" && $run $rm $removelist
850
 
        exit 1
851
 
      fi
852
 
 
853
 
      if test "$need_locks" = warn &&
854
 
         test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
855
 
        echo "\
856
 
*** ERROR, $lockfile contains:
857
 
`cat $lockfile 2>/dev/null`
858
 
 
859
 
but it should contain:
860
 
$srcfile
861
 
 
862
 
This indicates that another process is trying to use the same
863
 
temporary object file, and libtool could not work around it because
864
 
your compiler does not support \`-c' and \`-o' together.  If you
865
 
repeat this compilation, it may succeed, by chance, but you had better
866
 
avoid parallel builds (make -j) in this platform, or get a better
867
 
compiler."
868
 
 
869
 
        $run $rm $removelist
870
 
        exit 1
871
 
      fi
872
 
 
873
 
      # Just move the object if needed, then go on to compile the next one
874
 
      if test x"$output_obj" != x"$libobj"; then
875
 
        $show "$mv $output_obj $libobj"
876
 
        if $run $mv $output_obj $libobj; then :
877
 
        else
878
 
          error=$?
879
 
          $run $rm $removelist
880
 
          exit $error
881
 
        fi
882
 
      fi
883
 
 
884
 
      # If we have no pic_flag, then copy the object into place and finish.
885
 
      if (test -z "$pic_flag" || test "$pic_mode" != default) &&
886
 
         test "$build_old_libs" = yes; then
887
 
        # Rename the .lo from within objdir to obj
888
 
        if test -f $obj; then
889
 
          $show $rm $obj
890
 
          $run $rm $obj
891
 
        fi
892
 
 
893
 
        $show "$mv $libobj $obj"
894
 
        if $run $mv $libobj $obj; then :
895
 
        else
896
 
          error=$?
897
 
          $run $rm $removelist
898
 
          exit $error
899
 
        fi
900
 
 
901
 
        xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
902
 
        if test "X$xdir" = "X$obj"; then
903
 
          xdir="."
904
 
        else
905
 
          xdir="$xdir"
906
 
        fi
907
 
        baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
908
 
        libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
909
 
        # Now arrange that obj and lo_libobj become the same file
910
 
        $show "(cd $xdir && $LN_S $baseobj $libobj)"
911
 
        if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
912
 
          # Unlock the critical section if it was locked
913
 
          if test "$need_locks" != no; then
914
 
            $run $rm "$lockfile"
915
 
          fi
916
 
          exit 0
917
 
        else
918
 
          error=$?
919
 
          $run $rm $removelist
920
 
          exit $error
921
 
        fi
922
 
      fi
923
 
 
924
 
      # Allow error messages only from the first compilation.
925
 
      suppress_output=' >/dev/null 2>&1'
926
 
    fi
927
 
 
928
 
    # Only build a position-dependent object if we build old libraries.
929
 
    if test "$build_old_libs" = yes; then
930
 
      if test "$pic_mode" != yes; then
931
 
        # Don't build PIC code
932
 
        command="$base_compile $srcfile"
933
 
      else
934
 
        # All platforms use -DPIC, to notify preprocessed assembler code.
935
 
        command="$base_compile $srcfile $pic_flag -DPIC"
936
 
      fi
937
 
      if test "$compiler_c_o" = yes; then
938
 
        command="$command -o $obj"
939
 
        output_obj="$obj"
940
 
      fi
941
 
 
942
 
      # Suppress compiler output if we already did a PIC compilation.
943
 
      command="$command$suppress_output"
944
 
      $run $rm "$output_obj"
945
 
      $show "$command"
946
 
      if $run eval "$command"; then :
947
 
      else
948
 
        $run $rm $removelist
949
 
        exit 1
950
 
      fi
951
 
 
952
 
      if test "$need_locks" = warn &&
953
 
         test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
954
 
        echo "\
955
 
*** ERROR, $lockfile contains:
956
 
`cat $lockfile 2>/dev/null`
957
 
 
958
 
but it should contain:
959
 
$srcfile
960
 
 
961
 
This indicates that another process is trying to use the same
962
 
temporary object file, and libtool could not work around it because
963
 
your compiler does not support \`-c' and \`-o' together.  If you
964
 
repeat this compilation, it may succeed, by chance, but you had better
965
 
avoid parallel builds (make -j) in this platform, or get a better
966
 
compiler."
967
 
 
968
 
        $run $rm $removelist
969
 
        exit 1
970
 
      fi
971
 
 
972
 
      # Just move the object if needed
973
 
      if test x"$output_obj" != x"$obj"; then
974
 
        $show "$mv $output_obj $obj"
975
 
        if $run $mv $output_obj $obj; then :
976
 
        else
977
 
          error=$?
978
 
          $run $rm $removelist
979
 
          exit $error
980
 
        fi
981
 
      fi
982
 
 
983
 
      # Create an invalid libtool object if no PIC, so that we do not
984
 
      # accidentally link it into a program.
985
 
      if test "$build_libtool_libs" != yes; then
986
 
        $show "echo timestamp > $libobj"
987
 
        $run eval "echo timestamp > \$libobj" || exit $?
988
 
      else
989
 
        # Move the .lo from within objdir
990
 
        $show "$mv $libobj $lo_libobj"
991
 
        if $run $mv $libobj $lo_libobj; then :
992
 
        else
993
 
          error=$?
994
 
          $run $rm $removelist
995
 
          exit $error
996
 
        fi
997
 
      fi
998
 
    fi
999
 
 
1000
 
    # Unlock the critical section if it was locked
1001
 
    if test "$need_locks" != no; then
1002
 
      $run $rm "$lockfile"
1003
 
    fi
1004
 
 
1005
 
    exit 0
1006
 
    ;;
1007
 
 
1008
 
  # libtool link mode
1009
 
  link | relink)
1010
 
    modename="$modename: link"
1011
 
    case $host in
1012
 
    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1013
 
      # It is impossible to link a dll without this setting, and
1014
 
      # we shouldn't force the makefile maintainer to figure out
1015
 
      # which system we are compiling for in order to pass an extra
1016
 
      # flag for every libtool invokation.
1017
 
      # allow_undefined=no
1018
 
 
1019
 
      # FIXME: Unfortunately, there are problems with the above when trying
1020
 
      # to make a dll which has undefined symbols, in which case not
1021
 
      # even a static library is built.  For now, we need to specify
1022
 
      # -no-undefined on the libtool link line when we can be certain
1023
 
      # that all symbols are satisfied, otherwise we get a static library.
1024
 
      allow_undefined=yes
1025
 
      ;;
1026
 
    *)
1027
 
      allow_undefined=yes
1028
 
      ;;
1029
 
    esac
1030
 
    libtool_args="$nonopt"
1031
 
    compile_command="$nonopt"
1032
 
    finalize_command="$nonopt"
1033
 
 
1034
 
    compile_rpath=
1035
 
    finalize_rpath=
1036
 
    compile_shlibpath=
1037
 
    finalize_shlibpath=
1038
 
    convenience=
1039
 
    old_convenience=
1040
 
    deplibs=
1041
 
    old_deplibs=
1042
 
    compiler_flags=
1043
 
    linker_flags=
1044
 
    dllsearchpath=
1045
 
    lib_search_path=`pwd`
1046
 
 
1047
 
    avoid_version=no
1048
 
    dlfiles=
1049
 
    dlprefiles=
1050
 
    dlself=no
1051
 
    export_dynamic=no
1052
 
    export_symbols=
1053
 
    export_symbols_regex=
1054
 
    generated=
1055
 
    libobjs=
1056
 
    ltlibs=
1057
 
    module=no
1058
 
    no_install=no
1059
 
    objs=
1060
 
    prefer_static_libs=no
1061
 
    preload=no
1062
 
    prev=
1063
 
    prevarg=
1064
 
    release=
1065
 
    rpath=
1066
 
    xrpath=
1067
 
    perm_rpath=
1068
 
    temp_rpath=
1069
 
    thread_safe=no
1070
 
    vinfo=
1071
 
 
1072
 
    # We need to know -static, to get the right output filenames.
1073
 
    for arg
1074
 
    do
1075
 
      case $arg in
1076
 
      -all-static | -static)
1077
 
        if test "X$arg" = "X-all-static"; then
1078
 
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1079
 
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1080
 
          fi
1081
 
          if test -n "$link_static_flag"; then
1082
 
            dlopen_self=$dlopen_self_static
1083
 
          fi
1084
 
        else
1085
 
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
1086
 
            dlopen_self=$dlopen_self_static
1087
 
          fi
1088
 
        fi
1089
 
        build_libtool_libs=no
1090
 
        build_old_libs=yes
1091
 
        prefer_static_libs=yes
1092
 
        break
1093
 
        ;;
1094
 
      esac
1095
 
    done
1096
 
 
1097
 
    # See if our shared archives depend on static archives.
1098
 
    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1099
 
 
1100
 
    # Go through the arguments, transforming them on the way.
1101
 
    while test $# -gt 0; do
1102
 
      arg="$1"
1103
 
      shift
1104
 
      case $arg in
1105
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
1106
 
        qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1107
 
        ;;
1108
 
      *) qarg=$arg ;;
1109
 
      esac
1110
 
      libtool_args="$libtool_args $qarg"
1111
 
 
1112
 
      # If the previous option needs an argument, assign it.
1113
 
      if test -n "$prev"; then
1114
 
        case $prev in
1115
 
        output)
1116
 
          compile_command="$compile_command @OUTPUT@"
1117
 
          finalize_command="$finalize_command @OUTPUT@"
1118
 
          ;;
1119
 
        esac
1120
 
 
1121
 
        case $prev in
1122
 
        dlfiles|dlprefiles)
1123
 
          if test "$preload" = no; then
1124
 
            # Add the symbol object into the linking commands.
1125
 
            compile_command="$compile_command @SYMFILE@"
1126
 
            finalize_command="$finalize_command @SYMFILE@"
1127
 
            preload=yes
1128
 
          fi
1129
 
          case $arg in
1130
 
          *.la | *.lo) ;;  # We handle these cases below.
1131
 
          force)
1132
 
            if test "$dlself" = no; then
1133
 
              dlself=needless
1134
 
              export_dynamic=yes
1135
 
            fi
1136
 
            prev=
1137
 
            continue
1138
 
            ;;
1139
 
          self)
1140
 
            if test "$prev" = dlprefiles; then
1141
 
              dlself=yes
1142
 
            elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1143
 
              dlself=yes
1144
 
            else
1145
 
              dlself=needless
1146
 
              export_dynamic=yes
1147
 
            fi
1148
 
            prev=
1149
 
            continue
1150
 
            ;;
1151
 
          *)
1152
 
            if test "$prev" = dlfiles; then
1153
 
              dlfiles="$dlfiles $arg"
1154
 
            else
1155
 
              dlprefiles="$dlprefiles $arg"
1156
 
            fi
1157
 
            prev=
1158
 
            continue
1159
 
            ;;
1160
 
          esac
1161
 
          ;;
1162
 
        expsyms)
1163
 
          export_symbols="$arg"
1164
 
          if test ! -f "$arg"; then
1165
 
            $echo "$modename: symbol file \`$arg' does not exist"
1166
 
            exit 1
1167
 
          fi
1168
 
          prev=
1169
 
          continue
1170
 
          ;;
1171
 
        expsyms_regex)
1172
 
          export_symbols_regex="$arg"
1173
 
          prev=
1174
 
          continue
1175
 
          ;;
1176
 
        release)
1177
 
          release="-$arg"
1178
 
          prev=
1179
 
          continue
1180
 
          ;;
1181
 
        rpath | xrpath)
1182
 
          # We need an absolute path.
1183
 
          case $arg in
1184
 
          [\\/]* | [A-Za-z]:[\\/]*) ;;
1185
 
          *)
1186
 
            $echo "$modename: only absolute run-paths are allowed" 1>&2
1187
 
            exit 1
1188
 
            ;;
1189
 
          esac
1190
 
          if test "$prev" = rpath; then
1191
 
            case "$rpath " in
1192
 
            *" $arg "*) ;;
1193
 
            *) rpath="$rpath $arg" ;;
1194
 
            esac
1195
 
          else
1196
 
            case "$xrpath " in
1197
 
            *" $arg "*) ;;
1198
 
            *) xrpath="$xrpath $arg" ;;
1199
 
            esac
1200
 
          fi
1201
 
          prev=
1202
 
          continue
1203
 
          ;;
1204
 
        xcompiler)
1205
 
          compiler_flags="$compiler_flags $qarg"
1206
 
          prev=
1207
 
          compile_command="$compile_command $qarg"
1208
 
          finalize_command="$finalize_command $qarg"
1209
 
          continue
1210
 
          ;;
1211
 
        xlinker)
1212
 
          linker_flags="$linker_flags $qarg"
1213
 
          compiler_flags="$compiler_flags $wl$qarg"
1214
 
          prev=
1215
 
          compile_command="$compile_command $wl$qarg"
1216
 
          finalize_command="$finalize_command $wl$qarg"
1217
 
          continue
1218
 
          ;;
1219
 
        *)
1220
 
          eval "$prev=\"\$arg\""
1221
 
          prev=
1222
 
          continue
1223
 
          ;;
1224
 
        esac
1225
 
      fi # test -n $prev
1226
 
 
1227
 
      prevarg="$arg"
1228
 
 
1229
 
      case $arg in
1230
 
      -all-static)
1231
 
        if test -n "$link_static_flag"; then
1232
 
          compile_command="$compile_command $link_static_flag"
1233
 
          finalize_command="$finalize_command $link_static_flag"
1234
 
        fi
1235
 
        continue
1236
 
        ;;
1237
 
 
1238
 
      -allow-undefined)
1239
 
        # FIXME: remove this flag sometime in the future.
1240
 
        $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1241
 
        continue
1242
 
        ;;
1243
 
 
1244
 
      -avoid-version)
1245
 
        avoid_version=yes
1246
 
        continue
1247
 
        ;;
1248
 
 
1249
 
      -dlopen)
1250
 
        prev=dlfiles
1251
 
        continue
1252
 
        ;;
1253
 
 
1254
 
      -dlpreopen)
1255
 
        prev=dlprefiles
1256
 
        continue
1257
 
        ;;
1258
 
 
1259
 
      -export-dynamic)
1260
 
        export_dynamic=yes
1261
 
        continue
1262
 
        ;;
1263
 
 
1264
 
      -export-symbols | -export-symbols-regex)
1265
 
        if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1266
 
          $echo "$modename: more than one -exported-symbols argument is not allowed"
1267
 
          exit 1
1268
 
        fi
1269
 
        if test "X$arg" = "X-export-symbols"; then
1270
 
          prev=expsyms
1271
 
        else
1272
 
          prev=expsyms_regex
1273
 
        fi
1274
 
        continue
1275
 
        ;;
1276
 
 
1277
 
      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1278
 
      # so, if we see these flags be careful not to treat them like -L
1279
 
      -L[A-Z][A-Z]*:*)
1280
 
        case $with_gcc/$host in
1281
 
        no/*-*-irix*)
1282
 
          compile_command="$compile_command $arg"
1283
 
          finalize_command="$finalize_command $arg"
1284
 
          ;;
1285
 
        esac
1286
 
        continue
1287
 
        ;;
1288
 
 
1289
 
      -L*)
1290
 
        dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1291
 
        # We need an absolute path.
1292
 
        case $dir in
1293
 
        [\\/]* | [A-Za-z]:[\\/]*) ;;
1294
 
        *)
1295
 
          absdir=`cd "$dir" && pwd`
1296
 
          if test -z "$absdir"; then
1297
 
            $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1298
 
            exit 1
1299
 
          fi
1300
 
          dir="$absdir"
1301
 
          ;;
1302
 
        esac
1303
 
        case "$deplibs " in
1304
 
        *" -L$dir "*) ;;
1305
 
        *)
1306
 
          deplibs="$deplibs -L$dir"
1307
 
          lib_search_path="$lib_search_path $dir"
1308
 
          ;;
1309
 
        esac
1310
 
        case $host in
1311
 
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1312
 
          case :$dllsearchpath: in
1313
 
          *":$dir:"*) ;;
1314
 
          *) dllsearchpath="$dllsearchpath:$dir";;
1315
 
          esac
1316
 
          ;;
1317
 
        esac
1318
 
        continue
1319
 
        ;;
1320
 
 
1321
 
      -l*)
1322
 
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1323
 
          case $host in
1324
 
          *-*-cygwin* | *-*-pw32* | *-*-beos*)
1325
 
            # These systems don't actually have a C or math library (as such)
1326
 
            continue
1327
 
            ;;
1328
 
          *-*-mingw* | *-*-os2*)
1329
 
            # These systems don't actually have a C library (as such)
1330
 
            test "X$arg" = "X-lc" && continue
1331
 
            ;;
1332
 
          *-*-openbsd*)
1333
 
            # Do not include libc due to us having libc/libc_r.
1334
 
            test "X$arg" = "X-lc" && continue
1335
 
            ;;
1336
 
          esac
1337
 
         elif test "X$arg" = "X-lc_r"; then
1338
 
          case $host in
1339
 
          *-*-openbsd*)
1340
 
            # Do not include libc_r directly, use -pthread flag.
1341
 
            continue
1342
 
            ;;
1343
 
          esac
1344
 
        fi
1345
 
        deplibs="$deplibs $arg"
1346
 
        continue
1347
 
        ;;
1348
 
 
1349
 
      -module)
1350
 
        module=yes
1351
 
        continue
1352
 
        ;;
1353
 
 
1354
 
      #### Local change for Sleepycat's Berkeley DB [#6117]:
1355
 
      -jnimodule)
1356
 
        module=yes
1357
 
        jnimodule=yes
1358
 
        continue
1359
 
        ;;
1360
 
 
1361
 
      -no-fast-install)
1362
 
        fast_install=no
1363
 
        continue
1364
 
        ;;
1365
 
 
1366
 
      -no-install)
1367
 
        case $host in
1368
 
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1369
 
          # The PATH hackery in wrapper scripts is required on Windows
1370
 
          # in order for the loader to find any dlls it needs.
1371
 
          $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1372
 
          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1373
 
          fast_install=no
1374
 
          ;;
1375
 
        *) no_install=yes ;;
1376
 
        esac
1377
 
        continue
1378
 
        ;;
1379
 
 
1380
 
      -no-undefined)
1381
 
        allow_undefined=no
1382
 
        continue
1383
 
        ;;
1384
 
 
1385
 
      -o) prev=output ;;
1386
 
 
1387
 
      -release)
1388
 
        prev=release
1389
 
        continue
1390
 
        ;;
1391
 
 
1392
 
      -rpath)
1393
 
        prev=rpath
1394
 
        continue
1395
 
        ;;
1396
 
 
1397
 
      -R)
1398
 
        prev=xrpath
1399
 
        continue
1400
 
        ;;
1401
 
 
1402
 
      -R*)
1403
 
        dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1404
 
        # We need an absolute path.
1405
 
        case $dir in
1406
 
        [\\/]* | [A-Za-z]:[\\/]*) ;;
1407
 
        *)
1408
 
          $echo "$modename: only absolute run-paths are allowed" 1>&2
1409
 
          exit 1
1410
 
          ;;
1411
 
        esac
1412
 
        case "$xrpath " in
1413
 
        *" $dir "*) ;;
1414
 
        *) xrpath="$xrpath $dir" ;;
1415
 
        esac
1416
 
        continue
1417
 
        ;;
1418
 
 
1419
 
      -static)
1420
 
        # The effects of -static are defined in a previous loop.
1421
 
        # We used to do the same as -all-static on platforms that
1422
 
        # didn't have a PIC flag, but the assumption that the effects
1423
 
        # would be equivalent was wrong.  It would break on at least
1424
 
        # Digital Unix and AIX.
1425
 
        continue
1426
 
        ;;
1427
 
 
1428
 
      -thread-safe)
1429
 
        thread_safe=yes
1430
 
        continue
1431
 
        ;;
1432
 
 
1433
 
      -version-info)
1434
 
        prev=vinfo
1435
 
        continue
1436
 
        ;;
1437
 
 
1438
 
      -Wc,*)
1439
 
        args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1440
 
        arg=
1441
 
        save_ifs="$IFS"; IFS=','
1442
 
        for flag in $args; do
1443
 
          IFS="$save_ifs"
1444
 
          case $flag in
1445
 
            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
1446
 
            flag="\"$flag\""
1447
 
            ;;
1448
 
          esac
1449
 
          arg="$arg $wl$flag"
1450
 
          compiler_flags="$compiler_flags $flag"
1451
 
        done
1452
 
        IFS="$save_ifs"
1453
 
        arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1454
 
        ;;
1455
 
 
1456
 
      -Wl,*)
1457
 
        args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1458
 
        arg=
1459
 
        save_ifs="$IFS"; IFS=','
1460
 
        for flag in $args; do
1461
 
          IFS="$save_ifs"
1462
 
          case $flag in
1463
 
            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
1464
 
            flag="\"$flag\""
1465
 
            ;;
1466
 
          esac
1467
 
          arg="$arg $wl$flag"
1468
 
          compiler_flags="$compiler_flags $wl$flag"
1469
 
          linker_flags="$linker_flags $flag"
1470
 
        done
1471
 
        IFS="$save_ifs"
1472
 
        arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1473
 
        ;;
1474
 
 
1475
 
      -Xcompiler)
1476
 
        prev=xcompiler
1477
 
        continue
1478
 
        ;;
1479
 
 
1480
 
      -Xlinker)
1481
 
        prev=xlinker
1482
 
        continue
1483
 
        ;;
1484
 
 
1485
 
      # Some other compiler flag.
1486
 
      -* | +*)
1487
 
        # Unknown arguments in both finalize_command and compile_command need
1488
 
        # to be aesthetically quoted because they are evaled later.
1489
 
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1490
 
        case $arg in
1491
 
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
1492
 
          arg="\"$arg\""
1493
 
          ;;
1494
 
        esac
1495
 
        ;;
1496
 
 
1497
 
      *.lo | *.$objext)
1498
 
        # A library or standard object.
1499
 
        if test "$prev" = dlfiles; then
1500
 
          # This file was specified with -dlopen.
1501
 
          if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1502
 
            dlfiles="$dlfiles $arg"
1503
 
            prev=
1504
 
            continue
1505
 
          else
1506
 
            # If libtool objects are unsupported, then we need to preload.
1507
 
            prev=dlprefiles
1508
 
          fi
1509
 
        fi
1510
 
 
1511
 
        if test "$prev" = dlprefiles; then
1512
 
          # Preload the old-style object.
1513
 
          dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1514
 
          prev=
1515
 
        else
1516
 
          case $arg in
1517
 
          *.lo) libobjs="$libobjs $arg" ;;
1518
 
          *) objs="$objs $arg" ;;
1519
 
          esac
1520
 
        fi
1521
 
        ;;
1522
 
 
1523
 
      *.$libext)
1524
 
        # An archive.
1525
 
        deplibs="$deplibs $arg"
1526
 
        old_deplibs="$old_deplibs $arg"
1527
 
        continue
1528
 
        ;;
1529
 
 
1530
 
      *.la)
1531
 
        # A libtool-controlled library.
1532
 
 
1533
 
        if test "$prev" = dlfiles; then
1534
 
          # This library was specified with -dlopen.
1535
 
          dlfiles="$dlfiles $arg"
1536
 
          prev=
1537
 
        elif test "$prev" = dlprefiles; then
1538
 
          # The library was specified with -dlpreopen.
1539
 
          dlprefiles="$dlprefiles $arg"
1540
 
          prev=
1541
 
        else
1542
 
          deplibs="$deplibs $arg"
1543
 
        fi
1544
 
        continue
1545
 
        ;;
1546
 
 
1547
 
      # Some other compiler argument.
1548
 
      *)
1549
 
        # Unknown arguments in both finalize_command and compile_command need
1550
 
        # to be aesthetically quoted because they are evaled later.
1551
 
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1552
 
        case $arg in
1553
 
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
1554
 
          arg="\"$arg\""
1555
 
          ;;
1556
 
        esac
1557
 
        ;;
1558
 
      esac # arg
1559
 
 
1560
 
      # Now actually substitute the argument into the commands.
1561
 
      if test -n "$arg"; then
1562
 
        compile_command="$compile_command $arg"
1563
 
        finalize_command="$finalize_command $arg"
1564
 
      fi
1565
 
    done # argument parsing loop
1566
 
 
1567
 
    if test -n "$prev"; then
1568
 
      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1569
 
      $echo "$help" 1>&2
1570
 
      exit 1
1571
 
    fi
1572
 
 
1573
 
    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1574
 
      eval arg=\"$export_dynamic_flag_spec\"
1575
 
      compile_command="$compile_command $arg"
1576
 
      finalize_command="$finalize_command $arg"
1577
 
    fi
1578
 
 
1579
 
    # calculate the name of the file, without its directory
1580
 
    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1581
 
    libobjs_save="$libobjs"
1582
 
 
1583
 
    if test -n "$shlibpath_var"; then
1584
 
      # get the directories listed in $shlibpath_var
1585
 
      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1586
 
    else
1587
 
      shlib_search_path=
1588
 
    fi
1589
 
    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1590
 
    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1591
 
 
1592
 
    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1593
 
    if test "X$output_objdir" = "X$output"; then
1594
 
      output_objdir="$objdir"
1595
 
    else
1596
 
      output_objdir="$output_objdir/$objdir"
1597
 
    fi
1598
 
    # Create the object directory.
1599
 
    if test ! -d $output_objdir; then
1600
 
      $show "$mkdir $output_objdir"
1601
 
      $run $mkdir $output_objdir
1602
 
      status=$?
1603
 
      if test $status -ne 0 && test ! -d $output_objdir; then
1604
 
        exit $status
1605
 
      fi
1606
 
    fi
1607
 
 
1608
 
    # Determine the type of output
1609
 
    case $output in
1610
 
    "")
1611
 
      $echo "$modename: you must specify an output file" 1>&2
1612
 
      $echo "$help" 1>&2
1613
 
      exit 1
1614
 
      ;;
1615
 
    *.$libext) linkmode=oldlib ;;
1616
 
    *.lo | *.$objext) linkmode=obj ;;
1617
 
    *.la) linkmode=lib ;;
1618
 
    *) linkmode=prog ;; # Anything else should be a program.
1619
 
    esac
1620
 
 
1621
 
    specialdeplibs=
1622
 
    libs=
1623
 
    # Find all interdependent deplibs by searching for libraries
1624
 
    # that are linked more than once (e.g. -la -lb -la)
1625
 
    for deplib in $deplibs; do
1626
 
      case "$libs " in
1627
 
      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1628
 
      esac
1629
 
      libs="$libs $deplib"
1630
 
    done
1631
 
    deplibs=
1632
 
    newdependency_libs=
1633
 
    newlib_search_path=
1634
 
    need_relink=no # whether we're linking any uninstalled libtool libraries
1635
 
    notinst_deplibs= # not-installed libtool libraries
1636
 
    notinst_path= # paths that contain not-installed libtool libraries
1637
 
    case $linkmode in
1638
 
    lib)
1639
 
        passes="conv link"
1640
 
        for file in $dlfiles $dlprefiles; do
1641
 
          case $file in
1642
 
          *.la) ;;
1643
 
          *)
1644
 
            $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1645
 
            exit 1
1646
 
            ;;
1647
 
          esac
1648
 
        done
1649
 
        ;;
1650
 
    prog)
1651
 
        compile_deplibs=
1652
 
        finalize_deplibs=
1653
 
        alldeplibs=no
1654
 
        newdlfiles=
1655
 
        newdlprefiles=
1656
 
        passes="conv scan dlopen dlpreopen link"
1657
 
        ;;
1658
 
    *)  passes="conv"
1659
 
        ;;
1660
 
    esac
1661
 
    for pass in $passes; do
1662
 
      if test $linkmode = prog; then
1663
 
        # Determine which files to process
1664
 
        case $pass in
1665
 
        dlopen)
1666
 
          libs="$dlfiles"
1667
 
          save_deplibs="$deplibs" # Collect dlpreopened libraries
1668
 
          deplibs=
1669
 
          ;;
1670
 
        dlpreopen) libs="$dlprefiles" ;;
1671
 
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1672
 
        esac
1673
 
      fi
1674
 
      for deplib in $libs; do
1675
 
        lib=
1676
 
        found=no
1677
 
        case $deplib in
1678
 
        -l*)
1679
 
          if test $linkmode = oldlib && test $linkmode = obj; then
1680
 
            $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
1681
 
            continue
1682
 
          fi
1683
 
          if test $pass = conv; then
1684
 
            deplibs="$deplib $deplibs"
1685
 
            continue
1686
 
          fi
1687
 
          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1688
 
          for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1689
 
            # Search the libtool library
1690
 
            lib="$searchdir/lib${name}.la"
1691
 
            if test -f "$lib"; then
1692
 
              found=yes
1693
 
              break
1694
 
            fi
1695
 
          done
1696
 
          if test "$found" != yes; then
1697
 
            # deplib doesn't seem to be a libtool library
1698
 
            if test "$linkmode,$pass" = "prog,link"; then
1699
 
              compile_deplibs="$deplib $compile_deplibs"
1700
 
              finalize_deplibs="$deplib $finalize_deplibs"
1701
 
            else
1702
 
              deplibs="$deplib $deplibs"
1703
 
              test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
1704
 
            fi
1705
 
            continue
1706
 
          fi
1707
 
          ;; # -l
1708
 
        -L*)
1709
 
          case $linkmode in
1710
 
          lib)
1711
 
            deplibs="$deplib $deplibs"
1712
 
            test $pass = conv && continue
1713
 
            newdependency_libs="$deplib $newdependency_libs"
1714
 
            newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1715
 
            ;;
1716
 
          prog)
1717
 
            if test $pass = conv; then
1718
 
              deplibs="$deplib $deplibs"
1719
 
              continue
1720
 
            fi
1721
 
            if test $pass = scan; then
1722
 
              deplibs="$deplib $deplibs"
1723
 
              newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1724
 
            else
1725
 
              compile_deplibs="$deplib $compile_deplibs"
1726
 
              finalize_deplibs="$deplib $finalize_deplibs"
1727
 
            fi
1728
 
            ;;
1729
 
          *)
1730
 
            $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
1731
 
            ;;
1732
 
          esac # linkmode
1733
 
          continue
1734
 
          ;; # -L
1735
 
        -R*)
1736
 
          if test $pass = link; then
1737
 
            dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1738
 
            # Make sure the xrpath contains only unique directories.
1739
 
            case "$xrpath " in
1740
 
            *" $dir "*) ;;
1741
 
            *) xrpath="$xrpath $dir" ;;
1742
 
            esac
1743
 
          fi
1744
 
          deplibs="$deplib $deplibs"
1745
 
          continue
1746
 
          ;;
1747
 
        *.la) lib="$deplib" ;;
1748
 
        *.$libext)
1749
 
          if test $pass = conv; then
1750
 
            deplibs="$deplib $deplibs"
1751
 
            continue
1752
 
          fi
1753
 
          case $linkmode in
1754
 
          lib)
1755
 
            if test "$deplibs_check_method" != pass_all; then
1756
 
              echo
1757
 
              echo "*** Warning: This library needs some functionality provided by $deplib."
1758
 
              echo "*** I have the capability to make that library automatically link in when"
1759
 
              echo "*** you link to this library.  But I can only do this if you have a"
1760
 
              echo "*** shared version of the library, which you do not appear to have."
1761
 
            else
1762
 
              echo
1763
 
              echo "*** Warning: Linking the shared library $output against the"
1764
 
              echo "*** static library $deplib is not portable!"
1765
 
              deplibs="$deplib $deplibs"
1766
 
            fi
1767
 
            continue
1768
 
            ;;
1769
 
          prog)
1770
 
            if test $pass != link; then
1771
 
              deplibs="$deplib $deplibs"
1772
 
            else
1773
 
              compile_deplibs="$deplib $compile_deplibs"
1774
 
              finalize_deplibs="$deplib $finalize_deplibs"
1775
 
            fi
1776
 
            continue
1777
 
            ;;
1778
 
          esac # linkmode
1779
 
          ;; # *.$libext
1780
 
        *.lo | *.$objext)
1781
 
          if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1782
 
            # If there is no dlopen support or we're linking statically,
1783
 
            # we need to preload.
1784
 
            newdlprefiles="$newdlprefiles $deplib"
1785
 
            compile_deplibs="$deplib $compile_deplibs"
1786
 
            finalize_deplibs="$deplib $finalize_deplibs"
1787
 
          else
1788
 
            newdlfiles="$newdlfiles $deplib"
1789
 
          fi
1790
 
          continue
1791
 
          ;;
1792
 
        %DEPLIBS%)
1793
 
          alldeplibs=yes
1794
 
          continue
1795
 
          ;;
1796
 
        esac # case $deplib
1797
 
        if test $found = yes || test -f "$lib"; then :
1798
 
        else
1799
 
          $echo "$modename: cannot find the library \`$lib'" 1>&2
1800
 
          exit 1
1801
 
        fi
1802
 
 
1803
 
        # Check to see that this really is a libtool archive.
1804
 
        if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1805
 
        else
1806
 
          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1807
 
          exit 1
1808
 
        fi
1809
 
 
1810
 
        ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1811
 
        test "X$ladir" = "X$lib" && ladir="."
1812
 
 
1813
 
        dlname=
1814
 
        dlopen=
1815
 
        dlpreopen=
1816
 
        libdir=
1817
 
        library_names=
1818
 
        old_library=
1819
 
        # If the library was installed with an old release of libtool,
1820
 
        # it will not redefine variable installed.
1821
 
        installed=yes
1822
 
 
1823
 
        # Read the .la file
1824
 
        case $lib in
1825
 
        */* | *\\*) . $lib ;;
1826
 
        *) . ./$lib ;;
1827
 
        esac
1828
 
 
1829
 
        if test "$linkmode,$pass" = "lib,link" ||
1830
 
           test "$linkmode,$pass" = "prog,scan" ||
1831
 
           { test $linkmode = oldlib && test $linkmode = obj; }; then
1832
 
           # Add dl[pre]opened files of deplib
1833
 
          test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
1834
 
          test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
1835
 
        fi
1836
 
 
1837
 
        if test $pass = conv; then
1838
 
          # Only check for convenience libraries
1839
 
          deplibs="$lib $deplibs"
1840
 
          if test -z "$libdir"; then
1841
 
            if test -z "$old_library"; then
1842
 
              $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1843
 
              exit 1
1844
 
            fi
1845
 
            # It is a libtool convenience library, so add in its objects.
1846
 
            convenience="$convenience $ladir/$objdir/$old_library"
1847
 
            old_convenience="$old_convenience $ladir/$objdir/$old_library"
1848
 
            tmp_libs=
1849
 
            for deplib in $dependency_libs; do
1850
 
              deplibs="$deplib $deplibs"
1851
 
              case "$tmp_libs " in
1852
 
              *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1853
 
              esac
1854
 
              tmp_libs="$tmp_libs $deplib"
1855
 
            done
1856
 
          elif test $linkmode != prog && test $linkmode != lib; then
1857
 
            $echo "$modename: \`$lib' is not a convenience library" 1>&2
1858
 
            exit 1
1859
 
          fi
1860
 
          continue
1861
 
        fi # $pass = conv
1862
 
 
1863
 
        # Get the name of the library we link against.
1864
 
        linklib=
1865
 
        for l in $old_library $library_names; do
1866
 
          linklib="$l"
1867
 
        done
1868
 
        if test -z "$linklib"; then
1869
 
          $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1870
 
          exit 1
1871
 
        fi
1872
 
 
1873
 
        # This library was specified with -dlopen.
1874
 
        if test $pass = dlopen; then
1875
 
          if test -z "$libdir"; then
1876
 
            $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
1877
 
            exit 1
1878
 
          fi
1879
 
          if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1880
 
            # If there is no dlname, no dlopen support or we're linking
1881
 
            # statically, we need to preload.
1882
 
            dlprefiles="$dlprefiles $lib"
1883
 
          else
1884
 
            newdlfiles="$newdlfiles $lib"
1885
 
          fi
1886
 
          continue
1887
 
        fi # $pass = dlopen
1888
 
 
1889
 
        # We need an absolute path.
1890
 
        case $ladir in
1891
 
        [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
1892
 
        *)
1893
 
          abs_ladir=`cd "$ladir" && pwd`
1894
 
          if test -z "$abs_ladir"; then
1895
 
            $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1896
 
            $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1897
 
            abs_ladir="$ladir"
1898
 
          fi
1899
 
          ;;
1900
 
        esac
1901
 
        laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1902
 
 
1903
 
        # Find the relevant object directory and library name.
1904
 
        if test "X$installed" = Xyes; then
1905
 
          if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1906
 
            $echo "$modename: warning: library \`$lib' was moved." 1>&2
1907
 
            dir="$ladir"
1908
 
            absdir="$abs_ladir"
1909
 
            libdir="$abs_ladir"
1910
 
          else
1911
 
            dir="$libdir"
1912
 
            absdir="$libdir"
1913
 
          fi
1914
 
        else
1915
 
          dir="$ladir/$objdir"
1916
 
          absdir="$abs_ladir/$objdir"
1917
 
          # Remove this search path later
1918
 
          notinst_path="$notinst_path $abs_ladir"
1919
 
        fi # $installed = yes
1920
 
        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1921
 
 
1922
 
        # This library was specified with -dlpreopen.
1923
 
        if test $pass = dlpreopen; then
1924
 
          if test -z "$libdir"; then
1925
 
            $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
1926
 
            exit 1
1927
 
          fi
1928
 
          # Prefer using a static library (so that no silly _DYNAMIC symbols
1929
 
          # are required to link).
1930
 
          if test -n "$old_library"; then
1931
 
            newdlprefiles="$newdlprefiles $dir/$old_library"
1932
 
          # Otherwise, use the dlname, so that lt_dlopen finds it.
1933
 
          elif test -n "$dlname"; then
1934
 
            newdlprefiles="$newdlprefiles $dir/$dlname"
1935
 
          else
1936
 
            newdlprefiles="$newdlprefiles $dir/$linklib"
1937
 
          fi
1938
 
        fi # $pass = dlpreopen
1939
 
 
1940
 
        if test -z "$libdir"; then
1941
 
          # Link the convenience library
1942
 
          if test $linkmode = lib; then
1943
 
            deplibs="$dir/$old_library $deplibs"
1944
 
          elif test "$linkmode,$pass" = "prog,link"; then
1945
 
            compile_deplibs="$dir/$old_library $compile_deplibs"
1946
 
            finalize_deplibs="$dir/$old_library $finalize_deplibs"
1947
 
          else
1948
 
            deplibs="$lib $deplibs"
1949
 
          fi
1950
 
          continue
1951
 
        fi
1952
 
 
1953
 
        if test $linkmode = prog && test $pass != link; then
1954
 
          newlib_search_path="$newlib_search_path $ladir"
1955
 
          deplibs="$lib $deplibs"
1956
 
 
1957
 
          linkalldeplibs=no
1958
 
          if test "$link_all_deplibs" != no || test -z "$library_names" ||
1959
 
             test "$build_libtool_libs" = no; then
1960
 
            linkalldeplibs=yes
1961
 
          fi
1962
 
 
1963
 
          tmp_libs=
1964
 
          for deplib in $dependency_libs; do
1965
 
            case $deplib in
1966
 
            -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
1967
 
            esac
1968
 
            # Need to link against all dependency_libs?
1969
 
            if test $linkalldeplibs = yes; then
1970
 
              deplibs="$deplib $deplibs"
1971
 
            else
1972
 
              # Need to hardcode shared library paths
1973
 
              # or/and link against static libraries
1974
 
              newdependency_libs="$deplib $newdependency_libs"
1975
 
            fi
1976
 
            case "$tmp_libs " in
1977
 
            *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1978
 
            esac
1979
 
            tmp_libs="$tmp_libs $deplib"
1980
 
          done # for deplib
1981
 
          continue
1982
 
        fi # $linkmode = prog...
1983
 
 
1984
 
        link_static=no # Whether the deplib will be linked statically
1985
 
        if test -n "$library_names" &&
1986
 
           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1987
 
          # Link against this shared library
1988
 
 
1989
 
          if test "$linkmode,$pass" = "prog,link" ||
1990
 
           { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
1991
 
            # Hardcode the library path.
1992
 
            # Skip directories that are in the system default run-time
1993
 
            # search path.
1994
 
            case " $sys_lib_dlsearch_path " in
1995
 
            *" $absdir "*) ;;
1996
 
            *)
1997
 
              case "$compile_rpath " in
1998
 
              *" $absdir "*) ;;
1999
 
              *) compile_rpath="$compile_rpath $absdir"
2000
 
              esac
2001
 
              ;;
2002
 
            esac
2003
 
            case " $sys_lib_dlsearch_path " in
2004
 
            *" $libdir "*) ;;
2005
 
            *)
2006
 
              case "$finalize_rpath " in
2007
 
              *" $libdir "*) ;;
2008
 
              *) finalize_rpath="$finalize_rpath $libdir"
2009
 
              esac
2010
 
              ;;
2011
 
            esac
2012
 
            if test $linkmode = prog; then
2013
 
              # We need to hardcode the library path
2014
 
              if test -n "$shlibpath_var"; then
2015
 
                # Make sure the rpath contains only unique directories.
2016
 
                case "$temp_rpath " in
2017
 
                *" $dir "*) ;;
2018
 
                *" $absdir "*) ;;
2019
 
                *) temp_rpath="$temp_rpath $dir" ;;
2020
 
                esac
2021
 
              fi
2022
 
            fi
2023
 
          fi # $linkmode,$pass = prog,link...
2024
 
 
2025
 
          if test "$alldeplibs" = yes &&
2026
 
             { test "$deplibs_check_method" = pass_all ||
2027
 
               { test "$build_libtool_libs" = yes &&
2028
 
                 test -n "$library_names"; }; }; then
2029
 
            # We only need to search for static libraries
2030
 
            continue
2031
 
          fi
2032
 
 
2033
 
          if test "$installed" = no; then
2034
 
            notinst_deplibs="$notinst_deplibs $lib"
2035
 
            need_relink=yes
2036
 
          fi
2037
 
 
2038
 
          if test -n "$old_archive_from_expsyms_cmds"; then
2039
 
            # figure out the soname
2040
 
            set dummy $library_names
2041
 
            realname="$2"
2042
 
            shift; shift
2043
 
            libname=`eval \\$echo \"$libname_spec\"`
2044
 
            # use dlname if we got it. it's perfectly good, no?
2045
 
            if test -n "$dlname"; then
2046
 
              soname="$dlname"
2047
 
            elif test -n "$soname_spec"; then
2048
 
              # bleh windows
2049
 
              case $host in
2050
 
              *cygwin*)
2051
 
                major=`expr $current - $age`
2052
 
                versuffix="-$major"
2053
 
                ;;
2054
 
              esac
2055
 
              eval soname=\"$soname_spec\"
2056
 
            else
2057
 
              soname="$realname"
2058
 
            fi
2059
 
 
2060
 
            # Make a new name for the extract_expsyms_cmds to use
2061
 
            soroot="$soname"
2062
 
            soname=`echo $soroot | sed -e 's/^.*\///'`
2063
 
            newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
2064
 
 
2065
 
            # If the library has no export list, then create one now
2066
 
            if test -f "$output_objdir/$soname-def"; then :
2067
 
            else
2068
 
              $show "extracting exported symbol list from \`$soname'"
2069
 
              save_ifs="$IFS"; IFS='~'
2070
 
              eval cmds=\"$extract_expsyms_cmds\"
2071
 
              for cmd in $cmds; do
2072
 
                IFS="$save_ifs"
2073
 
                $show "$cmd"
2074
 
                $run eval "$cmd" || exit $?
2075
 
              done
2076
 
              IFS="$save_ifs"
2077
 
            fi
2078
 
 
2079
 
            # Create $newlib
2080
 
            if test -f "$output_objdir/$newlib"; then :; else
2081
 
              $show "generating import library for \`$soname'"
2082
 
              save_ifs="$IFS"; IFS='~'
2083
 
              eval cmds=\"$old_archive_from_expsyms_cmds\"
2084
 
              for cmd in $cmds; do
2085
 
                IFS="$save_ifs"
2086
 
                $show "$cmd"
2087
 
                $run eval "$cmd" || exit $?
2088
 
              done
2089
 
              IFS="$save_ifs"
2090
 
            fi
2091
 
            # make sure the library variables are pointing to the new library
2092
 
            dir=$output_objdir
2093
 
            linklib=$newlib
2094
 
          fi # test -n $old_archive_from_expsyms_cmds
2095
 
 
2096
 
          if test $linkmode = prog || test "$mode" != relink; then
2097
 
            add_shlibpath=
2098
 
            add_dir=
2099
 
            add=
2100
 
            lib_linked=yes
2101
 
            case $hardcode_action in
2102
 
            immediate | unsupported)
2103
 
              if test "$hardcode_direct" = no; then
2104
 
                add="$dir/$linklib"
2105
 
              elif test "$hardcode_minus_L" = no; then
2106
 
                case $host in
2107
 
                *-*-sunos*) add_shlibpath="$dir" ;;
2108
 
                esac
2109
 
                add_dir="-L$dir"
2110
 
                add="-l$name"
2111
 
              elif test "$hardcode_shlibpath_var" = no; then
2112
 
                add_shlibpath="$dir"
2113
 
                add="-l$name"
2114
 
              else
2115
 
                lib_linked=no
2116
 
              fi
2117
 
              ;;
2118
 
            relink)
2119
 
              if test "$hardcode_direct" = yes; then
2120
 
                add="$dir/$linklib"
2121
 
              elif test "$hardcode_minus_L" = yes; then
2122
 
                add_dir="-L$dir"
2123
 
                add="-l$name"
2124
 
              elif test "$hardcode_shlibpath_var" = yes; then
2125
 
                add_shlibpath="$dir"
2126
 
                add="-l$name"
2127
 
              else
2128
 
                lib_linked=no
2129
 
              fi
2130
 
              ;;
2131
 
            *) lib_linked=no ;;
2132
 
            esac
2133
 
 
2134
 
            if test "$lib_linked" != yes; then
2135
 
              $echo "$modename: configuration error: unsupported hardcode properties"
2136
 
              exit 1
2137
 
            fi
2138
 
 
2139
 
            if test -n "$add_shlibpath"; then
2140
 
              case :$compile_shlibpath: in
2141
 
              *":$add_shlibpath:"*) ;;
2142
 
              *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2143
 
              esac
2144
 
            fi
2145
 
            if test $linkmode = prog; then
2146
 
              test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2147
 
              test -n "$add" && compile_deplibs="$add $compile_deplibs"
2148
 
            else
2149
 
              test -n "$add_dir" && deplibs="$add_dir $deplibs"
2150
 
              test -n "$add" && deplibs="$add $deplibs"
2151
 
              if test "$hardcode_direct" != yes && \
2152
 
                 test "$hardcode_minus_L" != yes && \
2153
 
                 test "$hardcode_shlibpath_var" = yes; then
2154
 
                case :$finalize_shlibpath: in
2155
 
                *":$libdir:"*) ;;
2156
 
                *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2157
 
                esac
2158
 
              fi
2159
 
            fi
2160
 
          fi
2161
 
 
2162
 
          if test $linkmode = prog || test "$mode" = relink; then
2163
 
            add_shlibpath=
2164
 
            add_dir=
2165
 
            add=
2166
 
            # Finalize command for both is simple: just hardcode it.
2167
 
            if test "$hardcode_direct" = yes; then
2168
 
              add="$libdir/$linklib"
2169
 
            elif test "$hardcode_minus_L" = yes; then
2170
 
              add_dir="-L$libdir"
2171
 
              add="-l$name"
2172
 
            elif test "$hardcode_shlibpath_var" = yes; then
2173
 
              case :$finalize_shlibpath: in
2174
 
              *":$libdir:"*) ;;
2175
 
              *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2176
 
              esac
2177
 
              add="-l$name"
2178
 
            else
2179
 
              # We cannot seem to hardcode it, guess we'll fake it.
2180
 
              add_dir="-L$libdir"
2181
 
              add="-l$name"
2182
 
            fi
2183
 
 
2184
 
            if test $linkmode = prog; then
2185
 
              test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2186
 
              test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2187
 
            else
2188
 
              test -n "$add_dir" && deplibs="$add_dir $deplibs"
2189
 
              test -n "$add" && deplibs="$add $deplibs"
2190
 
            fi
2191
 
          fi
2192
 
        elif test $linkmode = prog; then
2193
 
          if test "$alldeplibs" = yes &&
2194
 
             { test "$deplibs_check_method" = pass_all ||
2195
 
               { test "$build_libtool_libs" = yes &&
2196
 
                 test -n "$library_names"; }; }; then
2197
 
            # We only need to search for static libraries
2198
 
            continue
2199
 
          fi
2200
 
 
2201
 
          # Try to link the static library
2202
 
          # Here we assume that one of hardcode_direct or hardcode_minus_L
2203
 
          # is not unsupported.  This is valid on all known static and
2204
 
          # shared platforms.
2205
 
          if test "$hardcode_direct" != unsupported; then
2206
 
            test -n "$old_library" && linklib="$old_library"
2207
 
            compile_deplibs="$dir/$linklib $compile_deplibs"
2208
 
            finalize_deplibs="$dir/$linklib $finalize_deplibs"
2209
 
          else
2210
 
            compile_deplibs="-l$name -L$dir $compile_deplibs"
2211
 
            finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2212
 
          fi
2213
 
        elif test "$build_libtool_libs" = yes; then
2214
 
          # Not a shared library
2215
 
          if test "$deplibs_check_method" != pass_all; then
2216
 
            # We're trying link a shared library against a static one
2217
 
            # but the system doesn't support it.
2218
 
 
2219
 
            # Just print a warning and add the library to dependency_libs so
2220
 
            # that the program can be linked against the static library.
2221
 
            echo
2222
 
            echo "*** Warning: This library needs some functionality provided by $lib."
2223
 
            echo "*** I have the capability to make that library automatically link in when"
2224
 
            echo "*** you link to this library.  But I can only do this if you have a"
2225
 
            echo "*** shared version of the library, which you do not appear to have."
2226
 
            if test "$module" = yes; then
2227
 
              echo "*** Therefore, libtool will create a static module, that should work "
2228
 
              echo "*** as long as the dlopening application is linked with the -dlopen flag."
2229
 
              if test -z "$global_symbol_pipe"; then
2230
 
                echo
2231
 
                echo "*** However, this would only work if libtool was able to extract symbol"
2232
 
                echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2233
 
                echo "*** not find such a program.  So, this module is probably useless."
2234
 
                echo "*** \`nm' from GNU binutils and a full rebuild may help."
2235
 
              fi
2236
 
              if test "$build_old_libs" = no; then
2237
 
                build_libtool_libs=module
2238
 
                build_old_libs=yes
2239
 
              else
2240
 
                build_libtool_libs=no
2241
 
              fi
2242
 
            fi
2243
 
          else
2244
 
            convenience="$convenience $dir/$old_library"
2245
 
            old_convenience="$old_convenience $dir/$old_library"
2246
 
            deplibs="$dir/$old_library $deplibs"
2247
 
            link_static=yes
2248
 
          fi
2249
 
        fi # link shared/static library?
2250
 
 
2251
 
        if test $linkmode = lib; then
2252
 
          if test -n "$dependency_libs" &&
2253
 
             { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
2254
 
               test $link_static = yes; }; then
2255
 
            # Extract -R from dependency_libs
2256
 
            temp_deplibs=
2257
 
            for libdir in $dependency_libs; do
2258
 
              case $libdir in
2259
 
              -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2260
 
                   case " $xrpath " in
2261
 
                   *" $temp_xrpath "*) ;;
2262
 
                   *) xrpath="$xrpath $temp_xrpath";;
2263
 
                   esac;;
2264
 
              *) temp_deplibs="$temp_deplibs $libdir";;
2265
 
              esac
2266
 
            done
2267
 
            dependency_libs="$temp_deplibs"
2268
 
          fi
2269
 
 
2270
 
          newlib_search_path="$newlib_search_path $absdir"
2271
 
          # Link against this library
2272
 
          test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2273
 
          # ... and its dependency_libs
2274
 
          tmp_libs=
2275
 
          for deplib in $dependency_libs; do
2276
 
            newdependency_libs="$deplib $newdependency_libs"
2277
 
            case "$tmp_libs " in
2278
 
            *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2279
 
            esac
2280
 
            tmp_libs="$tmp_libs $deplib"
2281
 
          done
2282
 
 
2283
 
          if test $link_all_deplibs != no; then
2284
 
            # Add the search paths of all dependency libraries
2285
 
            for deplib in $dependency_libs; do
2286
 
              case $deplib in
2287
 
              -L*) path="$deplib" ;;
2288
 
              *.la)
2289
 
                dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2290
 
                test "X$dir" = "X$deplib" && dir="."
2291
 
                # We need an absolute path.
2292
 
                case $dir in
2293
 
                [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2294
 
                *)
2295
 
                  absdir=`cd "$dir" && pwd`
2296
 
                  if test -z "$absdir"; then
2297
 
                    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2298
 
                    absdir="$dir"
2299
 
                  fi
2300
 
                  ;;
2301
 
                esac
2302
 
                if grep "^installed=no" $deplib > /dev/null; then
2303
 
                  path="-L$absdir/$objdir"
2304
 
                else
2305
 
                  eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2306
 
                  if test -z "$libdir"; then
2307
 
                    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2308
 
                    exit 1
2309
 
                  fi
2310
 
                  if test "$absdir" != "$libdir"; then
2311
 
                    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2312
 
                  fi
2313
 
                  path="-L$absdir"
2314
 
                fi
2315
 
                ;;
2316
 
              *) continue ;;
2317
 
              esac
2318
 
              case " $deplibs " in
2319
 
              *" $path "*) ;;
2320
 
              *) deplibs="$deplibs $path" ;;
2321
 
              esac
2322
 
            done
2323
 
          fi # link_all_deplibs != no
2324
 
        fi # linkmode = lib
2325
 
      done # for deplib in $libs
2326
 
      if test $pass = dlpreopen; then
2327
 
        # Link the dlpreopened libraries before other libraries
2328
 
        for deplib in $save_deplibs; do
2329
 
          deplibs="$deplib $deplibs"
2330
 
        done
2331
 
      fi
2332
 
      if test $pass != dlopen; then
2333
 
        test $pass != scan && dependency_libs="$newdependency_libs"
2334
 
        if test $pass != conv; then
2335
 
          # Make sure lib_search_path contains only unique directories.
2336
 
          lib_search_path=
2337
 
          for dir in $newlib_search_path; do
2338
 
            case "$lib_search_path " in
2339
 
            *" $dir "*) ;;
2340
 
            *) lib_search_path="$lib_search_path $dir" ;;
2341
 
            esac
2342
 
          done
2343
 
          newlib_search_path=
2344
 
        fi
2345
 
 
2346
 
        if test "$linkmode,$pass" != "prog,link"; then
2347
 
          vars="deplibs"
2348
 
        else
2349
 
          vars="compile_deplibs finalize_deplibs"
2350
 
        fi
2351
 
        for var in $vars dependency_libs; do
2352
 
          # Add libraries to $var in reverse order
2353
 
          eval tmp_libs=\"\$$var\"
2354
 
          new_libs=
2355
 
          for deplib in $tmp_libs; do
2356
 
            case $deplib in
2357
 
            -L*) new_libs="$deplib $new_libs" ;;
2358
 
            *)
2359
 
              case " $specialdeplibs " in
2360
 
              *" $deplib "*) new_libs="$deplib $new_libs" ;;
2361
 
              *)
2362
 
                case " $new_libs " in
2363
 
                *" $deplib "*) ;;
2364
 
                *) new_libs="$deplib $new_libs" ;;
2365
 
                esac
2366
 
                ;;
2367
 
              esac
2368
 
              ;;
2369
 
            esac
2370
 
          done
2371
 
          tmp_libs=
2372
 
          for deplib in $new_libs; do
2373
 
            case $deplib in
2374
 
            -L*)
2375
 
              case " $tmp_libs " in
2376
 
              *" $deplib "*) ;;
2377
 
              *) tmp_libs="$tmp_libs $deplib" ;;
2378
 
              esac
2379
 
              ;;
2380
 
            *) tmp_libs="$tmp_libs $deplib" ;;
2381
 
            esac
2382
 
          done
2383
 
          eval $var=\"$tmp_libs\"
2384
 
        done # for var
2385
 
      fi
2386
 
      if test "$pass" = "conv" &&
2387
 
       { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
2388
 
        libs="$deplibs" # reset libs
2389
 
        deplibs=
2390
 
      fi
2391
 
    done # for pass
2392
 
    if test $linkmode = prog; then
2393
 
      dlfiles="$newdlfiles"
2394
 
      dlprefiles="$newdlprefiles"
2395
 
    fi
2396
 
 
2397
 
    case $linkmode in
2398
 
    oldlib)
2399
 
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2400
 
        $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2401
 
      fi
2402
 
 
2403
 
      if test -n "$rpath"; then
2404
 
        $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2405
 
      fi
2406
 
 
2407
 
      if test -n "$xrpath"; then
2408
 
        $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2409
 
      fi
2410
 
 
2411
 
      if test -n "$vinfo"; then
2412
 
        $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
2413
 
      fi
2414
 
 
2415
 
      if test -n "$release"; then
2416
 
        $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2417
 
      fi
2418
 
 
2419
 
      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
2420
 
        $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2421
 
      fi
2422
 
 
2423
 
      # Now set the variables for building old libraries.
2424
 
      build_libtool_libs=no
2425
 
      oldlibs="$output"
2426
 
      objs="$objs$old_deplibs"
2427
 
      ;;
2428
 
 
2429
 
    lib)
2430
 
      # Make sure we only generate libraries of the form `libNAME.la'.
2431
 
      case $outputname in
2432
 
      lib*)
2433
 
        name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2434
 
        eval libname=\"$libname_spec\"
2435
 
        ;;
2436
 
      *)
2437
 
        if test "$module" = no; then
2438
 
          $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2439
 
          $echo "$help" 1>&2
2440
 
          exit 1
2441
 
        fi
2442
 
        if test "$need_lib_prefix" != no; then
2443
 
          # Add the "lib" prefix for modules if required
2444
 
          name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2445
 
          eval libname=\"$libname_spec\"
2446
 
        else
2447
 
          libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2448
 
        fi
2449
 
        ;;
2450
 
      esac
2451
 
 
2452
 
      if test -n "$objs"; then
2453
 
        if test "$deplibs_check_method" != pass_all; then
2454
 
          $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2455
 
          exit 1
2456
 
        else
2457
 
          echo
2458
 
          echo "*** Warning: Linking the shared library $output against the non-libtool"
2459
 
          echo "*** objects $objs is not portable!"
2460
 
          libobjs="$libobjs $objs"
2461
 
        fi
2462
 
      fi
2463
 
 
2464
 
      if test "$dlself" != no; then
2465
 
        $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
2466
 
      fi
2467
 
 
2468
 
      set dummy $rpath
2469
 
      if test $# -gt 2; then
2470
 
        $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2471
 
      fi
2472
 
      install_libdir="$2"
2473
 
 
2474
 
      oldlibs=
2475
 
      if test -z "$rpath"; then
2476
 
        if test "$build_libtool_libs" = yes; then
2477
 
          # Building a libtool convenience library.
2478
 
          libext=al
2479
 
          oldlibs="$output_objdir/$libname.$libext $oldlibs"
2480
 
          build_libtool_libs=convenience
2481
 
          build_old_libs=yes
2482
 
        fi
2483
 
 
2484
 
        if test -n "$vinfo"; then
2485
 
          $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2486
 
        fi
2487
 
 
2488
 
        if test -n "$release"; then
2489
 
          $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2490
 
        fi
2491
 
      else
2492
 
 
2493
 
        # Parse the version information argument.
2494
 
        save_ifs="$IFS"; IFS=':'
2495
 
        set dummy $vinfo 0 0 0
2496
 
        IFS="$save_ifs"
2497
 
 
2498
 
        if test -n "$8"; then
2499
 
          $echo "$modename: too many parameters to \`-version-info'" 1>&2
2500
 
          $echo "$help" 1>&2
2501
 
          exit 1
2502
 
        fi
2503
 
 
2504
 
        current="$2"
2505
 
        revision="$3"
2506
 
        age="$4"
2507
 
 
2508
 
        # Check that each of the things are valid numbers.
2509
 
        case $current in
2510
 
        0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
2511
 
        *)
2512
 
          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2513
 
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2514
 
          exit 1
2515
 
          ;;
2516
 
        esac
2517
 
 
2518
 
        case $revision in
2519
 
        0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
2520
 
        *)
2521
 
          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2522
 
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2523
 
          exit 1
2524
 
          ;;
2525
 
        esac
2526
 
 
2527
 
        case $age in
2528
 
        0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
2529
 
        *)
2530
 
          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2531
 
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2532
 
          exit 1
2533
 
          ;;
2534
 
        esac
2535
 
 
2536
 
        if test $age -gt $current; then
2537
 
          $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2538
 
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2539
 
          exit 1
2540
 
        fi
2541
 
 
2542
 
        # Calculate the version variables.
2543
 
        major=
2544
 
        versuffix=
2545
 
        verstring=
2546
 
        case $version_type in
2547
 
        none) ;;
2548
 
 
2549
 
        darwin)
2550
 
          # Like Linux, but with the current version available in
2551
 
          # verstring for coding it into the library header
2552
 
          major=.`expr $current - $age`
2553
 
          versuffix="$major.$age.$revision"
2554
 
          # Darwin ld doesn't like 0 for these options...
2555
 
          minor_current=`expr $current + 1`
2556
 
          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
2557
 
          ;;
2558
 
 
2559
 
        freebsd-aout)
2560
 
          major=".$current"
2561
 
          versuffix=".$current.$revision";
2562
 
          ;;
2563
 
 
2564
 
        freebsd-elf)
2565
 
          major=".$current"
2566
 
          versuffix=".$current";
2567
 
          ;;
2568
 
 
2569
 
        irix)
2570
 
          major=`expr $current - $age + 1`
2571
 
          verstring="sgi$major.$revision"
2572
 
 
2573
 
          # Add in all the interfaces that we are compatible with.
2574
 
          loop=$revision
2575
 
          while test $loop != 0; do
2576
 
            iface=`expr $revision - $loop`
2577
 
            loop=`expr $loop - 1`
2578
 
            verstring="sgi$major.$iface:$verstring"
2579
 
          done
2580
 
 
2581
 
          # Before this point, $major must not contain `.'.
2582
 
          major=.$major
2583
 
          versuffix="$major.$revision"
2584
 
          ;;
2585
 
 
2586
 
        linux)
2587
 
          major=.`expr $current - $age`
2588
 
          versuffix="$major.$age.$revision"
2589
 
          ;;
2590
 
 
2591
 
        osf)
2592
 
          major=`expr $current - $age`
2593
 
          versuffix=".$current.$age.$revision"
2594
 
          verstring="$current.$age.$revision"
2595
 
 
2596
 
          # Add in all the interfaces that we are compatible with.
2597
 
          loop=$age
2598
 
          while test $loop != 0; do
2599
 
            iface=`expr $current - $loop`
2600
 
            loop=`expr $loop - 1`
2601
 
            verstring="$verstring:${iface}.0"
2602
 
          done
2603
 
 
2604
 
          # Make executables depend on our current version.
2605
 
          verstring="$verstring:${current}.0"
2606
 
          ;;
2607
 
 
2608
 
        sunos)
2609
 
          major=".$current"
2610
 
          versuffix=".$current.$revision"
2611
 
          ;;
2612
 
 
2613
 
        windows)
2614
 
          # Use '-' rather than '.', since we only want one
2615
 
          # extension on DOS 8.3 filesystems.
2616
 
          major=`expr $current - $age`
2617
 
          versuffix="-$major"
2618
 
          ;;
2619
 
 
2620
 
        *)
2621
 
          $echo "$modename: unknown library version type \`$version_type'" 1>&2
2622
 
          echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
2623
 
          exit 1
2624
 
          ;;
2625
 
        esac
2626
 
 
2627
 
        # Clear the version info if we defaulted, and they specified a release.
2628
 
        if test -z "$vinfo" && test -n "$release"; then
2629
 
          major=
2630
 
          verstring="0.0"
2631
 
          case $version_type in
2632
 
          darwin)
2633
 
            # we can't check for "0.0" in archive_cmds due to quoting
2634
 
            # problems, so we reset it completely
2635
 
            verstring=""
2636
 
            ;;
2637
 
          *)
2638
 
            verstring="0.0"
2639
 
            ;;
2640
 
          esac
2641
 
          if test "$need_version" = no; then
2642
 
            versuffix=
2643
 
          else
2644
 
            versuffix=".0.0"
2645
 
          fi
2646
 
        fi
2647
 
 
2648
 
        # Remove version info from name if versioning should be avoided
2649
 
        if test "$avoid_version" = yes && test "$need_version" = no; then
2650
 
          major=
2651
 
          versuffix=
2652
 
          verstring=""
2653
 
        fi
2654
 
 
2655
 
        # Check to see if the archive will have undefined symbols.
2656
 
        if test "$allow_undefined" = yes; then
2657
 
          if test "$allow_undefined_flag" = unsupported; then
2658
 
            $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2659
 
            build_libtool_libs=no
2660
 
            build_old_libs=yes
2661
 
          fi
2662
 
        else
2663
 
          # Don't allow undefined symbols.
2664
 
          allow_undefined_flag="$no_undefined_flag"
2665
 
        fi
2666
 
      fi
2667
 
 
2668
 
      if test "$mode" != relink; then
2669
 
        # Remove our outputs.
2670
 
        $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
2671
 
        $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
2672
 
      fi
2673
 
 
2674
 
      # Now set the variables for building old libraries.
2675
 
      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
2676
 
        oldlibs="$oldlibs $output_objdir/$libname.$libext"
2677
 
 
2678
 
        # Transform .lo files to .o files.
2679
 
        oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2680
 
      fi
2681
 
 
2682
 
      # Eliminate all temporary directories.
2683
 
      for path in $notinst_path; do
2684
 
        lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2685
 
        deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2686
 
        dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2687
 
      done
2688
 
 
2689
 
      if test -n "$xrpath"; then
2690
 
        # If the user specified any rpath flags, then add them.
2691
 
        temp_xrpath=
2692
 
        for libdir in $xrpath; do
2693
 
          temp_xrpath="$temp_xrpath -R$libdir"
2694
 
          case "$finalize_rpath " in
2695
 
          *" $libdir "*) ;;
2696
 
          *) finalize_rpath="$finalize_rpath $libdir" ;;
2697
 
          esac
2698
 
        done
2699
 
        if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
2700
 
          dependency_libs="$temp_xrpath $dependency_libs"
2701
 
        fi
2702
 
      fi
2703
 
 
2704
 
      # Make sure dlfiles contains only unique files that won't be dlpreopened
2705
 
      old_dlfiles="$dlfiles"
2706
 
      dlfiles=
2707
 
      for lib in $old_dlfiles; do
2708
 
        case " $dlprefiles $dlfiles " in
2709
 
        *" $lib "*) ;;
2710
 
        *) dlfiles="$dlfiles $lib" ;;
2711
 
        esac
2712
 
      done
2713
 
 
2714
 
      # Make sure dlprefiles contains only unique files
2715
 
      old_dlprefiles="$dlprefiles"
2716
 
      dlprefiles=
2717
 
      for lib in $old_dlprefiles; do
2718
 
        case "$dlprefiles " in
2719
 
        *" $lib "*) ;;
2720
 
        *) dlprefiles="$dlprefiles $lib" ;;
2721
 
        esac
2722
 
      done
2723
 
 
2724
 
      if test "$build_libtool_libs" = yes; then
2725
 
        if test -n "$rpath"; then
2726
 
          case $host in
2727
 
          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
2728
 
            # these systems don't actually have a c library (as such)!
2729
 
            ;;
2730
 
          *-*-rhapsody* | *-*-darwin1.[012])
2731
 
            # Rhapsody C library is in the System framework
2732
 
            deplibs="$deplibs -framework System"
2733
 
            ;;
2734
 
          *-*-netbsd*)
2735
 
            # Don't link with libc until the a.out ld.so is fixed.
2736
 
            ;;
2737
 
          *-*-openbsd*)
2738
 
            # Do not include libc due to us having libc/libc_r.
2739
 
            ;;
2740
 
          #### Local change for Sleepycat's Berkeley DB [#2380]:
2741
 
          # FreeBSD, like OpenBSD, uses libc/libc_r and should not
2742
 
          # link against libc/c_r explicitly;  the -pthread linker flag
2743
 
          # implicitly controls use of -lc and -lc_r.
2744
 
          *-*-freebsd*)
2745
 
            # Do not include libc due to us having libc/libc_r.
2746
 
            ;; 
2747
 
          *)
2748
 
            # Add libc to deplibs on all other systems if necessary.
2749
 
            if test $build_libtool_need_lc = "yes"; then
2750
 
              deplibs="$deplibs -lc"
2751
 
            fi
2752
 
            ;;
2753
 
          esac
2754
 
        fi
2755
 
 
2756
 
        # Transform deplibs into only deplibs that can be linked in shared.
2757
 
        name_save=$name
2758
 
        libname_save=$libname
2759
 
        release_save=$release
2760
 
        versuffix_save=$versuffix
2761
 
        major_save=$major
2762
 
        # I'm not sure if I'm treating the release correctly.  I think
2763
 
        # release should show up in the -l (ie -lgmp5) so we don't want to
2764
 
        # add it in twice.  Is that correct?
2765
 
        release=""
2766
 
        versuffix=""
2767
 
        major=""
2768
 
        newdeplibs=
2769
 
        droppeddeps=no
2770
 
        case $deplibs_check_method in
2771
 
        pass_all)
2772
 
          # Don't check for shared/static.  Everything works.
2773
 
          # This might be a little naive.  We might want to check
2774
 
          # whether the library exists or not.  But this is on
2775
 
          # osf3 & osf4 and I'm not really sure... Just
2776
 
          # implementing what was already the behaviour.
2777
 
          newdeplibs=$deplibs
2778
 
          ;;
2779
 
        test_compile)
2780
 
          # This code stresses the "libraries are programs" paradigm to its
2781
 
          # limits. Maybe even breaks it.  We compile a program, linking it
2782
 
          # against the deplibs as a proxy for the library.  Then we can check
2783
 
          # whether they linked in statically or dynamically with ldd.
2784
 
          $rm conftest.c
2785
 
          cat > conftest.c <<EOF
2786
 
          int main() { return 0; }
2787
 
EOF
2788
 
          $rm conftest
2789
 
          $CC -o conftest conftest.c $deplibs
2790
 
          if test $? -eq 0 ; then
2791
 
            ldd_output=`ldd conftest`
2792
 
            for i in $deplibs; do
2793
 
              name="`expr $i : '-l\(.*\)'`"
2794
 
              # If $name is empty we are operating on a -L argument.
2795
 
              if test -n "$name" && test "$name" != "0"; then
2796
 
                libname=`eval \\$echo \"$libname_spec\"`
2797
 
                deplib_matches=`eval \\$echo \"$library_names_spec\"`
2798
 
                set dummy $deplib_matches
2799
 
                deplib_match=$2
2800
 
                if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2801
 
                  newdeplibs="$newdeplibs $i"
2802
 
                else
2803
 
                  droppeddeps=yes
2804
 
                  echo
2805
 
                  echo "*** Warning: This library needs some functionality provided by $i."
2806
 
                  echo "*** I have the capability to make that library automatically link in when"
2807
 
                  echo "*** you link to this library.  But I can only do this if you have a"
2808
 
                  echo "*** shared version of the library, which you do not appear to have."
2809
 
                fi
2810
 
              else
2811
 
                newdeplibs="$newdeplibs $i"
2812
 
              fi
2813
 
            done
2814
 
          else
2815
 
            # Error occured in the first compile.  Let's try to salvage the situation:
2816
 
            # Compile a seperate program for each library.
2817
 
            for i in $deplibs; do
2818
 
              name="`expr $i : '-l\(.*\)'`"
2819
 
             # If $name is empty we are operating on a -L argument.
2820
 
              if test -n "$name" && test "$name" != "0"; then
2821
 
                $rm conftest
2822
 
                $CC -o conftest conftest.c $i
2823
 
                # Did it work?
2824
 
                if test $? -eq 0 ; then
2825
 
                  ldd_output=`ldd conftest`
2826
 
                  libname=`eval \\$echo \"$libname_spec\"`
2827
 
                  deplib_matches=`eval \\$echo \"$library_names_spec\"`
2828
 
                  set dummy $deplib_matches
2829
 
                  deplib_match=$2
2830
 
                  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2831
 
                    newdeplibs="$newdeplibs $i"
2832
 
                  else
2833
 
                    droppeddeps=yes
2834
 
                    echo
2835
 
                    echo "*** Warning: This library needs some functionality provided by $i."
2836
 
                    echo "*** I have the capability to make that library automatically link in when"
2837
 
                    echo "*** you link to this library.  But I can only do this if you have a"
2838
 
                    echo "*** shared version of the library, which you do not appear to have."
2839
 
                  fi
2840
 
                else
2841
 
                  droppeddeps=yes
2842
 
                  echo
2843
 
                  echo "*** Warning!  Library $i is needed by this library but I was not able to"
2844
 
                  echo "***  make it link in!  You will probably need to install it or some"
2845
 
                  echo "*** library that it depends on before this library will be fully"
2846
 
                  echo "*** functional.  Installing it before continuing would be even better."
2847
 
                fi
2848
 
              else
2849
 
                newdeplibs="$newdeplibs $i"
2850
 
              fi
2851
 
            done
2852
 
          fi
2853
 
          ;;
2854
 
        file_magic*)
2855
 
          set dummy $deplibs_check_method
2856
 
          file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2857
 
          for a_deplib in $deplibs; do
2858
 
            name="`expr $a_deplib : '-l\(.*\)'`"
2859
 
            # If $name is empty we are operating on a -L argument.
2860
 
            if test -n "$name" && test "$name" != "0"; then
2861
 
              libname=`eval \\$echo \"$libname_spec\"`
2862
 
              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2863
 
                    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2864
 
                    for potent_lib in $potential_libs; do
2865
 
                      # Follow soft links.
2866
 
                      if ls -lLd "$potent_lib" 2>/dev/null \
2867
 
                         | grep " -> " >/dev/null; then
2868
 
                        continue
2869
 
                      fi
2870
 
                      # The statement above tries to avoid entering an
2871
 
                      # endless loop below, in case of cyclic links.
2872
 
                      # We might still enter an endless loop, since a link
2873
 
                      # loop can be closed while we follow links,
2874
 
                      # but so what?
2875
 
                      potlib="$potent_lib"
2876
 
                      while test -h "$potlib" 2>/dev/null; do
2877
 
                        potliblink=`ls -ld $potlib | sed 's/.* -> //'`
2878
 
                        case $potliblink in
2879
 
                        [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2880
 
                        *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2881
 
                        esac
2882
 
                      done
2883
 
                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2884
 
                         | sed 10q \
2885
 
                         | egrep "$file_magic_regex" > /dev/null; then
2886
 
                        newdeplibs="$newdeplibs $a_deplib"
2887
 
                        a_deplib=""
2888
 
                        break 2
2889
 
                      fi
2890
 
                    done
2891
 
              done
2892
 
              if test -n "$a_deplib" ; then
2893
 
                droppeddeps=yes
2894
 
                echo
2895
 
                echo "*** Warning: This library needs some functionality provided by $a_deplib."
2896
 
                echo "*** I have the capability to make that library automatically link in when"
2897
 
                echo "*** you link to this library.  But I can only do this if you have a"
2898
 
                echo "*** shared version of the library, which you do not appear to have."
2899
 
              fi
2900
 
            else
2901
 
              # Add a -L argument.
2902
 
              newdeplibs="$newdeplibs $a_deplib"
2903
 
            fi
2904
 
          done # Gone through all deplibs.
2905
 
          ;;
2906
 
        match_pattern*)
2907
 
          set dummy $deplibs_check_method
2908
 
          match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2909
 
          for a_deplib in $deplibs; do
2910
 
            name="`expr $a_deplib : '-l\(.*\)'`"
2911
 
            # If $name is empty we are operating on a -L argument.
2912
 
            if test -n "$name" && test "$name" != "0"; then
2913
 
              libname=`eval \\$echo \"$libname_spec\"`
2914
 
              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2915
 
                potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2916
 
                for potent_lib in $potential_libs; do
2917
 
                  if eval echo \"$potent_lib\" 2>/dev/null \
2918
 
                      | sed 10q \
2919
 
                      | egrep "$match_pattern_regex" > /dev/null; then
2920
 
                    newdeplibs="$newdeplibs $a_deplib"
2921
 
                    a_deplib=""
2922
 
                    break 2
2923
 
                  fi
2924
 
                done
2925
 
              done
2926
 
              if test -n "$a_deplib" ; then
2927
 
                droppeddeps=yes
2928
 
                echo
2929
 
                echo "*** Warning: This library needs some functionality provided by $a_deplib."
2930
 
                echo "*** I have the capability to make that library automatically link in when"
2931
 
                echo "*** you link to this library.  But I can only do this if you have a"
2932
 
                echo "*** shared version of the library, which you do not appear to have."
2933
 
              fi
2934
 
            else
2935
 
              # Add a -L argument.
2936
 
              newdeplibs="$newdeplibs $a_deplib"
2937
 
            fi
2938
 
          done # Gone through all deplibs.
2939
 
          ;;
2940
 
        none | unknown | *)
2941
 
          newdeplibs=""
2942
 
          if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2943
 
               -e 's/ -[LR][^ ]*//g' -e 's/[    ]//g' |
2944
 
             grep . >/dev/null; then
2945
 
            echo
2946
 
            if test "X$deplibs_check_method" = "Xnone"; then
2947
 
              echo "*** Warning: inter-library dependencies are not supported in this platform."
2948
 
            else
2949
 
              echo "*** Warning: inter-library dependencies are not known to be supported."
2950
 
            fi
2951
 
            echo "*** All declared inter-library dependencies are being dropped."
2952
 
            droppeddeps=yes
2953
 
          fi
2954
 
          ;;
2955
 
        esac
2956
 
        versuffix=$versuffix_save
2957
 
        major=$major_save
2958
 
        release=$release_save
2959
 
        libname=$libname_save
2960
 
        name=$name_save
2961
 
 
2962
 
        case $host in
2963
 
        *-*-rhapsody* | *-*-darwin1.[012])
2964
 
          # On Rhapsody replace the C library is the System framework
2965
 
          newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
2966
 
          ;;
2967
 
        esac
2968
 
 
2969
 
        if test "$droppeddeps" = yes; then
2970
 
          if test "$module" = yes; then
2971
 
            echo
2972
 
            echo "*** Warning: libtool could not satisfy all declared inter-library"
2973
 
            echo "*** dependencies of module $libname.  Therefore, libtool will create"
2974
 
            echo "*** a static module, that should work as long as the dlopening"
2975
 
            echo "*** application is linked with the -dlopen flag."
2976
 
            if test -z "$global_symbol_pipe"; then
2977
 
              echo
2978
 
              echo "*** However, this would only work if libtool was able to extract symbol"
2979
 
              echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2980
 
              echo "*** not find such a program.  So, this module is probably useless."
2981
 
              echo "*** \`nm' from GNU binutils and a full rebuild may help."
2982
 
            fi
2983
 
            if test "$build_old_libs" = no; then
2984
 
              oldlibs="$output_objdir/$libname.$libext"
2985
 
              build_libtool_libs=module
2986
 
              build_old_libs=yes
2987
 
            else
2988
 
              build_libtool_libs=no
2989
 
            fi
2990
 
          else
2991
 
            echo "*** The inter-library dependencies that have been dropped here will be"
2992
 
            echo "*** automatically added whenever a program is linked with this library"
2993
 
            echo "*** or is declared to -dlopen it."
2994
 
 
2995
 
            if test $allow_undefined = no; then
2996
 
              echo
2997
 
              echo "*** Since this library must not contain undefined symbols,"
2998
 
              echo "*** because either the platform does not support them or"
2999
 
              echo "*** it was explicitly requested with -no-undefined,"
3000
 
              echo "*** libtool will only create a static version of it."
3001
 
              if test "$build_old_libs" = no; then
3002
 
                oldlibs="$output_objdir/$libname.$libext"
3003
 
                build_libtool_libs=module
3004
 
                build_old_libs=yes
3005
 
              else
3006
 
                build_libtool_libs=no
3007
 
              fi
3008
 
            fi
3009
 
          fi
3010
 
        fi
3011
 
        # Done checking deplibs!
3012
 
        deplibs=$newdeplibs
3013
 
      fi
3014
 
 
3015
 
      # All the library-specific variables (install_libdir is set above).
3016
 
      library_names=
3017
 
      old_library=
3018
 
      dlname=
3019
 
 
3020
 
      # Test again, we may have decided not to build it any more
3021
 
      if test "$build_libtool_libs" = yes; then
3022
 
        if test $hardcode_into_libs = yes; then
3023
 
          # Hardcode the library paths
3024
 
          hardcode_libdirs=
3025
 
          dep_rpath=
3026
 
          rpath="$finalize_rpath"
3027
 
          test "$mode" != relink && rpath="$compile_rpath$rpath"
3028
 
          for libdir in $rpath; do
3029
 
            if test -n "$hardcode_libdir_flag_spec"; then
3030
 
              if test -n "$hardcode_libdir_separator"; then
3031
 
                if test -z "$hardcode_libdirs"; then
3032
 
                  hardcode_libdirs="$libdir"
3033
 
                else
3034
 
                  # Just accumulate the unique libdirs.
3035
 
                  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3036
 
                  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3037
 
                    ;;
3038
 
                  *)
3039
 
                    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3040
 
                    ;;
3041
 
                  esac
3042
 
                fi
3043
 
              else
3044
 
                eval flag=\"$hardcode_libdir_flag_spec\"
3045
 
                dep_rpath="$dep_rpath $flag"
3046
 
              fi
3047
 
            elif test -n "$runpath_var"; then
3048
 
              case "$perm_rpath " in
3049
 
              *" $libdir "*) ;;
3050
 
              *) perm_rpath="$perm_rpath $libdir" ;;
3051
 
              esac
3052
 
            fi
3053
 
          done
3054
 
          # Substitute the hardcoded libdirs into the rpath.
3055
 
          if test -n "$hardcode_libdir_separator" &&
3056
 
             test -n "$hardcode_libdirs"; then
3057
 
            libdir="$hardcode_libdirs"
3058
 
            eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3059
 
          fi
3060
 
          if test -n "$runpath_var" && test -n "$perm_rpath"; then
3061
 
            # We should set the runpath_var.
3062
 
            rpath=
3063
 
            for dir in $perm_rpath; do
3064
 
              rpath="$rpath$dir:"
3065
 
            done
3066
 
            eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3067
 
          fi
3068
 
          test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3069
 
        fi
3070
 
 
3071
 
        shlibpath="$finalize_shlibpath"
3072
 
        test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3073
 
        if test -n "$shlibpath"; then
3074
 
          eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3075
 
        fi
3076
 
 
3077
 
        # Get the real and link names of the library.
3078
 
        eval library_names=\"$library_names_spec\"
3079
 
        set dummy $library_names
3080
 
        realname="$2"
3081
 
        shift; shift
3082
 
 
3083
 
        if test -n "$soname_spec"; then
3084
 
          eval soname=\"$soname_spec\"
3085
 
        else
3086
 
          soname="$realname"
3087
 
        fi
3088
 
        test -z "$dlname" && dlname=$soname
3089
 
 
3090
 
        lib="$output_objdir/$realname"
3091
 
        for link
3092
 
        do
3093
 
          linknames="$linknames $link"
3094
 
        done
3095
 
 
3096
 
        # Ensure that we have .o objects for linkers which dislike .lo
3097
 
        # (e.g. aix) in case we are running --disable-static
3098
 
        for obj in $libobjs; do
3099
 
          xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
3100
 
          if test "X$xdir" = "X$obj"; then
3101
 
            xdir="."
3102
 
          else
3103
 
            xdir="$xdir"
3104
 
          fi
3105
 
          baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
3106
 
          oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3107
 
          if test ! -f $xdir/$oldobj; then
3108
 
            $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
3109
 
            $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
3110
 
          fi
3111
 
        done
3112
 
 
3113
 
        # Use standard objects if they are pic
3114
 
        test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3115
 
 
3116
 
        # Prepare the list of exported symbols
3117
 
        if test -z "$export_symbols"; then
3118
 
          if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3119
 
            $show "generating symbol list for \`$libname.la'"
3120
 
            export_symbols="$output_objdir/$libname.exp"
3121
 
            $run $rm $export_symbols
3122
 
            eval cmds=\"$export_symbols_cmds\"
3123
 
            save_ifs="$IFS"; IFS='~'
3124
 
            for cmd in $cmds; do
3125
 
              IFS="$save_ifs"
3126
 
              $show "$cmd"
3127
 
              $run eval "$cmd" || exit $?
3128
 
            done
3129
 
            IFS="$save_ifs"
3130
 
            if test -n "$export_symbols_regex"; then
3131
 
              $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3132
 
              $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3133
 
              $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3134
 
              $run eval '$mv "${export_symbols}T" "$export_symbols"'
3135
 
            fi
3136
 
          fi
3137
 
        fi
3138
 
 
3139
 
        if test -n "$export_symbols" && test -n "$include_expsyms"; then
3140
 
          $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3141
 
        fi
3142
 
 
3143
 
        if test -n "$convenience"; then
3144
 
          if test -n "$whole_archive_flag_spec"; then
3145
 
            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3146
 
          else
3147
 
            gentop="$output_objdir/${outputname}x"
3148
 
            $show "${rm}r $gentop"
3149
 
            $run ${rm}r "$gentop"
3150
 
            $show "mkdir $gentop"
3151
 
            $run mkdir "$gentop"
3152
 
            status=$?
3153
 
            if test $status -ne 0 && test ! -d "$gentop"; then
3154
 
              exit $status
3155
 
            fi
3156
 
            generated="$generated $gentop"
3157
 
 
3158
 
            for xlib in $convenience; do
3159
 
              # Extract the objects.
3160
 
              case $xlib in
3161
 
              [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3162
 
              *) xabs=`pwd`"/$xlib" ;;
3163
 
              esac
3164
 
              xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3165
 
              xdir="$gentop/$xlib"
3166
 
 
3167
 
              $show "${rm}r $xdir"
3168
 
              $run ${rm}r "$xdir"
3169
 
              $show "mkdir $xdir"
3170
 
              $run mkdir "$xdir"
3171
 
              status=$?
3172
 
              if test $status -ne 0 && test ! -d "$xdir"; then
3173
 
                exit $status
3174
 
              fi
3175
 
              $show "(cd $xdir && $AR x $xabs)"
3176
 
              $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3177
 
 
3178
 
              libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
3179
 
            done
3180
 
          fi
3181
 
        fi
3182
 
 
3183
 
        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3184
 
          eval flag=\"$thread_safe_flag_spec\"
3185
 
          linker_flags="$linker_flags $flag"
3186
 
        fi
3187
 
 
3188
 
        # Make a backup of the uninstalled library when relinking
3189
 
        if test "$mode" = relink; then
3190
 
          $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
3191
 
        fi
3192
 
 
3193
 
        # Do each of the archive commands.
3194
 
        if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3195
 
          eval cmds=\"$archive_expsym_cmds\"
3196
 
        else
3197
 
          eval cmds=\"$archive_cmds\"
3198
 
        fi
3199
 
        save_ifs="$IFS"; IFS='~'
3200
 
        for cmd in $cmds; do
3201
 
          IFS="$save_ifs"
3202
 
          $show "$cmd"
3203
 
          $run eval "$cmd" || exit $?
3204
 
        done
3205
 
        IFS="$save_ifs"
3206
 
 
3207
 
        # Restore the uninstalled library and exit
3208
 
        if test "$mode" = relink; then
3209
 
          $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
3210
 
          exit 0
3211
 
        fi
3212
 
 
3213
 
        # Create links to the real library.
3214
 
        for linkname in $linknames; do
3215
 
          if test "$realname" != "$linkname"; then
3216
 
            $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
3217
 
            $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
3218
 
          fi
3219
 
        done
3220
 
 
3221
 
        # If -module or -export-dynamic was specified, set the dlname.
3222
 
        if test "$module" = yes || test "$export_dynamic" = yes; then
3223
 
          # On all known operating systems, these are identical.
3224
 
          dlname="$soname"
3225
 
        fi
3226
 
      fi
3227
 
      ;;
3228
 
 
3229
 
    obj)
3230
 
      if test -n "$deplibs"; then
3231
 
        $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
3232
 
      fi
3233
 
 
3234
 
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3235
 
        $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
3236
 
      fi
3237
 
 
3238
 
      if test -n "$rpath"; then
3239
 
        $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
3240
 
      fi
3241
 
 
3242
 
      if test -n "$xrpath"; then
3243
 
        $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
3244
 
      fi
3245
 
 
3246
 
      if test -n "$vinfo"; then
3247
 
        $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
3248
 
      fi
3249
 
 
3250
 
      if test -n "$release"; then
3251
 
        $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3252
 
      fi
3253
 
 
3254
 
      case $output in
3255
 
      *.lo)
3256
 
        if test -n "$objs$old_deplibs"; then
3257
 
          $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3258
 
          exit 1
3259
 
        fi
3260
 
        libobj="$output"
3261
 
        obj=`$echo "X$output" | $Xsed -e "$lo2o"`
3262
 
        ;;
3263
 
      *)
3264
 
        libobj=
3265
 
        obj="$output"
3266
 
        ;;
3267
 
      esac
3268
 
 
3269
 
      # Delete the old objects.
3270
 
      $run $rm $obj $libobj
3271
 
 
3272
 
      # Objects from convenience libraries.  This assumes
3273
 
      # single-version convenience libraries.  Whenever we create
3274
 
      # different ones for PIC/non-PIC, this we'll have to duplicate
3275
 
      # the extraction.
3276
 
      reload_conv_objs=
3277
 
      gentop=
3278
 
      # reload_cmds runs $LD directly, so let us get rid of
3279
 
      # -Wl from whole_archive_flag_spec
3280
 
      wl=
3281
 
 
3282
 
      if test -n "$convenience"; then
3283
 
        if test -n "$whole_archive_flag_spec"; then
3284
 
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3285
 
        else
3286
 
          gentop="$output_objdir/${obj}x"
3287
 
          $show "${rm}r $gentop"
3288
 
          $run ${rm}r "$gentop"
3289
 
          $show "mkdir $gentop"
3290
 
          $run mkdir "$gentop"
3291
 
          status=$?
3292
 
          if test $status -ne 0 && test ! -d "$gentop"; then
3293
 
            exit $status
3294
 
          fi
3295
 
          generated="$generated $gentop"
3296
 
 
3297
 
          for xlib in $convenience; do
3298
 
            # Extract the objects.
3299
 
            case $xlib in
3300
 
            [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3301
 
            *) xabs=`pwd`"/$xlib" ;;
3302
 
            esac
3303
 
            xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3304
 
            xdir="$gentop/$xlib"
3305
 
 
3306
 
            $show "${rm}r $xdir"
3307
 
            $run ${rm}r "$xdir"
3308
 
            $show "mkdir $xdir"
3309
 
            $run mkdir "$xdir"
3310
 
            status=$?
3311
 
            if test $status -ne 0 && test ! -d "$xdir"; then
3312
 
              exit $status
3313
 
            fi
3314
 
            $show "(cd $xdir && $AR x $xabs)"
3315
 
            $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3316
 
 
3317
 
            reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
3318
 
          done
3319
 
        fi
3320
 
      fi
3321
 
 
3322
 
      # Create the old-style object.
3323
 
      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
3324
 
 
3325
 
      output="$obj"
3326
 
      eval cmds=\"$reload_cmds\"
3327
 
      save_ifs="$IFS"; IFS='~'
3328
 
      for cmd in $cmds; do
3329
 
        IFS="$save_ifs"
3330
 
        $show "$cmd"
3331
 
        $run eval "$cmd" || exit $?
3332
 
      done
3333
 
      IFS="$save_ifs"
3334
 
 
3335
 
      # Exit if we aren't doing a library object file.
3336
 
      if test -z "$libobj"; then
3337
 
        if test -n "$gentop"; then
3338
 
          $show "${rm}r $gentop"
3339
 
          $run ${rm}r $gentop
3340
 
        fi
3341
 
 
3342
 
        exit 0
3343
 
      fi
3344
 
 
3345
 
      if test "$build_libtool_libs" != yes; then
3346
 
        if test -n "$gentop"; then
3347
 
          $show "${rm}r $gentop"
3348
 
          $run ${rm}r $gentop
3349
 
        fi
3350
 
 
3351
 
        # Create an invalid libtool object if no PIC, so that we don't
3352
 
        # accidentally link it into a program.
3353
 
        $show "echo timestamp > $libobj"
3354
 
        $run eval "echo timestamp > $libobj" || exit $?
3355
 
        exit 0
3356
 
      fi
3357
 
 
3358
 
      if test -n "$pic_flag" || test "$pic_mode" != default; then
3359
 
        # Only do commands if we really have different PIC objects.
3360
 
        reload_objs="$libobjs $reload_conv_objs"
3361
 
        output="$libobj"
3362
 
        eval cmds=\"$reload_cmds\"
3363
 
        save_ifs="$IFS"; IFS='~'
3364
 
        for cmd in $cmds; do
3365
 
          IFS="$save_ifs"
3366
 
          $show "$cmd"
3367
 
          $run eval "$cmd" || exit $?
3368
 
        done
3369
 
        IFS="$save_ifs"
3370
 
      else
3371
 
        # Just create a symlink.
3372
 
        $show $rm $libobj
3373
 
        $run $rm $libobj
3374
 
        xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
3375
 
        if test "X$xdir" = "X$libobj"; then
3376
 
          xdir="."
3377
 
        else
3378
 
          xdir="$xdir"
3379
 
        fi
3380
 
        baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
3381
 
        oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3382
 
        $show "(cd $xdir && $LN_S $oldobj $baseobj)"
3383
 
        $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
3384
 
      fi
3385
 
 
3386
 
      if test -n "$gentop"; then
3387
 
        $show "${rm}r $gentop"
3388
 
        $run ${rm}r $gentop
3389
 
      fi
3390
 
 
3391
 
      exit 0
3392
 
      ;;
3393
 
 
3394
 
    prog)
3395
 
      case $host in
3396
 
        *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
3397
 
      esac
3398
 
      if test -n "$vinfo"; then
3399
 
        $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3400
 
      fi
3401
 
 
3402
 
      if test -n "$release"; then
3403
 
        $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
3404
 
      fi
3405
 
 
3406
 
      if test "$preload" = yes; then
3407
 
        if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
3408
 
           test "$dlopen_self_static" = unknown; then
3409
 
          $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
3410
 
        fi
3411
 
      fi
3412
 
 
3413
 
      case $host in
3414
 
      *-*-rhapsody* | *-*-darwin1.[012])
3415
 
        # On Rhapsody replace the C library is the System framework
3416
 
        compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3417
 
        finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3418
 
        ;;
3419
 
      esac
3420
 
 
3421
 
      compile_command="$compile_command $compile_deplibs"
3422
 
      finalize_command="$finalize_command $finalize_deplibs"
3423
 
 
3424
 
      if test -n "$rpath$xrpath"; then
3425
 
        # If the user specified any rpath flags, then add them.
3426
 
        for libdir in $rpath $xrpath; do
3427
 
          # This is the magic to use -rpath.
3428
 
          case "$finalize_rpath " in
3429
 
          *" $libdir "*) ;;
3430
 
          *) finalize_rpath="$finalize_rpath $libdir" ;;
3431
 
          esac
3432
 
        done
3433
 
      fi
3434
 
 
3435
 
      # Now hardcode the library paths
3436
 
      rpath=
3437
 
      hardcode_libdirs=
3438
 
      for libdir in $compile_rpath $finalize_rpath; do
3439
 
        if test -n "$hardcode_libdir_flag_spec"; then
3440
 
          if test -n "$hardcode_libdir_separator"; then
3441
 
            if test -z "$hardcode_libdirs"; then
3442
 
              hardcode_libdirs="$libdir"
3443
 
            else
3444
 
              # Just accumulate the unique libdirs.
3445
 
              case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3446
 
              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3447
 
                ;;
3448
 
              *)
3449
 
                hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3450
 
                ;;
3451
 
              esac
3452
 
            fi
3453
 
          else
3454
 
            eval flag=\"$hardcode_libdir_flag_spec\"
3455
 
            rpath="$rpath $flag"
3456
 
          fi
3457
 
        elif test -n "$runpath_var"; then
3458
 
          case "$perm_rpath " in
3459
 
          *" $libdir "*) ;;
3460
 
          *) perm_rpath="$perm_rpath $libdir" ;;
3461
 
          esac
3462
 
        fi
3463
 
        case $host in
3464
 
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
3465
 
          case :$dllsearchpath: in
3466
 
          *":$libdir:"*) ;;
3467
 
          *) dllsearchpath="$dllsearchpath:$libdir";;
3468
 
          esac
3469
 
          ;;
3470
 
        esac
3471
 
      done
3472
 
      # Substitute the hardcoded libdirs into the rpath.
3473
 
      if test -n "$hardcode_libdir_separator" &&
3474
 
         test -n "$hardcode_libdirs"; then
3475
 
        libdir="$hardcode_libdirs"
3476
 
        eval rpath=\" $hardcode_libdir_flag_spec\"
3477
 
      fi
3478
 
      compile_rpath="$rpath"
3479
 
 
3480
 
      rpath=
3481
 
      hardcode_libdirs=
3482
 
      for libdir in $finalize_rpath; do
3483
 
        if test -n "$hardcode_libdir_flag_spec"; then
3484
 
          if test -n "$hardcode_libdir_separator"; then
3485
 
            if test -z "$hardcode_libdirs"; then
3486
 
              hardcode_libdirs="$libdir"
3487
 
            else
3488
 
              # Just accumulate the unique libdirs.
3489
 
              case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3490
 
              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3491
 
                ;;
3492
 
              *)
3493
 
                hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3494
 
                ;;
3495
 
              esac
3496
 
            fi
3497
 
          else
3498
 
            eval flag=\"$hardcode_libdir_flag_spec\"
3499
 
            rpath="$rpath $flag"
3500
 
          fi
3501
 
        elif test -n "$runpath_var"; then
3502
 
          case "$finalize_perm_rpath " in
3503
 
          *" $libdir "*) ;;
3504
 
          *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
3505
 
          esac
3506
 
        fi
3507
 
      done
3508
 
      # Substitute the hardcoded libdirs into the rpath.
3509
 
      if test -n "$hardcode_libdir_separator" &&
3510
 
         test -n "$hardcode_libdirs"; then
3511
 
        libdir="$hardcode_libdirs"
3512
 
        eval rpath=\" $hardcode_libdir_flag_spec\"
3513
 
      fi
3514
 
      finalize_rpath="$rpath"
3515
 
 
3516
 
      if test -n "$libobjs" && test "$build_old_libs" = yes; then
3517
 
        # Transform all the library objects into standard objects.
3518
 
        compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3519
 
        finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3520
 
      fi
3521
 
 
3522
 
      dlsyms=
3523
 
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3524
 
        if test -n "$NM" && test -n "$global_symbol_pipe"; then
3525
 
          dlsyms="${outputname}S.c"
3526
 
        else
3527
 
          $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3528
 
        fi
3529
 
      fi
3530
 
 
3531
 
      if test -n "$dlsyms"; then
3532
 
        case $dlsyms in
3533
 
        "") ;;
3534
 
        *.c)
3535
 
          # Discover the nlist of each of the dlfiles.
3536
 
          nlist="$output_objdir/${outputname}.nm"
3537
 
 
3538
 
          $show "$rm $nlist ${nlist}S ${nlist}T"
3539
 
          $run $rm "$nlist" "${nlist}S" "${nlist}T"
3540
 
 
3541
 
          # Parse the name list into a source file.
3542
 
          $show "creating $output_objdir/$dlsyms"
3543
 
 
3544
 
          test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
3545
 
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
3546
 
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
3547
 
 
3548
 
#ifdef __cplusplus
3549
 
extern \"C\" {
3550
 
#endif
3551
 
 
3552
 
/* Prevent the only kind of declaration conflicts we can make. */
3553
 
#define lt_preloaded_symbols some_other_symbol
3554
 
 
3555
 
/* External symbol declarations for the compiler. */\
3556
 
"
3557
 
 
3558
 
          if test "$dlself" = yes; then
3559
 
            $show "generating symbol list for \`$output'"
3560
 
 
3561
 
            test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3562
 
 
3563
 
            # Add our own program objects to the symbol list.
3564
 
            progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3565
 
            for arg in $progfiles; do
3566
 
              $show "extracting global C symbols from \`$arg'"
3567
 
              $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3568
 
            done
3569
 
 
3570
 
            if test -n "$exclude_expsyms"; then
3571
 
              $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3572
 
              $run eval '$mv "$nlist"T "$nlist"'
3573
 
            fi
3574
 
 
3575
 
            if test -n "$export_symbols_regex"; then
3576
 
              $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3577
 
              $run eval '$mv "$nlist"T "$nlist"'
3578
 
            fi
3579
 
 
3580
 
            # Prepare the list of exported symbols
3581
 
            if test -z "$export_symbols"; then
3582
 
              export_symbols="$output_objdir/$output.exp"
3583
 
              $run $rm $export_symbols
3584
 
              $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3585
 
            else
3586
 
              $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3587
 
              $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3588
 
              $run eval 'mv "$nlist"T "$nlist"'
3589
 
            fi
3590
 
          fi
3591
 
 
3592
 
          for arg in $dlprefiles; do
3593
 
            $show "extracting global C symbols from \`$arg'"
3594
 
            name=`echo "$arg" | sed -e 's%^.*/%%'`
3595
 
            $run eval 'echo ": $name " >> "$nlist"'
3596
 
            $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3597
 
          done
3598
 
 
3599
 
          if test -z "$run"; then
3600
 
            # Make sure we have at least an empty file.
3601
 
            test -f "$nlist" || : > "$nlist"
3602
 
 
3603
 
            if test -n "$exclude_expsyms"; then
3604
 
              egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3605
 
              $mv "$nlist"T "$nlist"
3606
 
            fi
3607
 
 
3608
 
            # Try sorting and uniquifying the output.
3609
 
            if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
3610
 
              :
3611
 
            else
3612
 
              grep -v "^: " < "$nlist" > "$nlist"S
3613
 
            fi
3614
 
 
3615
 
            if test -f "$nlist"S; then
3616
 
              eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3617
 
            else
3618
 
              echo '/* NONE */' >> "$output_objdir/$dlsyms"
3619
 
            fi
3620
 
 
3621
 
            $echo >> "$output_objdir/$dlsyms" "\
3622
 
 
3623
 
#undef lt_preloaded_symbols
3624
 
 
3625
 
#if defined (__STDC__) && __STDC__
3626
 
# define lt_ptr void *
3627
 
#else
3628
 
# define lt_ptr char *
3629
 
# define const
3630
 
#endif
3631
 
 
3632
 
/* The mapping between symbol names and symbols. */
3633
 
const struct {
3634
 
  const char *name;
3635
 
  lt_ptr address;
3636
 
}
3637
 
lt_preloaded_symbols[] =
3638
 
{\
3639
 
"
3640
 
 
3641
 
            eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
3642
 
 
3643
 
            $echo >> "$output_objdir/$dlsyms" "\
3644
 
  {0, (lt_ptr) 0}
3645
 
};
3646
 
 
3647
 
/* This works around a problem in FreeBSD linker */
3648
 
#ifdef FREEBSD_WORKAROUND
3649
 
static const void *lt_preloaded_setup() {
3650
 
  return lt_preloaded_symbols;
3651
 
}
3652
 
#endif
3653
 
 
3654
 
#ifdef __cplusplus
3655
 
}
3656
 
#endif\
3657
 
"
3658
 
          fi
3659
 
 
3660
 
          pic_flag_for_symtable=
3661
 
          case $host in
3662
 
          # compiling the symbol table file with pic_flag works around
3663
 
          # a FreeBSD bug that causes programs to crash when -lm is
3664
 
          # linked before any other PIC object.  But we must not use
3665
 
          # pic_flag when linking with -static.  The problem exists in
3666
 
          # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3667
 
          *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3668
 
            case "$compile_command " in
3669
 
            *" -static "*) ;;
3670
 
            *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
3671
 
            esac;;
3672
 
          *-*-hpux*)
3673
 
            case "$compile_command " in
3674
 
            *" -static "*) ;;
3675
 
            *) pic_flag_for_symtable=" $pic_flag -DPIC";;
3676
 
            esac
3677
 
          esac
3678
 
 
3679
 
          # Now compile the dynamic symbol file.
3680
 
          $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3681
 
          $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
3682
 
 
3683
 
          # Clean up the generated files.
3684
 
          $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3685
 
          $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3686
 
 
3687
 
          # Transform the symbol file into the correct name.
3688
 
          compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3689
 
          finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3690
 
          ;;
3691
 
        *)
3692
 
          $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3693
 
          exit 1
3694
 
          ;;
3695
 
        esac
3696
 
      else
3697
 
        # We keep going just in case the user didn't refer to
3698
 
        # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
3699
 
        # really was required.
3700
 
 
3701
 
        # Nullify the symbol file.
3702
 
        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3703
 
        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3704
 
      fi
3705
 
 
3706
 
      if test $need_relink = no || test "$build_libtool_libs" != yes; then
3707
 
        # Replace the output file specification.
3708
 
        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3709
 
        link_command="$compile_command$compile_rpath"
3710
 
 
3711
 
        # We have no uninstalled library dependencies, so finalize right now.
3712
 
        $show "$link_command"
3713
 
        $run eval "$link_command"
3714
 
        status=$?
3715
 
 
3716
 
        # Delete the generated files.
3717
 
        if test -n "$dlsyms"; then
3718
 
          $show "$rm $output_objdir/${outputname}S.${objext}"
3719
 
          $run $rm "$output_objdir/${outputname}S.${objext}"
3720
 
        fi
3721
 
 
3722
 
        exit $status
3723
 
      fi
3724
 
 
3725
 
      if test -n "$shlibpath_var"; then
3726
 
        # We should set the shlibpath_var
3727
 
        rpath=
3728
 
        for dir in $temp_rpath; do
3729
 
          case $dir in
3730
 
          [\\/]* | [A-Za-z]:[\\/]*)
3731
 
            # Absolute path.
3732
 
            rpath="$rpath$dir:"
3733
 
            ;;
3734
 
          *)
3735
 
            # Relative path: add a thisdir entry.
3736
 
            rpath="$rpath\$thisdir/$dir:"
3737
 
            ;;
3738
 
          esac
3739
 
        done
3740
 
        temp_rpath="$rpath"
3741
 
      fi
3742
 
 
3743
 
      if test -n "$compile_shlibpath$finalize_shlibpath"; then
3744
 
        compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
3745
 
      fi
3746
 
      if test -n "$finalize_shlibpath"; then
3747
 
        finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
3748
 
      fi
3749
 
 
3750
 
      compile_var=
3751
 
      finalize_var=
3752
 
      if test -n "$runpath_var"; then
3753
 
        if test -n "$perm_rpath"; then
3754
 
          # We should set the runpath_var.
3755
 
          rpath=
3756
 
          for dir in $perm_rpath; do
3757
 
            rpath="$rpath$dir:"
3758
 
          done
3759
 
          compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
3760
 
        fi
3761
 
        if test -n "$finalize_perm_rpath"; then
3762
 
          # We should set the runpath_var.
3763
 
          rpath=
3764
 
          for dir in $finalize_perm_rpath; do
3765
 
            rpath="$rpath$dir:"
3766
 
          done
3767
 
          finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
3768
 
        fi
3769
 
      fi
3770
 
 
3771
 
      if test "$no_install" = yes; then
3772
 
        # We don't need to create a wrapper script.
3773
 
        link_command="$compile_var$compile_command$compile_rpath"
3774
 
        # Replace the output file specification.
3775
 
        link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3776
 
        # Delete the old output file.
3777
 
        $run $rm $output
3778
 
        # Link the executable and exit
3779
 
        $show "$link_command"
3780
 
        $run eval "$link_command" || exit $?
3781
 
        exit 0
3782
 
      fi
3783
 
 
3784
 
      if test "$hardcode_action" = relink; then
3785
 
        # Fast installation is not supported
3786
 
        link_command="$compile_var$compile_command$compile_rpath"
3787
 
        relink_command="$finalize_var$finalize_command$finalize_rpath"
3788
 
 
3789
 
        $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3790
 
        $echo "$modename: \`$output' will be relinked during installation" 1>&2
3791
 
      else
3792
 
        if test "$fast_install" != no; then
3793
 
          link_command="$finalize_var$compile_command$finalize_rpath"
3794
 
          if test "$fast_install" = yes; then
3795
 
            relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3796
 
          else
3797
 
            # fast_install is set to needless
3798
 
            relink_command=
3799
 
          fi
3800
 
        else
3801
 
          link_command="$compile_var$compile_command$compile_rpath"
3802
 
          relink_command="$finalize_var$finalize_command$finalize_rpath"
3803
 
        fi
3804
 
      fi
3805
 
 
3806
 
      # Replace the output file specification.
3807
 
      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3808
 
 
3809
 
      # Delete the old output files.
3810
 
      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
3811
 
 
3812
 
      $show "$link_command"
3813
 
      $run eval "$link_command" || exit $?
3814
 
 
3815
 
      # Now create the wrapper script.
3816
 
      $show "creating $output"
3817
 
 
3818
 
      # Quote the relink command for shipping.
3819
 
      if test -n "$relink_command"; then
3820
 
        # Preserve any variables that may affect compiler behavior
3821
 
        for var in $variables_saved_for_relink; do
3822
 
          if eval test -z \"\${$var+set}\"; then
3823
 
            relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
3824
 
          elif eval var_value=\$$var; test -z "$var_value"; then
3825
 
            relink_command="$var=; export $var; $relink_command"
3826
 
          else
3827
 
            var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
3828
 
            relink_command="$var=\"$var_value\"; export $var; $relink_command"
3829
 
          fi
3830
 
        done
3831
 
        relink_command="cd `pwd`; $relink_command"
3832
 
        relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3833
 
      fi
3834
 
 
3835
 
      # Quote $echo for shipping.
3836
 
      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3837
 
        case $0 in
3838
 
        [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
3839
 
        *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
3840
 
        esac
3841
 
        qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3842
 
      else
3843
 
        qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3844
 
      fi
3845
 
 
3846
 
      # Only actually do things if our run command is non-null.
3847
 
      if test -z "$run"; then
3848
 
        # win32 will think the script is a binary if it has
3849
 
        # a .exe suffix, so we strip it off here.
3850
 
        case $output in
3851
 
          *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
3852
 
        esac
3853
 
        # test for cygwin because mv fails w/o .exe extensions
3854
 
        case $host in
3855
 
          *cygwin*) exeext=.exe ;;
3856
 
          *) exeext= ;;
3857
 
        esac
3858
 
        $rm $output
3859
 
        trap "$rm $output; exit 1" 1 2 15
3860
 
 
3861
 
        $echo > $output "\
3862
 
#! $SHELL
3863
 
 
3864
 
# $output - temporary wrapper script for $objdir/$outputname
3865
 
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3866
 
#
3867
 
# The $output program cannot be directly executed until all the libtool
3868
 
# libraries that it depends on are installed.
3869
 
#
3870
 
# This wrapper script should never be moved out of the build directory.
3871
 
# If it is, it will not operate correctly.
3872
 
 
3873
 
# Sed substitution that helps us do robust quoting.  It backslashifies
3874
 
# metacharacters that are still active within double-quoted strings.
3875
 
Xsed='sed -e 1s/^X//'
3876
 
sed_quote_subst='$sed_quote_subst'
3877
 
 
3878
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
3879
 
# if CDPATH is set.
3880
 
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
3881
 
 
3882
 
relink_command=\"$relink_command\"
3883
 
 
3884
 
# This environment variable determines our operation mode.
3885
 
if test \"\$libtool_install_magic\" = \"$magic\"; then
3886
 
  # install mode needs the following variable:
3887
 
  notinst_deplibs='$notinst_deplibs'
3888
 
else
3889
 
  # When we are sourced in execute mode, \$file and \$echo are already set.
3890
 
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
3891
 
    echo=\"$qecho\"
3892
 
    file=\"\$0\"
3893
 
    # Make sure echo works.
3894
 
    if test \"X\$1\" = X--no-reexec; then
3895
 
      # Discard the --no-reexec flag, and continue.
3896
 
      shift
3897
 
    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
3898
 
      # Yippee, \$echo works!
3899
 
      :
3900
 
    else
3901
 
      # Restart under the correct shell, and then maybe \$echo will work.
3902
 
      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
3903
 
    fi
3904
 
  fi\
3905
 
"
3906
 
        $echo >> $output "\
3907
 
 
3908
 
  # Find the directory that this script lives in.
3909
 
  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3910
 
  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3911
 
 
3912
 
  # Follow symbolic links until we get to the real thisdir.
3913
 
  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
3914
 
  while test -n \"\$file\"; do
3915
 
    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3916
 
 
3917
 
    # If there was a directory component, then change thisdir.
3918
 
    if test \"x\$destdir\" != \"x\$file\"; then
3919
 
      case \"\$destdir\" in
3920
 
      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
3921
 
      *) thisdir=\"\$thisdir/\$destdir\" ;;
3922
 
      esac
3923
 
    fi
3924
 
 
3925
 
    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3926
 
    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
3927
 
  done
3928
 
 
3929
 
  # Try to get the absolute directory name.
3930
 
  absdir=\`cd \"\$thisdir\" && pwd\`
3931
 
  test -n \"\$absdir\" && thisdir=\"\$absdir\"
3932
 
"
3933
 
 
3934
 
        if test "$fast_install" = yes; then
3935
 
          echo >> $output "\
3936
 
  program=lt-'$outputname'$exeext
3937
 
  progdir=\"\$thisdir/$objdir\"
3938
 
 
3939
 
  if test ! -f \"\$progdir/\$program\" || \\
3940
 
     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
3941
 
       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3942
 
 
3943
 
    file=\"\$\$-\$program\"
3944
 
 
3945
 
    if test ! -d \"\$progdir\"; then
3946
 
      $mkdir \"\$progdir\"
3947
 
    else
3948
 
      $rm \"\$progdir/\$file\"
3949
 
    fi"
3950
 
 
3951
 
          echo >> $output "\
3952
 
 
3953
 
    # relink executable if necessary
3954
 
    if test -n \"\$relink_command\"; then
3955
 
      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
3956
 
      else
3957
 
        $echo \"\$relink_command_output\" >&2
3958
 
        $rm \"\$progdir/\$file\"
3959
 
        exit 1
3960
 
      fi
3961
 
    fi
3962
 
 
3963
 
    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
3964
 
    { $rm \"\$progdir/\$program\";
3965
 
      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
3966
 
    $rm \"\$progdir/\$file\"
3967
 
  fi"
3968
 
        else
3969
 
          echo >> $output "\
3970
 
  program='$outputname'
3971
 
  progdir=\"\$thisdir/$objdir\"
3972
 
"
3973
 
        fi
3974
 
 
3975
 
        echo >> $output "\
3976
 
 
3977
 
  if test -f \"\$progdir/\$program\"; then"
3978
 
 
3979
 
        # Export our shlibpath_var if we have one.
3980
 
        if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3981
 
          $echo >> $output "\
3982
 
    # Add our own library path to $shlibpath_var
3983
 
    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3984
 
 
3985
 
    # Some systems cannot cope with colon-terminated $shlibpath_var
3986
 
    # The second colon is a workaround for a bug in BeOS R4 sed
3987
 
    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3988
 
 
3989
 
    export $shlibpath_var
3990
 
"
3991
 
        fi
3992
 
 
3993
 
        # fixup the dll searchpath if we need to.
3994
 
        if test -n "$dllsearchpath"; then
3995
 
          $echo >> $output "\
3996
 
    # Add the dll search path components to the executable PATH
3997
 
    PATH=$dllsearchpath:\$PATH
3998
 
"
3999
 
        fi
4000
 
 
4001
 
        $echo >> $output "\
4002
 
    if test \"\$libtool_execute_magic\" != \"$magic\"; then
4003
 
      # Run the actual program with our arguments.
4004
 
"
4005
 
        case $host in
4006
 
        # win32 systems need to use the prog path for dll
4007
 
        # lookup to work
4008
 
        *-*-cygwin* | *-*-pw32*)
4009
 
          $echo >> $output "\
4010
 
      exec \$progdir/\$program \${1+\"\$@\"}
4011
 
"
4012
 
          ;;
4013
 
 
4014
 
        # Backslashes separate directories on plain windows
4015
 
        *-*-mingw | *-*-os2*)
4016
 
          $echo >> $output "\
4017
 
      exec \$progdir\\\\\$program \${1+\"\$@\"}
4018
 
"
4019
 
          ;;
4020
 
 
4021
 
        *)
4022
 
          $echo >> $output "\
4023
 
      # Export the path to the program.
4024
 
      PATH=\"\$progdir:\$PATH\"
4025
 
      export PATH
4026
 
 
4027
 
      exec \$program \${1+\"\$@\"}
4028
 
"
4029
 
          ;;
4030
 
        esac
4031
 
        $echo >> $output "\
4032
 
      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
4033
 
      exit 1
4034
 
    fi
4035
 
  else
4036
 
    # The program doesn't exist.
4037
 
    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
4038
 
    \$echo \"This script is just a wrapper for \$program.\" 1>&2
4039
 
    echo \"See the $PACKAGE documentation for more information.\" 1>&2
4040
 
    exit 1
4041
 
  fi
4042
 
fi\
4043
 
"
4044
 
        chmod +x $output
4045
 
      fi
4046
 
      exit 0
4047
 
      ;;
4048
 
    esac
4049
 
 
4050
 
    # See if we need to build an old-fashioned archive.
4051
 
    for oldlib in $oldlibs; do
4052
 
 
4053
 
      if test "$build_libtool_libs" = convenience; then
4054
 
        oldobjs="$libobjs_save"
4055
 
        addlibs="$convenience"
4056
 
        build_libtool_libs=no
4057
 
      else
4058
 
        if test "$build_libtool_libs" = module; then
4059
 
          oldobjs="$libobjs_save"
4060
 
          build_libtool_libs=no
4061
 
        else
4062
 
          oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
4063
 
        fi
4064
 
        addlibs="$old_convenience"
4065
 
      fi
4066
 
 
4067
 
      if test -n "$addlibs"; then
4068
 
        gentop="$output_objdir/${outputname}x"
4069
 
        $show "${rm}r $gentop"
4070
 
        $run ${rm}r "$gentop"
4071
 
        $show "mkdir $gentop"
4072
 
        $run mkdir "$gentop"
4073
 
        status=$?
4074
 
        if test $status -ne 0 && test ! -d "$gentop"; then
4075
 
          exit $status
4076
 
        fi
4077
 
        generated="$generated $gentop"
4078
 
 
4079
 
        # Add in members from convenience archives.
4080
 
        for xlib in $addlibs; do
4081
 
          # Extract the objects.
4082
 
          case $xlib in
4083
 
          [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4084
 
          *) xabs=`pwd`"/$xlib" ;;
4085
 
          esac
4086
 
          xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4087
 
          xdir="$gentop/$xlib"
4088
 
 
4089
 
          $show "${rm}r $xdir"
4090
 
          $run ${rm}r "$xdir"
4091
 
          $show "mkdir $xdir"
4092
 
          $run mkdir "$xdir"
4093
 
          status=$?
4094
 
          if test $status -ne 0 && test ! -d "$xdir"; then
4095
 
            exit $status
4096
 
          fi
4097
 
          $show "(cd $xdir && $AR x $xabs)"
4098
 
          $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4099
 
 
4100
 
          oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
4101
 
        done
4102
 
      fi
4103
 
 
4104
 
      # Do each command in the archive commands.
4105
 
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
4106
 
        eval cmds=\"$old_archive_from_new_cmds\"
4107
 
      else
4108
 
        # Ensure that we have .o objects in place in case we decided
4109
 
        # not to build a shared library, and have fallen back to building
4110
 
        # static libs even though --disable-static was passed!
4111
 
        for oldobj in $oldobjs; do
4112
 
          if test ! -f $oldobj; then
4113
 
            xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
4114
 
            if test "X$xdir" = "X$oldobj"; then
4115
 
              xdir="."
4116
 
            else
4117
 
              xdir="$xdir"
4118
 
            fi
4119
 
            baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
4120
 
            obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
4121
 
            $show "(cd $xdir && ${LN_S} $obj $baseobj)"
4122
 
            $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
4123
 
          fi
4124
 
        done
4125
 
 
4126
 
        eval cmds=\"$old_archive_cmds\"
4127
 
      fi
4128
 
      save_ifs="$IFS"; IFS='~'
4129
 
      for cmd in $cmds; do
4130
 
        IFS="$save_ifs"
4131
 
        $show "$cmd"
4132
 
        $run eval "$cmd" || exit $?
4133
 
      done
4134
 
      IFS="$save_ifs"
4135
 
    done
4136
 
 
4137
 
    if test -n "$generated"; then
4138
 
      $show "${rm}r$generated"
4139
 
      $run ${rm}r$generated
4140
 
    fi
4141
 
 
4142
 
    # Now create the libtool archive.
4143
 
    case $output in
4144
 
    *.la)
4145
 
      old_library=
4146
 
      test "$build_old_libs" = yes && old_library="$libname.$libext"
4147
 
      $show "creating $output"
4148
 
 
4149
 
      # Preserve any variables that may affect compiler behavior
4150
 
      for var in $variables_saved_for_relink; do
4151
 
        if eval test -z \"\${$var+set}\"; then
4152
 
          relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4153
 
        elif eval var_value=\$$var; test -z "$var_value"; then
4154
 
          relink_command="$var=; export $var; $relink_command"
4155
 
        else
4156
 
          var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4157
 
          relink_command="$var=\"$var_value\"; export $var; $relink_command"
4158
 
        fi
4159
 
      done
4160
 
      # Quote the link command for shipping.
4161
 
      relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
4162
 
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4163
 
 
4164
 
      # Only create the output if not a dry run.
4165
 
      if test -z "$run"; then
4166
 
        for installed in no yes; do
4167
 
          if test "$installed" = yes; then
4168
 
            if test -z "$install_libdir"; then
4169
 
              break
4170
 
            fi
4171
 
            output="$output_objdir/$outputname"i
4172
 
            # Replace all uninstalled libtool libraries with the installed ones
4173
 
            newdependency_libs=
4174
 
            for deplib in $dependency_libs; do
4175
 
              case $deplib in
4176
 
              *.la)
4177
 
                name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
4178
 
                eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
4179
 
                if test -z "$libdir"; then
4180
 
                  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
4181
 
                  exit 1
4182
 
                fi
4183
 
                newdependency_libs="$newdependency_libs $libdir/$name"
4184
 
                ;;
4185
 
              *) newdependency_libs="$newdependency_libs $deplib" ;;
4186
 
              esac
4187
 
            done
4188
 
            dependency_libs="$newdependency_libs"
4189
 
            newdlfiles=
4190
 
            for lib in $dlfiles; do
4191
 
              name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4192
 
              eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4193
 
              if test -z "$libdir"; then
4194
 
                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4195
 
                exit 1
4196
 
              fi
4197
 
              newdlfiles="$newdlfiles $libdir/$name"
4198
 
            done
4199
 
            dlfiles="$newdlfiles"
4200
 
            newdlprefiles=
4201
 
            for lib in $dlprefiles; do
4202
 
              name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4203
 
              eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4204
 
              if test -z "$libdir"; then
4205
 
                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4206
 
                exit 1
4207
 
              fi
4208
 
              newdlprefiles="$newdlprefiles $libdir/$name"
4209
 
            done
4210
 
            dlprefiles="$newdlprefiles"
4211
 
          fi
4212
 
          $rm $output
4213
 
          # place dlname in correct position for cygwin
4214
 
          tdlname=$dlname
4215
 
          case $host,$output,$installed,$module,$dlname in
4216
 
            *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
4217
 
          esac
4218
 
          $echo > $output "\
4219
 
# $outputname - a libtool library file
4220
 
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4221
 
#
4222
 
# Please DO NOT delete this file!
4223
 
# It is necessary for linking the library.
4224
 
 
4225
 
# The name that we can dlopen(3).
4226
 
dlname='$tdlname'
4227
 
 
4228
 
# Names of this library.
4229
 
library_names='$library_names'
4230
 
 
4231
 
# The name of the static archive.
4232
 
old_library='$old_library'
4233
 
 
4234
 
# Libraries that this one depends upon.
4235
 
dependency_libs='$dependency_libs'
4236
 
 
4237
 
# Version information for $libname.
4238
 
current=$current
4239
 
age=$age
4240
 
revision=$revision
4241
 
 
4242
 
# Is this an already installed library?
4243
 
installed=$installed
4244
 
 
4245
 
# Files to dlopen/dlpreopen
4246
 
dlopen='$dlfiles'
4247
 
dlpreopen='$dlprefiles'
4248
 
 
4249
 
# Directory that this library needs to be installed in:
4250
 
libdir='$install_libdir'"
4251
 
          if test "$installed" = no && test $need_relink = yes; then
4252
 
            $echo >> $output "\
4253
 
relink_command=\"$relink_command\""
4254
 
          fi
4255
 
        done
4256
 
      fi
4257
 
 
4258
 
      # Do a symbolic link so that the libtool archive can be found in
4259
 
      # LD_LIBRARY_PATH before the program is installed.
4260
 
      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
4261
 
      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
4262
 
      ;;
4263
 
    esac
4264
 
    exit 0
4265
 
    ;;
4266
 
 
4267
 
  # libtool install mode
4268
 
  install)
4269
 
    modename="$modename: install"
4270
 
 
4271
 
    # There may be an optional sh(1) argument at the beginning of
4272
 
    # install_prog (especially on Windows NT).
4273
 
    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
4274
 
       # Allow the use of GNU shtool's install command.
4275
 
       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
4276
 
      # Aesthetically quote it.
4277
 
      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4278
 
      case $arg in
4279
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
4280
 
        arg="\"$arg\""
4281
 
        ;;
4282
 
      esac
4283
 
      install_prog="$arg "
4284
 
      arg="$1"
4285
 
      shift
4286
 
    else
4287
 
      install_prog=
4288
 
      arg="$nonopt"
4289
 
    fi
4290
 
 
4291
 
    # The real first argument should be the name of the installation program.
4292
 
    # Aesthetically quote it.
4293
 
    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4294
 
    case $arg in
4295
 
    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*)
4296
 
      arg="\"$arg\""
4297
 
      ;;
4298
 
    esac
4299
 
    install_prog="$install_prog$arg"
4300
 
 
4301
 
    # We need to accept at least all the BSD install flags.
4302
 
    dest=
4303
 
    files=
4304
 
    opts=
4305
 
    prev=
4306
 
    install_type=
4307
 
    isdir=no
4308
 
    stripme=
4309
 
    for arg
4310
 
    do
4311
 
      if test -n "$dest"; then
4312
 
        files="$files $dest"
4313
 
        dest="$arg"
4314
 
        continue
4315
 
      fi
4316
 
 
4317
 
      case $arg in
4318
 
      -d) isdir=yes ;;
4319
 
      -f) prev="-f" ;;
4320
 
      -g) prev="-g" ;;
4321
 
      -m) prev="-m" ;;
4322
 
      -o) prev="-o" ;;
4323
 
      -s)
4324
 
        stripme=" -s"
4325
 
        continue
4326
 
        ;;
4327
 
      -*) ;;
4328
 
 
4329
 
      *)
4330
 
        # If the previous option needed an argument, then skip it.
4331
 
        if test -n "$prev"; then
4332
 
          prev=
4333
 
        else
4334
 
          dest="$arg"
4335
 
          continue
4336
 
        fi
4337
 
        ;;
4338
 
      esac
4339
 
 
4340
 
      # Aesthetically quote the argument.
4341
 
      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4342
 
      case $arg in
4343
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
4344
 
        arg="\"$arg\""
4345
 
        ;;
4346
 
      esac
4347
 
      install_prog="$install_prog $arg"
4348
 
    done
4349
 
 
4350
 
    if test -z "$install_prog"; then
4351
 
      $echo "$modename: you must specify an install program" 1>&2
4352
 
      $echo "$help" 1>&2
4353
 
      exit 1
4354
 
    fi
4355
 
 
4356
 
    if test -n "$prev"; then
4357
 
      $echo "$modename: the \`$prev' option requires an argument" 1>&2
4358
 
      $echo "$help" 1>&2
4359
 
      exit 1
4360
 
    fi
4361
 
 
4362
 
    if test -z "$files"; then
4363
 
      if test -z "$dest"; then
4364
 
        $echo "$modename: no file or destination specified" 1>&2
4365
 
      else
4366
 
        $echo "$modename: you must specify a destination" 1>&2
4367
 
      fi
4368
 
      $echo "$help" 1>&2
4369
 
      exit 1
4370
 
    fi
4371
 
 
4372
 
    # Strip any trailing slash from the destination.
4373
 
    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
4374
 
 
4375
 
    # Check to see that the destination is a directory.
4376
 
    test -d "$dest" && isdir=yes
4377
 
    if test "$isdir" = yes; then
4378
 
      destdir="$dest"
4379
 
      destname=
4380
 
    else
4381
 
      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
4382
 
      test "X$destdir" = "X$dest" && destdir=.
4383
 
      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
4384
 
 
4385
 
      # Not a directory, so check to see that there is only one file specified.
4386
 
      set dummy $files
4387
 
      if test $# -gt 2; then
4388
 
        $echo "$modename: \`$dest' is not a directory" 1>&2
4389
 
        $echo "$help" 1>&2
4390
 
        exit 1
4391
 
      fi
4392
 
    fi
4393
 
    case $destdir in
4394
 
    [\\/]* | [A-Za-z]:[\\/]*) ;;
4395
 
    *)
4396
 
      for file in $files; do
4397
 
        case $file in
4398
 
        *.lo) ;;
4399
 
        *)
4400
 
          $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
4401
 
          $echo "$help" 1>&2
4402
 
          exit 1
4403
 
          ;;
4404
 
        esac
4405
 
      done
4406
 
      ;;
4407
 
    esac
4408
 
 
4409
 
    # This variable tells wrapper scripts just to set variables rather
4410
 
    # than running their programs.
4411
 
    libtool_install_magic="$magic"
4412
 
 
4413
 
    staticlibs=
4414
 
    future_libdirs=
4415
 
    current_libdirs=
4416
 
    for file in $files; do
4417
 
 
4418
 
      # Do each installation.
4419
 
      case $file in
4420
 
      *.$libext)
4421
 
        # Do the static libraries later.
4422
 
        staticlibs="$staticlibs $file"
4423
 
        ;;
4424
 
 
4425
 
      *.la)
4426
 
        # Check to see that this really is a libtool archive.
4427
 
        if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4428
 
        else
4429
 
          $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4430
 
          $echo "$help" 1>&2
4431
 
          exit 1
4432
 
        fi
4433
 
 
4434
 
        library_names=
4435
 
        old_library=
4436
 
        relink_command=
4437
 
        # If there is no directory component, then add one.
4438
 
        case $file in
4439
 
        */* | *\\*) . $file ;;
4440
 
        *) . ./$file ;;
4441
 
        esac
4442
 
 
4443
 
        # Add the libdir to current_libdirs if it is the destination.
4444
 
        if test "X$destdir" = "X$libdir"; then
4445
 
          case "$current_libdirs " in
4446
 
          *" $libdir "*) ;;
4447
 
          *) current_libdirs="$current_libdirs $libdir" ;;
4448
 
          esac
4449
 
        else
4450
 
          # Note the libdir as a future libdir.
4451
 
          case "$future_libdirs " in
4452
 
          *" $libdir "*) ;;
4453
 
          *) future_libdirs="$future_libdirs $libdir" ;;
4454
 
          esac
4455
 
        fi
4456
 
 
4457
 
        dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
4458
 
        test "X$dir" = "X$file/" && dir=
4459
 
        dir="$dir$objdir"
4460
 
 
4461
 
        if test -n "$relink_command"; then
4462
 
          $echo "$modename: warning: relinking \`$file'" 1>&2
4463
 
          $show "$relink_command"
4464
 
          if $run eval "$relink_command"; then :
4465
 
          else
4466
 
            $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4467
 
            continue
4468
 
          fi
4469
 
        fi
4470
 
 
4471
 
        # See the names of the shared library.
4472
 
        set dummy $library_names
4473
 
        if test -n "$2"; then
4474
 
          realname="$2"
4475
 
          shift
4476
 
          shift
4477
 
 
4478
 
          srcname="$realname"
4479
 
          test -n "$relink_command" && srcname="$realname"T
4480
 
 
4481
 
          # Install the shared library and build the symlinks.
4482
 
          $show "$install_prog $dir/$srcname $destdir/$realname"
4483
 
          $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
4484
 
          if test -n "$stripme" && test -n "$striplib"; then
4485
 
            $show "$striplib $destdir/$realname"
4486
 
            $run eval "$striplib $destdir/$realname" || exit $?
4487
 
          fi
4488
 
 
4489
 
          if test $# -gt 0; then
4490
 
            # Delete the old symlinks, and create new ones.
4491
 
            for linkname
4492
 
            do
4493
 
              if test "$linkname" != "$realname"; then
4494
 
                $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4495
 
                $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4496
 
              fi
4497
 
            done
4498
 
          fi
4499
 
 
4500
 
          # Do each command in the postinstall commands.
4501
 
          lib="$destdir/$realname"
4502
 
          eval cmds=\"$postinstall_cmds\"
4503
 
          save_ifs="$IFS"; IFS='~'
4504
 
          for cmd in $cmds; do
4505
 
            IFS="$save_ifs"
4506
 
            $show "$cmd"
4507
 
            $run eval "$cmd" || exit $?
4508
 
          done
4509
 
          IFS="$save_ifs"
4510
 
        fi
4511
 
 
4512
 
        # Install the pseudo-library for information purposes.
4513
 
        name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4514
 
        instname="$dir/$name"i
4515
 
        $show "$install_prog $instname $destdir/$name"
4516
 
        $run eval "$install_prog $instname $destdir/$name" || exit $?
4517
 
 
4518
 
        # Maybe install the static library, too.
4519
 
        test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
4520
 
        ;;
4521
 
 
4522
 
      *.lo)
4523
 
        # Install (i.e. copy) a libtool object.
4524
 
 
4525
 
        # Figure out destination file name, if it wasn't already specified.
4526
 
        if test -n "$destname"; then
4527
 
          destfile="$destdir/$destname"
4528
 
        else
4529
 
          destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4530
 
          destfile="$destdir/$destfile"
4531
 
        fi
4532
 
 
4533
 
        # Deduce the name of the destination old-style object file.
4534
 
        case $destfile in
4535
 
        *.lo)
4536
 
          staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4537
 
          ;;
4538
 
        *.$objext)
4539
 
          staticdest="$destfile"
4540
 
          destfile=
4541
 
          ;;
4542
 
        *)
4543
 
          $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4544
 
          $echo "$help" 1>&2
4545
 
          exit 1
4546
 
          ;;
4547
 
        esac
4548
 
 
4549
 
        # Install the libtool object if requested.
4550
 
        if test -n "$destfile"; then
4551
 
          $show "$install_prog $file $destfile"
4552
 
          $run eval "$install_prog $file $destfile" || exit $?
4553
 
        fi
4554
 
 
4555
 
        # Install the old object if enabled.
4556
 
        if test "$build_old_libs" = yes; then
4557
 
          # Deduce the name of the old-style object file.
4558
 
          staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
4559
 
 
4560
 
          $show "$install_prog $staticobj $staticdest"
4561
 
          $run eval "$install_prog \$staticobj \$staticdest" || exit $?
4562
 
        fi
4563
 
        exit 0
4564
 
        ;;
4565
 
 
4566
 
      *)
4567
 
        # Figure out destination file name, if it wasn't already specified.
4568
 
        if test -n "$destname"; then
4569
 
          destfile="$destdir/$destname"
4570
 
        else
4571
 
          destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4572
 
          destfile="$destdir/$destfile"
4573
 
        fi
4574
 
 
4575
 
        # Do a test to see if this is really a libtool program.
4576
 
        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4577
 
          notinst_deplibs=
4578
 
          relink_command=
4579
 
 
4580
 
          # If there is no directory component, then add one.
4581
 
          case $file in
4582
 
          */* | *\\*) . $file ;;
4583
 
          *) . ./$file ;;
4584
 
          esac
4585
 
 
4586
 
          # Check the variables that should have been set.
4587
 
          if test -z "$notinst_deplibs"; then
4588
 
            $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4589
 
            exit 1
4590
 
          fi
4591
 
 
4592
 
          finalize=yes
4593
 
          for lib in $notinst_deplibs; do
4594
 
            # Check to see that each library is installed.
4595
 
            libdir=
4596
 
            if test -f "$lib"; then
4597
 
              # If there is no directory component, then add one.
4598
 
              case $lib in
4599
 
              */* | *\\*) . $lib ;;
4600
 
              *) . ./$lib ;;
4601
 
              esac
4602
 
            fi
4603
 
            libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
4604
 
            if test -n "$libdir" && test ! -f "$libfile"; then
4605
 
              $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
4606
 
              finalize=no
4607
 
            fi
4608
 
          done
4609
 
 
4610
 
          relink_command=
4611
 
          # If there is no directory component, then add one.
4612
 
          case $file in
4613
 
          */* | *\\*) . $file ;;
4614
 
          *) . ./$file ;;
4615
 
          esac
4616
 
 
4617
 
          outputname=
4618
 
          if test "$fast_install" = no && test -n "$relink_command"; then
4619
 
            if test "$finalize" = yes && test -z "$run"; then
4620
 
              tmpdir="/tmp"
4621
 
              test -n "$TMPDIR" && tmpdir="$TMPDIR"
4622
 
              tmpdir="$tmpdir/libtool-$$"
4623
 
              if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4624
 
              else
4625
 
                $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4626
 
                continue
4627
 
              fi
4628
 
              file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4629
 
              outputname="$tmpdir/$file"
4630
 
              # Replace the output file specification.
4631
 
              relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4632
 
 
4633
 
              $show "$relink_command"
4634
 
              if $run eval "$relink_command"; then :
4635
 
              else
4636
 
                $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4637
 
                ${rm}r "$tmpdir"
4638
 
                continue
4639
 
              fi
4640
 
              file="$outputname"
4641
 
            else
4642
 
              $echo "$modename: warning: cannot relink \`$file'" 1>&2
4643
 
            fi
4644
 
          else
4645
 
            # Install the binary that we compiled earlier.
4646
 
            file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4647
 
          fi
4648
 
        fi
4649
 
 
4650
 
        # remove .exe since cygwin /usr/bin/install will append another
4651
 
        # one anyways
4652
 
        case $install_prog,$host in
4653
 
        /usr/bin/install*,*cygwin*)
4654
 
          case $file:$destfile in
4655
 
          *.exe:*.exe)
4656
 
            # this is ok
4657
 
            ;;
4658
 
          *.exe:*)
4659
 
            destfile=$destfile.exe
4660
 
            ;;
4661
 
          *:*.exe)
4662
 
            destfile=`echo $destfile | sed -e 's,.exe$,,'`
4663
 
            ;;
4664
 
          esac
4665
 
          ;;
4666
 
        esac
4667
 
        $show "$install_prog$stripme $file $destfile"
4668
 
        $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
4669
 
        test -n "$outputname" && ${rm}r "$tmpdir"
4670
 
        ;;
4671
 
      esac
4672
 
    done
4673
 
 
4674
 
    for file in $staticlibs; do
4675
 
      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4676
 
 
4677
 
      # Set up the ranlib parameters.
4678
 
      oldlib="$destdir/$name"
4679
 
 
4680
 
      $show "$install_prog $file $oldlib"
4681
 
      $run eval "$install_prog \$file \$oldlib" || exit $?
4682
 
 
4683
 
      if test -n "$stripme" && test -n "$striplib"; then
4684
 
        $show "$old_striplib $oldlib"
4685
 
        $run eval "$old_striplib $oldlib" || exit $?
4686
 
      fi
4687
 
 
4688
 
      # Do each command in the postinstall commands.
4689
 
      eval cmds=\"$old_postinstall_cmds\"
4690
 
      save_ifs="$IFS"; IFS='~'
4691
 
      for cmd in $cmds; do
4692
 
        IFS="$save_ifs"
4693
 
        $show "$cmd"
4694
 
        $run eval "$cmd" || exit $?
4695
 
      done
4696
 
      IFS="$save_ifs"
4697
 
    done
4698
 
 
4699
 
    if test -n "$future_libdirs"; then
4700
 
      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4701
 
    fi
4702
 
 
4703
 
    if test -n "$current_libdirs"; then
4704
 
      # Maybe just do a dry run.
4705
 
      test -n "$run" && current_libdirs=" -n$current_libdirs"
4706
 
      exec_cmd='$SHELL $0 --finish$current_libdirs'
4707
 
    else
4708
 
      exit 0
4709
 
    fi
4710
 
    ;;
4711
 
 
4712
 
  # libtool finish mode
4713
 
  finish)
4714
 
    modename="$modename: finish"
4715
 
    libdirs="$nonopt"
4716
 
    admincmds=
4717
 
 
4718
 
    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4719
 
      for dir
4720
 
      do
4721
 
        libdirs="$libdirs $dir"
4722
 
      done
4723
 
 
4724
 
      for libdir in $libdirs; do
4725
 
        if test -n "$finish_cmds"; then
4726
 
          # Do each command in the finish commands.
4727
 
          eval cmds=\"$finish_cmds\"
4728
 
          save_ifs="$IFS"; IFS='~'
4729
 
          for cmd in $cmds; do
4730
 
            IFS="$save_ifs"
4731
 
            $show "$cmd"
4732
 
            $run eval "$cmd" || admincmds="$admincmds
4733
 
       $cmd"
4734
 
          done
4735
 
          IFS="$save_ifs"
4736
 
        fi
4737
 
        if test -n "$finish_eval"; then
4738
 
          # Do the single finish_eval.
4739
 
          eval cmds=\"$finish_eval\"
4740
 
          $run eval "$cmds" || admincmds="$admincmds
4741
 
       $cmds"
4742
 
        fi
4743
 
      done
4744
 
    fi
4745
 
 
4746
 
    # Exit here if they wanted silent mode.
4747
 
    test "$show" = ":" && exit 0
4748
 
 
4749
 
    echo "----------------------------------------------------------------------"
4750
 
    echo "Libraries have been installed in:"
4751
 
    for libdir in $libdirs; do
4752
 
      echo "   $libdir"
4753
 
    done
4754
 
    echo
4755
 
    echo "If you ever happen to want to link against installed libraries"
4756
 
    echo "in a given directory, LIBDIR, you must either use libtool, and"
4757
 
    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
4758
 
    echo "flag during linking and do at least one of the following:"
4759
 
    if test -n "$shlibpath_var"; then
4760
 
      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
4761
 
      echo "     during execution"
4762
 
    fi
4763
 
    if test -n "$runpath_var"; then
4764
 
      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
4765
 
      echo "     during linking"
4766
 
    fi
4767
 
    if test -n "$hardcode_libdir_flag_spec"; then
4768
 
      libdir=LIBDIR
4769
 
      eval flag=\"$hardcode_libdir_flag_spec\"
4770
 
 
4771
 
      echo "   - use the \`$flag' linker flag"
4772
 
    fi
4773
 
    if test -n "$admincmds"; then
4774
 
      echo "   - have your system administrator run these commands:$admincmds"
4775
 
    fi
4776
 
    if test -f /etc/ld.so.conf; then
4777
 
      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4778
 
    fi
4779
 
    echo
4780
 
    echo "See any operating system documentation about shared libraries for"
4781
 
    echo "more information, such as the ld(1) and ld.so(8) manual pages."
4782
 
    echo "----------------------------------------------------------------------"
4783
 
    exit 0
4784
 
    ;;
4785
 
 
4786
 
  # libtool execute mode
4787
 
  execute)
4788
 
    modename="$modename: execute"
4789
 
 
4790
 
    # The first argument is the command name.
4791
 
    cmd="$nonopt"
4792
 
    if test -z "$cmd"; then
4793
 
      $echo "$modename: you must specify a COMMAND" 1>&2
4794
 
      $echo "$help"
4795
 
      exit 1
4796
 
    fi
4797
 
 
4798
 
    # Handle -dlopen flags immediately.
4799
 
    for file in $execute_dlfiles; do
4800
 
      if test ! -f "$file"; then
4801
 
        $echo "$modename: \`$file' is not a file" 1>&2
4802
 
        $echo "$help" 1>&2
4803
 
        exit 1
4804
 
      fi
4805
 
 
4806
 
      dir=
4807
 
      case $file in
4808
 
      *.la)
4809
 
        # Check to see that this really is a libtool archive.
4810
 
        if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4811
 
        else
4812
 
          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4813
 
          $echo "$help" 1>&2
4814
 
          exit 1
4815
 
        fi
4816
 
 
4817
 
        # Read the libtool library.
4818
 
        dlname=
4819
 
        library_names=
4820
 
 
4821
 
        # If there is no directory component, then add one.
4822
 
        case $file in
4823
 
        */* | *\\*) . $file ;;
4824
 
        *) . ./$file ;;
4825
 
        esac
4826
 
 
4827
 
        # Skip this library if it cannot be dlopened.
4828
 
        if test -z "$dlname"; then
4829
 
          # Warn if it was a shared library.
4830
 
          test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
4831
 
          continue
4832
 
        fi
4833
 
 
4834
 
        dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4835
 
        test "X$dir" = "X$file" && dir=.
4836
 
 
4837
 
        if test -f "$dir/$objdir/$dlname"; then
4838
 
          dir="$dir/$objdir"
4839
 
        else
4840
 
          $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
4841
 
          exit 1
4842
 
        fi
4843
 
        ;;
4844
 
 
4845
 
      *.lo)
4846
 
        # Just add the directory containing the .lo file.
4847
 
        dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4848
 
        test "X$dir" = "X$file" && dir=.
4849
 
        ;;
4850
 
 
4851
 
      *)
4852
 
        $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
4853
 
        continue
4854
 
        ;;
4855
 
      esac
4856
 
 
4857
 
      # Get the absolute pathname.
4858
 
      absdir=`cd "$dir" && pwd`
4859
 
      test -n "$absdir" && dir="$absdir"
4860
 
 
4861
 
      # Now add the directory to shlibpath_var.
4862
 
      if eval "test -z \"\$$shlibpath_var\""; then
4863
 
        eval "$shlibpath_var=\"\$dir\""
4864
 
      else
4865
 
        eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
4866
 
      fi
4867
 
    done
4868
 
 
4869
 
    # This variable tells wrapper scripts just to set shlibpath_var
4870
 
    # rather than running their programs.
4871
 
    libtool_execute_magic="$magic"
4872
 
 
4873
 
    # Check if any of the arguments is a wrapper script.
4874
 
    args=
4875
 
    for file
4876
 
    do
4877
 
      case $file in
4878
 
      -*) ;;
4879
 
      *)
4880
 
        # Do a test to see if this is really a libtool program.
4881
 
        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4882
 
          # If there is no directory component, then add one.
4883
 
          case $file in
4884
 
          */* | *\\*) . $file ;;
4885
 
          *) . ./$file ;;
4886
 
          esac
4887
 
 
4888
 
          # Transform arg to wrapped name.
4889
 
          file="$progdir/$program"
4890
 
        fi
4891
 
        ;;
4892
 
      esac
4893
 
      # Quote arguments (to preserve shell metacharacters).
4894
 
      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
4895
 
      args="$args \"$file\""
4896
 
    done
4897
 
 
4898
 
    if test -z "$run"; then
4899
 
      if test -n "$shlibpath_var"; then
4900
 
        # Export the shlibpath_var.
4901
 
        eval "export $shlibpath_var"
4902
 
      fi
4903
 
 
4904
 
      # Restore saved enviroment variables
4905
 
      if test "${save_LC_ALL+set}" = set; then
4906
 
        LC_ALL="$save_LC_ALL"; export LC_ALL
4907
 
      fi
4908
 
      if test "${save_LANG+set}" = set; then
4909
 
        LANG="$save_LANG"; export LANG
4910
 
      fi
4911
 
 
4912
 
      # Now prepare to actually exec the command.
4913
 
      exec_cmd='"$cmd"$args'
4914
 
    else
4915
 
      # Display what would be done.
4916
 
      if test -n "$shlibpath_var"; then
4917
 
        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
4918
 
        $echo "export $shlibpath_var"
4919
 
      fi
4920
 
      $echo "$cmd$args"
4921
 
      exit 0
4922
 
    fi
4923
 
    ;;
4924
 
 
4925
 
  # libtool clean and uninstall mode
4926
 
  clean | uninstall)
4927
 
    modename="$modename: $mode"
4928
 
    rm="$nonopt"
4929
 
    files=
4930
 
    rmforce=
4931
 
    exit_status=0
4932
 
 
4933
 
    # This variable tells wrapper scripts just to set variables rather
4934
 
    # than running their programs.
4935
 
    libtool_install_magic="$magic"
4936
 
 
4937
 
    for arg
4938
 
    do
4939
 
      case $arg in
4940
 
      -f) rm="$rm $arg"; rmforce=yes ;;
4941
 
      -*) rm="$rm $arg" ;;
4942
 
      *) files="$files $arg" ;;
4943
 
      esac
4944
 
    done
4945
 
 
4946
 
    if test -z "$rm"; then
4947
 
      $echo "$modename: you must specify an RM program" 1>&2
4948
 
      $echo "$help" 1>&2
4949
 
      exit 1
4950
 
    fi
4951
 
 
4952
 
    rmdirs=
4953
 
 
4954
 
    for file in $files; do
4955
 
      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4956
 
      if test "X$dir" = "X$file"; then
4957
 
        dir=.
4958
 
        objdir="$objdir"
4959
 
      else
4960
 
        objdir="$dir/$objdir"
4961
 
      fi
4962
 
      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4963
 
      test $mode = uninstall && objdir="$dir"
4964
 
 
4965
 
      # Remember objdir for removal later, being careful to avoid duplicates
4966
 
      if test $mode = clean; then
4967
 
        case " $rmdirs " in
4968
 
          *" $objdir "*) ;;
4969
 
          *) rmdirs="$rmdirs $objdir" ;;
4970
 
        esac
4971
 
      fi
4972
 
 
4973
 
      # Don't error if the file doesn't exist and rm -f was used.
4974
 
      if (test -L "$file") >/dev/null 2>&1 \
4975
 
        || (test -h "$file") >/dev/null 2>&1 \
4976
 
        || test -f "$file"; then
4977
 
        :
4978
 
      elif test -d "$file"; then
4979
 
        exit_status=1
4980
 
        continue
4981
 
      elif test "$rmforce" = yes; then
4982
 
        continue
4983
 
      fi
4984
 
 
4985
 
      rmfiles="$file"
4986
 
 
4987
 
      case $name in
4988
 
      *.la)
4989
 
        # Possibly a libtool archive, so verify it.
4990
 
        if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4991
 
          . $dir/$name
4992
 
 
4993
 
          # Delete the libtool libraries and symlinks.
4994
 
          for n in $library_names; do
4995
 
            rmfiles="$rmfiles $objdir/$n"
4996
 
          done
4997
 
          test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
4998
 
          test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
4999
 
 
5000
 
          if test $mode = uninstall; then
5001
 
            if test -n "$library_names"; then
5002
 
              # Do each command in the postuninstall commands.
5003
 
              eval cmds=\"$postuninstall_cmds\"
5004
 
              save_ifs="$IFS"; IFS='~'
5005
 
              for cmd in $cmds; do
5006
 
                IFS="$save_ifs"
5007
 
                $show "$cmd"
5008
 
                $run eval "$cmd"
5009
 
                if test $? != 0 && test "$rmforce" != yes; then
5010
 
                  exit_status=1
5011
 
                fi
5012
 
              done
5013
 
              IFS="$save_ifs"
5014
 
            fi
5015
 
 
5016
 
            if test -n "$old_library"; then
5017
 
              # Do each command in the old_postuninstall commands.
5018
 
              eval cmds=\"$old_postuninstall_cmds\"
5019
 
              save_ifs="$IFS"; IFS='~'
5020
 
              for cmd in $cmds; do
5021
 
                IFS="$save_ifs"
5022
 
                $show "$cmd"
5023
 
                $run eval "$cmd"
5024
 
                if test $? != 0 && test "$rmforce" != yes; then
5025
 
                  exit_status=1
5026
 
                fi
5027
 
              done
5028
 
              IFS="$save_ifs"
5029
 
            fi
5030
 
            # FIXME: should reinstall the best remaining shared library.
5031
 
          fi
5032
 
        fi
5033
 
        ;;
5034
 
 
5035
 
      *.lo)
5036
 
        if test "$build_old_libs" = yes; then
5037
 
          oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
5038
 
          rmfiles="$rmfiles $dir/$oldobj"
5039
 
        fi
5040
 
        ;;
5041
 
 
5042
 
      *)
5043
 
        # Do a test to see if this is a libtool program.
5044
 
        if test $mode = clean &&
5045
 
           (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5046
 
          relink_command=
5047
 
          . $dir/$file
5048
 
 
5049
 
          rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
5050
 
          if test "$fast_install" = yes && test -n "$relink_command"; then
5051
 
            rmfiles="$rmfiles $objdir/lt-$name"
5052
 
          fi
5053
 
        fi
5054
 
        ;;
5055
 
      esac
5056
 
      $show "$rm $rmfiles"
5057
 
      $run $rm $rmfiles || exit_status=1
5058
 
    done
5059
 
 
5060
 
    # Try to remove the ${objdir}s in the directories where we deleted files
5061
 
    for dir in $rmdirs; do
5062
 
      if test -d "$dir"; then
5063
 
        $show "rmdir $dir"
5064
 
        $run rmdir $dir >/dev/null 2>&1
5065
 
      fi
5066
 
    done
5067
 
 
5068
 
    exit $exit_status
5069
 
    ;;
5070
 
 
5071
 
  "")
5072
 
    $echo "$modename: you must specify a MODE" 1>&2
5073
 
    $echo "$generic_help" 1>&2
5074
 
    exit 1
5075
 
    ;;
5076
 
  esac
5077
 
 
5078
 
  if test -z "$exec_cmd"; then
5079
 
    $echo "$modename: invalid operation mode \`$mode'" 1>&2
5080
 
    $echo "$generic_help" 1>&2
5081
 
    exit 1
5082
 
  fi
5083
 
fi # test -z "$show_help"
5084
 
 
5085
 
if test -n "$exec_cmd"; then
5086
 
  eval exec $exec_cmd
5087
 
  exit 1
5088
 
fi
5089
 
 
5090
 
# We need to display help for each of the modes.
5091
 
case $mode in
5092
 
"") $echo \
5093
 
"Usage: $modename [OPTION]... [MODE-ARG]...
5094
 
 
5095
 
Provide generalized library-building support services.
5096
 
 
5097
 
    --config          show all configuration variables
5098
 
    --debug           enable verbose shell tracing
5099
 
-n, --dry-run         display commands without modifying any files
5100
 
    --features        display basic configuration information and exit
5101
 
    --finish          same as \`--mode=finish'
5102
 
    --help            display this help message and exit
5103
 
    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
5104
 
    --quiet           same as \`--silent'
5105
 
    --silent          don't print informational messages
5106
 
    --version         print version information
5107
 
 
5108
 
MODE must be one of the following:
5109
 
 
5110
 
      clean           remove files from the build directory
5111
 
      compile         compile a source file into a libtool object
5112
 
      execute         automatically set library path, then run a program
5113
 
      finish          complete the installation of libtool libraries
5114
 
      install         install libraries or executables
5115
 
      link            create a library or an executable
5116
 
      uninstall       remove libraries from an installed directory
5117
 
 
5118
 
MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
5119
 
a more detailed description of MODE."
5120
 
  exit 0
5121
 
  ;;
5122
 
 
5123
 
clean)
5124
 
  $echo \
5125
 
"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
5126
 
 
5127
 
Remove files from the build directory.
5128
 
 
5129
 
RM is the name of the program to use to delete files associated with each FILE
5130
 
(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
5131
 
to RM.
5132
 
 
5133
 
If FILE is a libtool library, object or program, all the files associated
5134
 
with it are deleted. Otherwise, only FILE itself is deleted using RM."
5135
 
  ;;
5136
 
 
5137
 
compile)
5138
 
  $echo \
5139
 
"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
5140
 
 
5141
 
Compile a source file into a libtool library object.
5142
 
 
5143
 
This mode accepts the following additional options:
5144
 
 
5145
 
  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
5146
 
  -prefer-pic       try to building PIC objects only
5147
 
  -prefer-non-pic   try to building non-PIC objects only
5148
 
  -static           always build a \`.o' file suitable for static linking
5149
 
 
5150
 
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
5151
 
from the given SOURCEFILE.
5152
 
 
5153
 
The output file name is determined by removing the directory component from
5154
 
SOURCEFILE, then substituting the C source code suffix \`.c' with the
5155
 
library object suffix, \`.lo'."
5156
 
  ;;
5157
 
 
5158
 
execute)
5159
 
  $echo \
5160
 
"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
5161
 
 
5162
 
Automatically set library path, then run a program.
5163
 
 
5164
 
This mode accepts the following additional options:
5165
 
 
5166
 
  -dlopen FILE      add the directory containing FILE to the library path
5167
 
 
5168
 
This mode sets the library path environment variable according to \`-dlopen'
5169
 
flags.
5170
 
 
5171
 
If any of the ARGS are libtool executable wrappers, then they are translated
5172
 
into their corresponding uninstalled binary, and any of their required library
5173
 
directories are added to the library path.
5174
 
 
5175
 
Then, COMMAND is executed, with ARGS as arguments."
5176
 
  ;;
5177
 
 
5178
 
finish)
5179
 
  $echo \
5180
 
"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
5181
 
 
5182
 
Complete the installation of libtool libraries.
5183
 
 
5184
 
Each LIBDIR is a directory that contains libtool libraries.
5185
 
 
5186
 
The commands that this mode executes may require superuser privileges.  Use
5187
 
the \`--dry-run' option if you just want to see what would be executed."
5188
 
  ;;
5189
 
 
5190
 
install)
5191
 
  $echo \
5192
 
"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
5193
 
 
5194
 
Install executables or libraries.
5195
 
 
5196
 
INSTALL-COMMAND is the installation command.  The first component should be
5197
 
either the \`install' or \`cp' program.
5198
 
 
5199
 
The rest of the components are interpreted as arguments to that command (only
5200
 
BSD-compatible install options are recognized)."
5201
 
  ;;
5202
 
 
5203
 
link)
5204
 
  $echo \
5205
 
"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
5206
 
 
5207
 
Link object files or libraries together to form another library, or to
5208
 
create an executable program.
5209
 
 
5210
 
LINK-COMMAND is a command using the C compiler that you would use to create
5211
 
a program from several object files.
5212
 
 
5213
 
The following components of LINK-COMMAND are treated specially:
5214
 
 
5215
 
  -all-static       do not do any dynamic linking at all
5216
 
  -avoid-version    do not add a version suffix if possible
5217
 
  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
5218
 
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
5219
 
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
5220
 
  -export-symbols SYMFILE
5221
 
                    try to export only the symbols listed in SYMFILE
5222
 
  -export-symbols-regex REGEX
5223
 
                    try to export only the symbols matching REGEX
5224
 
  -LLIBDIR          search LIBDIR for required installed libraries
5225
 
  -lNAME            OUTPUT-FILE requires the installed library libNAME
5226
 
  -jnimodule        build a library that can dlopened via Java JNI
5227
 
  -module           build a library that can dlopened
5228
 
  -no-fast-install  disable the fast-install mode
5229
 
  -no-install       link a not-installable executable
5230
 
  -no-undefined     declare that a library does not refer to external symbols
5231
 
  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
5232
 
  -release RELEASE  specify package release information
5233
 
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
5234
 
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
5235
 
  -static           do not do any dynamic linking of libtool libraries
5236
 
  -version-info CURRENT[:REVISION[:AGE]]
5237
 
                    specify library version info [each variable defaults to 0]
5238
 
 
5239
 
All other options (arguments beginning with \`-') are ignored.
5240
 
 
5241
 
Every other argument is treated as a filename.  Files ending in \`.la' are
5242
 
treated as uninstalled libtool libraries, other files are standard or library
5243
 
object files.
5244
 
 
5245
 
If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
5246
 
only library objects (\`.lo' files) may be specified, and \`-rpath' is
5247
 
required, except when creating a convenience library.
5248
 
 
5249
 
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
5250
 
using \`ar' and \`ranlib', or on Windows using \`lib'.
5251
 
 
5252
 
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
5253
 
is created, otherwise an executable program is created."
5254
 
  ;;
5255
 
 
5256
 
uninstall)
5257
 
  $echo \
5258
 
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
5259
 
 
5260
 
Remove libraries from an installation directory.
5261
 
 
5262
 
RM is the name of the program to use to delete files associated with each FILE
5263
 
(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
5264
 
to RM.
5265
 
 
5266
 
If FILE is a libtool library, all the files associated with it are deleted.
5267
 
Otherwise, only FILE itself is deleted using RM."
5268
 
  ;;
5269
 
 
5270
 
*)
5271
 
  $echo "$modename: invalid operation mode \`$mode'" 1>&2
5272
 
  $echo "$help" 1>&2
5273
 
  exit 1
5274
 
  ;;
5275
 
esac
5276
 
 
5277
 
echo
5278
 
$echo "Try \`$modename --help' for more information about other modes."
5279
 
 
5280
 
exit 0
5281
 
 
5282
 
# Local Variables:
5283
 
# mode:shell-script
5284
 
# sh-indentation:2
5285
 
# End: