Advertisement
Guest User

Untitled

a guest
Sep 12th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 209.88 KB | None | 0 0
  1. #! /bin/sh
  2.  
  3. # libtoolT - Provide generalized library-building support services.
  4. # Generated automatically by  (GNU libgtkhtml 2.11.0)
  5. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  6. #
  7. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  8. # Free Software Foundation, Inc.
  9. #
  10. # This file is part of GNU Libtool:
  11. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version.
  17. #
  18. # This program is distributed in the hope that it will be useful, but
  19. # WITHOUT ANY WARRANTY; without even the implied warranty of
  20. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  21. # General Public License for more details.
  22. #
  23. # You should have received a copy of the GNU General Public License
  24. # along with this program; if not, write to the Free Software
  25. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  26. #
  27. # As a special exception to the GNU General Public License, if you
  28. # distribute this file as part of a program that contains a
  29. # configuration script generated by Autoconf, you may include it under
  30. # the same distribution terms that you use for the rest of that program.
  31.  
  32. # A sed program that does not truncate output.
  33. SED="/bin/sed"
  34.  
  35. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  36. Xsed="/bin/sed -e 1s/^X//"
  37.  
  38. # The HP-UX ksh and POSIX shell print the target directory to stdout
  39. # if CDPATH is set.
  40. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  41.  
  42. # The names of the tagged configurations supported by this script.
  43. available_tags=" CXX"
  44.  
  45. # ### BEGIN LIBTOOL CONFIG
  46.  
  47. # Libtool was configured on host cryptnxt:
  48.  
  49. # Shell to use when invoking shell scripts.
  50. SHELL="/bin/sh"
  51.  
  52. # Whether or not to build shared libraries.
  53. build_libtool_libs=yes
  54.  
  55. # Whether or not to build static libraries.
  56. build_old_libs=yes
  57.  
  58. # Whether or not to add -lc for building shared libraries.
  59. build_libtool_need_lc=no
  60.  
  61. # Whether or not to disallow shared libs when runtime libs are static
  62. allow_libtool_libs_with_static_runtimes=no
  63.  
  64. # Whether or not to optimize for fast installation.
  65. fast_install=yes
  66.  
  67. # The host system.
  68. host_alias=
  69. host=armv7l-unknown-linux-gnu
  70. host_os=linux-gnu
  71.  
  72. # The build system.
  73. build_alias=
  74. build=armv7l-unknown-linux-gnu
  75. build_os=linux-gnu
  76.  
  77. # An echo program that does not interpret backslashes.
  78. echo="echo"
  79.  
  80. # The archiver.
  81. AR="ar"
  82. AR_FLAGS="cru"
  83.  
  84. # A C compiler.
  85. LTCC="gcc"
  86.  
  87. # A language-specific compiler.
  88. CC="gcc"
  89.  
  90. # Is the compiler the GNU C compiler?
  91. with_gcc=yes
  92.  
  93. # An ERE matcher.
  94. EGREP="grep -E"
  95.  
  96. # The linker used to build libraries.
  97. LD="/usr/arm-angstrom-linux-gnueabi/bin/ld"
  98.  
  99. # Whether we need hard or soft links.
  100. LN_S="ln -s"
  101.  
  102. # A BSD-compatible nm program.
  103. NM="/usr/bin/nm -B"
  104.  
  105. # A symbol stripping program
  106. STRIP="strip"
  107.  
  108. # Used to examine libraries when file_magic_cmd begins "file"
  109. MAGIC_CMD=file
  110.  
  111. # Used on cygwin: DLL creation program.
  112. DLLTOOL="dlltool"
  113.  
  114. # Used on cygwin: object dumper.
  115. OBJDUMP="objdump"
  116.  
  117. # Used on cygwin: assembler.
  118. AS="as"
  119.  
  120. # The name of the directory that contains temporary libtool files.
  121. objdir=.libs
  122.  
  123. # How to create reloadable object files.
  124. reload_flag=" -r"
  125. reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
  126.  
  127. # How to pass a linker flag through the compiler.
  128. wl="-Wl,"
  129.  
  130. # Object file suffix (normally "o").
  131. objext="o"
  132.  
  133. # Old archive suffix (normally "a").
  134. libext="a"
  135.  
  136. # Shared library suffix (normally ".so").
  137. shrext_cmds='.so'
  138.  
  139. # Executable file suffix (normally "").
  140. exeext=""
  141.  
  142. # Additional compiler flags for building library objects.
  143. pic_flag=" -fPIC -DPIC"
  144. pic_mode=default
  145.  
  146. # What is the maximum length of a command?
  147. max_cmd_len=32768
  148.  
  149. # Does compiler simultaneously support -c and -o options?
  150. compiler_c_o="yes"
  151.  
  152. # Must we lock files when doing compilation?
  153. need_locks="no"
  154.  
  155. # Do we need the lib prefix for modules?
  156. need_lib_prefix=no
  157.  
  158. # Do we need a version for libraries?
  159. need_version=no
  160.  
  161. # Whether dlopen is supported.
  162. dlopen_support=unknown
  163.  
  164. # Whether dlopen of programs is supported.
  165. dlopen_self=unknown
  166.  
  167. # Whether dlopen of statically linked programs is supported.
  168. dlopen_self_static=unknown
  169.  
  170. # Compiler flag to prevent dynamic linking.
  171. link_static_flag="-static"
  172.  
  173. # Compiler flag to turn off builtin functions.
  174. no_builtin_flag=" -fno-builtin"
  175.  
  176. # Compiler flag to allow reflexive dlopens.
  177. export_dynamic_flag_spec="\${wl}--export-dynamic"
  178.  
  179. # Compiler flag to generate shared objects directly from archives.
  180. whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
  181.  
  182. # Compiler flag to generate thread-safe objects.
  183. thread_safe_flag_spec=""
  184.  
  185. # Library versioning type.
  186. version_type=linux
  187.  
  188. # Format of library name prefix.
  189. libname_spec="lib\$name"
  190.  
  191. # List of archive names.  First name is the real one, the rest are links.
  192. # The last name is the one that the linker finds with -lNAME.
  193. library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
  194.  
  195. # The coded name of the library, if different from the real name.
  196. soname_spec="\${libname}\${release}\${shared_ext}\$major"
  197.  
  198. # Commands used to build and install an old-style archive.
  199. RANLIB="ranlib"
  200. old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
  201. old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
  202. old_postuninstall_cmds=""
  203.  
  204. # Create an old-style archive from a shared archive.
  205. old_archive_from_new_cmds=""
  206.  
  207. # Create a temporary old-style archive to link instead of a shared archive.
  208. old_archive_from_expsyms_cmds=""
  209.  
  210. # Commands used to build and install a shared archive.
  211. archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
  212. archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
  213.  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
  214.  \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
  215.       \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
  216. postinstall_cmds=""
  217. postuninstall_cmds=""
  218.  
  219. # Commands used to build a loadable module (assumed same as above if empty)
  220. module_cmds=""
  221. module_expsym_cmds=""
  222.  
  223. # Commands to strip libraries.
  224. old_striplib="strip --strip-debug"
  225. striplib="strip --strip-unneeded"
  226.  
  227. # Dependencies to place before the objects being linked to create a
  228. # shared library.
  229. predep_objects=""
  230.  
  231. # Dependencies to place after the objects being linked to create a
  232. # shared library.
  233. postdep_objects=""
  234.  
  235. # Dependencies to place before the objects being linked to create a
  236. # shared library.
  237. predeps=""
  238.  
  239. # Dependencies to place after the objects being linked to create a
  240. # shared library.
  241. postdeps=""
  242.  
  243. # The library search path used internally by the compiler when linking
  244. # a shared library.
  245. compiler_lib_search_path=""
  246.  
  247. # Method to check whether dependent libraries are shared objects.
  248. deplibs_check_method="pass_all"
  249.  
  250. # Command to use when deplibs_check_method == file_magic.
  251. file_magic_cmd="\$MAGIC_CMD"
  252.  
  253. # Flag that allows shared libraries with undefined symbols to be built.
  254. allow_undefined_flag=""
  255.  
  256. # Flag that forces no undefined symbols.
  257. no_undefined_flag=""
  258.  
  259. # Commands used to finish a libtool library installation in a directory.
  260. finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
  261.  
  262. # Same as above, but a single script fragment to be evaled but not shown.
  263. finish_eval=""
  264.  
  265. # Take the output of nm and produce a listing of raw symbols and C names.
  266. global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[   ][  ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
  267.  
  268. # Transform the output of nm in a proper C declaration
  269. global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
  270.  
  271. # Transform the output of nm in a C name address pair
  272. global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
  273.  
  274. # This is the shared library runtime path variable.
  275. runpath_var=LD_RUN_PATH
  276.  
  277. # This is the shared library path variable.
  278. shlibpath_var=LD_LIBRARY_PATH
  279.  
  280. # Is shlibpath searched before the hard-coded library search path?
  281. shlibpath_overrides_runpath=no
  282.  
  283. # How to hardcode a shared library path into an executable.
  284. hardcode_action=immediate
  285.  
  286. # Whether we should hardcode library paths into libraries.
  287. hardcode_into_libs=yes
  288.  
  289. # Flag to hardcode $libdir into a binary during linking.
  290. # This must work even if $libdir does not exist.
  291. hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
  292.  
  293. # If ld is used when linking, flag to hardcode $libdir into
  294. # a binary during linking. This must work even if $libdir does
  295. # not exist.
  296. hardcode_libdir_flag_spec_ld=""
  297.  
  298. # Whether we need a single -rpath flag with a separated argument.
  299. hardcode_libdir_separator=""
  300.  
  301. # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
  302. # resulting binary.
  303. hardcode_direct=no
  304.  
  305. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  306. # resulting binary.
  307. hardcode_minus_L=no
  308.  
  309. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  310. # the resulting binary.
  311. hardcode_shlibpath_var=unsupported
  312.  
  313. # Set to yes if building a shared library automatically hardcodes DIR into the library
  314. # and all subsequent libraries and executables linked against it.
  315. hardcode_automatic=no
  316.  
  317. # Variables whose values should be saved in libtool wrapper scripts and
  318. # restored at relink time.
  319. variables_saved_for_relink="PATH  LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  320.  
  321. # Whether libtool must link a program against all its dependency libraries.
  322. link_all_deplibs=unknown
  323.  
  324. # Compile-time system search path for libraries
  325. sys_lib_search_path_spec=" /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../../arm-angstrom-linux-gnueabi/lib/arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../../arm-angstrom-linux-gnueabi/lib/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../ /lib/arm-angstrom-linux-gnueabi/4.7.3/ /lib/ /usr/lib/arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/"
  326.  
  327. # Run-time system search path for libraries
  328. sys_lib_dlsearch_path_spec="/lib /usr/lib "
  329.  
  330. # Fix the shell variable $srcfile for the compiler.
  331. fix_srcfile_path=""
  332.  
  333. # Set to yes if exported symbols are required.
  334. always_export_symbols=no
  335.  
  336. # The commands to list exported symbols.
  337. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
  338.  
  339. # The commands to extract the exported symbol list from a shared archive.
  340. extract_expsyms_cmds=""
  341.  
  342. # Symbols that should not be listed in the preloaded symbols.
  343. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  344.  
  345. # Symbols that must always be exported.
  346. include_expsyms=""
  347.  
  348. # ### END LIBTOOL CONFIG
  349.  
  350. # ltmain.sh - Provide generalized library-building support services.
  351. # NOTE: Changing this file will not affect anything until you rerun configure.
  352. #
  353. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
  354. # Free Software Foundation, Inc.
  355. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  356. #
  357. # This program is free software; you can redistribute it and/or modify
  358. # it under the terms of the GNU General Public License as published by
  359. # the Free Software Foundation; either version 2 of the License, or
  360. # (at your option) any later version.
  361. #
  362. # This program is distributed in the hope that it will be useful, but
  363. # WITHOUT ANY WARRANTY; without even the implied warranty of
  364. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  365. # General Public License for more details.
  366. #
  367. # You should have received a copy of the GNU General Public License
  368. # along with this program; if not, write to the Free Software
  369. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  370. #
  371. # As a special exception to the GNU General Public License, if you
  372. # distribute this file as part of a program that contains a
  373. # configuration script generated by Autoconf, you may include it under
  374. # the same distribution terms that you use for the rest of that program.
  375.  
  376. basename="s,^.*/,,g"
  377.  
  378. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
  379. # is ksh but when the shell is invoked as "sh" and the current value of
  380. # the _XPG environment variable is not equal to 1 (one), the special
  381. # positional parameter $0, within a function call, is the name of the
  382. # function.
  383. progpath="$0"
  384.  
  385. # The name of this program:
  386. progname=`echo "$progpath" | $SED $basename`
  387. modename="$progname"
  388.  
  389. # Global variables:
  390. EXIT_SUCCESS=0
  391. EXIT_FAILURE=1
  392.  
  393. PROGRAM=ltmain.sh
  394. PACKAGE=libtool
  395. VERSION=1.5.20
  396. TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
  397.  
  398. # See if we are running on zsh, and set the options which allow our
  399. # commands through without removal of \ escapes.
  400. if test -n "${ZSH_VERSION+set}" ; then
  401.   setopt NO_GLOB_SUBST
  402. fi
  403.  
  404. # Check that we have a working $echo.
  405. if test "X$1" = X--no-reexec; then
  406.   # Discard the --no-reexec flag, and continue.
  407.   shift
  408. elif test "X$1" = X--fallback-echo; then
  409.   # Avoid inline document here, it may be left over
  410.   :
  411. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  412.   # Yippee, $echo works!
  413.   :
  414. else
  415.   # Restart under the correct shell, and then maybe $echo will work.
  416.   exec $SHELL "$progpath" --no-reexec ${1+"$@"}
  417. fi
  418.  
  419. if test "X$1" = X--fallback-echo; then
  420.   # used as fallback echo
  421.   shift
  422.   cat <<EOF
  423. $*
  424. EOF
  425.   exit $EXIT_SUCCESS
  426. fi
  427.  
  428. default_mode=
  429. help="Try \`$progname --help' for more information."
  430. magic="%%%MAGIC variable%%%"
  431. mkdir="mkdir"
  432. mv="mv -f"
  433. rm="rm -f"
  434.  
  435. # Sed substitution that helps us do robust quoting.  It backslashifies
  436. # metacharacters that are still active within double-quoted strings.
  437. Xsed="${SED}"' -e 1s/^X//'
  438. sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
  439. # test EBCDIC or ASCII
  440. case `echo X|tr X '\101'` in
  441. A) # ASCII based system
  442.    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  443.  SP2NL='tr \040 \012'
  444.  NL2SP='tr \015\012 \040\040'
  445.  ;;
  446. *) # EBCDIC based system
  447.  SP2NL='tr \100 \n'
  448.  NL2SP='tr \r\n \100\100'
  449.  ;;
  450. esac
  451.  
  452. # NLS nuisances.
  453. # Only set LANG and LC_ALL to C if already set.
  454. # These must not be set unconditionally because not all systems understand
  455. # e.g. LANG=C (notably SCO).
  456. # We save the old values to restore during execute mode.
  457. if test "${LC_ALL+set}" = set; then
  458.  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
  459. fi
  460. if test "${LANG+set}" = set; then
  461.  save_LANG="$LANG"; LANG=C; export LANG
  462. fi
  463.  
  464. # Make sure IFS has a sensible default
  465. lt_nl='
  466. '
  467. IFS="   $lt_nl"
  468.  
  469. if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
  470.  $echo "$modename: not configured to build any kind of library" 1>&2
  471.  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  472.  exit $EXIT_FAILURE
  473. fi
  474.  
  475. # Global variables.
  476. mode=$default_mode
  477. nonopt=
  478. prev=
  479. prevopt=
  480. run=
  481. show="$echo"
  482. show_help=
  483. execute_dlfiles=
  484. lo2o="s/\\.lo\$/.${objext}/"
  485. o2lo="s/\\.${objext}\$/.lo/"
  486.  
  487. #####################################
  488. # Shell function definitions:
  489. # This seems to be the best place for them
  490.  
  491. # func_win32_libid arg
  492. # return the library type of file 'arg'
  493. #
  494. # Need a lot of goo to handle *both* DLLs and import libs
  495. # Has to be a shell function in order to 'eat' the argument
  496. # that is supplied when $file_magic_command is called.
  497. func_win32_libid ()
  498. {
  499.  win32_libid_type="unknown"
  500.  win32_fileres=`file -L $1 2>/dev/null`
  501.  case $win32_fileres in
  502.  *ar\ archive\ import\ library*) # definitely import
  503.    win32_libid_type="x86 archive import"
  504.    ;;
  505.  *ar\ archive*) # could be an import, or static
  506.    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
  507.      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
  508.      win32_nmres=`eval $NM -f posix -A $1 | \
  509.     sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
  510.      if test "X$win32_nmres" = "Ximport" ; then
  511.        win32_libid_type="x86 archive import"
  512.      else
  513.        win32_libid_type="x86 archive static"
  514.      fi
  515.    fi
  516.    ;;
  517.  *DLL*)
  518.    win32_libid_type="x86 DLL"
  519.    ;;
  520.  *executable*) # but shell scripts are "executable" too...
  521.    case $win32_fileres in
  522.    *MS\ Windows\ PE\ Intel*)
  523.      win32_libid_type="x86 DLL"
  524.      ;;
  525.    esac
  526.    ;;
  527.  esac
  528.  $echo $win32_libid_type
  529. }
  530.  
  531.  
  532. # func_infer_tag arg
  533. # Infer tagged configuration to use if any are available and
  534. # if one wasn't chosen via the "--tag" command line option.
  535. # Only attempt this if the compiler in the base compile
  536. # command doesn't match the default compiler.
  537. # arg is usually of the form 'gcc ...'
  538. func_infer_tag ()
  539. {
  540.    if test -n "$available_tags" && test -z "$tagname"; then
  541.      CC_quoted=
  542.      for arg in $CC; do
  543.     case $arg in
  544.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  545.       arg="\"$arg\""
  546.       ;;
  547.     esac
  548.     CC_quoted="$CC_quoted $arg"
  549.      done
  550.      case $@ in
  551.      # Blanks in the command may have been stripped by the calling shell,
  552.      # but not from the CC environment variable when configure was run.
  553.      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
  554.      # Blanks at the start of $base_compile will cause this to fail
  555.      # if we don't check for them as well.
  556.      *)
  557.     for z in $available_tags; do
  558.       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
  559.         # Evaluate the configuration.
  560.         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
  561.         CC_quoted=
  562.         for arg in $CC; do
  563.         # Double-quote args containing other shell metacharacters.
  564.         case $arg in
  565.           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  566.           arg="\"$arg\""
  567.           ;;
  568.         esac
  569.         CC_quoted="$CC_quoted $arg"
  570.       done
  571.         case "$@ " in
  572.           " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
  573.           # The compiler in the base compile command matches
  574.           # the one in the tagged configuration.
  575.           # Assume this is the tagged configuration we want.
  576.           tagname=$z
  577.           break
  578.           ;;
  579.         esac
  580.       fi
  581.     done
  582.     # If $tagname still isn't set, then no tagged configuration
  583.     # was found and let the user know that the "--tag" command
  584.     # line option must be used.
  585.     if test -z "$tagname"; then
  586.       $echo "$modename: unable to infer tagged configuration"
  587.       $echo "$modename: specify a tag with \`--tag'" 1>&2
  588.       exit $EXIT_FAILURE
  589. #        else
  590. #          $echo "$modename: using $tagname tagged configuration"
  591.     fi
  592.     ;;
  593.      esac
  594.    fi
  595. }
  596.  
  597.  
  598. # func_extract_an_archive dir oldlib
  599. func_extract_an_archive ()
  600. {
  601.    f_ex_an_ar_dir="$1"; shift
  602.    f_ex_an_ar_oldlib="$1"
  603.  
  604.    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
  605.    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
  606.    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
  607.     :
  608.    else
  609.      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
  610.      exit $EXIT_FAILURE
  611.    fi
  612. }
  613.  
  614. # func_extract_archives gentop oldlib ...
  615. func_extract_archives ()
  616. {
  617.    my_gentop="$1"; shift
  618.    my_oldlibs=${1+"$@"}
  619.    my_oldobjs=""
  620.    my_xlib=""
  621.    my_xabs=""
  622.    my_xdir=""
  623.    my_status=""
  624.  
  625.    $show "${rm}r $my_gentop"
  626.    $run ${rm}r "$my_gentop"
  627.    $show "$mkdir $my_gentop"
  628.    $run $mkdir "$my_gentop"
  629.    my_status=$?
  630.    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
  631.      exit $my_status
  632.    fi
  633.  
  634.    for my_xlib in $my_oldlibs; do
  635.      # Extract the objects.
  636.      case $my_xlib in
  637.     [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
  638.     *) my_xabs=`pwd`"/$my_xlib" ;;
  639.      esac
  640.      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
  641.      my_xdir="$my_gentop/$my_xlib"
  642.  
  643.      $show "${rm}r $my_xdir"
  644.      $run ${rm}r "$my_xdir"
  645.      $show "$mkdir $my_xdir"
  646.      $run $mkdir "$my_xdir"
  647.      status=$?
  648.      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
  649.     exit $status
  650.      fi
  651.      case $host in
  652.      *-darwin*)
  653.     $show "Extracting $my_xabs"
  654.     # Do not bother doing anything if just a dry run
  655.     if test -z "$run"; then
  656.       darwin_orig_dir=`pwd`
  657.       cd $my_xdir || exit $?
  658.       darwin_archive=$my_xabs
  659.       darwin_curdir=`pwd`
  660.       darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
  661.       darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
  662.       if test -n "$darwin_arches"; then
  663.         darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
  664.         darwin_arch=
  665.         $show "$darwin_base_archive has multiple architectures $darwin_arches"
  666.         for darwin_arch in  $darwin_arches ; do
  667.           mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
  668.           lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
  669.           cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
  670.           func_extract_an_archive "`pwd`" "${darwin_base_archive}"
  671.           cd "$darwin_curdir"
  672.           $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
  673.         done # $darwin_arches
  674.      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
  675.         darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
  676.         darwin_file=
  677.         darwin_files=
  678.         for darwin_file in $darwin_filelist; do
  679.           darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
  680.           lipo -create -output "$darwin_file" $darwin_files
  681.         done # $darwin_filelist
  682.         ${rm}r unfat-$$
  683.         cd "$darwin_orig_dir"
  684.       else
  685.         cd "$darwin_orig_dir"
  686.         func_extract_an_archive "$my_xdir" "$my_xabs"
  687.       fi # $darwin_arches
  688.     fi # $run
  689.     ;;
  690.      *)
  691.        func_extract_an_archive "$my_xdir" "$my_xabs"
  692.        ;;
  693.      esac
  694.      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
  695.    done
  696.    func_extract_archives_result="$my_oldobjs"
  697. }
  698. # End of Shell function definitions
  699. #####################################
  700.  
  701. # Darwin sucks
  702. eval std_shrext=\"$shrext_cmds\"
  703.  
  704. # Parse our command line options once, thoroughly.
  705. while test "$#" -gt 0
  706. do
  707.  arg="$1"
  708.  shift
  709.  
  710.  case $arg in
  711.  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
  712.  *) optarg= ;;
  713.  esac
  714.  
  715.  # If the previous option needs an argument, assign it.
  716.  if test -n "$prev"; then
  717.    case $prev in
  718.    execute_dlfiles)
  719.      execute_dlfiles="$execute_dlfiles $arg"
  720.      ;;
  721.    tag)
  722.      tagname="$arg"
  723.      preserve_args="${preserve_args}=$arg"
  724.  
  725.      # Check whether tagname contains only valid characters
  726.      case $tagname in
  727.      *[!-_A-Za-z0-9,/]*)
  728.     $echo "$progname: invalid tag name: $tagname" 1>&2
  729.     exit $EXIT_FAILURE
  730.     ;;
  731.      esac
  732.  
  733.      case $tagname in
  734.      CC)
  735.     # Don't test for the "default" C tag, as we know, it's there, but
  736.     # not specially marked.
  737.     ;;
  738.      *)
  739.     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
  740.       taglist="$taglist $tagname"
  741.       # Evaluate the configuration.
  742.       eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
  743.     else
  744.       $echo "$progname: ignoring unknown tag $tagname" 1>&2
  745.     fi
  746.     ;;
  747.      esac
  748.      ;;
  749.    *)
  750.      eval "$prev=\$arg"
  751.      ;;
  752.    esac
  753.  
  754.    prev=
  755.    prevopt=
  756.    continue
  757.  fi
  758.  
  759.  # Have we seen a non-optional argument yet?
  760.  case $arg in
  761.  --help)
  762.    show_help=yes
  763.    ;;
  764.  
  765.  --version)
  766.    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
  767.    $echo
  768.    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
  769.    $echo "This is free software; see the source for copying conditions.  There is NO"
  770.    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  771.    exit $?
  772.    ;;
  773.  
  774.  --config)
  775.    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
  776.    # Now print the configurations for the tags.
  777.    for tagname in $taglist; do
  778.      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
  779.    done
  780.    exit $?
  781.    ;;
  782.  
  783.  --debug)
  784.    $echo "$progname: enabling shell trace mode"
  785.    set -x
  786.    preserve_args="$preserve_args $arg"
  787.    ;;
  788.  
  789.  --dry-run | -n)
  790.    run=:
  791.    ;;
  792.  
  793.  --features)
  794.    $echo "host: $host"
  795.    if test "$build_libtool_libs" = yes; then
  796.      $echo "enable shared libraries"
  797.    else
  798.      $echo "disable shared libraries"
  799.    fi
  800.    if test "$build_old_libs" = yes; then
  801.      $echo "enable static libraries"
  802.    else
  803.      $echo "disable static libraries"
  804.    fi
  805.    exit $?
  806.    ;;
  807.  
  808.  --finish) mode="finish" ;;
  809.  
  810.  --mode) prevopt="--mode" prev=mode ;;
  811.  --mode=*) mode="$optarg" ;;
  812.  
  813.  --preserve-dup-deps) duplicate_deps="yes" ;;
  814.  
  815.  --quiet | --silent)
  816.    show=:
  817.    preserve_args="$preserve_args $arg"
  818.    ;;
  819.  
  820.  --tag) prevopt="--tag" prev=tag ;;
  821.  --tag=*)
  822.    set tag "$optarg" ${1+"$@"}
  823.    shift
  824.    prev=tag
  825.    preserve_args="$preserve_args --tag"
  826.    ;;
  827.  
  828.  -dlopen)
  829.    prevopt="-dlopen"
  830.    prev=execute_dlfiles
  831.    ;;
  832.  
  833.  -*)
  834.    $echo "$modename: unrecognized option \`$arg'" 1>&2
  835.     $echo "$help" 1>&2
  836.     exit $EXIT_FAILURE
  837.     ;;
  838.  
  839.   *)
  840.     nonopt="$arg"
  841.     break
  842.     ;;
  843.   esac
  844. done
  845.  
  846. if test -n "$prevopt"; then
  847.   $echo "$modename: option \`$prevopt' requires an argument" 1>&2
  848.  $echo "$help" 1>&2
  849.  exit $EXIT_FAILURE
  850. fi
  851.  
  852. # If this variable is set in any of the actions, the command in it
  853. # will be execed at the end.  This prevents here-documents from being
  854. # left over by shells.
  855. exec_cmd=
  856.  
  857. if test -z "$show_help"; then
  858.  
  859.  # Infer the operation mode.
  860.  if test -z "$mode"; then
  861.    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
  862.    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
  863.    case $nonopt in
  864.    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
  865.      mode=link
  866.      for arg
  867.      do
  868.     case $arg in
  869.     -c)
  870.        mode=compile
  871.        break
  872.        ;;
  873.     esac
  874.      done
  875.      ;;
  876.    *db | *dbx | *strace | *truss)
  877.      mode=execute
  878.      ;;
  879.    *install*|cp|mv)
  880.      mode=install
  881.      ;;
  882.    *rm)
  883.      mode=uninstall
  884.      ;;
  885.    *)
  886.      # If we have no mode, but dlfiles were specified, then do execute mode.
  887.      test -n "$execute_dlfiles" && mode=execute
  888.  
  889.      # Just use the default operation mode.
  890.      if test -z "$mode"; then
  891.     if test -n "$nonopt"; then
  892.       $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
  893.     else
  894.       $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
  895.     fi
  896.       fi
  897.       ;;
  898.     esac
  899.   fi
  900.  
  901.   # Only execute mode is allowed to have -dlopen flags.
  902.   if test -n "$execute_dlfiles" && test "$mode" != execute; then
  903.     $echo "$modename: unrecognized option \`-dlopen'" 1>&2
  904.    $echo "$help" 1>&2
  905.    exit $EXIT_FAILURE
  906.  fi
  907.  
  908.  # Change the help message to a mode-specific one.
  909.  generic_help="$help"
  910.  help="Try \`$modename --help --mode=$mode' for more information."
  911.  
  912.   # These modes are in order of execution frequency so that they run quickly.
  913.   case $mode in
  914.   # libtool compile mode
  915.   compile)
  916.     modename="$modename: compile"
  917.     # Get the compilation command and the source file.
  918.     base_compile=
  919.     srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
  920.     suppress_opt=yes
  921.     suppress_output=
  922.     arg_mode=normal
  923.     libobj=
  924.     later=
  925.  
  926.     for arg
  927.     do
  928.       case $arg_mode in
  929.       arg  )
  930.     # do not "continue".  Instead, add this to base_compile
  931.     lastarg="$arg"
  932.     arg_mode=normal
  933.     ;;
  934.  
  935.       target )
  936.     libobj="$arg"
  937.     arg_mode=normal
  938.     continue
  939.     ;;
  940.  
  941.       normal )
  942.     # Accept any command-line options.
  943.     case $arg in
  944.     -o)
  945.       if test -n "$libobj" ; then
  946.         $echo "$modename: you cannot specify \`-o' more than once" 1>&2
  947.         exit $EXIT_FAILURE
  948.       fi
  949.       arg_mode=target
  950.       continue
  951.       ;;
  952.  
  953.     -static | -prefer-pic | -prefer-non-pic)
  954.       later="$later $arg"
  955.       continue
  956.       ;;
  957.  
  958.     -no-suppress)
  959.       suppress_opt=no
  960.       continue
  961.       ;;
  962.  
  963.     -Xcompiler)
  964.       arg_mode=arg  #  the next one goes into the "base_compile" arg list
  965.       continue      #  The current "srcfile" will either be retained or
  966.       ;;            #  replaced later.  I would guess that would be a bug.
  967.  
  968.     -Wc,*)
  969.       args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
  970.       lastarg=
  971.       save_ifs="$IFS"; IFS=','
  972.       for arg in $args; do
  973.         IFS="$save_ifs"
  974.  
  975.         # Double-quote args containing other shell metacharacters.
  976.         # Many Bourne shells cannot handle close brackets correctly
  977.         # in scan sets, so we specify it separately.
  978.         case $arg in
  979.           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  980.           arg="\"$arg\""
  981.           ;;
  982.         esac
  983.         lastarg="$lastarg $arg"
  984.       done
  985.       IFS="$save_ifs"
  986.       lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
  987.  
  988.       # Add the arguments to base_compile.
  989.       base_compile="$base_compile $lastarg"
  990.       continue
  991.       ;;
  992.  
  993.     * )
  994.       # Accept the current argument as the source file.
  995.       # The previous "srcfile" becomes the current argument.
  996.       #
  997.       lastarg="$srcfile"
  998.       srcfile="$arg"
  999.       ;;
  1000.     esac  #  case $arg
  1001.     ;;
  1002.      esac    #  case $arg_mode
  1003.  
  1004.      # Aesthetically quote the previous argument.
  1005.      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
  1006.  
  1007.      case $lastarg in
  1008.      # Double-quote args containing other shell metacharacters.
  1009.      # Many Bourne shells cannot handle close brackets correctly
  1010.      # in scan sets, and some SunOS ksh mistreat backslash-escaping
  1011.      # in scan sets (worked around with variable expansion),
  1012.      # and furthermore cannot handle '|' '&' '(' ')' in scan sets
  1013.      # at all, so we specify them separately.
  1014.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1015.     lastarg="\"$lastarg\""
  1016.     ;;
  1017.      esac
  1018.  
  1019.      base_compile="$base_compile $lastarg"
  1020.    done # for arg
  1021.  
  1022.    case $arg_mode in
  1023.    arg)
  1024.      $echo "$modename: you must specify an argument for -Xcompile"
  1025.      exit $EXIT_FAILURE
  1026.      ;;
  1027.    target)
  1028.      $echo "$modename: you must specify a target with \`-o'" 1>&2
  1029.       exit $EXIT_FAILURE
  1030.       ;;
  1031.     *)
  1032.       # Get the name of the library object.
  1033.       [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
  1034.       ;;
  1035.     esac
  1036.  
  1037.     # Recognize several different file suffixes.
  1038.     # If the user specifies -o file.o, it is replaced with file.lo
  1039.     xform='[cCFSifmso]'
  1040.     case $libobj in
  1041.     *.ada) xform=ada ;;
  1042.     *.adb) xform=adb ;;
  1043.     *.ads) xform=ads ;;
  1044.     *.asm) xform=asm ;;
  1045.     *.c++) xform=c++ ;;
  1046.     *.cc) xform=cc ;;
  1047.     *.ii) xform=ii ;;
  1048.     *.class) xform=class ;;
  1049.     *.cpp) xform=cpp ;;
  1050.     *.cxx) xform=cxx ;;
  1051.     *.f90) xform=f90 ;;
  1052.     *.for) xform=for ;;
  1053.     *.java) xform=java ;;
  1054.     esac
  1055.  
  1056.     libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
  1057.  
  1058.     case $libobj in
  1059.     *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
  1060.     *)
  1061.       $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
  1062.      exit $EXIT_FAILURE
  1063.      ;;
  1064.    esac
  1065.  
  1066.    func_infer_tag $base_compile
  1067.  
  1068.    for arg in $later; do
  1069.      case $arg in
  1070.      -static)
  1071.     build_old_libs=yes
  1072.     continue
  1073.     ;;
  1074.  
  1075.      -prefer-pic)
  1076.     pic_mode=yes
  1077.     continue
  1078.     ;;
  1079.  
  1080.      -prefer-non-pic)
  1081.     pic_mode=no
  1082.     continue
  1083.     ;;
  1084.      esac
  1085.    done
  1086.  
  1087.    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
  1088.    case $qlibobj in
  1089.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1090.     qlibobj="\"$qlibobj\"" ;;
  1091.    esac
  1092.    test "X$libobj" != "X$qlibobj" \
  1093.     && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"'  &()|`$[]' \
  1094.     && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
  1095.    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  1096.    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
  1097.    if test "X$xdir" = "X$obj"; then
  1098.      xdir=
  1099.    else
  1100.      xdir=$xdir/
  1101.    fi
  1102.    lobj=${xdir}$objdir/$objname
  1103.  
  1104.    if test -z "$base_compile"; then
  1105.      $echo "$modename: you must specify a compilation command" 1>&2
  1106.      $echo "$help" 1>&2
  1107.      exit $EXIT_FAILURE
  1108.    fi
  1109.  
  1110.    # Delete any leftover library objects.
  1111.    if test "$build_old_libs" = yes; then
  1112.      removelist="$obj $lobj $libobj ${libobj}T"
  1113.    else
  1114.      removelist="$lobj $libobj ${libobj}T"
  1115.    fi
  1116.  
  1117.    $run $rm $removelist
  1118.    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
  1119.  
  1120.    # On Cygwin there's no "real" PIC flag so we must build both object types
  1121.     case $host_os in
  1122.     cygwin* | mingw* | pw32* | os2*)
  1123.       pic_mode=default
  1124.       ;;
  1125.     esac
  1126.     if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
  1127.       # non-PIC code in shared libraries is not supported
  1128.       pic_mode=default
  1129.     fi
  1130.  
  1131.     # Calculate the filename of the output object if compiler does
  1132.     # not support -o with -c
  1133.     if test "$compiler_c_o" = no; then
  1134.       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
  1135.       lockfile="$output_obj.lock"
  1136.       removelist="$removelist $output_obj $lockfile"
  1137.       trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
  1138.     else
  1139.       output_obj=
  1140.       need_locks=no
  1141.       lockfile=
  1142.     fi
  1143.  
  1144.     # Lock this critical section if it is needed
  1145.     # We use this script file to make the link, it avoids creating a new file
  1146.     if test "$need_locks" = yes; then
  1147.       until $run ln "$progpath" "$lockfile" 2>/dev/null; do
  1148.     $show "Waiting for $lockfile to be removed"
  1149.     sleep 2
  1150.       done
  1151.     elif test "$need_locks" = warn; then
  1152.       if test -f "$lockfile"; then
  1153.     $echo "\
  1154. *** ERROR, $lockfile exists and contains:
  1155. `cat $lockfile 2>/dev/null`
  1156.  
  1157. This indicates that another process is trying to use the same
  1158. temporary object file, and libtool could not work around it because
  1159. your compiler does not support \`-c' and \`-o' together.  If you
  1160. repeat this compilation, it may succeed, by chance, but you had better
  1161. avoid parallel builds (make -j) in this platform, or get a better
  1162. compiler."
  1163.  
  1164.     $run $rm $removelist
  1165.     exit $EXIT_FAILURE
  1166.       fi
  1167.       $echo "$srcfile" > "$lockfile"
  1168.     fi
  1169.  
  1170.     if test -n "$fix_srcfile_path"; then
  1171.       eval srcfile=\"$fix_srcfile_path\"
  1172.     fi
  1173.     qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
  1174.     case $qsrcfile in
  1175.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1176.       qsrcfile="\"$qsrcfile\"" ;;
  1177.     esac
  1178.  
  1179.     $run $rm "$libobj" "${libobj}T"
  1180.  
  1181.     # Create a libtool object file (analogous to a ".la" file),
  1182.     # but don't create it if we're doing a dry run.
  1183.     test -z "$run" && cat > ${libobj}T <<EOF
  1184. # $libobj - a libtool object file
  1185. # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  1186. #
  1187. # Please DO NOT delete this file!
  1188. # It is necessary for linking the library.
  1189.  
  1190. # Name of the PIC object.
  1191. EOF
  1192.  
  1193.     # Only build a PIC object if we are building libtool libraries.
  1194.     if test "$build_libtool_libs" = yes; then
  1195.       # Without this assignment, base_compile gets emptied.
  1196.       fbsd_hideous_sh_bug=$base_compile
  1197.  
  1198.       if test "$pic_mode" != no; then
  1199.     command="$base_compile $qsrcfile $pic_flag"
  1200.       else
  1201.     # Don't build PIC code
  1202.     command="$base_compile $qsrcfile"
  1203.       fi
  1204.  
  1205.       if test ! -d "${xdir}$objdir"; then
  1206.     $show "$mkdir ${xdir}$objdir"
  1207.     $run $mkdir ${xdir}$objdir
  1208.     status=$?
  1209.     if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
  1210.       exit $status
  1211.     fi
  1212.       fi
  1213.  
  1214.       if test -z "$output_obj"; then
  1215.     # Place PIC objects in $objdir
  1216.     command="$command -o $lobj"
  1217.       fi
  1218.  
  1219.       $run $rm "$lobj" "$output_obj"
  1220.  
  1221.       $show "$command"
  1222.       if $run eval "$command"; then :
  1223.       else
  1224.     test -n "$output_obj" && $run $rm $removelist
  1225.     exit $EXIT_FAILURE
  1226.       fi
  1227.  
  1228.       if test "$need_locks" = warn &&
  1229.      test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
  1230.     $echo "\
  1231. *** ERROR, $lockfile contains:
  1232. `cat $lockfile 2>/dev/null`
  1233.  
  1234. but it should contain:
  1235. $srcfile
  1236.  
  1237. This indicates that another process is trying to use the same
  1238. temporary object file, and libtool could not work around it because
  1239. your compiler does not support \`-c' and \`-o' together.  If you
  1240. repeat this compilation, it may succeed, by chance, but you had better
  1241. avoid parallel builds (make -j) in this platform, or get a better
  1242. compiler."
  1243.  
  1244.     $run $rm $removelist
  1245.     exit $EXIT_FAILURE
  1246.       fi
  1247.  
  1248.       # Just move the object if needed, then go on to compile the next one
  1249.       if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
  1250.     $show "$mv $output_obj $lobj"
  1251.     if $run $mv $output_obj $lobj; then :
  1252.     else
  1253.       error=$?
  1254.       $run $rm $removelist
  1255.       exit $error
  1256.     fi
  1257.       fi
  1258.  
  1259.       # Append the name of the PIC object to the libtool object file.
  1260.       test -z "$run" && cat >> ${libobj}T <<EOF
  1261. pic_object='$objdir/$objname'
  1262.  
  1263. EOF
  1264.  
  1265.       # Allow error messages only from the first compilation.
  1266.       if test "$suppress_opt" = yes; then
  1267.         suppress_output=' >/dev/null 2>&1'
  1268.       fi
  1269.     else
  1270.       # No PIC object so indicate it doesn't exist in the libtool
  1271.       # object file.
  1272.       test -z "$run" && cat >> ${libobj}T <<EOF
  1273. pic_object=none
  1274.  
  1275. EOF
  1276.     fi
  1277.  
  1278.     # Only build a position-dependent object if we build old libraries.
  1279.     if test "$build_old_libs" = yes; then
  1280.       if test "$pic_mode" != yes; then
  1281.     # Don't build PIC code
  1282.     command="$base_compile $qsrcfile"
  1283.       else
  1284.     command="$base_compile $qsrcfile $pic_flag"
  1285.       fi
  1286.       if test "$compiler_c_o" = yes; then
  1287.     command="$command -o $obj"
  1288.       fi
  1289.  
  1290.       # Suppress compiler output if we already did a PIC compilation.
  1291.       command="$command$suppress_output"
  1292.       $run $rm "$obj" "$output_obj"
  1293.       $show "$command"
  1294.       if $run eval "$command"; then :
  1295.       else
  1296.     $run $rm $removelist
  1297.     exit $EXIT_FAILURE
  1298.       fi
  1299.  
  1300.       if test "$need_locks" = warn &&
  1301.      test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
  1302.     $echo "\
  1303. *** ERROR, $lockfile contains:
  1304. `cat $lockfile 2>/dev/null`
  1305.  
  1306. but it should contain:
  1307. $srcfile
  1308.  
  1309. This indicates that another process is trying to use the same
  1310. temporary object file, and libtool could not work around it because
  1311. your compiler does not support \`-c' and \`-o' together.  If you
  1312. repeat this compilation, it may succeed, by chance, but you had better
  1313. avoid parallel builds (make -j) in this platform, or get a better
  1314. compiler."
  1315.  
  1316.     $run $rm $removelist
  1317.     exit $EXIT_FAILURE
  1318.       fi
  1319.  
  1320.       # Just move the object if needed
  1321.       if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
  1322.     $show "$mv $output_obj $obj"
  1323.     if $run $mv $output_obj $obj; then :
  1324.     else
  1325.       error=$?
  1326.       $run $rm $removelist
  1327.       exit $error
  1328.     fi
  1329.       fi
  1330.  
  1331.       # Append the name of the non-PIC object the libtool object file.
  1332.       # Only append if the libtool object file exists.
  1333.       test -z "$run" && cat >> ${libobj}T <<EOF
  1334. # Name of the non-PIC object.
  1335. non_pic_object='$objname'
  1336.  
  1337. EOF
  1338.     else
  1339.       # Append the name of the non-PIC object the libtool object file.
  1340.       # Only append if the libtool object file exists.
  1341.       test -z "$run" && cat >> ${libobj}T <<EOF
  1342. # Name of the non-PIC object.
  1343. non_pic_object=none
  1344.  
  1345. EOF
  1346.     fi
  1347.  
  1348.     $run $mv "${libobj}T" "${libobj}"
  1349.  
  1350.     # Unlock the critical section if it was locked
  1351.     if test "$need_locks" != no; then
  1352.       $run $rm "$lockfile"
  1353.     fi
  1354.  
  1355.     exit $EXIT_SUCCESS
  1356.     ;;
  1357.  
  1358.   # libtool link mode
  1359.   link | relink)
  1360.     modename="$modename: link"
  1361.     case $host in
  1362.     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1363.       # It is impossible to link a dll without this setting, and
  1364.       # we shouldn't force the makefile maintainer to figure out
  1365.       # which system we are compiling for in order to pass an extra
  1366.       # flag for every libtool invocation.
  1367.       # allow_undefined=no
  1368.  
  1369.       # FIXME: Unfortunately, there are problems with the above when trying
  1370.       # to make a dll which has undefined symbols, in which case not
  1371.       # even a static library is built.  For now, we need to specify
  1372.       # -no-undefined on the libtool link line when we can be certain
  1373.       # that all symbols are satisfied, otherwise we get a static library.
  1374.       allow_undefined=yes
  1375.       ;;
  1376.     *)
  1377.       allow_undefined=yes
  1378.       ;;
  1379.     esac
  1380.     libtool_args="$nonopt"
  1381.     base_compile="$nonopt $@"
  1382.     compile_command="$nonopt"
  1383.     finalize_command="$nonopt"
  1384.  
  1385.     compile_rpath=
  1386.     finalize_rpath=
  1387.     compile_shlibpath=
  1388.     finalize_shlibpath=
  1389.     convenience=
  1390.     old_convenience=
  1391.     deplibs=
  1392.     old_deplibs=
  1393.     compiler_flags=
  1394.     linker_flags=
  1395.     dllsearchpath=
  1396.     lib_search_path=`pwd`
  1397.     inst_prefix_dir=
  1398.  
  1399.     avoid_version=no
  1400.     dlfiles=
  1401.     dlprefiles=
  1402.     dlself=no
  1403.     export_dynamic=no
  1404.     export_symbols=
  1405.     export_symbols_regex=
  1406.     generated=
  1407.     libobjs=
  1408.     ltlibs=
  1409.     module=no
  1410.     no_install=no
  1411.     objs=
  1412.     non_pic_objects=
  1413.     precious_files_regex=
  1414.     prefer_static_libs=no
  1415.     preload=no
  1416.     prev=
  1417.     prevarg=
  1418.     release=
  1419.     rpath=
  1420.     xrpath=
  1421.     perm_rpath=
  1422.     temp_rpath=
  1423.     thread_safe=no
  1424.     vinfo=
  1425.     vinfo_number=no
  1426.  
  1427.     func_infer_tag $base_compile
  1428.  
  1429.     # We need to know -static, to get the right output filenames.
  1430.     for arg
  1431.     do
  1432.       case $arg in
  1433.       -all-static | -static)
  1434.     if test "X$arg" = "X-all-static"; then
  1435.       if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  1436.         $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
  1437.       fi
  1438.       if test -n "$link_static_flag"; then
  1439.         dlopen_self=$dlopen_self_static
  1440.       fi
  1441.     else
  1442.       if test -z "$pic_flag" && test -n "$link_static_flag"; then
  1443.         dlopen_self=$dlopen_self_static
  1444.       fi
  1445.     fi
  1446.     build_libtool_libs=no
  1447.     build_old_libs=yes
  1448.     prefer_static_libs=yes
  1449.     break
  1450.     ;;
  1451.       esac
  1452.     done
  1453.  
  1454.     # See if our shared archives depend on static archives.
  1455.     test -n "$old_archive_from_new_cmds" && build_old_libs=yes
  1456.  
  1457.     # Go through the arguments, transforming them on the way.
  1458.     while test "$#" -gt 0; do
  1459.       arg="$1"
  1460.       shift
  1461.       case $arg in
  1462.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1463.     qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
  1464.     ;;
  1465.       *) qarg=$arg ;;
  1466.       esac
  1467.       libtool_args="$libtool_args $qarg"
  1468.  
  1469.       # If the previous option needs an argument, assign it.
  1470.       if test -n "$prev"; then
  1471.     case $prev in
  1472.     output)
  1473.       compile_command="$compile_command @OUTPUT@"
  1474.       finalize_command="$finalize_command @OUTPUT@"
  1475.       ;;
  1476.     esac
  1477.  
  1478.     case $prev in
  1479.     dlfiles|dlprefiles)
  1480.       if test "$preload" = no; then
  1481.         # Add the symbol object into the linking commands.
  1482.         compile_command="$compile_command @SYMFILE@"
  1483.         finalize_command="$finalize_command @SYMFILE@"
  1484.         preload=yes
  1485.       fi
  1486.       case $arg in
  1487.       *.la | *.lo) ;;  # We handle these cases below.
  1488.       force)
  1489.         if test "$dlself" = no; then
  1490.           dlself=needless
  1491.           export_dynamic=yes
  1492.         fi
  1493.         prev=
  1494.         continue
  1495.         ;;
  1496.       self)
  1497.         if test "$prev" = dlprefiles; then
  1498.           dlself=yes
  1499.         elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
  1500.           dlself=yes
  1501.         else
  1502.           dlself=needless
  1503.           export_dynamic=yes
  1504.         fi
  1505.         prev=
  1506.         continue
  1507.         ;;
  1508.       *)
  1509.         if test "$prev" = dlfiles; then
  1510.           dlfiles="$dlfiles $arg"
  1511.         else
  1512.           dlprefiles="$dlprefiles $arg"
  1513.         fi
  1514.         prev=
  1515.         continue
  1516.         ;;
  1517.       esac
  1518.       ;;
  1519.     expsyms)
  1520.       export_symbols="$arg"
  1521.       if test ! -f "$arg"; then
  1522.         $echo "$modename: symbol file \`$arg' does not exist"
  1523.         exit $EXIT_FAILURE
  1524.       fi
  1525.       prev=
  1526.       continue
  1527.       ;;
  1528.     expsyms_regex)
  1529.       export_symbols_regex="$arg"
  1530.       prev=
  1531.       continue
  1532.       ;;
  1533.     inst_prefix)
  1534.       inst_prefix_dir="$arg"
  1535.       prev=
  1536.       continue
  1537.       ;;
  1538.     precious_regex)
  1539.       precious_files_regex="$arg"
  1540.       prev=
  1541.       continue
  1542.       ;;
  1543.     release)
  1544.       release="-$arg"
  1545.       prev=
  1546.       continue
  1547.       ;;
  1548.     objectlist)
  1549.       if test -f "$arg"; then
  1550.         save_arg=$arg
  1551.         moreargs=
  1552.         for fil in `cat $save_arg`
  1553.         do
  1554. #         moreargs="$moreargs $fil"
  1555.           arg=$fil
  1556.           # A libtool-controlled object.
  1557.  
  1558.           # Check to see that this really is a libtool object.
  1559.           if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1560.         pic_object=
  1561.         non_pic_object=
  1562.  
  1563.         # Read the .lo file
  1564.         # If there is no directory component, then add one.
  1565.         case $arg in
  1566.         */* | *\\*) . $arg ;;
  1567.         *) . ./$arg ;;
  1568.         esac
  1569.  
  1570.         if test -z "$pic_object" || \
  1571.            test -z "$non_pic_object" ||
  1572.            test "$pic_object" = none && \
  1573.            test "$non_pic_object" = none; then
  1574.           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  1575.           exit $EXIT_FAILURE
  1576.         fi
  1577.  
  1578.         # Extract subdirectory from the argument.
  1579.         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1580.         if test "X$xdir" = "X$arg"; then
  1581.           xdir=
  1582.         else
  1583.           xdir="$xdir/"
  1584.         fi
  1585.  
  1586.         if test "$pic_object" != none; then
  1587.           # Prepend the subdirectory the object is found in.
  1588.           pic_object="$xdir$pic_object"
  1589.  
  1590.           if test "$prev" = dlfiles; then
  1591.             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  1592.               dlfiles="$dlfiles $pic_object"
  1593.               prev=
  1594.               continue
  1595.             else
  1596.               # If libtool objects are unsupported, then we need to preload.
  1597.               prev=dlprefiles
  1598.             fi
  1599.           fi
  1600.  
  1601.           # CHECK ME:  I think I busted this.  -Ossama
  1602.           if test "$prev" = dlprefiles; then
  1603.             # Preload the old-style object.
  1604.             dlprefiles="$dlprefiles $pic_object"
  1605.             prev=
  1606.           fi
  1607.  
  1608.           # A PIC object.
  1609.           libobjs="$libobjs $pic_object"
  1610.           arg="$pic_object"
  1611.         fi
  1612.  
  1613.         # Non-PIC object.
  1614.         if test "$non_pic_object" != none; then
  1615.           # Prepend the subdirectory the object is found in.
  1616.           non_pic_object="$xdir$non_pic_object"
  1617.  
  1618.           # A standard non-PIC object
  1619.           non_pic_objects="$non_pic_objects $non_pic_object"
  1620.           if test -z "$pic_object" || test "$pic_object" = none ; then
  1621.             arg="$non_pic_object"
  1622.           fi
  1623.         fi
  1624.           else
  1625.         # Only an error if not doing a dry-run.
  1626.         if test -z "$run"; then
  1627.           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  1628.           exit $EXIT_FAILURE
  1629.         else
  1630.           # Dry-run case.
  1631.  
  1632.           # Extract subdirectory from the argument.
  1633.           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1634.           if test "X$xdir" = "X$arg"; then
  1635.             xdir=
  1636.           else
  1637.             xdir="$xdir/"
  1638.           fi
  1639.  
  1640.           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
  1641.           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
  1642.           libobjs="$libobjs $pic_object"
  1643.           non_pic_objects="$non_pic_objects $non_pic_object"
  1644.         fi
  1645.           fi
  1646.         done
  1647.       else
  1648.         $echo "$modename: link input file \`$save_arg' does not exist"
  1649.         exit $EXIT_FAILURE
  1650.       fi
  1651.       arg=$save_arg
  1652.       prev=
  1653.       continue
  1654.       ;;
  1655.     rpath | xrpath)
  1656.       # We need an absolute path.
  1657.       case $arg in
  1658.       [\\/]* | [A-Za-z]:[\\/]*) ;;
  1659.       *)
  1660.         $echo "$modename: only absolute run-paths are allowed" 1>&2
  1661.         exit $EXIT_FAILURE
  1662.         ;;
  1663.       esac
  1664.       if test "$prev" = rpath; then
  1665.         case "$rpath " in
  1666.         *" $arg "*) ;;
  1667.         *) rpath="$rpath $arg" ;;
  1668.         esac
  1669.       else
  1670.         case "$xrpath " in
  1671.         *" $arg "*) ;;
  1672.         *) xrpath="$xrpath $arg" ;;
  1673.         esac
  1674.       fi
  1675.       prev=
  1676.       continue
  1677.       ;;
  1678.     xcompiler)
  1679.       compiler_flags="$compiler_flags $qarg"
  1680.       prev=
  1681.       compile_command="$compile_command $qarg"
  1682.       finalize_command="$finalize_command $qarg"
  1683.       continue
  1684.       ;;
  1685.     xlinker)
  1686.       linker_flags="$linker_flags $qarg"
  1687.       compiler_flags="$compiler_flags $wl$qarg"
  1688.       prev=
  1689.       compile_command="$compile_command $wl$qarg"
  1690.       finalize_command="$finalize_command $wl$qarg"
  1691.       continue
  1692.       ;;
  1693.     xcclinker)
  1694.       linker_flags="$linker_flags $qarg"
  1695.       compiler_flags="$compiler_flags $qarg"
  1696.       prev=
  1697.       compile_command="$compile_command $qarg"
  1698.       finalize_command="$finalize_command $qarg"
  1699.       continue
  1700.       ;;
  1701.     shrext)
  1702.       shrext_cmds="$arg"
  1703.       prev=
  1704.       continue
  1705.       ;;
  1706.         darwin_framework)
  1707.       compiler_flags="$compiler_flags $arg"
  1708.       compile_command="$compile_command $arg"
  1709.       finalize_command="$finalize_command $arg"
  1710.       prev=
  1711.       continue
  1712.       ;;
  1713.     *)
  1714.       eval "$prev=\"\$arg\""
  1715.       prev=
  1716.       continue
  1717.       ;;
  1718.     esac
  1719.       fi # test -n "$prev"
  1720.  
  1721.       prevarg="$arg"
  1722.  
  1723.       case $arg in
  1724.       -all-static)
  1725.     if test -n "$link_static_flag"; then
  1726.       compile_command="$compile_command $link_static_flag"
  1727.       finalize_command="$finalize_command $link_static_flag"
  1728.     fi
  1729.     continue
  1730.     ;;
  1731.  
  1732.       -allow-undefined)
  1733.     # FIXME: remove this flag sometime in the future.
  1734.     $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
  1735.     continue
  1736.     ;;
  1737.  
  1738.      -avoid-version)
  1739.     avoid_version=yes
  1740.     continue
  1741.     ;;
  1742.  
  1743.      -dlopen)
  1744.     prev=dlfiles
  1745.     continue
  1746.     ;;
  1747.  
  1748.      -dlpreopen)
  1749.     prev=dlprefiles
  1750.     continue
  1751.     ;;
  1752.  
  1753.      -export-dynamic)
  1754.     export_dynamic=yes
  1755.     continue
  1756.     ;;
  1757.  
  1758.      -export-symbols | -export-symbols-regex)
  1759.     if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  1760.       $echo "$modename: more than one -exported-symbols argument is not allowed"
  1761.       exit $EXIT_FAILURE
  1762.     fi
  1763.     if test "X$arg" = "X-export-symbols"; then
  1764.       prev=expsyms
  1765.     else
  1766.       prev=expsyms_regex
  1767.     fi
  1768.     continue
  1769.     ;;
  1770.  
  1771.      -framework|-arch)
  1772.        prev=darwin_framework
  1773.        compiler_flags="$compiler_flags $arg"
  1774.     compile_command="$compile_command $arg"
  1775.     finalize_command="$finalize_command $arg"
  1776.        continue
  1777.        ;;
  1778.  
  1779.      -inst-prefix-dir)
  1780.     prev=inst_prefix
  1781.     continue
  1782.     ;;
  1783.  
  1784.      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
  1785.      # so, if we see these flags be careful not to treat them like -L
  1786.      -L[A-Z][A-Z]*:*)
  1787.     case $with_gcc/$host in
  1788.     no/*-*-irix* | /*-*-irix*)
  1789.       compile_command="$compile_command $arg"
  1790.       finalize_command="$finalize_command $arg"
  1791.       ;;
  1792.     esac
  1793.     continue
  1794.     ;;
  1795.  
  1796.      -L*)
  1797.     dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
  1798.     # We need an absolute path.
  1799.     case $dir in
  1800.     [\\/]* | [A-Za-z]:[\\/]*) ;;
  1801.     *)
  1802.       absdir=`cd "$dir" && pwd`
  1803.       if test -z "$absdir"; then
  1804.         $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
  1805.         exit $EXIT_FAILURE
  1806.       fi
  1807.       dir="$absdir"
  1808.       ;;
  1809.     esac
  1810.     case "$deplibs " in
  1811.     *" -L$dir "*) ;;
  1812.     *)
  1813.       deplibs="$deplibs -L$dir"
  1814.       lib_search_path="$lib_search_path $dir"
  1815.       ;;
  1816.     esac
  1817.     case $host in
  1818.     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1819.       case :$dllsearchpath: in
  1820.       *":$dir:"*) ;;
  1821.       *) dllsearchpath="$dllsearchpath:$dir";;
  1822.       esac
  1823.       ;;
  1824.     esac
  1825.     continue
  1826.     ;;
  1827.  
  1828.       -l*)
  1829.     if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
  1830.       case $host in
  1831.       *-*-cygwin* | *-*-pw32* | *-*-beos*)
  1832.         # These systems don't actually have a C or math library (as such)
  1833.         continue
  1834.         ;;
  1835.       *-*-mingw* | *-*-os2*)
  1836.         # These systems don't actually have a C library (as such)
  1837.         test "X$arg" = "X-lc" && continue
  1838.         ;;
  1839.       *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  1840.         # Do not include libc due to us having libc/libc_r.
  1841.         test "X$arg" = "X-lc" && continue
  1842.         ;;
  1843.       *-*-rhapsody* | *-*-darwin1.[012])
  1844.         # Rhapsody C and math libraries are in the System framework
  1845.         deplibs="$deplibs -framework System"
  1846.         continue
  1847.       esac
  1848.     elif test "X$arg" = "X-lc_r"; then
  1849.      case $host in
  1850.      *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  1851.        # Do not include libc_r directly, use -pthread flag.
  1852.        continue
  1853.        ;;
  1854.      esac
  1855.     fi
  1856.     deplibs="$deplibs $arg"
  1857.     continue
  1858.     ;;
  1859.  
  1860.       # Tru64 UNIX uses -model [arg] to determine the layout of C++
  1861.       # classes, name mangling, and exception handling.
  1862.       -model)
  1863.     compile_command="$compile_command $arg"
  1864.     compiler_flags="$compiler_flags $arg"
  1865.     finalize_command="$finalize_command $arg"
  1866.     prev=xcompiler
  1867.     continue
  1868.     ;;
  1869.  
  1870.      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
  1871.     compiler_flags="$compiler_flags $arg"
  1872.     compile_command="$compile_command $arg"
  1873.     finalize_command="$finalize_command $arg"
  1874.     continue
  1875.     ;;
  1876.  
  1877.       -module)
  1878.     module=yes
  1879.     continue
  1880.     ;;
  1881.  
  1882.       # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
  1883.       # -r[0-9][0-9]* specifies the processor on the SGI compiler
  1884.       # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
  1885.       # +DA*, +DD* enable 64-bit mode on the HP compiler
  1886.       # -q* pass through compiler args for the IBM compiler
  1887.       # -m* pass through architecture-specific compiler args for GCC
  1888.       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
  1889.  
  1890.     # Unknown arguments in both finalize_command and compile_command need
  1891.     # to be aesthetically quoted because they are evaled later.
  1892.     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1893.     case $arg in
  1894.     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
  1895.       arg="\"$arg\""
  1896.       ;;
  1897.     esac
  1898.         compile_command="$compile_command $arg"
  1899.         finalize_command="$finalize_command $arg"
  1900.         if test "$with_gcc" = "yes" ; then
  1901.           compiler_flags="$compiler_flags $arg"
  1902.         fi
  1903.         continue
  1904.         ;;
  1905.  
  1906.       -shrext)
  1907.     prev=shrext
  1908.     continue
  1909.     ;;
  1910.  
  1911.       -no-fast-install)
  1912.     fast_install=no
  1913.     continue
  1914.     ;;
  1915.  
  1916.       -no-install)
  1917.     case $host in
  1918.     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1919.       # The PATH hackery in wrapper scripts is required on Windows
  1920.       # in order for the loader to find any dlls it needs.
  1921.       $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
  1922.       $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
  1923.       fast_install=no
  1924.       ;;
  1925.     *) no_install=yes ;;
  1926.     esac
  1927.     continue
  1928.     ;;
  1929.  
  1930.       -no-undefined)
  1931.     allow_undefined=no
  1932.     continue
  1933.     ;;
  1934.  
  1935.       -objectlist)
  1936.     prev=objectlist
  1937.     continue
  1938.     ;;
  1939.  
  1940.       -o) prev=output ;;
  1941.  
  1942.       -precious-files-regex)
  1943.     prev=precious_regex
  1944.     continue
  1945.     ;;
  1946.  
  1947.       -release)
  1948.     prev=release
  1949.     continue
  1950.     ;;
  1951.  
  1952.       -rpath)
  1953.     prev=rpath
  1954.     continue
  1955.     ;;
  1956.  
  1957.       -R)
  1958.     prev=xrpath
  1959.     continue
  1960.     ;;
  1961.  
  1962.       -R*)
  1963.     dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  1964.     # We need an absolute path.
  1965.     case $dir in
  1966.     [\\/]* | [A-Za-z]:[\\/]*) ;;
  1967.     *)
  1968.       $echo "$modename: only absolute run-paths are allowed" 1>&2
  1969.       exit $EXIT_FAILURE
  1970.       ;;
  1971.     esac
  1972.     case "$xrpath " in
  1973.     *" $dir "*) ;;
  1974.     *) xrpath="$xrpath $dir" ;;
  1975.     esac
  1976.     continue
  1977.     ;;
  1978.  
  1979.       -static)
  1980.     # The effects of -static are defined in a previous loop.
  1981.     # We used to do the same as -all-static on platforms that
  1982.     # didn't have a PIC flag, but the assumption that the effects
  1983.     # would be equivalent was wrong.  It would break on at least
  1984.     # Digital Unix and AIX.
  1985.     continue
  1986.     ;;
  1987.  
  1988.       -thread-safe)
  1989.     thread_safe=yes
  1990.     continue
  1991.     ;;
  1992.  
  1993.       -version-info)
  1994.     prev=vinfo
  1995.     continue
  1996.     ;;
  1997.       -version-number)
  1998.     prev=vinfo
  1999.     vinfo_number=yes
  2000.     continue
  2001.     ;;
  2002.  
  2003.       -Wc,*)
  2004.     args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
  2005.     arg=
  2006.     save_ifs="$IFS"; IFS=','
  2007.     for flag in $args; do
  2008.       IFS="$save_ifs"
  2009.       case $flag in
  2010.         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
  2011.         flag="\"$flag\""
  2012.         ;;
  2013.       esac
  2014.       arg="$arg $wl$flag"
  2015.       compiler_flags="$compiler_flags $flag"
  2016.     done
  2017.     IFS="$save_ifs"
  2018.     arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
  2019.     ;;
  2020.  
  2021.       -Wl,*)
  2022.     args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
  2023.     arg=
  2024.     save_ifs="$IFS"; IFS=','
  2025.     for flag in $args; do
  2026.       IFS="$save_ifs"
  2027.       case $flag in
  2028.         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
  2029.         flag="\"$flag\""
  2030.         ;;
  2031.       esac
  2032.       arg="$arg $wl$flag"
  2033.       compiler_flags="$compiler_flags $wl$flag"
  2034.       linker_flags="$linker_flags $flag"
  2035.     done
  2036.     IFS="$save_ifs"
  2037.     arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
  2038.     ;;
  2039.  
  2040.       -Xcompiler)
  2041.     prev=xcompiler
  2042.     continue
  2043.     ;;
  2044.  
  2045.       -Xlinker)
  2046.     prev=xlinker
  2047.     continue
  2048.     ;;
  2049.  
  2050.       -XCClinker)
  2051.     prev=xcclinker
  2052.     continue
  2053.     ;;
  2054.  
  2055.       # Some other compiler flag.
  2056.       -* | +*)
  2057.     # Unknown arguments in both finalize_command and compile_command need
  2058.     # to be aesthetically quoted because they are evaled later.
  2059.     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  2060.     case $arg in
  2061.     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
  2062.       arg="\"$arg\""
  2063.       ;;
  2064.     esac
  2065.     ;;
  2066.  
  2067.       *.$objext)
  2068.     # A standard object.
  2069.     objs="$objs $arg"
  2070.     ;;
  2071.  
  2072.       *.lo)
  2073.     # A libtool-controlled object.
  2074.  
  2075.     # Check to see that this really is a libtool object.
  2076.     if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  2077.       pic_object=
  2078.       non_pic_object=
  2079.  
  2080.       # Read the .lo file
  2081.       # If there is no directory component, then add one.
  2082.       case $arg in
  2083.       */* | *\\*) . $arg ;;
  2084.       *) . ./$arg ;;
  2085.       esac
  2086.  
  2087.       if test -z "$pic_object" || \
  2088.          test -z "$non_pic_object" ||
  2089.          test "$pic_object" = none && \
  2090.          test "$non_pic_object" = none; then
  2091.         $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  2092.         exit $EXIT_FAILURE
  2093.       fi
  2094.  
  2095.       # Extract subdirectory from the argument.
  2096.       xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  2097.       if test "X$xdir" = "X$arg"; then
  2098.         xdir=
  2099.       else
  2100.         xdir="$xdir/"
  2101.       fi
  2102.  
  2103.       if test "$pic_object" != none; then
  2104.         # Prepend the subdirectory the object is found in.
  2105.         pic_object="$xdir$pic_object"
  2106.  
  2107.         if test "$prev" = dlfiles; then
  2108.           if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  2109.         dlfiles="$dlfiles $pic_object"
  2110.         prev=
  2111.         continue
  2112.           else
  2113.         # If libtool objects are unsupported, then we need to preload.
  2114.         prev=dlprefiles
  2115.           fi
  2116.         fi
  2117.  
  2118.         # CHECK ME:  I think I busted this.  -Ossama
  2119.         if test "$prev" = dlprefiles; then
  2120.           # Preload the old-style object.
  2121.           dlprefiles="$dlprefiles $pic_object"
  2122.           prev=
  2123.         fi
  2124.  
  2125.         # A PIC object.
  2126.         libobjs="$libobjs $pic_object"
  2127.         arg="$pic_object"
  2128.       fi
  2129.  
  2130.       # Non-PIC object.
  2131.       if test "$non_pic_object" != none; then
  2132.         # Prepend the subdirectory the object is found in.
  2133.         non_pic_object="$xdir$non_pic_object"
  2134.  
  2135.         # A standard non-PIC object
  2136.         non_pic_objects="$non_pic_objects $non_pic_object"
  2137.         if test -z "$pic_object" || test "$pic_object" = none ; then
  2138.           arg="$non_pic_object"
  2139.         fi
  2140.       fi
  2141.     else
  2142.       # Only an error if not doing a dry-run.
  2143.       if test -z "$run"; then
  2144.         $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  2145.         exit $EXIT_FAILURE
  2146.       else
  2147.         # Dry-run case.
  2148.  
  2149.         # Extract subdirectory from the argument.
  2150.         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  2151.         if test "X$xdir" = "X$arg"; then
  2152.           xdir=
  2153.         else
  2154.           xdir="$xdir/"
  2155.         fi
  2156.  
  2157.         pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
  2158.         non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
  2159.         libobjs="$libobjs $pic_object"
  2160.         non_pic_objects="$non_pic_objects $non_pic_object"
  2161.       fi
  2162.     fi
  2163.     ;;
  2164.  
  2165.       *.$libext)
  2166.     # An archive.
  2167.     deplibs="$deplibs $arg"
  2168.     old_deplibs="$old_deplibs $arg"
  2169.     continue
  2170.     ;;
  2171.  
  2172.       *.la)
  2173.     # A libtool-controlled library.
  2174.  
  2175.     if test "$prev" = dlfiles; then
  2176.       # This library was specified with -dlopen.
  2177.       dlfiles="$dlfiles $arg"
  2178.       prev=
  2179.     elif test "$prev" = dlprefiles; then
  2180.       # The library was specified with -dlpreopen.
  2181.       dlprefiles="$dlprefiles $arg"
  2182.       prev=
  2183.     else
  2184.       deplibs="$deplibs $arg"
  2185.     fi
  2186.     continue
  2187.     ;;
  2188.  
  2189.       # Some other compiler argument.
  2190.       *)
  2191.     # Unknown arguments in both finalize_command and compile_command need
  2192.     # to be aesthetically quoted because they are evaled later.
  2193.     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  2194.     case $arg in
  2195.     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
  2196.       arg="\"$arg\""
  2197.       ;;
  2198.     esac
  2199.     ;;
  2200.       esac # arg
  2201.  
  2202.       # Now actually substitute the argument into the commands.
  2203.       if test -n "$arg"; then
  2204.     compile_command="$compile_command $arg"
  2205.     finalize_command="$finalize_command $arg"
  2206.       fi
  2207.     done # argument parsing loop
  2208.  
  2209.     if test -n "$prev"; then
  2210.       $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
  2211.      $echo "$help" 1>&2
  2212.      exit $EXIT_FAILURE
  2213.    fi
  2214.  
  2215.    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  2216.      eval arg=\"$export_dynamic_flag_spec\"
  2217.      compile_command="$compile_command $arg"
  2218.      finalize_command="$finalize_command $arg"
  2219.    fi
  2220.  
  2221.    oldlibs=
  2222.    # calculate the name of the file, without its directory
  2223.    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
  2224.    libobjs_save="$libobjs"
  2225.  
  2226.    if test -n "$shlibpath_var"; then
  2227.      # get the directories listed in $shlibpath_var
  2228.      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
  2229.    else
  2230.      shlib_search_path=
  2231.    fi
  2232.    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
  2233.    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
  2234.  
  2235.    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
  2236.    if test "X$output_objdir" = "X$output"; then
  2237.      output_objdir="$objdir"
  2238.    else
  2239.      output_objdir="$output_objdir/$objdir"
  2240.    fi
  2241.    # Create the object directory.
  2242.    if test ! -d "$output_objdir"; then
  2243.      $show "$mkdir $output_objdir"
  2244.      $run $mkdir $output_objdir
  2245.      status=$?
  2246.      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
  2247.     exit $status
  2248.      fi
  2249.    fi
  2250.  
  2251.    # Determine the type of output
  2252.    case $output in
  2253.    "")
  2254.      $echo "$modename: you must specify an output file" 1>&2
  2255.      $echo "$help" 1>&2
  2256.      exit $EXIT_FAILURE
  2257.      ;;
  2258.    *.$libext) linkmode=oldlib ;;
  2259.    *.lo | *.$objext) linkmode=obj ;;
  2260.    *.la) linkmode=lib ;;
  2261.    *) linkmode=prog ;; # Anything else should be a program.
  2262.    esac
  2263.  
  2264.    case $host in
  2265.    *cygwin* | *mingw* | *pw32*)
  2266.      # don't eliminate duplications in $postdeps and $predeps
  2267.      duplicate_compiler_generated_deps=yes
  2268.      ;;
  2269.    *)
  2270.      duplicate_compiler_generated_deps=$duplicate_deps
  2271.      ;;
  2272.    esac
  2273.    specialdeplibs=
  2274.  
  2275.    libs=
  2276.    # Find all interdependent deplibs by searching for libraries
  2277.    # that are linked more than once (e.g. -la -lb -la)
  2278.  
  2279.    echo MQ ....... $deplibs
  2280.  
  2281.    for deplib in $deplibs; do
  2282.      if test "X$duplicate_deps" = "Xyes" ; then
  2283.     case "$libs " in
  2284.     *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  2285.     esac
  2286.      fi
  2287.      libs="$libs $deplib"
  2288.    done
  2289.  
  2290.    if test "$linkmode" = lib; then
  2291.      libs="$predeps $libs $compiler_lib_search_path $postdeps"
  2292.  
  2293.      # Compute libraries that are listed more than once in $predeps
  2294.      # $postdeps and mark them as special (i.e., whose duplicates are
  2295.      # not to be eliminated).
  2296.      pre_post_deps=
  2297.      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
  2298.     for pre_post_dep in $predeps $postdeps; do
  2299.       case "$pre_post_deps " in
  2300.       *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
  2301.       esac
  2302.       pre_post_deps="$pre_post_deps $pre_post_dep"
  2303.     done
  2304.      fi
  2305.      pre_post_deps=
  2306.    fi
  2307.  
  2308.    deplibs=
  2309.    newdependency_libs=
  2310.    newlib_search_path=
  2311.    need_relink=no # whether we're linking any uninstalled libtool libraries
  2312.    notinst_deplibs= # not-installed libtool libraries
  2313.    notinst_path= # paths that contain not-installed libtool libraries
  2314.    case $linkmode in
  2315.    lib)
  2316.     passes="conv link"
  2317.     for file in $dlfiles $dlprefiles; do
  2318.       case $file in
  2319.       *.la) ;;
  2320.       *)
  2321.         $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
  2322.         exit $EXIT_FAILURE
  2323.         ;;
  2324.       esac
  2325.     done
  2326.     ;;
  2327.     prog)
  2328.     compile_deplibs=
  2329.     finalize_deplibs=
  2330.     alldeplibs=no
  2331.     newdlfiles=
  2332.     newdlprefiles=
  2333.     passes="conv scan dlopen dlpreopen link"
  2334.     ;;
  2335.     *)  passes="conv"
  2336.     ;;
  2337.     esac
  2338.  
  2339.     for pass in $passes; do
  2340.       if test "$linkmode,$pass" = "lib,link" ||
  2341.      test "$linkmode,$pass" = "prog,scan"; then
  2342.     libs="$deplibs"
  2343.     deplibs=
  2344.       fi
  2345.       if test "$linkmode" = prog; then
  2346.     case $pass in
  2347.     dlopen) libs="$dlfiles" ;;
  2348.     dlpreopen) libs="$dlprefiles" ;;
  2349.     link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
  2350.     esac
  2351.       fi
  2352.       if test "$pass" = dlopen; then
  2353.     # Collect dlpreopened libraries
  2354.     save_deplibs="$deplibs"
  2355.     deplibs=
  2356.       fi
  2357.       for deplib in $libs; do
  2358.     lib=
  2359.     found=no
  2360.  
  2361.         echo MQ ///// $deplib
  2362.  
  2363.     case $deplib in
  2364.     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
  2365.       if test "$linkmode,$pass" = "prog,link"; then
  2366.         compile_deplibs="$deplib $compile_deplibs"
  2367.         finalize_deplibs="$deplib $finalize_deplibs"
  2368.       else
  2369.         compiler_flags="$compiler_flags $deplib"
  2370.       fi
  2371.       continue
  2372.       ;;
  2373.     -l*)
  2374.       if test "$linkmode" != lib && test "$linkmode" != prog; then
  2375.         $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
  2376.         continue
  2377.       fi
  2378.       name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
  2379.       for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
  2380.         for search_ext in .la $std_shrext .so .a; do
  2381.           # Search the libtool library
  2382.           lib="$searchdir/lib${name}${search_ext}"
  2383.           if test -f "$lib"; then
  2384.         if test "$search_ext" = ".la"; then
  2385.           found=yes
  2386.         else
  2387.           found=no
  2388.         fi
  2389.         break 2
  2390.           fi
  2391.         done
  2392.       done
  2393.       if test "$found" != yes; then
  2394.         # deplib doesn't seem to be a libtool library
  2395.         if test "$linkmode,$pass" = "prog,link"; then
  2396.           compile_deplibs="$deplib $compile_deplibs"
  2397.           finalize_deplibs="$deplib $finalize_deplibs"
  2398.         else
  2399.           deplibs="$deplib $deplibs"
  2400.           test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
  2401.         fi
  2402.         continue
  2403.       else # deplib is a libtool library
  2404.         # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
  2405.         # We need to do some special things here, and not later.
  2406.         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  2407.           case " $predeps $postdeps " in
  2408.           *" $deplib "*)
  2409.         if (${SED} -e '2q' $lib |
  2410.                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  2411.           library_names=
  2412.           old_library=
  2413.           case $lib in
  2414.           */* | *\\*) . $lib ;;
  2415.           *) . ./$lib ;;
  2416.           esac
  2417.           for l in $old_library $library_names; do
  2418.             ll="$l"
  2419.           done
  2420.           if test "X$ll" = "X$old_library" ; then # only static version available
  2421.             found=no
  2422.             ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
  2423.             test "X$ladir" = "X$lib" && ladir="."
  2424.             lib=$ladir/$old_library
  2425.             if test "$linkmode,$pass" = "prog,link"; then
  2426.               compile_deplibs="$deplib $compile_deplibs"
  2427.               finalize_deplibs="$deplib $finalize_deplibs"
  2428.             else
  2429.               deplibs="$deplib $deplibs"
  2430.               test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
  2431.             fi
  2432.             continue
  2433.           fi
  2434.         fi
  2435.             ;;
  2436.           *) ;;
  2437.           esac
  2438.         fi
  2439.       fi
  2440.       ;; # -l
  2441.     -L*)
  2442.       case $linkmode in
  2443.       lib)
  2444.         deplibs="$deplib $deplibs"
  2445.         test "$pass" = conv && continue
  2446.         newdependency_libs="$deplib $newdependency_libs"
  2447.         newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  2448.         ;;
  2449.       prog)
  2450.         if test "$pass" = conv; then
  2451.           deplibs="$deplib $deplibs"
  2452.           continue
  2453.         fi
  2454.         if test "$pass" = scan; then
  2455.           deplibs="$deplib $deplibs"
  2456.         else
  2457.           compile_deplibs="$deplib $compile_deplibs"
  2458.           finalize_deplibs="$deplib $finalize_deplibs"
  2459.         fi
  2460.         newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  2461.         ;;
  2462.       *)
  2463.         $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
  2464.         ;;
  2465.       esac # linkmode
  2466.       continue
  2467.       ;; # -L
  2468.     -R*)
  2469.       if test "$pass" = link; then
  2470.         dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
  2471.         # Make sure the xrpath contains only unique directories.
  2472.         case "$xrpath " in
  2473.         *" $dir "*) ;;
  2474.         *) xrpath="$xrpath $dir" ;;
  2475.         esac
  2476.       fi
  2477.       deplibs="$deplib $deplibs"
  2478.       continue
  2479.       ;;
  2480.     *.la) lib="$deplib" ;;
  2481.     *.$libext)
  2482.       if test "$pass" = conv; then
  2483.         deplibs="$deplib $deplibs"
  2484.         continue
  2485.       fi
  2486.       case $linkmode in
  2487.       lib)
  2488.         valid_a_lib=no
  2489.         case $deplibs_check_method in
  2490.           match_pattern*)
  2491.         set dummy $deplibs_check_method
  2492.             match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  2493.         if eval $echo \"$deplib\" 2>/dev/null \
  2494.             | $SED 10q \
  2495.             | $EGREP "$match_pattern_regex" > /dev/null; then
  2496.           valid_a_lib=yes
  2497.         fi
  2498.         ;;
  2499.           pass_all)
  2500.         valid_a_lib=yes
  2501.         ;;
  2502.             esac
  2503.         if test "$valid_a_lib" != yes; then
  2504.           $echo
  2505.           $echo "*** Warning: Trying to link with static lib archive $deplib."
  2506.           $echo "*** I have the capability to make that library automatically link in when"
  2507.           $echo "*** you link to this library.  But I can only do this if you have a"
  2508.           $echo "*** shared version of the library, which you do not appear to have"
  2509.           $echo "*** because the file extensions .$libext of this argument makes me believe"
  2510.           $echo "*** that it is just a static archive that I should not used here."
  2511.         else
  2512.           $echo
  2513.           $echo "*** Warning: Linking the shared library $output against the"
  2514.           $echo "*** static library $deplib is not portable!"
  2515.           deplibs="$deplib $deplibs"
  2516.         fi
  2517.         continue
  2518.         ;;
  2519.       prog)
  2520.         if test "$pass" != link; then
  2521.           deplibs="$deplib $deplibs"
  2522.         else
  2523.           compile_deplibs="$deplib $compile_deplibs"
  2524.           finalize_deplibs="$deplib $finalize_deplibs"
  2525.         fi
  2526.         continue
  2527.         ;;
  2528.       esac # linkmode
  2529.       ;; # *.$libext
  2530.     *.lo | *.$objext)
  2531.       if test "$pass" = conv; then
  2532.         deplibs="$deplib $deplibs"
  2533.       elif test "$linkmode" = prog; then
  2534.         if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
  2535.           # If there is no dlopen support or we're linking statically,
  2536.           # we need to preload.
  2537.           newdlprefiles="$newdlprefiles $deplib"
  2538.           compile_deplibs="$deplib $compile_deplibs"
  2539.           finalize_deplibs="$deplib $finalize_deplibs"
  2540.         else
  2541.           newdlfiles="$newdlfiles $deplib"
  2542.         fi
  2543.       fi
  2544.       continue
  2545.       ;;
  2546.     %DEPLIBS%)
  2547.       alldeplibs=yes
  2548.       continue
  2549.       ;;
  2550.     esac # case $deplib
  2551.  
  2552.     if test "$found" = yes || test -f "$lib"; then :
  2553.     else
  2554.       $echo "$modename: cannot find the library \`$lib'" 1>&2
  2555.       exit $EXIT_FAILURE
  2556.     fi
  2557.  
  2558.     # Check to see that this really is a libtool archive.
  2559.     if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  2560.     else
  2561.       $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  2562.       exit $EXIT_FAILURE
  2563.     fi
  2564.  
  2565.     ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
  2566.     test "X$ladir" = "X$lib" && ladir="."
  2567.  
  2568.     dlname=
  2569.     dlopen=
  2570.     dlpreopen=
  2571.     libdir=
  2572.     library_names=
  2573.     old_library=
  2574.     # If the library was installed with an old release of libtool,
  2575.     # it will not redefine variables installed, or shouldnotlink
  2576.     installed=yes
  2577.     shouldnotlink=no
  2578.     avoidtemprpath=
  2579.  
  2580.  
  2581.     # Read the .la file
  2582.     case $lib in
  2583.     */* | *\\*) . $lib ;;
  2584.     *) . ./$lib ;;
  2585.     esac
  2586.  
  2587.     if test "$linkmode,$pass" = "lib,link" ||
  2588.        test "$linkmode,$pass" = "prog,scan" ||
  2589.        { test "$linkmode" != prog && test "$linkmode" != lib; }; then
  2590.       test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
  2591.       test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
  2592.     fi
  2593.  
  2594.     if test "$pass" = conv; then
  2595.       # Only check for convenience libraries
  2596.       deplibs="$lib $deplibs"
  2597.       if test -z "$libdir"; then
  2598.         if test -z "$old_library"; then
  2599.           $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  2600.           exit $EXIT_FAILURE
  2601.         fi
  2602.         # It is a libtool convenience library, so add in its objects.
  2603.         convenience="$convenience $ladir/$objdir/$old_library"
  2604.         old_convenience="$old_convenience $ladir/$objdir/$old_library"
  2605.         tmp_libs=
  2606.         for deplib in $dependency_libs; do
  2607.           deplibs="$deplib $deplibs"
  2608.              if test "X$duplicate_deps" = "Xyes" ; then
  2609.             case "$tmp_libs " in
  2610.             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  2611.             esac
  2612.              fi
  2613.           tmp_libs="$tmp_libs $deplib"
  2614.         done
  2615.       elif test "$linkmode" != prog && test "$linkmode" != lib; then
  2616.         $echo "$modename: \`$lib' is not a convenience library" 1>&2
  2617.         exit $EXIT_FAILURE
  2618.       fi
  2619.       continue
  2620.     fi # $pass = conv
  2621.  
  2622.  
  2623.     # Get the name of the library we link against.
  2624.     linklib=
  2625.     for l in $old_library $library_names; do
  2626.       linklib="$l"
  2627.     done
  2628.     if test -z "$linklib"; then
  2629.       $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  2630.       exit $EXIT_FAILURE
  2631.     fi
  2632.  
  2633.     # This library was specified with -dlopen.
  2634.     if test "$pass" = dlopen; then
  2635.       if test -z "$libdir"; then
  2636.         $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
  2637.         exit $EXIT_FAILURE
  2638.       fi
  2639.       if test -z "$dlname" ||
  2640.          test "$dlopen_support" != yes ||
  2641.          test "$build_libtool_libs" = no; then
  2642.         # If there is no dlname, no dlopen support or we're linking
  2643.         # statically, we need to preload.  We also need to preload any
  2644.         # dependent libraries so libltdl's deplib preloader doesn't
  2645.         # bomb out in the load deplibs phase.
  2646.         dlprefiles="$dlprefiles $lib $dependency_libs"
  2647.       else
  2648.         newdlfiles="$newdlfiles $lib"
  2649.       fi
  2650.       continue
  2651.     fi # $pass = dlopen
  2652.  
  2653.     # We need an absolute path.
  2654.     case $ladir in
  2655.     [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
  2656.     *)
  2657.       abs_ladir=`cd "$ladir" && pwd`
  2658.       if test -z "$abs_ladir"; then
  2659.         $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
  2660.         $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  2661.         abs_ladir="$ladir"
  2662.       fi
  2663.       ;;
  2664.     esac
  2665.     laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  2666.  
  2667.     # Find the relevant object directory and library name.
  2668.     if test "X$installed" = Xyes; then
  2669.       if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
  2670.         $echo "$modename: warning: library \`$lib' was moved." 1>&2
  2671.         dir="$ladir"
  2672.         absdir="$abs_ladir"
  2673.         libdir="$abs_ladir"
  2674.       else
  2675.         dir="$libdir"
  2676.         absdir="$libdir"
  2677.       fi
  2678.       test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  2679.     else
  2680.       if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
  2681.         dir="$ladir"
  2682.         absdir="$abs_ladir"
  2683.         # Remove this search path later
  2684.         notinst_path="$notinst_path $abs_ladir"
  2685.       else
  2686.         dir="$ladir/$objdir"
  2687.         absdir="$abs_ladir/$objdir"
  2688.         # Remove this search path later
  2689.         notinst_path="$notinst_path $abs_ladir"
  2690.       fi
  2691.     fi # $installed = yes
  2692.     name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  2693.  
  2694.     # This library was specified with -dlpreopen.
  2695.     if test "$pass" = dlpreopen; then
  2696.       if test -z "$libdir"; then
  2697.         $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
  2698.         exit $EXIT_FAILURE
  2699.       fi
  2700.       # Prefer using a static library (so that no silly _DYNAMIC symbols
  2701.       # are required to link).
  2702.       if test -n "$old_library"; then
  2703.         newdlprefiles="$newdlprefiles $dir/$old_library"
  2704.       # Otherwise, use the dlname, so that lt_dlopen finds it.
  2705.       elif test -n "$dlname"; then
  2706.         newdlprefiles="$newdlprefiles $dir/$dlname"
  2707.       else
  2708.         newdlprefiles="$newdlprefiles $dir/$linklib"
  2709.       fi
  2710.     fi # $pass = dlpreopen
  2711.  
  2712.     if test -z "$libdir"; then
  2713.       # Link the convenience library
  2714.       if test "$linkmode" = lib; then
  2715.         deplibs="$dir/$old_library $deplibs"
  2716.       elif test "$linkmode,$pass" = "prog,link"; then
  2717.         compile_deplibs="$dir/$old_library $compile_deplibs"
  2718.         finalize_deplibs="$dir/$old_library $finalize_deplibs"
  2719.       else
  2720.         deplibs="$lib $deplibs" # used for prog,scan pass
  2721.       fi
  2722.       continue
  2723.     fi
  2724.  
  2725.  
  2726.     if test "$linkmode" = prog && test "$pass" != link; then
  2727.       newlib_search_path="$newlib_search_path $ladir"
  2728.       deplibs="$lib $deplibs"
  2729.  
  2730.       linkalldeplibs=no
  2731.       if test "$link_all_deplibs" != no || test -z "$library_names" ||
  2732.          test "$build_libtool_libs" = no; then
  2733.         linkalldeplibs=yes
  2734.       fi
  2735.  
  2736.       tmp_libs=
  2737.       for deplib in $dependency_libs; do
  2738.         case $deplib in
  2739.         -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
  2740.         esac
  2741.         # Need to link against all dependency_libs?
  2742.         if test "$linkalldeplibs" = yes; then
  2743.           deplibs="$deplib $deplibs"
  2744.         else
  2745.           # Need to hardcode shared library paths
  2746.           # or/and link against static libraries
  2747.           newdependency_libs="$deplib $newdependency_libs"
  2748.         fi
  2749.         if test "X$duplicate_deps" = "Xyes" ; then
  2750.           case "$tmp_libs " in
  2751.           *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  2752.           esac
  2753.         fi
  2754.         tmp_libs="$tmp_libs $deplib"
  2755.       done # for deplib
  2756.       continue
  2757.     fi # $linkmode = prog...
  2758.  
  2759.     if test "$linkmode,$pass" = "prog,link"; then
  2760.       if test -n "$library_names" &&
  2761.          { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2762.         # We need to hardcode the library path
  2763.         if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
  2764.           # Make sure the rpath contains only unique directories.
  2765.           case "$temp_rpath " in
  2766.           *" $dir "*) ;;
  2767.           *" $absdir "*) ;;
  2768.           *) temp_rpath="$temp_rpath $absdir" ;;
  2769.           esac
  2770.         fi
  2771.  
  2772.         # Hardcode the library path.
  2773.         # Skip directories that are in the system default run-time
  2774.         # search path.
  2775.         case " $sys_lib_dlsearch_path " in
  2776.         *" $absdir "*) ;;
  2777.         *)
  2778.           case "$compile_rpath " in
  2779.           *" $absdir "*) ;;
  2780.           *) compile_rpath="$compile_rpath $absdir"
  2781.           esac
  2782.           ;;
  2783.         esac
  2784.         case " $sys_lib_dlsearch_path " in
  2785.         *" $libdir "*) ;;
  2786.         *)
  2787.           case "$finalize_rpath " in
  2788.           *" $libdir "*) ;;
  2789.           *) finalize_rpath="$finalize_rpath $libdir"
  2790.           esac
  2791.           ;;
  2792.         esac
  2793.       fi # $linkmode,$pass = prog,link...
  2794.  
  2795.       if test "$alldeplibs" = yes &&
  2796.          { test "$deplibs_check_method" = pass_all ||
  2797.            { test "$build_libtool_libs" = yes &&
  2798.          test -n "$library_names"; }; }; then
  2799.         # We only need to search for static libraries
  2800.         continue
  2801.       fi
  2802.     fi
  2803.  
  2804.     link_static=no # Whether the deplib will be linked statically
  2805.     if test -n "$library_names" &&
  2806.        { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2807.       if test "$installed" = no; then
  2808.         notinst_deplibs="$notinst_deplibs $lib"
  2809.         need_relink=yes
  2810.       fi
  2811.       # This is a shared library
  2812.  
  2813.       # Warn about portability, can't link against -module's on
  2814.       # some systems (darwin)
  2815.       if test "$shouldnotlink" = yes && test "$pass" = link ; then
  2816.         $echo
  2817.         if test "$linkmode" = prog; then
  2818.           $echo "*** Warning: Linking the executable $output against the loadable module"
  2819.         else
  2820.           $echo "*** Warning: Linking the shared library $output against the loadable module"
  2821.         fi
  2822.         $echo "*** $linklib is not portable!"
  2823.       fi
  2824.       if test "$linkmode" = lib &&
  2825.          test "$hardcode_into_libs" = yes; then
  2826.         # Hardcode the library path.
  2827.         # Skip directories that are in the system default run-time
  2828.         # search path.
  2829.         case " $sys_lib_dlsearch_path " in
  2830.         *" $absdir "*) ;;
  2831.         *)
  2832.           case "$compile_rpath " in
  2833.           *" $absdir "*) ;;
  2834.           *) compile_rpath="$compile_rpath $absdir"
  2835.           esac
  2836.           ;;
  2837.         esac
  2838.         case " $sys_lib_dlsearch_path " in
  2839.         *" $libdir "*) ;;
  2840.         *)
  2841.           case "$finalize_rpath " in
  2842.           *" $libdir "*) ;;
  2843.           *) finalize_rpath="$finalize_rpath $libdir"
  2844.           esac
  2845.           ;;
  2846.         esac
  2847.       fi
  2848.  
  2849.       if test -n "$old_archive_from_expsyms_cmds"; then
  2850.         # figure out the soname
  2851.         set dummy $library_names
  2852.         realname="$2"
  2853.         shift; shift
  2854.         libname=`eval \\$echo \"$libname_spec\"`
  2855.         # use dlname if we got it. it's perfectly good, no?
  2856.         if test -n "$dlname"; then
  2857.           soname="$dlname"
  2858.         elif test -n "$soname_spec"; then
  2859.           # bleh windows
  2860.           case $host in
  2861.           *cygwin* | mingw*)
  2862.         major=`expr $current - $age`
  2863.         versuffix="-$major"
  2864.         ;;
  2865.           esac
  2866.           eval soname=\"$soname_spec\"
  2867.         else
  2868.           soname="$realname"
  2869.         fi
  2870.  
  2871.         # Make a new name for the extract_expsyms_cmds to use
  2872.         soroot="$soname"
  2873.         soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
  2874.         newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
  2875.  
  2876.         # If the library has no export list, then create one now
  2877.         if test -f "$output_objdir/$soname-def"; then :
  2878.         else
  2879.           $show "extracting exported symbol list from \`$soname'"
  2880.           save_ifs="$IFS"; IFS='~'
  2881.           cmds=$extract_expsyms_cmds
  2882.           for cmd in $cmds; do
  2883.         IFS="$save_ifs"
  2884.         eval cmd=\"$cmd\"
  2885.         $show "$cmd"
  2886.         $run eval "$cmd" || exit $?
  2887.           done
  2888.           IFS="$save_ifs"
  2889.         fi
  2890.  
  2891.         # Create $newlib
  2892.         if test -f "$output_objdir/$newlib"; then :; else
  2893.           $show "generating import library for \`$soname'"
  2894.           save_ifs="$IFS"; IFS='~'
  2895.           cmds=$old_archive_from_expsyms_cmds
  2896.           for cmd in $cmds; do
  2897.         IFS="$save_ifs"
  2898.         eval cmd=\"$cmd\"
  2899.         $show "$cmd"
  2900.         $run eval "$cmd" || exit $?
  2901.           done
  2902.           IFS="$save_ifs"
  2903.         fi
  2904.         # make sure the library variables are pointing to the new library
  2905.         dir=$output_objdir
  2906.         linklib=$newlib
  2907.       fi # test -n "$old_archive_from_expsyms_cmds"
  2908.  
  2909.       if test "$linkmode" = prog || test "$mode" != relink; then
  2910.         add_shlibpath=
  2911.         add_dir=
  2912.         add=
  2913.         lib_linked=yes
  2914.         case $hardcode_action in
  2915.         immediate | unsupported)
  2916.           if test "$hardcode_direct" = no; then
  2917.         add="$dir/$linklib"
  2918.         case $host in
  2919.           *-*-sco3.2v5* ) add_dir="-L$dir" ;;
  2920.           *-*-darwin* )
  2921.             # if the lib is a module then we can not link against
  2922.             # it, someone is ignoring the new warnings I added
  2923.             if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
  2924.               $echo "** Warning, lib $linklib is a module, not a shared library"
  2925.               if test -z "$old_library" ; then
  2926.                 $echo
  2927.                 $echo "** And there doesn't seem to be a static archive available"
  2928.                 $echo "** The link will probably fail, sorry"
  2929.               else
  2930.                 add="$dir/$old_library"
  2931.               fi
  2932.             fi
  2933.         esac
  2934.           elif test "$hardcode_minus_L" = no; then
  2935.         case $host in
  2936.         *-*-sunos*) add_shlibpath="$dir" ;;
  2937.         esac
  2938.         add_dir="-L$dir"
  2939.         add="-l$name"
  2940.           elif test "$hardcode_shlibpath_var" = no; then
  2941.         add_shlibpath="$dir"
  2942.         add="-l$name"
  2943.           else
  2944.         lib_linked=no
  2945.           fi
  2946.           ;;
  2947.         relink)
  2948.           if test "$hardcode_direct" = yes; then
  2949.         add="$dir/$linklib"
  2950.           elif test "$hardcode_minus_L" = yes; then
  2951.         add_dir="-L$dir"
  2952.         # Try looking first in the location we're being installed to.
  2953.         if test -n "$inst_prefix_dir"; then
  2954.           case $libdir in
  2955.             [\\/]*)
  2956.               add_dir="$add_dir -L$inst_prefix_dir$libdir"
  2957.               ;;
  2958.           esac
  2959.         fi
  2960.         add="-l$name"
  2961.           elif test "$hardcode_shlibpath_var" = yes; then
  2962.         add_shlibpath="$dir"
  2963.         add="-l$name"
  2964.           else
  2965.         lib_linked=no
  2966.           fi
  2967.           ;;
  2968.         *) lib_linked=no ;;
  2969.         esac
  2970.  
  2971.         if test "$lib_linked" != yes; then
  2972.           $echo "$modename: configuration error: unsupported hardcode properties"
  2973.           exit $EXIT_FAILURE
  2974.         fi
  2975.  
  2976.         if test -n "$add_shlibpath"; then
  2977.           case :$compile_shlibpath: in
  2978.           *":$add_shlibpath:"*) ;;
  2979.           *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
  2980.           esac
  2981.         fi
  2982.         if test "$linkmode" = prog; then
  2983.           test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
  2984.           test -n "$add" && compile_deplibs="$add $compile_deplibs"
  2985.         else
  2986.           test -n "$add_dir" && deplibs="$add_dir $deplibs"
  2987.           test -n "$add" && deplibs="$add $deplibs"
  2988.           if test "$hardcode_direct" != yes && \
  2989.          test "$hardcode_minus_L" != yes && \
  2990.          test "$hardcode_shlibpath_var" = yes; then
  2991.         case :$finalize_shlibpath: in
  2992.         *":$libdir:"*) ;;
  2993.         *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  2994.         esac
  2995.           fi
  2996.         fi
  2997.       fi
  2998.  
  2999.       if test "$linkmode" = prog || test "$mode" = relink; then
  3000.         add_shlibpath=
  3001.         add_dir=
  3002.         add=
  3003.         # Finalize command for both is simple: just hardcode it.
  3004.         if test "$hardcode_direct" = yes; then
  3005.           add="$libdir/$linklib"
  3006.         elif test "$hardcode_minus_L" = yes; then
  3007.           add_dir="-L$libdir"
  3008.           add="-l$name"
  3009.         elif test "$hardcode_shlibpath_var" = yes; then
  3010.           case :$finalize_shlibpath: in
  3011.           *":$libdir:"*) ;;
  3012.           *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  3013.           esac
  3014.           add="-l$name"
  3015.         elif test "$hardcode_automatic" = yes; then
  3016.           if test -n "$inst_prefix_dir" &&
  3017.          test -f "$inst_prefix_dir$libdir/$linklib" ; then
  3018.             add="$inst_prefix_dir$libdir/$linklib"
  3019.           else
  3020.             add="$libdir/$linklib"
  3021.           fi
  3022.         else
  3023.           # We cannot seem to hardcode it, guess we'll fake it.
  3024.           add_dir="-L$libdir"
  3025.           # Try looking first in the location we're being installed to.
  3026.           if test -n "$inst_prefix_dir"; then
  3027.         case $libdir in
  3028.           [\\/]*)
  3029.             add_dir="$add_dir -L$inst_prefix_dir$libdir"
  3030.             ;;
  3031.         esac
  3032.           fi
  3033.           add="-l$name"
  3034.         fi
  3035.  
  3036.         if test "$linkmode" = prog; then
  3037.           test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
  3038.           test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
  3039.         else
  3040.           test -n "$add_dir" && deplibs="$add_dir $deplibs"
  3041.           test -n "$add" && deplibs="$add $deplibs"
  3042.         fi
  3043.       fi
  3044.     elif test "$linkmode" = prog; then
  3045.       # Here we assume that one of hardcode_direct or hardcode_minus_L
  3046.       # is not unsupported.  This is valid on all known static and
  3047.       # shared platforms.
  3048.       if test "$hardcode_direct" != unsupported; then
  3049.         test -n "$old_library" && linklib="$old_library"
  3050.         compile_deplibs="$dir/$linklib $compile_deplibs"
  3051.         finalize_deplibs="$dir/$linklib $finalize_deplibs"
  3052.       else
  3053.         compile_deplibs="-l$name -L$dir $compile_deplibs"
  3054.         finalize_deplibs="-l$name -L$dir $finalize_deplibs"
  3055.       fi
  3056.     elif test "$build_libtool_libs" = yes; then
  3057.       # Not a shared library
  3058.       if test "$deplibs_check_method" != pass_all; then
  3059.         # We're trying link a shared library against a static one
  3060.         # but the system doesn't support it.
  3061.  
  3062.         # Just print a warning and add the library to dependency_libs so
  3063.         # that the program can be linked against the static library.
  3064.         $echo
  3065.         $echo "*** Warning: This system can not link to static lib archive $lib."
  3066.         $echo "*** I have the capability to make that library automatically link in when"
  3067.         $echo "*** you link to this library.  But I can only do this if you have a"
  3068.         $echo "*** shared version of the library, which you do not appear to have."
  3069.         if test "$module" = yes; then
  3070.           $echo "*** But as you try to build a module library, libtool will still create "
  3071.           $echo "*** a static module, that should work as long as the dlopening application"
  3072.           $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
  3073.           if test -z "$global_symbol_pipe"; then
  3074.         $echo
  3075.         $echo "*** However, this would only work if libtool was able to extract symbol"
  3076.         $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
  3077.         $echo "*** not find such a program.  So, this module is probably useless."
  3078.         $echo "*** \`nm' from GNU binutils and a full rebuild may help."
  3079.           fi
  3080.           if test "$build_old_libs" = no; then
  3081.         build_libtool_libs=module
  3082.         build_old_libs=yes
  3083.           else
  3084.         build_libtool_libs=no
  3085.           fi
  3086.         fi
  3087.       else
  3088.         deplibs="$dir/$old_library $deplibs"
  3089.         link_static=yes
  3090.       fi
  3091.     fi # link shared/static library?
  3092.  
  3093.     if test "$linkmode" = lib; then
  3094.       if test -n "$dependency_libs" &&
  3095.          { test "$hardcode_into_libs" != yes ||
  3096.            test "$build_old_libs" = yes ||
  3097.            test "$link_static" = yes; }; then
  3098.         # Extract -R from dependency_libs
  3099.         temp_deplibs=
  3100.         for libdir in $dependency_libs; do
  3101.           case $libdir in
  3102.           -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
  3103.            case " $xrpath " in
  3104.            *" $temp_xrpath "*) ;;
  3105.            *) xrpath="$xrpath $temp_xrpath";;
  3106.            esac;;
  3107.           *) temp_deplibs="$temp_deplibs $libdir";;
  3108.           esac
  3109.         done
  3110.         dependency_libs="$temp_deplibs"
  3111.       fi
  3112.  
  3113.       newlib_search_path="$newlib_search_path $absdir"
  3114.       # Link against this library
  3115.       test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
  3116.       # ... and its dependency_libs
  3117.       tmp_libs=
  3118.       for deplib in $dependency_libs; do
  3119.         newdependency_libs="$deplib $newdependency_libs"
  3120.         if test "X$duplicate_deps" = "Xyes" ; then
  3121.           case "$tmp_libs " in
  3122.           *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  3123.           esac
  3124.         fi
  3125.         tmp_libs="$tmp_libs $deplib"
  3126.       done
  3127.  
  3128.       if test "$link_all_deplibs" != no; then
  3129.         # Add the search paths of all dependency libraries
  3130.         for deplib in $dependency_libs; do
  3131.           case $deplib in
  3132.           -L*) path="$deplib" ;;
  3133.           *.la)
  3134.         dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
  3135.         test "X$dir" = "X$deplib" && dir="."
  3136.         # We need an absolute path.
  3137.         case $dir in
  3138.         [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  3139.         *)
  3140.           absdir=`cd "$dir" && pwd`
  3141.           if test -z "$absdir"; then
  3142.             $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  3143.             absdir="$dir"
  3144.           fi
  3145.           ;;
  3146.         esac
  3147.         if grep "^installed=no" $deplib > /dev/null; then
  3148.           path="$absdir/$objdir"
  3149.         else
  3150.           eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  3151.           if test -z "$libdir"; then
  3152.             $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  3153.             exit $EXIT_FAILURE
  3154.           fi
  3155.           if test "$absdir" != "$libdir"; then
  3156.             $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
  3157.           fi
  3158.           path="$absdir"
  3159.         fi
  3160.         depdepl=
  3161.         case $host in
  3162.         *-*-darwin*)
  3163.           # we do not want to link against static libs,
  3164.           # but need to link against shared
  3165.           eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
  3166.           if test -n "$deplibrary_names" ; then
  3167.             for tmp in $deplibrary_names ; do
  3168.               depdepl=$tmp
  3169.             done
  3170.             if test -f "$path/$depdepl" ; then
  3171.               depdepl="$path/$depdepl"
  3172.             fi
  3173.             # do not add paths which are already there
  3174.             case " $newlib_search_path " in
  3175.             *" $path "*) ;;
  3176.             *) newlib_search_path="$newlib_search_path $path";;
  3177.             esac
  3178.           fi
  3179.           path=""
  3180.           ;;
  3181.         *)
  3182.           path="-L$path"
  3183.           ;;
  3184.         esac
  3185.         ;;
  3186.           -l*)
  3187.         case $host in
  3188.         *-*-darwin*)
  3189.           # Again, we only want to link against shared libraries
  3190.           eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
  3191.           for tmp in $newlib_search_path ; do
  3192.             if test -f "$tmp/lib$tmp_libs.dylib" ; then
  3193.               eval depdepl="$tmp/lib$tmp_libs.dylib"
  3194.               break
  3195.             fi
  3196.           done
  3197.           path=""
  3198.           ;;
  3199.         *) continue ;;
  3200.         esac
  3201.         ;;
  3202.           *) continue ;;
  3203.           esac
  3204.           case " $deplibs " in
  3205.           *" $path "*) ;;
  3206.           *) deplibs="$path $deplibs" ;;
  3207.           esac
  3208.           case " $deplibs " in
  3209.           *" $depdepl "*) ;;
  3210.           *) deplibs="$depdepl $deplibs" ;;
  3211.           esac
  3212.         done
  3213.       fi # link_all_deplibs != no
  3214.     fi # linkmode = lib
  3215.       done # for deplib in $libs
  3216.       dependency_libs="$newdependency_libs"
  3217.       if test "$pass" = dlpreopen; then
  3218.     # Link the dlpreopened libraries before other libraries
  3219.     for deplib in $save_deplibs; do
  3220.       deplibs="$deplib $deplibs"
  3221.     done
  3222.       fi
  3223.       if test "$pass" != dlopen; then
  3224.     if test "$pass" != conv; then
  3225.       # Make sure lib_search_path contains only unique directories.
  3226.       lib_search_path=
  3227.       for dir in $newlib_search_path; do
  3228.         case "$lib_search_path " in
  3229.         *" $dir "*) ;;
  3230.         *) lib_search_path="$lib_search_path $dir" ;;
  3231.         esac
  3232.       done
  3233.       newlib_search_path=
  3234.     fi
  3235.  
  3236.     if test "$linkmode,$pass" != "prog,link"; then
  3237.       vars="deplibs"
  3238.     else
  3239.       vars="compile_deplibs finalize_deplibs"
  3240.     fi
  3241.     for var in $vars dependency_libs; do
  3242.       # Add libraries to $var in reverse order
  3243.       eval tmp_libs=\"\$$var\"
  3244.       new_libs=
  3245.       for deplib in $tmp_libs; do
  3246.         # FIXME: Pedantically, this is the right thing to do, so
  3247.         #        that some nasty dependency loop isn't accidentally
  3248.         #        broken:
  3249.         #new_libs="$deplib $new_libs"
  3250.         # Pragmatically, this seems to cause very few problems in
  3251.         # practice:
  3252.         case $deplib in
  3253.         -L*) new_libs="$deplib $new_libs" ;;
  3254.         -R*) ;;
  3255.         *)
  3256.           # And here is the reason: when a library appears more
  3257.           # than once as an explicit dependence of a library, or
  3258.           # is implicitly linked in more than once by the
  3259.           # compiler, it is considered special, and multiple
  3260.           # occurrences thereof are not removed.  Compare this
  3261.           # with having the same library being listed as a
  3262.           # dependency of multiple other libraries: in this case,
  3263.           # we know (pedantically, we assume) the library does not
  3264.           # need to be listed more than once, so we keep only the
  3265.           # last copy.  This is not always right, but it is rare
  3266.           # enough that we require users that really mean to play
  3267.           # such unportable linking tricks to link the library
  3268.           # using -Wl,-lname, so that libtool does not consider it
  3269.           # for duplicate removal.
  3270.           case " $specialdeplibs " in
  3271.           *" $deplib "*) new_libs="$deplib $new_libs" ;;
  3272.           *)
  3273.         case " $new_libs " in
  3274.         *" $deplib "*) ;;
  3275.         *) new_libs="$deplib $new_libs" ;;
  3276.         esac
  3277.         ;;
  3278.           esac
  3279.           ;;
  3280.         esac
  3281.       done
  3282.       tmp_libs=
  3283.       for deplib in $new_libs; do
  3284.         case $deplib in
  3285.         -L*)
  3286.           case " $tmp_libs " in
  3287.           *" $deplib "*) ;;
  3288.           *) tmp_libs="$tmp_libs $deplib" ;;
  3289.           esac
  3290.           ;;
  3291.         *) tmp_libs="$tmp_libs $deplib" ;;
  3292.         esac
  3293.       done
  3294.       eval $var=\"$tmp_libs\"
  3295.     done # for var
  3296.       fi
  3297.       # Last step: remove runtime libs from dependency_libs
  3298.       # (they stay in deplibs)
  3299.       tmp_libs=
  3300.       for i in $dependency_libs ; do
  3301.     case " $predeps $postdeps $compiler_lib_search_path " in
  3302.     *" $i "*)
  3303.       i=""
  3304.       ;;
  3305.     esac
  3306.     if test -n "$i" ; then
  3307.       tmp_libs="$tmp_libs $i"
  3308.     fi
  3309.       done
  3310.       dependency_libs=$tmp_libs
  3311.     done # for pass
  3312.     if test "$linkmode" = prog; then
  3313.       dlfiles="$newdlfiles"
  3314.       dlprefiles="$newdlprefiles"
  3315.     fi
  3316.  
  3317.     case $linkmode in
  3318.     oldlib)
  3319.       if test -n "$deplibs"; then
  3320.     $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
  3321.       fi
  3322.  
  3323.       if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  3324.     $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
  3325.      fi
  3326.  
  3327.      if test -n "$rpath"; then
  3328.     $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
  3329.       fi
  3330.  
  3331.       if test -n "$xrpath"; then
  3332.     $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
  3333.      fi
  3334.  
  3335.      if test -n "$vinfo"; then
  3336.     $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
  3337.       fi
  3338.  
  3339.       if test -n "$release"; then
  3340.     $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
  3341.      fi
  3342.  
  3343.      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  3344.     $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
  3345.       fi
  3346.  
  3347.       # Now set the variables for building old libraries.
  3348.       build_libtool_libs=no
  3349.       oldlibs="$output"
  3350.       objs="$objs$old_deplibs"
  3351.       ;;
  3352.  
  3353.     lib)
  3354.       # Make sure we only generate libraries of the form `libNAME.la'.
  3355.       case $outputname in
  3356.       lib*)
  3357.     name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  3358.     eval shared_ext=\"$shrext_cmds\"
  3359.     eval libname=\"$libname_spec\"
  3360.     ;;
  3361.       *)
  3362.     if test "$module" = no; then
  3363.       $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
  3364.       $echo "$help" 1>&2
  3365.       exit $EXIT_FAILURE
  3366.     fi
  3367.     if test "$need_lib_prefix" != no; then
  3368.       # Add the "lib" prefix for modules if required
  3369.       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  3370.       eval shared_ext=\"$shrext_cmds\"
  3371.       eval libname=\"$libname_spec\"
  3372.     else
  3373.       libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  3374.     fi
  3375.     ;;
  3376.       esac
  3377.  
  3378.       if test -n "$objs"; then
  3379.     if test "$deplibs_check_method" != pass_all; then
  3380.       $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
  3381.       exit $EXIT_FAILURE
  3382.     else
  3383.       $echo
  3384.       $echo "*** Warning: Linking the shared library $output against the non-libtool"
  3385.       $echo "*** objects $objs is not portable!"
  3386.       libobjs="$libobjs $objs"
  3387.     fi
  3388.      fi
  3389.  
  3390.      if test "$dlself" != no; then
  3391.     $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
  3392.       fi
  3393.  
  3394.       set dummy $rpath
  3395.       if test "$#" -gt 2; then
  3396.     $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
  3397.      fi
  3398.      install_libdir="$2"
  3399.  
  3400.      oldlibs=
  3401.      if test -z "$rpath"; then
  3402.     if test "$build_libtool_libs" = yes; then
  3403.       # Building a libtool convenience library.
  3404.       # Some compilers have problems with a `.al' extension so
  3405.       # convenience libraries should have the same extension an
  3406.       # archive normally would.
  3407.       oldlibs="$output_objdir/$libname.$libext $oldlibs"
  3408.       build_libtool_libs=convenience
  3409.       build_old_libs=yes
  3410.     fi
  3411.  
  3412.     if test -n "$vinfo"; then
  3413.       $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
  3414.     fi
  3415.  
  3416.     if test -n "$release"; then
  3417.       $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
  3418.     fi
  3419.      else
  3420.  
  3421.     # Parse the version information argument.
  3422.     save_ifs="$IFS"; IFS=':'
  3423.     set dummy $vinfo 0 0 0
  3424.     IFS="$save_ifs"
  3425.  
  3426.     if test -n "$8"; then
  3427.       $echo "$modename: too many parameters to \`-version-info'" 1>&2
  3428.       $echo "$help" 1>&2
  3429.       exit $EXIT_FAILURE
  3430.     fi
  3431.  
  3432.     # convert absolute version numbers to libtool ages
  3433.     # this retains compatibility with .la files and attempts
  3434.     # to make the code below a bit more comprehensible
  3435.  
  3436.     case $vinfo_number in
  3437.     yes)
  3438.       number_major="$2"
  3439.       number_minor="$3"
  3440.       number_revision="$4"
  3441.       #
  3442.       # There are really only two kinds -- those that
  3443.       # use the current revision as the major version
  3444.       # and those that subtract age and use age as
  3445.       # a minor version.  But, then there is irix
  3446.       # which has an extra 1 added just for fun
  3447.       #
  3448.       case $version_type in
  3449.       darwin|linux|osf|windows)
  3450.         current=`expr $number_major + $number_minor`
  3451.         age="$number_minor"
  3452.         revision="$number_revision"
  3453.         ;;
  3454.       freebsd-aout|freebsd-elf|sunos)
  3455.         current="$number_major"
  3456.         revision="$number_minor"
  3457.         age="0"
  3458.         ;;
  3459.       irix|nonstopux)
  3460.         current=`expr $number_major + $number_minor - 1`
  3461.         age="$number_minor"
  3462.         revision="$number_minor"
  3463.         ;;
  3464.       esac
  3465.       ;;
  3466.     no)
  3467.       current="$2"
  3468.       revision="$3"
  3469.       age="$4"
  3470.       ;;
  3471.     esac
  3472.  
  3473.     # Check that each of the things are valid numbers.
  3474.     case $current in
  3475.     0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
  3476.     *)
  3477.       $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
  3478.       $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  3479.       exit $EXIT_FAILURE
  3480.       ;;
  3481.     esac
  3482.  
  3483.     case $revision in
  3484.     0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
  3485.     *)
  3486.       $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
  3487.       $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  3488.       exit $EXIT_FAILURE
  3489.       ;;
  3490.     esac
  3491.  
  3492.     case $age in
  3493.     0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
  3494.     *)
  3495.       $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
  3496.       $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  3497.       exit $EXIT_FAILURE
  3498.       ;;
  3499.     esac
  3500.  
  3501.     if test "$age" -gt "$current"; then
  3502.       $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
  3503.       $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  3504.       exit $EXIT_FAILURE
  3505.     fi
  3506.  
  3507.     # Calculate the version variables.
  3508.     major=
  3509.     versuffix=
  3510.     verstring=
  3511.     case $version_type in
  3512.     none) ;;
  3513.  
  3514.     darwin)
  3515.       # Like Linux, but with the current version available in
  3516.       # verstring for coding it into the library header
  3517.       major=.`expr $current - $age`
  3518.       versuffix="$major.$age.$revision"
  3519.       # Darwin ld doesn't like 0 for these options...
  3520.       minor_current=`expr $current + 1`
  3521.       verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
  3522.       ;;
  3523.  
  3524.     freebsd-aout)
  3525.       major=".$current"
  3526.       versuffix=".$current.$revision";
  3527.       ;;
  3528.  
  3529.     freebsd-elf)
  3530.       major=".$current"
  3531.       versuffix=".$current";
  3532.       ;;
  3533.  
  3534.     irix | nonstopux)
  3535.       major=`expr $current - $age + 1`
  3536.  
  3537.       case $version_type in
  3538.         nonstopux) verstring_prefix=nonstopux ;;
  3539.         *)         verstring_prefix=sgi ;;
  3540.       esac
  3541.       verstring="$verstring_prefix$major.$revision"
  3542.  
  3543.       # Add in all the interfaces that we are compatible with.
  3544.       loop=$revision
  3545.       while test "$loop" -ne 0; do
  3546.         iface=`expr $revision - $loop`
  3547.         loop=`expr $loop - 1`
  3548.         verstring="$verstring_prefix$major.$iface:$verstring"
  3549.       done
  3550.  
  3551.       # Before this point, $major must not contain `.'.
  3552.       major=.$major
  3553.       versuffix="$major.$revision"
  3554.       ;;
  3555.  
  3556.     linux)
  3557.       major=.`expr $current - $age`
  3558.       versuffix="$major.$age.$revision"
  3559.       ;;
  3560.  
  3561.     osf)
  3562.       major=.`expr $current - $age`
  3563.       versuffix=".$current.$age.$revision"
  3564.       verstring="$current.$age.$revision"
  3565.  
  3566.       # Add in all the interfaces that we are compatible with.
  3567.       loop=$age
  3568.       while test "$loop" -ne 0; do
  3569.         iface=`expr $current - $loop`
  3570.         loop=`expr $loop - 1`
  3571.         verstring="$verstring:${iface}.0"
  3572.       done
  3573.  
  3574.       # Make executables depend on our current version.
  3575.       verstring="$verstring:${current}.0"
  3576.       ;;
  3577.  
  3578.     sunos)
  3579.       major=".$current"
  3580.       versuffix=".$current.$revision"
  3581.       ;;
  3582.  
  3583.     windows)
  3584.       # Use '-' rather than '.', since we only want one
  3585.       # extension on DOS 8.3 filesystems.
  3586.       major=`expr $current - $age`
  3587.       versuffix="-$major"
  3588.       ;;
  3589.  
  3590.     *)
  3591.       $echo "$modename: unknown library version type \`$version_type'" 1>&2
  3592.       $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  3593.       exit $EXIT_FAILURE
  3594.       ;;
  3595.     esac
  3596.  
  3597.     # Clear the version info if we defaulted, and they specified a release.
  3598.     if test -z "$vinfo" && test -n "$release"; then
  3599.       major=
  3600.       case $version_type in
  3601.       darwin)
  3602.         # we can't check for "0.0" in archive_cmds due to quoting
  3603.         # problems, so we reset it completely
  3604.         verstring=
  3605.         ;;
  3606.       *)
  3607.         verstring="0.0"
  3608.         ;;
  3609.       esac
  3610.       if test "$need_version" = no; then
  3611.         versuffix=
  3612.       else
  3613.         versuffix=".0.0"
  3614.       fi
  3615.     fi
  3616.  
  3617.     # Remove version info from name if versioning should be avoided
  3618.     if test "$avoid_version" = yes && test "$need_version" = no; then
  3619.       major=
  3620.       versuffix=
  3621.       verstring=""
  3622.     fi
  3623.  
  3624.     # Check to see if the archive will have undefined symbols.
  3625.     if test "$allow_undefined" = yes; then
  3626.       if test "$allow_undefined_flag" = unsupported; then
  3627.         $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
  3628.         build_libtool_libs=no
  3629.         build_old_libs=yes
  3630.       fi
  3631.     else
  3632.       # Don't allow undefined symbols.
  3633.       allow_undefined_flag="$no_undefined_flag"
  3634.     fi
  3635.       fi
  3636.  
  3637.       if test "$mode" != relink; then
  3638.     # Remove our outputs, but don't remove object files since they
  3639.     # may have been created when compiling PIC objects.
  3640.     removelist=
  3641.     tempremovelist=`$echo "$output_objdir/*"`
  3642.     for p in $tempremovelist; do
  3643.       case $p in
  3644.         *.$objext)
  3645.            ;;
  3646.         $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
  3647.            if test "X$precious_files_regex" != "X"; then
  3648.              if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
  3649.              then
  3650.            continue
  3651.          fi
  3652.            fi
  3653.            removelist="$removelist $p"
  3654.            ;;
  3655.         *) ;;
  3656.       esac
  3657.     done
  3658.     if test -n "$removelist"; then
  3659.       $show "${rm}r $removelist"
  3660.       $run ${rm}r $removelist
  3661.     fi
  3662.       fi
  3663.  
  3664.       # Now set the variables for building old libraries.
  3665.       if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
  3666.     oldlibs="$oldlibs $output_objdir/$libname.$libext"
  3667.  
  3668.     # Transform .lo files to .o files.
  3669.     oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
  3670.       fi
  3671.  
  3672.       # Eliminate all temporary directories.
  3673.       for path in $notinst_path; do
  3674.     lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
  3675.     deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
  3676.     dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
  3677.       done
  3678.  
  3679.       if test -n "$xrpath"; then
  3680.     # If the user specified any rpath flags, then add them.
  3681.     temp_xrpath=
  3682.     for libdir in $xrpath; do
  3683.       temp_xrpath="$temp_xrpath -R$libdir"
  3684.       case "$finalize_rpath " in
  3685.       *" $libdir "*) ;;
  3686.       *) finalize_rpath="$finalize_rpath $libdir" ;;
  3687.       esac
  3688.     done
  3689.     if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
  3690.       dependency_libs="$temp_xrpath $dependency_libs"
  3691.     fi
  3692.       fi
  3693.  
  3694.       # Make sure dlfiles contains only unique files that won't be dlpreopened
  3695.       old_dlfiles="$dlfiles"
  3696.       dlfiles=
  3697.       for lib in $old_dlfiles; do
  3698.     case " $dlprefiles $dlfiles " in
  3699.     *" $lib "*) ;;
  3700.     *) dlfiles="$dlfiles $lib" ;;
  3701.     esac
  3702.       done
  3703.  
  3704.       # Make sure dlprefiles contains only unique files
  3705.       old_dlprefiles="$dlprefiles"
  3706.       dlprefiles=
  3707.       for lib in $old_dlprefiles; do
  3708.     case "$dlprefiles " in
  3709.     *" $lib "*) ;;
  3710.     *) dlprefiles="$dlprefiles $lib" ;;
  3711.     esac
  3712.       done
  3713.  
  3714.       if test "$build_libtool_libs" = yes; then
  3715.     if test -n "$rpath"; then
  3716.       case $host in
  3717.       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
  3718.         # these systems don't actually have a c library (as such)!
  3719.         ;;
  3720.       *-*-rhapsody* | *-*-darwin1.[012])
  3721.         # Rhapsody C library is in the System framework
  3722.         deplibs="$deplibs -framework System"
  3723.         ;;
  3724.       *-*-netbsd*)
  3725.         # Don't link with libc until the a.out ld.so is fixed.
  3726.         ;;
  3727.       *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  3728.         # Do not include libc due to us having libc/libc_r.
  3729.         test "X$arg" = "X-lc" && continue
  3730.         ;;
  3731.       *)
  3732.         # Add libc to deplibs on all other systems if necessary.
  3733.         if test "$build_libtool_need_lc" = "yes"; then
  3734.           deplibs="$deplibs -lc"
  3735.         fi
  3736.         ;;
  3737.       esac
  3738.     fi
  3739.  
  3740.     # Transform deplibs into only deplibs that can be linked in shared.
  3741.     name_save=$name
  3742.     libname_save=$libname
  3743.     release_save=$release
  3744.     versuffix_save=$versuffix
  3745.     major_save=$major
  3746.     # I'm not sure if I'm treating the release correctly.  I think
  3747.     # release should show up in the -l (ie -lgmp5) so we don't want to
  3748.     # add it in twice.  Is that correct?
  3749.     release=""
  3750.     versuffix=""
  3751.     major=""
  3752.     newdeplibs=
  3753.     droppeddeps=no
  3754.     case $deplibs_check_method in
  3755.     pass_all)
  3756.       # Don't check for shared/static.  Everything works.
  3757.       # This might be a little naive.  We might want to check
  3758.       # whether the library exists or not.  But this is on
  3759.       # osf3 & osf4 and I'm not really sure... Just
  3760.       # implementing what was already the behavior.
  3761.       newdeplibs=$deplibs
  3762.       ;;
  3763.     test_compile)
  3764.       # This code stresses the "libraries are programs" paradigm to its
  3765.       # limits. Maybe even breaks it.  We compile a program, linking it
  3766.       # against the deplibs as a proxy for the library.  Then we can check
  3767.       # whether they linked in statically or dynamically with ldd.
  3768.       $rm conftest.c
  3769.       cat > conftest.c <<EOF
  3770.       int main() { return 0; }
  3771. EOF
  3772.       $rm conftest
  3773.       $LTCC -o conftest conftest.c $deplibs
  3774.       if test "$?" -eq 0 ; then
  3775.         ldd_output=`ldd conftest`
  3776.         for i in $deplibs; do
  3777.           name=`expr $i : '-l\(.*\)'`
  3778.           # If $name is empty we are operating on a -L argument.
  3779.               if test "$name" != "" && test "$name" -ne "0"; then
  3780.         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3781.           case " $predeps $postdeps " in
  3782.           *" $i "*)
  3783.             newdeplibs="$newdeplibs $i"
  3784.             i=""
  3785.             ;;
  3786.           esac
  3787.             fi
  3788.         if test -n "$i" ; then
  3789.           libname=`eval \\$echo \"$libname_spec\"`
  3790.           deplib_matches=`eval \\$echo \"$library_names_spec\"`
  3791.           set dummy $deplib_matches
  3792.           deplib_match=$2
  3793.           if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  3794.             newdeplibs="$newdeplibs $i"
  3795.           else
  3796.             droppeddeps=yes
  3797.             $echo
  3798.             $echo "*** Warning: dynamic linker does not accept needed library $i."
  3799.             $echo "*** I have the capability to make that library automatically link in when"
  3800.             $echo "*** you link to this library.  But I can only do this if you have a"
  3801.             $echo "*** shared version of the library, which I believe you do not have"
  3802.             $echo "*** because a test_compile did reveal that the linker did not use it for"
  3803.             $echo "*** its dynamic dependency list that programs get resolved with at runtime."
  3804.           fi
  3805.         fi
  3806.           else
  3807.         newdeplibs="$newdeplibs $i"
  3808.           fi
  3809.         done
  3810.       else
  3811.         # Error occurred in the first compile.  Let's try to salvage
  3812.         # the situation: Compile a separate program for each library.
  3813.         for i in $deplibs; do
  3814.           name=`expr $i : '-l\(.*\)'`
  3815.           # If $name is empty we are operating on a -L argument.
  3816.               if test "$name" != "" && test "$name" != "0"; then
  3817.         $rm conftest
  3818.         $LTCC -o conftest conftest.c $i
  3819.         # Did it work?
  3820.         if test "$?" -eq 0 ; then
  3821.           ldd_output=`ldd conftest`
  3822.           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3823.             case " $predeps $postdeps " in
  3824.             *" $i "*)
  3825.               newdeplibs="$newdeplibs $i"
  3826.               i=""
  3827.               ;;
  3828.             esac
  3829.           fi
  3830.           if test -n "$i" ; then
  3831.             libname=`eval \\$echo \"$libname_spec\"`
  3832.             deplib_matches=`eval \\$echo \"$library_names_spec\"`
  3833.             set dummy $deplib_matches
  3834.             deplib_match=$2
  3835.             if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  3836.               newdeplibs="$newdeplibs $i"
  3837.             else
  3838.               droppeddeps=yes
  3839.               $echo
  3840.               $echo "*** Warning: dynamic linker does not accept needed library $i."
  3841.               $echo "*** I have the capability to make that library automatically link in when"
  3842.               $echo "*** you link to this library.  But I can only do this if you have a"
  3843.               $echo "*** shared version of the library, which you do not appear to have"
  3844.               $echo "*** because a test_compile did reveal that the linker did not use this one"
  3845.               $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
  3846.             fi
  3847.           fi
  3848.         else
  3849.           droppeddeps=yes
  3850.           $echo
  3851.           $echo "*** Warning!  Library $i is needed by this library but I was not able to"
  3852.           $echo "***  make it link in!  You will probably need to install it or some"
  3853.           $echo "*** library that it depends on before this library will be fully"
  3854.           $echo "*** functional.  Installing it before continuing would be even better."
  3855.         fi
  3856.           else
  3857.         newdeplibs="$newdeplibs $i"
  3858.           fi
  3859.         done
  3860.       fi
  3861.       ;;
  3862.     file_magic*)
  3863.       set dummy $deplibs_check_method
  3864.       file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  3865.       for a_deplib in $deplibs; do
  3866.         name=`expr $a_deplib : '-l\(.*\)'`
  3867.         # If $name is empty we are operating on a -L argument.
  3868.             if test "$name" != "" && test  "$name" != "0"; then
  3869.           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3870.         case " $predeps $postdeps " in
  3871.         *" $a_deplib "*)
  3872.           newdeplibs="$newdeplibs $a_deplib"
  3873.           a_deplib=""
  3874.           ;;
  3875.         esac
  3876.           fi
  3877.           if test -n "$a_deplib" ; then
  3878.         libname=`eval \\$echo \"$libname_spec\"`
  3879.         for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  3880.           potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  3881.           for potent_lib in $potential_libs; do
  3882.               # Follow soft links.
  3883.               if ls -lLd "$potent_lib" 2>/dev/null \
  3884.              | grep " -> " >/dev/null; then
  3885.             continue
  3886.               fi
  3887.               # The statement above tries to avoid entering an
  3888.               # endless loop below, in case of cyclic links.
  3889.               # We might still enter an endless loop, since a link
  3890.               # loop can be closed while we follow links,
  3891.               # but so what?
  3892.               potlib="$potent_lib"
  3893.               while test -h "$potlib" 2>/dev/null; do
  3894.             potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
  3895.             case $potliblink in
  3896.             [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  3897.             *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  3898.             esac
  3899.               done
  3900.               if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  3901.              | ${SED} 10q \
  3902.              | $EGREP "$file_magic_regex" > /dev/null; then
  3903.             newdeplibs="$newdeplibs $a_deplib"
  3904.             a_deplib=""
  3905.             break 2
  3906.               fi
  3907.           done
  3908.         done
  3909.           fi
  3910.           if test -n "$a_deplib" ; then
  3911.         droppeddeps=yes
  3912.         $echo
  3913.         $echo "*** Warning: linker path does not have real file for library $a_deplib."
  3914.         $echo "*** I have the capability to make that library automatically link in when"
  3915.         $echo "*** you link to this library.  But I can only do this if you have a"
  3916.         $echo "*** shared version of the library, which you do not appear to have"
  3917.         $echo "*** because I did check the linker path looking for a file starting"
  3918.         if test -z "$potlib" ; then
  3919.           $echo "*** with $libname but no candidates were found. (...for file magic test)"
  3920.         else
  3921.           $echo "*** with $libname and none of the candidates passed a file format test"
  3922.           $echo "*** using a file magic. Last file checked: $potlib"
  3923.         fi
  3924.           fi
  3925.         else
  3926.           # Add a -L argument.
  3927.           newdeplibs="$newdeplibs $a_deplib"
  3928.         fi
  3929.       done # Gone through all deplibs.
  3930.       ;;
  3931.     match_pattern*)
  3932.       set dummy $deplibs_check_method
  3933.       match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  3934.       for a_deplib in $deplibs; do
  3935.         name=`expr $a_deplib : '-l\(.*\)'`
  3936.         # If $name is empty we are operating on a -L argument.
  3937.         if test -n "$name" && test "$name" != "0"; then
  3938.           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3939.         case " $predeps $postdeps " in
  3940.         *" $a_deplib "*)
  3941.           newdeplibs="$newdeplibs $a_deplib"
  3942.           a_deplib=""
  3943.           ;;
  3944.         esac
  3945.           fi
  3946.           if test -n "$a_deplib" ; then
  3947.         libname=`eval \\$echo \"$libname_spec\"`
  3948.         for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  3949.           potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  3950.           for potent_lib in $potential_libs; do
  3951.             potlib="$potent_lib" # see symlink-check above in file_magic test
  3952.             if eval $echo \"$potent_lib\" 2>/dev/null \
  3953.                 | ${SED} 10q \
  3954.                 | $EGREP "$match_pattern_regex" > /dev/null; then
  3955.               newdeplibs="$newdeplibs $a_deplib"
  3956.               a_deplib=""
  3957.               break 2
  3958.             fi
  3959.           done
  3960.         done
  3961.           fi
  3962.           if test -n "$a_deplib" ; then
  3963.         droppeddeps=yes
  3964.         $echo
  3965.         $echo "*** Warning: linker path does not have real file for library $a_deplib."
  3966.         $echo "*** I have the capability to make that library automatically link in when"
  3967.         $echo "*** you link to this library.  But I can only do this if you have a"
  3968.         $echo "*** shared version of the library, which you do not appear to have"
  3969.         $echo "*** because I did check the linker path looking for a file starting"
  3970.         if test -z "$potlib" ; then
  3971.           $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
  3972.         else
  3973.           $echo "*** with $libname and none of the candidates passed a file format test"
  3974.           $echo "*** using a regex pattern. Last file checked: $potlib"
  3975.         fi
  3976.           fi
  3977.         else
  3978.           # Add a -L argument.
  3979.           newdeplibs="$newdeplibs $a_deplib"
  3980.         fi
  3981.       done # Gone through all deplibs.
  3982.       ;;
  3983.     none | unknown | *)
  3984.       newdeplibs=""
  3985.       tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
  3986.         -e 's/ -[LR][^ ]*//g'`
  3987.       if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  3988.         for i in $predeps $postdeps ; do
  3989.           # can't use Xsed below, because $i might contain '/'
  3990.           tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
  3991.         done
  3992.       fi
  3993.       if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
  3994.         | grep . >/dev/null; then
  3995.         $echo
  3996.         if test "X$deplibs_check_method" = "Xnone"; then
  3997.           $echo "*** Warning: inter-library dependencies are not supported in this platform."
  3998.         else
  3999.           $echo "*** Warning: inter-library dependencies are not known to be supported."
  4000.         fi
  4001.         $echo "*** All declared inter-library dependencies are being dropped."
  4002.         droppeddeps=yes
  4003.       fi
  4004.       ;;
  4005.     esac
  4006.     versuffix=$versuffix_save
  4007.     major=$major_save
  4008.     release=$release_save
  4009.     libname=$libname_save
  4010.     name=$name_save
  4011.  
  4012.     case $host in
  4013.     *-*-rhapsody* | *-*-darwin1.[012])
  4014.       # On Rhapsody replace the C library is the System framework
  4015.       newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
  4016.       ;;
  4017.     esac
  4018.  
  4019.     if test "$droppeddeps" = yes; then
  4020.       if test "$module" = yes; then
  4021.         $echo
  4022.         $echo "*** Warning: libtool could not satisfy all declared inter-library"
  4023.         $echo "*** dependencies of module $libname.  Therefore, libtool will create"
  4024.         $echo "*** a static module, that should work as long as the dlopening"
  4025.         $echo "*** application is linked with the -dlopen flag."
  4026.         if test -z "$global_symbol_pipe"; then
  4027.           $echo
  4028.           $echo "*** However, this would only work if libtool was able to extract symbol"
  4029.           $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
  4030.           $echo "*** not find such a program.  So, this module is probably useless."
  4031.           $echo "*** \`nm' from GNU binutils and a full rebuild may help."
  4032.         fi
  4033.         if test "$build_old_libs" = no; then
  4034.           oldlibs="$output_objdir/$libname.$libext"
  4035.           build_libtool_libs=module
  4036.           build_old_libs=yes
  4037.         else
  4038.           build_libtool_libs=no
  4039.         fi
  4040.       else
  4041.         $echo "*** The inter-library dependencies that have been dropped here will be"
  4042.         $echo "*** automatically added whenever a program is linked with this library"
  4043.         $echo "*** or is declared to -dlopen it."
  4044.  
  4045.         if test "$allow_undefined" = no; then
  4046.           $echo
  4047.           $echo "*** Since this library must not contain undefined symbols,"
  4048.           $echo "*** because either the platform does not support them or"
  4049.           $echo "*** it was explicitly requested with -no-undefined,"
  4050.           $echo "*** libtool will only create a static version of it."
  4051.           if test "$build_old_libs" = no; then
  4052.         oldlibs="$output_objdir/$libname.$libext"
  4053.         build_libtool_libs=module
  4054.         build_old_libs=yes
  4055.           else
  4056.         build_libtool_libs=no
  4057.           fi
  4058.         fi
  4059.       fi
  4060.     fi
  4061.     # Done checking deplibs!
  4062.     deplibs=$newdeplibs
  4063.       fi
  4064.  
  4065.       # All the library-specific variables (install_libdir is set above).
  4066.       library_names=
  4067.       old_library=
  4068.       dlname=
  4069.  
  4070.       # Test again, we may have decided not to build it any more
  4071.       if test "$build_libtool_libs" = yes; then
  4072.     if test "$hardcode_into_libs" = yes; then
  4073.       # Hardcode the library paths
  4074.       hardcode_libdirs=
  4075.       dep_rpath=
  4076.       rpath="$finalize_rpath"
  4077.       test "$mode" != relink && rpath="$compile_rpath$rpath"
  4078.       for libdir in $rpath; do
  4079.         if test -n "$hardcode_libdir_flag_spec"; then
  4080.           if test -n "$hardcode_libdir_separator"; then
  4081.         if test -z "$hardcode_libdirs"; then
  4082.           hardcode_libdirs="$libdir"
  4083.         else
  4084.           # Just accumulate the unique libdirs.
  4085.           case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  4086.           *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  4087.             ;;
  4088.           *)
  4089.             hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  4090.             ;;
  4091.           esac
  4092.         fi
  4093.           else
  4094.         eval flag=\"$hardcode_libdir_flag_spec\"
  4095.         dep_rpath="$dep_rpath $flag"
  4096.           fi
  4097.         elif test -n "$runpath_var"; then
  4098.           case "$perm_rpath " in
  4099.           *" $libdir "*) ;;
  4100.           *) perm_rpath="$perm_rpath $libdir" ;;
  4101.           esac
  4102.         fi
  4103.       done
  4104.       # Substitute the hardcoded libdirs into the rpath.
  4105.       if test -n "$hardcode_libdir_separator" &&
  4106.          test -n "$hardcode_libdirs"; then
  4107.         libdir="$hardcode_libdirs"
  4108.         if test -n "$hardcode_libdir_flag_spec_ld"; then
  4109.           eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
  4110.         else
  4111.           eval dep_rpath=\"$hardcode_libdir_flag_spec\"
  4112.         fi
  4113.       fi
  4114.       if test -n "$runpath_var" && test -n "$perm_rpath"; then
  4115.         # We should set the runpath_var.
  4116.         rpath=
  4117.         for dir in $perm_rpath; do
  4118.           rpath="$rpath$dir:"
  4119.         done
  4120.         eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
  4121.       fi
  4122.       test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
  4123.     fi
  4124.  
  4125.     shlibpath="$finalize_shlibpath"
  4126.     test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
  4127.     if test -n "$shlibpath"; then
  4128.       eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
  4129.     fi
  4130.  
  4131.     # Get the real and link names of the library.
  4132.     eval shared_ext=\"$shrext_cmds\"
  4133.     eval library_names=\"$library_names_spec\"
  4134.     set dummy $library_names
  4135.     realname="$2"
  4136.     shift; shift
  4137.  
  4138.     if test -n "$soname_spec"; then
  4139.       eval soname=\"$soname_spec\"
  4140.     else
  4141.       soname="$realname"
  4142.     fi
  4143.     if test -z "$dlname"; then
  4144.       dlname=$soname
  4145.     fi
  4146.  
  4147.     lib="$output_objdir/$realname"
  4148.     for link
  4149.     do
  4150.       linknames="$linknames $link"
  4151.     done
  4152.  
  4153.     # Use standard objects if they are pic
  4154.     test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  4155.  
  4156.     # Prepare the list of exported symbols
  4157.     if test -z "$export_symbols"; then
  4158.       if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  4159.         $show "generating symbol list for \`$libname.la'"
  4160.         export_symbols="$output_objdir/$libname.exp"
  4161.         $run $rm $export_symbols
  4162.         cmds=$export_symbols_cmds
  4163.         save_ifs="$IFS"; IFS='~'
  4164.         for cmd in $cmds; do
  4165.           IFS="$save_ifs"
  4166.           eval cmd=\"$cmd\"
  4167.           if len=`expr "X$cmd" : ".*"` &&
  4168.            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  4169.             $show "$cmd"
  4170.             $run eval "$cmd" || exit $?
  4171.             skipped_export=false
  4172.           else
  4173.             # The command line is too long to execute in one step.
  4174.             $show "using reloadable object file for export list..."
  4175.             skipped_export=:
  4176.         # Break out early, otherwise skipped_export may be
  4177.         # set to false by a later but shorter cmd.
  4178.         break
  4179.           fi
  4180.         done
  4181.         IFS="$save_ifs"
  4182.         if test -n "$export_symbols_regex"; then
  4183.           $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
  4184.           $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
  4185.           $show "$mv \"${export_symbols}T\" \"$export_symbols\""
  4186.           $run eval '$mv "${export_symbols}T" "$export_symbols"'
  4187.         fi
  4188.       fi
  4189.     fi
  4190.  
  4191.     if test -n "$export_symbols" && test -n "$include_expsyms"; then
  4192.       $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
  4193.     fi
  4194.  
  4195.     tmp_deplibs=
  4196.     for test_deplib in $deplibs; do
  4197.         case " $convenience " in
  4198.         *" $test_deplib "*) ;;
  4199.         *)
  4200.             tmp_deplibs="$tmp_deplibs $test_deplib"
  4201.             ;;
  4202.         esac
  4203.     done
  4204.     deplibs="$tmp_deplibs"
  4205.  
  4206.     if test -n "$convenience"; then
  4207.       if test -n "$whole_archive_flag_spec"; then
  4208.         save_libobjs=$libobjs
  4209.         eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  4210.       else
  4211.         gentop="$output_objdir/${outputname}x"
  4212.         generated="$generated $gentop"
  4213.  
  4214.         func_extract_archives $gentop $convenience
  4215.         libobjs="$libobjs $func_extract_archives_result"
  4216.       fi
  4217.     fi
  4218.    
  4219.     if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  4220.       eval flag=\"$thread_safe_flag_spec\"
  4221.       linker_flags="$linker_flags $flag"
  4222.     fi
  4223.  
  4224.     # Make a backup of the uninstalled library when relinking
  4225.     if test "$mode" = relink; then
  4226.       $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
  4227.     fi
  4228.  
  4229.     # Do each of the archive commands.
  4230.     if test "$module" = yes && test -n "$module_cmds" ; then
  4231.       if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
  4232.         eval test_cmds=\"$module_expsym_cmds\"
  4233.         cmds=$module_expsym_cmds
  4234.       else
  4235.         eval test_cmds=\"$module_cmds\"
  4236.         cmds=$module_cmds
  4237.       fi
  4238.     else
  4239.     if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  4240.       eval test_cmds=\"$archive_expsym_cmds\"
  4241.       cmds=$archive_expsym_cmds
  4242.     else
  4243.       eval test_cmds=\"$archive_cmds\"
  4244.       cmds=$archive_cmds
  4245.       fi
  4246.     fi
  4247.  
  4248.     if test "X$skipped_export" != "X:" &&
  4249.        len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  4250.        test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  4251.       :
  4252.     else
  4253.       # The command line is too long to link in one step, link piecewise.
  4254.       $echo "creating reloadable object files..."
  4255.  
  4256.       # Save the value of $output and $libobjs because we want to
  4257.       # use them later.  If we have whole_archive_flag_spec, we
  4258.       # want to use save_libobjs as it was before
  4259.       # whole_archive_flag_spec was expanded, because we can't
  4260.       # assume the linker understands whole_archive_flag_spec.
  4261.       # This may have to be revisited, in case too many
  4262.       # convenience libraries get linked in and end up exceeding
  4263.       # the spec.
  4264.       if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
  4265.         save_libobjs=$libobjs
  4266.       fi
  4267.       save_output=$output
  4268.       output_la=`$echo "X$output" | $Xsed -e "$basename"`
  4269.  
  4270.       # Clear the reloadable object creation command queue and
  4271.       # initialize k to one.
  4272.       test_cmds=
  4273.       concat_cmds=
  4274.       objlist=
  4275.       delfiles=
  4276.       last_robj=
  4277.       k=1
  4278.       output=$output_objdir/$output_la-${k}.$objext
  4279.       # Loop over the list of objects to be linked.
  4280.       for obj in $save_libobjs
  4281.       do
  4282.         eval test_cmds=\"$reload_cmds $objlist $last_robj\"
  4283.         if test "X$objlist" = X ||
  4284.            { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  4285.          test "$len" -le "$max_cmd_len"; }; then
  4286.           objlist="$objlist $obj"
  4287.         else
  4288.           # The command $test_cmds is almost too long, add a
  4289.           # command to the queue.
  4290.           if test "$k" -eq 1 ; then
  4291.         # The first file doesn't have a previous command to add.
  4292.         eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
  4293.           else
  4294.         # All subsequent reloadable object files will link in
  4295.         # the last one created.
  4296.         eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
  4297.           fi
  4298.           last_robj=$output_objdir/$output_la-${k}.$objext
  4299.           k=`expr $k + 1`
  4300.           output=$output_objdir/$output_la-${k}.$objext
  4301.           objlist=$obj
  4302.           len=1
  4303.         fi
  4304.       done
  4305.       # Handle the remaining objects by creating one last
  4306.       # reloadable object file.  All subsequent reloadable object
  4307.       # files will link in the last one created.
  4308.       test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  4309.       eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
  4310.  
  4311.       if ${skipped_export-false}; then
  4312.         $show "generating symbol list for \`$libname.la'"
  4313.         export_symbols="$output_objdir/$libname.exp"
  4314.         $run $rm $export_symbols
  4315.         libobjs=$output
  4316.         # Append the command to create the export file.
  4317.         eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
  4318.           fi
  4319.  
  4320.       # Set up a command to remove the reloadable object files
  4321.       # after they are used.
  4322.       i=0
  4323.       while test "$i" -lt "$k"
  4324.       do
  4325.         i=`expr $i + 1`
  4326.         delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
  4327.       done
  4328.  
  4329.       $echo "creating a temporary reloadable object file: $output"
  4330.  
  4331.       # Loop through the commands generated above and execute them.
  4332.       save_ifs="$IFS"; IFS='~'
  4333.       for cmd in $concat_cmds; do
  4334.         IFS="$save_ifs"
  4335.         $show "$cmd"
  4336.         $run eval "$cmd" || exit $?
  4337.       done
  4338.       IFS="$save_ifs"
  4339.  
  4340.       libobjs=$output
  4341.       # Restore the value of output.
  4342.       output=$save_output
  4343.  
  4344.       if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
  4345.         eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  4346.       fi
  4347.       # Expand the library linking commands again to reset the
  4348.       # value of $libobjs for piecewise linking.
  4349.  
  4350.       # Do each of the archive commands.
  4351.       if test "$module" = yes && test -n "$module_cmds" ; then
  4352.         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
  4353.           cmds=$module_expsym_cmds
  4354.         else
  4355.           cmds=$module_cmds
  4356.         fi
  4357.       else
  4358.       if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  4359.         cmds=$archive_expsym_cmds
  4360.       else
  4361.         cmds=$archive_cmds
  4362.         fi
  4363.       fi
  4364.  
  4365.       # Append the command to remove the reloadable object files
  4366.       # to the just-reset $cmds.
  4367.       eval cmds=\"\$cmds~\$rm $delfiles\"
  4368.     fi
  4369.     save_ifs="$IFS"; IFS='~'
  4370.     for cmd in $cmds; do
  4371.       IFS="$save_ifs"
  4372.       eval cmd=\"$cmd\"
  4373.       $show "$cmd"
  4374.       $run eval "$cmd" || {
  4375.         lt_exit=$?
  4376.  
  4377.         # Restore the uninstalled library and exit
  4378.         if test "$mode" = relink; then
  4379.           $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
  4380.         fi
  4381.  
  4382.         exit $lt_exit
  4383.       }
  4384.     done
  4385.     IFS="$save_ifs"
  4386.  
  4387.     # Restore the uninstalled library and exit
  4388.     if test "$mode" = relink; then
  4389.       $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
  4390.  
  4391.       if test -n "$convenience"; then
  4392.         if test -z "$whole_archive_flag_spec"; then
  4393.           $show "${rm}r $gentop"
  4394.           $run ${rm}r "$gentop"
  4395.         fi
  4396.       fi
  4397.  
  4398.       exit $EXIT_SUCCESS
  4399.     fi
  4400.  
  4401.     # Create links to the real library.
  4402.     for linkname in $linknames; do
  4403.       if test "$realname" != "$linkname"; then
  4404.         $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
  4405.         $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
  4406.       fi
  4407.     done
  4408.  
  4409.     # If -module or -export-dynamic was specified, set the dlname.
  4410.     if test "$module" = yes || test "$export_dynamic" = yes; then
  4411.       # On all known operating systems, these are identical.
  4412.       dlname="$soname"
  4413.     fi
  4414.       fi
  4415.       ;;
  4416.  
  4417.     obj)
  4418.       if test -n "$deplibs"; then
  4419.     $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
  4420.       fi
  4421.  
  4422.       if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  4423.     $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
  4424.      fi
  4425.  
  4426.      if test -n "$rpath"; then
  4427.     $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
  4428.       fi
  4429.  
  4430.       if test -n "$xrpath"; then
  4431.     $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
  4432.      fi
  4433.  
  4434.      if test -n "$vinfo"; then
  4435.     $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
  4436.       fi
  4437.  
  4438.       if test -n "$release"; then
  4439.     $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
  4440.      fi
  4441.  
  4442.      case $output in
  4443.      *.lo)
  4444.     if test -n "$objs$old_deplibs"; then
  4445.       $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
  4446.       exit $EXIT_FAILURE
  4447.     fi
  4448.     libobj="$output"
  4449.     obj=`$echo "X$output" | $Xsed -e "$lo2o"`
  4450.     ;;
  4451.       *)
  4452.     libobj=
  4453.     obj="$output"
  4454.     ;;
  4455.       esac
  4456.  
  4457.       # Delete the old objects.
  4458.       $run $rm $obj $libobj
  4459.  
  4460.       # Objects from convenience libraries.  This assumes
  4461.       # single-version convenience libraries.  Whenever we create
  4462.       # different ones for PIC/non-PIC, this we'll have to duplicate
  4463.       # the extraction.
  4464.       reload_conv_objs=
  4465.       gentop=
  4466.       # reload_cmds runs $LD directly, so let us get rid of
  4467.       # -Wl from whole_archive_flag_spec
  4468.       wl=
  4469.  
  4470.       if test -n "$convenience"; then
  4471.     if test -n "$whole_archive_flag_spec"; then
  4472.       eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
  4473.     else
  4474.       gentop="$output_objdir/${obj}x"
  4475.       generated="$generated $gentop"
  4476.  
  4477.       func_extract_archives $gentop $convenience
  4478.       reload_conv_objs="$reload_objs $func_extract_archives_result"
  4479.     fi
  4480.       fi
  4481.  
  4482.       # Create the old-style object.
  4483.       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
  4484.  
  4485.       output="$obj"
  4486.       cmds=$reload_cmds
  4487.       save_ifs="$IFS"; IFS='~'
  4488.       for cmd in $cmds; do
  4489.     IFS="$save_ifs"
  4490.     eval cmd=\"$cmd\"
  4491.     $show "$cmd"
  4492.     $run eval "$cmd" || exit $?
  4493.       done
  4494.       IFS="$save_ifs"
  4495.  
  4496.       # Exit if we aren't doing a library object file.
  4497.       if test -z "$libobj"; then
  4498.     if test -n "$gentop"; then
  4499.       $show "${rm}r $gentop"
  4500.       $run ${rm}r $gentop
  4501.     fi
  4502.  
  4503.     exit $EXIT_SUCCESS
  4504.       fi
  4505.  
  4506.       if test "$build_libtool_libs" != yes; then
  4507.     if test -n "$gentop"; then
  4508.       $show "${rm}r $gentop"
  4509.       $run ${rm}r $gentop
  4510.     fi
  4511.  
  4512.     # Create an invalid libtool object if no PIC, so that we don't
  4513.     # accidentally link it into a program.
  4514.     # $show "echo timestamp > $libobj"
  4515.     # $run eval "echo timestamp > $libobj" || exit $?
  4516.     exit $EXIT_SUCCESS
  4517.       fi
  4518.  
  4519.       if test -n "$pic_flag" || test "$pic_mode" != default; then
  4520.     # Only do commands if we really have different PIC objects.
  4521.     reload_objs="$libobjs $reload_conv_objs"
  4522.     output="$libobj"
  4523.     cmds=$reload_cmds
  4524.     save_ifs="$IFS"; IFS='~'
  4525.     for cmd in $cmds; do
  4526.       IFS="$save_ifs"
  4527.       eval cmd=\"$cmd\"
  4528.       $show "$cmd"
  4529.       $run eval "$cmd" || exit $?
  4530.     done
  4531.     IFS="$save_ifs"
  4532.       fi
  4533.  
  4534.       if test -n "$gentop"; then
  4535.     $show "${rm}r $gentop"
  4536.     $run ${rm}r $gentop
  4537.       fi
  4538.  
  4539.       exit $EXIT_SUCCESS
  4540.       ;;
  4541.  
  4542.     prog)
  4543.       case $host in
  4544.     *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
  4545.       esac
  4546.       if test -n "$vinfo"; then
  4547.     $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
  4548.      fi
  4549.  
  4550.      if test -n "$release"; then
  4551.     $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
  4552.       fi
  4553.  
  4554.       if test "$preload" = yes; then
  4555.     if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
  4556.        test "$dlopen_self_static" = unknown; then
  4557.       $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
  4558.     fi
  4559.      fi
  4560.  
  4561.      case $host in
  4562.      *-*-rhapsody* | *-*-darwin1.[012])
  4563.     # On Rhapsody replace the C library is the System framework
  4564.     compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  4565.     finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  4566.     ;;
  4567.      esac
  4568.  
  4569.      case $host in
  4570.      *darwin*)
  4571.        # Don't allow lazy linking, it breaks C++ global constructors
  4572.        if test "$tagname" = CXX ; then
  4573.        compile_command="$compile_command ${wl}-bind_at_load"
  4574.        finalize_command="$finalize_command ${wl}-bind_at_load"
  4575.        fi
  4576.        ;;
  4577.      esac
  4578.  
  4579.      compile_command="$compile_command $compile_deplibs"
  4580.      finalize_command="$finalize_command $finalize_deplibs"
  4581.  
  4582.      if test -n "$rpath$xrpath"; then
  4583.     # If the user specified any rpath flags, then add them.
  4584.     for libdir in $rpath $xrpath; do
  4585.       # This is the magic to use -rpath.
  4586.       case "$finalize_rpath " in
  4587.       *" $libdir "*) ;;
  4588.       *) finalize_rpath="$finalize_rpath $libdir" ;;
  4589.       esac
  4590.     done
  4591.      fi
  4592.  
  4593.      # Now hardcode the library paths
  4594.      rpath=
  4595.      hardcode_libdirs=
  4596.      for libdir in $compile_rpath $finalize_rpath; do
  4597.     if test -n "$hardcode_libdir_flag_spec"; then
  4598.       if test -n "$hardcode_libdir_separator"; then
  4599.         if test -z "$hardcode_libdirs"; then
  4600.           hardcode_libdirs="$libdir"
  4601.         else
  4602.           # Just accumulate the unique libdirs.
  4603.           case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  4604.           *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  4605.         ;;
  4606.           *)
  4607.         hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  4608.         ;;
  4609.           esac
  4610.         fi
  4611.       else
  4612.         eval flag=\"$hardcode_libdir_flag_spec\"
  4613.         rpath="$rpath $flag"
  4614.       fi
  4615.     elif test -n "$runpath_var"; then
  4616.       case "$perm_rpath " in
  4617.       *" $libdir "*) ;;
  4618.       *) perm_rpath="$perm_rpath $libdir" ;;
  4619.       esac
  4620.     fi
  4621.     case $host in
  4622.     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  4623.       case :$dllsearchpath: in
  4624.       *":$libdir:"*) ;;
  4625.       *) dllsearchpath="$dllsearchpath:$libdir";;
  4626.       esac
  4627.       ;;
  4628.     esac
  4629.      done
  4630.      # Substitute the hardcoded libdirs into the rpath.
  4631.      if test -n "$hardcode_libdir_separator" &&
  4632.      test -n "$hardcode_libdirs"; then
  4633.     libdir="$hardcode_libdirs"
  4634.     eval rpath=\" $hardcode_libdir_flag_spec\"
  4635.      fi
  4636.      compile_rpath="$rpath"
  4637.  
  4638.      rpath=
  4639.      hardcode_libdirs=
  4640.      for libdir in $finalize_rpath; do
  4641.     if test -n "$hardcode_libdir_flag_spec"; then
  4642.       if test -n "$hardcode_libdir_separator"; then
  4643.         if test -z "$hardcode_libdirs"; then
  4644.           hardcode_libdirs="$libdir"
  4645.         else
  4646.           # Just accumulate the unique libdirs.
  4647.           case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  4648.           *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  4649.         ;;
  4650.           *)
  4651.         hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  4652.         ;;
  4653.           esac
  4654.         fi
  4655.       else
  4656.         eval flag=\"$hardcode_libdir_flag_spec\"
  4657.         rpath="$rpath $flag"
  4658.       fi
  4659.     elif test -n "$runpath_var"; then
  4660.       case "$finalize_perm_rpath " in
  4661.       *" $libdir "*) ;;
  4662.       *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
  4663.       esac
  4664.     fi
  4665.      done
  4666.      # Substitute the hardcoded libdirs into the rpath.
  4667.      if test -n "$hardcode_libdir_separator" &&
  4668.      test -n "$hardcode_libdirs"; then
  4669.     libdir="$hardcode_libdirs"
  4670.     eval rpath=\" $hardcode_libdir_flag_spec\"
  4671.      fi
  4672.      finalize_rpath="$rpath"
  4673.  
  4674.      if test -n "$libobjs" && test "$build_old_libs" = yes; then
  4675.     # Transform all the library objects into standard objects.
  4676.     compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  4677.     finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  4678.      fi
  4679.  
  4680.      dlsyms=
  4681.      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  4682.     if test -n "$NM" && test -n "$global_symbol_pipe"; then
  4683.       dlsyms="${outputname}S.c"
  4684.     else
  4685.       $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
  4686.     fi
  4687.      fi
  4688.  
  4689.      if test -n "$dlsyms"; then
  4690.     case $dlsyms in
  4691.     "") ;;
  4692.     *.c)
  4693.       # Discover the nlist of each of the dlfiles.
  4694.       nlist="$output_objdir/${outputname}.nm"
  4695.  
  4696.       $show "$rm $nlist ${nlist}S ${nlist}T"
  4697.       $run $rm "$nlist" "${nlist}S" "${nlist}T"
  4698.  
  4699.       # Parse the name list into a source file.
  4700.       $show "creating $output_objdir/$dlsyms"
  4701.  
  4702.       test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
  4703. /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
  4704. /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
  4705.  
  4706. #ifdef __cplusplus
  4707. extern \"C\" {
  4708. #endif
  4709.  
  4710. /* Prevent the only kind of declaration conflicts we can make. */
  4711. #define lt_preloaded_symbols some_other_symbol
  4712.  
  4713. /* External symbol declarations for the compiler. */\
  4714. "
  4715.  
  4716.       if test "$dlself" = yes; then
  4717.         $show "generating symbol list for \`$output'"
  4718.  
  4719.         test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
  4720.  
  4721.         # Add our own program objects to the symbol list.
  4722.         progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  4723.         for arg in $progfiles; do
  4724.           $show "extracting global C symbols from \`$arg'"
  4725.           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  4726.         done
  4727.  
  4728.         if test -n "$exclude_expsyms"; then
  4729.           $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
  4730.           $run eval '$mv "$nlist"T "$nlist"'
  4731.         fi
  4732.  
  4733.         if test -n "$export_symbols_regex"; then
  4734.           $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
  4735.           $run eval '$mv "$nlist"T "$nlist"'
  4736.         fi
  4737.  
  4738.         # Prepare the list of exported symbols
  4739.         if test -z "$export_symbols"; then
  4740.           export_symbols="$output_objdir/$outputname.exp"
  4741.           $run $rm $export_symbols
  4742.           $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  4743.         else
  4744.           $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
  4745.           $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
  4746.           $run eval 'mv "$nlist"T "$nlist"'
  4747.         fi
  4748.       fi
  4749.  
  4750.       for arg in $dlprefiles; do
  4751.         $show "extracting global C symbols from \`$arg'"
  4752.         name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
  4753.         $run eval '$echo ": $name " >> "$nlist"'
  4754.         $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  4755.       done
  4756.  
  4757.       if test -z "$run"; then
  4758.         # Make sure we have at least an empty file.
  4759.         test -f "$nlist" || : > "$nlist"
  4760.  
  4761.         if test -n "$exclude_expsyms"; then
  4762.           $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
  4763.           $mv "$nlist"T "$nlist"
  4764.         fi
  4765.  
  4766.         # Try sorting and uniquifying the output.
  4767.         if grep -v "^: " < "$nlist" |
  4768.         if sort -k 3 </dev/null >/dev/null 2>&1; then
  4769.           sort -k 3
  4770.         else
  4771.           sort +2
  4772.         fi |
  4773.         uniq > "$nlist"S; then
  4774.           :
  4775.         else
  4776.           grep -v "^: " < "$nlist" > "$nlist"S
  4777.         fi
  4778.  
  4779.         if test -f "$nlist"S; then
  4780.           eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
  4781.         else
  4782.           $echo '/* NONE */' >> "$output_objdir/$dlsyms"
  4783.         fi
  4784.  
  4785.         $echo >> "$output_objdir/$dlsyms" "\
  4786.  
  4787. #undef lt_preloaded_symbols
  4788.  
  4789. #if defined (__STDC__) && __STDC__
  4790. # define lt_ptr void *
  4791. #else
  4792. # define lt_ptr char *
  4793. # define const
  4794. #endif
  4795.  
  4796. /* The mapping between symbol names and symbols. */
  4797. "
  4798.  
  4799.         case $host in
  4800.         *cygwin* | *mingw* )
  4801.       $echo >> "$output_objdir/$dlsyms" "\
  4802. /* DATA imports from DLLs on WIN32 can't be const, because
  4803.   runtime relocations are performed -- see ld's documentation
  4804.   on pseudo-relocs */
  4805. struct {
  4806. "
  4807.           ;;
  4808.         * )
  4809.       $echo >> "$output_objdir/$dlsyms" "\
  4810. const struct {
  4811. "
  4812.           ;;
  4813.         esac
  4814.  
  4815.  
  4816.       $echo >> "$output_objdir/$dlsyms" "\
  4817.  const char *name;
  4818.  lt_ptr address;
  4819. }
  4820. lt_preloaded_symbols[] =
  4821. {\
  4822. "
  4823.  
  4824.         eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
  4825.  
  4826.         $echo >> "$output_objdir/$dlsyms" "\
  4827.  {0, (lt_ptr) 0}
  4828. };
  4829.  
  4830. /* This works around a problem in FreeBSD linker */
  4831. #ifdef FREEBSD_WORKAROUND
  4832. static const void *lt_preloaded_setup() {
  4833.  return lt_preloaded_symbols;
  4834. }
  4835. #endif
  4836.  
  4837. #ifdef __cplusplus
  4838. }
  4839. #endif\
  4840. "
  4841.       fi
  4842.  
  4843.       pic_flag_for_symtable=
  4844.       case $host in
  4845.       # compiling the symbol table file with pic_flag works around
  4846.       # a FreeBSD bug that causes programs to crash when -lm is
  4847.       # linked before any other PIC object.  But we must not use
  4848.       # pic_flag when linking with -static.  The problem exists in
  4849.       # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
  4850.       *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  4851.         case "$compile_command " in
  4852.         *" -static "*) ;;
  4853.         *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
  4854.         esac;;
  4855.       *-*-hpux*)
  4856.         case "$compile_command " in
  4857.         *" -static "*) ;;
  4858.         *) pic_flag_for_symtable=" $pic_flag";;
  4859.         esac
  4860.       esac
  4861.  
  4862.       # Now compile the dynamic symbol file.
  4863.       $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  4864.       $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  4865.  
  4866.       # Clean up the generated files.
  4867.       $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  4868.       $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  4869.  
  4870.       # Transform the symbol file into the correct name.
  4871.       compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  4872.       finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  4873.       ;;
  4874.     *)
  4875.       $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  4876.       exit $EXIT_FAILURE
  4877.       ;;
  4878.     esac
  4879.       else
  4880.     # We keep going just in case the user didn't refer to
  4881.     # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
  4882.     # really was required.
  4883.  
  4884.     # Nullify the symbol file.
  4885.     compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
  4886.     finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
  4887.       fi
  4888.  
  4889.       if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
  4890.     # Replace the output file specification.
  4891.     compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  4892.     link_command="$compile_command$compile_rpath"
  4893.  
  4894.     # We have no uninstalled library dependencies, so finalize right now.
  4895.     $show "$link_command"
  4896.     $run eval "$link_command"
  4897.     status=$?
  4898.  
  4899.     # Delete the generated files.
  4900.     if test -n "$dlsyms"; then
  4901.       $show "$rm $output_objdir/${outputname}S.${objext}"
  4902.       $run $rm "$output_objdir/${outputname}S.${objext}"
  4903.     fi
  4904.  
  4905.     exit $status
  4906.       fi
  4907.  
  4908.       if test -n "$shlibpath_var"; then
  4909.     # We should set the shlibpath_var
  4910.     rpath=
  4911.     for dir in $temp_rpath; do
  4912.       case $dir in
  4913.       [\\/]* | [A-Za-z]:[\\/]*)
  4914.         # Absolute path.
  4915.         rpath="$rpath$dir:"
  4916.         ;;
  4917.       *)
  4918.         # Relative path: add a thisdir entry.
  4919.         rpath="$rpath\$thisdir/$dir:"
  4920.         ;;
  4921.       esac
  4922.     done
  4923.     temp_rpath="$rpath"
  4924.       fi
  4925.  
  4926.       if test -n "$compile_shlibpath$finalize_shlibpath"; then
  4927.     compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
  4928.       fi
  4929.       if test -n "$finalize_shlibpath"; then
  4930.     finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
  4931.       fi
  4932.  
  4933.       compile_var=
  4934.       finalize_var=
  4935.       if test -n "$runpath_var"; then
  4936.     if test -n "$perm_rpath"; then
  4937.       # We should set the runpath_var.
  4938.       rpath=
  4939.       for dir in $perm_rpath; do
  4940.         rpath="$rpath$dir:"
  4941.       done
  4942.       compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
  4943.     fi
  4944.     if test -n "$finalize_perm_rpath"; then
  4945.       # We should set the runpath_var.
  4946.       rpath=
  4947.       for dir in $finalize_perm_rpath; do
  4948.         rpath="$rpath$dir:"
  4949.       done
  4950.       finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
  4951.     fi
  4952.       fi
  4953.  
  4954.       if test "$no_install" = yes; then
  4955.     # We don't need to create a wrapper script.
  4956.     link_command="$compile_var$compile_command$compile_rpath"
  4957.     # Replace the output file specification.
  4958.     link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  4959.     # Delete the old output file.
  4960.     $run $rm $output
  4961.     # Link the executable and exit
  4962.     $show "$link_command"
  4963.     $run eval "$link_command" || exit $?
  4964.     exit $EXIT_SUCCESS
  4965.       fi
  4966.  
  4967.       if test "$hardcode_action" = relink; then
  4968.     # Fast installation is not supported
  4969.     link_command="$compile_var$compile_command$compile_rpath"
  4970.     relink_command="$finalize_var$finalize_command$finalize_rpath"
  4971.  
  4972.     $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
  4973.     $echo "$modename: \`$output' will be relinked during installation" 1>&2
  4974.      else
  4975.     if test "$fast_install" != no; then
  4976.       link_command="$finalize_var$compile_command$finalize_rpath"
  4977.       if test "$fast_install" = yes; then
  4978.         relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
  4979.       else
  4980.         # fast_install is set to needless
  4981.         relink_command=
  4982.       fi
  4983.     else
  4984.       link_command="$compile_var$compile_command$compile_rpath"
  4985.       relink_command="$finalize_var$finalize_command$finalize_rpath"
  4986.     fi
  4987.      fi
  4988.  
  4989.      # Replace the output file specification.
  4990.      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
  4991.  
  4992.      # Delete the old output files.
  4993.      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  4994.  
  4995.      $show "$link_command"
  4996.      $run eval "$link_command" || exit $?
  4997.  
  4998.      # Now create the wrapper script.
  4999.      $show "creating $output"
  5000.  
  5001.      # Quote the relink command for shipping.
  5002.      if test -n "$relink_command"; then
  5003.     # Preserve any variables that may affect compiler behavior
  5004.     for var in $variables_saved_for_relink; do
  5005.       if eval test -z \"\${$var+set}\"; then
  5006.         relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
  5007.       elif eval var_value=\$$var; test -z "$var_value"; then
  5008.         relink_command="$var=; export $var; $relink_command"
  5009.       else
  5010.         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
  5011.         relink_command="$var=\"$var_value\"; export $var; $relink_command"
  5012.       fi
  5013.     done
  5014.     relink_command="(cd `pwd`; $relink_command)"
  5015.     relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  5016.      fi
  5017.  
  5018.      # Quote $echo for shipping.
  5019.      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
  5020.     case $progpath in
  5021.     [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
  5022.     *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
  5023.     esac
  5024.     qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  5025.      else
  5026.     qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
  5027.      fi
  5028.  
  5029.      # Only actually do things if our run command is non-null.
  5030.      if test -z "$run"; then
  5031.     # win32 will think the script is a binary if it has
  5032.     # a .exe suffix, so we strip it off here.
  5033.     case $output in
  5034.       *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
  5035.     esac
  5036.     # test for cygwin because mv fails w/o .exe extensions
  5037.     case $host in
  5038.       *cygwin*)
  5039.         exeext=.exe
  5040.         outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
  5041.       *) exeext= ;;
  5042.     esac
  5043.     case $host in
  5044.       *cygwin* | *mingw* )
  5045.         cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
  5046.         cwrapper=`$echo ${output}.exe`
  5047.         $rm $cwrappersource $cwrapper
  5048.         trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
  5049.  
  5050.         cat > $cwrappersource <<EOF
  5051.  
  5052. /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
  5053.   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  5054.  
  5055.   The $output program cannot be directly executed until all the libtool
  5056.   libraries that it depends on are installed.
  5057.  
  5058.   This wrapper executable should never be moved out of the build directory.
  5059.   If it is, it will not operate correctly.
  5060.  
  5061.   Currently, it simply execs the wrapper *script* "/bin/sh $output",
  5062.   but could eventually absorb all of the scripts functionality and
  5063.   exec $objdir/$outputname directly.
  5064. */
  5065. EOF
  5066.         cat >> $cwrappersource<<"EOF"
  5067. #include <stdio.h>
  5068. #include <stdlib.h>
  5069. #include <unistd.h>
  5070. #include <malloc.h>
  5071. #include <stdarg.h>
  5072. #include <assert.h>
  5073.  
  5074. #if defined(PATH_MAX)
  5075. # define LT_PATHMAX PATH_MAX
  5076. #elif defined(MAXPATHLEN)
  5077. # define LT_PATHMAX MAXPATHLEN
  5078. #else
  5079. # define LT_PATHMAX 1024
  5080. #endif
  5081.  
  5082. #ifndef DIR_SEPARATOR
  5083. #define DIR_SEPARATOR '/'
  5084. #endif
  5085.  
  5086. #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
  5087.  defined (__OS2__)
  5088. #define HAVE_DOS_BASED_FILE_SYSTEM
  5089. #ifndef DIR_SEPARATOR_2
  5090. #define DIR_SEPARATOR_2 '\\'
  5091. #endif
  5092. #endif
  5093.  
  5094. #ifndef DIR_SEPARATOR_2
  5095. # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
  5096. #else /* DIR_SEPARATOR_2 */
  5097. # define IS_DIR_SEPARATOR(ch) \
  5098.        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
  5099. #endif /* DIR_SEPARATOR_2 */
  5100.  
  5101. #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
  5102. #define XFREE(stale) do { \
  5103.  if (stale) { free ((void *) stale); stale = 0; } \
  5104. } while (0)
  5105.  
  5106. const char *program_name = NULL;
  5107.  
  5108. void * xmalloc (size_t num);
  5109. char * xstrdup (const char *string);
  5110. char * basename (const char *name);
  5111. char * fnqualify(const char *path);
  5112. char * strendzap(char *str, const char *pat);
  5113. void lt_fatal (const char *message, ...);
  5114.  
  5115. int
  5116. main (int argc, char *argv[])
  5117. {
  5118.  char **newargz;
  5119.  int i;
  5120.  
  5121.  program_name = (char *) xstrdup ((char *) basename (argv[0]));
  5122.  newargz = XMALLOC(char *, argc+2);
  5123. EOF
  5124.  
  5125.         cat >> $cwrappersource <<EOF
  5126.  newargz[0] = "$SHELL";
  5127. EOF
  5128.  
  5129.         cat >> $cwrappersource <<"EOF"
  5130.  newargz[1] = fnqualify(argv[0]);
  5131.  /* we know the script has the same name, without the .exe */
  5132.  /* so make sure newargz[1] doesn't end in .exe */
  5133.  strendzap(newargz[1],".exe");
  5134.  for (i = 1; i < argc; i++)
  5135.    newargz[i+1] = xstrdup(argv[i]);
  5136.  newargz[argc+1] = NULL;
  5137. EOF
  5138.  
  5139.         cat >> $cwrappersource <<EOF
  5140.  execv("$SHELL",newargz);
  5141. EOF
  5142.  
  5143.         cat >> $cwrappersource <<"EOF"
  5144.  return 127;
  5145. }
  5146.  
  5147. void *
  5148. xmalloc (size_t num)
  5149. {
  5150.  void * p = (void *) malloc (num);
  5151.  if (!p)
  5152.    lt_fatal ("Memory exhausted");
  5153.  
  5154.  return p;
  5155. }
  5156.  
  5157. char *
  5158. xstrdup (const char *string)
  5159. {
  5160.  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
  5161. ;
  5162. }
  5163.  
  5164. char *
  5165. basename (const char *name)
  5166. {
  5167.  const char *base;
  5168.  
  5169. #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  5170.  /* Skip over the disk name in MSDOS pathnames. */
  5171.  if (isalpha (name[0]) && name[1] == ':')
  5172.    name += 2;
  5173. #endif
  5174.  
  5175.  for (base = name; *name; name++)
  5176.    if (IS_DIR_SEPARATOR (*name))
  5177.      base = name + 1;
  5178.  return (char *) base;
  5179. }
  5180.  
  5181. char *
  5182. fnqualify(const char *path)
  5183. {
  5184.  size_t size;
  5185.  char *p;
  5186.  char tmp[LT_PATHMAX + 1];
  5187.  
  5188.  assert(path != NULL);
  5189.  
  5190.  /* Is it qualified already? */
  5191. #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  5192.  if (isalpha (path[0]) && path[1] == ':')
  5193.    return xstrdup (path);
  5194. #endif
  5195.  if (IS_DIR_SEPARATOR (path[0]))
  5196.    return xstrdup (path);
  5197.  
  5198.  /* prepend the current directory */
  5199.  /* doesn't handle '~' */
  5200.  if (getcwd (tmp, LT_PATHMAX) == NULL)
  5201.    lt_fatal ("getcwd failed");
  5202.  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
  5203.  p = XMALLOC(char, size);
  5204.  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
  5205.  return p;
  5206. }
  5207.  
  5208. char *
  5209. strendzap(char *str, const char *pat)
  5210. {
  5211.  size_t len, patlen;
  5212.  
  5213.  assert(str != NULL);
  5214.  assert(pat != NULL);
  5215.  
  5216.  len = strlen(str);
  5217.  patlen = strlen(pat);
  5218.  
  5219.  if (patlen <= len)
  5220.  {
  5221.    str += len - patlen;
  5222.    if (strcmp(str, pat) == 0)
  5223.      *str = '\0';
  5224.  }
  5225.  return str;
  5226. }
  5227.  
  5228. static void
  5229. lt_error_core (int exit_status, const char * mode,
  5230.          const char * message, va_list ap)
  5231. {
  5232.  fprintf (stderr, "%s: %s: ", program_name, mode);
  5233.  vfprintf (stderr, message, ap);
  5234.  fprintf (stderr, ".\n");
  5235.  
  5236.  if (exit_status >= 0)
  5237.    exit (exit_status);
  5238. }
  5239.  
  5240. void
  5241. lt_fatal (const char *message, ...)
  5242. {
  5243.  va_list ap;
  5244.  va_start (ap, message);
  5245.  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
  5246.  va_end (ap);
  5247. }
  5248. EOF
  5249.       # we should really use a build-platform specific compiler
  5250.       # here, but OTOH, the wrappers (shell script and this C one)
  5251.       # are only useful if you want to execute the "real" binary.
  5252.       # Since the "real" binary is built for $host, then this
  5253.       # wrapper might as well be built for $host, too.
  5254.       $run $LTCC -s -o $cwrapper $cwrappersource
  5255.       ;;
  5256.     esac
  5257.     $rm $output
  5258.     trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
  5259.  
  5260.     $echo > $output "\
  5261. #! $SHELL
  5262.  
  5263. # $output - temporary wrapper script for $objdir/$outputname
  5264. # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  5265. #
  5266. # The $output program cannot be directly executed until all the libtool
  5267. # libraries that it depends on are installed.
  5268. #
  5269. # This wrapper script should never be moved out of the build directory.
  5270. # If it is, it will not operate correctly.
  5271.  
  5272. # Sed substitution that helps us do robust quoting.  It backslashifies
  5273. # metacharacters that are still active within double-quoted strings.
  5274. Xsed='${SED} -e 1s/^X//'
  5275. sed_quote_subst='$sed_quote_subst'
  5276.  
  5277. # The HP-UX ksh and POSIX shell print the target directory to stdout
  5278. # if CDPATH is set.
  5279. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  5280.  
  5281. relink_command=\"$relink_command\"
  5282.  
  5283. # This environment variable determines our operation mode.
  5284. if test \"\$libtool_install_magic\" = \"$magic\"; then
  5285.  # install mode needs the following variable:
  5286.  notinst_deplibs='$notinst_deplibs'
  5287. else
  5288.  # When we are sourced in execute mode, \$file and \$echo are already set.
  5289.  if test \"\$libtool_execute_magic\" != \"$magic\"; then
  5290.    echo=\"$qecho\"
  5291.    file=\"\$0\"
  5292.    # Make sure echo works.
  5293.    if test \"X\$1\" = X--no-reexec; then
  5294.      # Discard the --no-reexec flag, and continue.
  5295.      shift
  5296.    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
  5297.      # Yippee, \$echo works!
  5298.      :
  5299.    else
  5300.      # Restart under the correct shell, and then maybe \$echo will work.
  5301.      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
  5302.    fi
  5303.  fi\
  5304. "
  5305.     $echo >> $output "\
  5306.  
  5307.  # Find the directory that this script lives in.
  5308.  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
  5309.  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
  5310.  
  5311.  # Follow symbolic links until we get to the real thisdir.
  5312.  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
  5313.  while test -n \"\$file\"; do
  5314.    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
  5315.  
  5316.    # If there was a directory component, then change thisdir.
  5317.    if test \"x\$destdir\" != \"x\$file\"; then
  5318.      case \"\$destdir\" in
  5319.      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
  5320.      *) thisdir=\"\$thisdir/\$destdir\" ;;
  5321.      esac
  5322.    fi
  5323.  
  5324.    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
  5325.    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
  5326.  done
  5327.  
  5328.  # Try to get the absolute directory name.
  5329.  absdir=\`cd \"\$thisdir\" && pwd\`
  5330.  test -n \"\$absdir\" && thisdir=\"\$absdir\"
  5331. "
  5332.  
  5333.     if test "$fast_install" = yes; then
  5334.       $echo >> $output "\
  5335.  program=lt-'$outputname'$exeext
  5336.  progdir=\"\$thisdir/$objdir\"
  5337.  
  5338.  if test ! -f \"\$progdir/\$program\" || \\
  5339.     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
  5340.       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
  5341.  
  5342.    file=\"\$\$-\$program\"
  5343.  
  5344.    if test ! -d \"\$progdir\"; then
  5345.      $mkdir \"\$progdir\"
  5346.    else
  5347.      $rm \"\$progdir/\$file\"
  5348.    fi"
  5349.  
  5350.       $echo >> $output "\
  5351.  
  5352.    # relink executable if necessary
  5353.    if test -n \"\$relink_command\"; then
  5354.      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
  5355.      else
  5356.     $echo \"\$relink_command_output\" >&2
  5357.     $rm \"\$progdir/\$file\"
  5358.     exit $EXIT_FAILURE
  5359.      fi
  5360.    fi
  5361.  
  5362.    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
  5363.    { $rm \"\$progdir/\$program\";
  5364.      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
  5365.    $rm \"\$progdir/\$file\"
  5366.  fi"
  5367.     else
  5368.       $echo >> $output "\
  5369.  program='$outputname'
  5370.  progdir=\"\$thisdir/$objdir\"
  5371. "
  5372.     fi
  5373.  
  5374.     $echo >> $output "\
  5375.  
  5376.  if test -f \"\$progdir/\$program\"; then"
  5377.  
  5378.     # Export our shlibpath_var if we have one.
  5379.     if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
  5380.       $echo >> $output "\
  5381.    # Add our own library path to $shlibpath_var
  5382.    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
  5383.  
  5384.    # Some systems cannot cope with colon-terminated $shlibpath_var
  5385.    # The second colon is a workaround for a bug in BeOS R4 sed
  5386.    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
  5387.  
  5388.    export $shlibpath_var
  5389. "
  5390.     fi
  5391.  
  5392.     # fixup the dll searchpath if we need to.
  5393.     if test -n "$dllsearchpath"; then
  5394.       $echo >> $output "\
  5395.    # Add the dll search path components to the executable PATH
  5396.    PATH=$dllsearchpath:\$PATH
  5397. "
  5398.     fi
  5399.  
  5400.     $echo >> $output "\
  5401.    if test \"\$libtool_execute_magic\" != \"$magic\"; then
  5402.      # Run the actual program with our arguments.
  5403. "
  5404.     case $host in
  5405.     # Backslashes separate directories on plain windows
  5406.     *-*-mingw | *-*-os2*)
  5407.       $echo >> $output "\
  5408.      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
  5409. "
  5410.       ;;
  5411.  
  5412.     *)
  5413.       $echo >> $output "\
  5414.      exec \"\$progdir/\$program\" \${1+\"\$@\"}
  5415. "
  5416.       ;;
  5417.     esac
  5418.     $echo >> $output "\
  5419.      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
  5420.      exit $EXIT_FAILURE
  5421.    fi
  5422.  else
  5423.    # The program doesn't exist.
  5424.    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
  5425.    \$echo \"This script is just a wrapper for \$program.\" 1>&2
  5426.    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
  5427.    exit $EXIT_FAILURE
  5428.  fi
  5429. fi\
  5430. "
  5431.     chmod +x $output
  5432.       fi
  5433.       exit $EXIT_SUCCESS
  5434.       ;;
  5435.     esac
  5436.  
  5437.     # See if we need to build an old-fashioned archive.
  5438.     for oldlib in $oldlibs; do
  5439.  
  5440.       if test "$build_libtool_libs" = convenience; then
  5441.     oldobjs="$libobjs_save"
  5442.     addlibs="$convenience"
  5443.     build_libtool_libs=no
  5444.       else
  5445.     if test "$build_libtool_libs" = module; then
  5446.       oldobjs="$libobjs_save"
  5447.       build_libtool_libs=no
  5448.     else
  5449.       oldobjs="$old_deplibs $non_pic_objects"
  5450.     fi
  5451.     addlibs="$old_convenience"
  5452.       fi
  5453.  
  5454.       if test -n "$addlibs"; then
  5455.     gentop="$output_objdir/${outputname}x"
  5456.     generated="$generated $gentop"
  5457.  
  5458.     func_extract_archives $gentop $addlibs
  5459.     oldobjs="$oldobjs $func_extract_archives_result"
  5460.       fi
  5461.  
  5462.       # Do each command in the archive commands.
  5463.       if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  5464.        cmds=$old_archive_from_new_cmds
  5465.       else
  5466.     # POSIX demands no paths to be encoded in archives.  We have
  5467.     # to avoid creating archives with duplicate basenames if we
  5468.     # might have to extract them afterwards, e.g., when creating a
  5469.     # static archive out of a convenience library, or when linking
  5470.     # the entirety of a libtool archive into another (currently
  5471.     # not supported by libtool).
  5472.     if (for obj in $oldobjs
  5473.         do
  5474.           $echo "X$obj" | $Xsed -e 's%^.*/%%'
  5475.         done | sort | sort -uc >/dev/null 2>&1); then
  5476.       :
  5477.     else
  5478.       $echo "copying selected object files to avoid basename conflicts..."
  5479.  
  5480.       if test -z "$gentop"; then
  5481.         gentop="$output_objdir/${outputname}x"
  5482.         generated="$generated $gentop"
  5483.  
  5484.         $show "${rm}r $gentop"
  5485.         $run ${rm}r "$gentop"
  5486.         $show "$mkdir $gentop"
  5487.         $run $mkdir "$gentop"
  5488.         status=$?
  5489.         if test "$status" -ne 0 && test ! -d "$gentop"; then
  5490.           exit $status
  5491.         fi
  5492.       fi
  5493.  
  5494.       save_oldobjs=$oldobjs
  5495.       oldobjs=
  5496.       counter=1
  5497.       for obj in $save_oldobjs
  5498.       do
  5499.         objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  5500.         case " $oldobjs " in
  5501.         " ") oldobjs=$obj ;;
  5502.         *[\ /]"$objbase "*)
  5503.           while :; do
  5504.         # Make sure we don't pick an alternate name that also
  5505.         # overlaps.
  5506.         newobj=lt$counter-$objbase
  5507.         counter=`expr $counter + 1`
  5508.         case " $oldobjs " in
  5509.         *[\ /]"$newobj "*) ;;
  5510.         *) if test ! -f "$gentop/$newobj"; then break; fi ;;
  5511.         esac
  5512.           done
  5513.           $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
  5514.           $run ln "$obj" "$gentop/$newobj" ||
  5515.           $run cp "$obj" "$gentop/$newobj"
  5516.           oldobjs="$oldobjs $gentop/$newobj"
  5517.           ;;
  5518.         *) oldobjs="$oldobjs $obj" ;;
  5519.         esac
  5520.       done
  5521.     fi
  5522.  
  5523.     eval cmds=\"$old_archive_cmds\"
  5524.  
  5525.     if len=`expr "X$cmds" : ".*"` &&
  5526.          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  5527.       cmds=$old_archive_cmds
  5528.     else
  5529.       # the command line is too long to link in one step, link in parts
  5530.       $echo "using piecewise archive linking..."
  5531.       save_RANLIB=$RANLIB
  5532.       RANLIB=:
  5533.       objlist=
  5534.       concat_cmds=
  5535.       save_oldobjs=$oldobjs
  5536.  
  5537.       # Is there a better way of finding the last object in the list?
  5538.       for obj in $save_oldobjs
  5539.       do
  5540.         last_oldobj=$obj
  5541.       done
  5542.       for obj in $save_oldobjs
  5543.       do
  5544.         oldobjs="$objlist $obj"
  5545.         objlist="$objlist $obj"
  5546.         eval test_cmds=\"$old_archive_cmds\"
  5547.         if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  5548.            test "$len" -le "$max_cmd_len"; then
  5549.           :
  5550.         else
  5551.           # the above command should be used before it gets too long
  5552.           oldobjs=$objlist
  5553.           if test "$obj" = "$last_oldobj" ; then
  5554.             RANLIB=$save_RANLIB
  5555.           fi
  5556.           test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  5557.           eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
  5558.           objlist=
  5559.         fi
  5560.       done
  5561.       RANLIB=$save_RANLIB
  5562.       oldobjs=$objlist
  5563.       if test "X$oldobjs" = "X" ; then
  5564.         eval cmds=\"\$concat_cmds\"
  5565.       else
  5566.         eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
  5567.       fi
  5568.     fi
  5569.       fi
  5570.       save_ifs="$IFS"; IFS='~'
  5571.       for cmd in $cmds; do
  5572.         eval cmd=\"$cmd\"
  5573.     IFS="$save_ifs"
  5574.     $show "$cmd"
  5575.     $run eval "$cmd" || exit $?
  5576.       done
  5577.       IFS="$save_ifs"
  5578.     done
  5579.  
  5580.     if test -n "$generated"; then
  5581.       $show "${rm}r$generated"
  5582.       $run ${rm}r$generated
  5583.     fi
  5584.  
  5585.     # Now create the libtool archive.
  5586.     case $output in
  5587.     *.la)
  5588.       old_library=
  5589.       test "$build_old_libs" = yes && old_library="$libname.$libext"
  5590.       $show "creating $output"
  5591.  
  5592.       # Preserve any variables that may affect compiler behavior
  5593.       for var in $variables_saved_for_relink; do
  5594.     if eval test -z \"\${$var+set}\"; then
  5595.       relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
  5596.     elif eval var_value=\$$var; test -z "$var_value"; then
  5597.       relink_command="$var=; export $var; $relink_command"
  5598.     else
  5599.       var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
  5600.       relink_command="$var=\"$var_value\"; export $var; $relink_command"
  5601.     fi
  5602.       done
  5603.       # Quote the link command for shipping.
  5604.       relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
  5605.       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  5606.       if test "$hardcode_automatic" = yes ; then
  5607.     relink_command=
  5608.       fi
  5609.  
  5610.  
  5611.       # Only create the output if not a dry run.
  5612.       if test -z "$run"; then
  5613.     for installed in no yes; do
  5614.       if test "$installed" = yes; then
  5615.         if test -z "$install_libdir"; then
  5616.           break
  5617.         fi
  5618.         output="$output_objdir/$outputname"i
  5619.         # Replace all uninstalled libtool libraries with the installed ones
  5620.         newdependency_libs=
  5621.         for deplib in $dependency_libs; do
  5622.           case $deplib in
  5623.           *.la)
  5624.         name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
  5625.         eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  5626.         if test -z "$libdir"; then
  5627.           $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  5628.           exit $EXIT_FAILURE
  5629.         fi
  5630.         newdependency_libs="$newdependency_libs $libdir/$name"
  5631.         ;;
  5632.           *) newdependency_libs="$newdependency_libs $deplib" ;;
  5633.           esac
  5634.         done
  5635.         dependency_libs="$newdependency_libs"
  5636.         newdlfiles=
  5637.         for lib in $dlfiles; do
  5638.           name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  5639.           eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  5640.           if test -z "$libdir"; then
  5641.         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  5642.         exit $EXIT_FAILURE
  5643.           fi
  5644.           newdlfiles="$newdlfiles $libdir/$name"
  5645.         done
  5646.         dlfiles="$newdlfiles"
  5647.         newdlprefiles=
  5648.         for lib in $dlprefiles; do
  5649.           name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  5650.           eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  5651.           if test -z "$libdir"; then
  5652.         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  5653.         exit $EXIT_FAILURE
  5654.           fi
  5655.           newdlprefiles="$newdlprefiles $libdir/$name"
  5656.         done
  5657.         dlprefiles="$newdlprefiles"
  5658.       else
  5659.         newdlfiles=
  5660.         for lib in $dlfiles; do
  5661.           case $lib in
  5662.         [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  5663.         *) abs=`pwd`"/$lib" ;;
  5664.           esac
  5665.           newdlfiles="$newdlfiles $abs"
  5666.         done
  5667.         dlfiles="$newdlfiles"
  5668.         newdlprefiles=
  5669.         for lib in $dlprefiles; do
  5670.           case $lib in
  5671.         [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  5672.         *) abs=`pwd`"/$lib" ;;
  5673.           esac
  5674.           newdlprefiles="$newdlprefiles $abs"
  5675.         done
  5676.         dlprefiles="$newdlprefiles"
  5677.       fi
  5678.       $rm $output
  5679.       # place dlname in correct position for cygwin
  5680.       tdlname=$dlname
  5681.       case $host,$output,$installed,$module,$dlname in
  5682.         *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
  5683.       esac
  5684.       $echo > $output "\
  5685. # $outputname - a libtool library file
  5686. # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  5687. #
  5688. # Please DO NOT delete this file!
  5689. # It is necessary for linking the library.
  5690.  
  5691. # The name that we can dlopen(3).
  5692. dlname='$tdlname'
  5693.  
  5694. # Names of this library.
  5695. library_names='$library_names'
  5696.  
  5697. # The name of the static archive.
  5698. old_library='$old_library'
  5699.  
  5700. # Libraries that this one depends upon.
  5701. dependency_libs='$dependency_libs'
  5702.  
  5703. # Version information for $libname.
  5704. current=$current
  5705. age=$age
  5706. revision=$revision
  5707.  
  5708. # Is this an already installed library?
  5709. installed=$installed
  5710.  
  5711. # Should we warn about portability when linking against -modules?
  5712. shouldnotlink=$module
  5713.  
  5714. # Files to dlopen/dlpreopen
  5715. dlopen='$dlfiles'
  5716. dlpreopen='$dlprefiles'
  5717.  
  5718. # Directory that this library needs to be installed in:
  5719. libdir='$install_libdir'"
  5720.       if test "$installed" = no && test "$need_relink" = yes; then
  5721.         $echo >> $output "\
  5722. relink_command=\"$relink_command\""
  5723.       fi
  5724.     done
  5725.      fi
  5726.  
  5727.      # Do a symbolic link so that the libtool archive can be found in
  5728.      # LD_LIBRARY_PATH before the program is installed.
  5729.      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
  5730.      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
  5731.      ;;
  5732.    esac
  5733.    exit $EXIT_SUCCESS
  5734.    ;;
  5735.  
  5736.  # libtool install mode
  5737.  install)
  5738.    modename="$modename: install"
  5739.  
  5740.    # There may be an optional sh(1) argument at the beginning of
  5741.    # install_prog (especially on Windows NT).
  5742.    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
  5743.       # Allow the use of GNU shtool's install command.
  5744.       $echo "X$nonopt" | grep shtool > /dev/null; then
  5745.      # Aesthetically quote it.
  5746.      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
  5747.      case $arg in
  5748.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  5749.     arg="\"$arg\""
  5750.     ;;
  5751.      esac
  5752.      install_prog="$arg "
  5753.      arg="$1"
  5754.      shift
  5755.    else
  5756.      install_prog=
  5757.      arg=$nonopt
  5758.    fi
  5759.  
  5760.    # The real first argument should be the name of the installation program.
  5761.    # Aesthetically quote it.
  5762.    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  5763.    case $arg in
  5764.     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
  5765.      arg="\"$arg\""
  5766.      ;;
  5767.    esac
  5768.    install_prog="$install_prog$arg"
  5769.  
  5770.    # We need to accept at least all the BSD install flags.
  5771.    dest=
  5772.    files=
  5773.    opts=
  5774.    prev=
  5775.    install_type=
  5776.    isdir=no
  5777.    stripme=
  5778.    for arg
  5779.    do
  5780.      if test -n "$dest"; then
  5781.     files="$files $dest"
  5782.     dest=$arg
  5783.     continue
  5784.      fi
  5785.  
  5786.      case $arg in
  5787.      -d) isdir=yes ;;
  5788.      -f)
  5789.         case " $install_prog " in
  5790.     *[\\\ /]cp\ *) ;;
  5791.     *) prev=$arg ;;
  5792.     esac
  5793.     ;;
  5794.      -g | -m | -o) prev=$arg ;;
  5795.      -s)
  5796.     stripme=" -s"
  5797.     continue
  5798.     ;;
  5799.      -*)
  5800.     ;;
  5801.      *)
  5802.     # If the previous option needed an argument, then skip it.
  5803.     if test -n "$prev"; then
  5804.       prev=
  5805.     else
  5806.       dest=$arg
  5807.       continue
  5808.     fi
  5809.     ;;
  5810.      esac
  5811.  
  5812.      # Aesthetically quote the argument.
  5813.      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  5814.      case $arg in
  5815.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  5816.     arg="\"$arg\""
  5817.     ;;
  5818.      esac
  5819.      install_prog="$install_prog $arg"
  5820.    done
  5821.  
  5822.    if test -z "$install_prog"; then
  5823.      $echo "$modename: you must specify an install program" 1>&2
  5824.      $echo "$help" 1>&2
  5825.      exit $EXIT_FAILURE
  5826.    fi
  5827.  
  5828.    if test -n "$prev"; then
  5829.      $echo "$modename: the \`$prev' option requires an argument" 1>&2
  5830.       $echo "$help" 1>&2
  5831.       exit $EXIT_FAILURE
  5832.     fi
  5833.  
  5834.     if test -z "$files"; then
  5835.       if test -z "$dest"; then
  5836.     $echo "$modename: no file or destination specified" 1>&2
  5837.       else
  5838.     $echo "$modename: you must specify a destination" 1>&2
  5839.       fi
  5840.       $echo "$help" 1>&2
  5841.       exit $EXIT_FAILURE
  5842.     fi
  5843.  
  5844.     # Strip any trailing slash from the destination.
  5845.     dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
  5846.  
  5847.     # Check to see that the destination is a directory.
  5848.     test -d "$dest" && isdir=yes
  5849.     if test "$isdir" = yes; then
  5850.       destdir="$dest"
  5851.       destname=
  5852.     else
  5853.       destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
  5854.       test "X$destdir" = "X$dest" && destdir=.
  5855.       destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
  5856.  
  5857.       # Not a directory, so check to see that there is only one file specified.
  5858.       set dummy $files
  5859.       if test "$#" -gt 2; then
  5860.     $echo "$modename: \`$dest' is not a directory" 1>&2
  5861.     $echo "$help" 1>&2
  5862.     exit $EXIT_FAILURE
  5863.      fi
  5864.    fi
  5865.    case $destdir in
  5866.    [\\/]* | [A-Za-z]:[\\/]*) ;;
  5867.    *)
  5868.      for file in $files; do
  5869.     case $file in
  5870.     *.lo) ;;
  5871.     *)
  5872.       $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
  5873.       $echo "$help" 1>&2
  5874.       exit $EXIT_FAILURE
  5875.       ;;
  5876.     esac
  5877.       done
  5878.       ;;
  5879.     esac
  5880.  
  5881.     # This variable tells wrapper scripts just to set variables rather
  5882.     # than running their programs.
  5883.     libtool_install_magic="$magic"
  5884.  
  5885.     staticlibs=
  5886.     future_libdirs=
  5887.     current_libdirs=
  5888.     for file in $files; do
  5889.  
  5890.       # Do each installation.
  5891.       case $file in
  5892.       *.$libext)
  5893.     # Do the static libraries later.
  5894.     staticlibs="$staticlibs $file"
  5895.     ;;
  5896.  
  5897.       *.la)
  5898.     # Check to see that this really is a libtool archive.
  5899.     if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  5900.     else
  5901.       $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
  5902.       $echo "$help" 1>&2
  5903.       exit $EXIT_FAILURE
  5904.     fi
  5905.  
  5906.     library_names=
  5907.     old_library=
  5908.     relink_command=
  5909.     # If there is no directory component, then add one.
  5910.     case $file in
  5911.     */* | *\\*) . $file ;;
  5912.     *) . ./$file ;;
  5913.     esac
  5914.  
  5915.     # Add the libdir to current_libdirs if it is the destination.
  5916.     if test "X$destdir" = "X$libdir"; then
  5917.       case "$current_libdirs " in
  5918.       *" $libdir "*) ;;
  5919.       *) current_libdirs="$current_libdirs $libdir" ;;
  5920.       esac
  5921.     else
  5922.       # Note the libdir as a future libdir.
  5923.       case "$future_libdirs " in
  5924.       *" $libdir "*) ;;
  5925.       *) future_libdirs="$future_libdirs $libdir" ;;
  5926.       esac
  5927.     fi
  5928.  
  5929.     dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
  5930.     test "X$dir" = "X$file/" && dir=
  5931.     dir="$dir$objdir"
  5932.  
  5933.     if test -n "$relink_command"; then
  5934.       # Determine the prefix the user has applied to our future dir.
  5935.       inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
  5936.  
  5937.       # Don't allow the user to place us outside of our expected
  5938.       # location b/c this prevents finding dependent libraries that
  5939.       # are installed to the same prefix.
  5940.       # At present, this check doesn't affect windows .dll's that
  5941.       # are installed into $libdir/../bin (currently, that works fine)
  5942.       # but it's something to keep an eye on.
  5943.       if test "$inst_prefix_dir" = "$destdir"; then
  5944.         $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  5945.         exit $EXIT_FAILURE
  5946.       fi
  5947.  
  5948.       if test -n "$inst_prefix_dir"; then
  5949.         # Stick the inst_prefix_dir data into the link command.
  5950.         relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
  5951.       else
  5952.         relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
  5953.       fi
  5954.  
  5955.       $echo "$modename: warning: relinking \`$file'" 1>&2
  5956.       $show "$relink_command"
  5957.       if $run eval "$relink_command"; then :
  5958.       else
  5959.         $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  5960.         exit $EXIT_FAILURE
  5961.       fi
  5962.     fi
  5963.  
  5964.     # See the names of the shared library.
  5965.     set dummy $library_names
  5966.     if test -n "$2"; then
  5967.       realname="$2"
  5968.       shift
  5969.       shift
  5970.  
  5971.       srcname="$realname"
  5972.       test -n "$relink_command" && srcname="$realname"T
  5973.  
  5974.       # Install the shared library and build the symlinks.
  5975.       $show "$install_prog $dir/$srcname $destdir/$realname"
  5976.       $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
  5977.       if test -n "$stripme" && test -n "$striplib"; then
  5978.         $show "$striplib $destdir/$realname"
  5979.         $run eval "$striplib $destdir/$realname" || exit $?
  5980.       fi
  5981.  
  5982.       if test "$#" -gt 0; then
  5983.         # Delete the old symlinks, and create new ones.
  5984.         # Try `ln -sf' first, because the `ln' binary might depend on
  5985.         # the symlink we replace!  Solaris /bin/ln does not understand -f,
  5986.         # so we also need to try rm && ln -s.
  5987.         for linkname
  5988.         do
  5989.           if test "$linkname" != "$realname"; then
  5990.                 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
  5991.                 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
  5992.           fi
  5993.         done
  5994.       fi
  5995.  
  5996.       # Do each command in the postinstall commands.
  5997.       lib="$destdir/$realname"
  5998.       cmds=$postinstall_cmds
  5999.       save_ifs="$IFS"; IFS='~'
  6000.       for cmd in $cmds; do
  6001.         IFS="$save_ifs"
  6002.         eval cmd=\"$cmd\"
  6003.         $show "$cmd"
  6004.         $run eval "$cmd" || {
  6005.           lt_exit=$?
  6006.  
  6007.           # Restore the uninstalled library and exit
  6008.           if test "$mode" = relink; then
  6009.         $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
  6010.           fi
  6011.  
  6012.           exit $lt_exit
  6013.         }
  6014.       done
  6015.       IFS="$save_ifs"
  6016.     fi
  6017.  
  6018.     # Install the pseudo-library for information purposes.
  6019.     name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  6020.     instname="$dir/$name"i
  6021.     $show "$install_prog $instname $destdir/$name"
  6022.     $run eval "$install_prog $instname $destdir/$name" || exit $?
  6023.  
  6024.     # Maybe install the static library, too.
  6025.     test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
  6026.     ;;
  6027.  
  6028.       *.lo)
  6029.     # Install (i.e. copy) a libtool object.
  6030.  
  6031.     # Figure out destination file name, if it wasn't already specified.
  6032.     if test -n "$destname"; then
  6033.       destfile="$destdir/$destname"
  6034.     else
  6035.       destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  6036.       destfile="$destdir/$destfile"
  6037.     fi
  6038.  
  6039.     # Deduce the name of the destination old-style object file.
  6040.     case $destfile in
  6041.     *.lo)
  6042.       staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
  6043.       ;;
  6044.     *.$objext)
  6045.       staticdest="$destfile"
  6046.       destfile=
  6047.       ;;
  6048.     *)
  6049.       $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
  6050.       $echo "$help" 1>&2
  6051.       exit $EXIT_FAILURE
  6052.       ;;
  6053.     esac
  6054.  
  6055.     # Install the libtool object if requested.
  6056.     if test -n "$destfile"; then
  6057.       $show "$install_prog $file $destfile"
  6058.       $run eval "$install_prog $file $destfile" || exit $?
  6059.     fi
  6060.  
  6061.     # Install the old object if enabled.
  6062.     if test "$build_old_libs" = yes; then
  6063.       # Deduce the name of the old-style object file.
  6064.       staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
  6065.  
  6066.       $show "$install_prog $staticobj $staticdest"
  6067.       $run eval "$install_prog \$staticobj \$staticdest" || exit $?
  6068.     fi
  6069.     exit $EXIT_SUCCESS
  6070.     ;;
  6071.  
  6072.      *)
  6073.     # Figure out destination file name, if it wasn't already specified.
  6074.     if test -n "$destname"; then
  6075.       destfile="$destdir/$destname"
  6076.     else
  6077.       destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  6078.       destfile="$destdir/$destfile"
  6079.     fi
  6080.  
  6081.     # If the file is missing, and there is a .exe on the end, strip it
  6082.     # because it is most likely a libtool script we actually want to
  6083.     # install
  6084.     stripped_ext=""
  6085.     case $file in
  6086.       *.exe)
  6087.         if test ! -f "$file"; then
  6088.           file=`$echo $file|${SED} 's,.exe$,,'`
  6089.           stripped_ext=".exe"
  6090.         fi
  6091.         ;;
  6092.     esac
  6093.  
  6094.     # Do a test to see if this is really a libtool program.
  6095.     case $host in
  6096.     *cygwin*|*mingw*)
  6097.         wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
  6098.         ;;
  6099.     *)
  6100.         wrapper=$file
  6101.         ;;
  6102.     esac
  6103.     if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
  6104.       notinst_deplibs=
  6105.       relink_command=
  6106.  
  6107.       # Note that it is not necessary on cygwin/mingw to append a dot to
  6108.       # foo even if both foo and FILE.exe exist: automatic-append-.exe
  6109.       # behavior happens only for exec(3), not for open(2)!  Also, sourcing
  6110.       # `FILE.' does not work on cygwin managed mounts.
  6111.       #
  6112.       # If there is no directory component, then add one.
  6113.       case $wrapper in
  6114.       */* | *\\*) . ${wrapper} ;;
  6115.       *) . ./${wrapper} ;;
  6116.       esac
  6117.  
  6118.       # Check the variables that should have been set.
  6119.       if test -z "$notinst_deplibs"; then
  6120.         $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
  6121.         exit $EXIT_FAILURE
  6122.       fi
  6123.  
  6124.       finalize=yes
  6125.       for lib in $notinst_deplibs; do
  6126.         # Check to see that each library is installed.
  6127.         libdir=
  6128.         if test -f "$lib"; then
  6129.           # If there is no directory component, then add one.
  6130.           case $lib in
  6131.           */* | *\\*) . $lib ;;
  6132.           *) . ./$lib ;;
  6133.           esac
  6134.         fi
  6135.         libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
  6136.         if test -n "$libdir" && test ! -f "$libfile"; then
  6137.           $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
  6138.           finalize=no
  6139.         fi
  6140.       done
  6141.  
  6142.       relink_command=
  6143.       # Note that it is not necessary on cygwin/mingw to append a dot to
  6144.       # foo even if both foo and FILE.exe exist: automatic-append-.exe
  6145.       # behavior happens only for exec(3), not for open(2)!  Also, sourcing
  6146.       # `FILE.' does not work on cygwin managed mounts.
  6147.       #
  6148.       # If there is no directory component, then add one.
  6149.       case $wrapper in
  6150.       */* | *\\*) . ${wrapper} ;;
  6151.       *) . ./${wrapper} ;;
  6152.       esac
  6153.  
  6154.       outputname=
  6155.       if test "$fast_install" = no && test -n "$relink_command"; then
  6156.         if test "$finalize" = yes && test -z "$run"; then
  6157.           tmpdir="/tmp"
  6158.           test -n "$TMPDIR" && tmpdir="$TMPDIR"
  6159.           tmpdir="$tmpdir/libtool-$$"
  6160.           save_umask=`umask`
  6161.           umask 0077
  6162.           if $mkdir "$tmpdir"; then
  6163.             umask $save_umask
  6164.           else
  6165.             umask $save_umask
  6166.         $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
  6167.         continue
  6168.           fi
  6169.           file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
  6170.           outputname="$tmpdir/$file"
  6171.           # Replace the output file specification.
  6172.           relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
  6173.  
  6174.           $show "$relink_command"
  6175.           if $run eval "$relink_command"; then :
  6176.           else
  6177.         $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  6178.         ${rm}r "$tmpdir"
  6179.         continue
  6180.           fi
  6181.           file="$outputname"
  6182.         else
  6183.           $echo "$modename: warning: cannot relink \`$file'" 1>&2
  6184.         fi
  6185.       else
  6186.         # Install the binary that we compiled earlier.
  6187.         file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
  6188.       fi
  6189.     fi
  6190.  
  6191.     # remove .exe since cygwin /usr/bin/install will append another
  6192.     # one anyway
  6193.     case $install_prog,$host in
  6194.     */usr/bin/install*,*cygwin*)
  6195.       case $file:$destfile in
  6196.       *.exe:*.exe)
  6197.         # this is ok
  6198.         ;;
  6199.       *.exe:*)
  6200.         destfile=$destfile.exe
  6201.         ;;
  6202.       *:*.exe)
  6203.         destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
  6204.         ;;
  6205.       esac
  6206.       ;;
  6207.     esac
  6208.     $show "$install_prog$stripme $file $destfile"
  6209.     $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
  6210.     test -n "$outputname" && ${rm}r "$tmpdir"
  6211.     ;;
  6212.      esac
  6213.    done
  6214.  
  6215.    for file in $staticlibs; do
  6216.      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  6217.  
  6218.      # Set up the ranlib parameters.
  6219.      oldlib="$destdir/$name"
  6220.  
  6221.      $show "$install_prog $file $oldlib"
  6222.      $run eval "$install_prog \$file \$oldlib" || exit $?
  6223.  
  6224.      if test -n "$stripme" && test -n "$old_striplib"; then
  6225.     $show "$old_striplib $oldlib"
  6226.     $run eval "$old_striplib $oldlib" || exit $?
  6227.      fi
  6228.  
  6229.      # Do each command in the postinstall commands.
  6230.      cmds=$old_postinstall_cmds
  6231.      save_ifs="$IFS"; IFS='~'
  6232.      for cmd in $cmds; do
  6233.     IFS="$save_ifs"
  6234.     eval cmd=\"$cmd\"
  6235.     $show "$cmd"
  6236.     $run eval "$cmd" || exit $?
  6237.      done
  6238.      IFS="$save_ifs"
  6239.    done
  6240.  
  6241.    if test -n "$future_libdirs"; then
  6242.      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
  6243.     fi
  6244.  
  6245.     if test -n "$current_libdirs"; then
  6246.       # Maybe just do a dry run.
  6247.       test -n "$run" && current_libdirs=" -n$current_libdirs"
  6248.       exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
  6249.     else
  6250.       exit $EXIT_SUCCESS
  6251.     fi
  6252.     ;;
  6253.  
  6254.   # libtool finish mode
  6255.   finish)
  6256.     modename="$modename: finish"
  6257.     libdirs="$nonopt"
  6258.     admincmds=
  6259.  
  6260.     if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
  6261.       for dir
  6262.       do
  6263.     libdirs="$libdirs $dir"
  6264.       done
  6265.  
  6266.       for libdir in $libdirs; do
  6267.     if test -n "$finish_cmds"; then
  6268.       # Do each command in the finish commands.
  6269.       cmds=$finish_cmds
  6270.       save_ifs="$IFS"; IFS='~'
  6271.       for cmd in $cmds; do
  6272.         IFS="$save_ifs"
  6273.         eval cmd=\"$cmd\"
  6274.         $show "$cmd"
  6275.         $run eval "$cmd" || admincmds="$admincmds
  6276.       $cmd"
  6277.       done
  6278.       IFS="$save_ifs"
  6279.     fi
  6280.     if test -n "$finish_eval"; then
  6281.       # Do the single finish_eval.
  6282.       eval cmds=\"$finish_eval\"
  6283.       $run eval "$cmds" || admincmds="$admincmds
  6284.       $cmds"
  6285.     fi
  6286.       done
  6287.     fi
  6288.  
  6289.     # Exit here if they wanted silent mode.
  6290.     test "$show" = : && exit $EXIT_SUCCESS
  6291.  
  6292.     $echo "----------------------------------------------------------------------"
  6293.     $echo "Libraries have been installed in:"
  6294.     for libdir in $libdirs; do
  6295.       $echo "   $libdir"
  6296.     done
  6297.     $echo
  6298.     $echo "If you ever happen to want to link against installed libraries"
  6299.     $echo "in a given directory, LIBDIR, you must either use libtool, and"
  6300.     $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
  6301.    $echo "flag during linking and do at least one of the following:"
  6302.    if test -n "$shlibpath_var"; then
  6303.      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
  6304.       $echo "     during execution"
  6305.     fi
  6306.     if test -n "$runpath_var"; then
  6307.       $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
  6308.      $echo "     during linking"
  6309.    fi
  6310.    if test -n "$hardcode_libdir_flag_spec"; then
  6311.      libdir=LIBDIR
  6312.      eval flag=\"$hardcode_libdir_flag_spec\"
  6313.  
  6314.      $echo "   - use the \`$flag' linker flag"
  6315.     fi
  6316.     if test -n "$admincmds"; then
  6317.       $echo "   - have your system administrator run these commands:$admincmds"
  6318.     fi
  6319.     if test -f /etc/ld.so.conf; then
  6320.       $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
  6321.    fi
  6322.    $echo
  6323.    $echo "See any operating system documentation about shared libraries for"
  6324.    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
  6325.    $echo "----------------------------------------------------------------------"
  6326.    exit $EXIT_SUCCESS
  6327.    ;;
  6328.  
  6329.  # libtool execute mode
  6330.  execute)
  6331.    modename="$modename: execute"
  6332.  
  6333.    # The first argument is the command name.
  6334.    cmd="$nonopt"
  6335.    if test -z "$cmd"; then
  6336.      $echo "$modename: you must specify a COMMAND" 1>&2
  6337.      $echo "$help"
  6338.      exit $EXIT_FAILURE
  6339.    fi
  6340.  
  6341.    # Handle -dlopen flags immediately.
  6342.    for file in $execute_dlfiles; do
  6343.      if test ! -f "$file"; then
  6344.     $echo "$modename: \`$file' is not a file" 1>&2
  6345.     $echo "$help" 1>&2
  6346.     exit $EXIT_FAILURE
  6347.       fi
  6348.  
  6349.       dir=
  6350.       case $file in
  6351.       *.la)
  6352.     # Check to see that this really is a libtool archive.
  6353.     if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  6354.     else
  6355.       $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  6356.       $echo "$help" 1>&2
  6357.       exit $EXIT_FAILURE
  6358.     fi
  6359.  
  6360.     # Read the libtool library.
  6361.     dlname=
  6362.     library_names=
  6363.  
  6364.     # If there is no directory component, then add one.
  6365.     case $file in
  6366.     */* | *\\*) . $file ;;
  6367.     *) . ./$file ;;
  6368.     esac
  6369.  
  6370.     # Skip this library if it cannot be dlopened.
  6371.     if test -z "$dlname"; then
  6372.       # Warn if it was a shared library.
  6373.       test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
  6374.       continue
  6375.     fi
  6376.  
  6377.     dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  6378.     test "X$dir" = "X$file" && dir=.
  6379.  
  6380.     if test -f "$dir/$objdir/$dlname"; then
  6381.       dir="$dir/$objdir"
  6382.     else
  6383.       $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
  6384.       exit $EXIT_FAILURE
  6385.     fi
  6386.     ;;
  6387.  
  6388.       *.lo)
  6389.     # Just add the directory containing the .lo file.
  6390.     dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  6391.     test "X$dir" = "X$file" && dir=.
  6392.     ;;
  6393.  
  6394.       *)
  6395.     $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
  6396.     continue
  6397.     ;;
  6398.      esac
  6399.  
  6400.      # Get the absolute pathname.
  6401.      absdir=`cd "$dir" && pwd`
  6402.      test -n "$absdir" && dir="$absdir"
  6403.  
  6404.      # Now add the directory to shlibpath_var.
  6405.      if eval "test -z \"\$$shlibpath_var\""; then
  6406.     eval "$shlibpath_var=\"\$dir\""
  6407.      else
  6408.     eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
  6409.      fi
  6410.    done
  6411.  
  6412.    # This variable tells wrapper scripts just to set shlibpath_var
  6413.    # rather than running their programs.
  6414.    libtool_execute_magic="$magic"
  6415.  
  6416.    # Check if any of the arguments is a wrapper script.
  6417.    args=
  6418.    for file
  6419.    do
  6420.      case $file in
  6421.      -*) ;;
  6422.      *)
  6423.     # Do a test to see if this is really a libtool program.
  6424.     if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  6425.       # If there is no directory component, then add one.
  6426.       case $file in
  6427.       */* | *\\*) . $file ;;
  6428.       *) . ./$file ;;
  6429.       esac
  6430.  
  6431.       # Transform arg to wrapped name.
  6432.       file="$progdir/$program"
  6433.     fi
  6434.     ;;
  6435.      esac
  6436.      # Quote arguments (to preserve shell metacharacters).
  6437.      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
  6438.      args="$args \"$file\""
  6439.    done
  6440.  
  6441.    if test -z "$run"; then
  6442.      if test -n "$shlibpath_var"; then
  6443.     # Export the shlibpath_var.
  6444.     eval "export $shlibpath_var"
  6445.      fi
  6446.  
  6447.      # Restore saved environment variables
  6448.      if test "${save_LC_ALL+set}" = set; then
  6449.     LC_ALL="$save_LC_ALL"; export LC_ALL
  6450.      fi
  6451.      if test "${save_LANG+set}" = set; then
  6452.     LANG="$save_LANG"; export LANG
  6453.      fi
  6454.  
  6455.      # Now prepare to actually exec the command.
  6456.      exec_cmd="\$cmd$args"
  6457.    else
  6458.      # Display what would be done.
  6459.      if test -n "$shlibpath_var"; then
  6460.     eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
  6461.     $echo "export $shlibpath_var"
  6462.      fi
  6463.      $echo "$cmd$args"
  6464.      exit $EXIT_SUCCESS
  6465.    fi
  6466.    ;;
  6467.  
  6468.  # libtool clean and uninstall mode
  6469.  clean | uninstall)
  6470.    modename="$modename: $mode"
  6471.    rm="$nonopt"
  6472.    files=
  6473.    rmforce=
  6474.    exit_status=0
  6475.  
  6476.    # This variable tells wrapper scripts just to set variables rather
  6477.    # than running their programs.
  6478.    libtool_install_magic="$magic"
  6479.  
  6480.    for arg
  6481.    do
  6482.      case $arg in
  6483.      -f) rm="$rm $arg"; rmforce=yes ;;
  6484.      -*) rm="$rm $arg" ;;
  6485.      *) files="$files $arg" ;;
  6486.      esac
  6487.    done
  6488.  
  6489.    if test -z "$rm"; then
  6490.      $echo "$modename: you must specify an RM program" 1>&2
  6491.      $echo "$help" 1>&2
  6492.      exit $EXIT_FAILURE
  6493.    fi
  6494.  
  6495.    rmdirs=
  6496.  
  6497.    origobjdir="$objdir"
  6498.    for file in $files; do
  6499.      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  6500.      if test "X$dir" = "X$file"; then
  6501.     dir=.
  6502.     objdir="$origobjdir"
  6503.      else
  6504.     objdir="$dir/$origobjdir"
  6505.      fi
  6506.      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  6507.      test "$mode" = uninstall && objdir="$dir"
  6508.  
  6509.      # Remember objdir for removal later, being careful to avoid duplicates
  6510.      if test "$mode" = clean; then
  6511.     case " $rmdirs " in
  6512.       *" $objdir "*) ;;
  6513.       *) rmdirs="$rmdirs $objdir" ;;
  6514.     esac
  6515.      fi
  6516.  
  6517.      # Don't error if the file doesn't exist and rm -f was used.
  6518.      if (test -L "$file") >/dev/null 2>&1 \
  6519.     || (test -h "$file") >/dev/null 2>&1 \
  6520.     || test -f "$file"; then
  6521.     :
  6522.      elif test -d "$file"; then
  6523.     exit_status=1
  6524.     continue
  6525.      elif test "$rmforce" = yes; then
  6526.     continue
  6527.      fi
  6528.  
  6529.      rmfiles="$file"
  6530.  
  6531.      case $name in
  6532.      *.la)
  6533.     # Possibly a libtool archive, so verify it.
  6534.     if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  6535.       . $dir/$name
  6536.  
  6537.       # Delete the libtool libraries and symlinks.
  6538.       for n in $library_names; do
  6539.         rmfiles="$rmfiles $objdir/$n"
  6540.       done
  6541.       test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
  6542.       test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
  6543.  
  6544.       if test "$mode" = uninstall; then
  6545.         if test -n "$library_names"; then
  6546.           # Do each command in the postuninstall commands.
  6547.           cmds=$postuninstall_cmds
  6548.           save_ifs="$IFS"; IFS='~'
  6549.           for cmd in $cmds; do
  6550.         IFS="$save_ifs"
  6551.         eval cmd=\"$cmd\"
  6552.         $show "$cmd"
  6553.         $run eval "$cmd"
  6554.         if test "$?" -ne 0 && test "$rmforce" != yes; then
  6555.           exit_status=1
  6556.         fi
  6557.           done
  6558.           IFS="$save_ifs"
  6559.         fi
  6560.  
  6561.         if test -n "$old_library"; then
  6562.           # Do each command in the old_postuninstall commands.
  6563.           cmds=$old_postuninstall_cmds
  6564.           save_ifs="$IFS"; IFS='~'
  6565.           for cmd in $cmds; do
  6566.         IFS="$save_ifs"
  6567.         eval cmd=\"$cmd\"
  6568.         $show "$cmd"
  6569.         $run eval "$cmd"
  6570.         if test "$?" -ne 0 && test "$rmforce" != yes; then
  6571.           exit_status=1
  6572.         fi
  6573.           done
  6574.           IFS="$save_ifs"
  6575.         fi
  6576.         # FIXME: should reinstall the best remaining shared library.
  6577.       fi
  6578.     fi
  6579.     ;;
  6580.  
  6581.      *.lo)
  6582.     # Possibly a libtool object, so verify it.
  6583.     if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  6584.  
  6585.       # Read the .lo file
  6586.       . $dir/$name
  6587.  
  6588.       # Add PIC object to the list of files to remove.
  6589.       if test -n "$pic_object" \
  6590.          && test "$pic_object" != none; then
  6591.         rmfiles="$rmfiles $dir/$pic_object"
  6592.       fi
  6593.  
  6594.       # Add non-PIC object to the list of files to remove.
  6595.       if test -n "$non_pic_object" \
  6596.          && test "$non_pic_object" != none; then
  6597.         rmfiles="$rmfiles $dir/$non_pic_object"
  6598.       fi
  6599.     fi
  6600.     ;;
  6601.  
  6602.      *)
  6603.     if test "$mode" = clean ; then
  6604.       noexename=$name
  6605.       case $file in
  6606.       *.exe)
  6607.         file=`$echo $file|${SED} 's,.exe$,,'`
  6608.         noexename=`$echo $name|${SED} 's,.exe$,,'`
  6609.         # $file with .exe has already been added to rmfiles,
  6610.         # add $file without .exe
  6611.         rmfiles="$rmfiles $file"
  6612.         ;;
  6613.       esac
  6614.       # Do a test to see if this is a libtool program.
  6615.       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  6616.         relink_command=
  6617.         . $dir/$noexename
  6618.  
  6619.         # note $name still contains .exe if it was in $file originally
  6620.         # as does the version of $file that was added into $rmfiles
  6621.         rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
  6622.         if test "$fast_install" = yes && test -n "$relink_command"; then
  6623.           rmfiles="$rmfiles $objdir/lt-$name"
  6624.         fi
  6625.         if test "X$noexename" != "X$name" ; then
  6626.           rmfiles="$rmfiles $objdir/lt-${noexename}.c"
  6627.         fi
  6628.       fi
  6629.     fi
  6630.     ;;
  6631.      esac
  6632.      $show "$rm $rmfiles"
  6633.      $run $rm $rmfiles || exit_status=1
  6634.    done
  6635.    objdir="$origobjdir"
  6636.  
  6637.    # Try to remove the ${objdir}s in the directories where we deleted files
  6638.    for dir in $rmdirs; do
  6639.      if test -d "$dir"; then
  6640.     $show "rmdir $dir"
  6641.     $run rmdir $dir >/dev/null 2>&1
  6642.      fi
  6643.    done
  6644.  
  6645.    exit $exit_status
  6646.    ;;
  6647.  
  6648.  "")
  6649.    $echo "$modename: you must specify a MODE" 1>&2
  6650.    $echo "$generic_help" 1>&2
  6651.    exit $EXIT_FAILURE
  6652.    ;;
  6653.  esac
  6654.  
  6655.  if test -z "$exec_cmd"; then
  6656.    $echo "$modename: invalid operation mode \`$mode'" 1>&2
  6657.     $echo "$generic_help" 1>&2
  6658.     exit $EXIT_FAILURE
  6659.   fi
  6660. fi # test -z "$show_help"
  6661.  
  6662. if test -n "$exec_cmd"; then
  6663.   eval exec $exec_cmd
  6664.   exit $EXIT_FAILURE
  6665. fi
  6666.  
  6667. # We need to display help for each of the modes.
  6668. case $mode in
  6669. "") $echo \
  6670. "Usage: $modename [OPTION]... [MODE-ARG]...
  6671.  
  6672. Provide generalized library-building support services.
  6673.  
  6674.    --config          show all configuration variables
  6675.    --debug           enable verbose shell tracing
  6676. -n, --dry-run         display commands without modifying any files
  6677.    --features        display basic configuration information and exit
  6678.    --finish          same as \`--mode=finish'
  6679.    --help            display this help message and exit
  6680.    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
  6681.    --quiet           same as \`--silent'
  6682.    --silent          don't print informational messages
  6683.    --tag=TAG         use configuration variables from tag TAG
  6684.    --version         print version information
  6685.  
  6686. MODE must be one of the following:
  6687.  
  6688.      clean           remove files from the build directory
  6689.      compile         compile a source file into a libtool object
  6690.      execute         automatically set library path, then run a program
  6691.      finish          complete the installation of libtool libraries
  6692.      install         install libraries or executables
  6693.      link            create a library or an executable
  6694.      uninstall       remove libraries from an installed directory
  6695.  
  6696. MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
  6697. a more detailed description of MODE.
  6698.  
  6699. Report bugs to <bug-libtool@gnu.org>."
  6700.  exit $EXIT_SUCCESS
  6701.  ;;
  6702.  
  6703. clean)
  6704.  $echo \
  6705. "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
  6706.  
  6707. Remove files from the build directory.
  6708.  
  6709. RM is the name of the program to use to delete files associated with each FILE
  6710. (typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  6711. to RM.
  6712.  
  6713. If FILE is a libtool library, object or program, all the files associated
  6714. with it are deleted. Otherwise, only FILE itself is deleted using RM."
  6715.  ;;
  6716.  
  6717. compile)
  6718.  $echo \
  6719. "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
  6720.  
  6721. Compile a source file into a libtool library object.
  6722.  
  6723. This mode accepts the following additional options:
  6724.  
  6725.  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
  6726.  -prefer-pic       try to building PIC objects only
  6727.  -prefer-non-pic   try to building non-PIC objects only
  6728.  -static           always build a \`.o' file suitable for static linking
  6729.  
  6730. COMPILE-COMMAND is a command to be used in creating a \`standard' object file
  6731. from the given SOURCEFILE.
  6732.  
  6733. The output file name is determined by removing the directory component from
  6734. SOURCEFILE, then substituting the C source code suffix \`.c' with the
  6735. library object suffix, \`.lo'."
  6736.  ;;
  6737.  
  6738. execute)
  6739.  $echo \
  6740. "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
  6741.  
  6742. Automatically set library path, then run a program.
  6743.  
  6744. This mode accepts the following additional options:
  6745.  
  6746.  -dlopen FILE      add the directory containing FILE to the library path
  6747.  
  6748. This mode sets the library path environment variable according to \`-dlopen'
  6749. flags.
  6750.  
  6751. If any of the ARGS are libtool executable wrappers, then they are translated
  6752. into their corresponding uninstalled binary, and any of their required library
  6753. directories are added to the library path.
  6754.  
  6755. Then, COMMAND is executed, with ARGS as arguments."
  6756.   ;;
  6757.  
  6758. finish)
  6759.   $echo \
  6760. "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
  6761.  
  6762. Complete the installation of libtool libraries.
  6763.  
  6764. Each LIBDIR is a directory that contains libtool libraries.
  6765.  
  6766. The commands that this mode executes may require superuser privileges.  Use
  6767. the \`--dry-run' option if you just want to see what would be executed."
  6768.  ;;
  6769.  
  6770. install)
  6771.  $echo \
  6772. "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
  6773.  
  6774. Install executables or libraries.
  6775.  
  6776. INSTALL-COMMAND is the installation command.  The first component should be
  6777. either the \`install' or \`cp' program.
  6778.  
  6779. The rest of the components are interpreted as arguments to that command (only
  6780. BSD-compatible install options are recognized)."
  6781.  ;;
  6782.  
  6783. link)
  6784.  $echo \
  6785. "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
  6786.  
  6787. Link object files or libraries together to form another library, or to
  6788. create an executable program.
  6789.  
  6790. LINK-COMMAND is a command using the C compiler that you would use to create
  6791. a program from several object files.
  6792.  
  6793. The following components of LINK-COMMAND are treated specially:
  6794.  
  6795.  -all-static       do not do any dynamic linking at all
  6796.  -avoid-version    do not add a version suffix if possible
  6797.  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
  6798.  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
  6799.  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  6800.  -export-symbols SYMFILE
  6801.             try to export only the symbols listed in SYMFILE
  6802.  -export-symbols-regex REGEX
  6803.             try to export only the symbols matching REGEX
  6804.  -LLIBDIR          search LIBDIR for required installed libraries
  6805.  -lNAME            OUTPUT-FILE requires the installed library libNAME
  6806.  -module           build a library that can dlopened
  6807.  -no-fast-install  disable the fast-install mode
  6808.  -no-install       link a not-installable executable
  6809.  -no-undefined     declare that a library does not refer to external symbols
  6810.  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
  6811.  -objectlist FILE  Use a list of object files found in FILE to specify objects
  6812.  -precious-files-regex REGEX
  6813.                    don't remove output files matching REGEX
  6814.  -release RELEASE  specify package release information
  6815.  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
  6816.  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
  6817.  -static           do not do any dynamic linking of libtool libraries
  6818.  -version-info CURRENT[:REVISION[:AGE]]
  6819.             specify library version info [each variable defaults to 0]
  6820.  
  6821. All other options (arguments beginning with \`-') are ignored.
  6822.  
  6823. Every other argument is treated as a filename.  Files ending in \`.la' are
  6824. treated as uninstalled libtool libraries, other files are standard or library
  6825. object files.
  6826.  
  6827. If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
  6828. only library objects (\`.lo' files) may be specified, and \`-rpath' is
  6829. required, except when creating a convenience library.
  6830.  
  6831. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
  6832. using \`ar' and \`ranlib', or on Windows using \`lib'.
  6833.  
  6834. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
  6835. is created, otherwise an executable program is created."
  6836.   ;;
  6837.  
  6838. uninstall)
  6839.   $echo \
  6840. "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  6841.  
  6842. Remove libraries from an installation directory.
  6843.  
  6844. RM is the name of the program to use to delete files associated with each FILE
  6845. (typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  6846. to RM.
  6847.  
  6848. If FILE is a libtool library, all the files associated with it are deleted.
  6849. Otherwise, only FILE itself is deleted using RM."
  6850.   ;;
  6851.  
  6852. *)
  6853.   $echo "$modename: invalid operation mode \`$mode'" 1>&2
  6854.  $echo "$help" 1>&2
  6855.  exit $EXIT_FAILURE
  6856.  ;;
  6857. esac
  6858.  
  6859. $echo
  6860. $echo "Try \`$modename --help' for more information about other modes."
  6861.  
  6862. exit $?
  6863.  
  6864. # The TAGs below are defined such that we never get into a situation
  6865. # in which we disable both kinds of libraries.  Given conflicting
  6866. # choices, we go for a static library, that is the most portable,
  6867. # since we can't tell whether shared libraries were disabled because
  6868. # the user asked for that or because the platform doesn't support
  6869. # them.  This is particularly important on AIX, because we don't
  6870. # support having both static and shared libraries enabled at the same
  6871. # time on that platform, so we default to a shared-only configuration.
  6872. # If a disable-shared tag is given, we'll fallback to a static-only
  6873. # configuration.  But we'll never go from static-only to shared-only.
  6874.  
  6875. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
  6876. build_libtool_libs=no
  6877. build_old_libs=yes
  6878. # ### END LIBTOOL TAG CONFIG: disable-shared
  6879.  
  6880. # ### BEGIN LIBTOOL TAG CONFIG: disable-static
  6881. build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
  6882. # ### END LIBTOOL TAG CONFIG: disable-static
  6883.  
  6884. # Local Variables:
  6885. # mode:shell-script
  6886. # sh-indentation:2
  6887. # End:
  6888. # ### BEGIN LIBTOOL TAG CONFIG: CXX
  6889.  
  6890. # Libtool was configured on host cryptnxt:
  6891.  
  6892. # Shell to use when invoking shell scripts.
  6893. SHELL="/bin/sh"
  6894.  
  6895. # Whether or not to build shared libraries.
  6896. build_libtool_libs=yes
  6897.  
  6898. # Whether or not to build static libraries.
  6899. build_old_libs=yes
  6900.  
  6901. # Whether or not to add -lc for building shared libraries.
  6902. build_libtool_need_lc=no
  6903.  
  6904. # Whether or not to disallow shared libs when runtime libs are static
  6905. allow_libtool_libs_with_static_runtimes=no
  6906.  
  6907. # Whether or not to optimize for fast installation.
  6908. fast_install=yes
  6909.  
  6910. # The host system.
  6911. host_alias=
  6912. host=armv7l-unknown-linux-gnu
  6913. host_os=linux-gnu
  6914.  
  6915. # The build system.
  6916. build_alias=
  6917. build=armv7l-unknown-linux-gnu
  6918. build_os=linux-gnu
  6919.  
  6920. # An echo program that does not interpret backslashes.
  6921. echo="echo"
  6922.  
  6923. # The archiver.
  6924. AR="ar"
  6925. AR_FLAGS="cru"
  6926.  
  6927. # A C compiler.
  6928. LTCC="gcc"
  6929.  
  6930. # A language-specific compiler.
  6931. CC="g++"
  6932.  
  6933. # Is the compiler the GNU C compiler?
  6934. with_gcc=yes
  6935.  
  6936. # An ERE matcher.
  6937. EGREP="grep -E"
  6938.  
  6939. # The linker used to build libraries.
  6940. LD="/usr/arm-angstrom-linux-gnueabi/bin/ld"
  6941.  
  6942. # Whether we need hard or soft links.
  6943. LN_S="ln -s"
  6944.  
  6945. # A BSD-compatible nm program.
  6946. NM="/usr/bin/nm -B"
  6947.  
  6948. # A symbol stripping program
  6949. STRIP="strip"
  6950.  
  6951. # Used to examine libraries when file_magic_cmd begins "file"
  6952. MAGIC_CMD=file
  6953.  
  6954. # Used on cygwin: DLL creation program.
  6955. DLLTOOL="dlltool"
  6956.  
  6957. # Used on cygwin: object dumper.
  6958. OBJDUMP="objdump"
  6959.  
  6960. # Used on cygwin: assembler.
  6961. AS="as"
  6962.  
  6963. # The name of the directory that contains temporary libtool files.
  6964. objdir=.libs
  6965.  
  6966. # How to create reloadable object files.
  6967. reload_flag=" -r"
  6968. reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
  6969.  
  6970. # How to pass a linker flag through the compiler.
  6971. wl="-Wl,"
  6972.  
  6973. # Object file suffix (normally "o").
  6974. objext="o"
  6975.  
  6976. # Old archive suffix (normally "a").
  6977. libext="a"
  6978.  
  6979. # Shared library suffix (normally ".so").
  6980. shrext_cmds='.so'
  6981.  
  6982. # Executable file suffix (normally "").
  6983. exeext=""
  6984.  
  6985. # Additional compiler flags for building library objects.
  6986. pic_flag=" -fPIC -DPIC"
  6987. pic_mode=default
  6988.  
  6989. # What is the maximum length of a command?
  6990. max_cmd_len=32768
  6991.  
  6992. # Does compiler simultaneously support -c and -o options?
  6993. compiler_c_o="yes"
  6994.  
  6995. # Must we lock files when doing compilation?
  6996. need_locks="no"
  6997.  
  6998. # Do we need the lib prefix for modules?
  6999. need_lib_prefix=no
  7000.  
  7001. # Do we need a version for libraries?
  7002. need_version=no
  7003.  
  7004. # Whether dlopen is supported.
  7005. dlopen_support=unknown
  7006.  
  7007. # Whether dlopen of programs is supported.
  7008. dlopen_self=unknown
  7009.  
  7010. # Whether dlopen of statically linked programs is supported.
  7011. dlopen_self_static=unknown
  7012.  
  7013. # Compiler flag to prevent dynamic linking.
  7014. link_static_flag="-static"
  7015.  
  7016. # Compiler flag to turn off builtin functions.
  7017. no_builtin_flag=" -fno-builtin"
  7018.  
  7019. # Compiler flag to allow reflexive dlopens.
  7020. export_dynamic_flag_spec="\${wl}--export-dynamic"
  7021.  
  7022. # Compiler flag to generate shared objects directly from archives.
  7023. whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
  7024.  
  7025. # Compiler flag to generate thread-safe objects.
  7026. thread_safe_flag_spec=""
  7027.  
  7028. # Library versioning type.
  7029. version_type=linux
  7030.  
  7031. # Format of library name prefix.
  7032. libname_spec="lib\$name"
  7033.  
  7034. # List of archive names.  First name is the real one, the rest are links.
  7035. # The last name is the one that the linker finds with -lNAME.
  7036. library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
  7037.  
  7038. # The coded name of the library, if different from the real name.
  7039. soname_spec="\${libname}\${release}\${shared_ext}\$major"
  7040.  
  7041. # Commands used to build and install an old-style archive.
  7042. RANLIB="ranlib"
  7043. old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
  7044. old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
  7045. old_postuninstall_cmds=""
  7046.  
  7047. # Create an old-style archive from a shared archive.
  7048. old_archive_from_new_cmds=""
  7049.  
  7050. # Create a temporary old-style archive to link instead of a shared archive.
  7051. old_archive_from_expsyms_cmds=""
  7052.  
  7053. # Commands used to build and install a shared archive.
  7054. archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
  7055. archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
  7056. postinstall_cmds=""
  7057. postuninstall_cmds=""
  7058.  
  7059. # Commands used to build a loadable module (assumed same as above if empty)
  7060. module_cmds=""
  7061. module_expsym_cmds=""
  7062.  
  7063. # Commands to strip libraries.
  7064. old_striplib="strip --strip-debug"
  7065. striplib="strip --strip-unneeded"
  7066.  
  7067. # Dependencies to place before the objects being linked to create a
  7068. # shared library.
  7069. predep_objects="/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../crti.o /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../arm-angstrom-linux-gnueabi/4.7.3/crtbeginS.o"
  7070.  
  7071. # Dependencies to place after the objects being linked to create a
  7072. # shared library.
  7073. postdep_objects="/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../arm-angstrom-linux-gnueabi/4.7.3/crtendS.o /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../crtn.o"
  7074.  
  7075. # Dependencies to place before the objects being linked to create a
  7076. # shared library.
  7077. predeps=""
  7078.  
  7079. # Dependencies to place after the objects being linked to create a
  7080. # shared library.
  7081. postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
  7082.  
  7083. # The library search path used internally by the compiler when linking
  7084. # a shared library.
  7085. compiler_lib_search_path="-L/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3 -L/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../arm-angstrom-linux-gnueabi/4.7.3 -L/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../.. -L/usr/lib/arm-angstrom-linux-gnueabi/4.7.3"
  7086.  
  7087. # Method to check whether dependent libraries are shared objects.
  7088. deplibs_check_method="pass_all"
  7089.  
  7090. # Command to use when deplibs_check_method == file_magic.
  7091. file_magic_cmd="\$MAGIC_CMD"
  7092.  
  7093. # Flag that allows shared libraries with undefined symbols to be built.
  7094. allow_undefined_flag=""
  7095.  
  7096. # Flag that forces no undefined symbols.
  7097. no_undefined_flag=""
  7098.  
  7099. # Commands used to finish a libtool library installation in a directory.
  7100. finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
  7101.  
  7102. # Same as above, but a single script fragment to be evaled but not shown.
  7103. finish_eval=""
  7104.  
  7105. # Take the output of nm and produce a listing of raw symbols and C names.
  7106. global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[   ][  ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
  7107.  
  7108. # Transform the output of nm in a proper C declaration
  7109. global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
  7110.  
  7111. # Transform the output of nm in a C name address pair
  7112. global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
  7113.  
  7114. # This is the shared library runtime path variable.
  7115. runpath_var=LD_RUN_PATH
  7116.  
  7117. # This is the shared library path variable.
  7118. shlibpath_var=LD_LIBRARY_PATH
  7119.  
  7120. # Is shlibpath searched before the hard-coded library search path?
  7121. shlibpath_overrides_runpath=no
  7122.  
  7123. # How to hardcode a shared library path into an executable.
  7124. hardcode_action=immediate
  7125.  
  7126. # Whether we should hardcode library paths into libraries.
  7127. hardcode_into_libs=yes
  7128.  
  7129. # Flag to hardcode $libdir into a binary during linking.
  7130. # This must work even if $libdir does not exist.
  7131. hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
  7132.  
  7133. # If ld is used when linking, flag to hardcode $libdir into
  7134. # a binary during linking. This must work even if $libdir does
  7135. # not exist.
  7136. hardcode_libdir_flag_spec_ld=""
  7137.  
  7138. # Whether we need a single -rpath flag with a separated argument.
  7139. hardcode_libdir_separator=""
  7140.  
  7141. # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
  7142. # resulting binary.
  7143. hardcode_direct=no
  7144.  
  7145. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  7146. # resulting binary.
  7147. hardcode_minus_L=no
  7148.  
  7149. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  7150. # the resulting binary.
  7151. hardcode_shlibpath_var=
  7152.  
  7153. # Set to yes if building a shared library automatically hardcodes DIR into the library
  7154. # and all subsequent libraries and executables linked against it.
  7155. hardcode_automatic=no
  7156.  
  7157. # Variables whose values should be saved in libtool wrapper scripts and
  7158. # restored at relink time.
  7159. variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  7160.  
  7161. # Whether libtool must link a program against all its dependency libraries.
  7162. link_all_deplibs=unknown
  7163.  
  7164. # Compile-time system search path for libraries
  7165. sys_lib_search_path_spec=" /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../../arm-angstrom-linux-gnueabi/lib/arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../../arm-angstrom-linux-gnueabi/lib/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../ /lib/arm-angstrom-linux-gnueabi/4.7.3/ /lib/ /usr/lib/arm-angstrom-linux-gnueabi/4.7.3/ /usr/lib/"
  7166.  
  7167. # Run-time system search path for libraries
  7168. sys_lib_dlsearch_path_spec="/lib /usr/lib "
  7169.  
  7170. # Fix the shell variable $srcfile for the compiler.
  7171. fix_srcfile_path=""
  7172.  
  7173. # Set to yes if exported symbols are required.
  7174. always_export_symbols=no
  7175.  
  7176. # The commands to list exported symbols.
  7177. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
  7178.  
  7179. # The commands to extract the exported symbol list from a shared archive.
  7180. extract_expsyms_cmds=""
  7181.  
  7182. # Symbols that should not be listed in the preloaded symbols.
  7183. exclude_expsyms=""
  7184.  
  7185. # Symbols that must always be exported.
  7186. include_expsyms=""
  7187.  
  7188. # ### END LIBTOOL TAG CONFIG: CXX
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement